PageSourceSearch

https://us.yotoplay.com/_next/static/chunks/6185.5a7cdc161a48e3f4.js

js yotoplay.com collected 2026-09-24 19:13:43 UTC 495,189 bytes, 3,115 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c643436d-27f7-47a2-9d33-dd639a5bc588",e._sentryDebugIdIdentifier="sentry-dbid-c643436d-27f7-47a2-9d33-dd639a5bc588")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6185],{56185:(e,t,i)=>{let a,r;i.r(t),i.d(t,{MaxResolution:()=>tY,MediaError:()=>tU,MinResolution:()=>tG,RenditionOrder:()=>tj,default:()=>Ec,generatePlayerInitTime:()=>iB,playerSoftwareName:()=>Eu,playerSoftwareVersion:()=>Ed});var n=i(14232),s=Object.create,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,u=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,h=function(e,t){return function(){return e&&(t=e(e=0)),t}},m=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},p=function(e,t,i,a){if(t&&"object"==typeof t||"function"==typeof t)for(var r,n=d(t),s=0,u=n.length;s<u;s++)r=n[s],c.call(e,r)||r===i||o(e,r,{get:(function(e){return t[e]}).bind(null,r),enumerable:!(a=l(t,r))||a.enumerable});return e},E=function(e,t,i){return i=null!=e?s(u(e)):{},p(!t&&e&&e.__esModule?i:o(i,"default",{value:e,enumerable:!0}),e)},b=m(function(e,t){t.exports="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}});function f(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):f(e,t)}var g=h(function(){g()});function _(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var y=h(function(){}),T=m(function(e,t){var i=Array.prototype.slice;t.exports=function(e,t){for(("length"in e)||(e=[e]),e=i.call(e);e.length;){var a=e.shift(),r=t(a);if(r)return r;a.childNodes&&a.childNodes.length&&(e=i.call(a.childNodes).concat(e))}}}),A=m(function(e,t){function i(e,t){if(!f(this,i))return new i(e,t);this.data=e,this.nodeValue=e,this.length=e.length,this.ownerDocument=t||null}g(),t.exports=i,i.prototype.nodeType=8,i.prototype.nodeName="#comment",i.prototype.toString=function(){return"[object Comment]"}}),k=m(function(e,t){function i(e,t){if(!f(this,i))return new i(e);this.data=e||"",this.length=this.data.length,this.ownerDocument=t||null}g(),t.exports=i,i.prototype.type="DOMTextNode",i.prototype.nodeType=3,i.prototype.nodeName="#text",i.prototype.toString=function(){return this.data},i.prototype.replaceData=function(e,t,i){var a=this.data,r=a.substring(0,e),n=a.substring(e+t,a.length);this.data=r+i+n,this.length=this.data.length}}),w=m(function(e,t){t.exports=function(e){var t=this,i=e.type;e.target||(e.target=t),t.listeners||(t.listeners={});var a=t.listeners[i];if(a)return a.forEach(function(i){e.currentTarget=t,"function"==typeof i?i(e):i.handleEvent(e)});t.parentNode&&t.parentNode.dispatchEvent(e)}}),S=m(function(e,t){t.exports=function(e,t){this.listeners||(this.listeners={}),this.listeners[e]||(this.listeners[e]=[]),-1===this.listeners[e].indexOf(t)&&this.listeners[e].push(t)}}),I=m(function(e,t){t.exports=function(e,t){if(this.listeners&&this.listeners[e]){var i=this.listeners[e],a=i.indexOf(t);-1!==a&&i.splice(a,1)}}}),R=m(function(e,t){y(),t.exports=function e(t){switch(t.nodeType){case 3:return r(t.data);case 8:return"\x3c!--"+t.data+"--\x3e";default:var n,s,o;return s=[],o=(n=t).tagName,"http://www.w3.org/1999/xhtml"===n.namespaceURI&&(o=o.toLowerCase()),s.push("<"+o+function(e){var t=[];for(var i in e)(function(e,t){var i=_(e[t]);return"style"===t&&Object.keys(e.style).length>0||e.hasOwnProperty(t)&&("string"===i||"boolean"===i||"number"===i)&&"nodeName"!==t&&"className"!==t&&"tagName"!==t&&"textContent"!==t&&"innerText"!==t&&"namespaceURI"!==t&&"innerHTML"!==t})(e,i)&&t.push({name:i,value:e[i]});for(var r in e._attributes)for(var n in e._attributes[r]){var s=e._attributes[r][n],o=(s.prefix?s.prefix+":":"")+n;t.push({name:o,value:s.value})}return e.className&&t.push({name:"class",value:e.className}),t.length?a(t):""}(n)+function(e){var t=e.dataset,i=[];for(var r in t)i.push({name:"data-"+r,value:t[r]});return i.length?a(i):""}(n)),i.indexOf(o)>-1?s.push(" />"):(s.push(">"),n.childNodes.length?s.push.apply(s,n.childNodes.map(e)):n.textContent||n.innerText?s.push(r
1(n.textContent||n.innerText)):n.innerHTML&&s.push(n.innerHTML),s.push("</"+o+">")),s.join("")}};var i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function a(e){var t=[];return e.forEach(function(e){var i=e.name,a=e.value;"style"===i&&(a=function(e){if("string"==typeof e)return e;var t="";return Object.keys(e).forEach(function(i){var a=e[i];i=i.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}),t+=i+":"+a+";"}),t}(a)),t.push(i+'="'+r(a).replace(/"/g,"&quot;")+'"')}),t.length?" "+t.join(" "):""}function r(e){var t="";return"string"==typeof e?t=e:e&&(t=e.toString()),t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}}),C=m(function(e,t){g();var i=T(),a=w(),r=S(),n=I(),s=R(),o="http://www.w3.org/1999/xhtml";function l(e,t,i){if(!f(this,l))return new l(e);var a=void 0===i?o:i||null;this.tagName=a===o?String(e).toUpperCase():e,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=t||null,this.namespaceURI=a,this._attributes={},"INPUT"===this.tagName&&(this.type="text")}t.exports=l,l.prototype.type="DOMElement",l.prototype.nodeType=1,l.prototype.appendChild=function(e){return e.parentNode&&e.parentNode.removeChild(e),this.childNodes.push(e),e.parentNode=this,e},l.prototype.replaceChild=function(e,t){e.parentNode&&e.parentNode.removeChild(e);var i=this.childNodes.indexOf(t);return t.parentNode=null,this.childNodes[i]=e,e.parentNode=this,t},l.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);return this.childNodes.splice(t,1),e.parentNode=null,e},l.prototype.insertBefore=function(e,t){e.parentNode&&e.parentNode.removeChild(e);var i=null==t?-1:this.childNodes.indexOf(t);return i>-1?this.childNodes.splice(i,0,e):this.childNodes.push(e),e.parentNode=this,e},l.prototype.setAttributeNS=function(e,t,i){var a=null,r=t,n=t.indexOf(":");(n>-1&&(a=t.substr(0,n),r=t.substr(n+1)),"INPUT"===this.tagName&&"type"===t)?this.type=i:(this._attributes[e]||(this._attributes[e]={}))[r]={value:i,prefix:a}},l.prototype.getAttributeNS=function(e,t){var i=this._attributes[e],a=i&&i[t]&&i[t].value;return"INPUT"===this.tagName&&"type"===t?this.type:"string"!=typeof a?null:a},l.prototype.removeAttributeNS=function(e,t){var i=this._attributes[e];i&&delete i[t]},l.prototype.hasAttributeNS=function(e,t){var i=this._attributes[e];return!!i&&t in i},l.prototype.setAttribute=function(e,t){return this.setAttributeNS(null,e,t)},l.prototype.getAttribute=function(e){return this.getAttributeNS(null,e)},l.prototype.removeAttribute=function(e){return this.removeAttributeNS(null,e)},l.prototype.hasAttribute=function(e){return this.hasAttributeNS(null,e)},l.prototype.removeEventListener=n,l.prototype.addEventListener=r,l.prototype.dispatchEvent=a,l.prototype.focus=function(){},l.prototype.toString=function(){return s(this)},l.prototype.getElementsByClassName=function(e){var t=e.split(" "),a=[];return i(this,function(e){if(1===e.nodeType){var i=(e.className||"").split(" ");t.every(function(e){return -1!==i.indexOf(e)})&&a.push(e)}}),a},l.prototype.getElementsByTagName=function(e){e=e.toLowerCase();var t=[];return i(this.childNodes,function(i){1===i.nodeType&&("*"===e||i.tagName.toLowerCase()===e)&&t.push(i)}),t},l.prototype.contains=function(e){return i(this,function(t){return e===t})||!1}}),D=m(function(e,t){g();var i=C();function a(e){if(!f(this,a))return new a;this.childNodes=[],this.parentNode=null,this.ownerDocument=e||null}t.exports=a,a.prototype.type="DocumentFragment",a.prototype.nodeType=11,a.prototype.nodeName="#document-fragment",a.prototype.appendChild=i.prototype.appendChild,a.prototype.replaceChild=i.prototype.replaceChild,a.prototype.removeChild=i.prototype.removeChild,a.prototype.toString=function(){return this.childNodes.map(function(e){return String(e)}).join("")}}),L=m(function(e,t){function i(e){}t.exports=i,i.prototype.initEvent=function(e,t,i){this.type=e,this.bubbles=t,this.cancelable=i},i.prototype.preventDefault=function(){}}),M=m(function(e,t){g();var i=T(),a=A(),r=k(),n=C(),s=D(),o=L(),l=w(),d=S(),u=I();function c(){if(!f(this,c))return new c;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}t.exports=c;var h=c.prototype;h.createTextNode=function(e){return new r(e,this)},h.createElementNS=function(e,t){return new n(t,this,null===e?null:String(e))},h.createElement=function(e){return new n(e,this)},h.createDocumentFragment=function(){return new s(this)},h.createEvent=function(e){return new o(e)},h.createComment=function(e){return new a(e,this)},h.getElementById=function(e){return e=String(e),i(this.childNodes,function(t){if(String(t.id)===e)return t})||null},h.getElementsByClassName=n.prototype.getElementsByClassName,h.getElementsByTagName=n.prototype.getElementsByTagName,h.contains=n.prototype.contains,h.removeEventListener=u,h.addEventListener=d,h.dispatchEvent=l}),O=m(function(e,t){t.exports=new(M())}),N=m(function(e,t){var i,a="undefined"!=typeof global?global:"undefined"!=typeof window?window:{},r=O();"undefined"!=typeof document?i=document:(i=a["__GLOBAL_DOCUMENT_CACHE@4"])||(i=a["__GLOBAL_DOCUMENT_CACHE@4"]=r),t.exp
1orts=i});function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,a=Array(t);i<t;i++)a[i]=e[i];return a}function P(e,t){if(e){if("string"==typeof e)return x(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if("Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return x(e,t)}}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a,r,n=[],s=!0,o=!1;try{for(i=i.call(e);!(s=(a=i.next()).done)&&(n.push(a.value),!(t&&n.length===t));s=!0);}catch(e){o=!0,r=e}finally{try{s||null==i.return||i.return()}finally{if(o)throw r}}return n}}(e,t)||P(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var B=E(b()),W=E(b()),H=E(b()),V={now:function(){var e=H.default.performance,t=e&&e.timing,i=t&&t.navigationStart;return Math.round("number"==typeof i&&"function"==typeof e.now?i+e.now():Date.now())}},F=function(){if("function"==typeof(null==(e=W.default.crypto)?void 0:e.getRandomValues)){i=new Uint8Array(32),W.default.crypto.getRandomValues(i);for(var e,t,i,a=0;a<32;a++)i[a]=i[a]%16}else{i=[];for(var r=0;r<32;r++)i[r]=16*Math.random()|0}var n=0;t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t="x"===e?i[n]:3&i[n]|8;return n++,t.toString(16)});var s=V.now(),o=null==s?void 0:s.toString(16).substring(3);return o?t.substring(0,28)+o:t},q=function(){return("000000"+(0x81bf1000*Math.random()|0).toString(36)).slice(-6)},$=function(e){var t;if(e&&void 0!==e.nodeName)return e.muxId||(e.muxId=q()),e.muxId;try{t=document.querySelector(e)}catch(e){}return t&&!t.muxId&&(t.muxId=e),(null==t?void 0:t.muxId)||e},K=function(e){e&&void 0!==e.nodeName?e=$(t=e):t=document.querySelector(e);var t,i=t&&t.nodeName?t.nodeName.toLowerCase():"";return[t,e,i]};function Y(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||P(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var G={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4},j=function(e){var t,i,a,r,n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,o=e?[console,e]:[console],l=(t=console.trace).bind.apply(t,Y(o)),d=(i=console.info).bind.apply(i,Y(o)),u=(a=console.debug).bind.apply(a,Y(o)),c=(r=console.warn).bind.apply(r,Y(o)),h=(n=console.error).bind.apply(n,Y(o)),m=s;return{trace:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>G.TRACE))return l.apply(void 0,Y(t))},debug:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>G.DEBUG))return u.apply(void 0,Y(t))},info:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>G.INFO))return d.apply(void 0,Y(t))},warn:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>G.WARN))return c.apply(void 0,Y(t))},error:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>G.ERROR))return h.apply(void 0,Y(t))},get level(){return m},set level(v){v!==this.level&&(m=null!=v?v:s)}}}("[mux]"),Q=E(b());function Z(){return"1"===(Q.default.doNotTrack||Q.default.navigator&&Q.default.navigator.doNotTrack)}function z(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X(e,t){if(!f(e,t))throw TypeError("Cannot call a class as a function")}function J(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function ee(e,t,i){return t&&J(e.prototype,t),i&&J(e,i),e}function et(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}
1function ei(e){return(ei=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ea(e,t,i){return(ea="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var a=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ei(e)););return e}(e,t);if(a){var r=Object.getOwnPropertyDescriptor(a,t);return r.get?r.get.call(i||e):r.value}})(e,t,i||e)}function er(e,t){return(er=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}g(),y();var en=function(e){return es(e)[0]},es=function(e){if("string"!=typeof e||""===e)return["localhost"];var t,i=(e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/)||[])[4];return i&&(t=(i.match(/[^\.]+\.[^\.]+$/)||[])[0]),[i,t]},eo=E(b()),el={exists:function(){var e=eo.default.performance;return void 0!==(e&&e.timing)},domContentLoadedEventEnd:function(){var e=eo.default.performance,t=e&&e.timing;return t&&t.domContentLoadedEventEnd},navigationStart:function(){var e=eo.default.performance,t=e&&e.timing;return t&&t.navigationStart}};function ed(e,t,i){i=void 0===i?1:i,e[t]=e[t]||0,e[t]+=i}function eu(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},a=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),a.forEach(function(t){et(e,t,i[t])})}return e}function ec(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);i.push.apply(i,a)}return i})(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))}),e}var eh=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],em=["x-cdn","content-type"].concat(eh);function ep(e){var t={};return(e=e||"").trim().split(/[\r\n]+/).forEach(function(e){if(e){var i=e.split(": "),a=i.shift();a&&(em.indexOf(a.toLowerCase())>=0||0===a.toLowerCase().indexOf("x-litix-"))&&(t[a]=i.join(": "))}}),t}function ev(e){if(e){var t=eh.find(function(t){return void 0!==e[t]});return t?e[t]:void 0}}var eE=function(e){var t={};for(var i in e){var a=e[i];-1!==a["DATA-ID"].search("io.litix.data.")&&(t[a["DATA-ID"].replace("io.litix.data.","")]=a.VALUE)}return t},eb=function(e){if(!e)return{};var t=el.navigationStart(),i=e.loading,a=i?i.start:e.trequest,r=i?i.first:e.tfirst,n=i?i.end:e.tload;return{bytesLoaded:e.total,requestStart:Math.round(t+a),responseStart:Math.round(t+r),responseEnd:Math.round(t+n)}},ef=function(e){if(!(!e||"function"!=typeof e.getAllResponseHeaders))return ep(e.getAllResponseHeaders())},eg=function(e,t,i){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var a=arguments.length>4?arguments[4]:void 0,r=e.log,n=e.utils.secondsToMs,s=function(e){var t,i=parseInt(a.version);return 1===i&&null!==e.programDateTime&&(t=e.programDateTime),0===i&&null!==e.pdt&&(t=e.pdt),t};if(!el.exists())return void r.warn("performance timing not supported. Not tracking HLS.js.");var o=function(i,a){return e.emit(t,i,a)},l=function(e,t){var i=t.levels,a=t.audioTracks,r=t.url,n=t.stats,s=t.networkDetails,l=t.sessionData,d={},u={};i.forEach(function(e,t){d[t]={width:e.width,height:e.height,bitrate:e.bitrate,attrs:e.attrs}}),a.forEach(function(e,t){u[t]={name:e.name,language:e.lang,bitrate:e.bitrate}});var c=eb(n),h=c.bytesLoaded,m=c.requestStart,p=c.responseStart,E=c.responseEnd;o("requestcompleted",ec(eu({},eE(l)),{request_event_type:e,request_bytes_loaded:h,request_start:m,request_response_start:p,request_response_end:E,request_type:"manifest",request_hostname:en(r),request_response_headers:ef(s),request_rendition_lists:{media:d,audio:u,video:{}}}))};i.on(a.Events.MANIFEST_LOADED,l);var d=function(e,t){var i=t.details,a=t.level,r=t.networkDetails,l=eb(t.stats),d=l.bytesLoaded,u=l.requestStart,c=l.responseStart,h=l.responseEnd,m=i.fragments[i.fragments.length-1],p=s(m)+n(m.duration);o("requestcompleted",{request_event_type:e,request_bytes_loaded:d,request_start:u,request_response_start:c,request_response_end:h,request_current_level:a,request_type:"manifest",request_hostname:en(i.url),request_response_headers:ef(r),video_holdback:i.holdBack&&n(i.holdBack),video_part_holdback:i.partHoldBack&&n(i.partHoldBack),video_part_target_duration:i.partTarget&&n(i.partTarget),video_target_duration:i.targetduration&&n(i.targetduration),video_source_is_live:i.live,player_manifest_newest_program_time:isNaN(p)?void 0:p})};i.on(a.Events.LEVEL_LOADED,d);var u=function(e,t){var i=t.details,a=t.networkDetails,r=eb(t.stats);o("requestcompleted",{request_event_type:e,request_bytes_loaded:r.bytesLoaded,request_start:r.requestStart,request_response_start:r.responseStart,request_response_end:r.responseEnd,request_type:"manifest",request_hostname:en(i.url),request_response_headers:ef(a)})};i.on(a.Events.AUDIO_TRACK_LOADED,u);var c=function(e,t){var a=t.stats,r=t.networkDetails,n=t.frag,s=eb(a=a||n.stats),l=s.bytesLoaded,d=s.requestStart,u=s.responseStart,c=s.responseEnd,h=r?ef(r):void 0,m={request_event_type:e,request_bytes_loaded:l,request_start:d,request_response_start:u,request_response_end:c,request_hostname:r?en(r.responseURL):void 0,request_id:h?ev(h):void 0,request_response_headers:h,request_media_duration:n.duration,request_url:null==r?void 0:r.responseURL};"main"===n.type?(m.request_type="media",m.request_current_level=n.level,m.request_video_width=(i.levels[n.level]||{}).width,m.request_video_height=(i.levels[n.level]||{}).height,m.request_labeled_bitrate=(i.levels[n.level]||{}).bitrate):m.request_type=n.type,o("requestcompleted",m)};i.on(a.Events.FRAG_LOADED,c);var h=function(e,t){var i=t.frag,a=i.start;o("fragmentchange",{currentFragmentPDT:s(i),currentFragmentStart:n(a)})};i.on(a.Events.FRAG_CHANGED,h);var m=function(e,t){var i,r=t.type,n=t.details,s=t.response,l=t.fatal,d=t.frag,u=t.networkDetails,c=(null==d?void 0:d.url)||t.url||"",h=u?ef(u):void 0;(n===a.ErrorDetails.MANIFEST_LOAD_ERROR||n===a.ErrorDetails.MANIFEST_LOAD_TIMEOUT||n===a.ErrorDetails.FRAG_LOAD_ERROR||n===a.ErrorDetails.FRAG_LOAD_TIMEOUT||n===a.ErrorDetails.LEVEL_LOAD_ERROR||n===a.ErrorDetails.LEVEL_LOAD_TIMEOUT||n===a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||n===a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT||n===a.ErrorDetails.SUBTITLE_LOAD_ERROR||n===a.ErrorDetails.SUBTITLE_LOAD_TIMEOUT||n===a.ErrorDetails.KEY_LOAD_ERROR||n===a.ErrorDetails.KEY_LOAD_TIMEOUT)&&o("requestfailed",{request_error:n,request_url:c,request_hostname:en(c),request_id:h?ev(h):void 0,request_type:n===a.ErrorDetails.FRAG_LOAD_ERROR||n===a.ErrorDetails.FRAG_LOAD_TIMEOUT?"media":n===a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||n===a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT?"audio":n===a.ErrorDetails.SUBTITLE_LOAD_ERROR||n===a.ErrorDetails.SUBTITLE_LOAD_TIMEOUT?"subtitle":n===a.ErrorDetails.KEY_LOAD_ERROR||n===a.ErrorDetails.KEY_LOAD_TIMEOUT?"encryption":"manifest",request_error_code:null==s?void 0:s.code,request_error_text:null==s?void 0:s.text}),l&&o("error",{player_error_code:r,player_error_message:n,player_error_context:"".concat(c?"url: ".concat(c,"\n"):"")+"".concat(s&&(s.code||s.text)?"response: ".concat(s.code,", ").concat(s.text,"\n"):"")+"".concat(t.reason?"failure reason: ".concat(t.reason,"\n"):"")+"".concat(t.level?"level: ".concat(t.level,"\n"):"")+"".concat(t.parent?"parent stream controller: ".concat(t.parent,"\n"):"")+"".concat(t.buffer?"buffer length: ".concat(t.buffer,"\n"):"")+"".concat(t.error?"error: ".concat(t.error,"\n"):"")+"".concat(t.event?"event: ".concat(t.event,"\n"):"")+"".concat(t.err?"error message: ".concat(null==(i=t.err)?void 0:i.message,"\n"):"")})};i.on(a.Events.ERROR,m);var p=function(e,t){var i=t.frag,a=i&&i._url||"";o("requestcanceled",{request_event_type:e,request_url:a,request_type:"media",request_hostname:en(a)})};i.on(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,p);var E=function(e,t){var a=t.level,n=i.levels[a];if(n&&n.attrs&&n.attrs.BANDWIDTH){var s,l=n.attrs.BANDWIDTH,d=parseFloat(n.attrs["FRAME-RATE"]);isNaN(d)||(s=d),l?o("renditionchange",{video_source_fps:s,video_source_bitrate:l,video_source_width:n.width,video_source_height:n.height,video_source_rendition_name:n.name,video_source_codec:null==n?void 0:n.videoCodec}):r.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js")}};i.on(a.Events.LEVEL_SWITCHED,E),i._stopMuxMonitor=function(){i.off(a.Events.MANIFEST_LOADED,l),i.off(a.Events.LEVEL_LOADED,d),i.off(a.Events.AUDIO_TRACK_LOADED,u),i.off(a.Events.FRAG_LOADED,c),i.off(a.Events.FRAG_CHANGED,h),i.off(a.Events.ERROR,m),i.off(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,p),i.off(a.Events.LEVEL_SWITCHED,E),i.off(a.Events.DESTROYING,i._stopMuxMonitor),delete i._stopMuxMonitor},i.on(a.Events.DESTROYING,i._stopMuxMonitor)},e_=function(e){e&&"function"==typeof e._stopMuxMonitor&&e._stopMuxMonitor()},ey=function(e,t){if(!e||!e.requestEndDate)return{};var i,a=en(e.url),r=e.url,n=e.bytesLoaded,s=new Date(e.requestStartDate).getTime(),o=new Date(e.firstByteDate).getTime(),l=new Date(e.requestEndDate).getTime(),d=isNaN(e.duration)?0:e.duration,u="function"==typeof t.getMetricsFor?t.getMetricsFor(e.mediaType).HttpList:t.getDashMetrics().getHttpRequests(e.mediaType);u.length>0&&(i=ep(u[u.length-1]._responseHeaders||""));var c=i?ev(i):void 0;return{requestStart:s,requestResponseStart:o,requestResponseEnd:l,requestBytesLoaded:n,requestResponseHeaders:i,requestMediaDuration:d,requestHostname:a,requestUrl:r,requestId:c}},eT=function(e,t){var i=t.getQualityFor(e),a=t.getCurrentTrackFor(e).bitrateList;return a?{currentLevel:i,renditionWidth:a[i].width||null,renditionHeight:a[i].height||null,renditionBitrate:a[i].bandwidth}:{}},eA=function(e){var t;return null==(t=e.match(/.*codecs\*?="(.*)"/))?void 0:t[1]},ek=function(e){try{var t,i;return null==(i=e.getVersion)||null==(t=i.call(e))?void 0:t.split(".").map(function(e){return parseInt(e)})[0]}catch(e){return!1}},ew=function(e,t,i){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var a=e.log;if(!i||!i.on)return void a.warn("Invalid dash.js player reference. Monitoring blocked.");var r=ek(i),n=function(i,a){return e.emit(t,i,a)},s=function(e){var t=e.type,i=(e.data||{}).url;n("requestcompleted",{request_event_type:t,request_start:0,request_response_start:0,request_response_end:0,request_bytes_loaded:-1,request_type:"manifest",request_hostname:en(i),request_url:i})};i.on("manifestLoaded",s);var o={},l=function(e){if("function"!=typeof e.getRequests)return null;var t=e.getRequests({state:"executed"});return 0===t.length?null:t[t.length-1]},d=function(e){var t=e.type,a=e.chunk,r=e.request,s=(a||{}).mediaInfo||{},l=s.type,d=s.bitrateList,u={};
1(d=d||[]).forEach(function(e,t){u[t]={},u[t].width=e.width,u[t].height=e.height,u[t].bitrate=e.bandwidth,u[t].attrs={}}),"video"===l?o.video=u:"audio"===l?o.audio=u:o.media=u;var c=ey(r,i),h=c.requestStart,m=c.requestResponseStart,p=c.requestResponseEnd,E=c.requestResponseHeaders,b=c.requestMediaDuration,f=c.requestHostname,g=c.requestUrl;n("requestcompleted",{request_event_type:t,request_start:h,request_response_start:m,request_response_end:p,request_bytes_loaded:-1,request_type:l+"_init",request_response_headers:E,request_hostname:f,request_id:c.requestId,request_url:g,request_media_duration:b,request_rendition_lists:o})};r>=4?i.on("initFragmentLoaded",d):i.on("initFragmentLoaded",function(e){var t=e.type,i=e.fragmentModel,a=e.chunk;d({type:t,request:l(i),chunk:a})});var u=function(e){var t=e.type,a=e.chunk,r=e.request,s=a||{},o=s.mediaInfo,l=s.start,d=(o||{}).type,u=ey(r,i),c=u.requestStart,h=u.requestResponseStart,m=u.requestResponseEnd,p=u.requestBytesLoaded,E=u.requestResponseHeaders,b=u.requestMediaDuration,f=u.requestHostname,g=u.requestUrl,_=u.requestId,y=eT(d,i),T=y.currentLevel,A=y.renditionWidth,k=y.renditionHeight;n("requestcompleted",{request_event_type:t,request_start:c,request_response_start:h,request_response_end:m,request_bytes_loaded:p,request_type:d,request_response_headers:E,request_hostname:f,request_id:_,request_url:g,request_media_start_time:l,request_media_duration:b,request_current_level:T,request_labeled_bitrate:y.renditionBitrate,request_video_width:A,request_video_height:k})};r>=4?i.on("mediaFragmentLoaded",u):i.on("mediaFragmentLoaded",function(e){var t=e.type,i=e.fragmentModel,a=e.chunk;u({type:t,request:l(i),chunk:a})});var c={video:void 0,audio:void 0,totalBitrate:void 0},h=function(){if(c.video&&"number"==typeof c.video.bitrate){if(!(c.video.width&&c.video.height))return void a.warn("have bitrate info for video but missing width/height");var e=c.video.bitrate;if(c.audio&&"number"==typeof c.audio.bitrate&&(e+=c.audio.bitrate),e!==c.totalBitrate)return c.totalBitrate=e,{video_source_bitrate:e,video_source_height:c.video.height,video_source_width:c.video.width,video_source_codec:eA(c.video.codec)}}},m=function(e,t,r){if("number"!=typeof e.newQuality)return void a.warn("missing evt.newQuality in qualityChangeRendered event",e);var s=e.mediaType;if("audio"===s||"video"===s){var o=i.getBitrateInfoListFor(s).find(function(t){return t.qualityIndex===e.newQuality});if(!(o&&"number"==typeof o.bitrate))return void a.warn("missing bitrate info for ".concat(s));c[s]=ec(eu({},o),{codec:i.getCurrentTrackFor(s).codec});var l=h();l&&n("renditionchange",l)}};i.on("qualityChangeRendered",m);var p=function(e){var t=e.request,i=e.mediaType;n("requestcanceled",{request_event_type:(t=t||{}).type+"_"+t.action,request_url:t.url,request_type:i,request_hostname:en(t.url)})};i.on("fragmentLoadingAbandoned",p);var E=function(e){var t,i,a=e.error,r=(null==a||null==(t=a.data)?void 0:t.request)||{},s=(null==a||null==(i=a.data)?void 0:i.response)||{};(null==a?void 0:a.code)===27&&n("requestfailed",{request_error:r.type+"_"+r.action,request_url:r.url,request_hostname:en(r.url),request_type:r.mediaType,request_error_code:s.status,request_error_text:s.statusText});var o="".concat(null!=r&&r.url?"url: ".concat(r.url,"\n"):"")+"".concat(null!=s&&s.status||null!=s&&s.statusText?"response: ".concat(null==s?void 0:s.status,", ").concat(null==s?void 0:s.statusText,"\n"):"");n("error",{player_error_code:null==a?void 0:a.code,player_error_message:null==a?void 0:a.message,player_error_context:o})};i.on("error",E),i._stopMuxMonitor=function(){i.off("manifestLoaded",s),i.off("initFragmentLoaded",d),i.off("mediaFragmentLoaded",u),i.off("qualityChangeRendered",m),i.off("error",E),i.off("fragmentLoadingAbandoned",p),delete i._stopMuxMonitor}},eS=function(e){e&&"function"==typeof e._stopMuxMonitor&&e._stopMuxMonitor()},eI=0,eR=function(){"use strict";function e(){X(this,e),et(this,"_listeners",void 0)}return ee(e,[{key:"on",value:function(e,t,i){return t._eventEmitterGuid=t._eventEmitterGuid||++eI,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],i&&(t=t.bind(i)),this._listeners[e].push(t),t}},{key:"off",value:function(e,t){var i=this._listeners&&this._listeners[e];
1i&&i.forEach(function(e,a){e._eventEmitterGuid===t._eventEmitterGuid&&i.splice(a,1)})}},{key:"one",value:function(e,t,i){var a=this;t._eventEmitterGuid=t._eventEmitterGuid||++eI;var r=function(){a.off(e,r),t.apply(i||this,arguments)};r._eventEmitterGuid=t._eventEmitterGuid,this.on(e,r)}},{key:"emit",value:function(e,t){var i=this;if(this._listeners){t=t||{};var a=this._listeners["before*"]||[],r=this._listeners[e]||[],n=this._listeners["after"+e]||[],s=function(t,a){(t=t.slice()).forEach(function(t){t.call(i,{type:e},a)})};s(a,t),s(r,t),s(n,t)}}}]),e}(),eC=E(b()),eD=function(){"use strict";function e(t){var i=this;X(this,e),et(this,"_playbackHeartbeatInterval",void 0),et(this,"_playheadShouldBeProgressing",void 0),et(this,"pm",void 0),this.pm=t,this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,t.on("playing",function(){i._playheadShouldBeProgressing=!0}),t.on("play",this._startPlaybackHeartbeatInterval.bind(this)),t.on("playing",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adbreakstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adplay",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adplaying",this._startPlaybackHeartbeatInterval.bind(this)),t.on("devicewake",this._startPlaybackHeartbeatInterval.bind(this)),t.on("viewstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("rebufferstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("pause",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("ended",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("viewend",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("error",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("aderror",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adpause",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adended",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adbreakend",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("seeked",function(){t.data.player_is_paused?i._stopPlaybackHeartbeatInterval():i._startPlaybackHeartbeatInterval()}),t.on("timeupdate",function(){null!==i._playbackHeartbeatInterval&&t.emit("playbackheartbeat")}),t.on("devicesleep",function(e,a){null!==i._playbackHeartbeatInterval&&(eC.default.clearInterval(i._playbackHeartbeatInterval),t.emit("playbackheartbeatend",{viewer_time:a.viewer_time}),i._playbackHeartbeatInterval=null)})}return ee(e,[{key:"_startPlaybackHeartbeatInterval",value:function(){var e=this;null===this._playbackHeartbeatInterval&&(this.pm.emit("playbackheartbeat"),this._playbackHeartbeatInterval=eC.default.setInterval(function(){e.pm.emit("playbackheartbeat")},this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,null!==this._playbackHeartbeatInterval&&(eC.default.clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}]),e}(),eL=function e(t){"use strict";var i=this;X(this,e),et(this,"viewErrored",void 0),t.on("viewinit",function(){i.viewErrored=!1}),t.on("error",function(e,a){try{var r=t.errorTranslator({player_error_code:a.player_error_code,player_error_message:a.player_error_message,player_error_context:a.player_error_context,player_error_severity:a.player_error_severity,player_error_business_exception:a.player_error_business_exception});r&&(t.data.player_error_code=r.player_error_code||a.player_error_code,t.data.player_error_message=r.player_error_message||a.player_error_message,t.data.player_error_context=r.player_error_context||a.player_error_context,t.data.player_error_severity=r.player_error_severity||a.player_error_severity,t.data.player_error_business_exception=r.player_error_business_exception||a.player_error_business_exception,i.viewErrored=!0)}catch(e){t.mux.log.warn("Exception in error translator callback.",e),i.viewErrored=!0}}),t.on("aftererror",function(){var e,i,a,r,n;null==(e=t.data)||delete e.player_error_code,null==(i=t.data)||delete i.player_error_message,null==(a=t.data)||delete a.player_error_context,null==(r=t.data)||delete r.player_error_severity,null==(n=t.data)||delete n.player_error_business_exception})},eM=function(){"use strict";function e(t){X(this,e),et(this,"_watchTimeTrackerLastCheckedTime",void 0),et(this,"pm",void 0),this.pm=t,this._watchTimeTrackerLastCheckedTime=null,t.on("playbackheartbeat",this._updateWatchTime.bind(this)),t.on("playbackheartbeatend",this._clearWatchTimeState.bind(this))}return ee(e,[{key:"_updateWatchTime",value:function(e,t){var i=t.viewer_time;null===this._watchTimeTrackerLastCheckedTime&&(this._watchTimeTrackerLastCheckedTime=i),ed(this.pm.data,"view_watch_time",i-this._watchTimeTrackerLastCheckedTime),this._watchTimeTrackerLastCheckedTime=i}},{key:"_clearWatchTimeState",value:function(e,t){this._updateWatchTime(e,t),this._watchTimeTrackerLastCheckedTime=null}}]),e}(),eO=function(){"use strict";function e(t){var i=this;X(this,e),et(this,"_playbackTimeTrackerLastPlayheadPosition",void 0),et(this,"_lastTime",void 0),et(this,"_isAdPlaying",void 0),et(this,"_callbackUpdatePlaybackTime",void 0),et(this,"pm",void 0),this.pm=t,this._playbackTimeTrackerLastPlayheadPosition=-1,this._lastTime=V.now(),this._isAdPlaying=!1,this._callbackUpdatePlaybackTime=null;var a=this._startPlaybackTimeTracking.bind(this);t.on("playing",a),t.on("adplaying",a),t.on("seeked",a);var r=this._stopPlaybackTimeTracking.bind(this);t.on("playbackheartbeatend",r),t.on("seeking",r),t.on("adplaying",function(){i._isAdPlaying=!0}),t.on("adended",function(){i._isAdPlaying=!1}),t.on("adpause",function(){i._isAdPlaying=!1}),t.on("adbreakstart",function(){i._isAdPlaying=!1}),t.on("adbreakend",function(){i._isAdPlaying=!1}),t.on("adplay",function(){i._isAdPlaying=!1}),t.on("viewinit",function(){i._playbackTimeTrackerLastPlayheadPosition=-1,i._lastTime=V.now(),i._isAdPlaying=!1,i._callbackUpdatePlaybackTime=null})}return ee(e,[{key:"_startPlaybackTimeTracking",value:function(){null===this._callbackUpdatePlaybackTime&&(this._callbackUpdatePlaybackTime=this._updatePlaybackTime.bind(this),this._playbackTimeTrackerLastPlayheadPosition=this.pm.data.player_playhead_time,this.pm.on("playbackheartbeat",this._callbackUpdatePlaybackTime))}},{key:"_stopPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime&&(this._updatePlaybackTime(),this.pm.off("playbackheartbeat",this._callbackUpdatePlaybackTime),this._callbackUpdatePlaybackTime=null,this._playbackTimeTrackerLastPlayheadPosition=-1)}},{key:"_updatePlaybackTime",value:function(){var e=this.pm.data.player_playhead_time,t=V.now(),i=-1;this._playbackTimeTrackerLastPlayheadPosition>=0&&e>this._playbackTimeTrackerLastPlayheadPosition?i=e-this._playbackTimeTrackerLastPlayheadPosition:this._isAdPlaying&&(i=t-this._lastTime),i>0&&i<=1e3&&ed(this.pm.data,"view_content_playback_time",i),this._playbackTimeTrackerLastPlayheadPosition=e,this._lastTime=t}}]),e}(),eN=function(){"use strict";function e(t){X(this,e),et(this,"pm",void 0),this.pm=t;var i=this._updatePlayheadTime.bind(this);t.on("playbackheartbeat",i),t.on("playbackheartbeatend",i),t.on("timeupdate",i),t.on("destroy",function(){t.off("timeupdate",i)})}return ee(e,[{key:"_updateMaxPlayheadPosition",value:function(){this.pm.data.view_max_playhead_position=void 0===this.pm.data.view_max_playhead_position?this.pm.data.player_playhead_time:Math.max(this.pm.data.view_max_playhead_position,this.pm.data.player_playhead_time)}},{key:"_updatePlayheadTime",value:function(e,t){var i=this,a=function(){i.pm.currentFragmentPDT&&i.pm.currentFragmentStart&&(i.pm.data.player_program_time=i.pm.currentFragmentPDT+i.pm.data.player_playhead_time-i.pm.currentFragmentStart)};if(t&&t.player_playhead_time)this.pm.data.player_playhead_time=t.player_playhead_time,a(),this._updateMaxPlayheadPosition();else if(this.pm.getPlayheadTime){var r=this.pm.getPlayheadTime();void 0!==r&&(this.pm.data.player_playhead_time=r,a(),this._updateMaxPlayheadPosition())}}}]),e}(),ex=function e(t){"use strict";if(X(this,e),!t.disableRebufferTracking){var i,a=function(e,t){r(t),i=void 0},r=function(e){if(i){var a=e.viewer_time-i;ed(t.data,"view_rebuffer_duration",a),i=e.viewer_time,t.data.view_rebuffer_duration>3e5&&(t.emit("viewend"),t.send("viewend"),t.mux.log.warn("Ending view after rebuffering for longer than ".concat(3e5,"ms, future events will be ignored unless a programchange or videochange occurs.")))}t.data.view_watch_time>=0&&t.data.view_rebuffer_count>0&&(t.data.view_rebuffer_frequency=t.data.view_rebuffer_count/t.data.view_watch_time,t.data.view_rebuffer_percentage=t.data.view_rebuffer_duration/t.data.view_watch_time)};t.on("playbackheartbeat",function(e,t){return r(t)}),t.on("rebufferstart",function(e,r){i||(ed(t.data,"view_rebuffer_count",1),i=r.viewer_time,t.one("rebufferend",a))}),t.on("viewinit",function(){i=void 0,t.off("rebufferend",a)})}},eP=function(){"use strict";function e(t){var i=this;X(this,e),et(this,"_lastCheckedTime",void 0),et(this,"_lastPlayheadTime",void 0),et(this,"_lastPlayheadTimeUpdatedTime",void 0),et(this,"_rebuffering",void 0),et(this,"pm",void 0),this.pm=t,t.disableRebufferTracking||t.disablePlayheadRebufferTracking||(this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null,t.on("playbackheartbeat",this._checkIfRebuffering.bind(this)),t.on("playbackheartbeatend",this._cleanupRebufferTracker.bind(this)),t.on("seeking",function(){i._cleanupRebufferTracker(null,{viewer_time:V.now()})}))}return ee(e,[{key:"_checkIfRebuffering",value:function(e,t){if(this.pm.seekingTracker.isSeeking||this.pm.adTracker.isAdBreak||!this.pm.playbackHeartbeat._playheadShouldBeProgressing)return void this._cleanupRebufferTracker(e,t);if(null===this._lastCheckedTime)return void this._prepareRebufferTrackerState(t.viewer_time);if(this._lastPlayheadTime!==this.pm.data.player_playhead_time)return void this._cleanupRebufferTracker(e,t,!0);var i=t.viewer_time-this._lastPlayheadTimeUpdatedTime;"number"==typeof this.pm.sustainedRebufferThreshold&&i>=this.pm.sustainedRebufferThreshold&&(this._rebuffering||(this._rebuffering=!0,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}))),this._lastCheckedTime=t.viewer_time}},{key:"_clearRebufferTrackerState",value:function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null}},{key:"_prepareRebufferTrackerState",value:function(e){this._lastCheckedTime=e,this._lastPlayheadTime=this.pm.data.player_playhead_time,this._lastPlayheadTimeUpdatedTime=e}},{key:"_cleanupRebufferTracker",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this._rebuffering)this._rebuffering=!1,this.pm.emit("rebufferend",{viewer_time:t.viewer_time});else{if(null===this._lastCheckedTime)return;var a=this.pm.data.player_playhead_time-this._lastPlayheadTime,r=t.viewer_time-this._lastPlayheadTimeUpdatedTime;"number"==typeof this.pm.minimumRebufferDuration&&a>0&&r-a>this.pm.minimumRebufferDuration&&(this._lastCheckedTime=null,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}),this.pm.emit("rebufferend",{viewer_time:this._lastPlayheadTimeUpdatedTime+r-a}))}i?this._prepareRebufferTrackerState(t.viewer_time):this._clearRebufferTrackerState()}}]),e}(),eU=function(){"use strict";function e(t){var i=this;X(this,e),et(this,"NAVIGATION_START",void 0),et(this,"pm",void 0),this.pm=t,t.on("viewinit",function(){var e=t.data,a=e.view_id;if(!e.view_program_changed){var r=function(e,r){var n=r.viewer_time;"playing"===e.type&&void 0===t.data.view_time_to_first_frame?i.calculateTimeToFirstFrame(n||V.now(),a):"adplaying"===e.type&&(void 0===t.data.view_time_to_first_frame||i._inPrerollPosition())&&i.calculateTimeToFirstFrame(n||V.now(),a)};t.one("playing",r),t.one("adplaying",r),t.one("viewend",function(){t.off("playing",r),t.off("adplaying",r)})}})}return ee(e,[{key:"_inPrerollPosition",value:function(){return void 0===this.pm.data.view_content_playback_time||this.pm.data.view_content_playback_time<=1e3}},{key:"calculateTimeToFirstFrame",value:function(e,t){t===this.pm.data.view_id&&(this.pm.watchTimeTracker._updateWatchTime(null,{viewer_time:e}),this.pm.data.view_time_to_first_frame=this.pm.data.view_watch_time,(this.pm.data.player_autoplay_on||this.pm.data.video_is_autoplay)&&this.NAVIGATION_START&&(this.pm.data.view_aggregate_startup_time=this.pm.data.view_start+this.pm.data.view_watch_time-this.NAVIGATION_START))}}]),e}(),eB=function e(t){"use strict";var i=this;X(this,e),et(this,"_lastPlayerHeight",void 0),et(this,"_lastPlayerWidth",void 0),et(this,"_lastPlayheadPosition",void 0),et(this,"_lastSourceHeight",void 0),et(this,"_lastSourceWidth",void 0),t.on("viewinit",function(){i._lastPlayheadPosition=-1}),["pause","rebufferstart","seeking","error","adbreakstart","hb","renditionchange","orientationchange","viewend"].forEach(function(e){t.on(e,function(){if(i._lastPlayheadPosition>=0&&t.data.player_playhead_time>=0&&i._lastPlayerWidth>=0&&i._lastSourceWidth>0&&i._lastPlayerHeight>=0&&i._lastSourceHeight>0){var e=t.data.player_playhead_time-i._lastPlayheadPosition;if(e<0){i._lastPlayheadPosition=-1;return}var a=Math.min(i._lastPlayerWidth/i._lastSourceWidth,i._lastPlayerHeight/i._lastSourceHeight),r=Math.max(0,a-1),n=Math.max(0,1-a);t.data.view_max_upscale_percentage=Math.max(t.data.view_max_upscale_percentage||0,r),t.data.view_max_downscale_percentage=Math.max(t.data.view_max_downscale_percentage||0,n),ed(t.data,"view_total_content_playback_time",e),ed(t.data,"view_total_upscaling",r*e),ed(t.data,"view_total_downscaling",n*e)}i._lastPlayheadPosition=-1})}),["playing","hb","renditionchange","orientationchange"].forEach(function(e){t.on(e,function(){i._lastPlayheadPosition=t.data.player_playhead_time,i._lastPlayerWidth=t.data.player_width,i._lastPlayerHeight=t.data.player_height,i._lastSourceWidth=t.data.video_source_width,i._lastSourceHeight=t.data.video_source_height})})},eW=function e(t){"use strict";var i=this;X(this,e),et(this,"isSeeking",void 0),this.isSeeking=!1;var a=-1,r=function(){var e=V.now(),r=(t.data.viewer_time||e)-(a||e);ed(t.data,"view_seek_duration",r),t.data.view_max_seek_time=Math.max(t.data.view_max_seek_time||0,r),i.isSeeking=!1,a=-1};t.on("seeking",function(e,n){if(Object.assign(t.data,n),i.isSeeking&&n.viewer_time-a<=2e3){a=n.viewer_time;return}i.isSeeking&&r(),i.isSeeking=!0,a=n.viewer_time,ed(t.data,"view_seek_count",1),t.send("seeking")}),t.on("seeked",function(){r()}),t.on("viewend",function(){i.isSeeking&&(r(),t.send("seeked")),i.isSeeking=!1,a=-1})},eH=function(e,t){e.push(t),e.sort(function(e,t){return e.viewer_time-t.viewer_time})},eV=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],eF=function(){"use strict";function e(t){var i=this;X(this,e),et(this,"_adHasPlayed",void 0),et(this,"_adRequests",void 0),et(this,"_adResponses",void 0),et(this,"_currentAdRequestNumber",void 0),et(this,"_currentAdResponseNumber",void 0),et(this,"_prerollPlayTime",void 0),et(this,"_wouldBeNewAdPlay",void 0),et(this,"isAdBreak",void 0),et(this,"pm",void 0),this.pm=t,t.on("viewinit",function(){i.isAdBreak=!1,i._currentAdRequestNumber=0,i._currentAdResponseNumber=0,i._adRequests=[],i._adResponses=[],i._adHasPlayed=!1,i._wouldBeNewAdPlay=!0,i._prerollPlayTime=void 0}
1),eV.forEach(function(e){return t.on(e,i._updateAdData.bind(i))});var a=function(){i.isAdBreak=!1};t.on("adbreakstart",function(){i.isAdBreak=!0}),t.on("play",a),t.on("playing",a),t.on("viewend",a),t.on("adrequest",function(e,a){a=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdRequestNumber++},a),eH(i._adRequests,a),ed(t.data,"view_ad_request_count"),i.inPrerollPosition()&&(t.data.view_preroll_requested=!0,i._adHasPlayed||ed(t.data,"view_preroll_request_count"))}),t.on("adresponse",function(e,a){a=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdResponseNumber++},a),eH(i._adResponses,a);var r=i.findAdRequest(a.ad_request_id);r&&ed(t.data,"view_ad_request_time",Math.max(0,a.viewer_time-r.viewer_time))}),t.on("adplay",function(e,a){i._adHasPlayed=!0,i._wouldBeNewAdPlay&&(i._wouldBeNewAdPlay=!1,ed(t.data,"view_ad_played_count")),i.inPrerollPosition()&&!t.data.view_preroll_played&&(t.data.view_preroll_played=!0,i._adRequests.length>0&&(t.data.view_preroll_request_time=Math.max(0,a.viewer_time-i._adRequests[0].viewer_time)),t.data.view_start&&(t.data.view_startup_preroll_request_time=Math.max(0,a.viewer_time-t.data.view_start)),i._prerollPlayTime=a.viewer_time)}),t.on("adplaying",function(e,a){i.inPrerollPosition()&&void 0===t.data.view_preroll_load_time&&void 0!==i._prerollPlayTime&&(t.data.view_preroll_load_time=a.viewer_time-i._prerollPlayTime,t.data.view_startup_preroll_load_time=a.viewer_time-i._prerollPlayTime)}),t.on("adclicked",function(e,a){i._wouldBeNewAdPlay||ed(t.data,"view_ad_clicked_count")}),t.on("adskipped",function(e,a){i._wouldBeNewAdPlay||ed(t.data,"view_ad_skipped_count")}),t.on("adended",function(){i._wouldBeNewAdPlay=!0}),t.on("aderror",function(){i._wouldBeNewAdPlay=!0})}return ee(e,[{key:"inPrerollPosition",value:function(){return void 0===this.pm.data.view_content_playback_time||this.pm.data.view_content_playback_time<=1e3}},{key:"findAdRequest",value:function(e){for(var t=0;t<this._adRequests.length;t++)if(this._adRequests[t].ad_request_id===e)return this._adRequests[t]}},{key:"_updateAdData",value:function(e,t){if(this.inPrerollPosition()){if(!this.pm.data.view_preroll_ad_tag_hostname&&t.ad_tag_url){var i=U(es(t.ad_tag_url),2),a=i[0],r=i[1];this.pm.data.view_preroll_ad_tag_domain=r,this.pm.data.view_preroll_ad_tag_hostname=a}if(!this.pm.data.view_preroll_ad_asset_hostname&&t.ad_asset_url){var n=U(es(t.ad_asset_url),2),s=n[0],o=n[1];this.pm.data.view_preroll_ad_asset_domain=o,this.pm.data.view_preroll_ad_asset_hostname=s}}this.pm.data.ad_asset_url=null==t?void 0:t.ad_asset_url,this.pm.data.ad_tag_url=null==t?void 0:t.ad_tag_url,this.pm.data.ad_creative_id=null==t?void 0:t.ad_creative_id,this.pm.data.ad_id=null==t?void 0:t.ad_id,this.pm.data.ad_universal_id=null==t?void 0:t.ad_universal_id}}]),e}(),eq=E(b()),e$=function e(t){"use strict";X(this,e);var i,a,r=function(){t.disableRebufferTracking||(ed(t.data,"view_waiting_rebuffer_count",1),i=V.now(),a=eq.default.setInterval(function(){if(i){var e=V.now();ed(t.data,"view_waiting_rebuffer_duration",e-i),i=e}},250))},n=function(){t.disableRebufferTracking||i&&(ed(t.data,"view_waiting_rebuffer_duration",V.now()-i),i=!1,eq.default.clearInterval(a))},s=!1,o=function(){s=!0},l=function(){s=!1,n()};t.on("waiting",function(){s&&r()}),t.on("playing",function(){n(),o()}),t.on("pause",l),t.on("seeking",l)},eK=function e(t){"use strict";var i=this;X(this,e),et(this,"lastWallClockTime",void 0);var a=function(){i.lastWallClockTime=V.now(),t.on("before*",r)},r=function(e){var a=V.now(),r=i.lastWallClockTime;i.lastWallClockTime=a,a-r>3e4&&(t.emit("devicesleep",{viewer_time:r}),Object.assign(t.data,{viewer_time:r}),t.send("devicesleep"),t.emit("devicewake",{viewer_time:a}),Object.assign(t.data,{viewer_time:a}),t.send("devicewake"))};t.one("playbackheartbeat",a),t.on("playbackheartbeatend",function(){t.off("before*",r),t.one("playbackheartbeat",a)})},eY=E(b()),eG=function(){var e=function(){for(var e=0,t={};e<arguments.length;e++){var i=arguments[e];for(var a in i)t[a]=i[a]}return t};return function t(i){function a(t,r,n){var s;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(n=e({path:"/"},a.defaults,n)).expires){var o=new Date;o.setMilliseconds(o.getMilliseconds()+864e5*n.expires),n.expires=o}try{s=JSON.stringify(r),/^[\{\[]/.test(s)&&(r=s)}catch(e){}return r=i.write?i.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decode
1URIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=t+"="+r+(n.expires?"; expires="+n.expires.toUTCString():"")+(n.path?"; path="+n.path:"")+(n.domain?"; domain="+n.domain:"")+(n.secure?"; secure":"")}t||(s={});for(var l=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u<l.length;u++){var c=l[u].split("="),h=c.slice(1).join("=");'"'===h.charAt(0)&&(h=h.slice(1,-1));try{var m=c[0].replace(d,decodeURIComponent);if(h=i.read?i.read(h,m):i(h,m)||h.replace(d,decodeURIComponent),this.json)try{h=JSON.parse(h)}catch(e){}if(t===m){s=h;break}t||(s[m]=h)}catch(e){}}return s}}return a.set=a,a.get=function(e){return a.call(a,e)},a.getJSON=function(){return a.apply({json:!0},[].slice.call(arguments))},a.defaults={},a.remove=function(t,i){a(t,"",e(i,{expires:-1}))},a.withConverter=t,a}(function(){})}(),ej="muxData",eQ=function(){var e;try{e=(eG.get(ej)||"").split("&").reduce(function(e,t){var i=U(t.split("="),2),a=i[0],r=i[1],n=+r;return e[a]=r&&n==r?n:r,e},{})}catch(t){e={}}return e},eZ=function(e){try{eG.set(ej,Object.entries(e).map(function(e){var t=U(e,2),i=t[0],a=t[1];return"".concat(i,"=").concat(a)}).join("&"),{expires:365})}catch(e){}},ez=function(){var e=eQ();return e.mux_viewer_id=e.mux_viewer_id||F(),e.msn=e.msn||Math.random(),eZ(e),{mux_viewer_id:e.mux_viewer_id,mux_sample_number:e.msn}},eX=function(){var e=eQ(),t=V.now();return e.session_start&&(e.sst=e.session_start,delete e.session_start),e.session_id&&(e.sid=e.session_id,delete e.session_id),e.session_expires&&(e.sex=e.session_expires,delete e.session_expires),(!e.sex||e.sex<t)&&(e.sid=F(),e.sst=t),e.sex=t+15e5,eZ(e),{session_id:e.sid,session_start:e.sst,session_expires:e.sex}},eJ=E(b()),e0=function(){var e;switch(e1()){case"cellular":e="cellular";break;case"ethernet":e="wired";break;case"wifi":e="wifi";break;case void 0:break;default:e="other"}return e},e1=function(){var e=eJ.default.navigator,t=e&&(e.connection||e.mozConnection||e.webkitConnection);return t&&t.type};e0.getConnectionFromAPI=e1;var e2=e4({a:"env",b:"beacon",c:"custom",d:"ad",e:"event",f:"experiment",i:"internal",m:"mux",n:"response",p:"player",q:"request",r:"retry",s:"session",t:"timestamp",u:"viewer",v:"video",w:"page",x:"view",y:"sub"}),e3=e4({ad:"ad",af:"affiliate",ag:"aggregate",ap:"api",al:"application",ao:"audio",ar:"architecture",as:"asset",au:"autoplay",av:"average",bi:"bitrate",bn:"brand",br:"break",bw:"browser",by:"bytes",bz:"business",ca:"cached",cb:"cancel",cc:"codec",cd:"code",cg:"category",ch:"changed",ci:"client",ck:"clicked",cl:"canceled",cn:"config",co:"count",ce:"counter",cp:"complete",cq:"creator",cr:"creative",cs:"captions",ct:"content",cu:"current",cx:"connection",cz:"context",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",dr:"drm",dp:"dropped",du:"duration",dv:"device",dy:"dynamic",eb:"enabled",ec:"encoding",ed:"edge",en:"end",eg:"engine",em:"embed",er:"error",ep:"experiments",es:"errorcode",et:"errortext",ee:"event",ev:"events",ex:"expires",ez:"exception",fa:"failed",fi:"first",fm:"family",ft:"format",fp:"fps",fq:"frequency",fr:"frame",fs:"fullscreen",ha:"has",hb:"holdback",he:"headers",ho:"host",hn:"hostname",ht:"height",id:"id",ii:"init",in:"instance",ip:"ip",is:"is",ke:"key",la:"language",lb:"labeled",le:"level",li:"live",ld:"loaded",lo:"load",ls:"lists",lt:"latency",ma:"max",md:"media",me:"message",mf:"manifest",mi:"mime",ml:"midroll",mm:"min",mn:"manufacturer",mo:"model",mx:"mux",ne:"newest",nm:"name",no:"number",on:"on",or:"origin",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",pf:"played",pg:"program",ph:"playhead",pi:"plugin",pl:"preroll",pn:"playing",po:"poster",pp:"pip",pr:"preload",ps:"position",pt:"part",py:"property",px:"pop",pz:"plan",ra:"rate",rd:"requested",re:"rebuffer",rf:"rendition",rg:"range",rm:"remote",ro:"ratio",rp:"response",rq:"request",rs:"requests",sa:"sample",sd:"skipped",se:"session",sh:"shift",sk:"seek",sm:"stream",so:"source",sq:"sequence",sr:"series",ss:"status",st:"start",su:"startup",sv:"server",sw:"software",sy:"severity",ta:"tag",tc:"tech",te:"text",tg:"target",th:"throughput",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",un:"universal",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch",wt:"waiting"});function e4(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[e[i]]=i);return t}function e5(e){var t={},i={};return Object.keys(e).forEach(function(a){var r=!1;if(e.hasOwnProperty(a)&&void 0!==e[a]){var n=a.split("_"),s=n[0],o=e2[s];o||(j.info("Data key word `"+n[0]+"` not expected in "+a),o=s+"_"),n.splice(1).forEac
1h(function(e){"url"===e&&(r=!0),e3[e]?o+=e3[e]:Number.isInteger(Number(e))?o+=e:(j.info("Data key word `"+e+"` not expected in "+a),o+="_"+e+"_")}),r?i[o]=e[a]:t[o]=e[a]}}),Object.assign(t,i)}var e9=E(b()),e8=E(N()),e6={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},e7=["hb","requestcompleted","requestfailed","requestcanceled"],te=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._beaconUrl=e||"https://img.litix.io",this._eventQueue=[],this._postInFlight=!1,this._resendAfterPost=!1,this._failureCount=0,this._sendTimeout=!1,this._options=Object.assign({},e6,t)};te.prototype.queueEvent=function(e,t){var i=Object.assign({},t);return(this._eventQueue.length<=this._options.maxQueueLength||"eventrateexceeded"===e)&&(this._eventQueue.push(i),this._sendTimeout||this._startBeaconSending(),this._eventQueue.length<=this._options.maxQueueLength)},te.prototype.flushEvents=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e&&1===this._eventQueue.length)return void this._eventQueue.pop();this._eventQueue.length&&this._sendBeaconQueue(),this._startBeaconSending()},te.prototype.destroy=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.destroyed=!0,e?this._clearBeaconQueue():this.flushEvents(),e9.default.clearTimeout(this._sendTimeout)},te.prototype._clearBeaconQueue=function(){var e=this._eventQueue.length>this._options.maxBeaconSize?this._eventQueue.length-this._options.maxBeaconSize:0,t=this._eventQueue.slice(e);e>0&&Object.assign(t[t.length-1],e5({mux_view_message:"event queue truncated"}));var i=this._createPayload(t);ta(this._beaconUrl,i,!0,function(){})},te.prototype._sendBeaconQueue=function(){var e=this;if(this._postInFlight){this._resendAfterPost=!0;return}var t=this._eventQueue.slice(0,this._options.maxBeaconSize);this._eventQueue=this._eventQueue.slice(this._options.maxBeaconSize),this._postInFlight=!0;var i=this._createPayload(t),a=V.now();ta(this._beaconUrl,i,!1,function(i,r){r?(e._eventQueue=t.concat(e._eventQueue),e._failureCount+=1,j.info("Error sending beacon: "+r)):e._failureCount=0,e._roundTripTime=V.now()-a,e._postInFlight=!1,e._resendAfterPost&&(e._resendAfterPost=!1,e._eventQueue.length>0&&e._sendBeaconQueue())})},te.prototype._getNextBeaconTime=function(){if(!this._failureCount)return this._options.baseTimeBetweenBeacons;var e=Math.pow(2,this._failureCount-1);return(1+(e*=Math.random()))*this._options.baseTimeBetweenBeacons},te.prototype._startBeaconSending=function(){var e=this;e9.default.clearTimeout(this._sendTimeout),this.destroyed||(this._sendTimeout=e9.default.setTimeout(function(){e._eventQueue.length&&e._sendBeaconQueue(),e._startBeaconSending()},this._getNextBeaconTime()))},te.prototype._createPayload=function(e){var t=this,i={transmission_timestamp:Math.round(V.now())};this._roundTripTime&&(i.rtt_ms=Math.round(this._roundTripTime));var a,r,n,s=function(){n=(a=JSON.stringify({metadata:i,events:r||e})).length/1024},o=function(){return n<=t._options.maxPayloadKBSize};return s(),o()||(j.info("Payload size is too big ("+n+" kb). Removing unnecessary events."),r=e.filter(function(e){return -1===e7.indexOf(e.e)}),s()),o()||(j.info("Payload size still too big ("+n+" kb). Cropping fields.."),r.forEach(function(e){for(var t in e){var i=e[t];"string"==typeof i&&i.length>51200&&(e[t]=i.substring(0,51200))}}),s()),a};var tt,ti="function"==typeof e8.default.exitPictureInPicture?function(e){return e.length<=57344}:function(e){return!1},ta=function(e,t,i,a){if(i&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(e,t))return void a();if(e9.default.fetch)return void e9.default.fetch(e,{method:"POST",body:t,headers:{"Content-Type":"text/plain"},keepalive:ti(t)}).then(function(e){return a(null,e.ok?null:"Error")}).catch(function(e){return a(null,e)});if(e9.default.XMLHttpRequest){var r=new e9.default.XMLHttpRequest;r.onreadystatechange=function(){if(4===r.readyState)return a(null,200!==r.status?"error":void 0)},r.open("POST",e),r.setRequestHeader("Content-Type","text/plain"),r.send(t);return}a()},tr=["env_key","view_id","view_sequence_number","player_sequence_number","beacon_domain","player_playhead_time","viewer_time","mux_api_version","event","video_id","player_instance_id","player_error_code","player_error_message","player_error_context","player_error_severity","player_error_business_exception"],tn=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],ts=["ad_id","ad_creative_id","ad_universal_id"],to=["viewstart","error","ended","viewend"],tl=function(){"use strict";function e(t,i){var a,r,n,s,o,l,d,u,c,h,m,p,E,b,f,g,_,y,T,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};X(this,e),et(this,"mux",void 0),et(this,"envKey",void 0),et(this,"options",void 0),et(this,"eventQueue",void 0),et(this,"sampleRate",void 0),et(this,"disableCookies",void 0),et(this,"respectDoNotTrack",void 0),et(this,"previousBeaconData",void 0),et(this,"lastEventTime",void 0),et(this,"rateLimited",void 0),et(this,"pageLevelData",void 0),et(this,"viewerData",void 0),this.mux=t,this.envKey=i,this.options=A,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.eventQueue=new te((a=this.envKey,n=(r=this.options).beaconCollectionDomain,s=r.beaconDomain,n?"https://"+n:(a=a||"inferred").match(/^[a-z0-9]+$/)?"https://"+a+"."+(s||"litix.io"):"https://img.litix.io/a.gif")),this.sampleRate=null!=(_=this.options.sampleRate)?_:1,this.disableCookies=null!=(y=this.options.disableCookies)&&y,this.respectDoNotTrack=null!=(T=this.options.respectDoNotTrack)&&T,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.pageLevelData={mux_api_version:this.mux.API_VERSION,mux_embed:this.mux.NAME,mux_embed_version:this.mux.VERSION,viewer_application_name:null==(o=this.options.platform)?void 0:o.name,viewer_application_version:null==(l=this.options.platform)?void 0:l.version,viewer_application_engine:null==(d=this.options.platform)?void 0:d.layout,viewer_device_name:null==(u=this.options.platform)?void 0:u.product,viewer_device_category:"",viewer_device_manufacturer:null==(c=this.options.platform)?void 0:c.manufacturer,viewer_os_family:null==(m=this.options.platform)||null==(h=m.os)?void 0:h.family,viewer_os_architecture:null==(E=this.options.platform)||null==(p=E.os)?void 0:p.architecture,viewer_os_version:null==(f=this.options.platform)||null==(b=f.os)?void 0:b.version,viewer_connection_type:e0(),page_url:null===eY.default||void 0===eY.default||null==(g=eY.default.location)?void 0:g.href},this.viewerData=this.disableCookies?{}:ez()}return ee(e,[{key:"send",value:function(e,t){if(!(!e||!(null!=t&&t.view_id))){if(this.respectDoNotTrack&&Z())return j.info("Not sending `"+e+"` because Do Not Track is enabled");if(!t||"object"!=typeof t)return j.error("A data object was expected in send() but was not provided");var i=this.disableCookies?{}:eX(),a=ec(eu({},this.pageLevelData,t,i,this.viewerData),{event:e,env_key:this.envKey});
1a.user_id&&(a.viewer_user_id=a.user_id,delete a.user_id);var r,n=(null!=(r=a.mux_sample_number)?r:0)>=this.sampleRate,s=e5(this._deduplicateBeaconData(e,a));if(this.lastEventTime=this.mux.utils.now(),n)return j.info("Not sending event due to sample rate restriction",e,a,s);if(this.envKey||j.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL",e,a,s),!this.rateLimited){if(j.info("Sending event",e,a,s),this.rateLimited=!this.eventQueue.queueEvent(e,s),this.mux.WINDOW_UNLOADING&&"viewend"===e)this.eventQueue.destroy(!0);else if(this.mux.WINDOW_HIDDEN&&"hb"===e?this.eventQueue.flushEvents(!0):to.indexOf(e)>=0&&this.eventQueue.flushEvents(),this.rateLimited)return a.event="eventrateexceeded",s=e5(a),this.eventQueue.queueEvent(a.event,s),j.error("Beaconing disabled due to rate limit.")}}}},{key:"destroy",value:function(){this.eventQueue.destroy(!1)}},{key:"_deduplicateBeaconData",value:function(e,t){var i=this,a={},r=t.view_id;if("-1"===r||"viewstart"===e||"viewend"===e||!this.previousBeaconData||this.mux.utils.now()-this.lastEventTime>=6e5)a=eu({},t),r&&(this.previousBeaconData=a),r&&"viewend"===e&&(this.previousBeaconData=null);else{var n=0===e.indexOf("request");Object.entries(t).forEach(function(t){var r=U(t,2),s=r[0],o=r[1];i.previousBeaconData&&(o!==i.previousBeaconData[s]||tr.indexOf(s)>-1||i.objectHasChanged(n,s,o,i.previousBeaconData[s])||i.eventRequiresKey(e,s))&&(a[s]=o,i.previousBeaconData[s]=o)})}return a}},{key:"objectHasChanged",value:function(e,t,i,a){return!!e&&0===t.indexOf("request_")&&("request_response_headers"===t||"object"!=typeof i||"object"!=typeof a||Object.keys(i||{}).length!==Object.keys(a||{}).length)}},{key:"eventRequiresKey",value:function(e,t){return!!("renditionchange"===e&&0===t.indexOf("video_source_")||ts.includes(t)&&tn.includes(e))}}]),e}(),td=function e(t){"use strict";X(this,e);var i=0,a=0,r=0,n=0,s=0,o=0,l=0;t.on("requestcompleted",function(e,o){var l,d,u=o.request_start,c=o.request_response_start,h=o.request_response_end,m=o.request_bytes_loaded;if(n++,c?(l=c-(null!=u?u:0),d=(null!=h?h:0)-c):d=(null!=h?h:0)-(null!=u?u:0),d>0&&m&&m>0){var p=m/d*8e3;s++,a+=m,r+=d,t.data.view_min_request_throughput=Math.min(t.data.view_min_request_throughput||1/0,p),t.data.view_average_request_throughput=a/r*8e3,t.data.view_request_count=n,l>0&&(i+=l,t.data.view_max_request_latency=Math.max(t.data.view_max_request_latency||0,l),t.data.view_average_request_latency=i/s)}}),t.on("requestfailed",function(e,i){n++,o++,t.data.view_request_count=n,t.data.view_request_failed_count=o}),t.on("requestcanceled",function(e,i){n++,l++,t.data.view_request_count=n,t.data.view_request_canceled_count=l})},tu=function e(t){"use strict";var i=this;X(this,e),et(this,"_lastEventTime",void 0),t.on("before*",function(e,a){var r=a.viewer_time,n=V.now(),s=i._lastEventTime;if(i._lastEventTime=n,s&&n-s>36e5){var o=Object.keys(t.data).reduce(function(e,i){return 0===i.indexOf("video_")?Object.assign(e,et({},i,t.data[i])):e},{});t.mux.log.info("Received event after at least an hour inactivity, creating a new view");var l=t.playbackHeartbeat._playheadShouldBeProgressing;t._resetView(Object.assign({viewer_time:r},o)),t.playbackHeartbeat._playheadShouldBeProgressing=l,t.playbackHeartbeat._playheadShouldBeProgressing&&"play"!==e.type&&"adbreakstart"!==e.type&&(t.emit("play",{viewer_time:r}),"playing"!==e.type&&t.emit("playing",{viewer_time:r}))}})},tc=["viewstart","ended","loadstart","pause","play","playing","ratechange","waiting","adplay","adpause","adended","aderror","adplaying","adrequest","adresponse","adbreakstart","adbreakend","adfirstquartile","admidpoint","adthirdquartile","rebufferstart","rebufferend","seeked","error","hb","requestcompleted","requestfailed","requestcanceled","renditionchange"],th=new Set(["requestcompleted","requestfailed","requestcanceled"]),tm=function(e){"use strict";if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(e&&e.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),e&&er(a,e);var t,i=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,i=ei(a);return e=t?Reflect.construct(i,arguments,ei(this).constructor):i.apply(this,arguments),e&&("object"===_(e)||"function"==typeof e)?e:z(this)});function a(e,t,r){X(this,a),et(z(n=i.call(this)),"DOM_CONTENT_LOADED_EVENT_END",void 0),et(z(n),"NAVIGATION_START",void 0),et(z(n),"_destroyed",void 0),et(z(n),"_heartBeatTimeout",void 0),et(z(n),"adTracker",void 0),et(z(n),"dashjs",void 0),et(z(n),"data",void 0),et(z(n),"disablePlayheadRebufferTracking",void 0),et(z(n),"disableRebufferTracking",void 0),et(z(n),"errorTracker",void 0),et(z(n),"errorTranslator",void 0),et(z(n),"emitTranslator",void 0),et(z(n),"getAdData",void 0),et(z(n),"getPlayheadTime",void 0),et(z(n),"getStateData",void 0),et(z(n),"stateDataTranslator",void 0),et(z(n),"hlsjs",void 0),et(z(n),"id",void 0),et(z(n),"longResumeTracker",void 0),et(z(n),"minimumRebufferDuration",void 0),et(z(n),"mux",void 0),et(z(n),"playbackEventDispatcher",void 0),et(z(n),"playbackHeartbeat",void 0),et(z(n),"playbackHeartbeatTime",void 0),et(z(n),"playheadTime",void 0),et(z(n),"seekingTracker",void 0),et(z(n),"sustainedRebufferThreshold",void 0),et(z(n),"watchTimeTracker",void 0),et(z(n),"currentFragmentPDT",void 0),et(z(n),"currentFragmentStart",void 0),n.DOM_CONTENT_LOADED_EVENT_END=el.domContentLoadedEventEnd(),n.NAVIGATION_START=el.navigationStart(),n.mux=e,n.id=t,null!=r&&r.beaconDomain&&n.mux.log.warn("The `beaconDomain` setting has been deprecated 
1in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."),(r=Object.assign({debug:!1,minimumRebufferDuration:250,sustainedRebufferThreshold:1e3,playbackHeartbeatTime:25,beaconDomain:"litix.io",sampleRate:1,disableCookies:!1,respectDoNotTrack:!1,disableRebufferTracking:!1,disablePlayheadRebufferTracking:!1,errorTranslator:function(e){return e},emitTranslator:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return t},stateDataTranslator:function(e){return e}},r)).data=r.data||{},r.data.property_key&&(r.data.env_key=r.data.property_key,delete r.data.property_key),j.level=r.debug?G.DEBUG:G.WARN,n.getPlayheadTime=r.getPlayheadTime,n.getStateData=r.getStateData||function(){return{}},n.getAdData=r.getAdData||function(){},n.minimumRebufferDuration=r.minimumRebufferDuration,n.sustainedRebufferThreshold=r.sustainedRebufferThreshold,n.playbackHeartbeatTime=r.playbackHeartbeatTime,n.disableRebufferTracking=r.disableRebufferTracking,n.disableRebufferTracking&&n.mux.log.warn("Disabling rebuffer tracking. This should only be used in specific circumstances as a last resort when your player is known to unreliably track rebuffering."),n.disablePlayheadRebufferTracking=r.disablePlayheadRebufferTracking,n.errorTranslator=r.errorTranslator,n.emitTranslator=r.emitTranslator,n.stateDataTranslator=r.stateDataTranslator,n.playbackEventDispatcher=new tl(e,r.data.env_key,r),n.data={player_instance_id:F(),mux_sample_rate:r.sampleRate,beacon_domain:r.beaconCollectionDomain||r.beaconDomain},n.data.view_sequence_number=1,n.data.player_sequence_number=1;var n,s=(function(){void 0===this.data.view_start&&(this.data.view_start=this.mux.utils.now(),this.emit("viewstart"))}).bind(z(n));if(n.on("viewinit",function(e,t){this._resetVideoData(),this._resetViewData(),this._resetErrorData(),this._updateStateData(),Object.assign(this.data,t),this._initializeViewData(),this.one("play",s),this.one("adbreakstart",s)}),n.on("videochange",function(e,t){this._resetView(t)}),n.on("programchange",function(e,t){this.data.player_is_paused&&this.mux.log.warn("The `programchange` event is intended to be used when the content changes mid playback without the video source changing, however the video is not currently playing. If the video source is changing please use the videochange event otherwise you will lose startup time information."),this._resetView(Object.assign(t,{view_program_changed:!0})),s(),this.emit("play"),this.emit("playing")}),n.on("fragmentchange",function(e,t){this.currentFragmentPDT=t.currentFragmentPDT,this.currentFragmentStart=t.currentFragmentStart}),n.on("destroy",n.destroy),"undefined"!=typeof window&&"function"==typeof window.addEventListener&&"function"==typeof window.removeEventListener){var o=function(){var e=void 0!==n.data.view_start;n.mux.WINDOW_HIDDEN="hidden"===document.visibilityState,e&&n.mux.WINDOW_HIDDEN&&(n.data.player_is_paused||n.emit("hb"))};window.addEventListener("visibilitychange",o,!1);var l=function(e){e.persisted||n.destroy()};window.addEventListener("pagehide",l,!1),n.on("destroy",function(){window.removeEventListener("visibilitychange",o),window.removeEventListener("pagehide",l)})}return n.on("playerready",function(e,t){Object.assign(this.data,t)}),tc.forEach(function(e){n.on(e,function(t,i){0!==e.indexOf("ad")&&this._updateStateData(),Object.assign(this.data,i),this._sanitizeData()}),n.on("after"+e,function(){("error"!==e||this.errorTracker.viewErrored)&&this.send(e)})}),n.on("viewend",function(e,t){Object.assign(n.data,t)}),n.one("playerready",function(e){var t=this.mux.utils.now();this.data.player_init_time&&(this.data.player_startup_time=t-this.data.player_init_time),!this.mux.PLAYER_TRACKED&&this.NAVIGATION_START&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.DOM_CONTENT_LOADED_EVENT_END)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.DOM_CONTENT_LOADED_EVENT_END||1/0)-this.NAVIGATION_START)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time}),n.longResumeTracker=new tu(z(n)),n.errorTracker=new eL(z(n)),new eK(z(n)),n.seekingTracker=new eW(z(n)),n.playheadTime=new eN(z(n)),n.playbackHeartbeat=new eD(z(n)),new eB(z(n)),n.watchTimeTracker=new eM(z(n)),new eO(z(n)),n.adTracker=new eF(z(n)),new eP(z(n)),new ex(z(n)),new eU(z(n)),new e$(z(n)),new td(z(n)),r.hlsjs&&n.addHLSJS(r),r.dashjs&&n.addDashJS(r),n.emit("viewinit",r.data),n}return ee(a,[{key:"emit",value:function(e,t){var i,r=Object.assign({viewer_time:this.mux.utils.now()},t),n=[e,r];if(this.emitTranslator)try{n=this.emitTranslator(e,r)}catch(e){this.mux.log.warn("Exception in emit translator callback.",e)}null!=n&&n.length&&(i=ea(ei(a.prototype),"emit",this)).call.apply(i,[this].concat(Y(n)))}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,void 0!==this.data.view_start&&(this.emit
1("viewend"),this.send("viewend")),this.playbackEventDispatcher.destroy(),this.removeHLSJS(),this.removeDashJS(),window.clearTimeout(this._heartBeatTimeout))}},{key:"send",value:function(e){if(this.data.view_id){var t=Object.assign({},this.data);if(void 0===t.video_source_is_live&&(t.player_source_duration===1/0||t.video_source_duration===1/0?t.video_source_is_live=!0:(t.player_source_duration>0||t.video_source_duration>0)&&(t.video_source_is_live=!1)),t.video_source_is_live||["player_program_time","player_manifest_newest_program_time","player_live_edge_program_time","player_program_time","video_holdback","video_part_holdback","video_target_duration","video_part_target_duration"].forEach(function(e){t[e]=void 0}),t.video_source_url=t.video_source_url||t.player_source_url,t.video_source_url){var i=U(es(t.video_source_url),2),a=i[0];t.video_source_domain=i[1],t.video_source_hostname=a}delete t.ad_request_id,this.playbackEventDispatcher.send(e,t),this.data.view_sequence_number++,this.data.player_sequence_number++,th.has(e)||this._restartHeartBeat(),"viewend"===e&&delete this.data.view_id}}},{key:"_resetView",value:function(e){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",e)}},{key:"_updateStateData",value:function(){var e=this.getStateData();if("function"==typeof this.stateDataTranslator)try{e=this.stateDataTranslator(e)}catch(e){this.mux.log.warn("Exception in stateDataTranslator translator callback.",e)}Object.assign(this.data,e),this.playheadTime._updatePlayheadTime(),this._sanitizeData()}},{key:"_sanitizeData",value:function(){var e=this;["player_width","player_height","video_source_width","video_source_height","player_playhead_time","video_source_bitrate"].forEach(function(t){var i=parseInt(e.data[t],10);e.data[t]=isNaN(i)?void 0:i}),["player_source_url","video_source_url"].forEach(function(t){if(e.data[t]){var i=e.data[t].toLowerCase();(0===i.indexOf("data:")||0===i.indexOf("blob:"))&&(e.data[t]="MSE style URL")}})}},{key:"_resetVideoData",value:function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("video_")&&delete e.data[t]})}},{key:"_resetViewData",value:function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("view_")&&delete e.data[t]}),this.data.view_sequence_number=1}},{key:"_resetErrorData",value:function(){delete this.data.player_error_code,delete this.data.player_error_message,delete this.data.player_error_context,delete this.data.player_error_severity,delete this.data.player_error_business_exception}},{key:"_initializeViewData",value:function(){var e=this,t=this.data.view_id=F(),i=function(){t===e.data.view_id&&ed(e.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",i):i()}},{key:"_restartHeartBeat",value:function(){var e=this;window.clearTimeout(this._heartBeatTimeout),this._heartBeatTimeout=window.setTimeout(function(){e.data.player_is_paused||e.emit("hb")},1e4)}},{key:"addHLSJS",value:function(e){return e.hlsjs?this.hlsjs?void this.mux.log.warn("An instance of HLS.js is already being monitored for this player."):void(this.hlsjs=e.hlsjs,eg(this.mux,this.id,e.hlsjs,{},e.Hls||window.Hls)):void this.mux.log.warn("You must pass a valid hlsjs instance in order to track it.")}},{key:"removeHLSJS",value:function(){this.hlsjs&&(e_(this.hlsjs),this.hlsjs=void 0)}},{key:"addDashJS",value:function(e){return e.dashjs?this.dashjs?void this.mux.log.warn("An instance of Dash.js is already being monitored for this player."):void(this.dashjs=e.dashjs,ew(this.mux,this.id,e.dashjs)):void this.mux.log.warn("You must pass a valid dashjs instance in order to track it.")}},{key:"removeDashJS",value:function(){this.dashjs&&(eS(this.dashjs),this.dashjs=void 0)}}]),a}(eR),tp=E(N()),tv=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],tE={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},tb=E(b());tb.default&&tb.default.WeakMap&&(tt=new WeakMap);var tf={TARGET_DURATION:"#EXT-X-TARGETDURATION",PART_INF:"#EXT-X-PART-INF",SERVER_CONTROL:"#EXT-X-SERVER-CONTROL",INF:"#EXTINF",PROGRAM_DATE_TIME:"#EXT-X-PROGRAM-DATE-TIME",VERSION:"#EXT-X-VERSION",SESSION_DATA:"#
1EXT-X-SESSION-DATA"},tg=function(e){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(e),this.manifest};tg.prototype.process=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.processLine(this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},tg.prototype.processLine=function(e){var t=e.indexOf(":"),i=tS(e,t),a=i[0],r=2===i.length?tT(i[1]):void 0;if("#"!==a[0])this.currentUri.uri=a,this.manifest.segments.push(this.currentUri),!this.manifest.targetDuration||"duration"in this.currentUri||(this.currentUri.duration=this.manifest.targetDuration),this.currentUri={};else switch(a){case tf.TARGET_DURATION:if(!isFinite(r)||r<0)return;this.manifest.targetDuration=r,this.setHoldBack();break;case tf.PART_INF:t_(this.manifest,i),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break;case tf.SERVER_CONTROL:t_(this.manifest,i),this.setHoldBack();break;case tf.INF:0===r?this.currentUri.duration=.01:r>0&&(this.currentUri.duration=r);break;case tf.PROGRAM_DATE_TIME:var n=new Date(r);this.manifest.dateTimeString||(this.manifest.dateTimeString=r,this.manifest.dateTimeObject=n),this.currentUri.dateTimeString=r,this.currentUri.dateTimeObject=n;break;case tf.VERSION:t_(this.manifest,i);break;case tf.SESSION_DATA:var s=eE(tI(i[1]));Object.assign(this.manifest.sessionData,s)}},tg.prototype.setHoldBack=function(){var e=this.manifest,t=e.serverControl,i=e.targetDuration,a=e.partTargetDuration;if(t){var r="holdBack",n="partHoldBack",s=i&&3*i,o=a&&2*a;i&&!t.hasOwnProperty(r)&&(t[r]=s),s&&t[r]<s&&(t[r]=s),a&&!t.hasOwnProperty(n)&&(t[n]=3*a),a&&t[n]<o&&(t[n]=o)}};var t_=function(e,t){var i,a=ty(t[0].replace("#EXT-X-",""));tw(t[1])?(i={},i=Object.assign(tk(t[1]),i)):i=tT(t[1]),e[a]=i},ty=function(e){return e.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},tT=function(e){if("yes"===e.toLowerCase()||"no"===e.toLowerCase())return"yes"===e.toLowerCase();var t=-1!==e.indexOf(":")?e:parseFloat(e);return isNaN(t)?e:t},tA=function(e){var t={},i=e.split("=");return i.length>1&&(t[ty(i[0])]=tT(i[1])),t},tk=function(e){for(var t=e.split(","),i={},a=0;t.length>a;a++)i=Object.assign(tA(t[a]),i);return i},tw=function(e){return e.indexOf("=")>-1},tS=function(e,t){return -1===t?[e]:[e.substring(0,t),e.substring(t+1)]},tI=function(e){var t={};if(e){var i=e.search(",");return[e.slice(0,i),e.slice(i+1)].forEach(function(e,i){for(var a=e.replace(/['"]+/g,"").split("="),r=0;r<a.length;r++)"DATA-ID"===a[r]&&(t["DATA-ID"]=a[1-r]),"VALUE"===a[r]&&(t.VALUE=a[1-r])}),{data:t}}},tR={safeCall:function(e,t,i,a){var r=a;if(e&&"function"==typeof e[t])try{r=e[t].apply(e,i)}catch(e){j.info("safeCall error",e)}return r},safeIncrement:ed,getComputedStyle:function(e,t){var i;return e&&t&&tb.default&&"function"==typeof tb.default.getComputedStyle?(tt&&tt.has(e)&&(i=tt.get(e)),i||(i=tb.default.getComputedStyle(e,null),tt&&tt.set(e,i)),i.getPropertyValue(t)):""},secondsToMs:function(e){return Math.floor(1e3*e)},assign:Object.assign,headersStringToObject:ep,cdnHeadersToRequestId:ev,extractHostnameAndDomain:es,extractHostname:en,manifestParser:tg,generateShortID:q,generateUUID:F,now:V.now,findMediaElement:K},tC={},tD=function(e){var t=arguments;"string"==typeof e?tD.hasOwnProperty(e)?B.default.setTimeout(function(){t=Array.prototype.splice.call(t,1),tD[e].apply(null,t)},0):j.warn("`"+e+"` is an unknown task"):"function"==typeof e?B.default.setTimeout(function(){e(tD)},0):j.warn("`"+e+"` is invalid.")},tL={loaded:V.now(),NAME:"mux-embed",VERSION:"5.9.0",API_VERSION:"2.1",PLAYER_TRACKED:!1,monitor:function(e,t){return function(e,t,i){var a=U(K(t),3),r=a[0],n=a[1],s=a[2],o=e.log,l=e.utils.getComputedStyle,d=e.utils.secondsToMs;if(!r)return o.error("No element was found with the `"+n+"` query selector.");if("video"!==s&&"audio"!==s)return o.error("The element of `"+n+"` was not a media element.");r.mux&&(r.mux.destroy(),delete r.mux,o.warn("Already monitoring this video element, replacing existing event listeners")),(i=Object.assign({automaticErrorTracking:!0},i,{getPlayheadTime:function(){return d(r.currentTime)},getStateData:function(){var e,t,i=(null==(e=this.getPlayheadTime)?void 0:e.call(this))||d(r.currentTime),a=this.hlsjs&&this.hlsjs.url,n=this.dashjs&&"function"==typeof this.dashjs.getSource&&this.dashjs.getSource(),s={player_is_paused:r.paused,player_width:parseInt(l(r,"width")),player_height:parseInt(l(r,"height")),player_autoplay_on:r.autoplay,player_preload_on:r.preload,player_language_code:r.lang,player_is_fullscreen:tp.default&&!!(tp.default.fullscreenElement||tp.default.webkitFullscreenElement||tp.default.mozFullScreenElement||tp.default.msFullscreenElement),video_poster_url:r.poster,video_source_url:a||n||r.currentSrc,video_source_duration:d(r.duration),video_source_height:r.videoHeight,video_source_width:r.videoWidth,view_dropped_frame_count:null==r||null==(t=r.getVideoPlaybackQuality)?void 0:t.call(r).droppedVideoFrames};if(r.getStartDate&&i>0){var o=r.getStartDate();if(o&&"function"==typeof o.getTime&&o.getTime()){var u=o.getTime();s.player_program_time=u+i,r.seekable.length>0&&(s.player_live_edge_program_time=u+r.seekable.end(r.seekable.length-1))}}return s}})).data=Object.assign({player_software:"HTML5 Video Element",player_mux_plugin_name:"VideoElementMonitor",player_mux_plugin_version:e.VERSION},i.data),r.mux=r.mux||{},r.mux.deleted=!1,r.mux.emit=function(t,i){e.emit(n,t,i)},r.mux.updateData=function(e){r.mux.emit("hb",e)};var u=function(){o.error("The monitor for this video element has already been destroyed.")};
1r.mux.destroy=function(){Object.keys(r.mux.listeners).forEach(function(e){r.removeEventListener(e,r.mux.listeners[e],!1)}),delete r.mux.listeners,r.mux.destroy=u,r.mux.swapElement=u,r.mux.emit=u,r.mux.addHLSJS=u,r.mux.addDashJS=u,r.mux.removeHLSJS=u,r.mux.removeDashJS=u,r.mux.updateData=u,r.mux.setEmitTranslator=u,r.mux.setStateDataTranslator=u,r.mux.setGetPlayheadTime=u,r.mux.deleted=!0,e.emit(n,"destroy")},r.mux.swapElement=function(t){var i=U(K(t),3),a=i[0],n=i[1],s=i[2];return a?"video"!==s&&"audio"!==s?e.log.error("The element of `"+n+"` was not a media element."):void(a.muxId=r.muxId,delete r.muxId,a.mux=a.mux||{},a.mux.listeners=Object.assign({},r.mux.listeners),delete r.mux.listeners,Object.keys(a.mux.listeners).forEach(function(e){r.removeEventListener(e,a.mux.listeners[e],!1),a.addEventListener(e,a.mux.listeners[e],!1)}),a.mux.swapElement=r.mux.swapElement,a.mux.destroy=r.mux.destroy,delete r.mux,r=a):e.log.error("No element was found with the `"+n+"` query selector.")},r.mux.addHLSJS=function(t){e.addHLSJS(n,t)},r.mux.addDashJS=function(t){e.addDashJS(n,t)},r.mux.removeHLSJS=function(){e.removeHLSJS(n)},r.mux.removeDashJS=function(){e.removeDashJS(n)},r.mux.setEmitTranslator=function(t){e.setEmitTranslator(n,t)},r.mux.setStateDataTranslator=function(t){e.setStateDataTranslator(n,t)},r.mux.setGetPlayheadTime=function(t){t||(t=i.getPlayheadTime),e.setGetPlayheadTime(n,t)},e.init(n,i),e.emit(n,"playerready"),r.paused||(e.emit(n,"play"),r.readyState>2&&e.emit(n,"playing")),r.mux.listeners={},tv.forEach(function(t){("error"!==t||i.automaticErrorTracking)&&(r.mux.listeners[t]=function(){var i={};if("error"===t){if(!r.error||1===r.error.code)return;i.player_error_code=r.error.code,i.player_error_message=tE[r.error.code]||r.error.message}e.emit(n,t,i)},r.addEventListener(t,r.mux.listeners[t],!1))})}(tD,e,t)},destroyMonitor:function(e){var t=U(K(e),1)[0];t&&t.mux&&"function"==typeof t.mux.destroy?t.mux.destroy():j.error("A video element monitor for `"+e+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(e,t){var i=$(e);tC[i]?tC[i].addHLSJS(t):j.error("A monitor for `"+i+"` has not been initialized.")},addDashJS:function(e,t){var i=$(e);tC[i]?tC[i].addDashJS(t):j.error("A monitor for `"+i+"` has not been initialized.")},removeHLSJS:function(e){var t=$(e);tC[t]?tC[t].removeHLSJS():j.error("A monitor for `"+t+"` has not been initialized.")},removeDashJS:function(e){var t=$(e);tC[t]?tC[t].removeDashJS():j.error("A monitor for `"+t+"` has not been initialized.")},init:function(e,t){Z()&&t&&t.respectDoNotTrack&&j.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var i=$(e);tC[i]=new tm(tD,i,t)},emit:function(e,t,i){var a=$(e);tC[a]?(tC[a].emit(t,i),"destroy"===t&&delete tC[a]):j.error("A monitor for `"+a+"` has not been initialized.")},updateData:function(e,t){var i=$(e);tC[i]?tC[i].emit("hb",t):j.error("A monitor for `"+i+"` has not been initialized.")},setEmitTranslator:function(e,t){var i=$(e);tC[i]?tC[i].emitTranslator=t:j.error("A monitor for `"+i+"` has not been initialized.")},setStateDataTranslator:function(e,t){var i=$(e);tC[i]?tC[i].stateDataTranslator=t:j.error("A monitor for `"+i+"` has not been initialized.")},setGetPlayheadTime:function(e,t){var i=$(e);tC[i]?tC[i].getPlayheadTime=t:j.error("A monitor for `"+i+"` has not been initialized.")},checkDoNotTrack:Z,log:j,utils:tR,events:{PLAYER_READY:"playerready",VIEW_INIT:"viewinit",VIDEO_CHANGE:"videochange",PLAY:"play",PAUSE:"pause",PLAYING:"playing",TIME_UPDATE:"timeupdate",SEEKING:"seeking",SEEKED:"seeked",REBUFFER_START:"rebufferstart",REBUFFER_END:"rebufferend",ERROR:"error",ENDED:"ended",RENDITION_CHANGE:"renditionchange",ORIENTATION_CHANGE:"orientationchange",AD_REQUEST:"adrequest",AD_RESPONSE:"adresponse",AD_BREAK_START:"adbreakstart",AD_PLAY:"adplay",AD_PLAYING:"adplaying",AD_PAUSE:"adpause",AD_FIRST_QUARTILE:"adfirstquartile",AD_MID_POINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",AD_ENDED:"adended",AD_BREAK_END:"adbreakend",AD_ERROR:"aderror",REQUEST_COMPLETED:"requestcompleted",REQUEST_FAILED:"requestfailed",REQUEST_CANCELLED:"requestcanceled",HEARTBEAT:"hb",DESTROY:"destroy"},WINDOW_HIDDEN:!1,WINDOW_UNLOADING:!1};Object.assign(tD,tL),void 0!==B.default&&"function"==typeof B.default.addEventListener&&B.default.addEventListener("pagehide",function(e){e.persisted||(tD.WINDOW_UNLOADING=!0)},!1);var tM=i(50664).Ay,tO={VIDEO:"video",DRM:"drm"},tN={NETWORK_OFFLINE:2000002,NETWORK_UNKNOWN_ERROR:2e6,NETWORK_INVALID_URL:24e5,NETWORK_NOT_FOUND:2404e3,NETWORK_NOT_READY:2412e3,NETWORK_TOKEN_MISSING:2403201,NETWORK_TOKEN_MALFORMED:2412202,NETWORK_TOKEN_EXPIRED:2403210,NETWORK_TOKEN_AUD_MISSING:2403221,NETWORK_TOKEN_AUD_MISMATCH:2403222,NETWORK_TOKEN_SUB_MISMATCH:2403232,ENCRYPTED_ERROR:5e6,ENCRYPTED_UNSUPPORTED_
1KEY_SYSTEM:5000001,ENCRYPTED_GENERATE_REQUEST_FAILED:5000002,ENCRYPTED_UPDATE_LICENSE_FAILED:5000003,ENCRYPTED_UPDATE_SERVER_CERT_FAILED:5000004,ENCRYPTED_CDM_ERROR:5000005,ENCRYPTED_OUTPUT_RESTRICTED:5000006,ENCRYPTED_MISSING_TOKEN:5000002},tx=e=>e===tO.VIDEO?"playback":e,tP=class e extends Error{constructor(t,i=e.MEDIA_ERR_CUSTOM,a,r){var n;super(t),this.name="MediaError",this.code=i,this.context=r,this.fatal=null!=a?a:i>=e.MEDIA_ERR_NETWORK&&i<=e.MEDIA_ERR_ENCRYPTED,this.message||(this.message=null!=(n=e.defaultMessages[this.code])?n:"")}};tP.MEDIA_ERR_ABORTED=1,tP.MEDIA_ERR_NETWORK=2,tP.MEDIA_ERR_DECODE=3,tP.MEDIA_ERR_SRC_NOT_SUPPORTED=4,tP.MEDIA_ERR_ENCRYPTED=5,tP.MEDIA_ERR_CUSTOM=100,tP.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail.",3:"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.",4:"An unsupported error occurred. The server or network failed, or your browser does not support this format.",5:"The media is encrypted and there are no keys to decrypt it."};var tU=tP,tB=(e,t)=>null!=t&&e in t,tW={ANY:"any",MUTED:"muted"},tH={ON_DEMAND:"on-demand",LIVE:"live",UNKNOWN:"unknown"},tV={MSE:"mse",NATIVE:"native"},tF={HEADER:"header",QUERY:"query",NONE:"none"},tq=Object.values(tF),t$={M3U8:"application/vnd.apple.mpegurl",MP4:"video/mp4"},tK={HLS:t$.M3U8},tY=(Object.keys(tK),[...Object.values(t$)],{upTo720p:"720p",upTo1080p:"1080p",upTo1440p:"1440p",upTo2160p:"2160p"}),tG={noLessThan480p:"480p",noLessThan540p:"540p",noLessThan720p:"720p",noLessThan1080p:"1080p",noLessThan1440p:"1440p",noLessThan2160p:"2160p"},tj={DESCENDING:"desc"},tQ={code:"en"},tZ=(e,t,i,a,r=e)=>{r.addEventListener(t,i,a),e.addEventListener("teardown",()=>{r.removeEventListener(t,i)},{once:!0})},tz=e=>{let t=e.indexOf("?");return t<0?[e]:[e.slice(0,t),e.slice(t)]},tX=e=>{let{type:t}=e;if(t){let e=t.toUpperCase();return tB(e,tK)?tK[e]:t}return t1(e)},tJ=e=>"VOD"===e?tH.ON_DEMAND:tH.LIVE,t0=e=>"EVENT"===e?1/0:"VOD"===e?NaN:0,t1=e=>{let{src:t}=e;if(!t)return"";let i="";try{i=new URL(t).pathname}catch{console.error("invalid url")}let a=i.lastIndexOf(".");if(a<0)return t3(e)?t$.M3U8:"";let r=i.slice(a+1).toUpperCase();return tB(r,t$)?t$[r]:""},t2="mux.com",t3=({src:e,customDomain:t=t2})=>{let i;try{i=new URL(`${e}`)}catch{return!1}let a="https:"===i.protocol,r=i.hostname===`stream.${t}`.toLowerCase(),n=i.pathname.split("/"),s=2===n.length,o=!(null!=n&&n[1].includes("."));return a&&r&&s&&o},t4=e=>{let t=(null!=e?e:"").split(".")[1];if(t)try{let e=t.replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)}catch{return}};function t5(e,t=!0){var i;return new t9(t&&null!=(i=null==tQ?void 0:tQ[e])?i:e,t?tQ.code:"en")}var t9=class{constructor(e,t=(e=>null!=(e=tQ)?e:"en")()){this.message=e,this.locale=t}format(e){return this.message.replace(/\{(\w+)\}/g,(t,i)=>{var a;return null!=(a=e[i])?a:""})}toString(){return this.message}},t8=Object.values(tW),t6=e=>"boolean"==typeof e||"string"==typeof e&&t8.includes(e),t7=(e,t)=>{if(!t)return;let i=e.muted,a=()=>e.muted=i;switch(t){case tW.ANY:e.play().catch(()=>{e.muted=!0,e.play().catch(a)});break;case tW.MUTED:e.muted=!0,e.play().catch(a);break;default:e.play().catch(()=>{})}},ie=e=>"time"in e?e.time:e.startTime;function it(e,t,i,a,r,n){let s=document.createElement("track");return s.kind=t,s.label=i,a&&(s.srclang=a),r&&(s.id=r),n&&(s.default=!0),s.track.mode=["subtitles","captions"].includes(t)?"disabled":"hidden",s.setAttribute("data-removeondestroy",""),e.append(s),s.track}function ii(e,t,i){var a;return null==(a=Array.from(e.querySelectorAll("track")).find(e=>e.track.label===t&&e.track.kind===i))?void 0:a.track}async function ia(e,t,i,a){let r=ii(e,i,a);return r||((r=it(e,a,i)).mode="hidden",await new Promise(e=>setTimeout(()=>e(void 0),0))),"hidden"!==r.mode&&(r.mode="hidden"),[...t].sort((e,t)=>ie(t)-ie(e)).forEach(t=>{var i,n;let s=t.value,o=ie(t);if("endTime"in t&&null!=t.endTime)null==r||r.addCue(new VTTCue(o,t.endTime,"chapters"===a?s:JSON.stringify(null!=s?s:null)));else{let t=Array.prototype.findIndex.call(null==r?void 0:r.cues,e=>e.startTime>=o),l=null==(i=null==r?void 0:r.cues)?void 0:i[t],d=l?l.startTime:Number.isFinite(e.duration)?e.duration:Number.MAX_SAFE_INTEGER,u=null==(n=null==r?void 0:r.cues)?void 0:n[t-1];u&&(u.endTime=o),null==r||r.addCue(new VTTCue(o,d,"chapters"===a?s:JSON.stringify(null!=s?s:null)))}}),e.textTracks.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),r}var ir="cuepoints",is=Object.freeze({label:ir});async function io(e,t,i=is){return ia(e,t,i.label,"metadata")}var il=e=>({time:e.startTime,value:JSON.parse(e.text)});function id(e,t={label:ir}){var i,a;let r=ii(e,t.label,"metadata");if(!(null!=(i=null==r?void 0:r.activeCues)&&i.length))return;if(1===r.activeCues.length)return il(r.activeCues[0]);let{currentTime:n}=e;return il(Array.prototype.find.call(null!=(a=r.activeCues)?a:[],({startTime:e,endTime:t})=>e<=n&&t>n)||r.activeCues[0])}async function iu(e,t=is){return new Promise(i=>{tZ(e,"loadstart",async()=>{let a=await io(e,[],t);tZ(e,"cuechange",()=>{let t=id(e);if(t){let i=new CustomEvent("cuepointchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(i)}},{},a),i(a)})})}var ic="chapters",ih=Object.freeze({label:ic}),im=e=>({startTime:e.startTime,endTime:e.endTime,value:e.text});async function ip(e,t,i=ih){return ia(e,t,i.label,"chapters")}function iv(e,t={label:ic}){var i,a;let r=ii(e,t.label,"chapters");if(!(null!=(i=null==r?void 0:r.activeCues)&&i.length))return;if(1===r.activeCues.length)return im(r.activeCues[0]);let{currentTime:n}=e;return im(Array.prototype.find.call(null!=(a=r.activeCues)?a:[],({startTime:e,endTime:t})=>e<=n&&t>n)||r.activeCues[0])}
1async function iE(e,t=ih){return new Promise(i=>{tZ(e,"loadstart",async()=>{let a=await ip(e,[],t);tZ(e,"cuechange",()=>{let t=iv(e);if(t){let i=new CustomEvent("chapterchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(i)}},{},a),i(a)})})}var ib={VIDEO:"v",THUMBNAIL:"t",STORYBOARD:"s",DRM:"d"},ig=(e,t,i,a,r=!1,n=!(e=>null==(e=globalThis.navigator)?void 0:e.onLine)())=>{var s,o;if(n){let i=t5("Your device appears to be offline",r),a=tU.MEDIA_ERR_NETWORK,n=new tU(i,a,!1,void 0);return n.errorCategory=t,n.muxCode=tN.NETWORK_OFFLINE,n.data=e,n}let l="status"in e?e.status:e.code,d=Date.now(),u=tU.MEDIA_ERR_NETWORK;if(200===l)return;let c=tx(t),h=((e,t)=>{var i,a;let r=tx(e),n=`${r}Token`;return null!=(i=t.tokens)&&i[r]?null==(a=t.tokens)?void 0:a[r]:tB(n,t)?t[n]:void 0})(t,i),m=(e=>e===tO.VIDEO?ib.VIDEO:e===tO.DRM?ib.DRM:void 0)(t),[p]=tz(null!=(s=i.playbackId)?s:"");if(!l||!p)return;let E=t4(h);if(h&&!E){let i=new tU(t5("The {tokenNamePrefix}-token provided is invalid or malformed.",r).format({tokenNamePrefix:c}),u,!0,t5("Compact JWT string: {token}",r).format({token:h}));return i.errorCategory=t,i.muxCode=tN.NETWORK_TOKEN_MALFORMED,i.data=e,i}if(l>=500){let e=new tU("",u,null==a||a);return e.errorCategory=t,e.muxCode=tN.NETWORK_UNKNOWN_ERROR,e}if(403===l)if(E){if((({exp:e},t=Date.now())=>!e||1e3*e<t)(E,d)){let i={timeStyle:"medium",dateStyle:"medium"},a=new tU(t5("The video’s secured {tokenNamePrefix}-token has expired.",r).format({tokenNamePrefix:c}),u,!0,t5("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat("en",i).format(null!=(o=E.exp)?o:0),currentDate:new Intl.DateTimeFormat("en",i).format(d)}));return a.errorCategory=t,a.muxCode=tN.NETWORK_TOKEN_EXPIRED,a.data=e,a}if((({sub:e},t)=>e!==t)(E,p)){let i=new tU(t5("The video’s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",r).format({tokenNamePrefix:c}),u,!0,t5("Specified playback ID: {playbackId} and the playback ID encoded in the {tokenNamePrefix}-token: {tokenPlaybackId}",r).format({tokenNamePrefix:c,playbackId:p,tokenPlaybackId:E.sub}));return i.errorCategory=t,i.muxCode=tN.NETWORK_TOKEN_SUB_MISMATCH,i.data=e,i}if((({aud:e},t)=>!e)(E,0)){let i=new tU(t5("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:c}),u,!0,t5("The {tokenNamePrefix}-token has no aud value. aud value should be {expectedAud}.",r).format({tokenNamePrefix:c,expectedAud:m}));return i.errorCategory=t,i.muxCode=tN.NETWORK_TOKEN_AUD_MISSING,i.data=e,i}if((({aud:e},t)=>e!==t)(E,m)){let i=new tU(t5("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:c}),u,!0,t5("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.",r).format({tokenNamePrefix:c,expectedAud:m,aud:E.aud}));return i.errorCategory=t,i.muxCode=tN.NETWORK_TOKEN_AUD_MISMATCH,i.data=e,i}}else{let i=new tU(t5("Authorization error trying to access this {category} URL. If this is a signed URL, you might need to provide a {tokenNamePrefix}-token.",r).format({tokenNamePrefix:c,category:t}),u,null==a||a,t5("Specified playback ID: {playbackId}",r).format({playbackId:p}));return i.errorCategory=t,i.muxCode=tN.NETWORK_TOKEN_MISSING,i.data=e,i}if(412===l){let i=new tU(t5("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),u,null==a||a,t5("Specified playback ID: {playbackId}",r).format({playbackId:p}));return i.errorCategory=t,i.muxCode=tN.NETWORK_NOT_READY,i.data=e,i}if(404===l){let i=new tU(t5("This URL or playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),u,null==a||a,t5("Specified playback ID: {playbackId}",r).format({playbackId:p}));return i.errorCategory=t,i.muxCode=tN.NETWORK_NOT_FOUND,i.data=e,i}if(400===l){let i=new tU(t5("The URL or playback-id was invalid. You may have used an invalid value as a playback-id."),u,null==a||a,t5("Specified playback ID: {playbackId}",r).format({playbackId:p}));return i.errorCategory=t,i.muxCode=tN.NETWORK_INVALID_URL,i.data=e,i}let b=new tU("",u,null==a||a);return b.errorCategory=t,b.muxCode=tN.NETWORK_UNKNOWN_ERROR,b.data=e,b},i_=tM.DefaultConfig.capLevelController,iy=class e extends i_{constructor(e){super(e)}get levels(){var e;return null!=(e=this.hls.levels)?e:[]}getValidLevels(e){return this.levels.filter((t,i)=>this.isLevelAllowed(t)&&i<=e)}getMaxLevel(t){let i=super.getMaxLevel(t),a=this.getValidLevels(t);if(!a[i])return i;let r=Math.min(a[i].width,a[i].height),n=e.minMaxResolution;return r>=n?i:i_.getMaxLevelByMediaSize(a,16/9*n,n)}};iy.minMaxResolution=720;var iT,iA,ik,iw,iS,iI,iR={FAIRPLAY:"fairplay",PLAYREADY:"playready",WIDEVINE:"widevine"},iC=async e=>fetch(e).then(e=>200!==e.status?Promise.reject(e):e.text()).then(e=>fetch(e.split(`
2`).find((e,t,i)=>t&&i[t-1].startsWith("#EXT-X-STREAM-INF"))).then(e=>200!==e.status?Promise.reject(e):e.text()).then(e=>e.split(`
3`))),iD=async(e,t)=>t===t$.MP4?{streamType:tH.ON_DEMAND,targetLiveWindow:NaN,liveEdgeStartOffset:void 0}:t===t$.M3U8?(e=>{var t,i,a;let r=null==(i=(null!=(t=e.find(e=>e.startsWith("#EXT-X-PLAYLIST-TYPE")))?t:"").split(":")[1])?void 0:i.trim(),n=tJ(r),s=t0(r),o;if(n===tH.LIVE){let t=e.find(e=>e.startsWith("#EXT-X-PART-INF"));if(t)o=2*t.split(":")[1].split("=")[1];else{let t=e.find(e=>e.startsWith("#EXT-X-TARGETDURATION")),i=null==(a=null==t?void 0:t.split(":"))?void 0:a[1];o=(null!=i?i:6)*3}}return{streamType:n,targetLiveWindow:s,liveEdgeStartOffset:o}})(await iC(e)):(console.error(`Media type ${t} is an unrecognized or unsupported type for src ${e}.`),{streamType:void 0,targetLiveWindow:void 0,liveEdgeStartOffset:void 0}),iL=async(e,t,i=tX({src:e}))=>{var a,r,n;let{streamType:s,targetLiveWindow:o,liveEdgeStartOffset:l}=await iD(e,i);(null!=(a=ix.get(t))?a:{}).liveEdgeStartOffset=l,(null!=(r=ix.get(t))?r:{}).targetLiveWindow=o,t.dispatchEvent(new CustomEvent("targetlivewindowch
3ange",{composed:!0,bubbles:!0})),(null!=(n=ix.get(t))?n:{}).streamType=s,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},iM=null!=(iA=null==(iT=null==globalThis?void 0:globalThis.navigator)?void 0:iT.userAgent)?iA:"",iO=null!=(iS=null==(iw=null==(ik=null==globalThis?void 0:globalThis.navigator)?void 0:ik.userAgentData)?void 0:iw.platform)?iS:"",iN=iM.toLowerCase().includes("android")||["x11","android"].some(e=>iO.toLowerCase().includes(e)),ix=new WeakMap,iP="mux.com",iU=null==(iI=tM.isSupported)?void 0:iI.call(tM),iB=()=>tD.utils.now(),iW=tD.utils.generateUUID,iH=({playbackId:e,customDomain:t=iP,maxResolution:i,minResolution:a,renditionOrder:r,programStartTime:n,programEndTime:s,assetStartTime:o,assetEndTime:l,playbackToken:d,tokens:{playback:u=d}={},extraSourceParams:c={}}={})=>{if(!e)return;let[h,m=""]=tz(e),p=new URL(`https://stream.${t}/${h}.m3u8${m}`);return u||p.searchParams.has("token")?(p.searchParams.forEach((e,t)=>{"token"!=t&&p.searchParams.delete(t)}),u&&p.searchParams.set("token",u)):(i&&p.searchParams.set("max_resolution",i),a&&(p.searchParams.set("min_resolution",a),i&&+i.slice(0,-1)<+a.slice(0,-1)&&console.error("minResolution must be <= maxResolution","minResolution",a,"maxResolution",i)),r&&p.searchParams.set("rendition_order",r),n&&p.searchParams.set("program_start_time",`${n}`),s&&p.searchParams.set("program_end_time",`${s}`),o&&p.searchParams.set("asset_start_time",`${o}`),l&&p.searchParams.set("asset_end_time",`${l}`),Object.entries(c).forEach(([e,t])=>{null!=t&&p.searchParams.set(e,t)})),p.toString()},iV=e=>{if(!e)return;let[t]=e.split("?");return t||void 0},iF=e=>{if(!e||!e.startsWith("https://stream."))return;let[t]=new URL(e).pathname.slice(1).split(".m3u8");return t||void 0},iq=e=>{var t;return null==(t=ix.get(e))?void 0:t.error},i$=e=>{var t,i;return null!=(i=null==(t=ix.get(e))?void 0:t.streamType)?i:tH.UNKNOWN},iK=e=>{var t,i;return null!=(i=null==(t=ix.get(e))?void 0:t.seekable)?i:e.seekable},iY=.034,iG=(e,t,i=iY)=>e>t||((e,t,i=iY)=>Math.abs(e-t)<=i)(e,t,i),ij=(e,t)=>{var i,a,r;if(!t||!e.buffered.length)return;if(e.readyState>2)return!1;let n=t.currentLevel>=0?null==(a=null==(i=t.levels)?void 0:i[t.currentLevel])?void 0:a.details:null==(r=t.levels.find(e=>!!e.details))?void 0:r.details;if(!n||n.live)return;let{fragments:s}=n;if(!(null!=s&&s.length))return;if(e.currentTime<e.duration-(n.targetduration+.5))return!1;let o=s[s.length-1];if(e.currentTime<=o.start)return!1;let l=o.start+o.duration/2,d=e.buffered.start(e.buffered.length-1),u=e.buffered.end(e.buffered.length-1);return l>d&&l<u},iQ=(e,t)=>e.ended||e.loop?e.ended:!!(t&&ij(e,t))||((e,t=iY)=>e.paused&&iG(e.currentTime,e.duration,t))(e),iZ=(e,t)=>{let i=null==t?void 0:t.engine;i&&(i.detachMedia(),i.destroy()),null!=e&&e.mux&&!e.mux.deleted&&(e.mux.destroy(),delete e.mux),e&&(e.removeAttribute("src"),e.load(),e.removeEventListener("error",i9),e.removeEventListener("error",i6),e.removeEventListener("durationchange",i5),ix.delete(e),e.dispatchEvent(new Event("teardown")))};function iz(e,t){var i;let a=tX(e);if(a!==t$.M3U8)return!0;let r=!a||null==(i=t.canPlayType(a))||i,{preferPlayback:n}=e,s=n===tV.MSE,o=n===tV.NATIVE;return r&&(o||!(iU&&(s||iN)))}var iX=e=>e===tH.LIVE?{backBufferLength:8}:{},iJ=e=>{let{tokens:{drm:t}={},playbackId:i,drmTypeCb:a}=e,r=iV(i);return t&&r?{emeEnabled:!0,drmSystems:{"com.apple.fps":{licenseUrl:i2(e,"fairplay"),serverCertificateUrl:i3(e,"fairplay")},"com.widevine.alpha":{licenseUrl:i2(e,"widevine")},"com.microsoft.playready":{licenseUrl:i2(e,"playready")}},requestMediaKeySystemAccessFunc:(e,t)=>("com.widevine.alpha"===e&&(t=[...t.map(e=>{var t;let i=null==(t=e.videoCapabilities)?void 0:t.map(e=>({...e,robustness:"HW_SECURE_ALL"}));return{...e,videoCapabilities:i}}),...t]),navigator.requestMediaKeySystemAccess(e,t).then(t=>{let i=(e=>e.includes("fps")?iR.FAIRPLAY:e.includes("playready")?iR.PLAYREADY:e.includes("widevine")?iR.WIDEVINE:void 0)(e);return null==a||a(i),t}))}:{}},i0=async e=>{let t=await fetch(e);return 200!==t.status?Promise.reject(t):await t.arrayBuffer()},i1=async(e,t)=>{let i=await fetch(t,{method:"POST",headers:{"Content-type":"application/octet-stream"},body:e});return 200!==i.status?Promise.reject(i):new Uint8Array(await i.arrayBuffer())},i2=({playbackId:e,tokens:{drm:t}={},customDomain:i=iP},a)=>{let r=iV(e);return`https://license.${i.toLocaleLowerCase().endsWith(iP)?i:iP}/license/${a}
3/${r}?token=${t}`},i3=({playbackId:e,tokens:{drm:t}={},customDomain:i=iP},a)=>{let r=iV(e);return`https://license.${i.toLocaleLowerCase().endsWith(iP)?i:iP}/appcert/${a}/${r}?token=${t}`},i4=({playbackId:e,src:t,customDomain:i})=>{if(e)return!0;if("string"!=typeof t)return!1;let a=new URL(t,null==window?void 0:window.location.href).hostname.toLocaleLowerCase();return a.includes(iP)||!!i&&a.includes(i.toLocaleLowerCase())};function i5(e){var t;let i=e.target,a=null==(t=ix.get(i))?void 0:t.startTime;if(a&&function(e,t,i){t&&i>t&&(i=t);for(let t=0;t<e.length;t++)if(e.start(t)<=i&&e.end(t)>=i)return!0;return!1}(i.seekable,i.duration,a)){let e="auto"===i.preload;e&&(i.preload="none"),i.currentTime=a,e&&(i.preload="auto")}}async function i9(e){if(!e.isTrusted)return;e.stopImmediatePropagation();let t=e.target;if(!(null!=t&&t.error))return;let{message:i,code:a}=t.error,r=new tU(i,a);if(t.src&&a===tU.MEDIA_ERR_SRC_NOT_SUPPORTED&&t.readyState===HTMLMediaElement.HAVE_NOTHING)return void setTimeout(()=>{var e;let i=null!=(e=iq(t))?e:t.error;(null==i?void 0:i.code)===tU.MEDIA_ERR_SRC_NOT_SUPPORTED&&i8(t,r)},500);if(t.src&&(a!==tU.MEDIA_ERR_DECODE||void 0!==a))try{let{status:e}=await fetch(t.src);r.data={response:{code:e}}}catch{}i8(t,r)}function i8(e,t){var i;t.fatal&&((null!=(i=ix.get(e))?i:{}).error=t,e.dispatchEvent(new CustomEvent("error",{detail:t})))}function i6(e){var t,i;if(!(e instanceof CustomEvent)||!(e.detail instanceof tU))return;let a=e.target,r=e.detail;r&&r.fatal&&((null!=(t=ix.get(a))?t:{}).error=r,null==(i=a.mux)||i.emit("error",{player_error_code:r.code,player_error_message:r.message,player_error_context:r.context}))}var i7=(e,t)=>{var i,a,r;console.error("getErrorFromHlsErrorData()",e);let n={[tM.ErrorTypes.NETWORK_ERROR]:tU.MEDIA_ERR_NETWORK,[tM.ErrorTypes.MEDIA_ERROR]:tU.MEDIA_ERR_DECODE,[tM.ErrorTypes.KEY_SYSTEM_ERROR]:tU.MEDIA_ERR_ENCRYPTED},s,o=(e=>[tM.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,tM.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED].includes(e.details)?tU.MEDIA_ERR_NETWORK:n[e.type])(e);if(o===tU.MEDIA_ERR_NETWORK&&e.response){let r=null!=(i=(e=>e.type===tM.ErrorTypes.KEY_SYSTEM_ERROR?tO.DRM:e.type===tM.ErrorTypes.NETWORK_ERROR?tO.VIDEO:void 0)(e))?i:tO.VIDEO;s=null!=(a=ig(e.response,r,t,e.fatal))?a:new tU("",o,e.fatal)}else o===tU.MEDIA_ERR_ENCRYPTED?e.details===tM.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE?((s=new tU(t5("Attempting to play DRM-protected content without providing a DRM token."),tU.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tO.DRM,s.muxCode=tN.ENCRYPTED_MISSING_TOKEN):e.details===tM.ErrorDetails.KEY_SYSTEM_NO_ACCESS?((s=new tU(t5("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),tU.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tO.DRM,s.muxCode=tN.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM):e.details===tM.ErrorDetails.KEY_SYSTEM_NO_SESSION?((s=new tU(t5("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),tU.MEDIA_ERR_ENCRYPTED,!0)).errorCategory=tO.DRM,s.muxCode=tN.ENCRYPTED_GENERATE_REQUEST_FAILED):e.details===tM.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED?((s=new tU(t5("Failed to update DRM license. This may be an issue with the player or your protected content."),tU.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tO.DRM,s.muxCode=tN.ENCRYPTED_UPDATE_LICENSE_FAILED):e.details===tM.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED?((s=new tU(t5("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),tU.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tO.DRM,s.muxCode=tN.ENCRYPTED_UPDATE_SERVER_CERT_FAILED):e.details===tM.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR?((s=new tU(t5("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser."),tU.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tO.DRM,s.muxCode=tN.ENCRYPTED_CDM_ERROR):e.details===tM.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED?((s=new tU(t5("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen."),tU.MEDIA_ERR_ENCRYPTED,!1)).errorCategory=tO.DRM,s.muxCode=tN.ENCRYPTED_OUTPUT_RESTRICTED):((s=new tU(e.error.message,tU.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tO.DRM,s.muxCode=tN.ENCRYPTED_ERROR):s=new tU("",o,e.fatal);return s.context||(s.context=`${e.url?`url: ${e.url}
4`:""}${e.response&&(e.response.code||e.response.text)?`response: ${e.response.code}, ${e.response.text}
5`:""}${e.reason?`failure reason: ${e.reason}
6`:""}${e.level?`level: ${e.level}
7`:""}${e.parent?`parent stream controller: ${e.parent}
8`:""}${e.buffer?`buffer length: ${e.buffer}
9`:""}${e.error?`error: ${e.error}
10`:""}${e.event?`event: ${e.event}
11`:""}${e.err?`error message: ${null==(r=e.err)?void 0:r.message}
12`:""}`),s.data=e,s};let ae={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediash
12owtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_TOGGLE_SUBTITLES_REQUEST:"mediatogglesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_AUDIO_TRACK_REQUEST:"mediaaudiotrackrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},at={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},ai={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_BUFFERED:"mediaBuffered",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_CHAPTERS_CUES:"mediaChaptersCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_P
12LAYED:"mediaHasPlayed",MEDIA_HEIGHT:"mediaHeight",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_IS_PIP:"mediaIsPip",MEDIA_LOADING:"mediaLoading",MEDIA_MUTED:"mediaMuted",MEDIA_PAUSED:"mediaPaused",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_WIDTH:"mediaWidth"},aa=Object.entries(ai),ar=aa.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{}),an=aa.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"});Object.entries(an).reduce((e,[t,i])=>{let a=ar[t];return a&&(e[i]=a),e},{userinactivechange:"userinactive"});let as=Object.entries(ar).reduce((e,[t,i])=>{let a=an[t];return a&&(e[i]=a),e},{userinactive:"userinactivechange"}),ao={SUBTITLES:"subtitles",CAPTIONS:"captions",CHAPTERS:"chapters",METADATA:"metadata"},al={DISABLED:"disabled",SHOWING:"showing"},ad={MOUSE:"mouse",TOUCH:"touch"},au={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},ac={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},ah={FULLSCREEN:"fullscreen"};function am(e){if(e){let{id:t,width:i,height:a}=e;return[t,i,a].filter(e=>null!=e).join(":")}}function ap(e){if(e){let[t,i,a]=e.split(":");return{id:t,width:+i,height:+a}}}function av(e){if(e){let{id:t,kind:i,language:a,label:r}=e;return[t,i,a,r].filter(e=>null!=e).join(":")}}function aE(e){if(e){let[t,i,a,r]=e.split(":");return{id:t,kind:i,language:a,label:r}}}function ab(e){return"number"==typeof e&&!Number.isNaN(e)&&Number.isFinite(e)}function af(e){return"string"==typeof e&&!isNaN(e)&&!isNaN(parseFloat(e))}let ag=e=>new Promise(t=>setTimeout(t,e)),a_=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],ay=e=>{if(!ab(e))return"";let t=Math.abs(e),i=t!==e,a=new Date(0,0,0,0,0,t,0),r=[a.getHours(),a.getMinutes(),a.getSeconds()].map((e,t)=>e&&((e,t)=>{let i=1===e?a_[t].singular:a_[t].plural;return`${e} ${i}`})(e,t)).filter(e=>e).join(", ");return`${r}${i?" remaining":""}`};function aT(e,t){let i=!1;e<0&&(i=!0,e=0-e);let a=Math.floor((e=e<0?0:e)%60),r=Math.floor(e/60%60),n=Math.floor(e/3600),s=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=r=a="0"),r=(((n=n>0||o>0?n+":":"")||s>=10)&&r<10?"0"+r:r)+":",(i?"-":"")+n+r+(a=a<10?"0"+a:a)}Object.freeze({length:0,start(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0}});let aA={"Start airplay":"Start airplay","Stop airplay":"Stop airplay",Audio:"Audio",Captions:"Captions","Enable captions":"Enable captions","Disable captions":"Disable captions","Start casting":"Start casting","Stop casting":"Stop casting","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",Mute:"Mute",Unmute:"Unmute","Enter picture in picture mode":"Enter picture in picture mode","Exit picture in picture mode":"Exit picture in picture mode",Play:"Play",Pause:"Pause","Playback rate":"Playback rate","Playback rate {playbackRate}":"Playback rate {playbackRate}",Quality:"Quality","Seek backward":"Seek backward","Seek forward":"Seek forward",Settings:"Settings","audio player":"audio player","video player":"video player",volume:"volume",seek:"seek","closed captions":"closed captions","current playback rate":"current playback rate","playback time":"playback time","media loading":"media loading",settings:"settings","audio tracks":"audio tracks",quality:"quality",play:"play",pause:"pause",mute:"mute",unmute:"unmute",live:"live","start airplay":"start airplay","stop airplay":"stop airplay","start casting":"start casting","stop casting":"stop casting","enter fullscreen mode":"enter fullscreen mode","exit fullscreen mode":"exit fullscreen mode","enter picture in picture mode":"enter picture in picture mode","exit picture in picture mode":"exit picture in picture mode","seek to live":"seek to live","playing live":"playing live","seek back {seekOffset} seconds":"seek back {seekOffset} seconds","seek forward {seekOffset} seconds":"seek forward {seekOffset} seconds","Network Error":"Network Error","Decode Error":"Decode Error","S
12ource Not Supported":"Source Not Supported","Encryption Error":"Encryption Error","A network error caused the media download to fail.":"A network error caused the media download to fail.","A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.":"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.","An unsupported error occurred. The server or network failed, or your browser does not support this format.":"An unsupported error occurred. The server or network failed, or your browser does not support this format.","The media is encrypted and there are no keys to decrypt it.":"The media is encrypted and there are no keys to decrypt it."},ak={en:aA},aw=(null==(ox=null==(oN=globalThis.navigator)?void 0:oN.language)?void 0:ox.split("-")[0])||"en",aS=(e,t={})=>{var i;return((null==(i=ak[aw])?void 0:i[e])||aA[e]).replace(/\{(\w+)\}/g,(e,i)=>void 0!==t[i]?String(t[i]):`{${i}}`)};class aI{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}}class aR extends aI{}class aC extends aR{constructor(){super(...arguments),this.role=null}}class aD{observe(){}unobserve(){}disconnect(){}}let aL={createElement:function(){return new aM.HTMLElement},createElementNS:function(){return new aM.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent:e=>!1},aM={ResizeObserver:aD,document:aL,Node:aR,Element:aC,HTMLElement:class extends aC{constructor(){super(...arguments),this.innerHTML=""}get content(){return new aM.DocumentFragment}},DocumentFragment:class extends aI{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem:e=>null,setItem(e,t){},removeItem(e){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia:e=>({matches:!1,media:e})},aO="undefined"==typeof window||void 0===window.customElements,aN=Object.keys(aM).every(e=>e in globalThis),ax=aO&&!aN?aM:globalThis,aP=aO&&!aN?aL:globalThis.document,aU=new WeakMap,aB=e=>{let t=aU.get(e);return t||aU.set(e,t=new Set),t},aW=new ax.ResizeObserver(e=>{for(let t of e)for(let e of aB(t.target))e(t)});function aH(e,t){aB(e).add(t),aW.observe(e)}function aV(e,t){let i=aB(e);i.delete(t),i.size||aW.unobserve(e)}function aF(e){var t;return null!=(t=aq(e))?t:aG(e,"media-controller")}function aq(e){var t;let{MEDIA_CONTROLLER:i}=at,a=e.getAttribute(i);if(a)return null==(t=aQ(e))?void 0:t.getElementById(a)}let a$=(e,t,i=".value")=>{let a=e.querySelector(i);a&&(a.textContent=t)},aK=(e,t)=>((e,t)=>{let i=`slot[name="${t}"]`,a=e.shadowRoot.querySelector(i);return a?a.children:[]})(e,t)[0],aY=(e,t)=>!!e&&!!t&&(null!=e&&!!e.contains(t)||aY(e,t.getRootNode().host)),aG=(e,t)=>{if(!e)return null;let i=e.closest(t);return i||aG(e.getRootNode().host,t)};function aj(e=document){var t;let i=null==e?void 0:e.activeElement;return i?null!=(t=aj(i.shadowRoot))?t:i:null}function aQ(e){var t;let i=null==(t=null==e?void 0:e.getRootNode)?void 0:t.call(e);return i instanceof ShadowRoot||i instanceof Document?i:null}function aZ(e,{depth:t=3,checkOpacity:i=!0,checkVisibilityCSS:a=!0}={}){if(e.checkVisibility)return e.checkVisibility({checkOpacity:i,checkVisibilityCSS:a});let r=e;for(;r&&t>0;){let e=getComputedStyle(r);if(i&&"0"===e.opacity||a&&"hidden"===e.visibility||"none"===e.display)return!1;r=r.parentElement,t--}return!0}function az(e,t){let i=function(e,t){var i,a;let r;for(r of null!=(i=e.querySelectorAll("style:not([media])"))?i:[]){let e;try{e=null==(a=r.sheet)?void 0:a.cssRules}catch{continue}for(let i of null!=e?e:[])if(t(i.selectorText))return i}}(e,e=>e===t);return i||aX(e,t)}function aX(e,t){var i,a;let r=null!=(i=e.querySelectorAll("style:not([media])"))?i:[],n=null==r?void 0:r[r.length-1];return(null==n?void 0:n.sheet)?(null==n||n.sheet.insertRule(`${t}{}`,n.sheet.cssRules.length),null==(a=n.sheet.cssRules)?void 0:a[n.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",e),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function aJ(e,t,i=NaN){let a=e.getAttribute(t);return null!=a?+a:i}function a0(e,t,i){let a=+i;
12if(null==i||Number.isNaN(a)){e.hasAttribute(t)&&e.removeAttribute(t);return}aJ(e,t,void 0)!==a&&e.setAttribute(t,`${a}`)}function a1(e,t){return e.hasAttribute(t)}function a2(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}a1(e,t)!=i&&e.toggleAttribute(t,i)}function a3(e,t,i=null){var a;return null!=(a=e.getAttribute(t))?a:i}function a4(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}let a=`${i}`;a3(e,t,void 0)!==a&&e.setAttribute(t,a)}var a5=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},a9=(e,t,i)=>(a5(e,t,"read from private field"),i?i.call(e):t.get(e)),a8=(e,t,i,a)=>(a5(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let a6=aP.createElement("template");a6.innerHTML=`
13<style>
14  :host {
15    display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));
16    box-sizing: border-box;
17  }
18</style>
19`;class a7 extends ax.HTMLElement{constructor(e={}){if(super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,oP,void 0),!this.shadowRoot){let t=this.attachShadow({mode:"open"}),i=a6.content.cloneNode(!0);this.nativeEl=i;let a=e.slotTemplate;a||((a=aP.createElement("template")).innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(a.content.cloneNode(!0)),t.appendChild(i)}}static get observedAttributes(){return[at.MEDIA_CONTROLLER,ar.MEDIA_PAUSED]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===at.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=a9(this,oP))?void 0:a.unassociateElement)||r.call(a,this),a8(this,oP,null)),i&&this.isConnected&&(a8(this,oP,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=a9(this,oP))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i,a;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),a8(this,oP,function(e){var t;let i=e.getAttribute(at.MEDIA_CONTROLLER);return i?null==(t=e.getRootNode())?void 0:t.getElementById(i):aG(e,"media-controller")}(this)),this.getAttribute(at.MEDIA_CONTROLLER)&&(null==(t=null==(e=a9(this,oP))?void 0:e.associateElement)||t.call(e,this)),null==(i=a9(this,oP))||i.addEventListener("pointerdown",this),null==(a=a9(this,oP))||a.addEventListener("click",this)}disconnectedCallback(){var e,t,i,a;this.getAttribute(at.MEDIA_CONTROLLER)&&(null==(t=null==(e=a9(this,oP))?void 0:e.unassociateElement)||t.call(e,this)),null==(i=a9(this,oP))||i.removeEventListener("pointerdown",this),null==(a=a9(this,oP))||a.removeEventListener("click",this),a8(this,oP,null)}handleEvent(e){var t;let i=null==(t=e.composedPath())?void 0:t[0];if(["video","media-controller"].includes(null==i?void 0:i.localName)){if("pointerdown"===e.type)this._pointerType=e.pointerType;else if("click"===e.type){let{clientX:t,clientY:i}=e,{left:a,top:r,width:n,height:s}=this.getBoundingClientRect(),o=t-a,l=i-r;if(o<0||l<0||o>n||l>s||0===n&&0===s)return;let{pointerType:d=this._pointerType}=e;if(this._pointerType=void 0,d===ad.TOUCH)return void this.handleTap(e);if(d===ad.MOUSE)return void this.handleMouseClick(e)}}}get mediaPaused(){return a1(this,ar.MEDIA_PAUSED)}set mediaPaused(e){a2(this,ar.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let t=this.mediaPaused?ae.MEDIA_PLAY_REQUEST:ae.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new ax.CustomEvent(t,{composed:!0,bubbles:!0}))}}oP=new WeakMap,ax.customElements.get("media-gesture-receiver")||ax.customElements.define("media-gesture-receiver",a7);var re=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},rt=(e,t,i)=>(re(e,t,"read from private field"),i?i.call(e):t.get(e)),ri=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},ra=(e,t,i,a)=>(re(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),rr=(e,t,i)=>(re(e,t,"access private method"),i);let rn={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"},rs=aP.createElement("template");rs.innerHTML=`
20  <style>
21    
22    :host([${ar.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {
23      outline: none;
24    }
25
26    :host {
27      box-sizing: border-box;
28      position: relative;
29      display: inline-block;
30      line-height: 0;
31      background-color: var(--media-background-color, #000);
32    }
33
34    :host(:not([${rn.AUDIO}])) [part~=layer]:not([part~=media-layer]) {
35      position: absolute;
36      top: 0;
37      left: 0;
38      bottom: 0;
39      right: 0;
40      display: flex;
41      flex-flow: column nowrap;
42      align-items: start;
43      pointer-events: none;
44      background: none;
45    }
46
47    slot[name=media] {
48      display: var(--media-slot-display, contents);
49    }
50
51    
52    :host([${rn.AUDIO}]) slot[name=media] {
53      display: var(--media-slot-display, none);
54    }
55
56    
57    :host([${rn.AUDIO}]) [part~=layer][part~=gesture-layer] {
58      height: 0;
59      display: block;
60    }
61
62    
63    :host(:not([${rn.AUDIO}])[${rn.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]),
64    :host(:not([${rn.AUDIO}])[${rn.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] {
65      display: none;
66    }
67
68    
69    ::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([role=dialog]):not([hidden])) {
70      pointer-events: auto;
71    }
72
73    :host(:not([${rn.AUDIO}])) *[part~=layer][part~=centered-layer] {
74      align-items: center;
75      justify-content: center;
76    }
77
78    :host(:not([${rn.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]),
79    :host(:not([${rn.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] {
80      align-self: stretch;
81      flex-grow: 1;
82    }
83
84    slot[name=middle-chrome] {
85      display: inline;
86      flex-grow: 1;
87      pointer-events: none;
88      background: none;
89    }
90
91    
92    ::slotted([slot=media]),
93    ::slotted([slot=poster]) {
94      width: 100%;
95      height: 100%;
96    }
97
98    
99    :host(:not([${rn.AUDIO}])) .spacer {
100      flex-grow: 1;
101    }
102
103    
104    :host(:-webkit-full-screen) {
105      
106      width: 100% !important;
107      height: 100% !important;
108    }
109
110    
111    ::slotted(:not([slot=media]):not([slot=poster]):not([${rn.NO_AUTOHIDE}]):not([hidden]):not([role=dialog])) {
112      opacity: 1;
113      transition: var(--media-control-transition-in, opacity 0.25s);
114    }
115
116    
117    :host([${rn.USER_INACTIVE}]:not([${ar.MEDIA_PAUSED}]):not([${ar.MEDIA_IS_AIRPLAYING}]):not([${ar.MEDIA_IS_CASTING}]):not([${rn.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${rn.NO_AUTOHIDE}]):not([role=dialog])) {
118      opacity: 0;
119      transition: var(--media-control-transition-out, opacity 1s);
120    }
121
122    :host([${rn.USER_INACTIVE}]:not([${rn.NO_AUTOHIDE}]):not([${ar.MEDIA_PAUSED}]):not([${ar.MEDIA_IS_CASTING}]):not([${rn.AUDIO}])) ::slotted([slot=media]) {
123      cursor: none;
124    }
125
126    :host([${rn.USER_INACTIVE}][${rn.AUTOHIDE_OVER_CONTROLS}]:not([${rn.NO_AUTOHIDE}]):not([${ar.MEDIA_PAUSED}]):not([${ar.MEDIA_IS_CASTING}]):not([${rn.AUDIO}])) * {
127     --media-cursor: none;
128     cursor: none;
129    }
130
131
132    ::slotted(media-control-bar)  {
133      align-self: stretch;
134    }
135
136    
137    :host(:not([${rn.AUDIO}])[${ar.MEDIA_HAS_PLAYED}]) slot[name=poster] {
138      display: none;
139    }
140
141    ::slotted([role=dialog]) {
142      width: 100%;
143      height: 100%;
144      align-self: center;
145    }
146
147    ::slotted([role=menu]) {
148      align-self: end;
149    }
150  </style>
151
152  <slot name="media" part="layer media-layer"></slot>
153  <slot name="poster" part="layer poster-layer"></slot>
154  <slot name="gestures-chrome" part="layer gesture-layer">
155    <media-gesture-receiver slot="gestures-chrome"></media-gesture-receiver>
156  </slot>
157  <span part="layer vertical-layer">
158    <slot name="top-chrome" part="top chrome"></slot>
159    <slot name="middle-chrome" part="middle chrome"></slot>
160    <slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot>
161    
162    <slot part="bottom chrome"></slot>
163  </span>
164  <slot name="dialog" part="layer dialog-layer"></slot>
165`;let ro=Object.values(ar);function rl(e,t){var i,a,r;if(!e.isConnected)return;let n=Object.fromEntries((null!=(i=e.getAttribute(rn.BREAKPOINTS))?i:"sm:384 md:576 lg:768 xl:960").split(/\s+/).map(e=>e.split(":"))),s=(a=n,r=t,Object.keys(a).filter(e=>r>=parseInt(a[e]))),o=!1;if(Object.keys(n).forEach(t=>{if(s.includes(t)){e.hasAttribute(`breakpoint${t}`)||(e.setAttribute(`breakpoint${t}`,""),o=!0);return}e.hasAttribute(`breakpoint${t}`)&&(e.removeAttribute(`breakpoint${t}`),o=!0)}),o){let t=new CustomEvent(an.BREAKPOINTS_CHANGE,{detail:s});e.dispatchEvent(t)}e.breakpointsComputed||(e.breakpointsComputed=!0,e.dispatchEvent(new CustomEvent(an.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}class rd extends ax.HTMLElement{constructor(){super(),ri(this,oF),ri(this,oY),ri(this,oj),ri(this,oZ),ri(this,oX),ri(this,o0),ri(this,oU,0),ri(this,oB,null),ri(this,oW,null),ri(this,oH,void 0),this.breakpointsComputed=!1,ri(this,oV,new MutationObserver(rr(this,oF,oq).bind(this))),ri(this,o$,!1),ri(this,oK,e=>{rt(this,o$)||(setTimeout(()=>{!function(e){rl(e.target,e.contentRect.width)}(e),ra(this,o$,!1)},0),ra(this,o$,!0))}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(rs.content.cloneNode(!0)));let e=this.querySelector(":scope > slot[slot=media]");e&&e.addEventListener("slotchange",()=>{if(!e.assignedElements({flatten:!0}).length){rt(this,oB)&&this.mediaUnsetCallback(rt(this,oB));return}this.handleMediaUpdated(this.media)})}static get observedAttributes(){return[rn.AUTOHIDE,rn.GESTURES_DISABLED].concat(ro).filter(e=>![ar.MEDIA_RENDITION_LIST,ar.MEDIA_AUDIO_TRACK_LIST,ar.MEDIA_CHAPTERS_CUES,ar.MEDIA_WIDTH,ar.MEDIA_HEIGHT,ar.MEDIA_ERROR,ar.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,t,i){e.toLowerCase()==rn.AUTOHIDE&&(this.autohide=i)}get media(){let e=this.querySelector(":scope > [slot=media]");return(null==e?void 0:e.nodeName)=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(ra(this,oB,e),e.localName.includes("-")&&await ax.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;rt(this,oV).observe(this,{childList:!0,subtree:!0}),aH(this,rt(this,oK));let t=null!=this.getAttribute(rn.AUDIO)?aS("audio player"):aS("video player");this.setAttribute("role","region"),this.setAttribute("aria-label",t),this.handleMediaUpdated(this.media),this.setAttribute(rn.USER_INACTIVE,""),rl(this,this.getBoundingClientRect().width),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),null==(e=ax.window)||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;rt(this,oV).disconnect(),aV(this,rt(this,oK)),this.media&&this.mediaUnsetCallback(this.media),null==(e=ax.window)||e.removeEventListener("mouseup",this)}mediaSetCallback(e){}mediaUnsetCallback(e){ra(this,oB,null)}handleEvent(e){switch(e.type){case"pointerdown":ra(this,oU,e.timeStamp);break;case"pointermove":rr(this,oY,oG).call(this,e);break;case"pointerup":rr(this,oj,oQ).call(this,e);break;case"mouseleave":rr(this,oZ,oz).call(this);break;case"mouseup":this.removeAttribute(rn.KEYBOARD_CONTROL);break;case"keyup":rr(this,o0,o1).call(this),this.setAttribute(rn.KEYBOARD_CONTROL,"")}}set autohide(e){let t=Number(e);ra(this,oH,isNaN(t)?0:t)}get autohide(){return(void 0===rt(this,oH)?2:rt(this,oH)).toString()}get breakpoints(){return a3(this,rn.BREAKPOINTS)}set breakpoints(e){a4(this,rn.BREAKPOINTS,e)}get audio(){return a1(this,rn.AUDIO)}set audio(e){a2(this,rn.AUDIO,e)}get gesturesDisabled(){return a1(this,rn.GESTURES_DISABLED)}set gesturesDisabled(e){a2(this,rn.GESTURES_DISABLED,e)}get keyboardControl(){return a1(this,rn.KEYBOARD_CONTROL)}set keyboardControl(e){a2(this,rn.KEYBOARD_CONTROL,e)}get noAutohide(){return a1(this,rn.NO_AUTOHIDE)}set noAutohide(e){a2(this,rn.NO_AUTOHIDE,e)}get autohideOverControls(){return a1(this,rn.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){a2(this,rn.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return a1(this,rn.USER_INACTIVE)}set userInteractive(e){a2(this,rn.USER_INACTIVE,e)}}oU=new WeakMap,oB=new WeakMap,oW=new WeakMap,oH=new WeakMap,oV=new WeakMap,oF=new WeakSet,oq=function(e){let t=this.media;for(let i of e)if("childList"===i.type){for(let e of i.removedNodes
165){if("media"!=e.slot||i.target!=this)continue;let a=i.previousSibling&&i.previousSibling.previousElementSibling;if(a&&t){let t="media"!==a.slot;for(;null!==(a=a.previousSibling);)"media"==a.slot&&(t=!1);t&&this.mediaUnsetCallback(e)}else this.mediaUnsetCallback(e)}if(t)for(let e of i.addedNodes)e===t&&this.handleMediaUpdated(t)}},o$=new WeakMap,oK=new WeakMap,oY=new WeakSet,oG=function(e){if("mouse"!==e.pointerType&&e.timeStamp-rt(this,oU)<250)return;rr(this,oX,oJ).call(this),clearTimeout(rt(this,oW));let t=this.hasAttribute(rn.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(e.target)||t)&&rr(this,o0,o1).call(this)},oj=new WeakSet,oQ=function(e){if("touch"===e.pointerType){let t=!this.hasAttribute(rn.USER_INACTIVE);[this,this.media].includes(e.target)&&t?rr(this,oZ,oz).call(this):rr(this,o0,o1).call(this)}else e.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(null==e?void 0:e.localName))&&rr(this,o0,o1).call(this)},oZ=new WeakSet,oz=function(){if(0>rt(this,oH)||this.hasAttribute(rn.USER_INACTIVE))return;this.setAttribute(rn.USER_INACTIVE,"");let e=new ax.CustomEvent(an.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(e)},oX=new WeakSet,oJ=function(){if(!this.hasAttribute(rn.USER_INACTIVE))return;this.removeAttribute(rn.USER_INACTIVE);let e=new ax.CustomEvent(an.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(e)},o0=new WeakSet,o1=function(){rr(this,oX,oJ).call(this),clearTimeout(rt(this,oW));let e=parseInt(this.autohide);e<0||ra(this,oW,setTimeout(()=>{rr(this,oZ,oz).call(this)},1e3*e))},ax.customElements.get("media-container")||ax.customElements.define("media-container",rd);var ru=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},rc=(e,t,i)=>(ru(e,t,"read from private field"),i?i.call(e):t.get(e)),rh=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},rm=(e,t,i,a)=>(ru(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class rp{constructor(e,t,{defaultValue:i}={defaultValue:void 0}){rh(this,o9),rh(this,o2,void 0),rh(this,o3,void 0),rh(this,o4,void 0),rh(this,o5,new Set),rm(this,o2,e),rm(this,o3,t),rm(this,o4,new Set(i))}[Symbol.iterator](){return rc(this,o9,o8).values()}get length(){return rc(this,o9,o8).size}get value(){var e;return null!=(e=[...rc(this,o9,o8)].join(" "))?e:""}set value(e){var t;e!==this.value&&(rm(this,o5,new Set),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return[...rc(this,o9,o8)][e]}values(){return rc(this,o9,o8).values()}forEach(e,t){rc(this,o9,o8).forEach(e,t)}add(...e){var t,i;e.forEach(e=>rc(this,o5).add(e)),(""!==this.value||(null==(t=rc(this,o2))?void 0:t.hasAttribute(`${rc(this,o3)}`)))&&(null==(i=rc(this,o2))||i.setAttribute(`${rc(this,o3)}`,`${this.value}`))}remove(...e){var t;e.forEach(e=>rc(this,o5).delete(e)),null==(t=rc(this,o2))||t.setAttribute(`${rc(this,o3)}`,`${this.value}`)}contains(e){return rc(this,o9,o8).has(e)}toggle(e,t){if(void 0!==t)if(t)return this.add(e),!0;else return this.remove(e),!1;return this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){return this.remove(e),this.add(t),e===t}}o2=new WeakMap,o3=new WeakMap,o4=new WeakMap,o5=new WeakMap,o9=new WeakSet,o8=function(){return rc(this,o5).size?rc(this,o5):rc(this,o4)};let rv=(e="")=>{let[t,i,a]=e.split(":"),r=a?decodeURIComponent(a):void 0;return{kind:"cc"===t?ao.CAPTIONS:ao.SUBTITLES,language:i,label:r}},rE=(e="",t={})=>((e="")=>e.split(/\s+/))(e).map(e=>{let i=rv(e);return{...t,...i}}),rb=e=>e?Array.isArray(e)?e.map(e=>"string"==typeof e?rv(e):e):"string"==typeof e?rE(e):[e]:[],rf=({kind:e,label:t,language:i}={kind:"subtitles"})=>t?`${"captions"===e?"cc":"sb"}:${i}:${encodeURIComponent(t)}`:i,rg=(e=[])=>Array.prototype.map.call(e,rf).join(" "),r_=e=>{let t=Object.entries(e).map(([e,t])=>i=>i[e]===t);return e=>t.every(t=>t(e))},ry=(e,t=[],i=[])=>{let a=rb(i).map(r_);Array.from(t).filter(e=>a.some(t=>t(e))).forEach(t=>{t.mode=e})},rT=(e,t=()=>!0)=>{if(!(null==e?void 0:e.textTracks))return[];let i="function"==typeof t?t:r_(t);return Array.from(e.textTracks).filter(i)},rA=e=>{var t;return!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)||e.hasAttribute(ar.MEDIA_SUBTITLES_SHOWING)},rk="exitFullscreen"in aP?"exitFullscreen":"webkitExitFullscreen"in aP?"webkitExitFullscreen":"webkitCancelFullScreen"in aP?"webkitCancelFullScreen":void 0,rw="fullscreenElement"in aP?"fullscreenElement":"webkitFullscreenElement"in aP?"webkitFullscreenElement":void 0,rS="fullscreenEnabled"in aP?"fullscreenEnabled":"webkitFullscreenEnabled"in aP?"webkitFullscreenEnabled":void 0,rI=()=>{var e;return a||(a=null==(e=null==aP?void 0:aP.createElement)?void 0:e.call(aP,"video"))},rR=async(e=rI())=>{if(!e)return!1;let t=e.volume;
165e.volume=t/2+.1;let i=new AbortController,a=await Promise.race([rC(e,i.signal),rD(e,t)]);return i.abort(),a},rC=(e,t)=>new Promise(i=>{e.addEventListener("volumechange",()=>i(!0),{signal:t})}),rD=async(e,t)=>{for(let i=0;i<10;i++){if(e.volume===t)return!1;await ag(10)}return e.volume!==t},rL=/.*Version\/.*Safari\/.*/.test(ax.navigator.userAgent),rM=(e=rI())=>(!ax.matchMedia("(display-mode: standalone)").matches||!rL)&&"function"==typeof(null==e?void 0:e.requestPictureInPicture),rO=(e=rI())=>(e=>{let{documentElement:t,media:i}=e;return!!(null==t?void 0:t[rS])||i&&"webkitSupportsFullscreen"in i})({documentElement:aP,media:e}),rN=rO(),rx=rM(),rP=!!ax.WebKitPlaybackTargetAvailabilityEvent,rU=!!ax.chrome,rB=e=>rT(e.media,e=>[ao.SUBTITLES,ao.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),rW=e=>rT(e.media,e=>e.mode===al.SHOWING&&[ao.SUBTITLES,ao.CAPTIONS].includes(e.kind)),rH=(e,t)=>{let i=rB(e),a=rW(e),r=!!a.length;if(i.length){if(!1===t||r&&!0!==t)ry(al.DISABLED,i,a);else if(!0===t||!r&&!1!==t){let t=i[0],{options:r}=e;if(!(null==r?void 0:r.noSubtitlesLangPref)){let e=globalThis.localStorage.getItem("media-chrome-pref-subtitles-lang"),a=e?[e,...globalThis.navigator.languages]:globalThis.navigator.languages,r=i.filter(e=>a.some(t=>e.language.toLowerCase().startsWith(t.split("-")[0]))).sort((e,t)=>a.findIndex(t=>e.language.toLowerCase().startsWith(t.split("-")[0]))-a.findIndex(e=>t.language.toLowerCase().startsWith(e.split("-")[0])));r[0]&&(t=r[0])}let{language:n,label:s,kind:o}=t;ry(al.DISABLED,i,a),ry(al.SHOWING,i,[{language:n,label:s,kind:o}])}}},rV=(e,t)=>e===t||null!=e&&null!=t&&typeof e==typeof t&&(!!("number"==typeof e&&Number.isNaN(e)&&Number.isNaN(t))||"object"==typeof e&&(Array.isArray(e)?rF(e,t):Object.entries(e).every(([e,i])=>e in t&&rV(i,t[e])))),rF=(e,t)=>{let i=Array.isArray(e),a=Array.isArray(t);return i===a&&(!i&&!a||e.length===t.length&&e.every((e,i)=>rV(e,t[i])))},rq=Object.values(ac),r$=rR().then(e=>r=e),rK=async(...e)=>{await Promise.all(e.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof ax.HTMLElement))return;let t=e.localName;if(!t.includes("-"))return;let i=ax.customElements.get(t);i&&e instanceof i||(await ax.customElements.whenDefined(t),ax.customElements.upgrade(e))}))},rY={mediaError:{get(e,t){let{media:i}=e;if((null==t?void 0:t.type)!=="playing")return null==i?void 0:i.error},mediaEvents:["emptied","error","playing"]},mediaErrorCode:{get(e,t){var i;let{media:a}=e;if((null==t?void 0:t.type)!=="playing")return null==(i=null==a?void 0:a.error)?void 0:i.code},mediaEvents:["emptied","error","playing"]},mediaErrorMessage:{get(e,t){var i,a;let{media:r}=e;if((null==t?void 0:t.type)!=="playing")return null!=(a=null==(i=null==r?void 0:r.error)?void 0:i.message)?a:""},mediaEvents:["emptied","error","playing"]},mediaWidth:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.videoWidth)?t:0},mediaEvents:["resize"]},mediaHeight:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.videoHeight)?t:0},mediaEvents:["resize"]},mediaPaused:{get(e){var t;let{media:i}=e;return null==(t=null==i?void 0:i.paused)||t},set(e,t){var i;let{media:a}=t;a&&(e?a.pause():null==(i=a.play())||i.catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(e,t){let{media:i}=e;return!!i&&(t?"playing"===t.type:!i.paused)},mediaEvents:["playing","emptied"]},mediaEnded:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.ended)&&t},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.playbackRate)?t:1},set(e,t){let{media:i}=t;i&&Number.isFinite(+e)&&(i.playbackRate=+e)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.muted)&&t},set(e,t){let{media:i}=t;if(i){try{ax.localStorage.setItem("media-chrome-pref-muted",e?"true":"false")}catch(e){console.debug("Error setting muted pref",e)}i.muted=e}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(e,t)=>{let{options:{noMutedPref:i}}=t,{media:a}=t;
165if(a&&!a.muted&&!i)try{let i="true"===ax.localStorage.getItem("media-chrome-pref-muted");rY.mediaMuted.set(i,t),e(i)}catch(e){console.debug("Error getting muted pref",e)}}]},mediaVolume:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.volume)?t:1},set(e,t){let{media:i}=t;if(i){try{null==e?ax.localStorage.removeItem("media-chrome-pref-volume"):ax.localStorage.setItem("media-chrome-pref-volume",e.toString())}catch(e){console.debug("Error setting volume pref",e)}Number.isFinite(+e)&&(i.volume=+e)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(e,t)=>{let{options:{noVolumePref:i}}=t;if(!i)try{let{media:i}=t;if(!i)return;let a=ax.localStorage.getItem("media-chrome-pref-volume");if(null==a)return;rY.mediaVolume.set(+a,t),e(+a)}catch(e){console.debug("Error getting volume pref",e)}}]},mediaVolumeLevel:{get(e){let{media:t}=e;return void 0===(null==t?void 0:t.volume)?"high":t.muted||0===t.volume?"off":t.volume<.5?"low":t.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.currentTime)?t:0},set(e,t){let{media:i}=t;i&&ab(e)&&(i.currentTime=e)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(e){let{media:t,options:{defaultDuration:i}={}}=e;return i&&(!t||!t.duration||Number.isNaN(t.duration)||!Number.isFinite(t.duration))?i:Number.isFinite(null==t?void 0:t.duration)?t.duration:NaN},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(e){let{media:t}=e;return(null==t?void 0:t.readyState)<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(e){var t;let{media:i}=e;if(!(null==(t=null==i?void 0:i.seekable)?void 0:t.length))return;let a=i.seekable.start(0),r=i.seekable.end(i.seekable.length-1);if(a||r)return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get(e){var t;let{media:i}=e,a=null!=(t=null==i?void 0:i.buffered)?t:[];return Array.from(a).map((e,t)=>[Number(a.start(t).toFixed(3)),Number(a.end(t).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(e){let{media:t,options:{defaultStreamType:i}={}}=e,a=[ac.LIVE,ac.ON_DEMAND].includes(i)?i:void 0;if(!t)return a;let{streamType:r}=t;if(rq.includes(r))return r===ac.UNKNOWN?a:r;let n=t.duration;return n===1/0?ac.LIVE:Number.isFinite(n)?ac.ON_DEMAND:a},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(e){let{media:t}=e;if(!t)return NaN;let{targetLiveWindow:i}=t,a=rY.mediaStreamType.get(e);return(null==i||Number.isNaN(i))&&a===ac.LIVE?0:i},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(e){let{media:t,options:{liveEdgeOffset:i=10}={}}=e;if(!t)return!1;if("number"==typeof t.liveEdgeStart)return!Number.isNaN(t.liveEdgeStart)&&t.currentTime>=t.liveEdgeStart;if(rY.mediaStreamType.get(e)!==ac.LIVE)return!1;let a=t.seekable;if(!a)return!0;if(!a.length)return!1;let r=a.end(a.length-1)-i;return t.currentTime>=r},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get:e=>rB(e).map(({kind:e,label:t,language:i})=>({kind:e,label:t,language:i})),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get:e=>rW(e).map(({kind:e,label:t,language:i})=>({kind:e,label:t,language:i})),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(e,t)=>{var i,a;let{media:r,options:n}=t;if(!r)return;let s=e=>{var i;n.defaultSubtitles&&(e&&![ao.CAPTIONS,ao.SUBTITLES].includes(null==(i=null==e?void 0:e.track)?void 0:i.kind)||rH(t,!0))};return r.addEventListener("loadstart",s),null==(i=r.textTracks)||i.addEventListener("addtrack",s),null==(a=r.textTracks)||a.addEventListener("removetrack",s),()=>{var e,t;r.removeEventListener("loadstart",s),null==(e=r.textTracks)||e.removeEventListener("addtrack",s),null==(t=r.textTracks)||t.removeEventListener("removetrack",s)}}]},mediaChaptersCues:{get(e){var t;let{media:i}=e;if(!i)return[];let[a]=rT(i,{kind:ao.CHAPTERS});return Array.from(null!=(t=null==a?void 0:a.cues)?t:[]).map(({text:e,startTime:t,endTime:i})=>({text:e,startTime:t,endTime:i}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(e,t)=>{var i;let{media:a}=t;if(!a)return;let r=a.querySelector('track[kind="chapters"][default][src]'),n=null==(i=a.shadowRoot)?void 0:i.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return null==r||r.addEventListener("load",e),null==n||n.addEventListener("load",e),()=>{null==r||r.removeEventListener("load",e),null==n||n.removeEventListener("load",e)}}]},mediaIsPip:{get(e){var t,i;let{media:a,documentElement:r}=e;if(!a||!r||!r.pictureInPictureElement)return!1;if(r.pictureInPictureElement===a)return!0;
165if(r.pictureInPictureElement instanceof HTMLMediaElement)return!!(null==(t=a.localName)?void 0:t.includes("-"))&&aY(a,r.pictureInPictureElement);if(r.pictureInPictureElement.localName.includes("-")){let e=r.pictureInPictureElement.shadowRoot;for(;null==e?void 0:e.pictureInPictureElement;){if(e.pictureInPictureElement===a)return!0;e=null==(i=e.pictureInPictureElement)?void 0:i.shadowRoot}}return!1},set(e,t){let{media:i}=t;if(i)if(e){if(!aP.pictureInPictureEnabled)return void console.warn("MediaChrome: Picture-in-picture is not enabled");if(!i.requestPictureInPicture)return void console.warn("MediaChrome: The current media does not support picture-in-picture");let e=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(t=>{if(11===t.code){if(!i.src)return void console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.");if(0===i.readyState&&"none"===i.preload){let t=()=>{i.removeEventListener("loadedmetadata",a),i.preload="none"},a=()=>{i.requestPictureInPicture().catch(e),t()};i.addEventListener("loadedmetadata",a),i.preload="metadata",setTimeout(()=>{0===i.readyState&&e(),t()},1e3)}else throw t}else throw t})}else aP.pictureInPictureElement&&aP.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(e){var t;let{media:i}=e;return[...null!=(t=null==i?void 0:i.videoRenditions)?t:[]].map(e=>({...e}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(e){var t,i,a;let{media:r}=e;return null==(a=null==(i=null==r?void 0:r.videoRenditions)?void 0:i[null==(t=r.videoRenditions)?void 0:t.selectedIndex])?void 0:a.id},set(e,t){let{media:i}=t;if(!(null==i?void 0:i.videoRenditions))return void console.warn("MediaController: Rendition selection not supported by this media.");let a=Array.prototype.findIndex.call(i.videoRenditions,t=>t.id==e);i.videoRenditions.selectedIndex!=a&&(i.videoRenditions.selectedIndex=a)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(e){var t;let{media:i}=e;return[...null!=(t=null==i?void 0:i.audioTracks)?t:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(e){var t,i;let{media:a}=e;return null==(i=[...null!=(t=null==a?void 0:a.audioTracks)?t:[]].find(e=>e.enabled))?void 0:i.id},set(e,t){let{media:i}=t;if(!(null==i?void 0:i.audioTracks))return void console.warn("MediaChrome: Audio track selection not supported by this media.");for(let t of i.audioTracks)t.enabled=e==t.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get:e=>(e=>{var t;let{media:i,documentElement:a,fullscreenElement:r=i}=e;if(!i||!a)return!1;let n=(e=>{let{documentElement:t,media:i}=e,a=null==t?void 0:t[rw];return!a&&"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&i.webkitDisplayingFullscreen&&i.webkitPresentationMode===ah.FULLSCREEN?i:a})(e);if(!n)return!1;if(n===r||n===i)return!0;if(n.localName.includes("-")){let e=n.shadowRoot;if(!(rw in e))return aY(n,r);for(;null==e?void 0:e[rw];){if(e[rw]===r)return!0;e=null==(t=e[rw])?void 0:t.shadowRoot}}return!1})(e),set(e,t){e?(e=>{var t;let{media:i,fullscreenElement:a}=e;try{let e=a&&"requestFullscreen"in a?"requestFullscreen":a&&"webkitRequestFullScreen"in a?"webkitRequestFullScreen":void 0;if(e){let i=null==(t=a[e])?void 0:t.call(a);if(i instanceof Promise)return i.catch(()=>{})}else(null==i?void 0:i.webkitEnterFullscreen)?i.webkitEnterFullscreen():(null==i?void 0:i.requestFullscreen)&&i.requestFullscreen()}catch(e){console.error(e)}})(t):(e=>{var t;let{documentElement:i}=e;if(rk){let e=null==(t=null==i?void 0:i[rk])?void 0:t.call(i);if(e instanceof Promise)return e.catch(()=>{})}})(t)},rootEvents:["fullscreenchange","webkitfullscreenchange"],mediaEvents:["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"]},mediaIsCasting:{get(e){var t;let{media:i}=e;return!!(null==i?void 0:i.remote)&&(null==(t=i.remote)?void 0:t.state)!=="disconnected"&&!!i.remote.state},set(e,t){var i,a;let{media:r}=t;if(r&&(!e||(null==(i=r.remote)?void 0:i.state)==="disconnected")&&(e||(null==(a=r.remote)?void 0:a.state)==="connected")){if("function"!=typeof r.remote.prompt)return void console.warn("MediaChrome: Casting is not supported in this environment");r.remote.prompt().catch(()=>{})}},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get:()=>!1,set(e,t){let{media:i}=t;if(i){if(!(i.webkitShowPlaybackTargetPicker&&ax.WebKitPlaybackTargetAvailabilityEvent))return void console.error("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment");i.webkitShowPlaybackTargetPicker()}},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(e){let{media:t}=e;if(!rN||!rO(t))return au.UNSUPPORTED}},mediaPipUnavailable:{get(e){let{media:t}=e;if(!rx||!rM(t))return au.UNSUPPORTED}},mediaVolumeUnavailable:{get(e){let{media:t}=e;if(!1===r||(null==t?void 0:t.volume)==void 0)return au.UNSUPPORTED},stateOwnersUpdateHandlers:[e=>{null==r&&r$.then(t=>e(t?void 0:au.UNSUPPORTED))}]},mediaCastUnavailable:{get(e,{availability:t="not-available"}={}){var i;let{media:a}=e;
165return rU&&(null==(i=null==a?void 0:a.remote)?void 0:i.state)?null!=t&&"available"!==t?au.UNAVAILABLE:void 0:au.UNSUPPORTED},stateOwnersUpdateHandlers:[(e,t)=>{var i;let{media:a}=t;if(a)return a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||null==(i=null==a?void 0:a.remote)||i.watchAvailability(t=>{e({availability:t?"available":"not-available"})}).catch(t=>{"NotSupportedError"===t.name?e({availability:null}):e({availability:"not-available"})}),()=>{var e;null==(e=null==a?void 0:a.remote)||e.cancelWatchAvailability().catch(()=>{})}}]},mediaAirplayUnavailable:{get:(e,t)=>rP?(null==t?void 0:t.availability)==="not-available"?au.UNAVAILABLE:void 0:au.UNSUPPORTED,mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(e,t)=>{var i;let{media:a}=t;if(a)return a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||null==(i=null==a?void 0:a.remote)||i.watchAvailability(t=>{e({availability:t?"available":"not-available"})}).catch(t=>{"NotSupportedError"===t.name?e({availability:null}):e({availability:"not-available"})}),()=>{var e;null==(e=null==a?void 0:a.remote)||e.cancelWatchAvailability().catch(()=>{})}}]},mediaRenditionUnavailable:{get(e){var t;let{media:i}=e;return(null==i?void 0:i.videoRenditions)?(null==(t=i.videoRenditions)?void 0:t.length)?void 0:au.UNAVAILABLE:au.UNSUPPORTED},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(e){var t,i;let{media:a}=e;return(null==a?void 0:a.audioTracks)?(null!=(i=null==(t=a.audioTracks)?void 0:t.length)?i:0)<=1?au.UNAVAILABLE:void 0:au.UNSUPPORTED},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]}},rG={[ae.MEDIA_PREVIEW_REQUEST](e,t,{detail:i}){var a,r,n;let s,o,{media:l}=t,d=null!=i?i:void 0;if(l&&null!=d){let[e]=rT(l,{kind:ao.METADATA,label:"thumbnails"}),t=Array.prototype.find.call(null!=(a=null==e?void 0:e.cues)?a:[],(e,t,i)=>0===t?e.endTime>d:t===i.length-1?e.startTime<=d:e.startTime<=d&&e.endTime>d);if(t){let e=/'^(?:[a-z]+:)?\/\//i.test(t.text)||null==(r=null==l?void 0:l.querySelector('track[label="thumbnails"]'))?void 0:r.src,i=new URL(t.text,e);o=new URLSearchParams(i.hash).get("#xywh").split(",").map(e=>+e),s=i.href}}let u=e.mediaDuration.get(t),c=null==(n=e.mediaChaptersCues.get(t).find((e,t,i)=>t===i.length-1&&u===e.endTime?e.startTime<=d&&e.endTime>=d:e.startTime<=d&&e.endTime>d))?void 0:n.text;return null!=i&&null==c&&(c=""),{mediaPreviewTime:d,mediaPreviewImage:s,mediaPreviewCoords:o,mediaPreviewChapter:c}},[ae.MEDIA_PAUSE_REQUEST](e,t){e.mediaPaused.set(!0,t)},[ae.MEDIA_PLAY_REQUEST](e,t){var i,a,r,n;let s=e.mediaStreamType.get(t)===ac.LIVE,o=!(null==(i=t.options)?void 0:i.noAutoSeekToLive),l=e.mediaTargetLiveWindow.get(t)>0;if(s&&o&&!l){let i=null==(a=e.mediaSeekable.get(t))?void 0:a[1];if(i){let a=null!=(n=null==(r=t.options)?void 0:r.seekToLiveOffset)?n:0;e.mediaCurrentTime.set(i-a,t)}}e.mediaPaused.set(!1,t)},[ae.MEDIA_PLAYBACK_RATE_REQUEST](e,t,{detail:i}){e.mediaPlaybackRate.set(i,t)},[ae.MEDIA_MUTE_REQUEST](e,t){e.mediaMuted.set(!0,t)},[ae.MEDIA_UNMUTE_REQUEST](e,t){e.mediaVolume.get(t)||e.mediaVolume.set(.25,t),e.mediaMuted.set(!1,t)},[ae.MEDIA_VOLUME_REQUEST](e,t,{detail:i}){i&&e.mediaMuted.get(t)&&e.mediaMuted.set(!1,t),e.mediaVolume.set(i,t)},[ae.MEDIA_SEEK_REQUEST](e,t,{detail:i}){e.mediaCurrentTime.set(i,t)},[ae.MEDIA_SEEK_TO_LIVE_REQUEST](e,t){var i,a,r;let n=null==(i=e.mediaSeekable.get(t))?void 0:i[1];if(Number.isNaN(Number(n)))return;let s=null!=(r=null==(a=t.options)?void 0:a.seekToLiveOffset)?r:0;e.mediaCurrentTime.set(n-s,t)},[ae.MEDIA_SHOW_SUBTITLES_REQUEST](e,t,{detail:i}){var a;let{options:r}=t,n=rB(t),s=rb(i),o=null==(a=s[0])?void 0:a.language;o&&!r.noSubtitlesLangPref&&ax.localStorage.setItem("media-chrome-pref-subtitles-lang",o),ry(al.SHOWING,n,s)},[ae.MEDIA_DISABLE_SUBTITLES_REQUEST](e,t,{detail:i}){let a=rB(t);ry(al.DISABLED,a,null!=i?i:[])},[ae.MEDIA_TOGGLE_SUBTITLES_REQUEST](e,t,{detail:i}){rH(t,i)},[ae.MEDIA_RENDITION_REQUEST](e,t,{detail:i}){e.mediaRenditionSelected.set(i,t)},[ae.MEDIA_AUDIO_TRACK_REQUEST](e,t,{detail:i}){e.mediaAudioTrackEnabled.set(i,t)},[ae.MEDIA_ENTER_PIP_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsPip.set(!0,t)},[ae.MEDIA_EXIT_PIP_REQUEST](e,t){e.mediaIsPip.set(!1,t)},[ae.MEDIA_ENTER_FULLSCREEN_REQUEST](e,t){e.mediaIsPip.get(t)&&e.mediaIsPip.set(!1,t),e.mediaIsFullscreen.set(!0,t)},[ae.MEDIA_EXIT_FULLSCREEN_REQUEST](e,t){e.mediaIsFullscreen.set(!1,t)},[ae.MEDIA_ENTER_CAST_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsCasting.set(!0,t)},[ae.MEDIA_EXIT_CAST_REQUEST](e,t){e.mediaIsCasting.set(!1,t)},[ae.MEDIA_AIRPLAY_REQUEST](e,t){e.mediaIsAirplaying.set(!0,t)}};var rj=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},rQ=(e,t,i)=>(rj(e,t,"read from private field"),i?i.call(e):t.get(e)),rZ=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)}
165,rz=(e,t,i,a)=>(rj(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),rX=(e,t,i)=>(rj(e,t,"access private method"),i);let rJ=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],r0={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",DEFAULT_DURATION:"defaultduration",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYS_USED:"keysused",LIVE_EDGE_OFFSET:"liveedgeoffset",SEEK_TO_LIVE_OFFSET:"seektoliveoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_HOTKEYS:"nohotkeys",NO_VOLUME_PREF:"novolumepref",NO_SUBTITLES_LANG_PREF:"nosubtitleslangpref",NO_DEFAULT_STORE:"nodefaultstore",KEYBOARD_FORWARD_SEEK_OFFSET:"keyboardforwardseekoffset",KEYBOARD_BACKWARD_SEEK_OFFSET:"keyboardbackwardseekoffset",LANG:"lang"};class r1 extends rd{constructor(){super(),rZ(this,lr),rZ(this,ls),rZ(this,ll),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,rZ(this,o6,new rp(this,r0.HOTKEYS)),rZ(this,o7,void 0),rZ(this,le,void 0),rZ(this,lt,void 0),rZ(this,li,void 0),rZ(this,la,e=>{var t;null==(t=rQ(this,le))||t.dispatch(e)}),this.associateElement(this);let e={};rz(this,lt,t=>{Object.entries(t).forEach(([t,i])=>{if(t in e&&e[t]===i)return;this.propagateMediaState(t,i);let a=t.toLowerCase(),r=new ax.CustomEvent(as[a],{composed:!0,detail:i});this.dispatchEvent(r)}),e=t}),this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(r0.NO_HOTKEYS,r0.HOTKEYS,r0.DEFAULT_STREAM_TYPE,r0.DEFAULT_SUBTITLES,r0.DEFAULT_DURATION,r0.LANG)}get mediaStore(){return rQ(this,le)}set mediaStore(e){var t,i;if(rQ(this,le)&&(null==(t=rQ(this,li))||t.call(this),rz(this,li,void 0)),rz(this,le,e),!rQ(this,le)&&!this.hasAttribute(r0.NO_DEFAULT_STORE))return void rX(this,lr,ln).call(this);rz(this,li,null==(i=rQ(this,le))?void 0:i.subscribe(rQ(this,lt)))}get fullscreenElement(){var e;return null!=(e=rQ(this,o7))?e:this}set fullscreenElement(e){var t;this.hasAttribute(r0.FULLSCREEN_ELEMENT)&&this.removeAttribute(r0.FULLSCREEN_ELEMENT),rz(this,o7,e),null==(t=rQ(this,le))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return a1(this,r0.DEFAULT_SUBTITLES)}set defaultSubtitles(e){a2(this,r0.DEFAULT_SUBTITLES,e)}get defaultStreamType(){return a3(this,r0.DEFAULT_STREAM_TYPE)}set defaultStreamType(e){a4(this,r0.DEFAULT_STREAM_TYPE,e)}get defaultDuration(){return aJ(this,r0.DEFAULT_DURATION)}set defaultDuration(e){a0(this,r0.DEFAULT_DURATION,e)}get noHotkeys(){return a1(this,r0.NO_HOTKEYS)}set noHotkeys(e){a2(this,r0.NO_HOTKEYS,e)}get keysUsed(){return a3(this,r0.KEYS_USED)}set keysUsed(e){a4(this,r0.KEYS_USED,e)}get liveEdgeOffset(){return aJ(this,r0.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){a0(this,r0.LIVE_EDGE_OFFSET,e)}get noAutoSeekToLive(){return a1(this,r0.NO_AUTO_SEEK_TO_LIVE)}set noAutoSeekToLive(e){a2(this,r0.NO_AUTO_SEEK_TO_LIVE,e)}get noVolumePref(){return a1(this,r0.NO_VOLUME_PREF)}set noVolumePref(e){a2(this,r0.NO_VOLUME_PREF,e)}get noSubtitlesLangPref(){return a1(this,r0.NO_SUBTITLES_LANG_PREF)}set noSubtitlesLangPref(e){a2(this,r0.NO_SUBTITLES_LANG_PREF,e)}get noDefaultStore(){return a1(this,r0.NO_DEFAULT_STORE)}set noDefaultStore(e){a2(this,r0.NO_DEFAULT_STORE,e)}attributeChangedCallback(e,t,i){var a,r,n,s,o,l,d,u;if(super.attributeChangedCallback(e,t,i),e===r0.NO_HOTKEYS)i!==t&&""===i?(this.hasAttribute(r0.HOTKEYS)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):i!==t&&null===i&&this.enableHotkeys();else if(e===r0.HOTKEYS)rQ(this,o6).value=i;else if(e===r0.DEFAULT_SUBTITLES&&i!==t)null==(a=rQ(this,le))||a.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(r0.DEFAULT_SUBTITLES)}});else if(e===r0.DEFAULT_STREAM_TYPE)null==(n=rQ(this,le))||n.dispatch({type:"optionschangerequest",detail:{defaultStreamType:null!=(r=this.getAttribute(r0.DEFAULT_STREAM_TYPE))?r:void 0}});else if(e===r0.LIVE_EDGE_OFFSET)null==(s=rQ(this,le))||s.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(r0.LIVE_EDGE_OFFSET)?+this.getAttribute(r0.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(r0.SEEK_TO_LIVE_OFFSET)?void 0:+this.getAttribute(r0.LIVE_EDGE_OFFSET)}});else if(e===r0.SEEK_TO_LIVE_OFFSET)null==(o=rQ(this,le))||o.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(r0.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(r0.SEEK_TO_LIVE_OFFSET):void 0}});else if(e===r0.NO_AUTO_SEEK_TO_LIVE)null==(l=rQ(this,le))||l.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(r0.NO_AUTO_SEEK_TO_LIVE)}});else if(e===r0.FULLSCREEN_ELEMENT){let e=i?null==(d=this.getRootNode())?void 0:d.getElementById(i):void 0;rz(this,o7,e),null==(u=rQ(this,le))||u.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===r0.LANG&&i!==t&&(aw=i)}connectedCallback(){var e,t;rQ(this,le)||this.hasAttribute(r0.NO_DEFAULT_STORE)||rX(this,lr,ln).call(this),null==(e=rQ(this,le))||e.dispatch({type:"documentelementchangerequest",detail:aP}),super.connectedCallback(),rQ(this,le)&&!rQ(this,li)&&rz(this,li,null==(t=rQ(this,le))?void 0:t.subscribe(rQ(this,lt))),this.enableHotkeys()}disconnectedCallback(){var e,t,i,a;null==(e=super.disconnectedCallback)||e.call(this),rQ(this,le)&&(null==(t=rQ(this,le))||t.dispatch({type:"documentelementchangerequest",detail:void 0}),null==(i=rQ(this,le))||i.dispatch({type:ae.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})),rQ(this,li)&&(null==(a=rQ(this,li))||a.call(this),rz(this,li,void 0))}mediaSetCallback(e){var t;super.mediaSetCallback(e),null==(t=rQ(this,le))||t.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var t;super.mediaUnsetCallback(e),null==(t=rQ(this,le))||t.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,t){ne(this.mediaStateReceivers,e,t)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(t.has(e))return;let i=nt(e,this.registerMediaStateReceiver.bind(this),this.unregisterMediaStateReceiver.bind(this));Object.values(ae).forEach(t=>{e.addEventListener(t,rQ(this,la))}),t.set(e,i)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;t.has(e)&&(t.get(e)(),t.delete(e),Object.values(ae).forEach(t=>{e.removeEventListener(t,rQ(this,la))}))}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;!(t.indexOf(e)>-1)&&(t.push(e),rQ(this,le)&&Object.entries(rQ(this,le).getState()).forEac
165h(([t,i])=>{ne([e],t,i)}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,i=t.indexOf(e);i<0||t.splice(i,1)}enableHotkeys(){this.addEventListener("keydown",rX(this,ll,ld))}disableHotkeys(){this.removeEventListener("keydown",rX(this,ll,ld)),this.removeEventListener("keyup",rX(this,ls,lo))}get hotkeys(){return a3(this,r0.HOTKEYS)}set hotkeys(e){a4(this,r0.HOTKEYS,e)}keyboardShortcutHandler(e){var t,i,a,r,n;let s,o,l,d=e.target;if(!((null!=(a=null!=(i=null==(t=d.getAttribute(r0.KEYS_USED))?void 0:t.split(" "))?i:null==d?void 0:d.keysUsed)?a:[]).map(e=>"Space"===e?" ":e).filter(Boolean).includes(e.key)||rQ(this,o6).contains(`no${e.key.toLowerCase()}`))&&!(" "===e.key&&rQ(this,o6).contains("nospace")))switch(e.key){case" ":case"k":s=rQ(this,le).getState().mediaPaused?ae.MEDIA_PLAY_REQUEST:ae.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new ax.CustomEvent(s,{composed:!0,bubbles:!0}));break;case"m":s="off"===this.mediaStore.getState().mediaVolumeLevel?ae.MEDIA_UNMUTE_REQUEST:ae.MEDIA_MUTE_REQUEST,this.dispatchEvent(new ax.CustomEvent(s,{composed:!0,bubbles:!0}));break;case"f":s=this.mediaStore.getState().mediaIsFullscreen?ae.MEDIA_EXIT_FULLSCREEN_REQUEST:ae.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new ax.CustomEvent(s,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new ax.CustomEvent(ae.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":{let e=this.hasAttribute(r0.KEYBOARD_BACKWARD_SEEK_OFFSET)?+this.getAttribute(r0.KEYBOARD_BACKWARD_SEEK_OFFSET):10;o=Math.max((null!=(r=this.mediaStore.getState().mediaCurrentTime)?r:0)-e,0),l=new ax.CustomEvent(ae.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:o}),this.dispatchEvent(l);break}case"ArrowRight":{let e=this.hasAttribute(r0.KEYBOARD_FORWARD_SEEK_OFFSET)?+this.getAttribute(r0.KEYBOARD_FORWARD_SEEK_OFFSET):10;o=Math.max((null!=(n=this.mediaStore.getState().mediaCurrentTime)?n:0)+e,0),l=new ax.CustomEvent(ae.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:o}),this.dispatchEvent(l)}}}}o6=new WeakMap,o7=new WeakMap,le=new WeakMap,lt=new WeakMap,li=new WeakMap,la=new WeakMap,lr=new WeakSet,ln=function(){var e;this.mediaStore=(({media:e,fullscreenElement:t,documentElement:i,stateMediator:a=rY,requestMap:r=rG,options:n={},monitorStateOwnersOnlyWithSubscriptions:s=!0})=>{let o,l=[],d={options:{...n}},u=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0}),c=e=>{void 0!=e&&(rV(e,u)||(u=Object.freeze({...u,...e}),l.forEach(e=>e(u))))},h=()=>{c(Object.entries(a).reduce((e,[t,{get:i}])=>(e[t]=i(d),e),{}))},m={},p=async(e,t)=>{var i,r,n,u,p,E,b,f,g,_,y,T,A,k,w,S;let I=!!o;if(o={...d,...null!=o?o:{},...e},I)return;await rK(...Object.values(e));let R=l.length>0&&0===t&&s,C=d.media!==o.media,D=(null==(i=d.media)?void 0:i.textTracks)!==(null==(r=o.media)?void 0:r.textTracks),L=(null==(n=d.media)?void 0:n.videoRenditions)!==(null==(u=o.media)?void 0:u.videoRenditions),M=(null==(p=d.media)?void 0:p.audioTracks)!==(null==(E=o.media)?void 0:E.audioTracks),O=(null==(b=d.media)?void 0:b.remote)!==(null==(f=o.media)?void 0:f.remote),N=d.documentElement!==o.documentElement,x=!!d.media&&(C||R),P=!!(null==(g=d.media)?void 0:g.textTracks)&&(D||R),U=!!(null==(_=d.media)?void 0:_.videoRenditions)&&(L||R),B=!!(null==(y=d.media)?void 0:y.audioTracks)&&(M||R),W=!!(null==(T=d.media)?void 0:T.remote)&&(O||R),H=!!d.documentElement&&(N||R),V=x||P||U||B||W||H,F=0===l.length&&1===t&&s,q=!!o.media&&(C||F),$=!!(null==(A=o.media)?void 0:A.textTracks)&&(D||F),K=!!(null==(k=o.media)?void 0:k.videoRenditions)&&(L||F),Y=!!(null==(w=o.media)?void 0:w.audioTracks)&&(M||F),G=!!(null==(S=o.media)?void 0:S.remote)&&(O||F),j=!!o.documentElement&&(N||F),Q=q||$||K||Y||G||j;if(!(V||Q)){Object.entries(o).forEach(([e,t])=>{d[e]=t}),h(),o=void 0;return}Object.entries(a).forEach(([e,{get:t,mediaEvents:i=[],textTracksEvents:a=[],videoRenditionsEvents:r=[],audioTracksEvents:n=[],remoteEvents:s=[],rootEvents:l=[],stateOwnersUpdateHandlers:u=[]}])=>{let h;m[e]||(m[e]={});let p=i=>{c({[e]:t(d,i)})};
165h=m[e].mediaEvents,i.forEach(t=>{h&&x&&(d.media.removeEventListener(t,h),m[e].mediaEvents=void 0),q&&(o.media.addEventListener(t,p),m[e].mediaEvents=p)}),h=m[e].textTracksEvents,a.forEach(t=>{var i,a;h&&P&&(null==(i=d.media.textTracks)||i.removeEventListener(t,h),m[e].textTracksEvents=void 0),$&&(null==(a=o.media.textTracks)||a.addEventListener(t,p),m[e].textTracksEvents=p)}),h=m[e].videoRenditionsEvents,r.forEach(t=>{var i,a;h&&U&&(null==(i=d.media.videoRenditions)||i.removeEventListener(t,h),m[e].videoRenditionsEvents=void 0),K&&(null==(a=o.media.videoRenditions)||a.addEventListener(t,p),m[e].videoRenditionsEvents=p)}),h=m[e].audioTracksEvents,n.forEach(t=>{var i,a;h&&B&&(null==(i=d.media.audioTracks)||i.removeEventListener(t,h),m[e].audioTracksEvents=void 0),Y&&(null==(a=o.media.audioTracks)||a.addEventListener(t,p),m[e].audioTracksEvents=p)}),h=m[e].remoteEvents,s.forEach(t=>{var i,a;h&&W&&(null==(i=d.media.remote)||i.removeEventListener(t,h),m[e].remoteEvents=void 0),G&&(null==(a=o.media.remote)||a.addEventListener(t,p),m[e].remoteEvents=p)}),h=m[e].rootEvents,l.forEach(t=>{h&&H&&(d.documentElement.removeEventListener(t,h),m[e].rootEvents=void 0),j&&(o.documentElement.addEventListener(t,p),m[e].rootEvents=p)});let E=m[e].stateOwnersUpdateHandlers;u.forEach(t=>{E&&V&&E(),Q&&(m[e].stateOwnersUpdateHandlers=t(p,o))})}),Object.entries(o).forEach(([e,t])=>{d[e]=t}),h(),o=void 0};return p({media:e,fullscreenElement:t,documentElement:i,options:n}),{dispatch(e){let{type:t,detail:i}=e;if(r[t]&&null==u.mediaErrorCode)return void c(r[t](a,d,e));"mediaelementchangerequest"===t?p({media:i}):"fullscreenelementchangerequest"===t?p({fullscreenElement:i}):"documentelementchangerequest"===t?p({documentElement:i}):"optionschangerequest"===t&&Object.entries(null!=i?i:{}).forEach(([e,t])=>{d.options[e]=t})},getState:()=>u,subscribe:e=>(p({},l.length+1),l.push(e),e(u),()=>{let t=l.indexOf(e);t>=0&&(p({},l.length-1),l.splice(t,1))})}})({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(r0.DEFAULT_SUBTITLES),defaultDuration:this.hasAttribute(r0.DEFAULT_DURATION)?+this.getAttribute(r0.DEFAULT_DURATION):void 0,defaultStreamType:null!=(e=this.getAttribute(r0.DEFAULT_STREAM_TYPE))?e:void 0,liveEdgeOffset:this.hasAttribute(r0.LIVE_EDGE_OFFSET)?+this.getAttribute(r0.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(r0.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(r0.SEEK_TO_LIVE_OFFSET):this.hasAttribute(r0.LIVE_EDGE_OFFSET)?+this.getAttribute(r0.LIVE_EDGE_OFFSET):void 0,noAutoSeekToLive:this.hasAttribute(r0.NO_AUTO_SEEK_TO_LIVE),noVolumePref:this.hasAttribute(r0.NO_VOLUME_PREF),noSubtitlesLangPref:this.hasAttribute(r0.NO_SUBTITLES_LANG_PREF)}})},ls=new WeakSet,lo=function(e){let{key:t}=e;if(!rJ.includes(t))return void this.removeEventListener("keyup",rX(this,ls,lo));this.keyboardShortcutHandler(e)},ll=new WeakSet,ld=function(e){let{metaKey:t,altKey:i,key:a}=e;if(t||i||!rJ.includes(a))return void this.removeEventListener("keyup",rX(this,ls,lo));[" ","ArrowLeft","ArrowRight"].includes(a)&&!(rQ(this,o6).contains(`no${a.toLowerCase()}`)||" "===a&&rQ(this,o6).contains("nospace"))&&e.preventDefault(),this.addEventListener("keyup",rX(this,ls,lo),{once:!0})};let r2=Object.values(ar),r3=Object.values(ai),r4=e=>{var t,i,a,r;let{observedAttributes:n}=e.constructor;!n&&(null==(t=e.nodeName)?void 0:t.includes("-"))&&(ax.customElements.upgrade(e),{observedAttributes:n}=e.constructor);let s=null==(r=null==(a=null==(i=null==e?void 0:e.getAttribute)?void 0:i.call(e,at.MEDIA_CHROME_ATTRIBUTES))?void 0:a.split)?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(e=>r2.includes(e)):[]},r5=e=>(e=>{var t,i;return(null==(t=e.nodeName)?void 0:t.includes("-"))&&ax.customElements.get(null==(i=e.nodeName)?void 0:i.toLowerCase())&&!(e instanceof ax.customElements.get(e.nodeName.toLowerCase()))&&ax.customElements.upgrade(e),r3.some(t=>t in e)})(e)||!!r4(e).length,r9=e=>{var t;return null==(t=null==e?void 0:e.join)?void 0:t.call(e,":")},r8={[ar.MEDIA_SUBTITLES_LIST]:rg,[ar.MEDIA_SUBTITLES_SHOWING]:rg,[ar.MEDIA_SEEKABLE]:r9,[ar.MEDIA_BUFFERED]:e=>null==e?void 0:e.map(r9).join(" "),[ar.MEDIA_PREVIEW_COORDS]:e=>null==e?void 0:e.join(" "),[ar.MEDIA_RENDITION_LIST]:function(e){return null==e?void 0:e.map(am).join(" ")},[ar.MEDIA_AUDIO_TRACK_LIST]:function(e){return null==e?void 0:e.map(av).join(" ")}},r6=async(e,t,i)=>{var a,r;if(e.isConnected||await ag(0),"boolean"==typeof i||null==i)return a2(e,t,i);if("number"==typeof i)return a0(e,t,i);if("string"==typeof i)return a4(e,t,i);if(Array.isArray(i)&&!i.length)return e.removeAttribute(t);let n=null!=(r=null==(a=r8[t])?void 0:a.call(r8,i))?r:i;return e.setAttribute(t,n)},r7=(e,t)=>
165{if((e=>{var t;return!!(null==(t=e.closest)?void 0:t.call(e,'*[slot="media"]'))})(e))return;let i=(e,t)=>{var i,a;r5(e)&&t(e);let{children:r=[]}=null!=e?e:{};[...r,...null!=(a=null==(i=null==e?void 0:e.shadowRoot)?void 0:i.children)?a:[]].forEach(e=>r7(e,t))},a=null==e?void 0:e.nodeName.toLowerCase();if(a.includes("-")&&!r5(e))return void ax.customElements.whenDefined(a).then(()=>{i(e,t)});i(e,t)},ne=(e,t,i)=>{e.forEach(e=>{if(t in e){e[t]=i;return}let a=r4(e),r=t.toLowerCase();a.includes(r)&&r6(e,r,i)})},nt=(e,t,i)=>{r7(e,t);let a=e=>{var i;t(null!=(i=null==e?void 0:e.composedPath()[0])?i:e.target)},r=e=>{var t;i(null!=(t=null==e?void 0:e.composedPath()[0])?t:e.target)};e.addEventListener(ae.REGISTER_MEDIA_STATE_RECEIVER,a),e.addEventListener(ae.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=[],s=e=>{let a=e.target;"media"!==a.name&&(n.forEach(e=>r7(e,i)),(n=[...a.assignedElements({flatten:!0})]).forEach(e=>r7(e,t)))};e.addEventListener("slotchange",s);let o=new MutationObserver(e=>{e.forEach(e=>{let{addedNodes:a=[],removedNodes:r=[],type:n,target:s,attributeName:o}=e;"childList"===n?(Array.prototype.forEach.call(a,e=>r7(e,t)),Array.prototype.forEach.call(r,e=>r7(e,i))):"attributes"===n&&o===at.MEDIA_CHROME_ATTRIBUTES&&(r5(s)?t(s):i(s))})});return o.observe(e,{childList:!0,attributes:!0,subtree:!0}),()=>{r7(e,i),e.removeEventListener("slotchange",s),o.disconnect(),e.removeEventListener(ae.REGISTER_MEDIA_STATE_RECEIVER,a),e.removeEventListener(ae.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};ax.customElements.get("media-controller")||ax.customElements.define("media-controller",r1);var ni=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},na=(e,t,i)=>(ni(e,t,"read from private field"),i?i.call(e):t.get(e)),nr=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},nn=(e,t,i,a)=>(ni(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let ns={TOOLTIP_PLACEMENT:"tooltipplacement",DISABLED:"disabled",NO_TOOLTIP:"notooltip"},no=aP.createElement("template");no.innerHTML=`
166<style>
167  :host {
168    position: relative;
169    font: var(--media-font,
170      var(--media-font-weight, bold)
171      var(--media-font-size, 14px) /
172      var(--media-text-content-height, var(--media-control-height, 24px))
173      var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
174    color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
175    background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
176    padding: var(--media-button-padding, var(--media-control-padding, 10px));
177    justify-content: var(--media-button-justify-content, center);
178    display: inline-flex;
179    align-items: center;
180    vertical-align: middle;
181    box-sizing: border-box;
182    transition: background .15s linear;
183    pointer-events: auto;
184    cursor: var(--media-cursor, pointer);
185    -webkit-tap-highlight-color: transparent;
186  }
187
188  
189  :host(:focus-visible) {
190    box-shadow: inset 0 0 0 2px rgb(27 127 204 / .9);
191    outline: 0;
192  }
193  
194  :host(:where(:focus)) {
195    box-shadow: none;
196    outline: 0;
197  }
198
199  :host(:hover) {
200    background: var(--media-control-hover-background, rgba(50 50 70 / .7));
201  }
202
203  svg, img, ::slotted(svg), ::slotted(img) {
204    width: var(--media-button-icon-width);
205    height: var(--media-button-icon-height, var(--media-control-height, 24px));
206    transform: var(--media-button-icon-transform);
207    transition: var(--media-button-icon-transition);
208    fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
209    vertical-align: middle;
210    max-width: 100%;
211    max-height: 100%;
212    min-width: 100%;
213  }
214
215  media-tooltip {
216    
217    max-width: 0;
218    overflow-x: clip;
219    opacity: 0;
220    transition: opacity .3s, max-width 0s 9s;
221  }
222
223  :host(:hover) media-tooltip,
224  :host(:focus-visible) media-tooltip {
225    max-width: 100vw;
226    opacity: 1;
227    transition: opacity .3s;
228  }
229
230  :host([notooltip]) slot[name="tooltip"] {
231    display: none;
232  }
233</style>
234
235<slot name="tooltip">
236  <media-tooltip part="tooltip" aria-hidden="true">
237    <slot name="tooltip-content"></slot>
238  </media-tooltip>
239</slot>
240`;class nl extends ax.HTMLElement{constructor(e={}){var t;if(super(),nr(this,lv),nr(this,lu,void 0),this.preventClick=!1,this.tooltipEl=null,this.tooltipContent="",nr(this,lc,e=>{this.preventClick||this.handleClick(e),setTimeout(na(this,lh),0)}),nr(this,lh,()=>{var e,t;null==(t=null==(e=this.tooltipEl)?void 0:e.updateXOffset)||t.call(e)}),nr(this,lm,e=>{let{key:t}=e;if(!this.keysUsed.includes(t))return void this.removeEventListener("keyup",na(this,lm));this.preventClick||this.handleClick(e)}),nr(this,lp,e=>{let{metaKey:t,altKey:i,key:a}=e;if(t||i||!this.keysUsed.includes(a))return void this.removeEventListener("keyup",na(this,lm));this.addEventListener("keyup",na(this,lm),{once:!0})}),!this.shadowRoot){this.attachShadow({mode:"open"});let i=no.content.cloneNode(!0);this.nativeEl=i;let a=e.slotTemplate;a||((a=aP.createElement("template")).innerHTML=`<slot>${e.defaultContent||""}</slot>`),e.tooltipContent&&(i.querySelector('slot[name="tooltip-content"]').innerHTML=null!=(t=e.tooltipContent)?t:"",this.tooltipContent=e.tooltipContent),this.nativeEl.appendChild(a.content.cloneNode(!0)),this.shadowRoot.appendChild(i)}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip")}static get observedAttributes(){return["disabled",ns.TOOLTIP_PLACEMENT,at.MEDIA_CONTROLLER]}enable(){this.addEventListener("click",na(this,lc)),this.addEventListener("keydown",na(this,lp)),this.tabIndex=0}disable(){this.removeEventListener("click",na(this,lc)),this.removeEventListener("keydown",na(this,lp)),this.removeEventListener("keyup",na(this,lm)),this.tabIndex=-1}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===at.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=na(this,lu))?void 0:a.unassociateElement)||r.call(a,this),nn(this,lu,null)),i&&this.isConnected&&(nn(this,lu,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=na(this,lu))?void 0:s.associateElement)||o.call(s,this))):"disabled"===e&&i!==t?null==i?this.enable():this.disable():e===ns.TOOLTIP_PLACEMENT&&this.tooltipEl&&i!==t&&(this.tooltipEl.placement=i),na(this,lh).call(this)}connectedCallback(){var e,t,i;let{style:a}=az(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");let r=this.getAttribute(at.MEDIA_CONTROLLER);r&&(nn(this,lu,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=na(this,lu))?void 0:t.associateElement)||i.call(t,this)),ax.customElements.whenDefined("media-tooltip").then(()=>{var e,t;return(e=lv,t=lE,ni(this,e,"access private method"),t).call(this)})}disconnectedCallback(){var e,t;this.disable(),null==(t=null==(e=na(this,lu))?void 0:e.unassociateElement)||t.call(e,this),nn(this,lu,null),this.removeEventListener("mouseenter",na(this,lh)),this.removeEventListener("focus",na(this,lh)),this.removeEventListener("click",na(this,lc))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return a3(this,ns.TOOLTIP_PLACEMENT)}set tooltipPlacement(e){a4(this,ns.TOOLTIP_PLACEMENT,e)}get mediaController(){return a3(this,at.MEDIA_CONTROLLER)}set mediaController(e){a4(this,at.MEDIA_CONTROLLER,e)}get disabled(){return a1(this,ns.DISABLED)}set disabled(e){a2(this,ns.DISABLED,e)}get noTooltip(){return a1(this,ns.NO_TOOLTIP)}set noTooltip(e){a2(this,ns.NO_TOOLTIP,e)}handleClick(e){}}
240lu=new WeakMap,lc=new WeakMap,lh=new WeakMap,lm=new WeakMap,lp=new WeakMap,lv=new WeakSet,lE=function(){this.addEventListener("mouseenter",na(this,lh)),this.addEventListener("focus",na(this,lh)),this.addEventListener("click",na(this,lc));let e=this.tooltipPlacement;e&&this.tooltipEl&&(this.tooltipEl.placement=e)},ax.customElements.get("media-chrome-button")||ax.customElements.define("media-chrome-button",nl);let nd=`<svg aria-hidden="true" viewBox="0 0 26 24">
241  <path d="M22.13 3H3.87a.87.87 0 0 0-.87.87v13.26a.87.87 0 0 0 .87.87h3.4L9 16H5V5h16v11h-4l1.72 2h3.4a.87.87 0 0 0 .87-.87V3.87a.87.87 0 0 0-.86-.87Zm-8.75 11.44a.5.5 0 0 0-.76 0l-4.91 5.73a.5.5 0 0 0 .38.83h9.82a.501.501 0 0 0 .38-.83l-4.91-5.73Z"/>
242</svg>
243`,nu=aP.createElement("template");nu.innerHTML=`
244  <style>
245    :host([${ar.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) {
246      display: none !important;
247    }
248
249    
250    :host(:not([${ar.MEDIA_IS_AIRPLAYING}])) slot[name=icon] slot:not([name=enter]) {
251      display: none !important;
252    }
253
254    :host([${ar.MEDIA_IS_AIRPLAYING}]) slot[name=tooltip-enter],
255    :host(:not([${ar.MEDIA_IS_AIRPLAYING}])) slot[name=tooltip-exit] {
256      display: none;
257    }
258  </style>
259
260  <slot name="icon">
261    <slot name="enter">${nd}</slot>
262    <slot name="exit">${nd}</slot>
263  </slot>
264`;let nc=`
265  <slot name="tooltip-enter">${aS("start airplay")}</slot>
266  <slot name="tooltip-exit">${aS("stop airplay")}</slot>
267`,nh=e=>{let t=e.mediaIsAirplaying?aS("stop airplay"):aS("start airplay");e.setAttribute("aria-label",t)};class nm extends nl{static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_IS_AIRPLAYING,ar.MEDIA_AIRPLAY_UNAVAILABLE]}constructor(e={}){super({slotTemplate:nu,tooltipContent:nc,...e})}connectedCallback(){super.connectedCallback(),nh(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===ar.MEDIA_IS_AIRPLAYING&&nh(this)}get mediaIsAirplaying(){return a1(this,ar.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){a2(this,ar.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return a3(this,ar.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){a4(this,ar.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new ax.CustomEvent(ae.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}}ax.customElements.get("media-airplay-button")||ax.customElements.define("media-airplay-button",nm);let np=`<svg aria-hidden="true" viewBox="0 0 26 24">
268  <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
269</svg>`,nv=`<svg aria-hidden="true" viewBox="0 0 26 24">
270  <path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>
271</svg>`,nE=aP.createElement("template");nE.innerHTML=`
272  <style>
273    :host([aria-checked="true"]) slot[name=off] {
274      display: none !important;
275    }
276
277    
278    :host(:not([aria-checked="true"])) slot[name=on] {
279      display: none !important;
280    }
281
282    :host([aria-checked="true"]) slot[name=tooltip-enable],
283    :host(:not([aria-checked="true"])) slot[name=tooltip-disable] {
284      display: none;
285    }
286  </style>
287
288  <slot name="icon">
289    <slot name="on">${np}</slot>
290    <slot name="off">${nv}</slot>
291  </slot>
292`;let nb=`
293  <slot name="tooltip-enable">${aS("Enable captions")}</slot>
294  <slot name="tooltip-disable">${aS("Disable captions")}</slot>
295`,nf=e=>{e.setAttribute("aria-checked",rA(e).toString())};
295class ng extends nl{static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_SUBTITLES_LIST,ar.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:nE,tooltipContent:nb,...e}),this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",aS("closed captions")),nf(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===ar.MEDIA_SUBTITLES_SHOWING&&nf(this)}get mediaSubtitlesList(){return n_(this,ar.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){ny(this,ar.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return n_(this,ar.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){ny(this,ar.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new ax.CustomEvent(ae.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}let n_=(e,t)=>{let i=e.getAttribute(t);return i?rE(i):[]},ny=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=rg(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};ax.customElements.get("media-captions-button")||ax.customElements.define("media-captions-button",ng);let nT=aP.createElement("template");nT.innerHTML=`
296  <style>
297  :host([${ar.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) {
298    display: none !important;
299  }
300
301  
302  :host(:not([${ar.MEDIA_IS_CASTING}])) slot[name=icon] slot:not([name=enter]) {
303    display: none !important;
304  }
305
306  :host([${ar.MEDIA_IS_CASTING}]) slot[name=tooltip-enter],
307    :host(:not([${ar.MEDIA_IS_CASTING}])) slot[name=tooltip-exit] {
308      display: none;
309    }
310  </style>
311
312  <slot name="icon">
313    <slot name="enter"><svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/></g></svg></slot>
314    <slot name="exit"><svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg></slot>
315  </slot>
316`;let nA=`
317  <slot name="tooltip-enter">${aS("Start casting")}</slot>
318  <slot name="tooltip-exit">${aS("Stop casting")}</slot>
319`,nk=e=>{let t=e.mediaIsCasting?aS("stop casting"):aS("start casting");e.setAttribute("aria-label",t)};class nw extends nl{static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_IS_CASTING,ar.MEDIA_CAST_UNAVAILABLE]}constructor(e={}){super({slotTemplate:nT,tooltipContent:nA,...e})}connectedCallback(){super.connectedCallback(),nk(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===ar.MEDIA_IS_CASTING&&nk(this)}get mediaIsCasting(){return a1(this,ar.MEDIA_IS_CASTING)}set mediaIsCasting(e){a2(this,ar.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return a3(this,ar.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){a4(this,ar.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?ae.MEDIA_EXIT_CAST_REQUEST:ae.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new ax.CustomEvent(e,{composed:!0,bubbles:!0}))}}ax.customElements.get("media-cast-button")||ax.customElements.define("media-cast-button",nw);var nS=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nI=(e,t,i)=>(nS(e,t,"read from private field"),i?i.call(e):t.get(e)),nR=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},nC=(e,t,i,a)=>(nS(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),nD=(e,t,i)=>(nS(e,t,"access private method"),i);let nL={OPEN:"open",ANCHOR:"anchor"};class nM extends ax.HTMLElement{constructor(){super(),nR(this,l_),nR(this,lT),nR(this,lk),nR(this,lS),nR(this,lR),nR(this,lD),nR(this,lb,!1),nR(this,lf,null),nR(this,lg,null),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}static get observedAttributes(){return[nL.OPEN,nL.ANCHOR]}get open(){return a1(this,nL.OPEN)}set open(e){a2(this,nL.OPEN,e)}handleEvent(e){switch(e.type){case"invoke":nD(this,lS,lI).call(this,e);break;case"focusout":nD(this,lR,lC).call(this,e);break;case"keydown":nD(this,lD,lL).call(this,e)}}connectedCallback(){nD(this,l_,ly).call(this),this.role||(this.role="dialog")}attributeChangedCallback(e,t,i){nD(this,l_,ly).call(this),e===nL.OPEN&&i!==t&&(this.open?nD(this,lT,lA).call(this):nD(this,lk,lw).call(this))}focus(){nC(this,lf,aj());let e=!this.dispatchEvent(new Event("focus",{composed:!0,cancelable:!0})),t=!this.dispatchEvent(new Event("focusin",{composed:!0,bubbles:!0,cancelable:!0}));if(e||t)return;
319let i=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==i||i.focus()}get keysUsed(){return["Escape","Tab"]}}lb=new WeakMap,lf=new WeakMap,lg=new WeakMap,l_=new WeakSet,ly=function(){if(!nI(this,lb)&&(nC(this,lb,!0),!this.shadowRoot)){this.attachShadow({mode:"open"});let e=function(e){let t={};for(let i of e)t[i.name]=i.value;return t}(this.attributes);this.shadowRoot.innerHTML=`
320        ${this.constructor.getTemplateHTML(e)}
321      `,queueMicrotask(()=>{let{style:e}=az(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}},lT=new WeakSet,lA=function(){var e;null==(e=nI(this,lg))||e.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})},lk=new WeakSet,lw=function(){var e;null==(e=nI(this,lg))||e.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))},lS=new WeakSet,lI=function(e){nC(this,lg,e.relatedTarget),aY(this,e.relatedTarget)||(this.open=!this.open)},lR=new WeakSet,lC=function(e){var t;!aY(this,e.relatedTarget)&&(null==(t=nI(this,lf))||t.focus(),nI(this,lg)&&nI(this,lg)!==e.relatedTarget&&this.open&&(this.open=!1))},lD=new WeakSet,lL=function(e){var t,i,a,r,n;let{key:s,ctrlKey:o,altKey:l,metaKey:d}=e;o||l||d||this.keysUsed.includes(s)&&(e.preventDefault(),e.stopPropagation(),"Tab"===s?(e.shiftKey?null==(i=null==(t=this.previousElementSibling)?void 0:t.focus)||i.call(t):null==(r=null==(a=this.nextElementSibling)?void 0:a.focus)||r.call(a),this.blur()):"Escape"===s&&(null==(n=nI(this,lf))||n.focus(),this.open=!1))},nM.getTemplateHTML=function(e){return`
322    <style>
323      :host {
324        font: var(--media-font,
325          var(--media-font-weight, normal)
326          var(--media-font-size, 14px) /
327          var(--media-text-content-height, var(--media-control-height, 24px))
328          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
329        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
330        display: var(--media-dialog-display, inline-flex);
331        justify-content: center;
332        align-items: center;
333        
334        transition-behavior: allow-discrete;
335        visibility: hidden;
336        opacity: 0;
337        transform: translateY(2px) scale(.99);
338        pointer-events: none;
339      }
340
341      :host([open]) {
342        transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out;
343        visibility: visible;
344        opacity: 1;
345        transform: translateY(0) scale(1);
346        pointer-events: auto;
347      }
348
349      #content {
350        display: flex;
351        position: relative;
352        box-sizing: border-box;
353        width: min(320px, 100%);
354        word-wrap: break-word;
355        max-height: 100%;
356        overflow: auto;
357        text-align: center;
358        line-height: 1.4;
359      }
360    </style>
361    ${this.getSlotTemplateHTML(e)}
362  `},nM.getSlotTemplateHTML=function(e){return`
363    <slot id="content"></slot>
364  `},ax.customElements.get("media-chrome-dialog")||ax.customElements.define("media-chrome-dialog",nM);var nO=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nN=(e,t,i)=>(nO(e,t,"read from private field"),i?i.call(e):t.get(e)),nx=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},nP=(e,t,i,a)=>(nO(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),nU=(e,t,i)=>(nO(e,t,"access private method"),i);let nB=aP.createElement("template");nB.innerHTML=`
365  <style>
366    :host {
367      --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
368      --_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px));
369
370      box-shadow: var(--_focus-visible-box-shadow, none);
371      background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
372      height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding));
373      display: inline-flex;
374      align-items: center;
375      
376      vertical-align: middle;
377      box-sizing: border-box;
378      position: relative;
379      width: 100px;
380      transition: background .15s linear;
381      cursor: var(--media-cursor, pointer);
382      pointer-events: auto;
383      touch-action: none; 
384    }
385
386    
387    input[type=range]:focus {
388      outline: 0;
389    }
390    input[type=range]:focus::-webkit-slider-runnable-track {
391      outline: 0;
392    }
393
394    :host(:hover) {
395      background: var(--media-control-hover-background, rgb(50 50 70 / .7));
396    }
397
398    #leftgap {
399      padding-left: var(--media-range-padding-left, var(--_media-range-padding));
400    }
401
402    #rightgap {
403      padding-right: var(--media-range-padding-right, var(--_media-range-padding));
404    }
405
406    #startpoint,
407    #endpoint {
408      position: absolute;
409    }
410
411    #endpoint {
412      right: 0;
413    }
414
415    #container {
416      
417      width: var(--media-range-track-width, 100%);
418      transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px));
419      position: relative;
420      height: 100%;
421      display: flex;
422      align-items: center;
423      min-width: 40px;
424    }
425
426    #range {
427      
428      display: var(--media-time-range-hover-display, block);
429      bottom: var(--media-time-range-hover-bottom, -7px);
430      height: var(--media-time-range-hover-height, max(100% + 7px, 25px));
431      width: 100%;
432      position: absolute;
433      cursor: var(--media-cursor, pointer);
434
435      -webkit-appearance: none; 
436      -webkit-tap-highlight-color: transparent;
437      background: transparent; 
438      margin: 0;
439      z-index: 1;
440    }
441
442    @media (hover: hover) {
443      #range {
444        bottom: var(--media-time-range-hover-bottom, -5px);
445        height: var(--media-time-range-hover-height, max(100% + 5px, 20px));
446      }
447    }
448
449    
450    
451    #range::-webkit-slider-thumb {
452      -webkit-appearance: none;
453      background: transparent;
454      width: .1px;
455      height: .1px;
456    }
457
458    
459    #range::-moz-range-thumb {
460      background: transparent;
461      border: transparent;
462      width: .1px;
463      height: .1px;
464    }
465
466    #appearance {
467      height: var(--media-range-track-height, 4px);
468      display: flex;
469      flex-direction: column;
470      justify-content: center;
471      width: 100%;
472      position: absolute;
473      
474      will-change: transform;
475    }
476
477    #track {
478      background: var(--media-range-track-background, rgb(255 255 255 / .2));
479      border-radius: var(--media-range-track-border-radius, 1px);
480      border: var(--media-range-track-border, none);
481      outline: var(--media-range-track-outline);
482      outline-offset: var(--media-range-track-outline-offset);
483      backdrop-filter: var(--media-range-track-backdrop-filter);
484      -webkit-backdrop-filter: var(--media-range-track-backdrop-filter);
485      box-shadow: var(--media-range-track-box-shadow, none);
486      position: absolute;
487      width: 100%;
488      height: 100%;
489      overflow: hidden;
490    }
491
492    #progress,
493    #pointer {
494      position: absolute;
495      height: 100%;
496      will-change: width;
497    }
498
499    #progress {
500      background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238)));
501      transition: var(--media-range-track-transition);
502    }
503
504    #pointer {
505      background: var(--media-range-track-pointer-background);
506      border-right: var(--media-range-track-pointer-border-right);
507      transition: visibility .25s, opacity .25s;
508      visibility: hidden;
509      opacity: 0;
510    }
511
512    @media (hover: hover) {
513      :host(:hover) #pointer {
514        transition: visibility .5s, opacity .5s;
515        visibility: visible;
516        opacity: 1;
517      }
518    }
519
520    #thumb,
521    ::slotted([slot=thumb]) {
522      width: var(--media-range-thumb-width, 10px);
523      height: var(--media-range-thumb-height, 10px);
524      transition: var(--media-range-thumb-transition);
525      transform: var(--media-range-thumb-transform, none);
526      opacity: var(--media-range-thumb-opacity, 1);
527      translate: -50%;
528      position: absolute;
529      left: 0;
530      cursor: var(--media-cursor, pointer);
531    }
532
533    #thumb {
534      border-radius: var(--media-range-thumb-border-radius, 10px);
535      background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238)));
536      box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent);
537      border: var(--media-range-thumb-border, none);
538    }
539
540    :host([disabled]) #thumb {
541      background-color: #777;
542    }
543
544    .segments #appearance {
545      height: var(--media-range-segment-hover-height, 7px);
546    }
547
548    #track {
549      clip-path: url(#segments-clipping);
550    }
551
552    #segments {
553      --segments-gap: var(--media-range-segments-gap, 2px);
554      position: absolute;
555      width: 100%;
556      height: 100%;
557    }
558
559    #segments-clipping {
560      transform: translateX(calc(var(--segments-gap) / 2));
561    }
562
563    #segments-clipping:empty {
564      display: none;
565    }
566
567    #segments-clipping rect {
568      height: var(--media-range-track-height, 4px);
569      y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2);
570      transition: var(--media-range-segment-transition, transform .1s ease-in-out);
571      transform: var(--media-range-segment-transform, scaleY(1));
572      transform-origin: center;
573    }
574  </style>
575  <div id="leftgap"></div>
576  <div id="container">
577    <div id="startpoint"></div>
578    <div id="endpoint"></div>
579    <div id="appearance">
580      <div id="track" part="track">
581        <div id="pointer"></div>
582        <div id="progress" part="progress"></div>
583      </div>
584      <slot name="thumb">
585        <div id="thumb" part="thumb"></div>
586      </slot>
587      <svg id="segments"><clipPath id="segments-clipping"></clipPath></svg>
588    </div>
589    <input id="range" type="range" min="0" max="1" step="any" value="0">
590  </div>
591  <div id="rightgap"></div>
592`;class nW extends ax.HTMLElement{constructor(){super(),nx(this,lV),nx(this,lq),nx(this,lK),nx(this,lG),nx(this,lQ),nx(this,lz),nx(this,lJ),nx(this,l1),nx(this,lM,void 0),nx(this,lO,void 0),nx(this,lN,void 0),nx(this,lx,void 0),nx(this,lP,{}),nx(this,lU,[]),nx(this,lB,()=>{if(this.range.matches(":focus-visible")){let{style:e}=az(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),nx(this,lW,()=>{let{style:e}=az(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),nx(this,lH,()=>{let e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(nB.content.cloneNode(!0))),this.container=this.shadowRoot.querySelector("#container"),nP(this,lN,this.shadowRoot.querySelector("#startpoint")),nP(this,lx,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",at.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===at.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=nN(this,lM))?void 0:a.unassociateElement)||r.call(a,this),nP(this,lM,null)),i&&this.isConnected&&(nP(this,lM,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=nN(this,lM))?void 0:s.associateElement)||o.call(s,this))):("disabled"===e||"aria-disabled"===e&&t!==i)&&(null==i?(this.range.removeAttribute(e),nU(this,lq,l$).call(this)):(this.range.setAttribute(e,i),nU(this,lK,lY).call(this)))}connectedCallback(){var e,t,i;let{style:a}=az(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),nN(this,lP).pointer=az(this.shadowRoot,"#pointer"),nN(this,lP).progress=az(this.shadowRoot,"#progress"),nN(this,lP).thumb=az(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),nN(this,lP).activeSegment=az(this.shadowRoot,"#segments-clipping rect:nth-child(0)");let r=this.getAttribute(at.MEDIA_CONTROLLER);r&&(nP(this,lM,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=nN(this,lM))?void 0:t.associateElement)||i.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",nN(this,lB)),this.shadowRoot.addEventListener("focusout",nN(this,lW)),nU(this,lq,l$).call(this),aH(this.container,nN(this,lH))}disconnectedCallback(){var e,t;nU(this,lK,lY).call(this),null==(t=null==(e=nN(this,lM))?void 0:e.unassociateElement)||t.call(e,this),nP(this,lM,null),this.shadowRoot.removeEventListener("focusin",nN(this,lB)),this.shadowRoot.removeEventListener("focusout",nN(this,lW)),aV(this.container,nN(this,lH))}updatePointerBar(e){var t;null==(t=nN(this,lP).pointer)||t.style.setProperty("width",`${100*this.getPointerRatio(e)}%`)}updateBar(){var e,t;let i=100*this.range.valueAsNumber;null==(e=nN(this,lP).progress)||e.style.setProperty("width",`${i}%`),null==(t=nN(this,lP).thumb)||t.style.setProperty("left",`${i}%`)}updateSegments(e){let t=this.shadowRoot.querySelector("#segments-clipping");if(t.textContent="",this.container.classList.toggle("segments",!!(null==e?void 0:e.length)),!(null==e?void 0:e.length))return;let i=[...new Set([+this.range.min,...e.flatMap(e=>[e.start,e.end]),+this.range.max])];nP(this,lU,[...i]);let a=i.pop();for(let[e,r]of i.entries()){let[n,s]=[0===e,e===i.length-1],o=n?"calc(var(--segments-gap) / -1)":`${100*r}%`,l=s?a:i[e+1],d=`calc(${(l-r)*100}%${n||s?"":" - var(--segments-gap)"})`,u=aP.createElementNS("http://www.w3.org/2000/svg","rect"),c=az(this.shadowRoot,`#segments-clipping rect:nth-child(${e+1})`);c.style.setProperty("x",o),c.style.setProperty("width",d),t.append(u)}}getPointerRatio(e){return function(e,t,i,a){let r=a.x-i.x,n=a.y-i.y,s=r*r+n*n;return 0===s?0:Math.max(0,Math.min(1,((e-i.x)*r+(t-i.y)*n)/s))}(e.clientX,e.clientY,nN(this,lN).getBoundingClientRect(),nN(this,lx).getBoundingClientRect())}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":nU(this,l1,l2).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":nU(this,lQ,lZ).call(this,e);break;case"pointerdown":nU(this,lG,lj).call(this,e);break;case"pointerup":nU(this,lz,lX).call(this);break;case"pointerleave":nU(this,lJ,l0).call(this)}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}lM=new WeakMap,lO=new WeakMap,lN=new WeakMap,lx=new WeakMap,lP=new WeakMap,lU=new WeakMap,lB=new WeakMap,lW=new WeakMap,lH=new WeakMap,lV=new WeakSet,lF=function(e){let t=nN(this,lP).activeSegment;if(!t)return;let i=this.getPointerRatio(e),a=nN(this,lU).findIndex((e,t,a)=>{let r=a[t+1];return null!=r&&i>=e&&i<=r}),r=`#segments-clipping rect:nth-child(${a+1})`;t.selectorText==r&&t.style.transform||(t.selectorText=r,t.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))},lq=new WeakSet,l$=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))},lK=new WeakSet,lY=function(){var e,t;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),null==(e=ax.window)||e.removeEventListener("pointerup",this),null==(t=ax.window)||t.removeEventListener("pointermove",this)},lG=new WeakSet,lj=function(e){var t;nP(this,lO,e.composedPath().includes(this.range)),null==(t=ax.window)||t.addEventListener("pointerup",this)},lQ=new WeakSet,lZ=function(e){var t;"mouse"!==e.pointerType&&nU(this,lG,lj).call(this,e),this.addEventListener("pointerleave",this),null==(t=ax.window)||t.addEventListener("pointermove",this)},lz=new WeakSet,lX=function(){var e;null==(e=ax.window)||e.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")},lJ=new WeakSet,l0=function(){var e,t;this.removeEventListener("pointerleave",this),null==(e=ax.window)||e.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),null==(t=nN(this,lP).activeSegment)||t.style.removeProperty("transform")},l1=new WeakSet,l2=function(e){this.toggleAttribute("dragging",1===e.buttons||"mouse"!==e.pointerType),this.updatePointerBar(e),nU(this,lV,lF).call(this,e),this.dragging&&("mouse"!==e.pointerType||!nN(this,lO))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(e),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))},ax.customElements.get("media-chrome-range")||ax.customElements.define("media-chrome-range",nW);var nH=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nV=(e,t,i)=>(nH(e,t,"read from private field"),i?i.call(e):t.get(e)),nF=(e,t,i,a)=>(nH(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let nq=aP.createElement("template");nq.innerHTML=`
593  <style>
594    :host {
595      
596      box-sizing: border-box;
597      display: var(--media-control-display, var(--media-control-bar-display, inline-flex));
598      color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
599      --media-loading-indicator-icon-height: 44px;
600    }
601
602    ::slotted(media-time-range),
603    ::slotted(media-volume-range) {
604      min-height: 100%;
605    }
606
607    ::slotted(media-time-range),
608    ::slotted(media-clip-selector) {
609      flex-grow: 1;
610    }
611
612    ::slotted([role="menu"]) {
613      position: absolute;
614    }
615  </style>
616
617  <slot></slot>
618`;class n$ extends ax.HTMLElement{constructor(){super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,l3,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(nq.content.cloneNode(!0)))}static get observedAttributes(){return[at.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===at.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=nV(this,l3))?void 0:a.unassociateElement)||r.call(a,this),nF(this,l3,null)),i&&this.isConnected&&(nF(this,l3,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=nV(this,l3))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let a=this.getAttribute(at.MEDIA_CONTROLLER);a&&(nF(this,l3,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=nV(this,l3))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=nV(this,l3))?void 0:e.unassociateElement)||t.call(e,this),nF(this,l3,null)}}l3=new WeakMap,ax.customElements.get("media-control-bar")||ax.customElements.define("media-control-bar",n$);var nK=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nY=(e,t,i)=>(nK(e,t,"read from private field"),i?i.call(e):t.get(e)),nG=(e,t,i,a)=>(nK(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let nj=aP.createElement("template");nj.innerHTML=`
619  <style>
620    :host {
621      font: var(--media-font,
622        var(--media-font-weight, normal)
623        var(--media-font-size, 14px) /
624        var(--media-text-content-height, var(--media-control-height, 24px))
625        var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
626      color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
627      background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))));
628      padding: var(--media-control-padding, 10px);
629      display: inline-flex;
630      justify-content: center;
631      align-items: center;
632      vertical-align: middle;
633      box-sizing: border-box;
634      text-align: center;
635      pointer-events: auto;
636    }
637
638    
639    :host(:focus-visible) {
640      box-shadow: inset 0 0 0 2px rgb(27 127 204 / .9);
641      outline: 0;
642    }
643
644    
645    :host(:where(:focus)) {
646      box-shadow: none;
647      outline: 0;
648    }
649  </style>
650  <slot></slot>
651`;class nQ extends ax.HTMLElement{constructor(){super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,l4,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(nj.content.cloneNode(!0)))}static get observedAttributes(){return[at.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===at.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=nY(this,l4))?void 0:a.unassociateElement)||r.call(a,this),nG
651(this,l4,null)),i&&this.isConnected&&(nG(this,l4,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=nY(this,l4))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let{style:a}=az(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);let r=this.getAttribute(at.MEDIA_CONTROLLER);r&&(nG(this,l4,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=nY(this,l4))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=nY(this,l4))?void 0:e.unassociateElement)||t.call(e,this),nG(this,l4,null)}}l4=new WeakMap,ax.customElements.get("media-text-display")||ax.customElements.define("media-text-display",nQ);var nZ=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nz=(e,t,i)=>(nZ(e,t,"read from private field"),i?i.call(e):t.get(e));class nX extends nQ{constructor(){super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,l5,void 0),((e,t,i,a)=>(nZ(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,l5,this.shadowRoot.querySelector("slot")),nz(this,l5).textContent=aT(0)}static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_DURATION]}attributeChangedCallback(e,t,i){e===ar.MEDIA_DURATION&&(nz(this,l5).textContent=aT(+i)),super.attributeChangedCallback(e,t,i)}get mediaDuration(){return aJ(this,ar.MEDIA_DURATION)}set mediaDuration(e){a0(this,ar.MEDIA_DURATION,e)}}l5=new WeakMap,ax.customElements.get("media-duration-display")||ax.customElements.define("media-duration-display",nX);let nJ={2:aS("Network Error"),3:aS("Decode Error"),4:aS("Source Not Supported"),5:aS("Encryption 
651Error")},n0={2:aS("A network error caused the media download to fail."),3:aS("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:aS("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:aS("The media is encrypted and there are no keys to decrypt it.")},n1=e=>{var t,i;return 1===e.code?null:{title:null!=(t=nJ[e.code])?t:`Error ${e.code}`,message:null!=(i=n0[e.code])?i:e.message}};var n2=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};function n3(e){var t;let{title:i,message:a}=null!=(t=n1(e))?t:{},r="";return i&&(r+=`<slot name="error-${e.code}-title"><h3>${i}</h3></slot>`),a&&(r+=`<slot name="error-${e.code}-message"><p>${a}</p></slot>`),r}let n4=[ar.MEDIA_ERROR_CODE,ar.MEDIA_ERROR_MESSAGE];class n5 extends nM{constructor(){super(...arguments),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,l9,null)}static get observedAttributes(){return[...super.observedAttributes,...n4]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,t,i){var a;if(super.attributeChangedCallback(e,t,i),!n4.includes(e))return;let r=null!=(a=this.mediaError)?a:{code:this.mediaErrorCode,message:this.mediaErrorMessage};this.open=r.code&&null!==n1(r),this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(r))}get mediaError(){var e,t;return n2(this,e=l9,"read from private field"),t?t.call(this):e.get(this)}set mediaError(e){var t,i;n2(this,t=l9,"write to private field"),i?i.call(this,e):t.set(this,e)}get mediaErrorCode(){return aJ(this,"mediaerrorcode")}set mediaErrorCode(e){a0(this,"mediaerrorcode",e)}get mediaErrorMessage(){return a3(this,"mediaerrormessage")}set mediaErrorMessage(e){a4(this,"mediaerrormessage",e)}}l9=new WeakMap,n5.getSlotTemplateHTML=function(e){return`
652    <style>
653      :host {
654        background: rgb(20 20 30 / .8);
655      }
656
657      #content {
658        display: block;
659        padding: 1.2em 1.5em;
660      }
661
662      h3,
663      p {
664        margin-block: 0 .3em;
665      }
666    </style>
667    <slot name="error-${e.mediaerrorcode}" id="content">
668      ${n3({code:+e.mediaerrorcode,message:e.mediaerrormessage})}
669    </slot>
670  `},n5.formatErrorMessage=n3,ax.customElements.get("media-error-dialog")||ax.customElements.define("media-error-dialog",n5);let n9=`<svg aria-hidden="true" viewBox="0 0 26 24">
671  <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>
672</svg>`,n8=`<svg aria-hidden="true" viewBox="0 0 26 24">
673  <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>
674</svg>`,n6=aP.createElement("template");n6.innerHTML=`
675  <style>
676    :host([${ar.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) {
677      display: none !important;
678    }
679
680    
681    :host(:not([${ar.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) {
682      display: none !important;
683    }
684
685    :host([${ar.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter],
686    :host(:not([${ar.MEDIA_IS_FULLSCREEN}])) slot[name=tooltip-exit] {
687      display: none;
688    }
689  </style>
690
691  <slot name="icon">
692    <slot name="enter">${n9}</slot>
693    <slot name="exit">${n8}</slot>
694  </slot>
695`;let n7=`
696  <slot name="tooltip-enter">${aS("Enter fullscreen mode")}</slot>
697  <slot name="tooltip-exit">${aS("Exit fullscreen mode")}</slot>
698`,se=e=>{let t=e.mediaIsFullscreen?aS("exit fullscreen mode"):aS("enter fullscreen mode");e.setAttribute("aria-label",t)};class st extends nl{static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_IS_FULLSCREEN,ar.MEDIA_FULLSCREEN_UNAVAILABLE]}constructor(e={}){super({slotTemplate:n6,tooltipContent:n7,...e})}connectedCallback(){super.connectedCallback(),se(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===ar.MEDIA_IS_FULLSCREEN&&se(this)}get mediaFullscreenUnavailable(){return a3(this,ar.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){a4(this,ar.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return a1(this,ar.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){a2(this,ar.MEDIA_IS_FULLSCREEN,e)}handleClick(){let e=this.mediaIsFullscreen?ae.MEDIA_EXIT_FULLSCREEN_REQUEST:ae.MEDIA_ENTER_FULLSCREEN_REQUEST;this.dispatchEvent(new ax.CustomEvent(e,{composed:!0,bubbles:!0}))}}ax.customElements.get("media-fullscreen-button")||ax.customElements.define("media-fullscreen-button",st);let{MEDIA_TIME_IS_LIVE:si,MEDIA_PAUSED:sa}=ar,{MEDIA_SEEK_TO_LIVE_REQUEST:sr,MEDIA_PLAY_REQUEST:sn}=ae,ss=aP.createElement("template");ss.innerHTML=`
699  <style>
700  :host { --media-tooltip-display: none; }
701  
702  slot[name=indicator] > *,
703  :host ::slotted([slot=indicator]) {
704    
705    min-width: auto;
706    fill: var(--media-live-button-icon-color, rgb(140, 140, 140));
707    color: var(--media-live-button-icon-color, rgb(140, 140, 140));
708  }
709
710  :host([${si}]:not([${sa}])) slot[name=indicator] > *,
711  :host([${si}]:not([${sa}])) ::slotted([slot=indicator]) {
712    fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));
713    color: var(--media-live-button-indicator-color, rgb(255, 0, 0));
714  }
715
716  :host([${si}]:not([${sa}])) {
717    cursor: var(--media-cursor, not-allowed);
718  }
719
720  slot[name=text]{
721    text-transform: uppercase;
722  }
723
724  </style>
725
726  <slot name="indicator"><svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg></slot>
727  
728  <slot name="spacer">&nbsp;</slot><slot name="text">${aS("live")}</slot>
729`;let so=e=>{let t=e.mediaPaused||!e.mediaTimeIsLive,i=t?aS("seek to live"):aS("playing live");e.setAttribute("aria-label",i),t?e.removeAttribute("aria-disabled"):e.setAttribute("aria-disabled","true")};class sl extends nl{static get observedAttributes(){return[...super.observedAttributes,sa,si]}constructor(e={}){super({slotTemplate:ss,...e})}connectedCallback(){so(this),super.connectedCallback()}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),so(this)}get mediaPaused(){return a1(this,ar.MEDIA_PAUSED)}set mediaPaused(e){a2(this,ar.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return a1(this,ar.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){a2(this,ar.MEDIA_TIME_IS_LIVE,e)}handleClick(){(this.mediaPaused||!this.mediaTimeIsLive)&&(this.dispatchEvent(new ax.CustomEvent(sr,{composed:!0,bubbles:!0})),this.hasAttribute(sa)&&this.dispatchEvent(new ax.CustomEvent(sn,{composed:!0,bubbles:!0})))}}ax.customElements.get("media-live-button")||ax.customElements.define("media-live-button",sl);var sd=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},su=(e,t,i)=>(sd(e,t,"read from private field"),i?i.call(e):t.get(e)),sc=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},sh=(e,t,i,a)=>(sd(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let sm={LOADING_DELAY:"loadingdelay",NO_AUTOHIDE:"noautohide"},sp=aP.createElement("template"),sv=`
730<svg aria-hidden="true" viewBox="0 0 100 100">
731  <path d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">
732    <animateTransform
733       attributeName="transform"
734       attributeType="XML"
735       type="rotate"
736       dur="1s"
737       from="0 50 50"
738       to="360 50 50"
739       repeatCount="indefinite" />
740  </path>
741</svg>
742`;sp.innerHTML=`
743<style>
744:host {
745  display: var(--media-control-display, var(--media-loading-indicator-display, inline-block));
746  vertical-align: middle;
747  box-sizing: border-box;
748  --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, 500ms);
749}
750
751#status {
752  color: rgba(0,0,0,0);
753  width: 0px;
754  height: 0px;
755}
756
757:host slot[name=icon] > *,
758:host ::slotted([slot=icon]) {
759  opacity: var(--media-loading-indicator-opacity, 0);
760  transition: opacity 0.15s;
761}
762
763:host([${ar.MEDIA_LOADING}]:not([${ar.MEDIA_PAUSED}])) slot[name=icon] > *,
764:host([${ar.MEDIA_LOADING}]:not([${ar.MEDIA_PAUSED}])) ::slotted([slot=icon]) {
765  opacity: var(--media-loading-indicator-opacity, 1);
766  transition: opacity 0.15s var(--_loading-indicator-delay);
767}
768
769:host #status {
770  visibility: var(--media-loading-indicator-opacity, hidden);
771  transition: visibility 0.15s;
772}
773
774:host([${ar.MEDIA_LOADING}]:not([${ar.MEDIA_PAUSED}])) #status {
775  visibility: var(--media-loading-indicator-opacity, visible);
776  transition: visibility 0.15s var(--_loading-indicator-delay);
777}
778
779svg, img, ::slotted(svg), ::slotted(img) {
780  width: var(--media-loading-indicator-icon-width);
781  height: var(--media-loading-indicator-icon-height, 100px);
782  fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
783  vertical-align: middle;
784}
785</style>
786
787<slot name="icon">${sv}</slot>
788<div id="status" role="status" aria-live="polite">${aS("media loading")}</div>
789`;class sE extends ax.HTMLElement{constructor(){if(super(),sc(this,l8,void 0),sc(this,l6,500),!this.shadowRoot){let e=this.attachShadow({mode:"open"}),t=sp.content.cloneNode(!0);e.appendChild(t)}}static get observedAttributes(){return[at.MEDIA_CONTROLLER,ar.MEDIA_PAUSED,ar.MEDIA_LOADING,sm.LOADING_DELAY]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===sm.LOADING_DELAY&&t!==i?this.loadingDelay=Number(i):e===at.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=su(this,l8))?void 0:a.unassociateElement)||r.call(a,this),sh(this,l8,null)),i&&this.isConnected&&(sh(this,l8,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=su(this,l8))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let a=this.getAttribute(at.MEDIA_CONTROLLER);a&&(sh(this,l8,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=su(this,l8))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=su(this,l8))?void 0:e.unassociateElement)||t.call(e,this),sh(this,l8,null)}get loadingDelay(){return su(this,l6)}set loadingDelay(e){sh(this,l6,e);let{style:t}=az(this.shadowRoot,":host");t.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return a1(this,ar.MEDIA_PAUSED)}set mediaPaused(e){a2(this,ar.MEDIA_PAUSED,e)}get mediaLoading(){return a1(this,ar.MEDIA_LOADING)}set mediaLoading(e){a2(this,ar.MEDIA_LOADING,e)}get mediaController(){return a3(this,at.MEDIA_CONTROLLER)}set mediaController(e){a4(this,at.MEDIA_CONTROLLER,e)}get noAutohide(){return a1(this,sm.NO_AUTOHIDE)}set noAutohide(e){a2(this,sm.NO_AUTOHIDE,e)}}l8=new WeakMap,l6=new WeakMap,ax.customElements.get("media-loading-indicator")||ax.customElements.define("media-loading-indicator",sE);let{MEDIA_VOLUME_LEVEL:sb}=ar,sf=`<svg aria-hidden="true" viewBox="0 0 24 24">
790  <path d="M16.5 12A4.5 4.5 0 0 0 14 8v2.18l2.45 2.45a4.22 4.22 0 0 0 .05-.63Zm2.5 0a6.84 6.84 0 0 1-.54 2.64L20 16.15A8.8 8.8 0 0 0 21 12a9 9 0 0 0-7-8.77v2.06A7 7 0 0 1 19 12ZM4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25A6.92 6.92 0 0 1 14 18.7v2.06A9 9 0 0 0 17.69 19l2 2.05L21 19.73l-9-9L4.27 3ZM12 4 9.91 6.09 12 8.18V4Z"/>
791</svg>`,sg=`<svg aria-hidden="true" viewBox="0 0 24 24">
792  <path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4Z"/>
793</svg>`,s_=`<svg aria-hidden="true" viewBox="0 0 24 24">
794  <path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4ZM14 3.23v2.06a7 7 0 0 1 0 13.42v2.06a9 9 0 0 0 0-17.54Z"/>
795</svg>`,sy=aP.createElement("template");sy.innerHTML=`
796  <style>
797  
798  :host(:not([${sb}])) slot[name=icon] slot:not([name=high]), 
799  :host([${sb}=high]) slot[name=icon] slot:not([name=high]) {
800    display: none !important;
801  }
802
803  :host([${sb}=off]) slot[name=icon] slot:not([name=off]) {
804    display: none !important;
805  }
806
807  :host([${sb}=low]) slot[name=icon] slot:not([name=low]) {
808    display: none !important;
809  }
810
811  :host([${sb}=medium]) slot[name=icon] slot:not([name=medium]) {
812    display: none !important;
813  }
814
815  :host(:not([${sb}=off])) slot[name=tooltip-unmute],
816  :host([${sb}=off]) slot[name=tooltip-mute] {
817    display: none;
818  }
819  </style>
820
821  <slot name="icon">
822    <slot name="off">${sf}</slot>
823    <slot name="low">${sg}</slot>
824    <slot name="medium">${sg}</slot>
825    <slot name="high">${s_}</slot>
826  </slot>
827`;let sT=`
828  <slot name="tooltip-mute">${aS("Mute")}</slot>
829  <slot name="tooltip-unmute">${aS("Unmute")}</slot>
830`,sA=e=>{let t="off"===e.mediaVolumeLevel?aS("unmute"):aS("mute");e.setAttribute("aria-label",t)};class sk extends nl{static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_VOLUME_LEVEL]}constructor(e={}){super({slotTemplate:sy,tooltipContent:sT,...e})}connectedCallback(){sA(this),super.connectedCallback()}attributeChangedCallback(e,t,i){e===ar.MEDIA_VOLUME_LEVEL&&sA(this),super.attributeChangedCallback(e,t,i)}get mediaVolumeLevel(){return a3(this,ar.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){a4(this,ar.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e="off"===this.mediaVolumeLevel?ae.MEDIA_UNMUTE_REQUEST:ae.MEDIA_MUTE_REQUEST;this.dispatchEvent(new ax.CustomEvent(e,{composed:!0,bubbles:!0}))}}ax.customElements.get("media-mute-button")||ax.customElements.define("media-mute-button",sk);let sw=`<svg aria-hidden="true" viewBox="0 0 28 24">
831  <path d="M24 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Zm-1 16H5V5h18v14Zm-3-8h-7v5h7v-5Z"/>
832</svg>`,sS=aP.createElement("template");sS.innerHTML=`
833  <style>
834  :host([${ar.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) {
835    display: none !important;
836  }
837
838  
839  :host(:not([${ar.MEDIA_IS_PIP}])) slot[name=icon] slot:not([name=enter]) {
840    display: none !important;
841  }
842
843  :host([${ar.MEDIA_IS_PIP}]) slot[name=tooltip-enter],
844  :host(:not([${ar.MEDIA_IS_PIP}])) slot[name=tooltip-exit] {
845    display: none;
846  }
847  </style>
848
849  <slot name="icon">
850    <slot name="enter">${sw}</slot>
851    <slot name="exit">${sw}</slot>
852  </slot>
853`;let sI=`
854  <slot name="tooltip-enter">${aS("Enter picture in picture mode")}</slot>
855  <slot name="tooltip-exit">${aS("Exit picture in picture mode")}</slot>
856`,sR=e=>{let t=e.mediaIsPip?aS("exit picture in picture mode"):aS("enter picture in picture mode");e.setAttribute("aria-label",t)};class sC extends nl{static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_IS_PIP,ar.MEDIA_PIP_UNAVAILABLE]}constructor(e={}){super({slotTemplate:sS,tooltipContent:sI,...e})}
856connectedCallback(){sR(this),super.connectedCallback()}attributeChangedCallback(e,t,i){e===ar.MEDIA_IS_PIP&&sR(this),super.attributeChangedCallback(e,t,i)}get mediaPipUnavailable(){return a3(this,ar.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){a4(this,ar.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return a1(this,ar.MEDIA_IS_PIP)}set mediaIsPip(e){a2(this,ar.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?ae.MEDIA_EXIT_PIP_REQUEST:ae.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new ax.CustomEvent(e,{composed:!0,bubbles:!0}))}}ax.customElements.get("media-pip-button")||ax.customElements.define("media-pip-button",sC);var sD=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)};let sL={RATES:"rates"},sM=[1,1.2,1.5,1.7,2],sO=aP.createElement("template");sO.innerHTML=`
857  <style>
858    :host {
859      min-width: 5ch;
860      padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
861    }
862  </style>
863  <slot name="icon"></slot>
864`;class sN extends nl{constructor(e={}){super({slotTemplate:sO,tooltipContent:aS("Playback rate"),...e}),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,l7,new rp(this,sL.RATES,{defaultValue:sM})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML="1x"}static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_PLAYBACK_RATE,sL.RATES]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===sL.RATES&&(sD(this,l7).value=i),e===ar.MEDIA_PLAYBACK_RATE){let e=i?+i:NaN,t=Number.isNaN(e)?1:e;this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",aS("Playback rate {playbackRate}",{playbackRate:t}))}}get rates(){return sD(this,l7)}set rates(e){e?Array.isArray(e)&&(sD(this,l7).value=e.join(" ")):sD(this,l7).value=""}get mediaPlaybackRate(){return aJ(this,ar.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){a0(this,ar.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;let i=Array.from(this.rates.values(),e=>+e).sort((e,t)=>e-t),a=null!=(t=null!=(e=i.find(e=>e>this.mediaPlaybackRate))?e:i[0])?t:1,r=new ax.CustomEvent(ae.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(r)}}l7=new WeakMap,ax.customElements.get("media-playback-rate-button")||ax.customElements.define("media-playback-rate-button",sN);let sx=`<svg aria-hidden="true" viewBox="0 0 24 24">
865  <path d="m6 21 15-9L6 3v18Z"/>
866</svg>`,sP=`<svg aria-hidden="true" viewBox="0 0 24 24">
867  <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>
868</svg>`,sU=aP.createElement("template");sU.innerHTML=`
869  <style>
870    :host([${ar.MEDIA_PAUSED}]) slot[name=pause],
871    :host(:not([${ar.MEDIA_PAUSED}])) slot[name=play] {
872      display: none !important;
873    }
874
875    :host([${ar.MEDIA_PAUSED}]) slot[name=tooltip-pause],
876    :host(:not([${ar.MEDIA_PAUSED}])) slot[name=tooltip-play] {
877      display: none;
878    }
879  </style>
880
881  <slot name="icon">
882    <slot name="play">${sx}</slot>
883    <slot name="pause">${sP}</slot>
884  </slot>
885`;let sB=`
886  <slot name="tooltip-play">${aS("Play")}</slot>
887  <slot name="tooltip-pause">${aS("Pause")}</slot>
888`,sW=e=>{let t=e.mediaPaused?aS("play"):aS("pause");e.setAttribute("aria-label",t)};class sH extends nl{static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_PAUSED,ar.MEDIA_ENDED]}constructor(e={}){super({slotTemplate:sU,tooltipContent:sB,...e})}connectedCallback(){sW(this),super.connectedCallback()}attributeChangedCallback(e,t,i){e===ar.MEDIA_PAUSED&&sW(this),super.attributeChangedCallback(e,t,i)}get mediaPaused(){return a1(this,ar.MEDIA_PAUSED)}set mediaPaused(e){a2(this,ar.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?ae.MEDIA_PLAY_REQUEST:ae.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new ax.CustomEvent(e,{composed:!0,bubbles:!0}))}}ax.customElements.get("media-play-button")||ax.customElements.define("media-play-button",sH);let sV={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"},sF=aP.createElement("template");sF.innerHTML=`
889  <style>
890    :host {
891      pointer-events: none;
892      display: var(--media-poster-image-display, inline-block);
893      box-sizing: border-box;
894    }
895
896    img {
897      max-width: 100%;
898      max-height: 100%;
899      min-width: 100%;
900      min-height: 100%;
901      background-repeat: no-repeat;
902      background-position: var(--media-poster-image-background-position, var(--media-object-position, center));
903      background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain));
904      object-fit: var(--media-object-fit, contain);
905      object-position: var(--media-object-position, center);
906    }
907  </style>
908
909  <img part="poster img" aria-hidden="true" id="image"/>
910`;class sq extends ax.HTMLElement{static get observedAttributes(){return[sV.PLACEHOLDER_SRC,sV.SRC]}constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(sF.content.cloneNode(!0))),this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,i){if(e===sV.SRC&&(null==i?this.image.removeAttribute(sV.SRC):this.image.setAttribute(sV.SRC,i)),e===sV.PLACEHOLDER_SRC)if(null==i)this.image.style.removeProperty("background-image");else{var a;a=this.image,a.style["background-image"]=`url('${i}')`}}get placeholderSrc(){return a3(this,sV.PLACEHOLDER_SRC)}set placeholderSrc(e){a4(this,sV.SRC,e)}get src(){return a3(this,sV.SRC)}set src(e){a4(this,sV.SRC,e)}}ax.customElements.get("media-poster-image")||ax.customElements.define("media-poster-image",sq);var s$=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};class sK extends nQ{constructor(){super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,de,void 0),((e,t,i,a)=>(s$(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,de,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_PREVIEW_CHAPTER]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===ar.MEDIA_PREVIEW_CHAPTER&&i!==t&&null!=i){var a,r;(s$(this,a=de,"read from private field"),r?r.call(this):a.get(this)).textContent=i,""!==i?this.setAttribute("aria-valuetext",`chapter: ${i}`):this.removeAttribute("aria-valuetext")}}get mediaPreviewChapter(){return a3(this,ar.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){a4(this,ar.MEDIA_PREVIEW_CHAPTER,e)}}de=new WeakMap,ax.customElements.get("media-preview-chapter-display")||ax.customElements.define("media-preview-chapter-display",sK);var sY=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sG=(e,t,i)=>(sY(e,t,"read from private field"),i?i.call(e):t.get(e)),sj=(e,t,i,a)=>(sY(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let sQ=aP.createElement("template");sQ.innerHTML=`
911  <style>
912    :host {
913      box-sizing: border-box;
914      display: var(--media-control-display, var(--media-preview-thumbn
914ail-display, inline-block));
915      overflow: hidden;
916    }
917
918    img {
919      display: none;
920      position: relative;
921    }
922  </style>
923  <img crossorigin loading="eager" decoding="async">
924`;class sZ extends ax.HTMLElement{constructor(){super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,dt,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(sQ.content.cloneNode(!0)))}static get observedAttributes(){return[at.MEDIA_CONTROLLER,ar.MEDIA_PREVIEW_IMAGE,ar.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t,i;let a=this.getAttribute(at.MEDIA_CONTROLLER);a&&(sj(this,dt,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=sG(this,dt))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=sG(this,dt))?void 0:e.unassociateElement)||t.call(e,this),sj(this,dt,null)}attributeChangedCallback(e,t,i){var a,r,n,s,o;[ar.MEDIA_PREVIEW_IMAGE,ar.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===at.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=sG(this,dt))?void 0:a.unassociateElement)||r.call(a,this),sj(this,dt,null)),i&&this.isConnected&&(sj(this,dt,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=sG(this,dt))?void 0:s.associateElement)||o.call(s,this)))}get mediaPreviewImage(){return a3(this,ar.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){a4(this,ar.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(ar.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(e=>+e)}set mediaPreviewCoords(e){if(!e)return void this.removeAttribute(ar.MEDIA_PREVIEW_COORDS);this.setAttribute(ar.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){let e=this.mediaPreviewCoords,t=this.mediaPreviewImage;if(!(e&&t))return;let[i,a,r,n]=e,s=t.split("#")[0],{maxWidth:o,maxHeight:l,minWidth:d,minHeight:u}=getComputedStyle(this),c=Math.min(parseInt(o)/r,parseInt(l)/n),h=Math.max(parseInt(d)/r,parseInt(u)/n),m=c<1,p=m?c:h>1?h:1,{style:E}=az(this.shadowRoot,":host"),b=az(this.shadowRoot,"img").style,f=this.shadowRoot.querySelector("img"),g=m?"min":"max";E.setProperty(`${g}-width`,"initial","important"),E.setProperty(`${g}-height`,"initial","important"),E.width=`${r*p}px`,E.height=`${n*p}px`;let _=()=>{b.width=`${this.imgWidth*p}px`,b.height=`${this.imgHeight*p}px`,b.display="block"};f.src!==s&&(f.onload=()=>{this.imgWidth=f.naturalWidth,this.imgHeight=f.naturalHeight,_()},f.src=s,_()),_(),b.transform=`translate(-${i*p}px, -${a*p}px)`}}dt=new WeakMap,ax.customElements.get("media-preview-thumbnail")||ax.customElements.define("media-preview-thumbnail",sZ);var sz=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sX=(e,t,i)=>(sz(e,t,"read from private field"),i?i.call(e):t.get(e));class sJ extends nQ{constructor(){super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,di,void 0),((e,t,i,a)=>(sz(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,di,this.shadowRoot.querySelector("slot")),sX(this,di).textContent=aT(0)}static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===ar.MEDIA_PREVIEW_TIME&&null!=i&&(sX(this,di).textContent=aT(parseFloat(i)))}get mediaPreviewTime(){return aJ(this,ar.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){a0(this,ar.MEDIA_PREVIEW_TIME,e)}}di=new WeakMap,ax.customElements.get("media-preview-time-display")||ax.customElements.define("media-preview-time-display",sJ);let s0={SEEK_OFFSET:"seekoffset"},s1=aP.createElement("template");s1.innerHTML=`
925  <slot name="icon"><svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(2.18 19.87)">30</text><path d="M10 6V3L4.37 7 10 10.94V8a5.54 5.54 0 0 1 1.9 10.48v2.12A7.5 7.5 0 0 0 10 6Z"/></svg></slot>
926`;class s2 extends nl{static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_CURRENT_TIME,s0.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:s1,tooltipContent:aS("Seek backward"),...e})}connectedCallback(){this.seekOffset=aJ(this,s0.SEEK_OFFSET,30),super.connectedCallback()}attributeChangedCallback(e,t,i){e===s0.SEEK_OFFSET&&(this.seekOffset=aJ(this,s0.SEEK_OFFSET,30)),super.attributeChangedCallback(e,t,i)}get seekOffset(){return aJ(this,s0.SEEK_OFFSET,30)}set seekOffset(e){a0(this,s0.SEEK_OFFSET,e),this.setAttribute("aria-label",aS("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),a$(aK(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return aJ(this,ar.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){a0(this,ar.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new ax.CustomEvent(ae.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}ax.customElements.get("media-seek-backward-button")||ax.customElements.define("media-seek-backward-button",s2);let s3={SEEK_OFFSET:"seekoffset"},s4=aP.createElement("template");s4.innerHTML=`
927  <slot name="icon"><svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(8.9 19.87)">30</text><path d="M10 6V3l5.61 4L10 10.94V8a5.54 5.54 0 0 0-1.9 10.48v2.12A7.5 7.5 0 0 1 10 6Z"/></svg></slot>
928`;class s5 extends nl{static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_CURRENT_TIME,s3.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:s4,tooltipContent:aS("Seek forward"),...e})}connectedCallback(){this.seekOffset=aJ(this,s3.SEEK_OFFSET,30),super.connectedCallback()}attributeChangedCallback(e,t,i){e===s3.SEEK_OFFSET&&(this.seekOffset=aJ(this,s3.SEEK_OFFSET,30)),super.attributeChangedCallback(e,t,i)}get seekOffset(){return aJ(this,s3.SEEK_OFFSET,30)}set seekOffset(e){a0(this,s3.SEEK_OFFSET,e),this.setAttribute("aria-label",aS("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),a$(aK(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return aJ(this,ar.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){a0(this,ar.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,t=new ax.CustomEvent(ae.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}ax.customElements.get("media-seek-forward-button")||ax.customElements.define("media-seek-forward-button",s5);var s9=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},s8=(e,t,i)=>(s9(e,t,"read from private field"),i?i.call(e):t.get(e));let s6={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},s7=[...Object.values(s6),ar.MEDIA_CURRENT_TIME,ar.MEDIA_DURATION,ar.MEDIA_SEEKABLE],oe=["Enter"," "],ot="&nbsp;/&nbsp;",oi=(e,{timesSep:t=ot}={})=>{var i,a;let r=e.hasAttribute(s6.REMAINING),n=e.hasAttribute(s6.SHOW_DURATION),s=null!=(i=e.mediaCurrentTime)?i:0,[,o]=null!=(a=e.mediaSeekable)?a:[],l=0;Number.isFinite(e.mediaDuration)?l=e.mediaDuration:Number.isFinite(o)&&
928(l=o);let d=r?aT(0-(l-s)):aT(s);return n?`${d}${t}${aT(l)}`:d};class oa extends nQ{constructor(){super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,da,void 0),((e,t,i,a)=>(s9(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,da,this.shadowRoot.querySelector("slot")),s8(this,da).innerHTML=`${oi(this)}`}static get observedAttributes(){return[...super.observedAttributes,...s7,"disabled"]}connectedCallback(){let{style:e}=az(this.shadowRoot,":host(:hover:not([notoggle]))");e.setProperty("cursor","var(--media-cursor, pointer)"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))"),this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",aS("playback time"));let t=e=>{let{key:i}=e;if(!oe.includes(i))return void this.removeEventListener("keyup",t);this.toggleTimeDisplay()};this.addEventListener("keydown",e=>{let{metaKey:i,altKey:a,key:r}=e;if(i||a||!oe.includes(r))return void this.removeEventListener("keyup",t);this.addEventListener("keyup",t)}),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,t,i){s7.includes(e)?this.update():"disabled"===e&&i!==t&&(null==i?this.enable():this.disable()),super.attributeChangedCallback(e,t,i)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return a1(this,s6.REMAINING)}set remaining(e){a2(this,s6.REMAINING,e)}get showDuration(){return a1(this,s6.SHOW_DURATION)}set showDuration(e){a2(this,s6.SHOW_DURATION,e)}get noToggle(){return a1(this,s6.NO_TOGGLE)}set noToggle(e){a2(this,s6.NO_TOGGLE,e)}get mediaDuration(){return aJ(this,ar.MEDIA_DURATION)}set mediaDuration(e){a0(this,ar.MEDIA_DURATION,e)}get mediaCurrentTime(){return aJ(this,ar.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){a0(this,ar.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(ar.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){if(null==e)return void this.removeAttribute(ar.MEDIA_SEEKABLE);this.setAttribute(ar.MEDIA_SEEKABLE,e.join(":"))}update(){let e=oi(this);(e=>{var t;let i=e.mediaCurrentTime,[,a]=null!=(t=e.mediaSeekable)?t:[],r=null;if(Number.isFinite(e.mediaDuration)?r=e.mediaDuration:Number.isFinite(a)&&(r=a),null==i||null===r)return e.setAttribute("aria-valuetext","video not loaded, unknown time.");let n=e.hasAttribute(s6.REMAINING),s=e.hasAttribute(s6.SHOW_DURATION),o=n?ay(0-(r-i)):ay(i);if(!s)return e.setAttribute("aria-valuetext",o);let l=ay(r),d=`${o} of ${l}`;e.setAttribute("aria-valuetext",d)})(this),e!==s8(this,da).innerHTML&&(s8(this,da).innerHTML=e)}}da=new WeakMap,ax.customElements.get("media-time-display")||ax.customElements.define("media-time-display",oa);var or=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},on=(e,t,i)=>(or(e,t,"read from private field"),i?i.call(e):t.get(e)),os=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},oo=(e,t,i,a)=>(or(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class ol{constructor(e,t,i){os(this,dr,void 0),os(this,dn,void 0),os(this,ds,void 0),os(this,dl,void 0),os(this,dd,void 0),os(this,du,void 0),os(this,dc,void 0),os(this,dh,void 0),os(this,dm,0),os(this,dp,(e=performance.now())=>{oo(this,dm,requestAnimationFrame(on(this,dp))),oo(this,dl,performance.now()-on(this,ds));let t=1e3/this.fps;if(on(this,dl)>t){oo(this,ds,e-on(this,dl)%t);let i=1e3/((e-on(this,dn))/++((e,t,i,a)=>({set _(value){oo(e,t,value,i)},get _(){return on(e,t,a)}}))(this,dd)._),a=(e-on(this,du))/1e3/this.duration,r=on(this,dc)+a*this.playbackRate;r-on(this,dr).valueAsNumber>0?oo(this,dh,this.playbackRate/this.duration/i):(oo(this,dh,.995*on(this,dh)),r=on(this,dr).valueAsNumber+on(this,dh)),this.callback(r)}}),oo(this,dr,e),this.callback=t,this.fps=i}start(){0===on(this,dm)&&(oo(this,ds,performance.now()),oo(this,dn,on(this,ds)),oo(this,dd,0),on(this,dp).call(this))}stop(){0!==on(this,dm)&&(cancelAnimationFrame(on(this,dm)),oo(this,dm,0))}update({start:e,duration:t,playbackRate:i}){let a=e-on(this,dr).valueAsNumber,r=Math.abs(t-this.duration);(a>0||a<-.03||r>=.5)&&this.callback(e),oo(this,dc,e),oo(this,du,performance.now()),this.duration=t,this.playbackRate=i}}dr=new WeakMap,dn=new WeakMap,ds=new WeakMap,dl=new WeakMap,dd=new WeakMap,du=new WeakMap,dc=new WeakMap,dh=new WeakMap,dm=new WeakMap,dp=new WeakMap;var od=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ou=(e,t,i)=>(od(e,t,"read from private field"),i?i.call(e):t.get(e)),oc=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},oh=(e,t,i,a)=>(od(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),om=(e,t,i)=>(od(e,t,"access private method"),i);let op=aP.createElement("template");op.innerHTML=`
929  <style>
930    :host {
931      --media-box-border-radius: 4px;
932      --media-box-padding-left: 10px;
933      --media-box-padding-right: 10px;
934      --media-preview-border-radius: var(--media-box-border-radius);
935      --media-box-arrow-offset: var(--media-box-border-radius);
936      --_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
937      --_preview-background: var(--media-preview-background, var(--_control-background));
938
939      
940      contain: layout;
941    }
942
943    #buffered {
944      background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4));
945      position: absolute;
946      height: 100%;
947      will-change: width;
948    }
949
950    #preview-rail,
951    #current-rail {
952      width: 100%;
953      position: absolute;
954      left: 0;
955      bottom: 100%;
956      pointer-events: none;
957      will-change: transform;
958    }
959
960    [part~="box"] {
961      width: min-content;
962      
963      position: absolute;
964      bottom: 100%;
965      flex-direction: column;
966      align-items: center;
967      transform: translateX(-50%);
968    }
969
970    [part~="current-box"] {
971      display: var(--media-current-box-display, var(--media-box-display, flex));
972      margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px));
973      visibility: hidden;
974    }
975
976    [part~="preview-box"] {
977      display: var(--media-preview-box-display, var(--media-box-display, flex));
978      margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px));
979      transition-property: var(--media-preview-transition-property, visibility, opacity);
980      transition-duration: var(--media-preview-transition-duration-out, .25s);
981      transition-delay: var(--media-preview-transition-delay-out, 0s);
982      visibility: hidden;
983      opacity: 0;
984    }
985
986    :host(:is([${ar.MEDIA_PREVIEW_IMAGE}], [${ar.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] {
987      transition-duration: var(--media-preview-transition-duration-in, .5s);
988      transition-delay: var(--media-preview-transition-delay-in, .25s);
989      visibility: visible;
990      opacity: 1;
991    }
992
993    @media (hover: hover) {
994      :host(:is([${ar.MEDIA_PREVIEW_IMAGE}], [${ar.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] {
995        transition-duration: var(--media-preview-transition-duration-in, .5s);
996        transition-delay: var(--media-preview-transition-delay-in, .25s);
997        visibility: visible;
998        opacity: 1;
999      }
1000    }
1001
1002    media-preview-thumbnail,
1003    ::slotted(media-preview-thumbnail) {
1004      visibility: hidden;
1005      
1006      transition: visibility 0s .25s;
1007      transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
1008      background: var(--media-preview-thumbnail-background, var(--_preview-background));
1009      box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2));
1010      max-width: var(--media-preview-thumbnail-max-width, 180px);
1011      max-height: var(--media-preview-thumbnail-max-height, 160px);
1012      min-width: var(--media-preview-thumbnail-min-width, 120px);
1013      min-height: var(--media-preview-thumbnail-min-height, 80px);
1014      border: var(--media-preview-thumbnail-border);
1015      border-radius: var(--media-preview-thumbnail-border-radius,
1016        var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0);
1017    }
1018
1019    :host([${ar.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail,
1020    :host([${ar.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) {
1021      transition-delay: var(--media-preview-transition-delay-in, .25s);
1022      visibility: visible;
1023    }
1024
1025    @media (hover: hover) {
1026      :host([${ar.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail,
1027      :host([${ar.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) {
1028        transition-delay: var(--media-preview-transition-delay-in, .25s);
1029        visibility: visible;
1030      }
1031
1032      :host([${ar.MEDIA_PREVIEW_TIME}]:hover) {
1033        --media-time-range-hover-display: block;
1034      }
1035    }
1036
1037    media-preview-chapter-display,
1038    ::slotted(media-preview-chapter-display) {
1039      font-size: var(--media-font-size, 13px);
1040      line-height: 17px;
1041      min-width: 0;
1042      visibility: hidden;
1043      
1044      transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s;
1045      transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
1046      background: var(--media-preview-chapter-background, var(--_preview-background));
1047      border-radius: var(--media-preview-chapter-border-radius,
1048        var(--media-preview-border-radius) var(--media-preview-border-radius)
1049        var(--media-preview-border-radius) var(--media-preview-border-radius));
1050      padding: var(--media-preview-chapter-padding, 3.5px 9px);
1051      margin: var(--media-preview-chapter-margin, 0 0 5px);
1052      text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75));
1053    }
1054
1055    :host([${ar.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display,
1056    :host([${ar.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) {
1057      transition-delay: var(--media-preview-transition-delay-in, .25s);
1058      border-radius: var(--media-preview-chapter-border-radius, 0);
1059      padding: var(--media-preview-chapter-padding, 3.5px 9px 0);
1060      margin: var(--media-preview-chapter-margin, 0);
1061      min-width: 100%;
1062    }
1063
1064    media-preview-chapter-display[${ar.MEDIA_PREVIEW_CHAPTER}],
1065    ::slotted(media-preview-chapter-display[${ar.MEDIA_PREVIEW_CHAPTER}]) {
1066      visibility: visible;
1067    }
1068
1069    media-preview-chapter-display:not([aria-valuetext]),
1070    ::slotted(media-preview-chapter-display:not([aria-valuetext])) {
1071      display: none;
1072    }
1073
1074    media-preview-time-display,
1075    ::slotted(media-preview-time-display),
1076    media-time-display,
1077    ::slotted(media-time-display) {
1078      font-size: var(--media-font-size, 13px);
1079      line-height: 17px;
1080      min-width: 0;
1081      
1082      transition: min-width 0s, border-radius 0s;
1083      transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
1084      background: var(--media-preview-time-background, var(--_preview-background));
1085      border-radius: var(--media-preview-time-border-radius,
1086        var(--media-preview-border-radius) var(--media-preview-border-radius)
1087        var(--media-preview-border-radius) var(--media-preview-border-radius));
1088      padding: var(--media-preview-time-padding, 3.5px 9px);
1089      margin: var(--media-preview-time-margin, 0);
1090      text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75));
1091      transform: translateX(min(
1092        max(calc(50% - var(--_box-width) / 2),
1093        calc(var(--_box-shift, 0))),
1094        calc(var(--_box-width) / 2 - 50%)
1095      ));
1096    }
1097
1098    :host([${ar.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display,
1099    :host([${ar.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) {
1100      transition-delay: var(--media-preview-transition-delay-in, .25s);
1101      border-radius: var(--media-preview-time-border-radius,
1102        0 0 var(--media-preview-border-radius) var(--media-preview-border-radius));
1103      min-width: 100%;
1104    }
1105
1106    :host([${ar.MEDIA_PREVIEW_TIME}]:hover) {
1107      --media-time-range-hover-display: block;
1108    }
1109
1110    [part~="arrow"],
1111    ::slotted([part~="arrow"]) {
1112      display: var(--media-box-arrow-display, inline-block);
1113      transform: translateX(min(
1114        max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)),
1115        calc(var(--_box-shift, 0))),
1116        calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset))
1117      ));
1118      
1119      border-color: transparent;
1120      border-top-color: var(--media-box-arrow-background, var(--_control-background));
1121      border-width: var(--media-box-arrow-border-width,
1122        var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0);
1123      border-style: solid;
1124      justify-content: center;
1125      height: 0;
1126    }
1127  </style>
1128  <div id="preview-rail">
1129    <slot name="preview" part="box preview-box">
1130      <media-preview-thumbnail></media-preview-thumbnail>
1131      <media-preview-chapter-display></media-preview-chapter-display>
1132      <media-preview-time-display></media-preview-time-display>
1133      <slot name="preview-arrow"><div part="arrow"></div></slot>
1134    </slot>
1135  </div>
1136  <div id="current-rail">
1137    <slot name="current" part="box current-box">
1138      
1139    </slot>
1140  </div>
1141`;let ov=(e,t=e.mediaCurrentTime)=>{let i=Number.isFinite(e.mediaSeekableStart)?e.mediaSeekableStart:0,a=Number.isFinite(e.mediaDuration)?e.mediaDuration:e.mediaSeekableEnd;return Number.isNaN(a)?0:Math.max(0,Math.min((t-i)/(a-i),1))},oE=(e,t=e.range.valueAsNumber)=>{let i=Number.isFinite(e.mediaSeekableStart)?e.mediaSeekableStart:0,a=Number.isFinite(e.mediaDuration)?e.mediaDuration:e.mediaSeekableEnd;return Number.isNaN(a)?0:t*(a-i)+i};class ob extends nW{constructor(){super(),oc(this,dk),oc(this,dS),oc(this,dC),oc(this,dL),oc(this,dO),oc(this,dx),oc(this,dU),oc(this,dW),oc(this,dv,void 0),oc(this,dE,void 0),oc(this,db,void 0),oc(this,df,void 0),oc(this,dg,void 0),oc(this,d_,void 0),oc(this,dy,void 0),oc(this,dT,void 0),oc(this,dA,void 0),oc(this,dR,e=>{this.dragging||(ab(e)&&(this.range.valueAsNumber=e),this.updateBar())}),this.container.appendChild(op.content.cloneNode(!0)),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),oh(this,db,this.shadowRoot.querySelectorAll('[part~="box"]')),oh(this,dg,this.shadowRoot.querySelector('[part~="preview-box"]')),oh(this,d_,this.shadowRoot.querySelector('[part~="current-box"]'));let e=getComputedStyle(this);oh(this,dy,parseInt(e.getPropertyValue("--media-box-padding-left"))),oh(this,dT,parseInt(e.getPropertyValue("--media-box-padding-right"))),oh(this,dE,new ol(this.range,ou(this,dR),60))}static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_PAUSED,ar.MEDIA_DURATION,ar.MEDIA_SEEKABLE,ar.MEDIA_CURRENT_TIME,ar.MEDIA_PREVIEW_IMAGE,ar.MEDIA_PREVIEW_TIME,ar.MEDIA_PREVIEW_CHAPTER,ar.MEDIA_BUFFERED,ar.MEDIA_PLAYBACK_RATE,ar.MEDIA_LOADING,ar.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",aS("seek")),om(this,dk,dw).call(this),oh(this,dv,this.getRootNode()),null==(e=ou(this,dv))||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),om(this,dk,dw).call(this),null==(e=ou(this,dv))||e.removeEventListener("transitionstart",this),oh(this,dv,null)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),t!=i&&(e===ar.MEDIA_CURRENT_TIME||e===ar.MEDIA_PAUSED||e===ar.MEDIA_ENDED||e===ar.MEDIA_LOADING||e===ar.MEDIA_DURATION||e===ar.MEDIA_SEEKABLE?(ou(this,dE).update({start:ov(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),om(this,dk,dw).call(this),(e=>{let t=e.range,i=ay(+oE(e)),a=ay(+e.mediaSeekableEnd),r=i&&a?`${i} of ${a}`:"video not loaded, unknown time.";t.setAttribute("aria-valuetext",r)})(this)):e===ar.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===ar.MEDIA_DURATION||e===ar.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=ou(this,dA),this.updateBar()))}get mediaChaptersCues(){return ou(this,dA)}set mediaChaptersCues(e){var t;oh(this,dA,e),this.updateSegments(null==(t=ou(this,dA))?void 0:t.map(e=>({start:ov(this,e.startTime),end:ov(this,e.endTime)})))}get mediaPaused(){return a1(this,ar.MEDIA_PAUSED)}set mediaPaused(e){a2(this,ar.MEDIA_PAUSED,e)}get mediaLoading(){return a1(this,ar.MEDIA_LOADING)}set mediaLoading(e){a2(this,ar.MEDIA_LOADING,e)}get mediaDuration(){return aJ(this,ar.MEDIA_DURATION)}set mediaDuration(e){a0(this,ar.MEDIA_DURATION,e)}get mediaCurrentTime(){return aJ(this,ar.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){a0(this,ar.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return aJ(this,ar.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){a0(this,ar.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(ar.MEDIA_BUFFERED);return e?e.split(" ").map(e=>e.split(":").map(e=>+e)):[]}set mediaBuffered(e){if(!e)return void this.removeAttribute(ar.MEDIA_BUFFERED);let t=e.map(e=>e.join(":")).join(" ");this.setAttribute(ar.MEDIA_BUFFERED,t)}get mediaSeekable(){let e=this.getAttribute(ar.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){if(null==e)return void this.removeAttribute(ar.MEDIA_SEEKABLE);this.setAttribute(ar.MEDIA_SEEKABLE,e.join(":"))}get mediaSeekableEnd(){var e;let[,t=this.mediaDuration]=null!=(e=this.mediaSeekable)?e:[];return t}get mediaSeekableStart(){var e;let[t=0]=null!=(e=this.mediaSeekable)?e:[];return t}get mediaPreviewImage(){return a3(this,ar.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){a4(this,ar.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return aJ(this,ar.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){a0(this,ar.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return a1(this,ar.MEDIA_ENDED)}set mediaEnded(e){a2(this,ar.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;let t,i=this.mediaBuffered;if(!i.length)return;if(this.mediaEnded)t=1;else{let a=this.mediaCurrentTime,[,r=this.mediaSeekableStart]=null!=(e=i.find(([e,t])=>e<=a&&a<=t))?e:[];t=ov(this,r)}let{style:a}=az(this.shadowRoot,"#buffered");a.setProperty("width",`${100*t}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;let e=az(this.shadowRoot,"#current-rail"),t=az(this.shadowRoot,'[part~="current-box"]'),i=om(this,dC,dD).call(this,ou(this,d_)),a=om(this,dL,dM).call(this,i,this.range.valueAsNumber),r=om(this,dO,dN).call(this,i,this.range.valueAsNumber);e.style.transform=`translateX(${a})`,e.style.setProperty("--_range-width",`${i.range.width}`),t.style.setProperty("--_box-shift",`${r}`),t.style.setProperty("--_box-width",`${i.box.width}px`),t.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":om(this,dW,dH).c
1141all(this);break;case"pointermove":om(this,dx,dP).call(this,e);break;case"pointerup":case"pointerleave":om(this,dU,dB).call(this,null);break;case"transitionstart":aY(e.target,this)&&setTimeout(()=>om(this,dk,dw).call(this),0)}}}dv=new WeakMap,dE=new WeakMap,db=new WeakMap,df=new WeakMap,dg=new WeakMap,d_=new WeakMap,dy=new WeakMap,dT=new WeakMap,dA=new WeakMap,dk=new WeakSet,dw=function(){om(this,dS,dI).call(this)?ou(this,dE).start():ou(this,dE).stop()},dS=new WeakSet,dI=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&aZ(this)},dR=new WeakMap,dC=new WeakSet,dD=function(e){var t;let i=(null!=(t=this.getAttribute("bounds")?aG(this,`#${this.getAttribute("bounds")}`):this.parentElement)?t:this).getBoundingClientRect(),a=this.range.getBoundingClientRect(),r=e.offsetWidth,n=-(a.left-i.left-r/2),s=i.right-a.left-r/2;return{box:{width:r,min:n,max:s},bounds:i,range:a}},dL=new WeakSet,dM=function(e,t){let i=`${100*t}%`,{width:a,min:r,max:n}=e.box;if(!a)return i;if(!Number.isNaN(r)){let e=`calc(1 / var(--_range-width) * 100 * ${r}% + var(--media-box-padding-left))`;i=`max(${e}, ${i})`}if(!Number.isNaN(n)){let e=`calc(1 / var(--_range-width) * 100 * ${n}% - var(--media-box-padding-right))`;i=`min(${i}, ${e})`}return i},dO=new WeakSet,dN=function(e,t){let{width:i,min:a,max:r}=e.box,n=t*e.range.width;if(n<a+ou(this,dy)){let t=e.range.left-e.bounds.left-ou(this,dy);return`${n-i/2+t}px`}if(n>r-ou(this,dT)){let t=e.bounds.right-e.range.right-ou(this,dT);return`${n+i/2-t-e.range.width}px`}return 0},dx=new WeakSet,dP=function(e){let t=[...ou(this,db)].some(t=>e.composedPath().includes(t));if(!this.dragging&&(t||!e.composedPath().includes(this)))return void om(this,dU,dB).call(this,null);let i=this.mediaSeekableEnd;if(!i)return;let a=az(this.shadowRoot,"#preview-rail"),r=az(this.shadowRoot,'[part~="preview-box"]'),n=om(this,dC,dD).call(this,ou(this,dg)),s=(e.clientX-n.range.left)/n.range.width;s=Math.max(0,Math.min(1,s));let o=om(this,dL,dM).call(this,n,s),l=om(this,dO,dN).call(this,n,s);a.style.transform=`translateX(${o})`,a.style.setProperty("--_range-width",`${n.range.width}`),r.style.setProperty("--_box-shift",`${l}`),r.style.setProperty("--_box-width",`${n.box.width}px`),1>Math.abs(Math.round(ou(this,df))-Math.round(s*i))&&s>.01&&s<.99||(oh(this,df,s*i),om(this,dU,dB).call(this,ou(this,df)))},dU=new WeakSet,dB=function(e){this.dispatchEvent(new ax.CustomEvent(ae.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:e}))},dW=new WeakSet,dH=function(){ou(this,dE).stop();let e=oE(this);this.dispatchEvent(new ax.CustomEvent(ae.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e}))},ax.customElements.get("media-time-range")||ax.customElements.define("media-time-range",ob);let of={PLACEMENT:"placement",BOUNDS:"bounds"},og=aP.createElement("template");og.innerHTML=`
1142  <style>
1143    :host {
1144      --_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7)));
1145      --_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color));
1146      --_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2);
1147      --_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px);
1148      --_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color));
1149      position: relative;
1150      pointer-events: none;
1151      display: var(--media-tooltip-display, inline-flex);
1152      justify-content: center;
1153      align-items: center;
1154      box-sizing: border-box;
1155      z-index: var(--media-tooltip-z-index, 1);
1156      background: var(--_tooltip-background);
1157      color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
1158      font: var(--media-font,
1159        var(--media-font-weight, 400)
1160        var(--media-font-size, 13px) /
1161        var(--media-text-content-height, var(--media-control-height, 18px))
1162        var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
1163      padding: var(--media-tooltip-padding, .35em .7em);
1164      border: var(--media-tooltip-border, none);
1165      border-radius: var(--media-tooltip-border-radius, 5px);
1166      filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2)));
1167      white-space: var(--media-tooltip-white-space, nowrap);
1168    }
1169
1170    :host([hidden]) {
1171      display: none;
1172    }
1173
1174    img, svg {
1175      display: inline-block;
1176    }
1177
1178    #arrow {
1179      position: absolute;
1180      width: 0px;
1181      height: 0px;
1182      border-style: solid;
1183      display: var(--media-tooltip-arrow-display, block);
1184    }
1185
1186    :host(:not([placement])),
1187    :host([placement="top"]) {
1188      position: absolute;
1189      bottom: calc(100% + var(--media-tooltip-distance, 12px));
1190      left: 50%;
1191      transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0
1191);
1192    }
1193    :host(:not([placement])) #arrow,
1194    :host([placement="top"]) #arrow {
1195      top: 100%;
1196      left: 50%;
1197      border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width);
1198      border-color: var(--_tooltip-arrow-background) transparent transparent transparent;
1199      transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
1200    }
1201
1202    :host([placement="right"]) {
1203      position: absolute;
1204      left: calc(100% + var(--media-tooltip-distance, 12px));
1205      top: 50%;
1206      transform: translate(0, -50%);
1207    }
1208    :host([placement="right"]) #arrow {
1209      top: 50%;
1210      right: 100%;
1211      border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0;
1212      border-color: transparent var(--_tooltip-arrow-background) transparent transparent;
1213      transform: translate(0, -50%);
1214    }
1215
1216    :host([placement="bottom"]) {
1217      position: absolute;
1218      top: calc(100% + var(--media-tooltip-distance, 12px));
1219      left: 50%;
1220      transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);
1221    }
1222    :host([placement="bottom"]) #arrow {
1223      bottom: 100%;
1224      left: 50%;
1225      border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width);
1226      border-color: transparent transparent var(--_tooltip-arrow-background) transparent;
1227      transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
1228    }
1229
1230    :host([placement="left"]) {
1231      position: absolute;
1232      right: calc(100% + var(--media-tooltip-distance, 12px));
1233      top: 50%;
1234      transform: translate(0, -50%);
1235    }
1236    :host([placement="left"]) #arrow {
1237      top: 50%;
1238      left: 100%;
1239      border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height);
1240      border-color: transparent transparent transparent var(--_tooltip-arrow-background);
1241      transform: translate(0, -50%);
1242    }
1243    
1244    :host([placement="none"]) #arrow {
1245      display: none;
1246    }
1247
1248  </style>
1249  <slot></slot>
1250  <div id="arrow"></div>
1251`;class o_ extends ax.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!aZ(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;let t=this.placement;if("left"===t||"right"===t)return void this.style.removeProperty("--media-tooltip-offset-x");let i=getComputedStyle(this),a=null!=(e=aG(this,"#"+this.bounds))?e:aF(this);if(!a)return;let{x:r,width:n}=a.getBoundingClientRect(),{x:s,width:o}=this.getBoundingClientRect(),l=i.getPropertyValue("--media-tooltip-offset-x"),d=l?parseFloat(l.replace("px","")):0,u=i.getPropertyValue("--media-tooltip-container-margin"),c=u?parseFloat(u.replace("px","")):0,h=s-r+d-c,m=s+o-(r+n)+d+c;return h<0?void this.style.setProperty("--media-tooltip-offset-x",`${h}px`):m>0?void this.style.setProperty("--media-tooltip-offset-x",`${m}px`):void this.style.removeProperty("--media-tooltip-offset-x")},this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(og.content.cloneNode(!0))),this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){let e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[of.PLACEMENT,of.BOUNDS]}get placement(){return a3(this,of.PLACEMENT)}set placement(e){a4(this,of.PLACEMENT,e)}get bounds(){return a3(this,of.BOUNDS)}set bounds(e){a4(this,of.BOUNDS,e)}}ax.customElements.get("media-tooltip")||ax.customElements.define("media-tooltip",o_);class oy extends nW{static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_VOLUME,ar.MEDIA_MUTED,ar.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",()=>{let e=this.range.value,t=new ax.CustomEvent(ae.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",aS("volume"))}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===ar.MEDIA_VOLUME||e===ar.MEDIA_MUTED){let e;this.range.valueAsNumber=this.mediaMuted?0:this.mediaVolume,this.range.setAttribute("aria-valuetext",(e=this.range.valueAsNumber,`${Math.round(100*e)}%`)),this.updateBar()}}
1251get mediaVolume(){return aJ(this,ar.MEDIA_VOLUME,1)}set mediaVolume(e){a0(this,ar.MEDIA_VOLUME,e)}get mediaMuted(){return a1(this,ar.MEDIA_MUTED)}set mediaMuted(e){a2(this,ar.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return a3(this,ar.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){a4(this,ar.MEDIA_VOLUME_UNAVAILABLE,e)}}ax.customElements.get("media-volume-range")||ax.customElements.define("media-volume-range",oy);var oT=Object.defineProperty,oA=Object.getPrototypeOf,ok=Reflect.get,ow=e=>{throw TypeError(e)},oS=(e,t,i)=>((e,t,i)=>t in e?oT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i)(e,"symbol"!=typeof t?t+"":t,i),oI=(e,t,i)=>t.has(e)||ow("Cannot "+i),oR=(e,t,i)=>(oI(e,t,"read from private field"),i?i.call(e):t.get(e)),oC=(e,t,i)=>t.has(e)?ow("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),oD=(e,t,i,a)=>(oI(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),oL=(e,t,i)=>(oI(e,t,"access private method"),i),oM=(e,t,i)=>ok(oA(e),i,t),oO=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("undefined"==typeof DocumentFragment){class e extends oO{}globalThis.DocumentFragment=e}var oN,ox,oP,oU,oB,oW,oH,oV,oF,oq,o$,oK,oY,oG,oj,oQ,oZ,oz,oX,oJ,o0,o1,o2,o3,o4,o5,o9,o8,o6,o7,le,lt,li,la,lr,ln,ls,lo,ll,ld,lu,lc,lh,lm,lp,lv,lE,lb,lf,lg,l_,ly,lT,lA,lk,lw,lS,lI,lR,lC,lD,lL,lM,lO,lN,lx,lP,lU,lB,lW,lH,lV,lF,lq,l$,lK,lY,lG,lj,lQ,lZ,lz,lX,lJ,l0,l1,l2,l3,l4,l5,l9,l8,l6,l7,de,dt,di,da,dr,dn,ds,dl,dd,du,dc,dh,dm,dp,dv,dE,db,df,dg,d_,dy,dT,dA,dk,dw,dS,dI,dR,dC,dD,dL,dM,dO,dN,dx,dP,dU,dB,dW,dH,dV,dF=class extends oO{},dq=class{constructor(e,t={}){oC(this,dV),oD(this,dV,null==t?void 0:t.detail)}get detail(){return oR(this,dV)}initCustomEvent(){}};dV=new WeakMap;var d$={document:{createElement:function(e,t){return new dF}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(dF)},CustomEvent:dq,EventTarget:oO,HTMLElement:dF,HTMLVideoElement:class extends oO{}},dK="undefined"==typeof window||void 0===globalThis.customElements,dY=dK?d$:globalThis;dK?d$.document:globalThis.document;var dG=(()=>{try{return"0.25.2"}catch{}return"UNKNOWN"})(),dj=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"],dQ=["autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"];function dZ(e){return`
1252    <style>
1253      :host {
1254        display: inline-flex;
1255        line-height: 0;
1256        flex-direction: column;
1257        justify-content: end;
1258      }
1259
1260      audio {
1261        width: 100%;
1262      }
1263    </style>
1264    <slot name="media">
1265      <audio${dJ(e)}></audio>
1266    </slot>
1267    <slot></slot>
1268  `}function dz(e){return`
1269    <style>
1270      :host {
1271        display: inline-block;
1272        line-height: 0;
1273      }
1274
1275      video {
1276        max-width: 100%;
1277        max-height: 100%;
1278        min-width: 100%;
1279        min-height: 100%;
1280        object-fit: var(--media-object-fit, contain);
1281        object-position: var(--media-object-position, 50% 50%);
1282      }
1283
1284      video::-webkit-media-text-track-container {
1285        transform: var(--media-webkit-text-track-transform);
1286        transition: var(--media-webkit-text-track-transition);
1287      }
1288    </style>
1289    <slot name="media">
1290      <video${dJ(e)}></video>
1291    </slot>
1292    <slot></slot>
1293  `}function dX(e,{tag:t,is:i}){var a,r,n,s,o,l,d,u,c,h,m,p,E,b,f,g,_;let y=null==(r=null==(a=globalThis.document)?void 0:a.createElement)?void 0:r.call(a,t,{is:i}),T=y?function(e){let t=[];for(let i=Object.getPrototypeOf(e);i&&i!==HTMLElement.prototype;i=Object.getPrototypeOf(i)){let e=Object.getOwnPropertyNames(i);t.push(...e)}return t}(y):[];return n=class extends e{constructor(){super(...arguments),oC(this,m),oC(this,d,!1),oC(this,u,null),oC(this,c,new Map),oC(this,h),oS(this,"get"),oS(this,"set"),oS(this,"call")}static get observedAttributes(){var e,t,i;return oL(e=n,o,l).call(e),[...null!=(i=null==(t=null==y?void 0:y.constructor)?void 0:t.observedAttributes)?i:[],...dQ]}get nativeEl(){var e,i,a,r,n;return oL(this,m,p).call(this),null!=(n=null!=(r=null!=(i=null!=(e=oR(this,u))?e:this.querySelector(":scope > [slot=media]"))?i:this.querySelector(t))?r:null==(a=this.shadowRoot)?void 0:a.querySelector(t))?n:null}set nativeEl(e){oD(this,u,e)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(e){this.toggleAttribute("muted",e)}get src(){return this.getAttribute("src")}set src(e){this.setAttribute("src",`${e}`)}get preload(){var e,t;return null!=(t=this.getAttribute("preload"))?t:null==(e=this.nativeEl)?void 0:e.preload}set preload(e){this.setAttribute("preload",`${e}`)}init(){var e;if(!this.shadowRoot){this.attachShadow({mode:"open"});let e=function(e){let t={};for(let i of e)t[i.name]=i.value;return t}(this.attributes);i&&(e.is=i),t&&(e.part=t),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}for(let e of(this.nativeEl.muted=this.hasAttribute("muted"),T))oL(this,m,g).call(this,e);for(let t of(oD(this,h,new MutationObserver(oL(this,m,b).bind(this))),this.shadowRoot.addEventListener("slotchange",this),oL(this,m,E).call(this),this.constructor.Events))null==(e=this.shadowRoot)||e.addEventListener(t,this,!0)}handleEvent(e){if("slotchange"===e.type)return void oL(this,m,E).call(this);e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{detail:e.detail}))}attributeChangedCallback(e,t,i){oL(this,m,p).call(this),oL(this,m,_).call(this,e,t,i)}connectedCallback(){oL(this,m,p).call(this)}}
1293,s=new WeakMap,o=new WeakSet,l=function(){if(oR(this,s))return;oD(this,s,!0);let e=new Set(this.observedAttributes);for(let t of(e.delete("muted"),T))if(!(t in this.prototype))if("function"==typeof y[t])this.prototype[t]=function(...e){return oL(this,m,p).call(this),(()=>{var i;if(this.call)return this.call(t,...e);let a=null==(i=this.nativeEl)?void 0:i[t];return null==a?void 0:a.apply(this.nativeEl,e)})()};else{let i={get(){var i,a,r;oL(this,m,p).call(this);let n=t.toLowerCase();if(e.has(n)){let e=this.getAttribute(n);return null!==e&&(""===e||e)}return null!=(r=null==(i=this.get)?void 0:i.call(this,t))?r:null==(a=this.nativeEl)?void 0:a[t]}};t!==t.toUpperCase()&&(i.set=function(i){oL(this,m,p).call(this);let a=t.toLowerCase();return e.has(a)?void(!0===i||!1===i||null==i?this.toggleAttribute(a,!!i):this.setAttribute(a,i)):this.set?void this.set(t,i):void(this.nativeEl&&(this.nativeEl[t]=i))}),Object.defineProperty(this.prototype,t,i)}},d=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakMap,m=new WeakSet,p=function(){oR(this,d)||(oD(this,d,!0),this.init())},E=function(){var e;let t=new Map(oR(this,c)),i=null==(e=this.shadowRoot)?void 0:e.querySelector("slot:not([name])");(null==i?void 0:i.assignedElements({flatten:!0}).filter(e=>["track","source"].includes(e.localName))).forEach(e=>{var i,a;t.delete(e);let r=oR(this,c).get(e);r||(r=e.cloneNode(),oR(this,c).set(e,r),null==(i=oR(this,h))||i.observe(e,{attributes:!0})),null==(a=this.nativeEl)||a.append(r),oL(this,m,f).call(this,r)}),t.forEach((e,t)=>{e.remove(),oR(this,c).delete(t)})},b=function(e){var t;for(let i of e)if("attributes"===i.type){let{target:e,attributeName:a}=i,r=oR(this,c).get(e);r&&a&&(r.setAttribute(a,null!=(t=e.getAttribute(a))?t:""),oL(this,m,f).call(this,r))}},f=function(e){e&&"track"===e.localName&&e.default&&("chapters"===e.kind||"metadata"===e.kind)&&"disabled"===e.track.mode&&(e.track.mode="hidden")},g=function(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}},_=function(e,t,i){var a,r,s;["id","class"].includes(e)||!n.observedAttributes.includes(e)&&this.constructor.observedAttributes.includes(e)||(null===i?null==(a=this.nativeEl)||a.removeAttribute(e):(null==(r=this.nativeEl)?void 0:r.getAttribute(e))!==i&&(null==(s=this.nativeEl)||s.setAttribute(e,i)))},oC(n,o),oS(n,"getTemplateHTML",t.endsWith("audio")?dZ:dz),oS(n,"shadowRootOptions",{mode:"open"}),oS(n,"Events",dj),oC(n,s,!1),n}function dJ(e){let t="";for(let i in e){if(!dQ.includes(i))continue;let a=e[i];""===a?t+=` ${i}`:t+=` ${i}="${a}"`}return t}var d0,d1,d2=dX(null!=(d0=globalThis.HTMLElement)?d0:class{},{tag:"video"});dX(null!=(d1=globalThis.HTMLElement)?d1:class{},{tag:"audio"});var d3=new WeakMap,d4=class extends Error{},d5=class extends Error{},d9=["application/x-mpegURL","application/vnd.apple.mpegurl","audio/mpegurl"];function d8(){var e,t;return null==(t=null==(e=globalThis.cast)?void 0:e.framework)?void 0:t.CastContext.getInstance()}function d6(){var e;return null==(e=d8())?void 0:e.getCurrentSession()}function d7(){var e;return null==(e=d6())?void 0:e.getSessionObj().media[0]}function ue(e){return d8().setOptions({...ut(),...e})}function ut(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}async function ui(e){try{let t=(await fetch(e,{method:"HEAD"})).headers.get("Content-Type");return d9.some(e=>t===e)}catch(e){return console.error("Error while trying to get the Content-Type of the manifest",e),!1}}async function ua(e){try{let i=await (await fetch(e)).text(),a=i,r=function(e){let t=e.split(`
1294`),i=[];for(let e=0;e<t.length;e++)if(t[e].trim().startsWith("#EXT-X-STREAM-INF")){let a=t[e+1]?t[e+1].trim():"";a&&!a.startsWith("#")&&i.push(a)}return i}(i);if(r.length>0){let t=new URL(r[0],e).toString();a=await (await fetch(t)).text()}var t=a.split(`
1295`).find(e=>!e.trim().startsWith("#")&&""!==e.trim());if(!t)return;let n=t.match(/\.([a-zA-Z0-9]+)(?:\?.*)?$/);return n?n[1]:null}catch(e){console.error("Error while trying to parse the manifest playlist",e);return}}var ur,un=new(globalThis.WeakRef?class extends Set{add(e){super.add(new WeakRef(e))}forEach(e){super.forEach(t=>{let i=t.deref();i&&e(i)})}}:Set),us=new WeakSet;!function(e){var t,i,a;null!=(i=null==(t=globalThis.chrome)?void 0:t.cast)&&i.isAvailable?null!=(a=globalThis.cast)&&a.framework?e():customElements.whenDefined("google-cast-button").then(e):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(e)}}(()=>{var e,t,i,a;if(!(null!=(t=null==(e=globalThis.chrome)?void 0:e.cast)&&t.isAvailable))return void console.debug("chrome.cast.isAvailable",null==(a=null==(i=globalThis.chrome)?void 0:i.cast)?void 0:a.isAvailable);ur||(ur=cast.framework,d8().addEventListener(ur.CastContextEventType.CAST_STATE_CHANGED,e=>
1295{un.forEach(t=>{var i,a;return null==(a=(i=d3.get(t)).onCastStateChanged)?void 0:a.call(i,e)})}),d8().addEventListener(ur.CastContextEventType.SESSION_STATE_CHANGED,e=>{un.forEach(t=>{var i,a;return null==(a=(i=d3.get(t)).onSessionStateChanged)?void 0:a.call(i,e)})}),un.forEach(e=>{var t,i;return null==(i=(t=d3.get(e)).init)?void 0:i.call(t)}))});var uo,ul,ud,uu,uc,uh,um,up,uv,uE,ub,uf,ug,u_,uy,uT,uA,uk=0,uw=class extends EventTarget{constructor(e){super(),oC(this,uv),oC(this,uo),oC(this,ul),oC(this,ud),oC(this,uu),oC(this,uc,"disconnected"),oC(this,uh,!1),oC(this,um,new Set),oC(this,up,new WeakMap),oD(this,uo,e),un.add(this),d3.set(this,{init:()=>oL(this,uv,uy).call(this),onCastStateChanged:()=>oL(this,uv,ug).call(this),onSessionStateChanged:()=>oL(this,uv,u_).call(this),getCastPlayer:()=>oR(this,uv,uE)}),oL(this,uv,uy).call(this)}get state(){return oR(this,uc)}async watchAvailability(e){if(oR(this,uo).disableRemotePlayback)throw new d4("disableRemotePlayback attribute is present.");return oR(this,up).set(e,++uk),oR(this,um).add(e),queueMicrotask(()=>e(oL(this,uv,uf).call(this))),uk}async cancelWatchAvailability(e){if(oR(this,uo).disableRemotePlayback)throw new d4("disableRemotePlayback attribute is present.");e?oR(this,um).delete(e):oR(this,um).clear()}async prompt(){var e,t,i,a;if(oR(this,uo).disableRemotePlayback)throw new d4("disableRemotePlayback attribute is present.");if(!(null!=(t=null==(e=globalThis.chrome)?void 0:e.cast)&&t.isAvailable))throw new d5("The RemotePlayback API is disabled on this platform.");let r=us.has(oR(this,uo));us.add(oR(this,uo)),ue(oR(this,uo).castOptions),Object.entries(oR(this,uu)).forEach(([e,t])=>{oR(this,ud).controller.addEventListener(e,t)});try{await d8().requestSession()}catch(e){if(r||us.delete(oR(this,uo)),"cancel"===e)return;throw Error(e)}null==(a=null==(i=d3.get(oR(this,uo)))?void 0:i.loadOnPrompt)||a.call(i)}};uo=new WeakMap,ul=new WeakMap,ud=new WeakMap,uu=new WeakMap,uc=new WeakMap,uh=new WeakMap,um=new WeakMap,up=new WeakMap,uv=new WeakSet,uE=function(){if(us.has(oR(this,uo)))return oR(this,ud)},ub=function(){us.has(oR(this,uo))&&(Object.entries(oR(this,uu)).forEach(([e,t])=>{oR(this,ud).controller.removeEventListener(e,t)}),us.delete(oR(this,uo)),oR(this,uo).muted=oR(this,ud).isMuted,oR(this,uo).currentTime=oR(this,ud).savedPlayerState.currentTime,!1===oR(this,ud).savedPlayerState.isPau
1295sed&&oR(this,uo).play())},uf=function(){var e;let t=null==(e=d8())?void 0:e.getCastState();return t&&"NO_DEVICES_AVAILABLE"!==t},ug=function(){let e=d8().getCastState();if(us.has(oR(this,uo))&&"CONNECTING"===e&&(oD(this,uc,"connecting"),this.dispatchEvent(new Event("connecting"))),!oR(this,uh)&&null!=e&&e.includes("CONNECT"))for(let e of(oD(this,uh,!0),oR(this,um)))e(!0);else if(oR(this,uh)&&(!e||"NO_DEVICES_AVAILABLE"===e))for(let e of(oD(this,uh,!1),oR(this,um)))e(!1)},u_=async function(){var e,t;let{SESSION_RESUMED:i}=ur.SessionState;if(d8().getSessionState()===i&&oR(this,uo).castSrc===(null==(e=d7())?void 0:e.media.contentId)){us.add(oR(this,uo)),Object.entries(oR(this,uu)).forEach(([e,t])=>{oR(this,ud).controller.addEventListener(e,t)});try{await (t=new chrome.cast.media.GetStatusRequest,new Promise((e,i)=>{d7().getStatus(t,e,i)}))}catch(e){console.error(e)}oR(this,uu)[ur.RemotePlayerEventType.IS_PAUSED_CHANGED](),oR(this,uu)[ur.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}},uy=function(){!ur||oR(this,ul)||(oD(this,ul,!0),ue(oR(this,uo).castOptions),oR(this,uo).textTracks.addEventListener("change",()=>oL(this,uv,uA).call(this)),oL(this,uv,ug).call(this),oD(this,ud,new ur.RemotePlayer),new ur.RemotePlayerController(oR(this,ud)),oD(this,uu,{[ur.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:e})=>{!0===e?(oD(this,uc,"connected"),this.dispatchEvent(new Event("connect"))):(oL(this,uv,ub).call(this),oD(this,uc,"disconnected"),this.dispatchEvent(new Event("disconnect")))},[ur.RemotePlayerEventType.DURATION_CHANGED]:()=>{oR(this,uo).dispatchEvent(new Event("durationchange"))},[ur.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{oR(this,uo).dispatchEvent(new Event("volumechange"))},[ur.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{oR(this,uo).dispatchEvent(new Event("volumechange"))},[ur.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{var e;null!=(e=oR(this,uv,uE))&&e.isMediaLoaded&&oR(this,uo).dispatchEvent(new Event("timeupdate"))},[ur.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{oR(this,uo).dispatchEvent(new Event("resize"))},[ur.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{oR(this,uo).dispatchEvent(new Event(this.paused?"pause":"play"))},[ur.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{var e,t;(null==(e=oR(this,uv,uE))?void 0:e.playerState)!==chrome.cast.media.PlayerState.PAUSED&&oR(this,uo).dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[null==(t=oR(this,uv,uE))?void 0:t.playerState]))},[ur.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{var e;null!=(e=oR(this,uv,uE))&&e.isMediaLoaded&&(await Promise.resolve(),oL(this,uv,uT).call(this))}}))},uT=function(){oL(this,uv,uA).call(this)},uA=async function(){var e,t,i,a,r;let n;if(!oR(this,uv,uE))return;let s=(null!=(t=null==(e=oR(this,ud).mediaInfo)?void 0:e.tracks)?t:[]).filter(({type:e})=>e===chrome.cast.media.TrackType.TEXT),o=[...oR(this,uo).textTracks].filter(({kind:e})=>"subtitles"===e||"captions"===e),l=s.map(({language:e,name:t,trackId:i})=>{var a;let{mode:r}=null!=(a=o.find(i=>i.language===e&&i.label===t))?a:{};return!!r&&{mode:r,trackId:i}}).filter(Boolean),d=l.filter(({mode:e})=>"showing"!==e).map(({trackId:e})=>e),u=l.find(({mode:e})=>"showing"===e),c=null!=(r=null==(a=null==(i=d6())?void 0:i.getSessionObj().media[0])?void 0:a.activeTrackIds)?r:[],h=c;if(c.length&&(h=h.filter(e=>!d.includes(e))),null!=u&&u.trackId&&(h=[...h,u.trackId]),h=[...new Set(h)],n=h,!(c.length===n.length&&c.every(e=>n.includes(e))))try{let e=new chrome.cast.media.EditTracksInfoRequest(h);await new Promise((t,i)=>{d7().editTracksInfo(e,t,i)})}catch(e){console.error(e)}};var uS=e=>{var t,i,a,r,n,s,o,l,d;return i=class extends e{constructor(){super(...arguments),oC(this,o),oC(this,a,{paused:!1}),oC(this,r,ut()),oC(this,n),oC(this,s)}get remote(){return oR(this,s)?oR(this,s):globalThis.chrome?(this.disableRemotePlayback||function(){var e;let t="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if(null!=(e=globalThis.chrome)&&e.cast||document.querySelector(`script[src="${t}"]`))return;let i=document.createElement("script");i.src=t,document.head.append(i)}(),d3.set(this,{loadOnPrompt:()=>oL(this,o,d).call(this)}),oD(this,s,new uw(this))):super.remote}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),"cast-receiver"===e&&i){oR(this,r).receiverApplicationId=i;return}if(oR(this,o,l))switch(e){case"cast-stream-type":case"cast-src":this.load()}}async load(){var e,t;if(!oR(this,o,l))return super.load();let i=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType);i.customData=this.castCustomData;let r=[...this.querySelectorAll("track")].filter(({kind:e,src:t})=>t&&("subtitles"===e||"captions"===e)),n=[],s=0;if(r.length&&(i.tracks=r.map(e=>{let t=++s;0===n.length&&"showing"===e.track.mode&&n.push(t);let i=new chrome.cast.media.Track(t,chrome.cast.media.TrackType.TEXT);return i.trackContentId=e.src,i.trackContentType="text/vtt",i.subtype="captions"===e.kind?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,i.name=e.label,i.language=e.srclang,i})),"live"===this.castStreamType?i.streamType=chrome.cast.media.StreamType.LIVE:i.streamType=chrome.cast.media.StreamType.BUFFERED,i.metadata=new chrome.cast.media.GenericMediaMetadata,i.metadata.title=this.title,i.metadata.images=[{url:this.poster}],ui(this.castSrc)){let e=await ua(this.castSrc);((null==e?void 0:e.includes("m4s"))||(null==e?void 0:e.includes("mp4")))&&(i.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.FMP4,i.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.FMP4)}let d=new chrome.cast.media.LoadRequest(i);d.currentTime=null!=(e=super.currentTime)?e:0,d.autoplay=!oR(this,a).paused,d.activeTrackIds=n,await (null==(t=d6())?void 0:t.loadMedia(d)),this.dispatchEvent(new Event("volumechange"))}play(){var e;if(oR(this,o,l)){oR(this,o,l).isPaused&&(null==(e=oR(this,o,l).controller)||e.playOrPause());return}return super.play()}pause(){var e;if(oR(this,o,l)){oR(this,o,l).isPaused||null==(e=oR(this,o,l).controller)||e.playOrPause();return}super.pause()}get castOptions(){return oR(this,r)}get castReceiver(){var e;return null!=(e=this.getAttribute("cast-receiver"))?e:void 0}set castReceiver(e){this.castReceiver!=e&&this.setAttribute("cast-receiver",`${e}`)}get castSrc(){var e,t,i;return null!=(i=null!=(t=this.getAttribute("cast-src"))?t:null==(e=this.querySelector("source"))?void 0:e.src)?i:this.currentSrc}set castSrc(e){this.castSrc!=e&&this.setAttribute("cast-src",`${e}`)}get castContentType(){var e;return null!=(e=this.getAttribute("cast-content-type"))?e:void 0}set castContentType(e){this.setAttribute("cast-content-type",`${e}`)}get castStreamType(){var e,t;return null!=(t=null!=(e=this.getAttribute("cast-stream-type"))?e:this.streamType)?t:void 0}set castStreamType(e){this.setAttribute("cast-stream-type",`${e}`)}get castCustomData(){return oR(this,n)}set castCustomData(e){let t=typeof e;if(!["object","undefined"].includes(t))return void console.error(`castCustomData must be nullish or an object but value was of type ${t}`);oD(this,n,e)}get readyState(){if(oR(this,o,l))switch(oR(this,o,l).playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return oR(this,o,l)?oR(this,o,l).isPaused:super.paused}get muted(){var e;return oR(this,o,l)?null==(e=oR(this,o,l))?void 0:e.isMuted:super.muted}set muted(e){var t;
1295if(oR(this,o,l)){(e&&!oR(this,o,l).isMuted||!e&&oR(this,o,l).isMuted)&&(null==(t=oR(this,o,l).controller)||t.muteOrUnmute());return}super.muted=e}get volume(){var e,t;return oR(this,o,l)?null!=(t=null==(e=oR(this,o,l))?void 0:e.volumeLevel)?t:1:super.volume}set volume(e){var t;if(oR(this,o,l)){oR(this,o,l).volumeLevel=+e,null==(t=oR(this,o,l).controller)||t.setVolumeLevel();return}super.volume=e}get duration(){var e,t,i;return oR(this,o,l)&&null!=(e=oR(this,o,l))&&e.isMediaLoaded?null!=(i=null==(t=oR(this,o,l))?void 0:t.duration)?i:NaN:super.duration}get currentTime(){var e,t,i;return oR(this,o,l)&&null!=(e=oR(this,o,l))&&e.isMediaLoaded?null!=(i=null==(t=oR(this,o,l))?void 0:t.currentTime)?i:0:super.currentTime}set currentTime(e){var t;if(oR(this,o,l)){oR(this,o,l).currentTime=e,null==(t=oR(this,o,l).controller)||t.seek();return}super.currentTime=e}},a=new WeakMap,r=new WeakMap,n=new WeakMap,s=new WeakMap,o=new WeakSet,l=function(){var e,t;return null==(t=null==(e=d3.get(this.remote))?void 0:e.getCastPlayer)?void 0:t.call(e)},d=async function(){oR(this,a).paused=oM(i.prototype,this,"paused"),oM(i.prototype,this,"pause").call(this),this.muted=oM(i.prototype,this,"muted");try{await this.load()}catch(e){console.error(e)}},oS(i,"observedAttributes",[...null!=(t=e.observedAttributes)?t:[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"]),i},uI=class extends Event{constructor(e,t){super(e),oS(this,"track"),this.track=t.track}},uR=new WeakMap;function uC(e){var t,i,a;let r;return null!=(t=uR.get(e))?t:(i=e,a={},(r=uR.get(i))||uR.set(i,r={}),Object.assign(r,a))}function uD(e,t){let i=e.videoTracks;uC(t).media=e,uC(t).renditionSet||(uC(t).renditionSet=new Set);let a=uC(i).trackSet;a.add(t);let r=a.size-1;r in uU.prototype||Object.defineProperty(uU.prototype,r,{get(){return[...uC(this).trackSet][r]}}),queueMicrotask(()=>{i.dispatchEvent(new uI("addtrack",{track:t}))})}function uL(e){var t;let i=null==(t=uC(e).media)?void 0:t.videoTracks;i&&(uC(i).trackSet.delete(e),queueMicrotask(()=>{i.dispatchEvent(new uI("removetrack",{track:e}))}))}var uM,uO,uN,ux,uP,uU=class extends EventTarget{constructor(){super(),oC(this,ux),oC(this,uM),oC(this,uO),oC(this,uN),uC(this).trackSet=new Set}[Symbol.iterator](){return oR(this,ux,uP).values()}get length(){return oR(this,ux,uP).size}getTrackById(e){var t;return null!=(t=[...oR(this,ux,uP)].find(t=>t.id===e))?t:null}get selectedIndex(){return[...oR(this,ux,uP)].findIndex(e=>e.selected)}get onaddtrack(){return oR(this,uM)}set onaddtrack(e){oR(this,uM)&&(this.removeEventListener("addtrack",oR(this,uM)),oD(this,uM,void 0)),"function"==typeof e&&(oD(this,uM,e),this.addEventListener("addtrack",e))}get onremovetrack(){return oR(this,uO)}set onremovetrack(e){oR(this,uO)&&(this.removeEventListener("removetrack",oR(this,uO)),oD(this,uO,void 0)),"function"==typeof e&&(oD(this,uO,e),this.addEventListener("removetrack",e))}get onchange(){return oR(this,uN)}set onchange(e){oR(this,uN)&&(this.removeEventListener("change",oR(this,uN)),oD(this,uN,void 0)),"function"==typeof e&&(oD(this,uN,e),this.addEventListener("change",e))}};uM=new WeakMap,uO=new WeakMap,uN=new WeakMap,ux=new WeakSet,uP=function(){return uC(this).trackSet};var uB=class extends Event{constructor(e,t){super(e),oS(this,"rendition"),this.rendition=t.rendition}};function uW(e){return[...uC(e).media.videoTracks].filter(e=>e.selected).flatMap(e=>[...uC(e).renditionSet])}var uH,uV,uF,uq=class extends EventTarget{constructor(){super(...arguments),oC(this,uH),oC(this,uV),oC(this,uF)}[Symbol.iterator](){return uW(this).values()}get length(){return uW(this).length}getRenditionById(e){var t;return null!=(t=uW(this).find(t=>`${t.id}`==`${e}`))?t:null}get selectedIndex(){return uW(this).findIndex(e=>e.selected)}set selectedIndex(e){for(let[t,i]of uW(this).entries())i.selected=t===e}get onaddrendition(){return oR(this,uH)}set onaddrendition(e){oR(this,uH)&&(this.removeEventListener("addrendition",oR(this,uH)),oD(this,uH,void 0)),"function"==typeof e&&(oD(this,uH,e),this.addEventListener("addrendition",e))}get onremoverendition(){return oR(this,uV)}set onremoverendition(e){oR(this,uV)&&(this.removeEventListener("removerendition",oR(this,uV)),oD(this,uV,void 0)),"function"==typeof e&&(oD(this,uV,e),this.addEventListener("removerendition",e))}get onchange(){return oR(this,uF)}set onchange(e){oR(this,uF)&&(this.removeEventListener("change",oR(this,uF)),oD(this,uF,void 0)),"function"==typeof e&&(oD(this,uF,e),this.addEventListener("change",e))}};uH=new WeakMap,uV=new WeakMap,uF=new WeakMap;var u$,uK=class{constructor(){oS(this,"src"),oS(this,"id"),oS(this,"width"),oS(this,"height"),oS(this,"bitrate"),oS(this,"frameRate"),oS(this,"codec"),oC(this,u$,!1)}get selected(){return oR(this,u$)}set selected(e){var t;let i;oR(this,u$)!==e&&(oD(this,u$,e),t=this,(i=uC(t).media.videoRenditions)&&!uC(i).changeRequested&&(uC(i).changeRequested=!0,queueMicrotask(()=>{delete uC(i).changeRequested,uC(t).track.selected&&i.dispatchEvent(new Event("change"))})))}};u$=new WeakMap;var uY,uG=class{constructor(){oS(this,"id"),oS(this,"kind"),oS(this,"label",""),oS(this,"language",""),oS(this,"sourceBuffer"),oC(this,uY,!1)}addRendition(e,t,i,a,r,n){var s;let o,l,d,u=new uK;return u.src=e,u.width=t,u.height=i,u.frameRate=n,u.bitrate=r,u.codec=a,s=this,o=uC(s).media.videoRenditions,uC(u).media=uC(s).media,uC(u).track=s,(l=uC(s).renditionSet).add(u),(d=l.size-1)in uq.prototype||Ob
1295ject.defineProperty(uq.prototype,d,{get(){return uW(this)[d]}}),queueMicrotask(()=>{s.selected&&o.dispatchEvent(new uB("addrendition",{rendition:u}))}),u}removeRendition(e){let t,i;t=uC(e).media.videoRenditions,i=uC(e).track,uC(i).renditionSet.delete(e),queueMicrotask(()=>{uC(e).track.selected&&t.dispatchEvent(new uB("removerendition",{rendition:e}))})}get selected(){return oR(this,uY)}set selected(e){oR(this,uY)!==e&&(oD(this,uY,e),!0===e&&function(e){var t;let i=null!=(t=uC(e).media.videoTracks)?t:[],a=!1;for(let t of i)t!==e&&(t.selected=!1,a=!0);if(a){if(uC(i).changeRequested)return;uC(i).changeRequested=!0,queueMicrotask(()=>{delete uC(i).changeRequested,i.dispatchEvent(new Event("change"))})}}(this))}};function uj(e){return[...uC(e).media.audioTracks].filter(e=>e.enabled).flatMap(e=>[...uC(e).renditionSet])}uY=new WeakMap;var uQ,uZ,uz,uX=class extends EventTarget{constructor(){super(...arguments),oC(this,uQ),oC(this,uZ),oC(this,uz)}[Symbol.iterator](){return uj(this).values()}get length(){return uj(this).length}getRenditionById(e){var t;return null!=(t=uj(this).find(t=>`${t.id}`==`${e}`))?t:null}get selectedIndex(){return uj(this).findIndex(e=>e.selected)}set selectedIndex(e){for(let[t,i]of uj(this).entries())i.selected=t===e}get onaddrendition(){return oR(this,uQ)}set onaddrendition(e){oR(this,uQ)&&(this.removeEventListener("addrendition",oR(this,uQ)),oD(this,uQ,void 0)),"function"==typeof e&&(oD(this,uQ,e),this.addEventListener("addrendition",e))}get onremoverendition(){return oR(this,uZ)}set onremoverendition(e){oR(this,uZ)&&(this.removeEventListener("removerendition",oR(this,uZ)),oD(this,uZ,void 0)),"function"==typeof e&&(oD(this,uZ,e),this.addEventListener("removerendition",e))}get onchange(){return oR(this,uz)}set onchange(e){oR(this,uz)&&(this.removeEventListener("change",oR(this,uz)),oD(this,uz,void 0)),"function"==typeof e&&(oD(this,uz,e),this.addEventListener("change",e))}};uQ=new WeakMap,uZ=new WeakMap,uz=new WeakMap;var uJ,u0=class{constructor(){oS(this,"src"),oS(this,"id"),oS(this,"bitrate"),oS(this,"codec"),oC(this,uJ,!1)}get selected(){return oR(this,uJ)}set selected(e){var t;let i;oR(this,uJ)!==e&&(oD(this,uJ,e),t=this,(i=uC(t).media.audioRenditions)&&!uC(i).changeRequested&&(uC(i).changeRequested=!0,queueMicrotask(()=>{delete uC(i).changeRequested,uC(t).track.enabled&&i.dispatchEvent(new Event("change"))})))}};function u1(e,t){let i=e.audioTracks;uC(t).media=e,uC(t).renditionSet||(uC(t).renditionSet=new Set);let a=uC(i).trackSet;a.add(t);let r=a.size-1;r in u6.prototype||Object.defineProperty(u6.prototype,r,{get(){return[...uC(this).trackSet][r]}}),queueMicrotask(()=>{i.dispatchEvent(new uI("addtrack",{track:t}))})}function u2(e){var t;let i=null==(t=uC(e).media)?void 0:t.audioTracks;i&&(uC(i).trackSet.delete(e),queueMicrotask(()=>{i.dispatchEvent(new uI("removetrack",{track:e}))}))}uJ=new WeakMap;var u3,u4,u5,u9,u8,u6=class extends EventTarget{constructor(){super(),oC(this,u9),oC(this,u3),oC(this,u4),oC(this,u5),uC(this).trackSet=new Set}[Symbol.iterator](){return oR(this,u9,u8).values()}get length(){return oR(this,u9,u8).size}getTrackById(e){var t;return null!=(t=[...oR(this,u9,u8)].find(t=>t.id===e))?t:null}get onaddtrack(){return oR(this,u3)}set onaddtrack(e){oR(this,u3)&&(this.removeEventListener("addtrack",oR(this,u3)),oD(this,u3,void 0)),"function"==typeof e&&(oD(this,u3,e),this.addEventListener("addtrack",e))}get onremovetrack(){return oR(this,u4)}set onremovetrack(e){oR(this,u4)&&(this.removeEventListener("removetrack",oR(this,u4)),oD(this,u4,void 0)),"function"==typeof e&&(oD(this,u4,e),this.addEventListener("removetrack",e))}get onchange(){return oR(this,u5)}set onchange(e){oR(this,u5)&&(this.removeEventListener("change",oR(this,u5)),oD(this,u5,void 0)),"function"==typeof e&&(oD(this,u5,e),this.addEventListener("change",e))}};u3=new WeakMap,u4=new WeakMap,u5=new WeakMap,u9=new WeakSet,u8=function(){return uC(this).trackSet};var u7,ce=class{constructor(){oS(this,"id"),oS(this,"kind"),oS(this,"label",""),oS(this,"language",""),oS(this,"sourceBuffer"),oC(this,u7,!1)}addRendition(e,t,i){var a;let r,n,s,o=new u0;return o.src=e,o.codec=t,o.bitrate=i,a=this,r=uC(a).media.audioRenditions,uC(o).media=uC(a).media,uC(o).track=a,(n=uC(a).renditionSet).add(o),(s=n.size-1)in uX.prototype||Ob
1295ject.defineProperty(uX.prototype,s,{get(){return uj(this)[s]}}),queueMicrotask(()=>{a.enabled&&r.dispatchEvent(new uB("addrendition",{rendition:o}))}),o}removeRendition(e){let t,i;t=uC(e).media.audioRenditions,i=uC(e).track,uC(i).renditionSet.delete(e),queueMicrotask(()=>{uC(e).track.enabled&&t.dispatchEvent(new uB("removerendition",{rendition:e}))})}get enabled(){return oR(this,u7)}set enabled(e){let t;oR(this,u7)!==e&&(oD(this,u7,e),(t=uC(this).media.audioTracks)&&!uC(t).changeRequested&&(uC(t).changeRequested=!0,queueMicrotask(()=>{delete uC(t).changeRequested,t.dispatchEvent(new Event("change"))})))}};u7=new WeakMap;var ct=cr(globalThis.HTMLMediaElement,"video"),ci=cr(globalThis.HTMLMediaElement,"audio");function ca(e){if(!(null!=e&&e.prototype))return e;let t=cr(e,"video");(!t||`${t}`.includes("[native code]"))&&Object.defineProperty(e.prototype,"videoTracks",{get(){return function(e){var t;let i=uC(e).videoTracks;if(!i&&(i=new uU,uC(e).videoTracks=i,ct)){let a=ct.call(null!=(t=e.nativeEl)?t:e);for(let t of a)uD(e,t);a.addEventListener("change",()=>{i.dispatchEvent(new Event("change"))}),a.addEventListener("addtrack",t=>{if([...i].some(e=>e instanceof uG)){for(let e of a)uL(e);return}uD(e,t.track)}),a.addEventListener("removetrack",e=>{uL(e.track)})}return i}(this)}});let i=cr(e,"audio");(!i||`${i}`.includes("[native code]"))&&Object.defineProperty(e.prototype,"audioTracks",{get(){return function(e){var t;let i=uC(e).audioTracks;
1295if(!i&&(i=new u6,uC(e).audioTracks=i,ci)){let a=ci.call(null!=(t=e.nativeEl)?t:e);for(let t of a)u1(e,t);a.addEventListener("change",()=>{i.dispatchEvent(new Event("change"))}),a.addEventListener("addtrack",t=>{if([...i].some(e=>e instanceof ce)){for(let e of a)u2(e);return}u1(e,t.track)}),a.addEventListener("removetrack",e=>{u2(e.track)})}return i}(this)}}),"addVideoTrack"in e.prototype||(e.prototype.addVideoTrack=function(e,t="",i=""){let a=new uG;return a.kind=e,a.label=t,a.language=i,uD(this,a),a}),"removeVideoTrack"in e.prototype||(e.prototype.removeVideoTrack=uL),"addAudioTrack"in e.prototype||(e.prototype.addAudioTrack=function(e,t="",i=""){let a=new ce;return a.kind=e,a.label=t,a.language=i,u1(this,a),a}),"removeAudioTrack"in e.prototype||(e.prototype.removeAudioTrack=u2),"videoRenditions"in e.prototype||Object.defineProperty(e.prototype,"videoRenditions",{get(){return a(this)}});let a=e=>{let t=uC(e).videoRenditions;return t||(uC(t=new uq).media=e,uC(e).videoRenditions=t),t};"audioRenditions"in e.prototype||Object.defineProperty(e.prototype,"audioRenditions",{get(){return r(this)}});let r=e=>{let t=uC(e).audioRenditions;return t||(uC(t=new uX).media=e,uC(e).audioRenditions=t),t};return e}function cr(e,t){var i;if(null!=e&&e.prototype)return null==(i=Object.getOwnPropertyDescriptor(e.prototype,`${t}Tracks`))?void 0:i.get}var cn=`
1296<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" class="logo" part="logo" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 1600 500"><g fill="#fff"><path d="M994.287 93.486c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m0-93.486c-34.509 0-62.484 27.976-62.484 62.486v187.511c0 68.943-56.09 125.033-125.032 125.033s-125.03-56.09-125.03-125.033V62.486C681.741 27.976 653.765 0 619.256 0s-62.484 27.976-62.484 62.486v187.511C556.772 387.85 668.921 500 806.771 500c137.851 0 250.001-112.15 250.001-250.003V62.486c0-34.51-27.976-62.486-62.485-62.486M1537.51 468.511c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m-275.883-218.509-143.33 143.329c-24.402 24.402-24.402 63.966 0 88.368 24.402 24.402 63.967 24.402 88.369 0l143.33-143.329 143.328 143.329c24.402 24.4 63.967 24.402 88.369 0 24.403-24.402 24.403-63.966.001-88.368l-143.33-143.329.001-.004 143.329-143.329c24.402-24.402 24.402-63.965 0-88.367s-63.967-24.402-88.369 0L1349.996 161.63 1206.667 18.302c-24.402-24.401-63.967-24.402-88.369 0s-24.402 63.965 0 88.367l143.329 143.329v.004ZM437.511 468.521c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31M461.426 4.759C438.078-4.913 411.2.432 393.33 18.303L249.999 161.632 106.669 18.303C88.798.432 61.922-4.913 38.573 4.759 15.224 14.43-.001 37.214-.001 62.488v375.026c0 34.51 27.977 62.486 62.487 62.486 34.51 0 62.486-27.976 62.486-62.486V213.341l80.843 80.844c24.404 24.402 63.965 24.402 88.369 0l80.843-80.844v224.173c0 34.51 27.976 62.486 62.486 62.486s62.486-27.976 62.486-62.486V62.488c0-25.274-15.224-48.058-38.573-57.729" style="fill-rule:nonzero"/></g></svg>`;dj.push("castchange","entercast","leavecast");var cs,co,cl,cd,cu,cc,ch,cm,cp,cv,cE,cb={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type",LOGO:"logo"},cf=Object.values(cb),cg="mux-video",c_=class extends d2{constructor(){super(),oC(this,cv),oC(this,cs),oC(this,co),oC(this,cl),oC(this,cd,{}),oC(this,cu,{}),oC(this,cc),oC(this,ch),oC(this,cm),oC(this,cp),oD(this,cl,iB())}static get NAME(){return cg}static get VERSION(){return dG}static get observedAttributes(){var e;return[...cf,...null!=(e=d2.observedAttributes)?e:[]]}static getTemplateHTML(e={}){let t=super.getTemplateHTML(e),i="false"!==e.logo&&void 0!==e.logo,a=e.logo&&""!==e.logo,r=e.logo,n=i?`
1297      <style>
1298        :host {
1299          position: relative;
1300        }
1301        :host slot[name="logo"] {
1302          display: flex;
1303          justify-content: end;
1304          position: absolute;
1305          top: 1rem;
1306          right: 1rem;
1307
1308        }
1309         :host slot[name="logo"] .logo{
1310          width: 5rem;
1311          pointer-events: none;
1312          user-select: none;
1313         }
1314      </style>
1315      <slot name="logo">
1316        ${a?`<img class="logo" part="logo" src="${r}" />`:cn}
1317      </slot>
1318    `:"";return`
1319      ${t}
1320      ${n}
1321    `}get preferCmcd(){var e;return null!=(e=this.getAttribute(cb.PREFER_CMCD))?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?tq.includes(e)?this.setAttribute(cb.PREFER_CMCD,e):console.warn(`Invalid value for preferCmcd. Must be one of ${tq.join()}`):this.removeAttribute(cb.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(cb.PLAYER_INIT_TIME)?+this.getAttribute(cb.PLAYER_INIT_TIME):oR(this,cl)}set playerInitTime(e){e!=this.playerInitTime&&(null==e?this.removeAttribute(cb.PLAYER_INIT_TIME):this.setAttribute(cb.PLAYER_INIT_TIME,`${+e}`))}get playerSoftwareName(){var e;return null!=(e=oR(this,cm))?e:cg}set playerSoftwareName(e){oD(this,cm,e)}get playerSoftwareVersion(){var e;return null!=(e=oR(this,ch))?e:dG}set playerSoftwareVersion(e){oD(this,ch,e)}
1321get _hls(){var e;return null==(e=oR(this,cs))?void 0:e.engine}get mux(){var e;return null==(e=this.nativeEl)?void 0:e.mux}get error(){var e;return null!=(e=iq(this.nativeEl))?e:null}get errorTranslator(){return oR(this,cp)}set errorTranslator(e){oD(this,cp,e)}get src(){return this.getAttribute("src")}set src(e){e!==this.src&&(null==e?this.removeAttribute("src"):this.setAttribute("src",e))}get type(){var e;return null!=(e=this.getAttribute(cb.TYPE))?e:void 0}set type(e){e!==this.type&&(e?this.setAttribute(cb.TYPE,e):this.removeAttribute(cb.TYPE))}get autoplay(){let e=this.getAttribute("autoplay");return null!==e&&(""===e||e)}set autoplay(e){e!==this.autoplay&&(e?this.setAttribute("autoplay","string"==typeof e?e:""):this.removeAttribute("autoplay"))}get preload(){let e=this.getAttribute("preload");return""===e?"auto":["none","metadata","auto"].includes(e)?e:super.preload}set preload(e){e!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(e)?this.setAttribute("preload",e):this.removeAttribute("preload"))}get debug(){return null!=this.getAttribute(cb.DEBUG)}set debug(e){e!==this.debug&&(e?this.setAttribute(cb.DEBUG,""):this.removeAttribute(cb.DEBUG))}get disableTracking(){return this.hasAttribute(cb.DISABLE_TRACKING)}set disableTracking(e){e!==this.disableTracking&&this.toggleAttribute(cb.DISABLE_TRACKING,!!e)}get disableCookies(){return this.hasAttribute(cb.DISABLE_COOKIES)}set disableCookies(e){e!==this.disableCookies&&(e?this.setAttribute(cb.DISABLE_COOKIES,""):this.removeAttribute(cb.DISABLE_COOKIES))}get startTime(){let e=this.getAttribute(cb.START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set startTime(e){e!==this.startTime&&(null==e?this.removeAttribute(cb.START_TIME):this.setAttribute(cb.START_TIME,`${e}`))}get playbackId(){var e;return this.hasAttribute(cb.PLAYBACK_ID)?this.getAttribute(cb.PLAYBACK_ID):null!=(e=iF(this.src))?e:void 0}set playbackId(e){e!==this.playbackId&&(e?this.setAttribute(cb.PLAYBACK_ID,e):this.removeAttribute(cb.PLAYBACK_ID))}get maxResolution(){var e;return null!=(e=this.getAttribute(cb.MAX_RESOLUTION))?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(cb.MAX_RESOLUTION,e):this.removeAttribute(cb.MAX_RESOLUTION))}get minResolution(){var e;return null!=(e=this.getAttribute(cb.MIN_RESOLUTION))?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(cb.MIN_RESOLUTION,e):this.removeAttribute(cb.MIN_RESOLUTION))}get renditionOrder(){var e;return null!=(e=this.getAttribute(cb.RENDITION_ORDER))?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(cb.RENDITION_ORDER,e):this.removeAttribute(cb.RENDITION_ORDER))}get programStartTime(){let e=this.getAttribute(cb.PROGRAM_START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set programStartTime(e){null==e?this.removeAttribute(cb.PROGRAM_START_TIME):this.setAttribute(cb.PROGRAM_START_TIME,`${e}`)}get programEndTime(){let e=this.getAttribute(cb.PROGRAM_END_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set programEndTime(e){null==e?this.removeAttribute(cb.PROGRAM_END_TIME):this.setAttribute(cb.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){let e=this.getAttribute(cb.ASSET_START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set assetStartTime(e){null==e?this.removeAttribute(cb.ASSET_START_TIME):this.setAttribute(cb.ASSET_START_TIME,`${e}`)}get assetEndTime(){let e=this.getAttribute(cb.ASSET_END_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set assetEndTime(e){null==e?this.removeAttribute(cb.ASSET_END_TIME):this.setAttribute(cb.ASSET_END_TIME,`${e}`)}get customDomain(){var e;return null!=(e=this.getAttribute(cb.CUSTOM_DOMAIN))?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(cb.CUSTOM_DOMAIN,e):this.removeAttribute(cb.CUSTOM_DOMAIN))}get drmToken(){var e;return null!=(e=this.getAttribute(cb.DRM_TOKEN))?e:void 0}set drmToken(e){e!==this.drmToken&&(e?this.setAttribute(cb.DRM_TOKEN,e):this.removeAttribute(cb.DRM_TOKEN))}get playbackToken(){var e,t,i,a;if(this.hasAttribute(cb.PLAYBACK_TOKEN))return null!=(e=this.getAttribute(cb.PLAYBACK_TOKEN))?e:void 0;if(this.hasAttribute(cb.PLAYBACK_ID)){let[,e]=tz(null!=(t=this.playbackId)?t:"");return null!=(i=new URLSearchParams(e).get("token"))?i:void 0}if(this.src)return null!=(a=new URLSearchParams(this.src).get("token"))?a:void 0}set playbackToken(e){e!==this.playbackToken&&(e?this.setAttribute(cb.PLAYBACK_TOKEN,e):this.removeAttribute(cb.PLAYBACK_TOKEN))}get tokens(){let e=this.getAttribute(cb.PLAYBACK_TOKEN),t=this.getAttribute(cb.DRM_TOKEN);return{...oR(this,cu),...null!=e?{playback:e}:{},...null!=t?{drm:t}:{}}}set tokens(e){oD(this,cu,null!=e?e:{})}get ended(){return iQ(this.nativeEl,this._hls)}get envKey(){var e;return null!=(e=this.getAttribute(cb.ENV_KEY))?e:void 0}set envKey(e){e!==this.envKey&&(e?this.setAttribute(cb.ENV_KEY,e):this.removeAttribute(cb.ENV_KEY))}get beaconCollectionDomain(){var e;return null!=(e=this.getAttribute(cb.BEACON_COLLECTION_DOMAIN))?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(cb.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(cb.BEACON_COLLECTION_DOMAIN))}get streamType(){var e;return null!=(e=this.getAttribute(cb.STREAM_TYPE))?e:i$(this.nativeEl)}set streamType(e){e!==this.streamType&&(e?this.setAttribute(cb.STREAM_TYPE,e):this.removeAttribute(cb.STREAM_TYPE))}get targetLiveWindow(){var e,t,i;return this.hasAttribute(cb.TARGET_LIVE_WINDOW)?+this.getAttribute(cb.TARGET_LIVE_WINDOW):(e=this.nativeEl,null!=(i=null==(t=ix.get(e))?void 0:t.targetLiveWindow)?i:NaN)}set targetLiveWindow(e){e!=this.targetLiveWindow&&(null==e?this.removeAttribute(cb.TARGET_LIVE_WINDOW):this.setAttribute(cb.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e,t;if(this.hasAttribute(cb.LIVE_EDGE_OFFSET)){let{liveEdgeOffset:i}=this,a=null!=(e=this.nativeEl.seekable.end(0))?e:0;return Math.max(null!=(t=this.nativeEl.seekable.start(0))?t:0,a-i)}return(e=>{var t;let i=null==(t=ix.get(e))?void 0:t.liveEdgeStartOffset;if("number"!=typeof i)return NaN;let a=iK(e);return a.length?a.end(a.length-1)-i:NaN})(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(cb.LIVE_EDGE_OFFSET))return+this.getAttribute(cb.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){e!=this.liveEdgeOffset&&(null==e?this.removeAttribute(cb.LIVE_EDGE_OFFSET):this.setAttribute(cb.LIVE_EDGE_OFFSET,`${+e}`))}get seekable(){return iK(this.nativeEl)}async addCuePoints(e){return io(this.nativeEl,e)}get activeCuePoint(){return id(this.nativeEl)}get cuePoints(){return function(e,t={label:ir}){let i=ii(e,t.label,"metadata");return null!=i&&i.cues?Array.from(i.cues,e=>il(e)):[]}(this.nativeEl)}
1321async addChapters(e){return ip(this.nativeEl,e)}get activeChapter(){return iv(this.nativeEl)}get chapters(){return function(e,t={label:ic}){var i;let a=ii(e,t.label,"chapters");return null!=(i=null==a?void 0:a.cues)&&i.length?Array.from(a.cues,e=>im(e)):[]}(this.nativeEl)}getStartDate(){return function(e,t){if(t){let i=t.playingDate;if(null!=i)return new Date(i.getTime()-1e3*e.currentTime)}return"function"==typeof e.getStartDate?e.getStartDate():new Date(NaN)}(this.nativeEl,this._hls)}get currentPdt(){var e,t;return e=this.nativeEl,(t=this._hls)&&t.playingDate?t.playingDate:new Date("function"==typeof e.getStartDate?e.getStartDate().getTime()+1e3*e.currentTime:NaN)}get preferPlayback(){let e=this.getAttribute(cb.PREFER_PLAYBACK);if(e===tV.MSE||e===tV.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===tV.MSE||e===tV.NATIVE?this.setAttribute(cb.PREFER_PLAYBACK,e):this.removeAttribute(cb.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(e=>e.startsWith("metadata-")&&![cb.METADATA_URL].includes(e)).reduce((e,t)=>{let i=this.getAttribute(t);return null!=i&&(e[t.replace(/^metadata-/,"").replace(/-/g,"_")]=i),e},{}),...oR(this,cd)}}set metadata(e){oD(this,cd,null!=e?e:{}),this.mux&&this.mux.emit("hb",oR(this,cd))}get _hlsConfig(){return oR(this,cc)}set _hlsConfig(e){oD(this,cc,e)}get logo(){return this.getAttribute(cb.LOGO)}set logo(e){e?this.setAttribute(cb.LOGO,e):this.removeAttribute(cb.LOGO)}load(){oD(this,cs,((e,t,i)=>{var a,r,n,s;iZ(t,i);let{metadata:o={}}=e,{view_session_id:l=iW()}=o,d=null!=(r=null==(a=e)?void 0:a.metadata)&&r.video_id?a.metadata.video_id:i4(a)&&null!=(s=null!=(n=iV(a.playbackId))?n:iF(a.src))?s:a.src;o.view_session_id=l,o.video_id=d,e.metadata=o,e.drmTypeCb=e=>{var i;null==(i=t.mux)||i.emit("hb",{view_drm_type:e})},ix.set(t,{});let u=((e,t)=>{let{debug:i,streamType:a,startTime:r=-1,metadata:n,preferCmcd:s,_hlsConfig:o={}}=e,l=tX(e)===t$.M3U8,d=iz(e,t);if(l&&!d&&iU){let t=iX(a),l=iJ(e);return new tM({debug:i,startPosition:r,cmcd:s!==tF.NONE?{useHeaders:s===tF.HEADER,sessionId:null==n?void 0:n.view_session_id,contentId:null==n?void 0:n.video_id}:void 0,xhrSetup:(e,t)=>{var i,a;if(s&&s!==tF.QUERY)return;let r=new URL(t);if(!r.searchParams.has("CMCD"))return;let n=(null!=(a=null==(i=r.searchParams.get("CMCD"))?void 0:i.split(","))?a:[]).filter(e=>e.startsWith("sid")||e.startsWith("cid")).join(",");r.searchParams.set("CMCD",n),e.open("GET",r)},capLevelController:iy,...{backBufferLength:30,renderTextTracksNatively:!1,liveDurationInfinity:!0,capLevelToPlayerSize:!0,capLevelOnFPSDrop:!0},...t,...l,...o})}})(e,t),c=(({preload:e,src:t},i,a)=>{let r=e=>{null!=e&&["","none","metadata","auto"].includes(e)?i.setAttribute("preload",e):i.removeAttribute("preload")};if(!a)return r(e),r;let n=!1,s=!1,o=a.config.maxBufferLength,l=a.config.maxBufferSize,d=e=>{r(e);let t=null!=e?e:i.preload;s||"none"===t||("metadata"===t?(a.config.maxBufferLength=1,a.config.maxBufferSize=1):(a.config.maxBufferLength=o,a.config.maxBufferSize=l),u())},u=()=>{!n&&t&&(n=!0,a.loadSource(t))};return tZ(i,"play",()=>{s=!0,a.config.maxBufferLength=o,a.config.maxBufferSize=l,u()},{once:!0}),d(e),d})(e,t,u);((e,t,i)=>{var a;let{envKey:r,disableTracking:n}=e,s=i4(e);if(!n&&(r||s)){let{playerInitTime:n,playerSoftwareName:s,playerSoftwareVersion:o,beaconCollectionDomain:l,debug:d,disableCookies:u}=e,c={...e.metadata,video_title:(null==(a=null==e?void 0:e.metadata)?void 0:a.video_title)||void 0};tD.monitor(t,{debug:d,beaconCollectionDomain:l,hlsjs:i,Hls:i?tM:void 0,automaticErrorTracking:!1,errorTranslator:t=>"string"!=typeof t.player_error_code&&("function"==typeof e.errorTranslator?e.errorTranslator(t):t),disableCookies:u,data:{...r?{env_key:r}:{},player_software_name:s,player_software:s,player_software_version:o,player_init_time:n,...c}})}})(e,t,u),((e,t,i)=>{var a,r;let n=iz(e,t),{src:s}=e,o=()=>{t.ended||!iQ(t,i)||(ij(t,i)?t.currentTime=t.buffered.end(t.buffered.length-1):t.dispatchEvent(new Event("ended")))},l,d,u=()=>{let e=iK(t),i,a;e.length>0&&(i=e.start(0),a=e.end(0)),(d!==a||l!==i)&&t.dispatchEvent(new CustomEvent("seekablechange",{composed:!0})),l=i,d=a};if(tZ(t,"durationchange",u),t&&n){let i=tX(e);if("string"==typeof s){let n=()=>
1321{if(i$(t)!==tH.LIVE||Number.isFinite(t.duration))return;let e=setInterval(u,1e3);t.addEventListener("teardown",()=>{clearInterval(e)},{once:!0}),tZ(t,"durationchange",()=>{Number.isFinite(t.duration)&&clearInterval(e)})},o=async()=>iL(s,t,i).then(n).catch(i=>{if(i instanceof Response){let a=ig(i,tO.VIDEO,e);if(a)return void i8(t,a)}});if("none"===t.preload){let e=()=>{o(),t.removeEventListener("loadedmetadata",i)},i=()=>{o(),t.removeEventListener("play",e)};tZ(t,"play",e,{once:!0}),tZ(t,"loadedmetadata",i,{once:!0})}else o();null!=(a=e.tokens)&&a.drm?((e,t)=>{tZ(t,"encrypted",async i=>{try{let a=i.initDataType;if("skd"!==a)return void console.error(`Received unexpected initialization data type "${a}"`);if(!t.mediaKeys){let i=await navigator.requestMediaKeySystemAccess("com.apple.fps",[{initDataTypes:[a],videoCapabilities:[{contentType:"application/vnd.apple.mpegurl",robustness:""}],distinctiveIdentifier:"not-allowed",persistentState:"not-allowed",sessionTypes:["temporary"]}]).then(t=>{var i;return null==(i=e.drmTypeCb)||i.call(e,iR.FAIRPLAY),t}).catch(()=>{let e=t5("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),i=new tU(e,tU.MEDIA_ERR_ENCRYPTED,!0);i.errorCategory=tO.DRM,i.muxCode=tN.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM,i8(t,i)});if(!i)return;let r=await i.createMediaKeys();try{let t=await i0(i3(e,"fairplay")).catch(t=>{if(t instanceof Response){let i=ig(t,tO.DRM,e);return console.error("mediaError",null==i?void 0:i.message,null==i?void 0:i.context),i?Promise.reject(i):Promise.reject(Error("Unexpected error in app cert request"))}return Promise.reject(t)});await r.setServerCertificate(t).catch(()=>{let e=t5("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),t=new tU(e,tU.MEDIA_ERR_ENCRYPTED,!0);return t.errorCategory=tO.DRM,t.muxCode=tN.ENCRYPTED_UPDATE_SERVER_CERT_FAILED,Promise.reject(t)})}catch(e){i8(t,e);return}await t.setMediaKeys(r)}let r=i.initData;if(null==r)return void console.error(`Could not start encrypted playback due to missing initData in ${i.type} event`);let n=t.mediaKeys.createSession();n.addEventListener("keystatuseschange",()=>{n.keyStatuses.forEach(e=>{let i;if("internal-error"===e){let e=t5("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser.");(i=new tU(e,tU.MEDIA_ERR_ENCRYPTED,!0)).errorCategory=tO.DRM,i.muxCode=tN.ENCRYPTED_CDM_ERROR}else if("output-restricted"===e||"output-downscaled"===e){let e=t5("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen.");(i=new tU(e,tU.MEDIA_ERR_ENCRYPTED,!1)).errorCategory=tO.DRM,i.muxCode=tN.ENCRYPTED_OUTPUT_RESTRICTED}i&&i8(t,i)})});let s=await Promise.all([n.generateRequest(a,r).catch(()=>{let e=t5("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),i=new tU(e,tU.MEDIA_ERR_ENCRYPTED,!0);i.errorCategory=tO.DRM,i.muxCode=tN.ENCRYPTED_GENERATE_REQUEST_FAILED,i8(t,i)}),new Promise(e=>{n.addEventListener("message",t=>{e(t.message)},{once:!0})})]).then(([,e])=>e),o=await i1(s,i2(e,"fairplay")).catch(t=>{if(t instanceof Response){let i=ig(t,tO.DRM,e);return console.error("mediaError",null==i?void 0:i.message,null==i?void 0:i.context),i?Promise.reject(i):Promise.reject(Error("Unexpected error in license key request"))}return Promise.reject(t)});await n.update(o).catch(()=>{let e=t5("Failed to update DRM license. This may be an issue with the player or your protected content."),t=new tU(e,tU.MEDIA_ERR_ENCRYPTED,!0);return t.errorCategory=tO.DRM,t.muxCode=tN.ENCRYPTED_UPDATE_LICENSE_FAILED,Promise.reject(t)})}catch(e){i8(t,e);return}})})(e,t):tZ(t,"encrypted",()=>{let e=new tU(t5("Attempting to play DRM-protected content without providing a DRM token."),tU.MEDIA_ERR_ENCRYPTED,!0);e.errorCategory=tO.DRM,e.muxCode=tN.ENCRYPTED_MISSING_TOKEN,i8(t,e)},{once:!0}),t.setAttribute("src",s),e.startTime&&((null!=(r=ix.get(t))?r:{}).startTime=e.startTime,t.addEventListener("durationchange",i5,{once:!0}))}else t.removeAttribute("src");t.addEventListener("error",i9),t.addEventListener("error",i6),t.addEventListener("emptied",()=>
1321{t.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})},{once:!0}),tZ(t,"pause",o),tZ(t,"seeked",o),tZ(t,"play",()=>{t.ended||iG(t.currentTime,t.duration)&&(t.currentTime=t.seekable.length?t.seekable.start(0):0)})}else i&&s?(i.once(tM.Events.LEVEL_LOADED,(e,a)=>{((e,t,i)=>{var a,r,n,s,o,l,d,u;let{streamType:c,targetLiveWindow:h,liveEdgeStartOffset:m,lowLatency:p}=(e=>{var t;let i=e.type,a=tJ(i),r=t0(i),n,s=!!(null!=(t=e.partList)&&t.length);return a===tH.LIVE&&(n=s?2*e.partTarget:3*e.targetduration),{streamType:a,targetLiveWindow:r,liveEdgeStartOffset:n,lowLatency:s}})(e);if(c===tH.LIVE){p?(i.config.backBufferLength=null!=(a=i.userConfig.backBufferLength)?a:4,i.config.maxFragLookUpTolerance=null!=(r=i.userConfig.maxFragLookUpTolerance)?r:.001,i.config.abrBandWidthUpFactor=null!=(n=i.userConfig.abrBandWidthUpFactor)?n:i.config.abrBandWidthFactor):i.config.backBufferLength=null!=(s=i.userConfig.backBufferLength)?s:8;let e=Object.freeze({get length(){return t.seekable.length},start:e=>t.seekable.start(e),end(e){var a;return e>this.length||e<0||Number.isFinite(t.duration)?t.seekable.end(e):null!=(a=i.liveSyncPosition)?a:t.seekable.end(e)}});(null!=(o=ix.get(t))?o:{}).seekable=e}(null!=(l=ix.get(t))?l:{}).liveEdgeStartOffset=m,(null!=(d=ix.get(t))?d:{}).targetLiveWindow=h,t.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),(null!=(u=ix.get(t))?u:{}).streamType=c,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))})(a.details,t,i),u(),i$(t)!==tH.LIVE||Number.isFinite(t.duration)||(i.on(tM.Events.LEVEL_UPDATED,u),tZ(t,"durationchange",()=>{Number.isFinite(t.duration)&&i.off(tM.Events.LEVELS_UPDATED,u)}))}),i.on(tM.Events.ERROR,(i,a)=>{i8(t,i7(a,e))}),t.addEventListener("error",i6),tZ(t,"waiting",o),function(e,t){var i;if(!("videoTracks"in e))return;let a=new WeakMap;t.on(tM.Events.MANIFEST_PARSED,function(t,i){n();let r=e.addVideoTrack("main");for(let[e,t]of(r.selected=!0,i.levels.entries())){let i=r.addRendition(t.url[0],t.width,t.height,t.videoCodec,t.bitrate);a.set(t,`${e}`),i.id=`${e}`}}),t.on(tM.Events.AUDIO_TRACKS_UPDATED,function(t,i){for(let t of(r(),i.audioTracks)){let i=t.default?"main":"alternative",a=e.addAudioTrack(i,t.name,t.lang);a.id=`${t.id}`,t.default&&(a.enabled=!0)}}),e.audioTracks.addEventListener("change",()=>{var i;let a=+(null==(i=[...e.audioTracks].find(e=>e.enabled))?void 0:i.id),r=t.audioTracks.map(e=>e.id);a!=t.audioTrack&&r.includes(a)&&(t.audioTrack=a)}),t.on(tM.Events.LEVELS_UPDATED,function(t,i){var r;let n=e.videoTracks[null!=(r=e.videoTracks.selectedIndex)?r:0];if(!n)return;let s=i.levels.map(e=>a.get(e));for(let t of e.videoRenditions)t.id&&!s.includes(t.id)&&n.removeRendition(t)});null==(i=e.videoRenditions)||i.addEventListener("change",i=>{var a;let r,n,s,o=i.target.selectedIndex;o!=t.nextLevel&&(a=o,r=e.currentTime,n=!1,s=(e,t)=>{n||(n=!Number.isFinite(t.endOffset))},t.on(tM.Events.BUFFER_FLUSHING,s),t.nextLevel=a,t.off(tM.Events.BUFFER_FLUSHING,s),n||t.trigger(tM.Events.BUFFER_FLUSHING,{startOffset:r+10,endOffset:1/0,type:"video"}))});let r=()=>{for(let t of e.audioTracks)e.removeAudioTrack(t)},n=()=>{(()=>{for(let t of e.videoTracks)e.removeVideoTrack(t)})(),r()};t.once(tM.Events.DESTROYING,n)}(e,i),function(e,t){t.on(tM.Events.NON_NATIVE_TEXT_TRACKS_FOUND,(i,{tracks:a})=>{a.forEach(i=>{var a,r;let n=null!=(a=i.subtitleTrack)?a:i.closedCaptions,s=t.subtitleTracks.findIndex(({lang:e,name:t,type:a})=>e==(null==n?void 0:n.lang)&&t===i.label&&a.toLowerCase()===i.kind),o=(null!=(r=i._id)?r:i.default)?"default":`${i.kind}${s}`;it(e,i.kind,i.label,null==n?void 0:n.lang,o,i.default)})});let i=()=>{if(!t.subtitleTracks.length)return;let i=Array.from(e.textTracks).find(e=>e.id&&"showing"===e.mode&&["subtitles","captions"].includes(e.kind));if(!i)return;let a=t.subtitleTracks[t.subtitleTrack],r=a?a.default?"default":`${t.subtitleTracks[t.subtitleTrack].type.toLowerCase()}${t.subtitleTrack}`:void 0;if(t.subtitleTrack<0||(null==i?void 0:i.id)!==r){let e=t.subtitleTracks.findIndex(({lang:e,name:t,type:a,default:r})=>"default"===i.id&&r||e==i.language&&t===i.label&&a.toLowerCase()===i.kind);t.subtitleTrack=e}
1321(null==i?void 0:i.id)===r&&i.cues&&Array.from(i.cues).forEach(e=>{i.addCue(e)})};e.textTracks.addEventListener("change",i),t.on(tM.Events.CUES_PARSED,(t,{track:i,cues:a})=>{let r=e.textTracks.getTrackById(i);if(!r)return;let n="disabled"===r.mode;n&&(r.mode="hidden"),a.forEach(e=>{var t;null!=(t=r.cues)&&t.getCueById(e.id)||r.addCue(e)}),n&&(r.mode="disabled")}),t.once(tM.Events.DESTROYING,()=>{e.textTracks.removeEventListener("change",i),e.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})});let a=()=>{Array.from(e.textTracks).forEach(t=>{var i,a;if(!["subtitles","caption"].includes(t.kind)&&("thumbnails"===t.label||"chapters"===t.kind)){if(!(null!=(i=t.cues)&&i.length)){let i="track";t.kind&&(i+=`[kind="${t.kind}"]`),t.label&&(i+=`[label="${t.label}"]`);let r=e.querySelector(i),n=null!=(a=null==r?void 0:r.getAttribute("src"))?a:"";null==r||r.removeAttribute("src"),setTimeout(()=>{null==r||r.setAttribute("src",n)},0)}"hidden"!==t.mode&&(t.mode="hidden")}})};t.once(tM.Events.MANIFEST_LOADED,a),t.once(tM.Events.MEDIA_ATTACHED,a)}(t,i),i.attachMedia(t)):console.error("It looks like the video you're trying to play will not work on this system! If possible, try upgrading to the newest versions of your browser or software.")})(e,t,u),iu(t),iE(t);let h=((e,t,i)=>{let{autoplay:a}=e,r=!1,n=!1,s=t6(a)?a:!!a,o=()=>{r||tZ(t,"playing",()=>{r=!0},{once:!0})};if(o(),tZ(t,"loadstart",()=>{r=!1,o(),t7(t,s)},{once:!0}),tZ(t,"loadstart",()=>{i||(n=e.streamType&&e.streamType!==tH.UNKNOWN?e.streamType===tH.LIVE:!Number.isFinite(t.duration)),t7(t,s)},{once:!0}),i&&i.once(tM.Events.LEVEL_LOADED,(t,i)=>{var a;n=e.streamType&&e.streamType!==tH.UNKNOWN?e.streamType===tH.LIVE:null!=(a=i.details.live)&&a}),!s){let a=()=>{!n||Number.isFinite(e.startTime)||(null!=i&&i.liveSyncPosition?t.currentTime=i.liveSyncPosition:Number.isFinite(t.seekable.end(0))&&(t.currentTime=t.seekable.end(0)))};i&&tZ(t,"play",()=>{"metadata"===t.preload?i.once(tM.Events.LEVEL_UPDATED,a):a()},{once:!0})}return e=>{r||t7(t,s=t6(e)?e:!!e)}})(e,t,u);return{engine:u,setAutoplay:h,setPreload:c}})(this,this.nativeEl,oR(this,cs)))}unload(){iZ(this.nativeEl,oR(this,cs)),oD(this,cs,void 0)}attributeChangedCallback(e,t,i){var a,r;switch(d2.observedAttributes.includes(e)&&!["src","autoplay","preload"].includes(e)&&super.attributeChangedCallback(e,t,i),e){case cb.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=null!=i?i:void 0;break;case cb.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=null!=i?i:void 0;break;case"src":{let e=!!t,a=!!i;!e&&a?oL(this,cv,cE).call(this):e&&!a?this.unload():e&&a&&(this.unload(),oL(this,cv,cE).call(this));break}
1321case"autoplay":if(i===t)break;null==(a=oR(this,cs))||a.setAutoplay(this.autoplay);break;case"preload":if(i===t)break;null==(r=oR(this,cs))||r.setPreload(i);break;case cb.PLAYBACK_ID:this.src=iH(this);break;case cb.DEBUG:{let e=this.debug;this.mux&&console.info("Cannot toggle debug mode of mux data after initialization. Make sure you set all metadata to override before setting the src."),this._hls&&(this._hls.config.debug=e);break}case cb.METADATA_URL:i&&fetch(i).then(e=>e.json()).then(e=>this.metadata=e).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${i}!`));break;case cb.STREAM_TYPE:(null==i||i!==t)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case cb.TARGET_LIVE_WINDOW:(null==i||i!==t)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}))}}connectedCallback(){var e;null==(e=super.connectedCallback)||e.call(this),this.nativeEl&&this.src&&!oR(this,cs)&&oL(this,cv,cE).call(this)}disconnectedCallback(){this.unload()}};cs=new WeakMap,co=new WeakMap,cl=new WeakMap,cd=new WeakMap,cu=new WeakMap,cc=new WeakMap,ch=new WeakMap,cm=new WeakMap,cp=new WeakMap,cv=new WeakSet,cE=async function(){oR(this,co)||(await oD(this,co,Promise.resolve()),oD(this,co,null),this.load())};var cy,cT=class extends uS(ca(c_)){constructor(){super(...arguments),oC(this,cy)}get muxCastCustomData(){return{mux:{playbackId:this.playbackId,minResolution:this.minResolution,maxResolution:this.maxResolution,renditionOrder:this.renditionOrder,customDomain:this.customDomain,tokens:{drm:this.drmToken},envKey:this.envKey,metadata:this.metadata,disableCookies:this.disableCookies,disableTracking:this.disableTracking,beaconCollectionDomain:this.beaconCollectionDomain,startTime:this.startTime,preferCmcd:this.preferCmcd}}}get castCustomData(){var e;return null!=(e=oR(this,cy))?e:this.muxCastCustomData}set castCustomData(e){oD(this,cy,e)}};cy=new WeakMap,dY.customElements.get("mux-video")||(dY.customElements.define("mux-video",cT),dY.MuxVideoElement=cT);var cA=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ck=(e,t,i)=>(cA(e,t,"read from private field"),i?i.call(e):t.get(e)),cw=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},cS=(e,t,i,a)=>(cA(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let cI={processCallback(e,t,i){if(i){for(let[e,a]of t)if(e in i){let t=i[e];"boolean"==typeof t&&a instanceof cx&&"boolean"==typeof a.element[a.attributeName]?a.booleanValue=t:"function"==typeof t&&a instanceof cx?a.element[a.attributeName]=t:a.value=t}}}};class cR extends ax.DocumentFragment{constructor(e,t,i=cI){var a;super(),cw(this,mm,void 0),cw(this,mp,void 0),this.append(e.content.cloneNode(!0)),cS(this,mm,cC(this)),cS(this,mp,i),null==(a=i.createCallback)||a.call(i,this,ck(this,mm),t),i.processCallback(this,ck(this,mm),t)}update(e){ck(this,mp).processCallback(this,ck(this,mm),e)}}mm=new WeakMap,mp=new WeakMap;let cC=(e,t=[])=>{let i,a;for(let r of e.attributes||[])if(r.value.includes("{{")){let n=new cN;for([i,a]of cL(r.value))if(i){let i=new cx(e,r.name,r.namespaceURI);n.append(i),t.push([a,i])}else n.append(a);r.value=n.toString()}for(let r of e.childNodes)if(1!==r.nodeType||r instanceof HTMLTemplateElement){let n=r.data;if(1===r.nodeType||n.includes("{{")){let s=[];if(n)for([i,a]of cL(n))if(i){let i=new cP(e);s.push(i),t.push([a,i])}else s.push(new Text(a));else if(r instanceof HTMLTemplateElement){let i=new cU(e,r);s.push(i),t.push([i.expression,i])}r.replaceWith(...s.flatMap(e=>e.replacementNodes||[e]))}}else cC(r,t);return t},cD={},cL=e=>{let t="",i=0,a=cD[e],r=0,n;if(a)return a;for(a=[];n=e[r];r++)"{"===n&&"{"===e[r+1]&&"\\"!==e[r-1]&&e[r+2]&&1==++i?(t&&a.push([0,t]),t="",r++):"}"!==n||"}"!==e[r+1]||"\\"===e[r-1]||--i?t+=n||"":(a.push([1,t.trim()]),t="",r++);return t&&a.push([0,(i>0?"{{":"")+t]),cD[e]=a};class cM{get value(){return""}set value(e){}toString(){return this.value}}let cO=new WeakMap;class cN{constructor(){cw(this,mv,[])}[Symbol.iterator](){return ck(this,mv).values()}get length(){return ck(this,mv).length}item(e){return ck(this,mv)[e]}append(...e){for(let t of e)t instanceof cx&&cO.set(t,this),ck(this,mv).push(t)}toString(){return ck(this,mv).join("")}}mv=new WeakMap;class cx extends cM{constructor(e,t,i){super(),cw(this,m_),cw(this,mE,""),cw(this,mb,void 0),cw(this,mf,void 0),cw(this,mg,void 0),cS(this,mb,e),cS(this,mf,t),cS(this,mg,i)}get attributeName(){return ck(this,mf)}get attributeNamespace(){return ck(this,mg)}
1321get element(){return ck(this,mb)}get value(){return ck(this,mE)}set value(e){ck(this,mE)!==e&&(cS(this,mE,e),ck(this,m_,my)&&1!==ck(this,m_,my).length?ck(this,mb).setAttributeNS(ck(this,mg),ck(this,mf),ck(this,m_,my).toString()):null==e?ck(this,mb).removeAttributeNS(ck(this,mg),ck(this,mf)):ck(this,mb).setAttributeNS(ck(this,mg),ck(this,mf),e))}get booleanValue(){return ck(this,mb).hasAttributeNS(ck(this,mg),ck(this,mf))}set booleanValue(e){if(ck(this,m_,my)&&1!==ck(this,m_,my).length)throw new DOMException("Value is not fully templatized");this.value=e?"":null}}mE=new WeakMap,mb=new WeakMap,mf=new WeakMap,mg=new WeakMap,m_=new WeakSet,my=function(){return cO.get(this)};class cP extends cM{constructor(e,t){super(),cw(this,mT,void 0),cw(this,mA,void 0),cS(this,mT,e),cS(this,mA,t?[...t]:[new Text])}get replacementNodes(){return ck(this,mA)}get parentNode(){return ck(this,mT)}get nextSibling(){return ck(this,mA)[ck(this,mA).length-1].nextSibling}get previousSibling(){return ck(this,mA)[0].previousSibling}get value(){return ck(this,mA).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){let t=e.flat().flatMap(e=>null==e?[new Text]:e.forEach?[...e]:11===e.nodeType?[...e.childNodes]:e.nodeType?[e]:[new Text(e)]);t.length||t.push(new Text),cS(this,mA,function(e,t,i,a=null){let r=0,n,s,o,l=i.length,d=t.length;for(;r<l&&r<d&&t[r]==i[r];)r++;for(;r<l&&r<d&&i[l-1]==t[d-1];)a=i[--d,--l];if(r==d)for(;r<l;)e.insertBefore(i[r++],a);if(r==l)for(;r<d;)e.removeChild(t[r++]);else{for(n=t[r];r<l;)o=i[r++],s=n?n.nextSibling:a,n==o?n=s:r<l&&i[r]==s?(e.replaceChild(o,n),n=s):e.insertBefore(o,n);for(;n!=a;)s=n.nextSibling,e.removeChild(n),n=s}return i}(ck(this,mA)[0].parentNode,ck(this,mA),t,this.nextSibling))}}mT=new WeakMap,mA=new WeakMap;class cU extends cP{constructor(e,t){let i=t.getAttribute("directive")||t.getAttribute("type"),a=t.getAttribute("expression")||t.getAttribute(i)||"";a.startsWith("{{")&&(a=a.trim().slice(2,-2).trim()),super(e),this.expression=a,this.template=t,this.directive=i}}let cB={string:e=>String(e)};class cW{constructor(e){this.template=e,this.state=void 0}}let cH=new WeakMap,cV=new WeakMap,cF={partial:(e,t)=>{t[e.expression]=new cW(e.template)},if:(e,t)=>{var i;if(cY(e.expression,t))if(cH.get(e)!==e.template){cH.set(e,e.template);let i=new cR(e.template,t,c$);e.replace(i),cV.set(e,i)}else null==(i=cV.get(e))||i.update(t);else e.replace(""),cH.delete(e),cV.delete(e)}},cq=Object.keys(cF),c$={processCallback(e,t,i){var a,r;if(i)for(let[e,n]of t){if(n instanceof cU){if(!n.directive){let e=cq.find(e=>n.template.hasAttribute(e));e&&(n.directive=e,n.expression=n.template.getAttribute(e))}null==(a=cF[n.directive])||a.call(cF,n,i);continue}let t=cY(e,i);if(t instanceof cW){cH.get(n)!==t.template?(cH.set(n,t.template),n.value=t=new cR(t.template,t.state,c$),cV.set(n,t)):null==(r=cV.get(n))||r.update(t.state);continue}t?(n instanceof cx&&n.attributeName.startsWith("aria-")&&(t=String(t)),n instanceof cx?"boolean"==typeof t?n.booleanValue=t:"function"==typeof t?n.element[n.attributeName]=t:n.value=t:(n.value=t,cH.delete(n),cV.delete(n))):n instanceof cx?n.value=void 0:(n.value=void 0,cH.delete(n),cV.delete(n))}}},cK={"!":e=>!e,"!!":e=>!!e,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,">":(e,t)=>e>t,">=":(e,t)=>
1321e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"??":(e,t)=>null!=e?e:t,"|":(e,t)=>{var i;return null==(i=cB[t])?void 0:i.call(cB,e)}};function cY(e,t={}){var i,a,r,n,s,o,l;let d=(function(e,t){let i,a,r,n=[];for(;e;){for(let n in r=null,i=e.length,t)(a=t[n].exec(e))&&a.index<i&&(r={token:a[0],type:n,matches:a.slice(1)},i=a.index);i&&n.push({token:e.substr(0,i),type:void 0}),r&&n.push(r),e=e.substr(i+(r?r.token.length:0))}return n})(e,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>"ws"!==e);if(0===d.length||d.some(({type:e})=>!e))return cG(e);if((null==(i=d[0])?void 0:i.token)===">"){let i=t[null==(a=d[1])?void 0:a.token];if(!i)return cG(e);let o={...t};i.state=o;let l=d.slice(2);for(let e=0;e<l.length;e+=3){let i=null==(r=l[e])?void 0:r.token,a=null==(n=l[e+1])?void 0:n.token,d=null==(s=l[e+2])?void 0:s.token;i&&"="===a&&(o[i]=cQ(d,t))}return i}if(1===d.length)return cj(d[0])?cQ(d[0].token,t):cG(e);if(2===d.length){let i=cK[null==(o=d[0])?void 0:o.token];return i&&cj(d[1])?i(cQ(d[1].token,t)):cG(e)}if(3===d.length){let i=null==(l=d[1])?void 0:l.token,a=cK[i];if(!a||!cj(d[0])||!cj(d[2]))return cG(e);let r=cQ(d[0].token,t);return a(r,"|"===i?d[2].token:cQ(d[2].token,t))}}function cG(e){return console.warn(`Warning: invalid expression \`${e}\``),!1}function cj({type:e}){return["number","boolean","string","param"].includes(e)}function cQ(e,t){let i=e[0],a=e.slice(-1);return"true"===e||"false"===e?"true"===e:i===a&&["'",'"'].includes(i)?e.slice(1,-1):af(e)?parseFloat(e):t[e]}var cZ=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},cz=(e,t,i)=>(cZ(e,t,"read from private field"),i?i.call(e):t.get(e)),cX=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},cJ=(e,t,i,a)=>(cZ(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),c0=(e,t,i)=>(cZ(e,t,"access private method"),i);let c1={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},c2=aP.createElement("template");c2.innerHTML=`
1322  <style>
1323    :host {
1324      display: inline-block;
1325      line-height: 0;
1326    }
1327
1328    media-controller {
1329      width: 100%;
1330      height: 100%;
1331    }
1332
1333    media-captions-button:not([mediasubtitleslist]),
1334    media-captions-menu:not([mediasubtitleslist]),
1335    media-captions-menu-button:not([mediasubtitleslist]),
1336    media-audio-track-menu[mediaaudiotrackunavailable],
1337    media-audio-track-menu-button[mediaaudiotrackunavailable],
1338    media-rendition-menu[mediarenditionunavailable],
1339    media-rendition-menu-button[mediarenditionunavailable],
1340    media-volume-range[mediavolumeunavailable],
1341    media-airplay-button[mediaairplayunavailable],
1342    media-fullscreen-button[mediafullscreenunavailable],
1343    media-cast-button[mediacastunavailable],
1344    media-pip-button[mediapipunavailable] {
1345      display: none;
1346    }
1347  </style>
1348`;class c3 extends ax.HTMLElement{constructor(){super(),cX(this,mI),cX(this,mC),cX(this,mk,void 0),cX(this,mw,void 0),cX(this,mS,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());let e=new MutationObserver(e=>{var t;(!this.mediaController||(null==(t=this.mediaController)?void 0:t.breakpointsComputed))&&e.some(e=>{let t=e.target;return t===this||"media-controller"===t.localName&&!!(c1[e.attributeName]||e.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(an.BREAKPOINTS_COMPUTED,this.render),c0(this,mI,mR).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return null!=(e=cz(this,mk))?e:this.constructor.template}set template(e){cJ(this,mS,null),cJ(this,mk,e),this.createRenderer()}get props(){var e,t,i;let a=[...Array.from(null!=(t=null==(e=this.mediaController)?void 0:e.attributes)?t:[]).filter(({name:e})=>c1[e]||e.startsWith("breakpoint")),...Array.from(this.attributes)],r={};for(let e of a){let t=null!=(i=c1[e.name])?i:e.name.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase()),{value:a}=e;null!=a?(af(a)&&(a=parseFloat(a)),r[t]=""===a||a):r[t]=!1}return r}attributeChangedCallback(e,t,i){"template"===e&&t!=i&&c0(this,mC,mD).call(this)}connectedCallback(){c0(this,mC,mD).call(this)}createRenderer(){this.template&&this.template!==cz(this,mw)&&(cJ(this,mw,this.template),this.renderer=new cR(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(c2.content.cloneNode(!0),this.renderer))}render(){var e;null==(e=this.renderer)||e.update(this.props)}}async function c4(e){let t=await fetch(e);if(200!==t.status)throw Error(`Failed to load resource: the server responded with a status of ${t.status}`);return t.text()}function c5(e){return e.split("-")[0]}mk=new WeakMap,mw=new WeakMap,mS=new WeakMap,mI=new WeakSet,mR=function(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}},mC=new WeakSet,mD=function(){var e;let t=this.getAttribute("template");if(!t||t===cz(this,mS))return;let i=this.getRootNode(),a=null==(e=null==i?void 0:i.getElementById)?void 0:e.call(i,t);if(a){cJ(this,mS,t),cJ(this,mk,a),this.createRenderer();return}(function(e){if(!/^(\/|\.\/|https?:\/\/)/.test(e))return!1;let t=/^https?:\/\//.test(e)?void 0:location.origin;try{new URL(e,t)}catch(e){return!1}return!0})(t)&&(cJ(this,mS,t),c4(t).then(e=>{let t=aP.createElement("template");t.innerHTML=e,cJ(this,mk,t),this.createRenderer()}).catch(console.error))},c3.observedAttributes=["template"],c3.processor=c$,ax.customElements.get("media-theme")||ax.customElements.define("media-theme",c3);
1348class c9 extends Event{constructor({action:e="auto",relatedTarget:t,...i}){super("invoke",i),this.action=e,this.relatedTarget=t}}class c8 extends Event{constructor({newState:e,oldState:t,...i}){super("toggle",i),this.newState=e,this.oldState=t}}var c6=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},c7=(e,t,i)=>(c6(e,t,"read from private field"),i?i.call(e):t.get(e)),he=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},ht=(e,t,i,a)=>(c6(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),hi=(e,t,i)=>(c6(e,t,"access private method"),i);function ha({type:e,text:t,value:i,checked:a}){let r=aP.createElement("media-chrome-menu-item");r.type=null!=e?e:"",r.part.add("menu-item"),e&&r.part.add(e),r.value=i,r.checked=a;let n=aP.createElement("span");return n.textContent=t,r.append(n),r}function hr(e,t){let i=e.querySelector(`:scope > [slot="${t}"]`);if((null==i?void 0:i.nodeName)=="SLOT"&&(i=i.assignedElements({flatten:!0})[0]),i)return i.cloneNode(!0);let a=e.shadowRoot.querySelector(`[name="${t}"] > svg`);return a?a.cloneNode(!0):""}let hn=aP.createElement("template");hn.innerHTML=`
1349  <style>
1350    :host {
1351      font: var(--media-font,
1352        var(--media-font-weight, normal)
1353        var(--media-font-size, 14px) /
1354        var(--media-text-content-height, var(--media-control-height, 24px))
1355        var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
1356      color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
1357      --_menu-bg: rgb(20 20 30 / .8);
1358      background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, var(--_menu-bg))));
1359      border-radius: var(--media-menu-border-radius);
1360      border: var(--media-menu-border, none);
1361      display: var(--media-menu-display, inline-flex);
1362      transition: var(--media-menu-transition-in,
1363        visibility 0s,
1364        opacity .2s ease-out,
1365        transform .15s ease-out,
1366        left .2s ease-in-out,
1367        min-width .2s ease-in-out,
1368        min-height .2s ease-in-out
1369      ) !important;
1370      
1371      visibility: var(--media-menu-visibility, visible);
1372      opacity: var(--media-menu-opacity, 1);
1373      max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px));
1374      transform: var(--media-menu-transform-in, translateY(0) scale(1));
1375      flex-direction: column;
1376      
1377      min-height: 0;
1378      position: relative;
1379      bottom: var(--_menu-bottom);
1380      box-sizing: border-box;
1381    } 
1382
1383    @-moz-document url-prefix() {
1384      :host{
1385        --_menu-bg: rgb(20 20 30);
1386      }
1387    }
1388
1389    :host([hidden]) {
1390      transition: var(--media-menu-transition-out,
1391        visibility .15s ease-in,
1392        opacity .15s ease-in,
1393        transform .15s ease-in
1394      ) !important;
1395      visibility: var(--media-menu-hidden-visibility, hidden);
1396      opacity: var(--media-menu-hidden-opacity, 0);
1397      max-height: var(--media-menu-hidden-max-height,
1398        var(--media-menu-max-height, var(--_menu-max-height, 300px)));
1399      transform: var(--media-menu-transform-out, translateY(2px) scale(.99));
1400      pointer-events: none;
1401    }
1402
1403    :host([slot="submenu"]) {
1404      background: none;
1405      width: 100%;
1406      min-height: 100%;
1407      position: absolute;
1408      bottom: 0;
1409      right: -100%;
1410    }
1411
1412    #container {
1413      display: flex;
1414      flex-direction: column;
1415      min-height: 0;
1416      transition: transform .2s ease-out;
1417      transform: translate(0, 0);
1418    }
1419
1420    #container.has-expanded {
1421      transition: transform .2s ease-in;
1422      transform: translate(-100%, 0);
1423    }
1424
1425    button {
1426      background: none;
1427      color: inherit;
1428      border: none;
1429      padding: 0;
1430      font: inherit;
1431      outline: inherit;
1432      display: inline-flex;
1433      align-items: center;
1434    }
1435
1436    slot[name="header"][hidden] {
1437      display: none;
1438    }
1439
1440    slot[name="header"] > *,
1441    slot[name="header"]::slotted(*) {
1442      padding: .4em .7em;
1443      border-bottom: 1px solid rgb(255 255 255 / .25);
1444      cursor: var(--media-cursor, default);
1445    }
1446
1447    slot[name="header"] > button[part~="back"],
1448    slot[name="header"]::slotted(button[part~="back"]) {
1449      cursor: var(--media-cursor, pointer);
1450    }
1451
1452    svg[part~="back"] {
1453      height: var(--media-menu-icon-height, var(--media-control-height, 24px));
1454      fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
1455      display: block;
1456      margin-right: .5ch;
1457    }
1458
1459    slot:not([name]) {
1460      gap: var(--media-menu-gap);
1461      flex-direction: var(--media-menu-flex-direction, column);
1462      overflow: var(--media-menu-overflow, hidden auto);
1463      display: flex;
1464      min-height: 0;
1465    }
1466
1467    :host([role="menu"]) slot:not([name]) {
1468      padding-block: .4em;
1469    }
1470
1471    slot:not([name])::slotted([role="menu"]) {
1472      background: none;
1473    }
1474
1475    media-chrome-menu-item > span {
1476      margin-right: .5ch;
1477      max-width: var(--media-menu-item-max-width);
1478      text-overflow: ellipsis;
1479      overflow: hidden;
1480    }
1481  </style>
1482  <style id="layout-row" media="width:0">
1483
1484    slot[name="header"] > *,
1485    slot[name="header"]::slotted(*) {
1486      padding: .4em .5em;
1487    }
1488
1489    slot:not([name]) {
1490      gap: var(--media-menu-gap, .25em);
1491      flex-direction: var(--media-menu-flex-direction, row);
1492      padding-inline: .5em;
1493    }
1494
1495    media-chrome-menu-item {
1496      padding: .3em .5em;
1497    }
1498
1499    media-chrome-menu-item[aria-checked="true"] {
1500      background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2));
1501    }
1502
1503    
1504    media-chrome-menu-item::part(checked-indicator) {
1505      display: var(--media-menu-item-checked-indicator-display, none);
1506    }
1507  </style>
1508  <div id="container">
1509    <slot name="header" hidden>
1510      <button part="back button" aria-label="Back to previous menu">
1511        <slot name="back-icon">
1512          <svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator">
1513            <path d="m11.88 17.585.742-.669-4.2-4.665 4.2-4.666-.743-.669-4.803 5.335 4.803 5.334Z"/>
1514          </svg>
1515        </slot>
1516        <slot name="title"></slot>
1517      </button>
1518    </slot>
1519    <slot></slot>
1520  </div>
1521  <slot name="checked-indicator" hidden></slot>
1522`;let hs={STYLE:"style",HIDDEN:"hidden",DISABLED:"disabled",ANCHOR:"anchor"};class ho extends ax.HTMLElement{constructor(){super(),he(this,mB),he(this,mV),he(this,mq),he(this,mK),he(this,mG),he(this,mz),he(this,mJ),he(this,m1
1522),he(this,m3),he(this,m5),he(this,m8),he(this,m7),he(this,pt),he(this,pa),he(this,pn),he(this,po),he(this,pd),he(this,mL,null),he(this,mM,null),he(this,mO,null),he(this,mN,new Set),he(this,mx,void 0),he(this,mP,!1),he(this,mU,null),he(this,mH,()=>{let e=c7(this,mN),t=new Set(this.items);for(let i of e)t.has(i)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:i}));for(let i of t)e.has(i)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:i}));ht(this,mN,t)}),he(this,mQ,()=>{hi(this,mz,mX).call(this),hi(this,mJ,m0).call(this,!1)}),he(this,mZ,()=>{hi(this,mz,mX).call(this)}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=this.constructor.template.content.cloneNode(!0),this.shadowRoot.append(this.nativeEl)),this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.shadowRoot.addEventListener("slotchange",this),ht(this,mx,new MutationObserver(c7(this,mH))),c7(this,mx).observe(this.defaultSlot,{childList:!0})}static get observedAttributes(){return[hs.DISABLED,hs.HIDDEN,hs.STYLE,hs.ANCHOR,at.MEDIA_CONTROLLER]}static formatMenuItemText(e,t){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this)}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this)}handleEvent(e){switch(e.type){case"slotchange":hi(this,mB,mW).call(this,e);break;case"invoke":hi(this,mq,m$).call(this,e);break;case"click":hi(this,m1,m2).call(this,e);break;case"toggle":hi(this,m5,m9).call(this,e);break;case"focusout":hi(this,m7,pe).call(this,e);break;case"keydown":hi(this,pt,pi).call(this,e)}}connectedCallback(){var e,t;ht(this,mU,aX(this.shadowRoot,":host")),hi(this,mV,mF).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),ht(this,mL,aq(this)),null==(t=null==(e=c7(this,mL))?void 0:e.associateElement)||t.call(e,this),this.hidden||(aH(hd(this),c7(this,mQ)),aH(this,c7(this,mZ)))}disconnectedCallback(){var e,t;aV(hd(this),c7(this,mQ)),aV(this,c7(this,mZ)),this.disable(),null==(t=null==(e=c7(this,mL))?void 0:e.unassociateElement)||t.call(e,this),ht(this,mL,null)}attributeChangedCallback(e,t,i){var a,r,n,s;e===hs.HIDDEN&&i!==t?(c7(this,mP)||ht(this,mP,!0),this.hidden?hi(this,mG,mj).call(this):hi(this,mK,mY).call(this),this.dispatchEvent(new c8({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===at.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=c7(this,mL))?void 0:a.unassociateElement)||r.call(a,this),ht(this,mL,null)),i&&this.isConnected&&(ht(this,mL,aq(this)),null==(s=null==(n=c7(this,mL))?void 0:n.associateElement)||s.call(n,this))):e===hs.DISABLED&&i!==t?null==i?this.enable():this.disable():e===hs.STYLE&&i!==t&&hi(this,mV,mF).call(this)}formatMenuItemText(e,t){return this.constructor.formatMenuItemText(e,t)}get anchor(){return this.getAttribute("anchor")}set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?null==(e=aQ(this))?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(hl)}get radioGroupItems(){return this.items.filter(e=>"menuitemradio"===e.role)}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,t;return null!=(t=null==(e=this.checkedItems[0])?void 0:e.value)?t:""}set value(e){let t=this.items.find(t=>t.value===e);t&&hi(this,pd,pu).call(this,t)}focus(){if(ht(this,mM,aj()),this.items.length){hi(this,po,pl).call(this,this.items[0]),this.items[0].focus();return}let e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==e||e.focus()}handleSelect(e){var t;let i=hi(this,pa,pr).call(this,e);i&&(hi(this,pd,pu).call(this,i,"checkbox"===i.type),c7(this,mO)&&!this.hidden&&(null==(t=c7(this,mM))||t.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var t,i;let{key:a}=e,r=this.items,n=null!=(i=null!=(t=hi(this,pa,pr).call(this,e))?t:hi(this,pn,ps).call(this))?i:r[0],s=Math.max(0,r.indexOf(n));"ArrowDown"===a?s++:"ArrowUp"===a?s--:"Home"===e.key?s=0:"End"===e.key&&(s=r.length-1),s<0&&(s=r.length-1),s>r.length-1&&(s=0),hi(this,po,pl).call(this,r[s]),r[s].focus()}}function hl(e){return["menuitem","menuitemradio","menuitemcheckbox"].includes(null==e?void 0:e.role)}function hd(e){var t;return null!=(t=e.getAttribute("bounds")?aG(e,`#${e.getAttribute("bounds")}`):aF(e)||e.parentElement)?t:e}mL=new WeakMap,mM=new WeakMap,mO=new WeakMap,mN=new WeakMap,mx=new WeakMap,mP=new WeakMap,mU=new WeakMap,mB=new WeakSet,mW=function(e){let t=e.target;for(let e of t.assignedNodes({flatten:!0}))3===e.nodeType&&""===e.textContent.trim()&&e.remove();["header","title"].includes(t.name)&&(this.shadowRoot.querySelector('slot[name="header"]').hidden=0===t.assignedNodes().length),t.name||c7(this,mH).call(this)},mH=new WeakMap,mV=new WeakSet,mF=function(){var e;let t=this.shadowRoot.querySelector("#layout-row"),i=null==(e=getComputedStyle(this).getPropertyValue("--media-menu-layout"))?void 0:e.trim();t.setAttribute("media","row"===i?"":"width:0")},mq=new WeakSet,m$=function(e){ht(this,mO,e.relatedTarget),aY(this,e.relatedTarget)||(this.hidden=!this.hidden)},mK=new WeakSet,mY=function(){var e;null==(e=c7(this,mO))||e.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),aH(hd(this),c7(this,mQ)),aH(this,c7(this,mZ))},mG=new WeakSet,mj=function(){var e;
1522null==(e=c7(this,mO))||e.setAttribute("aria-expanded","false"),aV(hd(this),c7(this,mQ)),aV(this,c7(this,mZ))},mQ=new WeakMap,mZ=new WeakMap,mz=new WeakSet,mX=function(e){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;let{x:t,y:i}=function({anchor:e,floating:t,placement:i}){let{x:a,y:r}=function({anchor:e,floating:t},i){let a,r="x"==(["top","bottom"].includes(c5(i))?"y":"x")?"y":"x",n="y"===r?"height":"width",s=c5(i),o=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,d=e[n]/2-t[n]/2;switch(s){case"top":a={x:o,y:e.y-t.height};break;case"bottom":a={x:o,y:e.y+e.height};break;case"right":a={x:e.x+e.width,y:l};break;case"left":a={x:e.x-t.width,y:l};break;default:a={x:e.x,y:e.y}}switch(i.split("-")[1]){case"start":a[r]-=d;break;case"end":a[r]+=d}return a}(function({anchor:e,floating:t}){return{anchor:function(e,t){var i;let a=e.getBoundingClientRect(),r=null!=(i=null==t?void 0:t.getBoundingClientRect())?i:{x:0,y:0};return{x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}(e,t.offsetParent),floating:{x:0,y:0,width:t.offsetWidth,height:t.offsetHeight}}}({anchor:e,floating:t}),i);return{x:a,y:r}}({anchor:this.anchorElement,floating:this,placement:"top-start"});null!=e||(e=this.offsetWidth);let a=hd(this).getBoundingClientRect(),r=a.width-t-e,n=a.height-i-this.offsetHeight,{style:s}=c7(this,mU);s.setProperty("position","absolute"),s.setProperty("right",`${Math.max(0,r)}px`),s.setProperty("--_menu-bottom",`${n}px`);let o=getComputedStyle(this),l=s.getPropertyValue("--_menu-bottom")===o.bottom?n:parseFloat(o.bottom),d=a.height-l-parseFloat(o.marginBottom);this.style.setProperty("--_menu-max-height",`${d}px`)},mJ=new WeakSet,m0=function(e){let t=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=null==t?void 0:t.querySelector('[role="menu"]'),{style:a}=c7(this,mU);if(e||a.setProperty("--media-menu-transition-in","none"),i){let e=i.offsetHeight,a=Math.max(i.offsetWidth,t.offsetWidth);this.style.setProperty("min-width",`${a}px`),this.style.setProperty("min-height",`${e}px`),hi(this,mz,mX).call(this,a)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),hi(this,mz,mX).call(this);a.removeProperty("--media-menu-transition-in")},m1=new WeakSet,m2=function(e){var t;if(e.stopPropagation(),e.composedPath().includes(c7(this,m3,m4))){null==(t=c7(this,mM))||t.focus(),this.hidden=!0;return}let i=hi(this,pa,pr).call(this,e);!i||i.hasAttribute("disabled")||(hi(this,po,pl).call(this,i),this.handleSelect(e))},m3=new WeakSet,m4=function(){var e;return null==(e=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))?void 0:e.find(e=>e.matches('button[part~="back"]'))},m5=new WeakSet,m9=function(e){if(e.target===this)return;hi(this,m8,m6).call(this);let t=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(let i of t)i.invokeTargetElement!=e.target&&("open"!=e.newState||"true"!=i.getAttribute("aria-expanded")||i.invokeTargetElement.hidden||i.invokeTargetElement.dispatchEvent(new c9({relatedTarget:i})));for(let e of t)e.setAttribute("aria-expanded",`${!e.submenuElement.hidden}`);hi(this,mJ,m0).call(this,!0)},m8=new WeakSet,m6=function(){let e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)},m7=new WeakSet,pe=function(e){var t;aY(this,e.relatedTarget)||(c7(this,mP)&&(null==(t=c7(this,mM))||t.focus()),c7(this,mO)&&c7(this,mO)!==e.relatedTarget&&!this.hidden&&(this.hidden=!0))},pt=new WeakSet,pi=function(e){var t,i,a,r,n;let{key:s,ctrlKey:o,altKey:l,metaKey:d}=e;if(!o&&!l&&!d&&this.keysUsed.includes(s))if(e.preventDefault(),e.stopPropagation(),"Tab"===s){if(c7(this,mP)){this.hidden=!0;return}e.shiftKey?null==(i=null==(t=this.previousElementSibling)?void 0:t.focus)||i.call(t):null==(r=null==(a=this.nextElementSibling)?void 0:a.focus)||r.call(a),this.blur()}else"Escape"===s?(null==(n=c7(this,mM))||n.focus(),c7(this,mP)&&(this.hidden=!0)):"Enter"===s||" "===s?this.handleSelect(e):this.handleMove(e)},pa=new WeakSet,pr=function(e){return e.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))},pn=new WeakSet,ps=function(){return this.items.find(e=>0===e.tabIndex)},po=new WeakSet,pl=function(e){for(let t of this.items)t.tabIndex=t===e?0:-1},pd=new WeakSet,pu=function(e,t){let i=[...this.checkedItems];
1522"radio"===e.type&&this.radioGroupItems.forEach(e=>e.checked=!1),t?e.checked=!e.checked:e.checked=!0,this.checkedItems.some((e,t)=>e!=i[t])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},ho.template=hn,ax.customElements.get("media-chrome-menu")||ax.customElements.define("media-chrome-menu",ho);var hu=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},hc=(e,t,i)=>(hu(e,t,"read from private field"),i?i.call(e):t.get(e)),hh=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},hm=(e,t,i,a)=>(hu(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),hp=(e,t,i)=>(hu(e,t,"access private method"),i);let hv=aP.createElement("template");hv.innerHTML=`
1523  <style>
1524    :host {
1525      transition: var(--media-menu-item-transition,
1526        background .15s linear,
1527        opacity .2s ease-in-out
1528      );
1529      outline: var(--media-menu-item-outline, 0);
1530      outline-offset: var(--media-menu-item-outline-offset, -1px);
1531      cursor: var(--media-cursor, pointer);
1532      display: flex;
1533      align-items: center;
1534      align-self: stretch;
1535      justify-self: stretch;
1536      white-space: nowrap;
1537      white-space-collapse: collapse;
1538      text-wrap: nowrap;
1539      padding: .4em .8em .4em 1em;
1540    }
1541
1542    :host(:focus-visible) {
1543      box-shadow: var(--media-menu-item-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
1544      outline: var(--media-menu-item-hover-outline, 0);
1545      outline-offset: var(--media-menu-item-hover-outline-offset,  var(--media-menu-item-outline-offset, -1px));
1546    }
1547
1548    :host(:hover) {
1549      cursor: var(--media-cursor, pointer);
1550      background: var(--media-menu-item-hover-background, rgb(92 92 102 / .5));
1551      outline: var(--media-menu-item-hover-outline);
1552      outline-offset: var(--media-menu-item-hover-outline-offset,  var(--media-menu-item-outline-offset, -1px));
1553    }
1554
1555    :host([aria-checked="true"]) {
1556      background: var(--media-menu-item-checked-background);
1557    }
1558
1559    :host([hidden]) {
1560      display: none;
1561    }
1562
1563    :host([disabled]) {
1564      pointer-events: none;
1565      color: rgba(255, 255, 255, .3);
1566    }
1567
1568    slot:not([name]) {
1569      width: 100%;
1570    }
1571
1572    slot:not([name="submenu"]) {
1573      display: inline-flex;
1574      align-items: center;
1575      transition: inherit;
1576      opacity: var(--media-menu-item-opacity, 1);
1577    }
1578
1579    slot[name="description"] {
1580      justify-content: end;
1581    }
1582
1583    slot[name="description"] > span {
1584      display: inline-block;
1585      margin-inline: 1em .2em;
1586      max-width: var(--media-menu-item-description-max-width, 100px);
1587      text-overflow: ellipsis;
1588      overflow: hidden;
1589      font-size: .8em;
1590      font-weight: 400;
1591      text-align: right;
1592      position: relative;
1593      top: .04em;
1594    }
1595
1596    slot[name="checked-indicator"] {
1597      display: none;
1598    }
1599
1600    :host(:is([role="menuitemradio"],[role="menuitemcheckbox"])) slot[name="checked-indicator"] {
1601      display: var(--media-menu-item-checked-indicator-display, inline-block);
1602    }
1603
1604    
1605    svg, img, ::slotted(svg), ::slotted(img) {
1606      height: var(--media-menu-item-icon-height, var(--media-control-height, 24px));
1607      fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
1608      display: block;
1609    }
1610
1611    
1612    [part~="indicator"],
1613    ::slotted([part~="indicator"]) {
1614      fill: var(--media-menu-item-indicator-fill,
1615        var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))));
1616      height: var(--media-menu-item-indicator-height, 1.25em);
1617      margin-right: .5ch;
1618    }
1619
1620    [part~="checked-indicator"] {
1621      visibility: hidden;
1622    }
1623
1624    :host([aria-checked="true"]) [part~="checked-indicator"] {
1625      visibility: visible;
1626    }
1627  </style>
1628  <slot name="checked-indicator">
1629    <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator">
1630      <path d="m10 15.17 9.193-9.191 1.414 1.414-10.606 10.606-6.364-6.364 1.414-1.414 4.95 4.95Z"/>
1631    </svg>
1632  </slot>
1633  <slot name="prefix"></slot>
1634  <slot></slot>
1635  <slot name="description"></slot>
1636  <slot name="suffix"></slot>
1637  <slot name="submenu"></slot>
1638`;let hE={TYPE:"type",VALUE:"value",CHECKED:"checked",DISABLED:"disabled"};class hb extends ax.HTMLElement{constructor(){super(),hh(this,pm),hh(this,pv),hh(this,pb),hh(this,p_),hh(this,pT),hh(this,pk),hh(this,pc,!1),hh(this,ph,void 0),hh(this,pg,()=>{var e,t;this.setAttribute("submenusize",`${this.submenuElement.items.length}`);let i=this.shadowRoot.querySelector('slot[name="description"]'),a=null==(e=this.submenuElement.checkedItems)?void 0:e[0],r=null!=(t=null==a?void 0:a.dataset.description)?t:null==a?void 0:a.text,n=aP.createElement("span");n.textContent=null!=r?r:"",i.replaceChildren(n)}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.append(this.constructor.template.content.cloneNode(!0))),this.shadowRoot.addEventListener("slotchange",this)}static get observedAttributes(){return[hE.TYPE,hE.DISABLED,hE.CHECKED,hE.VALUE]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),hf(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","fal
1638se"),this.addEventListener("click",this),this.addEventListener("keydown",this)}disable(){this.removeAttribute("tabindex"),this.removeEventListener("click",this),this.removeEventListener("keydown",this),this.removeEventListener("keyup",this)}handleEvent(e){switch(e.type){case"slotchange":hp(this,pm,pp).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":hp(this,pT,pA).call(this,e);break;case"keyup":hp(this,p_,py).call(this,e)}}attributeChangedCallback(e,t,i){e===hE.CHECKED&&hf(this)&&!hc(this,pc)?this.setAttribute("aria-checked",null!=i?"true":"false"):e===hE.TYPE&&i!==t?this.role="menuitem"+i:e===hE.DISABLED&&i!==t&&(null==i?this.enable():this.disable())}connectedCallback(){this.hasAttribute(hE.DISABLED)||this.enable(),this.role="menuitem"+this.type,hm(this,ph,function e(t,i){if(!t)return null;let{host:a}=t.getRootNode();return!i&&a?e(t,a):(null==i?void 0:i.items)?i:e(i,null==i?void 0:i.parentNode)}(this,this.parentNode)),hp(this,pk,pw).call(this)}disconnectedCallback(){this.disable(),hp(this,pk,pw).call(this),hm(this,ph,null)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?null==(e=aQ(this))?void 0:e.querySelector(`#${this.invokeTarget}`):this.submenuElement}get submenuElement(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}get type(){var e;return null!=(e=this.getAttribute(hE.TYPE))?e:""}set type(e){this.setAttribute(hE.TYPE,`${e}`)}get value(){var e;return null!=(e=this.getAttribute(hE.VALUE))?e:this.text}set value(e){this.setAttribute(hE.VALUE,e)}get text(){var e;return(null!=(e=this.textContent)?e:"").trim()}get checked(){if(hf(this))return"true"===this.getAttribute("aria-checked")}set checked(e){hf(this)&&(hm(this,pc,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){!hf(this)&&this.invokeTargetElement&&aY(this,e.target)&&this.invokeTargetElement.dispatchEvent(new c9({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}function hf(e){return"radio"===e.type||"checkbox"===e.type}pc=new WeakMap,ph=new WeakMap,pm=new WeakSet,pp=function(e){let t=e.target;if(!(null==t?void 0:t.name))for(let e of t.assignedNodes({flatten:!0}))e instanceof Text&&""===e.textContent.trim()&&e.remove();"submenu"===t.name&&(this.submenuElement?hp(this,pv,pE).call(this):hp(this,pb,pf).call(this))},pv=new WeakSet,pE=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",hc(this,pg)),this.submenuElement.addEventListener("addmenuitem",hc(this,pg)),this.submenuElement.addEventListener("removemenuitem",hc(this,pg)),hc(this,pg).call(this)},pb=new WeakSet,pf=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",hc(this,pg)),this.submenuElement.removeEventListener("addmenuitem",hc(this,pg)),this.submenuElement.removeEventListener("removemenuitem",hc(this,pg)),hc(this,pg).call(this)},pg=new WeakMap,p_=new WeakSet,py=function(e){let{key:t}=e;if(!this.keysUsed.includes(t))return void this.removeEventListener("keyup",hp(this,p_,py));this.handleClick(e)},pT=new WeakSet,pA=function(e){let{metaKey:t,altKey:i,key:a}=e;if(t||i||!this.keysUsed.includes(a))return void this.removeEventListener("keyup",hp(this,p_,py));this.addEventListener("keyup",hp(this,p_,py),{once:!0})},pk=new WeakSet,pw=function(){var e;let t=null==(e=hc(this,ph))?void 0:e.radioGroupItems;if(!t)return;let i=t.filter(e=>"true"===e.getAttribute("aria-checked")).pop();for(let e of(i||(i=t[0]),t))e.setAttribute("aria-checked","false");null==i||i.setAttribute("aria-checked","true")},hb.template=hv,ax.customElements.get("media-chrome-menu-item")||ax.customElements.define("media-chrome-menu-item",hb);let hg=aP.createElement("template");hg.innerHTML=ho.template.innerHTML+`
1639  <style>
1640    :host {
1641      --_menu-bg: rgb(20 20 30 / .8);
1642      background: var(--media-settings-menu-background,
1643          var(--media-menu-background,
1644            var(--media-control-background,
1645              var(--media-secondary-color, var(--_menu-bg)))));
1646      min-width: var(--media-settings-menu-min-width, 170px);
1647      border-radius: 2px 2px 0 0;
1648      overflow: hidden;
1649    }
1650
1651    @-moz-document url-prefix() {
1652      :host{
1653        --_menu-bg: rgb(20 20 30);
1654      }
1655    }
1656
1657    :host([role="menu"]) {
1658      
1659      justify-content: end;
1660    }
1661
1662    slot:not([name]) {
1663      justify-content: var(--media-settings-menu-justify-content);
1664      flex-direction: var(--media-settings-menu-flex-direction, column);
1665      overflow: visible;
1666    }
1667
1668    #container.has-expanded {
1669      --media-settings-menu-item-opacity: 0;
1670    }
1671  </style>
1672`;class h_ extends ho{get anchorElement(){return"auto"!==this.anchor?super.anchorElement:aF(this).querySelector("media-settings-menu-button")}}h_.template=hg,ax.customElements.get("media-settings-menu")||ax.customElements.define("media-settings-menu",h_);let hy=aP.createElement("template");hy.innerHTML=hb.template.innerHTML+`
1673  <style>
1674    slot:not([name="submenu"]) {
1675      opacity: var(--media-settings-menu-item-opacity, var(--media-menu-item-opacity));
1676    }
1677
1678    :host([aria-expanded="true"]:hover) {
1679      background: transparent;
1680    }
1681  </style>
1682`,(null==(pS=hy.content)?void 0:pS.querySelector)&&(hy.content.querySelector('slot[name="suffix"]').innerHTML=`
1683    <svg aria-hidden="true" viewBox="0 0 20 24">
1684      <path d="m8.12 17.585-.742-.669 4.2-4.665-4.2-4.666.743-.669 4.803 5.335-4.803 5.334Z"/>
1685    </svg>
1686  `);class hT extends hb{}hT.template=hy,ax.customElements.get("media-settings-menu-item")||ax.customElements.define("media-settings-menu-item",hT);class hA extends nl{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?null==(e=aQ(this))?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;null==(e=this.invokeTargetElement)||e.dispatchEvent(new c9({relatedTarget:this}))}}ax.customElements.get("media-chrome-menu-button")||ax.customElements.define("media-chrome-menu-button",hA);let hk=aP.createElement("template");hk.innerHTML=`
1687  <style>
1688    :host([aria-expanded="true"]) slot[name=tooltip] {
1689      display: none;
1690    }
1691  </style>
1692  <slot name="icon">
1693    <svg aria-hidden="true" viewBox="0 0 24 24">
1694      <path d="M4.5 14.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"/>
1695    </svg>
1696  </slot>
1697`;class hw extends hA{static get observedAttributes(){return[...super.observedAttributes,"target"]}constructor(){super({slotTemplate:hk,tooltipContent:aS("Settings")})}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",aS("settings"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:aF(this).querySelector("media-settings-menu")}}ax.customElements.get("media-settings-menu-button")||ax.customElements.define("media-settings-menu-button",hw);var hS=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},hI=(e,t,i)=>(hS(e,t,"read from private field"),i?i.call(e):t.get(e)),hR=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},hC=(e,t,i,a)=>(hS(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),hD=(e,t,i)=>(hS(e,t,"access private method"),i);class hL extends ho{constructor(){super(...arguments),hR(this,pC),hR(this,pL),hR(this,pI,[]),hR(this,pR,void 0)}static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_AUDIO_TRACK_LIST,ar.MEDIA_AUDIO_TRACK_ENABLED,ar.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===ar.MEDIA_AUDIO_TRACK_ENABLED&&t!==i)this.value=i;else if(e===ar.MEDIA_AUDIO_TRACK_LIST&&t!==i){var a;hC(this,pI,null==(a=null!=i?i:"")?void 0:a.split(/\s+/).map(aE)),hD(this,pC,pD).call(this)}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",hD(this,pL,pM))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",hD(this,pL,pM))}get anchorElement(){var e;return"auto"!==this.anchor?super.anchorElement:null==(e=aF(this))?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return hI(this,pI)}set mediaAudioTrackList(e){hC(this,pI,e),hD(this,pC,pD).call(this)}get mediaAudioTrackEnabled(){var e;return null!=(e=a3(this,ar.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){a4(this,ar.MEDIA_AUDIO_TRACK_ENABLED,e)}}pI=new WeakMap,pR=new WeakMap,pC=new WeakSet,pD=function(){if(hI(this,pR)===JSON.stringify(this.mediaAudioTrackList))return;hC(this,pR,JSON.stringify(this.mediaAudioTrackList));let e=this.mediaAudioTrackList;for(let t of(this.defaultSlot.textContent="",e)){let e=ha({type:"radio",text:this.formatMenuItemText(t.label,t),value:`${t.id}`,checked:t.enabled});
1697e.prepend(hr(this,"checked-indicator")),this.defaultSlot.append(e)}},pL=new WeakSet,pM=function(){if(null==this.value)return;let e=new ax.CustomEvent(ae.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},ax.customElements.get("media-audio-track-menu")||ax.customElements.define("media-audio-track-menu",hL);let hM=`<svg aria-hidden="true" viewBox="0 0 24 24">
1698  <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>
1699  <path d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-2 0a8 8 0 1 0-16 0 8 8 0 0 0 16 0Z"/>
1700</svg>`,hO=aP.createElement("template");hO.innerHTML=`
1701  <style>
1702    :host([aria-expanded="true"]) slot[name=tooltip] {
1703      display: none;
1704    }
1705  </style>
1706  <slot name="icon">${hM}</slot>
1707`;class hN extends hA{static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_AUDIO_TRACK_ENABLED,ar.MEDIA_AUDIO_TRACK_UNAVAILABLE]}constructor(){super({slotTemplate:hO,tooltipContent:aS("Audio")})}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",aS("Audio"))}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=aF(this))?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return null!=(e=a3(this,ar.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){a4(this,ar.MEDIA_AUDIO_TRACK_ENABLED,e)}}ax.customElements.get("media-audio-track-menu-button")||ax.customElements.define("media-audio-track-menu-button",hN);var hx=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},hP=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},hU=(e,t,i)=>(hx(e,t,"access private method"),i);let hB=`
1708  <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator">
1709    <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
1710  </svg>`,hW=aP.createElement("template");hW.innerHTML=ho.template.innerHTML+`
1711  <slot name="captions-indicator" hidden>${hB}</slot>`;class hH extends ho{constructor(){super(...arguments),hP(this,pN),hP(this,pP),hP(this,pO,void 0)}static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_SUBTITLES_LIST,ar.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===ar.MEDIA_SUBTITLES_LIST&&t!==i?hU(this,pN,px).call(this):e===ar.MEDIA_SUBTITLES_SHOWING&&t!==i&&(this.value=i)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",hU(this,pP,pU))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",hU(this,pP,pU))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:aF(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return hV(this,ar.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){hF(this,ar.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return hV(this,ar.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){hF(this,ar.MEDIA_SUBTITLES_SHOWING,e)}}pO=new WeakMap,pN=new WeakSet,px=function(){var e,t,i,a,r,n;if(hx(this,t=pO,"read from private field"),(i?i.call(this):t.get(this))===JSON.stringify(this.mediaSubtitlesList))return;a=pO,r=JSON.stringify(this.mediaSubtitlesList),hx(this,a,"write to private field"),n?n.call(this,r):a.set(this,r),this.defaultSlot.textContent="";let s=!this.value,o=ha({type:"radio",text:this.formatMenuItemText("Off"),value:"off",checked:s});for(let t of(o.prepend(hr(this,"checked-indicator")),this.defaultSlot.append(o),this.mediaSubtitlesList)){let i=ha({type:"radio",text:this.formatMenuItemText(t.label,t),value:rf(t),checked:this.value==rf(t)});i.prepend(hr(this,"checked-indicator")),"captions"===(null!=(e=t.kind)?e:"subs")&&i.append(hr(this,"captions-indicator")),this.defaultSlot.append(i)}},pP=new WeakSet,pU=function(){let e=this.mediaSubtitlesShowing,t=this.getAttribute(ar.MEDIA_SUBTITLES_SHOWING),i=this.value!==t;if((null==e?void 0:e.length)&&i&&this.dispatchEvent(new ax.CustomEvent(ae.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:e})),!this.value||!i)return;let a=new ax.CustomEvent(ae.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)},hH.template=hW;let hV=(e,t)=>{let i=e.getAttribute(t);return i?rE(i):[]},hF=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=rg(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};ax.customElements.get("media-captions-menu")||ax.customElements.define("media-captions-menu",hH);let hq=`<svg aria-hidden="true" viewBox="0 0 26 24">
1712  <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 
17120 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
1713</svg>`,h$=`<svg aria-hidden="true" viewBox="0 0 26 24">
1714  <path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>
1715</svg>`,hK=aP.createElement("template");hK.innerHTML=`
1716  <style>
1717    :host([aria-checked="true"]) slot[name=off] {
1718      display: none !important;
1719    }
1720
1721    
1722    :host(:not([aria-checked="true"])) slot[name=on] {
1723      display: none !important;
1724    }
1725
1726    :host([aria-expanded="true"]) slot[name=tooltip] {
1727      display: none;
1728    }
1729  </style>
1730
1731  <slot name="icon">
1732    <slot name="on">${hq}</slot>
1733    <slot name="off">${h$}</slot>
1734  </slot>
1735`;let hY=e=>{e.setAttribute("aria-checked",rA(e).toString())};class hG extends hA{constructor(e={}){super({slotTemplate:hK,tooltipContent:aS("Captions"),...e}),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,pB,void 0),((e,t,i,a)=>{if(!t.has(e))throw TypeError("Cannot write to private field");return a?a.call(e,i):t.set(e,i)})(this,pB,!1)}static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_SUBTITLES_LIST,ar.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",aS("closed captions")),hY(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===ar.MEDIA_SUBTITLES_SHOWING&&hY(this)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=aF(this))?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return hj(this,ar.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){hQ(this,ar.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return hj(this,ar.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){hQ(this,ar.MEDIA_SUBTITLES_SHOWING,e)}}pB=new WeakMap;let hj=(e,t)=>{let i=e.getAttribute(t);return i?rE(i):[]},hQ=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=rg(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};ax.customElements.get("media-captions-menu-button")||ax.customElements.define("media-captions-menu-button",hG);var hZ=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},hz=(e,t,i)=>(hZ(e,t,"read from private field"),i?i.call(e):t.get(e)),hX=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},hJ=(e,t,i)=>(hZ(e,t,"access private method"),i);let h0={RATES:"rates"};class h1 extends ho{constructor(){super(),hX(this,pH),hX(this,pF),hX(this,pW,new rp(this,h0.RATES,{defaultValue:sM})),hJ(this,pH,pV).call(this)}static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_PLAYBACK_RATE,h0.RATES]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===ar.MEDIA_PLAYBACK_RATE&&t!=i?this.value=i:e===h0.RATES&&t!=i&&(hz(this,pW).value=i,hJ(this,pH,pV).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",hJ(this,pF,pq))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",hJ(this,pF,pq))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:aF(this).querySelector("media-playback-rate-menu-button")}get rates(){return hz(this,pW)}set rates(e){e?Array.isArray(e)&&(hz(this,pW).value=e.join(" ")):hz(this,pW).value="",hJ(this,pH,pV).call(this)}get mediaPlaybackRate(){return aJ(this,ar.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){a0(this,ar.MEDIA_PLAYBACK_RATE,e)}}pW=new WeakMap,pH=new WeakSet,pV=function(){for(let e of(this.defaultSlot.textContent="",this.rates)){let t=ha({type:"radio",text:this.formatMenuItemText(`${e}x`,e),value:e,checked:this.mediaPlaybackRate==e});t.prepend(hr(this,"checked-indicator")),this.defaultSlot.append(t)}},pF=new WeakSet,pq=function(){if(!this.value)return;let e=new ax.CustomEvent(ae.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},ax.customElements.get("media-playback-rate-menu")||ax.customElements.define("media-playback-rate-menu",h1);var h2=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)};let h3={RATES:"rates"},h4=[1,1.2,1.5,1.7,2],h5=aP.createElement("template");h5.innerHTML=`
1736  <style>
1737    :host {
1738      min-width: 5ch;
1739      padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
1740    }
1741    
1742    :host([aria-expanded="true"]) slot[name=tooltip] {
1743      display: none;
1744    }
1745  </style>
1746  <slot name="icon"></slot>
1747`;class h9 extends hA{constructor(e={}){super({slotTemplate:h5,tooltipContent:aS("Playback rate"),...e}),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,p$,new rp(this,h3.RATES,{defaultValue:h4})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML="1x"}static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_PLAYBACK_RATE,h3.RATES]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===h3.RATES&&(h2(this,p$).value=i),e===ar.MEDIA_PLAYBACK_RATE){let e=i?+i:NaN,t=Number.isNaN(e)?1:e;this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",aS("Playback rate {playbackRate}",{playbackRate:t}))}}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:aF(this).querySelector("media-playback-rate-menu")}get rates(){return h2(this,p$)}set rates(e){e?Array.isArray(e)&&(h2(this,p$).value=e.join(" ")):h2(this,p$).value=""}get mediaPlaybackRate(){return aJ(this,ar.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){a0(this,ar.MEDIA_PLAYBACK_RATE,e)}}p$=new WeakMap,ax.customElements.get("media-playback-rate-menu-button")||ax.customElements.define("media-playback-rate-menu-button",h9);var h8=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},h6=(e,t,i)=>(h8(e,t,"read from private field"),i?i.call(e):t.get(e)),h7=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},me=(e,t,i,a)=>(h8(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),mt=(e,t,i)=>(h8(e,t,"access private method"),i);class mi extends ho{constructor(){super(...arguments),h7(this,pG),h7(this,pQ),h7(this,pK,[]),h7(this,pY,{})}static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_RENDITION_LIST,ar.MEDIA_RENDITION_SELECTED,ar.MEDIA_RENDITION_UNAVAILABLE,ar.MEDIA_HEIGHT]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===ar.MEDIA_RENDITION_SELECTED&&t!==i)this.value=null!=i?i:"auto",mt(this,pG,pj).call(this);else if(e===ar.MEDIA_RENDITION_LIST&&t!==i)me(this,pK,null==i?void 0:i.split(/\s+/).map(ap)),mt(this,pG,pj).call(this);else e===ar.MEDIA_HEIGHT&&t!==i&&mt(this,pG,pj).call(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",mt(this,pQ,pZ))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",mt(this,pQ,pZ))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:aF(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return h6(this,pK)}set mediaRenditionList(e){me(this,pK,e),mt(this,pG,pj).call(this)}get mediaRenditionSelected(){return a3(this,ar.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){a4(this,ar.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return aJ(this,ar.MEDIA_HEIGHT)}set mediaHeight(e){a0(this,ar.MEDIA_HEIGHT,e)}}pK=new WeakMap,pY=new WeakMap,pG=new WeakSet,pj=function(){if(h6(this,pY).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&h6(this,pY).mediaHeight===this.mediaHeight)return;h6(this,pY).mediaRenditionList=JSON.stringify(this.mediaRenditionList),h6(this,pY).mediaHeight=this.mediaHeight;let e=this.mediaRenditionList.sort((e,t)=>
1747t.height-e.height);for(let t of e)t.selected=t.id===this.mediaRenditionSelected;this.defaultSlot.textContent="";let t=!this.mediaRenditionSelected;for(let i of e){let e=ha({type:"radio",text:this.formatMenuItemText(`${Math.min(i.width,i.height)}p`,i),value:`${i.id}`,checked:i.selected&&!t});e.prepend(hr(this,"checked-indicator")),this.defaultSlot.append(e)}let i=ha({type:"radio",text:t?this.formatMenuItemText(`Auto (${this.mediaHeight}p)`):this.formatMenuItemText("Auto"),value:"auto",checked:t}),a=this.mediaHeight>0?`Auto (${this.mediaHeight}p)`:"Auto";i.dataset.description=a,i.prepend(hr(this,"checked-indicator")),this.defaultSlot.append(i)},pQ=new WeakSet,pZ=function(){if(null==this.value)return;let e=new ax.CustomEvent(ae.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},ax.customElements.get("media-rendition-menu")||ax.customElements.define("media-rendition-menu",mi);let ma=`<svg aria-hidden="true" viewBox="0 0 24 24">
1748  <path d="M13.5 2.5h2v6h-2v-2h-11v-2h11v-2Zm4 2h4v2h-4v-2Zm-12 4h2v6h-2v-2h-3v-2h3v-2Zm4 2h12v2h-12v-2Zm1 4h2v6h-2v-2h-8v-2h8v-2Zm4 2h7v2h-7v-2Z" />
1749</svg>`,mr=aP.createElement("template");mr.innerHTML=`
1750  <style>
1751    :host([aria-expanded="true"]) slot[name=tooltip] {
1752      display: none;
1753    }
1754  </style>
1755  <slot name="icon">${ma}</slot>
1756`;class mn extends hA{static get observedAttributes(){return[...super.observedAttributes,ar.MEDIA_RENDITION_SELECTED,ar.MEDIA_RENDITION_UNAVAILABLE,ar.MEDIA_HEIGHT]}constructor(){super({slotTemplate:mr,tooltipContent:aS("Quality")})}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",aS("quality"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:aF(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return a3(this,ar.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){a4(this,ar.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return aJ(this,ar.MEDIA_HEIGHT)}set mediaHeight(e){a0(this,ar.MEDIA_HEIGHT,e)}}ax.customElements.get("media-rendition-menu-button")||ax.customElements.define("media-rendition-menu-button",mn);var ms=e=>{throw TypeError(e)},mo=(e,t,i)=>t.has(e)||ms("Cannot "+i),ml=(e,t,i)=>(mo(e,t,"read from private field"),i?i.call(e):t.get(e)),md=(e,t,i)=>t.has(e)?ms("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),mu=(e,t,i,a)=>(mo(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),mc=(e,t,i)=>(mo(e,t,"access private method"),i),mh=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("undefined"==typeof DocumentFragment){class e extends mh{}globalThis.DocumentFragment=e}var mm,mp,mv,mE,mb,mf,mg,m_,my,mT,mA,mk,mw,mS,mI,mR,mC,mD,mL,mM,mO,mN,mx,mP,mU,mB,mW,mH,mV,mF,mq,m$,mK,mY,mG,mj,mQ,mZ,mz,mX,mJ,m0,m1,m2,m3,m4,m5,m9,m8,m6,m7,pe,pt,pi,pa,pr,pn,ps,po,pl,pd,pu,pc,ph,pm,pp,pv,pE,pb,pf,pg,p_,py,pT,pA,pk,pw,pS,pI,pR,pC,pD,pL,pM,pO,pN,px,pP,pU,pB,pW,pH,pV,pF,pq,p$,pK,pY,pG,pj,pQ,pZ,pz,pX=class extends mh{},pJ=class{constructor(e,t={}){md(this,pz),mu(this,pz,null==t?void 0:t.detail)}get detail(){return ml(this,pz)}initCustomEvent(){}};pz=new WeakMap;var p0={document:{createElement:function(e,t){return new pX}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(pX)},CustomEvent:pJ,EventTarget:mh,HTMLElement:pX,HTMLVideoElement:class extends mh{}},p1="undefined"==typeof window||void 0===globalThis.customElements,p2=p1?p0:globalThis,p3=p1?p0.document:globalThis.document;function p4(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function p5(e){return e.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function p9(e){if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}function p8(e){let t=(function(e){let t={};for(let i in e)null!=e[i]&&(t[i]=e[i]);return new URLSearchParams(t)})(e).toString();return t?"?"+t:""}var p6,p7,ve,vt=(e,t)=>!!e&&!!t&&(!!e.contains(t)||vt(e,t.getRootNode().host)),vi="mux.com",va=(()=>{try{return"3.4.0"}catch{}return"UNKNOWN"})(),vr=e=>{if(e){if([tH.LIVE,tH.ON_DEMAND].includes(e))return e;if(null!=e&&e.includes("live"))return tH.LIVE}}
1756,vn={crossorigin:"crossOrigin",playsinline:"playsInline"},vs=class{constructor(e,t){md(this,p6),md(this,p7),md(this,ve,[]),mu(this,p6,e),mu(this,p7,t)}[Symbol.iterator](){return ml(this,ve).values()}get length(){return ml(this,ve).length}get value(){var e;return null!=(e=ml(this,ve).join(" "))?e:""}set value(e){var t;e!==this.value&&(mu(this,ve,[]),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return ml(this,ve)[e]}values(){return ml(this,ve).values()}keys(){return ml(this,ve).keys()}forEach(e){ml(this,ve).forEach(e)}add(...e){var t,i;e.forEach(e=>{this.contains(e)||ml(this,ve).push(e)}),(""!==this.value||null!=(t=ml(this,p6))&&t.hasAttribute(`${ml(this,p7)}`))&&null!=(i=ml(this,p6))&&i.setAttribute(`${ml(this,p7)}`,`${this.value}`)}remove(...e){var t;e.forEach(e=>{ml(this,ve).splice(ml(this,ve).indexOf(e),1)}),null==(t=ml(this,p6))||t.setAttribute(`${ml(this,p7)}`,`${this.value}`)}contains(e){return ml(this,ve).includes(e)}toggle(e,t){return void 0!==t?t?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){this.remove(e),this.add(t)}};p6=new WeakMap,p7=new WeakMap,ve=new WeakMap;var vo=`[mux-player ${va}]`;function vl(...e){console.warn(vo,...e)}function vd(...e){console.error(vo,...e)}function vu(e){var t;let i=null!=(t=e.message)?t:"";e.context&&(i+=` ${e.context}`),e.file&&(i+=` ${t5("Read more: ")}
1757https://github.com/muxinc/elements/blob/main/errors/${e.file}`),vl(i)}var vc={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},vh={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},vm=Object.freeze({length:0,start(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),vp=dj.filter(e=>"error"!==e),vv=Object.values(vc).filter(e=>![vc.PLAYSINLINE].includes(e)),vE=Object.values(vh);function vb(e,t){return e.media?e.media.getAttribute(t):e.getAttribute(t)}var vf=class extends p2.HTMLElement{static get observedAttributes(){return[...vv,...vE]}constructor(){super()}init(){vp.forEach(e=>{var t;null==(t=this.media)||t.addEventListener(e,e=>{this.dispatchEvent(new Event(e.type))})})}attributeChangedCallback(e,t,i){var a,r;switch(e){case vh.MUTED:this.media&&(this.media.muted=null!=i,this.media.defaultMuted=null!=i);return;case vh.VOLUME:{let e=null!=(a=p9(i))?a:1;this.media&&(this.media.volume=e);return}case vh.PLAYBACKRATE:{let e=null!=(r=p9(i))?r:1;this.media&&(this.media.playbackRate=e,this.media.defaultPlaybackRate=e);return}}}play(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.play())?t:Promise.reject()}pause(){var e;null==(e=this.media)||e.pause()}load(){var e;null==(e=this.media)||e.load()}requestCast(e){var t;return null==(t=this.media)?void 0:t.requestCast(e)}get media(){var e;return null==(e=this.shadowRoot)?void 0:e.querySelector("mux-video")}get audioTracks(){return this.media.audioTracks}get videoTracks(){return this.media.videoTracks}get audioRenditions(){return this.media.audioRenditions}get videoRenditions(){return this.media.videoRenditions}get paused(){var e,t;return null==(t=null==(e=this.media)?void 0:e.paused)||t}get duration(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.duration)?t:NaN}get ended(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.ended)&&t}get buffered(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.buffered)?t:vm}get seekable(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.seekable)?t:vm}get readyState(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.readyState)?t:0}get videoWidth(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.videoWidth)?t:0}get videoHeight(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.videoHeight)?t:0}get currentSrc(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.currentSrc)?t:""}get currentTime(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.currentTime)?t:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.volume)?t:1}set volume(e){this.media&&(this.media.volume=Number(e))}get playbackRate(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.playbackRate)?t:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get defaultPlaybackRate(){var e;return null!=(e=p9(this.getAttribute(vh.PLAYBACKRATE)))?e:1}set defaultPlaybackRate(e){null!=e?this.setAttribute(vh.PLAYBACKRATE,`${e}`):this.removeAttribute(vh.PLAYBACKRATE)}get crossOrigin(){return vb(this,vc.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(vc.CROSSORIGIN,`${e}`)}get autoplay(){return null!=vb(this,vc.AUTOPLAY)}set autoplay(e){e?this.setAttribute(vc.AUTOPLAY,"string"==typeof e?e:""):this.removeAttribute(vc.AUTOPLAY)}get loop(){return null!=vb(this,vc.LOOP)}set loop(e){e?this.setAttribute(vc.LOOP,""):this.removeAttribute(vc.LOOP)}get muted(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.muted)&&t}set muted(e){this.media&&(this.media.muted=!!e)}get defaultMuted(){return null!=vb(this,vc.MUTED)}set defaultMuted(e){e?this.setAttribute(vc.MUTED,""):this.removeAttribute(vc.MUTED)}
1757get playsInline(){return null!=vb(this,vc.PLAYSINLINE)}set playsInline(e){vd("playsInline is set to true by default and is not currently supported as a setter.")}get preload(){return this.media?this.media.preload:this.getAttribute("preload")}set preload(e){["","none","metadata","auto"].includes(e)?this.setAttribute(vc.PRELOAD,e):this.removeAttribute(vc.PRELOAD)}},vg=`:host {
1758  --media-control-display: var(--controls);
1759  --media-loading-indicator-display: var(--loading-indicator);
1760  --media-dialog-display: var(--dialog);
1761  --media-play-button-display: var(--play-button);
1762  --media-live-button-display: var(--live-button);
1763  --media-seek-backward-button-display: var(--seek-backward-button);
1764  --media-seek-forward-button-display: var(--seek-forward-button);
1765  --media-mute-button-display: var(--mute-button);
1766  --media-captions-button-display: var(--captions-button);
1767  --media-captions-menu-button-display: var(--captions-menu-button, var(--media-captions-button-display));
1768  --media-rendition-menu-button-display: var(--rendition-menu-button);
1769  --media-audio-track-menu-button-display: var(--audio-track-menu-button);
1770  --media-airplay-button-display: var(--airplay-button);
1771  --media-pip-button-display: var(--pip-button);
1772  --media-fullscreen-button-display: var(--fullscreen-button);
1773  --media-cast-button-display: var(--cast-button, var(--_cast-button-drm-display));
1774  --media-playback-rate-button-display: var(--playback-rate-button);
1775  --media-playback-rate-menu-button-display: var(--playback-rate-menu-button);
1776  --media-volume-range-display: var(--volume-range);
1777  --media-time-range-display: var(--time-range);
1778  --media-time-display-display: var(--time-display);
1779  --media-duration-display-display: var(--duration-display);
1780  --media-title-display-display: var(--title-display);
1781
1782  display: inline-block;
1783  line-height: 0;
1784  width: 100%;
1785}
1786
1787a {
1788  color: #fff;
1789  font-size: 0.9em;
1790  text-decoration: underline;
1791}
1792
1793media-theme {
1794  display: inline-block;
1795  line-height: 0;
1796  width: 100%;
1797  height: 100%;
1798  direction: ltr;
1799}
1800
1801media-poster-image {
1802  display: inline-block;
1803  line-height: 0;
1804  width: 100%;
1805  height: 100%;
1806}
1807
1808media-poster-image:not([src]):not([placeholdersrc]) {
1809  display: none;
1810}
1811
1812::part(top),
1813[part~='top'] {
1814  --media-control-display: var(--controls, var(--top-controls));
1815  --media-play-button-display: var(--play-button, var(--top-play-button));
1816  --media-live-button-display: var(--live-button, var(--top-live-button));
1817  --media-seek-backward-button-display: var(--seek-backward-button, var(--top-seek-backward-button));
1818  --media-seek-forward-button-display: var(--seek-forward-button, var(--top-seek-forward-button));
1819  --media-mute-button-display: var(--mute-button, var(--top-mute-button));
1820  --media-captions-button-display: var(--captions-button, var(--top-captions-button));
1821  --media-captions-menu-button-display: var(
1822    --captions-menu-button,
1823    var(--media-captions-button-display, var(--top-captions-menu-button))
1824  );
1825  --media-rendition-menu-button-display: var(--rendition-menu-button, var(--top-rendition-menu-button));
1826  --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--top-audio-track-menu-button));
1827  --media-airplay-button-display: var(--airplay-button, var(--top-airplay-button));
1828  --media-pip-button-display: var(--pip-button, var(--top-pip-button));
1829  --media-fullscreen-button-display: var(--fullscreen-button, var(--top-fullscreen-button));
1830  --media-cast-button-display: var(--cast-button, var(--top-cast-button, var(--_cast-button-drm-display)));
1831  --media-playback-rate-button-display: var(--playback-rate-button, var(--top-playback-rate-button));
1832  --media-playback-rate-menu-button-display: var(
1833    --captions-menu-button,
1834    var(--media-playback-rate-button-display, var(--top-playback-rate-menu-button))
1835  );
1836  --media-volume-range-display: var(--volume-range, var(--top-volume-range));
1837  --media-time-range-display: var(--time-range, var(--top-time-range));
1838  --media-time-display-display: var(--time-display, var(--top-time-display));
1839  --media-duration-display-display: var(--duration-display, var(--top-duration-display));
1840  --media-title-display-display: var(--title-display, var(--top-title-display));
1841}
1842
1843::part(center),
1844[part~='center'] {
1845  --media-control-display: var(--controls, var(--center-controls));
1846  --media-play-button-display: var(--play-button, var(--center-play-button));
1847  --media-live-button-display: var(--live-button, var(--center-live-button));
1848  --media-seek-backward-button-display: var(--seek-backward-button, var(--center-seek-backward-button));
1849  --media-seek-forward-button-display: var(--seek-forward-button, var(--center-seek-forward-button));
1850  --media-mute-button-display: var(--mute-button, var(--center-mute-button));
1851  --media-captions-button-display: var(--captions-button, var(--center-captions-button));
1852  --media-captions-menu-button-display: var(
1853    --captions-menu-button,
1854    var(--media-captions-button-display, var(--center-captions-menu-button))
1855  );
1856  --media-rendition-menu-button-display: var(--rendition-menu-button, var(--center-rendition-menu-button));
1857  --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--center-audio-track-menu-button));
1858  --media-airplay-button-display: var(--airplay-button, var(--center-airplay-button));
1859  --media-pip-button-display: var(--pip-button, var(--center-pip-button));
1860  --media-fullscreen-button-display: var(--fullscreen-button, var(--center-fullscreen-button));
1861  --media-cast-button-display: var(--cast-button, var(--center-cast-button, var(--_cast-button-drm-display)));
1862  --media-playback-rate-button-display: var(--playback-rate-button, var(--center-playback-rate-button));
1863  --media-playback-rate-menu-button-display: var(
1864    --playback-rate-menu-button,
1865    var(--media-playback-rate-button-display, var(--center-playback-rate-menu-button))
1866  );
1867  --media-volume-range-display: var(--volume-range, var(--center-volume-range));
1868  --media-time-range-display: var(--time-range, var(--center-time-range));
1869  --media-time-display-display: var(--time-display, var(--center-time-display));
1870  --media-duration-display-display: var(--duration-display, var(--center-duration-display));
1871}
1872
1873::part(bottom),
1874[part~='bottom'] {
1875  --media-control-display: var(--controls, var(--bottom-controls));
1876  --media-play-button-display: var(--play-button, var(--bottom-play-button));
1877  --media-live-button-display: var(--live-button, var(--bottom-live-button));
1878  --media-seek-backward-button-display: var(--seek-backward-button, var(--bottom-seek-backward-button));
1879  --media-seek-forward-button-display: var(--seek-forward-button, var(--bottom-seek-forward-button));
1880  --media-mute-button-display: var(--mute-button, var(--bottom-mute-button));
1881  --media-captions-button-display: var(--captions-button, var(--bottom-captions-button));
1882  --media-captions-menu-button-display: var(
1883    --captions-menu-button,
1884    var(--media-captions-button-display, var(--bottom-captions-menu-button))
1885  );
1886  --media-rendition-menu-button-display: var(--rendition-menu-button, var(--bottom-rendition-menu-button));
1887  --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--bottom-audio-track-menu-button));
1888  --media-airplay-button-display: var(--airplay-button, var(--bottom-airplay-button));
1889  --media-pip-button-display: var(--pip-button, var(--bottom-pip-button));
1890  --media-fullscreen-button-display: var(--fullscreen-button, var(--bottom-fullscreen-button));
1891  --media-cast-button-display: var(--cast-button, var(--bottom-cast-button, var(--_cast-button-drm-display)));
1892  --media-playback-rate-button-display: var(--playback-rate-button, var(--bottom-playback-rate-button));
1893  --media-playback-rate-menu-button-display: var(
1894    --playback-rate-menu-button,
1895    var(--media-playback-rate-button-display, var(--bottom-playback-rate-menu-button))
1896  );
1897  --media-volume-range-display: var(--volume-range, var(--bottom-volume-range));
1898  --media-time-range-display: var(--time-range, var(--bottom-time-range));
1899  --media-time-display-display: var(--time-display, var(--bottom-time-display));
1900  --media-duration-display-display: var(--duration-display, var(--bottom-duration-display));
1901  --media-title-display-display: var(--title-display, var(--bottom-title-display));
1902}
1903
1904:host([no-tooltips]) {
1905  --media-tooltip-display: none;
1906}
1907`,v_=new WeakMap,vy=class e{constructor(e,t){this.element=e,this.type=t,this.element.addEventListener(this.type,this);let i=v_.get(this.element);i&&i.set(this.type,this)}set(e){if("function"==typeof e)this.handleEvent=e.bind(this.element);else if("object"==typeof e&&"function"==typeof e.handleEvent)this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let e=v_.get(this.element);
1907e&&e.delete(this.type)}}static for(t){v_.has(t.element)||v_.set(t.element,new Map);let i=t.attributeName.slice(2),a=v_.get(t.element);return a&&a.has(i)?a.get(i):new e(t.element,i)}},vT=new Map,vA=new WeakMap,vk=new WeakMap,vw=class{constructor(e,t,i){this.strings=e,this.values=t,this.processor=i,this.stringsKey=this.strings.join("\x01")}get template(){if(vT.has(this.stringsKey))return vT.get(this.stringsKey);{let e=p3.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((e,i,a)=>e+i+(a<t?`{{ ${a} }}`:""),""),vT.set(this.stringsKey,e),e}}renderInto(e){var t;let i=this.template;if(vA.get(e)!==i){vA.set(e,i);let t=new cR(i,this.values,this.processor);vk.set(e,t),e instanceof cP?e.replace(...t.children):e.appendChild(t);return}let a=vk.get(e);null==(t=null==a?void 0:a.update)||t.call(a,this.values)}},vS={processCallback(e,t,i){var a;if(i)for(let[e,r]of t)e in i&&function(e,t){(function(e,t){if(e instanceof cx&&t instanceof Element){let i=e.element;return i[e.attributeName]!==t&&(e.element.removeAttributeNS(e.attributeNamespace,e.attributeName),i[e.attributeName]=t),!0}return!1})(e,t)||function(e,t){if("boolean"==typeof t&&e instanceof cx){let i=e.attributeNamespace;return t!==e.element.hasAttributeNS(i,e.attributeName)&&(e.booleanValue=t),!0}return!1}(e,t)||e instanceof cx&&e.attributeName.startsWith("on")&&(vy.for(e).set(t),e.element.removeAttributeNS(e.attributeNamespace,e.attributeName),1)||!1===t&&e instanceof cP&&(e.replace(""),1)||t instanceof vw&&e instanceof cP&&(t.renderInto(e),1)||t instanceof DocumentFragment&&e instanceof cP&&(t.childNodes.length&&e.replace(...t.childNodes),1)||function(e,t){if(e instanceof cx){let i=e.attributeNamespace,a=e.element.getAttributeNS(i,e.attributeName);return String(t)!==a&&(e.value=String(t))}e.value=String(t)}(e,t)}(r,null!=(a=i[e])?a:"")}};function vI(e,...t){return new vw(e,t,vS)}var vR=Object.values({TOP:"top",CENTER:"center",BOTTOM:"bottom",LAYER:"layer",MEDIA_LAYER:"media-layer",POSTER_LAYER:"poster-layer",VERTICAL_LAYER:"vertical-layer",CENTERED_LAYER:"centered-layer",GESTURE_LAYER:"gesture-layer",CONTROLLER_LAYER:"controller",BUTTON:"button",RANGE:"range",DISPLAY:"display",CONTROL_BAR:"control-bar",MENU_BUTTON:"menu-button",MENU:"menu",OPTION:"option",POSTER:"poster",LIVE:"live",PLAY:"play",PRE_PLAY:"pre-play",SEEK_BACKWARD:"seek-backward",SEEK_FORWARD:"seek-forward",MUTE:"mute",CAPTIONS:"captions",AIRPLAY:"airplay",PIP:"pip",FULLSCREEN:"fullscreen",CAST:"cast",PLAYBACK_RATE:"playback-rate",VOLUME:"volume",TIME:"time",TITLE:"title",AUDIO_TRACK:"audio-track",RENDITION:"rendition"}).join(", "),vC=e=>e.charAt(0).toUpperCase()+e.slice(1),vD=(e,t)=>{let i=(e=>{if(e.muxCode){if(e.muxCode===tN.NETWORK_TOKEN_EXPIRED)return"403-expired-token.md";if(e.muxCode===tN.NETWORK_TOKEN_MALFORMED)return"403-malformatted-token.md";if([tN.NETWORK_TOKEN_AUD_MISMATCH,tN.NETWORK_TOKEN_AUD_MISSING].includes(e.muxCode))return"403-incorrect-aud-value.md";if(e.muxCode===tN.NETWORK_TOKEN_SUB_MISMATCH)return"403-playback-id-mismatch.md";if(e.muxCode===tN.NETWORK_TOKEN_MISSING)return"missing-signed-tokens.md";if(e.muxCode===tN.NETWORK_NOT_FOUND)return"404-not-found.md";if(e.muxCode===tN.NETWORK_NOT_READY)return"412-not-playable.md"}if(e.code){if(e.code===tU.MEDIA_ERR_NETWORK)return"";if(e.code===tU.MEDIA_ERR_DECODE)return"media-decode-error.md";if(e.code===tU.MEDIA_ERR_SRC_NOT_SUPPORTED)return"media-src-not-supported.md"}return""})(e);return{message:e.message,context:e.context,file:i}},vL=`<template id="media-theme-gerwig">
1908  <style>
1909    @keyframes pre-play-hide {
1910      0% {
1911        transform: scale(1);
1912        opacity: 1;
1913      }
1914
1915      30% {
1916        transform: scale(0.7);
1917      }
1918
1919      100% {
1920        transform: scale(1.5);
1921        opacity: 0;
1922      }
1923    }
1924
1925    :host {
1926      --_primary-color: var(--media-primary-color, #fff);
1927      --_secondary-color: var(--media-secondary-color, transparent);
1928      --_accent-color: var(--media-accent-color, #fa50b5);
1929      --_text-color: var(--media-text-color, #000);
1930
1931      --media-icon-color: var(--_primary-color);
1932      --media-control-background: var(--_secondary-color);
1933      --media-control-hover-background: var(--_accent-color);
1934      --media-time-buffered-color: rgba(255, 255, 255, 0.4);
1935      --media-preview-time-text-shadow: none;
1936      --media-control-height: 14px;
1937      --media-control-padding: 6px;
1938      --media-tooltip-container-margin: 6px;
1939      --media-tooltip-distance: 18px;
1940
1941      color: var(--_primary-color);
1942      display: inline-block;
1943      width: 100%;
1944      height: 100%;
1945    }
1946
1947    :host([audio]) {
1948      --_secondary-color: var(--media-secondary-color, black);
1949      --media-preview-time-text-shadow: none;
1950    }
1951
1952    :host([audio]) ::slotted([slot='media']) {
1953      height: 0px;
1954    }
1955
1956    :host([audio]) media-loading-indicator {
1957      display: none;
1958    }
1959
1960    :host([audio]) media-controller {
1961      background: transparent;
1962    }
1963
1964    :host([audio]) media-controller::part(vertical-layer) {
1965      background: transparent;
1966    }
1967
1968    :host([audio]) media-control-bar {
1969      width: 100%;
1970      background-color: var(--media-control-background);
1971    }
1972
1973    /*
1974     * 0.433s is the transition duration for VTT Regions.
1975     * Borrowed here, so the captions don't move too fast.
1976     */
1977    media-controller {
1978      --media-webkit-text-track-transform: translateY(0) scale(0.98);
1979      --media-webkit-text-track-transition: transform 0.433s ease-out 0.3s;
1980    }
1981    media-controller:is([mediapaused], :not([userinactive])) {
1982      --media-webkit-text-track-transform: translateY(-50px) scale(0.98);
1983      --media-webkit-text-track-transition: transform 0.15s ease;
1984    }
1985
1986    /*
1987     * CSS specific to iOS devices.
1988     * See: https://stackoverflow.com/questions/30102792/css-media-query-to-target-only-ios-devices/60220757#60220757
1989     */
1990    @supports (-webkit-touch-callout: none) {
1991      /* Disable subtitle adjusting for iOS Safari */
1992      media-controller[mediaisfullscreen] {
1993        --media-webkit-text-track-transform: unset;
1994        --media-webkit-text-track-transition: unset;
1995      }
1996    }
1997
1998    media-time-range {
1999      --media-box-padding-left: 6px;
2000      --media-box-padding-right: 6px;
2001      --media-range-bar-color: var(--_accent-color);
2002      --media-time-range-buffered-color: var(--_primary-color);
2003      --media-range-track-color: transparent;
2004      --media-range-track-background: rgba(255, 255, 255, 0.4);
2005      --media-range-thumb-background: radial-gradient(
2006        circle,
2007        #000 0%,
2008        #000 25%,
2009        var(--_accent-color) 25%,
2010        var(--_accent-color)
2011      );
2012      --media-range-thumb-width: 12px;
2013      --media-range-thumb-height: 12px;
2014      --media-range-thumb-transform: scale(0);
2015      --media-range-thumb-transition: transform 0.3s;
2016      --media-range-thumb-opacity: 1;
2017      --media-preview-background: var(--_primary-color);
2018      --media-box-arrow-background: var(--_primary-color);
2019      --media-preview-thumbnail-border: 5px solid var(--_primary-color);
2020      --media-preview-border-radius: 5px;
2021      --media-text-color: var(--_text-color);
2022      --media-control-hover-background: transparent;
2023      --media-preview-chapter-text-shadow: none;
2024      color: var(--_accent-color);
2025      padding: 0 6px;
2026    }
2027
2028    :host([audio]) media-time-range {
2029      --media-preview-time-padding: 1.5px 6px;
2030      --media-preview-box-margin: 0 0 -5px;
2031    }
2032
2033    media-time-range:hover {
2034      --media-range-thumb-transform: scale(1);
2035    }
2036
2037    media-preview-thumbnail {
2038      border-bottom-width: 0;
2039    }
2040
2041    [part~='menu'] {
2042      border-radius: 2px;
2043      border: 1px solid rgba(0, 0, 0, 0.1);
2044      bottom: 50px;
2045      padding: 2.5px 10px;
2046    }
2047
2048    [part~='menu']::part(indicator) {
2049      fill: var(--_accent-color);
2050    }
2051
2052    [part~='menu']::part(menu-item) {
2053      box-sizing: border-box;
2054      display: flex;
2055      align-items: center;
2056      padding: 6px 10px;
2057      min-height: 34px;
2058    }
2059
2060    [part~='menu']::part(checked) {
2061      font-weight: 700;
2062    }
2063
2064    media-captions-menu,
2065    media-rendition-menu,
2066    media-audio-track-menu,
2067    media-playback-rate-menu {
2068      position: absolute; /* ensure they don't take up space in DOM on load */
2069      --media-menu-background: var(--_primary-color);
2070      --media-menu-item-checked-background: transparent;
2071      --media-text-color: var(--_text-color);
2072      --media-menu-item-hover-background: transparent;
2073      --media-menu-item-hover-outline: var(--_accent-color) solid 1px;
2074    }
2075
2076    /* The icon is a circle so make it 16px high instead of 14px for more balance. */
2077    media-audio-track-menu-button {
2078      --media-control-padding: 5px;
2079      --media-control-height: 16px;
2080    }
2081
2082    media-playback-rate-menu-button {
2083      --media-control-padding: 6px 3px;
2084      min-width: 4.4ch;
2085    }
2086
2087    media-playback-rate-menu {
2088      --media-menu-flex-direction: row;
2089      --media-menu-item-checked-background: var(--_accent-color);
2090      --media-menu-item-checked-indicator-display: none;
2091      margin-right: 6px;
2092      padding: 0;
2093      --media-menu-gap: 0.25em;
2094    }
2095
2096    media-playback-rate-menu[part~='menu']::part(menu-item) {
2097      padding: 6px 6px 6px 8px;
2098    }
2099
2100    media-playback-rate-menu[part~='menu']::part(checked) {
2101      color: #fff;
2102    }
2103
2104    :host(:not([audio])) media-time-range {
2105      /* Adding px is required here for calc() */
2106      --media-range-padding: 0px;
2107      background: transparent;
2108      z-index: 10;
2109      height: 10px;
2110      bottom: -3px;
2111      width: 100%;
2112    }
2113
2114    media-control-bar :is([role='button'], [role='switch'], button) {
2115      line-height: 0;
2116    }
2117
2118    media-control-bar :is([part*='button'], [part*='range'], [part*='display']) {
2119      border-radius: 3px;
2120    }
2121
2122    .spacer {
2123      flex-grow: 1;
2124      background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));
2125    }
2126
2127    media-control-bar[slot~='top-chrome'] {
2128      min-height: 42px;
2129      pointer-events: none;
2130    }
2131
2132    media-control-bar {
2133      --gradient-steps:
2134        hsl(0 0% 0% / 0) 0%, hsl(0 0% 0% / 0.013) 8.1%, hsl(0 0% 0% / 0.049) 15.5%, hsl(0 0% 0% / 0.104) 22.5%,
2135        hsl(0 0% 0% / 0.175) 29%, hsl(0 0% 0% / 0.259) 35.3%, hsl(0 0% 0% / 0.352) 41.2%, hsl(0 0% 0% / 0.45) 47.1%,
2136        hsl(0 0% 0% / 0.55) 52.9%, hsl(0 0% 0% / 0.648) 58.8%, hsl(0 0% 0% / 0.741) 64.7%, hsl(0 0% 0% / 0.825) 71%,
2137        hsl(0 0% 0% / 0.896) 77.5%, hsl(0 0% 0% / 0.951) 84.5%, hsl(0 0% 0% / 0.987) 91.9%, hsl(0 0% 0%) 100%;
2138    }
2139
2140    :host([title]:not([audio])) media-control-bar[slot='top-chrome']::before {
2141      content: '';
2142      position: absolute;
2143      width: 100%;
2144      padding-bottom: min(100px, 25%);
2145      background: linear-gradient(to top, var(--gradient-steps));
2146      opacity: 0.8;
2147      pointer-events: none;
2148    }
2149
2150    :host(:not([audio])) media-control-bar[part~='bottom']::before {
2151      content: '';
2152      position: absolute;
2153      width: 100%;
2154      bottom: 0;
2155      left: 0;
2156      padding-bottom: min(100px, 25%);
2157      background: linear-gradient(to bottom, var(--gradient-steps));
2158      opacity: 0.8;
2159      z-index: 1;
2160      pointer-events: none;
2161    }
2162
2163    media-control-bar[part~='bottom'] > * {
2164      z-index: 20;
2165    }
2166
2167    media-control-bar[part~='bottom'] {
2168      padding: 6px 6px;
2169    }
2170
2171    media-control-bar[slot~='top-chrome'] > * {
2172      --media-control-background: transparent;
2173      --media-control-hover-background: transparent;
2174      position: relative;
2175    }
2176
2177    media-controller::part(vertical-layer) {
2178      transition: background-color 1s;
2179    }
2180
2181    media-controller:is([mediapaused], :not([userinactive]))::part(vertical-layer) {
2182      background-color: var(--controls-backdrop-color, var(--controls, transparent));
2183      transition: background-color 0.25s;
2184    }
2185
2186    .center-controls {
2187      --media-button-icon-width: 100%;
2188      --media-button-icon-height: auto;
2189      --media-tooltip-display: none;
2190      pointer-events: none;
2191      width: 100%;
2192      display: flex;
2193      flex-flow: row;
2194      align-items: center;
2195      justify-content: center;
2196      filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));
2197      paint-order: stroke;
2198      stroke: rgba(102, 102, 102, 1);
2199      stroke-width: 0.3px;
2200      text-shadow:
2201        0 0 2px rgb(0 0 0 / 0.25),
2202        0 0 6px rgb(0 0 0 / 0.25);
2203    }
2204
2205    .center-controls media-play-button {
2206      --media-control-background: transparent;
2207      --media-control-hover-background: transparent;
2208      --media-control-padding: 0;
2209      width: 40px;
2210    }
2211
2212    [breakpointsm] .center-controls media-play-button {
2213      width: 90px;
2214      height: 90px;
2215      border-radius: 50%;
2216      transition: background 0.4s;
2217      padding: 24px;
2218      --media-control-background: #000;
2219      --media-control-hover-background: var(--_accent-color);
2220    }
2221
2222    .center-controls media-seek-backward-button,
2223    .center-controls media-seek-forward-button {
2224      --media-control-background: transparent;
2225      --media-control-hover-background: transparent;
2226      padding: 0;
2227      margin: 0 20px;
2228      width: max(33px, min(8%, 40px)
vendor: 26,664 bytes, lines 2228-2792
2228);
2229    }
2230
2231    [breakpointsm]:not([audio]) .center-controls.pre-playback {
2232      display: grid;
2233      align-items: initial;
2234      justify-content: initial;
2235      height: 100%;
2236      overflow: hidden;
2237    }
2238
2239    [breakpointsm]:not([audio]) .center-controls.pre-playback media-play-button {
2240      place-self: var(--_pre-playback-place, center);
2241      grid-area: 1 / 1;
2242      margin: 16px;
2243    }
2244
2245    /* Show and hide controls or pre-playback state */
2246
2247    [breakpointsm]:is([mediahasplayed], :not([mediapaused])):not([audio])
2248      .center-controls.pre-playback
2249      media-play-button {
2250      /* Using \`forwards\` would lead to a laggy UI after the animation got in the end state */
2251      animation: 0.3s linear pre-play-hide;
2252      opacity: 0;
2253      pointer-events: none;
2254    }
2255
2256    .autoplay-unmute {
2257      --media-control-hover-background: transparent;
2258      width: 100%;
2259      display: flex;
2260      align-items: center;
2261      justify-content: center;
2262      filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));
2263    }
2264
2265    .autoplay-unmute-btn {
2266      --media-control-height: 16px;
2267      border-radius: 8px;
2268      background: #000;
2269      color: var(--_primary-color);
2270      display: flex;
2271      align-items: center;
2272      padding: 8px 16px;
2273      font-size: 18px;
2274      font-weight: 500;
2275      cursor: pointer;
2276    }
2277
2278    .autoplay-unmute-btn:hover {
2279      background: var(--_accent-color);
2280    }
2281
2282    [breakpointsm] .autoplay-unmute-btn {
2283      --media-control-height: 30px;
2284      padding: 14px 24px;
2285      font-size: 26px;
2286    }
2287
2288    .autoplay-unmute-btn svg {
2289      margin: 0 6px 0 0;
2290    }
2291
2292    [breakpointsm] .autoplay-unmute-btn svg {
2293      margin: 0 10px 0 0;
2294    }
2295
2296    media-controller:not([audio]):not([mediahasplayed]) *:is(media-control-bar, media-time-range) {
2297      display: none;
2298    }
2299
2300    media-error-dialog:not([mediaerrorcode]) {
2301      opacity: 0;
2302    }
2303
2304    media-loading-indicator {
2305      --media-loading-icon-width: 100%;
2306      --media-button-icon-height: auto;
2307      display: var(--media-control-display, var(--media-loading-indicator-display, flex));
2308      pointer-events: none;
2309      position: absolute;
2310      width: min(15%, 150px);
2311      flex-flow: row;
2312      align-items: center;
2313      justify-content: center;
2314    }
2315
2316    /* Intentionally don't target the div for transition but the children
2317     of the div. Prevents messing with media-chrome's autohide feature. */
2318    media-loading-indicator + div * {
2319      transition: opacity 0.15s;
2320      opacity: 1;
2321    }
2322
2323    media-loading-indicator[medialoading]:not([mediapaused]) ~ div > * {
2324      opacity: 0;
2325      transition-delay: 400ms;
2326    }
2327
2328    media-volume-range {
2329      width: min(100%, 100px);
2330      --media-range-padding-left: 10px;
2331      --media-range-padding-right: 10px;
2332      --media-range-thumb-width: 12px;
2333      --media-range-thumb-height: 12px;
2334      --media-range-thumb-background: radial-gradient(
2335        circle,
2336        #000 0%,
2337        #000 25%,
2338        var(--_primary-color) 25%,
2339        var(--_primary-color)
2340      );
2341      --media-control-hover-background: none;
2342    }
2343
2344    media-time-display {
2345      white-space: nowrap;
2346    }
2347
2348    /* Generic style for explicitly disabled controls */
2349    media-control-bar[part~='bottom'] [disabled],
2350    media-control-bar[part~='bottom'] [aria-disabled='true'] {
2351      opacity: 60%;
2352      cursor: not-allowed;
2353    }
2354
2355    media-text-display {
2356      --media-font-size: 16px;
2357      --media-control-padding: 14px;
2358      font-weight: 500;
2359    }
2360
2361    media-play-button.animated *:is(g, path) {
2362      transition: all 0.3s;
2363    }
2364
2365    media-play-button.animated[mediapaused] .pause-icon-pt1 {
2366      opacity: 0;
2367    }
2368
2369    media-play-button.animated[mediapaused] .pause-icon-pt2 {
2370      transform-origin: center center;
2371      transform: scaleY(0);
2372    }
2373
2374    media-play-button.animated[mediapaused] .play-icon {
2375      clip-path: inset(0 0 0 0);
2376    }
2377
2378    media-play-button.animated:not([mediapaused]) .play-icon {
2379      clip-path: inset(0 0 0 100%);
2380    }
2381
2382    media-seek-forward-button,
2383    media-seek-backward-button {
2384      --media-font-weight: 400;
2385    }
2386
2387    .mute-icon {
2388      display: inline-block;
2389    }
2390
2391    .mute-icon :is(path, g) {
2392      transition: opacity 0.5s;
2393    }
2394
2395    .muted {
2396      opacity: 0;
2397    }
2398
2399    media-mute-button[mediavolumelevel='low'] :is(.volume-medium, .volume-high),
2400    media-mute-button[mediavolumelevel='medium'] :is(.volume-high) {
2401      opacity: 0;
2402    }
2403
2404    media-mute-button[mediavolumelevel='off'] .unmuted {
2405      opacity: 0;
2406    }
2407
2408    media-mute-button[mediavolumelevel='off'] .muted {
2409      opacity: 1;
2410    }
2411
2412    /**
2413     * Our defaults for these buttons are to hide them at small sizes
2414     * users can override this with CSS
2415     */
2416    media-controller:not([breakpointsm]):not([audio]) {
2417      --bottom-play-button: none;
2418      --bottom-seek-backward-button: none;
2419      --bottom-seek-forward-button: none;
2420      --bottom-time-display: none;
2421      --bottom-playback-rate-menu-button: none;
2422      --bottom-pip-button: none;
2423    }
2424
2425    [part='mux-badge'] {
2426      position: absolute;
2427      bottom: 10px;
2428      right: 10px;
2429      z-index: 2;
2430      opacity: 0.6;
2431      transition:
2432        opacity 0.2s ease-in-out,
2433        bottom 0.2s ease-in-out;
2434    }
2435
2436    [part='mux-badge']:hover {
2437      opacity: 1;
2438    }
2439
2440    [part='mux-badge'] a {
2441      font-size: 14px;
2442      font-family: var(--_font-family);
2443      color: var(--_primary-color);
2444      text-decoration: none;
2445      display: flex;
2446      align-items: center;
2447      gap: 5px;
2448    }
2449
2450    [part='mux-badge'] .mux-badge-text {
2451      transition: opacity 0.5s ease-in-out;
2452      opacity: 0;
2453    }
2454
2455    [part='mux-badge'] .mux-badge-logo {
2456      width: 40px;
2457      height: auto;
2458      display: inline-block;
2459    }
2460
2461    [part='mux-badge'] .mux-badge-logo svg {
2462      width: 100%;
2463      height: 100%;
2464      fill: white;
2465    }
2466
2467    media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'],
2468    media-controller:not([userinactive]) [part='mux-badge'],
2469    media-controller[mediahasplayed][mediapaused] [part='mux-badge'] {
2470      transition: bottom 0.1s ease-in-out;
2471    }
2472
2473    media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] {
2474      transition: bottom 0.2s ease-in-out 0.62s;
2475    }
2476
2477    media-controller:not([userinactive]) [part='mux-badge'] .mux-badge-text,
2478    media-controller[mediahasplayed][mediapaused] [part='mux-badge'] .mux-badge-text {
2479      opacity: 1;
2480    }
2481
2482    media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] .mux-badge-text {
2483      opacity: 0;
2484    }
2485
2486    media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] {
2487      bottom: 10px;
2488    }
2489
2490    media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'] {
2491      bottom: 10px;
2492    }
2493
2494    media-controller:not([userinactive])[mediahasplayed] [part='mux-badge'],
2495    media-controller[mediahasplayed][mediapaused] [part='mux-badge'] {
2496      bottom: calc(28px + var(--media-control-height, 0px) + var(--media-control-padding, 0px) * 2);
2497    }
2498  </style>
2499
2500  <template partial="TitleDisplay">
2501    <template if="videotitle">
2502      <template if="videotitle != true">
2503        <media-text-display part="top title display" class="title-display">{{videotitle}}</media-text-display>
2504      </template>
2505    </template>
2506    <template if="!videotitle">
2507      <template if="title">
2508        <media-text-display part="top title display" class="title-display">{{title}}</media-text-display>
2509      </template>
2510    </template>
2511  </template>
2512
2513  <template partial="PlayButton">
2514    <media-play-button
2515      part="{{section ?? 'bottom'}} play button"
2516      disabled="{{disabled}}"
2517      aria-disabled="{{disabled}}"
2518      class="animated"
2519    >
2520      <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon">
2521        <g class="play-icon">
2522          <path
2523            d="M15.5987 6.2911L3.45577 0.110898C2.83667 -0.204202 2.06287 0.189698 2.06287 0.819798V13.1802C2.06287 13.8103 2.83667 14.2042 3.45577 13.8891L15.5987 7.7089C16.2178 7.3938 16.2178 6.6061 15.5987 6.2911Z"
2524          />
2525        </g>
2526        <g class="pause-icon">
2527          <path
2528            class="pause-icon-pt1"
2529            d="M5.90709 0H2.96889C2.46857 0 2.06299 0.405585 2.06299 0.9059V13.0941C2.06299 13.5944 2.46857 14 2.96889 14H5.90709C6.4074 14 6.81299 13.5944 6.81299 13.0941V0.9059C6.81299 0.405585 6.4074 0 5.90709 0Z"
2530          />
2531          <path
2532            class="pause-icon-pt2"
2533            d="M15.1571 0H12.2189C11.7186 0 11.313 0.405585 11.313 0.9059V13.0941C11.313 13.5944 11.7186 14 12.2189 14H15.1571C15.6574 14 16.063 13.5944 16.063 13.0941V0.9059C16.063 0.405585 15.6574 0 15.1571 0Z"
2534          />
2535        </g>
2536      </svg>
2537    </media-play-button>
2538  </template>
2539
2540  <template partial="PrePlayButton">
2541    <media-play-button
2542      part="{{section ?? 'center'}} play button pre-play"
2543      disabled="{{disabled}}"
2544      aria-disabled="{{disabled}}"
2545    >
2546      <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon" style="transform: translate(3px, 0)">
2547        <path
2548          d="M15.5987 6.2911L3.45577 0.110898C2.83667 -0.204202 2.06287 0.189698 2.06287 0.819798V13.1802C2.06287 13.8103 2.83667 14.2042 3.45577 13.8891L15.5987 7.7089C16.2178 7.3938 16.2178 6.6061 15.5987 6.2911Z"
2549        />
2550      </svg>
2551    </media-play-button>
2552  </template>
2553
2554  <template partial="SeekBackwardButton">
2555    <media-seek-backward-button
2556      seekoffset="{{backwardseekoffset}}"
2557      part="{{section ?? 'bottom'}} seek-backward button"
2558      disabled="{{disabled}}"
2559      aria-disabled="{{disabled}}"
2560    >
2561      <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon">
2562        <path
2563          d="M3.65 2.07888L0.0864 6.7279C-0.0288 6.87812 -0.0288 7.12188 0.0864 7.2721L3.65 11.9211C3.7792 12.0896 4 11.9703 4 11.7321V2.26787C4 2.02968 3.7792 1.9104 3.65 2.07888Z"
2564        />
2565        <text transform="translate(6 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'">
2566          {{backwardseekoffset}}
2567        </text>
2568      </svg>
2569    </media-seek-backward-button>
2570  </template>
2571
2572  <template partial="SeekForwardButton">
2573    <media-seek-forward-button
2574      seekoffset="{{forwardseekoffset}}"
2575      part="{{section ?? 'bottom'}} seek-forward button"
2576      disabled="{{disabled}}"
2577      aria-disabled="{{disabled}}"
2578    >
2579      <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon">
2580        <g>
2581          <text transform="translate(-1 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'">
2582            {{forwardseekoffset}}
2583          </text>
2584          <path
2585            d="M18.35 11.9211L21.9136 7.2721C22.0288 7.12188 22.0288 6.87812 21.9136 6.7279L18.35 2.07888C18.2208 1.91041 18 2.02968 18 2.26787V11.7321C18 11.9703 18.2208 12.0896 18.35 11.9211Z"
2586          />
2587        </g>
2588      </svg>
2589    </media-seek-forward-button>
2590  </template>
2591
2592  <template partial="MuteButton">
2593    <media-mute-button part="bottom mute button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2594      <svg viewBox="0 0 18 14" slot="icon" class="mute-icon" aria-hidden="true">
2595        <g class="unmuted">
2596          <path
2597            d="M6.76786 1.21233L3.98606 3.98924H1.19937C0.593146 3.98924 0.101743 4.51375 0.101743 5.1607V6.96412L0 6.99998L0.101743 7.03583V8.83926C0.101743 9.48633 0.593146 10.0108 1.19937 10.0108H3.98606L6.76773 12.7877C7.23561 13.2547 8 12.9007 8 12.2171V1.78301C8 1.09925 7.23574 0.745258 6.76786 1.21233Z"
2598          />
2599          <path
2600            class="volume-low"
2601            d="M10 3.54781C10.7452 4.55141 11.1393 5.74511 11.1393 6.99991C11.1393 8.25471 10.7453 9.44791 10 10.4515L10.7988 11.0496C11.6734 9.87201 12.1356 8.47161 12.1356 6.99991C12.1356 5.52821 11.6735 4.12731 10.7988 2.94971L10 3.54781Z"
2602          />
2603          <path
2604            class="volume-medium"
2605            d="M12.3778 2.40086C13.2709 3.76756 13.7428 5.35806 13.7428 7.00026C13.7428 8.64246 13.2709 10.233 12.3778 11.5992L13.2106 12.1484C14.2107 10.6185 14.739 8.83796 14.739 7.00016C14.739 5.16236 14.2107 3.38236 13.2106 1.85156L12.3778 2.40086Z"
2606          />
2607          <path
2608            class="volume-high"
2609            d="M15.5981 0.75L14.7478 1.2719C15.7937 2.9919 16.3468 4.9723 16.3468 7C16.3468 9.0277 15.7937 11.0082 14.7478 12.7281L15.5981 13.25C16.7398 11.3722 17.343 9.211 17.343 7C17.343 4.789 16.7398 2.6268 15.5981 0.75Z"
2610          />
2611        </g>
2612        <g class="muted">
2613          <path
2614            fill-rule="evenodd"
2615            clip-rule="evenodd"
2616            d="M4.39976 4.98924H1.19937C1.19429 4.98924 1.17777 4.98961 1.15296 5.01609C1.1271 5.04369 1.10174 5.09245 1.10174 5.1607V8.83926C1.10174 8.90761 1.12714 8.95641 1.15299 8.984C1.17779 9.01047 1.1943 9.01084 1.19937 9.01084H4.39977L7 11.6066V2.39357L4.39976 4.98924ZM7.47434 1.92006C7.4743 1.9201 7.47439 1.92002 7.47434 1.92006V1.92006ZM6.76773 12.7877L3.98606 10.0108H1.19937C0.593146 10.0108 0.101743 9.48633 0.101743 8.83926V7.03583L0 6.99998L0.101743 6.96412V5.1607C0.101743 4.51375 0.593146 3.98924 1.19937 3.98924H3.98606L6.76786 1.21233C7.23574 0.745258 8 1.09925 8 1.78301V12.2171C8 12.9007 7.23561 13.2547 6.76773 12.7877Z"
2617          />
2618          <path
2619            fill-rule="evenodd"
2620            clip-rule="evenodd"
2621            d="M15.2677 9.30323C15.463 9.49849 15.7796 9.49849 15.9749 9.30323C16.1701 9.10796 16.1701 8.79138 15.9749 8.59612L14.2071 6.82841L15.9749 5.06066C16.1702 4.8654 16.1702 4.54882 15.9749 4.35355C15.7796 4.15829 15.4631 4.15829 15.2678 4.35355L13.5 6.1213L11.7322 4.35348C11.537 4.15822 11.2204 4.15822 11.0251 4.35348C10.8298 4.54874 10.8298 4.86532 11.0251 5.06058L12.7929 6.82841L11.0251 8.59619C10.8299 8.79146 10.8299 9.10804 11.0251 9.3033C11.2204 9.49856 11.537 9.49856 11.7323 9.3033L13.5 7.53552L15.2677 9.30323Z"
2622          />
2623        </g>
2624      </svg>
2625    </media-mute-button>
2626  </template>
2627
2628  <template partial="PipButton">
2629    <media-pip-button part="bottom pip button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2630      <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon">
2631        <path
2632          d="M15.9891 0H2.011C0.9004 0 0 0.9003 0 2.0109V11.989C0 13.0996 0.9004 14 2.011 14H15.9891C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.9891 0ZM17 11.9891C17 12.5465 16.5465 13 15.9891 13H2.011C1.4536 13 1.0001 12.5465 1.0001 11.9891V2.0109C1.0001 1.4535 1.4536 0.9999 2.011 0.9999H15.9891C16.5465 0.9999 17 1.4535 17 2.0109V11.9891Z"
2633        />
2634        <path
2635          d="M15.356 5.67822H8.19523C8.03253 5.67822 7.90063 5.81012 7.90063 5.97282V11.3836C7.90063 11.5463 8.03253 11.6782 8.19523 11.6782H15.356C15.5187 11.6782 15.6506 11.5463 15.6506 11.3836V5.97282C15.6506 5.81012 15.5187 5.67822 15.356 5.67822Z"
2636        />
2637      </svg>
2638    </media-pip-button>
2639  </template>
2640
2641  <template partial="CaptionsMenu">
2642    <media-captions-menu-button part="bottom captions button">
2643      <svg aria-hidden="true" viewBox="0 0 18 14" slot="on">
2644        <path
2645          d="M15.989 0H2.011C0.9004 0 0 0.9003 0 2.0109V11.9891C0 13.0997 0.9004 14 2.011 14H15.989C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.989 0ZM4.2292 8.7639C4.5954 9.1902 5.0935 9.4031 5.7233 9.4031C6.1852 9.4031 6.5544 9.301 6.8302 9.0969C7.1061 8.8933 7.2863 8.614 7.3702 8.26H8.4322C8.3062 8.884 8.0093 9.3733 7.5411 9.7273C7.0733 10.0813 6.4703 10.2581 5.732 10.2581C5.108 10.2581 4.5699 10.1219 4.1168 9.8489C3.6637 9.5759 3.3141 9.1946 3.0685 8.7058C2.8224 8.2165 2.6994 7.6511 2.6994 7.009C2.6994 6.3611 2.8224 5.7927 3.0685 5.3034C3.3141 4.8146 3.6637 4.4323 4.1168 4.1559C4.5699 3.88 5.108 3.7418 5.732 3.7418C6.4703 3.7418 7.0733 3.922 7.5411 4.2818C8.0094 4.6422 8.3062 5.1461 8.4322 5.794H7.3702C7.2862 5.4283 7.106 5.1368 6.8302 4.921C6.5544 4.7052 6.1852 4.5968 5.7233 4.5968C5.0934 4.5968 4.5954 4.8116 4.2292 5.2404C3.8635 5.6696 3.6804 6.259 3.6804 7.009C3.6804 7.7531 3.8635 8.3381 4.2292 8.7639ZM11.0974 8.7639C11.4636 9.1902 11.9617 9.4031 12.5915 9.4031C13.0534 9.4031 13.4226 9.301 13.6984 9.0969C13.9743 8.8933 14.1545 8.614 14.2384 8.26H15.3004C15.1744 8.884 14.8775 9.3733 14.4093 9.7273C13.9415 10.0813 13.3385 10.2581 12.6002 10.2581C11.9762 10.2581 11.4381 10.1219 10.985 9.8489C10.5319 9.5759 10.1823 9.1946 9.9367 8.7058C9.6906 8.2165 9.5676 7.6511 9.5676 7.009C9.5676 6.3611 9.6906 5.7927 9.9367 5.3034C10.1823 4.8146 10.5319 4.4323 10.985 4.1559C11.4381 3.88 11.9762 3.7418 12.6002 3.7418C13.3385 3.7418 13.9415 3.922 14.4093 4.2818C14.8776 4.6422 15.1744 5.1461 15.3004 5.794H14.2384C14.1544 5.4283 13.9742 5.1368 13.6984 4.921C13.4226 4.7052 13.0534 4.5968 12.5915 4.5968C11.9616 4.5968 11.4636 4.8116 11.0974 5.2404C10.7317 5.6696 10.5486 6.259 10.5486 7.009C10.5486 7.7531 10.7317 8.3381 11.0974 8.7639Z"
2646        />
2647      </svg>
2648      <svg aria-hidden="true" viewBox="0 0 18 14" slot="off">
2649        <path
2650          d="M5.73219 10.258C5.10819 10.258 4.57009 10.1218 4.11699 9.8488C3.66389 9.5758 3.31429 9.1945 3.06869 8.7057C2.82259 8.2164 2.69958 7.651 2.69958 7.0089C2.69958 6.361 2.82259 5.7926 3.06869 5.3033C3.31429 4.8145 3.66389 4.4322 4.11699 4.1558C4.57009 3.8799 5.10819 3.7417 5.73219 3.7417C6.47049 3.7417 7.07348 3.9219 7.54128 4.2817C8.00958 4.6421 8.30638 5.146 8.43238 5.7939H7.37039C7.28639 5.4282 7.10618 5.1367 6.83039 4.9209C6.55459 4.7051 6.18538 4.5967 5.72348 4.5967C5.09358 4.5967 4.59559 4.8115 4.22939 5.2403C3.86369 5.6695 3.68058 6.2589 3.68058 7.0089C3.68058 7.753 3.86369 8.338 4.22939 8.7638C4.59559 9.1901 5.09368 9.403 5.72348 9.403C6.18538 9.403 6.55459 9.3009 6.83039 9.0968C7.10629 8.8932 7.28649 8.6139 7.37039 8.2599H8.43238C8.30638 8.8839 8.00948 9.3732 7.54128 9.7272C7.07348 10.0812 6.47049 10.258 5.73219 10.258Z"
2651        />
2652        <path
2653          d="M12.6003 10.258C11.9763 10.258 11.4382 10.1218 10.9851 9.8488C10.532 9.5758 10.1824 9.1945 9.93685 8.7057C9.69075 8.2164 9.56775 7.651 9.56775 7.0089C9.56775 6.361 9.69075 5.7926 9.93685 5.3033C10.1824 4.8145 10.532 4.4322 10.9851 4.1558C11.4382 3.8799 11.9763 3.7417 12.6003 3.7417C13.3386 3.7417 13.9416 3.9219 14.4094 4.2817C14.8777 4.6421 15.1745 5.146 15.3005 5.7939H14.2385C14.1545 5.4282 13.9743 5.1367 13.6985 4.9209C13.4227 4.7051 13.0535 4.5967 12.5916 4.5967C11.9617 4.5967 11.4637 4.8115 11.0975 5.2403C10.7318 5.6695 10.5487 6.2589 10.5487 7.0089C10.5487 7.753 10.7318 8.338 11.0975 8.7638C11.4637 9.1901 11.9618 9.403 12.5916 9.403C13.0535 9.403 13.4227 9.3009 13.6985 9.0968C13.9744 8.8932 14.1546 8.6139 14.2385 8.2599H15.3005C15.1745 8.8839 14.8776 9.3732 14.4094 9.7272C13.9416 10.0812 13.3386 10.258 12.6003 10.258Z"
2654        />
2655        <path
2656          d="M15.9891 1C16.5465 1 17 1.4535 17 2.011V11.9891C17 12.5465 16.5465 13 15.9891 13H2.0109C1.4535 13 1 12.5465 1 11.9891V2.0109C1 1.4535 1.4535 0.9999 2.0109 0.9999L15.9891 1ZM15.9891 0H2.0109C0.9003 0 0 0.9003 0 2.0109V11.9891C0 13.0997 0.9003 14 2.0109 14H15.9891C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.9891 0Z"
2657        />
2658      </svg>
2659    </media-captions-menu-button>
2660    <media-captions-menu
2661      hidden
2662      anchor="auto"
2663      part="bottom captions menu"
2664      disabled="{{disabled}}"
2665      aria-disabled="{{disabled}}"
2666      exportparts="menu-item"
2667    >
2668      <div slot="checked-indicator">
2669        <style>
2670          .indicator {
2671            position: relative;
2672            top: 1px;
2673            width: 0.9em;
2674            height: auto;
2675            fill: var(--_accent-color);
2676            margin-right: 5px;
2677          }
2678
2679          [aria-checked='false'] .indicator {
2680            display: none;
2681          }
2682        </style>
2683        <svg viewBox="0 0 14 18" class="indicator">
2684          <path
2685            d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027"
2686            fill-rule="evenodd"
2687          />
2688        </svg></div
2689    ></media-captions-menu>
2690  </template>
2691
2692  <template partial="AirplayButton">
2693    <media-airplay-button part="bottom airplay button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2694      <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon">
2695        <path
2696          d="M16.1383 0H1.8618C0.8335 0 0 0.8335 0 1.8617V10.1382C0 11.1664 0.8335 12 1.8618 12H3.076C3.1204 11.9433 3.1503 11.8785 3.2012 11.826L4.004 11H1.8618C1.3866 11 1 10.6134 1 10.1382V1.8617C1 1.3865 1.3866 0.9999 1.8618 0.9999H16.1383C16.6135 0.9999 17.0001 1.3865 17.0001 1.8617V10.1382C17.0001 10.6134 16.6135 11 16.1383 11H13.9961L14.7989 11.826C14.8499 11.8785 14.8798 11.9432 14.9241 12H16.1383C17.1665 12 18.0001 11.1664 18.0001 10.1382V1.8617C18 0.8335 17.1665 0 16.1383 0Z"
2697        />
2698        <path
2699          d="M9.55061 8.21903C9.39981 8.06383 9.20001 7.98633 9.00011 7.98633C8.80021 7.98633 8.60031 8.06383 8.44951 8.21903L4.09771 12.697C3.62471 13.1838 3.96961 13.9998 4.64831 13.9998H13.3518C14.0304 13.9998 14.3754 13.1838 13.9023 12.697L9.55061 8.21903Z"
2700        />
2701      </svg>
2702    </media-airplay-button>
2703  </template>
2704
2705  <template partial="FullscreenButton">
2706    <media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2707      <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter">
2708        <path
2709          d="M1.00745 4.39539L1.01445 1.98789C1.01605 1.43049 1.47085 0.978289 2.02835 0.979989L6.39375 0.992589L6.39665 -0.007411L2.03125 -0.020011C0.920646 -0.023211 0.0176463 0.874489 0.0144463 1.98509L0.00744629 4.39539H1.00745Z"
2710        />
2711        <path
2712          d="M17.0144 2.03431L17.0076 4.39541H18.0076L18.0144 2.03721C18.0176 0.926712 17.1199 0.0237125 16.0093 0.0205125L11.6439 0.0078125L11.641 1.00781L16.0064 1.02041C16.5638 1.02201 17.016 1.47681 17.0144 2.03431Z"
2713        />
2714        <path
2715          d="M16.9925 9.60498L16.9855 12.0124C16.9839 12.5698 16.5291 13.022 15.9717 13.0204L11.6063 13.0078L11.6034 14.0078L15.9688 14.0204C17.0794 14.0236 17.9823 13.1259 17.9855 12.0153L17.9925 9.60498H16.9925Z"
2716        />
2717        <path
2718          d="M0.985626 11.9661L0.992426 9.60498H-0.0074737L-0.0142737 11.9632C-0.0174737 13.0738 0.880226 13.9767 1.99083 13.98L6.35623 13.9926L6.35913 12.9926L1.99373 12.98C1.43633 12.9784 0.983926 12.5236 0.985626 11.9661Z"
2719        />
2720      </svg>
2721      <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit">
2722        <path
2723          d="M5.39655 -0.0200195L5.38955 2.38748C5.38795 2.94488 4.93315 3.39708 4.37565 3.39538L0.0103463 3.38278L0.00744629 4.38278L4.37285 4.39538C5.48345 4.39858 6.38635 3.50088 6.38965 2.39028L6.39665 -0.0200195H5.39655Z"
2724        />
2725        <path
2726          d="M12.6411 2.36891L12.6479 0.0078125H11.6479L11.6411 2.36601C11.6379 3.47651 12.5356 4.37951 13.6462 4.38271L18.0116 4.39531L18.0145 3.39531L13.6491 3.38271C13.0917 3.38111 12.6395 2.92641 12.6411 2.36891Z"
2727        />
2728        <path
2729          d="M12.6034 14.0204L12.6104 11.613C12.612 11.0556 13.0668 10.6034 13.6242 10.605L17.9896 10.6176L17.9925 9.61759L13.6271 9.60499C12.5165 9.60179 11.6136 10.4995 11.6104 11.6101L11.6034 14.0204H12.6034Z"
2730        />
2731        <path
2732          d="M5.359 11.6315L5.3522 13.9926H6.3522L6.359 11.6344C6.3622 10.5238 5.4645 9.62088 4.3539 9.61758L-0.0115043 9.60498L-0.0144043 10.605L4.351 10.6176C4.9084 10.6192 5.3607 11.074 5.359 11.6315Z"
2733        />
2734      </svg>
2735    </media-fullscreen-button>
2736  </template>
2737
2738  <template partial="CastButton">
2739    <media-cast-button part="bottom cast button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2740      <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter">
2741        <path
2742          d="M16.0072 0H2.0291C0.9185 0 0.0181 0.9003 0.0181 2.011V5.5009C0.357 5.5016 0.6895 5.5275 1.0181 5.5669V2.011C1.0181 1.4536 1.4716 1 2.029 1H16.0072C16.5646 1 17.0181 1.4536 17.0181 2.011V11.9891C17.0181 12.5465 16.5646 13 16.0072 13H8.4358C8.4746 13.3286 8.4999 13.6611 8.4999 13.9999H16.0071C17.1177 13.9999 18.018 13.0996 18.018 11.989V2.011C18.0181 0.9003 17.1178 0 16.0072 0ZM0 6.4999V7.4999C3.584 7.4999 6.5 10.4159 6.5 13.9999H7.5C7.5 9.8642 4.1357 6.4999 0 6.4999ZM0 8.7499V9.7499C2.3433 9.7499 4.25 11.6566 4.25 13.9999H5.25C5.25 11.1049 2.895 8.7499 0 8.7499ZM0.0181 11V14H3.0181C3.0181 12.3431 1.675 11 0.0181 11Z"
2743        />
2744      </svg>
2745      <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit">
2746        <path
2747          d="M15.9891 0H2.01103C0.900434 0 3.35947e-05 0.9003 3.35947e-05 2.011V5.5009C0.338934 5.5016 0.671434 5.5275 1.00003 5.5669V2.011C1.00003 1.4536 1.45353 1 2.01093 1H15.9891C16.5465 1 17 1.4536 17 2.011V11.9891C17 12.5465 16.5465 13 15.9891 13H8.41773C8.45653 13.3286 8.48183 13.6611 8.48183 13.9999H15.989C17.0996 13.9999 17.9999 13.0996 17.9999 11.989V2.011C18 0.9003 17.0997 0 15.9891 0ZM-0.0180664 6.4999V7.4999C3.56593 7.4999 6.48193 10.4159 6.48193 13.9999H7.48193C7.48193 9.8642 4.11763 6.4999 -0.0180664 6.4999ZM-0.0180664 8.7499V9.7499C2.32523 9.7499 4.23193 11.6566 4.23193 13.9999H5.23193C5.23193 11.1049 2.87693 8.7499 -0.0180664 8.7499ZM3.35947e-05 11V14H3.00003C3.00003 12.3431 1.65693 11 3.35947e-05 11Z"
2748        />
2749        <path d="M2.15002 5.634C5.18352 6.4207 7.57252 8.8151 8.35282 11.8499H15.8501V2.1499H2.15002V5.634Z" />
2750      </svg>
2751    </media-cast-button>
2752  </template>
2753
2754  <template partial="LiveButton">
2755    <media-live-button part="{{section ?? 'top'}} live button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2756      <span slot="text">Live</span>
2757    </media-live-button>
2758  </template>
2759
2760  <template partial="PlaybackRateMenu">
2761    <media-playback-rate-menu-button part="bottom playback-rate button"></media-playback-rate-menu-button>
2762    <media-playback-rate-menu
2763      hidden
2764      anchor="auto"
2765      rates="{{playbackrates}}"
2766      exportparts="menu-item"
2767      part="bottom playback-rate menu"
2768      disabled="{{disabled}}"
2769      aria-disabled="{{disabled}}"
2770    ></media-playback-rate-menu>
2771  </template>
2772
2773  <template partial="VolumeRange">
2774    <media-volume-range
2775      part="bottom volume range"
2776      disabled="{{disabled}}"
2777      aria-disabled="{{disabled}}"
2778    ></media-volume-range>
2779  </template>
2780
2781  <template partial="TimeDisplay">
2782    <media-time-display
2783      remaining="{{defaultshowremainingtime}}"
2784      showduration="{{!hideduration}}"
2785      part="bottom time display"
2786      disabled="{{disabled}}"
2787      aria-disabled="{{disabled}}"
2788    ></media-time-display>
2789  </template>
2790
2791  <template partial="TimeRange">
2792    <media-time-range part="bottom time range" disabled="{{disabled}}" aria-disabled="{{disabled}}"
2792>
2793      <media-preview-thumbnail slot="preview"></media-preview-thumbnail>
2794      <media-preview-chapter-display slot="preview"></media-preview-chapter-display>
2795      <media-preview-time-display slot="preview"></media-preview-time-display>
2796      <div slot="preview" part="arrow"></div>
2797    </media-time-range>
2798  </template>
2799
2800  <template partial="AudioTrackMenu">
2801    <media-audio-track-menu-button part="bottom audio-track button">
2802      <svg aria-hidden="true" slot="icon" viewBox="0 0 18 16">
2803        <path d="M9 15A7 7 0 1 1 9 1a7 7 0 0 1 0 14Zm0 1A8 8 0 1 0 9 0a8 8 0 0 0 0 16Z" />
2804        <path
2805          d="M5.2 6.3a.5.5 0 0 1 .5.5v2.4a.5.5 0 1 1-1 0V6.8a.5.5 0 0 1 .5-.5Zm2.4-2.4a.5.5 0 0 1 .5.5v7.2a.5.5 0 0 1-1 0V4.4a.5.5 0 0 1 .5-.5ZM10 5.5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm2.4-.8a.5.5 0 0 1 .5.5v5.6a.5.5 0 0 1-1 0V5.2a.5.5 0 0 1 .5-.5Z"
2806        />
2807      </svg>
2808    </media-audio-track-menu-button>
2809    <media-audio-track-menu
2810      hidden
2811      anchor="auto"
2812      part="bottom audio-track menu"
2813      disabled="{{disabled}}"
2814      aria-disabled="{{disabled}}"
2815      exportparts="menu-item"
2816    >
2817      <div slot="checked-indicator">
2818        <style>
2819          .indicator {
2820            position: relative;
2821            top: 1px;
2822            width: 0.9em;
2823            height: auto;
2824            fill: var(--_accent-color);
2825            margin-right: 5px;
2826          }
2827
2828          [aria-checked='false'] .indicator {
2829            display: none;
2830          }
2831        </style>
2832        <svg viewBox="0 0 14 18" class="indicator">
2833          <path
2834            d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027"
2835            fill-rule="evenodd"
2836          />
2837        </svg>
2838      </div>
2839    </media-audio-track-menu>
2840  </template>
2841
2842  <template partial="RenditionMenu">
2843    <media-rendition-menu-button part="bottom rendition button">
2844      <svg aria-hidden="true" slot="icon" viewBox="0 0 18 14">
2845        <path
2846          d="M2.25 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM9 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm6.75 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"
2847        />
2848      </svg>
2849    </media-rendition-menu-button>
2850    <media-rendition-menu
2851      hidden
2852      anchor="auto"
2853      part="bottom rendition menu"
2854      disabled="{{disabled}}"
2855      aria-disabled="{{disabled}}"
2856    >
2857      <div slot="checked-indicator">
2858        <style>
2859          .indicator {
2860            position: relative;
2861            top: 1px;
2862            width: 0.9em;
2863            height: auto;
2864            fill: var(--_accent-color);
2865            margin-right: 5px;
2866          }
2867
2868          [aria-checked='false'] .indicator {
2869            display: none;
2870          }
2871        </style>
2872        <svg viewBox="0 0 14 18" class="indicator">
2873          <path
2874            d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027"
2875            fill-rule="evenodd"
2876          />
2877        </svg>
2878      </div>
2879    </media-rendition-menu>
2880  </template>
2881
2882  <template partial="MuxBadge">
2883    <div part="mux-badge">
2884      <a href="https://www.mux.com/player" target="_blank">
2885        <span class="mux-badge-text">Powered by</span>
2886        <div class="mux-badge-logo">
2887          <svg
2888            viewBox="0 0 1600 500"
2889            style="fill-rule: evenodd; clip-rule: evenodd; stroke-linejoin: round; stroke-miterlimit: 2"
2890          >
2891            <g>
2892              <path
2893                d="M994.287,93.486c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m0,-93.486c-34.509,-0 -62.484,27.976 -62.484,62.486l0,187.511c0,68.943 -56.09,125.033 -125.032,125.033c-68.942,-0 -125.03,-56.09 -125.03,-125.033l0,-187.511c0,-34.51 -27.976,-62.486 -62.485,-62.486c-34.509,-0 -62.484,27.976 -62.484,62.486l0,187.511c0,137.853 112.149,250.003 249.999,250.003c137.851,-0 250.001,-112.15 250.001,-250.003l0,-187.511c0,-34.51 -27.976,-62.486 -62.485,-62.486"
2894                style="fill-rule: nonzero"
2895              ></path>
2896              <path
2897                d="M1537.51,468.511c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m-275.883,-218.509l-143.33,143.329c-24.402,24.402 -24.402,63.966 0,88.368c24.402,24.402 63.967,24.402 88.369,-0l143.33,-143.329l143.328,143.329c24.402,24.4 63.967,24.402 88.369,-0c24.403,-24.402 24.403,-63.966 0.001,-88.368l-143.33,-143.329l0.001,-0.004l143.329,-143.329c24.402,-24.402 24.402,-63.965 0,-88.367c-24.402,-24.402 -63.967,-24.402 -88.369,-0l-143.329,143.328l-143.329,-143.328c-24.402,-24.401 -63.967,-24.402 -88.369,-0c-24.402,24.402 -24.402,63.965 0,88.367l143.329,143.329l0,0.004Z"
2898                style="fill-rule: nonzero"
2899              ></path>
2900              <path
2901                d="M437.511,468.521c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m23.915,-463.762c-23.348,-9.672 -50.226,-4.327 -68.096,13.544l-143.331,143.329l-143.33,-143.329c-17.871,-17.871 -44.747,-23.216 -68.096,-13.544c-23.349,9.671 -38.574,32.455 -38.574,57.729l0,375.026c0,34.51 27.977,62.486 62.487,62.486c34.51,-0 62.486,-27.976 62.486,-62.486l0,-224.173l80.843,80.844c24.404,24.402 63.965,24.402 88.369,-0l80.843,-80.844l0,224.173c0,34.51 27.976,62.486 62.486,62.486c34.51,-0 62.486,-27.976 62.486,-62.486l0,-375.026c0,-25.274 -15.224,-48.058 -38.573,-57.729"
2902                style="fill-rule: nonzero"
2903              ></path>
2904            </g>
2905          </svg>
2906        </div>
2907      </a>
2908    </div>
2909  </template>
2910
2911  <media-controller
2912    part="controller"
2913    defaultstreamtype="{{defaultstreamtype ?? 'on-demand'}}"
2914    breakpoints="sm:470"
2915    gesturesdisabled="{{disabled}}"
2916    hotkeys="{{hotkeys}}"
2917    nohotkeys="{{nohotkeys}}"
2918    novolumepref="{{novolumepref}}"
2919    audio="{{audio}}"
2920    noautoseektolive="{{noautoseektolive}}"
2921    defaultsubtitles="{{defaultsubtitles}}"
2922    defaultduration="{{defaultduration ?? false}}"
2923    keyboardforwardseekoffset="{{forwardseekoffset}}"
2924    keyboardbackwardseekoffset="{{backwardseekoffset}}"
2925    exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer"
2926    style="--_pre-playback-place:{{preplaybackplace ?? 'center'}}"
2927  >
2928    <slot name="media" slot="media"></slot>
2929    <slot name="poster" slot="poster"></slot>
2930
2931    <media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator>
2932    <media-error-dialog slot="dialog" noautohide></media-error-dialog>
2933
2934    <template if="!audio">
2935      <!-- Pre-playback UI -->
2936      <!-- same for both on-demand and live -->
2937      <div slot="centered-chrome" class="center-controls pre-playback">
2938        <template if="!breakpointsm">{{>PlayButton section="center"}}</template>
2939        <template if="breakpointsm">{{>PrePlayButton section="center"}}</template>
2940      </div>
2941
2942      <!-- Mux Badge -->
2943      <template if="proudlydisplaymuxbadge"> {{>MuxBadge}} </template>
2944
2945      <!-- Autoplay centered unmute button -->
2946      <!--
2947        todo: figure out how show this with available state variables
2948        needs to show when:
2949        - autoplay is enabled
2950        - playback has been successful
2951        - audio is muted
2952        - in place / instead of the pre-plaback play button
2953        - not to show again after user has interacted with this button
2954          - OR user has interacted with the mute button in the control bar
2955      -->
2956      <!--
2957        There should be a >MuteButton to the left of the "Unmute" text, but a templating bug
2958        makes it appear even if commented out in the markup, add it back when code is un-commented
2959      -->
2960      <!-- <div slot="centered-chrome" class="autoplay-unmute">
2961        <div role="button" class="autoplay-unmute-btn">Unmute</div>
2962      </div> -->
2963
2964      <template if="streamtype == 'on-demand'">
2965        <template if="breakpointsm">
2966          <media-control-bar part="control-bar top" slot="top-chrome">{{>TitleDisplay}} </media-control-bar>
2967        </template>
2968        {{>TimeRange}}
2969        <media-control-bar part="control-bar bottom">
2970          {{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}} {{>MuteButton}}
2971          {{>VolumeRange}}
2972          <div class="spacer"></div>
2973          {{>RenditionMenu}} {{>PlaybackRateMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}}
2974          {{>CastButton}} {{>PipButton}} {{>FullscreenButton}}
2975        </media-control-bar>
2976      </template>
2977
2978      <template if="streamtype == 'live'">
2979        <media-control-bar part="control-bar top" slot="top-chrome">
2980          {{>LiveButton}}
2981          <template if="breakpointsm"> {{>TitleDisplay}} </template>
2982        </media-control-bar>
2983        <template if="targetlivewindow > 0">{{>TimeRange}}</template>
2984        <media-control-bar part="control-bar bottom">
2985          {{>PlayButton}}
2986          <template if="targetlivewindow > 0">{{>SeekBackwardButton}} {{>SeekForwardButton}}</template>
2987          {{>MuteButton}} {{>VolumeRange}}
2988          <div class="spacer"></div>
2989          {{>RenditionMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}}
2990          {{>FullscreenButton}}
2991        </media-control-bar>
2992      </template>
2993    </template>
2994
2995    <template if="audio">
2996      <template if="streamtype == 'on-demand'">
2997        <template if="title">
2998          <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar>
2999        </template>
3000        <media-control-bar part="control-bar bottom">
3001          {{>PlayButton}}
3002          <template if="breakpointsm"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>
3003          {{>MuteButton}}
3004          <template if="breakpointsm">{{>VolumeRange}}</template>
3005          {{>TimeDisplay}} {{>TimeRange}}
3006          <template if="breakpointsm">{{>PlaybackRateMenu}}</template>
3007          {{>AirplayButton}} {{>CastButton}}
3008        </media-control-bar>
3009      </template>
3010
3011      <template if="streamtype == 'live'">
3012        <template if="title">
3013          <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar>
3014        </template>
3015        <media-control-bar part="control-bar bottom">
3016          {{>PlayButton}} {{>LiveButton section="bottom"}} {{>MuteButton}}
3017          <template if="breakpointsm">
3018            {{>VolumeRange}}
3019            <template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>
3020          </template>
3021          <template if="targetlivewindow > 0"> {{>TimeDisplay}} {{>TimeRange}} </template>
3022          <template if="!targetlivewindow"><div class="spacer"></div></template>
3023          {{>AirplayButton}} {{>CastButton}}
3024        </media-control-bar>
3025      </template>
3026    </template>
3027
3028    <slot></slot>
3029  </media-controller>
3030</template>
3031`,vM=p3.createElement("template");"innerHTML"in vM&&(vM.innerHTML=vL);var vO,vN,vx=class extends c3{};vx.template=null==(vN=null==(vO=vM.content)?void 0:vO.children)?void 0:vN[0],p2.customElements.get("media-theme-gerwig")||p2.customElements.define("media-theme-gerwig",vx);var vP={SRC:"src",POSTER:"poster"},vU={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",ACCENT_COLOR:"accent-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",P
3031LAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",DRM_TOKEN:"drm-token",STORYBOARD_SRC:"storyboard-src",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio",NOHOTKEYS:"nohotkeys",HOTKEYS:"hotkeys",PLAYBACK_RATES:"playbackrates",DEFAULT_SHOW_REMAINING_TIME:"default-show-remaining-time",DEFAULT_DURATION:"default-duration",TITLE:"title",VIDEO_TITLE:"video-title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",EXTRA_SOURCE_PARAMS:"extra-source-params",NO_VOLUME_PREF:"no-volume-pref",CAST_RECEIVER:"cast-receiver",NO_TOOLTIPS:"no-tooltips",PROUDLY_DISPLAY_MUX_BADGE:"proudly-display-mux-badge"},vB=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","videotitle","novolumepref","proudlydisplaymuxbadge"],vW=n5.formatErrorMessage;function vH(e){let t=e.videoTitle?{video_title:e.videoTitle}:{};return e.getAttributeNames().filter(e=>e.startsWith("metadata-")).reduce((t,i)=>{let a=e.getAttribute(i);return null!==a&&(t[i.replace(/^metadata-/,"").replace(/-/g,"_")]=a),t},t)}n5.formatErrorMessage=e=>{var t,i;if(e instanceof tU){let a=((e,t=!1)=>({title:((e,t=!1)=>{var i,a;if(e.muxCode){let r=vC(null!=(i=e.errorCategory)?i:"video"),n=tx(null!=(a=e.errorCategory)?a:tO.VIDEO);if(e.muxCode===tN.NETWORK_OFFLINE)return t5("Your device appears to be offline",t);if(e.muxCode===tN.NETWORK_TOKEN_EXPIRED)return t5("{category} URL has expired",t).format({category:r});if([tN.NETWORK_TOKEN_SUB_MISMATCH,tN.NETWORK_TOKEN_AUD_MISMATCH,tN.NETWORK_TOKEN_AUD_MISSING,tN.NETWORK_TOKEN_MALFORMED].includes(e.muxCode))return t5("{category} URL is formatted incorrectly",t).format({category:r});if(e.muxCode===tN.NETWORK_TOKEN_MISSING)return t5("Invalid {categoryName} URL",t).format({categoryName:n});if(e.muxCode===tN.NETWORK_NOT_FOUND)return t5("{category} does not exist",t).format({category:r});if(e.muxCode===tN.NETWORK_NOT_READY)return t5("{category} is not currently available",t).format({category:r})}if(e.code){if(e.code===tU.MEDIA_ERR_NETWORK)return t5("Network Error",t);if(e.code===tU.MEDIA_ERR_DECODE)return t5("Media Error",t);if(e.code===tU.MEDIA_ERR_SRC_NOT_SUPPORTED)return t5("Source Not Supported",t)}return t5("Error",t)})(e,t).toString(),message:((e,t=!1)=>{var i,a;if(e.muxCode){let r=vC(null!=(i=e.errorCategory)?i:"video"),n=tx(null!=(a=e.errorCategory)?a:tO.VIDEO);return e.muxCode===tN.NETWORK_OFFLINE?t5("Check your internet connection and try reloading this video.",t):e.muxCode===tN.NETWORK_TOKEN_EXPIRED?t5("The video’s secured {tokenNamePrefix}-token has expired.",t).format({tokenNamePrefix:n}):e.muxCode===tN.NETWORK_TOKEN_SUB_MISMATCH?t5("The video’s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",t).format({tokenNamePrefix:n}):e.muxCode===tN.NETWORK_TOKEN_MALFORMED?t5("{category} URL is formatted incorrectly",t).format({category:r}):[tN.NETWORK_TOKEN_AUD_MISMATCH,tN.NETWORK_TOKEN_AUD_MISSING].includes(e.muxCode)?t5("The {tokenNamePrefix}-token is formatted with incorrect information.",t).format({tokenNamePrefix:n}):[tN.NETWORK_TOKEN_MISSING,tN.NETWORK_INVALID_URL].includes(e.muxCode)?t5("The video URL or {tokenNamePrefix}-token are formatted with incorrect or incomplete information.",t).format({tokenNamePrefix:n}):e.muxCode===tN.NETWORK_NOT_FOUND?"":e.muxCode===tN.NETWORK_NOT_READY?t5("The live stream or video file are not yet ready.",t):e.message}return e.code&&(e.code===tU.MEDIA_ERR_NETWORK||e.code===tU.MEDIA_ERR_DECODE||e.code===tU.MEDIA_ERR_SRC_NOT_SUPPORTED),e.message})(e,t).toString()}))(e,!1);return`
3032      ${null!=a&&a.title?`<h3>${a.title}</h3>`:""}
3033      ${null!=a&&a.message||null!=a&&a.linkUrl?`<p>
3034        ${null==a?void 0:a.message}
3035        ${null!=a&&a.linkUrl?`<a
3036              href="${a.linkUrl}"
3037              target="_blank"
3038              rel="external noopener"
3039              aria-label="${null!=(t=a.linkText)?t:""} ${t5("(opens in a new window)")}"
3040              >${null!=(i=a.linkText)?i:a.linkUrl}</a
3041            >`:""}
3042      </p>`:""}
3043    `}return vW(e)};var vV,vF,vq,v$,vK,vY,vG,vj,vQ,vZ,vz,vX,vJ,v0,v1,v2=Object.values(cb),v3=Object.values(vP),v4=Object.values(vU),v5="mux-player",v9={isDialogOpen:!1},v8={redundant_streams:!0},v6=class extends vf{constructor(){super(),md(this,vG),md(this,vV),md(this,vF,!1),md(this,vq,{}),md(this,v$,!0),md(this,vK,new vs(this,"hotkeys")),md(this,vY,{...v9,onCloseErrorDialog:e=>{var t;(null==(t=e.composedPath()[0])?void 0:t.localName)==="media-error-dialog"&&mc(this,vG,vZ).call(this,{isDialogOpen:!1})},onFocusInErrorDialog:e=>{var t;(null==(t=e.composedPath()[0])?void 0:t.localName)==="media-error-dialog"&&(vt(this,p3.activeElement)||e.preventDefault())}}),mu(this,vV,iB()),this.attachShadow({mode:"open"}),mc(this,vG,vQ).call(this),this.isConnected&&mc(this,vG,vj).call(this)}static get NAME(){return v5}static get VERSION(){return va}static get observedAttributes(){var e;return[...null!=(e=vf.observedAttributes)?e:[],...v3,...v2,...v4]}get mediaTheme(){var e;return null==(e=this.shadowRoot)?void 0:e.querySelector("media-theme")}get mediaController(){var e,t;return null==(t=null==(e=this.mediaTheme)?void 0:e.shadowRoot)?void 0:t.querySelector("media-controller")}connectedCallback(){var e;let t=null==(e=this.shadowRoot)?void 0:e.querySelector("mux-video");t&&(t.metadata=vH(this))}attributeChangedCallback(e,t,i){var a;switch(mc(this,vG,vj).call(this),super.attributeChangedCallback(e,t,i),e){case vU.HOTKEYS:ml(this,vK).value=i;break;case vU.THUMBNAIL_TIME:null!=i&&this.tokens.thumbnail&&vl(t5("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break;case vU.THUMBNAIL_TOKEN:if(i){let e=t4(i);if(e){let{aud:t}=e,i=ib.THUMBNAIL;t!==i&&vl(t5("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:i,tokenNamePrefix:"thumbnail"}))}}break;case vU.STORYBOARD_TOKEN:if(i){let e=t4(i);if(e){let{aud:t}=e,i=ib.STORYBOARD;t!==i&&vl(t5("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:i,tokenNamePrefix:"storyboard"}))}}break;case vU.DRM_TOKEN:if(i){let e=t4(i);if(e){let{aud:t}=e,i=ib.DRM;t!==i&&vl(t5("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:i,tokenNamePrefix:"drm"}))}}break;case cb.PLAYBACK_ID:null!=i&&i.includes("?token")&&vd(t5("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:i}));break;case cb.STREAM_TYPE:i&&![tH.LIVE,tH.ON_DEMAND,tH.UNKNOWN].includes(i)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=i.includes("dvr")?1/0:0:vu({file:"invalid-stream-type.md",message:t5("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):i===tH.LIVE?null==this.getAttribute(vU.TARGET_LIVE_WINDOW)&&(this.targetLiveWindow=0):this.targetLiveWindow=NaN}[cb.PLAYBACK_ID,vP.SRC,vU.PLAYBACK_TOKEN].includes(e)&&t!==i&&mu(this,vY,{...ml(this,vY),...v9}),mc(this,vG,vz).call(this,{[null!=(a=vn[e])?a:p5(e)]:i})}async requestFullscreen(e){var t;if(!(!this.mediaController||this.mediaController.hasAttribute(ar.MEDIA_IS_FULLSCREEN)))return null==(t=this.mediaController)||t.dispatchEvent(new p2.CustomEvent(ae.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,t)=>
3043{var i;null==(i=this.mediaController)||i.addEventListener(an.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}async exitFullscreen(){var e;if(!(!this.mediaController||!this.mediaController.hasAttribute(ar.MEDIA_IS_FULLSCREEN)))return null==(e=this.mediaController)||e.dispatchEvent(new p2.CustomEvent(ae.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,t)=>{var i;null==(i=this.mediaController)||i.addEventListener(an.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}get preferCmcd(){var e;return null!=(e=this.getAttribute(cb.PREFER_CMCD))?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?tq.includes(e)?this.setAttribute(cb.PREFER_CMCD,e):vl(`Invalid value for preferCmcd. Must be one of ${tq.join()}`):this.removeAttribute(cb.PREFER_CMCD))}get hasPlayed(){var e,t;return null!=(t=null==(e=this.mediaController)?void 0:e.hasAttribute(ar.MEDIA_HAS_PLAYED))&&t}get inLiveWindow(){var e;return null==(e=this.mediaController)?void 0:e.hasAttribute(ar.MEDIA_TIME_IS_LIVE)}get _hls(){var e;return null==(e=this.media)?void 0:e._hls}get mux(){var e;return null==(e=this.media)?void 0:e.mux}get theme(){var e;return null!=(e=this.getAttribute(vU.THEME))?e:"gerwig"}set theme(e){this.setAttribute(vU.THEME,`${e}`)}get themeProps(){let e=this.mediaTheme;if(!e)return;let t={};for(let i of e.getAttributeNames()){if(vB.includes(i))continue;let a=e.getAttribute(i);t[p5(i)]=""===a||a}return t}set themeProps(e){var t,i;mc(this,vG,vj).call(this);let a={...this.themeProps,...e};for(let r in a){if(vB.includes(r))continue;let a=null==e?void 0:e[r];"boolean"==typeof a||null==a?null==(t=this.mediaTheme)||t.toggleAttribute(p4(r),!!a):null==(i=this.mediaTheme)||i.setAttribute(p4(r),a)}}get playbackId(){var e;return null!=(e=this.getAttribute(cb.PLAYBACK_ID))?e:void 0}set playbackId(e){e?this.setAttribute(cb.PLAYBACK_ID,e):this.removeAttribute(cb.PLAYBACK_ID)}get src(){var e,t;return this.playbackId?null!=(e=v7(this,vP.SRC))?e:void 0:null!=(t=this.getAttribute(vP.SRC))?t:void 0}set src(e){e?this.setAttribute(vP.SRC,e):this.removeAttribute(vP.SRC)}get poster(){var e;let t=this.getAttribute(vP.POSTER);if(null!=t)return t;let{tokens:i}=this;return i.playback&&!i.thumbnail?void vl("Missing expected thumbnail token. No poster image will be shown"):this.playbackId&&!this.audio?((e,{token:t,customDomain:i=vi,thumbnailTime:a,programTime:r}={})=>{var n;let s=null==t?a:void 0,{aud:o}=null!=(n=t4(t))?n:{};if(!(t&&"t"!==o))return`https://image.${i}/${e}/thumbnail.webp${p8({token:t,time:s,program_time:r})}`})(this.playbackId,{customDomain:this.customDomain,thumbnailTime:null!=(e=this.thumbnailTime)?e:this.startTime,programTime:this.programStartTime,token:i.thumbnail}):void 0}set poster(e){e||""===e?this.setAttribute(vP.POSTER,e):this.removeAttribute(vP.POSTER)}get storyboardSrc(){var e;return null!=(e=this.getAttribute(vU.STORYBOARD_SRC))?e:void 0}set storyboardSrc(e){e?this.setAttribute(vU.STORYBOARD_SRC,e):this.removeAttribute(vU.STORYBOARD_SRC)}get storyboard(){let{tokens:e}=this;return this.storyboardSrc&&!e.storyboard?this.storyboardSrc:this.audio||!this.playbackId||!this.streamType||[tH.LIVE,tH.UNKNOWN].includes(this.streamType)||e.playback&&!e.storyboard?void 0:((e,{token:t,customDomain:i=vi,programStartTime:a,programEndTime:r}={})=>{var n;let{aud:s}=null!=(n=t4(t))?n:{};if(!(t&&"s"!==s))return`https://image.${i}/${e}/storyboard.vtt${p8({token:t,format:"webp",program_start_time:a,program_end_time:r})}`})(this.playbackId,{customDomain:this.customDomain,token:e.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}get audio(){return this.hasAttribute(vU.AUDIO)}set audio(e){if(!e)return void this.removeAttribute(vU.AUDIO);this.setAttribute(vU.AUDIO,"")}get hotkeys(){return ml(this,vK)}get nohotkeys(){return this.hasAttribute(vU.NOHOTKEYS)}set nohotkeys(e){if(!e)return void this.removeAttribute(vU.NOHOTKEYS);this.setAttribute(vU.NOHOTKEYS,"")}get thumbnailTime(){return p9(this.getAttribute(vU.THUMBNAIL_TIME))}set thumbnailTime(e){this.setAttribute(vU.THUMBNAIL_TIME,`${e}`)}get videoTitle(){var e,t;return null!=(t=null!=(e=this.getAttribute(vU.VIDEO_TITLE))?e:this.getAttribute(vU.TITLE))?t:""}set videoTitle(e){e!==this.videoTitle&&(e?this.setAttribute(vU.VIDEO_TITLE,e):this.removeAttribute(vU.VIDEO_TITLE))}get placeholder(){var e;return null!=(e=v7(this,vU.PLACEHOLDER))?e:""}set placeholder(e){this.setAttribute(vU.PLACEHOLDER,`${e}`)}get primaryColor(){var e,t;let i=this.getAttribute(vU.PRIMARY_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=p2.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_primary-color"))?void 0:t.trim()))return i}set primaryColor(e){this.setAttribute(vU.PRIMARY_COLOR,`${e}`)}get secondaryColor(){var e,t;let i=this.getAttribute(vU.SECONDARY_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=p2.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_secondary-color"))?void 0:t.trim()))return i}set secondaryColor(e){this.setAttribute(vU.SECONDARY_COLOR,`${e}`)}get accentColor(){var e,t;let i=this.getAttribute(vU.ACCENT_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=p2.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_accent-color"))?void 0:t.trim()))return i}set accentColor(e){this.setAttribute(vU.ACCENT_COLOR,`${e}`)}get defaultShowRemainingTime(){return this.hasAttribute(vU.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(e){e?this.setAttribute(vU.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(vU.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(vU.PLAYBACK_RATES))return this.getAttribute(vU.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(e=>Number(e)).filter(e=>!Number.isNaN(e)).sort((e,t)=>
3043e-t)}set playbackRates(e){if(!e)return void this.removeAttribute(vU.PLAYBACK_RATES);this.setAttribute(vU.PLAYBACK_RATES,e.join(" "))}get forwardSeekOffset(){var e;return null!=(e=p9(this.getAttribute(vU.FORWARD_SEEK_OFFSET)))?e:10}set forwardSeekOffset(e){this.setAttribute(vU.FORWARD_SEEK_OFFSET,`${e}`)}get backwardSeekOffset(){var e;return null!=(e=p9(this.getAttribute(vU.BACKWARD_SEEK_OFFSET)))?e:10}set backwardSeekOffset(e){this.setAttribute(vU.BACKWARD_SEEK_OFFSET,`${e}`)}get defaultHiddenCaptions(){return this.hasAttribute(vU.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(e){e?this.setAttribute(vU.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(vU.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return p9(this.getAttribute(vU.DEFAULT_DURATION))}set defaultDuration(e){null==e?this.removeAttribute(vU.DEFAULT_DURATION):this.setAttribute(vU.DEFAULT_DURATION,`${e}`)}get playerInitTime(){return this.hasAttribute(cb.PLAYER_INIT_TIME)?p9(this.getAttribute(cb.PLAYER_INIT_TIME)):ml(this,vV)}set playerInitTime(e){e!=this.playerInitTime&&(null==e?this.removeAttribute(cb.PLAYER_INIT_TIME):this.setAttribute(cb.PLAYER_INIT_TIME,`${+e}`))}get playerSoftwareName(){var e;return null!=(e=this.getAttribute(cb.PLAYER_SOFTWARE_NAME))?e:v5}get playerSoftwareVersion(){var e;return null!=(e=this.getAttribute(cb.PLAYER_SOFTWARE_VERSION))?e:va}get beaconCollectionDomain(){var e;return null!=(e=this.getAttribute(cb.BEACON_COLLECTION_DOMAIN))?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(cb.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(cb.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var e;return null!=(e=this.getAttribute(cb.MAX_RESOLUTION))?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(cb.MAX_RESOLUTION,e):this.removeAttribute(cb.MAX_RESOLUTION))}get minResolution(){var e;return null!=(e=this.getAttribute(cb.MIN_RESOLUTION))?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(cb.MIN_RESOLUTION,e):this.removeAttribute(cb.MIN_RESOLUTION))}get renditionOrder(){var e;return null!=(e=this.getAttribute(cb.RENDITION_ORDER))?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(cb.RENDITION_ORDER,e):this.removeAttribute(cb.RENDITION_ORDER))}get programStartTime(){return p9(this.getAttribute(cb.PROGRAM_START_TIME))}set programStartTime(e){null==e?this.removeAttribute(cb.PROGRAM_START_TIME):this.setAttribute(cb.PROGRAM_START_TIME,`${e}`)}get programEndTime(){return p9(this.getAttribute(cb.PROGRAM_END_TIME))}set programEndTime(e){null==e?this.removeAttribute(cb.PROGRAM_END_TIME):this.setAttribute(cb.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){return p9(this.getAttribute(cb.ASSET_START_TIME))}set assetStartTime(e){null==e?this.removeAttribute(cb.ASSET_START_TIME):this.setAttribute(cb.ASSET_START_TIME,`${e}`)}get assetEndTime(){return p9(this.getAttribute(cb.ASSET_END_TIME))}set assetEndTime(e){null==e?this.removeAttribute(cb.ASSET_END_TIME):this.setAttribute(cb.ASSET_END_TIME,`${e}`)}get extraSourceParams(){return this.hasAttribute(vU.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(vU.EXTRA_SOURCE_PARAMS)).entries()].reduce((e,[t,i])=>(e[t]=i,e),{}):v8}set extraSourceParams(e){null==e?this.removeAttribute(vU.EXTRA_SOURCE_PARAMS):this.setAttribute(vU.EXTRA_SOURCE_PARAMS,new URLSearchParams(e).toString())}get customDomain(){var e;return null!=(e=this.getAttribute(cb.CUSTOM_DOMAIN))?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(cb.CUSTOM_DOMAIN,e):this.removeAttribute(cb.CUSTOM_DOMAIN))}get envKey(){var e;return null!=(e=v7(this,cb.ENV_KEY))?e:void 0}set envKey(e){this.setAttribute(cb.ENV_KEY,`${e}`)}get noVolumePref(){return this.hasAttribute(vU.NO_VOLUME_PREF)}set noVolumePref(e){e?this.setAttribute(vU.NO_VOLUME_PREF,""):this.removeAttribute(vU.NO_VOLUME_PREF)}get debug(){return null!=v7(this,cb.DEBUG)}set debug(e){e?this.setAttribute(cb.DEBUG,""):this.removeAttribute(cb.DEBUG)}get disableTracking(){return null!=v7(this,cb.DISABLE_TRACKING)}set disableTracking(e){this.toggleAttribute(cb.DISABLE_TRACKING,!!e)}get disableCookies(){return null!=v7(this,cb.DISABLE_COOKIES)}set disableCookies(e){e?this.setAttribute(cb.DISABLE_COOKIES,""):this.removeAttribute(cb.DISABLE_COOKIES)}get streamType(){var e,t,i;return null!=(i=null!=(t=this.getAttribute(cb.STREAM_TYPE))?t:null==(e=this.media)?void 0:e.streamType)?i:tH.UNKNOWN}set streamType(e){this.setAttribute(cb.STREAM_TYPE,`${e}`)}get defaultStreamType(){var e,t,i;return null!=(i=null!=(t=this.getAttribute(vU.DEFAULT_STREAM_TYPE))?t:null==(e=this.mediaController)?void 0:e.getAttribute(vU.DEFAULT_STREAM_TYPE))?i:tH.ON_DEMAND}set defaultStreamType(e){e?this.setAttribute(vU.DEFAULT_STREAM_TYPE,e):this.removeAttribute(vU.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var e,t;return this.hasAttribute(vU.TARGET_LIVE_WINDOW)?+this.getAttribute(vU.TARGET_LIVE_WINDOW):null!=(t=null==(e=this.media)?void 0:e.targetLiveWindow)?t:NaN}
3043set targetLiveWindow(e){e==this.targetLiveWindow||Number.isNaN(e)&&Number.isNaN(this.targetLiveWindow)||(null==e?this.removeAttribute(vU.TARGET_LIVE_WINDOW):this.setAttribute(vU.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e;return null==(e=this.media)?void 0:e.liveEdgeStart}get startTime(){return p9(v7(this,cb.START_TIME))}set startTime(e){this.setAttribute(cb.START_TIME,`${e}`)}get preferPlayback(){let e=this.getAttribute(cb.PREFER_PLAYBACK);if(e===tV.MSE||e===tV.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===tV.MSE||e===tV.NATIVE?this.setAttribute(cb.PREFER_PLAYBACK,e):this.removeAttribute(cb.PREFER_PLAYBACK))}get metadata(){var e;return null==(e=this.media)?void 0:e.metadata}set metadata(e){if(mc(this,vG,vj).call(this),!this.media)return void vd("underlying media element missing when trying to set metadata. metadata will not be set.");this.media.metadata={...vH(this),...e}}get _hlsConfig(){var e;return null==(e=this.media)?void 0:e._hlsConfig}set _hlsConfig(e){if(mc(this,vG,vj).call(this),!this.media)return void vd("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.");this.media._hlsConfig=e}async addCuePoints(e){var t;return(mc(this,vG,vj).call(this),this.media)?null==(t=this.media)?void 0:t.addCuePoints(e):void vd("underlying media element missing when trying to addCuePoints. cuePoints will not be added.")}get activeCuePoint(){var e;return null==(e=this.media)?void 0:e.activeCuePoint}get cuePoints(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.cuePoints)?t:[]}addChapters(e){var t;return(mc(this,vG,vj).call(this),this.media)?null==(t=this.media)?void 0:t.addChapters(e):void vd("underlying media element missing when trying to addChapters. chapters will not be added.")}get activeChapter(){var e;return null==(e=this.media)?void 0:e.activeChapter}get chapters(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.chapters)?t:[]}getStartDate(){var e;return null==(e=this.media)?void 0:e.getStartDate()}get currentPdt(){var e;return null==(e=this.media)?void 0:e.currentPdt}get tokens(){let e=this.getAttribute(vU.PLAYBACK_TOKEN),t=this.getAttribute(vU.DRM_TOKEN),i=this.getAttribute(vU.THUMBNAIL_TOKEN),a=this.getAttribute(vU.STORYBOARD_TOKEN);return{...ml(this,vq),...null!=e?{playback:e}:{},...null!=t?{drm:t}:{},...null!=i?{thumbnail:i}:{},...null!=a?{storyboard:a}:{}}}set tokens(e){mu(this,vq,null!=e?e:{})}get playbackToken(){var e;return null!=(e=this.getAttribute(vU.PLAYBACK_TOKEN))?e:void 0}set playbackToken(e){this.setAttribute(vU.PLAYBACK_TOKEN,`${e}`)}get drmToken(){var e;return null!=(e=this.getAttribute(vU.DRM_TOKEN))?e:void 0}set drmToken(e){this.setAttribute(vU.DRM_TOKEN,`${e}`)}get thumbnailToken(){var e;return null!=(e=this.getAttribute(vU.THUMBNAIL_TOKEN))?e:void 0}set thumbnailToken(e){this.setAttribute(vU.THUMBNAIL_TOKEN,`${e}`)}get storyboardToken(){var e;return null!=(e=this.getAttribute(vU.STORYBOARD_TOKEN))?e:void 0}set storyboardToken(e){this.setAttribute(vU.STORYBOARD_TOKEN,`${e}`)}addTextTrack(e,t,i,a){var r;let n=null==(r=this.media)?void 0:r.nativeEl;if(n)return it(n,e,t,i,a)}removeTextTrack(e){var t;let i=null==(t=this.media)?void 0:t.nativeEl;if(i){let t;return void(null==(t=Array.prototype.find.call(i.querySelectorAll("track"),t=>t.track===e))||t.remove())}}get textTracks(){var e;return null==(e=this.media)?void 0:e.textTracks}get castReceiver(){var e;return null!=(e=this.getAttribute(vU.CAST_RECEIVER))?e:void 0}set castReceiver(e){e!==this.castReceiver&&(e?this.setAttribute(vU.CAST_RECEIVER,e):this.removeAttribute(vU.CAST_RECEIVER))}get castCustomData(){var e;return null==(e=this.media)?void 0:e.castCustomData}set castCustomData(e){if(!this.media)return void vd("underlying media element missing when trying to set castCustomData. castCustomData will not be set.");this.media.castCustomData=e}get noTooltips(){return this.hasAttribute(vU.NO_TOOLTIPS)}set noTooltips(e){if(!e)return void this.removeAttribute(vU.NO_TOOLTIPS);this.setAttribute(vU.NO_TOOLTIPS,"")}get proudlyDisplayMuxBadge(){return this.hasAttribute(vU.PROUDLY_DISPLAY_MUX_BADGE)}set proudlyDisplayMuxBadge(e){e?this.setAttribute(vU.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(vU.PROUDLY_DISPLAY_MUX_BADGE)}};function v7(e,t){return e.media?e.media.getAttribute(t):e.getAttribute(t)}vV=new WeakMap,vF=new WeakMap,vq=new WeakMap,v$=new WeakMap,vK=new WeakMap,vY=ne
3043w WeakMap,vG=new WeakSet,vj=function(){var e,t,i,a;if(!ml(this,vF)){mu(this,vF,!0),mc(this,vG,vz).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof p2.HTMLElement))throw""}catch{vd("<media-theme> failed to upgrade!")}try{if(customElements.upgrade(this.media),!(this.media instanceof cT))throw""}catch{vd("<mux-video> failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof r1))throw""}catch{vd("<media-controller> failed to upgrade!")}this.init(),mc(this,vG,vX).call(this),mc(this,vG,vJ).call(this),mc(this,vG,v0).call(this),mu(this,v$,null==(t=null==(e=this.mediaController)?void 0:e.hasAttribute(rn.USER_INACTIVE))||t),mc(this,vG,v1).call(this),null==(i=this.media)||i.addEventListener("streamtypechange",()=>mc(this,vG,vz).call(this)),null==(a=this.media)||a.addEventListener("loadstart",()=>mc(this,vG,vz).call(this))}},vQ=function(){var e,t;try{null==(e=null==window?void 0:window.CSS)||e.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),null==(t=null==window?void 0:window.CSS)||t.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch{}},vZ=function(e){Object.assign(ml(this,vY),e),mc(this,vG,vz).call(this)},vz=function(e={}){var t,i,a,r,n,s,o,l,d,u,c,h,m,p,E,b,f,g,_,y,T,A,k,w,S,I,R,C,D,L,M,O,N,x,P,U,B,W,H,V,F,q;let $,K;t={...ml(this,vY),...e},$={src:!this.playbackId&&this.src,playbackId:this.playbackId,hasSrc:!!this.playbackId||!!this.src||!!this.currentSrc,poster:this.poster,storyboard:this.storyboard,storyboardSrc:this.getAttribute(vU.STORYBOARD_SRC),placeholder:this.getAttribute("placeholder"),themeTemplate:function(e){var t,i;let a=e.theme;if(a){let r=null==(i=null==(t=e.getRootNode())?void 0:t.getElementById)?void 0:i.call(t,a);if(r&&r instanceof HTMLTemplateElement)return r;a.startsWith("media-theme-")||(a=`media-theme-${a}`);let n=p2.customElements.get(a);if(null!=n&&n.template)return n.template}}(this),thumbnailTime:!this.tokens.thumbnail&&this.thumbnailTime,autoplay:this.autoplay,crossOrigin:this.crossOrigin,loop:this.loop,noHotKeys:this.hasAttribute(vU.NOHOTKEYS),hotKeys:this.getAttribute(vU.HOTKEYS),muted:this.muted,paused:this.paused,preload:this.preload,envKey:this.envKey,preferCmcd:this.preferCmcd,debug:this.debug,disableTracking:this.disableTracking,disableCookies:this.disableCookies,tokens:this.tokens,beaconCollectionDomain:this.beaconCollectionDomain,maxResolution:this.maxResolution,minResolution:this.minResolution,programStartTime:this.programStartTime,programEndTime:this.programEndTime,assetStartTime:this.assetStartTime,assetEndTime:this.assetEndTime,renditionOrder:this.renditionOrder,metadata:this.metadata,playerInitTime:this.playerInitTime,playerSoftwareName:this.playerSoftwareName,playerSoftwareVersion:this.playerSoftwareVersion,startTime:this.startTime,preferPlayback:this.preferPlayback,audio:this.audio,defaultStreamType:this.defaultStreamType,targetLiveWindow:this.getAttribute(cb.TARGET_LIVE_WINDOW),streamType:vr(this.getAttribute(cb.STREAM_TYPE)),primaryColor:this.getAttribute(vU.PRIMARY_COLOR),secondaryColor:this.getAttribute(vU.SECONDARY_COLOR),accentColor:this.getAttribute(vU.ACCENT_COLOR),forwardSeekOffset:this.forwardSeekOffset,backwardSeekOffset:this.backwardSeekOffset,defaultHiddenCaptions:this.defaultHiddenCaptions,defaultDuration:this.defaultDuration,defaultShowRemainingTime:this.defaultShowRemainingTime,hideDuration:(K=null==(r=this.mediaController)?void 0:r.querySelector("media-time-display"))&&"none"===getComputedStyle(K).getPropertyValue("--media-duration-display-display").trim(),playbackRates:this.getAttribute(vU.PLAYBACK_RATES),customDomain:null!=(i=this.getAttribute(cb.CUSTOM_DOMAIN))?i:void 0,title:this.getAttribute(vU.TITLE),videoTitle:null!=(a=this.getAttribute(vU.VIDEO_TITLE))?a:this.getAttribute(vU.TITLE),novolumepref:this.hasAttribute(vU.NO_VOLUME_PREF),castReceiver:this.castReceiver,proudlyDisplayMuxBadge:this.hasAttribute(vU.PROUDLY_DISPLAY_MUX_BADGE),...t,extraSourceParams:this.extraSourceParams},n=vI`
3044  <style>
3045    ${(e=>{let{tokens:t}=e;return t.drm?":host { --_cast-button-drm-display: none; }":""})($)}
3046    ${vg}
3047  </style>
3048  ${o=$,vI`
3049  <media-theme
3050    template="${o.themeTemplate||!1}"
3051    defaultstreamtype="${null!=(l=o.defaultStreamType)&&l}"
3052    hotkeys="${(e=>{let t=e.hotKeys?`${e.hotKeys}`:"";return"live"===vr(e.streamType)&&(t+=" noarrowleft noarrowright"),t})(o)||!1}"
3053    nohotkeys="${o.noHotKeys||!o.hasSrc||!1}"
3054    noautoseektolive="${!!(null!=(d=o.streamType)&&d.includes(tH.LIVE))&&0!==o.targetLiveWindow}"
3055    novolumepref="${o.novolumepref||!1}"
3056    disabled="${!o.hasSrc||o.isDialogOpen}"
3057    audio="${null!=(u=o.audio)&&u}"
3058    style="${null!=(c=function(e){let t="";return Object.entries(e).forEach(([e,i])=>{null!=i&&(t+=`${p4(e)}: ${i}; `)}),t?t.trim():void 0}({"--media-primary-color":o.primaryColor,"--media-secondary-color":o.secondaryColor,"--media-accent-color":o.accentColor}))&&c}"
3059    defaultsubtitles="${!o.defaultHiddenCaptions}"
3060    forwardseekoffset="${null!=(h=o.forwardSeekOffset)&&h}"
3061    backwardseekoffset="${null!=(m=o.backwardSeekOffset)&&m}"
3062    playbackrates="${null!=(p=o.playbackRates)&&p}"
3063    defaultshowremainingtime="${null!=(E=o.defaultShowRemainingTime)&&E}"
3064    defaultduration="${null!=(b=o.defaultDuration)&&b}"
3065    hideduration="${null!=(f=o.hideDuration)&&f}"
3066    title="${null!=(g=o.title)&&g}"
3067    videotitle="${null!=(_=o.videoTitle)&&_}"
3068    proudlydisplaymuxbadge="${null!=(y=o.proudlyDisplayMuxBadge)&&y}"
3069    exportparts="${vR}"
3070    onclose="${o.onCloseErrorDialog}"
3071    onfocusin="${o.onFocusInErrorDialog}"
3072  >
3073    <mux-video
3074      slot="media"
3075      target-live-window="${null!=(T=o.targetLiveWindow)&&T}"
3076      stream-type="${null!=(A=vr(o.streamType))&&A}"
3077      crossorigin="${null!=(k=o.crossOrigin)?k:""}"
3078      playsinline
3079      autoplay="${null!=(w=o.autoplay)&&w}"
3080      muted="${null!=(S=o.muted)&&S}"
3081      loop="${null!=(I=o.loop)&&I}"
3082      preload="${null!=(R=o.preload)&&R}"
3083      debug="${null!=(C=o.debug)&&C}"
3084      prefer-cmcd="${null!=(D=o.preferCmcd)&&D}"
3085      disable-tracking="${null!=(L=o.disableTracking)&&L}"
3086      disable-cookies="${null!=(M=o.disableCookies)&&M}"
3087      prefer-playback="${null!=(O=o.preferPlayback)&&O}"
3088      start-time="${null!=o.startTime&&o.startTime}"
3089      beacon-collection-domain="${null!=(N=o.beaconCollectionDomain)&&N}"
3090      player-init-time="${null!=(x=o.playerInitTime)&&x}"
3091      player-software-name="${null!=(P=o.playerSoftwareName)&&P}"
3092      player-software-version="${null!=(U=o.playerSoftwareVersion)&&U}"
3093      env-key="${null!=(B=o.envKey)&&B}"
3094      custom-domain="${null!=(W=o.customDomain)&&W}"
3095      src="${o.src?o.src:!!o.playbackId&&iH(o)}"
3096      cast-src="${o.src?o.src:!!o.playbackId&&iH(o)}"
3097      cast-receiver="${null!=(H=o.castReceiver)&&H}"
3098      drm-token="${null!=(F=null==(V=o.tokens)?void 0:V.drm)&&F}"
3099      exportparts="video"
3100    >
3101      ${o.storyboard?vI`<track label="thumbnails" default kind="metadata" src="${o.storyboard}" />`:vI``}
3102      <slot></slot>
3103    </mux-video>
3104    <slot name="poster" slot="poster">
3105      <media-poster-image
3106        part="poster"
3107        exportparts="poster, img"
3108        src="${!!o.poster&&o.poster}"
3109        placeholdersrc="${null!=(q=o.placeholder)&&q}"
3110      ></media-poster-image>
3111    </slot>
3112  </media-theme>
3113`}
3114`,s=this.shadowRoot,n.renderInto(s)},vX=function(){let e=e=>{var t,i;if(!(null!=e&&e.startsWith("theme-")))return;let a=e.replace(/^theme-/,"");if(vB.includes(a))return;let r=this.getAttribute(e);null!=r?null==(t=this.mediaTheme)||t.setAttribute(a,r):null==(i=this.mediaTheme)||i.removeAttribute(a)};new MutationObserver(t=>{for(let{attributeName:i}of t)e(i)}).observe(this,{attributes:!0}),this.getAttributeNames().forEach(e)},vJ=function(){var e;let t=e=>{let{detail:t}=e;if(t instanceof tU||(t=new tU(t.message,t.code,t.fatal)),!(null!=t&&t.fatal)){vl(t),t.data&&vl(`${t.name} data:`,t.data);return}let i=vD(t,!1);i.message&&vu(i),vd(t),t.data&&vd(`${t.name} data:`,t.data),mc(this,vG,vZ).call(this,{isDialogOpen:!0})};this.addEventListener("error",t),this.media&&(this.media.errorTranslator=(e={})=>{var t,i,a;if(!((null==(t=this.media)?void 0:t.error)instanceof tU))return e;let r=vD(null==(i=this.media)?void 0:i.error,!1);return{player_error_code:null==(a=this.media)?void 0:a.error.code,player_error_message:r.message?String(r.message):e.player_error_message,player_error_context:r.context?String(r.context):e.player_error_context}}),null==(e=this.media)||e.addEventListener("error",e=>{var t,i;let{detail:a}=e;if(!a){let{message:e,code:r}=null!=(i=null==(t=this.media)?void 0:t.error)?i:{};a=new tU(e,r)}null!=a&&a.fatal&&this.dispatchEvent(new CustomEvent("error",{detail:a}))})},v0=function(){var e,t,i,a;let r=()=>mc(this,vG,vz).call(this);null==(t=null==(e=this.media)?void 0:e.textTracks)||t.addEventListener("addtrack",r),null==(a=null==(i=this.media)?void 0:i.textTracks)||a.addEventListener("removetrack",r)},v1=function(){var e,t;if(!/Firefox/i.test(navigator.userAgent))return;let i,a=new WeakMap,r=()=>this.streamType===tH.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,n=(e,t,i=!1)=>
3114{r()||Array.from(e&&e.activeCues||[]).forEach(e=>{if(!(!e.snapToLines||e.line<-5||e.line>=0&&e.line<10))if(!t||this.paused){let t=e.text.split(`
3115`).length,r=-3;this.streamType===tH.LIVE&&(r=-2);let n=r-t;if(e.line===n&&!i)return;a.has(e)||a.set(e,e.line),e.line=n}else setTimeout(()=>{e.line=a.get(e)||"auto"},500)})},s=()=>{var e,t;n(i,null!=(t=null==(e=this.mediaController)?void 0:e.hasAttribute(rn.USER_INACTIVE))&&t)},o=()=>{var e,t;let a=Array.from((null==(t=null==(e=this.mediaController)?void 0:e.media)?void 0:t.textTracks)||[]).filter(e=>["subtitles","captions"].includes(e.kind)&&"showing"===e.mode)[0];a!==i&&(null==i||i.removeEventListener("cuechange",s)),null==(i=a)||i.addEventListener("cuechange",s),n(i,ml(this,v$))};o(),null==(e=this.textTracks)||e.addEventListener("change",o),null==(t=this.textTracks)||t.addEventListener("addtrack",o),this.addEventListener("userinactivechange",()=>{var e,t;let a=null==(t=null==(e=this.mediaController)?void 0:e.hasAttribute(rn.USER_INACTIVE))||t;ml(this,v$)!==a&&(mu(this,v$,a),n(i,ml(this,v$)))})},p2.customElements.get("mux-player")||(p2.customElements.define("mux-player",v6),p2.MuxPlayerElement=v6);var Ee=parseInt(n.version)>=19,Et={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},Ei=Object.prototype.hasOwnProperty,Ea=(e,t,i)=>!((e,t)=>{if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(Array.isArray(e))return!!Array.isArray(t)&&e.length===t.length&&e.some((e,i)=>t[i]===e);let i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(let a=0;a<i.length;a++)if(!Ei.call(t,i[a])||!Object.is(e[i[a]],t[i[a]]))return!1;return!0})(t,e[i]),Er=(e,t,i)=>{e[i]=t},En=(e,t,i,a=Er,r=Ea)=>(0,n.useEffect)(()=>{let n=null==i?void 0:i.current;n&&r(n,t,e)&&a(n,t,e)},[null==i?void 0:i.current,t]),Es=(()=>{try{return"3.4.0"}catch{}return"UNKNOWN"})(),Eo=n.forwardRef(({children:e,...t},i)=>n.createElement("mux-player",((e={})=>Object.entries(e).reduce((e,[t,i])=>{let a=((e,t)=>{if(!(!Ee&&"boolean"==typeof t&&!t)){if(((e,t)=>null!=t&&e in t)(e,Et))return Et[e];if(void 0!==t)return/[A-Z]/.test(e)?e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`):e}})(t,i);if(!a)return e;let r=((e,t)=>Ee||"boolean"!=typeof e?e:"")(i,0);return e[a]=r,e},{}))({...t,ref:i}),e)),El=(e,t,i)=>(0,n.useEffect)(()=>{let a=null==t?void 0:t.current;if(!(!a||!i))return a.addEventListener(e,i),()=>{a.removeEventListener(e,i)}},[null==t?void 0:t.current,i]),Ed=Es,Eu="mux-player-react",Ec=n.forwardRef((e,t)=>{var i;let a=(0,n.useRef)(null),r=((...e)=>{let t=(0,n.useRef)(null);return(0,n.useEffect)(()=>{e.forEach(e=>{e&&("function"==typeof e?e(t.current):e.current=t.current)})},[e]),t})(a,t),[s]=((e,t)=>{let{onAbort:i,onCanPlay:a,onCanPlayThrough:r,onEmptied:n,onLoadStart:s,onLoadedData:o,onLoadedMetadata:l,onProgress:d,onDurationChange:u,onVolumeChange:c,onRateChange:h,onResize:m,onWaiting:p,onPlay:E,onPlaying:b,onTimeUpdate:f,onPause:g,onSeeking:_,onSeeked:y,onStalled:T,onSuspend:A,onEnded:k,onError:w,onCuePointChange:S,onCuePointsChange:I,onChapterChange:R,metadata:C,tokens:D,paused:L,playbackId:M,playbackRates:O,currentTime:N,themeProps:x,extraSourceParams:P,castCustomData:U,_hlsConfig:B,...W}=t;return En("playbackRates",O,e),En("metadata",C,e),En("extraSourceParams",P,e),En("_hlsConfig",B,e),En("themeProps",x,e),En("tokens",D,e),En("playbackId",M,e),En("castCustomData",U,e),En("paused",L,e,(e,t)=>{null!=t&&(t?e.pause():e.play())},(e,t,i)=>(!e.hasAttribute("autoplay")||!!e.hasPlayed)&&Ea(e,t,i)),En("currentTime",N,e,(e,t)=>{null!=t&&(e.currentTime=t)}),El("abort",e,i),El("canplay",e,a),El("canplaythrough",e,r),El("emptied",e,n),El("loadstart",e,s),El("loadeddata",e,o),El("loadedmetadata",e,l),El("progress",e,d),El("durationchange",e,u),El("volumechange",e,c),El("ratechange",e,h),El("resize",e,m),El("waiting",e,p),El("play",e,E),El("playing",e,b),El("timeupdate",e,f),El("pause",e,g),El("seeking",e,_),El("seeked",e,y),El("stalled",e,T),El("suspend",e,A),El("ended",e,k),El("error",e,w),El("cuepointchange",e,S),El("cuepointschange",e,I),El("chapterchange",e,R),[W]}
3115)(a,e),[o]=(0,n.useState)(null!=(i=e.playerInitTime)?i:iB());return n.createElement(Eo,{ref:r,defaultHiddenCaptions:e.defaultHiddenCaptions,playerSoftwareName:Eu,playerSoftwareVersion:Ed,playerInitTime:o,...s})})}}]);

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.