PageSourceSearch

https://whitehornes.co.uk/_next/static/chunks/reactPlayerMux.cf5b809fd4a1960a.js

js whitehornes.co.uk collected 2026-10-01 02:46:42 UTC 495,405 bytes, 3,155 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2723],{34547:(e,t,i)=>{let a,r,n;i.r(t),i.d(t,{MaxResolution:()=>tQ,MediaError:()=>tW,MinResolution:()=>tZ,RenditionOrder:()=>tz,default:()=>vu,generatePlayerInitTime:()=>iG,playerSoftwareName:()=>vd,playerSoftwareVersion:()=>vl});var s=i(63276),o=Object.create,l=Object.defineProperty,d=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,c=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,p=function(e,t){return function(){return e&&(t=e(e=0)),t}},v=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},E=function(e,t,i,a){if(t&&"object"==typeof t||"function"==typeof t)for(var r,n=u(t),s=0,o=n.length;s<o;s++)r=n[s],h.call(e,r)||r===i||l(e,r,{get:(function(e){return t[e]}).bind(null,r),enumerable:!(a=d(t,r))||a.enumerable});return e},b=function(e,t,i){return i=null!=e?o(c(e)):{},E(!t&&e&&e.__esModule?i:l(i,"default",{value:e,enumerable:!0}),e)},g=v(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 _=p(function(){_()});function y(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var T=p(function(){}),A=v(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))}}}),k=v(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}_(),t.exports=i,i.prototype.nodeType=8,i.prototype.nodeName="#comment",i.prototype.toString=function(){return"[object Comment]"}}),w=v(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}_(),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}}),S=v(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)}}),I=v(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)}}),R=v(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)}}}),D=v(function(e,t){T(),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=y(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(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=v(function(e,t){_();var i=A(),a=S(),r=I(),n=R(),s=D(),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={}
1,"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}}),L=v(function(e,t){_();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("")}}),M=v(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(){}}),O=v(function(e,t){_();var i=A(),a=k(),r=w(),n=C(),s=L(),o=M(),l=S(),d=I(),u=R();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}),x=v(function(e,t){t.exports=new(O())}),N=v(function(e,t){var i,a="undefined"!=typeof global?global:"undefined"!=typeof window?window:{},r=x();"undefined"!=typeof document?i=document:(i=a["__GLOBAL_DOCUMENT_CACHE@4"])||(i=a["__GLOBAL_DOCUMENT_CACHE@4"]=r),t.exp
1orts=i});function P(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 U(e,t){if(e){if("string"==typeof e)return P(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 P(e,t)}}function B(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)||U(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 H=b(g()),W=b(g()),V=b(g()),F={now:function(){var e=V.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())}},$=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=F.now(),o=null==s?void 0:s.toString(16).substring(3);return o?t.substring(0,28)+o:t},K=function(){return("000000"+(0x81bf1000*Math.random()|0).toString(36)).slice(-6)},q=function(e){var t;if(e&&void 0!==e.nodeName)return e.muxId||(e.muxId=K()),e.muxId;try{t=document.querySelector(e)}catch(e){}return t&&!t.muxId&&(t.muxId=e),(null==t?void 0:t.muxId)||e},Y=function(e){e&&void 0!==e.nodeName?e=q(t=e):t=document.querySelector(e);var t,i=t&&t.nodeName?t.nodeName.toLowerCase():"";return[t,e,i]};function G(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||U(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 j={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4},Q=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,G(o)),d=(i=console.info).bind.apply(i,G(o)),u=(a=console.debug).bind.apply(a,G(o)),c=(r=console.warn).bind.apply(r,G(o)),h=(n=console.error).bind.apply(n,G(o)),p=s;return{trace:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(p>j.TRACE))return l.apply(void 0,G(t))},debug:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(p>j.DEBUG))return u.apply(void 0,G(t))},info:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(p>j.INFO))return d.apply(void 0,G(t))},warn:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(p>j.WARN))return c.apply(void 0,G(t))},error:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(p>j.ERROR))return h.apply(void 0,G(t))},get level(){return p},set level(m){m!==this.level&&(p=null!=m?m:s)}}}("[mux]"),Z=b(g());function z(){return"1"===(Z.default.doNotTrack||Z.default.navigator&&Z.default.navigator.doNotTrack)}function X(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function J(e,t){if(!f(e,t))throw TypeError("Cannot call a class as a function")}function ee(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 et(e,t,i){return t&&ee(e.prototype,t),i&&ee(e,i),e}function ei(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}
1function ea(e){return(ea=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function er(e,t,i){return(er="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=ea(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 en(e,t){return(en=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}_(),T();var es=function(e){return eo(e)[0]},eo=function(e){if("string"!=typeof e||""===e)return["localhost"];var t,i=(e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/)||[])[4];return i&&(t=(i.match(/[^\.]+\.[^\.]+$/)||[])[0]),[i,t]},el=b(g()),ed={exists:function(){var e=el.default.performance;return void 0!==(e&&e.timing)},domContentLoadedEventEnd:function(){var e=el.default.performance,t=e&&e.timing;return t&&t.domContentLoadedEventEnd},navigationStart:function(){var e=el.default.performance,t=e&&e.timing;return t&&t.navigationStart}};function eu(e,t,i){i=void 0===i?1:i,e[t]=e[t]||0,e[t]+=i}function ec(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){ei(e,t,i[t])})}return e}function eh(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 em=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],ep=["x-cdn","content-type"].concat(em);function ev(e){var t={};return(e=e||"").trim().split(/[\r\n]+/).forEach(function(e){if(e){var i=e.split(": "),a=i.shift();a&&(ep.indexOf(a.toLowerCase())>=0||0===a.toLowerCase().indexOf("x-litix-"))&&(t[a]=i.join(": "))}}),t}function eE(e){if(e){var t=em.find(function(t){return void 0!==e[t]});return t?e[t]:void 0}}var eb=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},eg=function(e){if(!e)return{};var t=ed.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 ev(e.getAllResponseHeaders())},e_=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(!ed.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=eg(n),h=c.bytesLoaded,p=c.requestStart,v=c.responseStart,E=c.responseEnd;o("requestcompleted",eh(ec({},eb(l)),{request_event_type:e,request_bytes_loaded:h,request_start:p,request_response_start:v,request_response_end:E,request_type:"manifest",request_hostname:es(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=eg(t.stats),d=l.bytesLoaded,u=l.requestStart,c=l.responseStart,h=l.responseEnd,p=i.fragments[i.fragments.length-1],v=s(p)+n(p.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:es(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(v)?void 0:v})};i.on(a.Events.LEVEL_LOADED,d);var u=function(e,t){var i=t.details,a=t.networkDetails,r=eg(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:es(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=eg(a=a||n.stats),l=s.bytesLoaded,d=s.requestStart,u=s.responseStart,c=s.responseEnd,h=r?ef(r):void 0,p={request_event_type:e,request_bytes_loaded:l,request_start:d,request_response_start:u,request_response_end:c,request_hostname:r?es(r.responseURL):void 0,request_id:h?eE(h):void 0,request_response_headers:h,request_media_duration:n.duration,request_url:null==r?void 0:r.responseURL};"main"===n.type?(p.request_type="media",p.request_current_level=n.level,p.request_video_width=(i.levels[n.level]||{}).width,p.request_video_height=(i.levels[n.level]||{}).height,p.request_labeled_bitrate=(i.levels[n.level]||{}).bitrate):p.request_type=n.type,o("requestcompleted",p)};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 p=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:es(c),request_id:h?eE(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,p);var v=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:es(a)})};i.on(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,v);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,p),i.off(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,v),i.off(a.Events.LEVEL_SWITCHED,E),i.off(a.Events.DESTROYING,i._stopMuxMonitor),delete i._stopMuxMonitor},i.on(a.Events.DESTROYING,i._stopMuxMonitor)},ey=function(e){e&&"function"==typeof e._stopMuxMonitor&&e._stopMuxMonitor()},eT=function(e,t){if(!e||!e.requestEndDate)return{};var i,a=es(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=ev(u[u.length-1]._responseHeaders||""));var c=i?eE(i):void 0;return{requestStart:s,requestResponseStart:o,requestResponseEnd:l,requestBytesLoaded:n,requestResponseHeaders:i,requestMediaDuration:d,requestHostname:a,requestUrl:r,requestId:c}},eA=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}:{}},ek=function(e){var t;return null==(t=e.match(/.*codecs\*?="(.*)"/))?void 0:t[1]},ew=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}},eS=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=ew(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:es(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=eT(r,i),h=c.requestStart,p=c.requestResponseStart,v=c.requestResponseEnd,E=c.requestResponseHeaders,b=c.requestMediaDuration,g=c.requestHostname,f=c.requestUrl;n("requestcompleted",{request_event_type:t,request_start:h,request_response_start:p,request_response_end:v,request_bytes_loaded:-1,request_type:l+"_init",request_response_headers:E,request_hostname:g,request_id:c.requestId,request_url:f,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=eT(r,i),c=u.requestStart,h=u.requestResponseStart,p=u.requestResponseEnd,v=u.requestBytesLoaded,E=u.requestResponseHeaders,b=u.requestMediaDuration,g=u.requestHostname,f=u.requestUrl,_=u.requestId,y=eA(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:p,request_bytes_loaded:v,request_type:d,request_response_headers:E,request_hostname:g,request_id:_,request_url:f,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:ek(c.video.codec)}}},p=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]=eh(ec({},o),{codec:i.getCurrentTrackFor(s).codec});var l=h();l&&n("renditionchange",l)}};i.on("qualityChangeRendered",p);var v=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:es(t.url)})};i.on("fragmentLoadingAbandoned",v);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:es(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",p),i.off("error",E),i.off("fragmentLoadingAbandoned",v),delete i._stopMuxMonitor}},eI=function(e){e&&"function"==typeof e._stopMuxMonitor&&e._stopMuxMonitor()},eR=0,eD=function(){function e(){J(this,e),ei(this,"_listeners",void 0)}return et(e,[{key:"on",value:function(e,t,i){return t._eventEmitterGuid=t._eventEmitterGuid||++eR,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||++eR;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"+e]||[],r=this._listeners["before*"]||[],n=this._listeners[e]||[],s=this._listeners["after"+e]||[],o=function(t,a){(t=t.slice()).forEach(function(t){t.call(i,{type:e},a)})};o(a,t),o(r,t),o(n,t),o(s,t)}}}]),e}(),eC=b(g()),eL=function(){function e(t){var i=this;J(this,e),ei(this,"_playbackHeartbeatInterval",void 0),ei(this,"_playheadShouldBeProgressing",void 0),ei(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 et(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}(),eM=function e(t){var i=this;J(this,e),ei(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})},eO=function(){function e(t){J(this,e),ei(this,"_watchTimeTrackerLastCheckedTime",void 0),ei(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 et(e,[{key:"_updateWatchTime",value:function(e,t){var i=t.viewer_time;null===this._watchTimeTrackerLastCheckedTime&&(this._watchTimeTrackerLastCheckedTime=i),eu(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}(),ex=function(){function e(t){var i=this;J(this,e),ei(this,"_playbackTimeTrackerLastPlayheadPosition",void 0),ei(this,"_lastTime",void 0),ei(this,"_isAdPlaying",void 0),ei(this,"_callbackUpdatePlaybackTime",void 0),ei(this,"pm",void 0),this.pm=t,this._playbackTimeTrackerLastPlayheadPosition=-1,this._lastTime=F.now(),this._isAdPlaying=!1,this._callbackUpdatePlaybackTime=null,t.on("viewinit",function(){i.pm.data.view_playing_time_ms_cumulative=0});var a=this._startPlaybackTimeTracking.bind(this);t.on("playing",a),t.on("adplaying",a),t.on("seeked",a),t.on("rebufferend",a);var r=this._stopPlaybackTimeTracking.bind(this);t.on("playbackheartbeatend",r),t.on("seeking",r),t.on("rebufferstart",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=F.now(),i._isAdPlaying=!1,i._callbackUpdatePlaybackTime=null})}return et(e,[{key:"_startPlaybackTimeTracking",value:function(){null===this._callbackUpdatePlaybackTime&&(this._callbackUpdatePlaybackTime=this._updatePlaybackTime.bind(this),this._playbackTimeTrackerLastPlayheadPosition=this.pm.data.player_playhead_time,this._lastTime=F.now(),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||0,t=F.now(),i=t-this._lastTime,a=-1;this._playbackTimeTrackerLastPlayheadPosition>=0&&e>this._playbackTimeTrackerLastPlayheadPosition?a=e-this._playbackTimeTrackerLastPlayheadPosition:this._isAdPlaying&&(a=i),a>0&&a<=1e3&&eu(this.pm.data,"view_content_playback_time",a),null!==this._callbackUpdatePlaybackTime&&i>0&&i<=1e3&&(this._isAdPlaying&&eu(this.pm.data,"ad_playing_time_ms_cumulative",i),eu(this.pm.data,"view_playing_time_ms_cumulative",i)),this._playbackTimeTrackerLastPlayheadPosition=e,this._lastTime=t}}]),e}(),eN=function(){function e(t){J(this,e),ei(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 et(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}(),eP=function e(t){if(J(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;eu(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||(eu(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)})}},eU=function(){function e(t){var i=this;J(this,e),ei(this,"_lastCheckedTime",void 0),ei(this,"_lastPlayheadTime",void 0),ei(this,"_lastPlayheadTimeUpdatedTime",void 0),ei(this,"_rebuffering",void 0),ei(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:F.now()})}))}return et(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}(),eB=function(){function e(t){var i=this;J(this,e),ei(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||F.now(),a):"adplaying"===e.type&&(void 0===t.data.view_time_to_first_frame||i._inPrerollPosition())&&i.calculateTimeToFirstFrame(n||F.now(),a)};t.one("playing",r),t.one("adplaying",r),t.one("viewend",function(){t.off("playing",r),t.off("adplaying",r)})}})}return et(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.pm.pageLoadInitTime&&(this.pm.data.view_aggregate_startup_time=this.pm.data.view_start+this.pm.data.view_watch_time-this.pm.pageLoadInitTime))}}]),e}(),eH=function e(t){var i=this;J(this,e),ei(this,"_lastPlayerHeight",void 0),ei(this,"_lastPlayerWidth",void 0),ei(this,"_lastPlayheadPosition",void 0),ei(this,"_lastSourceHeight",void 0),ei(this,"_lastSourceWidth",void 0),t.on("viewinit",function(){i._lastPlayheadPosition=-1}),["pause","rebufferstart","seeking","error","adbreakstart","hb","renditionchange","orientationchange","viewend","playbackmodechange"].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),eu(t.data,"view_total_content_playback_time",e),eu(t.data,"view_total_upscaling",r*e),eu(t.data,"view_total_downscaling",n*e)}i._lastPlayheadPosition=-1})}),["playing","hb","renditionchange","orientationchange","playbackmodechange"].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){var i=this;J(this,e),ei(this,"isSeeking",void 0),this.isSeeking=!1;var a=-1,r=function(){var e=F.now(),r=(t.data.viewer_time||e)-(a||e);eu(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,eu(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})},eV=function(e,t){e.push(t),e.sort(function(e,t){return e.viewer_time-t.viewer_time})},eF=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],e$=function(){function e(t){var i=this;J(this,e),ei(this,"_adHasPlayed",void 0),ei(this,"_adRequests",void 0),ei(this,"_adResponses",void 0),ei(this,"_currentAdRequestNumber",void 0),ei(this,"_currentAdResponseNumber",void 0),ei(this,"_prerollPlayTime",void 0),ei(this,"_wouldBeNewAdPlay",void 0),ei(this,"isAdBreak",void 0),ei(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}),eF.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),eV(i._adRequests,a),eu(t.data,"view_ad_request_count"),i.inPrerollPosition()&&(t.data.view_preroll_requested=!0,i._adHasPlayed||eu(t.data,"view_preroll_request_count"))}),t.on("adresponse",function(e,a){a=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdResponseNumber++},a),eV(i._adResponses,a);var r=i.findAdRequest(a.ad_request_id);r&&eu(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._wouldBeNe
1wAdPlay=!1,eu(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||eu(t.data,"view_ad_clicked_count")}),t.on("adskipped",function(e,a){i._wouldBeNewAdPlay||eu(t.data,"view_ad_skipped_count")}),t.on("adended",function(){i._wouldBeNewAdPlay=!0}),t.on("aderror",function(){i._wouldBeNewAdPlay=!0})}return et(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=B(eo(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=B(eo(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_type="preroll"}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,null!=t&&t.ad_type&&(this.pm.data.ad_type=null==t?void 0:t.ad_type)}}]),e}(),eK=function e(t){var i=this;J(this,e),ei(this,"lastWallClockTime",void 0);var a=function(){i.lastWallClockTime=F.now(),t.on("before*",r)},r=function(e){var a=F.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)})},eq=b(g()),eY=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,decodeURIComponent),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 p=c[0].replace(d,decodeURIComponent);if(h=i.read?i.read(h,p):i(h,p)||h.replace(d,decodeURIComponent),this.json)try{h=JSON.parse(h)}catch(e){}if(t===p){s=h;break}t||(s[p]=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(){})}(),eG="muxData",ej=function(){var e;try{e=(eY.get(eG)||"").split("&").reduce(function(e,t){var i=B(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},eQ=function(e){try{eY.set(eG,Object.entries(e).map(function(e){var t=B(e,2),i=t[0],a=t[1];return"".concat(i,"=").concat(a)}).join("&"),{expires:365})}catch(e){}},eZ=function(){var e=ej();return e.mux_viewer_id=e.mux_viewer_id||$(),e.msn=e.msn||Math.random(),eQ(e),{mux_viewer_id:e.mux_viewer_id,mux_sample_number:e.msn}},ez=function(){var e=ej(),t=F.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=$(),e.sst=t),e.sex=t+15e5,eQ(e),{session_id:e.sid,session_start:e.sst,session_expires:e.sex}},eX=b(g()),eJ=function(){var e;switch(e0()){case"cellular":e="cellular";break;case"ethernet":e="wired";break;case"wifi":e="wifi";break;case void 0:break;default:e="other"}return e},e0=function(){var e=eX.default.navigator,t=e&&(e.connection||e.mozConnection||e.webkitConnection);return t&&t.type};eJ.getConnectionFromAPI=e0;var e1=e3({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"}),e2=e3({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",cm:"cmcd",cn:"config",co:"count",ce:"counter",cp:"complete",cq:"creator",cr:"creative",cs:"captions",ct:"content",cu:"current",cv:"cumulative",cx:"c
1onnection",cz:"context",da:"data",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",mp:"mode",ms:"ms",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",pv:"previous",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 e3(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[e[i]]=i);return t}function e4(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=e1[s];o||(Q.info("Data key word `"+n[0]+"` not expected in "+a),o=s+"_"),n.splice(1).forEach(function(e){"url"===e&&(r=!0),e2[e]?o+=e2[e]:Number.isInteger(Number(e))?o+=e:(Q.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 e5=b(g()),e9=b(N()),e8={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},e6=["hb","requestcompleted","requestfailed","requestcanceled"],e7=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({},e8,t)};e7.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)},e7.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()},e7.prototype.destroy=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.destroyed=!0,e?this._clearBeaconQueue():this.flushEvents(),e5.default.clearTimeout(this._sendTimeout)},e7.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],e4({mux_view_message:"event queue truncated"}));var i=this._createPayload(t);tt(this._beaconUrl,i,!0,function(){})},e7.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=F.now();tt(this._beaconUrl,i,!1,function(i,r){r?(e._eventQueue=t.concat(e._eventQueue),e._failureCount+=1,Q.info("Error sending beacon: "+r)):e._failureCount=0,e._roundTripTime=F.now()-a,e._postInFlight=!1,e._resendAfterPost&&(e._resendAfterPost=!1,e._eventQueue.length>0&&e._sendBeaconQueue())})},e7.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},e7.prototype._startBeaconSending=function(){var e=this;e5.default.clearTimeout(this._sendTimeout),this.destroyed||(this._sendTimeout=e5.default.setTimeout(function(){e._eventQueue.length&&e._sendBeaconQueue(),e._startBeaconSending()},this._getNextBeaconTime()))},e7.prototype._createPayload=function(e){var t=this,i={transmission_timestamp:Math.round(F.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()||(Q.info("Payload size is too big ("+n+" kb). Removing unnecessary events."),r=e.filter(function(e){return -1===e6.indexOf(e.e)}),s()),o()||(Q.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 te="function"==typeof e9.default.exitPictureInPicture?function(e){return e.length<=57344}:function(e){return!1},tt=function(e,t,i,a){if(i&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(e,t))return void a();if(e5.default.fetch)return void e5.default.fetch(e,{method:"POST",body:t,headers:{"Content-Type":"text/plain"},keepalive:te(t)}).then(function(e){return a(null,e.ok?null:"Error")}).catch(function(e){return a(null,e)});if(e5.default.XMLHttpRequest){var r=new e5.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()},ti=["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","view_playing_time_ms_cumulative","ad_playing_time_ms_cumulative"],ta=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],tr=["ad_id","ad_creative_id","ad_universal_id"],tn=["viewstart","error","ended","viewend"],ts=function(){function e(t,i){var a,r,n,s,o,l,d,u,c,h,p,v,E,b,g,f,_,y,T,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};J(this,e),ei(this,"mux",void 0),ei(this,"envKey",void 0),ei(this,"options",void 0),ei(this,"eventQueue",void 0),ei(this,"sampleRate",void 0),ei(this,"disableCookies",void 0),ei(this,"respectDoNotTrack",void 0),ei(this,"previousBeaconData",void 0),ei(this,"lastEventTime",void 0),ei(this,"rateLimited",void 0),ei(this,"pageLevelData",void 0),ei(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 e7((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==(p=this.options.platform)||null==(h=p.os)?void 0:h.family,viewer_os_architecture:null==(E=this.options.platform)||null==(v=E.os)?void 0:v.architecture,viewer_os_version:null==(g=this.options.platform)||null==(b=g.os)?void 0:b.version,viewer_connection_type:eJ(),page_url:null===eq.default||void 0===eq.default||null==(f=eq.default.location)?void 0:f.href},this.viewerData=this.disableCookies?{}:eZ()}return et(e,[{key:"send",value:function(e,t){if(!(!e||!(null!=t&&t.view_id))){if(this.respectDoNotTrack&&z())return Q.info("Not sending `"+e+"` because Do Not Track is enabled");if(!t||"object"!=typeof t)return Q.error("A data object was expected in send() but was not provided");var i=this.disableCookies?{}:ez(),a=eh(ec({},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=e4(this._deduplicateBeaconData(e,a));if(this.lastEventTime=this.mux.utils.now(),n)return Q.info("Not sending event due to sample rate restriction",e,a,s);if(this.envKey||Q.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(Q.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);else if(tn.indexOf(e)>=0){if("error"===e&&"warning"===t.player_error_severity)return;this.eventQueue.flushEvents()}if(this.rateLimited)return a.event="eventrateexceeded",s=e4(a),this.eventQueue.queueEvent(a.event,s),Q.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=ec({},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=B(t,2),s=r[0],o=r[1];i.previousBeaconData&&(o!==i.previousBeaconData[s]||ti.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_")||tr.includes(t)&&ta.includes(e))}}]),e}(),to=function e(t){J(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,p=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&&p&&p>0){var v=p/d*8e3;s++,a+=p,r+=d,t.data.view_min_request_throughput=Math.min(t.data.view_min_request_throughput||1/0,v),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})},tl=function e(t){var i=this;J(this,e),ei(this,"_lastEventTime",void 0),t.on("before*",function(e,a){var r=a.viewer_time,n=F.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,ei({},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}))}})};function td(e,t){return(null==e?void 0:e.toLowerCase())===(null==t?void 0:t.toLowerCase())}var tu,tc=function e(t){J(this,e);var i=function(e){var i,a,r,o=null!=(i=e)&&i.request_type&&("media"===i.request_type||"video"===i.request_type)&&null!=(a=i.request_response_headers)&&a["x-cdn"]?i.request_response_headers["x-cdn"]:null!=i&&i.video_cdn?i.video_cdn:null,l=null!=(r=e)&&r.request_start?r.request_start:null!=r&&r.viewer_time?r.viewer_time:Date.now();null!=o&&!td(o,n)&&s<=l&&(n=o,s=l,t.emit("cdnchange",{video_cdn:o}))},a=null,r=null,n=null,s=0;
1t.on("viewinit",function(){a=null,r=null,n=null,s=0}),t.on("beforecdnchange",function(e,t){var i=null==t?void 0:t.video_cdn;i&&(void 0===t.video_previous_cdn||null===t.video_previous_cdn)&&(td(i,r)?t.video_previous_cdn=null!=a?a:void 0:(t.video_previous_cdn=null!=r?r:void 0,a=r,r=i))}),t.on("requestcompleted",function(e,t){i(t)})},th=function(e){try{return JSON.parse(e),!0}catch(e){return!1}},tm=function e(t){var i=this;J(this,e),ei(this,"_emittingAutomaticEvent",!1),ei(this,"_hasInitialized",!1),t.on("viewstart",function(){i._hasInitialized||(i._hasInitialized=!0,i._emittingAutomaticEvent=!0,t.emit("playbackmodechange",{player_playback_mode:"standard",player_playback_mode_data:"{}"}),i._emittingAutomaticEvent=!1)}),t.on("viewend",function(){i._hasInitialized=!1}),t.on("playbackmodechange",function(e,a){i._emittingAutomaticEvent||(a.player_playback_mode_data?th(a.player_playback_mode_data)||(t.mux.log.warn("Invalid JSON string for player_playback_mode_data"),a.player_playback_mode_data="{}"):a.player_playback_mode_data="{}",t.data.player_playback_mode_data=a.player_playback_mode_data,t.data.player_playback_mode=a.player_playback_mode)})},tp=["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","cdnchange","playbackmodechange"],tv=new Set(["requestcompleted","requestfailed","requestcanceled"]),tE=function(e){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&&en(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=ea(a);return e=t?Reflect.construct(i,arguments,ea(this).constructor):i.apply(this,arguments),e&&("object"===y(e)||"function"==typeof e)?e:X(this)});function a(e,t,r){J(this,a),ei(X(n=i.call(this)),"pageLoadEndTime",void 0),ei(X(n),"pageLoadInitTime",void 0),ei(X(n),"_destroyed",void 0),ei(X(n),"_heartBeatTimeout",void 0),ei(X(n),"adTracker",void 0),ei(X(n),"dashjs",void 0),ei(X(n),"data",void 0),ei(X(n),"disablePlayheadRebufferTracking",void 0),ei(X(n),"disableRebufferTracking",void 0),ei(X(n),"errorTracker",void 0),ei(X(n),"errorTranslator",void 0),ei(X(n),"emitTranslator",void 0),ei(X(n),"getAdData",void 0),ei(X(n),"getPlayheadTime",void 0),ei(X(n),"getStateData",void 0),ei(X(n),"stateDataTranslator",void 0),ei(X(n),"hlsjs",void 0),ei(X(n),"id",void 0),ei(X(n),"longResumeTracker",void 0),ei(X(n),"minimumRebufferDuration",void 0),ei(X(n),"mux",void 0),ei(X(n),"playbackEventDispatcher",void 0),ei(X(n),"playbackHeartbeat",void 0),ei(X(n),"playbackHeartbeatTime",void 0),ei(X(n),"playheadTime",void 0),ei(X(n),"seekingTracker",void 0),ei(X(n),"sustainedRebufferThreshold",void 0),ei(X(n),"watchTimeTracker",void 0),ei(X(n),"currentFragmentPDT",void 0),ei(X(n),"currentFragmentStart",void 0),n.pageLoadInitTime=ed.navigationStart(),n.pageLoadEndTime=ed.domContentLoadedEventEnd(),n.mux=e,n.id=t,null!=r&&r.beaconDomain&&n.mux.log.warn("The `beaconDomain` setting has been deprecated in 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),Q.level=r.debug?j.DEBUG:j.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 ts(e,r.data.env_key,r),n.data={player_instance_id:$(),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
1("viewstart"))}).bind(X(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)}),tp.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.pageLoadInitTime=this.data.page_load_init_time||this.pageLoadInitTime,this.pageLoadEndTime=this.data.page_load_end_time||this.pageLoadEndTime,!this.mux.PLAYER_TRACKED&&this.pageLoadInitTime&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.pageLoadEndTime)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.pageLoadEndTime||1/0)-this.pageLoadInitTime)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time}),n.longResumeTracker=new tl(X(n)),n.errorTracker=new eM(X(n)),new eK(X(n)),n.seekingTracker=new eW(X(n)),n.playheadTime=new eN(X(n)),n.playbackHeartbeat=new eL(X(n)),new eH(X(n)),n.watchTimeTracker=new eO(X(n)),new ex(X(n)),n.adTracker=new e$(X(n)),new eU(X(n)),new eP(X(n)),new eB(X(n)),new to(X(n)),new tc(X(n)),new tm(X(n)),r.hlsjs&&n.addHLSJS(r),r.dashjs&&n.addDashJS(r),n.emit("viewinit",r.data),n}return et(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=er(ea(a.prototype),"emit",this)).call.apply(i,[this].concat(G(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=B(eo(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++,tv.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,t=this.getStateData();if("function"==typeof this.stateDataTranslator)try{t=this.stateDataTranslator(t)}catch(e){this.mux.log.warn("Exception in stateDataTranslator translator callback.",e)}null!=(e=this.data)&&e.video_cdn&&null!=t&&t.video_cdn&&(t.video_cdn,t=function(e,t){if(null==e)return{};var i,a,r=function(e,t){if(null==e)return{};var i,a,r={},n=Object.keys(e);for(a=0;a<n.length;a++)i=n[a],t.indexOf(i)>=0||(r[i]=e[i]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}(t,["video_cdn"])),Object.assign(this.data,t),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=$(),i=function(){t===e.data.view_id&&eu(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,e_(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&&(ey(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,eS(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&&(eI(this.dashjs),this.dashjs=void 0)}}]),a}(eD),tb=b(N()),tg=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],tf={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},t_=b(g());t_.default&&t_.default.WeakMap&&(tu=new WeakMap);var ty={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"},tT=function(e){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(e),this.manifest};tT.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)},tT.prototype.processLine=function(e){var t=e.indexOf(":"),i=tD(e,t),a=i[0],r=2===i.length?tw(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 ty.TARGET_DURATION:if(!isFinite(r)||r<0)return;this.manifest.targetDuration=r,this.setHoldBack();break;case ty.PART_INF:tA(this.manifest,i),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break;case ty.SERVER_CONTROL:tA(this.manifest,i),this.setHoldBack();break;case ty.INF:0===r?this.currentUri.duration=.01:r>0&&(this.currentUri.duration=r);break;case ty.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 ty.VERSION:tA(this.manifest,i);break;case ty.SESSION_DATA:var s=eb(tC(i[1]));Object.assign(this.manifest.sessionData,s)}},tT.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 tA=function(e,t){var i,a=tk(t[0].replace("#EXT-X-",""));tR(t[1])?(i={},i=Object.assign(tI(t[1]),i)):i=tw(t[1]),e[a]=i},tk=function(e){return e.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},tw=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},tS=function(e){var t={},i=e.split("=");return i.length>1&&(t[tk(i[0])]=tw(i[1])),t},tI=function(e){for(var t=e.split(","),i={},a=0;t.length>a;a++)i=Object.assign(tS(t[a]),i);return i},tR=function(e){return e.indexOf("=")>-1},tD=function(e,t){return -1===t?[e]:[e.substring(0,t),e.substring(t+1)]},tC=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}}},tL={safeCall:function(e,t,i,a){var r=a;if(e&&"function"==typeof e[t])try{r=e[t].apply(e,i)}catch(e){Q.info("safeCall error",e)}return r},safeIncrement:eu,getComputedStyle:function(e,t){var i;return e&&t&&t_.default&&"function"==typeof t_.default.getComputedStyle?(tu&&tu.has(e)&&(i=tu.get(e)),i||(i=t_.default.getComputedStyle(e,null),tu&&tu.set(e,i)),i.getPropertyValue(t)):""},secondsToMs:function(e){return Math.floor(1e3*e)},assign:Object.assign,headersStringToObject:ev,cdnHeadersToRequestId:eE,extractHostnameAndDomain:eo,extractHostname:es,manifestParser:tT,generateShortID:K,generateUUID:$,now:F.now,findMediaElement:Y},tM={},tO=function(e){var t=arguments;"string"==typeof e?tO.hasOwnProperty(e)?H.default.setTimeout(function(){t=Array.prototype.splice.call(t,1),tO[e].apply(null,t)},0):Q.warn("`"+e+"` is an unknown task"):"function"==typeof e?H.default.setTimeout(function(){e(tO)},0):Q.warn("`"+e+"` is invalid.")},tx={loaded:F.now(),NAME:"mux-embed",VERSION:"5.13.0",API_VERSION:"2.1",PLAYER_TRACKED:!1,monitor:function(e,t){return function(e,t,i){var a=B(Y(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:tb.default&&!!(tb.default.fullscreenElement||tb.default.webkitFullscreenElement||tb.default.mozFullScreenElement||tb.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=B(Y(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={},tg.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=tf[r.error.code]||r.error.message}e.emit(n,t,i)},r.addEventListener(t,r.mux.listeners[t],!1))})}(tO,e,t)},destroyMonitor:function(e){var t=B(Y(e),1)[0];t&&t.mux&&"function"==typeof t.mux.destroy?t.mux.destroy():Q.error("A video element monitor for `"+e+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(e,t){var i=q(e);tM[i]?tM[i].addHLSJS(t):Q.error("A monitor for `"+i+"` has not been initialized.")},addDashJS:function(e,t){var i=q(e);tM[i]?tM[i].addDashJS(t):Q.error("A monitor for `"+i+"` has not been initialized.")},removeHLSJS:function(e){var t=q(e);tM[t]?tM[t].removeHLSJS():Q.error("A monitor for `"+t+"` has not been initialized.")},removeDashJS:function(e){var t=q(e);tM[t]?tM[t].removeDashJS():Q.error("A monitor for `"+t+"` has not been initialized.")},init:function(e,t){z()&&t&&t.respectDoNotTrack&&Q.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var i=q(e);tM[i]=new tE(tO,i,t)},emit:function(e,t,i){var a=q(e);tM[a]?(tM[a].emit(t,i),"destroy"===t&&delete tM[a]):Q.error("A monitor for `"+a+"` has not been initialized.")},updateData:function(e,t){var i=q(e);tM[i]?tM[i].emit("hb",t):Q.error("A monitor for `"+i+"` has not been initialized.")},setEmitTranslator:function(e,t){var i=q(e);tM[i]?tM[i].emitTranslator=t:Q.error("A monitor for `"+i+"` has not been initialized.")},setStateDataTranslator:function(e,t){var i=q(e);tM[i]?tM[i].stateDataTranslator=t:Q.error("A monitor for `"+i+"` has not been initialized.")},setGetPlayheadTime:function(e,t){var i=q(e);tM[i]?tM[i].getPlayheadTime=t:Q.error("A monitor for `"+i+"` has not been initialized.")},checkDoNotTrack:z,log:Q,utils:tL,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",PLAYBACK_MODE_CHANGE:"playbackmodechange",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(tO,tx),void 0!==H.default&&"function"==typeof H.default.addEventListener&&H.default.addEventListener("pagehide",function(e){e.persisted||(tO.WINDOW_UNLOADING=!0)},!1);var tN=i(68794).Ay,tP={VIDEO:"video",DRM:"drm"},tU={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},tB=e=>e===tP.VIDEO?"playback":e,tH=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:"")}};tH.MEDIA_ERR_ABORTED=1,tH.MEDIA_ERR_NETWORK=2,tH.MEDIA_ERR_DECODE=3,tH.MEDIA_ERR_SRC_NOT_SUPPORTED=4,tH.MEDIA_ERR_ENCRYPTED=5,tH.MEDIA_ERR_CUSTOM=100,tH.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 tW=tH,tV=(e,t)=>null!=t&&e in t,tF={ANY:"any",MUTED:"muted"},t$={ON_DEMAND:"on-demand",LIVE:"live",UNKNOWN:"unknown"},tK={MSE:"mse",NATIVE:"native"},tq={HEADER:"header",QUERY:"query",NONE:"none"},tY=Object.values(tq),tG={M3U8:"application/vnd.apple.mpegurl",MP4:"video/mp4"},tj={HLS:tG.M3U8},tQ=(Object.keys(tj),[...Object.values(tG)],{upTo720p:"720p",upTo1080p:"1080p",upTo1440p:"1440p",upTo2160p:"2160p"}),tZ={noLessThan480p:"480p",noLessThan540p:"540p",noLessThan720p:"720p",noLessThan1080p:"1080p",noLessThan1440p:"1440p",noLessThan2160p:"2160p"},tz={DESCENDING:"desc"},tX={code:"en"},tJ=(e,t,i,a,r=e)=>{r.addEventListener(t,i,a),e.addEventListener("teardown",()=>{r.removeEventListener(t,i)},{once:!0})},t0=e=>{let t=e.indexOf("?");return t<0?[e]:[e.slice(0,t),e.slice(t)]},t1=e=>{let{type:t}=e;if(t){let e=t.toUpperCase();return tV(e,tj)?tj[e]:t}return t4(e)},t2=e=>"VOD"===e?t$.ON_DEMAND:t$.LIVE,t3=e=>"EVENT"===e?1/0:"VOD"===e?NaN:0,t4=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 t9(e)?tG.M3U8:"";let r=i.slice(a+1).toUpperCase();return tV(r,tG)?tG[r]:""},t5="mux.com",t9=({src:e,customDomain:t=t5})=>{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},t8=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 t6(e,t=!0){var i;return new t7(t&&null!=(i=null==tX?void 0:tX[e])?i:e,t?tX.code:"en")}var t7=class{constructor(e,t=(e=>null!=(e=tX)?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}},ie=Object.values(tF),it=e=>"boolean"==typeof e||"string"==typeof e&&ie.includes(e),ii=(e,t)=>{if(!t)return;let i=e.muted,a=()=>e.muted=i;switch(t){case tF.ANY:e.play().catch(()=>{e.muted=!0,e.play().catch(a)});break;case tF.MUTED:e.muted=!0,e.play().catch(a);break;default:e.play().catch(()=>{})}},ia=e=>"time"in e?e.time:e.startTime;function ir(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 is(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 io(e,t,i,a){let r=is(e,i,a);return r||((r=ir(e,a,i)).mode="hidden",await new Promise(e=>setTimeout(()=>e(void 0),0))),"hidden"!==r.mode&&(r.mode="hidden"),[...t].sort((e,t)=>ia(t)-ia(e)).forEach(t=>{var i,n;let s=t.value,o=ia(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 il="cuepoints",id=Object.freeze({label:il});async function iu(e,t,i=id){return io(e,t,i.label,"metadata")}var ic=e=>({time:e.startTime,value:JSON.parse(e.text)});function ih(e,t={label:il}){var i,a;let r=is(e,t.label,"metadata");if(!(null!=(i=null==r?void 0:r.activeCues)&&i.length))return;if(1===r.activeCues.length)return ic(r.activeCues[0]);let{currentTime:n}=e;return ic(Array.prototype.find.call(null!=(a=r.activeCues)?a:[],({startTime:e,endTime:t})=>e<=n&&t>n)||r.activeCues[0])}async function im(e,t=id){return new Promise(i=>{tJ(e,"loadstart",async()=>{let a=await iu(e,[],t);tJ(e,"cuechange",()=>{let t=ih(e);if(t){let i=new CustomEvent("cuepointchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(i)}},{},a),i(a)})})}var ip="chapters",iv=Object.freeze({label:ip}),iE=e=>({startTime:e.startTime,endTime:e.endTime,value:e.text});async function ib(e,t,i=iv){return io(e,t,i.label,"chapters")}
1function ig(e,t={label:ip}){var i,a;let r=is(e,t.label,"chapters");if(!(null!=(i=null==r?void 0:r.activeCues)&&i.length))return;if(1===r.activeCues.length)return iE(r.activeCues[0]);let{currentTime:n}=e;return iE(Array.prototype.find.call(null!=(a=r.activeCues)?a:[],({startTime:e,endTime:t})=>e<=n&&t>n)||r.activeCues[0])}async function i_(e,t=iv){return new Promise(i=>{tJ(e,"loadstart",async()=>{let a=await ib(e,[],t);tJ(e,"cuechange",()=>{let t=ig(e);if(t){let i=new CustomEvent("chapterchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(i)}},{},a),i(a)})})}var iy={VIDEO:"v",THUMBNAIL:"t",STORYBOARD:"s",DRM:"d"},iT=(e,t,i,a,r=!1,n=!(e=>null==(e=globalThis.navigator)?void 0:e.onLine)())=>{var s,o;if(n){let i=t6("Your device appears to be offline",r),a=tW.MEDIA_ERR_NETWORK,n=new tW(i,a,!1,void 0);return n.errorCategory=t,n.muxCode=tU.NETWORK_OFFLINE,n.data=e,n}let l="status"in e?e.status:e.code,d=Date.now(),u=tW.MEDIA_ERR_NETWORK;if(200===l)return;let c=tB(t),h=((e,t)=>{var i,a;let r=tB(e),n=`${r}Token`;return null!=(i=t.tokens)&&i[r]?null==(a=t.tokens)?void 0:a[r]:tV(n,t)?t[n]:void 0})(t,i),p=(e=>e===tP.VIDEO?iy.VIDEO:e===tP.DRM?iy.DRM:void 0)(t),[v]=t0(null!=(s=i.playbackId)?s:"");if(!l||!v)return;let E=t8(h);if(h&&!E){let i=new tW(t6("The {tokenNamePrefix}-token provided is invalid or malformed.",r).format({tokenNamePrefix:c}),u,!0,t6("Compact JWT string: {token}",r).format({token:h}));return i.errorCategory=t,i.muxCode=tU.NETWORK_TOKEN_MALFORMED,i.data=e,i}if(l>=500){let e=new tW("",u,null==a||a);return e.errorCategory=t,e.muxCode=tU.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 tW(t6("The video’s secured {tokenNamePrefix}-token has expired.",r).format({tokenNamePrefix:c}),u,!0,t6("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=tU.NETWORK_TOKEN_EXPIRED,a.data=e,a}if((({sub:e},t)=>e!==t)(E,v)){let i=new tW(t6("The video’s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",r).format({tokenNamePrefix:c}),u,!0,t6("Specified playback ID: {playbackId} and the playback ID encoded in the {tokenNamePrefix}-token: {tokenPlaybackId}",r).format({tokenNamePrefix:c,playbackId:v,tokenPlaybackId:E.sub}));return i.errorCategory=t,i.muxCode=tU.NETWORK_TOKEN_SUB_MISMATCH,i.data=e,i}if((({aud:e},t)=>!e)(E,0)){let i=new tW(t6("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:c}),u,!0,t6("The {tokenNamePrefix}-token has no aud value. aud value should be {expectedAud}.",r).format({tokenNamePrefix:c,expectedAud:p}));return i.errorCategory=t,i.muxCode=tU.NETWORK_TOKEN_AUD_MISSING,i.data=e,i}if((({aud:e},t)=>e!==t)(E,p)){let i=new tW(t6("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:c}),u,!0,t6("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.",r).format({tokenNamePrefix:c,expectedAud:p,aud:E.aud}));return i.errorCategory=t,i.muxCode=tU.NETWORK_TOKEN_AUD_MISMATCH,i.data=e,i}}else{let i=new tW(t6("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,t6("Specified playback ID: {playbackId}",r).format({playbackId:v}));return i.errorCategory=t,i.muxCode=tU.NETWORK_TOKEN_MISSING,i.data=e,i}if(412===l){let n=new tW(t6("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,t6("Specified playback ID: {playbackId}",r).format({playbackId:v}));return n.errorCategory=t,n.muxCode=tU.NETWORK_NOT_READY,n.streamType=i.streamType===t$.LIVE?"live":i.streamType===t$.ON_DEMAND?"on-demand":"unknown",n.data=e,n}if(404===l){let i=new tW(t6("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,t6("Specified playback ID: {playbackId}",r).format({playbackId:v}));return i.errorCategory=t,i.muxCode=tU.NETWORK_NOT_FOUND,i.data=e,i}
1if(400===l){let i=new tW(t6("The URL or playback-id was invalid. You may have used an invalid value as a playback-id."),u,null==a||a,t6("Specified playback ID: {playbackId}",r).format({playbackId:v}));return i.errorCategory=t,i.muxCode=tU.NETWORK_INVALID_URL,i.data=e,i}let b=new tW("",u,null==a||a);return b.errorCategory=t,b.muxCode=tU.NETWORK_UNKNOWN_ERROR,b.data=e,b},iA=tN.DefaultConfig.capLevelController,ik=class e extends iA{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:iA.getMaxLevelByMediaSize(a,16/9*n,n)}};ik.minMaxResolution=720;var iw,iS,iI,iR,iD,iC,iL,iM,iO,ix={FAIRPLAY:"fairplay",PLAYREADY:"playready",WIDEVINE:"widevine"},iN=/([A-Z0-9-]+)="?(.*?)"?(?:,|$)/g,iP=async(e,t)=>{if(t===tG.MP4)return{streamType:t$.ON_DEMAND,targetLiveWindow:NaN,liveEdgeStartOffset:void 0,sessionData:void 0};if(t===tG.M3U8){let t=await fetch(e);if(!t.ok)return Promise.reject(t);let i=await t.text(),a=await fetch(i.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());return{...(e=>{let t=e.split(`
3`).filter(e=>e.startsWith("#EXT-X-SESSION-DATA"));if(!t.length)return{};let i={};for(let e of t){let t=Object.fromEntries([...e.matchAll(iN)].map(([,e,t])=>[e,t])),a=t["DATA-ID"];a&&(i[a]={...t})}return{sessionData:i}})(i),...(e=>{var t,i,a;let r=e.split(`
4`),n=null==(i=(null!=(t=r.find(e=>e.startsWith("#EXT-X-PLAYLIST-TYPE")))?t:"").split(":")[1])?void 0:i.trim(),s=t2(n),o=t3(n),l;if(s===t$.LIVE){let e=r.find(e=>e.startsWith("#EXT-X-PART-INF"));if(e)l=2*e.split(":")[1].split("=")[1];else{let e=r.find(e=>e.startsWith("#EXT-X-TARGETDURATION")),t=null==(a=null==e?void 0:e.split(":"))?void 0:a[1];l=(null!=t?t:6)*3}}return{streamType:s,targetLiveWindow:o,liveEdgeStartOffset:l}})(a)}}return console.error(`Media type ${t} is an unrecognized or unsupported type for src ${e}.`),{streamType:void 0,targetLiveWindow:void 0,liveEdgeStartOffset:void 0,sessionData:void 0}},iU=async(e,t,i=t1({src:e}))=>{var a,r,n,s;let{streamType:o,targetLiveWindow:l,liveEdgeStartOffset:d,sessionData:u}=await iP(e,i),c=null==u?void 0:u["com.apple.hls.chapters"];(null!=c&&c.URI||null!=c&&c.VALUE.toLocaleLowerCase().startsWith("http"))&&iB(null!=(a=c.URI)?a:c.VALUE,t),(null!=(r=iK.get(t))?r:{}).liveEdgeStartOffset=d,(null!=(n=iK.get(t))?n:{}).targetLiveWindow=l,t.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),(null!=(s=iK.get(t))?s:{}).streamType=o,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},iB=async(e,t)=>{var i,a;try{let r=await fetch(e);if(!r.ok)throw Error(`Failed to fetch Mux metadata: ${r.status} ${r.statusText}`);let n=await r.json(),s={};if(!(null!=(i=null==n?void 0:n[0])&&i.metadata))return;for(let e of n[0].metadata)e.key&&e.value&&(s[e.key]=e.value);(null!=(a=iK.get(t))?a:{}).metadata=s;let o=new CustomEvent("muxmetadata");t.dispatchEvent(o)}catch(e){console.error(e)}},iH=null!=(iS=null==(iw=null==globalThis?void 0:globalThis.navigator)?void 0:iw.userAgent)?iS:"",iW=null!=(iD=null==(iR=null==(iI=null==globalThis?void 0:globalThis.navigator)?void 0:iI.userAgentData)?void 0:iR.platform)?iD:"",iV=null!=(iM=null==(iL=null==(iC=null==globalThis?void 0:globalThis.navigator)?void 0:iC.userAgentData)?void 0:iL.brands)?iM:[],iF=iH.toLowerCase().includes("android")||["x11","android"].some(e=>iW.toLowerCase().includes(e)),i$=iV.find(e=>"Google Chrome"===e.brand),iK=new WeakMap,iq="mux.com",iY=null==(iO=tN.isSupported)?void 0:iO.call(tN),iG=()=>tO.utils.now(),ij=tO.utils.generateUUID,iQ=({playbackId:e,customDomain:t=iq,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,p=""]=t0(e),v=new URL(`https://stream.${t}/${h}.m3u8${p}`);
4return u||v.searchParams.has("token")?(v.searchParams.forEach((e,t)=>{"token"!=t&&v.searchParams.delete(t)}),u&&v.searchParams.set("token",u)):(i&&v.searchParams.set("max_resolution",i),a&&(v.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&&v.searchParams.set("rendition_order",r),n&&v.searchParams.set("program_start_time",`${n}`),s&&v.searchParams.set("program_end_time",`${s}`),o&&v.searchParams.set("asset_start_time",`${o}`),l&&v.searchParams.set("asset_end_time",`${l}`),Object.entries(c).forEach(([e,t])=>{null!=t&&v.searchParams.set(e,t)})),v.toString()},iZ=e=>{if(!e)return;let[t]=e.split("?");return t||void 0},iz=e=>{if(!e||!e.startsWith("https://stream."))return;let[t]=new URL(e).pathname.slice(1).split(/\.m3u8|\//);return t||void 0},iX=e=>{var t;return null==(t=iK.get(e))?void 0:t.error},iJ=e=>{var t,i;return null!=(i=null==(t=iK.get(e))?void 0:t.streamType)?i:t$.UNKNOWN},i0=e=>{var t,i;return null!=(i=null==(t=iK.get(e))?void 0:t.seekable)?i:e.seekable},i1=.034,i2=(e,t,i=i1)=>e>t||((e,t,i=i1)=>Math.abs(e-t)<=i)(e,t,i),i3=(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},i4=(e,t)=>e.ended||e.loop?e.ended:!!(t&&i3(e,t))||((e,t=i1)=>e.paused&&i2(e.currentTime,e.duration,t))(e),i5=(e,t,i)=>{let a=null==t?void 0:t.engine;null!=e&&e.mux&&!e.mux.deleted&&(null!=i&&i.muxDataKeepSession?a&&e.mux.removeHLSJS():(e.mux.destroy(),delete e.mux)),a&&(a.detachMedia(),a.destroy()),e&&(e.hasAttribute("src")&&(e.removeAttribute("src"),e.load()),e.removeEventListener("error",an),e.removeEventListener("error",ao),e.removeEventListener("durationchange",ar),iK.delete(e),e.dispatchEvent(new Event("teardown")))};function i9(e,t){var i,a;let r=t1(e);if(r!==tG.M3U8)return!0;let n=!r||null==(i=t.canPlayType(r))||i,{preferPlayback:s}=e,o=s===tK.MSE,l=s===tK.NATIVE,d=iY&&(o||iF||i$&&parseInt(null!=(a=i$.version)?a:"0")>=141&&!!t.canPlayType("application/vnd.apple.mpegurl"));return n&&(l||!d)}var i8=e=>e===t$.LIVE?{backBufferLength:8}:{},i6=e=>{let{tokens:{drm:t}={},playbackId:i,drmTypeCb:a}=e,r=iZ(i);return t&&r?{emeEnabled:!0,drmSystems:{"com.apple.fps":{licenseUrl:at(e,"fairplay"),serverCertificateUrl:ai(e,"fairplay")},"com.widevine.alpha":{licenseUrl:at(e,"widevine")},"com.microsoft.playready":{licenseUrl:at(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")?ix.FAIRPLAY:e.includes("playready")?ix.PLAYREADY:e.includes("widevine")?ix.WIDEVINE:void 0)(e);return null==a||a(i),t}))}:{}},i7=async e=>{let t=await fetch(e);return 200!==t.status?Promise.reject(t):await t.arrayBuffer()},ae=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())},at=({playbackId:e,tokens:{drm:t}={},customDomain:i=iq},a)=>{let r=iZ(e);return`https://license.${i.toLocaleLowerCase().endsWith(iq)?i:iq}/license/${a}/${r}?token=${t}`},ai=({playbackId:e,tokens:{drm:t}={},customDomain:i=iq},a)=>{let r=iZ(e);return`https://license.${i.toLocaleLowerCase().endsWith(iq)?i:iq}/appcert/${a}/${r}?token=${t}`},aa=({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(iq)||!!i&&a.includes(i.toLocaleLowerCase())};function ar(e){var t;let i=e.target,a=null==(t=iK.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 an(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 tW(i,a);if(t.src&&a===tW.MEDIA_ERR_SRC_NOT_SUPPORTED&&t.readyState===HTMLMediaElement.HAVE_NOTHING)return void setTimeout(()=>{var e;let i=null!=(e=iX(t))?e:t.error;(null==i?void 0:i.code)===tW.MEDIA_ERR_SRC_NOT_SUPPORTED&&as(t,r)},500);if(t.src&&(a!==tW.MEDIA_ERR_DECODE||void 0!==a))try{let{status:e}=await fetch(t.src);r.data={response:{code:e}}}catch{}as(t,r)}function as(e,t){var i;t.fatal&&((null!=(i=iK.get(e))?i:{}).error=t,e.dispatchEvent(new CustomEvent("error",{detail:t})))}function ao(e){var t,i;if(!(e instanceof CustomEvent)||!(e.detail instanceof tW))return;let a=e.target,r=e.detail;r&&r.fatal&&((null!=(t=iK.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 al,ad,au,ac,ah,am,ap,av,aE,ab,ag,af,a_=(e,t)=>{var i,a,r;console.error("getErrorFromHlsErrorData()",e);
4let n={[tN.ErrorTypes.NETWORK_ERROR]:tW.MEDIA_ERR_NETWORK,[tN.ErrorTypes.MEDIA_ERROR]:tW.MEDIA_ERR_DECODE,[tN.ErrorTypes.KEY_SYSTEM_ERROR]:tW.MEDIA_ERR_ENCRYPTED},s,o=(e=>[tN.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,tN.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED].includes(e.details)?tW.MEDIA_ERR_NETWORK:n[e.type])(e);if(o===tW.MEDIA_ERR_NETWORK&&e.response){let r=null!=(i=(e=>e.type===tN.ErrorTypes.KEY_SYSTEM_ERROR?tP.DRM:e.type===tN.ErrorTypes.NETWORK_ERROR?tP.VIDEO:void 0)(e))?i:tP.VIDEO;s=null!=(a=iT(e.response,r,t,e.fatal))?a:new tW("",o,e.fatal)}else o===tW.MEDIA_ERR_ENCRYPTED?e.details===tN.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE?((s=new tW(t6("Attempting to play DRM-protected content without providing a DRM token."),tW.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tP.DRM,s.muxCode=tU.ENCRYPTED_MISSING_TOKEN):e.details===tN.ErrorDetails.KEY_SYSTEM_NO_ACCESS?((s=new tW(t6("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),tW.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tP.DRM,s.muxCode=tU.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM):e.details===tN.ErrorDetails.KEY_SYSTEM_NO_SESSION?((s=new tW(t6("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),tW.MEDIA_ERR_ENCRYPTED,!0)).errorCategory=tP.DRM,s.muxCode=tU.ENCRYPTED_GENERATE_REQUEST_FAILED):e.details===tN.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED?((s=new tW(t6("Failed to update DRM license. This may be an issue with the player or your protected content."),tW.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tP.DRM,s.muxCode=tU.ENCRYPTED_UPDATE_LICENSE_FAILED):e.details===tN.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED?((s=new tW(t6("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),tW.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tP.DRM,s.muxCode=tU.ENCRYPTED_UPDATE_SERVER_CERT_FAILED):e.details===tN.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR?((s=new tW(t6("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser."),tW.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tP.DRM,s.muxCode=tU.ENCRYPTED_CDM_ERROR):e.details===tN.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED?((s=new tW(t6("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen."),tW.MEDIA_ERR_ENCRYPTED,!1)).errorCategory=tP.DRM,s.muxCode=tU.ENCRYPTED_OUTPUT_RESTRICTED):((s=new tW(e.error.message,tW.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tP.DRM,s.muxCode=tU.ENCRYPTED_ERROR):s=new tW("",o,e.fatal);return s.context||(s.context=`${e.url?`url: ${e.url}
5`:""}${e.response&&(e.response.code||e.response.text)?`response: ${e.response.code}, ${e.response.text}
6`:""}${e.reason?`failure reason: ${e.reason}
7`:""}${e.level?`level: ${e.level}
8`:""}${e.parent?`parent stream controller: ${e.parent}
9`:""}${e.buffer?`buffer length: ${e.buffer}
10`:""}${e.error?`error: ${e.error}
11`:""}${e.event?`event: ${e.event}
12`:""}${e.err?`error message: ${null==(r=e.err)?void 0:r.message}
13`:""}`),s.data=e,s},ay=i(23585),aT=e=>{throw TypeError(e)},aA=(e,t,i)=>t.has(e)||aT("Cannot "+i),ak=(e,t,i)=>(aA(e,t,"read from private field"),i?i.call(e):t.get(e)),aw=(e,t,i)=>t.has(e)?aT("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),aS=(e,t,i,a)=>(aA(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),aI=(e,t,i)=>(aA(e,t,"access private method"),i),aR=(()=>{try{return"0.27.2"}catch{}return"UNKNOWN"})(),aD=`
14<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" 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.12
141 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>`,aC={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended",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"},aL=Object.values(aC),aM="mux-video",aO=class extends ay.lB{constructor(){super(),aw(this,ag),aw(this,al),aw(this,ad),aw(this,au),aw(this,ac,{}),aw(this,ah,{}),aw(this,am),aw(this,ap),aw(this,av),aw(this,aE),aw(this,ab,""),aS(this,au,iG()),this.nativeEl.addEventListener("muxmetadata",e=>{var t;let i=(e=>{var t;return null==(t=iK.get(e))?void 0:t.metadata})(this.nativeEl),a=null!=(t=this.metadata)?t:{};this.metadata={...i,...a},(null==i?void 0:i["com.mux.video.branding"])==="mux-free-plan"&&(aS(this,ab,"default"),this.updateLogo())})}static get NAME(){return aM}static get VERSION(){return aR}static get observedAttributes(){var e;return[...aL,...null!=(e=ay.lB.observedAttributes)?e:[]]}static getLogoHTML(e){return e&&"false"!==e?"default"===e?aD:`<img part="logo" src="${e}" />`:""}static getTemplateHTML(e={}){var t;return`
15      ${ay.lB.getTemplateHTML(e)}
16      <style>
17        :host {
18          position: relative;
19        }
20        slot[name="logo"] {
21          display: flex;
22          justify-content: end;
23          position: absolute;
24          top: 1rem;
25          right: 1rem;
26          opacity: 0;
27          transition: opacity 0.25s ease-in-out;
28          z-index: 1;
29        }
30        slot[name="logo"]:has([part="logo"]) {
31          opacity: 1;
32        }
33        slot[name="logo"] [part="logo"] {
34          width: 5rem;
35          pointer-events: none;
36          user-select: none;
37        }
38      </style>
39      <slot name="logo">
40        ${this.getLogoHTML(null!=(t=e[aC.LOGO])?t:"")}
41      </slot>
42    `}get preferCmcd(){var e;return null!=(e=this.getAttribute(aC.PREFER_CMCD))?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?tY.includes(e)?this.setAttribute(aC.PREFER_CMCD,e):console.warn(`Invalid value for preferCmcd. Must be one of ${tY.join()}`):this.removeAttribute(aC.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(aC.PLAYER_INIT_TIME)?+this.getAttribute(aC.PLAYER_INIT_TIME):ak(this,au)}set playerInitTime(e){e!=this.playerInitTime&&(null==e?this.removeAttribute(aC.PLAYER_INIT_TIME):this.setAttribute(aC.PLAYER_INIT_TIME,`${+e}`))}get playerSoftwareName(){var e;return null!=(e=ak(this,av))?e:aM}set playerSoftwareName(e){aS(this,av,e)}get playerSoftwareVersion(){var e;return null!=(e=ak(this,ap))?e:aR}set playerSoftwareVersion(e){aS(this,ap,e)}
42get _hls(){var e;return null==(e=ak(this,al))?void 0:e.engine}get mux(){var e;return null==(e=this.nativeEl)?void 0:e.mux}get error(){var e;return null!=(e=iX(this.nativeEl))?e:null}get errorTranslator(){return ak(this,aE)}set errorTranslator(e){aS(this,aE,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(aC.TYPE))?e:void 0}set type(e){e!==this.type&&(e?this.setAttribute(aC.TYPE,e):this.removeAttribute(aC.TYPE))}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(aC.DEBUG)}set debug(e){e!==this.debug&&(e?this.setAttribute(aC.DEBUG,""):this.removeAttribute(aC.DEBUG))}get disableTracking(){return this.hasAttribute(aC.DISABLE_TRACKING)}set disableTracking(e){e!==this.disableTracking&&this.toggleAttribute(aC.DISABLE_TRACKING,!!e)}get disableCookies(){return this.hasAttribute(aC.DISABLE_COOKIES)}set disableCookies(e){e!==this.disableCookies&&(e?this.setAttribute(aC.DISABLE_COOKIES,""):this.removeAttribute(aC.DISABLE_COOKIES))}get disablePseudoEnded(){return this.hasAttribute(aC.DISABLE_PSEUDO_ENDED)}set disablePseudoEnded(e){e!==this.disablePseudoEnded&&(e?this.setAttribute(aC.DISABLE_PSEUDO_ENDED,""):this.removeAttribute(aC.DISABLE_PSEUDO_ENDED))}get startTime(){let e=this.getAttribute(aC.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(aC.START_TIME):this.setAttribute(aC.START_TIME,`${e}`))}get playbackId(){var e;return this.hasAttribute(aC.PLAYBACK_ID)?this.getAttribute(aC.PLAYBACK_ID):null!=(e=iz(this.src))?e:void 0}set playbackId(e){e!==this.playbackId&&(e?this.setAttribute(aC.PLAYBACK_ID,e):this.removeAttribute(aC.PLAYBACK_ID))}get maxResolution(){var e;return null!=(e=this.getAttribute(aC.MAX_RESOLUTION))?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(aC.MAX_RESOLUTION,e):this.removeAttribute(aC.MAX_RESOLUTION))}get minResolution(){var e;return null!=(e=this.getAttribute(aC.MIN_RESOLUTION))?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(aC.MIN_RESOLUTION,e):this.removeAttribute(aC.MIN_RESOLUTION))}get renditionOrder(){var e;return null!=(e=this.getAttribute(aC.RENDITION_ORDER))?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(aC.RENDITION_ORDER,e):this.removeAttribute(aC.RENDITION_ORDER))}get programStartTime(){let e=this.getAttribute(aC.PROGRAM_START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set programStartTime(e){null==e?this.removeAttribute(aC.PROGRAM_START_TIME):this.setAttribute(aC.PROGRAM_START_TIME,`${e}`)}get programEndTime(){let e=this.getAttribute(aC.PROGRAM_END_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set programEndTime(e){null==e?this.removeAttribute(aC.PROGRAM_END_TIME):this.setAttribute(aC.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){let e=this.getAttribute(aC.ASSET_START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set assetStartTime(e){null==e?this.removeAttribute(aC.ASSET_START_TIME):this.setAttribute(aC.ASSET_START_TIME,`${e}`)}get assetEndTime(){let e=this.getAttribute(aC.ASSET_END_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set assetEndTime(e){null==e?this.removeAttribute(aC.ASSET_END_TIME):this.setAttribute(aC.ASSET_END_TIME,`${e}`)}get customDomain(){var e;return null!=(e=this.getAttribute(aC.CUSTOM_DOMAIN))?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(aC.CUSTOM_DOMAIN,e):this.removeAttribute(aC.CUSTOM_DOMAIN))}get drmToken(){var e;return null!=(e=this.getAttribute(aC.DRM_TOKEN))?e:void 0}set drmToken(e){e!==this.drmToken&&(e?this.setAttribute(aC.DRM_TOKEN,e):this.removeAttribute(aC.DRM_TOKEN))}get playbackToken(){var e,t,i,a;if(this.hasAttribute(aC.PLAYBACK_TOKEN))return null!=(e=this.getAttribute(aC.PLAYBACK_TOKEN))?e:void 0;if(this.hasAttribute(aC.PLAYBACK_ID)){let[,e]=t0(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(aC.PLAYBACK_TOKEN,e):this.removeAttribute(aC.PLAYBACK_TOKEN))}get tokens(){let e=this.getAttribute(aC.PLAYBACK_TOKEN),t=this.getAttribute(aC.DRM_TOKEN);return{...ak(this,ah),...null!=e?{playback:e}:{},...null!=t?{drm:t}:{}}}set tokens(e){aS(this,ah,null!=e?e:{})}get ended(){return i4(this.nativeEl,this._hls)}get envKey(){var e;return null!=(e=this.getAttribute(aC.ENV_KEY))?e:void 0}set envKey(e){e!==this.envKey&&(e?this.setAttribute(aC.ENV_KEY,e):this.removeAttribute(aC.ENV_KEY))}get beaconCollectionDomain(){var e;return null!=(e=this.getAttribute(aC.BEACON_COLLECTION_DOMAIN))?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(aC.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(aC.BEACON_COLLECTION_DOMAIN))}get streamType(){var e;return null!=(e=this.getAttribute(aC.STREAM_TYPE))?e:iJ(this.nativeEl)}set streamType(e){e!==this.streamType&&(e?this.setAttribute(aC.STREAM_TYPE,e):this.removeAttribute(aC.STREAM_TYPE))}get targetLiveWindow(){var e,t,i;return this.hasAttribute(aC.TARGET_LIVE_WINDOW)?+this.getAttribute(aC.TARGET_LIVE_WINDOW):(e=this.nativeEl,null!=(i=null==(t=iK.get(e))?void 0:t.targetLiveWindow)?i:NaN)}set targetLiveWindow(e){e!=this.targetLiveWindow&&(null==e?this.removeAttribute(aC.TARGET_LIVE_WINDOW):this.setAttribute(aC.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e,t;if(this.hasAttribute(aC.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=iK.get(e))?void 0:t.liveEdgeStartOffset;if("number"!=typeof i)return NaN;let a=i0(e);return a.length?a.end(a.length-1)-i:NaN})(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(aC.LIVE_EDGE_OFFSET))return+this.getAttribute(aC.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){e!=this.liveEdgeOffset&&(null==e?this.removeAttribute(aC.LIVE_EDGE_OFFSET):this.setAttribute(aC.LIVE_EDGE_OFFSET,`${+e}`))}get seekable(){return i0(this.nativeEl)}async addCuePoints(e){return iu(this.nativeEl,e)}get activeCuePoint(){return ih(this.nativeEl)}get cuePoints(){return function(e,t={label:il}){let i=is(e,t.label,"metadata");return null!=i&&i.cues?Array.from(i.cues,e=>ic(e)):[]}(this.nativeEl)}
42async addChapters(e){return ib(this.nativeEl,e)}get activeChapter(){return ig(this.nativeEl)}get chapters(){return function(e,t={label:ip}){var i;let a=is(e,t.label,"chapters");return null!=(i=null==a?void 0:a.cues)&&i.length?Array.from(a.cues,e=>iE(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(aC.PREFER_PLAYBACK);if(e===tK.MSE||e===tK.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===tK.MSE||e===tK.NATIVE?this.setAttribute(aC.PREFER_PLAYBACK,e):this.removeAttribute(aC.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(e=>e.startsWith("metadata-")&&![aC.METADATA_URL].includes(e)).reduce((e,t)=>{let i=this.getAttribute(t);return null!=i&&(e[t.replace(/^metadata-/,"").replace(/-/g,"_")]=i),e},{}),...ak(this,ac)}}set metadata(e){aS(this,ac,null!=e?e:{}),this.mux&&this.mux.emit("hb",ak(this,ac))}get _hlsConfig(){return ak(this,am)}set _hlsConfig(e){aS(this,am,e)}get logo(){var e;return null!=(e=this.getAttribute(aC.LOGO))?e:ak(this,ab)}set logo(e){e?this.setAttribute(aC.LOGO,e):this.removeAttribute(aC.LOGO)}load(){aS(this,al,((e,t,i)=>{var a,r,n,s;i5(t,i,e);let{metadata:o={}}=e,{view_session_id:l=ij()}=o,d=null!=(r=null==(a=e)?void 0:a.metadata)&&r.video_id?a.metadata.video_id:aa(a)&&null!=(s=null!=(n=iZ(a.playbackId))?n:iz(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})},iK.set(t,{retryCount:0});let u=((e,t)=>{let{debug:i,streamType:a,startTime:r=-1,metadata:n,preferCmcd:s,_hlsConfig:o={}}=e,l=t1(e)===tG.M3U8,d=i9(e,t);if(l&&!d&&iY){let l=i8(a),d=i6(e),u=new tN({debug:i,startPosition:r,cmcd:[tq.QUERY,tq.HEADER].includes(s)?{useHeaders:s===tq.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!==tq.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)},...null==o.capLevelToPlayerSize?{capLevelController:ik}:{},...{backBufferLength:30,renderTextTracksNatively:!1,liveDurationInfinity:!0,capLevelToPlayerSize:!0,capLevelOnFPSDrop:!0},...l,...d,...o});return u.on(tN.Events.MANIFEST_PARSED,async function(e,i){var a,r;let n=null==(a=i.sessionData)?void 0:a["com.apple.hls.chapters"];(null!=n&&n.URI||null!=n&&n.VALUE.toLocaleLowerCase().startsWith("http"))&&iB(null!=(r=null==n?void 0:n.URI)?r:null==n?void 0:n.VALUE,t)}),u}})(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 tJ(i,"play",()=>{s=!0,a.config.maxBufferLength=o,a.config.maxBufferSize=l,u()},{once:!0}),d(e),d})(e,t,u);null!=e&&e.muxDataKeepSession&&null!=t&&t.mux&&!t.mux.deleted?u&&t.mux.addHLSJS({hlsjs:u,Hls:u?tN:void 0}):((e,t,i)=>{var a;let{envKey:r,disableTracking:n,muxDataSDK:s=tO,muxDataSDKOptions:o={}}=e,l=aa(e);if(!n&&(r||l)){let{playerInitTime:n,playerSoftwareName:l,playerSoftwareVersion:d,beaconCollectionDomain:u,debug:c,disableCookies:h}=e,p={...e.metadata,video_title:(null==(a=null==e?void 0:e.metadata)?void 0:a.video_title)||void 0};s.monitor(t,{debug:c,beaconCollectionDomain:u,hlsjs:i,Hls:i?tN:void 0,automaticErrorTracking:!1,errorTranslator:t=>"string"!=typeof t.player_error_code&&("function"==typeof e.errorTranslator?e.errorTranslator(t):t),disableCookies:h,...o,data:{...r?{env_key:r}:{},player_software_name:l,player_software:l,player_software_version:d,player_init_time:n,...p}})}})(e,t,u),((e,t,i)=>{var a,r;let n=i9(e,t),{src:s,customDomain:o=iq}=e,l=()=>{t.ended||e.disablePseudoEnded||!i4(t,i)||(i3(t,i)?t.currentTime=t.buffered.end(t.buffered.length-1):t.dispatchEvent(new Event("ended")))},d,u,c=()=>{let e=i0(t),i,a;e.length>0&&(i=e.start(0),a=e.end(0)),(u!==a||d!==i)&&t.dispatchEvent(new CustomEvent("seekablechange",{composed:!0})),d=i,u=a};if(tJ(t,"durationchange",c),t&&n){let i=t1(e);if("string"==typeof s){if(s.endsWith(".mp4")&&s.includes(o)){let e=iz(s);iB(new URL(`https://stream.${o}/${e}/metadata.json`).toString(),t)}let n=()=>
42{if(iJ(t)!==t$.LIVE||Number.isFinite(t.duration))return;let e=setInterval(c,1e3);t.addEventListener("teardown",()=>{clearInterval(e)},{once:!0}),tJ(t,"durationchange",()=>{Number.isFinite(t.duration)&&clearInterval(e)})},l=async()=>iU(s,t,i).then(n).catch(i=>{if(i instanceof Response){let a=iT(i,tP.VIDEO,e);if(a)return void as(t,a)}});if("none"===t.preload){let e=()=>{l(),t.removeEventListener("loadedmetadata",i)},i=()=>{l(),t.removeEventListener("play",e)};tJ(t,"play",e,{once:!0}),tJ(t,"loadedmetadata",i,{once:!0})}else l();null!=(a=e.tokens)&&a.drm?((e,t)=>{tJ(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,ix.FAIRPLAY),t}).catch(()=>{let e=t6("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),i=new tW(e,tW.MEDIA_ERR_ENCRYPTED,!0);i.errorCategory=tP.DRM,i.muxCode=tU.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM,as(t,i)});if(!i)return;let r=await i.createMediaKeys();try{let t=await i7(ai(e,"fairplay")).catch(t=>{if(t instanceof Response){let i=iT(t,tP.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=t6("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),t=new tW(e,tW.MEDIA_ERR_ENCRYPTED,!0);return t.errorCategory=tP.DRM,t.muxCode=tU.ENCRYPTED_UPDATE_SERVER_CERT_FAILED,Promise.reject(t)})}catch(e){as(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=t6("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser.");(i=new tW(e,tW.MEDIA_ERR_ENCRYPTED,!0)).errorCategory=tP.DRM,i.muxCode=tU.ENCRYPTED_CDM_ERROR}else if("output-restricted"===e||"output-downscaled"===e){let e=t6("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen.");(i=new tW(e,tW.MEDIA_ERR_ENCRYPTED,!1)).errorCategory=tP.DRM,i.muxCode=tU.ENCRYPTED_OUTPUT_RESTRICTED}i&&as(t,i)})});let s=await Promise.all([n.generateRequest(a,r).catch(()=>{let e=t6("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),i=new tW(e,tW.MEDIA_ERR_ENCRYPTED,!0);i.errorCategory=tP.DRM,i.muxCode=tU.ENCRYPTED_GENERATE_REQUEST_FAILED,as(t,i)}),new Promise(e=>{n.addEventListener("message",t=>{e(t.message)},{once:!0})})]).then(([,e])=>e),o=await ae(s,at(e,"fairplay")).catch(t=>{if(t instanceof Response){let i=iT(t,tP.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=t6("Failed to update DRM license. This may be an issue with the player or your protected content."),t=new tW(e,tW.MEDIA_ERR_ENCRYPTED,!0);return t.errorCategory=tP.DRM,t.muxCode=tU.ENCRYPTED_UPDATE_LICENSE_FAILED,Promise.reject(t)})}catch(e){as(t,e);return}})})(e,t):tJ(t,"encrypted",()=>{let e=new tW(t6("Attempting to play DRM-protected content without providing a DRM token."),tW.MEDIA_ERR_ENCRYPTED,!0);e.errorCategory=tP.DRM,e.muxCode=tU.ENCRYPTED_MISSING_TOKEN,as(t,e)},{once:!0}),t.setAttribute("src",s),e.startTime&&((null!=(r=iK.get(t))?r:{}).startTime=e.startTime,t.addEventListener("durationchange",ar,{once:!0}))}else t.removeAttribute("src");t.addEventListener("error",an),t.addEventListener("error",ao),t.addEventListener("emptied",()=>
42{t.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})},{once:!0}),tJ(t,"pause",l),tJ(t,"seeked",l),tJ(t,"play",()=>{t.ended||i2(t.currentTime,t.duration)&&(t.currentTime=t.seekable.length?t.seekable.start(0):0)})}else i&&s?(i.once(tN.Events.LEVEL_LOADED,(e,a)=>{((e,t,i)=>{var a,r,n,s,o,l,d,u;let{streamType:c,targetLiveWindow:h,liveEdgeStartOffset:p,lowLatency:v}=(e=>{var t;let i=e.type,a=t2(i),r=t3(i),n,s=!!(null!=(t=e.partList)&&t.length);return a===t$.LIVE&&(n=s?2*e.partTarget:3*e.targetduration),{streamType:a,targetLiveWindow:r,liveEdgeStartOffset:n,lowLatency:s}})(e);if(c===t$.LIVE){v?(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=iK.get(t))?o:{}).seekable=e}(null!=(l=iK.get(t))?l:{}).liveEdgeStartOffset=p,(null!=(d=iK.get(t))?d:{}).targetLiveWindow=h,t.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),(null!=(u=iK.get(t))?u:{}).streamType=c,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))})(a.details,t,i),c(),iJ(t)!==t$.LIVE||Number.isFinite(t.duration)||(i.on(tN.Events.LEVEL_UPDATED,c),tJ(t,"durationchange",()=>{Number.isFinite(t.duration)&&i.off(tN.Events.LEVELS_UPDATED,c)}))}),i.on(tN.Events.ERROR,(a,r)=>{var n,s;let o=a_(r,e);if(o.muxCode===tU.NETWORK_NOT_READY){let e=null!=(n=iK.get(t))?n:{},a=null!=(s=e.retryCount)?s:0;if(a<6){let n=0===a?5e3:6e4,s=new tW(`Retrying in ${n/1e3} seconds...`,o.code,o.fatal);Object.assign(s,o),as(t,s),setTimeout(()=>{e.retryCount=a+1,"manifestLoadError"===r.details&&r.url&&i.loadSource(r.url)},n);return}{e.retryCount=0;let i=new tW('Try again later or <a href="#" onclick="window.location.reload(); return false;" style="color: #4a90e2;">click here to retry</a>',o.code,o.fatal);Object.assign(i,o),as(t,i);return}}as(t,o)}),i.on(tN.Events.MANIFEST_LOADED,()=>{let e=iK.get(t);e&&e.error&&(e.error=null,e.retryCount=0,t.dispatchEvent(new Event("emptied")),t.dispatchEvent(new Event("loadstart")))}),t.addEventListener("error",ao),tJ(t,"waiting",l),function(e,t){var i;if(!("videoTracks"in e))return;let a=new WeakMap;t.on(tN.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(tN.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(tN.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",e=>{let i=e.target.selectedIndex;i!=t.nextLevel&&(t.nextLevel=i)});let r=()=>{for(let t of e.audioTracks)e.removeAudioTrack(t)},n=()=>{(()=>{for(let t of e.videoTracks)e.removeVideoTrack(t)})(),r()};t.once(tN.Events.DESTROYING,n)}(e,i),function(e,t){t.on(tN.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}`;ir(e,i.kind,i.label,null==n?void 0:n.lang,o,i.default)})});let i=()=>
42{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}(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(tN.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(tN.Events.DESTROYING,()=>{e.textTracks.removeEventListener("change",i),e.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})});let a=()=>
42{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(tN.Events.MANIFEST_LOADED,a),t.once(tN.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),im(t),i_(t);let h=((e,t,i)=>{let{autoplay:a}=e,r=!1,n=!1,s=it(a)?a:!!a,o=()=>{r||tJ(t,"playing",()=>{r=!0},{once:!0})};if(o(),tJ(t,"loadstart",()=>{r=!1,o(),ii(t,s)},{once:!0}),tJ(t,"loadstart",()=>{i||(n=e.streamType&&e.streamType!==t$.UNKNOWN?e.streamType===t$.LIVE:!Number.isFinite(t.duration)),ii(t,s)},{once:!0}),i&&i.once(tN.Events.LEVEL_LOADED,(t,i)=>{var a;n=e.streamType&&e.streamType!==t$.UNKNOWN?e.streamType===t$.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&&tJ(t,"play",()=>{"metadata"===t.preload?i.once(tN.Events.LEVEL_UPDATED,a):a()},{once:!0})}return e=>{r||ii(t,s=it(e)?e:!!e)}})(e,t,u);return{engine:u,setAutoplay:h,setPreload:c}})(this,this.nativeEl,ak(this,al)))}unload(){i5(this.nativeEl,ak(this,al),this),aS(this,al,void 0)}attributeChangedCallback(e,t,i){var a,r;switch(ay.lB.observedAttributes.includes(e)&&!["src","autoplay","preload"].includes(e)&&super.attributeChangedCallback(e,t,i),e){case aC.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=null!=i?i:void 0;break;case aC.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=null!=i?i:void 0;break;case"src":{let e=!!t,a=!!i;!e&&a?aI(this,ag,af).call(this):e&&!a?this.unload():e&&a&&(this.unload(),aI(this,ag,af).call(this));break}
42case"autoplay":if(i===t)break;null==(a=ak(this,al))||a.setAutoplay(this.autoplay);break;case"preload":if(i===t)break;null==(r=ak(this,al))||r.setPreload(i);break;case aC.PLAYBACK_ID:this.src=iQ(this);break;case aC.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 aC.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 aC.STREAM_TYPE:(null==i||i!==t)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case aC.TARGET_LIVE_WINDOW:(null==i||i!==t)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;case aC.LOGO:(null==i||i!==t)&&this.updateLogo()}}updateLogo(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector('slot[name="logo"]');e&&(e.innerHTML=this.constructor.getLogoHTML(ak(this,ab)||this.logo))}connectedCallback(){var e;null==(e=super.connectedCallback)||e.call(this),this.nativeEl&&this.src&&!ak(this,al)&&aI(this,ag,af).call(this)}disconnectedCallback(){this.unload()}handleEvent(e){e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{composed:!0,detail:e.detail}))}};al=new WeakMap,ad=new WeakMap,au=new WeakMap,ac=new WeakMap,ah=new WeakMap,am=new WeakMap,ap=new WeakMap,av=new WeakMap,aE=new WeakMap,ab=new WeakMap,ag=new WeakSet,af=async function(){ak(this,ad)||(await aS(this,ad,Promise.resolve()),aS(this,ad,null),this.load())};let ax=new WeakMap;class aN extends Error{}class aP extends Error{}let aU=["application/x-mpegURL","application/vnd.apple.mpegurl","audio/mpegurl"];function aB(){return globalThis.cast?.framework?.CastContext.getInstance()}function aH(){return aB()?.getCurrentSession()}function aW(){return aH()?.getSessionObj().media[0]}function aV(e){return aB().setOptions({...aF(),...e})}function aF(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}async function a$(e){try{let t=(await fetch(e,{method:"HEAD"})).headers.get("Content-Type");return aU.some(e=>t===e)}catch(e){return console.error("Error while trying to get the Content-Type of the manifest",e),!1}}async function aK(e){try{let i=await (await fetch(e)).text(),a=i,r=function(e){let t=e.split("\n"),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("\n").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}}let aq=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),aY=new WeakSet;!function(e){globalThis.chrome?.cast?.isAvailable?globalThis.cast?.framework?e():customElements.whenDefined("google-cast-button").then(e):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(e)}}(()=>{if(!globalThis.chrome?.cast?.isAvailable)return void console.debug("chrome.cast.isAvailable",globalThis.chrome?.cast?.isAvailable);a||(a=cast.framework,aB().addEventListener(a.CastContextEventType.CAST_STATE_CHANGED,e=>{aq.forEach(t=>ax.get(t).onCastStateChanged?.(e))}),aB().addEventListener(a.CastContextEventType.SESSION_STATE_CHANGED,e=>{aq.forEach(t=>ax.get(t).onSessionStateChanged?.(e))}),aq.forEach(e=>ax.get(e).init?.()))});let aG=0;class aj extends EventTarget{#e;#t;#i;#a;#r="disconnected";#n=!1;#s=new Set;#o=new WeakMap;constructor(e){super(),this.#e=e,aq.add(this),ax.set(this,{init:()=>this.#l(),onCastStateChanged:()=>this.#d(),onSessionStateChanged:()=>this.#u(),getCastPlayer:()=>this.#c}),this.#l()}get #c(){if(aY.has(this.#e))return this.#i}get state(){return this.#r}async watchAvailability(e){if(this.#e.disableRemotePlayback)throw new aN("disableRemotePlayback attribute is present.");return this.#o.set(e,++aG),this.#s.add(e),queueMicrotask(()=>e(this.#h())),aG}async cancelWatchAvailability(e){if(this.#e.disableRemotePlayback)throw new aN("disableRemotePlayback attribute is present.");e?this.#s.delete(e):this.#s.clear()}async prompt(){if(this.#e.disableRemotePlayback)throw new aN("disableRemotePlayback attribute is present.");if(!globalThis.chrome?.cast?.isAvailable)throw new aP("The RemotePlayback API is disabled on this platform.");let e=aY.has(this.#e);aY.add(this.#e),aV(this.#e.castOptions),Object.entries(this.#a).forEac
42h(([e,t])=>{this.#i.controller.addEventListener(e,t)});try{await aB().requestSession()}catch(t){if(e||aY.delete(this.#e),"cancel"===t)return;throw Error(t)}ax.get(this.#e)?.loadOnPrompt?.()}#m(){aY.has(this.#e)&&(Object.entries(this.#a).forEach(([e,t])=>{this.#i.controller.removeEventListener(e,t)}),aY.delete(this.#e),this.#e.muted=this.#i.isMuted,this.#e.currentTime=this.#i.savedPlayerState.currentTime,!1===this.#i.savedPlayerState.isPaused&&this.#e.play())}#h(){let e=aB()?.getCastState();return e&&"NO_DEVICES_AVAILABLE"!==e}#d(){let e=aB().getCastState();if(aY.has(this.#e)&&"CONNECTING"===e&&(this.#r="connecting",this.dispatchEvent(new Event("connecting"))),!this.#n&&e?.includes("CONNECT"))for(let e of(this.#n=!0,this.#s))e(!0);else if(this.#n&&(!e||"NO_DEVICES_AVAILABLE"===e))for(let e of(this.#n=!1,this.#s))e(!1)}async #u(){let{SESSION_RESUMED:e}=a.SessionState;if(aB().getSessionState()===e&&this.#e.castSrc===aW()?.media.contentId){aY.add(this.#e),Object.entries(this.#a).forEach(([e,t])=>{this.#i.controller.addEventListener(e,t)});try{var t;await (t=new chrome.cast.media.GetStatusRequest,new Promise((e,i)=>{aW().getStatus(t,e,i)}))}catch(e){console.error(e)}this.#a[a.RemotePlayerEventType.IS_PAUSED_CHANGED](),this.#a[a.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}}#l(){a&&!this.#t&&(this.#t=!0,aV(this.#e.castOptions),this.#e.textTracks.addEventListener("change",()=>this.#p()),this.#d(),this.#i=new a.RemotePlayer,new a.RemotePlayerController(this.#i),this.#a={[a.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:e})=>{!0===e?(this.#r="connected",this.dispatchEvent(new Event("connect"))):(this.#m(),this.#r="disconnected",this.dispatchEvent(new Event("disconnect")))},[a.RemotePlayerEventType.DURATION_CHANGED]:()=>{this.#e.dispatchEvent(new Event("durationchange"))},[a.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{this.#e.dispatchEvent(new Event("volumechange"))},[a.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{this.#e.dispatchEvent(new Event("volumechange"))},[a.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{this.#c?.isMediaLoaded&&this.#e.dispatchEvent(new Event("timeupdate"))},[a.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{this.#e.dispatchEvent(new Event("resize"))},[a.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{this.#e.dispatchEvent(new Event(this.paused?"pause":"play"))},[a.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{this.#c?.playerState!==chrome.cast.media.PlayerState.PAUSED&&this.#e.dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[this.#c?.playerState]))},[a.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{this.#c?.isMediaLoaded&&(await Promise.resolve(),this.#v())}})}#v(){this.#p()}async #p(){let e;if(!this.#c)return;let t=(this.#i.mediaInfo?.tracks??[]).filter(({type:e})=>e===chrome.cast.media.TrackType.TEXT),i=[...this.#e.textTracks].filter(({kind:e})=>"subtitles"===e||"captions"===e),a=t.map(({language:e,name:t,trackId:a})=>{let{mode:r}=i.find(i=>i.language===e&&i.label===t)??{};return!!r&&{mode:r,trackId:a}}).filter(Boolean),r=a.filter(({mode:e})=>"showing"!==e).map(({trackId:e})=>e),n=a.find(({mode:e})=>"showing"===e),s=aH()?.getSessionObj().media[0]?.activeTrackIds??[],o=s;if(s.length&&(o=o.filter(e=>!r.includes(e))),n?.trackId&&(o=[...o,n.trackId]),e=o=[...new Set(o)],!(s.length===e.length&&s.every(t=>e.includes(t))))try{let e=new chrome.cast.media.EditTracksInfoRequest(o);await new Promise((t,i)=>{aW().editTracksInfo(e,t,i)})}catch(e){console.error(e)}}}let aQ=e=>class extends e{static observedAttributes=[...e.observedAttributes??[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"];#E={paused:!1};#b=aF();#g;#f;get remote(){return this.#f?this.#f:globalThis.chrome?(this.disableRemotePlayback||function(){let e="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if(globalThis.chrome?.cast||document.querySelector(`script[src="${e}"]`))return;let t=document.createElement("script");t.src=e,document.head.append(t)}(),ax.set(this,{loadOnPrompt:()=>this.#_()}),this.#f=new aj(this)):super.remote}get #c(){return ax.get(this.remote)?.getCastPlayer?.()}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),"cast-receiver"===e&&i){this.#b.receiverApplicationId=i;return}if(this.#c)switch(e){case"cast-stream-type":case"cast-src":this.load()}}
42async #_(){this.#E.paused=super.paused,super.pause(),this.muted=super.muted;try{await this.load()}catch(e){console.error(e)}}async load(){if(!this.#c)return super.load();let e=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType);e.customData=this.castCustomData;let t=[...this.querySelectorAll("track")].filter(({kind:e,src:t})=>t&&("subtitles"===e||"captions"===e)),i=[],a=0;if(t.length&&(e.tracks=t.map(e=>{let t=++a;0===i.length&&"showing"===e.track.mode&&i.push(t);let r=new chrome.cast.media.Track(t,chrome.cast.media.TrackType.TEXT);return r.trackContentId=e.src,r.trackContentType="text/vtt",r.subtype="captions"===e.kind?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,r.name=e.label,r.language=e.srclang,r})),"live"===this.castStreamType?e.streamType=chrome.cast.media.StreamType.LIVE:e.streamType=chrome.cast.media.StreamType.BUFFERED,e.metadata=new chrome.cast.media.GenericMediaMetadata,e.metadata.title=this.title,e.metadata.images=[{url:this.poster}],a$(this.castSrc)){let t=await aK(this.castSrc);t?.includes("m4s")||t?.includes("mp4")?(e.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.FMP4,e.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.FMP4):t?.includes("ts")&&(e.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.TS,e.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.TS)}let r=new chrome.cast.media.LoadRequest(e);r.currentTime=super.currentTime??0,r.autoplay=!this.#E.paused,r.activeTrackIds=i,await aH()?.loadMedia(r),this.dispatchEvent(new Event("volumechange"))}play(){if(this.#c){this.#c.isPaused&&this.#c.controller?.playOrPause();return}return super.play()}pause(){if(this.#c){this.#c.isPaused||this.#c.controller?.playOrPause();return}super.pause()}get castOptions(){return this.#b}get castReceiver(){return this.getAttribute("cast-receiver")??void 0}set castReceiver(e){this.castReceiver!=e&&this.setAttribute("cast-receiver",`${e}`)}get castSrc(){return this.getAttribute("cast-src")??this.querySelector("source")?.src??this.currentSrc}set castSrc(e){this.castSrc!=e&&this.setAttribute("cast-src",`${e}`)}get castContentType(){return this.getAttribute("cast-content-type")??void 0}set castContentType(e){this.setAttribute("cast-content-type",`${e}`)}get castStreamType(){return this.getAttribute("cast-stream-type")??this.streamType??void 0}set castStreamType(e){this.setAttribute("cast-stream-type",`${e}`)}get castCustomData(){return this.#g}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}`);this.#g=e}get readyState(){if(this.#c)switch(this.#c.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 this.#c?this.#c.isPaused:super.paused}get muted(){return this.#c?this.#c?.isMuted:super.muted}set muted(e){if(this.#c){(e&&!this.#c.isMuted||!e&&this.#c.isMuted)&&this.#c.controller?.muteOr
42Unmute();return}super.muted=e}get volume(){return this.#c?this.#c?.volumeLevel??1:super.volume}set volume(e){if(this.#c){this.#c.volumeLevel=+e,this.#c.controller?.setVolumeLevel();return}super.volume=e}get duration(){return this.#c&&this.#c?.isMediaLoaded?this.#c?.duration??NaN:super.duration}get currentTime(){return this.#c&&this.#c?.isMediaLoaded?this.#c?.currentTime??0:super.currentTime}set currentTime(e){if(this.#c){this.#c.currentTime=e,this.#c.controller?.seek();return}super.currentTime=e}};var aZ=i(90733),az=e=>{throw TypeError(e)},aX=(e,t,i)=>t.has(e)||az("Cannot "+i),aJ=(e,t,i)=>(aX(e,t,"read from private field"),i?i.call(e):t.get(e)),a0=(e,t,i)=>t.has(e)?az("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),a1=(e,t,i,a)=>(aX(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),a2=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("undefined"==typeof DocumentFragment){class e extends a2{}globalThis.DocumentFragment=e}var a3,a4=class extends a2{},a5=class{constructor(e,t={}){a0(this,a3),a1(this,a3,null==t?void 0:t.detail)}get detail(){return aJ(this,a3)}initCustomEvent(){}};a3=new WeakMap;var a9={document:{createElement:function(e,t){return new a4}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(a4)},CustomEvent:a5,EventTarget:a2,HTMLElement:a4,HTMLVideoElement:class extends a2{}},a8="undefined"==typeof window||void 0===globalThis.customElements,a6=a8?a9:globalThis;a8?a9.document:globalThis.document;var a7,re=class extends aQ((0,aZ.u6)(aO)){constructor(){super(...arguments),a0(this,a7)}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 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=aJ(this,a7))?e:this.muxCastCustomData}set castCustomData(e){a1(this,a7,e)}};a7=new WeakMap,a6.customElements.get("mux-video")||(a6.customElements.define("mux-video",re),a6.MuxVideoElement=re);let rt={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:"mediashowtexttracksrequest",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"},ri={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},ra={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:"mediaChapter
42sCues",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_PLAYED:"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_LANG:"mediaLang",MEDIA_WIDTH:"mediaWidth"},rr=Object.entries(ra),rn=rr.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{}),rs=rr.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"});Object.entries(rs).reduce((e,[t,i])=>{let a=rn[t];return a&&(e[i]=a),e},{userinactivechange:"userinactive"});let ro=Object.entries(rn).reduce((e,[t,i])=>{let a=rs[t];return a&&(e[i]=a),e},{userinactive:"userinactivechange"}),rl={SUBTITLES:"subtitles",CAPTIONS:"captions",CHAPTERS:"chapters",METADATA:"metadata"},rd={DISABLED:"disabled",SHOWING:"showing"},ru={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},rc={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},rh={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},rm={FULLSCREEN:"fullscreen"};function rp(e){if(e){let{id:t,width:i,height:a}=e;return[t,i,a].filter(e=>null!=e).join(":")}}function rv(e){if(e){let[t,i,a]=e.split(":");return{id:t,width:+i,height:+a}}}function rE(e){if(e){let{id:t,kind:i,language:a,label:r}=e;return[t,i,a,r].filter(e=>null!=e).join(":")}}function rb(e){if(e){let[t,i,a,r]=e.split(":");return{id:t,kind:i,language:a,label:r}}}function rg(e){return"number"==typeof e&&!Number.isNaN(e)&&Number.isFinite(e)}function rf(e){return"string"==typeof e&&!isNaN(e)&&!isNaN(parseFloat(e))}let r_=e=>new Promise(t=>setTimeout(t,e)),ry=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],rT=e=>{if(!rg(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?ry[t].singular:ry[t].plural;return`${e} ${i}`})(e,t)).filter(e=>e).join(", ");return`${r}${i?" remaining":""}`};function rA(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 rk={en:{"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",Auto:"Auto","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","chapter: {chapterName}":"chapter: {chapterName}",live:"live",Off:"Off","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
42ource 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."}},rw=(null==(dY=globalThis.navigator)?void 0:dY.language)||"en",rS=(e,t={})=>(e=>{var t,i,a;let[r]=rw.split("-");return(null==(t=rk[rw])?void 0:t[e])||(null==(i=rk[r])?void 0:i[e])||(null==(a=rk.en)?void 0:a[e])||e})(e).replace(/\{(\w+)\}/g,(e,i)=>i in t?String(t[i]):`{${i}}`);class rI{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}}class rR extends rI{}class rD extends rR{constructor(){super(...arguments),this.role=null}}class rC{observe(){}unobserve(){}disconnect(){}}let rL={createElement:function(){return new rM.HTMLElement},createElementNS:function(){return new rM.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent:e=>!1},rM={ResizeObserver:rC,document:rL,Node:rR,Element:rD,HTMLElement:class extends rD{constructor(){super(...arguments),this.innerHTML=""}get content(){return new rM.DocumentFragment}},DocumentFragment:class extends rI{},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}),DOMParser:class{parseFromString(e,t){return{body:{textContent:e}}}}},rO="undefined"==typeof window||void 0===window.customElements,rx=Object.keys(rM).every(e=>e in globalThis),rN=rO&&!rx?rM:globalThis,rP=rO&&!rx?rL:globalThis.document,rU=new WeakMap,rB=e=>{let t=rU.get(e);return t||rU.set(e,t=new Set),t},rH=new rN.ResizeObserver(e=>{for(let t of e)for(let e of rB(t.target))e(t)});function rW(e,t){rB(e).add(t),rH.observe(e)}function rV(e,t){let i=rB(e);i.delete(t),i.size||rH.unobserve(e)}function rF(e){let t={};for(let i of e)t[i.name]=i.value;return t}function r$(e){var t;return null!=(t=rK(e))?t:rj(e,"media-controller")}function rK(e){var t;let{MEDIA_CONTROLLER:i}=ri,a=e.getAttribute(i);if(a)return null==(t=rZ(e))?void 0:t.getElementById(a)}let rq=(e,t,i=".value")=>{let a=e.querySelector(i);a&&(a.textContent=t)},rY=(e,t)=>((e,t)=>{let i=`slot[name="${t}"]`,a=e.shadowRoot.querySelector(i);return a?a.children:[]})(e,t)[0],rG=(e,t)=>!!e&&!!t&&(null!=e&&!!e.contains(t)||rG(e,t.getRootNode().host)),rj=(e,t)=>{if(!e)return null;let i=e.closest(t);return i||rj(e.getRootNode().host,t)};function rQ(e=document){var t;let i=null==e?void 0:e.activeElement;return i?null!=(t=rQ(i.shadowRoot))?t:i:null}function rZ(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 rz(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 rX(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||rJ(e,t)}function rJ(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 r0(e,t,i=NaN){let a=e.getAttribute(t);return null!=a?+a:i}function r1(e,t,i){let a=+i;
42if(null==i||Number.isNaN(a)){e.hasAttribute(t)&&e.removeAttribute(t);return}r0(e,t,void 0)!==a&&e.setAttribute(t,`${a}`)}function r2(e,t){return e.hasAttribute(t)}function r3(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}r2(e,t)!=i&&e.toggleAttribute(t,i)}function r4(e,t,i=null){var a;return null!=(a=e.getAttribute(t))?a:i}function r5(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}let a=`${i}`;r4(e,t,void 0)!==a&&e.setAttribute(t,a)}var r9=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},r8=(e,t,i)=>(r9(e,t,"read from private field"),i?i.call(e):t.get(e)),r6=(e,t,i,a)=>(r9(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class r7 extends rN.HTMLElement{constructor(){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,dG,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rF(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[ri.MEDIA_CONTROLLER,rn.MEDIA_PAUSED]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===ri.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=r8(this,dG))?void 0:a.unassociateElement)||r.call(a,this),r6(this,dG,null)),i&&this.isConnected&&(r6(this,dG,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=r8(this,dG))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i,a;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),r6(this,dG,function(e){var t;let i=e.getAttribute(ri.MEDIA_CONTROLLER);return i?null==(t=e.getRootNode())?void 0:t.getElementById(i):rj(e,"media-controller")}(this)),this.getAttribute(ri.MEDIA_CONTROLLER)&&(null==(t=null==(e=r8(this,dG))?void 0:e.associateElement)||t.call(e,this)),null==(i=r8(this,dG))||i.addEventListener("pointerdown",this),null==(a=r8(this,dG))||a.addEventListener("click",this)}disconnectedCallback(){var e,t,i,a;this.getAttribute(ri.MEDIA_CONTROLLER)&&(null==(t=null==(e=r8(this,dG))?void 0:e.unassociateElement)||t.call(e,this)),null==(i=r8(this,dG))||i.removeEventListener("pointerdown",this),null==(a=r8(this,dG))||a.removeEventListener("click",this),r6(this,dG,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 d=this._pointerType||"mouse";if(this._pointerType=void 0,d===ru.TOUCH)return void this.handleTap(e);if(d===ru.MOUSE||d===ru.PEN)return void this.handleMouseClick(e)}}}get mediaPaused(){return r2(this,rn.MEDIA_PAUSED)}set mediaPaused(e){r3(this,rn.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let t=this.mediaPaused?rt.MEDIA_PLAY_REQUEST:rt.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new rN.CustomEvent(t,{composed:!0,bubbles:!0}))}}dG=new WeakMap,r7.shadowRootOptions={mode:"open"},r7.getTemplateHTML=function(e){return`
43    <style>
44      :host {
45        display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));
46        box-sizing: border-box;
47      }
48    </style>
49  `},rN.customElements.get("media-gesture-receiver")||rN.customElements.define("media-gesture-receiver",r7);var ne=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nt=(e,t,i)=>(ne(e,t,"read from private field"),i?i.call(e):t.get(e)),ni=(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)},na=(e,t,i,a)=>(ne(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),nr=(e,t,i)=>(ne(e,t,"access private method"),i);let nn={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"},ns=Object.values(rn);function no(e,t){var i,a,r;if(!e.isConnected)return;let n=Object.fromEntries((null!=(i=e.getAttribute(nn.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;
49if(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(rs.BREAKPOINTS_CHANGE,{detail:s});e.dispatchEvent(t)}e.breakpointsComputed||(e.breakpointsComputed=!0,e.dispatchEvent(new CustomEvent(rs.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}class nl extends rN.HTMLElement{constructor(){if(super(),ni(this,dJ),ni(this,d3),ni(this,d5),ni(this,d8),ni(this,d7),ni(this,ut),ni(this,dj,0),ni(this,dQ,null),ni(this,dZ,null),ni(this,dz,void 0),this.breakpointsComputed=!1,ni(this,dX,new MutationObserver(nr(this,dJ,d0).bind(this))),ni(this,d1,!1),ni(this,d2,e=>{nt(this,d1)||(setTimeout(()=>{!function(e){no(e.target,e.contentRect.width)}(e),na(this,d1,!1)},0),na(this,d1,!0))}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rF(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}let e=this.querySelector(":scope > slot[slot=media]");e&&e.addEventListener("slotchange",()=>{if(!e.assignedElements({flatten:!0}).length){nt(this,dQ)&&this.mediaUnsetCallback(nt(this,dQ));return}this.handleMediaUpdated(this.media)})}static get observedAttributes(){return[nn.AUTOHIDE,nn.GESTURES_DISABLED].concat(ns).filter(e=>![rn.MEDIA_RENDITION_LIST,rn.MEDIA_AUDIO_TRACK_LIST,rn.MEDIA_CHAPTERS_CUES,rn.MEDIA_WIDTH,rn.MEDIA_HEIGHT,rn.MEDIA_ERROR,rn.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,t,i){e.toLowerCase()==nn.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&&(na(this,dQ,e),e.localName.includes("-")&&await rN.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;nt(this,dX).observe(this,{childList:!0,subtree:!0}),rW(this,nt(this,d2));let t=null!=this.getAttribute(nn.AUDIO)?rS("audio player"):rS("video player");this.setAttribute("role","region"),this.setAttribute("aria-label",t),this.handleMediaUpdated(this.media),this.setAttribute(nn.USER_INACTIVE,""),no(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=rN.window)||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;nt(this,dX).disconnect(),rV(this,nt(this,d2)),this.media&&this.mediaUnsetCallback(this.media),null==(e=rN.window)||e.removeEventListener("mouseup",this)}mediaSetCallback(e){}mediaUnsetCallback(e){na(this,dQ,null)}handleEvent(e){switch(e.type){case"pointerdown":na(this,dj,e.timeStamp);break;case"pointermove":nr(this,d3,d4).call(this,e);break;case"pointerup":nr(this,d5,d9).call(this,e);break;case"mouseleave":nr(this,d8,d6).call(this);break;case"mouseup":this.removeAttribute(nn.KEYBOARD_CONTROL);break;case"keyup":nr(this,ut,ui).call(this),this.setAttribute(nn.KEYBOARD_CONTROL,"")}}set autohide(e){let t=Number(e);na(this,dz,isNaN(t)?0:t)}get autohide(){return(void 0===nt(this,dz)?2:nt(this,dz)).toString()}get breakpoints(){return r4(this,nn.BREAKPOINTS)}set breakpoints(e){r5(this,nn.BREAKPOINTS,e)}get audio(){return r2(this,nn.AUDIO)}set audio(e){r3(this,nn.AUDIO,e)}get gesturesDisabled(){return r2(this,nn.GESTURES_DISABLED)}set gesturesDisabled(e){r3(this,nn.GESTURES_DISABLED,e)}get keyboardControl(){return r2(this,nn.KEYBOARD_CONTROL)}set keyboardControl(e){r3(this,nn.KEYBOARD_CONTROL,e)}get noAutohide(){return r2(this,nn.NO_AUTOHIDE)}set noAutohide(e){r3(this,nn.NO_AUTOHIDE,e)}get autohideOverControls(){return r2(this,nn.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){r3(this,nn.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return r2(this,nn.USER_INACTIVE)}set userInteractive(e){r3(this,nn.USER_INACTIVE,e)}}dj=new WeakMap,dQ=new WeakMap,dZ=new WeakMap,dz=new WeakMap,dX=new WeakMap,dJ=new WeakSet,d0=function(e){let t=this.media;for(let i of e)if("childList"===i.type){for(let e of i.removedNodes
49){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)}},d1=new WeakMap,d2=new WeakMap,d3=new WeakSet,d4=function(e){if("mouse"!==e.pointerType&&e.timeStamp-nt(this,dj)<250)return;nr(this,d7,ue).call(this),clearTimeout(nt(this,dZ));let t=this.hasAttribute(nn.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(e.target)||t)&&nr(this,ut,ui).call(this)},d5=new WeakSet,d9=function(e){if("touch"===e.pointerType){let t=!this.hasAttribute(nn.USER_INACTIVE);[this,this.media].includes(e.target)&&t?nr(this,d8,d6).call(this):nr(this,ut,ui).call(this)}else e.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(null==e?void 0:e.localName))&&nr(this,ut,ui).call(this)},d8=new WeakSet,d6=function(){if(0>nt(this,dz)||this.hasAttribute(nn.USER_INACTIVE))return;this.setAttribute(nn.USER_INACTIVE,"");let e=new rN.CustomEvent(rs.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(e)},d7=new WeakSet,ue=function(){if(!this.hasAttribute(nn.USER_INACTIVE))return;this.removeAttribute(nn.USER_INACTIVE);let e=new rN.CustomEvent(rs.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(e)},ut=new WeakSet,ui=function(){nr(this,d7,ue).call(this),clearTimeout(nt(this,dZ));let e=parseInt(this.autohide);e<0||na(this,dZ,setTimeout(()=>{nr(this,d8,d6).call(this)},1e3*e))},nl.shadowRootOptions={mode:"open"},nl.getTemplateHTML=function(e){return`
50    <style>
51      
52      :host([${rn.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {
53        outline: none;
54      }
55
56      :host {
57        box-sizing: border-box;
58        position: relative;
59        display: inline-block;
60        line-height: 0;
61        background-color: var(--media-background-color, #000);
62        overflow: hidden;
63      }
64
65      :host(:not([${nn.AUDIO}])) [part~=layer]:not([part~=media-layer]) {
66        position: absolute;
67        top: 0;
68        left: 0;
69        bottom: 0;
70        right: 0;
71        display: flex;
72        flex-flow: column nowrap;
73        align-items: start;
74        pointer-events: none;
75        background: none;
76      }
77
78      slot[name=media] {
79        display: var(--media-slot-display, contents);
80      }
81
82      
83      :host([${nn.AUDIO}]) slot[name=media] {
84        display: var(--media-slot-display, none);
85      }
86
87      
88      :host([${nn.AUDIO}]) [part~=layer][part~=gesture-layer] {
89        height: 0;
90        display: block;
91      }
92
93      
94      :host(:not([${nn.AUDIO}])[${nn.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]),
95          :host(:not([${nn.AUDIO}])[${nn.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] {
96        display: none;
97      }
98
99      
100      ::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([role=dialog]):not([hidden])) {
101        pointer-events: auto;
102      }
103
104      :host(:not([${nn.AUDIO}])) *[part~=layer][part~=centered-layer] {
105        align-items: center;
106        justify-content: center;
107      }
108
109      :host(:not([${nn.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]),
110      :host(:not([${nn.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] {
111        align-self: stretch;
112        flex-grow: 1;
113      }
114
115      slot[name=middle-chrome] {
116        display: inline;
117        flex-grow: 1;
118        pointer-events: none;
119        background: none;
120      }
121
122      
123      ::slotted([slot=media]),
124      ::slotted([slot=poster]) {
125        width: 100%;
126        height: 100%;
127      }
128
129      
130      :host(:not([${nn.AUDIO}])) .spacer {
131        flex-grow: 1;
132      }
133
134      
135      :host(:-webkit-full-screen) {
136        
137        width: 100% !important;
138        height: 100% !important;
139      }
140
141      
142      ::slotted(:not([slot=media]):not([slot=poster]):not([${nn.NO_AUTOHIDE}]):not([hidden]):not([role=dialog])) {
143        opacity: 1;
144        transition: var(--media-control-transition-in, opacity 0.25s);
145      }
146
147      
148      :host([${nn.USER_INACTIVE}]:not([${rn.MEDIA_PAUSED}]):not([${rn.MEDIA_IS_AIRPLAYING}]):not([${rn.MEDIA_IS_CASTING}]):not([${nn.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${nn.NO_AUTOHIDE}]):not([role=dialog])) {
149        opacity: 0;
150        transition: var(--media-control-transition-out, opacity 1s);
151      }
152
153      :host([${nn.USER_INACTIVE}]:not([${nn.NO_AUTOHIDE}]):not([${rn.MEDIA_PAUSED}]):not([${rn.MEDIA_IS_CASTING}]):not([${nn.AUDIO}])) ::slotted([slot=media]) {
154        cursor: none;
155      }
156
157      :host([${nn.USER_INACTIVE}][${nn.AUTOHIDE_OVER_CONTROLS}]:not([${nn.NO_AUTOHIDE}]):not([${rn.MEDIA_PAUSED}]):not([${rn.MEDIA_IS_CASTING}]):not([${nn.AUDIO}])) * {
158        --media-cursor: none;
159        cursor: none;
160      }
161
162
163      ::slotted(media-control-bar)  {
164        align-self: stretch;
165      }
166
167      
168      :host(:not([${nn.AUDIO}])[${rn.MEDIA_HAS_PLAYED}]) slot[name=poster] {
169        display: none;
170      }
171
172      ::slotted([role=dialog]) {
173        width: 100%;
174        height: 100%;
175        align-self: center;
176      }
177
178      ::slotted([role=menu]) {
179        align-self: end;
180      }
181    </style>
182
183    <slot name="media" part="layer media-layer"></slot>
184    <slot name="poster" part="layer poster-layer"></slot>
185    <slot name="gestures-chrome" part="layer gesture-layer">
186      <media-gesture-receiver slot="gestures-chrome">
187        <template shadowrootmode="${r7.shadowRootOptions.mode}">
188          ${r7.getTemplateHTML({})}
189        </template>
190      </media-gesture-receiver>
191    </slot>
192    <span part="layer vertical-layer">
193      <slot name="top-chrome" part="top chrome"></slot>
194      <slot name="middle-chrome" part="middle chrome"></slot>
195      <slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot>
196      
197      <slot part="bottom chrome"></slot>
198    </span>
199    <slot name="dialog" part="layer dialog-layer"></slot>
200  `},rN.customElements.get("media-container")||rN.customElements.define("media-container",nl);var nd=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nu=(e,t,i)=>(nd(e,t,"read from private field"),i?i.call(e):t.get(e)),nc=(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)},nh=(e,t,i,a)=>(nd(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);
200class nm{constructor(e,t,{defaultValue:i}={defaultValue:void 0}){nc(this,uo),nc(this,ua,void 0),nc(this,ur,void 0),nc(this,un,void 0),nc(this,us,new Set),nh(this,ua,e),nh(this,ur,t),nh(this,un,new Set(i))}[Symbol.iterator](){return nu(this,uo,ul).values()}get length(){return nu(this,uo,ul).size}get value(){var e;return null!=(e=[...nu(this,uo,ul)].join(" "))?e:""}set value(e){var t;e!==this.value&&(nh(this,us,new Set),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return[...nu(this,uo,ul)][e]}values(){return nu(this,uo,ul).values()}forEach(e,t){nu(this,uo,ul).forEach(e,t)}add(...e){var t,i;e.forEach(e=>nu(this,us).add(e)),(""!==this.value||(null==(t=nu(this,ua))?void 0:t.hasAttribute(`${nu(this,ur)}`)))&&(null==(i=nu(this,ua))||i.setAttribute(`${nu(this,ur)}`,`${this.value}`))}remove(...e){var t;e.forEach(e=>nu(this,us).delete(e)),null==(t=nu(this,ua))||t.setAttribute(`${nu(this,ur)}`,`${this.value}`)}contains(e){return nu(this,uo,ul).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}}ua=new WeakMap,ur=new WeakMap,un=new WeakMap,us=new WeakMap,uo=new WeakSet,ul=function(){return nu(this,us).size?nu(this,us):nu(this,un)};let np=(e="")=>{let[t,i,a]=e.split(":"),r=a?decodeURIComponent(a):void 0;return{kind:"cc"===t?rl.CAPTIONS:rl.SUBTITLES,language:i,label:r}},nv=(e="",t={})=>((e="")=>e.split(/\s+/))(e).map(e=>{let i=np(e);return{...t,...i}}),nE=e=>e?Array.isArray(e)?e.map(e=>"string"==typeof e?np(e):e):"string"==typeof e?nv(e):[e]:[],nb=({kind:e,label:t,language:i}={kind:"subtitles"})=>t?`${"captions"===e?"cc":"sb"}:${i}:${encodeURIComponent(t)}`:i,ng=(e=[])=>Array.prototype.map.call(e,nb).join(" "),nf=e=>{let t=Object.entries(e).map(([e,t])=>i=>i[e]===t);return e=>t.every(t=>t(e))},n_=(e,t=[],i=[])=>{let a=nE(i).map(nf);Array.from(t).filter(e=>a.some(t=>t(e))).forEach(t=>{t.mode=e})},ny=(e,t=()=>!0)=>{if(!(null==e?void 0:e.textTracks))return[];let i="function"==typeof t?t:nf(t);return Array.from(e.textTracks).filter(i)},nT=e=>{var t;return!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)||e.hasAttribute(rn.MEDIA_SUBTITLES_SHOWING)},nA="exitFullscreen"in rP?"exitFullscreen":"webkitExitFullscreen"in rP?"webkitExitFullscreen":"webkitCancelFullScreen"in rP?"webkitCancelFullScreen":void 0,nk="fullscreenElement"in rP?"fullscreenElement":"webkitFullscreenElement"in rP?"webkitFullscreenElement":void 0,nw="fullscreenEnabled"in rP?"fullscreenEnabled":"webkitFullscreenEnabled"in rP?"webkitFullscreenEnabled":void 0,nS=()=>{var e;return r||(r=null==(e=null==rP?void 0:rP.createElement)?void 0:e.call(rP,"video"))},nI=async(e=nS())=>{if(!e)return!1;let t=e.volume;e.volume=t/2+.1;let i=new AbortController,a=await Promise.race([nR(e,i.signal),nD(e,t)]);return i.abort(),a},nR=(e,t)=>new Promise(i=>{e.addEventListener("volumechange",()=>i(!0),{signal:t})}),nD=async(e,t)=>{for(let i=0;i<10;i++){if(e.volume===t)return!1;await r_(10)}return e.volume!==t},nC=/.*Version\/.*Safari\/.*/.test(rN.navigator.userAgent),nL=(e=nS())=>(!rN.matchMedia("(display-mode: standalone)").matches||!nC)&&"function"==typeof(null==e?void 0:e.requestPictureInPicture),nM=(e=nS())=>(e=>{let{documentElement:t,media:i}=e;return!!(null==t?void 0:t[nw])||i&&"webkitSupportsFullscreen"in i})({documentElement:rP,media:e}),nO=nM(),nx=nL(),nN=!!rN.WebKitPlaybackTargetAvailabilityEvent,nP=!!rN.chrome,nU=e=>ny(e.media,e=>[rl.SUBTITLES,rl.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),nB=e=>ny(e.media,e=>e.mode===rd.SHOWING&&[rl.SUBTITLES,rl.CAPTIONS].includes(e.kind)),nH=(e,t)=>{let i=nU(e),a=nB(e),r=!!a.length;if(i.length){if(!1===t||r&&!0!==t)n_(rd.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)=>
200a.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;n_(rd.DISABLED,i,a),n_(rd.SHOWING,i,[{language:n,label:s,kind:o}])}}},nW=(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)?nV(e,t):Object.entries(e).every(([e,i])=>e in t&&nW(i,t[e])))),nV=(e,t)=>{let i=Array.isArray(e),a=Array.isArray(t);return i===a&&(!i&&!a||e.length===t.length&&e.every((e,i)=>nW(e,t[i])))},nF=Object.values(rh),n$=nI().then(e=>n=e),nK=async(...e)=>{await Promise.all(e.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof rN.HTMLElement))return;let t=e.localName;if(!t.includes("-"))return;let i=rN.customElements.get(t);i&&e instanceof i||(await rN.customElements.whenDefined(t),rN.customElements.upgrade(e))}))},nq=new rN.DOMParser,nY={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,options:{noMutedPref:a}={}}=t;if(i){i.muted=e;try{let t=null!==rN.localStorage.getItem("media-chrome-pref-muted"),r=i.hasAttribute("muted");if(a){t&&rN.localStorage.removeItem("media-chrome-pref-muted");return}if(r&&!t)return;rN.localStorage.setItem("media-chrome-pref-muted",e?"true":"false")}catch(e){console.debug("Error setting muted pref",e)}}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(e,t)=>{let{options:{noMutedPref:i}}=t,{media:a}=t;if(a&&!a.muted&&!i)try{let i="true"===rN.localStorage.getItem("media-chrome-pref-muted");nY.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,options:{noVolumePref:a}={}}=t;if(i){try{null==e?rN.localStorage.removeItem("media-chrome-pref-volume"):i.hasAttribute("muted")||a||rN.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=rN.localStorage.getItem("media-chrome-pref-volume");if(null==a)return;nY.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&&rg(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=[rh.LIVE,rh.ON_DEMAND].includes(i)?i:void 0;if(!t)return a;let{streamType:r}=t;if(nF.includes(r))return r===rh.UNKNOWN?a:r;let n=t.duration;return n===1/0?rh.LIVE:Number.isFinite(n)?rh.ON_DEMAND:a}
200,mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(e){let{media:t}=e;if(!t)return NaN;let{targetLiveWindow:i}=t,a=nY.mediaStreamType.get(e);return(null==i||Number.isNaN(i))&&a===rh.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(nY.mediaStreamType.get(e)!==rh.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=>nU(e).map(({kind:e,label:t,language:i})=>({kind:e,label:t,language:i})),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get:e=>nB(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&&![rl.CAPTIONS,rl.SUBTITLES].includes(null==(i=null==e?void 0:e.track)?void 0:i.kind)||nH(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]=ny(i,{kind:rl.CHAPTERS});return Array.from(null!=(t=null==a?void 0:a.cues)?t:[]).map(({text:e,startTime:t,endTime:i})=>({text:e&&nq.parseFromString(e,"text/html").body.textContent||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;if(r.pictureInPictureElement instanceof HTMLMediaElement)return!!(null==(t=a.localName)?void 0:t.includes("-"))&&rG(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(!rP.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 rP.pictureInPictureElement&&rP.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.");
200for(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[nk];return!a&&"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&i.webkitDisplayingFullscreen&&i.webkitPresentationMode===rm.FULLSCREEN?i:a})(e);if(!n)return!1;if(n===r||n===i)return!0;if(n.localName.includes("-")){let e=n.shadowRoot;if(!(nk in e))return rG(n,r);for(;null==e?void 0:e[nk];){if(e[nk]===r)return!0;e=null==(t=e[nk])?void 0:t.shadowRoot}}return!1})(e),set(e,t,i){var a;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),i.detail&&(null==(a=t.media)||a.focus())):(e=>{var t;let{documentElement:i}=e;if(nA){let e=null==(t=null==i?void 0:i[nA])?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&&rN.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(!nO||!nM(t))return rc.UNSUPPORTED}},mediaPipUnavailable:{get(e){let{media:t}=e;return nx&&nL(t)?(null==t?void 0:t.disablePictureInPicture)?rc.UNAVAILABLE:void 0:rc.UNSUPPORTED}},mediaVolumeUnavailable:{get(e){let{media:t}=e;if(!1===n||(null==t?void 0:t.volume)==void 0)return rc.UNSUPPORTED},stateOwnersUpdateHandlers:[e=>{null==n&&n$.then(t=>e(t?void 0:rc.UNSUPPORTED))}]},mediaCastUnavailable:{get(e,{availability:t="not-available"}={}){var i;let{media:a}=e;return nP&&(null==(i=null==a?void 0:a.remote)?void 0:i.state)?null!=t&&"available"!==t?rc.UNAVAILABLE:void 0:rc.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)=>nN?(null==t?void 0:t.availability)==="not-available"?rc.UNAVAILABLE:void 0:rc.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:rc.UNAVAILABLE:rc.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?rc.UNAVAILABLE:void 0:rc.UNSUPPORTED},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(e){let{options:{mediaLang:t}={}}=e;return null!=t?t:"en"}}},nG={[rt.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]=ny(l,{kind:rl.METADATA,label:"thumbnails"}),t=Array.prototype.find.call(null!=(a=null==e?void 0:e.cues)?a:[],(e,t,i)=>0===t?e.endTime>
200d: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}},[rt.MEDIA_PAUSE_REQUEST](e,t){e.mediaPaused.set(!0,t)},[rt.MEDIA_PLAY_REQUEST](e,t){var i,a,r,n;let s=e.mediaStreamType.get(t)===rh.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)},[rt.MEDIA_PLAYBACK_RATE_REQUEST](e,t,{detail:i}){e.mediaPlaybackRate.set(i,t)},[rt.MEDIA_MUTE_REQUEST](e,t){e.mediaMuted.set(!0,t)},[rt.MEDIA_UNMUTE_REQUEST](e,t){e.mediaVolume.get(t)||e.mediaVolume.set(.25,t),e.mediaMuted.set(!1,t)},[rt.MEDIA_VOLUME_REQUEST](e,t,{detail:i}){i&&e.mediaMuted.get(t)&&e.mediaMuted.set(!1,t),e.mediaVolume.set(i,t)},[rt.MEDIA_SEEK_REQUEST](e,t,{detail:i}){e.mediaCurrentTime.set(i,t)},[rt.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)},[rt.MEDIA_SHOW_SUBTITLES_REQUEST](e,t,{detail:i}){var a;let{options:r}=t,n=nU(t),s=nE(i),o=null==(a=s[0])?void 0:a.language;o&&!r.noSubtitlesLangPref&&rN.localStorage.setItem("media-chrome-pref-subtitles-lang",o),n_(rd.SHOWING,n,s)},[rt.MEDIA_DISABLE_SUBTITLES_REQUEST](e,t,{detail:i}){let a=nU(t);n_(rd.DISABLED,a,null!=i?i:[])},[rt.MEDIA_TOGGLE_SUBTITLES_REQUEST](e,t,{detail:i}){nH(t,i)},[rt.MEDIA_RENDITION_REQUEST](e,t,{detail:i}){e.mediaRenditionSelected.set(i,t)},[rt.MEDIA_AUDIO_TRACK_REQUEST](e,t,{detail:i}){e.mediaAudioTrackEnabled.set(i,t)},[rt.MEDIA_ENTER_PIP_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsPip.set(!0,t)},[rt.MEDIA_EXIT_PIP_REQUEST](e,t){e.mediaIsPip.set(!1,t)},[rt.MEDIA_ENTER_FULLSCREEN_REQUEST](e,t,i){e.mediaIsPip.get(t)&&e.mediaIsPip.set(!1,t),e.mediaIsFullscreen.set(!0,t,i)},[rt.MEDIA_EXIT_FULLSCREEN_REQUEST](e,t){e.mediaIsFullscreen.set(!1,t)},[rt.MEDIA_ENTER_CAST_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsCasting.set(!0,t)},[rt.MEDIA_EXIT_CAST_REQUEST](e,t){e.mediaIsCasting.set(!1,t)},[rt.MEDIA_AIRPLAY_REQUEST](e,t){e.mediaIsAirplaying.set(!0,t)}};var nj=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nQ=(e,t,i)=>(nj(e,t,"read from private field"),i?i.call(e):t.get(e)),nZ=(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)},nz=(e,t,i,a)=>(nj(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),nX=(e,t,i)=>(nj(e,t,"access private method"),i);let nJ=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," ","f","m","k","c"],n0={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_MUTED_PREF:"nomutedpref",NO_SUBTITLES_LANG_PREF:"nosubtitleslangpref",NO_DEFAULT_STORE:"nodefaultstore",KEYBOARD_FORWARD_SEEK_OFFSET:"keyboardforwardseekoffset",KEYBOARD_BACKWARD_SEEK_OFFSET:"keyboardbackwardseekoffset",KEYBOARD_UP_VOLUME_STEP:"keyboardupvolumestep",KEYBOARD_DOWN_VOLUME_STEP:"keyboarddownvolumestep",LANG:"lang"};class n1 extends nl{constructor(){super(),nZ(this,uv),nZ(this,ub),nZ(this,uf),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,nZ(this,ud,new nm(this,n0.HOTKEYS)),nZ(this,uu,void 0),nZ(this,uc,void 0),nZ(this,uh,void 0),nZ(this,um,void 0),nZ(this,up,e=>{var t;null==(t=nQ(this,uc))||t.dispatch(e)}),this.associateElement(this);let e={};nz(this,uh,t=>{Object.entries(t).forEach(([t,i])=>{if(t in e&&e[t]===i)return;
200this.propagateMediaState(t,i);let a=t.toLowerCase(),r=new rN.CustomEvent(ro[a],{composed:!0,detail:i});this.dispatchEvent(r)}),e=t}),this.hasAttribute(n0.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(n0.NO_HOTKEYS,n0.HOTKEYS,n0.DEFAULT_STREAM_TYPE,n0.DEFAULT_SUBTITLES,n0.DEFAULT_DURATION,n0.NO_MUTED_PREF,n0.NO_VOLUME_PREF,n0.LANG)}get mediaStore(){return nQ(this,uc)}set mediaStore(e){var t,i;if(nQ(this,uc)&&(null==(t=nQ(this,um))||t.call(this),nz(this,um,void 0)),nz(this,uc,e),!nQ(this,uc)&&!this.hasAttribute(n0.NO_DEFAULT_STORE))return void nX(this,uv,uE).call(this);nz(this,um,null==(i=nQ(this,uc))?void 0:i.subscribe(nQ(this,uh)))}get fullscreenElement(){var e;return null!=(e=nQ(this,uu))?e:this}set fullscreenElement(e){var t;this.hasAttribute(n0.FULLSCREEN_ELEMENT)&&this.removeAttribute(n0.FULLSCREEN_ELEMENT),nz(this,uu,e),null==(t=nQ(this,uc))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return r2(this,n0.DEFAULT_SUBTITLES)}set defaultSubtitles(e){r3(this,n0.DEFAULT_SUBTITLES,e)}get defaultStreamType(){return r4(this,n0.DEFAULT_STREAM_TYPE)}set defaultStreamType(e){r5(this,n0.DEFAULT_STREAM_TYPE,e)}get defaultDuration(){return r0(this,n0.DEFAULT_DURATION)}set defaultDuration(e){r1(this,n0.DEFAULT_DURATION,e)}get noHotkeys(){return r2(this,n0.NO_HOTKEYS)}set noHotkeys(e){r3(this,n0.NO_HOTKEYS,e)}get keysUsed(){return r4(this,n0.KEYS_USED)}set keysUsed(e){r5(this,n0.KEYS_USED,e)}get liveEdgeOffset(){return r0(this,n0.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){r1(this,n0.LIVE_EDGE_OFFSET,e)}get noAutoSeekToLive(){return r2(this,n0.NO_AUTO_SEEK_TO_LIVE)}set noAutoSeekToLive(e){r3(this,n0.NO_AUTO_SEEK_TO_LIVE,e)}get noVolumePref(){return r2(this,n0.NO_VOLUME_PREF)}set noVolumePref(e){r3(this,n0.NO_VOLUME_PREF,e)}get noMutedPref(){return r2(this,n0.NO_MUTED_PREF)}set noMutedPref(e){r3(this,n0.NO_MUTED_PREF,e)}get noSubtitlesLangPref(){return r2(this,n0.NO_SUBTITLES_LANG_PREF)}set noSubtitlesLangPref(e){r3(this,n0.NO_SUBTITLES_LANG_PREF,e)}get noDefaultStore(){return r2(this,n0.NO_DEFAULT_STORE)}set noDefaultStore(e){r3(this,n0.NO_DEFAULT_STORE,e)}attributeChangedCallback(e,t,i){var a,r,n,s,o,l,d,u,c,h,p;if(super.attributeChangedCallback(e,t,i),e===n0.NO_HOTKEYS)i!==t&&""===i?(this.hasAttribute(n0.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===n0.HOTKEYS)nQ(this,ud).value=i;else if(e===n0.DEFAULT_SUBTITLES&&i!==t)null==(a=nQ(this,uc))||a.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(n0.DEFAULT_SUBTITLES)}});else if(e===n0.DEFAULT_STREAM_TYPE)null==(n=nQ(this,uc))||n.dispatch({type:"optionschangerequest",detail:{defaultStreamType:null!=(r=this.getAttribute(n0.DEFAULT_STREAM_TYPE))?r:void 0}});else if(e===n0.LIVE_EDGE_OFFSET)null==(s=nQ(this,uc))||s.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(n0.LIVE_EDGE_OFFSET)?+this.getAttribute(n0.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(n0.SEEK_TO_LIVE_OFFSET)?void 0:+this.getAttribute(n0.LIVE_EDGE_OFFSET)}});else if(e===n0.SEEK_TO_LIVE_OFFSET)null==(o=nQ(this,uc))||o.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(n0.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(n0.SEEK_TO_LIVE_OFFSET):void 0}});else if(e===n0.NO_AUTO_SEEK_TO_LIVE)null==(l=nQ(this,uc))||l.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(n0.NO_AUTO_SEEK_TO_LIVE)}});else if(e===n0.FULLSCREEN_ELEMENT){let e=i?null==(d=this.getRootNode())?void 0:d.getElementById(i):void 0;nz(this,uu,e),null==(u=nQ(this,uc))||u.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===n0.LANG&&i!==t?(rw=i,null==(c=nQ(this,uc))||c.dispatch({type:"optionschangerequest",detail:{mediaLang:i}})):e===n0.NO_VOLUME_PREF&&i!==t?null==(h=nQ(this,uc))||h.dispatch({type:"optionschangerequest",detail:{noVolumePref:this.hasAttribute(n0.NO_VOLUME_PREF)}}):e===n0.NO_MUTED_PREF&&i!==t&&(null==(p=nQ(this,uc))||p.dispatch({type:"optionschangerequest",detail:{noMutedPref:this.hasAttribute(n0.NO_MUTED_PREF)}}))}connectedCallback(){var e,t;nQ(this,uc)||this.hasAttribute(n0.NO_DEFAULT_STORE)||nX(this,uv,uE).call(this),null==(e=nQ(this,uc))||e.dispatch({type:"documentelementchangerequest",detail:rP}),super.connectedCallback(),nQ(this,uc)&&!nQ(this,um)&&nz(this,um,
200null==(t=nQ(this,uc))?void 0:t.subscribe(nQ(this,uh))),this.hasAttribute(n0.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var e,t,i,a;null==(e=super.disconnectedCallback)||e.call(this),nQ(this,uc)&&(null==(t=nQ(this,uc))||t.dispatch({type:"documentelementchangerequest",detail:void 0}),null==(i=nQ(this,uc))||i.dispatch({type:rt.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})),nQ(this,um)&&(null==(a=nQ(this,um))||a.call(this),nz(this,um,void 0))}mediaSetCallback(e){var t;super.mediaSetCallback(e),null==(t=nQ(this,uc))||t.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var t;super.mediaUnsetCallback(e),null==(t=nQ(this,uc))||t.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,t){se(this.mediaStateReceivers,e,t)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(t.has(e))return;let i=st(e,this.registerMediaStateReceiver.bind(this),this.unregisterMediaStateReceiver.bind(this));Object.values(rt).forEach(t=>{e.addEventListener(t,nQ(this,up))}),t.set(e,i)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;t.has(e)&&(t.get(e)(),t.delete(e),Object.values(rt).forEach(t=>{e.removeEventListener(t,nQ(this,up))}))}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;!(t.indexOf(e)>-1)&&(t.push(e),nQ(this,uc)&&Object.entries(nQ(this,uc).getState()).forEach(([t,i])=>{se([e],t,i)}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,i=t.indexOf(e);i<0||t.splice(i,1)}enableHotkeys(){this.addEventListener("keydown",nX(this,uf,u_))}disableHotkeys(){this.removeEventListener("keydown",nX(this,uf,u_)),this.removeEventListener("keyup",nX(this,ub,ug))}get hotkeys(){return r4(this,n0.HOTKEYS)}set hotkeys(e){r5(this,n0.HOTKEYS,e)}keyboardShortcutHandler(e){var t,i,a,r,n,s,o;let l,d,u,c=e.target;if(!((null!=(a=null!=(i=null==(t=c.getAttribute(n0.KEYS_USED))?void 0:t.split(" "))?i:null==c?void 0:c.keysUsed)?a:[]).map(e=>
200"Space"===e?" ":e).filter(Boolean).includes(e.key)||nQ(this,ud).contains(`no${e.key.toLowerCase()}`))&&!(" "===e.key&&nQ(this,ud).contains("nospace")))switch(e.key){case" ":case"k":l=nQ(this,uc).getState().mediaPaused?rt.MEDIA_PLAY_REQUEST:rt.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new rN.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"m":l="off"===this.mediaStore.getState().mediaVolumeLevel?rt.MEDIA_UNMUTE_REQUEST:rt.MEDIA_MUTE_REQUEST,this.dispatchEvent(new rN.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"f":l=this.mediaStore.getState().mediaIsFullscreen?rt.MEDIA_EXIT_FULLSCREEN_REQUEST:rt.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new rN.CustomEvent(l,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new rN.CustomEvent(rt.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":{let e=this.hasAttribute(n0.KEYBOARD_BACKWARD_SEEK_OFFSET)?+this.getAttribute(n0.KEYBOARD_BACKWARD_SEEK_OFFSET):10;d=Math.max((null!=(r=this.mediaStore.getState().mediaCurrentTime)?r:0)-e,0),u=new rN.CustomEvent(rt.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:d}),this.dispatchEvent(u);break}case"ArrowRight":{let e=this.hasAttribute(n0.KEYBOARD_FORWARD_SEEK_OFFSET)?+this.getAttribute(n0.KEYBOARD_FORWARD_SEEK_OFFSET):10;d=Math.max((null!=(n=this.mediaStore.getState().mediaCurrentTime)?n:0)+e,0),u=new rN.CustomEvent(rt.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:d}),this.dispatchEvent(u);break}case"ArrowUp":{let e=this.hasAttribute(n0.KEYBOARD_UP_VOLUME_STEP)?+this.getAttribute(n0.KEYBOARD_UP_VOLUME_STEP):.025;d=Math.min((null!=(s=this.mediaStore.getState().mediaVolume)?s:1)+e,1),u=new rN.CustomEvent(rt.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:d}),this.dispatchEvent(u);break}case"ArrowDown":{let e=this.hasAttribute(n0.KEYBOARD_DOWN_VOLUME_STEP)?+this.getAttribute(n0.KEYBOARD_DOWN_VOLUME_STEP):.025;d=Math.max((null!=(o=this.mediaStore.getState().mediaVolume)?o:1)-e,0),u=new rN.CustomEvent(rt.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:d}),this.dispatchEvent(u)}}}}ud=new WeakMap,uu=new WeakMap,uc=new WeakMap,uh=new WeakMap,um=new WeakMap,up=new WeakMap,uv=new WeakSet,uE=function(){var e;this.mediaStore=(({media:e,fullscreenElement:t,documentElement:i,stateMediator:a=nY,requestMap:r=nG,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&&(nW(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),{}))},p={},v=async(e,t)=>{var i,r,n,u,v,E,b,g,f,_,y,T,A,k,w,S;let I=!!o;if(o={...d,...null!=o?o:{},...e},I)return;await nK(...Object.values(e));let R=l.length>0&&0===t&&s,D=d.media!==o.media,C=(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==(v=d.media)?void 0:v.audioTracks)!==(null==(E=o.media)?void 0:E.audioTracks),O=(null==(b=d.media)?void 0:b.remote)!==(null==(g=o.media)?void 0:g.remote),x=d.documentElement!==o.documentElement,N=!!d.media&&(D||R),P=!!(null==(f=d.media)?void 0:f.textTracks)&&(C||R),U=!!(null==(_=d.media)?void 0:_.videoRenditions)&&(L||R),B=!!(null==(y=d.media)?void 0:y.audioTracks)&&(M||R),H=!!(null==(T=d.media)?void 0:T.remote)&&(O||R),W=!!d.documentElement&&(x||R),V=N||P||U||B||H||W,F=0===l.length&&1===t&&s,$=!!o.media&&(D||F),K=!!(null==(A=o.media)?void 0:A.textTracks)&&(C||F),q=!!(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&&(x||F),Q=$||K||q||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;p[e]||(p[e]={});let v=i=>{c({[e]:t(d,i)})};
200h=p[e].mediaEvents,i.forEach(t=>{h&&N&&(d.media.removeEventListener(t,h),p[e].mediaEvents=void 0),$&&(o.media.addEventListener(t,v),p[e].mediaEvents=v)}),h=p[e].textTracksEvents,a.forEach(t=>{var i,a;h&&P&&(null==(i=d.media.textTracks)||i.removeEventListener(t,h),p[e].textTracksEvents=void 0),K&&(null==(a=o.media.textTracks)||a.addEventListener(t,v),p[e].textTracksEvents=v)}),h=p[e].videoRenditionsEvents,r.forEach(t=>{var i,a;h&&U&&(null==(i=d.media.videoRenditions)||i.removeEventListener(t,h),p[e].videoRenditionsEvents=void 0),q&&(null==(a=o.media.videoRenditions)||a.addEventListener(t,v),p[e].videoRenditionsEvents=v)}),h=p[e].audioTracksEvents,n.forEach(t=>{var i,a;h&&B&&(null==(i=d.media.audioTracks)||i.removeEventListener(t,h),p[e].audioTracksEvents=void 0),Y&&(null==(a=o.media.audioTracks)||a.addEventListener(t,v),p[e].audioTracksEvents=v)}),h=p[e].remoteEvents,s.forEach(t=>{var i,a;h&&H&&(null==(i=d.media.remote)||i.removeEventListener(t,h),p[e].remoteEvents=void 0),G&&(null==(a=o.media.remote)||a.addEventListener(t,v),p[e].remoteEvents=v)}),h=p[e].rootEvents,l.forEach(t=>{h&&W&&(d.documentElement.removeEventListener(t,h),p[e].rootEvents=void 0),j&&(o.documentElement.addEventListener(t,v),p[e].rootEvents=v)});let E=p[e].stateOwnersUpdateHandlers;u.forEach(t=>{E&&V&&E(),Q&&(p[e].stateOwnersUpdateHandlers=t(v,o))})}),Object.entries(o).forEach(([e,t])=>{d[e]=t}),h(),o=void 0};return v({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?v({media:i}):"fullscreenelementchangerequest"===t?v({fullscreenElement:i}):"documentelementchangerequest"===t?v({documentElement:i}):"optionschangerequest"===t&&(Object.entries(null!=i?i:{}).forEach(([e,t])=>{d.options[e]=t}),h())},getState:()=>u,subscribe:e=>(v({},l.length+1),l.push(e),e(u),()=>{let t=l.indexOf(e);t>=0&&(v({},l.length-1),l.splice(t,1))})}})({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(n0.DEFAULT_SUBTITLES),defaultDuration:this.hasAttribute(n0.DEFAULT_DURATION)?+this.getAttribute(n0.DEFAULT_DURATION):void 0,defaultStreamType:null!=(e=this.getAttribute(n0.DEFAULT_STREAM_TYPE))?e:void 0,liveEdgeOffset:this.hasAttribute(n0.LIVE_EDGE_OFFSET)?+this.getAttribute(n0.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(n0.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(n0.SEEK_TO_LIVE_OFFSET):this.hasAttribute(n0.LIVE_EDGE_OFFSET)?+this.getAttribute(n0.LIVE_EDGE_OFFSET):void 0,noAutoSeekToLive:this.hasAttribute(n0.NO_AUTO_SEEK_TO_LIVE),noVolumePref:this.hasAttribute(n0.NO_VOLUME_PREF),noMutedPref:this.hasAttribute(n0.NO_MUTED_PREF),noSubtitlesLangPref:this.hasAttribute(n0.NO_SUBTITLES_LANG_PREF)}})},ub=new WeakSet,ug=function(e){let{key:t}=e;if(!nJ.includes(t))return void this.removeEventListener("keyup",nX(this,ub,ug));this.keyboardShortcutHandler(e)},uf=new WeakSet,u_=function(e){let{metaKey:t,altKey:i,key:a}=e;if(t||i||!nJ.includes(a))return void this.removeEventListener("keyup",nX(this,ub,ug));let r=e.target,n=r instanceof HTMLElement&&("media-volume-range"===r.tagName.toLowerCase()||"media-time-range"===r.tagName.toLowerCase());![" ","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(a)||nQ(this,ud).contains(`no${a.toLowerCase()}`)||" "===a&&nQ(this,ud).contains("nospace")||n||e.preventDefault(),this.addEventListener("keyup",nX(this,ub,ug),{once:!0})};let n2=Object.values(rn),n3=Object.values(ra),n4=e=>{var t,i,a,r;let{observedAttributes:n}=e.constructor;!n&&(null==(t=e.nodeName)?void 0:t.includes("-"))&&(rN.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,ri.MEDIA_CHROME_ATTRIBUTES))?void 0:a.split)?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(e=>n2.includes(e)):[]},n5=e=>(e=>{var t,i;return(null==(t=e.nodeName)?void 0:t.includes("-"))&&rN.customElements.get(null==(i=e.nodeName)?void 0:i.toLowerCase())&&!(e instanceof rN.customElements.get(e.nodeName.toLowerCase()))&&rN.customElements.upgrade(e),n3.some(t=>t in e)})(e)||!!n4(e).length,n9=e=>{var t;return null==(t=null==e?void 0:e.join)?void 0:t.call(e,":")},n8={[rn.MEDIA_SUBTITLES_LIST]:ng,[rn.MEDIA_SUBTITLES_SHOWING]:ng,[rn.MEDIA_SEEKABLE]:n9,[rn.MEDIA_BUFFERED]:e=>null==e?void 0:e.map(n9).join(" "),[rn.MEDIA_PREVIEW_COORDS]:e=>null==e?void 0:e.join(" "),[rn.MEDIA_RENDITION_LIST]:function(e){return null==e?void 0:e.map(rp).join(" ")},[rn.MEDIA_AUDIO_TRACK_LIST]:function(e){return null==e?void 0:e.map(rE).join(" ")}},n6=async(e,t,i)=>{var a,r;if(e.isConnected||await r_(0),"boolean"==typeof i||null==i)return r3(e,t,i);if("number"==typeof i)return r1(e,t,i);if("string"==typeof i)return r5(e,t,i);if(Array.isArray(i)&&!i.length)return e.removeAttribute(t);let n=null!=(r=null==(a=n8[t])?void 0:a.call(n8,i))?r:i;return e.setAttribute(t,n)},n7=(e,t)=>
200{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;n5(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=>n7(e,t))},a=null==e?void 0:e.nodeName.toLowerCase();if(a.includes("-")&&!n5(e))return void rN.customElements.whenDefined(a).then(()=>{i(e,t)});i(e,t)},se=(e,t,i)=>{e.forEach(e=>{if(t in e){e[t]=i;return}let a=n4(e),r=t.toLowerCase();a.includes(r)&&n6(e,r,i)})},st=(e,t,i)=>{n7(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(rt.REGISTER_MEDIA_STATE_RECEIVER,a),e.addEventListener(rt.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=[],s=e=>{let a=e.target;"media"!==a.name&&(n.forEach(e=>n7(e,i)),(n=[...a.assignedElements({flatten:!0})]).forEach(e=>n7(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=>n7(e,t)),Array.prototype.forEach.call(r,e=>n7(e,i))):"attributes"===n&&o===ri.MEDIA_CHROME_ATTRIBUTES&&(n5(s)?t(s):i(s))})});return o.observe(e,{childList:!0,attributes:!0,subtree:!0}),()=>{n7(e,i),e.removeEventListener("slotchange",s),o.disconnect(),e.removeEventListener(rt.REGISTER_MEDIA_STATE_RECEIVER,a),e.removeEventListener(rt.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};rN.customElements.get("media-controller")||rN.customElements.define("media-controller",n1);let si={PLACEMENT:"placement",BOUNDS:"bounds"};class sa extends rN.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!rz(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=rj(this,"#"+this.bounds))?e:r$(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,p=s+o-(r+n)+d+c;return h<0?void this.style.setProperty("--media-tooltip-offset-x",`${h}px`):p>0?void this.style.setProperty("--media-tooltip-offset-x",`${p}px`):void this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rF(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(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[si.PLACEMENT,si.BOUNDS]}get placement(){return r4(this,si.PLACEMENT)}set placement(e){r5(this,si.PLACEMENT,e)}get bounds(){return r4(this,si.BOUNDS)}set bounds(e){r5(this,si.BOUNDS,e)}}sa.shadowRootOptions={mode:"open"},sa.getTemplateHTML=function(e){return`
201    <style>
202      :host {
203        --_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7)));
204        --_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color));
205        --_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2);
206        --_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px);
207        --_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color));
208        position: relative;
209        pointer-events: none;
210        display: var(--media-tooltip-display, inline-flex);
211        justify-content: center;
212        align-items: center;
213        box-sizing: border-box;
214        z-index: var(--media-tooltip-z-index, 1);
215        background: var(--_tooltip-background);
216        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
217        font: var(--media-font,
218          var(--media-font-weight, 400)
219          var(--media-font-size, 13px) /
220          var(--media-text-content-height, var(--media-control-height, 18px))
221          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
222        padding: var(--media-tooltip-padding, .35em .7em);
223        border: var(--media-tooltip-border, none);
224        border-radius: var(--media-tooltip-border-radius, 5px);
225        filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2)));
226        white-space: var(--media-tooltip-white-space, nowrap);
227      }
228
229      :host([hidden]) {
230        display: none;
231      }
232
233      img, svg {
234        display: inline-block;
235      }
236
237      #arrow {
238        position: absolute;
239        width: 0px;
240        height: 0px;
241        border-style: solid;
242        display: var(--media-tooltip-arrow-display, block);
243      }
244
245      :host(:not([placement])),
246      :host([placement="top"]) {
247        position: absolute;
248        bottom: calc(100% + var(--media-tooltip-distance, 12px));
249        left: 50%;
250        transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0
250);
251      }
252      :host(:not([placement])) #arrow,
253      :host([placement="top"]) #arrow {
254        top: 100%;
255        left: 50%;
256        border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width);
257        border-color: var(--_tooltip-arrow-background) transparent transparent transparent;
258        transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
259      }
260
261      :host([placement="right"]) {
262        position: absolute;
263        left: calc(100% + var(--media-tooltip-distance, 12px));
264        top: 50%;
265        transform: translate(0, -50%);
266      }
267      :host([placement="right"]) #arrow {
268        top: 50%;
269        right: 100%;
270        border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0;
271        border-color: transparent var(--_tooltip-arrow-background) transparent transparent;
272        transform: translate(0, -50%);
273      }
274
275      :host([placement="bottom"]) {
276        position: absolute;
277        top: calc(100% + var(--media-tooltip-distance, 12px));
278        left: 50%;
279        transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0);
280      }
281      :host([placement="bottom"]) #arrow {
282        bottom: 100%;
283        left: 50%;
284        border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width);
285        border-color: transparent transparent var(--_tooltip-arrow-background) transparent;
286        transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0);
287      }
288
289      :host([placement="left"]) {
290        position: absolute;
291        right: calc(100% + var(--media-tooltip-distance, 12px));
292        top: 50%;
293        transform: translate(0, -50%);
294      }
295      :host([placement="left"]) #arrow {
296        top: 50%;
297        left: 100%;
298        border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height);
299        border-color: transparent transparent transparent var(--_tooltip-arrow-background);
300        transform: translate(0, -50%);
301      }
302      
303      :host([placement="none"]) #arrow {
304        display: none;
305      }
306    </style>
307    <slot></slot>
308    <div id="arrow"></div>
309  `},rN.customElements.get("media-tooltip")||rN.customElements.define("media-tooltip",sa);var sr=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sn=(e,t,i)=>(sr(e,t,"read from private field"),i?i.call(e):t.get(e)),ss=(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)},so=(e,t,i,a)=>(sr(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let sl={TOOLTIP_PLACEMENT:"tooltipplacement",DISABLED:"disabled",NO_TOOLTIP:"notooltip"};class sd extends rN.HTMLElement{constructor(){if(super(),ss(this,uS),ss(this,uy,void 0),this.preventClick=!1,this.tooltipEl=null,ss(this,uT,e=>{this.preventClick||this.handleClick(e),setTimeout(sn(this,uA),0)}),ss(this,uA,()=>{var e,t;null==(t=null==(e=this.tooltipEl)?void 0:e.updateXOffset)||t.call(e)}),ss(this,uk,e=>{let{key:t}=e;if(!this.keysUsed.includes(t))return void this.removeEventListener("keyup",sn(this,uk));this.preventClick||this.handleClick(e)}),ss(this,uw,e=>{let{metaKey:t,altKey:i,key:a}=e;if(t||i||!this.keysUsed.includes(a))return void this.removeEventListener("keyup",sn(this,uk));this.addEventListener("keyup",sn(this,uk),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rF(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip")}static get observedAttributes(){return["disabled",sl.TOOLTIP_PLACEMENT,ri.MEDIA_CONTROLLER,rn.MEDIA_LANG]}enable(){this.addEventListener("click",sn(this,uT)),this.addEventListener("keydown",sn(this,uw)),this.tabIndex=0}disable(){this.removeEventListener("click",sn(this,uT)),this.removeEventListener("keydown",sn(this,uw)),this.removeEventListener("keyup",sn(this,uk)),this.tabIndex=-1}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===ri.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=sn(this,uy))?void 0:a.unassociateElement)||r.call(a,this),so(this,uy,null)),i&&this.isConnected&&(so(this,uy,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=sn(this,uy))?void 0:s.associateElement)||o.call(s,this))):"disabled"===e&&i!==t?null==i?this.enable():this.disable():e===sl.TOOLTIP_PLACEMENT&&this.tooltipEl&&i!==t?this.tooltipEl.placement=i:e===rn.MEDIA_LA
309NG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),sn(this,uA).call(this)}connectedCallback(){var e,t,i;let{style:a}=rX(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(ri.MEDIA_CONTROLLER);r&&(so(this,uy,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=sn(this,uy))?void 0:t.associateElement)||i.call(t,this)),rN.customElements.whenDefined("media-tooltip").then(()=>{var e,t;return(e=uS,t=uI,sr(this,e,"access private method"),t).call(this)})}disconnectedCallback(){var e,t;this.disable(),null==(t=null==(e=sn(this,uy))?void 0:e.unassociateElement)||t.call(e,this),so(this,uy,null),this.removeEventListener("mouseenter",sn(this,uA)),this.removeEventListener("focus",sn(this,uA)),this.removeEventListener("click",sn(this,uT))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return r4(this,sl.TOOLTIP_PLACEMENT)}set tooltipPlacement(e){r5(this,sl.TOOLTIP_PLACEMENT,e)}get mediaController(){return r4(this,ri.MEDIA_CONTROLLER)}set mediaController(e){r5(this,ri.MEDIA_CONTROLLER,e)}get disabled(){return r2(this,sl.DISABLED)}set disabled(e){r3(this,sl.DISABLED,e)}get noTooltip(){return r2(this,sl.NO_TOOLTIP)}set noTooltip(e){r3(this,sl.NO_TOOLTIP,e)}handleClick(e){}}uy=new WeakMap,uT=new WeakMap,uA=new WeakMap,uk=new WeakMap,uw=new WeakMap,uS=new WeakSet,uI=function(){this.addEventListener("mouseenter",sn(this,uA)),this.addEventListener("focus",sn(this,uA)),this.addEventListener("click",sn(this,uT));let e=this.tooltipPlacement;e&&this.tooltipEl&&(this.tooltipEl.placement=e)},sd.shadowRootOptions={mode:"open"},sd.getTemplateHTML=function(e,t={}){return`
310    <style>
311      :host {
312        position: relative;
313        font: var(--media-font,
314          var(--media-font-weight, bold)
315          var(--media-font-size, 14px) /
316          var(--media-text-content-height, var(--media-control-height, 24px))
317          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
318        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
319        background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
320        padding: var(--media-button-padding, var(--media-control-padding, 10px));
321        justify-content: var(--media-button-justify-content, center);
322        display: inline-flex;
323        align-items: center;
324        vertical-align: middle;
325        box-sizing: border-box;
326        transition: background .15s linear;
327        pointer-events: auto;
328        cursor: var(--media-cursor, pointer);
329        -webkit-tap-highlight-color: transparent;
330      }
331
332      
333      :host(:focus-visible) {
334        box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
335        outline: 0;
336      }
337      
338      :host(:where(:focus)) {
339        box-shadow: none;
340        outline: 0;
341      }
342
343      :host(:hover) {
344        background: var(--media-control-hover-background, rgba(50 50 70 / .7));
345      }
346
347      svg, img, ::slotted(svg), ::slotted(img) {
348        width: var(--media-button-icon-width);
349        height: var(--media-button-icon-height, var(--media-control-height, 24px));
350        transform: var(--media-button-icon-transform);
351        transition: var(--media-button-icon-transition);
352        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
353        vertical-align: middle;
354        max-width: 100%;
355        max-height: 100%;
356        min-width: 100%;
357      }
358
359      media-tooltip {
360        
361        max-width: 0;
362        overflow-x: clip;
363        opacity: 0;
364        transition: opacity .3s, max-width 0s 9s;
365      }
366
367      :host(:hover) media-tooltip,
368      :host(:focus-visible) media-tooltip {
369        max-width: 100vw;
370        opacity: 1;
371        transition: opacity .3s;
372      }
373
374      :host([notooltip]) slot[name="tooltip"] {
375        display: none;
376      }
377    </style>
378
379    ${this.getSlotTemplateHTML(e,t)}
380
381    <slot name="tooltip">
382      <media-tooltip part="tooltip" aria-hidden="true">
383        <template shadowrootmode="${sa.shadowRootOptions.mode}">
384          ${sa.getTemplateHTML({})}
385        </template>
386        <slot name="tooltip-content">
387          ${this.getTooltipContentHTML(e)}
388        </slot>
389      </media-tooltip>
390    </slot>
391  `},sd.getSlotTemplateHTML=function(e,t){return`
392    <slot></slot>
393  `},sd.getTooltipContentHTML=function(){return""},rN.customElements.get("media-chrome-button")||rN.customElements.define("media-chrome-button",sd);let su=`<svg aria-hidden="true" viewBox="0 0 26 24">
394  <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"/>
395</svg>
396`,sc=e=>{let t=e.mediaIsAirplaying?rS("stop airplay"):rS("start airplay");e.setAttribute("aria-label",t)};class sh extends sd{static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_IS_AIRPLAYING,rn.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),sc(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rn.MEDIA_IS_AIRPLAYING&&sc(this)}get mediaIsAirplaying(){return r2(this,rn.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){r3(this,rn.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return r4(this,rn.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){r5(this,rn.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new rN.CustomEvent(rt.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}}sh.getSlotTemplateHTML=function(e){return`
397    <style>
398      :host([${rn.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) {
399        display: none !important;
400      }
401
402      
403      :host(:not([${rn.MEDIA_IS_AIRPLAYING}])) slot[name=icon] slot:not([name=enter]) {
404        display: none !important;
405      }
406
407      :host([${rn.MEDIA_IS_AIRPLAYING}]) slot[name=tooltip-enter],
408      :host(:not([${rn.MEDIA_IS_AIRPLAYING}])) slot[name=tooltip-exit] {
409        display: none;
410      }
411    </style>
412
413    <slot name="icon">
414      <slot name="enter">${su}</slot>
415      <slot name="exit">${su}</slot>
416    </slot>
417  `},sh.getTooltipContentHTML=function(){return`
418    <slot name="tooltip-enter">${rS("start airplay")}</slot>
419    <slot name="tooltip-exit">${rS("stop airplay")}</slot>
420  `},rN.customElements.get("media-airplay-button")||rN.customElements.define("media-airplay-button",sh);let sm=`<svg aria-hidden="true" viewBox="0 0 26 24">
421  <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"/>
422</svg>`,sp=`<svg aria-hidden="true" viewBox="0 0 26 24">
423  <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"/>
424</svg>`,sv=e=>{e.setAttribute("aria-checked",nT(e).toString())};class sE extends sd{static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_SUBTITLES_LIST,rn.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",rS("closed captions")),sv(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rn.MEDIA_SUBTITLES_SHOWING&&sv(this)}get mediaSubtitlesList(){return sb(this,rn.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){sg(this,rn.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return sb(this,rn.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){sg(this,rn.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new rN.CustomEvent(rt.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}sE.getSlotTemplateHTML=function(e){return`
425    <style>
426      :host([aria-checked="true"]) slot[name=off] {
427        display: none !important;
428      }
429
430      
431      :host(:not([aria-checked="true"])) slot[name=on] {
432        display: none !important;
433      }
434
435      :host([aria-checked="true"]) slot[name=tooltip-enable],
436      :host(:not([aria-checked="true"])) slot[name=tooltip-disable] {
437        display: none;
438      }
439    </style>
440
441    <slot name="icon">
442      <slot name="on">${sm}</slot>
443      <slot name="off">${sp}</slot>
444    </slot>
445  `},sE.getTooltipContentHTML=function(){return`
446    <slot name="tooltip-enable">${rS("Enable captions")}</slot>
447    <slot name="tooltip-disable">${rS("Disable captions")}</slot>
448  `};let sb=(e,t)=>
448{let i=e.getAttribute(t);return i?nv(i):[]},sg=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=ng(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};rN.customElements.get("media-captions-button")||rN.customElements.define("media-captions-button",sE);let sf=e=>{let t=e.mediaIsCasting?rS("stop casting"):rS("start casting");e.setAttribute("aria-label",t)};class s_ extends sd{static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_IS_CASTING,rn.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),sf(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rn.MEDIA_IS_CASTING&&sf(this)}get mediaIsCasting(){return r2(this,rn.MEDIA_IS_CASTING)}set mediaIsCasting(e){r3(this,rn.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return r4(this,rn.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){r5(this,rn.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?rt.MEDIA_EXIT_CAST_REQUEST:rt.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new rN.CustomEvent(e,{composed:!0,bubbles:!0}))}}s_.getSlotTemplateHTML=function(e){return`
449    <style>
450      :host([${rn.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) {
451        display: none !important;
452      }
453
454      
455      :host(:not([${rn.MEDIA_IS_CASTING}])) slot[name=icon] slot:not([name=enter]) {
456        display: none !important;
457      }
458
459      :host([${rn.MEDIA_IS_CASTING}]) slot[name=tooltip-enter],
460      :host(:not([${rn.MEDIA_IS_CASTING}])) slot[name=tooltip-exit] {
461        display: none;
462      }
463    </style>
464
465    <slot name="icon">
466      <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>
467      <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>
468    </slot>
469  `},s_.getTooltipContentHTML=function(){return`
470    <slot name="tooltip-enter">${rS("Start casting")}</slot>
471    <slot name="tooltip-exit">${rS("Stop casting")}</slot>
472  `},rN.customElements.get("media-cast-button")||rN.customElements.define("media-cast-button",s_);var sy=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sT=(e,t,i)=>(sy(e,t,"read from private field"),i?i.call(e):t.get(e)),sA=(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)},sk=(e,t,i,a)=>(sy(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),sw=(e,t,i)=>(sy(e,t,"access private method"),i);let sS={OPEN:"open",ANCHOR:"anchor"};class sI extends rN.HTMLElement{constructor(){super(),sA(this,uL),sA(this,uO),sA(this,uN),sA(this,uU),sA(this,uH),sA(this,uV),sA(this,uR,!1),sA(this,uD,null),sA(this,uC,null),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}static get observedAttributes(){return[sS.OPEN,sS.ANCHOR]}get open(){return r2(this,sS.OPEN)}set open(e){r3(this,sS.OPEN,e)}handleEvent(e){switch(e.type){case"invoke":sw(this,uU,uB).call(this,e);break;case"focusout":sw(this,uH,uW).call(this,e);break;case"keydown":sw(this,uV,uF).call(this,e)}}connectedCallback(){sw(this,uL,uM).call(this),this.role||(this.role="dialog")}attributeChangedCallback(e,t,i){sw(this,uL,uM).call(this),e===sS.OPEN&&i!==t&&(this.open?sw(this,uO,ux).call(this):sw(this,uN,uP).call(this))}focus(){sk(this,uD,rQ());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;let i=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==i||i.focus()}get keysUsed(){return["Escape","Tab"]}}uR=new WeakMap,uD=new WeakMap,uC=new WeakMap,uL=new WeakSet,uM=function(){if(!sT(this,uR)&&(sk(this,uR,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);let e=rF(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e),queueMicrotask(()=>{let{style:e}=rX(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}},uO=new WeakSet,ux=function(){var e;null==(e=sT(this,uC))||e.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})},uN=new WeakSet,uP=function(){var e;
472null==(e=sT(this,uC))||e.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))},uU=new WeakSet,uB=function(e){sk(this,uC,e.relatedTarget),rG(this,e.relatedTarget)||(this.open=!this.open)},uH=new WeakSet,uW=function(e){var t;!rG(this,e.relatedTarget)&&(null==(t=sT(this,uD))||t.focus(),sT(this,uC)&&sT(this,uC)!==e.relatedTarget&&this.open&&(this.open=!1))},uV=new WeakSet,uF=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=sT(this,uD))||n.focus(),this.open=!1))},sI.shadowRootOptions={mode:"open"},sI.getTemplateHTML=function(e){return`
473    <style>
474      :host {
475        font: var(--media-font,
476          var(--media-font-weight, normal)
477          var(--media-font-size, 14px) /
478          var(--media-text-content-height, var(--media-control-height, 24px))
479          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
480        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
481        display: var(--media-dialog-display, inline-flex);
482        justify-content: center;
483        align-items: center;
484        
485        transition-behavior: allow-discrete;
486        visibility: hidden;
487        opacity: 0;
488        transform: translateY(2px) scale(.99);
489        pointer-events: none;
490      }
491
492      :host([open]) {
493        transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out;
494        visibility: visible;
495        opacity: 1;
496        transform: translateY(0) scale(1);
497        pointer-events: auto;
498      }
499
500      #content {
501        display: flex;
502        position: relative;
503        box-sizing: border-box;
504        width: min(320px, 100%);
505        word-wrap: break-word;
506        max-height: 100%;
507        overflow: auto;
508        text-align: center;
509        line-height: 1.4;
510      }
511    </style>
512    ${this.getSlotTemplateHTML(e)}
513  `},sI.getSlotTemplateHTML=function(e){return`
514    <slot id="content"></slot>
515  `},rN.customElements.get("media-chrome-dialog")||rN.customElements.define("media-chrome-dialog",sI);var sR=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sD=(e,t,i)=>(sR(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)},sL=(e,t,i,a)=>(sR(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),sM=(e,t,i)=>(sR(e,t,"access private method"),i);class sO extends rN.HTMLElement{constructor(){if(super(),sC(this,uX),sC(this,u0),sC(this,u2),sC(this,u4),sC(this,u9),sC(this,u6),sC(this,ce),sC(this,ci),sC(this,u$,void 0),sC(this,uK,void 0),sC(this,uq,void 0),sC(this,uY,void 0),sC(this,uG,{}),sC(this,uj,[]),sC(this,uQ,()=>{if(this.range.matches(":focus-visible")){let{style:e}=rX(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),sC(this,uZ,()=>{let{style:e}=rX(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),sC(this,uz,()=>{let e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rF(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}this.container=this.shadowRoot.querySelector("#container"),sL(this,uq,this.shadowRoot.querySelector("#startpoint")),sL(this,uY,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",ri.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===ri.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=sD(this,u$))?void 0:a.unassociateElement)||r.call(a,this),sL(this,u$,null)),i&&this.isConnected&&(sL(this,u$,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=sD(this,u$))?void 0:s.associateElement)||o.call(s,this))):("disabled"===e||"aria-disabled"===e&&t!==i)&&(null==i?(this.range.removeAttribute(e),sM(this,u0,u1).call(this)):(this.range.setAttribute(e,i),sM(this,u2,u3).call(this)))}connectedCallback(){var e,t,i;let{style:a}=rX(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),sD(this,uG).pointer=rX(this.shadowRoot,"#pointer"),sD(this,uG).progress=rX(this.shadowRoot,"#progress"),sD(this,uG).thumb=rX(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),sD(this,uG).activeSegment=rX(this.shadowRoot,"#segments-clipping rect:nth-child(0)");let r=this.getAttribute(ri.MEDIA_CONTROLLER);r&&(sL(this,u$,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=sD(this,u$))?void 0:t.associateElement)||i.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",sD(this,uQ)),this.shadowRoot.addEventListener("focusout",sD(this,uZ)),sM(this,u0,u1).call(this),rW(this.container,sD(this,uz))}disconnectedCallback(){var e,t;sM(this,u2,u3).call(this),null==(t=null==(e=sD(this,u$))?void 0:e.unassociateElement)||t.call(e,this),sL(this,u$,null),this.shadowRoot.removeEventListener("focusin",sD(this,uQ)),this.shadowRoot.removeEventListener("focusout",sD(this,uZ)),rV(this.container,sD(this,uz))}updatePointerBar(e){var t;null==(t=sD(this,uG).pointer)||t.style.setProperty("width",`${100*this.getPointerRatio(e)}%`)}updateBar(){var e,t;let i=100*this.range.valueAsNumber;null==(e=sD(this,uG).progress)||e.style.setProperty("width",`${i}%`),null==(t=sD(this,uG).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])];sL(this,uj,[...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=rP.createElementNS("http://www.w3.org/2000/svg","rect"),c=rX(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,sD(this,uq).getBoundingClientRect(),sD(this,uY).getBoundingClientRect())}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":sM(this,ci,ca).c
515all(this,e);break;case"input":this.updateBar();break;case"pointerenter":sM(this,u9,u8).call(this,e);break;case"pointerdown":sM(this,u4,u5).call(this,e);break;case"pointerup":sM(this,u6,u7).call(this);break;case"pointerleave":sM(this,ce,ct).call(this)}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}u$=new WeakMap,uK=new WeakMap,uq=new WeakMap,uY=new WeakMap,uG=new WeakMap,uj=new WeakMap,uQ=new WeakMap,uZ=new WeakMap,uz=new WeakMap,uX=new WeakSet,uJ=function(e){let t=sD(this,uG).activeSegment;if(!t)return;let i=this.getPointerRatio(e),a=sD(this,uj).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))"))},u0=new WeakSet,u1=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))},u2=new WeakSet,u3=function(){var e,t;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),null==(e=rN.window)||e.removeEventListener("pointerup",this),null==(t=rN.window)||t.removeEventListener("pointermove",this)},u4=new WeakSet,u5=function(e){var t;sL(this,uK,e.composedPath().includes(this.range)),null==(t=rN.window)||t.addEventListener("pointerup",this)},u9=new WeakSet,u8=function(e){var t;"mouse"!==e.pointerType&&sM(this,u4,u5).call(this,e),this.addEventListener("pointerleave",this),null==(t=rN.window)||t.addEventListener("pointermove",this)},u6=new WeakSet,u7=function(){var e;null==(e=rN.window)||e.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")},ce=new WeakSet,ct=function(){var e,t;this.removeEventListener("pointerleave",this),null==(e=rN.window)||e.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),null==(t=sD(this,uG).activeSegment)||t.style.removeProperty("transform")},ci=new WeakSet,ca=function(e){("pen"!==e.pointerType||0!==e.buttons)&&(this.toggleAttribute("dragging",1===e.buttons||"mouse"!==e.pointerType),this.updatePointerBar(e),sM(this,uX,uJ).call(this,e),this.dragging&&("mouse"!==e.pointerType||!sD(this,uK))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(e),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))))},sO.shadowRootOptions={mode:"open"},sO.getTemplateHTML=function(e){return`
516    <style>
517      :host {
518        --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
519        --_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px));
520
521        box-shadow: var(--_focus-visible-box-shadow, none);
522        background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
523        height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding));
524        display: inline-flex;
525        align-items: center;
526        
527        vertical-align: middle;
528        box-sizing: border-box;
529        position: relative;
530        width: 100px;
531        transition: background .15s linear;
532        cursor: var(--media-cursor, pointer);
533        pointer-events: auto;
534        touch-action: none; 
535      }
536
537      
538      input[type=range]:focus {
539        outline: 0;
540      }
541      input[type=range]:focus::-webkit-slider-runnable-track {
542        outline: 0;
543      }
544
545      :host(:hover) {
546        background: var(--media-control-hover-background, rgb(50 50 70 / .7));
547      }
548
549      #leftgap {
550        padding-left: var(--media-range-padding-left, var(--_media-range-padding));
551      }
552
553      #rightgap {
554        padding-right: var(--media-range-padding-right, var(--_media-range-padding));
555      }
556
557      #startpoint,
558      #endpoint {
559        position: absolute;
560      }
561
562      #endpoint {
563        right: 0;
564      }
565
566      #container {
567        
568        width: var(--media-range-track-width, 100%);
569        transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px));
570        position: relative;
571        height: 100%;
572        display: flex;
573        align-items: center;
574        min-width: 40px;
575      }
576
577      #range {
578        
579        display: var(--media-time-range-hover-display, block);
580        bottom: var(--media-time-range-hover-bottom, -7px);
581        height: var(--media-time-range-hover-height, max(100% + 7px, 25px));
582        width: 100%;
583        position: absolute;
584        cursor: var(--media-cursor, pointer);
585
586        -webkit-appearance: none; 
587        -webkit-tap-highlight-color: transparent;
588        background: transparent; 
589        margin: 0;
590        z-index: 1;
591      }
592
593      @media (hover: hover) {
594        #range {
595          bottom: var(--media-time-range-hover-bottom, -5px);
596          height: var(--media-time-range-hover-height, max(100% + 5px, 20px));
597        }
598      }
599
600      
601      
602      #range::-webkit-slider-thumb {
603        -webkit-appearance: none;
604        background: transparent;
605        width: .1px;
606        height: .1px;
607      }
608
609      
610      #range::-moz-range-thumb {
611        background: transparent;
612        border: transparent;
613        width: .1px;
614        height: .1px;
615      }
616
617      #appearance {
618        height: var(--media-range-track-height, 4px);
619        display: flex;
620        flex-direction: column;
621        justify-content: center;
622        width: 100%;
623        position: absolute;
624        
625        will-change: transform;
626      }
627
628      #track {
629        background: var(--media-range-track-background, rgb(255 255 255 / .2));
630        border-radius: var(--media-range-track-border-radius, 1px);
631        border: var(--media-range-track-border, none);
632        outline: var(--media-range-track-outline);
633        outline-offset: var(--media-range-track-outline-offset);
634        backdrop-filter: var(--media-range-track-backdrop-filter);
635        -webkit-backdrop-filter: var(--media-range-track-backdrop-filter);
636        box-shadow: var(--media-range-track-box-shadow, none);
637        position: absolute;
638        width: 100%;
639        height: 100%;
640        overflow: hidden;
641      }
642
643      #progress,
644      #pointer {
645        position: absolute;
646        height: 100%;
647        will-change: width;
648      }
649
650      #progress {
651        background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238)));
652        transition: var(--media-range-track-transition);
653      }
654
655      #pointer {
656        background: var(--media-range-track-pointer-background);
657        border-right: var(--media-range-track-pointer-border-right);
658        transition: visibility .25s, opacity .25s;
659        visibility: hidden;
660        opacity: 0;
661      }
662
663      @media (hover: hover) {
664        :host(:hover) #pointer {
665          transition: visibility .5s, opacity .5s;
666          visibility: visible;
667          opacity: 1;
668        }
669      }
670
671      #thumb,
672      ::slotted([slot=thumb]) {
673        width: var(--media-range-thumb-width, 10px);
674        height: var(--media-range-thumb-height, 10px);
675        transition: var(--media-range-thumb-transition);
676        transform: var(--media-range-thumb-transform, none);
677        opacity: var(--media-range-thumb-opacity, 1);
678        translate: -50%;
679        position: absolute;
680        left: 0;
681        cursor: var(--media-cursor, pointer);
682      }
683
684      #thumb {
685        border-radius: var(--media-range-thumb-border-radius, 10px);
686        background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238)));
687        box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent);
688        border: var(--media-range-thumb-border, none);
689      }
690
691      :host([disabled]) #thumb {
692        background-color: #777;
693      }
694
695      .segments #appearance {
696        height: var(--media-range-segment-hover-height, 7px);
697      }
698
699      #track {
700        clip-path: url(#segments-clipping);
701      }
702
703      #segments {
704        --segments-gap: var(--media-range-segments-gap, 2px);
705        position: absolute;
706        width: 100%;
707        height: 100%;
708      }
709
710      #segments-clipping {
711        transform: translateX(calc(var(--segments-gap) / 2));
712      }
713
714      #segments-clipping:empty {
715        display: none;
716      }
717
718      #segments-clipping rect {
719        height: var(--media-range-track-height, 4px);
720        y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2);
721        transition: var(--media-range-segment-transition, transform .1s ease-in-out);
722        transform: var(--media-range-segment-transform, scaleY(1));
723        transform-origin: center;
724      }
725    </style>
726    <div id="leftgap"></div>
727    <div id="container">
728      <div id="startpoint"></div>
729      <div id="endpoint"></div>
730      <div id="appearance">
731        <div id="track" part="track">
732          <div id="pointer"></div>
733          <div id="progress" part="progress"></div>
734        </div>
735        <slot name="thumb">
736          <div id="thumb" part="thumb"></div>
737        </slot>
738        <svg id="segments"><clipPath id="segments-clipping"></clipPath></svg>
739      </div>
740      <input id="range" type="range" min="0" max="1" step="any" value="0">
741    </div>
742    <div id="rightgap"></div>
743  `},rN.customElements.get("media-chrome-range")||rN.customElements.define("media-chrome-range",sO);var sx=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sN=(e,t,i)=>(sx(e,t,"read from private field"),i?i.call(e):t.get(e)),sP=(e,t,i,a)=>(sx(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class sU extends rN.HTMLElement{constructor(){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,cr,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rF(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[ri.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===ri.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=sN(this,cr))?void 0:a.unassociateElement)||r.call(a,this),sP(this,cr,null)),i&&this.isConnected&&(sP(this,cr,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=sN(this,cr))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let a=this.getAttribute(ri.MEDIA_CONTROLLER);a&&(sP(this,cr,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=sN(this,cr))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=sN(this,cr))?void 0:e.unassociateElement)||t.call(e,this),sP(this,cr,null)}}cr=new WeakMap,sU.shadowRootOptions={mode:"open"},sU.getTemplateHTML=function(e){return`
744    <style>
745      :host {
746        
747        box-sizing: border-box;
748        display: var(--media-control-display, var(--media-control-bar-display, inline-flex));
749        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
750        --media-loading-indicator-icon-height: 44px;
751      }
752
753      ::slotted(media-time-range),
754      ::slotted(media-volume-range) {
755        min-height: 100%;
756      }
757
758      ::slotted(media-time-range),
759      ::slotted(media-clip-selector) {
760        flex-grow: 1;
761      }
762
763      ::slotted([role="menu"]) {
764        position: absolute;
765      }
766    </style>
767
768    <slot></slot>
769  `},rN.customElements.get("media-control-bar")||rN.customElements.define("media-control-bar",sU);var sB=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sH=(e,t,i)=>(sB(e,t,"read from private field"),i?i.call(e):t.get(e)),sW=(e,t,i,a)=>(sB(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class sV extends rN.HTMLElement{constructor(){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,cn,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rF(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[ri.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===ri.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=sH(this,cn))?void 0:a.unassociateElement)||r.call(a,this),sW(this,cn,null)),i&&this.isConnected&&(sW(this,cn,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=sH(this,cn))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let{style:a}=rX(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);let r=this.getAttribute(ri.MEDIA_CONTROLLER);r&&(sW(this,cn,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=sH(this,cn))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=sH(this,cn))?void 0:e.unassociateElement)||t.call(e,this),sW(this,cn,null)}}cn=new WeakMap,sV.shadowRootOptions={mode:"open"},sV.getTemplateHTML=function(e,t={}){return`
770    <style>
771      :host {
772        font: var(--media-font,
773          var(--media-font-weight, normal)
774          var(--media-font-size, 14px) /
775          var(--media-text-content-height, var(--media-control-height, 24px))
776          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
777        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
778        background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))));
779        padding: var(--media-control-padding, 10px);
780        display: inline-flex;
781        justify-content: center;
782        align-items: center;
783        vertical-align: middle;
784        box-sizing: border-box;
785        text-align: center;
786        pointer-events: auto;
787      }
788
789      
790      :host(:focus-visible) {
791        box-shadow: inset 0 0 0 2px rgb(27 127 204 / .9);
792        outline: 0;
793      }
794
795      
796      :host(:where(:focus)) {
797        box-shadow: none;
798        outline: 0;
799      }
800    </style>
801
802    ${this.getSlotTemplateHTML(e,t)}
803  `},sV.getSlotTemplateHTML=function(e,t){return`
804    <slot></slot>
805  `},rN.customElements.get("media-text-display")||rN.customElements.define("media-text-display",sV);var sF=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},s$=(e,t,i)=>(sF(e,t,"read from private field"),i?i.call(e):t.get(e));class sK extends sV{constructor(){var e;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,cs,void 0),((e,t,i,a)=>(sF(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,cs,this.shadowRoot.querySelector("slot")),s$(this,cs).textContent=rA(null!=(e=this.mediaDuration)?e:0)}static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_DURATION]}attributeChangedCallback(e,t,i){e===rn.MEDIA_DURATION&&(s$(this,cs).textContent=rA(+i)),super.attributeChangedCallback(e,t,i)}get mediaDuration(){return r0(this,rn.MEDIA_DURATION)}set mediaDuration(e){r1(this,rn.MEDIA_DURATION,e)}}cs=new WeakMap,sK.getSlotTemplateHTML=function(e,t){return`
806    <slot>${rA(t.mediaDuration)}</slot>
807  `},rN.customElements.get("media-duration-display")||rN.customElements.define("media-duration-display",sK);let sq={2:rS("Network Error"),3:rS("Decode Error"),4:rS("Source Not Supported"),5:rS("Encryption 
807Error")},sY={2:rS("A network error caused the media download to fail."),3:rS("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:rS("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:rS("The media is encrypted and there are no keys to decrypt it.")},sG=e=>{var t,i;return 1===e.code?null:{title:null!=(t=sq[e.code])?t:`Error ${e.code}`,message:null!=(i=sY[e.code])?i:e.message}};var sj=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};function sQ(e){var t;let{title:i,message:a}=null!=(t=sG(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 sZ=[rn.MEDIA_ERROR_CODE,rn.MEDIA_ERROR_MESSAGE];class sz extends sI{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,co,null)}static get observedAttributes(){return[...super.observedAttributes,...sZ]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,t,i){var a;if(super.attributeChangedCallback(e,t,i),!sZ.includes(e))return;let r=null!=(a=this.mediaError)?a:{code:this.mediaErrorCode,message:this.mediaErrorMessage};this.open=r.code&&null!==sG(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 sj(this,e=co,"read from private field"),t?t.call(this):e.get(this)}set mediaError(e){var t,i;sj(this,t=co,"write to private field"),i?i.call(this,e):t.set(this,e)}get mediaErrorCode(){return r0(this,"mediaerrorcode")}set mediaErrorCode(e){r1(this,"mediaerrorcode",e)}get mediaErrorMessage(){return r4(this,"mediaerrormessage")}set mediaErrorMessage(e){r5(this,"mediaerrormessage",e)}}co=new WeakMap,sz.getSlotTemplateHTML=function(e){return`
808    <style>
809      :host {
810        background: rgb(20 20 30 / .8);
811      }
812
813      #content {
814        display: block;
815        padding: 1.2em 1.5em;
816      }
817
818      h3,
819      p {
820        margin-block: 0 .3em;
821      }
822    </style>
823    <slot name="error-${e.mediaerrorcode}" id="content">
824      ${sQ({code:+e.mediaerrorcode,message:e.mediaerrormessage})}
825    </slot>
826  `},sz.formatErrorMessage=sQ,rN.customElements.get("media-error-dialog")||rN.customElements.define("media-error-dialog",sz);var sX=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};let sJ=`<svg aria-hidden="true" viewBox="0 0 26 24">
827  <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>
828</svg>`,s0=`<svg aria-hidden="true" viewBox="0 0 26 24">
829  <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>
830</svg>`,s1=e=>{let t=e.mediaIsFullscreen?rS("exit fullscreen mode"):rS("enter fullscreen mode");e.setAttribute("aria-label",t)};class s2 extends sd{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,cl,null)}static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_IS_FULLSCREEN,rn.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),s1(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rn.MEDIA_IS_FULLSCREEN&&s1(this)}get mediaFullscreenUnavailable(){return r4(this,rn.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){r5(this,rn.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return r2(this,rn.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){r3(this,rn.MEDIA_IS_FULLSCREEN,e)}handleClick(e){var t,i,a,r;sX(this,t=cl,"write to private field"),i?i.call(this,e):t.set(this,e);let n=(sX(this,a=cl,"read from private field"),(r?r.call(this):a.get(this))instanceof PointerEvent),s=this.mediaIsFullscreen?new rN.CustomEvent(rt.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new rN.CustomEvent(rt.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:n});this.dispatchEvent(s)}}cl=new WeakMap,s2.getSlotTemplateHTML=function(e){return`
831    <style>
832      :host([${rn.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) {
833        display: none !important;
834      }
835
836      
837      :host(:not([${rn.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) {
838        display: none !important;
839      }
840
841      :host([${rn.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter],
842      :host(:not([${rn.MEDIA_IS_FULLSCREEN}])) slot[name=tooltip-exit] {
843        display: none;
844      }
845    </style>
846
847    <slot name="icon">
848      <slot name="enter">${sJ}</slot>
849      <slot name="exit">${s0}</slot>
850    </slot>
851  `},s2.getTooltipContentHTML=function(){return`
852    <slot name="tooltip-enter">${rS("Enter fullscreen mode")}</slot>
853    <slot name="tooltip-exit">${rS("Exit fullscreen mode")}</slot>
854  `},rN.customElements.get("media-fullscreen-button")||rN.customElements.define("media-fullscreen-button",s2);let{MEDIA_TIME_IS_LIVE:s3,MEDIA_PAUSED:s4}=rn,{MEDIA_SEEK_TO_LIVE_REQUEST:s5,MEDIA_PLAY_REQUEST:s9}=rt,s8=e=>{var t;let i=e.mediaPaused||!e.mediaTimeIsLive,a=i?rS("seek to live"):rS("playing live");e.setAttribute("aria-label",a);let r=null==(t=e.shadowRoot)?void 0:t.querySelector('slot[name="text"]');r&&(r.textContent=rS("live")),i?e.removeAttribute("aria-disabled"):e.setAttribute("aria-disabled","true")};class s6 extends sd{static get observedAttributes(){return[...super.observedAttributes,s3,s4]}connectedCallback(){super.connectedCallback(),s8(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),s8(this)}get mediaPaused(){return r2(this,rn.MEDIA_PAUSED)}set mediaPaused(e){r3(this,rn.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return r2(this,rn.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){r3(this,rn.MEDIA_TIME_IS_LIVE,e)}handleClick(){(this.mediaPaused||!this.mediaTimeIsLive)&&(this.dispatchEvent(new rN.CustomEvent(s5,{composed:!0,bubbles:!0})),this.hasAttribute(s4)&&this.dispatchEvent(new rN.CustomEvent(s9,{composed:!0,bubbles:!0})))}}s6.getSlotTemplateHTML=function(e){return`
855    <style>
856      :host { --media-tooltip-display: none; }
857      
858      slot[name=indicator] > *,
859      :host ::slotted([slot=indicator]) {
860        
861        min-width: auto;
862        fill: var(--media-live-button-icon-color, rgb(140, 140, 140));
863        color: var(--media-live-button-icon-color, rgb(140, 140, 140));
864      }
865
866      :host([${s3}]:not([${s4}])) slot[name=indicator] > *,
867      :host([${s3}]:not([${s4}])) ::slotted([slot=indicator]) {
868        fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));
869        color: var(--media-live-button-indicator-color, rgb(255, 0, 0));
870      }
871
872      :host([${s3}]:not([${s4}])) {
873        cursor: var(--media-cursor, not-allowed);
874      }
875
876      slot[name=text]{
877        text-transform: uppercase;
878      }
879
880    </style>
881
882    <slot name="indicator"><svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg></slot>
883    
884    <slot name="spacer">&nbsp;</slot><slot name="text">${rS("live")}</slot>
885  `},rN.customElements.get("media-live-button")||rN.customElements.define("media-live-button",s6);var s7=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oe=(e,t,i)=>(s7(e,t,"read from private field"),i?i.call(e):t.get(e)),ot=(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)},oi=(e,t,i,a)=>(s7(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let oa={LOADING_DELAY:"loadingdelay",NO_AUTOHIDE:"noautohide"},or=`
886<svg aria-hidden="true" viewBox="0 0 100 100">
887  <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">
888    <animateTransform
889       attributeName="transform"
890       attributeType="XML"
891       type="rotate"
892       dur="1s"
893       from="0 50 50"
894       to="360 50 50"
895       repeatCount="indefinite" />
896  </path>
897</svg>
898`;class on extends rN.HTMLElement{constructor(){if(super(),ot(this,cd,void 0),ot(this,cu,500),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rF(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[ri.MEDIA_CONTROLLER,rn.MEDIA_PAUSED,rn.MEDIA_LOADING,oa.LOADING_DELAY]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===oa.LOADING_DELAY&&t!==i?this.loadingDelay=Number(i):e===ri.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=oe(this,cd))?void 0:a.unassociateElement)||r.call(a,this),oi(this,cd,null)),i&&this.isConnected&&(oi(this,cd,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=oe(this,cd))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let a=this.getAttribute(ri.MEDIA_CONTROLLER);a&&(oi(this,cd,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=oe(this,cd))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=oe(this,cd))?void 0:e.unassociateElement)||t.call(e,this),oi(this,cd,null)}get loadingDelay(){return oe(this,cu)}set loadingDelay(e){oi(this,cu,e);let{style:t}=rX(this.shadowRoot,":host");t.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return r2(this,rn.MEDIA_PAUSED)}set mediaPaused(e){r3(this,rn.MEDIA_PAUSED,e)}get mediaLoading(){return r2(this,rn.MEDIA_LOADING)}set mediaLoading(e){r3(this,rn.MEDIA_LOADING,e)}get mediaController(){return r4(this,ri.MEDIA_CONTROLLER)}set mediaController(e){r5(this,ri.MEDIA_CONTROLLER,e)}get noAutohide(){return r2(this,oa.NO_AUTOHIDE)}set noAutohide(e){r3(this,oa.NO_AUTOHIDE,e)}}cd=new WeakMap,cu=new WeakMap,on.shadowRootOptions={mode:"open"},on.getTemplateHTML=function(e){return`
899    <style>
900      :host {
901        display: var(--media-control-display, var(--media-loading-indicator-display, inline-block));
902        vertical-align: middle;
903        box-sizing: border-box;
904        --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, 500ms);
905      }
906
907      #status {
908        color: rgba(0,0,0,0);
909        width: 0px;
910        height: 0px;
911      }
912
913      :host slot[name=icon] > *,
914      :host ::slotted([slot=icon]) {
915        opacity: var(--media-loading-indicator-opacity, 0);
916        transition: opacity 0.15s;
917      }
918
919      :host([${rn.MEDIA_LOADING}]:not([${rn.MEDIA_PAUSED}])) slot[name=icon] > *,
920      :host([${rn.MEDIA_LOADING}]:not([${rn.MEDIA_PAUSED}])) ::slotted([slot=icon]) {
921        opacity: var(--media-loading-indicator-opacity, 1);
922        transition: opacity 0.15s var(--_loading-indicator-delay);
923      }
924
925      :host #status {
926        visibility: var(--media-loading-indicator-opacity, hidden);
927        transition: visibility 0.15s;
928      }
929
930      :host([${rn.MEDIA_LOADING}]:not([${rn.MEDIA_PAUSED}])) #status {
931        visibility: var(--media-loading-indicator-opacity, visible);
932        transition: visibility 0.15s var(--_loading-indicator-delay);
933      }
934
935      svg, img, ::slotted(svg), ::slotted(img) {
936        width: var(--media-loading-indicator-icon-width);
937        height: var(--media-loading-indicator-icon-height, 100px);
938        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
939        vertical-align: middle;
940      }
941    </style>
942
943    <slot name="icon">${or}</slot>
944    <div id="status" role="status" aria-live="polite">${rS("media loading")}</div>
945  `},rN.customElements.get("media-loading-indicator")||rN.customElements.define("media-loading-indicator",on);let os=`<svg aria-hidden="true" viewBox="0 0 24 24">
946  <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"/>
947</svg>`,oo=`<svg aria-hidden="true" viewBox="0 0 24 24">
948  <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"/>
949</svg>`,ol=`<svg aria-hidden="true" viewBox="0 0 24 24">
950  <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"/>
951</svg>`,od=e=>{let t="off"===e.mediaVolumeLevel?rS("unmute"):rS("mute");e.setAttribute("aria-label",t)};class ou extends sd{static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),od(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rn.MEDIA_VOLUME_LEVEL&&od(this)}get mediaVolumeLevel(){return r4(this,rn.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){r5(this,rn.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e="off"===this.mediaVolumeLevel?rt.MEDIA_UNMUTE_REQUEST:rt.MEDIA_MUTE_REQUEST;this.dispatchEvent(new rN.CustomEvent(e,{composed:!0,bubbles:!0}))}}ou.getSlotTemplateHTML=function(e){return`
952    <style>
953      :host(:not([${rn.MEDIA_VOLUME_LEVEL}])) slot[name=icon] slot:not([name=high]),
954      :host([${rn.MEDIA_VOLUME_LEVEL}=high]) slot[name=icon] slot:not([name=high]) {
955        display: none !important;
956      }
957
958      :host([${rn.MEDIA_VOLUME_LEVEL}=off]) slot[name=icon] slot:not([name=off]) {
959        display: none !important;
960      }
961
962      :host([${rn.MEDIA_VOLUME_LEVEL}=low]) slot[name=icon] slot:not([name=low]) {
963        display: none !important;
964      }
965
966      :host([${rn.MEDIA_VOLUME_LEVEL}=medium]) slot[name=icon] slot:not([name=medium]) {
967        display: none !important;
968      }
969
970      :host(:not([${rn.MEDIA_VOLUME_LEVEL}=off])) slot[name=tooltip-unmute],
971      :host([${rn.MEDIA_VOLUME_LEVEL}=off]) slot[name=tooltip-mute] {
972        display: none;
973      }
974    </style>
975
976    <slot name="icon">
977      <slot name="off">${os}</slot>
978      <slot name="low">${oo}</slot>
979      <slot name="medium">${oo}</slot>
980      <slot name="high">${ol}</slot>
981    </slot>
982  `},ou.getTooltipContentHTML=function(){return`
983    <slot name="tooltip-mute">${rS("Mute")}</slot>
984    <slot name="tooltip-unmute">${rS("Unmute")}</slot>
985  `},rN.customElements.get("media-mute-button")||rN.customElements.define("media-mute-button",ou);let oc=`<svg aria-hidden="true" viewBox="0 0 28 24">
986  <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"/>
987</svg>`,oh=e=>{let t=e.mediaIsPip?rS("exit picture in picture mode"):rS("enter picture in picture mode");e.setAttribute("aria-label",t)};class om extends sd{static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_IS_PIP,rn.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),oh(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rn.MEDIA_IS_PIP&&oh(this)}get mediaPipUnavailable(){return r4(this,rn.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){r5(this,rn.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return r2(this,rn.MEDIA_IS_PIP)}set mediaIsPip(e){r3(this,rn.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?rt.MEDIA_EXIT_PIP_REQUEST:rt.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new rN.CustomEvent(e,{composed:!0,bubbles:!0}))}}om.getSlotTemplateHTML=function(e){return`
988    <style>
989      :host([${rn.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) {
990        display: none !important;
991      }
992
993      :host(:not([${rn.MEDIA_IS_PIP}])) slot[name=icon] slot:not([name=enter]) {
994        display: none !important;
995      }
996
997      :host([${rn.MEDIA_IS_PIP}]) slot[name=tooltip-enter],
998      :host(:not([${rn.MEDIA_IS_PIP}])) slot[name=tooltip-exit] {
999        display: none;
1000      }
1001    </style>
1002
1003    <slot name="icon">
1004      <slot name="enter">${oc}</slot>
1005      <slot name="exit">${oc}</slot>
1006    </slot>
1007  `},om.getTooltipContentHTML=function(){return`
1008    <slot name="tooltip-enter">${rS("Enter picture in picture mode")}</slot>
1009    <slot name="tooltip-exit">${rS("Exit picture in picture mode")}</slot>
1010  `},rN.customElements.get("media-pip-button")||rN.customElements.define("media-pip-button",om);var op=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)};let ov={RATES:"rates"},oE=[1,1.2,1.5,1.7,2];class ob extends sd{constructor(){var e;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,cc,new nm(this,ov.RATES,{defaultValue:oE})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${null!=(e=this.mediaPlaybackRate)?e:1}x`}static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_PLAYBACK_RATE,ov.RATES]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===ov.RATES&&(op(this,cc).value=i),e===rn.MEDIA_PLAYBACK_RATE){let e=i?+i:NaN,t=Number.isNaN(e)?1:e;this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",rS("Playback rate {playbackRate}",{playbackRate:t}))}}get rates(){return op(this,cc)}set rates(e){e?Array.isArray(e)?op(this,cc).value=e.join(" "):"string"==typeof e&&(op(this,cc).value=e):op(this,cc).value=""}get mediaPlaybackRate(){return r0(this,rn.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){r1(this,rn.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;let i=Array.from(op(this,cc).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 rN.CustomEvent(rt.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(r)}}cc=new WeakMap,ob.getSlotTemplateHTML=function(e){return`
1011    <style>
1012      :host {
1013        min-width: 5ch;
1014        padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
1015      }
1016    </style>
1017    <slot name="icon">${e.mediaplaybackrate||1}x</slot>
1018  `},ob.getTooltipContentHTML=function(){return rS("Playback rate")},rN.customElements.get("media-playback-rate-button")||rN.customElements.define("media-playback-rate-button",ob);let og=`<svg aria-hidden="true" viewBox="0 0 24 24">
1019  <path d="m6 21 15-9L6 3v18Z"/>
1020</svg>`,of=`<svg aria-hidden="true" viewBox="0 0 24 24">
1021  <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>
1022</svg>`,o_=e=>{let t=e.mediaPaused?rS("play"):rS("pause");e.setAttribute("aria-label",t)};class oy extends sd{static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_PAUSED,rn.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),o_(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),(e===rn.MEDIA_PAUSED||e===rn.MEDIA_LANG)&&o_(this)}get mediaPaused(){return r2(this,rn.MEDIA_PAUSED)}set mediaPaused(e){r3(this,rn.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?rt.MEDIA_PLAY_REQUEST:rt.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new rN.CustomEvent(e,{composed:!0,bubbles:!0}))}}oy.getSlotTemplateHTML=function(e){return`
1023    <style>
1024      :host([${rn.MEDIA_PAUSED}]) slot[name=pause],
1025      :host(:not([${rn.MEDIA_PAUSED}])) slot[name=play] {
1026        display: none !important;
1027      }
1028
1029      :host([${rn.MEDIA_PAUSED}]) slot[name=tooltip-pause],
1030      :host(:not([${rn.MEDIA_PAUSED}])) slot[name=tooltip-play] {
1031        display: none;
1032      }
1033    </style>
1034
1035    <slot name="icon">
1036      <slot name="play">${og}</slot>
1037      <slot name="pause">${of}</slot>
1038    </slot>
1039  `},oy.getTooltipContentHTML=function(){return`
1040    <slot name="tooltip-play">${rS("Play")}</slot>
1041    <slot name="tooltip-pause">${rS("Pause")}</slot>
1042  `},rN.customElements.get("media-play-button")||rN.customElements.define("media-play-button",oy);let oT={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"};class oA extends rN.HTMLElement{static get observedAttributes(){return[oT.PLACEHOLDER_SRC,oT.SRC]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rF(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,i){if(e===oT.SRC&&(null==i?this.image.removeAttribute(oT.SRC):this.image.setAttribute(oT.SRC,i)),e===oT.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 r4(this,oT.PLACEHOLDER_SRC)}set placeholderSrc(e){r5(this,oT.SRC,e)}get src(){return r4(this,oT.SRC)}set src(e){r5(this,oT.SRC,e)}}oA.shadowRootOptions={mode:"open"},oA.getTemplateHTML=function(e){return`
1043    <style>
1044      :host {
1045        pointer-events: none;
1046        display: var(--media-poster-image-display, inline-block);
1047        box-sizing: border-box;
1048      }
1049
1050      img {
1051        max-width: 100%;
1052        max-height: 100%;
1053        min-width: 100%;
1054        min-height: 100%;
1055        background-repeat: no-repeat;
1056        background-position: var(--media-poster-image-background-position, var(--media-object-position, center));
1057        background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain));
1058        object-fit: var(--media-object-fit, contain);
1059        object-position: var(--media-object-position, center);
1060      }
1061    </style>
1062
1063    <img part="poster img" aria-hidden="true" id="image"/>
1064  `},rN.customElements.get("media-poster-image")||rN.customElements.define("media-poster-image",oA);var ok=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};class ow extends sV{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,ch,void 0),((e,t,i,a)=>(ok(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,ch,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_PREVIEW_CHAPTER,rn.MEDIA_LANG]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),(e===rn.MEDIA_PREVIEW_CHAPTER||e===rn.MEDIA_LANG)&&i!==t&&null!=i){var a,r;if((ok(this,a=ch,"read from private field"),r?r.call(this):a.get(this)).textContent=i,""!==i){let e=rS("chapter: {chapterName}",{chapterName:i});this.setAttribute("aria-valuetext",e)}else this.removeAttribute("aria-valuetext")}}get mediaPreviewChapter(){return r4(this,rn.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){r5(this,rn.MEDIA_PREVIEW_CHAPTER,e)}}ch=new WeakMap,rN.customElements.get("media-preview-chapter-display")||rN.customElements.define("media-preview-chapter-display",ow);var oS=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oI=(e,t,i)=>(oS(e,t,"read from private field"),i?i.call(e):t.get(e)),oR=(e,t,i,a)=>(oS(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class oD extends rN.HTMLElement{constructor(){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,cm,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rF(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[ri.MEDIA_CONTROLLER,rn.MEDIA_PREVIEW_IMAGE,rn.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t,i;let a=this.getAttribute(ri.MEDIA_CONTROLLER);a&&(oR(this,cm,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=oI(this,cm))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=oI(this,cm))?void 0:e.unassociateElement)||t.call(e,this),oR(this,cm,null)}attributeChangedCallback(e,t,i){var a,r,n,s,o;[rn.MEDIA_PREVIEW_IMAGE,rn.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===ri.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=oI(this,cm))?void 0:a.unassociateElement)||r.call(a,this),oR(this,cm,null)),i&&this.isConnected&&(oR(this,cm,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=oI(this,cm))?void 0:s.associateElement)||o.call(s,this)))}get mediaPreviewImage(){return r4(this,rn.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){r5(this,rn.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(rn.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(e=>+e)}set mediaPreviewCoords(e){if(!e)return void this.removeAttribute(rn.MEDIA_PREVIEW_COORDS);this.setAttribute(rn.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),p=c<1,v=p?c:h>1?h:1,{style:E}=rX(this.shadowRoot,":host"),b=rX(this.shadowRoot,"img").style,g=this.shadowRoot.querySelector("img"),f=p?"min":"max";E.setProperty(`${f}-width`,"initial","important"),E.setProperty(`${f}-height`,"initial","important"),E.width=`${r*v}px`,E.height=`${n*v}px`;let _=()=>{b.width=`${this.imgWidth*v}
1064px`,b.height=`${this.imgHeight*v}px`,b.display="block"};g.src!==s&&(g.onload=()=>{this.imgWidth=g.naturalWidth,this.imgHeight=g.naturalHeight,_()},g.src=s,_()),_(),b.transform=`translate(-${i*v}px, -${a*v}px)`}}cm=new WeakMap,oD.shadowRootOptions={mode:"open"},oD.getTemplateHTML=function(e){return`
1065    <style>
1066      :host {
1067        box-sizing: border-box;
1068        display: var(--media-control-display, var(--media-preview-thumbnail-display, inline-block));
1069        overflow: hidden;
1070      }
1071
1072      img {
1073        display: none;
1074        position: relative;
1075      }
1076    </style>
1077    <img crossorigin loading="eager" decoding="async">
1078  `},rN.customElements.get("media-preview-thumbnail")||rN.customElements.define("media-preview-thumbnail",oD);var oC=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oL=(e,t,i)=>(oC(e,t,"read from private field"),i?i.call(e):t.get(e));class oM extends sV{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,cp,void 0),((e,t,i,a)=>(oC(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,cp,this.shadowRoot.querySelector("slot")),oL(this,cp).textContent=rA(0)}static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rn.MEDIA_PREVIEW_TIME&&null!=i&&(oL(this,cp).textContent=rA(parseFloat(i)))}get mediaPreviewTime(){return r0(this,rn.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){r1(this,rn.MEDIA_PREVIEW_TIME,e)}}cp=new WeakMap,rN.customElements.get("media-preview-time-display")||rN.customElements.define("media-preview-time-display",oM);let oO={SEEK_OFFSET:"seekoffset"};class ox extends sd{static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_CURRENT_TIME,oO.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=r0(this,oO.SEEK_OFFSET,30)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===oO.SEEK_OFFSET&&(this.seekOffset=r0(this,oO.SEEK_OFFSET,30))}get seekOffset(){return r0(this,oO.SEEK_OFFSET,30)}set seekOffset(e){r1(this,oO.SEEK_OFFSET,e),this.setAttribute("aria-label",rS("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),rq(rY(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return r0(this,rn.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){r1(this,rn.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new rN.CustomEvent(rt.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}ox.getSlotTemplateHTML=function(e,t){let i;return`
1079    <slot name="icon">${i=t.seekOffset,`
1080  <svg aria-hidden="true" viewBox="0 0 20 24">
1081    <defs>
1082      <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>
1083    </defs>
1084    <text class="text value" transform="translate(2.18 19.87)">${i}</text>
1085    <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"/>
1086  </svg>`}</slot>
1087  `},ox.getTooltipContentHTML=function(){return rS("Seek backward")},rN.customElements.get("media-seek-backward-button")||rN.customElements.define("media-seek-backward-button",ox);let oN={SEEK_OFFSET:"seekoffset"};class oP extends sd{static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_CURRENT_TIME,oN.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=r0(this,oN.SEEK_OFFSET,30)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===oN.SEEK_OFFSET&&(this.seekOffset=r0(this,oN.SEEK_OFFSET,30))}get seekOffset(){return r0(this,oN.SEEK_OFFSET,30)}set seekOffset(e){r1(this,oN.SEEK_OFFSET,e),this.setAttribute("aria-label",rS("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),rq(rY(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return r0(this,rn.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){r1(this,rn.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,t=new rN.CustomEvent(rt.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}oP.getSlotTemplateHTML=function(e,t){let i;return`
1088    <slot name="icon">${i=t.seekOffset,`
1089  <svg aria-hidden="true" viewBox="0 0 20 24">
1090    <defs>
1091      <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>
1092    </defs>
1093    <text class="text value" transform="translate(8.9 19.87)">${i}</text>
1094    <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"/>
1095  </svg>`}</slot>
1096  `},oP.getTooltipContentHTML=function(){return rS("Seek forward")},rN.customElements.get("media-seek-forward-button")||rN.customElements.define("media-seek-forward-button",oP);var oU=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oB=(e,t,i)=>(oU(e,t,"read from private field"),i?i.call(e):t.get(e));let oH={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},oW=[...Object.values(oH),rn.MEDIA_CURRENT_TIME,rn.MEDIA_DURATION,rn.MEDIA_SEEKABLE],oV=["Enter"," "],oF="&nbsp;/&nbsp;",o$=(e,{timesSep:t=oF}={})=>{var i,a;let r=null!=(i=e.mediaCurrentTime)?i:0,[,n]=null!=(a=e.mediaSeekable)?a:[],s=0;Number.isFinite(e.mediaDuration)?s=e.mediaDuration:Number.isFinite(n)&&(s=n);let o=e.remaining?rA(0-(s-r)):rA(r);return e.showDuration?`${o}${t}${rA(s)}`:o};class oK extends sV{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,cv,void 0),((e,t,i,a)=>(oU(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,cv,this.shadowRoot.querySelector("slot")),oB(this,cv).innerHTML=`${o$(this)}`}static get observedAttributes(){return[...super.observedAttributes,...oW,"disabled"]}connectedCallback(){let{style:e}=rX(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",rS("playback time"));let t=e=>{let{key:i}=e;if(!oV.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||!oV.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){oW.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 r2(this,oH.REMAINING)}set remaining(e){r3(this,oH.REMAINING,e)}get showDuration(){return r2(this,oH.SHOW_DURATION)}set showDuration(e){r3(this,oH.SHOW_DURATION,e)}get noToggle(){return r2(this,oH.NO_TOGGLE)}set noToggle(e){r3(this,oH.NO_TOGGLE,e)}get mediaDuration(){return r0(this,rn.MEDIA_DURATION)}set mediaDuration(e){r1(this,rn.MEDIA_DURATION,e)}get mediaCurrentTime(){return r0(this,rn.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){r1(this,rn.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(rn.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){if(null==e)return void this.removeAttribute(rn.MEDIA_SEEKABLE);this.setAttribute(rn.MEDIA_SEEKABLE,e.join(":"))}update(){let e=o$(this);(e=>{var t;
1096let 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.remaining?rT(0-(r-i)):rT(i);if(!e.showDuration)return e.setAttribute("aria-valuetext",n);let s=rT(r),o=`${n} of ${s}`;e.setAttribute("aria-valuetext",o)})(this),e!==oB(this,cv).innerHTML&&(oB(this,cv).innerHTML=e)}}cv=new WeakMap,oK.getSlotTemplateHTML=function(e,t){return`
1097    <slot>${o$(t)}</slot>
1098  `},rN.customElements.get("media-time-display")||rN.customElements.define("media-time-display",oK);var oq=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oY=(e,t,i)=>(oq(e,t,"read from private field"),i?i.call(e):t.get(e)),oG=(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)},oj=(e,t,i,a)=>(oq(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class oQ{constructor(e,t,i){oG(this,cE,void 0),oG(this,cb,void 0),oG(this,cg,void 0),oG(this,cf,void 0),oG(this,c_,void 0),oG(this,cy,void 0),oG(this,cT,void 0),oG(this,cA,void 0),oG(this,ck,0),oG(this,cw,(e=performance.now())=>{oj(this,ck,requestAnimationFrame(oY(this,cw))),oj(this,cf,performance.now()-oY(this,cg));let t=1e3/this.fps;if(oY(this,cf)>t){oj(this,cg,e-oY(this,cf)%t);let i=1e3/((e-oY(this,cb))/++((e,t,i,a)=>({set _(value){oj(e,t,value,i)},get _(){return oY(e,t,a)}}))(this,c_)._),a=(e-oY(this,cy))/1e3/this.duration,r=oY(this,cT)+a*this.playbackRate;r-oY(this,cE).valueAsNumber>0?oj(this,cA,this.playbackRate/this.duration/i):(oj(this,cA,.995*oY(this,cA)),r=oY(this,cE).valueAsNumber+oY(this,cA)),this.callback(r)}}),oj(this,cE,e),this.callback=t,this.fps=i}start(){0===oY(this,ck)&&(oj(this,cg,performance.now()),oj(this,cb,oY(this,cg)),oj(this,c_,0),oY(this,cw).call(this))}stop(){0!==oY(this,ck)&&(cancelAnimationFrame(oY(this,ck)),oj(this,ck,0))}update({start:e,duration:t,playbackRate:i}){let a=e-oY(this,cE).valueAsNumber,r=Math.abs(t-this.duration);(a>0||a<-.03||r>=.5)&&this.callback(e),oj(this,cT,e),oj(this,cy,performance.now()),this.duration=t,this.playbackRate=i}}cE=new WeakMap,cb=new WeakMap,cg=new WeakMap,cf=new WeakMap,c_=new WeakMap,cy=new WeakMap,cT=new WeakMap,cA=new WeakMap,ck=new WeakMap,cw=new WeakMap;var oZ=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oz=(e,t,i)=>(oZ(e,t,"read from private field"),i?i.call(e):t.get(e)),oX=(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)},oJ=(e,t,i,a)=>(oZ(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),o0=(e,t,i)=>(oZ(e,t,"access private method"),i);let o1=(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))},o2=(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 o3 extends sO{constructor(){super(),oX(this,cP),oX(this,cB),oX(this,cV),oX(this,c$),oX(this,cq),oX(this,cG),oX(this,cQ),oX(this,cz),oX(this,cS,void 0),oX(this,cI,void 0),oX(this,cR,void 0),oX(this,cD,void 0),oX(this,cC,void 0),oX(this,cL,void 0),oX(this,cM,void 0),oX(this,cO,void 0),oX(this,cx,void 0),oX(this,cN,void 0),oX(this,cW,e=>{!this.dragging&&(rg(e)&&(this.range.valueAsNumber=e),oz(this,cN)||this.updateBar())}),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),oJ(this,cR,this.shadowRoot.querySelectorAll('[part~="box"]')),oJ(this,cC,this.shadowRoot.querySelector('[part~="preview-box"]')),oJ(this,cL,this.shadowRoot.querySelector('[part~="current-box"]'));let e=getComputedStyle(this);oJ(this,cM,parseInt(e.getPropertyValue("--media-box-padding-left"))),oJ(this,cO,parseInt(e.getPropertyValue("--media-box-padding-right"))),oJ(this,cI,new oQ(this.range,oz(this,cW),60))}static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_PAUSED,rn.MEDIA_DURATION,rn.MEDIA_SEEKABLE,rn.MEDIA_CURRENT_TIME,rn.MEDIA_PREVIEW_IMAGE,rn.MEDIA_PREVIEW_TIME,rn.MEDIA_PREVIEW_CHAPTER,rn.MEDIA_BUFFERED,rn.MEDIA_PLAYBACK_RATE,rn.MEDIA_LOADING,rn.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",rS("seek")),o0(this,cP,cU).call(this),oJ(this,cS,this.getRootNode()),null==(e=oz(this,cS))||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),o0(this,cP,cU).call(this),null==(e=oz(this,cS))||e.removeEventListener("transitionstart",this),oJ(this,cS,null)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),t!=i&&(e===rn.MEDIA_CURRENT_TIME||e===rn.MEDIA_PAUSED||e===rn.MEDIA_ENDED||e===rn.MEDIA_LOADING||e===rn.MEDIA_DURATION||e===rn.MEDIA_SEEKABLE?(oz(this,cI).update({start:o1(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),o0(this,cP,cU).call(this),(e=>
1098{let t=e.range,i=rT(+o2(e)),a=rT(+e.mediaSeekableEnd),r=i&&a?`${i} of ${a}`:"video not loaded, unknown time.";t.setAttribute("aria-valuetext",r)})(this)):e===rn.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===rn.MEDIA_DURATION||e===rn.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=oz(this,cx),this.updateBar()))}get mediaChaptersCues(){return oz(this,cx)}set mediaChaptersCues(e){var t;oJ(this,cx,e),this.updateSegments(null==(t=oz(this,cx))?void 0:t.map(e=>({start:o1(this,e.startTime),end:o1(this,e.endTime)})))}get mediaPaused(){return r2(this,rn.MEDIA_PAUSED)}set mediaPaused(e){r3(this,rn.MEDIA_PAUSED,e)}get mediaLoading(){return r2(this,rn.MEDIA_LOADING)}set mediaLoading(e){r3(this,rn.MEDIA_LOADING,e)}get mediaDuration(){return r0(this,rn.MEDIA_DURATION)}set mediaDuration(e){r1(this,rn.MEDIA_DURATION,e)}get mediaCurrentTime(){return r0(this,rn.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){r1(this,rn.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return r0(this,rn.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){r1(this,rn.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(rn.MEDIA_BUFFERED);return e?e.split(" ").map(e=>e.split(":").map(e=>+e)):[]}set mediaBuffered(e){if(!e)return void this.removeAttribute(rn.MEDIA_BUFFERED);let t=e.map(e=>e.join(":")).join(" ");this.setAttribute(rn.MEDIA_BUFFERED,t)}get mediaSeekable(){let e=this.getAttribute(rn.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){if(null==e)return void this.removeAttribute(rn.MEDIA_SEEKABLE);this.setAttribute(rn.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 r4(this,rn.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){r5(this,rn.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return r0(this,rn.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){r1(this,rn.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return r2(this,rn.MEDIA_ENDED)}set mediaEnded(e){r3(this,rn.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=o1(this,r)}let{style:a}=rX(this.shadowRoot,"#buffered");a.setProperty("width",`${100*t}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;let e=rX(this.shadowRoot,"#current-rail"),t=rX(this.shadowRoot,'[part~="current-box"]'),i=o0(this,cV,cF).call(this,oz(this,cL)),a=o0(this,c$,cK).call(this,i,this.range.valueAsNumber),r=o0(this,cq,cY).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":o0(this,cz,cX).call(this);break;case"pointermove":o0(this,cG,cj).call(this,e);break;case"pointerup":oz(this,cN)&&oJ(this,cN,!1);break;case"pointerdown":oJ(this,cN,!0);break;case"pointerleave":o0(this,cQ,cZ).call(this,null);break;case"transitionstart":rG(e.target,this)&&setTimeout(()=>o0(this,cP,cU).call(this),0)}}}cS=new WeakMap,cI=new WeakMap,cR=new WeakMap,cD=new WeakMap,cC=new WeakMap,cL=new WeakMap,cM=new WeakMap,cO=new WeakMap,cx=new WeakMap,cN=new WeakMap,cP=new WeakSet,cU=function(){o0(this,cB,cH).call(this)?oz(this,cI).start():oz(this,cI).stop()},cB=new WeakSet,cH=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&rz(this)},cW=new WeakMap,cV=new WeakSet,cF=function(e){var t;let i=(null!=(t=this.getAttribute("bounds")?rj(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}},c$=new WeakSet,cK=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},cq=new WeakSet,cY=function(e,t){let{width:i,min:a,max:r}
1098=e.box,n=t*e.range.width;if(n<a+oz(this,cM)){let t=e.range.left-e.bounds.left-oz(this,cM);return`${n-i/2+t}px`}if(n>r-oz(this,cO)){let t=e.bounds.right-e.range.right-oz(this,cO);return`${n+i/2-t-e.range.width}px`}return 0},cG=new WeakSet,cj=function(e){let t=[...oz(this,cR)].some(t=>e.composedPath().includes(t));if(!this.dragging&&(t||!e.composedPath().includes(this)))return void o0(this,cQ,cZ).call(this,null);let i=this.mediaSeekableEnd;if(!i)return;let a=rX(this.shadowRoot,"#preview-rail"),r=rX(this.shadowRoot,'[part~="preview-box"]'),n=o0(this,cV,cF).call(this,oz(this,cC)),s=(e.clientX-n.range.left)/n.range.width;s=Math.max(0,Math.min(1,s));let o=o0(this,c$,cK).call(this,n,s),l=o0(this,cq,cY).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(oz(this,cD))-Math.round(s*i))&&s>.01&&s<.99||(oJ(this,cD,s*i),o0(this,cQ,cZ).call(this,oz(this,cD)))},cQ=new WeakSet,cZ=function(e){this.dispatchEvent(new rN.CustomEvent(rt.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:e}))}
1098,cz=new WeakSet,cX=function(){oz(this,cI).stop();let e=o2(this);this.dispatchEvent(new rN.CustomEvent(rt.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e}))},o3.shadowRootOptions={mode:"open"},o3.getTemplateHTML=function(e){return`
1099    ${sO.getTemplateHTML(e)}
1100    <style>
1101      :host {
1102        --media-box-border-radius: 4px;
1103        --media-box-padding-left: 10px;
1104        --media-box-padding-right: 10px;
1105        --media-preview-border-radius: var(--media-box-border-radius);
1106        --media-box-arrow-offset: var(--media-box-border-radius);
1107        --_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)));
1108        --_preview-background: var(--media-preview-background, var(--_control-background));
1109
1110        
1111        contain: layout;
1112      }
1113
1114      #buffered {
1115        background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4));
1116        position: absolute;
1117        height: 100%;
1118        will-change: width;
1119      }
1120
1121      #preview-rail,
1122      #current-rail {
1123        width: 100%;
1124        position: absolute;
1125        left: 0;
1126        bottom: 100%;
1127        pointer-events: none;
1128        will-change: transform;
1129      }
1130
1131      [part~="box"] {
1132        width: min-content;
1133        
1134        position: absolute;
1135        bottom: 100%;
1136        flex-direction: column;
1137        align-items: center;
1138        transform: translateX(-50%);
1139      }
1140
1141      [part~="current-box"] {
1142        display: var(--media-current-box-display, var(--media-box-display, flex));
1143        margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px));
1144        visibility: hidden;
1145      }
1146
1147      [part~="preview-box"] {
1148        display: var(--media-preview-box-display, var(--media-box-display, flex));
1149        margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px));
1150        transition-property: var(--media-preview-transition-property, visibility, opacity);
1151        transition-duration: var(--media-preview-transition-duration-out, .25s);
1152        transition-delay: var(--media-preview-transition-delay-out, 0s);
1153        visibility: hidden;
1154        opacity: 0;
1155      }
1156
1157      :host(:is([${rn.MEDIA_PREVIEW_IMAGE}], [${rn.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] {
1158        transition-duration: var(--media-preview-transition-duration-in, .5s);
1159        transition-delay: var(--media-preview-transition-delay-in, .25s);
1160        visibility: visible;
1161        opacity: 1;
1162      }
1163
1164      @media (hover: hover) {
1165        :host(:is([${rn.MEDIA_PREVIEW_IMAGE}], [${rn.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] {
1166          transition-duration: var(--media-preview-transition-duration-in, .5s);
1167          transition-delay: var(--media-preview-transition-delay-in, .25s);
1168          visibility: visible;
1169          opacity: 1;
1170        }
1171      }
1172
1173      media-preview-thumbnail,
1174      ::slotted(media-preview-thumbnail) {
1175        visibility: hidden;
1176        
1177        transition: visibility 0s .25s;
1178        transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
1179        background: var(--media-preview-thumbnail-background, var(--_preview-background));
1180        box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2));
1181        max-width: var(--media-preview-thumbnail-max-width, 180px);
1182        max-height: var(--media-preview-thumbnail-max-height, 160px);
1183        min-width: var(--media-preview-thumbnail-min-width, 120px);
1184        min-height: var(--media-preview-thumbnail-min-height, 80px);
1185        border: var(--media-preview-thumbnail-border);
1186        border-radius: var(--media-preview-thumbnail-border-radius,
1187          var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0);
1188      }
1189
1190      :host([${rn.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail,
1191      :host([${rn.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) {
1192        transition-delay: var(--media-preview-transition-delay-in, .25s);
1193        visibility: visible;
1194      }
1195
1196      @media (hover: hover) {
1197        :host([${rn.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail,
1198        :host([${rn.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) {
1199          transition-delay: var(--media-preview-transition-delay-in, .25s);
1200          visibility: visible;
1201        }
1202
1203        :host([${rn.MEDIA_PREVIEW_TIME}]:hover) {
1204          --media-time-range-hover-display: block;
1205        }
1206      }
1207
1208      media-preview-chapter-display,
1209      ::slotted(media-preview-chapter-display) {
1210        font-size: var(--media-font-size, 13px);
1211        line-height: 17px;
1212        min-width: 0;
1213        visibility: hidden;
1214        
1215        transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s;
1216        transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
1217        background: var(--media-preview-chapter-background, var(--_preview-background));
1218        border-radius: var(--media-preview-chapter-border-radius,
1219          var(--media-preview-border-radius) var(--media-preview-border-radius)
1220          var(--media-preview-border-radius) var(--media-preview-border-radius));
1221        padding: var(--media-preview-chapter-padding, 3.5px 9px);
1222        margin: var(--media-preview-chapter-margin, 0 0 5px);
1223        text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75));
1224      }
1225
1226      :host([${rn.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display,
1227      :host([${rn.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) {
1228        transition-delay: var(--media-preview-transition-delay-in, .25s);
1229        border-radius: var(--media-preview-chapter-border-radius, 0);
1230        padding: var(--media-preview-chapter-padding, 3.5px 9px 0);
1231        margin: var(--media-preview-chapter-margin, 0);
1232        min-width: 100%;
1233      }
1234
1235      media-preview-chapter-display[${rn.MEDIA_PREVIEW_CHAPTER}],
1236      ::slotted(media-preview-chapter-display[${rn.MEDIA_PREVIEW_CHAPTER}]) {
1237        visibility: visible;
1238      }
1239
1240      media-preview-chapter-display:not([aria-valuetext]),
1241      ::slotted(media-preview-chapter-display:not([aria-valuetext])) {
1242        display: none;
1243      }
1244
1245      media-preview-time-display,
1246      ::slotted(media-preview-time-display),
1247      media-time-display,
1248      ::slotted(media-time-display) {
1249        font-size: var(--media-font-size, 13px);
1250        line-height: 17px;
1251        min-width: 0;
1252        
1253        transition: min-width 0s, border-radius 0s;
1254        transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
1255        background: var(--media-preview-time-background, var(--_preview-background));
1256        border-radius: var(--media-preview-time-border-radius,
1257          var(--media-preview-border-radius) var(--media-preview-border-radius)
1258          var(--media-preview-border-radius) var(--media-preview-border-radius));
1259        padding: var(--media-preview-time-padding, 3.5px 9px);
1260        margin: var(--media-preview-time-margin, 0);
1261        text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75));
1262        transform: translateX(min(
1263          max(calc(50% - var(--_box-width) / 2),
1264          calc(var(--_box-shift, 0))),
1265          calc(var(--_box-width) / 2 - 50%)
1266        ));
1267      }
1268
1269      :host([${rn.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display,
1270      :host([${rn.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) {
1271        transition-delay: var(--media-preview-transition-delay-in, .25s);
1272        border-radius: var(--media-preview-time-border-radius,
1273          0 0 var(--media-preview-border-radius) var(--media-preview-border-radius));
1274        min-width: 100%;
1275      }
1276
1277      :host([${rn.MEDIA_PREVIEW_TIME}]:hover) {
1278        --media-time-range-hover-display: block;
1279      }
1280
1281      [part~="arrow"],
1282      ::slotted([part~="arrow"]) {
1283        display: var(--media-box-arrow-display, inline-block);
1284        transform: translateX(min(
1285          max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)),
1286          calc(var(--_box-shift, 0))),
1287          calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset))
1288        ));
1289        
1290        border-color: transparent;
1291        border-top-color: var(--media-box-arrow-background, var(--_control-background));
1292        border-width: var(--media-box-arrow-border-width,
1293          var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0);
1294        border-style: solid;
1295        justify-content: center;
1296        height: 0;
1297      }
1298    </style>
1299    <div id="preview-rail">
1300      <slot name="preview" part="box preview-box">
1301        <media-preview-thumbnail>
1302          <template shadowrootmode="${oD.shadowRootOptions.mode}">
1303            ${oD.getTemplateHTML({})}
1304          </template>
1305        </media-preview-thumbnail>
1306        <media-preview-chapter-display></media-preview-chapter-display>
1307        <media-preview-time-display></media-preview-time-display>
1308        <slot name="preview-arrow"><div part="arrow"></div></slot>
1309      </slot>
1310    </div>
1311    <div id="current-rail">
1312      <slot name="current" part="box current-box">
1313        
1314      </slot>
1315    </div>
1316  `},rN.customElements.get("media-time-range")||rN.customElements.define("media-time-range",o3);class o4 extends sO{static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_VOLUME,rn.MEDIA_MUTED,rn.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",()=>{let e=this.range.value,t=new rN.CustomEvent(rt.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",rS("volume"))}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===rn.MEDIA_VOLUME||e===rn.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()}}
1316get mediaVolume(){return r0(this,rn.MEDIA_VOLUME,1)}set mediaVolume(e){r1(this,rn.MEDIA_VOLUME,e)}get mediaMuted(){return r2(this,rn.MEDIA_MUTED)}set mediaMuted(e){r3(this,rn.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return r4(this,rn.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){r5(this,rn.MEDIA_VOLUME_UNAVAILABLE,e)}}rN.customElements.get("media-volume-range")||rN.customElements.define("media-volume-range",o4);var o5=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},o9=(e,t,i)=>(o5(e,t,"read from private field"),i?i.call(e):t.get(e)),o8=(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)},o6=(e,t,i,a)=>(o5(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let o7={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 lo&&"boolean"==typeof a.element[a.attributeName]?a.booleanValue=t:"function"==typeof t&&a instanceof lo?a.element[a.attributeName]=t:a.value=t}}}};class le extends rN.DocumentFragment{constructor(e,t,i=o7){var a;super(),o8(this,cJ,void 0),o8(this,c0,void 0),this.append(e.content.cloneNode(!0)),o6(this,cJ,lt(this)),o6(this,c0,i),null==(a=i.createCallback)||a.call(i,this,o9(this,cJ),t),i.processCallback(this,o9(this,cJ),t)}update(e){o9(this,c0).processCallback(this,o9(this,cJ),e)}}cJ=new WeakMap,c0=new WeakMap;let lt=(e,t=[])=>{let i,a;for(let r of e.attributes||[])if(r.value.includes("{{")){let n=new ls;for([i,a]of la(r.value))if(i){let i=new lo(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 la(n))if(i){let i=new ll(e);s.push(i),t.push([a,i])}else s.push(new Text(a));else if(r instanceof HTMLTemplateElement){let i=new ld(e,r);s.push(i),t.push([i.expression,i])}r.replaceWith(...s.flatMap(e=>e.replacementNodes||[e]))}}else lt(r,t);return t},li={},la=e=>{let t="",i=0,a=li[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]),li[e]=a};class lr{get value(){return""}set value(e){}toString(){return this.value}}let ln=new WeakMap;class ls{constructor(){o8(this,c1,[])}[Symbol.iterator](){return o9(this,c1).values()}get length(){return o9(this,c1).length}item(e){return o9(this,c1)[e]}append(...e){for(let t of e)t instanceof lo&&ln.set(t,this),o9(this,c1).push(t)}toString(){return o9(this,c1).join("")}}c1=new WeakMap;class lo extends lr{constructor(e,t,i){super(),o8(this,c9),o8(this,c2,""),o8(this,c3,void 0),o8(this,c4,void 0),o8(this,c5,void 0),o6(this,c3,e),o6(this,c4,t),o6(this,c5,i)}get attributeName(){return o9(this,c4)}get attributeNamespace(){return o9(this,c5)}get element(){return o9(this,c3)}get value(){return o9(this,c2)}set value(e){o9(this,c2)!==e&&(o6(this,c2,e),o9(this,c9,c8)&&1!==o9(this,c9,c8).length?o9(this,c3).setAttributeNS(o9(this,c5),o9(this,c4),o9(this,c9,c8).toString()):null==e?o9(this,c3).removeAttributeNS(o9(this,c5),o9(this,c4)):o9(this,c3).setAttributeNS(o9(this,c5),o9(this,c4),e))}get booleanValue(){return o9(this,c3).hasAttributeNS(o9(this,c5),o9(this,c4))}set booleanValue(e){if(o9(this,c9,c8)&&1!==o9(this,c9,c8).length)throw new DOMException("Value is not fully templatized");this.value=e?"":null}}c2=new WeakMap,c3=new WeakMap,c4=new WeakMap,c5=new WeakMap,c9=new WeakSet,c8=function(){return ln.get(this)};class ll extends lr{constructor(e,t){super(),o8(this,c6,void 0),o8(this,c7,void 0),o6(this,c6,e),o6(this,c7,t?[...t]:[new Text])}get replacementNodes(){return o9(this,c7)}get parentNode(){return o9(this,c6)}get nextSibling(){return o9(this,c7)[o9(this,c7).length-1].nextSibling}get previousSibling(){return o9(this,c7)[0].previousSibling}get value(){return o9(this,c7).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),o6(this,c7,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}(o9(this,c7)[0].parentNode,o9(this,c7),t,this.nextSibling))}}c6=new WeakMap,c7=new WeakMap;class ld extends ll{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 lu={string:e=>String(e)};class lc{constructor(e){this.template=e,this.state=void 0}}let lh=new WeakMap,lm=new WeakMap,lp={partial:(e,t)=>{t[e.expression]=new lc(e.template)},if:(e,t)=>
1316{var i;if(lg(e.expression,t))if(lh.get(e)!==e.template){lh.set(e,e.template);let i=new le(e.template,t,lE);e.replace(i),lm.set(e,i)}else null==(i=lm.get(e))||i.update(t);else e.replace(""),lh.delete(e),lm.delete(e)}},lv=Object.keys(lp),lE={processCallback(e,t,i){var a,r;if(i)for(let[e,n]of t){if(n instanceof ld){if(!n.directive){let e=lv.find(e=>n.template.hasAttribute(e));e&&(n.directive=e,n.expression=n.template.getAttribute(e))}null==(a=lp[n.directive])||a.call(lp,n,i);continue}let t=lg(e,i);if(t instanceof lc){lh.get(n)!==t.template?(lh.set(n,t.template),n.value=t=new le(t.template,t.state,lE),lm.set(n,t)):null==(r=lm.get(n))||r.update(t.state);continue}t?(n instanceof lo&&n.attributeName.startsWith("aria-")&&(t=String(t)),n instanceof lo?"boolean"==typeof t?n.booleanValue=t:"function"==typeof t?n.element[n.attributeName]=t:n.value=t:(n.value=t,lh.delete(n),lm.delete(n))):n instanceof lo?n.value=void 0:(n.value=void 0,lh.delete(n),lm.delete(n))}}},lb={"!":e=>!e,"!!":e=>!!e,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,">":(e,t)=>e>t,">=":(e,t)=>
1316e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"??":(e,t)=>null!=e?e:t,"|":(e,t)=>{var i;return null==(i=lu[t])?void 0:i.call(lu,e)}};function lg(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 lf(e);if((null==(i=d[0])?void 0:i.token)===">"){let i=t[null==(a=d[1])?void 0:a.token];if(!i)return lf(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]=ly(d,t))}return i}if(1===d.length)return l_(d[0])?ly(d[0].token,t):lf(e);if(2===d.length){let i=lb[null==(o=d[0])?void 0:o.token];return i&&l_(d[1])?i(ly(d[1].token,t)):lf(e)}if(3===d.length){let i=null==(l=d[1])?void 0:l.token,a=lb[i];if(!a||!l_(d[0])||!l_(d[2]))return lf(e);let r=ly(d[0].token,t);return a(r,"|"===i?d[2].token:ly(d[2].token,t))}}function lf(e){return console.warn(`Warning: invalid expression \`${e}\``),!1}function l_({type:e}){return["number","boolean","string","param"].includes(e)}function ly(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):rf(e)?parseFloat(e):t[e]}var lT=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lA=(e,t,i)=>(lT(e,t,"read from private field"),i?i.call(e):t.get(e)),lk=(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)},lw=(e,t,i,a)=>(lT(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),lS=(e,t,i)=>(lT(e,t,"access private method"),i);let lI={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},lR=rP.createElement("template");lR.innerHTML=`
1317  <style>
1318    :host {
1319      display: inline-block;
1320      line-height: 0;
1321    }
1322
1323    media-controller {
1324      width: 100%;
1325      height: 100%;
1326    }
1327
1328    media-captions-button:not([mediasubtitleslist]),
1329    media-captions-menu:not([mediasubtitleslist]),
1330    media-captions-menu-button:not([mediasubtitleslist]),
1331    media-audio-track-menu[mediaaudiotrackunavailable],
1332    media-audio-track-menu-button[mediaaudiotrackunavailable],
1333    media-rendition-menu[mediarenditionunavailable],
1334    media-rendition-menu-button[mediarenditionunavailable],
1335    media-volume-range[mediavolumeunavailable],
1336    media-airplay-button[mediaairplayunavailable],
1337    media-fullscreen-button[mediafullscreenunavailable],
1338    media-cast-button[mediacastunavailable],
1339    media-pip-button[mediapipunavailable] {
1340      display: none;
1341    }
1342  </style>
1343`;class lD extends rN.HTMLElement{constructor(){super(),lk(this,ha),lk(this,hn),lk(this,he,void 0),lk(this,ht,void 0),lk(this,hi,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&&!!(lI[e.attributeName]||e.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(rs.BREAKPOINTS_COMPUTED,this.render),lS(this,ha,hr).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return null!=(e=lA(this,he))?e:this.constructor.template}set template(e){if(null===e)return void this.removeAttribute("template");"string"==typeof e?this.setAttribute("template",e):e instanceof HTMLTemplateElement&&(lw(this,he,e),lw(this,hi,null),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})=>lI[e]||e.startsWith("breakpoint")),...Array.from(this.attributes)],r={};for(let e of a){let t=null!=(i=lI[e.name])?i:e.name.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase()),{value:a}=e;null!=a?(rf(a)&&(a=parseFloat(a)),r[t]=""===a||a):r[t]=!1}return r}attributeChangedCallback(e,t,i){"template"===e&&t!=i&&lS(this,hn,hs).call(this)}connectedCallback(){lS(this,hn,hs).call(this)}createRenderer(){this.template instanceof HTMLTemplateElement&&this.template!==lA(this,ht)&&(lw(this,ht,this.template),this.renderer=new le(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(lR.content.cloneNode(!0),this.renderer))}render(){var e;null==(e=this.renderer)||e.update(this.props)}}async function lC(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 lL(e){return e.split("-")[0]}he=new WeakMap,ht=new WeakMap,hi=new WeakMap,ha=new WeakSet,hr=function(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}},hn=new WeakSet,hs=function(){var e;let t=this.getAttribute("template");if(!t||t===lA(this,hi))return;let i=this.getRootNode(),a=null==(e=null==i?void 0:i.getElementById)?void 0:e.call(i,t);if(a){lw(this,hi,t),lw(this,he,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)&&(lw(this,hi,t),lC(t).then(e=>{let t=rP.createElement("template");t.innerHTML=e,lw(this,he,t),this.createRenderer()}).catch(console.error))},lD.observedAttributes=["template"],lD.processor=lE,rN.customElements.get("media-theme")||rN.customElements.define("media-theme",lD);
1343class lM extends Event{constructor({action:e="auto",relatedTarget:t,...i}){super("invoke",i),this.action=e,this.relatedTarget=t}}class lO extends Event{constructor({newState:e,oldState:t,...i}){super("toggle",i),this.newState=e,this.oldState=t}}var lx=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lN=(e,t,i)=>(lx(e,t,"read from private field"),i?i.call(e):t.get(e)),lP=(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)},lU=(e,t,i,a)=>(lx(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),lB=(e,t,i)=>(lx(e,t,"access private method"),i);function lH({type:e,text:t,value:i,checked:a}){let r=rP.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=rP.createElement("span");return n.textContent=t,r.append(n),r}function lW(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 lV={STYLE:"style",HIDDEN:"hidden",DISABLED:"disabled",ANCHOR:"anchor"};class lF extends rN.HTMLElement{constructor(){if(super(),lP(this,hp),lP(this,hE),lP(this,hf),lP(this,hy),lP(this,hA),lP(this,hw),lP(this,hD),lP(this,hL),lP(this,hO),lP(this,hN),lP(this,hU),lP(this,hH),lP(this,hV),lP(this,h$),lP(this,hq),lP(this,hG),lP(this,hQ),lP(this,hz),lP(this,ho,null),lP(this,hl,null),lP(this,hd,null),lP(this,hu,new Set),lP(this,hc,void 0),lP(this,hh,!1),lP(this,hm,null),lP(this,hg,()=>{let e=lN(this,hu),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}));lU(this,hu,t)}),lP(this,hI,()=>{lB(this,hD,hC).call(this),lB(this,hL,hM).call(this,!1)}),lP(this,hR,()=>{lB(this,hD,hC).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rF(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.shadowRoot.addEventListener("slotchange",this),lU(this,hc,new MutationObserver(lN(this,hg))),lN(this,hc).observe(this.defaultSlot,{childList:!0})}static get observedAttributes(){return[lV.DISABLED,lV.HIDDEN,lV.STYLE,lV.ANCHOR,ri.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":lB(this,hp,hv).call(this,e);break;case"invoke":lB(this,hy,hT).call(this,e);break;case"click":lB(this,hO,hx).call(this,e);break;case"toggle":lB(this,hU,hB).call(this,e);break;case"focusout":lB(this,hV,hF).call(this,e);break;case"keydown":lB(this,h$,hK).call(this,e)}}connectedCallback(){var e,t;lU(this,hm,rJ(this.shadowRoot,":host")),lB(this,hf,h_).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),lU(this,ho,rK(this)),null==(t=null==(e=lN(this,ho))?void 0:e.associateElement)||t.call(e,this),this.hidden||(rW(lK(this),lN(this,hI)),rW(this,lN(this,hR))),lB(this,hE,hb).call(this)}disconnectedCallback(){var e,t;rV(lK(this),lN(this,hI)),rV(this,lN(this,hR)),this.disable(),null==(t=null==(e=lN(this,ho))?void 0:e.unassociateElement)||t.call(e,this),lU(this,ho,null)}attributeChangedCallback(e,t,i){var a,r,n,s;e===lV.HIDDEN&&i!==t?(lN(this,hh)||lU(this,hh,!0),this.hidden?lB(this,hw,hS).call(this):lB(this,hA,hk).call(this),this.dispatchEvent(new lO({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}
1343))):e===ri.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=lN(this,ho))?void 0:a.unassociateElement)||r.call(a,this),lU(this,ho,null)),i&&this.isConnected&&(lU(this,ho,rK(this)),null==(s=null==(n=lN(this,ho))?void 0:n.associateElement)||s.call(n,this))):e===lV.DISABLED&&i!==t?null==i?this.enable():this.disable():e===lV.STYLE&&i!==t&&lB(this,hf,h_).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=rZ(this))?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(l$)}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&&lB(this,hz,hX).call(this,t)}focus(){if(lU(this,hl,rQ()),this.items.length){lB(this,hQ,hZ).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=lB(this,hq,hY).call(this,e);i&&(lB(this,hz,hX).call(this,i,"checkbox"===i.type),lN(this,hd)&&!this.hidden&&(null==(t=lN(this,hl))||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=lB(this,hq,hY).call(this,e))?t:lB(this,hG,hj).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),lB(this,hQ,hZ).call(this,r[s]),r[s].focus()}}function l$(e){return["menuitem","menuitemradio","menuitemcheckbox"].includes(null==e?void 0:e.role)}function lK(e){var t;return null!=(t=e.getAttribute("bounds")?rj(e,`#${e.getAttribute("bounds")}`):r$(e)||e.parentElement)?t:e}ho=new WeakMap,hl=new WeakMap,hd=new WeakMap,hu=new WeakMap,hc=new WeakMap,hh=new WeakMap,hm=new WeakMap,hp=new WeakSet,hv=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)&&lB(this,hE,hb).call(this),t.name||lN(this,hg).call(this)},hE=new WeakSet,hb=function(){let e=this.shadowRoot.querySelector('slot[name="header"]');e.hidden=0===this.shadowRoot.querySelector('slot[name="title"]').assignedNodes().length&&0===e.assignedNodes().length},hg=new WeakMap,hf=new WeakSet,h_=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")},hy=new WeakSet,hT=function(e){lU(this,hd,e.relatedTarget),rG(this,e.relatedTarget)||(this.hidden=!this.hidden)},hA=new WeakSet,hk=function(){var e;null==(e=lN(this,hd))||e.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),rW(lK(this),lN(this,hI)),rW(this,lN(this,hR))},hw=new WeakSet,hS=function(){var e;null==(e=lN(this,hd))||e.setAttribute("aria-expanded","false"),rV(lK(this),lN(this,hI)),rV(this,lN(this,hR))},hI=new WeakMap,hR=new WeakMap,hD=new WeakSet,hC=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(lL(i))?"y":"x")?"y":"x",n="y"===r?"height":"width",s=lL(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=lK(this).getBoundingClientRect(),r=a.width-t-e,n=a.height-i-this.offsetHeight,{style:s}=lN(this,hm);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`)},hL=new WeakSet,hM=function(e){let t=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=null==t?void 0:t.querySelector('[role="menu"]'),{style:a}=lN(this,hm);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`),lB(this,hD,hC).call(this,a)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),lB(this,hD,hC).call(this);a.removeProperty("--media-menu-transition-in")},hO=new WeakSet,hx=function(e){var t;if(e.stopPropagation(),e.composedPath().includes(lN(this,hN,hP))){null==(t=lN(this,hl))||t.focu
1343s(),this.hidden=!0;return}let i=lB(this,hq,hY).call(this,e);!i||i.hasAttribute("disabled")||(lB(this,hQ,hZ).call(this,i),this.handleSelect(e))},hN=new WeakSet,hP=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"]'))},hU=new WeakSet,hB=function(e){if(e.target===this)return;lB(this,hH,hW).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 lM({relatedTarget:i})));for(let e of t)e.setAttribute("aria-expanded",`${!e.submenuElement.hidden}`);lB(this,hL,hM).call(this,!0)},hH=new WeakSet,hW=function(){let e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)},hV=new WeakSet,hF=function(e){var t;rG(this,e.relatedTarget)||(lN(this,hh)&&(null==(t=lN(this,hl))||t.focus()),lN(this,hd)&&lN(this,hd)!==e.relatedTarget&&!this.hidden&&(this.hidden=!0))},h$=new WeakSet,hK=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(lN(this,hh)){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=lN(this,hl))||n.focus(),lN(this,hh)&&(this.hidden=!0)):"Enter"===s||" "===s?this.handleSelect(e):this.handleMove(e)},hq=new WeakSet,hY=function(e){return e.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))},hG=new WeakSet,hj=function(){return this.items.find(e=>0===e.tabIndex)},hQ=new WeakSet,hZ=function(e){for(let t of this.items)t.tabIndex=t===e?0:-1},hz=new WeakSet,hX=function(e,t){let i=[...this.checkedItems];"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}))},lF.shadowRootOptions={mode:"open"},lF.getTemplateHTML=function(e){return`
1344    <style>
1345      :host {
1346        font: var(--media-font,
1347          var(--media-font-weight, normal)
1348          var(--media-font-size, 14px) /
1349          var(--media-text-content-height, var(--media-control-height, 24px))
1350          var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif));
1351        color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238)));
1352        --_menu-bg: rgb(20 20 30 / .8);
1353        background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, var(--_menu-bg))));
1354        border-radius: var(--media-menu-border-radius);
1355        border: var(--media-menu-border, none);
1356        display: var(--media-menu-display, inline-flex) !important;
1357        
1358        transition: var(--media-menu-transition-in,
1359          visibility 0s,
1360          opacity .2s ease-out,
1361          transform .15s ease-out,
1362          left .2s ease-in-out,
1363          min-width .2s ease-in-out,
1364          min-height .2s ease-in-out
1365        ) !important;
1366        
1367        visibility: var(--media-menu-visibility, visible);
1368        opacity: var(--media-menu-opacity, 1);
1369        max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px));
1370        transform: var(--media-menu-transform-in, translateY(0) scale(1));
1371        flex-direction: column;
1372        
1373        min-height: 0;
1374        position: relative;
1375        bottom: var(--_menu-bottom);
1376        box-sizing: border-box;
1377      } 
1378
1379      @-moz-document url-prefix() {
1380        :host{
1381          --_menu-bg: rgb(20 20 30);
1382        }
1383      }
1384
1385      :host([hidden]) {
1386        transition: var(--media-menu-transition-out,
1387          visibility .15s ease-in,
1388          opacity .15s ease-in,
1389          transform .15s ease-in
1390        ) !important;
1391        visibility: var(--media-menu-hidden-visibility, hidden);
1392        opacity: var(--media-menu-hidden-opacity, 0);
1393        max-height: var(--media-menu-hidden-max-height,
1394          var(--media-menu-max-height, var(--_menu-max-height, 300px)));
1395        transform: var(--media-menu-transform-out, translateY(2px) scale(.99));
1396        pointer-events: none;
1397      }
1398
1399      :host([slot="submenu"]) {
1400        background: none;
1401        width: 100%;
1402        min-height: 100%;
1403        position: absolute;
1404        bottom: 0;
1405        right: -100%;
1406      }
1407
1408      #container {
1409        display: flex;
1410        flex-direction: column;
1411        min-height: 0;
1412        transition: transform .2s ease-out;
1413        transform: translate(0, 0);
1414      }
1415
1416      #container.has-expanded {
1417        transition: transform .2s ease-in;
1418        transform: translate(-100%, 0);
1419      }
1420
1421      button {
1422        background: none;
1423        color: inherit;
1424        border: none;
1425        padding: 0;
1426        font: inherit;
1427        outline: inherit;
1428        display: inline-flex;
1429        align-items: center;
1430      }
1431
1432      slot[name="header"][hidden] {
1433        display: none;
1434      }
1435
1436      slot[name="header"] > *,
1437      slot[name="header"]::slotted(*) {
1438        padding: .4em .7em;
1439        border-bottom: 1px solid rgb(255 255 255 / .25);
1440        cursor: var(--media-cursor, default);
1441      }
1442
1443      slot[name="header"] > button[part~="back"],
1444      slot[name="header"]::slotted(button[part~="back"]) {
1445        cursor: var(--media-cursor, pointer);
1446      }
1447
1448      svg[part~="back"] {
1449        height: var(--media-menu-icon-height, var(--media-control-height, 24px));
1450        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
1451        display: block;
1452        margin-right: .5ch;
1453      }
1454
1455      slot:not([name]) {
1456        gap: var(--media-menu-gap);
1457        flex-direction: var(--media-menu-flex-direction, column);
1458        overflow: var(--media-menu-overflow, hidden auto);
1459        display: flex;
1460        min-height: 0;
1461      }
1462
1463      :host([role="menu"]) slot:not([name]) {
1464        padding-block: .4em;
1465      }
1466
1467      slot:not([name])::slotted([role="menu"]) {
1468        background: none;
1469      }
1470
1471      media-chrome-menu-item > span {
1472        margin-right: .5ch;
1473        max-width: var(--media-menu-item-max-width);
1474        text-overflow: ellipsis;
1475        overflow: hidden;
1476      }
1477    </style>
1478    <style id="layout-row" media="width:0">
1479
1480      slot[name="header"] > *,
1481      slot[name="header"]::slotted(*) {
1482        padding: .4em .5em;
1483      }
1484
1485      slot:not([name]) {
1486        gap: var(--media-menu-gap, .25em);
1487        flex-direction: var(--media-menu-flex-direction, row);
1488        padding-inline: .5em;
1489      }
1490
1491      media-chrome-menu-item {
1492        padding: .3em .5em;
1493      }
1494
1495      media-chrome-menu-item[aria-checked="true"] {
1496        background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2));
1497      }
1498
1499      
1500      media-chrome-menu-item::part(checked-indicator) {
1501        display: var(--media-menu-item-checked-indicator-display, none);
1502      }
1503    </style>
1504    <div id="container" part="container">
1505      <slot name="header" hidden>
1506        <button part="back button" aria-label="Back to previous menu">
1507          <slot name="back-icon">
1508            <svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator">
1509              <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"/>
1510            </svg>
1511          </slot>
1512          <slot name="title"></slot>
1513        </button>
1514      </slot>
1515      <slot></slot>
1516    </div>
1517    <slot name="checked-indicator" hidden></slot>
1518  `},rN.customElements.get("media-chrome-menu")||rN.customElements.define("media-chrome-menu",lF);var lq=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lY=(e,t,i)=>(lq(e,t,"read from private field"),i?i.call(e):t.get(e)),lG=(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)},lj=(e,t,i,a)=>(lq(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),lQ=(e,t,i)=>(lq(e,t,"access private method"),i);let lZ={TYPE:"type",VALUE:"value",CHECKED:"checked",DISABLED:"disabled"};class lz extends rN.HTMLElement{constructor(){if(super(),lG(this,h1),lG(this,h3),lG(this,h5),lG(this,h6),lG(this,me),lG(this,mi),lG(this,hJ,!1),lG(this,h0,void 0),lG(this,h8,()=>{var e,t;this.submenuElement.items&&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=rP.createElement("span");n.textContent=null!=r?r:"",i.replaceChildren(n)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=rF(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.shadowRoot.addEventListener("slotchange",this)}static get observedAttributes(){return[lZ.TYPE,lZ.DISABLED,lZ.CHECKED,lZ.VALUE]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),lX(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","fal
1518se"),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":lQ(this,h1,h2).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":lQ(this,me,mt).call(this,e);break;case"keyup":lQ(this,h6,h7).call(this,e)}}attributeChangedCallback(e,t,i){e===lZ.CHECKED&&lX(this)&&!lY(this,hJ)?this.setAttribute("aria-checked",null!=i?"true":"false"):e===lZ.TYPE&&i!==t?this.role="menuitem"+i:e===lZ.DISABLED&&i!==t&&(null==i?this.enable():this.disable())}connectedCallback(){this.hasAttribute(lZ.DISABLED)||this.enable(),this.role="menuitem"+this.type,lj(this,h0,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)),lQ(this,mi,ma).call(this),this.submenuElement&&lQ(this,h3,h4).call(this)}disconnectedCallback(){this.disable(),lQ(this,mi,ma).call(this),lj(this,h0,null)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?null==(e=rZ(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(lZ.TYPE))?e:""}set type(e){this.setAttribute(lZ.TYPE,`${e}`)}get value(){var e;return null!=(e=this.getAttribute(lZ.VALUE))?e:this.text}set value(e){this.setAttribute(lZ.VALUE,e)}get text(){var e;return(null!=(e=this.textContent)?e:"").trim()}get checked(){if(lX(this))return"true"===this.getAttribute("aria-checked")}set checked(e){lX(this)&&(lj(this,hJ,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){!lX(this)&&this.invokeTargetElement&&rG(this,e.target)&&this.invokeTargetElement.dispatchEvent(new lM({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}function lX(e){return"radio"===e.type||"checkbox"===e.type}hJ=new WeakMap,h0=new WeakMap,h1=new WeakSet,h2=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?lQ(this,h3,h4).call(this):lQ(this,h5,h9).call(this))},h3=new WeakSet,h4=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",lY(this,h8)),this.submenuElement.addEventListener("addmenuitem",lY(this,h8)),this.submenuElement.addEventListener("removemenuitem",lY(this,h8)),lY(this,h8).call(this)},h5=new WeakSet,h9=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",lY(this,h8)),this.submenuElement.removeEventListener("addmenuitem",lY(this,h8)),this.submenuElement.removeEventListener("removemenuitem",lY(this,h8)),lY(this,h8).call(this)},h8=new WeakMap,h6=new WeakSet,h7=function(e){let{key:t}=e;if(!this.keysUsed.includes(t))return void this.removeEventListener("keyup",lQ(this,h6,h7));this.handleClick(e)},me=new WeakSet,mt=function(e){let{metaKey:t,altKey:i,key:a}=e;if(t||i||!this.keysUsed.includes(a))return void this.removeEventListener("keyup",lQ(this,h6,h7));this.addEventListener("keyup",lQ(this,h6,h7),{once:!0})},mi=new WeakSet,ma=function(){var e;let t=null==(e=lY(this,h0))?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")},lz.shadowRootOptions={mode:"open"},lz.getTemplateHTML=function(e){return`
1519    <style>
1520      :host {
1521        transition: var(--media-menu-item-transition,
1522          background .15s linear,
1523          opacity .2s ease-in-out
1524        );
1525        outline: var(--media-menu-item-outline, 0);
1526        outline-offset: var(--media-menu-item-outline-offset, -1px);
1527        cursor: var(--media-cursor, pointer);
1528        display: flex;
1529        align-items: center;
1530        align-self: stretch;
1531        justify-self: stretch;
1532        white-space: nowrap;
1533        white-space-collapse: collapse;
1534        text-wrap: nowrap;
1535        padding: .4em .8em .4em 1em;
1536      }
1537
1538      :host(:focus-visible) {
1539        box-shadow: var(--media-menu-item-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
1540        outline: var(--media-menu-item-hover-outline, 0);
1541        outline-offset: var(--media-menu-item-hover-outline-offset,  var(--media-menu-item-outline-offset, -1px));
1542      }
1543
1544      :host(:hover) {
1545        cursor: var(--media-cursor, pointer);
1546        background: var(--media-menu-item-hover-background, rgb(92 92 102 / .5));
1547        outline: var(--media-menu-item-hover-outline);
1548        outline-offset: var(--media-menu-item-hover-outline-offset,  var(--media-menu-item-outline-offset, -1px));
1549      }
1550
1551      :host([aria-checked="true"]) {
1552        background: var(--media-menu-item-checked-background);
1553      }
1554
1555      :host([hidden]) {
1556        display: none;
1557      }
1558
1559      :host([disabled]) {
1560        pointer-events: none;
1561        color: rgba(255, 255, 255, .3);
1562      }
1563
1564      slot:not([name]) {
1565        width: 100%;
1566      }
1567
1568      slot:not([name="submenu"]) {
1569        display: inline-flex;
1570        align-items: center;
1571        transition: inherit;
1572        opacity: var(--media-menu-item-opacity, 1);
1573      }
1574
1575      slot[name="description"] {
1576        justify-content: end;
1577      }
1578
1579      slot[name="description"] > span {
1580        display: inline-block;
1581        margin-inline: 1em .2em;
1582        max-width: var(--media-menu-item-description-max-width, 100px);
1583        text-overflow: ellipsis;
1584        overflow: hidden;
1585        font-size: .8em;
1586        font-weight: 400;
1587        text-align: right;
1588        position: relative;
1589        top: .04em;
1590      }
1591
1592      slot[name="checked-indicator"] {
1593        display: none;
1594      }
1595
1596      :host(:is([role="menuitemradio"],[role="menuitemcheckbox"])) slot[name="checked-indicator"] {
1597        display: var(--media-menu-item-checked-indicator-display, inline-block);
1598      }
1599
1600      
1601      svg, img, ::slotted(svg), ::slotted(img) {
1602        height: var(--media-menu-item-icon-height, var(--media-control-height, 24px));
1603        fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)));
1604        display: block;
1605      }
1606
1607      
1608      [part~="indicator"],
1609      ::slotted([part~="indicator"]) {
1610        fill: var(--media-menu-item-indicator-fill,
1611          var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))));
1612        height: var(--media-menu-item-indicator-height, 1.25em);
1613        margin-right: .5ch;
1614      }
1615
1616      [part~="checked-indicator"] {
1617        visibility: hidden;
1618      }
1619
1620      :host([aria-checked="true"]) [part~="checked-indicator"] {
1621        visibility: visible;
1622      }
1623    </style>
1624    <slot name="checked-indicator">
1625      <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator">
1626        <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"/>
1627      </svg>
1628    </slot>
1629    <slot name="prefix"></slot>
1630    <slot></slot>
1631    <slot name="description"></slot>
1632    <slot name="suffix">
1633      ${this.getSuffixSlotInnerHTML(e)}
1634    </slot>
1635    <slot name="submenu"></slot>
1636  `},lz.getSuffixSlotInnerHTML=function(e){return""},rN.customElements.get("media-chrome-menu-item")||rN.customElements.define("media-chrome-menu-item",lz);class lJ extends lF{get anchorElement(){return"auto"!==this.anchor?super.anchorElement:r$(this).querySelector("media-settings-menu-button")}}lJ.getTemplateHTML=function(e){return`
1637    ${lF.getTemplateHTML(e)}
1638    <style>
1639      :host {
1640        --_menu-bg: rgb(20 20 30 / .8);
1641        background: var(--media-settings-menu-background,
1642            var(--media-menu-background,
1643              var(--media-control-background,
1644                var(--media-secondary-color, var(--_menu-bg)))));
1645        min-width: var(--media-settings-menu-min-width, 170px);
1646        border-radius: 2px 2px 0 0;
1647        overflow: hidden;
1648      }
1649
1650      @-moz-document url-prefix() {
1651        :host{
1652          --_menu-bg: rgb(20 20 30);
1653        }
1654      }
1655
1656      :host([role="menu"]) {
1657        
1658        justify-content: end;
1659      }
1660
1661      slot:not([name]) {
1662        justify-content: var(--media-settings-menu-justify-content);
1663        flex-direction: var(--media-settings-menu-flex-direction, column);
1664        overflow: visible;
1665      }
1666
1667      #container.has-expanded {
1668        --media-settings-menu-item-opacity: 0;
1669      }
1670    </style>
1671  `},rN.customElements.get("media-settings-menu")||rN.customElements.define("media-settings-menu",lJ);class l0 extends lz{}l0.shadowRootOptions={mode:"open"},l0.getTemplateHTML=function(e){return`
1672    ${lz.getTemplateHTML.call(this,e)}
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  `},l0.getSuffixSlotInnerHTML=function(e){return`
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  `},rN.customElements.get("media-settings-menu-item")||rN.customElements.define("media-settings-menu-item",l0);class l1 extends sd{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=rZ(this))?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;null==(e=this.invokeTargetElement)||e.dispatchEvent(new lM({relatedTarget:this}))}}rN.customElements.get("media-chrome-menu-button")||rN.customElements.define("media-chrome-menu-button",l1);class l2 extends l1{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",rS("settings"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:r$(this).querySelector("media-settings-menu")}}l2.getSlotTemplateHTML=function(){return`
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  `},l2.getTooltipContentHTML=function(){return rS("Settings")},rN.customElements.get("media-settings-menu-button")||rN.customElements.define("media-settings-menu-button",l2);var l3=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},l4=(e,t,i)=>(l3(e,t,"read from private field"),i?i.call(e):t.get(e)),l5=(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)},l9=(e,t,i,a)=>(l3(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),l8=(e,t,i)=>(l3(e,t,"access private method"),i);class l6 extends lF{constructor(){super(...arguments),l5(this,ms),l5(this,ml),l5(this,mr,[]),l5(this,mn,void 0)}static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_AUDIO_TRACK_LIST,rn.MEDIA_AUDIO_TRACK_ENABLED,rn.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===rn.MEDIA_AUDIO_TRACK_ENABLED&&t!==i)this.value=i;else if(e===rn.MEDIA_AUDIO_TRACK_LIST&&t!==i){var a;l9(this,mr,null==(a=null!=i?i:"")?void 0:a.split(/\s+/).map(rb)),l8(this,ms,mo).call(this)}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",l8(this,ml,md))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",l8(this,ml,md))}get anchorElement(){var e;return"auto"!==this.anchor?super.anchorElement:null==(e=r$(this))?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return l4(this,mr)}set mediaAudioTrackList(e){l9(this,mr,e),l8(this,ms,mo).call(this)}get mediaAudioTrackEnabled(){var e;return null!=(e=r4(this,rn.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){r5(this,rn.MEDIA_AUDIO_TRACK_ENABLED,e)}}mr=new WeakMap,mn=new WeakMap,ms=new WeakSet,mo=function(){if(l4(this,mn)===JSON.stringify(this.mediaAudioTrackList))return;l9(this,mn,JSON.stringify(this.mediaAudioTrackList));let e=this.mediaAudioTrackList;for(let t of(this.defaultSlot.textContent="",e.sort((e,t)=>
1697e.id.localeCompare(t.id,void 0,{numeric:!0})),e)){let e=lH({type:"radio",text:this.formatMenuItemText(t.label,t),value:`${t.id}`,checked:t.enabled});e.prepend(lW(this,"checked-indicator")),this.defaultSlot.append(e)}},ml=new WeakSet,md=function(){if(null==this.value)return;let e=new rN.CustomEvent(rt.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},rN.customElements.get("media-audio-track-menu")||rN.customElements.define("media-audio-track-menu",l6);let l7=`<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>`,de=e=>{let t=rS("Audio");e.setAttribute("aria-label",t)};class dt extends l1{static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_AUDIO_TRACK_ENABLED,rn.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),de(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rn.MEDIA_LANG&&de(this)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=r$(this))?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return null!=(e=r4(this,rn.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){r5(this,rn.MEDIA_AUDIO_TRACK_ENABLED,e)}}dt.getSlotTemplateHTML=function(){return`
1701    <style>
1702      :host([aria-expanded="true"]) slot[name=tooltip] {
1703        display: none;
1704      }
1705    </style>
1706    <slot name="icon">${l7}</slot>
1707  `},dt.getTooltipContentHTML=function(){return rS("Audio")},rN.customElements.get("media-audio-track-menu-button")||rN.customElements.define("media-audio-track-menu-button",dt);var di=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},da=(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)},dr=(e,t,i)=>(di(e,t,"access private method"),i);let dn=`
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>`;class ds extends lF{constructor(){super(...arguments),da(this,mc),da(this,mm),da(this,mu,void 0)}static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_SUBTITLES_LIST,rn.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rn.MEDIA_SUBTITLES_LIST&&t!==i?dr(this,mc,mh).call(this):e===rn.MEDIA_SUBTITLES_SHOWING&&t!==i&&(this.value=i)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",dr(this,mm,mp))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",dr(this,mm,mp))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:r$(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return dl(this,rn.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){dd(this,rn.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return dl(this,rn.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){dd(this,rn.MEDIA_SUBTITLES_SHOWING,e)}}mu=new WeakMap,mc=new WeakSet,mh=function(){var e,t,i,a,r,n;if(di(this,t=mu,"read from private field"),(i?i.call(this):t.get(this))===JSON.stringify(this.mediaSubtitlesList))return;a=mu,r=JSON.stringify(this.mediaSubtitlesList),di(this,a,"write to private field"),n?n.call(this,r):a.set(this,r),this.defaultSlot.textContent="";let s=!this.value,o=lH({type:"radio",text:this.formatMenuItemText(rS("Off")),value:"off",checked:s});for(let t of(o.prepend(lW(this,"checked-indicator")),this.defaultSlot.append(o),this.mediaSubtitlesList)){let i=lH({type:"radio",text:this.formatMenuItemText(t.label,t),value:nb(t),checked:this.value==nb(t)}
1710);i.prepend(lW(this,"checked-indicator")),"captions"===(null!=(e=t.kind)?e:"subs")&&i.append(lW(this,"captions-indicator")),this.defaultSlot.append(i)}},mm=new WeakSet,mp=function(){let e=this.mediaSubtitlesShowing,t=this.getAttribute(rn.MEDIA_SUBTITLES_SHOWING),i=this.value!==t;if((null==e?void 0:e.length)&&i&&this.dispatchEvent(new rN.CustomEvent(rt.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:e})),!this.value||!i)return;let a=new rN.CustomEvent(rt.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)},ds.getTemplateHTML=function(e){return`
1711    ${lF.getTemplateHTML(e)}
1712    <slot name="captions-indicator" hidden>${dn}</slot>
1713  `};let dl=(e,t)=>{let i=e.getAttribute(t);return i?nv(i):[]},dd=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=ng(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};rN.customElements.get("media-captions-menu")||rN.customElements.define("media-captions-menu",ds);let du=`<svg aria-hidden="true" viewBox="0 0 26 24">
1714  <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"/>
1715</svg>`,dc=`<svg aria-hidden="true" viewBox="0 0 26 24">
1716  <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"/>
1717</svg>`,dh=e=>{e.setAttribute("data-captions-enabled",nT(e).toString())},dm=e=>{e.setAttribute("aria-label",rS("closed captions"))};class dp extends l1{static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_SUBTITLES_LIST,rn.MEDIA_SUBTITLES_SHOWING,rn.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),dm(this),dh(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rn.MEDIA_SUBTITLES_SHOWING?dh(this):e===rn.MEDIA_LANG&&dm(this)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=r$(this))?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return dv(this,rn.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){dE(this,rn.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return dv(this,rn.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){dE(this,rn.MEDIA_SUBTITLES_SHOWING,e)}}dp.getSlotTemplateHTML=function(){return`
1718    <style>
1719      :host([data-captions-enabled="true"]) slot[name=off] {
1720        display: none !important;
1721      }
1722
1723      
1724      :host(:not([data-captions-enabled="true"])) slot[name=on] {
1725        display: none !important;
1726      }
1727
1728      :host([aria-expanded="true"]) slot[name=tooltip] {
1729        display: none;
1730      }
1731    </style>
1732
1733    <slot name="icon">
1734      <slot name="on">${du}</slot>
1735      <slot name="off">${dc}</slot>
1736    </slot>
1737  `},dp.getTooltipContentHTML=function(){return rS("Captions")};let dv=(e,t)=>{let i=e.getAttribute(t);return i?nv(i):[]},dE=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=ng(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};rN.customElements.get("media-captions-menu-button")||rN.customElements.define("media-captions-menu-button",dp);var db=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},dg=(e,t,i)=>(db(e,t,"read from private field"),i?i.call(e):t.get(e)),df=(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)},d_=(e,t,i)=>(db(e,t,"access private method"),i);let dy={RATES:"rates"};class dT extends lF{constructor(){super(),df(this,mE),df(this,mg),df(this,mv,new nm(this,dy.RATES,{defaultValue:oE})),d_(this,mE,mb).call(this)}static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_PLAYBACK_RATE,dy.RATES]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rn.MEDIA_PLAYBACK_RATE&&t!=i?this.value=i:e===dy.RATES&&t!=i&&(dg(this,mv).value=i,d_(this,mE,mb).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",d_(this,mg,mf))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",d_(this,mg,mf))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:r$(this).querySelector("media-playback-rate-menu-button")}get rates(){return dg(this,mv)}set rates(e){e?Array.isArray(e)?dg(this,mv).value=e.join(" "):"str
1737ing"==typeof e&&(dg(this,mv).value=e):dg(this,mv).value="",d_(this,mE,mb).call(this)}get mediaPlaybackRate(){return r0(this,rn.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){r1(this,rn.MEDIA_PLAYBACK_RATE,e)}}mv=new WeakMap,mE=new WeakSet,mb=function(){for(let e of(this.defaultSlot.textContent="",dg(this,mv))){let t=lH({type:"radio",text:this.formatMenuItemText(`${e}x`,e),value:e,checked:this.mediaPlaybackRate===Number(e)});t.prepend(lW(this,"checked-indicator")),this.defaultSlot.append(t)}},mg=new WeakSet,mf=function(){if(!this.value)return;let e=new rN.CustomEvent(rt.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},rN.customElements.get("media-playback-rate-menu")||rN.customElements.define("media-playback-rate-menu",dT);class dA extends l1{static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${null!=(e=this.mediaPlaybackRate)?e:1}x`}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===rn.MEDIA_PLAYBACK_RATE){let e=i?+i:NaN,t=Number.isNaN(e)?1:e;this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",rS("Playback rate {playbackRate}",{playbackRate:t}))}}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:r$(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return r0(this,rn.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){r1(this,rn.MEDIA_PLAYBACK_RATE,e)}}dA.getSlotTemplateHTML=function(e){return`
1738    <style>
1739      :host {
1740        min-width: 5ch;
1741        padding: var(--media-button-padding, var(--media-control-padding, 10px 5px));
1742      }
1743      
1744      :host([aria-expanded="true"]) slot[name=tooltip] {
1745        display: none;
1746      }
1747    </style>
1748    <slot name="icon">${e.mediaplaybackrate||1}x</slot>
1749  `},dA.getTooltipContentHTML=function(){return rS("Playback rate")},rN.customElements.get("media-playback-rate-menu-button")||rN.customElements.define("media-playback-rate-menu-button",dA);var dk=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},dw=(e,t,i)=>(dk(e,t,"read from private field"),i?i.call(e):t.get(e)),dS=(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)},dI=(e,t,i,a)=>(dk(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),dR=(e,t,i)=>(dk(e,t,"access private method"),i);class dD extends lF{constructor(){super(...arguments),dS(this,mT),dS(this,mk),dS(this,m_,[]),dS(this,my,{})}static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_RENDITION_LIST,rn.MEDIA_RENDITION_SELECTED,rn.MEDIA_RENDITION_UNAVAILABLE,rn.MEDIA_HEIGHT]}static formatMenuItemText(e,t){return super.formatMenuItemText(e,t)}static formatRendition(e,{showBitrate:t=!1}={}){let i=`${Math.min(e.width,e.height)}p`;if(t&&e.bitrate){let t=e.bitrate/1e6,a=`${t.toFixed(+(t<1))} Mbps`;return`${i} (${a})`}return this.formatMenuItemText(i,e)}static compareRendition(e,t){var i,a;return t.height===e.height?(null!=(i=t.bitrate)?i:0)-(null!=(a=e.bitrate)?a:0):t.height-e.height}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===rn.MEDIA_RENDITION_SELECTED&&t!==i)this.value=null!=i?i:"auto",dR(this,mT,mA).call(this);else if(e===rn.MEDIA_RENDITION_LIST&&t!==i)dI(this,m_,null==i?void 0:i.split(/\s+/).map(rv)),dR(this,mT,mA).call(this);else e===rn.MEDIA_HEIGHT&&t!==i&&dR(this,mT,mA).call(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",dR(this,mk,mw))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",dR(this,mk,mw))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:r$(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return dw(this,m_)}set mediaRenditionList(e){dI(this,m_,e),dR(this,mT,mA).call(this)}get mediaRenditionSelected(){return r4(this,rn.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){r5(this,rn.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return r0(this,rn.MEDIA_HEIGHT)}set mediaHeight(e){r1(this,rn.MEDIA_HEIGHT,e)}compareRendition(e,t){return this.constructor.compareRendition(e,t)}formatMenuItemText(e,t){return this.constructor.formatMenuItemText(e,t)}formatRendition(e,t){return this.constructor.formatRendition(e,t)}showRenditionBitrate(e){return this.mediaRenditionList.some(t=>t!==e&&t.height===e.height&&t.bitrate!==e.bitrate)}}m_=new WeakMap,my=new WeakMap,mT=new WeakSet,mA=function(){if(dw(this,my).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&dw(this,my).mediaHeight===this.mediaHeight)return;dw(this,my).mediaRenditionList=JSON.stringify(this.mediaRenditionList),dw(this,my).mediaHeight=this.mediaHeight;let e=this.mediaRenditionList.sort(this.compareRendition.bind(this)),t=e.find(e=>e.id===this.mediaRenditionSelected);for(let i of e)i.selected=i===t;this.defaultSlot.textContent="";let i=!this.mediaRenditionSelected;for(let t of e){let e=lH({type:"radio",text:this.formatRendition(t,{showBitrate:this.showRenditionBitrate(t)}
1749),value:`${t.id}`,checked:t.selected&&!i});e.prepend(lW(this,"checked-indicator")),this.defaultSlot.append(e)}let a=t&&this.showRenditionBitrate(t),r=i?t?this.formatMenuItemText(`${rS("Auto")} \u2022 ${this.formatRendition(t,{showBitrate:a})}`,t):this.formatMenuItemText(`${rS("Auto")} (${this.mediaHeight}p)`):this.formatMenuItemText(rS("Auto")),n=lH({type:"radio",text:r,value:"auto",checked:i});n.dataset.description=r,n.prepend(lW(this,"checked-indicator")),this.defaultSlot.append(n)},mk=new WeakSet,mw=function(){if(null==this.value)return;let e=new rN.CustomEvent(rt.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},rN.customElements.get("media-rendition-menu")||rN.customElements.define("media-rendition-menu",dD);let dC=`<svg aria-hidden="true" viewBox="0 0 24 24">
1750  <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" />
1751</svg>`;class dL extends l1{static get observedAttributes(){return[...super.observedAttributes,rn.MEDIA_RENDITION_SELECTED,rn.MEDIA_RENDITION_UNAVAILABLE,rn.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",rS("quality"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:r$(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return r4(this,rn.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){r5(this,rn.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return r0(this,rn.MEDIA_HEIGHT)}set mediaHeight(e){r1(this,rn.MEDIA_HEIGHT,e)}}dL.getSlotTemplateHTML=function(){return`
1752    <style>
1753      :host([aria-expanded="true"]) slot[name=tooltip] {
1754        display: none;
1755      }
1756    </style>
1757    <slot name="icon">${dC}</slot>
1758  `},dL.getTooltipContentHTML=function(){return rS("Quality")},rN.customElements.get("media-rendition-menu-button")||rN.customElements.define("media-rendition-menu-button",dL);var dM=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},dO=(e,t,i)=>(dM(e,t,"read from private field"),i?i.call(e):t.get(e)),dx=(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)},dN=(e,t,i,a)=>(dM(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),dP=(e,t,i)=>(dM(e,t,"access private method"),i);class dU extends lF{constructor(){super(),dx(this,mI),dx(this,mD),dx(this,mL),dx(this,mO),dx(this,mP),dx(this,mS,!1),dx(this,mN,e=>{let t=e.target,i=(null==t?void 0:t.nodeName)==="VIDEO",a=dP(this,mO,mx).call(this,t);(i||a)&&(dO(this,mS)?dP(this,mD,mC).call(this):dP(this,mP,mU).call(this,e))}),dx(this,mB,e=>{let t=e.target,i=this.contains(t),a=2===e.button,r=(null==t?void 0:t.nodeName)==="VIDEO",n=dP(this,mO,mx).call(this,t);!i&&(a&&(r||n)||dP(this,mD,mC).call(this))}),dx(this,mH,e=>{"Escape"===e.key&&dP(this,mD,mC).call(this)}),dx(this,mW,e=>{var t,i;let a=e.target;if(null==(t=a.matches)?void 0:t.call(a,'button[invoke="copy"]')){let e=null==(i=a.closest("media-context-menu-item"))?void 0:i.querySelector('input[slot="copy"]');e&&navigator.clipboard.writeText(e.value)}dP(this,mD,mC).call(this)}),this.setAttribute("noautohide",""),dP(this,mI,mR).call(this)}connectedCallback(){super.connectedCallback(),r$(this).addEventListener("contextmenu",dO(this,mN)),this.addEventListener("click",dO(this,mW))}disconnectedCallback(){super.disconnectedCallback(),r$(this).removeEventListener("contextmenu",dO(this,mN)),this.removeEventListener("click",dO(this,mW)),document.removeEventListener("mousedown",dO(this,mB)),document.removeEventListener("keydown",dO(this,mH))}}mS=new WeakMap,mI=new WeakSet,mR=function(){this.hidden=!dO(this,mS)},mD=new WeakSet,mC=function(){dN(this,mS,!1),dP(this,mI,mR).call(this)},mL=new WeakSet,mM=function(){document.querySelectorAll("media-context-menu").forEach(e=>{e!==this&&dP(e,mD,mC).call(e)})},mO=new WeakSet,mx=function(e){return!!e&&(!!e.hasAttribute("slot")&&"media"===e.getAttribute("slot")||!!(e.nodeName.includes("-")&&e.tagName.includes("-"))&&(e.hasAttribute("src")||e.hasAttribute("poster")||e.hasAttribute("preload")||e.hasAttribute("playsinline")))},mN=new WeakMap,mP=new WeakSet,mU=function(e){e.preventDefault(),dP(this,mL,mM).call(this),dN(this,mS,!0),this.style.position="fixed",this.style.left=`${e.clientX}px`,this.style.top=`${e.clientY}px`,dP(this,mI,mR).call(this),document.addEventListener("mousedown",dO(this,mB),{once:!0}),document.addEventListener("keydown",dO(this,mH),{once:!0})},mB=new WeakMap,mH=new WeakMap,mW=new WeakMap,dU.getTemplateHTML=function(e){return`
1759      ${lF.getTemplateHTML(e)}
1760      <style>
1761        :host {
1762          --_menu-bg: rgb(20 20 30 / .8);
1763          background: var(--media-settings-menu-background,
1764            var(--media-menu-background,
1765              var(--media-control-background,
1766                var(--media-secondary-color, var(--_menu-bg)))));
1767          min-width: var(--media-settings-menu-min-width, 170px);
1768          border-radius: 2px;
1769          overflow: hidden;
1770        }
1771      </style>
1772    `},rN.customElements.get("media-context-menu")||rN.customElements.define("media-context-menu",dU);class dB extends lz{}dB.shadowRootOptions={mode:"open"},dB.getTemplateHTML=function(e){return`
1773    ${lz.getTemplateHTML.call(this,e)}
1774    <style>
1775        ::slotted(*) {
1776            color: var(--media-text-color, white);
1777            text-decoration: none;
1778            border: none;
1779            background: none;
1780            cursor: pointer;
1781            padding: 0;
1782            min-height: var(--media-control-height, 24px);
1783        }
1784    </style>
1785  `},rN.customElements.get("media-context-menu-item")||rN.customElements.define("media-context-menu-item",dB);var dH=e=>{throw TypeError(e)},dW=(e,t,i)=>t.has(e)||dH("Cannot "+i),dV=(e,t,i)=>(dW(e,t,"read from private field"),i?i.call(e):t.get(e)),dF=(e,t,i)=>t.has(e)?dH("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),d$=(e,t,i,a)=>(dW(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),dK=(e,t,i)=>(dW(e,t,"access private method"),i),dq=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("undefined"==typeof DocumentFragment){class e extends dq{}globalThis.DocumentFragment=e}var dY,dG,dj,dQ,dZ,dz,dX,dJ,d0,d1,d2,d3,d4,d5,d9,d8,d6,d7,ue,ut,ui,ua,ur,un,us,uo,ul,ud,uu,u
1785c,uh,um,up,uv,uE,ub,ug,uf,u_,uy,uT,uA,uk,uw,uS,uI,uR,uD,uC,uL,uM,uO,ux,uN,uP,uU,uB,uH,uW,uV,uF,u$,uK,uq,uY,uG,uj,uQ,uZ,uz,uX,uJ,u0,u1,u2,u3,u4,u5,u9,u8,u6,u7,ce,ct,ci,ca,cr,cn,cs,co,cl,cd,cu,cc,ch,cm,cp,cv,cE,cb,cg,cf,c_,cy,cT,cA,ck,cw,cS,cI,cR,cD,cC,cL,cM,cO,cx,cN,cP,cU,cB,cH,cW,cV,cF,c$,cK,cq,cY,cG,cj,cQ,cZ,cz,cX,cJ,c0,c1,c2,c3,c4,c5,c9,c8,c6,c7,he,ht,hi,ha,hr,hn,hs,ho,hl,hd,hu,hc,hh,hm,hp,hv,hE,hb,hg,hf,h_,hy,hT,hA,hk,hw,hS,hI,hR,hD,hC,hL,hM,hO,hx,hN,hP,hU,hB,hH,hW,hV,hF,h$,hK,hq,hY,hG,hj,hQ,hZ,hz,hX,hJ,h0,h1,h2,h3,h4,h5,h9,h8,h6,h7,me,mt,mi,ma,mr,mn,ms,mo,ml,md,mu,mc,mh,mm,mp,mv,mE,mb,mg,mf,m_,my,mT,mA,mk,mw,mS,mI,mR,mD,mC,mL,mM,mO,mx,mN,mP,mU,mB,mH,mW,mV,mF=class extends dq{},m$=class{constructor(e,t={}){dF(this,mV),d$(this,mV,null==t?void 0:t.detail)}get detail(){return dV(this,mV)}initCustomEvent(){}};mV=new WeakMap;var mK={document:{createElement:function(e,t){return new mF}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(mF)},CustomEvent:m$,EventTarget:dq,HTMLElement:mF,HTMLVideoElement:class extends dq{}},mq="undefined"==typeof window||void 0===globalThis.customElements,mY=mq?mK:globalThis,mG=mq?mK.document:globalThis.document;function mj(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function mQ(e){return e.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function mZ(e){if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}function mz(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 mX,mJ,m0,m1=(e,t)=>!!e&&!!t&&(!!e.contains(t)||m1(e,t.getRootNode().host)),m2="mux.com",m3=(()=>{try{return"3.8.0"}catch{}return"UNKNOWN"})(),m4=e=>{if(e){if([t$.LIVE,t$.ON_DEMAND].includes(e))return e;if(null!=e&&e.includes("live"))return t$.LIVE}},m5={crossorigin:"crossOrigin",playsinline:"playsInline"},m9=class{constructor(e,t){dF(this,mX),dF(this,mJ),dF(this,m0,[]),d$(this,mX,e),d$(this,mJ,t)}[Symbol.iterator](){return dV(this,m0).values()}get length(){return dV(this,m0).length}get value(){var e;return null!=(e=dV(this,m0).join(" "))?e:""}set value(e){var t;e!==this.value&&(d$(this,m0,[]),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return dV(this,m0)[e]}values(){return dV(this,m0).values()}keys(){return dV(this,m0).keys()}forEach(e){dV(this,m0).forEach(e)}add(...e){var t,i;e.forEach(e=>{this.contains(e)||dV(this,m0).push(e)}),(""!==this.value||null!=(t=dV(this,mX))&&t.hasAttribute(`${dV(this,mJ)}`))&&null!=(i=dV(this,mX))&&i.setAttribute(`${dV(this,mJ)}`,`${this.value}`)}remove(...e){var t;e.forEach(e=>{dV(this,m0).splice(dV(this,m0).indexOf(e),1)}),null==(t=dV(this,mX))||t.setAttribute(`${dV(this,mJ)}`,`${this.value}`)}contains(e){return dV(this,m0).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)}};mX=new WeakMap,mJ=new WeakMap,m0=new WeakMap;var m8=`[mux-player ${m3}]`;function m6(...e){console.warn(m8,...e)}function m7(...e){console.error(m8,...e)}function pe(e){var t;let i=null!=(t=e.message)?t:"";e.context&&(i+=` ${e.context}`),e.file&&(i+=` ${t6("Read more: ")}
1786https://github.com/muxinc/elements/blob/main/errors/${e.file}`),m6(i)}var pt={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},pi={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},pa=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}}),pr=[...Object.values(pt).filter(e=>pt.PLAYSINLINE!==e),...Object.values(pi)];function pn(e,t){return e.media?e.media.getAttribute(t):e.getAttribute(t)}var ps=class extends mY.HTMLElement{static get observedAttributes(){return pr}constructor(){super()}attributeChangedCallback(e,t,i){var a,r;switch(e){case pi.MUTED:this.media&&(this.media.muted=null!=i,this.media.defaultMuted=null!=i);return;case pi.VOLUME:{let e=null!=(a=mZ(i))?a:1;this.media&&(this.media.volume=e);return}case pi.PLAYBACKRATE:{let e=null!=(r=mZ(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()}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}
1786get 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:pa}get seekable(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.seekable)?t:pa}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=mZ(this.getAttribute(pi.PLAYBACKRATE)))?e:1}set defaultPlaybackRate(e){null!=e?this.setAttribute(pi.PLAYBACKRATE,`${e}`):this.removeAttribute(pi.PLAYBACKRATE)}get crossOrigin(){return pn(this,pt.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(pt.CROSSORIGIN,`${e}`)}get autoplay(){return null!=pn(this,pt.AUTOPLAY)}set autoplay(e){e?this.setAttribute(pt.AUTOPLAY,"string"==typeof e?e:""):this.removeAttribute(pt.AUTOPLAY)}get loop(){return null!=pn(this,pt.LOOP)}set loop(e){e?this.setAttribute(pt.LOOP,""):this.removeAttribute(pt.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!=pn(this,pt.MUTED)}set defaultMuted(e){e?this.setAttribute(pt.MUTED,""):this.removeAttribute(pt.MUTED)}get playsInline(){return null!=pn(this,pt.PLAYSINLINE)}set playsInline(e){m7("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(pt.PRELOAD,e):this.removeAttribute(pt.PRELOAD)}},po=`:host {
1787  --media-control-display: var(--controls);
1788  --media-loading-indicator-display: var(--loading-indicator);
1789  --media-dialog-display: var(--dialog);
1790  --media-play-button-display: var(--play-button);
1791  --media-live-button-display: var(--live-button);
1792  --media-seek-backward-button-display: var(--seek-backward-button);
1793  --media-seek-forward-button-display: var(--seek-forward-button);
1794  --media-mute-button-display: var(--mute-button);
1795  --media-captions-button-display: var(--captions-button);
1796  --media-captions-menu-button-display: var(--captions-menu-button, var(--media-captions-button-display));
1797  --media-rendition-menu-button-display: var(--rendition-menu-button);
1798  --media-audio-track-menu-button-display: var(--audio-track-menu-button);
1799  --media-airplay-button-display: var(--airplay-button);
1800  --media-pip-button-display: var(--pip-button);
1801  --media-fullscreen-button-display: var(--fullscreen-button);
1802  --media-cast-button-display: var(--cast-button, var(--_cast-button-drm-display));
1803  --media-playback-rate-button-display: var(--playback-rate-button);
1804  --media-playback-rate-menu-button-display: var(--playback-rate-menu-button);
1805  --media-volume-range-display: var(--volume-range);
1806  --media-time-range-display: var(--time-range);
1807  --media-time-display-display: var(--time-display);
1808  --media-duration-display-display: var(--duration-display);
1809  --media-title-display-display: var(--title-display);
1810
1811  display: inline-block;
1812  line-height: 0;
1813  width: 100%;
1814}
1815
1816a {
1817  color: #fff;
1818  font-size: 0.9em;
1819  text-decoration: underline;
1820}
1821
1822media-theme {
1823  display: inline-block;
1824  line-height: 0;
1825  width: 100%;
1826  height: 100%;
1827  direction: ltr;
1828}
1829
1830media-poster-image {
1831  display: inline-block;
1832  line-height: 0;
1833  width: 100%;
1834  height: 100%;
1835}
1836
1837media-poster-image:not([src]):not([placeholdersrc]) {
1838  display: none;
1839}
1840
1841::part(top),
1842[part~='top'] {
1843  --media-control-display: var(--controls, var(--top-controls));
1844  --media-play-button-display: var(--play-button, var(--top-play-button));
1845  --media-live-button-display: var(--live-button, var(--top-live-button));
1846  --media-seek-backward-button-display: var(--seek-backward-button, var(--top-seek-backward-button));
1847  --media-seek-forward-button-display: var(--seek-forward-button, var(--top-seek-forward-button));
1848  --media-mute-button-display: var(--mute-button, var(--top-mute-button));
1849  --media-captions-button-display: var(--captions-button, var(--top-captions-button));
1850  --media-captions-menu-button-display: var(
1851    --captions-menu-button,
1852    var(--media-captions-button-display, var(--top-captions-menu-button))
1853  );
1854  --media-rendition-menu-button-display: var(--rendition-menu-button, var(--top-rendition-menu-button));
1855  --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--top-audio-track-menu-button));
1856  --media-airplay-button-display: var(--airplay-button, var(--top-airplay-button));
1857  --media-pip-button-display: var(--pip-button, var(--top-pip-button));
1858  --media-fullscreen-button-display: var(--fullscreen-button, var(--top-fullscreen-button));
1859  --media-cast-button-display: var(--cast-button, var(--top-cast-button, var(--_cast-button-drm-display)));
1860  --media-playback-rate-button-display: var(--playback-rate-button, var(--top-playback-rate-button));
1861  --media-playback-rate-menu-button-display: var(
1862    --captions-menu-button,
1863    var(--media-playback-rate-button-display, var(--top-playback-rate-menu-button))
1864  );
1865  --media-volume-range-display: var(--volume-range, var(--top-volume-range));
1866  --media-time-range-display: var(--time-range, var(--top-time-range));
1867  --media-time-display-display: var(--time-display, var(--top-time-display));
1868  --media-duration-display-display: var(--duration-display, var(--top-duration-display));
1869  --media-title-display-display: var(--title-display, var(--top-title-display));
1870}
1871
1872::part(center),
1873[part~='center'] {
1874  --media-control-display: var(--controls, var(--center-controls));
1875  --media-play-button-display: var(--play-button, var(--center-play-button));
1876  --media-live-button-display: var(--live-button, var(--center-live-button));
1877  --media-seek-backward-button-display: var(--seek-backward-button, var(--center-seek-backward-button));
1878  --media-seek-forward-button-display: var(--seek-forward-button, var(--center-seek-forward-button));
1879  --media-mute-button-display: var(--mute-button, var(--center-mute-button));
1880  --media-captions-button-display: var(--captions-button, var(--center-captions-button));
1881  --media-captions-menu-button-display: var(
1882    --captions-menu-button,
1883    var(--media-captions-button-display, var(--center-captions-menu-button))
1884  );
1885  --media-rendition-menu-button-display: var(--rendition-menu-button, var(--center-rendition-menu-button));
1886  --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--center-audio-track-menu-button));
1887  --media-airplay-button-display: var(--airplay-button, var(--center-airplay-button));
1888  --media-pip-button-display: var(--pip-button, var(--center-pip-button));
1889  --media-fullscreen-button-display: var(--fullscreen-button, var(--center-fullscreen-button));
1890  --media-cast-button-display: var(--cast-button, var(--center-cast-button, var(--_cast-button-drm-display)));
1891  --media-playback-rate-button-display: var(--playback-rate-button, var(--center-playback-rate-button));
1892  --media-playback-rate-menu-button-display: var(
1893    --playback-rate-menu-button,
1894    var(--media-playback-rate-button-display, var(--center-playback-rate-menu-button))
1895  );
1896  --media-volume-range-display: var(--volume-range, var(--center-volume-range));
1897  --media-time-range-display: var(--time-range, var(--center-time-range));
1898  --media-time-display-display: var(--time-display, var(--center-time-display));
1899  --media-duration-display-display: var(--duration-display, var(--center-duration-display));
1900}
1901
1902::part(bottom),
1903[part~='bottom'] {
1904  --media-control-display: var(--controls, var(--bottom-controls));
1905  --media-play-button-display: var(--play-button, var(--bottom-play-button));
1906  --media-live-button-display: var(--live-button, var(--bottom-live-button));
1907  --media-seek-backward-button-display: var(--seek-backward-button, var(--bottom-seek-backward-button));
1908  --media-seek-forward-button-display: var(--seek-forward-button, var(--bottom-seek-forward-button));
1909  --media-mute-button-display: var(--mute-button, var(--bottom-mute-button));
1910  --media-captions-button-display: var(--captions-button, var(--bottom-captions-button));
1911  --media-captions-menu-button-display: var(
1912    --captions-menu-button,
1913    var(--media-captions-button-display, var(--bottom-captions-menu-button))
1914  );
1915  --media-rendition-menu-button-display: var(--rendition-menu-button, var(--bottom-rendition-menu-button));
1916  --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--bottom-audio-track-menu-button));
1917  --media-airplay-button-display: var(--airplay-button, var(--bottom-airplay-button));
1918  --media-pip-button-display: var(--pip-button, var(--bottom-pip-button));
1919  --media-fullscreen-button-display: var(--fullscreen-button, var(--bottom-fullscreen-button));
1920  --media-cast-button-display: var(--cast-button, var(--bottom-cast-button, var(--_cast-button-drm-display)));
1921  --media-playback-rate-button-display: var(--playback-rate-button, var(--bottom-playback-rate-button));
1922  --media-playback-rate-menu-button-display: var(
1923    --playback-rate-menu-button,
1924    var(--media-playback-rate-button-display, var(--bottom-playback-rate-menu-button))
1925  );
1926  --media-volume-range-display: var(--volume-range, var(--bottom-volume-range));
1927  --media-time-range-display: var(--time-range, var(--bottom-time-range));
1928  --media-time-display-display: var(--time-display, var(--bottom-time-display));
1929  --media-duration-display-display: var(--duration-display, var(--bottom-duration-display));
1930  --media-title-display-display: var(--title-display, var(--bottom-title-display));
1931}
1932
1933:host([no-tooltips]) {
1934  --media-tooltip-display: none;
1935}
1936`,pl=new WeakMap,pd=class e{constructor(e,t){this.element=e,this.type=t,this.element.addEventListener(this.type,this);let i=pl.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=pl.get(this.element);
1936e&&e.delete(this.type)}}static for(t){pl.has(t.element)||pl.set(t.element,new Map);let i=t.attributeName.slice(2),a=pl.get(t.element);return a&&a.has(i)?a.get(i):new e(t.element,i)}},pu=new Map,pc=new WeakMap,ph=new WeakMap,pm=class{constructor(e,t,i){this.strings=e,this.values=t,this.processor=i,this.stringsKey=this.strings.join("\x01")}get template(){if(pu.has(this.stringsKey))return pu.get(this.stringsKey);{let e=mG.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((e,i,a)=>e+i+(a<t?`{{ ${a} }}`:""),""),pu.set(this.stringsKey,e),e}}renderInto(e){var t;let i=this.template;if(pc.get(e)!==i){pc.set(e,i);let t=new le(i,this.values,this.processor);ph.set(e,t),e instanceof ll?e.replace(...t.children):e.appendChild(t);return}let a=ph.get(e);null==(t=null==a?void 0:a.update)||t.call(a,this.values)}},pp={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 lo&&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 lo){let i=e.attributeNamespace;return t!==e.element.hasAttributeNS(i,e.attributeName)&&(e.booleanValue=t),!0}return!1}(e,t)||e instanceof lo&&e.attributeName.startsWith("on")&&(pd.for(e).set(t),e.element.removeAttributeNS(e.attributeNamespace,e.attributeName),1)||!1===t&&e instanceof ll&&(e.replace(""),1)||t instanceof pm&&e instanceof ll&&(t.renderInto(e),1)||t instanceof DocumentFragment&&e instanceof ll&&(t.childNodes.length&&e.replace(...t.childNodes),1)||function(e,t){if(e instanceof lo){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 pv(e,...t){return new pm(e,t,pp)}var pE=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(", "),pb=e=>e.charAt(0).toUpperCase()+e.slice(1),pg=(e,t)=>{let i=(e=>{if(e.muxCode){if(e.muxCode===tU.NETWORK_TOKEN_EXPIRED)return"403-expired-token.md";if(e.muxCode===tU.NETWORK_TOKEN_MALFORMED)return"403-malformatted-token.md";if([tU.NETWORK_TOKEN_AUD_MISMATCH,tU.NETWORK_TOKEN_AUD_MISSING].includes(e.muxCode))return"403-incorrect-aud-value.md";if(e.muxCode===tU.NETWORK_TOKEN_SUB_MISMATCH)return"403-playback-id-mismatch.md";if(e.muxCode===tU.NETWORK_TOKEN_MISSING)return"missing-signed-tokens.md";if(e.muxCode===tU.NETWORK_NOT_FOUND)return"404-not-found.md";if(e.muxCode===tU.NETWORK_NOT_READY)return"412-not-playable.md"}if(e.code){if(e.code===tW.MEDIA_ERR_NETWORK)return"";if(e.code===tW.MEDIA_ERR_DECODE)return"media-decode-error.md";if(e.code===tW.MEDIA_ERR_SRC_NOT_SUPPORTED)return"media-src-not-supported.md"}return""})(e);return{message:e.message,context:e.context,file:i}},pf
vendor: 8,830 bytes, lines 1936-2236
1936=`<template id="media-theme-gerwig">
1937  <style>
1938    @keyframes pre-play-hide {
1939      0% {
1940        transform: scale(1);
1941        opacity: 1;
1942      }
1943
1944      30% {
1945        transform: scale(0.7);
1946      }
1947
1948      100% {
1949        transform: scale(1.5);
1950        opacity: 0;
1951      }
1952    }
1953
1954    :host {
1955      --_primary-color: var(--media-primary-color, #fff);
1956      --_secondary-color: var(--media-secondary-color, transparent);
1957      --_accent-color: var(--media-accent-color, #fa50b5);
1958      --_text-color: var(--media-text-color, #000);
1959
1960      --media-icon-color: var(--_primary-color);
1961      --media-control-background: var(--_secondary-color);
1962      --media-control-hover-background: var(--_accent-color);
1963      --media-time-buffered-color: rgba(255, 255, 255, 0.4);
1964      --media-preview-time-text-shadow: none;
1965      --media-control-height: 14px;
1966      --media-control-padding: 6px;
1967      --media-tooltip-container-margin: 6px;
1968      --media-tooltip-distance: 18px;
1969
1970      color: var(--_primary-color);
1971      display: inline-block;
1972      width: 100%;
1973      height: 100%;
1974    }
1975
1976    :host([audio]) {
1977      --_secondary-color: var(--media-secondary-color, black);
1978      --media-preview-time-text-shadow: none;
1979    }
1980
1981    :host([audio]) ::slotted([slot='media']) {
1982      height: 0px;
1983    }
1984
1985    :host([audio]) media-loading-indicator {
1986      display: none;
1987    }
1988
1989    :host([audio]) media-controller {
1990      background: transparent;
1991    }
1992
1993    :host([audio]) media-controller::part(vertical-layer) {
1994      background: transparent;
1995    }
1996
1997    :host([audio]) media-control-bar {
1998      width: 100%;
1999      background-color: var(--media-control-background);
2000    }
2001
2002    /*
2003     * 0.433s is the transition duration for VTT Regions.
2004     * Borrowed here, so the captions don't move too fast.
2005     */
2006    media-controller {
2007      --media-webkit-text-track-transform: translateY(0) scale(0.98);
2008      --media-webkit-text-track-transition: transform 0.433s ease-out 0.3s;
2009    }
2010    media-controller:is([mediapaused], :not([userinactive])) {
2011      --media-webkit-text-track-transform: translateY(-50px) scale(0.98);
2012      --media-webkit-text-track-transition: transform 0.15s ease;
2013    }
2014
2015    /*
2016     * CSS specific to iOS devices.
2017     * See: https://stackoverflow.com/questions/30102792/css-media-query-to-target-only-ios-devices/60220757#60220757
2018     */
2019    @supports (-webkit-touch-callout: none) {
2020      /* Disable subtitle adjusting for iOS Safari */
2021      media-controller[mediaisfullscreen] {
2022        --media-webkit-text-track-transform: unset;
2023        --media-webkit-text-track-transition: unset;
2024      }
2025    }
2026
2027    media-time-range {
2028      --media-box-padding-left: 6px;
2029      --media-box-padding-right: 6px;
2030      --media-range-bar-color: var(--_accent-color);
2031      --media-time-range-buffered-color: var(--_primary-color);
2032      --media-range-track-color: transparent;
2033      --media-range-track-background: rgba(255, 255, 255, 0.4);
2034      --media-range-thumb-background: radial-gradient(
2035        circle,
2036        #000 0%,
2037        #000 25%,
2038        var(--_accent-color) 25%,
2039        var(--_accent-color)
2040      );
2041      --media-range-thumb-width: 12px;
2042      --media-range-thumb-height: 12px;
2043      --media-range-thumb-transform: scale(0);
2044      --media-range-thumb-transition: transform 0.3s;
2045      --media-range-thumb-opacity: 1;
2046      --media-preview-background: var(--_primary-color);
2047      --media-box-arrow-background: var(--_primary-color);
2048      --media-preview-thumbnail-border: 5px solid var(--_primary-color);
2049      --media-preview-border-radius: 5px;
2050      --media-text-color: var(--_text-color);
2051      --media-control-hover-background: transparent;
2052      --media-preview-chapter-text-shadow: none;
2053      color: var(--_accent-color);
2054      padding: 0 6px;
2055    }
2056
2057    :host([audio]) media-time-range {
2058      --media-preview-time-padding: 1.5px 6px;
2059      --media-preview-box-margin: 0 0 -5px;
2060    }
2061
2062    media-time-range:hover {
2063      --media-range-thumb-transform: scale(1);
2064    }
2065
2066    media-preview-thumbnail {
2067      border-bottom-width: 0;
2068    }
2069
2070    [part~='menu'] {
2071      border-radius: 2px;
2072      border: 1px solid rgba(0, 0, 0, 0.1);
2073      bottom: 50px;
2074      padding: 2.5px 10px;
2075    }
2076
2077    [part~='menu']::part(indicator) {
2078      fill: var(--_accent-color);
2079    }
2080
2081    [part~='menu']::part(menu-item) {
2082      box-sizing: border-box;
2083      display: flex;
2084      align-items: center;
2085      padding: 6px 10px;
2086      min-height: 34px;
2087    }
2088
2089    [part~='menu']::part(checked) {
2090      font-weight: 700;
2091    }
2092
2093    media-captions-menu,
2094    media-rendition-menu,
2095    media-audio-track-menu,
2096    media-playback-rate-menu {
2097      position: absolute; /* ensure they don't take up space in DOM on load */
2098      --media-menu-background: var(--_primary-color);
2099      --media-menu-item-checked-background: transparent;
2100      --media-text-color: var(--_text-color);
2101      --media-menu-item-hover-background: transparent;
2102      --media-menu-item-hover-outline: var(--_accent-color) solid 1px;
2103    }
2104
2105    media-rendition-menu {
2106      min-width: 140px;
2107    }
2108
2109    /* The icon is a circle so make it 16px high instead of 14px for more balance. */
2110    media-audio-track-menu-button {
2111      --media-control-padding: 5px;
2112      --media-control-height: 16px;
2113    }
2114
2115    media-playback-rate-menu-button {
2116      --media-control-padding: 6px 3px;
2117      min-width: 4.4ch;
2118    }
2119
2120    media-playback-rate-menu {
2121      --media-menu-flex-direction: row;
2122      --media-menu-item-checked-background: var(--_accent-color);
2123      --media-menu-item-checked-indicator-display: none;
2124      margin-right: 6px;
2125      padding: 0;
2126      --media-menu-gap: 0.25em;
2127    }
2128
2129    media-playback-rate-menu[part~='menu']::part(menu-item) {
2130      padding: 6px 6px 6px 8px;
2131    }
2132
2133    media-playback-rate-menu[part~='menu']::part(checked) {
2134      color: #fff;
2135    }
2136
2137    :host(:not([audio])) media-time-range {
2138      /* Adding px is required here for calc() */
2139      --media-range-padding: 0px;
2140      background: transparent;
2141      z-index: 10;
2142      height: 10px;
2143      bottom: -3px;
2144      width: 100%;
2145    }
2146
2147    media-control-bar :is([role='button'], [role='switch'], button) {
2148      line-height: 0;
2149    }
2150
2151    media-control-bar :is([part*='button'], [part*='range'], [part*='display']) {
2152      border-radius: 3px;
2153    }
2154
2155    .spacer {
2156      flex-grow: 1;
2157      background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));
2158    }
2159
2160    media-control-bar[slot~='top-chrome'] {
2161      min-height: 42px;
2162      pointer-events: none;
2163    }
2164
2165    media-control-bar {
2166      --gradient-steps:
2167        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%,
2168        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%,
2169        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%,
2170        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%;
2171    }
2172
2173    :host([title]) media-control-bar[slot='top-chrome']::before,
2174    :host([videotitle]) media-control-bar[slot='top-chrome']::before {
2175      content: '';
2176      position: absolute;
2177      width: 100%;
2178      padding-bottom: min(100px, 25%);
2179      background: linear-gradient(to top, var(--gradient-steps));
2180      opacity: 0.8;
2181      pointer-events: none;
2182    }
2183
2184    :host(:not([audio])) media-control-bar[part~='bottom']::before {
2185      content: '';
2186      position: absolute;
2187      width: 100%;
2188      bottom: 0;
2189      left: 0;
2190      padding-bottom: min(100px, 25%);
2191      background: linear-gradient(to bottom, var(--gradient-steps));
2192      opacity: 0.8;
2193      z-index: 1;
2194      pointer-events: none;
2195    }
2196
2197    media-control-bar[part~='bottom'] > * {
2198      z-index: 20;
2199    }
2200
2201    media-control-bar[part~='bottom'] {
2202      padding: 6px 6px;
2203    }
2204
2205    media-control-bar[slot~='top-chrome'] > * {
2206      --media-control-background: transparent;
2207      --media-control-hover-background: transparent;
2208      position: relative;
2209    }
2210
2211    media-controller::part(vertical-layer) {
2212      transition: background-color 1s;
2213    }
2214
2215    media-controller:is([mediapaused], :not([userinactive]))::part(vertical-layer) {
2216      background-color: var(--controls-backdrop-color, var(--controls, transparent));
2217      transition: background-color 0.25s;
2218    }
2219
2220    .center-controls {
2221      --media-button-icon-width: 100%;
2222      --media-button-icon-height: auto;
2223      --media-tooltip-display: none;
2224      pointer-events: none;
2225      width: 100%;
2226      display: flex;
2227      flex-flow: row;
2228      align-items: center;
2229      justify-content: center;
2230      paint-order: stroke;
2231      stroke: rgba(102, 102, 102, 1);
2232      stroke-width: 0.3px;
2233      text-shadow:
2234        0 0 2px rgb(0 0 0 / 0.25),
2235        0 0 6px rgb(0 0 0 / 0.25);
2236    
2236}
2237
2238    .center-controls media-play-button {
2239      --media-control-background: transparent;
2240      --media-control-hover-background: transparent;
2241      --media-control-padding: 0;
2242      width: 40px;
2243      filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25))
vendor: 27,322 bytes, lines 2243-2829
2243;
2244    }
2245
2246    [breakpointsm] .center-controls media-play-button {
2247      width: 90px;
2248      height: 90px;
2249      border-radius: 50%;
2250      transition: background 0.4s;
2251      padding: 24px;
2252      --media-control-background: #000;
2253      --media-control-hover-background: var(--_accent-color);
2254    }
2255
2256    .center-controls media-seek-backward-button,
2257    .center-controls media-seek-forward-button {
2258      --media-control-background: transparent;
2259      --media-control-hover-background: transparent;
2260      padding: 0;
2261      margin: 0 20px;
2262      width: max(33px, min(8%, 40px));
2263      text-shadow:
2264        0 0 2px rgb(0 0 0 / 0.25),
2265        0 0 6px rgb(0 0 0 / 0.25);
2266    }
2267
2268    [breakpointsm]:not([audio]) .center-controls.pre-playback {
2269      display: grid;
2270      align-items: initial;
2271      justify-content: initial;
2272      height: 100%;
2273      overflow: hidden;
2274    }
2275
2276    [breakpointsm]:not([audio]) .center-controls.pre-playback media-play-button {
2277      place-self: var(--_pre-playback-place, center);
2278      grid-area: 1 / 1;
2279      margin: 16px;
2280    }
2281
2282    /* Show and hide controls or pre-playback state */
2283
2284    [breakpointsm]:is([mediahasplayed], :not([mediapaused])):not([audio])
2285      .center-controls.pre-playback
2286      media-play-button {
2287      /* Using \`forwards\` would lead to a laggy UI after the animation got in the end state */
2288      animation: 0.3s linear pre-play-hide;
2289      opacity: 0;
2290      pointer-events: none;
2291    }
2292
2293    .autoplay-unmute {
2294      --media-control-hover-background: transparent;
2295      width: 100%;
2296      display: flex;
2297      align-items: center;
2298      justify-content: center;
2299      filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));
2300    }
2301
2302    .autoplay-unmute-btn {
2303      --media-control-height: 16px;
2304      border-radius: 8px;
2305      background: #000;
2306      color: var(--_primary-color);
2307      display: flex;
2308      align-items: center;
2309      padding: 8px 16px;
2310      font-size: 18px;
2311      font-weight: 500;
2312      cursor: pointer;
2313    }
2314
2315    .autoplay-unmute-btn:hover {
2316      background: var(--_accent-color);
2317    }
2318
2319    [breakpointsm] .autoplay-unmute-btn {
2320      --media-control-height: 30px;
2321      padding: 14px 24px;
2322      font-size: 26px;
2323    }
2324
2325    .autoplay-unmute-btn svg {
2326      margin: 0 6px 0 0;
2327    }
2328
2329    [breakpointsm] .autoplay-unmute-btn svg {
2330      margin: 0 10px 0 0;
2331    }
2332
2333    media-controller:not([audio]):not([mediahasplayed]) *:is(media-control-bar, media-time-range) {
2334      display: none;
2335    }
2336
2337    media-error-dialog:not([mediaerrorcode]) {
2338      opacity: 0;
2339    }
2340
2341    media-loading-indicator {
2342      --media-loading-icon-width: 100%;
2343      --media-button-icon-height: auto;
2344      display: var(--media-control-display, var(--media-loading-indicator-display, flex));
2345      pointer-events: none;
2346      position: absolute;
2347      width: min(15%, 150px);
2348      flex-flow: row;
2349      align-items: center;
2350      justify-content: center;
2351    }
2352
2353    /* Intentionally don't target the div for transition but the children
2354     of the div. Prevents messing with media-chrome's autohide feature. */
2355    media-loading-indicator + div * {
2356      transition: opacity 0.15s;
2357      opacity: 1;
2358    }
2359
2360    media-loading-indicator[medialoading]:not([mediapaused]) ~ div > * {
2361      opacity: 0;
2362      transition-delay: 400ms;
2363    }
2364
2365    media-volume-range {
2366      width: min(100%, 100px);
2367      --media-range-padding-left: 10px;
2368      --media-range-padding-right: 10px;
2369      --media-range-thumb-width: 12px;
2370      --media-range-thumb-height: 12px;
2371      --media-range-thumb-background: radial-gradient(
2372        circle,
2373        #000 0%,
2374        #000 25%,
2375        var(--_primary-color) 25%,
2376        var(--_primary-color)
2377      );
2378      --media-control-hover-background: none;
2379    }
2380
2381    media-time-display {
2382      white-space: nowrap;
2383    }
2384
2385    /* Generic style for explicitly disabled controls */
2386    media-control-bar[part~='bottom'] [disabled],
2387    media-control-bar[part~='bottom'] [aria-disabled='true'] {
2388      opacity: 60%;
2389      cursor: not-allowed;
2390    }
2391
2392    media-text-display {
2393      --media-font-size: 16px;
2394      --media-control-padding: 14px;
2395      font-weight: 500;
2396    }
2397
2398    media-play-button.animated *:is(g, path) {
2399      transition: all 0.3s;
2400    }
2401
2402    media-play-button.animated[mediapaused] .pause-icon-pt1 {
2403      opacity: 0;
2404    }
2405
2406    media-play-button.animated[mediapaused] .pause-icon-pt2 {
2407      transform-origin: center center;
2408      transform: scaleY(0);
2409    }
2410
2411    media-play-button.animated[mediapaused] .play-icon {
2412      clip-path: inset(0 0 0 0);
2413    }
2414
2415    media-play-button.animated:not([mediapaused]) .play-icon {
2416      clip-path: inset(0 0 0 100%);
2417    }
2418
2419    media-seek-forward-button,
2420    media-seek-backward-button {
2421      --media-font-weight: 400;
2422    }
2423
2424    .mute-icon {
2425      display: inline-block;
2426    }
2427
2428    .mute-icon :is(path, g) {
2429      transition: opacity 0.5s;
2430    }
2431
2432    .muted {
2433      opacity: 0;
2434    }
2435
2436    media-mute-button[mediavolumelevel='low'] :is(.volume-medium, .volume-high),
2437    media-mute-button[mediavolumelevel='medium'] :is(.volume-high) {
2438      opacity: 0;
2439    }
2440
2441    media-mute-button[mediavolumelevel='off'] .unmuted {
2442      opacity: 0;
2443    }
2444
2445    media-mute-button[mediavolumelevel='off'] .muted {
2446      opacity: 1;
2447    }
2448
2449    /**
2450     * Our defaults for these buttons are to hide them at small sizes
2451     * users can override this with CSS
2452     */
2453    media-controller:not([breakpointsm]):not([audio]) {
2454      --bottom-play-button: none;
2455      --bottom-seek-backward-button: none;
2456      --bottom-seek-forward-button: none;
2457      --bottom-time-display: none;
2458      --bottom-playback-rate-menu-button: none;
2459      --bottom-pip-button: none;
2460    }
2461
2462    [part='mux-badge'] {
2463      position: absolute;
2464      bottom: 10px;
2465      right: 10px;
2466      z-index: 2;
2467      opacity: 0.6;
2468      transition:
2469        opacity 0.2s ease-in-out,
2470        bottom 0.2s ease-in-out;
2471    }
2472
2473    [part='mux-badge']:hover {
2474      opacity: 1;
2475    }
2476
2477    [part='mux-badge'] a {
2478      font-size: 14px;
2479      font-family: var(--_font-family);
2480      color: var(--_primary-color);
2481      text-decoration: none;
2482      display: flex;
2483      align-items: center;
2484      gap: 5px;
2485    }
2486
2487    [part='mux-badge'] .mux-badge-text {
2488      transition: opacity 0.5s ease-in-out;
2489      opacity: 0;
2490    }
2491
2492    [part='mux-badge'] .mux-badge-logo {
2493      width: 40px;
2494      height: auto;
2495      display: inline-block;
2496    }
2497
2498    [part='mux-badge'] .mux-badge-logo svg {
2499      width: 100%;
2500      height: 100%;
2501      fill: white;
2502    }
2503
2504    media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'],
2505    media-controller:not([userinactive]) [part='mux-badge'],
2506    media-controller[mediahasplayed][mediapaused] [part='mux-badge'] {
2507      transition: bottom 0.1s ease-in-out;
2508    }
2509
2510    media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] {
2511      transition: bottom 0.2s ease-in-out 0.62s;
2512    }
2513
2514    media-controller:not([userinactive]) [part='mux-badge'] .mux-badge-text,
2515    media-controller[mediahasplayed][mediapaused] [part='mux-badge'] .mux-badge-text {
2516      opacity: 1;
2517    }
2518
2519    media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] .mux-badge-text {
2520      opacity: 0;
2521    }
2522
2523    media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] {
2524      bottom: 10px;
2525    }
2526
2527    media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'] {
2528      bottom: 10px;
2529    }
2530
2531    media-controller:not([userinactive])[mediahasplayed] [part='mux-badge'],
2532    media-controller[mediahasplayed][mediapaused] [part='mux-badge'] {
2533      bottom: calc(28px + var(--media-control-height, 0px) + var(--media-control-padding, 0px) * 2);
2534    }
2535  </style>
2536
2537  <template partial="TitleDisplay">
2538    <template if="videotitle">
2539      <template if="videotitle != true">
2540        <media-text-display part="top title display" class="title-display">{{videotitle}}</media-text-display>
2541      </template>
2542    </template>
2543    <template if="!videotitle">
2544      <template if="title">
2545        <media-text-display part="top title display" class="title-display">{{title}}</media-text-display>
2546      </template>
2547    </template>
2548  </template>
2549
2550  <template partial="PlayButton">
2551    <media-play-button
2552      part="{{section ?? 'bottom'}} play button"
2553      disabled="{{disabled}}"
2554      aria-disabled="{{disabled}}"
2555      class="animated"
2556    >
2557      <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon">
2558        <g class="play-icon">
2559          <path
2560            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"
2561          />
2562        </g>
2563        <g class="pause-icon">
2564          <path
2565            class="pause-icon-pt1"
2566            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"
2567          />
2568          <path
2569            class="pause-icon-pt2"
2570            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"
2571          />
2572        </g>
2573      </svg>
2574    </media-play-button>
2575  </template>
2576
2577  <template partial="PrePlayButton">
2578    <media-play-button
2579      part="{{section ?? 'center'}} play button pre-play"
2580      disabled="{{disabled}}"
2581      aria-disabled="{{disabled}}"
2582    >
2583      <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon" style="transform: translate(3px, 0)">
2584        <path
2585          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"
2586        />
2587      </svg>
2588    </media-play-button>
2589  </template>
2590
2591  <template partial="SeekBackwardButton">
2592    <media-seek-backward-button
2593      seekoffset="{{backwardseekoffset}}"
2594      part="{{section ?? 'bottom'}} seek-backward button"
2595      disabled="{{disabled}}"
2596      aria-disabled="{{disabled}}"
2597    >
2598      <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon">
2599        <path
2600          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"
2601        />
2602        <text transform="translate(6 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'">
2603          {{backwardseekoffset}}
2604        </text>
2605      </svg>
2606    </media-seek-backward-button>
2607  </template>
2608
2609  <template partial="SeekForwardButton">
2610    <media-seek-forward-button
2611      seekoffset="{{forwardseekoffset}}"
2612      part="{{section ?? 'bottom'}} seek-forward button"
2613      disabled="{{disabled}}"
2614      aria-disabled="{{disabled}}"
2615    >
2616      <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon">
2617        <g>
2618          <text transform="translate(-1 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'">
2619            {{forwardseekoffset}}
2620          </text>
2621          <path
2622            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"
2623          />
2624        </g>
2625      </svg>
2626    </media-seek-forward-button>
2627  </template>
2628
2629  <template partial="MuteButton">
2630    <media-mute-button part="bottom mute button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2631      <svg viewBox="0 0 18 14" slot="icon" class="mute-icon" aria-hidden="true">
2632        <g class="unmuted">
2633          <path
2634            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"
2635          />
2636          <path
2637            class="volume-low"
2638            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"
2639          />
2640          <path
2641            class="volume-medium"
2642            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"
2643          />
2644          <path
2645            class="volume-high"
2646            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"
2647          />
2648        </g>
2649        <g class="muted">
2650          <path
2651            fill-rule="evenodd"
2652            clip-rule="evenodd"
2653            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"
2654          />
2655          <path
2656            fill-rule="evenodd"
2657            clip-rule="evenodd"
2658            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"
2659          />
2660        </g>
2661      </svg>
2662    </media-mute-button>
2663  </template>
2664
2665  <template partial="PipButton">
2666    <media-pip-button part="bottom pip button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2667      <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon">
2668        <path
2669          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"
2670        />
2671        <path
2672          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"
2673        />
2674      </svg>
2675    </media-pip-button>
2676  </template>
2677
2678  <template partial="CaptionsMenu">
2679    <media-captions-menu-button part="bottom captions button">
2680      <svg aria-hidden="true" viewBox="0 0 18 14" slot="on">
2681        <path
2682          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"
2683        />
2684      </svg>
2685      <svg aria-hidden="true" viewBox="0 0 18 14" slot="off">
2686        <path
2687          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"
2688        />
2689        <path
2690          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"
2691        />
2692        <path
2693          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"
2694        />
2695      </svg>
2696    </media-captions-menu-button>
2697    <media-captions-menu
2698      hidden
2699      anchor="auto"
2700      part="bottom captions menu"
2701      disabled="{{disabled}}"
2702      aria-disabled="{{disabled}}"
2703      exportparts="menu-item"
2704    >
2705      <div slot="checked-indicator">
2706        <style>
2707          .indicator {
2708            position: relative;
2709            top: 1px;
2710            width: 0.9em;
2711            height: auto;
2712            fill: var(--_accent-color);
2713            margin-right: 5px;
2714          }
2715
2716          [aria-checked='false'] .indicator {
2717            display: none;
2718          }
2719        </style>
2720        <svg viewBox="0 0 14 18" class="indicator">
2721          <path
2722            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"
2723            fill-rule="evenodd"
2724          />
2725        </svg></div
2726    ></media-captions-menu>
2727  </template>
2728
2729  <template partial="AirplayButton">
2730    <media-airplay-button part="bottom airplay button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2731      <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon">
2732        <path
2733          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"
2734        />
2735        <path
2736          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"
2737        />
2738      </svg>
2739    </media-airplay-button>
2740  </template>
2741
2742  <template partial="FullscreenButton">
2743    <media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2744      <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter">
2745        <path
2746          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"
2747        />
2748        <path
2749          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"
2750        />
2751        <path
2752          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"
2753        />
2754        <path
2755          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"
2756        />
2757      </svg>
2758      <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit">
2759        <path
2760          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"
2761        />
2762        <path
2763          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"
2764        />
2765        <path
2766          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"
2767        />
2768        <path
2769          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"
2770        />
2771      </svg>
2772    </media-fullscreen-button>
2773  </template>
2774
2775  <template partial="CastButton">
2776    <media-cast-button part="bottom cast button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2777      <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter">
2778        <path
2779          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"
2780        />
2781      </svg>
2782      <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit">
2783        <path
2784          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"
2785        />
2786        <path d="M2.15002 5.634C5.18352 6.4207 7.57252 8.8151 8.35282 11.8499H15.8501V2.1499H2.15002V5.634Z" />
2787      </svg>
2788    </media-cast-button>
2789  </template>
2790
2791  <template partial="LiveButton">
2792    <media-live-button part="{{section ?? 'top'}} live button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
2793      <span slot="text">Live</span>
2794    </media-live-button>
2795  </template>
2796
2797  <template partial="PlaybackRateMenu">
2798    <media-playback-rate-menu-button part="bottom playback-rate button"></media-playback-rate-menu-button>
2799    <media-playback-rate-menu
2800      hidden
2801      anchor="auto"
2802      rates="{{playbackrates}}"
2803      exportparts="menu-item"
2804      part="bottom playback-rate menu"
2805      disabled="{{disabled}}"
2806      aria-disabled="{{disabled}}"
2807    ></media-playback-rate-menu>
2808  </template>
2809
2810  <template partial="VolumeRange">
2811    <media-volume-range
2812      part="bottom volume range"
2813      disabled="{{disabled}}"
2814      aria-disabled="{{disabled}}"
2815    ></media-volume-range>
2816  </template>
2817
2818  <template partial="TimeDisplay">
2819    <media-time-display
2820      remaining="{{defaultshowremainingtime}}"
2821      showduration="{{!hideduration}}"
2822      part="bottom time display"
2823      disabled="{{disabled}}"
2824      aria-disabled="{{disabled}}"
2825    ></media-time-display>
2826  </template>
2827
2828  <template partial="TimeRange">
2829    <media-time-range part="bottom time range" disabled="{{disabled}}" aria-disabled="{{disabled}}"
2829>
2830      <media-preview-thumbnail slot="preview"></media-preview-thumbnail>
2831      <media-preview-chapter-display slot="preview"></media-preview-chapter-display>
2832      <media-preview-time-display slot="preview"></media-preview-time-display>
2833      <div slot="preview" part="arrow"></div>
2834    </media-time-range>
2835  </template>
2836
2837  <template partial="AudioTrackMenu">
2838    <media-audio-track-menu-button part="bottom audio-track button">
2839      <svg aria-hidden="true" slot="icon" viewBox="0 0 18 16">
2840        <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" />
2841        <path
2842          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"
2843        />
2844      </svg>
2845    </media-audio-track-menu-button>
2846    <media-audio-track-menu
2847      hidden
2848      anchor="auto"
2849      part="bottom audio-track menu"
2850      disabled="{{disabled}}"
2851      aria-disabled="{{disabled}}"
2852      exportparts="menu-item"
2853    >
2854      <div slot="checked-indicator">
2855        <style>
2856          .indicator {
2857            position: relative;
2858            top: 1px;
2859            width: 0.9em;
2860            height: auto;
2861            fill: var(--_accent-color);
2862            margin-right: 5px;
2863          }
2864
2865          [aria-checked='false'] .indicator {
2866            display: none;
2867          }
2868        </style>
2869        <svg viewBox="0 0 14 18" class="indicator">
2870          <path
2871            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"
2872            fill-rule="evenodd"
2873          />
2874        </svg>
2875      </div>
2876    </media-audio-track-menu>
2877  </template>
2878
2879  <template partial="RenditionMenu">
2880    <media-rendition-menu-button part="bottom rendition button">
2881      <svg aria-hidden="true" slot="icon" viewBox="0 0 18 14">
2882        <path
2883          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"
2884        />
2885      </svg>
2886    </media-rendition-menu-button>
2887    <media-rendition-menu
2888      hidden
2889      anchor="auto"
2890      part="bottom rendition menu"
2891      disabled="{{disabled}}"
2892      aria-disabled="{{disabled}}"
2893    >
2894      <div slot="checked-indicator">
2895        <style>
2896          .indicator {
2897            position: relative;
2898            top: 1px;
2899            width: 0.9em;
2900            height: auto;
2901            fill: var(--_accent-color);
2902            margin-right: 5px;
2903          }
2904
2905          [aria-checked='false'] .indicator {
2906            opacity: 0;
2907          }
2908        </style>
2909        <svg viewBox="0 0 14 18" class="indicator">
2910          <path
2911            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"
2912            fill-rule="evenodd"
2913          />
2914        </svg>
2915      </div>
2916    </media-rendition-menu>
2917  </template>
2918
2919  <template partial="MuxBadge">
2920    <div part="mux-badge">
2921      <a href="https://www.mux.com/player" target="_blank">
2922        <span class="mux-badge-text">Powered by</span>
2923        <div class="mux-badge-logo">
2924          <svg
2925            viewBox="0 0 1600 500"
2926            style="fill-rule: evenodd; clip-rule: evenodd; stroke-linejoin: round; stroke-miterlimit: 2"
2927          >
2928            <g>
2929              <path
2930                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"
2931                style="fill-rule: nonzero"
2932              ></path>
2933              <path
2934                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"
2935                style="fill-rule: nonzero"
2936              ></path>
2937              <path
2938                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"
2939                style="fill-rule: nonzero"
2940              ></path>
2941            </g>
2942          </svg>
2943        </div>
2944      </a>
2945    </div>
2946  </template>
2947
2948  <media-controller
2949    part="controller"
2950    defaultstreamtype="{{defaultstreamtype ?? 'on-demand'}}"
2951    breakpoints="sm:470"
2952    gesturesdisabled="{{disabled}}"
2953    hotkeys="{{hotkeys}}"
2954    nohotkeys="{{nohotkeys}}"
2955    novolumepref="{{novolumepref}}"
2956    audio="{{audio}}"
2957    noautoseektolive="{{noautoseektolive}}"
2958    defaultsubtitles="{{defaultsubtitles}}"
2959    defaultduration="{{defaultduration ?? false}}"
2960    keyboardforwardseekoffset="{{forwardseekoffset}}"
2961    keyboardbackwardseekoffset="{{backwardseekoffset}}"
2962    exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer"
2963    style="--_pre-playback-place:{{preplaybackplace ?? 'center'}}"
2964  >
2965    <slot name="media" slot="media"></slot>
2966    <slot name="poster" slot="poster"></slot>
2967
2968    <media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator>
2969
2970    <template if="!audio">
2971      <media-error-dialog slot="dialog" noautohide></media-error-dialog>
2972      <!-- Pre-playback UI -->
2973      <!-- same for both on-demand and live -->
2974      <div slot="centered-chrome" class="center-controls pre-playback">
2975        <template if="!breakpointsm">{{>PlayButton section="center"}}</template>
2976        <template if="breakpointsm">{{>PrePlayButton section="center"}}</template>
2977      </div>
2978
2979      <!-- Mux Badge -->
2980      <template if="proudlydisplaymuxbadge"> {{>MuxBadge}} </template>
2981
2982      <!-- Autoplay centered unmute button -->
2983      <!--
2984        todo: figure out how show this with available state variables
2985        needs to show when:
2986        - autoplay is enabled
2987        - playback has been successful
2988        - audio is muted
2989        - in place / instead of the pre-plaback play button
2990        - not to show again after user has interacted with this button
2991          - OR user has interacted with the mute button in the control bar
2992      -->
2993      <!--
2994        There should be a >MuteButton to the left of the "Unmute" text, but a templating bug
2995        makes it appear even if commented out in the markup, add it back when code is un-commented
2996      -->
2997      <!-- <div slot="centered-chrome" class="autoplay-unmute">
2998        <div role="button" class="autoplay-unmute-btn">Unmute</div>
2999      </div> -->
3000
3001      <template if="streamtype == 'on-demand'">
3002        <template if="breakpointsm">
3003          <media-control-bar part="control-bar top" slot="top-chrome">{{>TitleDisplay}} </media-control-bar>
3004        </template>
3005        {{>TimeRange}}
3006        <media-control-bar part="control-bar bottom">
3007          {{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}} {{>MuteButton}}
3008          {{>VolumeRange}}
3009          <div class="spacer"></div>
3010          {{>RenditionMenu}} {{>PlaybackRateMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}}
3011          {{>CastButton}} {{>PipButton}} {{>FullscreenButton}}
3012        </media-control-bar>
3013      </template>
3014
3015      <template if="streamtype == 'live'">
3016        <media-control-bar part="control-bar top" slot="top-chrome">
3017          {{>LiveButton}}
3018          <template if="breakpointsm"> {{>TitleDisplay}} </template>
3019        </media-control-bar>
3020        <template if="targetlivewindow > 0">{{>TimeRange}}</template>
3021        <media-control-bar part="control-bar bottom">
3022          {{>PlayButton}}
3023          <template if="targetlivewindow > 0">{{>SeekBackwardButton}} {{>SeekForwardButton}}</template>
3024          {{>MuteButton}} {{>VolumeRange}}
3025          <div class="spacer"></div>
3026          {{>RenditionMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}}
3027          {{>FullscreenButton}}
3028        </media-control-bar>
3029      </template>
3030    </template>
3031
3032    <template if="audio">
3033      <template if="streamtype == 'on-demand'">
3034        <template if="title">
3035          <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar>
3036        </template>
3037        <media-control-bar part="control-bar bottom">
3038          {{>PlayButton}}
3039          <template if="breakpointsm"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>
3040          {{>MuteButton}}
3041          <template if="breakpointsm">{{>VolumeRange}}</template>
3042          {{>TimeDisplay}} {{>TimeRange}}
3043          <template if="breakpointsm">{{>PlaybackRateMenu}}</template>
3044          {{>AirplayButton}} {{>CastButton}}
3045        </media-control-bar>
3046      </template>
3047
3048      <template if="streamtype == 'live'">
3049        <template if="title">
3050          <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar>
3051        </template>
3052        <media-control-bar part="control-bar bottom">
3053          {{>PlayButton}} {{>LiveButton section="bottom"}} {{>MuteButton}}
3054          <template if="breakpointsm">
3055            {{>VolumeRange}}
3056            <template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>
3057          </template>
3058          <template if="targetlivewindow > 0"> {{>TimeDisplay}} {{>TimeRange}} </template>
3059          <template if="!targetlivewindow"><div class="spacer"></div></template>
3060          {{>AirplayButton}} {{>CastButton}}
3061        </media-control-bar>
3062      </template>
3063    </template>
3064
3065    <slot></slot>
3066  </media-controller>
3067</template>
3068`,p_=mG.createElement("template");"innerHTML"in p_&&(p_.innerHTML=pf);var py,pT,pA=class extends lD{};pA.template=null==(pT=null==(py=p_.content)?void 0:py.children)?void 0:pT[0],mY.customElements.get("media-theme-gerwig")||mY.customElements.define("media-theme-gerwig",pA);var pk={SRC:"src",POSTER:"poster"},pw={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
3068LAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",FULLSCREEN_ELEMENT:"fullscreen-element",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",NO_MUTED_PREF:"no-muted-pref",CAST_RECEIVER:"cast-receiver",NO_TOOLTIPS:"no-tooltips",PROUDLY_DISPLAY_MUX_BADGE:"proudly-display-mux-badge",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended"},pS=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","videotitle","novolumepref","nomutedpref","proudlydisplaymuxbadge"],pI=sz.formatErrorMessage;function pR(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)}sz.formatErrorMessage=e=>{var t,i;if(e instanceof tW){let a=((e,t=!1)=>({title:((e,t=!1)=>{var i,a;if(e.muxCode){let r=pb(null!=(i=e.errorCategory)?i:"video"),n=tB(null!=(a=e.errorCategory)?a:tP.VIDEO);if(e.muxCode===tU.NETWORK_OFFLINE)return t6("Your device appears to be offline",t);if(e.muxCode===tU.NETWORK_TOKEN_EXPIRED)return t6("{category} URL has expired",t).format({category:r});if([tU.NETWORK_TOKEN_SUB_MISMATCH,tU.NETWORK_TOKEN_AUD_MISMATCH,tU.NETWORK_TOKEN_AUD_MISSING,tU.NETWORK_TOKEN_MALFORMED].includes(e.muxCode))return t6("{category} URL is formatted incorrectly",t).format({category:r});if(e.muxCode===tU.NETWORK_TOKEN_MISSING)return t6("Invalid {categoryName} URL",t).format({categoryName:n});if(e.muxCode===tU.NETWORK_NOT_FOUND)return t6("{category} does not exist",t).format({category:r});if(e.muxCode===tU.NETWORK_NOT_READY){let i="live"===e.streamType?"Live stream":"Video";return t6("{mediaType} is not currently available",t).format({mediaType:i})}}if(e.code){if(e.code===tW.MEDIA_ERR_NETWORK)return t6("Network Error",t);if(e.code===tW.MEDIA_ERR_DECODE)return t6("Media Error",t);if(e.code===tW.MEDIA_ERR_SRC_NOT_SUPPORTED)return t6("Source Not Supported",t)}return t6("Error",t)})(e,t).toString(),message:((e,t=!1)=>{var i,a;if(e.muxCode){let r=pb(null!=(i=e.errorCategory)?i:"video"),n=tB(null!=(a=e.errorCategory)?a:tP.VIDEO);return e.muxCode===tU.NETWORK_OFFLINE?t6("Check your internet connection and try reloading this video.",t):e.muxCode===tU.NETWORK_TOKEN_EXPIRED?t6("The video’s secured {tokenNamePrefix}-token has expired.",t).format({tokenNamePrefix:n}):e.muxCode===tU.NETWORK_TOKEN_SUB_MISMATCH?t6("The video’s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",t).format({tokenNamePrefix:n}):e.muxCode===tU.NETWORK_TOKEN_MALFORMED?t6("{category} URL is formatted incorrectly",t).format({category:r}):[tU.NETWORK_TOKEN_AUD_MISMATCH,tU.NETWORK_TOKEN_AUD_MISSING].includes(e.muxCode)?t6("The {tokenNamePrefix}-token is formatted with incorrect information.",t).format({tokenNamePrefix:n}):[tU.NETWORK_TOKEN_MISSING,tU.NETWORK_INVALID_URL].includes(e.muxCode)?t6("The video URL or {tokenNamePrefix}-token are formatted with incorrect or incomplete information.",t).format({tokenNamePrefix:n}):e.muxCode===tU.NETWORK_NOT_FOUND?"":e.message}return e.code&&(e.code===tW.MEDIA_ERR_NETWORK||e.code===tW.MEDIA_ERR_DECODE||e.code===tW.MEDIA_ERR_SRC_NOT_SUPPORTED),e.message})(e,t).toString()}))(e,!1);return`
3069      ${null!=a&&a.title?`<h3>${a.title}</h3>`:""}
3070      ${null!=a&&a.message||null!=a&&a.linkUrl?`<p>
3071        ${null==a?void 0:a.message}
3072        ${null!=a&&a.linkUrl?`<a
3073              href="${a.linkUrl}"
3074              target="_blank"
3075              rel="external noopener"
3076              aria-label="${null!=(t=a.linkText)?t:""} ${t6("(opens in a new window)")}"
3077              >${null!=(i=a.linkText)?i:a.linkUrl}</a
3078            >`:""}
3079      </p>`:""}
3080    `}return pI(e)};var pD,pC,pL,pM,pO,px,pN,pP,pU,pB,pH,pW,pV,pF,p$,pK=Object.values(aC),pq=Object.values(pk),pY=Object.values(pw),pG="mux-player",pj={isDialogOpen:!1},pQ={redundant_streams:!0},pZ=class extends ps{constructor(){super(),dF(this,pN),dF(this,pD),dF(this,pC,!1),dF(this,pL,{}),dF(this,pM,!0),dF(this,pO,new m9(this,"hotkeys")),dF(this,px,{...pj,onCloseErrorDialog:e=>{var t;(null==(t=e.composedPath()[0])?void 0:t.localName)==="media-error-dialog"&&dK(this,pN,pB).call(this,{isDialogOpen:!1})},onFocusInErrorDialog:e=>{var t;(null==(t=e.composedPath()[0])?void 0:t.localName)==="media-error-dialog"&&(m1(this,mG.activeElement)||e.preventDefault())}}),d$(this,pD,iG()),this.attachShadow({mode:"open"}),dK(this,pN,pU).call(this),this.isConnected&&dK(this,pN,pP).call(this)}static get NAME(){return pG}static get VERSION(){return m3}static get observedAttributes(){var e;return[...null!=(e=ps.observedAttributes)?e:[],...pq,...pK,...pY]}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(){let e=this.media;e&&(e.metadata=pR(this))}attributeChangedCallback(e,t,i){var a;switch(dK(this,pN,pP).call(this),super.attributeChangedCallback(e,t,i),e){case pw.HOTKEYS:dV(this,pO).value=i;break;case pw.THUMBNAIL_TIME:null!=i&&this.tokens.thumbnail&&m6(t6("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break;case pw.THUMBNAIL_TOKEN:if(i){let e=t8(i);if(e){let{aud:t}=e,i=iy.THUMBNAIL;t!==i&&m6(t6("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:i,tokenNamePrefix:"thumbnail"}))}}break;case pw.STORYBOARD_TOKEN:if(i){let e=t8(i);if(e){let{aud:t}=e,i=iy.STORYBOARD;t!==i&&m6(t6("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:i,tokenNamePrefix:"storyboard"}))}}break;case pw.DRM_TOKEN:if(i){let e=t8(i);if(e){let{aud:t}=e,i=iy.DRM;t!==i&&m6(t6("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:i,tokenNamePrefix:"drm"}))}}break;case aC.PLAYBACK_ID:null!=i&&i.includes("?token")&&m7(t6("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:i}));break;case aC.STREAM_TYPE:i&&![t$.LIVE,t$.ON_DEMAND,t$.UNKNOWN].includes(i)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=i.includes("dvr")?1/0:0:pe({file:"invalid-stream-type.md",message:t6("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}
3080):i===t$.LIVE?null==this.getAttribute(pw.TARGET_LIVE_WINDOW)&&(this.targetLiveWindow=0):this.targetLiveWindow=NaN;break;case pw.FULLSCREEN_ELEMENT:if(null!=i||i!==t){let e=mG.getElementById(i),t=null==e?void 0:e.querySelector("mux-player");this.mediaController&&e&&t&&(this.mediaController.fullscreenElement=e)}}[aC.PLAYBACK_ID,pk.SRC,pw.PLAYBACK_TOKEN].includes(e)&&t!==i&&d$(this,px,{...dV(this,px),...pj}),dK(this,pN,pH).call(this,{[null!=(a=m5[e])?a:mQ(e)]:i})}async requestFullscreen(e){var t;if(!(!this.mediaController||this.mediaController.hasAttribute(rn.MEDIA_IS_FULLSCREEN)))return null==(t=this.mediaController)||t.dispatchEvent(new mY.CustomEvent(rt.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,t)=>{var i;null==(i=this.mediaController)||i.addEventListener(rs.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}async exitFullscreen(){var e;if(!(!this.mediaController||!this.mediaController.hasAttribute(rn.MEDIA_IS_FULLSCREEN)))return null==(e=this.mediaController)||e.dispatchEvent(new mY.CustomEvent(rt.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,t)=>{var i;null==(i=this.mediaController)||i.addEventListener(rs.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}get preferCmcd(){var e;return null!=(e=this.getAttribute(aC.PREFER_CMCD))?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?tY.includes(e)?this.setAttribute(aC.PREFER_CMCD,e):m6(`Invalid value for preferCmcd. Must be one of ${tY.join()}`):this.removeAttribute(aC.PREFER_CMCD))}get hasPlayed(){var e,t;return null!=(t=null==(e=this.mediaController)?void 0:e.hasAttribute(rn.MEDIA_HAS_PLAYED))&&t}get inLiveWindow(){var e;return null==(e=this.mediaController)?void 0:e.hasAttribute(rn.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(pw.THEME))?e:"gerwig"}set theme(e){this.setAttribute(pw.THEME,`${e}`)}get themeProps(){let e=this.mediaTheme;if(!e)return;let t={};for(let i of e.getAttributeNames()){if(pS.includes(i))continue;let a=e.getAttribute(i);t[mQ(i)]=""===a||a}return t}set themeProps(e){var t,i;dK(this,pN,pP).call(this);let a={...this.themeProps,...e};for(let r in a){if(pS.includes(r))continue;let a=null==e?void 0:e[r];"boolean"==typeof a||null==a?null==(t=this.mediaTheme)||t.toggleAttribute(mj(r),!!a):null==(i=this.mediaTheme)||i.setAttribute(mj(r),a)}}get playbackId(){var e;return null!=(e=this.getAttribute(aC.PLAYBACK_ID))?e:void 0}set playbackId(e){e?this.setAttribute(aC.PLAYBACK_ID,e):this.removeAttribute(aC.PLAYBACK_ID)}get src(){var e,t;return this.playbackId?null!=(e=pz(this,pk.SRC))?e:void 0:null!=(t=this.getAttribute(pk.SRC))?t:void 0}set src(e){e?this.setAttribute(pk.SRC,e):this.removeAttribute(pk.SRC)}get poster(){var e;let t=this.getAttribute(pk.POSTER);if(null!=t)return t;let{tokens:i}=this;return i.playback&&!i.thumbnail?void m6("Missing expected thumbnail token. No poster image will be shown"):this.playbackId&&!this.audio?((e,{token:t,customDomain:i=m2,thumbnailTime:a,programTime:r}={})=>{var n;let s=null==t?a:void 0,{aud:o}=null!=(n=t8(t))?n:{};if(!(t&&"t"!==o))return`https://image.${i}/${e}/thumbnail.webp${mz({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(pk.POSTER,e):this.removeAttribute(pk.POSTER)}get storyboardSrc(){var e;return null!=(e=this.getAttribute(pw.STORYBOARD_SRC))?e:void 0}set storyboardSrc(e){e?this.setAttribute(pw.STORYBOARD_SRC,e):this.removeAttribute(pw.STORYBOARD_SRC)}get storyboard(){let{tokens:e}=this;return this.storyboardSrc&&!e.storyboard?this.storyboardSrc:this.audio||!this.playbackId||!this.streamType||[t$.LIVE,t$.UNKNOWN].includes(this.streamType)||e.playback&&!e.storyboard?void 0:((e,{token:t,customDomain:i=m2,programStartTime:a,programEndTime:r}={})=>{var n;let{aud:s}=null!=(n=t8(t))?n:{};if(!(t&&"s"!==s))return`https://image.${i}/${e}/storyboard.vtt${mz({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})}
3080get audio(){return this.hasAttribute(pw.AUDIO)}set audio(e){if(!e)return void this.removeAttribute(pw.AUDIO);this.setAttribute(pw.AUDIO,"")}get hotkeys(){return dV(this,pO)}get nohotkeys(){return this.hasAttribute(pw.NOHOTKEYS)}set nohotkeys(e){if(!e)return void this.removeAttribute(pw.NOHOTKEYS);this.setAttribute(pw.NOHOTKEYS,"")}get thumbnailTime(){return mZ(this.getAttribute(pw.THUMBNAIL_TIME))}set thumbnailTime(e){this.setAttribute(pw.THUMBNAIL_TIME,`${e}`)}get videoTitle(){var e,t;return null!=(t=null!=(e=this.getAttribute(pw.VIDEO_TITLE))?e:this.getAttribute(pw.TITLE))?t:""}set videoTitle(e){e!==this.videoTitle&&(e?this.setAttribute(pw.VIDEO_TITLE,e):this.removeAttribute(pw.VIDEO_TITLE))}get placeholder(){var e;return null!=(e=pz(this,pw.PLACEHOLDER))?e:""}set placeholder(e){this.setAttribute(pw.PLACEHOLDER,`${e}`)}get primaryColor(){var e,t;let i=this.getAttribute(pw.PRIMARY_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=mY.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_primary-color"))?void 0:t.trim()))return i}set primaryColor(e){this.setAttribute(pw.PRIMARY_COLOR,`${e}`)}get secondaryColor(){var e,t;let i=this.getAttribute(pw.SECONDARY_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=mY.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_secondary-color"))?void 0:t.trim()))return i}set secondaryColor(e){this.setAttribute(pw.SECONDARY_COLOR,`${e}`)}get accentColor(){var e,t;let i=this.getAttribute(pw.ACCENT_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=mY.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_accent-color"))?void 0:t.trim()))return i}set accentColor(e){this.setAttribute(pw.ACCENT_COLOR,`${e}`)}get defaultShowRemainingTime(){return this.hasAttribute(pw.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(e){e?this.setAttribute(pw.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(pw.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(pw.PLAYBACK_RATES))return this.getAttribute(pw.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(e=>Number(e)).filter(e=>!Number.isNaN(e)).sort((e,t)=>e-t)}set playbackRates(e){if(!e)return void this.removeAttribute(pw.PLAYBACK_RATES);this.setAttribute(pw.PLAYBACK_RATES,e.join(" "))}get forwardSeekOffset(){var e;return null!=(e=mZ(this.getAttribute(pw.FORWARD_SEEK_OFFSET)))?e:10}set forwardSeekOffset(e){this.setAttribute(pw.FORWARD_SEEK_OFFSET,`${e}`)}get backwardSeekOffset(){var e;return null!=(e=mZ(this.getAttribute(pw.BACKWARD_SEEK_OFFSET)))?e:10}set backwardSeekOffset(e){this.setAttribute(pw.BACKWARD_SEEK_OFFSET,`${e}`)}get defaultHiddenCaptions(){return this.hasAttribute(pw.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(e){e?this.setAttribute(pw.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(pw.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return mZ(this.getAttribute(pw.DEFAULT_DURATION))}set defaultDuration(e){null==e?this.removeAttribute(pw.DEFAULT_DURATION):this.setAttribute(pw.DEFAULT_DURATION,`${e}`)}get playerInitTime(){return this.hasAttribute(aC.PLAYER_INIT_TIME)?mZ(this.getAttribute(aC.PLAYER_INIT_TIME)):dV(this,pD)}set playerInitTime(e){e!=this.playerInitTime&&(null==e?this.removeAttribute(aC.PLAYER_INIT_TIME):this.setAttribute(aC.PLAYER_INIT_TIME,`${+e}`))}get playerSoftwareName(){var e;return null!=(e=this.getAttribute(aC.PLAYER_SOFTWARE_NAME))?e:pG}get playerSoftwareVersion(){var e;return null!=(e=this.getAttribute(aC.PLAYER_SOFTWARE_VERSION))?e:m3}get beaconCollectionDomain(){var e;return null!=(e=this.getAttribute(aC.BEACON_COLLECTION_DOMAIN))?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(aC.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(aC.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var e;return null!=(e=this.getAttribute(aC.MAX_RESOLUTION))?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(aC.MAX_RESOLUTION,e):this.removeAttribute(aC.MAX_RESOLUTION))}get minResolution(){var e;return null!=(e=this.getAttribute(aC.MIN_RESOLUTION))?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(aC.MIN_RESOLUTION,e):this.removeAttribute(aC.MIN_RESOLUTION))}get renditionOrder(){var e;return null!=(e=this.getAttribute(aC.RENDITION_ORDER))?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(aC.RENDITION_ORDER,e):this.removeAttribute(aC.RENDITION_ORDER))}get programStartTime(){return mZ(this.getAttribute(aC.PROGRAM_START_TIME))}set programStartTime(e){null==e?this.removeAttribute(aC.PROGRAM_START_TIME):this.setAttribute(aC.PROGRAM_START_TIME,`${e}`)}get programEndTime(){return mZ(this.getAttribute(aC.PROGRAM_END_TIME))}set programEndTime(e){null==e?this.removeAttribute(aC.PROGRAM_END_TIME):this.setAttribute(aC.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){return mZ(this.getAttribute(aC.ASSET_START_TIME))}set assetStartTime(e){null==e?this.removeAttribute(aC.ASSET_START_TIME):this.setAttribute(aC.ASSET_START_TIME,`${e}`)}get assetEndTime(){return mZ(this.getAttribute(aC.ASSET_END_TIME))}set assetEndTime(e){null==e?this.removeAttribute(aC.ASSET_END_TIME):this.setAttribute(aC.ASSET_END_TIME,`${e}`)}get extraSourceParams(){return this.hasAttribute(pw.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(pw.EXTRA_SOURCE_PARAMS)).entries()].reduce((e,[t,i])=>(e[t]=i,e),{}):pQ}set extraSourceParams(e){null==e?this.removeAttribute(pw.EXTRA_SOURCE_PARAMS):this.setAttribute(pw.EXTRA_SOURCE_PARAMS,new URLSearchParams(e).toString())}get customDomain(){var e;return null!=(e=this.getAttribute(aC.CUSTOM_DOMAIN))?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(aC.CUSTOM_DOMAIN,e):this.removeAttribute(aC.CUSTOM_DOMAIN))}get envKey(){var e;return null!=(e=pz(this,aC.ENV_KEY))?e:void 0}set envKey(e){this.setAttribute(aC.ENV_KEY,`${e}`)}get noVolumePref(){return this.hasAttribute(pw.NO_VOLUME_PREF)}set noVolumePref(e){e?this.setAttribute(pw.NO_VOLUME_PREF,""):this.removeAttribute(pw.NO_VOLUME_PREF)}get noMutedPref(){return this.hasAttribute(pw.NO_MUTED_PREF)}set noMutedPref(e){e?this.setAttribute(pw.NO_MUTED_PREF,""):this.removeAttribute(pw.NO_MUTED_PREF)}get debug(){return null!=pz(this,aC.DEBUG)}set debug(e){e?this.setAttribute(aC.DEBUG,""):this.removeAttribute(aC.DEBUG)}get disableTracking(){return null!=pz(this,aC.DISABLE_TRACKING)}set disableTracking(e){this.toggleAttribute(aC.DISABLE_TRACKING,!!e)}get disableCookies(){return null!=pz(this,aC.DISABLE_COOKIES)}set disableCookies(e){e?this.setAttribute(aC.DISABLE_COOKIES,""):this.removeAttribute(aC.DISABLE_COOKIES)}get streamType(){var e,t,i;return null!=(i=null!=(t=this.getAttribute(aC.STREAM_TYPE))?t:null==(e=this.media)?void 0:e.streamType)?i:t$.UNKNOWN}set streamType(e){this.setAttribute(aC.STREAM_TYPE,`${e}`)}get defaultStreamType(){var e,t,i;return null!=(i=null!=(t=this.getAttribute(pw.DEFAULT_STREAM_TYPE))?t:null==(e=this.mediaController)?void 0:e.getAttribute(pw.DEFAULT_STREAM_TYPE))?i:t$.ON_DEMAND}set defaultStreamType(e){e?this.setAttribute(pw.DEFAULT_STREAM_TYPE,e):this.removeAttribute(pw.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var e,t;return this.hasAttribute(pw.TARGET_LIVE_WINDOW)?+this.getAttribute(pw.TARGET_LIVE_WINDOW):null!=(t=null==(e=this.media)?void 0:e.targetLiveWindow)?t:NaN}
3080set targetLiveWindow(e){e==this.targetLiveWindow||Number.isNaN(e)&&Number.isNaN(this.targetLiveWindow)||(null==e?this.removeAttribute(pw.TARGET_LIVE_WINDOW):this.setAttribute(pw.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e;return null==(e=this.media)?void 0:e.liveEdgeStart}get startTime(){return mZ(pz(this,aC.START_TIME))}set startTime(e){this.setAttribute(aC.START_TIME,`${e}`)}get preferPlayback(){let e=this.getAttribute(aC.PREFER_PLAYBACK);if(e===tK.MSE||e===tK.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===tK.MSE||e===tK.NATIVE?this.setAttribute(aC.PREFER_PLAYBACK,e):this.removeAttribute(aC.PREFER_PLAYBACK))}get metadata(){var e;return null==(e=this.media)?void 0:e.metadata}set metadata(e){if(dK(this,pN,pP).call(this),!this.media)return void m7("underlying media element missing when trying to set metadata. metadata will not be set.");this.media.metadata={...pR(this),...e}}get _hlsConfig(){var e;return null==(e=this.media)?void 0:e._hlsConfig}set _hlsConfig(e){if(dK(this,pN,pP).call(this),!this.media)return void m7("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.");this.media._hlsConfig=e}async addCuePoints(e){var t;return(dK(this,pN,pP).call(this),this.media)?null==(t=this.media)?void 0:t.addCuePoints(e):void m7("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(dK(this,pN,pP).call(this),this.media)?null==(t=this.media)?void 0:t.addChapters(e):void m7("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(pw.PLAYBACK_TOKEN),t=this.getAttribute(pw.DRM_TOKEN),i=this.getAttribute(pw.THUMBNAIL_TOKEN),a=this.getAttribute(pw.STORYBOARD_TOKEN);return{...dV(this,pL),...null!=e?{playback:e}:{},...null!=t?{drm:t}:{},...null!=i?{thumbnail:i}:{},...null!=a?{storyboard:a}:{}}}set tokens(e){d$(this,pL,null!=e?e:{})}get playbackToken(){var e;return null!=(e=this.getAttribute(pw.PLAYBACK_TOKEN))?e:void 0}set playbackToken(e){this.setAttribute(pw.PLAYBACK_TOKEN,`${e}`)}get drmToken(){var e;return null!=(e=this.getAttribute(pw.DRM_TOKEN))?e:void 0}set drmToken(e){this.setAttribute(pw.DRM_TOKEN,`${e}`)}get thumbnailToken(){var e;return null!=(e=this.getAttribute(pw.THUMBNAIL_TOKEN))?e:void 0}set thumbnailToken(e){this.setAttribute(pw.THUMBNAIL_TOKEN,`${e}`)}get storyboardToken(){var e;return null!=(e=this.getAttribute(pw.STORYBOARD_TOKEN))?e:void 0}set storyboardToken(e){this.setAttribute(pw.STORYBOARD_TOKEN,`${e}`)}addTextTrack(e,t,i,a){var r;let n=null==(r=this.media)?void 0:r.nativeEl;if(n)return ir(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(pw.CAST_RECEIVER))?e:void 0}set castReceiver(e){e!==this.castReceiver&&(e?this.setAttribute(pw.CAST_RECEIVER,e):this.removeAttribute(pw.CAST_RECEIVER))}get castCustomData(){var e;return null==(e=this.media)?void 0:e.castCustomData}set castCustomData(e){if(!this.media)return void m7("underlying media element missing when trying to set castCustomData. castCustomData will not be set.");this.media.castCustomData=e}get noTooltips(){return this.hasAttribute(pw.NO_TOOLTIPS)}set noTooltips(e){if(!e)return void this.removeAttribute(pw.NO_TOOLTIPS);this.setAttribute(pw.NO_TOOLTIPS,"")}get proudlyDisplayMuxBadge(){return this.hasAttribute(pw.PROUDLY_DISPLAY_MUX_BADGE)}set proudlyDisplayMuxBadge(e){e?this.setAttribute(pw.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(pw.PROUDLY_DISPLAY_MUX_BADGE)}};function pz(e,t){return e.media?e.media.getAttribute(t):e.getAttribute(t)}pD=new WeakMap,pC=new WeakMap,pL=new WeakMap,pM=new WeakMap,pO=new WeakMap,px=new WeakMap,pN=new WeakSet,pP=function(){var e,t,i,a;if(!dV(this,pC)){d$(this,pC,!0),dK(this,pN,pH).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof mY.HTMLElement))throw""}catch{m7("<media-theme> failed to upgrade!")}try{customElements.upgrade(this.media)}catch{m7("underlying media element failed to upgrade!")}
3080try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof n1))throw""}catch{m7("<media-controller> failed to upgrade!")}dK(this,pN,pW).call(this),dK(this,pN,pV).call(this),dK(this,pN,pF).call(this),d$(this,pM,null==(t=null==(e=this.mediaController)?void 0:e.hasAttribute(nn.USER_INACTIVE))||t),dK(this,pN,p$).call(this),null==(i=this.media)||i.addEventListener("streamtypechange",()=>dK(this,pN,pH).call(this)),null==(a=this.media)||a.addEventListener("loadstart",()=>dK(this,pN,pH).call(this))}},pU=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{}},pB=function(e){Object.assign(dV(this,px),e),dK(this,pN,pH).call(this)},pH=function(e={}){var t,i,a,r,n,s,o,l,d,u,c,h,p,v,E,b,g,f,_,y,T,A,k,w,S,I,R,D,C,L,M,O,x,N,P,U,B,H,W,V,F,$,K,q;let Y,G;t={...dV(this,px),...e},Y={src:!this.playbackId&&this.src,playbackId:this.playbackId,hasSrc:!!this.playbackId||!!this.src||!!this.currentSrc,poster:this.poster,storyboard:this.storyboard,storyboardSrc:this.getAttribute(pw.STORYBOARD_SRC),fullscreenElement:this.getAttribute(pw.FULLSCREEN_ELEMENT),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=mY.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(pw.NOHOTKEYS),hotKeys:this.getAttribute(pw.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(aC.TARGET_LIVE_WINDOW),streamType:m4(this.getAttribute(aC.STREAM_TYPE)),primaryColor:this.getAttribute(pw.PRIMARY_COLOR),secondaryColor:this.getAttribute(pw.SECONDARY_COLOR),accentColor:this.getAttribute(pw.ACCENT_COLOR),forwardSeekOffset:this.forwardSeekOffset,backwardSeekOffset:this.backwardSeekOffset,defaultHiddenCaptions:this.defaultHiddenCaptions,defaultDuration:this.defaultDuration,defaultShowRemainingTime:this.defaultShowRemainingTime,hideDuration:(G=null==(r=this.mediaController)?void 0:r.querySelector("media-time-display"))&&"none"===getComputedStyle(G).getPropertyValue("--media-duration-display-display").trim(),playbackRates:this.getAttribute(pw.PLAYBACK_RATES),customDomain:null!=(i=this.getAttribute(aC.CUSTOM_DOMAIN))?i:void 0,title:this.getAttribute(pw.TITLE),videoTitle:null!=(a=this.getAttribute(pw.VIDEO_TITLE))?a:this.getAttribute(pw.TITLE),novolumepref:this.hasAttribute(pw.NO_VOLUME_PREF),nomutedpref:this.hasAttribute(pw.NO_MUTED_PREF),proudlyDisplayMuxBadge:this.hasAttribute(pw.PROUDLY_DISPLAY_MUX_BADGE),castReceiver:this.castReceiver,disablePseudoEnded:this.hasAttribute(pw.DISABLE_PSEUDO_ENDED),...t,extraSourceParams:this.extraSourceParams},n=pv`
3081  <style>
3082    ${(e=>{let{tokens:t}=e;return t.drm?":host(:not([cast-receiver])) { --_cast-button-drm-display: none; }":""})(Y)}
3083    ${po}
3084  </style>
3085  ${o=Y,pv`
3086  <media-theme
3087    template="${o.themeTemplate||!1}"
3088    defaultstreamtype="${null!=(l=o.defaultStreamType)&&l}"
3089    hotkeys="${(e=>{let t=e.hotKeys?`${e.hotKeys}`:"";return"live"===m4(e.streamType)&&(t+=" noarrowleft noarrowright"),t})(o)||!1}"
3090    nohotkeys="${o.noHotKeys||!o.hasSrc||!1}"
3091    noautoseektolive="${!!(null!=(d=o.streamType)&&d.includes(t$.LIVE))&&0!==o.targetLiveWindow}"
3092    novolumepref="${o.novolumepref||!1}"
3093    nomutedpref="${o.nomutedpref||!1}"
3094    disabled="${!o.hasSrc||o.isDialogOpen}"
3095    audio="${null!=(u=o.audio)&&u}"
3096    style="${null!=(c=function(e){let t="";return Object.entries(e).forEach(([e,i])=>{null!=i&&(t+=`${mj(e)}: ${i}; `)}),t?t.trim():void 0}({"--media-primary-color":o.primaryColor,"--media-secondary-color":o.secondaryColor,"--media-accent-color":o.accentColor}))&&c}"
3097    defaultsubtitles="${!o.defaultHiddenCaptions}"
3098    forwardseekoffset="${null!=(h=o.forwardSeekOffset)&&h}"
3099    backwardseekoffset="${null!=(p=o.backwardSeekOffset)&&p}"
3100    playbackrates="${null!=(v=o.playbackRates)&&v}"
3101    defaultshowremainingtime="${null!=(E=o.defaultShowRemainingTime)&&E}"
3102    defaultduration="${null!=(b=o.defaultDuration)&&b}"
3103    hideduration="${null!=(g=o.hideDuration)&&g}"
3104    title="${null!=(f=o.title)&&f}"
3105    videotitle="${null!=(_=o.videoTitle)&&_}"
3106    proudlydisplaymuxbadge="${null!=(y=o.proudlyDisplayMuxBadge)&&y}"
3107    exportparts="${pE}"
3108    onclose="${o.onCloseErrorDialog}"
3109    onfocusin="${o.onFocusInErrorDialog}"
3110  >
3111    <mux-video
3112      slot="media"
3113      inert="${null!=(T=o.noHotKeys)&&T}"
3114      target-live-window="${null!=(A=o.targetLiveWindow)&&A}"
3115      stream-type="${null!=(k=m4(o.streamType))&&k}"
3116      crossorigin="${null!=(w=o.crossOrigin)?w:""}"
3117      playsinline
3118      autoplay="${null!=(S=o.autoplay)&&S}"
3119      muted="${null!=(I=o.muted)&&I}"
3120      loop="${null!=(R=o.loop)&&R}"
3121      preload="${null!=(D=o.preload)&&D}"
3122      debug="${null!=(C=o.debug)&&C}"
3123      prefer-cmcd="${null!=(L=o.preferCmcd)&&L}"
3124      disable-tracking="${null!=(M=o.disableTracking)&&M}"
3125      disable-cookies="${null!=(O=o.disableCookies)&&O}"
3126      prefer-playback="${null!=(x=o.preferPlayback)&&x}"
3127      start-time="${null!=o.startTime&&o.startTime}"
3128      beacon-collection-domain="${null!=(N=o.beaconCollectionDomain)&&N}"
3129      player-init-time="${null!=(P=o.playerInitTime)&&P}"
3130      player-software-name="${null!=(U=o.playerSoftwareName)&&U}"
3131      player-software-version="${null!=(B=o.playerSoftwareVersion)&&B}"
3132      env-key="${null!=(H=o.envKey)&&H}"
3133      custom-domain="${null!=(W=o.customDomain)&&W}"
3134      src="${o.src?o.src:!!o.playbackId&&iQ(o)}"
3135      cast-src="${o.src?o.src:!!o.playbackId&&iQ(o)}"
3136      cast-receiver="${null!=(V=o.castReceiver)&&V}"
3137      drm-token="${null!=($=null==(F=o.tokens)?void 0:F.drm)&&$}"
3138      exportparts="video"
3139      disable-pseudo-ended="${null!=(K=o.disablePseudoEnded)&&K}"
3140    >
3141      ${o.storyboard?pv`<track label="thumbnails" default kind="metadata" src="${o.storyboard}" />`:pv``}
3142      <slot></slot>
3143    </mux-video>
3144    <slot name="poster" slot="poster">
3145      <media-poster-image
3146        part="poster"
3147        exportparts="poster, img"
3148        src="${!!o.poster&&o.poster}"
3149        placeholdersrc="${null!=(q=o.placeholder)&&q}"
3150      ></media-poster-image>
3151    </slot>
3152  </media-theme>
3153`}
3154`,s=this.shadowRoot,n.renderInto(s)},pW=function(){let e=e=>{var t,i;if(!(null!=e&&e.startsWith("theme-")))return;let a=e.replace(/^theme-/,"");if(pS.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)},pV=function(){let e=e=>{var t;let i=null==(t=this.media)?void 0:t.error;if(!(i instanceof tW)){let{message:e,code:t}=null!=i?i:{};i=new tW(e,t)}if(!(null!=i&&i.fatal)){m6(i),i.data&&m6(`${i.name} data:`,i.data);return}let a=pg(i,!1);a.message&&pe(a),m7(i),i.data&&m7(`${i.name} data:`,i.data),dK(this,pN,pB).call(this,{isDialogOpen:!0})};this.addEventListener("error",e),this.media&&(this.media.errorTranslator=(e={})=>{var t,i,a;if(!((null==(t=this.media)?void 0:t.error)instanceof tW))return e;let r=pg(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}})},pF=function(){var e,t,i,a;let r=()=>dK(this,pN,pH).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)},p$=function(){var e,t;if(!/Firefox/i.test(navigator.userAgent))return;let i,a=new WeakMap,r=()=>this.streamType===t$.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,n=(e,t,i=!1)=>
3154{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(`
3155`).length,r=-3;this.streamType===t$.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(nn.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,dV(this,pM))};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(nn.USER_INACTIVE))||t;dV(this,pM)!==a&&(d$(this,pM,a),n(i,dV(this,pM)))})};var pX=e=>{throw TypeError(e)},pJ=(e,t,i)=>t.has(e)||pX("Cannot "+i),p0=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("undefined"==typeof DocumentFragment){class e extends p0{}globalThis.DocumentFragment=e}var p1,p2=class extends p0{},p3=class{constructor(e,t={}){((e,t,i)=>t.has(e)?pX("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i))(this,p1),((e,t,i,a)=>(pJ(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,p1,null==t?void 0:t.detail)}get detail(){let e,t;return pJ(this,e=p1,"read from private field"),t?t.call(this):e.get(this)}initCustomEvent(){}};p1=new WeakMap;var p4={document:{createElement:function(e,t){return new p2}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(p2)},CustomEvent:p3,EventTarget:p0,HTMLElement:p2,HTMLVideoElement:class extends p0{}},p5="undefined"==typeof window||void 0===globalThis.customElements,p9=p5?p4:globalThis;p5?p4.document:globalThis.document,p9.customElements.get("mux-player")||(p9.customElements.define("mux-player",pZ),p9.MuxPlayerElement=pZ);var p8=parseInt(s.version)>=19,p6={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},p7=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{ref:t,...i}=e;return Object.entries(i).reduce((e,t)=>{let[i,a]=t,r=((e,t)=>{if(!(!p8&&"boolean"==typeof t&&!t)){let i,a;if(i=e,null!=(a=p6)&&i in a)return p6[e];if(void 0!==t)return/[A-Z]/.test(e)?e.replace(/[A-Z]/g,e=>"-".concat(e.toLowerCase())):e}})(i,a);if(!r)return e;let n=p8||"boolean"!=typeof a?a:"";return e[r]=n,e},{})};function ve(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}var vt=Object.prototype.hasOwnProperty,vi=(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(!vt.call(t,i[a])||!Object.is(e[i[a]],t[i[a]]))return!1;return!0})(t,e[i]),va=(e,t,i)=>{e[i]=t},vr=function(e,t,i){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:va,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:vi;return(0,s.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])},vn=(()=>{try{return"3.8.0"}catch(e){}return"UNKNOWN"})(),vs=(e,t,i)=>(0,s.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,e]),vo=s.forwardRef((e,t)=>{let{children:i,...a}=e;return s.createElement("mux-player",{suppressHydrationWarning:!0,...p7(a),ref:t},i)}),vl=vn,vd="mux-player-react",vu=s.forwardRef((e,t)=>{var i;let a=(0,s.useRef)(null),r=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return s.useCallback(function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return e=>{let i=!1,a=t.map(t=>{let a=ve(t,e);return i||"function"!=typeof a||(i=!0),a});if(i)return()=>{for(let e=0;e<a.length;e++){let i=a[e];"function"==typeof i?i():ve(t[e],null)}}}}(...t),t)}(a,t),[n]=((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:p,onWaiting:v,onPlay:E,onPlaying:b,onTimeUpdate:g,onPause:f,onSeeking:_,onSeeked:y,onStalled:T,onSuspend:A,onEnded:k,onError:w,onCuePointChange:S,onChapterChange:I,metadata:R,tokens:D,paused:C,playbackId:L,playbackRates:M,currentTime:O,themeProps:x,extraSourceParams:N,castCustomData:P,_hlsConfig:U,...B}=t;return vr("tokens",D,e),vr("playbackId",L,e),vr("playbackRates",M,e),vr("metadata",R,e),vr("extraSourceParams",N,e),vr("_hlsConfig",U,e),vr("themeProps",x,e),vr("castCustomData",P,e),vr("paused",C,e,(e,t)=>{null!=t&&(t?e.pause():e.play())},(e,t,i)=>(!e.hasAttribute("autoplay")||!!e.hasPlayed)&&vi(e,t,i)),vr("currentTime",O,e,(e,t)=>{null!=t&&(e.currentTime=t)}),vs("abort",e,i),vs("canplay",e,a),vs("canplaythrough",e,r),vs("emptied",e,n),vs("loadstart",e,s),vs("loadeddata",e,o),vs("loadedmetadata",e,l),vs("progress",e,d),vs("durationchange",e,u),vs("volumechange",e,c),vs("ratechange",e,h),vs("resize",e,p),vs("waiting",e,v),vs("play",e,E),vs("playing",e,b),vs("timeupdate",e,g),vs("pause",e,f),vs("seeking",e,_),vs("seeked",e,y),vs("stalled",e,T),vs("suspend",e,A),vs("ended",e,k),vs("error",e,w),vs("cuepointchange",e,S),vs("chapterchange",e,I),[B]}
3155)(a,e),[o]=(0,s.useState)(null!=(i=e.playerInitTime)?i:iG());return s.createElement(vo,{ref:r,defaultHiddenCaptions:e.defaultHiddenCaptions,playerSoftwareName:vd,playerSoftwareVersion:vl,playerInitTime:o,...n})})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.