1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1f2afa8a-4fc6-488f-a9b8-570bfc243bad",e._sentryDebugIdIdentifier="sentry-dbid-1f2afa8a-4fc6-488f-a9b8-570bfc243bad")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4651,9733],{11976:(e,t,i)=>{i.d(t,{A:()=>a});let a=(0,i(62384).A)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},24832:(e,t,i)=>{i.d(t,{A:()=>a});let a=(0,i(62384).A)("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]])},28085:(e,t,i)=>{i.d(t,{A:()=>a});let a=(0,i(62384).A)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},33495:(e,t,i)=>{i.d(t,{A:()=>a});let a=(0,i(62384).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},36870:(e,t,i)=>{i.d(t,{N:()=>f});var a=i(80769),r=i(88101),n=i(34778),s=i(84950),o=i(93568),l=i(55836),d=i(448),u=i(87997);function c(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class h extends r.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if((0,d.s)(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,i=(0,d.s)(e)&&e.offsetWidth||0,a=(0,d.s)(e)&&e.offsetHeight||0,r=getComputedStyle(t),n=this.props.sizeRef.current;n.height=parseFloat(r.height),n.width=parseFloat(r.width),n.top=t.offsetTop,n.left=t.offsetLeft,n.right=i-n.width-n.left,n.bottom=a-n.height-n.top}return null}componentDidUpdate(){}render(){return this.props.children}}function m(e){var t,i;let{children:n,isPresent:s,anchorX:o,anchorY:l,root:d,pop:m}=e,p=(0,r.useId)(),v=(0,r.useRef)(null),E=(0,r.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:b}=(0,r.useContext)(u.Q),g=function(...e){return r.useCallback(function(...e){return t=>{let i=!1,a=e.map(e=>{let a=c(e,t);return i||"function"!=typeof a||(i=!0),a});if(i)return()=>{for(let t=0;t<a.length;t++){let i=a[t];"function"==typeof i?i():c(e[t],null)}}}}(...e),e)}(v,null!=(i=null==(t=n.props)?void 0:t.ref)?i:null==n?void 0:n.ref);return(0,r.useInsertionEffect)(()=>{let{width:e,height:t,top:i,left:a,right:r,bottom:n}=E.current;if(s||!1===m||!v.current||!e||!t)return;v.current.dataset.motionPopId=p;let u=document.createElement("style");b&&(u.nonce=b);let c=null!=d?d:document.head;return c.appendChild(u),u.sheet&&u.sheet.insertRule('\n [data-motion-pop-id="'.concat(p,'"] {\n position: absolute !important;\n width: ').concat(e,"px !important;\n height: ").concat(t,"px !important;\n ").concat("left"===o?"left: ".concat(a):"right: ".concat(r),"px !important;\n ").concat("bottom"===l?"bottom: ".concat(n):"top: ".concat(i),"px !important;\n }\n ")),()=>{var e;null==(e=v.current)||e.removeAttribute("data-motion-pop-id"),c.contains(u)&&c.removeChild(u)}},[s]),(0,a.jsx)(h,{isPresent:s,childRef:v,sizeRef:E,pop:m,children:!1===m?n:r.cloneElement(n,{ref:g})})}let p=e=>{let{children:t,initial:i,isPresent:n,onExitComplete:o,custom:d,presenceAffectsLayout:u,mode:c,anchorX:h,anchorY:p,root:E}=e,b=(0,s.M)(v),g=(0,r.useId)(),f=!0,y=(0,r.useMemo)(()=>(f=!1,{id:g,initial:i,isPresent:n,custom:d,onExitComplete:e=>{for(let t of(b.set(e,!0),b.values()))if(!t)return;o&&o()},register:e=>(b.set(e,!1),()=>b.delete(e))}),[n,b,o]);return u&&f&&(y={...y}),(0,r.useMemo)(()=>{b.forEach((e,t)=>b.set(t,!1))},[n]),r.useEffect(()=>{n||b.size||!o||o()},[n]),t=(0,a.jsx)(m,{pop:"popLayout"===c,isPresent:n,anchorX:h,anchorY:p,root:E,children:t}),(0,a.jsx)(l.t.Provider,{value:y,children:t})};function v(){return new Map}var E=i(81051);let b=e=>e.key||"";function g(e){let t=[];
1return r.Children.forEach(e,e=>{(0,r.isValidElement)(e)&&t.push(e)}),t}let f=e=>{let{children:t,custom:i,initial:l=!0,onExitComplete:d,presenceAffectsLayout:u=!0,mode:c="sync",propagate:h=!1,anchorX:m="left",anchorY:v="top",root:f}=e,[y,T]=(0,E.xQ)(h),A=(0,r.useMemo)(()=>g(t),[t]),k=h&&!y?[]:A.map(b),w=(0,r.useRef)(!0),R=(0,r.useRef)(A),S=(0,s.M)(()=>new Map),I=(0,r.useRef)(new Set),[C,L]=(0,r.useState)(A),[D,M]=(0,r.useState)(A);(0,o.E)(()=>{w.current=!1,R.current=A;for(let e=0;e<D.length;e++){let t=b(D[e]);k.includes(t)?(S.delete(t),I.current.delete(t)):!0!==S.get(t)&&S.set(t,!1)}},[D,k.length,k.join("-")]);let O=[];if(A!==C){let e=[...A];for(let t=0;t<D.length;t++){let i=D[t],a=b(i);k.includes(a)||(e.splice(t,0,i),O.push(i))}return"wait"===c&&O.length&&(e=O),M(g(e)),L(A),null}let{forceRender:x}=(0,r.useContext)(n.L);return(0,a.jsx)(a.Fragment,{children:D.map(e=>{let t=b(e),r=(!h||!!y)&&(A===D||k.includes(t));return(0,a.jsx)(p,{isPresent:r,initial:(!w.current||!!l)&&void 0,custom:i,presenceAffectsLayout:u,mode:c,root:f,onExitComplete:r?void 0:()=>{if(I.current.has(t)||!S.has(t))return;I.current.add(t),S.set(t,!0);let e=!0;S.forEach(t=>{t||(e=!1)}),e&&(null==x||x(),M(R.current),h&&(null==T||T()),d&&d())},anchorX:m,anchorY:v,children:e},t)})})}},46730:(e,t,i)=>{let a,r,n;i.d(t,{Ay:()=>Ep});var s=i(88101),o=Object.create,l=Object.defineProperty,d=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,c=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,m=function(e,t){return function(){return e&&(t=e(e=0)),t}},p=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},v=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},E=function(e,t,i){return i=null!=e?o(c(e)):{},v(!t&&e&&e.__esModule?i:l(i,"default",{value:e,enumerable:!0}),e)},b=p(function(e,t){t.exports="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}});function g(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):g(e,t)}var f=m(function(){f()});function y(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var T=m(function(){}),A=p(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=p(function(e,t){function i(e,t){if(!g(this,i))return new i(e,t);this.data=e,this.nodeValue=e,this.length=e.length,this.ownerDocument=t||null}f(),t.exports=i,i.prototype.nodeType=8,i.prototype.nodeName="#comment",i.prototype.toString=function(){return"[object Comment]"}}),w=p(function(e,t){function i(e,t){if(!g(this,i))return new i(e);this.data=e||"",this.length=this.data.length,this.ownerDocument=t||null}f(),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}}),R=p(function(e,t){t.exports=function(e){var t=this,i=e.type;e.target||(e.target=t),t.listeners||(t.listeners={});var a=t.listeners[i];if(a)return a.forEach(function(i){e.currentTarget=t,"function"==typeof i?i(e):i.handleEvent(e)});t.parentNode&&t.parentNode.dispatchEvent(e)}}),S=p(function(e,t){t.exports=function(e,t){this.listeners||(this.listeners={}),this.listeners[e]||(this.listeners[e]=[]),-1===this.listeners[e].indexOf(t)&&this.listeners[e].push(t)}}),I=p(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)}}}),C=p(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}
1)(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,""")+'"')}),t.length?" "+t.join(" "):""}function r(e){var t="";return"string"==typeof e?t=e:e&&(t=e.toString()),t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}}),L=p(function(e,t){f();var i=A(),a=R(),r=S(),n=I(),s=C(),o="http://www.w3.org/1999/xhtml";function l(e,t,i){if(!g(this,l))return new l(e);var a=void 0===i?o:i||null;this.tagName=a===o?String(e).toUpperCase():e,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=t||null,this.namespaceURI=a,this._attributes={},"INPUT"===this.tagName&&(this.type="text")}t.exports=l,l.prototype.type="DOMElement",l.prototype.nodeType=1,l.prototype.appendChild=function(e){return e.parentNode&&e.parentNode.removeChild(e),this.childNodes.push(e),e.parentNode=this,e},l.prototype.replaceChild=function(e,t){e.parentNode&&e.parentNode.removeChild(e);var i=this.childNodes.indexOf(t);return t.parentNode=null,this.childNodes[i]=e,e.parentNode=this,t},l.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);return this.childNodes.splice(t,1),e.parentNode=null,e},l.prototype.insertBefore=function(e,t){e.parentNode&&e.parentNode.removeChild(e);var i=null==t?-1:this.childNodes.indexOf(t);return i>-1?this.childNodes.splice(i,0,e):this.childNodes.push(e),e.parentNode=this,e},l.prototype.setAttributeNS=function(e,t,i){var a=null,r=t,n=t.indexOf(":");(n>-1&&(a=t.substr(0,n),r=t.substr(n+1)),"INPUT"===this.tagName&&"type"===t)?this.type=i:(this._attributes[e]||(this._attributes[e]={}))[r]={value:i,prefix:a}},l.prototype.getAttributeNS=function(e,t){var i=this._attributes[e],a=i&&i[t]&&i[t].value;return"INPUT"===this.tagName&&"type"===t?this.type:"string"!=typeof a?null:a},l.prototype.removeAttributeNS=function(e,t){var i=this._attributes[e];i&&delete i[t]},l.prototype.hasAttributeNS=function(e,t){var i=this._attributes[e];return!!i&&t in i},l.prototype.setAttribute=function(e,t){return this.setAttributeNS(null,e,t)},l.prototype.getAttribute=function(e){return this.getAttributeNS(null,e)},l.prototype.removeAttribute=function(e){return this.removeAttributeNS(null,e)},l.prototype.hasAttribute=function(e){return this.hasAttributeNS(null,e)},l.prototype.removeEventListener=n,l.prototype.addEventListener=r,l.prototype.dispatchEvent=a,l.prototype.focus=function(){},l.prototype.toString=function(){return s(this)},l.prototype.getElementsByClassName=function(e){var t=e.split(" "),a=[];return i(this,function(e){if(1===e.nodeType){var i=(e.className||"").split(" ");t.every(function(e){return -1!==i.indexOf(e)})&&a.push(e)}}),a},l.prototype.getElementsByTagName=function(e){e=e.toLowerCase();var t=[];return i(this.childNodes,function(i){1===i.nodeType&&("*"===e||i.tagName.toLowerCase()===e)&&t.push(i)}),t},l.prototype.contains=function(e){return i(this,function(t){return e===t})||!1}}),D=p(function(e,t){f();var i=L();function a(e){if(!g(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=p(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=p(function(e,t){f();var i=A(),a=k(),r=w(),n=L(),s=D(),o=M(),l=R(),d=S(),u=I();function c(){if(!g(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=p(function(e,t){t.exports=new(O())}),N=p(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 W(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 B=E(b()),H=E(b()),F=E(b()),V={now:function(){var e=F.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())}},K=function(){if("function"==typeof(null==(e=H.default.crypto)?void 0:e.getRandomValues)){i=new Uint8Array(32),H.default.crypto.getRandomValues(i);for(var e,t,i,a=0;a<32;a++)i[a]=i[a]%16}else{i=[];for(var r=0;r<32;r++)i[r]=16*Math.random()|0}var n=0;t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t="x"===e?i[n]:3&i[n]|8;return n++,t.toString(16)});var s=V.now(),o=null==s?void 0:s.toString(16).substring(3);return o?t.substring(0,28)+o:t},$=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=$()),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},z=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)),m=s;return{trace:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>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(!(m>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(!(m>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(!(m>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(!(m>j.ERROR))return h.apply(void 0,G(t))},get level(){return m},set level(_){_!==this.level&&(m=null!=_?_:s)}}}("[mux]"),Q=E(b());function Z(){return"1"===(Q.default.doNotTrack||Q.default.navigator&&Q.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(!g(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)}f(),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=E(b()),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,m=c.requestStart,p=c.responseStart,v=c.responseEnd;o("requestcompleted",eh(ec({},eb(l)),{request_event_type:e,request_bytes_loaded:h,request_start:m,request_response_start:p,request_response_end:v,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,m=i.fragments[i.fragments.length-1],p=s(m)+n(m.duration);o("requestcompleted",{request_event_type:e,request_bytes_loaded:d,request_start:u,request_response_start:c,request_response_end:h,request_current_level:a,request_type:"manifest",request_hostname: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(p)?void 0:p})};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,m={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?(m.request_type="media",m.request_current_level=n.level,m.request_video_width=(i.levels[n.level]||{}).width,m.request_video_height=(i.levels[n.level]||{}).height,m.request_labeled_bitrate=(i.levels[n.level]||{}).bitrate):m.request_type=n.type,o("requestcompleted",m)};i.on(a.Events.FRAG_LOADED,c);var h=function(e,t){var i=t.frag,a=i.start;o("fragmentchange",{currentFragmentPDT:s(i),currentFragmentStart:n(a)})};i.on(a.Events.FRAG_CHANGED,h);var m=function(e,t){var i,r=t.type,n=t.details,s=t.response,l=t.fatal,d=t.frag,u=t.networkDetails,c=(null==d?void 0:d.url)||t.url||"",h=u?ef(u):void 0;(n===a.ErrorDetails.MANIFEST_LOAD_ERROR||n===a.ErrorDetails.MANIFEST_LOAD_TIMEOUT||n===a.ErrorDetails.FRAG_LOAD_ERROR||n===a.ErrorDetails.FRAG_LOAD_TIMEOUT||n===a.ErrorDetails.LEVEL_LOAD_ERROR||n===a.ErrorDetails.LEVEL_LOAD_TIMEOUT||n===a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||n===a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT||n===a.ErrorDetails.SUBTITLE_LOAD_ERROR||n===a.ErrorDetails.SUBTITLE_LOAD_TIMEOUT||n===a.ErrorDetails.KEY_LOAD_ERROR||n===a.ErrorDetails.KEY_LOAD_TIMEOUT)&&o("requestfailed",{request_error:n,request_url:c,request_hostname: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,m);var p=function(e,t){var i=t.frag,a=i&&i._url||"";o("requestcanceled",{request_event_type:e,request_url:a,request_type:"media",request_hostname:es(a)})};i.on(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,p);var v=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,v),i._stopMuxMonitor=function(){i.off(a.Events.MANIFEST_LOADED,l),i.off(a.Events.LEVEL_LOADED,d),i.off(a.Events.AUDIO_TRACK_LOADED,u),i.off(a.Events.FRAG_LOADED,c),i.off(a.Events.FRAG_CHANGED,h),i.off(a.Events.ERROR,m),i.off(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,p),i.off(a.Events.LEVEL_SWITCHED,v),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){if("function"==typeof t.getCurrentRepresentationForType){var i=t.getCurrentRepresentationForType(e);return i?{currentLevel:i.absoluteIndex,renditionWidth:i.width||null,renditionHeight:i.height||null,renditionBitrate:i.bandwidth}:{}}var a=t.getQualityFor(e),r=t.getCurrentTrackFor(e).bitrateList;return r?{currentLevel:a,renditionWidth:r[a].width||null,renditionHeight:r[a].height||null,renditionBitrate:r[a].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}},eR=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,m=c.requestResponseStart,p=c.requestResponseEnd,v=c.requestResponseHeaders,E=c.requestMediaDuration,b=c.requestHostname,g=c.requestUrl;n("requestcompleted",{request_event_type:t,request_start:h,request_response_start:m,request_response_end:p,request_bytes_loaded:-1,request_type:l+"_init",request_response_headers:v,request_hostname:b,request_id:c.requestId,request_url:g,request_media_duration:E,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,m=u.requestResponseEnd,p=u.requestBytesLoaded,v=u.requestResponseHeaders,E=u.requestMediaDuration,b=u.requestHostname,g=u.requestUrl,f=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:m,request_bytes_loaded:p,request_type:d,request_response_headers:v,request_hostname:b,request_id:f,request_url:g,request_media_start_time:l,request_media_duration:E,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)}}},m=function(e,t,r){var s=e.mediaType;if("audio"===s||"video"===s){if("function"==typeof i.getRepresentationsByType)if(e.newRepresentation)o={bitrate:e.newRepresentation.bandwidth,width:e.newRepresentation.width,height:e.newRepresentation.height,qualityIndex:e.newRepresentation.absoluteIndex};else{var o,l=i.getRepresentationsByType(s);if(l&&"number"==typeof e.newQuality){var d=l.find(function(t){return t.absoluteIndex===e.newQuality||t.index===e.newQuality});d&&(o={bitrate:d.bandwidth,width:d.width,height:d.height,qualityIndex:e.newQuality})}}else{if("number"!=typeof e.newQuality)return void a.warn("missing evt.newQuality in qualityChangeRendered event",e);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 u=h();u&&n("renditionchange",u)}};i.on("qualityChangeRendered",m);var p=function(e){var t=e.request,i=e.mediaType;n("requestcanceled",{request_event_type:(t=t||{}).type+"_"+t.action,request_url:t.url,request_type:i,request_hostname:es(t.url)})};i.on("fragmentLoadingAbandoned",p);var v=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",v),i._stopMuxMonitor=function(){i.off("manifestLoaded",s),i.off("initFragmentLoaded",d),i.off("mediaFragmentLoaded",u),i.off("qualityChangeRendered",m),i.off("error",v),i.off("fragmentLoadingAbandoned",p),delete i._stopMuxMonitor}},eS=function(e){e&&"function"==typeof e._stopMuxMonitor&&e._stopMuxMonitor()},eI=0,eC=function(){"use strict";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||++eI,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],i&&(t=t.bind(i)),this._listeners[e].push(t),t}},{key:"off",value:function(e,t){var i=this._listeners&&this._listeners[e];
1i&&i.forEach(function(e,a){e._eventEmitterGuid===t._eventEmitterGuid&&i.splice(a,1)})}},{key:"one",value:function(e,t,i){var a=this;t._eventEmitterGuid=t._eventEmitterGuid||++eI;var r=function(){a.off(e,r),t.apply(i||this,arguments)};r._eventEmitterGuid=t._eventEmitterGuid,this.on(e,r)}},{key:"emit",value:function(e,t){var i=this;if(this._listeners){t=t||{};var a=this._listeners["before"+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}(),eL=E(b()),eD=function(){"use strict";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&&(eL.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=eL.default.setInterval(function(){e.pm.emit("playbackheartbeat")},this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,null!==this._playbackHeartbeatInterval&&(eL.default.clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}]),e}(),eM=function e(t){"use strict";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(){"use strict";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(){"use strict";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=V.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);var r=function(){i.pm.data.player_is_paused||a()};t.on("seeked",r),t.on("rebufferend",r);var n=this._stopPlaybackTimeTracking.bind(this);t.on("playbackheartbeatend",n),t.on("seeking",n),t.on("rebufferstart",n),t.on("adplaying",function(){i._isAdPlaying=!0}),t.on("adended",function(){i._isAdPlaying=!1}),t.on("adpause",function(){i._isAdPlaying=!1}),t.on("adbreakstart",function(){i._isAdPlaying=!1}),t.on("adbreakend",function(){i._isAdPlaying=!1}),t.on("adplay",function(){i._isAdPlaying=!1}),t.on("viewinit",function(){i._playbackTimeTrackerLastPlayheadPosition=-1,i._lastTime=V.now(),i._isAdPlaying=!1,i._callbackUpdatePlaybackTime=null})}return 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=V.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=V.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(){"use strict";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){"use strict";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(){"use strict";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:V.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}(),eW=function(){"use strict";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||V.now(),a):"adplaying"===e.type&&(void 0===t.data.view_time_to_first_frame||i._inPrerollPosition())&&i.calculateTimeToFirstFrame(n||V.now(),a)};t.one("playing",r),t.one("adplaying",r),t.one("viewend",function(){t.off("playing",r),t.off("adplaying",r)})}})}return 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}(),eB=function e(t){"use strict";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})})},eH=function e(t){"use strict";var i=this;J(this,e),ei(this,"isSeeking",void 0),this.isSeeking=!1;var a=-1,r=function(){var e=V.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})},eF=function(e,t){e.push(t),e.sort(function(e,t){return e.viewer_time-t.viewer_time})},eV=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],eK=function(){"use strict";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}
1),eV.forEach(function(e){return t.on(e,i._updateAdData.bind(i))});var a=function(){i.isAdBreak=!1};t.on("adbreakstart",function(){i.isAdBreak=!0}),t.on("play",a),t.on("playing",a),t.on("viewend",a),t.on("adrequest",function(e,a){a=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdRequestNumber++},a),eF(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),eF(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._wouldBeNewAdPlay=!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=W(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=W(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}(),e$=function e(t){"use strict";var i=this;J(this,e),ei(this,"lastWallClockTime",void 0);var a=function(){i.lastWallClockTime=V.now(),t.on("before*",r)},r=function(e){var a=V.now(),r=i.lastWallClockTime;i.lastWallClockTime=a,a-r>3e4&&(t.emit("devicesleep",{viewer_time:r}),Object.assign(t.data,{viewer_time:r}),t.send("devicesleep"),t.emit("devicewake",{viewer_time:a}),Object.assign(t.data,{viewer_time:a}),t.send("devicewake"))};t.one("playbackheartbeat",a),t.on("playbackheartbeatend",function(){t.off("before*",r),t.one("playbackheartbeat",a)})},eq=E(b()),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,decode
1URIComponent)).replace(/[\(\)]/g,escape),document.cookie=t+"="+r+(n.expires?"; expires="+n.expires.toUTCString():"")+(n.path?"; path="+n.path:"")+(n.domain?"; domain="+n.domain:"")+(n.secure?"; secure":"")}t||(s={});for(var l=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u<l.length;u++){var c=l[u].split("="),h=c.slice(1).join("=");'"'===h.charAt(0)&&(h=h.slice(1,-1));try{var m=c[0].replace(d,decodeURIComponent);if(h=i.read?i.read(h,m):i(h,m)||h.replace(d,decodeURIComponent),this.json)try{h=JSON.parse(h)}catch(e){}if(t===m){s=h;break}t||(s[m]=h)}catch(e){}}return s}}return a.set=a,a.get=function(e){return a.call(a,e)},a.getJSON=function(){return a.apply({json:!0},[].slice.call(arguments))},a.defaults={},a.remove=function(t,i){a(t,"",e(i,{expires:-1}))},a.withConverter=t,a}(function(){})}(),eG="muxData",ej=function(){var e;try{e=(eY.get(eG)||"").split("&").reduce(function(e,t){var i=W(t.split("="),2),a=i[0],r=i[1],n=+r;return e[a]=r&&n==r?n:r,e},{})}catch(t){e={}}return e},ez=function(e){try{eY.set(eG,Object.entries(e).map(function(e){var t=W(e,2),i=t[0],a=t[1];return"".concat(i,"=").concat(a)}).join("&"),{expires:365})}catch(e){}},eQ=function(){var e=ej();return e.mux_viewer_id=e.mux_viewer_id||K(),e.msn=e.msn||Math.random(),ez(e),{mux_viewer_id:e.mux_viewer_id,mux_sample_number:e.msn}},eZ=function(){var e=ej(),t=V.now();return e.session_start&&(e.sst=e.session_start,delete e.session_start),e.session_id&&(e.sid=e.session_id,delete e.session_id),e.session_expires&&(e.sex=e.session_expires,delete e.session_expires),(!e.sex||e.sex<t)&&(e.sid=K(),e.sst=t),e.sex=t+15e5,ez(e),{session_id:e.sid,session_start:e.sst,session_expires:e.sex}},eX=e0({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"}),eJ=e0({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:"connection",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",lw:"low",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 e0(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[e[i]]=i);return t}function e1(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=eX[s];o||(z.info("Data key word `"+n[0]+"` not expected in "+a),o=s+"_"),n.splice(1).forEac
1h(function(e){"url"===e&&(r=!0),eJ[e]?o+=eJ[e]:Number.isInteger(Number(e))?o+=e:(z.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 e2=E(b()),e3=E(N()),e4={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},e5=["hb","requestcompleted","requestfailed","requestcanceled"],e9=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({},e4,t)};e9.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)},e9.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()},e9.prototype.destroy=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.destroyed=!0,e?this._clearBeaconQueue():this.flushEvents(),e2.default.clearTimeout(this._sendTimeout)},e9.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],e1({mux_view_message:"event queue truncated"}));var i=this._createPayload(t);e6(this._beaconUrl,i,!0,function(){})},e9.prototype._sendBeaconQueue=function(){var e=this;if(this._postInFlight){this._resendAfterPost=!0;return}var t=this._eventQueue.slice(0,this._options.maxBeaconSize);this._eventQueue=this._eventQueue.slice(this._options.maxBeaconSize),this._postInFlight=!0;var i=this._createPayload(t),a=V.now();e6(this._beaconUrl,i,!1,function(i,r){r?(e._eventQueue=t.concat(e._eventQueue),e._failureCount+=1,z.info("Error sending beacon: "+r)):e._failureCount=0,e._roundTripTime=V.now()-a,e._postInFlight=!1,e._resendAfterPost&&(e._resendAfterPost=!1,e._eventQueue.length>0&&e._sendBeaconQueue())})},e9.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},e9.prototype._startBeaconSending=function(){var e=this;e2.default.clearTimeout(this._sendTimeout),this.destroyed||(this._sendTimeout=e2.default.setTimeout(function(){e._eventQueue.length&&e._sendBeaconQueue(),e._startBeaconSending()},this._getNextBeaconTime()))},e9.prototype._createPayload=function(e){var t=this,i={transmission_timestamp:Math.round(V.now())};this._roundTripTime&&(i.rtt_ms=Math.round(this._roundTripTime));var a,r,n,s=function(){n=(a=JSON.stringify({metadata:i,events:r||e})).length/1024},o=function(){return n<=t._options.maxPayloadKBSize};return s(),o()||(z.info("Payload size is too big ("+n+" kb). Removing unnecessary events."),r=e.filter(function(e){return -1===e5.indexOf(e.e)}),s()),o()||(z.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 e8="function"==typeof e3.default.exitPictureInPicture?function(e){return e.length<=57344}:function(e){return!1},e6=function(e,t,i,a){if(i&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(e,t))return void a();if(e2.default.fetch)return void e2.default.fetch(e,{method:"POST",body:t,headers:{"Content-Type":"text/plain"},keepalive:e8(t)}).then(function(e){return a(null,e.ok?null:"Error")}).catch(function(e){return a(null,e)});if(e2.default.XMLHttpRequest){var r=new e2.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()},e7=["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"],te=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],tt=["ad_id","ad_creative_id","ad_universal_id"],ti=["viewstart","error","ended","viewend"],ta=function(){"use strict";function e(t,i){var a,r,n,s,o,l,d,u,c,h,m,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 e9((a=this.envKey,n=(r=this.options).beaconCollectionDomain,s=r.beaconDomain,n?(/localhost(?::\d+)?$/.test(n)?"http://":"https://")+n:(a=a||"inferred").match(/^[a-z0-9]+$/)?"https://"+a+"."+(s||"litix.io"):"https://img.litix.io/a.gif")),this.sampleRate=null!=(f=this.options.sampleRate)?f:1,this.disableCookies=null!=(y=this.options.disableCookies)&&y,this.respectDoNotTrack=null!=(T=this.options.respectDoNotTrack)&&T,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.pageLevelData={mux_api_version:this.mux.API_VERSION,mux_embed:this.mux.NAME,mux_embed_version:this.mux.VERSION,viewer_application_name:null==(o=this.options.platform)?void 0:o.name,viewer_application_version:null==(l=this.options.platform)?void 0:l.version,viewer_application_engine:null==(d=this.options.platform)?void 0:d.layout,viewer_device_name:null==(u=this.options.platform)?void 0:u.product,viewer_device_category:"",viewer_device_manufacturer:null==(c=this.options.platform)?void 0:c.manufacturer,viewer_os_family:null==(m=this.options.platform)||null==(h=m.os)?void 0:h.family,viewer_os_architecture:null==(v=this.options.platform)||null==(p=v.os)?void 0:p.architecture,viewer_os_version:null==(b=this.options.platform)||null==(E=b.os)?void 0:E.version,page_url:null===eq.default||void 0===eq.default||null==(g=eq.default.location)?void 0:g.href},this.viewerData=this.disableCookies?{}:eQ()}return et(e,[{key:"send",value:function(e,t){if(!(!e||!(null!=t&&t.view_id))){if(this.respectDoNotTrack&&Z())return z.info("Not sending `"+e+"` because Do Not Track is enabled");if(!t||"object"!=typeof t)return z.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=e1(this._deduplicateBeaconData(e,a));if(this.lastEventTime=this.mux.utils.now(),n)return z.info("Not sending event due to sample rate restriction",e,a,s);if(this.envKey||z.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(z.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(ti.indexOf(e)>=0){if("error"===e&&"warning"===t.player_error_severity)return;this.eventQueue.flushEvents()}if(this.rateLimited)return a.event="eventrateexceeded",s=e1(a),this.eventQueue.queueEvent(a.event,s),z.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=W(t,2),s=r[0],o=r[1];i.previousBeaconData&&(o!==i.previousBeaconData[s]||e7.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_")||tt.includes(t)&&te.includes(e)||"playbackmodechange"===e&&0===t.indexOf("player_playback_mode"))}}]),e}(),tr=function e(t){"use strict";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,m=o.request_bytes_loaded;if(n++,c?(l=c-(null!=u?u:0),d=(null!=h?h:0)-c):d=(null!=h?h:0)-(null!=u?u:0),d>0&&m&&m>0){var p=m/d*8e3;s++,a+=m,r+=d,t.data.view_min_request_throughput=Math.min(t.data.view_min_request_throughput||1/0,p),t.data.view_average_request_throughput=a/r*8e3,t.data.view_request_count=n,l>0&&(i+=l,t.data.view_max_request_latency=Math.max(t.data.view_max_request_latency||0,l),t.data.view_average_request_latency=i/s)}}),t.on("requestfailed",function(e,i){n++,o++,t.data.view_request_count=n,t.data.view_request_failed_count=o}),t.on("requestcanceled",function(e,i){n++,l++,t.data.view_request_count=n,t.data.view_request_canceled_count=l})},tn=function e(t){"use strict";var i=this;J(this,e),ei(this,"_lastEventTime",void 0),t.on("before*",function(e,a){var r=a.viewer_time,n=V.now(),s=i._lastEventTime;if(i._lastEventTime=n,s&&n-s>36e5){var o=Object.keys(t.data).reduce(function(e,i){return 0===i.indexOf("video_")?Object.assign(e,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 ts(e,t){return(null==e?void 0:e.toLowerCase())===(null==t?void 0:t.toLowerCase())}var to=function e(t){"use strict";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&&!ts(o,n)&&s<=l&&(n=o,s=l,t.emit("cdnchange",{video_cdn:o}))}
1,a=null,r=null,n=null,s=0;t.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)&&(ts(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)})},tl=function(e){try{return JSON.parse(e),!0}catch(e){return!1}},td=function e(t){"use strict";var i=this;J(this,e),ei(this,"_emittingAutomaticEvent",!1),ei(this,"_hasInitialized",!1),ei(this,"_currentMode","standard"),t.on("viewstart",function(){i._hasInitialized||(i._hasInitialized=!0,i._currentMode=t.data.player_playback_mode||"standard",i._emittingAutomaticEvent=!0,t.emit("playbackmodechange",{player_playback_mode:i._currentMode,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?tl(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,i._currentMode=a.player_playback_mode)})},tu=function(){"use strict";function e(t){J(this,e),ei(this,"pm",void 0),ei(this,"_currentRangeStart",void 0),ei(this,"_lastPlayheadTime",void 0),this.pm=t,this._currentRangeStart=null,this._lastPlayheadTime=null,t.on("playbackheartbeat",this._updatePlaybackRange.bind(this)),t.on("playbackheartbeatend",this._endPlaybackRange.bind(this))}return et(e,[{key:"_updateLastRangeEnd",value:function(){var e=this.pm.data.video_playback_ranges;if(e&&e.length>0){var t=this.pm.data.player_playhead_time||0;e[e.length-1][1]=t}}},{key:"_updatePlaybackRange",value:function(){var e,t=this.pm.data.player_playhead_time||0;if(!(!this.pm.disableAdPlaybackRangeFiltering&&null!=(e=this.pm.adTracker)&&e.isAdBreak&&null!==this._lastPlayheadTime&&t<this._lastPlayheadTime)){if(null!==this._lastPlayheadTime&&null!==this._currentRangeStart&&Math.abs(t-this._lastPlayheadTime)>1e3){var i=this.pm.data.video_playback_ranges;i&&i.length>0&&(i[i.length-1][1]=this._lastPlayheadTime),this._currentRangeStart=null}if(null===this._currentRangeStart){var a=this.pm.data.video_playback_ranges||[];a.length>0&&a[a.length-1][1]===t?this._currentRangeStart=a[a.length-1][0]:(this._currentRangeStart=t,a.push([t,t])),this.pm.data.video_playback_ranges=a}else this._updateLastRangeEnd();this._lastPlayheadTime=t}}},{key:"_endPlaybackRange",value:function(){null!==this._currentRangeStart&&(this._updateLastRangeEnd(),this._currentRangeStart=null,this._lastPlayheadTime=null)}}]),e}(),tc=Object.freeze({CELLULAR:"cellular",WIFI:"wifi",WIRED:"wired",OTHER:"other",NO_CONNECTION:"no_connection",UNKNOWN:"unknown"}),th=function(e){if(!e)return tc.UNKNOWN;switch(e){case"cellular":case"wimax":return tc.CELLULAR;case"wifi":return tc.WIFI;case"ethernet":return tc.WIRED;case"none":return tc.NO_CONNECTION;case"bluetooth":case"other":default:return tc.OTHER;case"unknown":return tc.UNKNOWN}},tm=E(b()),tp=function(){"use strict";function e(t){var i=this;J(this,e),ei(this,"pm",void 0),ei(this,"lastType",void 0),ei(this,"lastLowDataMode",void 0),this.pm=t,this.pm.one("viewinit",function(){var t,a=i.emit.bind(i);a(),tm.default.addEventListener("online",a),tm.default.addEventListener("offline",a),null==(t=e.connection)||t.addEventListener("change",a),i.pm.on("destroy",function(){var t;null==(t=e.connection)||t.removeEventListener("change",a),tm.default.removeEventListener("online",a),tm.default.removeEventListener("offline",a)})})}return et(e,[{key:"type",get:function(){var t,i;return(null==(t=tm.default.navigator)?void 0:t.onLine)===!1?tc.NO_CONNECTION:null!=(i=e.connection)&&i.type?th(e.connection.type):tc.UNKNOWN}},{key:"lowDataMode",get:function(){var t;return null==(t=e.connection)?void 0:t.saveData}},{key:"emit",value:function(){var e=this.type,t=this.lowDataMode;e===this.lastType&&t===this.lastLowDataMode||(this.lastType=e,this.lastLowDataMode=t,this.pm.emit("networkchange",ec({viewer_connection_type:e},void 0!==t&&{viewer_connection_low_data_mode:t})))}}
1],[{key:"connection",get:function(){var e;return"object"==typeof(e=tm.default.navigator)&&"connection"in e&&"object"==typeof e.connection?tm.default.navigator.connection:null}}]),e}(),tv=["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","networkchange","cdnchange","playbackmodechange"],tE=new Set(["requestcompleted","requestfailed","requestcanceled"]),tb=function(e){"use strict";if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(e&&e.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),e&&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),"disableAdPlaybackRangeFiltering",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,disableAdPlaybackRangeFiltering:!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),z.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.disableAdPlaybackRangeFiltering=r.disableAdPlaybackRangeFiltering,n.errorTranslator=r.errorTranslator,n.emitTranslator=r.emitTranslator,n.stateDataTranslator=r.stateDataTranslator,n.playbackEventDispatcher=new ta(e,r.data.env_key,r),n.data={player_instance_id:K(),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"),this.emit("renditionchange"))}).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)}),tv.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 tn(X(n)),n.errorTracker=new eM(X(n)),new e$(X(n)),n.seekingTracker=new eH(X(n)),n.playheadTime=new eN(X(n)),n.playbackHeartbeat=new eD(X(n)),new eB(X(n)),n.watchTimeTracker=new eO(X(n)),new ex(X(n)),new tu(X(n)),n.adTracker=new eK(X(n)),new eU(X(n)),new eP(X(n)),new eW(X(n)),new tr(X(n)),new to(X(n)),new td(X(n)),new tp(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=W(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,t.video_playback_ranges&&(t.video_playback_range=JSON.stringify(t.video_playback_ranges.filter(function(e){return e[0]!==e[1]}).map(function(e){return"".concat(e[0],":").concat(e[1])})),delete t.video_playback_ranges),this.playbackEventDispatcher.send(e,t),this.data.view_sequence_number++,this.data.player_sequence_number++,tE.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=K(),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,eR(this.mux,this.id,e.dashjs)):void this.mux.log.warn("You must pass a valid dashjs instance in order to track it.")}},{key:"removeDashJS",value:function(){this.dashjs&&(eS(this.dashjs),this.dashjs=void 0)}}]),a}(eC),tg=E(N());function tf(){return tg.default&&!!(tg.default.fullscreenElement||tg.default.webkitFullscreenElement||tg.default.mozFullScreenElement||tg.default.msFullscreenElement)}var t_,ty=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],tT={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},tA=E(b());tA.default&&tA.default.WeakMap&&(t_=new WeakMap);var tk={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"},tw=function(e){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(e),this.manifest};tw.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)},tw.prototype.processLine=function(e){var t=e.indexOf(":"),i=tM(e,t),a=i[0],r=2===i.length?tI(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 tk.TARGET_DURATION:if(!isFinite(r)||r<0)return;this.manifest.targetDuration=r,this.setHoldBack();break;case tk.PART_INF:tR(this.manifest,i),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break;case tk.SERVER_CONTROL:tR(this.manifest,i),this.setHoldBack();break;case tk.INF:0===r?this.currentUri.duration=.01:r>0&&(this.currentUri.duration=r);break;case tk.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 tk.VERSION:tR(this.manifest,i);break;case tk.SESSION_DATA:var s=eb(tO(i[1]));Object.assign(this.manifest.sessionData,s)}},tw.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 tR=function(e,t){var i,a=tS(t[0].replace("#EXT-X-",""));tD(t[1])?(i={},i=Object.assign(tL(t[1]),i)):i=tI(t[1]),e[a]=i},tS=function(e){return e.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},tI=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},tC=function(e){var t={},i=e.split("=");return i.length>1&&(t[tS(i[0])]=tI(i[1])),t},tL=function(e){for(var t=e.split(","),i={},a=0;t.length>a;a++)i=Object.assign(tC(t[a]),i);return i},tD=function(e){return e.indexOf("=")>-1},tM=function(e,t){return -1===t?[e]:[e.substring(0,t),e.substring(t+1)]},tO=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}}},tx={safeCall:function(e,t,i,a){var r=a;if(e&&"function"==typeof e[t])try{r=e[t].apply(e,i)}catch(e){z.info("safeCall error",e)}return r},safeIncrement:eu,getComputedStyle:function(e,t){var i;return e&&t&&tA.default&&"function"==typeof tA.default.getComputedStyle?(t_&&t_.has(e)&&(i=t_.get(e)),i||(i=tA.default.getComputedStyle(e,null),t_&&t_.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:tw,generateShortID:$,generateUUID:K,now:V.now,findMediaElement:Y},tN={},tP=function(e){var t=arguments;"string"==typeof e?tP.hasOwnProperty(e)?B.default.setTimeout(function(){t=Array.prototype.splice.call(t,1),tP[e].apply(null,t)},0):z.warn("`"+e+"` is an unknown task"):"function"==typeof e?B.default.setTimeout(function(){e(tP)},0):z.warn("`"+e+"` is invalid.")},tU={loaded:V.now(),NAME:"mux-embed",VERSION:"5.18.1",API_VERSION:"2.1",PLAYER_TRACKED:!1,monitor:function(e,t){return function(e,t,i){var a=W(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:tf(),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.fullscreenChangeListener&&(document.removeEventListener("fullscreenchange",r.mux.fullscreenChangeListener,!1),delete r.mux.fullscreenChangeListener),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=W(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.fullscreenChangeListener=r.mux.fullscreenChangeListener,delete r.mux.fullscreenChangeListener,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={},ty.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=tT[r.error.code]||r.error.message}e.emit(n,t,i)},r.addEventListener(t,r.mux.listeners[t],!1))}),r.mux.listeners.enterpictureinpicture=function(){e.emit(n,"playbackmodechange",{player_playback_mode:"pip",player_playback_mode_data:"{}"})},r.mux.listeners.leavepictureinpicture=function(){var t=tf()?"fullscreen":"standard";e.emit(n,"playbackmodechange",{player_playback_mode:t,player_playback_mode_data:"{}"})},r.addEventListener("enterpictureinpicture",r.mux.listeners.enterpictureinpicture,!1),r.addEventListener("leavepictureinpicture",r.mux.listeners.leavepictureinpicture,!1),r.mux.fullscreenChangeListener=function(){var t=tf(),i=document.fullscreenElement;if(t&&(i===r||null!=i&&i.contains(r)))e.emit(n,"playbackmodechange",{player_playback_mode:"fullscreen",player_playback_mode_data:"{}"});else if(!t){var a=document.pictureInPictureElement===r;e.emit(n,"playbackmodechange",{player_playback_mode:a?"pip":"standard",player_playback_mode_data:"{}"})}},document.addEventListener("fullscreenchange",r.mux.fullscreenChangeListener,!1)}(tP,e,t)},destroyMonitor:function(e){var t=W(Y(e),1)[0];t&&t.mux&&"function"==typeof t.mux.destroy?t.mux.destroy():z.error("A video element monitor for `"+e+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(e,t){var i=q(e);tN[i]?tN[i].addHLSJS(t):z.error("A monitor for `"+i+"` has not been initialized.")},addDashJS:function(e,t){var i=q(e);tN[i]?tN[i].addDashJS(t):z.error("A monitor for `"+i+"` has not been initialized.")},removeHLSJS:function(e){var t=q(e);tN[t]?tN[t].removeHLSJS():z.error("A monitor for `"+t+"` has not been initialized.")},removeDashJS:function(e){var t=q(e);tN[t]?tN[t].removeDashJS():z.error("A monitor for `"+t+"` has not been initialized.")},init:function(e,t){Z()&&t&&t.respectDoNotTrack&&z.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var i=q(e);tN[i]=new tb(tP,i,t)},emit:function(e,t,i){var a=q(e);tN[a]?(tN[a].emit(t,i),"destroy"===t&&delete tN[a]):z.error("A monitor for `"+a+"` has not been initialized.")},updateData:function(e,t){var i=q(e);tN[i]?tN[i].emit("hb",t):z.error("A monitor for `"+i+"` has not been initialized.")},setEmitTranslator:function(e,t){var i=q(e);tN[i]?tN[i].emitTranslator=t:z.error("A monitor for `"+i+"` has not been initialized.")},setStateDataTranslator:function(e,t){var i=q(e);tN[i]?tN[i].stateDataTranslator=t:z.error("A monitor for `"+i+"` has not been initialized.")},setGetPlayheadTime:function(e,t){var i=q(e);tN[i]?tN[i].getPlayheadTime=t:z.error("A monitor for `"+i+"` has not been initialized.")},checkDoNotTrack:Z,log:z,utils:tx,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",NETWORK_CHANGE:"networkchange",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(tP,tU),void 0!==B.default&&"function"==typeof B.default.addEventListener&&B.default.addEventListener("pagehide",function(e){e.persisted||(tP.WINDOW_UNLOADING=!0)},!1);var tW=i(55814),tB=tW.Ay,tH={VIDEO:"video",DRM:"drm"},tF={NETWORK_OFFLINE:2000002,NETWORK_RECONNECTING:2000003,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},tV=e=>e===tH.VIDEO?"playback":e,tK=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:"")}};tK.MEDIA_ERR_ABORTED=1,tK.MEDIA_ERR_NETWORK=2,tK.MEDIA_ERR_DECODE=3,tK.MEDIA_ERR_SRC_NOT_SUPPORTED=4,tK.MEDIA_ERR_ENCRYPTED=5,tK.MEDIA_ERR_CUSTOM=100,tK.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 t$=(e,t)=>null!=t&&e in t,tq={ANY:"any",MUTED:"muted"},tY={ON_DEMAND:"on-demand",LIVE:"live",UNKNOWN:"unknown"},tG={MSE:"mse",NATIVE:"native"},tj={HEADER:"header",QUERY:"query",NONE:"none"},tz=Object.values(tj),tQ={M3U8:"application/vnd.apple.mpegurl",MP4:"video/mp4"},tZ={HLS:tQ.M3U8};Object.keys(tZ),[...Object.values(tQ)];var 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 t$(e,tZ)?tZ[e]:t}return t4(e)},t2=e=>"VOD"===e?tY.ON_DEMAND:tY.LIVE,t3=e=>"EVENT"===e?1/0:"VOD"===e?NaN:0,t4=e=>{let{src:t}=e;if(!t)return"";let i="";try{i=t9(t).pathname}catch{console.error("Invalid url when trying to infer mime type",t)}let a=i.lastIndexOf(".");if(a<0)return t6(e)?tQ.M3U8:"";let r=i.slice(a+1).toUpperCase();return t$(r,tQ)?tQ[r]:""},t5=e=>{try{return new URL(e),!1}catch{return!0}},t9=(e,t)=>
1{var i;if(!t5(e))return new URL(e);let a=null==(i=null==window?void 0:window.location)?void 0:i.href,r=null!=t?t:a;return t&&t5(t.toString())&&(r=new URL(t,a)),new URL(e,r)},t8="mux.com",t6=({src:e,customDomain:t=t8})=>{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},t7=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 ie(e,t=!0){var i;return new it(t&&null!=(i=null==tX?void 0:tX[e])?i:e,t?tX.code:"en")}var it=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}},ii=Object.values(tq),ia=e=>"boolean"==typeof e||"string"==typeof e&&ii.includes(e),ir=(e,t)=>{if(!t)return;let i=e.muted,a=()=>e.muted=i;switch(t){case tq.ANY:e.play().catch(()=>{e.muted=!0,e.play().catch(a)});break;case tq.MUTED:e.muted=!0,e.play().catch(a);break;default:e.play().catch(()=>{})}},is=e=>"time"in e?e.time:e.startTime;function io(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 il(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 id(e,t,i,a){let r=il(e,i,a);return r||((r=io(e,a,i)).mode="hidden",await new Promise(e=>setTimeout(()=>e(void 0),0))),"hidden"!==r.mode&&(r.mode="hidden"),[...t].sort((e,t)=>is(t)-is(e)).forEach(t=>{var i,n;let s=t.value,o=is(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 iu="cuepoints",ic=Object.freeze({label:iu});async function ih(e,t,i=ic){return id(e,t,i.label,"metadata")}var im=e=>({time:e.startTime,value:JSON.parse(e.text)});function ip(e,t={label:iu}){var i,a;let r=il(e,t.label,"metadata");if(!(null!=(i=null==r?void 0:r.activeCues)&&i.length))return;if(1===r.activeCues.length)return im(r.activeCues[0]);let{currentTime:n}=e;return im(Array.prototype.find.call(null!=(a=r.activeCues)?a:[],({startTime:e,endTime:t})=>e<=n&&t>n)||r.activeCues[0])}async function iv(e,t=ic){return new Promise(i=>{tJ(e,"loadstart",async()=>{let a=await ih(e,[],t);tJ(e,"cuechange",()=>{let t=ip(e);if(t){let i=new CustomEvent("cuepointchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(i)}},{},a),i(a)})})}var iE="chapters",ib=Object.freeze({label:iE}),ig=e=>({startTime:e.startTime,endTime:e.endTime,value:e.text});async function i_(e,t,i=ib){return id(e,t,i.label,"chapters")}function iy(e,t={label:iE}){var i,a;let r=il(e,t.label,"chapters");if(!(null!=(i=null==r?void 0:r.activeCues)&&i.length))return;if(1===r.activeCues.length)return ig(r.activeCues[0]);let{currentTime:n}=e;return ig(Array.prototype.find.call(null!=(a=r.activeCues)?a:[],({startTime:e,endTime:t})=>e<=n&&t>n)||r.activeCues[0])}async function iT(e,t=ib){return new Promise(i=>{tJ(e,"loadstart",async()=>{let a=await i_(e,[],t);tJ(e,"cuechange",()=>{let t=iy(e);if(t){let i=new CustomEvent("chapterchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(i)}},{},a),i(a)})})}var iA={VIDEO:"v",THUMBNAIL:"t",STORYBOARD:"s",DRM:"d"},ik=(e,t,i,a,r=!1,n=!(e=>null==(e=globalThis.navigator)?void 0:e.onLine)())=>{var s,o;if(n){let i=ie("Your device appears to be offline",r),a=tK.MEDIA_ERR_NETWORK,n=new tK(i,a,!1,void 0);return n.errorCategory=t,n.muxCode=tF.NETWORK_OFFLINE,n.data=e,n}let l="status"in e?e.status:e.code,d=Date.now(),u=tK.MEDIA_ERR_NETWORK;
1if(200===l)return;let c=tV(t),h=((e,t)=>{var i,a;let r=tV(e),n=`${r}Token`;return null!=(i=t.tokens)&&i[r]?null==(a=t.tokens)?void 0:a[r]:t$(n,t)?t[n]:void 0})(t,i),m=(e=>e===tH.VIDEO?iA.VIDEO:e===tH.DRM?iA.DRM:void 0)(t),[p]=t0(null!=(s=i.playbackId)?s:"");if(!l||!p)return;let v=t7(h);if(h&&!v){let i=new tK(ie("The {tokenNamePrefix}-token provided is invalid or malformed.",r).format({tokenNamePrefix:c}),u,!0,ie("Compact JWT string: {token}",r).format({token:h}));return i.errorCategory=t,i.muxCode=tF.NETWORK_TOKEN_MALFORMED,i.data=e,i}if(l>=500){let e=new tK("",u,null==a||a);return e.errorCategory=t,e.muxCode=tF.NETWORK_UNKNOWN_ERROR,e}if(403===l)if(v){if((({exp:e},t=Date.now())=>!e||1e3*e<t)(v,d)){let i={timeStyle:"medium",dateStyle:"medium"},a=new tK(ie("The videoâs secured {tokenNamePrefix}-token has expired.",r).format({tokenNamePrefix:c}),u,!0,ie("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat("en",i).format(null!=(o=v.exp)?o:0),currentDate:new Intl.DateTimeFormat("en",i).format(d)}));return a.errorCategory=t,a.muxCode=tF.NETWORK_TOKEN_EXPIRED,a.data=e,a}if((({sub:e},t)=>e!==t)(v,p)){let i=new tK(ie("The videoâs playback ID does not match the one encoded in the {tokenNamePrefix}-token.",r).format({tokenNamePrefix:c}),u,!0,ie("Specified playback ID: {playbackId} and the playback ID encoded in the {tokenNamePrefix}-token: {tokenPlaybackId}",r).format({tokenNamePrefix:c,playbackId:p,tokenPlaybackId:v.sub}));return i.errorCategory=t,i.muxCode=tF.NETWORK_TOKEN_SUB_MISMATCH,i.data=e,i}if((({aud:e},t)=>!e)(v,0)){let i=new tK(ie("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:c}),u,!0,ie("The {tokenNamePrefix}-token has no aud value. aud value should be {expectedAud}.",r).format({tokenNamePrefix:c,expectedAud:m}));return i.errorCategory=t,i.muxCode=tF.NETWORK_TOKEN_AUD_MISSING,i.data=e,i}if((({aud:e},t)=>e!==t)(v,m)){let i=new tK(ie("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:c}),u,!0,ie("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.",r).format({tokenNamePrefix:c,expectedAud:m,aud:v.aud}));return i.errorCategory=t,i.muxCode=tF.NETWORK_TOKEN_AUD_MISMATCH,i.data=e,i}}else{let i=new tK(ie("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,ie("Specified playback ID: {playbackId}",r).format({playbackId:p}));return i.errorCategory=t,i.muxCode=tF.NETWORK_TOKEN_MISSING,i.data=e,i}if(412===l){let n=new tK(ie("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,ie("Specified playback ID: {playbackId}",r).format({playbackId:p}));return n.errorCategory=t,n.muxCode=tF.NETWORK_NOT_READY,n.streamType=i.streamType===tY.LIVE?"live":i.streamType===tY.ON_DEMAND?"on-demand":"unknown",n.data=e,n}if(404===l){let i=new tK(ie("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,ie("Specified playback ID: {playbackId}",r).format({playbackId:p}));return i.errorCategory=t,i.muxCode=tF.NETWORK_NOT_FOUND,i.data=e,i}if(400===l){let i=new tK(ie("The URL or playback-id was invalid. You may have used an invalid value as a playback-id."),u,null==a||a,ie("Specified playback ID: {playbackId}",r).format({playbackId:p}));return i.errorCategory=t,i.muxCode=tF.NETWORK_INVALID_URL,i.data=e,i}let E=new tK("",u,null==a||a);return E.errorCategory=t,E.muxCode=tF.NETWORK_UNKNOWN_ERROR,E.data=e,E},iw=tB.DefaultConfig.capLevelController;iw||console.error("MinCapLevelController - hls.js DefaultConfig.capLevelController is unavailable");var iR={"720p":921600,"1080p":2073600,"1440p":4194304,"2160p":8294400},iS=class e extends iw{constructor(e){super(e)}static setMaxAutoResolution(t,i){i?e.maxAutoResolution.set(t,i):e.maxAutoResolution.delete(t)}getMaxAutoResolution(){var t;let i=this.hls;return null!=(t=e.maxAutoResolution.get(i))?t:void 0}get levels(){var e;return null!=(e=this.hls.levels)?e:[]}getValidLevels(e){return this.levels.filter((t,i)=>this.isLevelAllowed(t)&&i<=e)}getMaxLevelCapped(e){let t=this.getValidLevels(e),i=this.getMaxAutoResolution();if(!i)return super.getMaxLevel(e);let a=iR[i.toLowerCase().trim()];if(!a)return super.getMaxLevel(e);let r=t.filter(e=>e.width*e.height<=a),n=r.findIndex(e=>e.width*e.height===a);if(-1!==n){let e=r[n];return t.findIndex(t=>t===e)}if(0===r.length)return 0;let s=r[r.length-1];return t.findIndex(e=>e===s)}getMaxLevel(t){if(void 0!==this.getMaxAutoResolution())return this.getMaxLevelCapped(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:iw.getMaxLevelByMediaSize(a,16/9*n,n)}};iS.minMaxResolution=720,iS.maxAutoResolution=new WeakMap;var iI,iC,iL,iD,iM,iO,ix=e=>
1new TextDecoder("utf-16le").decode(e).replace("skd://","").slice(1),iN={FAIRPLAY:"fairplay",PLAYREADY:"playready",WIDEVINE:"widevine"},iP=/([A-Z0-9-]+)="?(.*?)"?(?:,|$)/g,iU=async(e,t)=>{if(t===tQ.MP4)return{streamType:tY.ON_DEMAND,targetLiveWindow:NaN,liveEdgeStartOffset:void 0,sessionData:void 0};if(t===tQ.M3U8){let t=await fetch(e);if(!t.ok)return Promise.reject(t);let i=await t.text(),a=await ((e,t)=>{let i,a=e.split(` 2`).find((e,t,i)=>t>0&&i[t-1].startsWith("#EXT-X-STREAM-INF"));if(!a)return Promise.reject(Error("No media playlist URL found in multivariant playlist"));if(t5(a)&&!t)return Promise.reject(Error("masterPlaylistUrl is required to resolve relative media playlist URL"));try{i=t9(a,t)}catch(e){return Promise.reject(e)}return fetch(i).then(e=>200!==e.status?Promise.reject(e):e.text())})(i,t.url);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(iP)].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===tY.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}},iW=async(e,t,i=t1({src:e}))=>{var a,r,n,s;let{streamType:o,targetLiveWindow:l,liveEdgeStartOffset:d,sessionData:u}=await iU(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!=(iC=null==(iI=null==globalThis?void 0:globalThis.navigator)?void 0:iI.userAgent)?iC:"",iF=null!=(iM=null==(iD=null==(iL=null==globalThis?void 0:globalThis.navigator)?void 0:iL.userAgentData)?void 0:iD.platform)?iM:"",iV=iH.toLowerCase().includes("android")||["x11","android"].some(e=>iF.toLowerCase().includes(e)),iK=new WeakMap,i$="mux.com",iq=null==(iO=tB.isSupported)?void 0:iO.call(tB),iY=()=>{if("undefined"!=typeof window)return tP.utils.now()},iG=tP.utils.generateUUID,ij=({playbackId:e,customDomain:t=i$,maxResolution:i,minResolution:a,renditionOrder:r,programStartTime:n,programEndTime:s,assetStartTime:o,assetEndTime:l,playbackToken:d,tokens:{playback:u=d}={},extraSourceParams:c={}}={})=>{if(!e)return;let[h,m=""]=t0(e),p=new URL(`https://stream.${t}/${h}.m3u8${m}`);return u||p.searchParams.has("token")?(p.searchParams.forEach((e,t)=>{"token"!=t&&p.searchParams.delete(t)}),u&&p.searchParams.set("token",u)):(i&&p.searchParams.set("max_resolution",i),a&&(p.searchParams.set("min_resolution",a),i&&+i.slice(0,-1)<+a.slice(0,-1)&&console.error("minResolution must be <= maxResolution","minResolution",a,"maxResolution",i)),r&&p.searchParams.set("rendition_order",r),n&&p.searchParams.set("program_start_time",`${n}`),s&&p.searchParams.set("program_end_time",`${s}`),o&&p.searchParams.set("asset_start_time",`${o}`),l&&p.searchParams.set("asset_end_time",`${l}
4`),Object.entries(c).forEach(([e,t])=>{null!=t&&p.searchParams.set(e,t)})),p.toString()},iz=e=>{if(!e)return;let[t]=e.split("?");return t||void 0},iQ=e=>{if(!e||!e.startsWith("https://stream."))return;let[t]=new URL(e).pathname.slice(1).split(/\.m3u8|\//);return t||void 0},iZ=e=>{var t;return null==(t=iK.get(e))?void 0:t.error},iX=e=>{var t,i;return null!=(i=null==(t=iK.get(e))?void 0:t.streamType)?i:tY.UNKNOWN},iJ=e=>{var t,i;return null!=(i=null==(t=iK.get(e))?void 0:t.seekable)?i:e.seekable},i0=.034,i1=(e,t,i=i0)=>e>t||((e,t,i=i0)=>Math.abs(e-t)<=i)(e,t,i),i2=(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},i3=(e,t)=>e.ended||e.loop?e.ended:!!(t&&i2(e,t))||((e,t=i0)=>e.paused&&i1(e.currentTime,e.duration,t))(e),i4=(e,t,i)=>{i9(t,i,e);let{metadata:a={}}=e,{view_session_id:r=iG()}=a,n=(e=>{var t,i,a;return null!=(t=null==e?void 0:e.metadata)&&t.video_id?e.metadata.video_id:an(e)&&null!=(a=null!=(i=iz(e.playbackId))?i:iQ(e.src))?a:e.src})(e);a.view_session_id=r,a.video_id=n,e.metadata=a,e.drmTypeCb=e=>{var i;null==(i=t.mux)||i.emit("hb",{view_drm_type:e})},e.fallbackToWebkitFairplay=async()=>{var i;let a=!t.paused,r=t.currentTime;e.useWebkitFairplay=!0;let n=e.muxDataKeepSession;e.muxDataKeepSession=!0;let s=null==(i=iK.get(t))?void 0:i.coreReference;i4(e,t,s),e.muxDataKeepSession=n,e.useWebkitFairplay=!1,a&&await t.play().then(()=>{t.currentTime=r}).catch(()=>{}),t.currentTime=r},iK.set(t,{retryCount:0});let s=i6(e,t),o=(({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,s);null!=e&&e.muxDataKeepSession&&null!=t&&t.mux&&!t.mux.deleted?s&&t.mux.addHLSJS({hlsjs:s,Hls:s?tB:void 0}):ao(e,t,s),al(e,t,s),iv(t),iT(t);let l=((e,t,i)=>{let{autoplay:a}=e,r=!1,n=!1,s=ia(a)?a:!!a,o=()=>{r||tJ(t,"playing",()=>{r=!0},{once:!0})};if(o(),tJ(t,"loadstart",()=>{r=!1,o(),ir(t,s)},{once:!0}),tJ(t,"loadstart",()=>{i||(n=e.streamType&&e.streamType!==tY.UNKNOWN?e.streamType===tY.LIVE:!Number.isFinite(t.duration)),ir(t,s)},{once:!0}),i&&i.once(tB.Events.LEVEL_LOADED,(t,i)=>{var a;n=e.streamType&&e.streamType!==tY.UNKNOWN?e.streamType===tY.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(tB.Events.LEVEL_UPDATED,a):a()},{once:!0})}return e=>{r||ir(t,s=ia(e)?e:!!e)}})(e,t,s);((e,t,i)=>{let{minPreloadSegments:a}=e;if(null==a||a<=0||!i)return;let r=0,n=!1,s=t.playbackRate||1,o=()=>{0!==t.playbackRate&&(s=t.playbackRate,t.playbackRate=0)};t.playbackRate=0,tJ(t,"ratechange",o);let l=(e,{frag:i})=>{n||"main"!==i.type||++r>=a&&(n=!0,t.removeEventListener("ratechange",o),t.playbackRate=s)};i.on(tB.Events.FRAG_BUFFERED,l),t.addEventListener("teardown",()=>{n||(n=!0,i.off(tB.Events.FRAG_BUFFERED,l),t.playbackRate=s)},{once:!0})})(e,t,s),((e,t,i)=>{let{initialEstimateSegments:a}=e;if(null==a||a<=0||!i)return;let r=0;i.on(tB.Events.FRAG_BUFFERED,(e,{frag:t})=>{"main"===t.type&&++r<a&&i.abrController.resetEstimator(i.config.abrEwmaDefaultEstimate)})})(e,0,s);let d={engine:s,setAutoplay:l,setPreload:o},u=iK.get(t);return u&&(u.coreReference=d),d},i5=new WeakMap,i9=(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",au),e.removeEventListener("error",ah),e.removeEventListener("durationchange",ad),iK.delete(e),e.dispatchEvent(new Event("teardown")))};function i8(e,t){var i;let a=t1(e);if(a!==tQ.M3U8)return!0;let r=!a||null==(i=t.canPlayType(a))||i,{preferPlayback:n}=e,s=n===tG.MSE,o=n===tG.NATIVE,l=iq&&(s||iV||!(/^((?!chrome|android).)*safari/i.test(iH)&&t.canPlayType("application/vnd.apple.mpegurl")));return r&&(o||!l)}var i6=(e,t)=>{let{debug:i,streamType:a,startTime:r=-1,metadata:n,preferCmcd:s,_hlsConfig:o={},maxAutoResolution:l,initialBandwidthEstimateKbps:d}=e,u=t1(e)===tQ.M3U8,c=i8(e,t);if(u&&!c&&iq){let u={backBufferLength:30,renderTextTracksNatively:!1,liveDurationInfinity:!0,capLevelOnFPSDrop:!0,...null!=d?{abrEwmaDefaultEstimate:1e3*d}:{}}
4,c=i7(a),h=ae(e),m=[tj.QUERY,tj.HEADER].includes(s)?{useHeaders:s===tj.HEADER,sessionId:null==n?void 0:n.view_session_id,contentId:null==n?void 0:n.video_id}:void 0,p=as(e,o),v=new tB({debug:i,startPosition:r,cmcd:m,xhrSetup:(e,t)=>{var i,a;if(s&&s!==tj.QUERY)return;let r=t9(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)},...u,...p,...c,...h,...o});return p.capLevelController===iS&&void 0!==l&&iS.setMaxAutoResolution(v,l),v.on(tB.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)}),v}},i7=e=>e===tY.LIVE?{backBufferLength:8}:{},ae=e=>{let{tokens:{drm:t}={},playbackId:i,drmTypeCb:a}=e,r=iz(i);return t&&r?{emeEnabled:!0,drmSystems:{"com.apple.fps":{licenseUrl:aa(e,"fairplay"),serverCertificateUrl:ar(e,"fairplay")},"com.widevine.alpha":{licenseUrl:aa(e,"widevine")},"com.microsoft.playready":{licenseUrl:aa(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")?iN.FAIRPLAY:e.includes("playready")?iN.PLAYREADY:e.includes("widevine")?iN.WIDEVINE:void 0)(e);return null==a||a(i),t}))}:{}},at=async e=>{let t=await fetch(e);return 200!==t.status?Promise.reject(t):await t.arrayBuffer()},ai=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())},aa=({playbackId:e,tokens:{drm:t}={},customDomain:i=i$},a)=>{let r=iz(e);return`https://license.${i.toLocaleLowerCase().endsWith(i$)?i:i$}/license/${a}/${r}?token=${t}`},ar=({playbackId:e,tokens:{drm:t}={},customDomain:i=i$},a)=>{let r=iz(e);return`https://license.${i.toLocaleLowerCase().endsWith(i$)?i:i$}/appcert/${a}/${r}?token=${t}`},an=({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(i$)||!!i&&a.includes(i.toLocaleLowerCase())},as=(e,t)=>{let i={};return i.capLevelToPlayerSize=e.capRenditionToPlayerSize,null==i.capLevelToPlayerSize?(i.capLevelController=iS,i.capLevelToPlayerSize=!0):i.capLevelController=tW.Rx,i},ao=(e,t,i)=>{var a;let{envKey:r,disableTracking:n,muxDataSDK:s=tP,muxDataSDKOptions:o={}}=e,l=an(e),d=iK.get(t);if(d&&(d.muxDataDisableCookies=!!e.disableCookies),!n&&(r||l)){let{playerInitTime:n,playerSoftwareName:l,playerSoftwareVersion:d,beaconCollectionDomain:u,debug:c,disableCookies:h}=e,m={...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?tB: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,...m}})}},al=(e,t,i)=>{var a,r,n;let s=i8(e,t),{src:o,customDomain:l=i$}=e,d=()=>{t.ended||e.disablePseudoEnded||!i3(t,i)||(i2(t,i)?t.currentTime=t.buffered.end(t.buffered.length-1):t.dispatchEvent(new Event("ended")))},u,c,h=()=>{let e=iJ(t),i,a;e.length>0&&(i=e.start(0),a=e.end(0)),(c!==a||u!==i)&&t.dispatchEvent(new CustomEvent("seekablechange",{composed:!0})),u=i,c=a};if(tJ(t,"durationchange",h),t&&s){let i=t1(e);if("string"==typeof o){if(o.endsWith(".mp4")&&o.includes(l)){let e=iQ(o);iB(new URL(`https://stream.${l}/${e}/metadata.json`).toString(),t)}let n=()=>{if(iX(t)!==tY.LIVE||Number.isFinite(t.duration))return;let e=setInterval(h,1e3);t.addEventListener("teardown",()=>{clearInterval(e)},{once:!0}),tJ(t,"durationchange",()=>{Number.isFinite(t.duration)&&clearInterval(e)})},s=async()=>iW(o,t,i).then(n).catch(i=>{if(i instanceof Response){let a=ik(i,tH.VIDEO,e);if(a)return void ac(t,a)}});if("none"===t.preload){let e=()=>{s(),t.removeEventListener("loadedmetadata",i)},i=()=>{s(),t.removeEventListener("play",e)};tJ(t,"play",e,{once:!0}),tJ(t,"loadedmetadata",i,{once:!0})}else s();null!=(a=e.tokens)&&a.drm?((e,t)=>{let i={mediaEl:t,getAppCertificate:()=>at(ar(e,"fairplay")).catch(t=>{if(t instanceof Response){let i=ik(t,tH.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)}),getLicenseKey:t=>ai(t,aa(e,"fairplay")).catch(t=>{if(t instanceof Response){let i=ik(t,tH.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)}),saveAndDispatchError:ac,drmTypeCb:()=>{var t;null==(t=e.drmTypeCb)||t.call(e,iN.FAIRPLAY)}};if(e.useWebkitFairplay)(({mediaEl:e,getAppCertificate:t,getLicenseKey:i,saveAndDispatchError:a,drmTypeCb:r})=>{if(!window.WebKitMediaKeys||!("onwebkitneedkey"in e)){console.error("No WebKitMediaKeys. FairPlay may not be supported");let t=new tK(ie("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),tK.MEDIA_ERR_ENCRYPTED,!0);
4return t.errorCategory=tH.DRM,t.muxCode=tF.ENCRYPTED_CDM_ERROR,a(e,t),()=>{}}let n=t(),s=null,o=t=>{(async()=>{try{e.webkitKeys||l();let i=await n;if(null===t.initData||null==i)return;let a=((e,t)=>{let i=function(e){let t=new ArrayBuffer(2*e.length),i=new DataView(t);for(let t=0;t<e.length;t++)i.setUint16(2*t,e.charCodeAt(t),!0);return t}(ix(e)),a=new Uint8Array(e),r=new Uint8Array(i),n=new Uint8Array(t),s=new Uint8Array(a.byteLength+4+n.byteLength+4+r.byteLength),o=0,l=e=>{s.set(e,o),o+=e.byteLength},d=e=>{let t=new DataView(s.buffer),i=e.byteLength;t.setUint32(o,i,!0),o+=4,l(e)};return l(a),d(r),d(n),s})(t.initData,i);d(a)}catch(t){console.error("Could not start encrypted playback due to exception",t),a(e,t)}})()},l=()=>{try{let t=new WebKitMediaKeys("com.apple.fps.1_0");e.webkitSetMediaKeys(t),r()}catch{let e=new tK("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser.",tK.MEDIA_ERR_ENCRYPTED,!0);throw e.errorCategory=tH.DRM,e.muxCode=tF.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM,e}},d=t=>{let r=e.webkitKeys.createSession("application/vnd.apple.mpegurl",t),n=async t=>{try{let e=t.message,a=await i(e);r.update(a)}catch(t){console.error("Error on FairPlay session message",t),a(e,t)}},o=t=>{let i=t.target.error;if(!i)return;console.error(`Internal Webkit Key Session Error - sysCode: ${i.systemCode} code: ${i.code}`);let r=new tK(ie("The DRM Content Decryption Module system had an internal failure. Try reloading the page, updating your browser, or playing in another browser."),tK.MEDIA_ERR_ENCRYPTED,!0);r.errorCategory=tH.DRM,r.muxCode=tF.ENCRYPTED_CDM_ERROR,a(e,r)},l=()=>{r.removeEventListener("webkitkeymessage",n),r.removeEventListener("webkitkeyerror",o),e.removeEventListener("teardown",l),"webkitCurrentPlaybackTargetIsWireless"in e&&e.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",l),s=null;try{r.close()}catch{}};"webkitCurrentPlaybackTargetIsWireless"in e&&e.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",l,{once:!0}),r.addEventListener("webkitkeymessage",n),r.addEventListener("webkitkeyerror",o),e.addEventListener("teardown",l),s=l},u=()=>{e.removeEventListener("webkitneedkey",o),e.removeEventListener("teardown",u),null==s||s();try{e.webkitSetMediaKeys(null)}catch{}};return e.addEventListener("webkitneedkey",o),e.addEventListener("teardown",u,{once:!0})})(i);else{let t=(({mediaEl:e,getAppCertificate:t,getLicenseKey:i,saveAndDispatchError:a,drmTypeCb:r,fallbackToWebkitFairplay:n})=>{let s=null,o=async t=>{try{let i=t.initDataType;if("skd"!==i)return void console.error(`Received unexpected initialization data type "${i}"`);e.mediaKeys||await l(i);let a=t.initData;if(null==a)return void console.error(`Could not start encrypted playback due to missing initData in ${t.type} event`);await d(i,a)}catch(t){a(e,t);return}},l=async i=>{let n=await navigator.requestMediaKeySystemAccess("com.apple.fps",[{initDataTypes:[i],videoCapabilities:[{contentType:"application/vnd.apple.mpegurl",robustness:""}],distinctiveIdentifier:"not-allowed",persistentState:"not-allowed",sessionTypes:["temporary"]}]).then(e=>(r(),e)).catch(()=>{let t=new tK(ie("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),tK.MEDIA_ERR_ENCRYPTED,!0);t.errorCategory=tH.DRM,t.muxCode=tF.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM,a(e,t)});if(!n)return;let s=await n.createMediaKeys();try{let e=await t();await s.setServerCertificate(e).catch(()=>{let e=ie("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),t=new tK(e,tK.MEDIA_ERR_ENCRYPTED,!0);return t.errorCategory=tH.DRM,t.muxCode=tF.ENCRYPTED_UPDATE_SERVER_CERT_FAILED,Promise.reject(t)})}catch(t){a(e,t);return}await e.setMediaKeys(s)},d=async(t,r)=>{let o=e.mediaKeys.createSession(),l=async t=>{let r=t.message,n=await i(r);try{await o.update(n)}catch{let t=new tK(ie("Failed to update DRM license. This may be an issue with the player or your protected content."),tK.MEDIA_ERR_ENCRYPTED,!0);t.errorCategory=tH.DRM,t.muxCode=tF.ENCRYPTED_UPDATE_LICENSE_FAILED,a(e,t)}},d=()=>
4{o.keyStatuses.forEach(t=>(t=>{let i;"internal-error"===t?((i=new tK(ie("The DRM Content Decryption Module system had an internal failure. Try reloading the page, updating your browser, or playing in another browser."),tK.MEDIA_ERR_ENCRYPTED,!0)).errorCategory=tH.DRM,i.muxCode=tF.ENCRYPTED_CDM_ERROR):("output-restricted"===t||"output-downscaled"===t)&&((i=new tK(ie("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen."),tK.MEDIA_ERR_ENCRYPTED,!1)).errorCategory=tH.DRM,i.muxCode=tF.ENCRYPTED_OUTPUT_RESTRICTED),i&&a(e,i)})(t))};o.addEventListener("keystatuseschange",d),o.addEventListener("message",l);let u=async()=>{o.removeEventListener("keystatuseschange",d),o.removeEventListener("message",l),"webkitCurrentPlaybackTargetIsWireless"in e&&e.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",u),e.removeEventListener("teardown",u),await o.close().catch(e=>{console.warn("There was an error when closing EME session",e)}),s=null};"webkitCurrentPlaybackTargetIsWireless"in e&&e.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",u,{once:!0}),e.addEventListener("teardown",u,{once:!0}),s=u,await o.generateRequest(t,r).catch(async t=>{if("NotSupportedError"===t.name&&"webkitCurrentPlaybackTargetIsWireless"in e&&e.webkitCurrentPlaybackTargetIsWireless)console.warn("Failed to generate a DRM license request. Attempting to fallback to Webkit DRM"),null==n||n();else{let e=new tK(ie("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),tK.MEDIA_ERR_ENCRYPTED,!0);return e.errorCategory=tH.DRM,e.muxCode=tF.ENCRYPTED_GENERATE_REQUEST_FAILED,console.error("Failed to generate license request",t),Promise.reject(e)}})},u=async()=>{e.removeEventListener("encrypted",o),e.removeEventListener("teardown",u),s&&await s(),await e.setMediaKeys(null).catch(()=>{})};return e.addEventListener("encrypted",o),e.addEventListener("teardown",u,{once:!0}),u})({fallbackToWebkitFairplay:async()=>{var i;await t(),null==(i=e.fallbackToWebkitFairplay)||i.call(e)},...i})}})(e,t):tJ(t,"encrypted",()=>{let e=new tK(ie("Attempting to play DRM-protected content without providing a DRM token."),tK.MEDIA_ERR_ENCRYPTED,!0);e.errorCategory=tH.DRM,e.muxCode=tF.ENCRYPTED_MISSING_TOKEN,ac(t,e)},{once:!0}),t.setAttribute("src",o),e.startTime&&((null!=(r=iK.get(t))?r:{}).startTime=e.startTime,t.addEventListener("durationchange",ad,{once:!0}))}else t.removeAttribute("src");t.addEventListener("error",au),t.addEventListener("error",ah),t.addEventListener("emptied",()=>{t.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})},{once:!0}),tJ(t,"pause",d),tJ(t,"seeked",d),tJ(t,"play",()=>{t.ended||i1(t.currentTime,t.duration)&&(t.currentTime=t.seekable.length?t.seekable.start(0):0)})}else if(i&&o){i.once(tB.Events.LEVEL_LOADED,(e,a)=>{((e,t,i)=>{var a,r,n,s,o,l,d,u;let{streamType:c,targetLiveWindow:h,liveEdgeStartOffset:m,lowLatency:p}=(e=>{var t;let i=e.type,a=t2(i),r=t3(i),n,s=!!(null!=(t=e.partList)&&t.length);return a===tY.LIVE&&(n=s?2*e.partTarget:3*e.targetduration),{streamType:a,targetLiveWindow:r,liveEdgeStartOffset:n,lowLatency:s}})(e);if(c===tY.LIVE){p?(i.config.backBufferLength=null!=(a=i.userConfig.backBufferLength)?a:4,i.config.maxFragLookUpTolerance=null!=(r=i.userConfig.maxFragLookUpTolerance)?r:.001,i.config.abrBandWidthUpFactor=null!=(n=i.userConfig.abrBandWidthUpFactor)?n:i.config.abrBandWidthFactor):i.config.backBufferLength=null!=(s=i.userConfig.backBufferLength)?s:8;let e=Object.freeze({get length(){return t.seekable.length},start:e=>t.seekable.start(e),end(e){var a;return e>this.length||e<0||Number.isFinite(t.duration)?t.seekable.end(e):null!=(a=i.liveSyncPosition)?a:t.seekable.end(e)}});(null!=(o=iK.get(t))?o:{}).seekable=e}(null!=(l=iK.get(t))?l:{}).liveEdgeStartOffset=m,(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),h(),iX(t)!==tY.LIVE||Number.isFinite(t.duration)||(i.on(tB.Events.LEVEL_UPDATED,h),tJ(t,"durationchange",()=>{Number.isFinite(t.duration)&&i.off(tB.Events.LEVELS_UPDATED,h)}))});let a=null!=(n=e.maxReconnectRetries)?n:0,r=a>0?(({hls:e,mediaEl:t,src:i,muxMediaState:a,saveAndDispatchError:r,maxRetries:n})=>{var s;
4let o,l=0,d=!1,u=!1,c=!1,h=()=>{null!=o&&(clearTimeout(o),o=void 0)},m=e=>(null==e?void 0:e.muxCode)===tF.NETWORK_RECONNECTING,p=()=>{if(!c&&i)return void e.loadSource(i);e.startLoad(t.currentTime)},v=()=>{let e=a.get(t);!(null!=e&&e.networkError)||u||!t.paused&&t.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&((()=>{let e=a.get(t);if(m(null==e?void 0:e.error))return;let i=new tK(ie("Attempting to reconnect..."),tK.MEDIA_ERR_NETWORK,!1);i.errorCategory=tH.VIDEO,i.muxCode=tF.NETWORK_RECONNECTING,e&&(e.error=i),t.dispatchEvent(new CustomEvent("error",{detail:i}))})(),(()=>{if(null==o&&!d){if(l>=n)return(()=>{d=!1,u=!0,h();let e=new tK(ie("Network error, try reloading."),tK.MEDIA_ERR_NETWORK,!0);e.errorCategory=tH.VIDEO,e.reload=!0,r(t,e)})();d=!0,o=setTimeout(()=>{o=void 0,l+=1,p()},Math.min(1e3*2**l,3e4))}})())},E=()=>{let e=a.get(t);null!=e&&e.networkError&&(l=0,u=!1,h(),d=!0,p())};return null==(s=globalThis.addEventListener)||s.call(globalThis,"online",E),e.on(tB.Events.FRAG_BUFFERED,()=>{let e=a.get(t);e&&(e.networkError||m(e.error))&&(e.networkError=!1,d=!1,l=0,u=!1,h(),e.error&&(e.error=null,t.dispatchEvent(new Event("emptied"))))}),tJ(t,"playing",()=>{let e=a.get(t);null!=e&&e.networkError&&(d=!1,l=0,u=!1,h(),e.error&&(e.error=null))}),tJ(t,"waiting",v),t.addEventListener("teardown",()=>{var e;null==(e=globalThis.removeEventListener)||e.call(globalThis,"online",E),h()},{once:!0}),{handleHlsError:(e,i)=>{var r,n;if(e.type!==tB.ErrorTypes.NETWORK_ERROR)return!1;let s=null!=(n=null==(r=e.response)?void 0:r.code)?n:0;return(i.muxCode===tF.NETWORK_OFFLINE||0===s||s>=500)&&!!e.fatal&&((()=>{let e=a.get(t);e&&(e.networkError=!0),d=!1,v()})(),!0)},onManifestLoaded:()=>{c=!0,d=!1,h()}}})({hls:i,mediaEl:t,src:o,muxMediaState:iK,saveAndDispatchError:ac,maxRetries:a}):void 0;i.on(tB.Events.ERROR,(a,n)=>{var s,o;let l=am(n,e);if(l.muxCode===tF.NETWORK_NOT_READY){let e=null!=(s=iK.get(t))?s:{},a=null!=(o=e.retryCount)?o:0;if(a<6){let r=0===a?5e3:6e4,s=new tK(`Retrying in ${r/1e3} seconds...`,l.code,l.fatal);Object.assign(s,l),ac(t,s);let o=setTimeout(()=>{e.retryCount=a+1,"manifestLoadError"===n.details&&n.url&&i.loadSource(n.url)},r);t.addEventListener("teardown",()=>clearTimeout(o),{once:!0});return}{e.retryCount=0;let i=new tK("Network error, try reloading.",l.code,l.fatal);Object.assign(i,l),i.reload=!0,ac(t,i);return}}null!=r&&r.handleHlsError(n,l)||ac(t,l)}),i.on(tB.Events.MANIFEST_LOADED,()=>{null==r||r.onManifestLoaded();let e=iK.get(t);null!=e&&e.networkError||e&&e.error&&(e.error=null,e.retryCount=0,t.dispatchEvent(new Event("emptied")),t.dispatchEvent(new Event("loadstart")))}),t.addEventListener("error",ah),tJ(t,"waiting",d),function(e,t){var i;if(!("videoTracks"in e))return;let a=new WeakMap;t.on(tB.Events.MANIFEST_PARSED,function(t,i){o();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(tB.Events.AUDIO_TRACKS_UPDATED,function(t,i){for(let t of(s(),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)}});let r=()=>{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)};e.audioTracks.addEventListener("change",r),t.on(tB.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)});let n=e=>{let i=e.target.selectedIndex;i!=t.nextLevel&&(t.nextLevel=i)};null==(i=e.videoRenditions)||i.addEventListener("change",n);let s=()=>{for(let t of e.audioTracks)e.removeAudioTrack(t)},o=()=>{(()=>{for(let t of e.videoTracks)e.removeVideoTrack(t)})(),s()};t.once(tB.Events.DESTROYING,()=>{var t,i;o(),null==(t=e.audioTracks)||t.removeEventListener("change",r),null==(i=e.videoRenditions)||i.removeEventListener("change",n)})}(e,i),function(e,t){t.on(tB.Events.NON_NATIVE_TEXT_TRACKS_FOUND,(i,{tracks:a})=>{a.forEach(i=>
4{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}`;io(e,i.kind,i.label,null==n?void 0:n.lang,o,i.default)})});let i=()=>{if(!t.subtitleTracks.length)return;let i=Array.from(e.textTracks).find(e=>e.id&&"showing"===e.mode&&["subtitles","captions"].includes(e.kind));if(!i)return;let a=t.subtitleTracks[t.subtitleTrack],r=a?a.default?"default":`${t.subtitleTracks[t.subtitleTrack].type.toLowerCase()}${t.subtitleTrack}`:void 0;if(t.subtitleTrack<0||(null==i?void 0:i.id)!==r){let e=t.subtitleTracks.findIndex(({lang:e,name:t,type:a,default:r})=>"default"===i.id&&r||e==i.language&&t===i.label&&a.toLowerCase()===i.kind);t.subtitleTrack=e}(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(tB.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(tB.Events.DESTROYING,()=>{e.textTracks.removeEventListener("change",i),e.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})});let a=()=>
4{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(tB.Events.MANIFEST_LOADED,a),t.once(tB.Events.MEDIA_ATTACHED,a)}(t,i),i.attachMedia(t)}else 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.")};function ad(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 au(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 tK(i,a);if(t.src&&a===tK.MEDIA_ERR_SRC_NOT_SUPPORTED&&t.readyState===HTMLMediaElement.HAVE_NOTHING)return void setTimeout(()=>{var e;let i=null!=(e=iZ(t))?e:t.error;(null==i?void 0:i.code)===tK.MEDIA_ERR_SRC_NOT_SUPPORTED&&ac(t,r)},500);if(t.src&&(a!==tK.MEDIA_ERR_DECODE||void 0!==a))try{let{status:e}=await fetch(t.src);r.data={response:{code:e}}}catch{}ac(t,r)}function ac(e,t){var i;t.fatal&&((null!=(i=iK.get(e))?i:{}).error=t,e.dispatchEvent(new CustomEvent("error",{detail:t})))}function ah(e){var t,i;if(!(e instanceof CustomEvent)||!(e.detail instanceof tK))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 am=(e,t)=>{var i,a,r;e.fatal?console.error("getErrorFromHlsErrorData()",e):t.debug&&console.warn("getErrorFromHlsErrorData() (non-fatal)",e);let n={[tB.ErrorTypes.NETWORK_ERROR]:tK.MEDIA_ERR_NETWORK,[tB.ErrorTypes.MEDIA_ERROR]:tK.MEDIA_ERR_DECODE,[tB.ErrorTypes.KEY_SYSTEM_ERROR]:tK.MEDIA_ERR_ENCRYPTED},s,o=(e=>[tB.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,tB.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED].includes(e.details)?tK.MEDIA_ERR_NETWORK:n[e.type])(e);if(o===tK.MEDIA_ERR_NETWORK&&e.response){let r=null!=(i=(e=>e.type===tB.ErrorTypes.KEY_SYSTEM_ERROR?tH.DRM:e.type===tB.ErrorTypes.NETWORK_ERROR?tH.VIDEO:void 0)(e))?i:tH.VIDEO;s=null!=(a=ik(e.response,r,t,e.fatal))?a:new tK("",o,e.fatal)}else o===tK.MEDIA_ERR_ENCRYPTED?e.details===tB.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE?((s=new tK(ie("Attempting to play DRM-protected content without providing a DRM token."),tK.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tH.DRM,s.muxCode=tF.ENCRYPTED_MISSING_TOKEN):e.details===tB.ErrorDetails.KEY_SYSTEM_NO_ACCESS?((s=new tK(ie("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),tK.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tH.DRM,s.muxCode=tF.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM):e.details===tB.ErrorDetails.KEY_SYSTEM_NO_SESSION?((s=new tK(ie("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),tK.MEDIA_ERR_ENCRYPTED,!0)).errorCategory=tH.DRM,s.muxCode=tF.ENCRYPTED_GENERATE_REQUEST_FAILED):e.details===tB.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED?((s=new tK(ie("Failed to update DRM license. This may be an issue with the player or your protected content."),tK.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tH.DRM,s.muxCode=tF.ENCRYPTED_UPDATE_LICENSE_FAILED):e.details===tB.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED?((s=new tK(ie("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),tK.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tH.DRM,s.muxCode=tF.ENCRYPTED_UPDATE_SERVER_CERT_FAILED):e.details===tB.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR?((s=new tK(ie("The DRM Content Decryption Module system had an internal failure. Try reloading the page, updating your browser, or playing in another browser."),tK.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tH.DRM,s.muxCode=tF.ENCRYPTED_CDM_ER
4ROR):e.details===tB.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED?((s=new tK(ie("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen."),tK.MEDIA_ERR_ENCRYPTED,!1)).errorCategory=tH.DRM,s.muxCode=tF.ENCRYPTED_OUTPUT_RESTRICTED):((s=new tK(e.error.message,tK.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory=tH.DRM,s.muxCode=tF.ENCRYPTED_ERROR):s=new tK("",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};let ap=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"],av=["autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"];function aE(e){return` 14 <style> 15 :host { 16 display: inline-flex; 17 line-height: 0; 18 flex-direction: column; 19 justify-content: end; 20 } 21 22 audio { 23 width: 100%; 24 } 25 </style> 26 <slot name="media"> 27 <audio${af(e)}></audio> 28 </slot> 29 <slot></slot> 30 `}function ab(e){return` 31 <style> 32 :host { 33 display: inline-block; 34 line-height: 0; 35 } 36 37 video { 38 max-width: 100%; 39 max-height: 100%; 40 min-width: 100%; 41 min-height: 100%; 42 object-fit: var(--media-object-fit, contain); 43 object-position: var(--media-object-position, 50% 50%); 44 } 45 46 video::-webkit-media-text-track-container { 47 transform: var(--media-webkit-text-track-transform); 48 transition: var(--media-webkit-text-track-transition); 49 } 50 </style> 51 <slot name="media"> 52 <video${af(e)}></video> 53 </slot> 54 <slot></slot> 55 `}function ag(e,{tag:t,is:i}){let a=globalThis.document?.createElement?.(t,{is:i}),r=a?function(e){let t=[];for(let i=Object.getPrototypeOf(e);i&&i!==HTMLElement.prototype;i=Object.getPrototypeOf(i)){let e=Object.getOwnPropertyNames(i);t.push(...e)}return t}(a):[];return class n extends e{static getTemplateHTML=t.endsWith("audio")?aE:ab;static shadowRootOptions={mode:"open"};static Events=ap;static #e=!1;static get observedAttributes(){return n.#t(),[...a?.constructor?.observedAttributes??[],...av]}static #t(){if(this.#e)return;this.#e=!0;let e=new Set(this.observedAttributes);for(let t of(e.delete("muted"),r))if(!(t in this.prototype))if("function"==typeof a[t])this.prototype[t]=function(...e){return this.#i(),(()=>{if(this.call)return this.call(t,...e);let i=this.nativeEl?.[t];return i?.apply(this.nativeEl,e)})()};else{let i={get(){this.#i();let i=t.toLowerCase();if(e.has(i)){let e=this.getAttribute(i);return null!==e&&(""===e||e)}return this.get?.(t)??this.nativeEl?.[t]}};t!==t.toUpperCase()&&(i.set=function(i){this.#i();let a=t.toLowerCase();return e.has(a)?void(!0===i||!1===i||null==i?this.toggleAttribute(a,!!i):this.setAttribute(a,i)):this.set?void this.set(t,i):void(this.nativeEl&&(this.nativeEl[t]=i))}),Object.defineProperty(this.prototype,t,i)}}#a=!1;#r=null;#n=new Map;#s;#o;get;set;call;get nativeEl(){return this.#i(),this.#r??this.querySelector(":scope > [slot=media]")??this.querySelector(t)??this.shadowRoot?.querySelector(t)??null}set nativeEl(e){this.#r=e}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(e){this.toggleAttribute("muted",e)}get src(){return this.getAttribute("src")}set src(e){this.setAttribute("src",`${e}`)}get preload(){return this.getAttribute("preload")??this.nativeEl?.preload}set preload(e){this.setAttribute("preload",`${e}`)}#i(){this.#a||(this.#a=!0,this.init())}init(){if(!this.shadowRoot){this.attachShadow({mode:"open"});let e=function(e){let t={};for(let i of e)t[i.name]=i.value;return t}(this.attributes);i&&(e.is=i),t&&(e.part=t),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}for(let e of(this.nativeEl.muted=this.hasAttribute("muted"),r))this.#l(e);this.#d()}#d(){for(let e of(this.#s=new MutationObserver(this.#u.bind(this)),this.#o=()=>this.#c(),this.shadowRoot?.addEventListener("slotchange",this.#o),this.#c(),this.constructor.Events))this.shadowRoot?.addEventListener(e,this,!0)}handleEvent(e){e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{detail:e.detail}))}#c(){let e=new Map(this.#n),t=this.shadowRoot?.querySelector("slot:not([name])");(t?.assignedElements({flatten:!0}).filter(e=>
55["track","source"].includes(e.localName))).forEach(t=>{e.delete(t);let i=this.#n.get(t);i||(i=t.cloneNode(),this.#n.set(t,i),this.#s?.observe(t,{attributes:!0})),this.nativeEl?.append(i),this.#h(i)}),e.forEach((e,t)=>{e.remove(),this.#n.delete(t)})}#u(e){for(let t of e)if("attributes"===t.type){let{target:e,attributeName:i}=t,a=this.#n.get(e);a&&i&&(a.setAttribute(i,e.getAttribute(i)??""),this.#h(a))}}#h(e){e&&"track"===e.localName&&e.default&&("chapters"===e.kind||"metadata"===e.kind)&&"disabled"===e.track.mode&&(e.track.mode="hidden")}#l(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}}attributeChangedCallback(e,t,i){this.#i(),this.#m(e,t,i)}#m(e,t,i){!["id","class"].includes(e)&&(!n.observedAttributes.includes(e)&&this.constructor.observedAttributes.includes(e)||(null===i?this.nativeEl?.removeAttribute(e):this.nativeEl?.getAttribute(e)!==i&&this.nativeEl?.setAttribute(e,i)))}connectedCallback(){this.#i(),this.#o||this.#d()}disconnectedCallback(){for(let e of(this.#s?.disconnect(),this.#s=void 0,this.#o&&(this.shadowRoot?.removeEventListener("slotchange",this.#o),this.#o=void 0),this.constructor.Events))this.shadowRoot?.removeEventListener(e,this,!0);this.#n.forEach(e=>e.remove()),this.#n.clear(),this.#r=null}}}function af(e){let t="";for(let i in e){if(!av.includes(i))continue;let a=e[i];""===a?t+=` ${i}`:t+=` ${i}="${a}"`}return t}let a_=ag(globalThis.HTMLElement??class{},{tag:"video"});ag(globalThis.HTMLElement??class{},{tag:"audio"});var ay,aT,aA,ak,aw,aR,aS,aI,aC,aL,aD,aM,aO,ax,aN=e=>{throw TypeError(e)},aP=(e,t,i)=>t.has(e)||aN("Cannot "+i),aU=(e,t,i)=>(aP(e,t,"read from private field"),i?i.call(e):t.get(e)),aW=(e,t,i)=>t.has(e)?aN("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),aB=(e,t,i,a)=>(aP(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),aH=(e,t,i)=>(aP(e,t,"access private method"),i),aF=(()=>{try{return"0.31.4"}catch{}return"UNKNOWN"})(),aV=` 56<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.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m-275.883-218.509-143.33 143.329c-24.402 24.402-24.402 63.966 0 88.368 24.402 24.402 63.967 24.402 88.369 0l143.33-143.329 143.328 143.329c24.402 24.4 63.967 24.402 88.369 0 24.403-24.402 24.403-63.966.001-88.368l-143.33-143.329.001-.004 143.329-143.329c24.402-24.402 24.402-63.965 0-88.367s-63.967-24.402-88.369 0L1349.996 161.63 1206.667 18.302c-24.402-24.401-63.967-24.402-88.369 0s-24.402 63.965 0 88.367l143.329 143.329v.004ZM437.511 468.521c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31M461.426 4.759C438.078-4.913 411.2.432 393.33 18.303L249.999 161.632 106.669 18.303C88.798.432 61.922-4.913 38.573 4.759 15.224 14.43-.001 37.214-.001 62.488v375.026c0 34.51 27.977 62.486 62.487 62.486 34.51 0 62.486-27.976 62.486-62.486V213.341l80.843 80.844c24.404 24.402 63.965 24.402 88.369 0l80.843-80.844v224.173c0 34.51 27.976 62.486 62.486 62.486s62.486-27.976 62.486-62.486V62.488c0-25.274-15.224-48.058-38.573-57.729" style="fill-rule:nonzero"/></g></svg>`,aK={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",MAX_RECONNECT_RETRIES:"max-reconnect-retries",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",MAX_AUTO_RESOLUTION:"max-auto-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",CAP_RENDITION_TO_PLAYER_SIZE:"cap-rendition-to-player-size",INITIAL_BANDWIDTH_ESTIMATE_KBPS:"initial-bandwidth-estimate-kbps",INITIAL_ESTIMATE_SEGMENTS:"initial-estimate-segments",MIN_PRELOAD_SEGMENTS:"min-preload-segments"},a$=Object.values(aK),aq="mux-video",aY=class extends a_{constructor(){super(),aW(this,aD),aW(this,ay),aW(this,aT),aW(this,aA,{}),aW(this,ak,{}),aW(this,aw),aW(this,aR),aW(this,aS),aW(this,aI),aW(this,aC,""),aW(this,aL,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"&&(aB(this,aC,"default"),this.updateLogo())}),aW(this,aO),aB(this,aT,iY())}static get NAME(){return aq}static get VERSION(){return aF}static get observedAttributes(){var e;return[...a$,...null!=(e=a_.observedAttributes)?e:[]]}static getLogoHTML(e){return e&&"false"!==e?"default"===e?aV:`<img part="logo" src="${e}" />`:""}static getTemplateHTML(e={}){var t;return` 57 ${a_.getTemplateHTML(e)} 58 <style> 59 :host { 60 position: relative; 61 } 62 slot[name="logo"] { 63 display: flex; 64 justify-content: end; 65 position: absolute; 66 top: 1rem; 67 right: 1rem; 68 opacity: 0; 69 transition: opacity 0.25s ease-in-out; 70 z-index: 1; 71 } 72 slot[name="logo"]:has([part="logo"]) { 73 opacity: 1; 74 } 75 slot[name="logo"] [part="logo"] { 76 width: 5rem; 77 pointer-events: none; 78 user-select: none; 79 } 80 </style> 81 <slot name="logo"> 82 ${this.getLogoHTML(null!=(t=e[aK.LOGO])?t:"")} 83 </slot> 84 `}get preferCmcd(){var e;return null!=(e=this.getAttribute(aK.PREFER_CMCD))?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?tz.includes(e)?this.setAttribute(aK.PREFER_CMCD,e):console.warn(`Invalid value for preferCmcd. Must be one of ${tz.join()}`):this.removeAttribute(aK.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(aK.PLAYER_INIT_TIME)?+this.getAttribute(aK.PLAYER_INIT_TIME):aU(this,aT)}set playerInitTime(e){e!=this.playerInitTime&&(null==e?this.removeAttribute(aK.PLAYER_INIT_TIME):this.setAttribute(aK.PLAYER_INIT_TIME,`${+e}`))}get playerSoftwareName(){var e;return null!=(e=aU(this,aS))?e:aq}set playerSoftwareName(e){aB(this,aS,e)}get playerSoftwareVersion(){var e;return null!=(e=aU(this,aR))?e:aF}set playerSoftwareVersion(e){aB(this,aR,e)}
84get _hls(){var e;return null==(e=aU(this,aD,aM))?void 0:e.engine}get mux(){var e;return null==(e=this.nativeEl)?void 0:e.mux}get error(){var e;return null!=(e=iZ(this.nativeEl))?e:null}get errorTranslator(){return aU(this,aI)}set errorTranslator(e){aB(this,aI,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(aK.TYPE))?e:void 0}set type(e){e!==this.type&&(e?this.setAttribute(aK.TYPE,e):this.removeAttribute(aK.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(aK.DEBUG)}set debug(e){e!==this.debug&&(e?this.setAttribute(aK.DEBUG,""):this.removeAttribute(aK.DEBUG))}get disableTracking(){return this.hasAttribute(aK.DISABLE_TRACKING)}set disableTracking(e){e!==this.disableTracking&&this.toggleAttribute(aK.DISABLE_TRACKING,!!e)}get disableCookies(){return this.hasAttribute(aK.DISABLE_COOKIES)}set disableCookies(e){e!==this.disableCookies&&(e?this.setAttribute(aK.DISABLE_COOKIES,""):this.removeAttribute(aK.DISABLE_COOKIES))}get disablePseudoEnded(){return this.hasAttribute(aK.DISABLE_PSEUDO_ENDED)}set disablePseudoEnded(e){e!==this.disablePseudoEnded&&(e?this.setAttribute(aK.DISABLE_PSEUDO_ENDED,""):this.removeAttribute(aK.DISABLE_PSEUDO_ENDED))}get maxReconnectRetries(){let e=this.getAttribute(aK.MAX_RECONNECT_RETRIES);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set maxReconnectRetries(e){e!==this.maxReconnectRetries&&(null==e?this.removeAttribute(aK.MAX_RECONNECT_RETRIES):this.setAttribute(aK.MAX_RECONNECT_RETRIES,`${e}`))}get startTime(){let e=this.getAttribute(aK.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(aK.START_TIME):this.setAttribute(aK.START_TIME,`${e}`))}get initialBandwidthEstimateKbps(){let e=this.getAttribute(aK.INITIAL_BANDWIDTH_ESTIMATE_KBPS);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set initialBandwidthEstimateKbps(e){e!==this.initialBandwidthEstimateKbps&&(null==e?this.removeAttribute(aK.INITIAL_BANDWIDTH_ESTIMATE_KBPS):this.setAttribute(aK.INITIAL_BANDWIDTH_ESTIMATE_KBPS,`${e}`))}get initialEstimateSegments(){let e=this.getAttribute(aK.INITIAL_ESTIMATE_SEGMENTS);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set initialEstimateSegments(e){e!==this.initialEstimateSegments&&(null==e?this.removeAttribute(aK.INITIAL_ESTIMATE_SEGMENTS):this.setAttribute(aK.INITIAL_ESTIMATE_SEGMENTS,`${e}`))}get minPreloadSegments(){let e=this.getAttribute(aK.MIN_PRELOAD_SEGMENTS);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set minPreloadSegments(e){e!==this.minPreloadSegments&&(null==e?this.removeAttribute(aK.MIN_PRELOAD_SEGMENTS):this.setAttribute(aK.MIN_PRELOAD_SEGMENTS,`${e}`))}get playbackId(){var e;return this.hasAttribute(aK.PLAYBACK_ID)?this.getAttribute(aK.PLAYBACK_ID):null!=(e=iQ(this.src))?e:void 0}set playbackId(e){e!==this.playbackId&&(e?this.setAttribute(aK.PLAYBACK_ID,e):this.removeAttribute(aK.PLAYBACK_ID))}get maxResolution(){var e;return null!=(e=this.getAttribute(aK.MAX_RESOLUTION))?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(aK.MAX_RESOLUTION,e):this.removeAttribute(aK.MAX_RESOLUTION))}get minResolution(){var e;return null!=(e=this.getAttribute(aK.MIN_RESOLUTION))?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(aK.MIN_RESOLUTION,e):this.removeAttribute(aK.MIN_RESOLUTION))}get maxAutoResolution(){var e;return null!=(e=this.getAttribute(aK.MAX_AUTO_RESOLUTION))?e:void 0}set maxAutoResolution(e){null==e?this.removeAttribute(aK.MAX_AUTO_RESOLUTION):this.setAttribute(aK.MAX_AUTO_RESOLUTION,e)}get renditionOrder(){var e;return null!=(e=this.getAttribute(aK.RENDITION_ORDER))?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(aK.RENDITION_ORDER,e):this.removeAttribute(aK.RENDITION_ORDER))}get programStartTime(){let e=this.getAttribute(aK.PROGRAM_START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set programStartTime(e){null==e?this.removeAttribute(aK.PROGRAM_START_TIME):this.setAttribute(aK.PROGRAM_START_TIME,`${e}`)}get programEndTime(){let e=this.getAttribute(aK.PROGRAM_END_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set programEndTime(e){null==e?this.removeAttribute(aK.PROGRAM_END_TIME):this.setAttribute(aK.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){let e=this.getAttribute(aK.ASSET_START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set assetStartTime(e){null==e?this.removeAttribute(aK.ASSET_START_TIME):this.setAttribute(aK.ASSET_START_TIME,`${e}`)}get assetEndTime(){let e=this.getAttribute(aK.ASSET_END_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set assetEndTime(e){null==e?this.removeAttribute(aK.ASSET_END_TIME):this.setAttribute(aK.ASSET_END_TIME,`${e}`)}get customDomain(){var e;return null!=(e=this.getAttribute(aK.CUSTOM_DOMAIN))?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(aK.CUSTOM_DOMAIN,e):this.removeAttribute(aK.CUSTOM_DOMAIN))}get capRenditionToPlayerSize(){var e;return(null==(e=this._hlsConfig)?void 0:e.capLevelToPlayerSize)!=null?this._hlsConfig.capLevelToPlayerSize:aU(this,aO)}set capRenditionToPlayerSize(e){aB(this,aO,e)}get drmToken(){var e;return null!=(e=this.getAttribute(aK.DRM_TOKEN))?e:void 0}
84set drmToken(e){e!==this.drmToken&&(e?this.setAttribute(aK.DRM_TOKEN,e):this.removeAttribute(aK.DRM_TOKEN))}get playbackToken(){var e,t,i,a;if(this.hasAttribute(aK.PLAYBACK_TOKEN))return null!=(e=this.getAttribute(aK.PLAYBACK_TOKEN))?e:void 0;if(this.hasAttribute(aK.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(aK.PLAYBACK_TOKEN,e):this.removeAttribute(aK.PLAYBACK_TOKEN))}get tokens(){let e=this.getAttribute(aK.PLAYBACK_TOKEN),t=this.getAttribute(aK.DRM_TOKEN);return{...aU(this,ak),...null!=e?{playback:e}:{},...null!=t?{drm:t}:{}}}set tokens(e){aB(this,ak,null!=e?e:{})}get ended(){return i3(this.nativeEl,this._hls)}get envKey(){var e;return null!=(e=this.getAttribute(aK.ENV_KEY))?e:void 0}set envKey(e){e!==this.envKey&&(e?this.setAttribute(aK.ENV_KEY,e):this.removeAttribute(aK.ENV_KEY))}get beaconCollectionDomain(){var e;return null!=(e=this.getAttribute(aK.BEACON_COLLECTION_DOMAIN))?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(aK.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(aK.BEACON_COLLECTION_DOMAIN))}get streamType(){var e;return null!=(e=this.getAttribute(aK.STREAM_TYPE))?e:iX(this.nativeEl)}set streamType(e){e!==this.streamType&&(e?this.setAttribute(aK.STREAM_TYPE,e):this.removeAttribute(aK.STREAM_TYPE))}get targetLiveWindow(){var e,t,i;return this.hasAttribute(aK.TARGET_LIVE_WINDOW)?+this.getAttribute(aK.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(aK.TARGET_LIVE_WINDOW):this.setAttribute(aK.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e,t;if(this.hasAttribute(aK.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=iJ(e);return a.length?a.end(a.length-1)-i:NaN})(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(aK.LIVE_EDGE_OFFSET))return+this.getAttribute(aK.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){e!=this.liveEdgeOffset&&(null==e?this.removeAttribute(aK.LIVE_EDGE_OFFSET):this.setAttribute(aK.LIVE_EDGE_OFFSET,`${+e}`))}get seekable(){return iJ(this.nativeEl)}async addCuePoints(e){return this.nativeEl.currentSrc||console.warn("addCuePoints() was called before the media element has loaded. Wait for the loadstart event before calling addCuePoints()."),ih(this.nativeEl,e)}get activeCuePoint(){return ip(this.nativeEl)}get cuePoints(){return function(e,t={label:iu}){let i=il(e,t.label,"metadata");return null!=i&&i.cues?Array.from(i.cues,e=>im(e)):[]}(this.nativeEl)}async addChapters(e){return this.nativeEl.currentSrc||console.warn("addChapters() was called before the media element has loaded. Wait for the loadstart event before calling addChapters()."),i_(this.nativeEl,e)}get activeChapter(){return iy(this.nativeEl)}get chapters(){return function(e,t={label:iE}){var i;let a=il(e,t.label,"chapters");return null!=(i=null==a?void 0:a.cues)&&i.length?Array.from(a.cues,e=>ig(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(aK.PREFER_PLAYBACK);if(e===tG.MSE||e===tG.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===tG.MSE||e===tG.NATIVE?this.setAttribute(aK.PREFER_PLAYBACK,e):this.removeAttribute(aK.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(e=>e.startsWith("metadata-")&&![aK.METADATA_URL].includes(e)).reduce((e,t)=>
84{let i=this.getAttribute(t);return null!=i&&(e[t.replace(/^metadata-/,"").replace(/-/g,"_")]=i),e},{}),...aU(this,aA)}}set metadata(e){aB(this,aA,null!=e?e:{}),this.mux&&this.mux.emit("hb",aU(this,aA))}get _hlsConfig(){return aU(this,aw)}set _hlsConfig(e){aB(this,aw,e)}get logo(){var e;return null!=(e=this.getAttribute(aK.LOGO))?e:aU(this,aC)}set logo(e){e?this.setAttribute(aK.LOGO,e):this.removeAttribute(aK.LOGO)}load(){i4(this,this.nativeEl,aU(this,aD,aM))}unload(){i9(this.nativeEl,aU(this,aD,aM),this)}attributeChangedCallback(e,t,i){var a,r;switch(a_.observedAttributes.includes(e)&&!["src","autoplay","preload"].includes(e)&&super.attributeChangedCallback(e,t,i),e){case aK.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=null!=i?i:void 0;break;case aK.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=null!=i?i:void 0;break;case"src":{let e=!!t,a=!!i;!e&&a?aH(this,aD,ax).call(this):e&&!a?this.unload():e&&a&&(this.unload(),aH(this,aD,ax).call(this));break}case"autoplay":if(i===t)break;null==(a=aU(this,aD,aM))||a.setAutoplay(this.autoplay);break;case"preload":if(i===t)break;null==(r=aU(this,aD,aM))||r.setPreload(i);break;case aK.PLAYBACK_ID:case aK.CUSTOM_DOMAIN:case aK.MAX_RESOLUTION:case aK.MIN_RESOLUTION:case aK.RENDITION_ORDER:case aK.PROGRAM_START_TIME:case aK.PROGRAM_END_TIME:case aK.ASSET_START_TIME:case aK.ASSET_END_TIME:case aK.PLAYBACK_TOKEN:this.hasAttribute(aK.PLAYBACK_ID)&&(this.src=ij(this));break;case aK.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 aK.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 aK.STREAM_TYPE:(null==i||i!==t)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case aK.TARGET_LIVE_WINDOW:(null==i||i!==t)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;case aK.LOGO:(null==i||i!==t)&&this.updateLogo();break;case aK.DISABLE_TRACKING:if(null==i||i!==t){let e=this.currentTime,t=this.paused;this.unload(),aH(this,aD,ax).call(this).then(()=>{this.currentTime=e,t||this.play()})}break;case aK.DISABLE_COOKIES:(null==i||i!==t)&&((e,t,i)=>{var a,r,n;if(!t)return;let s=!!e.disableCookies,o=iK.get(t);!o||o.muxDataDisableCookies===s||(a=e,r=t,n=i,r&&(r.mux&&(r.mux.deleted||r.mux.destroy(),delete r.mux),i5.has(r)||i5.set(r,Promise.resolve().then(()=>{var e,t;i5.delete(r);let i=iK.get(r);i&&(!r.mux||r.mux.deleted)&&ao(a,r,null==(t=null!=(e=i.coreReference)?e:n)?void 0:t.engine)}))),s&&Promise.resolve().then(()=>{let t,i;e.disableCookies&&(t=new Date(0).toUTCString(),i=new Set(["muxData"]),document.cookie.split(";").forEach(e=>{let t=e.split("=")[0].trim();t.startsWith("muxData")&&i.add(t)}),i.forEach(e=>{document.cookie=`${e}=;expires=${t};path=/`}))}))})(this,this.nativeEl,aU(this,aD,aM));break;case aK.CAP_RENDITION_TO_PLAYER_SIZE:(null==i||i!==t)&&(this.capRenditionToPlayerSize=null!=i||void 0)}}updateLogo(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector('slot[name="logo"]');e&&(e.innerHTML=this.constructor.getLogoHTML(aU(this,aC)||this.logo))}connectedCallback(){var e,t;null==(e=super.connectedCallback)||e.call(this),null==(t=this.nativeEl)||t.addEventListener("muxmetadata",aU(this,aL)),this.nativeEl&&this.src&&!aU(this,aD,aM)&&aH(this,aD,ax).call(this)}disconnectedCallback(){var e,t;null==(e=this.nativeEl)||e.removeEventListener("muxmetadata",aU(this,aL)),this.unload(),null==(t=super.disconnectedCallback)||t.call(this)}handleEvent(e){e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{composed:!0,detail:e.detail}))}};ay=new WeakMap,aT=new WeakMap,aA=new WeakMap,ak=new WeakMap,aw=new WeakMap,aR=new WeakMap,aS=new WeakMap,aI=new WeakMap,aC=new WeakMap,aL=new WeakMap,aD=new WeakSet,aM=function(){var e,t;return e=this.nativeEl,null==(t=iK.get(e))?void 0:t.coreReference},aO=new WeakMap,ax=async function(){aU(this,ay)||(await aB(this,ay,Promise.resolve()),aB(this,ay,null),this.load())};let aG=new WeakMap;
84class aj extends Error{}class az extends Error{}let aQ=["application/x-mpegURL","application/vnd.apple.mpegurl","audio/mpegurl"];function aZ(){return globalThis.cast?.framework?.CastContext.getInstance()}function aX(){return aZ()?.getCurrentSession()}function aJ(){return aX()?.getSessionObj().media[0]}function a0(e){return aZ().setOptions({...a1(),...e})}function a1(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}function a2(e){if(!e)return;let t=e.match(/\.([a-zA-Z0-9]+)(?:\?.*)?$/);return t?t[1]:null}function a3(e){let t=e.split("\n").find(e=>!e.trim().startsWith("#")&&""!==e.trim());return t?.trim()}async function a4(e){if(!e)return!1;if(/\.m3u8?(\?.*)?$/i.test(e))return!0;if(e.startsWith("blob:"))return!1;try{let t=(await fetch(e,{method:"HEAD"})).headers.get("Content-Type");return aQ.some(e=>t===e)}catch(e){return console.error("Error while trying to get the Content-Type of the manifest",e),!1}}async function a5(e){if(!e||e.startsWith("blob:"))return{videoFormat:void 0,audioFormat:void 0};try{let t=await (await fetch(e)).text(),i=t,a=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}(t);if(a.length>0){let t=new URL(a[0],e).toString();i=await (await fetch(t)).text()}let r=a3(i),n=a2(r),s=function(e){for(let t of e.split("\n")){let e=t.trim();if(e.startsWith("#EXT-X-MEDIA")&&/TYPE=AUDIO/i.test(e)){let t=e.match(/URI="([^"]+)"/i);if(t)return t[1]}}}(t),o=n;if(s)try{let t=new URL(s,e).toString(),i=await (await fetch(t)).text(),a=a3(i);o=a2(a)??n}catch(e){console.error("Error while trying to parse the audio rendition playlist",e)}return{videoFormat:n,audioFormat:o}}catch(e){return console.error("Error while trying to parse the manifest playlist",e),{videoFormat:void 0,audioFormat:void 0}}}let a9=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),a8=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,aZ().addEventListener(a.CastContextEventType.CAST_STATE_CHANGED,e=>{a9.forEach(t=>aG.get(t).onCastStateChanged?.(e))}),aZ().addEventListener(a.CastContextEventType.SESSION_STATE_CHANGED,e=>{a9.forEach(t=>aG.get(t).onSessionStateChanged?.(e))}),a9.forEach(e=>aG.get(e).init?.()))});let a6=0;class a7 extends EventTarget{#p;#a;#v;#E;#b="disconnected";#g=!1;#f=new Set;#_=new WeakMap;#y=()=>this.#T();constructor(e){super(),this.#p=e,a9.add(this),aG.set(this,{init:()=>this.#i(),onCastStateChanged:()=>this.#A(),onSessionStateChanged:()=>this.#k(),getCastPlayer:()=>this.#w}),this.#i()}destroy(){this.#p?.textTracks?.removeEventListener("change",this.#y),this.#E&&this.#v?.controller&&Object.entries(this.#E).forEach(([e,t])=>{this.#v.controller.removeEventListener(e,t)}),this.#p&&a8.delete(this.#p),this.#a=!1}get #w(){if(a8.has(this.#p))return this.#v}get state(){return this.#b}async watchAvailability(e){if(this.#p.disableRemotePlayback)throw new aj("disableRemotePlayback attribute is present.");return this.#_.set(e,++a6),this.#f.add(e),queueMicrotask(()=>e(this.#R())),a6}async cancelWatchAvailability(e){if(this.#p.disableRemotePlayback)throw new aj("disableRemotePlayback attribute is present.");e?this.#f.delete(e):this.#f.clear()}async prompt(){if(this.#p.disableRemotePlayback)throw new aj("disableRemotePlayback attribute is present.");if(!globalThis.chrome?.cast?.isAvailable)throw new az("The RemotePlayback API is disabled on this platform.");let e=a8.has(this.#p);a8.add(this.#p),a0(this.#p.castOptions),Object.entries(this.#E).forEach(([e,t])=>{this.#v.controller.addEventListener(e,t)});try{await aZ().requestSession()}catch(t){if(e||a8.delete(this.#p),"cancel"===t)return;throw Error(t)}aG.get(this.#p)?.loadOnPrompt?.()}
84#S(){a8.has(this.#p)&&(Object.entries(this.#E).forEach(([e,t])=>{this.#v.controller.removeEventListener(e,t)}),a8.delete(this.#p),this.#p.muted=this.#v.isMuted,this.#p.currentTime=this.#v.savedPlayerState.currentTime,!1===this.#v.savedPlayerState.isPaused&&this.#p.play())}#R(){let e=aZ()?.getCastState();return e&&"NO_DEVICES_AVAILABLE"!==e}#A(){let e=aZ().getCastState();if(a8.has(this.#p)&&"CONNECTING"===e&&(this.#b="connecting",this.dispatchEvent(new Event("connecting"))),!this.#g&&e?.includes("CONNECT"))for(let e of(this.#g=!0,this.#f))e(!0);else if(this.#g&&(!e||"NO_DEVICES_AVAILABLE"===e))for(let e of(this.#g=!1,this.#f))e(!1)}async #k(){let{SESSION_RESUMED:e}=a.SessionState;if(aZ().getSessionState()===e&&this.#p.castSrc===aJ()?.media.contentId){a8.add(this.#p),Object.entries(this.#E).forEach(([e,t])=>{this.#v.controller.addEventListener(e,t)});try{var t;await (t=new chrome.cast.media.GetStatusRequest,new Promise((e,i)=>{aJ().getStatus(t,e,i)}))}catch(e){console.error(e)}this.#E[a.RemotePlayerEventType.IS_PAUSED_CHANGED](),this.#E[a.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}}#i(){a&&!this.#a&&(this.#a=!0,a0(this.#p.castOptions),this.#p.textTracks.addEventListener("change",this.#y),this.#A(),this.#v=new a.RemotePlayer,new a.RemotePlayerController(this.#v),this.#E={[a.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:e})=>{!0===e?(this.#b="connected",this.dispatchEvent(new Event("connect"))):(this.#S(),this.#b="disconnected",this.dispatchEvent(new Event("disconnect")))},[a.RemotePlayerEventType.DURATION_CHANGED]:()=>{this.#p.dispatchEvent(new Event("durationchange"))},[a.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{this.#p.dispatchEvent(new Event("volumechange"))},[a.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{this.#p.dispatchEvent(new Event("volumechange"))},[a.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{this.#w?.isMediaLoaded&&this.#p.dispatchEvent(new Event("timeupdate"))},[a.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{this.#p.dispatchEvent(new Event("resize"))},[a.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{this.#p.dispatchEvent(new Event(this.paused?"pause":"play"))},[a.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{this.#w?.playerState!==chrome.cast.media.PlayerState.PAUSED&&this.#p.dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[this.#w?.playerState]))},[a.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{this.#w?.isMediaLoaded&&(await Promise.resolve(),this.#I())}})}#I(){this.#T()}async #T(){let e;if(!this.#w)return;let t=(this.#v.mediaInfo?.tracks??[]).filter(({type:e})=>e===chrome.cast.media.TrackType.TEXT),i=[...this.#p.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=aX()?.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)=>{aJ().editTracksInfo(e,t,i)})}catch(e){console.error(e)}}}let re=e=>class extends e{static observedAttributes=[...e.observedAttributes??[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"];#C={paused:!1};#L=a1();#D;#M;get remote(){if(this.#M)return this.#M;if(globalThis.chrome){if(!this.isConnected)return;return 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)}(),aG.set(this,{loadOnPrompt:()=>this.#O()}),this.#M=new a7(this)}return super.remote}get #w(){return aG.get(this.#M)?.getCastPlayer?.()}disconnectedCallback(){this.#M?.destroy(),this.#M=null,aG.delete(this),super.disconnectedCallback?.()}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),"cast-receiver"===e&&i){this.#L.receiverApplicationId=i;return}if(this.#w)switch(e){case"cast-stream-type":case"cast-src":this.load()}}async #O(){this.#C.paused=super.paused,super.pause(),this.muted=super.muted;try{await this.load()}catch(e){console.error(e)}}async load(){if(!this.#w)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}],await a4(this.castSrc)){e.contentType||(e.contentType="application/x-mpegURL");let{videoFormat:t,audioFormat:i}=await a5(this.castSrc);t?.includes("m4s")||t?.includes("mp4")||t?.includes("m4a")?(e.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.FMP4,e.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.FMP4):i?.includes("aac")?(e.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.AAC,e.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.MPEG2_TS):(t?.includes("ts")||i?.includes("ts"))&&(e.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.TS,e.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.MPEG2_TS)}let r=new chrome.cast.media.LoadRequest(e);r.currentTime=super.currentTime??0,r.autoplay=!this.#C.paused,r.activeTrackIds=i,await aX()?.loadMedia(r),this.dispatchEvent(new Event("volumechange"))}play(){if(this.#w){this.#w.isPaused&&this.#w.controller?.playOrPause();return}return super.play()}pause(){if(this.#w){this.#w.isPaused||this.#w.controller?.playOrPause();return}super.pause()}get castOptions(){return this.#L}get castReceiver(){return this.getAttribute("cast-receiver")??void 0}set castReceiver(e){this.castReceiver!=e&&this.setAttribute("cast-receiver",`${e}`)}get castSrc(){let e=this.currentSrc,t=e?.startsWith("blob:")?void 0:e;return this.getAttribute("cast-src")??this.querySelector("source")?.src??t??this.getAttribute("src")??void 0}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.#D}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.#D=e}get readyState(){if(this.#w)switch(this.#w.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.#w?this.#w.isPaused:super.paused}get muted(){return this.#w?this.#w?.isMuted:super.muted}set muted(e){if(this.#w){(e&&!this.#w.isMuted||!e&&this.#w.isMuted)&&this.#w.controller?.muteOr
84Unmute();return}super.muted=e}get volume(){return this.#w?this.#w?.volumeLevel??1:super.volume}set volume(e){if(this.#w){this.#w.volumeLevel=+e,this.#w.controller?.setVolumeLevel();return}super.volume=e}get duration(){return this.#w&&this.#w?.isMediaLoaded?this.#w?.duration??NaN:super.duration}get currentTime(){return this.#w&&this.#w?.isMediaLoaded?this.#w?.currentTime??0:super.currentTime}set currentTime(e){if(this.#w){this.#w.currentTime=e,this.#w.controller?.seek();return}super.currentTime=e}};class rt extends Event{track;constructor(e,t){super(e),this.track=t.track}}let ri=new WeakMap;function ra(e){var t,i;let a;return ri.get(e)??(t=e,i={},(a=ri.get(t))||ri.set(t,a={}),Object.assign(a,i))}function rr(e,t){let i=e.videoTracks;ra(t).media=new WeakRef(e),ra(t).renditionSet||(ra(t).renditionSet=new Set);let a=ra(i).trackSet;a.add(t);let r=a.size-1;r in rs.prototype||Object.defineProperty(rs.prototype,r,{get(){return[...ra(this).trackSet][r]}}),queueMicrotask(()=>{i.dispatchEvent(new rt("addtrack",{track:t}))})}function rn(e){let t=ra(e).media?.deref()?.videoTracks;t&&(ra(t).trackSet.delete(e),queueMicrotask(()=>{t.dispatchEvent(new rt("removetrack",{track:e}))}))}class rs extends EventTarget{#x;#N;#P;constructor(){super(),ra(this).trackSet=new Set}get #U(){return ra(this).trackSet}[Symbol.iterator](){return this.#U.values()}get length(){return this.#U.size}getTrackById(e){return[...this.#U].find(t=>t.id===e)??null}get selectedIndex(){return[...this.#U].findIndex(e=>e.selected)}get onaddtrack(){return this.#x}set onaddtrack(e){this.#x&&(this.removeEventListener("addtrack",this.#x),this.#x=void 0),"function"==typeof e&&(this.#x=e,this.addEventListener("addtrack",e))}get onremovetrack(){return this.#N}set onremovetrack(e){this.#N&&(this.removeEventListener("removetrack",this.#N),this.#N=void 0),"function"==typeof e&&(this.#N=e,this.addEventListener("removetrack",e))}get onchange(){return this.#P}set onchange(e){this.#P&&(this.removeEventListener("change",this.#P),this.#P=void 0),"function"==typeof e&&(this.#P=e,this.addEventListener("change",e))}}class ro extends Event{rendition;constructor(e,t){super(e),this.rendition=t.rendition}}function rl(e){let t=ra(e).media?.deref();return t?[...t.videoTracks].filter(e=>e.selected).flatMap(e=>[...ra(e).renditionSet]):[]}class rd extends EventTarget{#W;#B;#P;[Symbol.iterator](){return rl(this).values()}get length(){return rl(this).length}getRenditionById(e){return rl(this).find(t=>`${t.id}`==`${e}`)??null}get selectedIndex(){return rl(this).findIndex(e=>e.selected)}set selectedIndex(e){for(let[t,i]of rl(this).entries())i.selected=t===e}get onaddrendition(){return this.#W}set onaddrendition(e){this.#W&&(this.removeEventListener("addrendition",this.#W),this.#W=void 0),"function"==typeof e&&(this.#W=e,this.addEventListener("addrendition",e))}get onremoverendition(){return this.#B}set onremoverendition(e){this.#B&&(this.removeEventListener("removerendition",this.#B),this.#B=void 0),"function"==typeof e&&(this.#B=e,this.addEventListener("removerendition",e))}get onchange(){return this.#P}set onchange(e){this.#P&&(this.removeEventListener("change",this.#P),this.#P=void 0),"function"==typeof e&&(this.#P=e,this.addEventListener("change",e))}}class ru{src;id;width;height;bitrate;frameRate;codec;#H=!1;get selected(){return this.#H}set selected(e){if(this.#H!==e){this.#H=e;var t=this;let i=ra(t).media?.deref()?.videoRenditions;i&&!ra(i).changeRequested&&(ra(i).changeRequested=!0,queueMicrotask(()=>{delete ra(i).changeRequested,ra(t).track.selected&&i.dispatchEvent(new Event("change"))}))}}}class rc{id;kind;label="";language="";sourceBuffer;#H=!1;addRendition(e,t,i,a,r,n){let s=new ru;return s.src=e,s.width=t,s.height=i,s.frameRate=n,s.bitrate=r,s.codec=a,!function(e,t){let i=ra(e).media?.deref()?.videoRenditions;ra(t).media=ra(e).media,ra(t).track=e;let a=ra(e).renditionSet;a.add(t);let r=a.size-1;r in rd.prototype||Object.defineProperty(rd.prototype,r,{get(){return rl(this)[r]}}),queueMicrotask(()=>{i&&e.selected&&i.dispatchEvent(new ro("addrendition",{rendition:t}))})}(this,s),s}removeRendition(e){let t=ra(e).media?.deref()?.videoRenditions,i=ra(e).track;ra(i).renditionSet.delete(e),queueMicrotask(()=>{let i=ra(e).track;t&&i.selected&&t.dispatchEvent(new ro("removerendition",{rendition:e}))})}get selected(){return this.#H}set selected(e){this.#H!==e&&(this.#H=e,!0===e&&function(e){let t=ra(e).media?.deref()?.videoTracks??[],i=!1;for(let a of t)a!==e&&(a.selected=!1,i=!0);if(i){if(ra(t).changeRequested)return;ra(t).changeRequested=!0,queueMicrotask(()=>{delete ra(t).changeRequested,t.dispatchEvent(new Event("change"))})}}(this))}}function rh(e){let t=ra(e).media?.deref();return t?[...t.audioTracks].filter(e=>e.enabled).flatMap(e=>[...ra(e).renditionSet]):[]}
84class rm extends EventTarget{#W;#B;#P;[Symbol.iterator](){return rh(this).values()}get length(){return rh(this).length}getRenditionById(e){return rh(this).find(t=>`${t.id}`==`${e}`)??null}get selectedIndex(){return rh(this).findIndex(e=>e.selected)}set selectedIndex(e){for(let[t,i]of rh(this).entries())i.selected=t===e}get onaddrendition(){return this.#W}set onaddrendition(e){this.#W&&(this.removeEventListener("addrendition",this.#W),this.#W=void 0),"function"==typeof e&&(this.#W=e,this.addEventListener("addrendition",e))}get onremoverendition(){return this.#B}set onremoverendition(e){this.#B&&(this.removeEventListener("removerendition",this.#B),this.#B=void 0),"function"==typeof e&&(this.#B=e,this.addEventListener("removerendition",e))}get onchange(){return this.#P}set onchange(e){this.#P&&(this.removeEventListener("change",this.#P),this.#P=void 0),"function"==typeof e&&(this.#P=e,this.addEventListener("change",e))}}class rp{src;id;bitrate;codec;#H=!1;get selected(){return this.#H}set selected(e){if(this.#H!==e){this.#H=e;var t=this;let i=ra(t).media?.deref()?.audioRenditions;i&&!ra(i).changeRequested&&(ra(i).changeRequested=!0,queueMicrotask(()=>{delete ra(i).changeRequested,ra(t).track.enabled&&i.dispatchEvent(new Event("change"))}))}}}function rv(e,t){let i=e.audioTracks;ra(t).media=new WeakRef(e),ra(t).renditionSet||(ra(t).renditionSet=new Set);let a=ra(i).trackSet;a.add(t);let r=a.size-1;r in rb.prototype||Object.defineProperty(rb.prototype,r,{get(){return[...ra(this).trackSet][r]}}),queueMicrotask(()=>{i.dispatchEvent(new rt("addtrack",{track:t}))})}function rE(e){let t=ra(e).media?.deref()?.audioTracks;t&&(ra(t).trackSet.delete(e),queueMicrotask(()=>{t.dispatchEvent(new rt("removetrack",{track:e}))}))}class rb extends EventTarget{#x;#N;#P;constructor(){super(),ra(this).trackSet=new Set}get #U(){return ra(this).trackSet}[Symbol.iterator](){return this.#U.values()}get length(){return this.#U.size}getTrackById(e){return[...this.#U].find(t=>t.id===e)??null}get onaddtrack(){return this.#x}set onaddtrack(e){this.#x&&(this.removeEventListener("addtrack",this.#x),this.#x=void 0),"function"==typeof e&&(this.#x=e,this.addEventListener("addtrack",e))}get onremovetrack(){return this.#N}set onremovetrack(e){this.#N&&(this.removeEventListener("removetrack",this.#N),this.#N=void 0),"function"==typeof e&&(this.#N=e,this.addEventListener("removetrack",e))}get onchange(){return this.#P}set onchange(e){this.#P&&(this.removeEventListener("change",this.#P),this.#P=void 0),"function"==typeof e&&(this.#P=e,this.addEventListener("change",e))}}class rg{id;kind;label="";language="";sourceBuffer;#F=!1;addRendition(e,t,i){let a=new rp;return a.src=e,a.codec=t,a.bitrate=i,!function(e,t){let i=ra(e).media?.deref()?.audioRenditions;ra(t).media=ra(e).media,ra(t).track=e;let a=ra(e).renditionSet;a.add(t);let r=a.size-1;r in rm.prototype||Object.defineProperty(rm.prototype,r,{get(){return rh(this)[r]}}),queueMicrotask(()=>{i&&e.enabled&&i.dispatchEvent(new ro("addrendition",{rendition:t}))})}(this,a),a}removeRendition(e){let t=ra(e).media?.deref()?.audioRenditions,i=ra(e).track;ra(i).renditionSet.delete(e),queueMicrotask(()=>{let i=ra(e).track;t&&i.enabled&&t.dispatchEvent(new ro("removerendition",{rendition:e}))})}get enabled(){return this.#F}set enabled(e){if(this.#F!==e){this.#F=e;let t=ra(this).media?.deref()?.audioTracks;t&&!ra(t).changeRequested&&(ra(t).changeRequested=!0,queueMicrotask(()=>{delete ra(t).changeRequested,t.dispatchEvent(new Event("change"))}))}}}let rf=rT(globalThis.HTMLMediaElement,"video"),r_=rT(globalThis.HTMLMediaElement,"audio");function ry(e){if(!e?.prototype)return e;let t=rT(e,"video");(!t||`${t}`.includes("[native code]"))&&Object.defineProperty(e.prototype,"videoTracks",{get(){var e=this;let t=ra(e).videoTracks;if(!t&&(t=new rs,ra(e).videoTracks=t,rf)){let i=rf.call(e.nativeEl??e);for(let t of i)rr(e,t);i.addEventListener("change",()=>{t.dispatchEvent(new Event("change"))}),i.addEventListener("addtrack",a=>{if([...t].some(e=>e instanceof rc)){for(let e of i)rn(e);return}rr(e,a.track)}),i.addEventListener("removetrack",e=>{rn(e.track)})}return t}});let i=rT(e,"audio");(!i||`${i}`.includes("[native code]"))&&Object.defineProperty(e.prototype,"audioTracks",{get(){var e=this;let t=ra(e).audioTracks;
84if(!t&&(t=new rb,ra(e).audioTracks=t,r_)){let i=r_.call(e.nativeEl??e);for(let t of i)rv(e,t);i.addEventListener("change",()=>{t.dispatchEvent(new Event("change"))}),i.addEventListener("addtrack",a=>{if([...t].some(e=>e instanceof rg)){for(let e of i)rE(e);return}rv(e,a.track)}),i.addEventListener("removetrack",e=>{rE(e.track)})}return t}}),"addVideoTrack"in e.prototype||(e.prototype.addVideoTrack=function(e,t="",i=""){let a=new rc;return a.kind=e,a.label=t,a.language=i,rr(this,a),a}),"removeVideoTrack"in e.prototype||(e.prototype.removeVideoTrack=rn),"addAudioTrack"in e.prototype||(e.prototype.addAudioTrack=function(e,t="",i=""){let a=new rg;return a.kind=e,a.label=t,a.language=i,rv(this,a),a}),"removeAudioTrack"in e.prototype||(e.prototype.removeAudioTrack=rE),"videoRenditions"in e.prototype||Object.defineProperty(e.prototype,"videoRenditions",{get(){return a(this)}});let a=e=>{let t=ra(e).videoRenditions;return t||(ra(t=new rd).media=new WeakRef(e),ra(e).videoRenditions=t),t};"audioRenditions"in e.prototype||Object.defineProperty(e.prototype,"audioRenditions",{get(){return r(this)}});let r=e=>{let t=ra(e).audioRenditions;return t||(ra(t=new rm).media=new WeakRef(e),ra(e).audioRenditions=t),t};return e}function rT(e,t){if(e?.prototype)return Object.getOwnPropertyDescriptor(e.prototype,`${t}Tracks`)?.get}var rA=e=>{throw TypeError(e)},rk=(e,t,i)=>t.has(e)||rA("Cannot "+i),rw=(e,t,i)=>(rk(e,t,"read from private field"),i?i.call(e):t.get(e)),rR=(e,t,i)=>t.has(e)?rA("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),rS=(e,t,i,a)=>(rk(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),rI=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("undefined"==typeof DocumentFragment){class e extends rI{}globalThis.DocumentFragment=e}var rC,rL=class extends rI{},rD=class{constructor(e,t={}){rR(this,rC),rS(this,rC,null==t?void 0:t.detail)}get detail(){return rw(this,rC)}initCustomEvent(){}};rC=new WeakMap;var rM={document:{createElement:function(e,t){return new rL}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(rL)},CustomEvent:rD,EventTarget:rI,HTMLElement:rL,HTMLVideoElement:class extends rI{}},rO="undefined"==typeof window||void 0===globalThis.customElements,rx=rO?rM:globalThis;rO?rM.document:globalThis.document;var rN,rP=class extends re(ry(aY)){constructor(){super(...arguments),rR(this,rN)}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=rw(this,rN))?e:this.muxCastCustomData}set castCustomData(e){rS(this,rN,e)}};rN=new WeakMap,rx.customElements.get("mux-video")||(rx.customElements.define("mux-video",rP),rx.MuxVideoElement=rP);let rU={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_LOOP_REQUEST:"medialooprequest",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:"mediash
84owsubtitlesrequest",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"},rW={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},rB={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_BUFFERED:"mediaBuffered",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_CHAPTERS_CUES:"mediaChaptersCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_P
84LAYED:"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_LOOP:"mediaLoop",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"},rH=Object.entries(rB),rF=rH.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{}),rV=rH.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"});Object.entries(rV).reduce((e,[t,i])=>{let a=rF[t];return a&&(e[i]=a),e},{userinactivechange:"userinactive"});let rK=Object.entries(rF).reduce((e,[t,i])=>{let a=rV[t];return a&&(e[i]=a),e},{userinactive:"userinactivechange"}),r$={SUBTITLES:"subtitles",CAPTIONS:"captions",CHAPTERS:"chapters",METADATA:"metadata"},rq={DISABLED:"disabled",SHOWING:"showing"},rY={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},rG={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},rj={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},rz={FULLSCREEN:"fullscreen"};function rQ(e){if(e){let{id:t,width:i,height:a}=e;return[t,i,a].filter(e=>null!=e).join(":")}}function rZ(e){if(e){let[t,i,a]=e.split(":");return{id:t,width:+i,height:+a}}}function rX(e){if(e){let{id:t,kind:i,language:a,label:r}=e;return[t,i,a,r].filter(e=>null!=e).join(":")}}function rJ(e){if(e){let[t,i,a,r]=e.split(":");return{id:t,kind:i,language:a,label:r}}}function r0(e){return"number"==typeof e&&!Number.isNaN(e)&&Number.isFinite(e)}function r1(e){return"string"==typeof e&&!isNaN(e)&&!isNaN(parseFloat(e))}let r2=e=>new Promise(t=>setTimeout(t,e)),r3={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",Loop:"Loop","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
84ource 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.",hour:"hour",hours:"hours",minute:"minute",minutes:"minutes",second:"second",seconds:"seconds","{time} remaining":"{time} remaining","{currentTime} of {totalTime}":"{currentTime} of {totalTime}","video not loaded, unknown time.":"video not loaded, unknown time."}},r4=(null==(uS=globalThis.navigator)?void 0:uS.language)||"en",r5=(e,t={})=>(e=>{var t,i,a;let[r]=r4.split("-");return(null==(t=r3[r4])?void 0:t[e])||(null==(i=r3[r])?void 0:i[e])||(null==(a=r3.en)?void 0:a[e])||e})(e).replace(/\{(\w+)\}/g,(e,i)=>i in t?String(t[i]):`{${i}}`),r9=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],r8=e=>{if(!r0(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?r5(r9[t].singular):r5(r9[t].plural);return`${e} ${i}`})(e,t)).filter(e=>e).join(", ");return i?r5("{time} remaining",{time:r}):r};function r6(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}});class r7{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}}class ne extends r7{}class nt extends ne{constructor(){super(...arguments),this.role=null}}class ni{observe(){}unobserve(){}disconnect(){}}let na={createElement:function(){return new nr.HTMLElement},createElementNS:function(){return new nr.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent:e=>!1},nr={ResizeObserver:ni,document:na,Node:ne,Element:nt,HTMLElement:class extends nt{constructor(){super(...arguments),this.innerHTML=""}get content(){return new nr.DocumentFragment}},DocumentFragment:class extends r7{},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}}}}},nn="global"in globalThis&&(null==globalThis?void 0:globalThis.global)===globalThis||"undefined"==typeof window||void 0===window.customElements,ns=Object.keys(nr).every(e=>e in globalThis),no=nn&&!ns?nr:globalThis,nl=nn&&!ns?na:globalThis.document,nd=new WeakMap,nu=e=>{let t=nd.get(e);return t||nd.set(e,t=new Set),t},nc=new no.ResizeObserver(e=>{for(let t of e)for(let e of nu(t.target))e(t)});function nh(e,t){nu(e).add(t),nc.observe(e)}function nm(e,t){let i=nu(e);i.delete(t),i.size||nc.unobserve(e)}function np(e){let t={};for(let i of e)t[i.name]=i.value;return t}function nv(e){var t;return null!=(t=nE(e))?t:n_(e,"media-controller")}function nE(e){var t;let{MEDIA_CONTROLLER:i}=rW,a=e.getAttribute(i);if(a)return null==(t=nT(e))?void 0:t.getElementById(a)}let nb=(e,t,i=".value")=>{let a=e.querySelector(i);a&&(a.textContent=t)},ng=(e,t)=>
84((e,t)=>{let i=`slot[name="${t}"]`,a=e.shadowRoot.querySelector(i);return a?a.children:[]})(e,t)[0],nf=(e,t)=>!!e&&!!t&&(null!=e&&!!e.contains(t)||nf(e,t.getRootNode().host)),n_=(e,t)=>{if(!e)return null;let i=e.closest(t);return i||n_(e.getRootNode().host,t)};function ny(e=document){var t;let i=null==e?void 0:e.activeElement;return i?null!=(t=ny(i.shadowRoot))?t:i:null}function nT(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 nA(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 nk(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||nw(e,t)}function nw(e,t){var i,a;let r=null!=(i=e.querySelectorAll("style:not([media])"))?i:[],n=null==r?void 0:r[r.length-1];if(!(null==n?void 0:n.sheet))return console.warn("Media Chrome: No style sheet found on style tag of",e),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}};let s=null==n?void 0:n.sheet.insertRule(`${t}{}`,n.sheet.cssRules.length);return null==(a=n.sheet.cssRules)?void 0:a[s]}function nR(e,t,i=NaN){let a=e.getAttribute(t);return null!=a?+a:i}function nS(e,t,i){let a=+i;if(null==i||Number.isNaN(a)){e.hasAttribute(t)&&e.removeAttribute(t);return}nR(e,t,void 0)!==a&&e.setAttribute(t,`${a}`)}function nI(e,t){return e.hasAttribute(t)}function nC(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}nI(e,t)!=i&&e.toggleAttribute(t,i)}function nL(e,t,i=null){var a;return null!=(a=e.getAttribute(t))?a:i}function nD(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}let a=`${i}`;nL(e,t,void 0)!==a&&e.setAttribute(t,a)}var nM=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nO=(e,t,i)=>(nM(e,t,"read from private field"),i?i.call(e):t.get(e)),nx=(e,t,i,a)=>(nM(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);
84class nN extends no.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,uI,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=np(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[rW.MEDIA_CONTROLLER,rF.MEDIA_PAUSED]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===rW.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=nO(this,uI))?void 0:a.unassociateElement)||r.call(a,this),nx(this,uI,null)),i&&this.isConnected&&(nx(this,uI,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=nO(this,uI))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),nx(this,uI,function(e){var t;let i=e.getAttribute(rW.MEDIA_CONTROLLER);return i?null==(t=e.getRootNode())?void 0:t.getElementById(i):n_(e,"media-controller")}(this)),this.getAttribute(rW.MEDIA_CONTROLLER)&&(null==(t=null==(e=nO(this,uI))?void 0:e.associateElement)||t.call(e,this)),nO(this,uI)&&(nO(this,uI).addEventListener("pointerdown",this),nO(this,uI).addEventListener("click",this),nO(this,uI).hasAttribute("tabindex")||(nO(this,uI).tabIndex=0))}disconnectedCallback(){var e,t,i,a;this.getAttribute(rW.MEDIA_CONTROLLER)&&(null==(t=null==(e=nO(this,uI))?void 0:e.unassociateElement)||t.call(e,this)),null==(i=nO(this,uI))||i.removeEventListener("pointerdown",this),null==(a=nO(this,uI))||a.removeEventListener("click",this),nx(this,uI,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===rY.TOUCH)return void this.handleTap(e);if(d===rY.MOUSE||d===rY.PEN)return void this.handleMouseClick(e)}}}get mediaPaused(){return nI(this,rF.MEDIA_PAUSED)}set mediaPaused(e){nC(this,rF.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let t=this.mediaPaused?rU.MEDIA_PLAY_REQUEST:rU.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new no.CustomEvent(t,{composed:!0,bubbles:!0}))}}uI=new WeakMap,nN.shadowRootOptions={mode:"open"},nN.getTemplateHTML=function(e){return` 85 <style> 86 :host { 87 display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block)); 88 box-sizing: border-box; 89 } 90 </style> 91 `},no.customElements.get("media-gesture-receiver")||no.customElements.define("media-gesture-receiver",nN);var nP=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nU=(e,t,i)=>(nP(e,t,"read from private field"),i?i.call(e):t.get(e)),nW=(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)},nB=(e,t,i,a)=>(nP(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),nH=(e,t,i)=>(nP(e,t,"access private method"),i);let nF={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"},nV=Object.values(rF);function nK(e,t){var i,a,r;if(!e.isConnected)return;let n=Object.fromEntries((null!=(i=e.getAttribute(nF.BREAKPOINTS))?i:"sm:384 md:576 lg:768 xl:960").split(/\s+/).map(e=>e.split(":"))),s=(a=n,r=t,Object.keys(a).filter(e=>r>=parseInt(a[e]))),o=!1;if(Object.keys(n).forEach(t=>{if(s.includes(t)){e.hasAttribute(`breakpoint${t}`)||(e.setAttribute(`breakpoint${t}`,""),o=!0);return}e.hasAttribute(`breakpoint${t}`)&&(e.removeAttribute(`breakpoint${t}`),o=!0)}),o){let t=new CustomEvent(rV.BREAKPOINTS_CHANGE,{detail:s});e.dispatchEvent(t)}e.breakpointsComputed||(e.breakpointsComputed=!0,e.dispatchEvent(new CustomEvent(rV.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}class n$ extends no.HTMLElement{constructor(){if(super(),nW(this,uU),nW(this,uB),nW(this,uF),nW(this,uK),nW(this,uq),nW(this,uC,void 0),nW(this,uL,0),nW(this,uD,null),nW(this,uM,null),nW(this,uO,void 0),this.breakpointsComputed=!1,nW(this,ux,e=>{let t=this.media;for(let i of e)if("childList"===i.type){for(let e of i.removedNodes
91){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)}}),nW(this,uN,!1),nW(this,uP,e=>{nU(this,uN)||(setTimeout(()=>{!function(e){nK(e.target,e.contentRect.width)}(e),nB(this,uN,!1)},0),nB(this,uN,!0))}),nW(this,uG,void 0),nW(this,uj,()=>{if(!nU(this,uG).assignedElements({flatten:!0}).length){nU(this,uD)&&this.mediaUnsetCallback(nU(this,uD));return}this.handleMediaUpdated(this.media)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=np(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}nB(this,uC,new MutationObserver(nU(this,ux)))}static get observedAttributes(){return[nF.AUTOHIDE,nF.GESTURES_DISABLED].concat(nV).filter(e=>![rF.MEDIA_RENDITION_LIST,rF.MEDIA_AUDIO_TRACK_LIST,rF.MEDIA_CHAPTERS_CUES,rF.MEDIA_WIDTH,rF.MEDIA_HEIGHT,rF.MEDIA_ERROR,rF.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,t,i){e.toLowerCase()==nF.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&&(nB(this,uD,e),e.localName.includes("-")&&await no.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;nU(this,uC).observe(this,{childList:!0,subtree:!0}),nh(this,nU(this,uP));let t=null!=this.getAttribute(nF.AUDIO)?r5("audio player"):r5("video player");this.setAttribute("role","region"),this.setAttribute("aria-label",t),this.handleMediaUpdated(this.media),this.setAttribute(nF.USER_INACTIVE,""),nK(this,this.getBoundingClientRect().width);let i=this.querySelector(":scope > slot[slot=media]");i&&(nB(this,uG,i),nU(this,uG).addEventListener("slotchange",nU(this,uj))),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),null==(e=no.window)||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;nm(this,nU(this,uP)),clearTimeout(nU(this,uM)),nU(this,uC).disconnect(),this.media&&this.mediaUnsetCallback(this.media),null==(e=no.window)||e.removeEventListener("mouseup",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointermove",this),this.removeEventListener("pointerup",this),this.removeEventListener("mouseleave",this),this.removeEventListener("keyup",this),nU(this,uG)&&(nU(this,uG).removeEventListener("slotchange",nU(this,uj)),nB(this,uG,null)),nB(this,uN,!1)}mediaSetCallback(e){}mediaUnsetCallback(e){nB(this,uD,null)}handleEvent(e){switch(e.type){case"pointerdown":nB(this,uL,e.timeStamp);break;case"pointermove":nH(this,uU,uW).call(this,e);break;case"pointerup":nH(this,uB,uH).call(this,e);break;case"mouseleave":nH(this,uF,uV).call(this);break;case"mouseup":this.removeAttribute(nF.KEYBOARD_CONTROL);break;case"keyup":nH(this,uq,uY).call(this),this.setAttribute(nF.KEYBOARD_CONTROL,"")}}set autohide(e){let t=Number(e);nB(this,uO,isNaN(t)?0:t)}get autohide(){return(void 0===nU(this,uO)?2:nU(this,uO)).toString()}get breakpoints(){return nL(this,nF.BREAKPOINTS)}set breakpoints(e){nD(this,nF.BREAKPOINTS,e)}get audio(){return nI(this,nF.AUDIO)}set audio(e){nC(this,nF.AUDIO,e)}get gesturesDisabled(){return nI(this,nF.GESTURES_DISABLED)}set gesturesDisabled(e){nC(this,nF.GESTURES_DISABLED,e)}get keyboardControl(){return nI(this,nF.KEYBOARD_CONTROL)}set keyboardControl(e){nC(this,nF.KEYBOARD_CONTROL,e)}get noAutohide(){return nI(this,nF.NO_AUTOHIDE)}set noAutohide(e){nC(this,nF.NO_AUTOHIDE,e)}get autohideOverControls(){return nI(this,nF.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){nC(this,nF.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return nI(this,nF.USER_INACTIVE)}set userInteractive(e){nC(this,nF.USER_INACTIVE,e)}}uC=new WeakMap,uL=new WeakMap,uD=new WeakMap,uM=new WeakMap,uO=new WeakMap,ux=new WeakMap,uN=new WeakMap,uP=new WeakMap,uU=new WeakSet,uW=function(e){if("mouse"!==e.pointerType&&e.timeStamp-nU(this,uL)<250)return;nH(this,uK,u$).call(this),clearTimeout(nU(this,uM));let t=this.hasAttribute(nF.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(e.target)||t)&&nH(this,uq,uY).call(this)},uB=new WeakSet,uH=function(e){if("touch"===e.pointerType){let t=!this.hasAttribute(nF.USER_INACTIVE);[this,this.media].includes(e.target)&&t?nH(this,uF,uV).call(this):nH(this,uq,uY).call(this)}else e.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(null==e?void 0:e.localName))&&nH(this,uq,uY).call(this)},uF=new WeakSet,uV=function(){if(0>nU(this,uO)||this.hasAttribute(nF.USER_INACTIVE))return;this.setAttribute(nF.USER_INACTIVE,"");let e=new no.CustomEvent(rV.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(e)},uK=new WeakSet,u$=function(){if(!this.hasAttribute(nF.USER_INACTIVE))return;this.removeAttribute(nF.USER_INACTIVE);let e=new no.CustomEvent(rV.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(e)},uq=new WeakSet,uY=function(){nH(this,uK,u$).call(this),clearTimeout(nU(this,uM));let e=parseInt(this.autohide);e<0||nB(this,uM,setTimeout(()=>{nH(this,uF,uV).call(this)},1e3*e))},uG=new WeakMap,uj=new WeakMap,n$.shadowRootOptions={mode:"open"},n$.getTemplateHTML=function(e){return` 92 <style> 93 94 :host([${rF.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) { 95 outline: none; 96 } 97 98 :host { 99 box-sizing: border-box; 100 position: relative; 101 display: inline-block; 102 line-height: 0; 103 background-color: var(--media-background-color, #000); 104 overflow: hidden; 105 } 106 107 :host(:not([${nF.AUDIO}])) [part~=layer]:not([part~=media-layer]) { 108 position: absolute; 109 top: 0; 110 left: 0; 111 bottom: 0; 112 right: 0; 113 display: flex; 114 flex-flow: column nowrap; 115 align-items: start; 116 pointer-events: none; 117 background: none; 118 } 119 120 slot[name=media] { 121 display: var(--media-slot-display, contents); 122 } 123 124 125 :host([${nF.AUDIO}]) slot[name=media] { 126 display: var(--media-slot-display, none); 127 } 128 129 130 :host([${nF.AUDIO}]) [part~=layer][part~=gesture-layer] { 131 height: 0; 132 display: block; 133 } 134 135 136 :host(:not([${nF.AUDIO}])[${nF.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]), 137 :host(:not([${nF.AUDIO}])[${nF.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] { 138 display: none; 139 } 140 141 142 ::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([role=dialog]):not([hidden])) { 143 pointer-events: auto; 144 } 145 146 :host(:not([${nF.AUDIO}])) *[part~=layer][part~=centered-layer] { 147 align-items: center; 148 justify-content: center; 149 } 150 151 :host(:not([${nF.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]), 152 :host(:not([${nF.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] { 153 align-self: stretch; 154 flex-grow: 1; 155 } 156 157 slot[name=middle-chrome] { 158 display: inline; 159 flex-grow: 1; 160 pointer-events: none; 161 background: none; 162 } 163 164 165 ::slotted([slot=media]), 166 ::slotted([slot=poster]) { 167 width: 100%; 168 height: 100%; 169 } 170 171 172 :host(:not([${nF.AUDIO}])) .spacer { 173 flex-grow: 1; 174 } 175 176 177 :host(:-webkit-full-screen) { 178 179 width: 100% !important; 180 height: 100% !important; 181 } 182 183 184 ::slotted(:not([slot=media]):not([slot=poster]):not([${nF.NO_AUTOHIDE}]):not([hidden]):not([role=dialog])) { 185 opacity: 1; 186 transition: var(--media-control-transition-in, opacity 0.25s); 187 } 188 189 190 :host([${nF.USER_INACTIVE}]:not([${rF.MEDIA_PAUSED}]):not([${rF.MEDIA_IS_AIRPLAYING}
190]):not([${rF.MEDIA_IS_CASTING}]):not([${nF.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${nF.NO_AUTOHIDE}]):not([role=dialog])) { 191 opacity: 0; 192 transition: var(--media-control-transition-out, opacity 1s); 193 } 194 195 :host([${nF.USER_INACTIVE}]:not([${nF.NO_AUTOHIDE}]):not([${rF.MEDIA_PAUSED}]):not([${rF.MEDIA_IS_CASTING}]):not([${nF.AUDIO}])) ::slotted([slot=media]) { 196 cursor: none; 197 } 198 199 :host([${nF.USER_INACTIVE}][${nF.AUTOHIDE_OVER_CONTROLS}]:not([${nF.NO_AUTOHIDE}]):not([${rF.MEDIA_PAUSED}]):not([${rF.MEDIA_IS_CASTING}]):not([${nF.AUDIO}])) * { 200 --media-cursor: none; 201 cursor: none; 202 } 203 204 205 ::slotted(media-control-bar) { 206 align-self: stretch; 207 } 208 209 210 :host(:not([${nF.AUDIO}])[${rF.MEDIA_HAS_PLAYED}]) slot[name=poster] { 211 display: none; 212 } 213 214 ::slotted([role=dialog]) { 215 width: 100%; 216 height: 100%; 217 align-self: center; 218 } 219 220 ::slotted([role=menu]) { 221 align-self: end; 222 } 223 </style> 224 225 <slot name="media" part="layer media-layer"></slot> 226 <slot name="poster" part="layer poster-layer"></slot> 227 <slot name="gestures-chrome" part="layer gesture-layer"> 228 <media-gesture-receiver slot="gestures-chrome"> 229 <template shadowrootmode="${nN.shadowRootOptions.mode}"> 230 ${nN.getTemplateHTML({})} 231 </template> 232 </media-gesture-receiver> 233 </slot> 234 <span part="layer vertical-layer"> 235 <slot name="top-chrome" part="top chrome"></slot> 236 <slot name="middle-chrome" part="middle chrome"></slot> 237 <slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot> 238 239 <slot part="bottom chrome"></slot> 240 </span> 241 <slot name="dialog" part="layer dialog-layer"></slot> 242 `},no.customElements.get("media-container")||no.customElements.define("media-container",n$);var nq=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nY=(e,t,i)=>(nq(e,t,"read from private field"),i?i.call(e):t.get(e)),nG=(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)},nj=(e,t,i,a)=>(nq(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);
242class nz{constructor(e,t,{defaultValue:i}={defaultValue:void 0}){nG(this,uJ),nG(this,uz,void 0),nG(this,uQ,void 0),nG(this,uZ,void 0),nG(this,uX,new Set),nj(this,uz,e),nj(this,uQ,t),nj(this,uZ,new Set(i))}[Symbol.iterator](){return nY(this,uJ,u0).values()}get length(){return nY(this,uJ,u0).size}get value(){var e;return null!=(e=[...nY(this,uJ,u0)].join(" "))?e:""}set value(e){var t;e!==this.value&&(nj(this,uX,new Set),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return[...nY(this,uJ,u0)][e]}values(){return nY(this,uJ,u0).values()}forEach(e,t){nY(this,uJ,u0).forEach(e,t)}add(...e){var t,i;e.forEach(e=>nY(this,uX).add(e)),(""!==this.value||(null==(t=nY(this,uz))?void 0:t.hasAttribute(`${nY(this,uQ)}`)))&&(null==(i=nY(this,uz))||i.setAttribute(`${nY(this,uQ)}`,`${this.value}`))}remove(...e){var t;e.forEach(e=>nY(this,uX).delete(e)),null==(t=nY(this,uz))||t.setAttribute(`${nY(this,uQ)}`,`${this.value}`)}contains(e){return nY(this,uJ,u0).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}}uz=new WeakMap,uQ=new WeakMap,uZ=new WeakMap,uX=new WeakMap,uJ=new WeakSet,u0=function(){return nY(this,uX).size?nY(this,uX):nY(this,uZ)};let nQ=(e="")=>{let[t,i,a]=e.split(":"),r=a?decodeURIComponent(a):void 0;return{kind:"cc"===t?r$.CAPTIONS:r$.SUBTITLES,language:i,label:r}},nZ=(e="",t={})=>((e="")=>e.split(/\s+/))(e).map(e=>{let i=nQ(e);return{...t,...i}}),nX=e=>e?Array.isArray(e)?e.map(e=>"string"==typeof e?nQ(e):e):"string"==typeof e?nZ(e):[e]:[],nJ=({kind:e,label:t,language:i}={kind:"subtitles"})=>t?`${"captions"===e?"cc":"sb"}:${i}:${encodeURIComponent(t)}`:i,n0=(e=[])=>Array.prototype.map.call(e,nJ).join(" "),n1=e=>{let t=Object.entries(e).map(([e,t])=>i=>i[e]===t);return e=>t.every(t=>t(e))},n2=(e,t=[],i=[])=>{let a=nX(i).map(n1);Array.from(t).filter(e=>a.some(t=>t(e))).forEach(t=>{t.mode=e})},n3=(e,t=()=>!0)=>{if(!(null==e?void 0:e.textTracks))return[];let i="function"==typeof t?t:n1(t);return Array.from(e.textTracks).filter(i)},n4=e=>{var t;return!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)||e.hasAttribute(rF.MEDIA_SUBTITLES_SHOWING)},n5="exitFullscreen"in nl?"exitFullscreen":"webkitExitFullscreen"in nl?"webkitExitFullscreen":"webkitCancelFullScreen"in nl?"webkitCancelFullScreen":void 0,n9="fullscreenElement"in nl?"fullscreenElement":"webkitFullscreenElement"in nl?"webkitFullscreenElement":void 0,n8="fullscreenEnabled"in nl?"fullscreenEnabled":"webkitFullscreenEnabled"in nl?"webkitFullscreenEnabled":void 0,n6=()=>{var e;return r||(r=null==(e=null==nl?void 0:nl.createElement)?void 0:e.call(nl,"video"))},n7=async(e=n6())=>{if(!e)return!1;let t=e.volume;e.volume=t/2+.1;let i=new AbortController,a=await Promise.race([se(e,i.signal),st(e,t)]);return i.abort(),a},se=(e,t)=>new Promise(i=>{e.addEventListener("volumechange",()=>i(!0),{signal:t})}),st=async(e,t)=>{for(let i=0;i<10;i++){if(e.volume===t)return!1;await r2(10)}return e.volume!==t},si=/.*Version\/.*Safari\/.*/.test(no.navigator.userAgent),sa=(e=n6())=>(!no.matchMedia("(display-mode: standalone)").matches||!si)&&"function"==typeof(null==e?void 0:e.requestPictureInPicture),sr=(e=n6())=>(e=>{let{documentElement:t,media:i}=e;return!!(null==t?void 0:t[n8])||i&&"webkitSupportsFullscreen"in i})({documentElement:nl,media:e}),sn=sr(),ss=sa(),so=!!no.WebKitPlaybackTargetAvailabilityEvent,sl=!!no.chrome,sd=e=>n3(e.media,e=>[r$.SUBTITLES,r$.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),su=e=>n3(e.media,e=>e.mode===rq.SHOWING&&[r$.SUBTITLES,r$.CAPTIONS].includes(e.kind)),sc=(e,t)=>{let i=sd(e),a=su(e),r=!!a.length;if(i.length){if(!1===t||r&&!0!==t)n2(rq.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=no.localStorage.getItem("media-chrome-pref-subtitles-lang"),a=e?[e,...no.navigator.languages]:no.navigator.languages,r=i.filter(e=>a.some(t=>e.language.toLowerCase().startsWith(t.split("-")[0]))).sort((e,t)=>
242a.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;n2(rq.DISABLED,i,a),n2(rq.SHOWING,i,[{language:n,label:s,kind:o}])}}},sh=(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)?sm(e,t):Object.entries(e).every(([e,i])=>e in t&&sh(i,t[e])))),sm=(e,t)=>{let i=Array.isArray(e),a=Array.isArray(t);return i===a&&(!i&&!a||e.length===t.length&&e.every((e,i)=>sh(e,t[i])))},sp=Object.values(rj),sv=n7().then(e=>n=e),sE=async(...e)=>{await Promise.all(e.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof no.HTMLElement))return;let t=e.localName;if(!t.includes("-"))return;let i=no.customElements.get(t);i&&e instanceof i||(await no.customElements.whenDefined(t),no.customElements.upgrade(e))}))},sb=new no.DOMParser,sg={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!==no.localStorage.getItem("media-chrome-pref-muted"),r=i.hasAttribute("muted");if(a){t&&no.localStorage.removeItem("media-chrome-pref-muted");return}if(r&&!t)return;no.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"===no.localStorage.getItem("media-chrome-pref-muted");sg.mediaMuted.set(i,t),e(i)}catch(e){console.debug("Error getting muted pref",e)}}]},mediaLoop:{get(e){let{media:t}=e;return null==t?void 0:t.loop},set(e,t){let{media:i}=t;i&&(i.loop=e)},mediaEvents:["medialooprequest"]},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?no.localStorage.removeItem("media-chrome-pref-volume"):i.hasAttribute("muted")||a||no.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=no.localStorage.getItem("media-chrome-pref-volume");if(null==a)return;sg.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&&r0(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=[rj.LIVE,rj.ON_DEMAND].includes(i)?i:void 0;if(!t)return a;let{streamType:r}=t;if(sp.includes(r))return r===rj.UNKNOWN?a:r;let n=t.duration;return n===1/0?rj.LIVE:Number.isFinite(n)?rj.ON_DEMAND:a}
242,mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(e){let{media:t}=e;if(!t)return NaN;let{targetLiveWindow:i}=t,a=sg.mediaStreamType.get(e);return(null==i||Number.isNaN(i))&&a===rj.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(sg.mediaStreamType.get(e)!==rj.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=>sd(e).map(({kind:e,label:t,language:i})=>({kind:e,label:t,language:i})),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get:e=>su(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&&![r$.CAPTIONS,r$.SUBTITLES].includes(null==(i=null==e?void 0:e.track)?void 0:i.kind)||sc(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]=n3(i,{kind:r$.CHAPTERS});return Array.from(null!=(t=null==a?void 0:a.cues)?t:[]).map(({text:e,startTime:t,endTime:i})=>({text:e&&sb.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("-"))&&nf(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(!nl.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 nl.pictureInPictureElement&&nl.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.");
242for(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[n9];return!a&&"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&i.webkitDisplayingFullscreen&&i.webkitPresentationMode===rz.FULLSCREEN?i:a})(e);if(!n)return!1;if(n===r||n===i)return!0;if(n.localName.includes("-")){let e=n.shadowRoot;if(!(n9 in e))return nf(n,r);for(;null==e?void 0:e[n9];){if(e[n9]===r)return!0;e=null==(t=e[n9])?void 0:t.shadowRoot}}return!1})(e),set(e,t,i){var a,r;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)?void 0:a.inert)||null==(r=t.media)||r.focus()):(e=>{var t;let{documentElement:i}=e;if(n5){let e=null==(t=null==i?void 0:i[n5])?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"&&"connected"===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&&no.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(!sn||!sr(t))return rG.UNSUPPORTED}},mediaPipUnavailable:{get(e){let{media:t}=e;return ss&&sa(t)?(null==t?void 0:t.disablePictureInPicture)?rG.UNAVAILABLE:void 0:rG.UNSUPPORTED}},mediaVolumeUnavailable:{get(e){let{media:t}=e;if(!1===n||(null==t?void 0:t.volume)==void 0)return rG.UNSUPPORTED},stateOwnersUpdateHandlers:[e=>{null==n&&sv.then(t=>e(t?void 0:rG.UNSUPPORTED))}]},mediaCastUnavailable:{get(e,{availability:t="not-available"}={}){var i;let{media:a}=e;return sl&&(null==(i=null==a?void 0:a.remote)?void 0:i.state)?null!=t&&"available"!==t?rG.UNAVAILABLE:void 0:rG.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)=>so?(null==t?void 0:t.availability)==="not-available"?rG.UNAVAILABLE:void 0:rG.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:rG.UNAVAILABLE:rG.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?rG.UNAVAILABLE:void 0:rG.UNSUPPORTED},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(e){let{options:{mediaLang:t}={}}=e;return null!=t?t:"en"}}},sf={[rU.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]=n3(l,{kind:r$.METADATA,label:"thumbnails"}),t=Array.prototype.find.call(null!=(a=null==e?void 0:e.cues)?a:[],(e,t,i)=>0===t?e.endTime>
242d: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}},[rU.MEDIA_PAUSE_REQUEST](e,t){e.mediaPaused.set(!0,t)},[rU.MEDIA_PLAY_REQUEST](e,t){var i,a,r,n;let s=e.mediaStreamType.get(t)===rj.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)},[rU.MEDIA_PLAYBACK_RATE_REQUEST](e,t,{detail:i}){e.mediaPlaybackRate.set(i,t)},[rU.MEDIA_MUTE_REQUEST](e,t){e.mediaMuted.set(!0,t)},[rU.MEDIA_UNMUTE_REQUEST](e,t){e.mediaVolume.get(t)||e.mediaVolume.set(.25,t),e.mediaMuted.set(!1,t)},[rU.MEDIA_LOOP_REQUEST](e,t,{detail:i}){let a=!!i;return e.mediaLoop.set(a,t),{mediaLoop:a}},[rU.MEDIA_VOLUME_REQUEST](e,t,{detail:i}){i&&e.mediaMuted.get(t)&&e.mediaMuted.set(!1,t),e.mediaVolume.set(i,t)},[rU.MEDIA_SEEK_REQUEST](e,t,{detail:i}){e.mediaCurrentTime.set(i,t)},[rU.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)},[rU.MEDIA_SHOW_SUBTITLES_REQUEST](e,t,{detail:i}){var a;let{options:r}=t,n=sd(t),s=nX(i),o=null==(a=s[0])?void 0:a.language;o&&!r.noSubtitlesLangPref&&no.localStorage.setItem("media-chrome-pref-subtitles-lang",o),n2(rq.SHOWING,n,s)},[rU.MEDIA_DISABLE_SUBTITLES_REQUEST](e,t,{detail:i}){let a=sd(t);n2(rq.DISABLED,a,null!=i?i:[])},[rU.MEDIA_TOGGLE_SUBTITLES_REQUEST](e,t,{detail:i}){sc(t,i)},[rU.MEDIA_RENDITION_REQUEST](e,t,{detail:i}){e.mediaRenditionSelected.set(i,t)},[rU.MEDIA_AUDIO_TRACK_REQUEST](e,t,{detail:i}){e.mediaAudioTrackEnabled.set(i,t)},[rU.MEDIA_ENTER_PIP_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsPip.set(!0,t)},[rU.MEDIA_EXIT_PIP_REQUEST](e,t){e.mediaIsPip.set(!1,t)},[rU.MEDIA_ENTER_FULLSCREEN_REQUEST](e,t,i){e.mediaIsPip.get(t)&&e.mediaIsPip.set(!1,t),e.mediaIsFullscreen.set(!0,t,i)},[rU.MEDIA_EXIT_FULLSCREEN_REQUEST](e,t){e.mediaIsFullscreen.set(!1,t)},[rU.MEDIA_ENTER_CAST_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsCasting.set(!0,t)},[rU.MEDIA_EXIT_CAST_REQUEST](e,t){e.mediaIsCasting.set(!1,t)},[rU.MEDIA_AIRPLAY_REQUEST](e,t){e.mediaIsAirplaying.set(!0,t)}};var s_=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sy=(e,t,i)=>(s_(e,t,"read from private field"),i?i.call(e):t.get(e)),sT=(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)},sA=(e,t,i,a)=>(s_(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),sk=(e,t,i)=>(s_(e,t,"access private method"),i);let sw=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," ","f","m","k","c","l","j",">","<","p"],sR={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",DEFAULT_DURATION:"defaultduration",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYBOARD_BACKWARD_SEEK_OFFSET:"keyboardbackwardseekoffset",KEYBOARD_FORWARD_SEEK_OFFSET:"keyboardforwardseekoffset",KEYBOARD_DOWN_VOLUME_STEP:"keyboarddownvolumestep",KEYBOARD_UP_VOLUME_STEP:"keyboardupvolumestep",KEYS_USED:"keysused",LANG:"lang",LOOP:"loop",LIVE_EDGE_OFFSET:"liveedgeoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_DEFAULT_STORE:"nodefaultstore",NO_HOTKEYS:"nohotkeys",NO_MUTED_PREF:"nomutedpref",NO_SUBTITLES_LANG_PREF:"nosubtitleslangpref",NO_VOLUME_PREF:"novolumepref",SEEK_TO_LIVE_OFFSET:"seektoliveoffset"};class sS extends n${constructor(){super(),sT(this,u7),sT(this,ci),sT(this,cr),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,sT(this,u1,new nz(this,sR.HOTKEYS)),sT(this,u2,void 0),sT(this,u3,void 0),sT(this,u4,null),sT(this,u5,void 0),sT(this,u9,void 0),sT(this,u8,e=>{var t;null==(t=sy(this,u3))||t.dispatch(e)}),sT(this,u6,void 0),sT(this,ct,e=>{let{key:t,shiftKey:i}=e;if(!(i&&("/"===t||"?"===t)||sw.includes(t)))return void this.removeEventListener("keyup",sy(this,ct));this.keyboardShortcutHandler(e)}),this.associateElement(this);let e={};sA(this,u5,t=>{Object.entries(t).forEach(([t,i])=>{if(t in e&&e[t]===i)return;
242this.propagateMediaState(t,i);let a=t.toLowerCase(),r=new no.CustomEvent(rK[a],{composed:!0,detail:i});this.dispatchEvent(r)}),e=t})}static get observedAttributes(){return super.observedAttributes.concat(sR.NO_HOTKEYS,sR.HOTKEYS,sR.DEFAULT_STREAM_TYPE,sR.DEFAULT_SUBTITLES,sR.DEFAULT_DURATION,sR.NO_MUTED_PREF,sR.NO_VOLUME_PREF,sR.LANG,sR.LOOP,sR.LIVE_EDGE_OFFSET,sR.SEEK_TO_LIVE_OFFSET,sR.NO_AUTO_SEEK_TO_LIVE)}get mediaStore(){return sy(this,u3)}set mediaStore(e){var t,i;if(sy(this,u3)&&(null==(t=sy(this,u9))||t.call(this),sA(this,u9,void 0)),sA(this,u3,e),!sy(this,u3)&&!this.hasAttribute(sR.NO_DEFAULT_STORE))return void sk(this,u7,ce).call(this);sA(this,u9,null==(i=sy(this,u3))?void 0:i.subscribe(sy(this,u5)))}get fullscreenElement(){var e;return null!=(e=sy(this,u2))?e:this}set fullscreenElement(e){var t;this.hasAttribute(sR.FULLSCREEN_ELEMENT)&&this.removeAttribute(sR.FULLSCREEN_ELEMENT),sA(this,u2,e),null==(t=sy(this,u3))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return nI(this,sR.DEFAULT_SUBTITLES)}set defaultSubtitles(e){nC(this,sR.DEFAULT_SUBTITLES,e)}get defaultStreamType(){return nL(this,sR.DEFAULT_STREAM_TYPE)}set defaultStreamType(e){nD(this,sR.DEFAULT_STREAM_TYPE,e)}get defaultDuration(){return nR(this,sR.DEFAULT_DURATION)}set defaultDuration(e){nS(this,sR.DEFAULT_DURATION,e)}get noHotkeys(){return nI(this,sR.NO_HOTKEYS)}set noHotkeys(e){nC(this,sR.NO_HOTKEYS,e)}get keysUsed(){return nL(this,sR.KEYS_USED)}set keysUsed(e){nD(this,sR.KEYS_USED,e)}get liveEdgeOffset(){return nR(this,sR.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){nS(this,sR.LIVE_EDGE_OFFSET,e)}get noAutoSeekToLive(){return nI(this,sR.NO_AUTO_SEEK_TO_LIVE)}set noAutoSeekToLive(e){nC(this,sR.NO_AUTO_SEEK_TO_LIVE,e)}get noVolumePref(){return nI(this,sR.NO_VOLUME_PREF)}set noVolumePref(e){nC(this,sR.NO_VOLUME_PREF,e)}get noMutedPref(){return nI(this,sR.NO_MUTED_PREF)}set noMutedPref(e){nC(this,sR.NO_MUTED_PREF,e)}get noSubtitlesLangPref(){return nI(this,sR.NO_SUBTITLES_LANG_PREF)}set noSubtitlesLangPref(e){nC(this,sR.NO_SUBTITLES_LANG_PREF,e)}get noDefaultStore(){return nI(this,sR.NO_DEFAULT_STORE)}set noDefaultStore(e){nC(this,sR.NO_DEFAULT_STORE,e)}get resolvedLang(){let[e]=r4.split("-");return r3[r4]?r4:r3[e]?e:"en"}attributeChangedCallback(e,t,i){var a,r,n,s,o,l,d,u,c,h,m,p;if(super.attributeChangedCallback(e,t,i),e===sR.NO_HOTKEYS)i!==t&&""===i?(this.hasAttribute(sR.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===sR.HOTKEYS)sy(this,u1).value=i;else if(e===sR.DEFAULT_SUBTITLES&&i!==t)null==(a=sy(this,u3))||a.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(sR.DEFAULT_SUBTITLES)}});else if(e===sR.DEFAULT_STREAM_TYPE)null==(n=sy(this,u3))||n.dispatch({type:"optionschangerequest",detail:{defaultStreamType:null!=(r=this.getAttribute(sR.DEFAULT_STREAM_TYPE))?r:void 0}});else if(e===sR.LIVE_EDGE_OFFSET&&i!==t)null==(s=sy(this,u3))||s.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(sR.LIVE_EDGE_OFFSET)?+this.getAttribute(sR.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(sR.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(sR.SEEK_TO_LIVE_OFFSET):this.hasAttribute(sR.LIVE_EDGE_OFFSET)?+this.getAttribute(sR.LIVE_EDGE_OFFSET):void 0}});else if(e===sR.SEEK_TO_LIVE_OFFSET&&i!==t)null==(o=sy(this,u3))||o.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(sR.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(sR.SEEK_TO_LIVE_OFFSET):this.hasAttribute(sR.LIVE_EDGE_OFFSET)?+this.getAttribute(sR.LIVE_EDGE_OFFSET):void 0}});else if(e===sR.NO_AUTO_SEEK_TO_LIVE)null==(l=sy(this,u3))||l.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(sR.NO_AUTO_SEEK_TO_LIVE)}});else if(e===sR.FULLSCREEN_ELEMENT){let e=i?null==(d=this.getRootNode())?void 0:d.getElementById(i):void 0;sA(this,u2,e),null==(u=sy(this,u3))||u.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===sR.LANG&&i!==t?(r4=i,null==(c=sy(this,u3))||c.dispatch({type:"optionschangerequest",detail:{mediaLang:i}}
242)):e===sR.LOOP&&i!==t?null==(h=sy(this,u3))||h.dispatch({type:rU.MEDIA_LOOP_REQUEST,detail:null!=i}):e===sR.NO_VOLUME_PREF&&i!==t?null==(m=sy(this,u3))||m.dispatch({type:"optionschangerequest",detail:{noVolumePref:this.hasAttribute(sR.NO_VOLUME_PREF)}}):e===sR.NO_MUTED_PREF&&i!==t&&(null==(p=sy(this,u3))||p.dispatch({type:"optionschangerequest",detail:{noMutedPref:this.hasAttribute(sR.NO_MUTED_PREF)}}))}connectedCallback(){var e,t,i;this.associateElement(this),sy(this,u3)||this.hasAttribute(sR.NO_DEFAULT_STORE)||sk(this,u7,ce).call(this),null==(e=sy(this,u3))||e.dispatch({type:"documentelementchangerequest",detail:nl}),null==(t=sy(this,u3))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement}),super.connectedCallback(),sy(this,u3)&&!sy(this,u9)&&sA(this,u9,null==(i=sy(this,u3))?void 0:i.subscribe(sy(this,u5))),void 0!==sy(this,u6)&&sy(this,u3)&&this.media&&setTimeout(()=>{var e,t,i;(null==(t=null==(e=this.media)?void 0:e.textTracks)?void 0:t.length)&&(null==(i=sy(this,u3))||i.dispatch({type:rU.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:sy(this,u6)}))},0),this.hasAttribute(sR.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var e,t,i,a,r,n;if(null==(e=super.disconnectedCallback)||e.call(this),this.disableHotkeys(),sy(this,u3)){let e=sy(this,u3).getState();sA(this,u6,!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)),null==(i=sy(this,u3))||i.dispatch({type:"fullscreenelementchangerequest",detail:void 0}),null==(a=sy(this,u3))||a.dispatch({type:"documentelementchangerequest",detail:void 0}),null==(r=sy(this,u3))||r.dispatch({type:rU.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})}sy(this,u9)&&(null==(n=sy(this,u9))||n.call(this),sA(this,u9,void 0)),this.unassociateElement(this),sy(this,u4)&&(sy(this,u4).remove(),sA(this,u4,null))}mediaSetCallback(e){var t;super.mediaSetCallback(e),null==(t=sy(this,u3))||t.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var t;super.mediaUnsetCallback(e),null==(t=sy(this,u3))||t.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,t){sP(this.mediaStateReceivers,e,t)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(t.has(e))return;let i=sU(e,this.registerMediaStateReceiver.bind(this),this.unregisterMediaStateReceiver.bind(this));Object.values(rU).forEach(t=>{e.addEventListener(t,sy(this,u8))}),t.set(e,i)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;t.has(e)&&(t.get(e)(),t.delete(e),Object.values(rU).forEach(t=>{e.removeEventListener(t,sy(this,u8))}))}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;!(t.indexOf(e)>-1)&&(t.push(e),sy(this,u3)&&Object.entries(sy(this,u3).getState()).forEach(([t,i])=>{sP([e],t,i)}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,i=t.indexOf(e);i<0||t.splice(i,1)}enableHotkeys(){this.addEventListener("keydown",sk(this,ci,ca))}disableHotkeys(){this.removeEventListener("keydown",sk(this,ci,ca)),this.removeEventListener("keyup",sy(this,ct))}get hotkeys(){return sy(this,u1)}set hotkeys(e){nD(this,sR.HOTKEYS,e)}keyboardShortcutHandler(e){var t,i,a,r,n,s,o,l,d;let u,c,h,m=e.target;if(!((null!=(a=null!=(i=null==(t=m.getAttribute(sR.KEYS_USED))?void 0:t.split(" "))?i:null==m?void 0:m.keysUsed)?a:[]).map(e=>
242"Space"===e?" ":e).filter(Boolean).includes(e.key)||sy(this,u1).contains(`no${e.key.toLowerCase()}`)||" "===e.key&&sy(this,u1).contains("nospace"))&&!(e.shiftKey&&("/"===e.key||"?"===e.key)&&sy(this,u1).contains("noshift+/")))switch(e.key){case" ":case"k":u=sy(this,u3).getState().mediaPaused?rU.MEDIA_PLAY_REQUEST:rU.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new no.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"m":u="off"===this.mediaStore.getState().mediaVolumeLevel?rU.MEDIA_UNMUTE_REQUEST:rU.MEDIA_MUTE_REQUEST,this.dispatchEvent(new no.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"f":u=this.mediaStore.getState().mediaIsFullscreen?rU.MEDIA_EXIT_FULLSCREEN_REQUEST:rU.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new no.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new no.CustomEvent(rU.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":case"j":{let e=this.hasAttribute(sR.KEYBOARD_BACKWARD_SEEK_OFFSET)?+this.getAttribute(sR.KEYBOARD_BACKWARD_SEEK_OFFSET):10;c=Math.max((null!=(r=this.mediaStore.getState().mediaCurrentTime)?r:0)-e,0),h=new no.CustomEvent(rU.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break}case"ArrowRight":case"l":{let e=this.hasAttribute(sR.KEYBOARD_FORWARD_SEEK_OFFSET)?+this.getAttribute(sR.KEYBOARD_FORWARD_SEEK_OFFSET):10;c=Math.max((null!=(n=this.mediaStore.getState().mediaCurrentTime)?n:0)+e,0),h=new no.CustomEvent(rU.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break}case"ArrowUp":{let e=this.hasAttribute(sR.KEYBOARD_UP_VOLUME_STEP)?+this.getAttribute(sR.KEYBOARD_UP_VOLUME_STEP):.025;c=Math.min((null!=(s=this.mediaStore.getState().mediaVolume)?s:1)+e,1),h=new no.CustomEvent(rU.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break}case"ArrowDown":{let e=this.hasAttribute(sR.KEYBOARD_DOWN_VOLUME_STEP)?+this.getAttribute(sR.KEYBOARD_DOWN_VOLUME_STEP):.025;c=Math.max((null!=(o=this.mediaStore.getState().mediaVolume)?o:1)-e,0),h=new no.CustomEvent(rU.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break}case"<":c=Math.max((null!=(l=this.mediaStore.getState().mediaPlaybackRate)?l:1)-.25,.25).toFixed(2),h=new no.CustomEvent(rU.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break;case">":c=Math.min((null!=(d=this.mediaStore.getState().mediaPlaybackRate)?d:1)+.25,2).toFixed(2),h=new no.CustomEvent(rU.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break;case"/":case"?":e.shiftKey&&sk(this,cr,cn).call(this);break;case"p":u=this.mediaStore.getState().mediaIsPip?rU.MEDIA_EXIT_PIP_REQUEST:rU.MEDIA_ENTER_PIP_REQUEST,h=new no.CustomEvent(u,{composed:!0,bubbles:!0}),this.dispatchEvent(h)}}}u1=new WeakMap,u2=new WeakMap,u3=new WeakMap,u4=new WeakMap,u5=new WeakMap,u9=new WeakMap,u8=new WeakMap,u6=new WeakMap,u7=new WeakSet,ce=function(){var e;this.mediaStore=(({media:e,fullscreenElement:t,documentElement:i,stateMediator:a=sg,requestMap:r=sf,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&&(sh(e,u)||(u=Object.freeze({...u,...e}),l.forEach(e=>e(u))))},h=()=>{c(Object.entries(a).reduce((e,[t,{get:i}])=>(e[t]=i(d),e),{}))},m={},p=async(e,t)=>{var i,r,n,u,p,v,E,b,g,f,y,T,A,k,w,R;let S=!!o;if(o={...d,...null!=o?o:{},...e},S)return;await sE(...Object.values(e));let I=l.length>0&&0===t&&s,C=d.media!==o.media,L=(null==(i=d.media)?void 0:i.textTracks)!==(null==(r=o.media)?void 0:r.textTracks),D=(null==(n=d.media)?void 0:n.videoRenditions)!==(null==(u=o.media)?void 0:u.videoRenditions),M=(null==(p=d.media)?void 0:p.audioTracks)!==(null==(v=o.media)?void 0:v.audioTracks),O=(null==(E=d.media)?void 0:E.remote)!==(null==(b=o.media)?void 0:b.remote),x=d.documentElement!==o.documentElement,N=!!d.media&&(C||I),P=!!(null==(g=d.media)?void 0:g.textTracks)&&(L||I),U=!!(null==(f=d.media)?void 0:f.videoRenditions)&&(D||I),W=!!(null==(y=d.media)?void 0:y.audioTracks)&&(M||I),B=!!(null==(T=d.media)?void 0:T.remote)&&(O||I),H=!!d.documentElement&&(x||I),F=N||P||U||W||B||H,V=0===l.length&&1===t&&s,K=!!o.media&&(C||V),$=!!(null==(A=o.media)?void 0:A.textTracks)&&(L||V),q=!!(null==(k=o.media)?void 0:k.videoRenditions)&&(D||V),Y=!!(null==(w=o.media)?void 0:w.audioTracks)&&(M||V),G=!!(null==(R=o.media)?void 0:R.remote)&&(O||V),j=!!o.documentElement&&(x||V),z=K||$||q||Y||G||j;
242if(!(F||z)){Object.entries(o).forEach(([e,t])=>{d[e]=t}),h(),o=void 0;return}Object.entries(a).forEach(([e,{get:t,mediaEvents:i=[],textTracksEvents:a=[],videoRenditionsEvents:r=[],audioTracksEvents:n=[],remoteEvents:s=[],rootEvents:l=[],stateOwnersUpdateHandlers:u=[]}])=>{let h;m[e]||(m[e]={});let p=i=>{c({[e]:t(d,i)})};h=m[e].mediaEvents,i.forEach(t=>{h&&N&&(d.media.removeEventListener(t,h),m[e].mediaEvents=void 0),K&&(o.media.addEventListener(t,p),m[e].mediaEvents=p)}),h=m[e].textTracksEvents,a.forEach(t=>{var i,a;h&&P&&(null==(i=d.media.textTracks)||i.removeEventListener(t,h),m[e].textTracksEvents=void 0),$&&(null==(a=o.media.textTracks)||a.addEventListener(t,p),m[e].textTracksEvents=p)}),h=m[e].videoRenditionsEvents,r.forEach(t=>{var i,a;h&&U&&(null==(i=d.media.videoRenditions)||i.removeEventListener(t,h),m[e].videoRenditionsEvents=void 0),q&&(null==(a=o.media.videoRenditions)||a.addEventListener(t,p),m[e].videoRenditionsEvents=p)}),h=m[e].audioTracksEvents,n.forEach(t=>{var i,a;h&&W&&(null==(i=d.media.audioTracks)||i.removeEventListener(t,h),m[e].audioTracksEvents=void 0),Y&&(null==(a=o.media.audioTracks)||a.addEventListener(t,p),m[e].audioTracksEvents=p)}),h=m[e].remoteEvents,s.forEach(t=>{var i,a;h&&B&&(null==(i=d.media.remote)||i.removeEventListener(t,h),m[e].remoteEvents=void 0),G&&(null==(a=o.media.remote)||a.addEventListener(t,p),m[e].remoteEvents=p)}),h=m[e].rootEvents,l.forEach(t=>{h&&H&&(d.documentElement.removeEventListener(t,h),m[e].rootEvents=void 0),j&&(o.documentElement.addEventListener(t,p),m[e].rootEvents=p)});let v=m[e].stateOwnersUpdateHandlers;if(v&&F&&(Array.isArray(v)?v:[v]).forEach(e=>{"function"==typeof e&&e()}),z){let t=u.map(e=>e(p,o)).filter(e=>"function"==typeof e);m[e].stateOwnersUpdateHandlers=1===t.length?t[0]:t}else F&&(m[e].stateOwnersUpdateHandlers=void 0)}),Object.entries(o).forEach(([e,t])=>{d[e]=t}),h(),o=void 0};return p({media:e,fullscreenElement:t,documentElement:i,options:n}),{dispatch(e){let{type:t,detail:i}=e;if(r[t]&&null==u.mediaErrorCode)return void c(r[t](a,d,e));"mediaelementchangerequest"===t?p({media:i}):"fullscreenelementchangerequest"===t?p({fullscreenElement:i}):"documentelementchangerequest"===t?p({documentElement:i}):"optionschangerequest"===t&&(Object.entries(null!=i?i:{}).forEach(([e,t])=>{d.options[e]=t}),h())},getState:()=>u,subscribe:e=>(p({},l.length+1),l.push(e),e(u),()=>{let t=l.indexOf(e);t>=0&&(p({},l.length-1),l.splice(t,1))})}})({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(sR.DEFAULT_SUBTITLES),defaultDuration:this.hasAttribute(sR.DEFAULT_DURATION)?+this.getAttribute(sR.DEFAULT_DURATION):void 0,defaultStreamType:null!=(e=this.getAttribute(sR.DEFAULT_STREAM_TYPE))?e:void 0,liveEdgeOffset:this.hasAttribute(sR.LIVE_EDGE_OFFSET)?+this.getAttribute(sR.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(sR.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(sR.SEEK_TO_LIVE_OFFSET):this.hasAttribute(sR.LIVE_EDGE_OFFSET)?+this.getAttribute(sR.LIVE_EDGE_OFFSET):void 0,noAutoSeekToLive:this.hasAttribute(sR.NO_AUTO_SEEK_TO_LIVE),noVolumePref:this.hasAttribute(sR.NO_VOLUME_PREF),noMutedPref:this.hasAttribute(sR.NO_MUTED_PREF),noSubtitlesLangPref:this.hasAttribute(sR.NO_SUBTITLES_LANG_PREF)}})},ct=new WeakMap,ci=new WeakSet,ca=function(e){var t;let{metaKey:i,altKey:a,key:r,shiftKey:n}=e,s=n&&("/"===r||"?"===r);if(s&&(null==(t=sy(this,u4))?void 0:t.open)||i||a||!s&&!sw.includes(r))return void this.removeEventListener("keyup",sy(this,ct));let o=e.target,l=o instanceof HTMLElement&&("media-volume-range"===o.tagName.toLowerCase()||"media-time-range"===o.tagName.toLowerCase());![" ","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)||sy(this,u1).contains(`no${r.toLowerCase()}`)||" "===r&&sy(this,u1).contains("nospace")||l||e.preventDefault(),this.addEventListener("keyup",sy(this,ct),{once:!0})},cr=new WeakSet,cn=function(){sy(this,u4)||(sA(this,u4,nl.createElement("media-keyboard-shortcuts-dialog")),this.appendChild(sy(this,u4))),sy(this,u4).open=!0};let sI=Object.values(rF),sC=Object.values(rB),sL=e=>{var t,i,a,r;let{observedAttributes:n}=e.constructor;!n&&(null==(t=e.nodeName)?void 0:t.includes("-"))&&(no.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,rW.MEDIA_CHROME_ATTRIBUTES))?void 0:a.split)?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(e=>sI.includes(e)):[]},sD=e=>(e=>{var t,i;return(null==(t=e.nodeName)?void 0:t.includes("-"))&&no.customElements.get(null==(i=e.nodeName)?void 0:i.toLowerCase())&&!(e instanceof no.customElements.get(e.nodeName.toLowerCase()))&&no.customElements.upgrade(e),sC.some(t=>t in e)})(e)||!!sL(e).length,sM=e=>{var t;return null==(t=null==e?void 0:e.join)?void 0:t.call(e,":")},sO={[rF.MEDIA_SUBTITLES_LIST]:n0,[rF.MEDIA_SUBTITLES_SHOWING]:n0,[rF.MEDIA_SEEKABLE]:sM,[rF.MEDIA_BUFFERED]:e=>null==e?void 0:e.map(sM).join(" "),[rF.MEDIA_PREVIEW_COORDS]:e=>null==e?void 0:e.join(" "),[rF.MEDIA_RENDITION_LIST]:function(e){return null==e?void 0:e.map(rQ).join(" ")},[rF.MEDIA_AUDIO_TRACK_LIST]:function(e){return null==e?void 0:e.map(rX).join(" ")}},sx=async(e,t,i)=>{var a,r;if(e.isConnected||await r2(0),"boolean"==typeof i||null==i)return nC(e,t,i);if("number"==typeof i)return nS(e,t,i);if("string"==typeof i)return nD(e,t,i);if(Array.isArray(i)&&!i.length)return e.removeAttribute(t);let n=null!=(r=null==(a=sO[t])?void 0:a.call(sO,i))?r:i;return e.setAttribute(t,n)},sN=(e,t)=>
242{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;sD(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=>sN(e,t))},a=null==e?void 0:e.nodeName.toLowerCase();if(a.includes("-")&&!sD(e))return void no.customElements.whenDefined(a).then(()=>{i(e,t)});i(e,t)},sP=(e,t,i)=>{e.forEach(e=>{if(t in e){e[t]=i;return}let a=sL(e),r=t.toLowerCase();a.includes(r)&&sx(e,r,i)})},sU=(e,t,i)=>{sN(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(rU.REGISTER_MEDIA_STATE_RECEIVER,a),e.addEventListener(rU.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=[],s=e=>{let a=e.target;"media"!==a.name&&(n.forEach(e=>sN(e,i)),(n=[...a.assignedElements({flatten:!0})]).forEach(e=>sN(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=>sN(e,t)),Array.prototype.forEach.call(r,e=>sN(e,i))):"attributes"===n&&o===rW.MEDIA_CHROME_ATTRIBUTES&&(sD(s)?t(s):i(s))})});return o.observe(e,{childList:!0,attributes:!0,subtree:!0}),()=>{sN(e,i),e.removeEventListener("slotchange",s),o.disconnect(),e.removeEventListener(rU.REGISTER_MEDIA_STATE_RECEIVER,a),e.removeEventListener(rU.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};no.customElements.get("media-controller")||no.customElements.define("media-controller",sS);let sW={PLACEMENT:"placement",BOUNDS:"bounds"};class sB extends no.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!nA(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=n_(this,"#"+this.bounds))?e:nv(this);if(!a)return;let{x:r,width:n}=a.getBoundingClientRect(),{x:s,width:o}=this.getBoundingClientRect(),l=i.getPropertyValue("--media-tooltip-offset-x"),d=l?parseFloat(l.replace("px","")):0,u=i.getPropertyValue("--media-tooltip-container-margin"),c=u?parseFloat(u.replace("px","")):0,h=s-r+d-c,m=s+o-(r+n)+d+c;return h<0?void this.style.setProperty("--media-tooltip-offset-x",`${h}px`):m>0?void this.style.setProperty("--media-tooltip-offset-x",`${m}px`):void this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=np(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[sW.PLACEMENT,sW.BOUNDS]}get placement(){return nL(this,sW.PLACEMENT)}set placement(e){nD(this,sW.PLACEMENT,e)}get bounds(){return nL(this,sW.BOUNDS)}set bounds(e){nD(this,sW.BOUNDS,e)}}sB.shadowRootOptions={mode:"open"},sB.getTemplateHTML=function(e){return` 243 <style> 244 :host { 245 --_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7))); 246 --_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color)); 247 --_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2); 248 --_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px); 249 --_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color)); 250 position: relative; 251 pointer-events: none; 252 display: var(--media-tooltip-display, inline-flex); 253 justify-content: center; 254 align-items: center; 255 box-sizing: border-box; 256 z-index: var(--media-tooltip-z-index, 1); 257 background: var(--_tooltip-background); 258 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 259 font: var(--media-font, 260 var(--media-font-weight, 400) 261 var(--media-font-size, 13px) / 262 var(--media-text-content-height, var(--media-control-height, 18px)) 263 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 264 padding: var(--media-tooltip-padding, .35em .7em); 265 border: var(--media-tooltip-border, none); 266 border-radius: var(--media-tooltip-border-radius, 5px); 267 filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2))); 268 white-space: var(--media-tooltip-white-space, nowrap); 269 } 270 271 :host([hidden]) { 272 display: none; 273 } 274 275 img, svg { 276 display: inline-block; 277 } 278 279 #arrow { 280 position: absolute; 281 width: 0px; 282 height: 0px; 283 border-style: solid; 284 display: var(--media-tooltip-arrow-display, block); 285 } 286 287 :host(:not([placement])), 288 :host([placement="top"]) { 289 position: absolute; 290 bottom: calc(100% + var(--media-tooltip-distance, 12px)); 291 left: 50%; 292 transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0
292); 293 } 294 :host(:not([placement])) #arrow, 295 :host([placement="top"]) #arrow { 296 top: 100%; 297 left: 50%; 298 border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width); 299 border-color: var(--_tooltip-arrow-background) transparent transparent transparent; 300 transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0); 301 } 302 303 :host([placement="right"]) { 304 position: absolute; 305 left: calc(100% + var(--media-tooltip-distance, 12px)); 306 top: 50%; 307 transform: translate(0, -50%); 308 } 309 :host([placement="right"]) #arrow { 310 top: 50%; 311 right: 100%; 312 border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0; 313 border-color: transparent var(--_tooltip-arrow-background) transparent transparent; 314 transform: translate(0, -50%); 315 } 316 317 :host([placement="bottom"]) { 318 position: absolute; 319 top: calc(100% + var(--media-tooltip-distance, 12px)); 320 left: 50%; 321 transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0); 322 } 323 :host([placement="bottom"]) #arrow { 324 bottom: 100%; 325 left: 50%; 326 border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width); 327 border-color: transparent transparent var(--_tooltip-arrow-background) transparent; 328 transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0); 329 } 330 331 :host([placement="left"]) { 332 position: absolute; 333 right: calc(100% + var(--media-tooltip-distance, 12px)); 334 top: 50%; 335 transform: translate(0, -50%); 336 } 337 :host([placement="left"]) #arrow { 338 top: 50%; 339 left: 100%; 340 border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height); 341 border-color: transparent transparent transparent var(--_tooltip-arrow-background); 342 transform: translate(0, -50%); 343 } 344 345 :host([placement="none"]) #arrow { 346 display: none; 347 } 348 </style> 349 <slot></slot> 350 <div id="arrow"></div> 351 `},no.customElements.get("media-tooltip")||no.customElements.define("media-tooltip",sB);var sH=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sF=(e,t,i)=>(sH(e,t,"read from private field"),i?i.call(e):t.get(e)),sV=(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)=>(sH(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let s$={TOOLTIP_PLACEMENT:"tooltipplacement",DISABLED:"disabled",NO_TOOLTIP:"notooltip"};class sq extends no.HTMLElement{constructor(){if(super(),sV(this,cc),sV(this,cs,void 0),this.preventClick=!1,this.tooltipEl=null,sV(this,co,e=>{this.preventClick||this.handleClick(e),setTimeout(sF(this,cl),0)}),sV(this,cl,()=>{var e,t;null==(t=null==(e=this.tooltipEl)?void 0:e.updateXOffset)||t.call(e)}),sV(this,cd,e=>{let{key:t}=e;if(!this.keysUsed.includes(t))return void this.removeEventListener("keyup",sF(this,cd));this.preventClick||this.handleClick(e)}),sV(this,cu,e=>{let{metaKey:t,altKey:i,key:a}=e;if(t||i||!this.keysUsed.includes(a))return void this.removeEventListener("keyup",sF(this,cd));this.addEventListener("keyup",sF(this,cd),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=np(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",s$.TOOLTIP_PLACEMENT,rW.MEDIA_CONTROLLER,rF.MEDIA_LANG]}enable(){this.addEventListener("click",sF(this,co)),this.addEventListener("keydown",sF(this,cu)),this.tabIndex=0}disable(){this.removeEventListener("click",sF(this,co)),this.removeEventListener("keydown",sF(this,cu)),this.removeEventListener("keyup",sF(this,cd)),this.tabIndex=-1}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===rW.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=sF(this,cs))?void 0:a.unassociateElement)||r.call(a,this),sK(this,cs,null)),i&&this.isConnected&&(sK(this,cs,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=sF(this,cs))?void 0:s.associateElement)||o.call(s,this))):"disabled"===e&&i!==t?null==i?this.enable():this.disable():e===s$.TOOLTIP_PLACEMENT&&this.tooltipEl&&i!==t?this.tooltipEl.placement=i:e===rF.MEDIA_LA
351NG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),sF(this,cl).call(this)}connectedCallback(){var e,t,i;let{style:a}=nk(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(rW.MEDIA_CONTROLLER);r&&(sK(this,cs,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=sF(this,cs))?void 0:t.associateElement)||i.call(t,this)),no.customElements.whenDefined("media-tooltip").then(()=>{var e,t;return(e=cc,t=ch,sH(this,e,"access private method"),t).call(this)})}disconnectedCallback(){var e,t;this.disable(),null==(t=null==(e=sF(this,cs))?void 0:e.unassociateElement)||t.call(e,this),sK(this,cs,null),this.removeEventListener("mouseenter",sF(this,cl)),this.removeEventListener("focus",sF(this,cl)),this.removeEventListener("click",sF(this,co))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return nL(this,s$.TOOLTIP_PLACEMENT)}set tooltipPlacement(e){nD(this,s$.TOOLTIP_PLACEMENT,e)}get mediaController(){return nL(this,rW.MEDIA_CONTROLLER)}set mediaController(e){nD(this,rW.MEDIA_CONTROLLER,e)}get disabled(){return nI(this,s$.DISABLED)}set disabled(e){nC(this,s$.DISABLED,e)}get noTooltip(){return nI(this,s$.NO_TOOLTIP)}set noTooltip(e){nC(this,s$.NO_TOOLTIP,e)}handleClick(e){}}cs=new WeakMap,co=new WeakMap,cl=new WeakMap,cd=new WeakMap,cu=new WeakMap,cc=new WeakSet,ch=function(){this.addEventListener("mouseenter",sF(this,cl)),this.addEventListener("focus",sF(this,cl)),this.addEventListener("click",sF(this,co));let e=this.tooltipPlacement;e&&this.tooltipEl&&(this.tooltipEl.placement=e)},sq.shadowRootOptions={mode:"open"},sq.getTemplateHTML=function(e,t={}){return` 352 <style> 353 :host { 354 position: relative; 355 font: var(--media-font, 356 var(--media-font-weight, bold) 357 var(--media-font-size, 14px) / 358 var(--media-text-content-height, var(--media-control-height, 24px)) 359 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 360 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 361 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 362 padding: var(--media-button-padding, var(--media-control-padding, 10px)); 363 justify-content: var(--media-button-justify-content, center); 364 display: inline-flex; 365 align-items: center; 366 vertical-align: middle; 367 box-sizing: border-box; 368 transition: background .15s linear; 369 pointer-events: auto; 370 cursor: var(--media-cursor, pointer); 371 -webkit-tap-highlight-color: transparent; 372 } 373 374 375 :host(:focus-visible) { 376 box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 377 outline: 0; 378 } 379 380 :host(:where(:focus)) { 381 box-shadow: none; 382 outline: 0; 383 } 384 385 :host(:hover) { 386 background: var(--media-control-hover-background, rgba(50 50 70 / .7)); 387 } 388 389 slot[name="icon"] { 390 display: inline-flex; 391 align-items: center; 392 } 393 394 svg, img, ::slotted(svg), ::slotted(img) { 395 width: var(--media-button-icon-width); 396 height: var(--media-button-icon-height, var(--media-control-height, 24px)); 397 transform: var(--media-button-icon-transform); 398 transition: var(--media-button-icon-transition); 399 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 400 vertical-align: middle; 401 max-width: 100%; 402 max-height: 100%; 403 min-width: 100%; 404 } 405 406 media-tooltip { 407 408 max-width: 0; 409 overflow-x: clip; 410 opacity: 0; 411 transition: opacity .3s, max-width 0s 9s; 412 } 413 414 :host(:hover) media-tooltip, 415 :host(:focus-visible) media-tooltip { 416 max-width: 100vw; 417 opacity: 1; 418 transition: opacity .3s; 419 } 420 421 :host([notooltip]) slot[name="tooltip"] { 422 display: none; 423 } 424 </style> 425
426 ${this.getSlotTemplateHTML(e,t)} 427 428 <slot name="tooltip"> 429 <media-tooltip part="tooltip" aria-hidden="true"> 430 <template shadowrootmode="${sB.shadowRootOptions.mode}"> 431 ${sB.getTemplateHTML({})} 432 </template> 433 <slot name="tooltip-content"> 434 ${this.getTooltipContentHTML(e)} 435 </slot> 436 </media-tooltip> 437 </slot> 438 `},sq.getSlotTemplateHTML=function(e,t){return` 439 <slot></slot> 440 `},sq.getTooltipContentHTML=function(){return""},no.customElements.get("media-chrome-button")||no.customElements.define("media-chrome-button",sq);let sY=`<svg aria-hidden="true" viewBox="0 0 26 24"> 441 <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"/> 442</svg> 443`,sG=e=>{let t=e.mediaIsAirplaying?r5("stop airplay"):r5("start airplay");e.setAttribute("aria-label",t)};class sj extends sq{static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_IS_AIRPLAYING,rF.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),sG(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rF.MEDIA_IS_AIRPLAYING&&sG(this)}get mediaIsAirplaying(){return nI(this,rF.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){nC(this,rF.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return nL(this,rF.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){nD(this,rF.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new no.CustomEvent(rU.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}}sj.getSlotTemplateHTML=function(e){return` 444 <style> 445 :host([${rF.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) { 446 display: none !important; 447 } 448 449 450 :host(:not([${rF.MEDIA_IS_AIRPLAYING}])) slot[name=icon] slot:not([name=enter]) { 451 display: none !important; 452 } 453 454 :host([${rF.MEDIA_IS_AIRPLAYING}]) slot[name=tooltip-enter], 455 :host(:not([${rF.MEDIA_IS_AIRPLAYING}])) slot[name=tooltip-exit] { 456 display: none; 457 } 458 </style> 459 460 <slot name="icon"> 461 <slot name="enter">${sY}</slot> 462 <slot name="exit">${sY}</slot> 463 </slot> 464 `},sj.getTooltipContentHTML=function(){return` 465 <slot name="tooltip-enter">${r5("start airplay")}</slot> 466 <slot name="tooltip-exit">${r5("stop airplay")}</slot> 467 `},no.customElements.get("media-airplay-button")||no.customElements.define("media-airplay-button",sj);let sz=`<svg aria-hidden="true" viewBox="0 0 26 24"> 468 <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"/> 469</svg>`,sQ=`<svg aria-hidden="true" viewBox="0 0 26 24"> 470 <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.8
4701 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"/> 471</svg>`,sZ=e=>{e.setAttribute("aria-checked",n4(e).toString())};class sX extends sq{static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_SUBTITLES_LIST,rF.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.setAttribute("aria-label",r5("closed captions")),sZ(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rF.MEDIA_SUBTITLES_SHOWING&&sZ(this)}get mediaSubtitlesList(){return sJ(this,rF.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){s0(this,rF.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return sJ(this,rF.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){s0(this,rF.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new no.CustomEvent(rU.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}sX.getSlotTemplateHTML=function(e){return` 472 <style> 473 :host([aria-checked="true"]) slot[name=off] { 474 display: none !important; 475 } 476 477 478 :host(:not([aria-checked="true"])) slot[name=on] { 479 display: none !important; 480 } 481 482 :host([aria-checked="true"]) slot[name=tooltip-enable], 483 :host(:not([aria-checked="true"])) slot[name=tooltip-disable] { 484 display: none; 485 } 486 </style> 487 488 <slot name="icon"> 489 <slot name="on">${sz}</slot> 490 <slot name="off">${sQ}</slot> 491 </slot> 492 `},sX.getTooltipContentHTML=function(){return` 493 <slot name="tooltip-enable">${r5("Enable captions")}</slot> 494 <slot name="tooltip-disable">${r5("Disable captions")}</slot> 495 `};let sJ=(e,t)=>{let i=e.getAttribute(t);return i?nZ(i):[]},s0=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=n0(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};no.customElements.get("media-captions-button")||no.customElements.define("media-captions-button",sX);let s1=e=>{let t=e.mediaIsCasting?r5("stop casting"):r5("start casting");e.setAttribute("aria-label",t)};class s2 extends sq{static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_IS_CASTING,rF.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),s1(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rF.MEDIA_IS_CASTING&&s1(this)}get mediaIsCasting(){return nI(this,rF.MEDIA_IS_CASTING)}set mediaIsCasting(e){nC(this,rF.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return nL(this,rF.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){nD(this,rF.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?rU.MEDIA_EXIT_CAST_REQUEST:rU.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new no.CustomEvent(e,{composed:!0,bubbles:!0}))}}s2.getSlotTemplateHTML=function(e){return` 496 <style> 497 :host([${rF.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) { 498 display: none !important; 499 } 500 501 502 :host(:not([${rF.MEDIA_IS_CASTING}])) slot[name=icon] slot:not([name=enter]) { 503 display: none !important; 504 } 505 506 :host([${rF.MEDIA_IS_CASTING}]) slot[name=tooltip-enter], 507 :host(:not([${rF.MEDIA_IS_CASTING}])) slot[name=tooltip-exit] { 508 display: none; 509 } 510 </style> 511 512 <slot name="icon"> 513 <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> 514 <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> 515 </slot> 516 `},s2.getTooltipContentHTML=function(){return` 517 <slot name="tooltip-enter">${r5("Start casting")}</slot> 518 <slot name="tooltip-exit">${r5("Stop casting")}</slot> 519 `},no.customElements.get("media-cast-button")||no.customElements.define("media-cast-button",s2);var s3=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},s4=(e,t,i)=>(s3(e,t,"read from private field"),i?i.call(e):t.get(e)),s5=(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)}
519,s9=(e,t,i,a)=>(s3(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),s8=(e,t,i)=>(s3(e,t,"access private method"),i);let s6={OPEN:"open",ANCHOR:"anchor"};class s7 extends no.HTMLElement{constructor(){super(),s5(this,cE),s5(this,cg),s5(this,c_),s5(this,cT),s5(this,ck),s5(this,cR),s5(this,cm,!1),s5(this,cp,null),s5(this,cv,null)}static get observedAttributes(){return[s6.OPEN,s6.ANCHOR]}get open(){return nI(this,s6.OPEN)}set open(e){nC(this,s6.OPEN,e)}handleEvent(e){switch(e.type){case"invoke":s8(this,cT,cA).call(this,e);break;case"focusout":s8(this,ck,cw).call(this,e);break;case"keydown":s8(this,cR,cS).call(this,e)}}connectedCallback(){s8(this,cE,cb).call(this),this.role||(this.role="dialog"),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}disconnectedCallback(){this.removeEventListener("invoke",this),this.removeEventListener("focusout",this),this.removeEventListener("keydown",this)}attributeChangedCallback(e,t,i){s8(this,cE,cb).call(this),e===s6.OPEN&&i!==t&&(this.open?s8(this,cg,cf).call(this):s8(this,c_,cy).call(this))}focus(){s9(this,cp,ny());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"]}}cm=new WeakMap,cp=new WeakMap,cv=new WeakMap,cE=new WeakSet,cb=function(){if(!s4(this,cm)&&(s9(this,cm,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);let e=np(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e),queueMicrotask(()=>{let{style:e}=nk(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}},cg=new WeakSet,cf=function(){var e;null==(e=s4(this,cv))||e.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})},c_=new WeakSet,cy=function(){var e;null==(e=s4(this,cv))||e.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))},cT=new WeakSet,cA=function(e){s9(this,cv,e.relatedTarget),nf(this,e.relatedTarget)||(this.open=!this.open)},ck=new WeakSet,cw=function(e){var t;!nf(this,e.relatedTarget)&&(null==(t=s4(this,cp))||t.focus(),s4(this,cv)&&s4(this,cv)!==e.relatedTarget&&this.open&&(this.open=!1))},cR=new WeakSet,cS=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=s4(this,cp))||n.focus(),this.open=!1))},s7.shadowRootOptions={mode:"open"},s7.getTemplateHTML=function(e){return` 520 <style> 521 :host { 522 font: var(--media-font, 523 var(--media-font-weight, normal) 524 var(--media-font-size, 14px) / 525 var(--media-text-content-height, var(--media-control-height, 24px)) 526 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 527 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 528 display: var(--media-dialog-display, inline-flex); 529 justify-content: center; 530 align-items: center; 531 532 transition-behavior: allow-discrete; 533 visibility: hidden; 534 opacity: 0; 535 transform: translateY(2px) scale(.99); 536 pointer-events: none; 537 } 538 539 :host([open]) { 540 transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out; 541 visibility: visible; 542 opacity: 1; 543 transform: translateY(0) scale(1); 544 pointer-events: auto; 545 } 546 547 #content { 548 display: flex; 549 position: relative; 550 box-sizing: border-box; 551 width: min(320px, 100%); 552 word-wrap: break-word; 553 max-height: 100%; 554 overflow: auto; 555 text-align: center; 556 line-height: 1.4; 557 } 558 </style>
559 ${this.getSlotTemplateHTML(e)} 560 `},s7.getSlotTemplateHTML=function(e){return` 561 <slot id="content"></slot> 562 `},no.customElements.get("media-chrome-dialog")||no.customElements.define("media-chrome-dialog",s7);var oe=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ot=(e,t,i)=>(oe(e,t,"read from private field"),i?i.call(e):t.get(e)),oi=(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)},oa=(e,t,i,a)=>(oe(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),or=(e,t,i)=>(oe(e,t,"access private method"),i);class on extends no.HTMLElement{constructor(){if(super(),oi(this,cU),oi(this,cB),oi(this,cF),oi(this,cK),oi(this,cq),oi(this,cG),oi(this,cz),oi(this,cZ),oi(this,cI,void 0),oi(this,cC,void 0),oi(this,cL,void 0),oi(this,cD,void 0),oi(this,cM,{}),oi(this,cO,[]),oi(this,cx,()=>{if(this.range.matches(":focus-visible")){let{style:e}=nk(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),oi(this,cN,()=>{let{style:e}=nk(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),oi(this,cP,()=>{let e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=np(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}this.container=this.shadowRoot.querySelector("#container"),oa(this,cL,this.shadowRoot.querySelector("#startpoint")),oa(this,cD,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",rW.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===rW.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=ot(this,cI))?void 0:a.unassociateElement)||r.call(a,this),oa(this,cI,null)),i&&this.isConnected&&(oa(this,cI,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=ot(this,cI))?void 0:s.associateElement)||o.call(s,this))):("disabled"===e||"aria-disabled"===e&&t!==i)&&(null==i?(this.range.removeAttribute(e),or(this,cB,cH).call(this)):(this.range.setAttribute(e,i),or(this,cF,cV).call(this)))}connectedCallback(){var e,t,i;let{style:a}=nk(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),ot(this,cM).pointer=nk(this.shadowRoot,"#pointer"),ot(this,cM).progress=nk(this.shadowRoot,"#progress"),ot(this,cM).thumb=nk(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),ot(this,cM).activeSegment=nk(this.shadowRoot,"#segments-clipping rect:nth-child(0)");let r=this.getAttribute(rW.MEDIA_CONTROLLER);r&&(oa(this,cI,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=ot(this,cI))?void 0:t.associateElement)||i.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",ot(this,cx)),this.shadowRoot.addEventListener("focusout",ot(this,cN)),or(this,cB,cH).call(this),nh(this.container,ot(this,cP))}disconnectedCallback(){var e,t;or(this,cF,cV).call(this),null==(t=null==(e=ot(this,cI))?void 0:e.unassociateElement)||t.call(e,this),oa(this,cI,null),this.shadowRoot.removeEventListener("focusin",ot(this,cx)),this.shadowRoot.removeEventListener("focusout",ot(this,cN)),nm(this.container,ot(this,cP))}updatePointerBar(e){var t;null==(t=ot(this,cM).pointer)||t.style.setProperty("width",`${100*this.getPointerRatio(e)}%`)}updateBar(){var e,t;let i=100*this.range.valueAsNumber;null==(e=ot(this,cM).progress)||e.style.setProperty("width",`${i}%`),null==(t=ot(this,cM).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])];oa(this,cO,[...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=nl.createElementNS("http://www.w3.org/2000/svg","rect"),c=nw(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,ot(this,cL).getBoundingClientRect(),ot(this,cD).getBoundingClientRect())}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":or(this,cZ,cX).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":or(this,cq,cY).call(this,e);break;case"pointerdown":or(this,cK,c$).call(this,e);break;case"pointerup":or(this,cG,cj).call(this);break;case"pointerleave":or(this,cz,cQ).call(this)}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}cI=new WeakMap,cC=new WeakMap,cL=new WeakMap,cD=new WeakMap,cM=new WeakMap,cO=new WeakMap,cx=new WeakMap,cN=new WeakMap,cP=new WeakMap,cU=new WeakSet,cW=function(e){let t=ot(this,cM).activeSegment;if(!t)return;let i=this.getPointerRatio(e),a=ot(this,cO).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))"))},cB=new WeakSet,cH=function(){!this.hasAttribute("disabled")&&this.isConnected&&(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))},cF=new WeakSet,cV=function(){var e,t;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),this.removeEventListener("pointerleave",this),null==(e=no.window)||e.removeEventListener("pointerup",this),null==(t=no.window)||t.removeEventListener("pointermove",this)},cK=new WeakSet,c$=function(e){var t;oa(this,cC,e.composedPath().includes(this.range)),null==(t=no.window)||t.addEventListener("pointerup",this,{once:!0})},cq=new WeakSet,cY=function(e){var t;"mouse"!==e.pointerType&&or(this,cK,c$).call(this,e),this.addEventListener("pointerleave",this,{once:!0}),null==(t=no.window)||t.addEventListener("pointermove",this)},cG=new WeakSet,cj=function(){var e;null==(e=no.window)||e.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")},cz=new WeakSet,cQ=function(){var e,t;this.removeEventListener("pointerleave",this),null==(e=no.window)||e.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),null==(t=ot(this,cM).activeSegment)||t.style.removeProperty("transform")},cZ=new WeakSet,cX=function(e){("pen"!==e.pointerType||0!==e.buttons)&&(this.toggleAttribute("dragging",1===e.buttons||"mouse"!==e.pointerType),this.updatePointerBar(e),or(this,cU,cW).call(this,e),this.dragging&&("mouse"!==e.pointerType||!ot(this,cC))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(e),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))))},on.shadowRootOptions={mode:"open"},on.getTemplateHTML=function(e){return
vendor: 7,165 bytes, lines 562-798
562` 563 <style> 564 :host { 565 --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 566 --_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px)); 567 568 box-shadow: var(--_focus-visible-box-shadow, none); 569 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 570 height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding)); 571 display: inline-flex; 572 align-items: center; 573 574 vertical-align: middle; 575 box-sizing: border-box; 576 position: relative; 577 width: 100px; 578 transition: background .15s linear; 579 cursor: var(--media-cursor, pointer); 580 pointer-events: auto; 581 touch-action: none; 582 } 583 584 585 input[type=range]:focus { 586 outline: 0; 587 } 588 input[type=range]:focus::-webkit-slider-runnable-track { 589 outline: 0; 590 } 591 592 :host(:hover) { 593 background: var(--media-control-hover-background, rgb(50 50 70 / .7)); 594 } 595 596 #leftgap { 597 padding-left: var(--media-range-padding-left, var(--_media-range-padding)); 598 } 599 600 #rightgap { 601 padding-right: var(--media-range-padding-right, var(--_media-range-padding)); 602 } 603 604 #startpoint, 605 #endpoint { 606 position: absolute; 607 } 608 609 #endpoint { 610 right: 0; 611 } 612 613 #container { 614 615 width: var(--media-range-track-width, 100%); 616 transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px)); 617 position: relative; 618 height: 100%; 619 display: flex; 620 align-items: center; 621 min-width: 40px; 622 } 623 624 #range { 625 626 display: var(--media-time-range-hover-display, block); 627 bottom: var(--media-time-range-hover-bottom, 0); 628 height: var(--media-time-range-hover-height, max(100% , 25px)); 629 width: 100%; 630 position: absolute; 631 cursor: var(--media-cursor, pointer); 632 633 -webkit-appearance: none; 634 -webkit-tap-highlight-color: transparent; 635 background: transparent; 636 margin: 0; 637 z-index: 1; 638 } 639 640 @media (hover: hover) { 641 #range { 642 bottom: var(--media-time-range-hover-bottom, 0); 643 height: var(--media-time-range-hover-height, max(100%, 20px)); 644 } 645 } 646 647 648 649 #range::-webkit-slider-thumb { 650 -webkit-appearance: none; 651 background: transparent; 652 width: .1px; 653 height: .1px; 654 } 655 656 657 #range::-moz-range-thumb { 658 background: transparent; 659 border: transparent; 660 width: .1px; 661 height: .1px; 662 } 663 664 #appearance { 665 height: var(--media-range-track-height, 4px); 666 display: flex; 667 flex-direction: column; 668 justify-content: center; 669 width: 100%; 670 position: absolute; 671 672 will-change: transform; 673 } 674 675 #track { 676 background: var(--media-range-track-background, rgb(255 255 255 / .2)); 677 border-radius: var(--media-range-track-border-radius, 1px); 678 border: var(--media-range-track-border, none); 679 outline: var(--media-range-track-outline); 680 outline-offset: var(--media-range-track-outline-offset); 681 backdrop-filter: var(--media-range-track-backdrop-filter); 682 -webkit-backdrop-filter: var(--media-range-track-backdrop-filter); 683 box-shadow: var(--media-range-track-box-shadow, none); 684 position: absolute; 685 width: 100%; 686 height: 100%; 687 overflow: hidden; 688 } 689 690 #progress, 691 #pointer { 692 position: absolute; 693 height: 100%; 694 will-change: width; 695 } 696 697 #progress { 698 background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238))); 699 transition: var(--media-range-track-transition); 700 } 701 702 #pointer { 703 background: var(--media-range-track-pointer-background); 704 border-right: var(--media-range-track-pointer-border-right); 705 transition: visibility .25s, opacity .25s; 706 visibility: hidden; 707 opacity: 0; 708 } 709 710 @media (hover: hover) { 711 :host(:hover) #pointer { 712 transition: visibility .5s, opacity .5s; 713 visibility: visible; 714 opacity: 1; 715 } 716 } 717 718 #thumb, 719 ::slotted([slot=thumb]) { 720 width: var(--media-range-thumb-width, 10px); 721 height: var(--media-range-thumb-height, 10px); 722 transition: var(--media-range-thumb-transition); 723 transform: var(--media-range-thumb-transform, none); 724 opacity: var(--media-range-thumb-opacity, 1); 725 translate: -50%; 726 position: absolute; 727 left: 0; 728 cursor: var(--media-cursor, pointer); 729 } 730 731 #thumb { 732 border-radius: var(--media-range-thumb-border-radius, 10px); 733 background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238))); 734 box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent); 735 border: var(--media-range-thumb-border, none); 736 } 737 738 :host([disabled]) #thumb { 739 background-color: #777; 740 } 741 742 .segments #appearance { 743 height: var(--media-range-segment-hover-height, 7px); 744 } 745 746 #track { 747 clip-path: url(#segments-clipping); 748 } 749 750 #segments { 751 --segments-gap: var(--media-range-segments-gap, 2px); 752 position: absolute; 753 width: 100%; 754 height: 100%; 755 } 756 757 #segments-clipping { 758 transform: translateX(calc(var(--segments-gap) / 2)); 759 } 760 761 #segments-clipping:empty { 762 display: none; 763 } 764 765 #segments-clipping rect { 766 height: var(--media-range-track-height, 4px); 767 y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2); 768 transition: var(--media-range-segment-transition, transform .1s ease-in-out); 769 transform: var(--media-range-segment-transform, scaleY(1)); 770 transform-origin: center; 771 } 772 773 /* Visible label for accessibility - positioned off-screen but technically visible (Firefox requires visible labels) */ 774 #range-label { 775 position: absolute; 776 left: -10000px; 777 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 778 pointer-events: none; 779 } 780 </style> 781 <div id="leftgap"></div> 782 <div id="container"> 783 <div id="startpoint"></div> 784 <div id="endpoint"></div> 785 <div id="appearance"> 786 <div id="track" part="track"> 787 <div id="pointer"></div> 788 <div id="progress" part="progress"></div> 789 </div> 790 <slot name="thumb"> 791 <div id="thumb" part="thumb"></div> 792 </slot> 793 <svg id="segments" aria-hidden="true"><clipPath id="segments-clipping"></clipPath></svg> 794 </div> 795 <input id="range" type="range" min="0" max="1" step="any" value="0"> 796 <label for="range" id="range-label"></label> 797 798 ${this.getContainerTemplateHTML(
798e)} 799 </div> 800 <div id="rightgap"></div> 801 `},on.getContainerTemplateHTML=function(e){return""},no.customElements.get("media-chrome-range")||no.customElements.define("media-chrome-range",on);var os=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oo=(e,t,i)=>(os(e,t,"read from private field"),i?i.call(e):t.get(e)),ol=(e,t,i,a)=>(os(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class od extends no.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,cJ,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=np(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[rW.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===rW.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=oo(this,cJ))?void 0:a.unassociateElement)||r.call(a,this),ol(this,cJ,null)),i&&this.isConnected&&(ol(this,cJ,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=oo(this,cJ))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let a=this.getAttribute(rW.MEDIA_CONTROLLER);a&&(ol(this,cJ,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=oo(this,cJ))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=oo(this,cJ))?void 0:e.unassociateElement)||t.call(e,this),ol(this,cJ,null)}}cJ=new WeakMap,od.shadowRootOptions={mode:"open"},od.getTemplateHTML=function(e){return` 802 <style> 803 :host { 804 805 box-sizing: border-box; 806 display: var(--media-control-display, var(--media-control-bar-display, inline-flex)); 807 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 808 --media-loading-indicator-icon-height: 44px; 809 } 810 811 ::slotted(media-time-range), 812 ::slotted(media-volume-range) { 813 min-height: 100%; 814 } 815 816 ::slotted(media-time-range), 817 ::slotted(media-clip-selector) { 818 flex-grow: 1; 819 } 820 821 ::slotted([role="menu"]) { 822 position: absolute; 823 } 824 </style> 825 826 <slot></slot> 827 `},no.customElements.get("media-control-bar")||no.customElements.define("media-control-bar",od);var ou=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oc=(e,t,i)=>(ou(e,t,"read from private field"),i?i.call(e):t.get(e)),oh=(e,t,i,a)=>(ou(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class om extends no.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,c0,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=np(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[rW.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===rW.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=oc(this,c0))?void 0:a.unassociateElement)||r.call(a,this),oh(this,c0,null)),i&&this.isConnected&&(oh(this,c0,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=oc(this,c0))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let{style:a}=nk(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);let r=this.getAttribute(rW.MEDIA_CONTROLLER);r&&(oh(this,c0,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=oc(this,c0))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=oc(this,c0))?void 0:e.unassociateElement)||t.call(e,this),oh(this,c0,null)}}c0=new WeakMap,om.shadowRootOptions={mode:"open"},om.getTemplateHTML=function(e,t={}){return` 828 <style> 829 :host { 830 font: var(--media-font, 831 var(--media-font-weight, normal) 832 var(--media-font-size, 14px) / 833 var(--media-text-content-height, var(--media-control-height, 24px)) 834 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 835 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 836 background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)))); 837 padding: var(--media-control-padding, 10px); 838 display: inline-flex; 839 justify-content: center; 840 align-items: center; 841 vertical-align: middle; 842 box-sizing: border-box; 843 text-align: center; 844 pointer-events: auto; 845 } 846 847 848 :host(:focus-visible) {
849 box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 850 outline: 0; 851 } 852 853 854 :host(:where(:focus)) { 855 box-shadow: none; 856 outline: 0; 857 } 858 </style> 859 860 ${this.getSlotTemplateHTML(e,t)} 861 `},om.getSlotTemplateHTML=function(e,t){return` 862 <slot></slot> 863 `},no.customElements.get("media-text-display")||no.customElements.define("media-text-display",om);var op=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ov=(e,t,i)=>(op(e,t,"read from private field"),i?i.call(e):t.get(e));class oE extends om{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,c1,void 0),((e,t,i,a)=>(op(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,c1,this.shadowRoot.querySelector("slot")),ov(this,c1).textContent=r6(null!=(e=this.mediaDuration)?e:0)}static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_DURATION]}attributeChangedCallback(e,t,i){e===rF.MEDIA_DURATION&&(ov(this,c1).textContent=r6(+i)),super.attributeChangedCallback(e,t,i)}get mediaDuration(){return nR(this,rF.MEDIA_DURATION)}set mediaDuration(e){nS(this,rF.MEDIA_DURATION,e)}}c1=new WeakMap,oE.getSlotTemplateHTML=function(e,t){return` 864 <slot>${r6(t.mediaDuration)}</slot> 865 `},no.customElements.get("media-duration-display")||no.customElements.define("media-duration-display",oE);let ob={2:r5("Network Error"),3:r5("Decode Error"),4:r5("Source Not Supported"),5:r5("Encryption
865Error")},og={2:r5("A network error caused the media download to fail."),3:r5("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:r5("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:r5("The media is encrypted and there are no keys to decrypt it.")},of=e=>{var t,i;return 1===e.code?null:{title:null!=(t=ob[e.code])?t:`Error ${e.code}`,message:null!=(i=og[e.code])?i:e.message}};var o_=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};function oy(e){var t;let{title:i,message:a}=null!=(t=of(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 oT=[rF.MEDIA_ERROR_CODE,rF.MEDIA_ERROR_MESSAGE];class oA extends s7{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,c2,null)}static get observedAttributes(){return[...super.observedAttributes,...oT]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,t,i){var a;if(super.attributeChangedCallback(e,t,i),!oT.includes(e))return;let r=null!=(a=this.mediaError)?a:{code:this.mediaErrorCode,message:this.mediaErrorMessage};if(this.open=r.code&&null!==of(r),this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(r),!this.hasAttribute("aria-label"))){let{title:e}=of(r);e&&this.setAttribute("aria-label",e)}}get mediaError(){var e,t;return o_(this,e=c2,"read from private field"),t?t.call(this):e.get(this)}set mediaError(e){var t,i;o_(this,t=c2,"write to private field"),i?i.call(this,e):t.set(this,e)}get mediaErrorCode(){return nR(this,"mediaerrorcode")}set mediaErrorCode(e){nS(this,"mediaerrorcode",e)}get mediaErrorMessage(){return nL(this,"mediaerrormessage")}set mediaErrorMessage(e){nD(this,"mediaerrormessage",e)}}c2=new WeakMap,oA.getSlotTemplateHTML=function(e){return` 866 <style> 867 :host { 868 background: rgb(20 20 30 / .8); 869 } 870 871 #content { 872 display: block; 873 padding: 1.2em 1.5em; 874 } 875 876 h3, 877 p { 878 margin-block: 0 .3em; 879 } 880 </style> 881 <slot name="error-${e.mediaerrorcode}" id="content"> 882 ${oy({code:+e.mediaerrorcode,message:e.mediaerrormessage})} 883 </slot> 884 `},oA.formatErrorMessage=oy,no.customElements.get("media-error-dialog")||no.customElements.define("media-error-dialog",oA);var ok=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)},ow=(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)};class oR extends s7{constructor(){super(...arguments),ow(this,c3,e=>{var t;if(!this.open)return;let i=null==(t=this.shadowRoot)?void 0:t.querySelector("#content");if(!i)return;let a=e.composedPath(),r=a[0]===this||a.includes(this),n=a.includes(i);r&&!n&&(this.open=!1)}),ow(this,c4,e=>{if(!this.open)return;let t=e.shiftKey&&("/"===e.key||"?"===e.key);"Escape"!==e.key&&!t||e.ctrlKey||e.altKey||e.metaKey||(this.open=!1,e.preventDefault(),e.stopPropagation())})}connectedCallback(){super.connectedCallback(),this.open&&(this.addEventListener("click",ok(this,c3)),document.addEventListener("keydown",ok(this,c4)))}disconnectedCallback(){this.removeEventListener("click",ok(this,c3)),document.removeEventListener("keydown",ok(this,c4))}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),"open"===e&&(this.open?(this.addEventListener("click",ok(this,c3)),document.addEventListener("keydown",ok(this,c4))):(this.removeEventListener("click",ok(this,c3)),document.removeEventListener("keydown",ok(this,c4))))}}c3=new WeakMap,c4=new WeakMap,oR.getSlotTemplateHTML=function(e){return` 885 <style> 886 :host { 887 position: fixed; 888 top: 0; 889 left: 0; 890 z-index: 9999; 891 background: rgb(20 20 30 / .8); 892 backdrop-filter: blur(10px); 893 } 894 895 #content { 896 display: block; 897 width: clamp(400px, 40vw, 700px); 898 max-width: 90vw; 899 text-align: left; 900 } 901 902 h2 { 903 margin: 0 0 1.5rem 0; 904 font-size: 1.5rem; 905 font-weight: 500; 906 text-align: center; 907 } 908 909 .shortcuts-table { 910 width: 100%; 911 border-collapse: collapse; 912 } 913 914 .shortcuts-table tr { 915 border-bottom: 1px solid rgba(255, 255, 255, 0.1); 916 } 917 918 .shortcuts-table tr:last-child { 919 border-bottom: none; 920 } 921 922 .shortcuts-table td { 923 padding: 0.75rem 0.5rem; 924 } 925 926 .shortcuts-table td:first-child { 927 text-align: right; 928 padding-right: 1rem; 929 width: 40%; 930 min-width: 120px; 931 } 932 933 .shortcuts-table td:last-child { 934 padding-left: 1rem; 935 } 936 937 .key { 938 display: inline-block; 939 background: rgba(255, 255, 255, 0.15); 940 border: 1px solid rgba(255, 255, 255, 0.2); 941 border-radius: 4px; 942 padding: 0.25rem 0.5rem; 943 font-family: 'Courier New', monospace; 944 font-size: 0.9rem; 945 font-weight: 500; 946 min-width: 1.5rem; 947 text-align: center; 948 margin: 0 0.2rem; 949 } 950 951 .description { 952 color: rgba(255, 255, 255, 0.9); 953 font-size: 0.95rem; 954 } 955 956 .key-combo { 957 display: flex; 958 align-items: center; 959 justify-content: flex-end; 960 gap: 0.3rem; 961 } 962 963 .key-separator { 964 color: rgba(255, 255, 255, 0.5); 965 font-size: 0.9rem; 966 } 967 </style> 968 <slot id="content"> 969 ${function(){let e=[{keys:["Space","k"],description:"Toggle Playback"},{keys:["m"],description:"Toggle mute"},{keys:["f"],description:"Toggle fullscreen"},{keys:["c"],description:"Toggle captions or subtitles, if available"},{keys:["p"],description:"Toggle Picture in Picture"},{keys:["â","j"],description:"Seek back 10s"},{keys:["â","l"],description:"Seek forward 10s"},{keys:["â"],description:"Turn volume up"},{keys:["â"],description:"Turn volume down"},{keys:["< (SHIFT+,)"],description:"Decrease playback rate"},{keys:["> (SHIFT+.)"],description:"Increase playback rate"}].map(({keys:e,description:t})=>{let i=e.map((e,t)=>t>0?`<span class="key-separator">or</span><span class="key">${e}</span>`:`<span class="key">${e}</span>`).join("");return` 970 <tr> 971 <td> 972 <div class="key-combo">${i}</div> 973 </td> 974 <td class="description">${t}</td> 975 </tr> 976 `}).join("");return` 977 <h2>Keyboard Shortcuts</h2> 978 <table class="shortcuts-table">${e}</table> 979 `}()} 980 </slot> 981 `},no.customElements.get("media-keyboard-shortcuts-dialog")||no.customElements.define("media-keyboard-shortcuts-dialog",oR);var oS=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};let oI=`<svg aria-hidden="true" viewBox="0 0 26 24"> 982 <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/> 983</svg>`,oC=`<svg aria-hidden="true" viewBox="0 0 26 24"> 984 <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/> 985</svg>`,oL=e=>{let t=e.mediaIsFullscreen?r5("exit fullscreen mode"):r5("enter fullscreen mode");e.setAttribute("aria-label",t)};class oD extends sq{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,c5,null)}static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_IS_FULLSCREEN,rF.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),oL(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rF.MEDIA_IS_FULLSCREEN&&oL(this)}get mediaFullscreenUnavailable(){return nL(this,rF.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){nD(this,rF.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return nI(this,rF.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){nC(this,rF.MEDIA_IS_FULLSCREEN,e)}handleClick(e){var t,i,a,r;oS(this,t=c5,"write to private field"),i?i.call(this,e):t.set(this,e);let n=(oS(this,a=c5,"read from private field"),(r?r.call(this):a.get(this))instanceof PointerEvent),s=this.mediaIsFullscreen?new no.CustomEvent(rU.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new no.CustomEvent(rU.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:n});this.dispatchEvent(s)}}c5=new WeakMap,oD.getSlotTemplateHTML=function(e){return` 986 <style> 987 :host([${rF.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) { 988 display: none !important; 989 } 990 991 992 :host(:not([${rF.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) { 993 display: none !important; 994 } 995 996 :host([${rF.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter], 997 :host(:not([${rF.MEDIA_IS_FULLSCREEN}])) slot[name=tooltip-exit] { 998 display: none; 999 } 1000 </style> 1001 1002 <slot name="icon"> 1003 <slot name="enter">${oI}</slot> 1004 <slot name="exit">${oC}</slot> 1005 </slot> 1006 `},oD.getTooltipContentHTML=function(){return` 1007 <slot name="tooltip-enter">${r5("Enter fullscreen mode")}</slot> 1008 <slot name="tooltip-exit">${r5("Exit fullscreen mode")}</slot> 1009 `},no.customElements.get("media-fullscreen-button")||no.customElements.define("media-fullscreen-button",oD);let{MEDIA_TIME_IS_LIVE:oM,MEDIA_PAUSED:oO}=rF,{MEDIA_SEEK_TO_LIVE_REQUEST:ox,MEDIA_PLAY_REQUEST:oN}=rU,oP=e=>{var t;let i=e.mediaPaused||!e.mediaTimeIsLive,a=i?r5("seek to live"):r5("playing live");e.setAttribute("aria-label",a);let r=null==(t=e.shadowRoot)?void 0:t.querySelector('slot[name="text"]');r&&(r.textContent=r5("live")),i?e.removeAttribute("aria-disabled"):e.setAttribute("aria-disabled","true")};class oU extends sq{static get observedAttributes(){return[...super.observedAttributes,oM,oO]}connectedCallback(){super.connectedCallback(),oP(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),oP(this)}get mediaPaused(){return nI(this,rF.MEDIA_PAUSED)}set mediaPaused(e){nC(this,rF.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return nI(this,rF.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){nC(this,rF.MEDIA_TIME_IS_LIVE,e)}handleClick(){(this.mediaPaused||!this.mediaTimeIsLive)&&(this.dispatchEvent(new no.CustomEvent(ox,{composed:!0,bubbles:!0})),this.hasAttribute(oO)&&this.dispatchEvent(new no.CustomEvent(oN,{composed:!0,bubbles:!0})))}}oU.getSlotTemplateHTML=function(e){return` 1010 <style> 1011 :host { --media-tooltip-display: none; } 1012 1013 slot[name=indicator] > *, 1014 :host ::slotted([slot=indicator]) { 1015 1016 min-width: auto; 1017 fill: var(--media-live-button-icon-color, rgb(140, 140, 140)); 1018 color: var(--media-live-button-icon-color, rgb(140, 140, 140)); 1019 } 1020 1021 :host([${oM}]:not([${oO}])) slot[name=indicator] > *, 1022 :host([${oM}]:not([${oO}])) ::slotted([slot=indicator]) { 1023 fill: var(--media-live-button-indicator-color, rgb(255, 0, 0)); 1024 color: var(--media-live-button-indicator-color, rgb(255, 0, 0)); 1025 } 1026 1027 :host([${oM}]:not([${oO}])) { 1028 cursor: var(--media-cursor, not-allowed); 1029 } 1030 1031 slot[name=text]{ 1032 text-transform: uppercase; 1033 } 1034 1035 </style> 1036 1037 <slot name="indicator"><svg viewBox="0 0 6 12" aria-hidden="true"><circle cx="3" cy="6" r="2"></circle></svg></slot> 1038 1039 <slot name="spacer"> </slot><slot name="text">${r5("live")}</slot> 1040 `},no.customElements.get("media-live-button")||no.customElements.define("media-live-button",oU);var oW=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},oB=(e,t,i)=>(oW(e,t,"read from private field"),i?i.call(e):t.get(e)),oH=(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)},oF=(e,t,i,a)=>(oW(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let oV={LOADING_DELAY:"loadingdelay",NO_AUTOHIDE:"noautohide"},oK=` 1041<svg aria-hidden="true" viewBox="0 0 100 100"> 1042 <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"> 1043 <animateTransform 1044 attributeName="transform" 1045 attributeType="XML" 1046 type="rotate" 1047 dur="1s" 1048 from="0 50 50" 1049 to="360 50 50"
1050 repeatCount="indefinite" /> 1051 </path> 1052</svg> 1053`;class o$ extends no.HTMLElement{constructor(){if(super(),oH(this,c9,void 0),oH(this,c8,500),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=np(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[rW.MEDIA_CONTROLLER,rF.MEDIA_PAUSED,rF.MEDIA_LOADING,oV.LOADING_DELAY]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===oV.LOADING_DELAY&&t!==i?this.loadingDelay=Number(i):e===rW.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=oB(this,c9))?void 0:a.unassociateElement)||r.call(a,this),oF(this,c9,null)),i&&this.isConnected&&(oF(this,c9,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=oB(this,c9))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let a=this.getAttribute(rW.MEDIA_CONTROLLER);a&&(oF(this,c9,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=oB(this,c9))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=oB(this,c9))?void 0:e.unassociateElement)||t.call(e,this),oF(this,c9,null)}get loadingDelay(){return oB(this,c8)}set loadingDelay(e){oF(this,c8,e);let{style:t}=nk(this.shadowRoot,":host");t.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return nI(this,rF.MEDIA_PAUSED)}set mediaPaused(e){nC(this,rF.MEDIA_PAUSED,e)}get mediaLoading(){return nI(this,rF.MEDIA_LOADING)}set mediaLoading(e){nC(this,rF.MEDIA_LOADING,e)}get mediaController(){return nL(this,rW.MEDIA_CONTROLLER)}set mediaController(e){nD(this,rW.MEDIA_CONTROLLER,e)}get noAutohide(){return nI(this,oV.NO_AUTOHIDE)}set noAutohide(e){nC(this,oV.NO_AUTOHIDE,e)}}c9=new WeakMap,c8=new WeakMap,o$.shadowRootOptions={mode:"open"},o$.getTemplateHTML=function(e){return` 1054 <style> 1055 :host { 1056 display: var(--media-control-display, var(--media-loading-indicator-display, inline-block)); 1057 vertical-align: middle; 1058 box-sizing: border-box; 1059 --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, 500ms); 1060 } 1061 1062 #status { 1063 color: rgba(0,0,0,0); 1064 width: 0px; 1065 height: 0px; 1066 } 1067 1068 :host slot[name=icon] > *, 1069 :host ::slotted([slot=icon]) { 1070 opacity: var(--media-loading-indicator-opacity, 0); 1071 transition: opacity 0.15s; 1072 } 1073 1074 :host([${rF.MEDIA_LOADING}]:not([${rF.MEDIA_PAUSED}])) slot[name=icon] > *, 1075 :host([${rF.MEDIA_LOADING}]:not([${rF.MEDIA_PAUSED}])) ::slotted([slot=icon]) { 1076 opacity: var(--media-loading-indicator-opacity, 1); 1077 transition: opacity 0.15s var(--_loading-indicator-delay); 1078 } 1079 1080 :host #status { 1081 visibility: var(--media-loading-indicator-opacity, hidden); 1082 transition: visibility 0.15s; 1083 } 1084 1085 :host([${rF.MEDIA_LOADING}]:not([${rF.MEDIA_PAUSED}])) #status { 1086 visibility: var(--media-loading-indicator-opacity, visible); 1087 transition: visibility 0.15s var(--_loading-indicator-delay); 1088 } 1089 1090 svg, img, ::slotted(svg), ::slotted(img) { 1091 width: var(--media-loading-indicator-icon-width); 1092 height: var(--media-loading-indicator-icon-height, 100px); 1093 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 1094 vertical-align: middle; 1095 } 1096 </style> 1097 1098 <slot name="icon">${oK}</slot> 1099 <div id="status" role="status" aria-live="polite">${r5("media loading")}</div> 1100 `},no.customElements.get("media-loading-indicator")||no.customElements.define("media-loading-indicator",o$);let oq=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1101 <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"/> 1102</svg>`,oY=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1103 <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"/> 1104</svg>`,oG=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1105 <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"/> 1106</svg>`,oj=e=>{let t="off"===e.mediaVolumeLevel?r5("unmute"):r5("mute");e.setAttribute("aria-label",t)};class oz extends sq{static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),oj(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rF.MEDIA_VOLUME_LEVEL&&oj(this)}get mediaVolumeLevel(){return nL(this,rF.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){nD(this,rF.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e="off"===this.mediaVolumeLevel?rU.MEDIA_UNMUTE_REQUEST:rU.MEDIA_MUTE_REQUEST;this.dispatchEvent(new no.CustomEvent(e,{composed:!0,bubbles:!0}))}}oz.getSlotTemplateHTML=function(e){return` 1107 <style> 1108 :host(:not([${rF.MEDIA_VOLUME_LEVEL}])) slot[name=icon] slot:not([name=high]), 1109 :host([${rF.MEDIA_VOLUME_LEVEL}=high]) slot[name=icon] slot:not([name=high]) { 1110 display: none !important; 1111 } 1112 1113 :host([${rF.MEDIA_VOLUME_LEVEL}=off]) slot[name=icon] slot:not([name=off]) { 1114 display: none !important; 1115 } 1116 1117 :host([${rF.MEDIA_VOLUME_LEVEL}=low]) slot[name=icon] slot:not([name=low]) { 1118 display: none !important; 1119 } 1120 1121 :host([${rF.MEDIA_VOLUME_LEVEL}=medium]) slot[name=icon] slot:not([name=medium]) { 1122 display: none !important; 1123 } 1124 1125 :host(:not([${rF.MEDIA_VOLUME_LEVEL}=off])) slot[name=tooltip-unmute], 1126 :host([${rF.MEDIA_VOLUME_LEVEL}=off]) slot[name=tooltip-mute] { 1127 display: none; 1128 } 1129 </style> 1130 1131 <slot name="icon"> 1132 <slot name="off">${oq}</slot> 1133 <slot name="low">${oY}</slot> 1134 <slot name="medium">${oY}</slot> 1135 <slot name="high">${oG}</slot> 1136 </slot> 1137 `},oz.getTooltipContentHTML=function(){return` 1138 <slot name="tooltip-mute">${r5("Mute")}</slot> 1139 <slot name="tooltip-unmute">${r5("Unmute")}</slot> 1140 `},no.customElements.get("media-mute-button")||no.customElements.define("media-mute-button",oz);let oQ=`<svg aria-hidden="true" viewBox="0 0 28 24"> 1141 <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"/> 1142</svg>`,oZ=e=>{let t=e.mediaIsPip?r5("exit picture in picture mode"):r5("enter picture in picture mode");e.setAttribute("aria-label",t)};class oX extends sq{static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_IS_PIP,rF.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),oZ(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rF.MEDIA_IS_PIP&&oZ(this)}get mediaPipUnavailable(){return nL(this,rF.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){nD(this,rF.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return nI(this,rF.MEDIA_IS_PIP)}set mediaIsPip(e){nC(this,rF.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?rU.MEDIA_EXIT_PIP_REQUEST:rU.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new no.CustomEvent(e,{composed:!0,bubbles:!0}))}}oX.getSlotTemplateHTML=function(e){return` 1143 <style> 1144 :host([${rF.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) { 1145 display: none !important; 1146 } 1147 1148 :host(:not([${rF.MEDIA_IS_PIP}])) slot[name=icon] slot:not([name=enter]) { 1149 display: none !important; 1150 } 1151 1152 :host([${rF.MEDIA_IS_PIP}]) slot[name=tooltip-enter], 1153 :host(:not([${rF.MEDIA_IS_PIP}])) slot[name=tooltip-exit] { 1154 display: none; 1155 } 1156 </style> 1157 1158 <slot name="icon"> 1159 <slot name="enter">${oQ}</slot> 1160 <slot name="exit">${oQ}</slot> 1161 </slot> 1162 `},oX.getTooltipContentHTML=function(){return` 1163 <slot name="tooltip-enter">${r5("Enter picture in picture mode")}</slot> 1164 <slot name="tooltip-exit">${r5("Exit picture in picture mode")}</slot> 1165 `},no.customElements.get("media-pip-button")||no.customElements.define("media-pip-button",oX);var oJ=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)};let o0={RATES:"rates"},o1=[1,1.2,1.5,1.7,2];function o2(e){return Math.round(100*e)/100}class o3 extends sq{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,c6,new nz(this,o0.RATES,{defaultValue:o1})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${o2(null!=(e=this.mediaPlaybackRate)?e:1)}x`}static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_PLAYBACK_RATE,o0.RATES]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===o0.RATES&&(oJ(this,c6).value=i),e===rF.MEDIA_PLAYBACK_RATE){let e=i?+i:NaN,t=o2(Number.isNaN(e)?1:e);this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",r5("Playback rate {playbackRate}",{playbackRate:t}))}}get rates(){return oJ(this,c6)}set rates(e){e?Array.isArray(e)?oJ(this,c6).value=e.join(" "):"str
1165ing"==typeof e&&(oJ(this,c6).value=e):oJ(this,c6).value=""}get mediaPlaybackRate(){return nR(this,rF.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){nS(this,rF.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;let i=Array.from(oJ(this,c6).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 no.CustomEvent(rU.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(r)}}c6=new WeakMap,o3.getSlotTemplateHTML=function(e){let t=e.mediaplaybackrate?o2(+e.mediaplaybackrate):1;return` 1166 <style> 1167 :host { 1168 min-width: 5ch; 1169 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 1170 } 1171 </style> 1172 <slot name="icon">${t}x</slot> 1173 `},o3.getTooltipContentHTML=function(){return r5("Playback rate")},no.customElements.get("media-playback-rate-button")||no.customElements.define("media-playback-rate-button",o3);let o4=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1174 <path d="m6 21 15-9L6 3v18Z"/> 1175</svg>`,o5=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1176 <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/> 1177</svg>`,o9=e=>{let t=e.mediaPaused?r5("play"):r5("pause");e.setAttribute("aria-label",t)};class o8 extends sq{static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_PAUSED,rF.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),o9(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),(e===rF.MEDIA_PAUSED||e===rF.MEDIA_LANG)&&o9(this)}get mediaPaused(){return nI(this,rF.MEDIA_PAUSED)}set mediaPaused(e){nC(this,rF.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?rU.MEDIA_PLAY_REQUEST:rU.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new no.CustomEvent(e,{composed:!0,bubbles:!0}))}}o8.getSlotTemplateHTML=function(e){return` 1178 <style> 1179 :host([${rF.MEDIA_PAUSED}]) slot[name=pause], 1180 :host(:not([${rF.MEDIA_PAUSED}])) slot[name=play] { 1181 display: none !important; 1182 } 1183 1184 :host([${rF.MEDIA_PAUSED}]) slot[name=tooltip-pause], 1185 :host(:not([${rF.MEDIA_PAUSED}])) slot[name=tooltip-play] { 1186 display: none; 1187 } 1188 </style> 1189 1190 <slot name="icon"> 1191 <slot name="play">${o4}</slot> 1192 <slot name="pause">${o5}</slot> 1193 </slot> 1194 `},o8.getTooltipContentHTML=function(){return` 1195 <slot name="tooltip-play">${r5("Play")}</slot> 1196 <slot name="tooltip-pause">${r5("Pause")}</slot> 1197 `},no.customElements.get("media-play-button")||no.customElements.define("media-play-button",o8);let o6={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"};class o7 extends no.HTMLElement{static get observedAttributes(){return[o6.PLACEHOLDER_SRC,o6.SRC]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=np(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,i){if(e===o6.SRC&&(null==i?this.image.removeAttribute(o6.SRC):this.image.setAttribute(o6.SRC,i)),e===o6.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 nL(this,o6.PLACEHOLDER_SRC)}set placeholderSrc(e){nD(this,o6.SRC,e)}get src(){return nL(this,o6.SRC)}set src(e){nD(this,o6.SRC,e)}}o7.shadowRootOptions={mode:"open"},o7.getTemplateHTML=function(e){return` 1198 <style> 1199 :host { 1200 pointer-events: none; 1201 display: var(--media-poster-image-display, inline-block); 1202 box-sizing: border-box; 1203 } 1204 1205 img { 1206 max-width: 100%; 1207 max-height: 100%; 1208 min-width: 100%; 1209 min-height: 100%; 1210 background-repeat: no-repeat; 1211 background-position: var(--media-poster-image-background-position, var(--media-object-position, center)); 1212 background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain)); 1213 object-fit: var(--media-object-fit, contain); 1214 object-position: var(--media-object-position, center); 1215 } 1216 </style> 1217 1218 <img part="poster img" aria-hidden="true" id="image"/> 1219 `},no.customElements.get("media-poster-image")||no.customElements.define("media-poster-image",o7);var le=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};class lt extends om{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,c7,void 0),((e,t,i,a)=>(le(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,c7,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_PREVIEW_CHAPTER,rF.MEDIA_LA
1219NG]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),(e===rF.MEDIA_PREVIEW_CHAPTER||e===rF.MEDIA_LANG)&&i!==t&&null!=i){var a,r;if((le(this,a=c7,"read from private field"),r?r.call(this):a.get(this)).textContent=i,""!==i){let e=r5("chapter: {chapterName}",{chapterName:i});this.setAttribute("aria-valuetext",e)}else this.removeAttribute("aria-valuetext")}}get mediaPreviewChapter(){return nL(this,rF.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){nD(this,rF.MEDIA_PREVIEW_CHAPTER,e)}}c7=new WeakMap,no.customElements.get("media-preview-chapter-display")||no.customElements.define("media-preview-chapter-display",lt);var li=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},la=(e,t,i)=>(li(e,t,"read from private field"),i?i.call(e):t.get(e)),lr=(e,t,i,a)=>(li(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class ln extends no.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,he,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=np(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[rW.MEDIA_CONTROLLER,rF.MEDIA_PREVIEW_IMAGE,rF.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t,i;let a=this.getAttribute(rW.MEDIA_CONTROLLER);a&&(lr(this,he,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=la(this,he))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=la(this,he))?void 0:e.unassociateElement)||t.call(e,this),lr(this,he,null)}attributeChangedCallback(e,t,i){var a,r,n,s,o;[rF.MEDIA_PREVIEW_IMAGE,rF.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===rW.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=la(this,he))?void 0:a.unassociateElement)||r.call(a,this),lr(this,he,null)),i&&this.isConnected&&(lr(this,he,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=la(this,he))?void 0:s.associateElement)||o.call(s,this)))}get mediaPreviewImage(){return nL(this,rF.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){nD(this,rF.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(rF.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(e=>+e)}set mediaPreviewCoords(e){if(!e)return void this.removeAttribute(rF.MEDIA_PREVIEW_COORDS);this.setAttribute(rF.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){let e,t,i=this.mediaPreviewCoords,a=this.mediaPreviewImage;if(!(i&&a))return;let[r,n,s,o]=i,l=a.split("#")[0],d=getComputedStyle(this),{maxWidth:u,maxHeight:c,minWidth:h,minHeight:m}=d;if("fill"===(d.getPropertyValue("--media-preview-thumbnail-object-fit").trim()||"contain")){let i=parseInt(u)/s,a=parseInt(c)/o,r=parseInt(h)/s,n=parseInt(m)/o;e=i<1?i:Math.max(i,r),t=a<1?a:Math.max(a,n)}else{let i=Math.min(parseInt(u)/s,parseInt(c)/o),a=Math.max(parseInt(h)/s,parseInt(m)/o),r=i<1?i:a>1?a:1;e=r,t=r}let{style:p}=nk(this.shadowRoot,":host"),v=nk(this.shadowRoot,"img").style,E=this.shadowRoot.querySelector("img"),b=1>Math.min(e,t)?"min":"max";p.setProperty(`${b}-width`,"initial","important"),p.setProperty(`${b}-height`,"initial","important"),p.width=`${s*e}px`,p.height=`${o*t}px`;let g=()=>{v.width=`${this.imgWidth*e}px`,v.height=`${this.imgHeight*t}px`,v.display="block"};E.src!==l&&(E.onload=()=>{this.imgWidth=E.naturalWidth,this.imgHeight=E.naturalHeight,g(),E.onload=null},E.src=l,g()),g(),v.transform=`translate(-${r*e}px, -${n*t}px)`}}he=new WeakMap,ln.shadowRootOptions={mode:"open"},ln.getTemplateHTML=function(e){return` 1220 <style> 1221 :host { 1222 box-sizing: border-box; 1223 display: var(--media-control-display, var(--media-preview-thumbnail-display, inline-block)); 1224 overflow: hidden; 1225 } 1226 1227 img { 1228 display: none; 1229 position: relative; 1230 } 1231 </style> 1232 <img crossorigin loading="eager" decoding="async"> 1233 `},no.customElements.get("media-preview-thumbnail")||no.customElements.define("media-preview-thumbnail",ln);var ls=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lo=(e,t,i)=>(ls(e,t,"read from private field"),i?i.call(e):t.get(e));class ll extends om{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,ht,void 0),((e,t,i,a)=>(ls(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,ht,this.shadowRoot.querySelector("slot")),lo(this,ht).textContent=r6(0)}static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rF.MEDIA_PREVIEW_TIME&&null!=i&&(lo(this,ht).textContent=r6(parseFloat(i)))}get mediaPreviewTime(){return nR(this,rF.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){nS(this,rF.MEDIA_PREVIEW_TIME,e)}}ht=new WeakMap,no.customElements.get("media-preview-time-display")||no.customElements.define("media-preview-time-display",ll);let ld={SEEK_OFFSET:"seekoffset"};class lu extends sq{static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_CURRENT_TIME,ld.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=nR(this,ld.SEEK_OFFSET,30)}attributeChangedCallback(e,t,i){var a;super.attributeChangedCallback(e,t,i),a=this.seekOffset,this.setAttribute("aria-label",r5("seek back {seekOffset} seconds",{seekOffset:a})),e===ld.SEEK_OFFSET&&(this.seekOffset=nR(this,ld.SEEK_OFFSET,30))}get seekOffset(){return nR(this,ld.SEEK_OFFSET,30)}set seekOffset(e){nS(this,ld.SEEK_OFFSET,e),this.setAttribute("aria-label",r5("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),nb(ng(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return nR(this,rF.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){nS(this,rF.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new no.CustomEvent(rU.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}lu.getSlotTemplateHTML=function(e,t){let i;return` 1234 <slot name="icon">${i=t.seekOffset,` 1235 <svg aria-hidden="true" viewBox="0 0 20 24"> 1236 <defs> 1237 <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style> 1238 </defs> 1239 <text class="text value" transform="translate(2.18 19.87)">${i}</text> 1240 <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"/> 1241 </svg>`}</slot> 1242 `},lu.getTooltipContentHTML=function(){return r5("Seek backward")},no.customElements.get("media-seek-backward-button")||no.customElements.define("media-seek-backward-button",lu);let lc={SEEK_OFFSET:"seekoffset"};class lh extends sq{static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_CURRENT_TIME,lc.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=nR(this,lc.SEEK_OFFSET,30)}attributeChangedCallback(e,t,i){var a;super.attributeChangedCallback(e,t,i),a=this.seekOffset,this.setAttribute("aria-label",r5("seek forward {seekOffset} seconds",{seekOffset:a})),e===lc.SEEK_OFFSET&&(this.seekOffset=nR(this,lc.SEEK_OFFSET,30))}get seekOffset(){return nR(this,lc.SEEK_OFFSET,30)}set seekOffset(e){nS(this,lc.SEEK_OFFSET,e),this.setAttribute("aria-label",r5("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),nb(ng(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return nR(this,rF.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){nS(this,rF.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,t=new no.CustomEvent(rU.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}lh.getSlotTemplateHTML=function(e,t){let i;return` 1243 <slot name="icon">${i=t.seekOffset,` 1244 <svg aria-hidden="true" viewBox="0 0 20 24"> 1245 <defs> 1246 <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style> 1247 </defs> 1248 <text class="text value" transform="translate(8.9 19.87)">${i}</text> 1249 <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"/> 1250 </svg>`}</slot> 1251 `},lh.getTooltipContentHTML=function(){return r5("Seek forward")},no.customElements.get("media-seek-forward-button")||no.customElements.define("media-seek-forward-button",lh);var lm=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lp=(e,t,i)=>(lm(e,t,"read from private field"),i?i.call(e):t.get(e)),lv=(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)},lE=(e,t,i,a)=>(lm(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),lb=(e,t,i)=>(lm(e,t,"access private method"),i);let lg={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},lf=[...Object.values(lg),rF.MEDIA_CURRENT_TIME,rF.MEDIA_DURATION,rF.MEDIA_SEEKABLE],l_=["Enter"," "],ly=" / ",lT=(e,{timesSep:t=ly}={})=>{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?r6(0-(s-r)):r6(r);return e.showDuration?`${o}${t}${r6(s)}`:o};class lA extends om{constructor(){super(),lv(this,hn),lv(this,ho),lv(this,hd),lv(this,hc),lv(this,hi,void 0),lv(this,ha,null),lv(this,hr,e=>{let{metaKey:t,altKey:i,key:a}=e;if(t||i||!l_.includes(a))return void this.removeEventListener("keyup",lp(this,ha));this.addEventListener("keyup",lp(this,ha))}),lE(this,hi,this.shadowRoot.querySelector("slot")),lp(this,hi).innerHTML=`${lT(this)}`}static get observedAttributes(){return[...super.observedAttributes,...lf,"disabled"]}connectedCallback(){let{style:e}=nk(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.setAttribute("aria-label",r5("playback time")),lb(this,hd,hu).call(this),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),lb(this,ho,hl).call(this),super.disconnectedCallback()}attributeChangedCallback(e,t,i){this.setAttribute("aria-label",r5("playback time")),lf.includes(e)?this.update():"disabled"===e&&i!==t?null==i?lb(this,hd,hu).call(this):lb(this,hc,hh).c
1251all(this):e===lg.NO_TOGGLE&&i!==t&&(this.noToggle?lb(this,hc,hh).call(this):lb(this,hd,hu).call(this)),super.attributeChangedCallback(e,t,i)}enable(){this.noToggle||(this.tabIndex=0)}disable(){this.tabIndex=-1}get remaining(){return nI(this,lg.REMAINING)}set remaining(e){nC(this,lg.REMAINING,e)}get showDuration(){return nI(this,lg.SHOW_DURATION)}set showDuration(e){nC(this,lg.SHOW_DURATION,e)}get noToggle(){return nI(this,lg.NO_TOGGLE)}set noToggle(e){nC(this,lg.NO_TOGGLE,e)}get mediaDuration(){return nR(this,rF.MEDIA_DURATION)}set mediaDuration(e){nS(this,rF.MEDIA_DURATION,e)}get mediaCurrentTime(){return nR(this,rF.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){nS(this,rF.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(rF.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){if(null==e)return void this.removeAttribute(rF.MEDIA_SEEKABLE);this.setAttribute(rF.MEDIA_SEEKABLE,e.join(":"))}update(){let e=lT(this);(e=>{var t;let i=e.mediaCurrentTime,[,a]=null!=(t=e.mediaSeekable)?t:[],r=null;if(Number.isFinite(e.mediaDuration)?r=e.mediaDuration:Number.isFinite(a)&&(r=a),null==i||null===r)return e.setAttribute("aria-description",r5("video not loaded, unknown time."));let n=e.remaining?r8(0-(r-i)):r8(i);if(!e.showDuration)return e.setAttribute("aria-description",n);let s=r5("{currentTime} of {totalTime}",{currentTime:n,totalTime:r8(r)});e.setAttribute("aria-description",s)})(this),e!==lp(this,hi).innerHTML&&(lp(this,hi).innerHTML=e)}}hi=new WeakMap,ha=new WeakMap,hr=new WeakMap,hn=new WeakSet,hs=function(){lp(this,ha)||(lE(this,ha,e=>{let{key:t}=e;if(!l_.includes(t))return void this.removeEventListener("keyup",lp(this,ha));this.toggleTimeDisplay()}),this.addEventListener("keydown",lp(this,hr)),this.addEventListener("click",this.toggleTimeDisplay))},ho=new WeakSet,hl=function(){lp(this,ha)&&(this.removeEventListener("keyup",lp(this,ha)),this.removeEventListener("keydown",lp(this,hr)),this.removeEventListener("click",this.toggleTimeDisplay),lE(this,ha,null))},hd=new WeakSet,hu=function(){this.noToggle||this.hasAttribute("disabled")||(this.setAttribute("role","button"),this.enable(),lb(this,hn,hs).call(this))},hc=new WeakSet,hh=function(){this.removeAttribute("role"),this.disable(),lb(this,ho,hl).call(this)},lA.getSlotTemplateHTML=function(e,t){return` 1252 <slot>${lT(t)}</slot> 1253 `},no.customElements.get("media-time-display")||no.customElements.define("media-time-display",lA);var lk=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lw=(e,t,i)=>(lk(e,t,"read from private field"),i?i.call(e):t.get(e)),lR=(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)},lS=(e,t,i,a)=>(lk(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class lI{constructor(e,t,i){lR(this,hm,void 0),lR(this,hp,void 0),lR(this,hv,void 0),lR(this,hE,void 0),lR(this,hb,void 0),lR(this,hg,void 0),lR(this,hf,void 0),lR(this,h_,void 0),lR(this,hy,0),lR(this,hT,(e=performance.now())=>{lS(this,hy,requestAnimationFrame(lw(this,hT))),lS(this,hE,performance.now()-lw(this,hv));let t=1e3/this.fps;if(lw(this,hE)>t){lS(this,hv,e-lw(this,hE)%t);let i=1e3/((e-lw(this,hp))/++((e,t,i,a)=>({set _(value){lS(e,t,value,i)},get _(){return lw(e,t,a)}}))(this,hb)._),a=(e-lw(this,hg))/1e3/this.duration,r=lw(this,hf)+a*this.playbackRate;r-lw(this,hm).valueAsNumber>0?lS(this,h_,this.playbackRate/this.duration/i):(lS(this,h_,.995*lw(this,h_)),r=lw(this,hm).valueAsNumber+lw(this,h_)),this.callback(r)}}),lS(this,hm,e),this.callback=t,this.fps=i}start(){0===lw(this,hy)&&(lS(this,hv,performance.now()),lS(this,hp,lw(this,hv)),lS(this,hb,0),lw(this,hT).call(this))}stop(){0!==lw(this,hy)&&(cancelAnimationFrame(lw(this,hy)),lS(this,hy,0))}update({start:e,duration:t,playbackRate:i}){let a=e-lw(this,hm).valueAsNumber,r=Math.abs(t-this.duration);(a>0||a<-.03||r>=.5)&&this.callback(e),lS(this,hf,e),lS(this,hg,performance.now()),this.duration=t,this.playbackRate=i}}hm=new WeakMap,hp=new WeakMap,hv=new WeakMap,hE=new WeakMap,hb=new WeakMap,hg=new WeakMap,hf=new WeakMap,h_=new WeakMap,hy=new WeakMap,hT=new WeakMap;var lC=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lL=(e,t,i)=>(lC(e,t,"read from private field"),i?i.call(e):t.get(e)),lD=(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)},lM=(e,t,i,a)=>(lC(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),lO=(e,t,i)=>(lC(e,t,"access private method"),i);let lx=(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))},lN=(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 lP extends on{constructor(){super(),lD(this,hx),lD(this,hU),lD(this,hB),lD(this,hF),lD(this,hK),lD(this,hq),lD(this,hG),lD(this,hA,null),lD(this,hk,void 0),lD(this,hw,void 0),lD(this,hR,void 0),lD(this,hS,void 0),lD(this,hI,void 0),lD(this,hC,void 0),lD(this,hL,void 0),lD(this,hD,void 0),lD(this,hM,void 0),lD(this,hO,()=>{lO(this,hx,hN).call(this)?lL(this,hk).start():lL(this,hk).stop()}),lD(this,hP,e=>{!this.dragging&&(r0(e)&&(this.range.valueAsNumber=e),lL(this,hM)||this.updateBar())}),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),lM(this,hw,this.shadowRoot.querySelectorAll('[part~="box"]')),lM(this,hS,this.shadowRoot.querySelector('[part~="preview-box"]')),lM(this,hI,this.shadowRoot.querySelector('[part~="current-box"]'));let e=getComputedStyle(this);lM(this,hC,parseInt(e.getPropertyValue("--media-box-padding-left"))),lM(this,hL,parseInt(e.getPropertyValue("--media-box-padding-right"))),lM(this,hk,new lI(this.range,lL(this,hP),60))}static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_PAUSED,rF.MEDIA_DURATION,rF.MEDIA_SEEKABLE,rF.MEDIA_CURRENT_TIME,rF.MEDIA_PREVIEW_IMAGE,rF.MEDIA_PREVIEW_TIME,rF.MEDIA_PREVIEW_CHAPTER,rF.MEDIA_BUFFERED,rF.MEDIA_PLAYBACK_RATE,rF.MEDIA_LOADING,rF.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",r5("seek")),lL(this,hO).call(this),lM(this,hA,this.getRootNode()),null==(e=lL(this,hA))||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),lL(this,hk).stop(),null==(e=lL(this,hA))||e.removeEventListener("transitionstart",this),lM(this,hA,null)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),t!=i&&(e===rF.MEDIA_CURRENT_TIME||e===rF.MEDIA_PAUSED||e===rF.MEDIA_ENDED||e===rF.MEDIA_LOADING||e===rF.MEDIA_DURATION||e===rF.MEDIA_SEEKABLE?(lL(this,hk).update({start:lx(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),lL(this,hO).call(this),(e=>
1253{let t=e.range,i=r8(+lN(e)),a=r8(+e.mediaSeekableEnd),r=i&&a?r5("{currentTime} of {totalTime}",{currentTime:i,totalTime:a}):r5("video not loaded, unknown time.");t.setAttribute("aria-valuetext",r)})(this)):e===rF.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===rF.MEDIA_DURATION||e===rF.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=lL(this,hD),this.updateBar()))}get mediaChaptersCues(){return lL(this,hD)}set mediaChaptersCues(e){var t;lM(this,hD,e),this.updateSegments(null==(t=lL(this,hD))?void 0:t.map(e=>({start:lx(this,e.startTime),end:lx(this,e.endTime)})))}get mediaPaused(){return nI(this,rF.MEDIA_PAUSED)}set mediaPaused(e){nC(this,rF.MEDIA_PAUSED,e)}get mediaLoading(){return nI(this,rF.MEDIA_LOADING)}set mediaLoading(e){nC(this,rF.MEDIA_LOADING,e)}get mediaDuration(){return nR(this,rF.MEDIA_DURATION)}set mediaDuration(e){nS(this,rF.MEDIA_DURATION,e)}get mediaCurrentTime(){return nR(this,rF.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){nS(this,rF.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return nR(this,rF.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){nS(this,rF.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(rF.MEDIA_BUFFERED);return e?e.split(" ").map(e=>e.split(":").map(e=>+e)):[]}set mediaBuffered(e){if(!e)return void this.removeAttribute(rF.MEDIA_BUFFERED);let t=e.map(e=>e.join(":")).join(" ");this.setAttribute(rF.MEDIA_BUFFERED,t)}get mediaSeekable(){let e=this.getAttribute(rF.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){if(null==e)return void this.removeAttribute(rF.MEDIA_SEEKABLE);this.setAttribute(rF.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 nL(this,rF.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){nD(this,rF.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return nR(this,rF.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){nS(this,rF.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return nI(this,rF.MEDIA_ENDED)}set mediaEnded(e){nC(this,rF.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=lx(this,r)}let{style:a}=nk(this.shadowRoot,"#buffered");a.setProperty("width",`${100*t}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;let e=nk(this.shadowRoot,"#current-rail"),t=nk(this.shadowRoot,'[part~="current-box"]'),i=lO(this,hU,hW).call(this,lL(this,hI)),a=lO(this,hB,hH).call(this,i,this.range.valueAsNumber),r=lO(this,hF,hV).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":lO(this,hG,hj).call(this);break;case"pointermove":lO(this,hK,h$).call(this,e);break;case"pointerup":lL(this,hM)&&lM(this,hM,!1);break;case"pointerdown":lM(this,hM,!0);break;case"pointerleave":lO(this,hq,hY).call(this,null);break;case"transitionstart":nf(e.target,this)&&setTimeout(()=>lL(this,hO).call(this),0)}}}hA=new WeakMap,hk=new WeakMap,hw=new WeakMap,hR=new WeakMap,hS=new WeakMap,hI=new WeakMap,hC=new WeakMap,hL=new WeakMap,hD=new WeakMap,hM=new WeakMap,hO=new WeakMap,hx=new WeakSet,hN=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&nA(this)},hP=new WeakMap,hU=new WeakSet,hW=function(e){var t;let i=(null!=(t=this.getAttribute("bounds")?n_(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}},hB=new WeakSet,hH=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},hF=new WeakSet,hV=function(e,t){let{width:i,min:a,max:r}
1253=e.box,n=t*e.range.width;if(n<a+lL(this,hC)){let t=e.range.left-e.bounds.left-lL(this,hC);return`${n-i/2+t}px`}if(n>r-lL(this,hL)){let t=e.bounds.right-e.range.right-lL(this,hL);return`${n+i/2-t-e.range.width}px`}return 0},hK=new WeakSet,h$=function(e){let t=[...lL(this,hw)].some(t=>e.composedPath().includes(t));if(!this.dragging&&(t||!e.composedPath().includes(this)))return void lO(this,hq,hY).call(this,null);let i=this.mediaSeekableEnd;if(!i)return;let a=nk(this.shadowRoot,"#preview-rail"),r=nk(this.shadowRoot,'[part~="preview-box"]'),n=lO(this,hU,hW).call(this,lL(this,hS)),s=(e.clientX-n.range.left)/n.range.width;s=Math.max(0,Math.min(1,s));let o=lO(this,hB,hH).call(this,n,s),l=lO(this,hF,hV).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(lL(this,hR))-Math.round(s*i))&&s>.01&&s<.99||(lM(this,hR,s*i),lO(this,hq,hY).call(this,lL(this,hR)))},hq=new WeakSet,hY=function(e){this.dispatchEvent(new no.CustomEvent(rU.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:e}))},hG=new WeakSet,hj=function(){lL(this,hk).stop();let e=lN(this);this.dispatchEvent(new no.CustomEvent(rU.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e}))},lP.shadowRootOptions={mode:"open"},lP.getContainerTemplateHTML=function(e){return` 1254 <style> 1255 :host { 1256 --media-box-border-radius: 4px; 1257 --media-box-padding-left: 10px; 1258 --media-box-padding-right: 10px; 1259 --media-preview-border-radius: var(--media-box-border-radius); 1260 --media-box-arrow-offset: var(--media-box-border-radius); 1261 --_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 1262 --_preview-background: var(--media-preview-background, var(--_control-background)); 1263 1264 1265 contain: layout; 1266 } 1267 1268 #buffered { 1269 background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4)); 1270 position: absolute; 1271 height: 100%; 1272 will-change: width; 1273 } 1274 1275 #preview-rail, 1276 #current-rail { 1277 width: 100%; 1278 position: absolute; 1279 left: 0; 1280 bottom: 100%; 1281 pointer-events: none; 1282 will-change: transform; 1283 } 1284 1285 [part~="box"] { 1286 width: min-content; 1287 1288 position: absolute; 1289 bottom: 100%; 1290 flex-direction: column; 1291 align-items: center; 1292 transform: translateX(-50%); 1293 } 1294 1295 [part~="current-box"] { 1296 display: var(--media-current-box-display, var(--media-box-display, flex)); 1297 margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px)); 1298 visibility: hidden; 1299 } 1300 1301 [part~="preview-box"] { 1302 display: var(--media-preview-box-display, var(--media-box-display, flex)); 1303 margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px)); 1304 transition-property: var(--media-preview-transition-property, visibility, opacity); 1305 transition-duration: var(--media-preview-transition-duration-out, .25s); 1306 transition-delay: var(--media-preview-transition-delay-out, 0s); 1307 visibility: hidden; 1308 opacity: 0; 1309 } 1310 1311 :host(:is([${rF.MEDIA_PREVIEW_IMAGE}], [${rF.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] { 1312 transition-duration: var(--media-preview-transition-duration-in, .5s); 1313 transition-delay: var(--media-preview-transition-delay-in, .25s); 1314 visibility: visible; 1315 opacity: 1; 1316 } 1317 1318 @media (hover: hover) { 1319 :host(:is([${rF.MEDIA_PREVIEW_IMAGE}], [${rF.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] { 1320 transition-duration: var(--media-preview-transition-duration-in, .5s); 1321 transition-delay: var(--media-preview-transition-delay-in, .25s); 1322 visibility: visible; 1323 opacity: 1; 1324 } 1325 } 1326 1327 media-preview-thumbnail, 1328 ::slotted(media-preview-thumbnail) { 1329 visibility: hidden; 1330 1331 transition: visibility 0s .25s; 1332 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
1333 background: var(--media-preview-thumbnail-background, var(--_preview-background)); 1334 box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2)); 1335 max-width: var(--media-preview-thumbnail-max-width, 180px); 1336 max-height: var(--media-preview-thumbnail-max-height, 160px); 1337 min-width: var(--media-preview-thumbnail-min-width, 120px); 1338 min-height: var(--media-preview-thumbnail-min-height, 80px); 1339 border: var(--media-preview-thumbnail-border); 1340 border-radius: var(--media-preview-thumbnail-border-radius, 1341 var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0); 1342 } 1343 1344 :host([${rF.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail, 1345 :host([${rF.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) { 1346 transition-delay: var(--media-preview-transition-delay-in, .25s); 1347 visibility: visible; 1348 } 1349 1350 @media (hover: hover) { 1351 :host([${rF.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail, 1352 :host([${rF.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) { 1353 transition-delay: var(--media-preview-transition-delay-in, .25s); 1354 visibility: visible; 1355 } 1356 1357 :host([${rF.MEDIA_PREVIEW_TIME}]:hover) { 1358 --media-time-range-hover-display: block; 1359 } 1360 } 1361 1362 media-preview-chapter-display, 1363 ::slotted(media-preview-chapter-display) { 1364 font-size: var(--media-font-size, 13px); 1365 line-height: 17px; 1366 min-width: 0; 1367 visibility: hidden; 1368 1369 transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s; 1370 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 1371 background: var(--media-preview-chapter-background, var(--_preview-background)); 1372 border-radius: var(--media-preview-chapter-border-radius, 1373 var(--media-preview-border-radius) var(--media-preview-border-radius) 1374 var(--media-preview-border-radius) var(--media-preview-border-radius)); 1375 padding: var(--media-preview-chapter-padding, 3.5px 9px); 1376 margin: var(--media-preview-chapter-margin, 0 0 5px); 1377 text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75)); 1378 } 1379 1380 :host([${rF.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display, 1381 :host([${rF.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) { 1382 transition-delay: var(--media-preview-transition-delay-in, .25s); 1383 border-radius: var(--media-preview-chapter-border-radius, 0); 1384 padding: var(--media-preview-chapter-padding, 3.5px 9px 0); 1385 margin: var(--media-preview-chapter-margin, 0); 1386 min-width: 100%; 1387 } 1388 1389 media-preview-chapter-display[${rF.MEDIA_PREVIEW_CHAPTER}], 1390 ::slotted(media-preview-chapter-display[${rF.MEDIA_PREVIEW_CHAPTER}]) { 1391 visibility: visible; 1392 } 1393 1394 media-preview-chapter-display:not([aria-valuetext]), 1395 ::slotted(media-preview-chapter-display:not([aria-valuetext])) { 1396 display: none; 1397 } 1398 1399 media-preview-time-display, 1400 ::slotted(media-preview-time-display), 1401 media-time-display, 1402 ::slotted(media-time-display) { 1403 font-size: var(--media-font-size, 13px); 1404 line-height: 17px; 1405 min-width: 0; 1406 1407 transition: min-width 0s, border-radius 0s; 1408 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 1409 background: var(--media-preview-time-background, var(--_preview-background)); 1410 border-radius: var(--media-preview-time-border-radius, 1411 var(--media-preview-border-radius) var(--media-preview-border-radius) 1412 var(--media-preview-border-radius) var(--media-preview-border-radius)); 1413 padding: var(--media-preview-time-padding, 3.5px 9px); 1414 margin: var(--media-preview-time-margin, 0); 1415 text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75)); 1416 transform: translateX(min( 1417 max(calc(50% - var(--_box-width) / 2), 1418 calc(var(--_box-shift, 0))), 1419 calc(var(--_box-width) / 2 - 50%) 1420 )); 1421 } 1422 1423 :host([${rF.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display, 1424 :host([${rF.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) { 1425 transition-delay: var(--media-preview-transition-delay-in, .25s); 1426 border-radius: var(--media-preview-time-border-radius, 1427 0 0 var(--media-preview-border-radius) var(--media-preview-border-radius)); 1428 min-width: 100%; 1429 } 1430 1431 :host([${rF.MEDIA_PREVIEW_TIME}]:hover) { 1432 --media-time-range-hover-display: block; 1433 } 1434 1435 [part~="arrow"], 1436 ::slotted([part~="arrow"]) { 1437 display: var(--media-box-arrow-display, inline-block); 1438 transform: translateX(min( 1439 max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)), 1440 calc(var(--_box-shift, 0))), 1441 calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset)) 1442 )); 1443 1444 border-color: transparent; 1445 border-top-color: var(--media-box-arrow-background, var(--_control-background)); 1446 border-width: var(--media-box-arrow-border-width, 1447 var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0); 1448 border-style: solid; 1449 justify-content: center; 1450 height: 0; 1451 } 1452 </style> 1453 <div id="preview-rail"> 1454 <slot name="preview" part="box preview-box">
1455 <media-preview-thumbnail> 1456 <template shadowrootmode="${ln.shadowRootOptions.mode}"> 1457 ${ln.getTemplateHTML({})} 1458 </template> 1459 </media-preview-thumbnail> 1460 <media-preview-chapter-display></media-preview-chapter-display> 1461 <media-preview-time-display></media-preview-time-display> 1462 <slot name="preview-arrow"><div part="arrow"></div></slot> 1463 </slot> 1464 </div> 1465 <div id="current-rail"> 1466 <slot name="current" part="box current-box"> 1467 1468 </slot> 1469 </div> 1470 `},no.customElements.get("media-time-range")||no.customElements.define("media-time-range",lP);var lU=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)};class lW extends on{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,hz,()=>{let e=this.range.value,t=new no.CustomEvent(rU.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)})}static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_VOLUME,rF.MEDIA_MUTED,rF.MEDIA_VOLUME_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",r5("volume")),this.range.addEventListener("input",lU(this,hz))}disconnectedCallback(){this.range.removeEventListener("input",lU(this,hz)),super.disconnectedCallback()}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===rF.MEDIA_VOLUME||e===rF.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()}}
1470get mediaVolume(){return nR(this,rF.MEDIA_VOLUME,1)}set mediaVolume(e){nS(this,rF.MEDIA_VOLUME,e)}get mediaMuted(){return nI(this,rF.MEDIA_MUTED)}set mediaMuted(e){nC(this,rF.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return nL(this,rF.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){nD(this,rF.MEDIA_VOLUME_UNAVAILABLE,e)}}hz=new WeakMap,no.customElements.get("media-volume-range")||no.customElements.define("media-volume-range",lW);class lB extends sq{constructor(){super(...arguments),this.container=null}static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_LOOP]}connectedCallback(){var e;super.connectedCallback(),this.container=(null==(e=this.shadowRoot)?void 0:e.querySelector("#icon"))||null,this.container&&(this.container.textContent=r5("Loop"))}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rF.MEDIA_LOOP&&this.container&&this.setAttribute("aria-checked",this.mediaLoop?"true":"false")}get mediaLoop(){return nI(this,rF.MEDIA_LOOP)}set mediaLoop(e){nC(this,rF.MEDIA_LOOP,e)}handleClick(){let e=!this.mediaLoop,t=new no.CustomEvent(rU.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}lB.getSlotTemplateHTML=function(e){return` 1471 <style> 1472 :host { 1473 min-width: 4ch; 1474 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 1475 width: 100%; 1476 display: grid; 1477 grid-template-columns: 1fr auto; 1478 gap: 1rem; 1479 font-weight: var(--media-button-font-weight, normal); 1480 } 1481 1482 #checked-indicator { 1483 display: none; 1484 } 1485 1486 :host([${rF.MEDIA_LOOP}]) #checked-indicator { 1487 display: block; 1488 } 1489 </style> 1490 1491 <span id="icon"> 1492 </span> 1493 1494 <div id="checked-indicator"> 1495 <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator"> 1496 <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"/> 1497 </svg> 1498 </div> 1499 `},lB.getTooltipContentHTML=function(){return r5("Loop")},no.customElements.get("media-loop-button")||no.customElements.define("media-loop-button",lB);var lH=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},lF=(e,t,i)=>(lH(e,t,"read from private field"),i?i.call(e):t.get(e)),lV=(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)},lK=(e,t,i,a)=>(lH(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let l$={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 lX&&"boolean"==typeof a.element[a.attributeName]?a.booleanValue=t:"function"==typeof t&&a instanceof lX?a.element[a.attributeName]=t:a.value=t}}}};class lq extends no.DocumentFragment{constructor(e,t,i=l$){var a;super(),lV(this,hQ,void 0),lV(this,hZ,void 0),this.append(e.content.cloneNode(!0)),lK(this,hQ,lY(this)),lK(this,hZ,i),null==(a=i.createCallback)||a.call(i,this,lF(this,hQ),t),i.processCallback(this,lF(this,hQ),t)}update(e){lF(this,hZ).processCallback(this,lF(this,hQ),e)}}hQ=new WeakMap,hZ=new WeakMap;let lY=(e,t=[])=>{let i,a;for(let r of e.attributes||[])if(r.value.includes("{{")){let n=new lZ;for([i,a]of lj(r.value))if(i){let i=new lX(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 lj(n))if(i){let i=new lJ(e);s.push(i),t.push([a,i])}else s.push(new Text(a));else if(r instanceof HTMLTemplateElement){let i=new l0(e,r);s.push(i),t.push([i.expression,i])}r.replaceWith(...s.flatMap(e=>e.replacementNodes||[e]))}}else lY(r,t);return t},lG={},lj=e=>{let t="",i=0,a=lG[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]),lG[e]=a};class lz{get value(){return""}set value(e){}toString(){return this.value}}let lQ=new WeakMap;class lZ{constructor(){lV(this,hX,[])}[Symbol.iterator](){return lF(this,hX).values()}get length(){return lF(this,hX).length}item(e){return lF(this,hX)[e]}append(...e){for(let t of e)t instanceof lX&&lQ.set(t,this),lF(this,hX).push(t)}toString(){return lF(this,hX).join("")}}hX=new WeakMap;class lX extends lz{constructor(e,t,i){super(),lV(this,h3),lV(this,hJ,""),lV(this,h0,void 0),lV(this,h1,void 0),lV(this,h2,void 0),lK(this,h0,e),lK(this,h1,t),lK(this,h2,i)}get attributeName(){return lF(this,h1)}get attributeNamespace(){return lF(this,h2)}
1499get element(){return lF(this,h0)}get value(){return lF(this,hJ)}set value(e){lF(this,hJ)!==e&&(lK(this,hJ,e),lF(this,h3,h4)&&1!==lF(this,h3,h4).length?lF(this,h0).setAttributeNS(lF(this,h2),lF(this,h1),lF(this,h3,h4).toString()):null==e?lF(this,h0).removeAttributeNS(lF(this,h2),lF(this,h1)):lF(this,h0).setAttributeNS(lF(this,h2),lF(this,h1),e))}get booleanValue(){return lF(this,h0).hasAttributeNS(lF(this,h2),lF(this,h1))}set booleanValue(e){if(lF(this,h3,h4)&&1!==lF(this,h3,h4).length)throw new DOMException("Value is not fully templatized");this.value=e?"":null}}hJ=new WeakMap,h0=new WeakMap,h1=new WeakMap,h2=new WeakMap,h3=new WeakSet,h4=function(){return lQ.get(this)};class lJ extends lz{constructor(e,t){super(),lV(this,h5,void 0),lV(this,h9,void 0),lK(this,h5,e),lK(this,h9,t?[...t]:[new Text])}get replacementNodes(){return lF(this,h9)}get parentNode(){return lF(this,h5)}get nextSibling(){return lF(this,h9)[lF(this,h9).length-1].nextSibling}get previousSibling(){return lF(this,h9)[0].previousSibling}get value(){return lF(this,h9).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),lK(this,h9,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}(lF(this,h9)[0].parentNode,lF(this,h9),t,this.nextSibling))}}h5=new WeakMap,h9=new WeakMap;class l0 extends lJ{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 l1={string:e=>String(e)};class l2{constructor(e){this.template=e,this.state=void 0}}let l3=new WeakMap,l4=new WeakMap,l5={partial:(e,t)=>{t[e.expression]=new l2(e.template)},if:(e,t)=>{var i;if(l7(e.expression,t))if(l3.get(e)!==e.template){l3.set(e,e.template);let i=new lq(e.template,t,l8);e.replace(i),l4.set(e,i)}else null==(i=l4.get(e))||i.update(t);else e.replace(""),l3.delete(e),l4.delete(e)}},l9=Object.keys(l5),l8={processCallback(e,t,i){var a,r;if(i)for(let[e,n]of t){if(n instanceof l0){if(!n.directive){let e=l9.find(e=>n.template.hasAttribute(e));e&&(n.directive=e,n.expression=n.template.getAttribute(e))}null==(a=l5[n.directive])||a.call(l5,n,i);continue}let t=l7(e,i);if(t instanceof l2){l3.get(n)!==t.template?(l3.set(n,t.template),n.value=t=new lq(t.template,t.state,l8),l4.set(n,t)):null==(r=l4.get(n))||r.update(t.state);continue}t?(n instanceof lX&&n.attributeName.startsWith("aria-")&&(t=String(t)),n instanceof lX?"boolean"==typeof t?n.booleanValue=t:"function"==typeof t?n.element[n.attributeName]=t:n.value=t:(n.value=t,l3.delete(n),l4.delete(n))):n instanceof lX?n.value=void 0:(n.value=void 0,l3.delete(n),l4.delete(n))}}},l6={"!":e=>!e,"!!":e=>!!e,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,">":(e,t)=>e>t,">=":(e,t)=>
1499e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"??":(e,t)=>null!=e?e:t,"|":(e,t)=>{var i;return null==(i=l1[t])?void 0:i.call(l1,e)}};function l7(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 de(e);if((null==(i=d[0])?void 0:i.token)===">"){let i=t[null==(a=d[1])?void 0:a.token];if(!i)return de(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]=di(d,t))}return i}if(1===d.length)return dt(d[0])?di(d[0].token,t):de(e);if(2===d.length){let i=l6[null==(o=d[0])?void 0:o.token];return i&&dt(d[1])?i(di(d[1].token,t)):de(e)}if(3===d.length){let i=null==(l=d[1])?void 0:l.token,a=l6[i];if(!a||!dt(d[0])||!dt(d[2]))return de(e);let r=di(d[0].token,t);return a(r,"|"===i?d[2].token:di(d[2].token,t))}}function de(e){return console.warn(`Warning: invalid expression \`${e}\``),!1}function dt({type:e}){return["number","boolean","string","param"].includes(e)}function di(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):r1(e)?parseFloat(e):t[e]}var da=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},dr=(e,t,i)=>(da(e,t,"read from private field"),i?i.call(e):t.get(e)),dn=(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)},ds=(e,t,i,a)=>(da(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),dl=(e,t,i)=>(da(e,t,"access private method"),i);let dd={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},du=nl.createElement("template");du.innerHTML=` 1500 <style> 1501 :host { 1502 display: inline-block; 1503 line-height: 0; 1504 } 1505 1506 media-controller { 1507 width: 100%; 1508 height: 100%; 1509 } 1510 1511 media-captions-button:not([mediasubtitleslist]), 1512 media-captions-menu:not([mediasubtitleslist]), 1513 media-captions-menu-button:not([mediasubtitleslist]), 1514 media-audio-track-menu[mediaaudiotrackunavailable], 1515 media-audio-track-menu-button[mediaaudiotrackunavailable], 1516 media-rendition-menu[mediarenditionunavailable], 1517 media-rendition-menu-button[mediarenditionunavailable], 1518 media-volume-range[mediavolumeunavailable], 1519 media-airplay-button[mediaairplayunavailable], 1520 media-fullscreen-button[mediafullscreenunavailable], 1521 media-cast-button[mediacastunavailable], 1522 media-pip-button[mediapipunavailable] { 1523 display: none; 1524 } 1525 </style> 1526`;class dc extends no.HTMLElement{constructor(){super(),dn(this,mt),dn(this,ma),dn(this,h8,void 0),dn(this,h6,void 0),dn(this,h7,void 0),dn(this,me,void 0),dn(this,mn,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer()),ds(this,me,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&&!!(dd[e.attributeName]||e.attributeName.startsWith("breakpoint"))})&&this.render()})),ds(this,mn,this.render.bind(this)),dl(this,mt,mi).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return null!=(e=dr(this,h8))?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&&(ds(this,h8,e),ds(this,h7,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})=>dd[e]||e.startsWith("breakpoint")),...Array.from(this.attributes)],r={};for(let e of a){let t=null!=(i=dd[e.name])?i:e.name.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase()),{value:a}=e;null!=a?(r1(a)&&(a=parseFloat(a)),r[t]=""===a||a):r[t]=!1}return r}attributeChangedCallback(e,t,i){"template"===e&&t!=i&&dl(this,ma,mr).call(this)}connectedCallback(){this.addEventListener(rV.BREAKPOINTS_COMPUTED,dr(this,mn)),dr(this,me).observe(this,{attributes:!0}),dr(this,me).observe(this.renderRoot,{attributes:!0,subtree:!0}),dl(this,ma,mr).call(this)}disconnectedCallback(){this.removeEventListener(rV.BREAKPOINTS_COMPUTED,dr(this,mn)),dr(this,me).disconnect()}createRenderer(){this.template instanceof HTMLTemplateElement&&this.template!==dr(this,h6)&&(ds(this,h6,this.template),this.renderer=new lq(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(du.content.cloneNode(!0),this.renderer))}render(){var e;null==(e=this.renderer)||e.update(this.props)}}async function dh(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 dm(e){return e.split("-")[0]}h8=new WeakMap,h6=new WeakMap,h7=new WeakMap,me=new WeakMap,mt=new WeakSet,mi=function(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}},ma=new WeakSet,mr=function(){var e;let t=this.getAttribute("template");if(!t||t===dr(this,h7))return;let i=this.getRootNode(),a=null==(e=null==i?void 0:i.getElementById)?void 0:e.call(i,t);if(a){ds(this,h7,t),ds(this,h8,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)&&(ds(this,h7,t),dh(t).then(e=>{let t=nl.createElement("template");t.innerHTML=e,ds(this,h8,t),this.createRenderer()}).catch(console.error))},mn=new WeakMap,dc.observedAttributes=["template"],dc.processor=l8,no.customElements.get("media-theme")||no.customElements.define("media-theme",dc);
1526class dp extends Event{constructor({action:e="auto",relatedTarget:t,...i}){super("invoke",i),this.action=e,this.relatedTarget=t}}class dv extends Event{constructor({newState:e,oldState:t,...i}){super("toggle",i),this.newState=e,this.oldState=t}}var dE=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},db=(e,t,i)=>(dE(e,t,"read from private field"),i?i.call(e):t.get(e)),dg=(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)},df=(e,t,i,a)=>(dE(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),d_=(e,t,i)=>(dE(e,t,"access private method"),i);function dy({type:e,text:t,value:i,checked:a}){let r=nl.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=nl.createElement("span");return n.textContent=t,r.append(n),r}function dT(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 dA={STYLE:"style",HIDDEN:"hidden",DISABLED:"disabled",ANCHOR:"anchor"};class dk extends no.HTMLElement{constructor(){if(super(),dg(this,mm),dg(this,mv),dg(this,mg),dg(this,m_),dg(this,mT),dg(this,mk),dg(this,mI),dg(this,mL),dg(this,mM),dg(this,mx),dg(this,mP),dg(this,mW),dg(this,mH),dg(this,mV),dg(this,m$),dg(this,mY),dg(this,mj),dg(this,mQ),dg(this,ms,null),dg(this,mo,null),dg(this,ml,null),dg(this,md,new Set),dg(this,mu,void 0),dg(this,mc,!1),dg(this,mh,null),dg(this,mb,()=>{let e=db(this,md),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}));df(this,md,t)}),dg(this,mR,()=>{d_(this,mI,mC).call(this),d_(this,mL,mD).call(this,!1)}),dg(this,mS,()=>{d_(this,mI,mC).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=np(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),df(this,mu,new MutationObserver(db(this,mb)))}static get observedAttributes(){return[dA.DISABLED,dA.HIDDEN,dA.STYLE,dA.ANCHOR,rW.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":d_(this,mm,mp).call(this,e);break;case"invoke":d_(this,m_,my).call(this,e);break;case"click":d_(this,mM,mO).call(this,e);break;case"toggle":d_(this,mP,mU).call(this,e);break;case"focusout":d_(this,mH,mF).call(this,e);break;case"keydown":d_(this,mV,mK).call(this,e)}}connectedCallback(){var e,t;db(this,mu).observe(this.defaultSlot,{childList:!0}),df(this,mh,nw(this.shadowRoot,":host")),d_(this,mg,mf).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),df(this,ms,nE(this)),null==(t=null==(e=db(this,ms))?void 0:e.associateElement)||t.call(e,this),this.hidden||(nh(dR(this),db(this,mR)),nh(this,db(this,mS))),d_(this,mv,mE).call(this),this.shadowRoot.addEventListener("slotchange",this)}disconnectedCallback(){var e,t;db(this,mu).disconnect(),nm(dR(this),db(this,mR)),nm(this,db(this,mS)),this.disable(),null==(t=null==(e=db(this,ms))?void 0:e.unassociateElement)||t.call(e,this),df(this,ms,null),df(this,mo,null),df(this,ml,null),this.shadowRoot.removeEventListener("slotchange",this)}attributeChangedCallback(e,t,i){var a,r,n,s;e===dA.HIDDEN&&i!==t?(db(this,mc)||df(this,mc,!0),this.hidden?d_(this,mk,mw).call(this):d_(this,mT,mA).call(this),this.dispatchEvent(new dv({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===rW.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=db(this,ms))?void 0:a.unassociateElement)||r.call(a,this),df(this,ms,null)),i&&this.isConnected&&(df(this,ms,nE(this)),null==(s=null==(n=db(this,ms))?void 0:n.associateElement)||s.call(n,this))):e===dA.DISABLED&&i!==t?null==i?this.enable():this.disable():e===dA.STYLE&&i!==t&&d_(this,mg,mf).call(this)}formatMenuItemText(e,t){return this.constructor.formatMenuItemText(e,t)}get anchor(){return this.getAttribute("anchor")}
1526set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?null==(e=nT(this))?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(dw)}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&&d_(this,mQ,mZ).call(this,t)}focus(){if(df(this,mo,ny()),this.items.length){d_(this,mj,mz).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=d_(this,m$,mq).call(this,e);i&&(d_(this,mQ,mZ).call(this,i,"checkbox"===i.type),db(this,ml)&&!this.hidden&&(null==(t=db(this,mo))||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=d_(this,m$,mq).call(this,e))?t:d_(this,mY,mG).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),d_(this,mj,mz).call(this,r[s]),r[s].focus()}}function dw(e){return["menuitem","menuitemradio","menuitemcheckbox"].includes(null==e?void 0:e.role)}function dR(e){var t;return null!=(t=e.getAttribute("bounds")?n_(e,`#${e.getAttribute("bounds")}`):nv(e)||e.parentElement)?t:e}ms=new WeakMap,mo=new WeakMap,ml=new WeakMap,md=new WeakMap,mu=new WeakMap,mc=new WeakMap,mh=new WeakMap,mm=new WeakSet,mp=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)&&d_(this,mv,mE).call(this),t.name||db(this,mb).call(this)},mv=new WeakSet,mE=function(){let e=this.shadowRoot.querySelector('slot[name="header"]');e.hidden=0===this.shadowRoot.querySelector('slot[name="title"]').assignedNodes().length&&0===e.assignedNodes().length},mb=new WeakMap,mg=new WeakSet,mf=function(){var e;let t=this.shadowRoot.querySelector("#layout-row"),i=null==(e=getComputedStyle(this).getPropertyValue("--media-menu-layout"))?void 0:e.trim();t.setAttribute("media","row"===i?"":"width:0")},m_=new WeakSet,my=function(e){df(this,ml,e.relatedTarget),nf(this,e.relatedTarget)||(this.hidden=!this.hidden)},mT=new WeakSet,mA=function(){var e;null==(e=db(this,ml))||e.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),nh(dR(this),db(this,mR)),nh(this,db(this,mS))},mk=new WeakSet,mw=function(){var e;null==(e=db(this,ml))||e.setAttribute("aria-expanded","false"),nm(dR(this),db(this,mR)),nm(this,db(this,mS))},mR=new WeakMap,mS=new WeakMap,mI=new WeakSet,mC=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(dm(i))?"y":"x")?"y":"x",n="y"===r?"height":"width",s=dm(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=dR(this).getBoundingClientRect(),r=a.width-t-e,n=a.height-i-this.offsetHeight,{style:s}=db(this,mh);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`)},mL=new WeakSet,mD=function(e){let t=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=null==t?void 0:t.querySelector('[role="menu"]'),{style:a}=db(this,mh);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}
1526px`),d_(this,mI,mC).call(this,a)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),d_(this,mI,mC).call(this);a.removeProperty("--media-menu-transition-in")},mM=new WeakSet,mO=function(e){var t;if(e.stopPropagation(),e.composedPath().includes(db(this,mx,mN))){null==(t=db(this,mo))||t.focus(),this.hidden=!0;return}let i=d_(this,m$,mq).call(this,e);!i||i.hasAttribute("disabled")||(d_(this,mj,mz).call(this,i),this.handleSelect(e))},mx=new WeakSet,mN=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"]'))},mP=new WeakSet,mU=function(e){if(e.target===this)return;d_(this,mW,mB).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 dp({relatedTarget:i})));for(let e of t)e.setAttribute("aria-expanded",`${!e.submenuElement.hidden}`);d_(this,mL,mD).call(this,!0)},mW=new WeakSet,mB=function(){let e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)},mH=new WeakSet,mF=function(e){var t;nf(this,e.relatedTarget)||(db(this,mc)&&(null==(t=db(this,mo))||t.focus()),db(this,ml)&&db(this,ml)!==e.relatedTarget&&!this.hidden&&(this.hidden=!0))},mV=new WeakSet,mK=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(db(this,mc)){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=db(this,mo))||n.focus(),db(this,mc)&&(this.hidden=!0)):"Enter"===s||" "===s?this.handleSelect(e):this.handleMove(e)},m$=new WeakSet,mq=function(e){return e.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))},mY=new WeakSet,mG=function(){return this.items.find(e=>0===e.tabIndex)},mj=new WeakSet,mz=function(e){for(let t of this.items)t.tabIndex=t===e?0:-1},mQ=new WeakSet,mZ=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}))},dk.shadowRootOptions={mode:"open"},dk.getTemplateHTML=function(e){return` 1527 <style> 1528 :host { 1529 font: var(--media-font, 1530 var(--media-font-weight, normal) 1531 var(--media-font-size, 14px) / 1532 var(--media-text-content-height, var(--media-control-height, 24px)) 1533 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 1534 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 1535 --_menu-bg: rgb(20 20 30 / .8); 1536 background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, var(--_menu-bg)))); 1537 border-radius: var(--media-menu-border-radius); 1538 border: var(--media-menu-border, none); 1539 display: var(--media-menu-display, inline-flex) !important; 1540 1541 transition: var(--media-menu-transition-in, 1542 visibility 0s, 1543 opacity .2s ease-out, 1544 transform .15s ease-out, 1545 left .2s ease-in-out, 1546 min-width .2s ease-in-out, 1547 min-height .2s ease-in-out 1548 ) !important; 1549 1550 visibility: var(--media-menu-visibility, visible); 1551 opacity: var(--media-menu-opacity, 1); 1552 max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px)); 1553 transform: var(--media-menu-transform-in, translateY(0) scale(1)); 1554 flex-direction: column; 1555 1556 min-height: 0; 1557 position: relative; 1558 bottom: var(--_menu-bottom); 1559 box-sizing: border-box; 1560 } 1561 1562 @-moz-document url-prefix() { 1563 :host{ 1564 --_menu-bg: rgb(20 20 30); 1565 } 1566 } 1567 1568 :host([hidden]) { 1569 transition: var(--media-menu-transition-out, 1570 visibility .15s ease-in, 1571 opacity .15s ease-in, 1572 transform .15s ease-in 1573 ) !important; 1574 visibility: var(--media-menu-hidden-visibility, hidden); 1575 opacity: var(--media-menu-hidden-opacity, 0); 1576 max-height: var(--media-menu-hidden-max-height, 1577 var(--media-menu-max-height, var(--_menu-max-height, 300px))); 1578 transform: var(--media-menu-transform-out, translateY(2px) scale(.99)); 1579 pointer-events: none; 1580 } 1581 1582 :host([slot="submenu"]) { 1583 background: none; 1584 width: 100%; 1585 min-height: 100%; 1586 position: absolute; 1587 bottom: 0; 1588 right: -100%; 1589 } 1590 1591 #container { 1592 display: flex; 1593 flex-direction: column; 1594 min-height: 0; 1595 transition: transform .2s ease-out; 1596 transform: translate(0, 0); 1597 } 1598 1599 #container.has-expanded { 1600 transition: transform .2s ease-in; 1601 transform: translate(-100%, 0); 1602 } 1603 1604 button { 1605 background: none; 1606 color: inherit; 1607 border: none; 1608 padding: 0; 1609 font: inherit; 1610 outline: inherit; 1611 display: inline-flex; 1612 align-items: center; 1613 } 1614 1615 slot[name="header"][hidden] { 1616 display: none; 1617 } 1618 1619 slot[name="header"] > *, 1620 slot[name="header"]::slotted(*) { 1621 padding: .4em .7em; 1622 border-bottom: 1px solid rgb(255 255 255 / .25); 1623 cursor: var(--media-cursor, default); 1624 } 1625 1626 slot[name="header"] > button[part~="back"], 1627 slot[name="header"]::slotted(button[part~="back"]) { 1628 cursor: var(--media-cursor, pointer); 1629 } 1630 1631 svg[part~="back"] { 1632 height: var(--media-menu-icon-height, var(--media-control-height, 24px)); 1633 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 1634 display: block; 1635 margin-right: .5ch; 1636 } 1637 1638 slot:not([name]) { 1639 gap: var(--media-menu-gap); 1640 flex-direction: var(--media-menu-flex-direction, column); 1641 overflow: var(--media-menu-overflow, hidden auto); 1642 display: flex; 1643 min-height: 0; 1644 } 1645 1646 :host([role="menu"]) slot:not([name]) { 1647 padding-block: .4em; 1648 } 1649 1650 slot:not([name])::slotted([role="menu"]) { 1651 background: none; 1652 } 1653 1654 media-chrome-menu-item > span { 1655 margin-right: .5ch; 1656 max-width: var(--media-menu-item-max-width); 1657 text-overflow: ellipsis; 1658 overflow: hidden; 1659 } 1660 </style> 1661 <style id="layout-row" media="width:0"> 1662 1663 slot[name="header"] > *, 1664 slot[name="header"]::slotted(*) { 1665 padding: .4em .5em; 1666 } 1667 1668 slot:not([name]) { 1669 gap: var(--media-menu-gap, .25em); 1670 flex-direction: var(--media-menu-flex-direction, row); 1671 padding-inline: .5em; 1672 } 1673 1674 media-chrome-menu-item { 1675 padding: .3em .5em; 1676 } 1677 1678 media-chrome-menu-item[aria-checked="true"] { 1679 background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2)); 1680 } 1681 1682 1683 media-chrome-menu-item::part(checked-indicator) { 1684 display: var(--media-menu-item-checked-indicator-display, none); 1685 } 1686 </style> 1687 <div id="container" part="container"> 1688 <slot name="header" hidden> 1689 <button part="back button" aria-label="Back to previous menu"> 1690 <slot name="back-icon"> 1691 <svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator"> 1692 <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"/> 1693 </svg> 1694 </slot> 1695 <slot name="title"></slot> 1696 </button> 1697 </slot> 1698 <slot></slot> 1699 </div> 1700 <slot name="checked-indicator" hidden></slot> 1701 `},no.customElements.get("media-chrome-menu")||no.customElements.define("media-chrome-menu",dk);var dS=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},dI=(e,t,i)=>(dS(e,t,"read from private field"),i?i.call(e):t.get(e)),dC=(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)},dL=(e,t,i,a)=>(dS(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),dD=(e,t,i)=>(dS(e,t,"access private method"),i);let dM={TYPE:"type",VALUE:"value",CHECKED:"checked",DISABLED:"disabled"};class dO extends no.HTMLElement{constructor(){if(super(),dC(this,m0),dC(this,m2),dC(this,m4),dC(this,m7),dC(this,mX,!1),dC(this,mJ,void 0),dC(this,m9,()=>{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=nl.createElement("span");n.textContent=null!=r?r:"",i.replaceChildren(n)}),dC(this,m8,e=>{let{key:t}=e;if(!this.keysUsed.includes(t))return void this.removeEventListener("keyup",dI(this,m8));this.handleClick(e)}),dC(this,m6,e=>{let{metaKey:t,altKey:i,key:a}=e;if(t||i||!this.keysUsed.includes(a))return void this.removeEventListener("keyup",dI(this,m8));this.addEventListener("keyup",dI(this,m8),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=np(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[dM.TYPE,dM.DISABLED,dM.CHECKED,dM.VALUE]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),dx(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","fal
1701se"),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":dD(this,m0,m1).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":dI(this,m6).call(this,e);break;case"keyup":dI(this,m8).call(this,e)}}attributeChangedCallback(e,t,i){e===dM.CHECKED&&dx(this)&&!dI(this,mX)?this.setAttribute("aria-checked",null!=i?"true":"false"):e===dM.TYPE&&i!==t?this.role="menuitem"+i:e===dM.DISABLED&&i!==t&&(null==i?this.enable():this.disable())}connectedCallback(){this.hasAttribute(dM.DISABLED)||this.enable(),this.role="menuitem"+this.type,dL(this,mJ,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)),dD(this,m7,pe).call(this),this.submenuElement&&dD(this,m2,m3).call(this),this.shadowRoot.addEventListener("slotchange",this)}disconnectedCallback(){this.disable(),dD(this,m7,pe).call(this),dL(this,mJ,null),this.shadowRoot.removeEventListener("slotchange",this)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?null==(e=nT(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(dM.TYPE))?e:""}set type(e){this.setAttribute(dM.TYPE,`${e}`)}get value(){var e;return null!=(e=this.getAttribute(dM.VALUE))?e:this.text}set value(e){this.setAttribute(dM.VALUE,e)}get text(){var e;return(null!=(e=this.textContent)?e:"").trim()}get checked(){if(dx(this))return"true"===this.getAttribute("aria-checked")}set checked(e){dx(this)&&(dL(this,mX,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){!dx(this)&&this.invokeTargetElement&&nf(this,e.target)&&this.invokeTargetElement.dispatchEvent(new dp({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}function dx(e){return"radio"===e.type||"checkbox"===e.type}mX=new WeakMap,mJ=new WeakMap,m0=new WeakSet,m1=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?dD(this,m2,m3).call(this):dD(this,m4,m5).call(this))},m2=new WeakSet,m3=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",dI(this,m9)),this.submenuElement.addEventListener("addmenuitem",dI(this,m9)),this.submenuElement.addEventListener("removemenuitem",dI(this,m9)),dI(this,m9).call(this)},m4=new WeakSet,m5=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",dI(this,m9)),this.submenuElement.removeEventListener("addmenuitem",dI(this,m9)),this.submenuElement.removeEventListener("removemenuitem",dI(this,m9)),dI(this,m9).call(this)},m9=new WeakMap,m8=new WeakMap,m6=new WeakMap,m7=new WeakSet,pe=function(){var e;
1701let t=null==(e=dI(this,mJ))?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")},dO.shadowRootOptions={mode:"open"},dO.getTemplateHTML=function(e){return` 1702 <style> 1703 :host { 1704 transition: var(--media-menu-item-transition, 1705 background .15s linear, 1706 opacity .2s ease-in-out 1707 ); 1708 outline: var(--media-menu-item-outline, 0); 1709 outline-offset: var(--media-menu-item-outline-offset, -1px); 1710 cursor: var(--media-cursor, pointer); 1711 display: flex; 1712 align-items: center; 1713 align-self: stretch; 1714 justify-self: stretch; 1715 white-space: nowrap; 1716 white-space-collapse: collapse; 1717 text-wrap: nowrap; 1718 padding: .4em .8em .4em 1em; 1719 } 1720 1721 :host(:focus-visible) { 1722 box-shadow: var(--media-menu-item-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 1723 outline: var(--media-menu-item-hover-outline, 0); 1724 outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px)); 1725 } 1726 1727 :host(:hover) { 1728 cursor: var(--media-cursor, pointer); 1729 background: var(--media-menu-item-hover-background, rgb(92 92 102 / .5)); 1730 outline: var(--media-menu-item-hover-outline); 1731 outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px)); 1732 } 1733 1734 :host([aria-checked="true"]) { 1735 background: var(--media-menu-item-checked-background); 1736 } 1737 1738 :host([hidden]) { 1739 display: none; 1740 } 1741 1742 :host([disabled]) { 1743 pointer-events: none; 1744 color: rgba(255, 255, 255, .3); 1745 } 1746 1747 slot:not([name]) { 1748 width: 100%; 1749 } 1750 1751 slot:not([name="submenu"]) { 1752 display: inline-flex; 1753 align-items: center; 1754 transition: inherit; 1755 opacity: var(--media-menu-item-opacity, 1); 1756 } 1757 1758 slot[name="description"] { 1759 justify-content: end; 1760 } 1761 1762 slot[name="description"] > span { 1763 display: inline-block; 1764 margin-inline: 1em .2em; 1765 max-width: var(--media-menu-item-description-max-width, 100px); 1766 text-overflow: ellipsis; 1767 overflow: hidden; 1768 font-size: .8em; 1769 font-weight: 400; 1770 text-align: right; 1771 position: relative; 1772 top: .04em; 1773 } 1774 1775 slot[name="checked-indicator"] { 1776 display: none; 1777 } 1778 1779 :host(:is([role="menuitemradio"],[role="menuitemcheckbox"])) slot[name="checked-indicator"] { 1780 display: var(--media-menu-item-checked-indicator-display, inline-block); 1781 } 1782 1783 1784 svg, img, ::slotted(svg), ::slotted(img) { 1785 height: var(--media-menu-item-icon-height, var(--media-control-height, 24px)); 1786 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 1787 display: block; 1788 } 1789 1790 1791 [part~="indicator"], 1792 ::slotted([part~="indicator"]) { 1793 fill: var(--media-menu-item-indicator-fill, 1794 var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)))); 1795 height: var(--media-menu-item-indicator-height, 1.25em); 1796 margin-right: .5ch; 1797 } 1798 1799 [part~="checked-indicator"] { 1800 visibility: hidden; 1801 } 1802 1803 :host([aria-checked="true"]) [part~="checked-indicator"] { 1804 visibility: visible; 1805 } 1806 </style> 1807 <slot name="checked-indicator"> 1808 <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator"> 1809 <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"/> 1810 </svg> 1811 </slot> 1812 <slot name="prefix"></slot> 1813 <slot></slot> 1814 <slot name="description"></slot> 1815 <slot name="suffix"> 1816 ${this.getSuffixSlotInnerHTML(e)} 1817 </slot> 1818 <slot name="submenu"></slot> 1819 `},dO.getSuffixSlotInnerHTML=function(e){return""},no.customElements.get("media-chrome-menu-item")||no.customElements.define("media-chrome-menu-item",dO);class dN extends dk{get anchorElement(){return"auto"!==this.anchor?super.anchorElement:nv(this).querySelector("media-settings-menu-button")}}dN.getTemplateHTML=function(e){return` 1820 ${dk.getTemplateHTML(e)} 1821 <style> 1822 :host { 1823 --_menu-bg: rgb(20 20 30 / .8); 1824 background: var(--media-settings-menu-background, 1825 var(--media-menu-background, 1826 var(--media-control-background, 1827 var(--media-secondary-color, var(--_menu-bg))))); 1828 min-width: var(--media-settings-menu-min-width, 170px); 1829 border-radius: 2px 2px 0 0; 1830 overflow: hidden; 1831 } 1832 1833 @-moz-document url-prefix() { 1834 :host{ 1835 --_menu-bg: rgb(20 20 30); 1836 } 1837 } 1838 1839 :host([role="menu"]) { 1840 1841 justify-content: end; 1842 } 1843 1844 slot:not([name]) { 1845 justify-content: var(--media-settings-menu-justify-content); 1846 flex-direction: var(--media-settings-menu-flex-direction, column); 1847 overflow: visible; 1848 } 1849 1850 #container.has-expanded { 1851 --media-settings-menu-item-opacity: 0; 1852 } 1853 </style> 1854 `},no.customElements.get("media-settings-menu")||no.customElements.define("media-settings-menu",dN);class dP extends dO{}dP.shadowRootOptions={mode:"open"},dP.getTemplateHTML=function(e){return` 1855 ${dO.getTemplateHTML.call(this,e)} 1856 <style> 1857 slot:not([name="submenu"]) { 1858 opacity: var(--media-settings-menu-item-opacity, var(--media-menu-item-opacity)); 1859 } 1860 1861 :host([aria-expanded="true"]:hover) { 1862 background: transparent; 1863 } 1864 </style> 1865 `},dP.getSuffixSlotInnerHTML=function(e){return` 1866 <svg aria-hidden="true" viewBox="0 0 20 24"> 1867 <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"/> 1868 </svg> 1869 `},no.customElements.get("media-settings-menu-item")||no.customElements.define("media-settings-menu-item",dP);class dU extends sq{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=nT(this))?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;null==(e=this.invokeTargetElement)||e.dispatchEvent(new dp({relatedTarget:this}))}}no.customElements.get("media-chrome-menu-button")||no.customElements.define("media-chrome-menu-button",dU);class dW extends dU{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",r5("settings"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:nv(this).querySelector("media-settings-menu")}}dW.getSlotTemplateHTML=function(){return` 1870 <style> 1871 :host([aria-expanded="true"]) slot[name=tooltip] { 1872 display: none; 1873 } 1874 </style> 1875 <slot name="icon"> 1876 <svg aria-hidden="true" viewBox="0 0 24 24"> 1877 <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"/> 1878 </svg> 1879 </slot> 1880 `},dW.getTooltipContentHTML=function(){return r5("Settings")},no.customElements.get("media-settings-menu-button")||no.customElements.define("media-settings-menu-button",dW);var dB=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},dH=(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)},dV=(e,t,i,a)=>(dB(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),dK=(e,t,i)=>(dB(e,t,"access private method"),i);class d$ extends dk{constructor(){super(...arguments),dF(this,pa),dF(this,pn),dF(this,pt,[]),dF(this,pi,void 0)}static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_AUDIO_TRACK_LIST,rF.MEDIA_AUDIO_TRACK_ENABLED,rF.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===rF.MEDIA_AUDIO_TRACK_ENABLED&&t!==i)this.value=i;else if(e===rF.MEDIA_AUDIO_TRACK_LIST&&t!==i){var a;dV(this,pt,null==(a=null!=i?i:"")?void 0:a.split(/\s+/).map(rJ)),dK(this,pa,pr).call(this)}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",dK(this,pn,ps))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",dK(this,pn,ps))}get anchorElement(){var e;return"auto"!==this.anchor?super.anchorElement:null==(e=nv(this))?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return dH(this,pt)}set mediaAudioTrackList(e){dV(this,pt,e),dK(this,pa,pr).call(this)}get mediaAudioTrackEnabled(){var e;return null!=(e=nL(this,rF.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){nD(this,rF.MEDIA_AUDIO_TRACK_ENABLED,e)}}pt=new WeakMap,pi=new WeakMap,pa=new WeakSet,pr=function(){if(dH(this,pi)===JSON.stringify(this.mediaAudioTrackList))return;dV(this,pi,JSON.stringify(this.mediaAudioTrackList));let e=this.mediaAudioTrackList;for(let t of(this.defaultSlot.textContent="",e.sort((e,t)=>
1880e.id.localeCompare(t.id,void 0,{numeric:!0})),e)){let e=dy({type:"radio",text:this.formatMenuItemText(t.label,t),value:`${t.id}`,checked:t.enabled});e.prepend(dT(this,"checked-indicator")),this.defaultSlot.append(e)}},pn=new WeakSet,ps=function(){if(null==this.value)return;let e=new no.CustomEvent(rU.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},no.customElements.get("media-audio-track-menu")||no.customElements.define("media-audio-track-menu",d$);let dq=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1881 <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/> 1882 <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"/> 1883</svg>`,dY=e=>{let t=r5("Audio");e.setAttribute("aria-label",t)};class dG extends dU{static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_AUDIO_TRACK_ENABLED,rF.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),dY(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rF.MEDIA_LANG&&dY(this)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=nv(this))?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return null!=(e=nL(this,rF.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){nD(this,rF.MEDIA_AUDIO_TRACK_ENABLED,e)}}dG.getSlotTemplateHTML=function(){return` 1884 <style> 1885 :host([aria-expanded="true"]) slot[name=tooltip] { 1886 display: none; 1887 } 1888 </style> 1889 <slot name="icon">${dq}</slot> 1890 `},dG.getTooltipContentHTML=function(){return r5("Audio")},no.customElements.get("media-audio-track-menu-button")||no.customElements.define("media-audio-track-menu-button",dG);var dj=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},dz=(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)},dQ=(e,t,i)=>(dj(e,t,"access private method"),i);let dZ=` 1891 <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator"> 1892 <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"/> 1893 </svg>`;class dX extends dk{constructor(){super(...arguments),dz(this,pl),dz(this,pu),dz(this,po,void 0)}static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_SUBTITLES_LIST,rF.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rF.MEDIA_SUBTITLES_LIST&&t!==i?dQ(this,pl,pd).call(this):e===rF.MEDIA_SUBTITLES_SHOWING&&t!==i&&(this.value=i||"",dQ(this,pl,pd).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",dQ(this,pu,pc))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",dQ(this,pu,pc))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:nv(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return dJ(this,rF.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){d0(this,rF.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return dJ(this,rF.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){d0(this,rF.MEDIA_SUBTITLES_SHOWING,e)}}po=new WeakMap,pl=new WeakSet,pd=function(){var e,t,i,a,r,n;let s=(dj(this,t=po,"read from private field"),(i?i.call(this):t.get(this))!==JSON.stringify(this.mediaSubtitlesList)),o=this.value!==this.getAttribute(rF.MEDIA_SUBTITLES_SHOWING);if(!s&&!o)return;a=po,r=JSON.stringify(this.mediaSubtitlesList),dj(this,a,"write to private field"),n?n.call(this,r):a.set(this,r),this.defaultSlot.textContent="";let l=!this.value,d=dy({type:"radio",text:this.formatMenuItemText(r5("Off")),value:"off",checked:l});for(let t of(d.prepend(dT(this,"checked-indicator")),this.defaultSlot.append(d),this.mediaSubtitlesList)){let i=dy({type:"radio",text:this.formatMenuItemText(t.label,t),value:nJ(t),checked:this.value==nJ(t)});i.prepend(dT(this,"checked-indicator")),"captions"===(null!=(e=t.kind)?e:"subs")&&i.append(dT(this,"captions-indicator")),this.defaultSlot.append(i)}},pu=new WeakSet,pc=function(){let e=this.mediaSubtitlesShowing,t=this.getAttribute(rF.MEDIA_SUBTITLES_SHOWING),i=this.value!==t;if((null==e?void 0:e.length)&&i&&this.dispatchEvent(new no.CustomEvent(rU.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:e})),!this.value||!i)return;let a=new no.CustomEvent(rU.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)},dX.getTemplateHTML=function(e){return` 1894 ${dk.getTemplateHTML(e)} 1895 <slot name="captions-indicator" hidden>${dZ}</slot> 1896 `};let dJ=(e,t)=>{let i=e.getAttribute(t);return i?nZ(i):[]},d0=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=n0(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};no.customElements.get("media-captions-menu")||no.customElements.define("media-captions-menu",dX);let d1=`<svg aria-hidden="true" viewBox="0 0 26 24"> 1897 <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
18970 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"/> 1898</svg>`,d2=`<svg aria-hidden="true" viewBox="0 0 26 24"> 1899 <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"/> 1900</svg>`,d3=e=>{e.setAttribute("data-captions-enabled",n4(e).toString())},d4=e=>{e.setAttribute("aria-label",r5("closed captions"))};class d5 extends dU{static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_SUBTITLES_LIST,rF.MEDIA_SUBTITLES_SHOWING,rF.MEDIA_LA
1900NG]}connectedCallback(){super.connectedCallback(),d4(this),d3(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rF.MEDIA_SUBTITLES_SHOWING?d3(this):e===rF.MEDIA_LANG&&d4(this)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=nv(this))?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return d9(this,rF.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){d8(this,rF.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return d9(this,rF.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){d8(this,rF.MEDIA_SUBTITLES_SHOWING,e)}}d5.getSlotTemplateHTML=function(){return` 1901 <style> 1902 :host([data-captions-enabled="true"]) slot[name=off] { 1903 display: none !important; 1904 } 1905 1906 1907 :host(:not([data-captions-enabled="true"])) slot[name=on] { 1908 display: none !important; 1909 } 1910 1911 :host([aria-expanded="true"]) slot[name=tooltip] { 1912 display: none; 1913 } 1914 </style> 1915 1916 <slot name="icon"> 1917 <slot name="on">${d1}</slot> 1918 <slot name="off">${d2}</slot> 1919 </slot> 1920 `},d5.getTooltipContentHTML=function(){return r5("Captions")};let d9=(e,t)=>{let i=e.getAttribute(t);return i?nZ(i):[]},d8=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=n0(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};no.customElements.get("media-captions-menu-button")||no.customElements.define("media-captions-menu-button",d5);var d6=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},d7=(e,t,i)=>(d6(e,t,"read from private field"),i?i.call(e):t.get(e)),ue=(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)},ut=(e,t,i)=>(d6(e,t,"access private method"),i);let ui={RATES:"rates"};class ua extends dk{constructor(){super(),ue(this,pm),ue(this,pv),ue(this,ph,new nz(this,ui.RATES,{defaultValue:o1})),ut(this,pm,pp).call(this)}static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_PLAYBACK_RATE,ui.RATES]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===rF.MEDIA_PLAYBACK_RATE&&t!=i?(this.value=i,ut(this,pm,pp).call(this)):e===ui.RATES&&t!=i&&(d7(this,ph).value=i,ut(this,pm,pp).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",ut(this,pv,pE))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",ut(this,pv,pE))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:nv(this).querySelector("media-playback-rate-menu-button")}get rates(){return d7(this,ph)}set rates(e){e?Array.isArray(e)?d7(this,ph).value=e.join(" "):"string"==typeof e&&(d7(this,ph).value=e):d7(this,ph).value="",ut(this,pm,pp).call(this)}get mediaPlaybackRate(){return nR(this,rF.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){nS(this,rF.MEDIA_PLAYBACK_RATE,e)}}ph=new WeakMap,pm=new WeakSet,pp=function(){this.defaultSlot.textContent="";let e=o2(this.mediaPlaybackRate),t=new Set(Array.from(d7(this,ph)).map(e=>o2(Number(e))));for(let i of(e>0&&!t.has(e)&&t.add(e),Array.from(t).sort((e,t)=>e-t))){let t=dy({type:"radio",text:this.formatMenuItemText(`${i}x`,i),value:i.toString(),checked:e===i});t.prepend(dT(this,"checked-indicator")),this.defaultSlot.append(t)}},pv=new WeakSet,pE=function(){if(!this.value)return;let e=new no.CustomEvent(rU.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},no.customElements.get("media-playback-rate-menu")||no.customElements.define("media-playback-rate-menu",ua);class ur extends dU{static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${o2(null!=(e=this.mediaPlaybackRate)?e:1)}x`}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===rF.MEDIA_PLAYBACK_RATE){let e=i?+i:NaN,t=o2(Number.isNaN(e)?1:e);this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",r5("Playback rate {playbackRate}",{playbackRate:t}))}}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:nv(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return nR(this,rF.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){nS(this,rF.MEDIA_PLAYBACK_RATE,e)}}ur.getSlotTemplateHTML=function(e){let t=e.mediaplaybackrate?o2(+e.mediaplaybackrate):1;return` 1921 <style> 1922 :host { 1923 min-width: 5ch; 1924 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 1925 } 1926 1927 :host([aria-expanded="true"]) slot { 1928 display: block; 1929 } 1930 1931 :host([aria-expanded="true"]) slot[name=tooltip] { 1932 display: none; 1933 } 1934 </style> 1935 <slot name="icon">${t}x</slot> 1936 `},ur.getTooltipContentHTML=function(){return r5("Playback rate")},no.customElements.get("media-playback-rate-menu-button")||no.customElements.define("media-playback-rate-menu-button",ur);var un=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},us=(e,t,i)=>(un(e,t,"read from private field"),i?i.call(e):t.get(e)),uo=(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)},ul=(e,t,i,a)=>(un(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),ud=(e,t,i)=>(un(e,t,"access private method"),i);class uu extends dk{constructor(){super(...arguments),uo(this,pf),uo(this,py),uo(this,pb,[]),uo(this,pg,{})}static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_RENDITION_LIST,rF.MEDIA_RENDITION_SELECTED,rF.MEDIA_RENDITION_UNAVAILABLE,rF.MEDIA_HEIGHT,rF.MEDIA_WIDTH]}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),t!==i)switch(e){case rF.MEDIA_RENDITION_SELECTED:this.value=null!=i?i:"auto",ud(this,pf,p_).call(this);break;case rF.MEDIA_RENDITION_LIST:ul(this,pb,null==i?void 0:i.split(/\s+/).map(rZ)),ud(this,pf,p_).call(this);break;case rF.MEDIA_HEIGHT:case rF.MEDIA_WIDTH:ud(this,pf,p_).call(this)}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",ud(this,py,pT))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",ud(this,py,pT))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:nv(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return us(this,pb)}set mediaRenditionList(e){ul(this,pb,e),ud(this,pf,p_).call(this)}get mediaRenditionSelected(){return nL(this,rF.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){nD(this,rF.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return nR(this,rF.MEDIA_HEIGHT)}set mediaHeight(e){nS(this,rF.MEDIA_HEIGHT,e)}get mediaWidth(){return nR(this,rF.MEDIA_WIDTH)}set mediaWidth(e){nS(this,rF.MEDIA_WIDTH,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)}}pb=new WeakMap,pg=new WeakMap,pf=new WeakSet,p_=function(){let e,t=!this.mediaRenditionSelected;if(us(this,pg).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&us(this,pg).mediaHeight===this.mediaHeight&&us(this,pg).mediaWidth===this.mediaWidth&&us(this,pg).isAuto===t)return;us(this,pg).mediaRenditionList=JSON.stringify(this.mediaRenditionList),us(this,pg).mediaHeight=this.mediaHeight,us(this,pg).mediaWidth=this.mediaWidth,us(this,pg).isAuto=t;let i=this.mediaRenditionList.sort(this.compareRendition.bind(this)),a=i.find(e=>e.id===this.mediaRenditionSelected);for(let e of i)e.selected=e===a;for(let e of(this.defaultSlot.textContent="",i)){let i=dy({type:"radio",text:this.formatRendition(e,{showBitrate:this.showRenditionBitrate(e)}
1936),value:`${e.id}`,checked:e.selected&&!t});i.prepend(dT(this,"checked-indicator")),this.defaultSlot.append(i)}let r=a&&this.showRenditionBitrate(a);t&&(a?e=this.formatMenuItemText(`${r5("Auto")} \u2022 ${this.formatRendition(a,{showBitrate:r})}`,a):this.mediaHeight>0&&this.mediaWidth>0&&(e=this.formatMenuItemText(`${r5("Auto")} (${Math.min(this.mediaWidth,this.mediaHeight)}p)`))),e||(e=this.formatMenuItemText(r5("Auto")));let n=dy({type:"radio",text:e,value:"auto",checked:t});n.dataset.description=e,n.prepend(dT(this,"checked-indicator")),this.defaultSlot.append(n)},py=new WeakSet,pT=function(){if(null==this.value)return;let e=new no.CustomEvent(rU.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},no.customElements.get("media-rendition-menu")||no.customElements.define("media-rendition-menu",uu);let uc=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1937 <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" /> 1938</svg>`;class uh extends dU{static get observedAttributes(){return[...super.observedAttributes,rF.MEDIA_RENDITION_SELECTED,rF.MEDIA_RENDITION_UNAVAILABLE,rF.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",r5("quality"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:nv(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return nL(this,rF.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){nD(this,rF.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return nR(this,rF.MEDIA_HEIGHT)}set mediaHeight(e){nS(this,rF.MEDIA_HEIGHT,e)}}uh.getSlotTemplateHTML=function(){return` 1939 <style> 1940 :host([aria-expanded="true"]) slot[name=tooltip] { 1941 display: none; 1942 } 1943 </style> 1944 <slot name="icon">${uc}</slot> 1945 `},uh.getTooltipContentHTML=function(){return r5("Quality")},no.customElements.get("media-rendition-menu-button")||no.customElements.define("media-rendition-menu-button",uh);var um=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},up=(e,t,i)=>(um(e,t,"read from private field"),i?i.call(e):t.get(e)),uv=(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)},uE=(e,t,i,a)=>(um(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),ub=(e,t,i)=>(um(e,t,"access private method"),i);class ug extends dk{constructor(){super(),uv(this,pk),uv(this,pR),uv(this,pI),uv(this,pL),uv(this,pO),uv(this,pA,!1),uv(this,pM,e=>{let t=e.target,i=(null==t?void 0:t.nodeName)==="VIDEO",a=ub(this,pL,pD).call(this,t);(i||a)&&(up(this,pA)?ub(this,pR,pS).call(this):ub(this,pO,px).call(this,e))}),uv(this,pN,e=>{let t=e.target,i=this.contains(t),a=2===e.button,r=(null==t?void 0:t.nodeName)==="VIDEO",n=ub(this,pL,pD).call(this,t);!i&&(a&&(r||n)||ub(this,pR,pS).call(this))}),uv(this,pP,e=>{"Escape"===e.key&&ub(this,pR,pS).call(this)}),uv(this,pU,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)}ub(this,pR,pS).call(this)}),this.setAttribute("noautohide",""),ub(this,pk,pw).call(this)}connectedCallback(){super.connectedCallback(),nv(this).addEventListener("contextmenu",up(this,pM)),this.addEventListener("click",up(this,pU))}disconnectedCallback(){super.disconnectedCallback(),nv(this).removeEventListener("contextmenu",up(this,pM)),this.removeEventListener("click",up(this,pU)),document.removeEventListener("mousedown",up(this,pN)),document.removeEventListener("keydown",up(this,pP))}}pA=new WeakMap,pk=new WeakSet,pw=function(){this.hidden=!up(this,pA)},pR=new WeakSet,pS=function(){uE(this,pA,!1),ub(this,pk,pw).call(this)},pI=new WeakSet,pC=function(){document.querySelectorAll("media-context-menu").forEach(e=>{e!==this&&ub(e,pR,pS).call(e)})},pL=new WeakSet,pD=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")))},pM=new WeakMap,pO=new WeakSet,px=function(e){e.preventDefault(),ub(this,pI,pC).call(this),uE(this,pA,!0),this.style.position="fixed",this.style.left=`${e.clientX}px`,this.style.top=`${e.clientY}px`,ub(this,pk,pw).call(this),document.addEventListener("mousedown",up(this,pN),{once:!0}),document.addEventListener("keydown",up(this,pP),{once:!0})},pN=new WeakMap,pP=new WeakMap,pU=new WeakMap,ug.getTemplateHTML=function(e){return` 1946 ${dk.getTemplateHTML(e)} 1947 <style> 1948 :host { 1949 --_menu-bg: rgb(20 20 30 / .8); 1950 background: var(--media-settings-menu-background, 1951 var(--media-menu-background, 1952 var(--media-control-background, 1953 var(--media-secondary-color, var(--_menu-bg))))); 1954 min-width: var(--media-settings-menu-min-width, 170px); 1955 border-radius: 2px; 1956 overflow: hidden; 1957 } 1958 </style> 1959 `},no.customElements.get("media-context-menu")||no.customElements.define("media-context-menu",ug);class uf extends dO{}uf.shadowRootOptions={mode:"open"},uf.getTemplateHTML=function(e){return` 1960 ${dO.getTemplateHTML.call(this,e)} 1961 <style> 1962 ::slotted(*) { 1963 color: var(--media-text-color, white); 1964 text-decoration: none; 1965 border: none; 1966 background: none; 1967 cursor: pointer; 1968 padding: 0; 1969 min-height: var(--media-control-height, 24px); 1970 } 1971 </style> 1972 `},no.customElements.get("media-context-menu-item")||no.customElements.define("media-context-menu-item",uf);var u_=e=>{throw TypeError(e)},uy=(e,t,i)=>t.has(e)||u_("Cannot "+i),uT=(e,t,i)=>(uy(e,t,"read from private field"),i?i.call(e):t.get(e)),uA=(e,t,i)=>t.has(e)?u_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),uk=(e,t,i,a)=>(uy(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),uw=(e,t,i)=>(uy(e,t,"access private method"),i),uR=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("undefined"==typeof DocumentFragment){class e extends uR{}globalThis.DocumentFragment=e}var uS,uI,uC,uL,uD,uM,uO,ux,uN,uP,uU,uW,uB,uH,uF,uV,uK,u$,uq,uY,uG,uj,uz,uQ,uZ,uX,uJ,u0,u1,u2,u3,u4,u5,u9,u8,u6,u7,ce,ct,ci,ca,cr,cn,
1972cs,co,cl,cd,cu,cc,ch,cm,cp,cv,cE,cb,cg,cf,c_,cy,cT,cA,ck,cw,cR,cS,cI,cC,cL,cD,cM,cO,cx,cN,cP,cU,cW,cB,cH,cF,cV,cK,c$,cq,cY,cG,cj,cz,cQ,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,hR,hS,hI,hC,hL,hD,hM,hO,hx,hN,hP,hU,hW,hB,hH,hF,hV,hK,h$,hq,hY,hG,hj,hz,hQ,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,mR,mS,mI,mC,mL,mD,mM,mO,mx,mN,mP,mU,mW,mB,mH,mF,mV,mK,m$,mq,mY,mG,mj,mz,mQ,mZ,mX,mJ,m0,m1,m2,m3,m4,m5,m9,m8,m6,m7,pe,pt,pi,pa,pr,pn,ps,po,pl,pd,pu,pc,ph,pm,pp,pv,pE,pb,pg,pf,p_,py,pT,pA,pk,pw,pR,pS,pI,pC,pL,pD,pM,pO,px,pN,pP,pU,pW,pB=class extends uR{},pH=class{constructor(e,t={}){uA(this,pW),uk(this,pW,null==t?void 0:t.detail)}get detail(){return uT(this,pW)}initCustomEvent(){}};pW=new WeakMap;var pF={document:{createElement:function(e,t){return new pB}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(pB)},CustomEvent:pH,EventTarget:uR,HTMLElement:pB,HTMLVideoElement:class extends uR{}},pV="undefined"==typeof window||void 0===globalThis.customElements,pK=pV?pF:globalThis,p$=pV?pF.document:globalThis.document;function pq(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function pY(e){return e.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function pG(e){if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}function pj(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 pz,pQ,pZ,pX=(e,t)=>!!e&&!!t&&(!!e.contains(t)||pX(e,t.getRootNode().host)),pJ="mux.com",p0=(()=>{try{return"3.13.4"}catch{}return"UNKNOWN"})(),p1=e=>{if(e){if([tY.LIVE,tY.ON_DEMAND].includes(e))return e;if(null!=e&&e.includes("live"))return tY.LIVE}},p2={crossorigin:"crossOrigin",playsinline:"playsInline"},p3=class{constructor(e,t){uA(this,pz),uA(this,pQ),uA(this,pZ,[]),uk(this,pz,e),uk(this,pQ,t)}[Symbol.iterator](){return uT(this,pZ).values()}get length(){return uT(this,pZ).length}get value(){var e;return null!=(e=uT(this,pZ).join(" "))?e:""}set value(e){var t;e!==this.value&&(uk(this,pZ,[]),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return uT(this,pZ)[e]}values(){return uT(this,pZ).values()}keys(){return uT(this,pZ).keys()}forEach(e){uT(this,pZ).forEach(e)}add(...e){var t,i;e.forEach(e=>{this.contains(e)||uT(this,pZ).push(e)}),(""!==this.value||null!=(t=uT(this,pz))&&t.hasAttribute(`${uT(this,pQ)}`))&&null!=(i=uT(this,pz))&&i.setAttribute(`${uT(this,pQ)}`,`${this.value}`)}remove(...e){var t;e.forEach(e=>{uT(this,pZ).splice(uT(this,pZ).indexOf(e),1)}),null==(t=uT(this,pz))||t.setAttribute(`${uT(this,pQ)}`,`${this.value}`)}contains(e){return uT(this,pZ).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)}};pz=new WeakMap,pQ=new WeakMap,pZ=new WeakMap;var p4=`[mux-player ${p0}]`;function p5(...e){console.warn(p4,...e)}function p9(...e){console.error(p4,...e)}function p8(e){var t;let i=null!=(t=e.message)?t:"";e.context&&(i+=` ${e.context}`),e.file&&(i+=` ${ie("Read more: ")} 1973https://github.com/muxinc/elements/blob/main/errors/${e.file}`),p5(i)}var p6={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},p7={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},ve=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}}),vt=[...Object.values(p6).filter(e=>p6.PLAYSINLINE!==e),...Object.values(p7)];function vi(e,t){return e.media?e.media.getAttribute(t):e.getAttribute(t)}var va=class extends pK.HTMLElement{static get observedAttributes(){return vt}constructor(){super()}attributeChangedCallback(e,t,i){var a,r;switch(e){case p7.MUTED:this.media&&(this.media.muted=null!=i,this.media.defaultMuted=null!=i);return;case p7.VOLUME:{let e=null!=(a=pG(i))?a:1;this.media&&(this.media.volume=e);return}case p7.PLAYBACKRATE:{let e=null!=(r=pG(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}
1973get 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:ve}get seekable(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.seekable)?t:ve}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=pG(this.getAttribute(p7.PLAYBACKRATE)))?e:1}set defaultPlaybackRate(e){null!=e?this.setAttribute(p7.PLAYBACKRATE,`${e}`):this.removeAttribute(p7.PLAYBACKRATE)}get crossOrigin(){return vi(this,p6.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(p6.CROSSORIGIN,`${e}`)}get autoplay(){return null!=vi(this,p6.AUTOPLAY)}set autoplay(e){e?this.setAttribute(p6.AUTOPLAY,"string"==typeof e?e:""):this.removeAttribute(p6.AUTOPLAY)}get loop(){return null!=vi(this,p6.LOOP)}set loop(e){e?this.setAttribute(p6.LOOP,""):this.removeAttribute(p6.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!=vi(this,p6.MUTED)}set defaultMuted(e){e?this.setAttribute(p6.MUTED,""):this.removeAttribute(p6.MUTED)}get playsInline(){return null!=vi(this,p6.PLAYSINLINE)}set playsInline(e){p9("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(p6.PRELOAD,e):this.removeAttribute(p6.PRELOAD)}},vr=`:host { 1974 --media-control-display: var(--controls); 1975 --media-loading-indicator-display: var(--loading-indicator); 1976 --media-dialog-display: var(--dialog); 1977 --media-play-button-display: var(--play-button); 1978 --media-live-button-display: var(--live-button); 1979 --media-seek-backward-button-display: var(--seek-backward-button); 1980 --media-seek-forward-button-display: var(--seek-forward-button); 1981 --media-mute-button-display: var(--mute-button); 1982 --media-captions-button-display: var(--captions-button); 1983 --media-captions-menu-button-display: var(--captions-menu-button, var(--media-captions-button-display)); 1984 --media-rendition-menu-button-display: var(--rendition-menu-button); 1985 --media-audio-track-menu-button-display: var(--audio-track-menu-button); 1986 --media-airplay-button-display: var(--airplay-button); 1987 --media-pip-button-display: var(--pip-button); 1988 --media-fullscreen-button-display: var(--fullscreen-button); 1989 --media-cast-button-display: var(--cast-button, var(--_cast-button-drm-display)); 1990 --media-playback-rate-button-display: var(--playback-rate-button); 1991 --media-playback-rate-menu-button-display: var(--playback-rate-menu-button); 1992 --media-volume-range-display: var(--volume-range); 1993 --media-time-range-display: var(--time-range); 1994 --media-time-display-display: var(--time-display); 1995 --media-duration-display-display: var(--duration-display); 1996 --media-title-display-display: var(--title-display); 1997 1998 display: inline-block; 1999 line-height: 0; 2000 width: 100%; 2001} 2002 2003a { 2004 color: #fff; 2005 font-size: 0.9em; 2006 text-decoration: underline; 2007} 2008 2009media-theme { 2010 display: inline-block; 2011 line-height: 0; 2012 width: 100%; 2013 height: 100%; 2014 direction: ltr; 2015} 2016 2017media-poster-image { 2018 display: inline-block; 2019 line-height: 0; 2020 width: 100%; 2021 height: 100%; 2022} 2023 2024media-poster-image:not([src]):not([placeholdersrc]) { 2025 display: none; 2026} 2027 2028::part(top), 2029[part~='top'] { 2030 --media-control-display: var(--controls, var(--top-controls)); 2031 --media-play-button-display: var(--play-button, var(--top-play-button)); 2032 --media-live-button-display: var(--live-button, var(--top-live-button)); 2033 --media-seek-backward-button-display: var(--seek-backward-button, var(--top-seek-backward-button)); 2034 --media-seek-forward-button-display: var(--seek-forward-button, var(--top-seek-forward-button)); 2035 --media-mute-button-display: var(--mute-button, var(--top-mute-button)); 2036 --media-captions-button-display: var(--captions-button, var(--top-captions-button)); 2037 --media-captions-menu-button-display: var( 2038 --captions-menu-button, 2039 var(--media-captions-button-display, var(--top-captions-menu-button)) 2040 ); 2041 --media-rendition-menu-button-display: var(--rendition-menu-button, var(--top-rendition-menu-button)); 2042 --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--top-audio-track-menu-button)); 2043 --media-airplay-button-display: var(--airplay-button, var(--top-airplay-button)); 2044 --media-pip-button-display: var(--pip-button, var(--top-pip-button)); 2045 --media-fullscreen-button-display: var(--fullscreen-button, var(--top-fullscreen-button)); 2046 --media-cast-button-display: var(--cast-button, var(--top-cast-button, var(--_cast-button-drm-display))); 2047 --media-playback-rate-button-display: var(--playback-rate-button, var(--top-playback-rate-button)); 2048 --media-playback-rate-menu-button-display: var( 2049 --captions-menu-button, 2050 var(--media-playback-rate-button-display, var(--top-playback-rate-menu-button)) 2051 ); 2052 --media-volume-range-display: var(--volume-range, var(--top-volume-range)); 2053 --media-time-range-display: var(--time-range, var(--top-time-range)); 2054 --media-time-display-display: var(--time-display, var(--top-time-display)); 2055 --media-duration-display-display: var(--duration-display, var(--top-duration-display)); 2056 --media-title-display-display: var(--title-display, var(--top-title-display)); 2057} 2058 2059::part(center), 2060[part~='center'] {
2061 --media-control-display: var(--controls, var(--center-controls)); 2062 --media-play-button-display: var(--play-button, var(--center-play-button)); 2063 --media-live-button-display: var(--live-button, var(--center-live-button)); 2064 --media-seek-backward-button-display: var(--seek-backward-button, var(--center-seek-backward-button)); 2065 --media-seek-forward-button-display: var(--seek-forward-button, var(--center-seek-forward-button)); 2066 --media-mute-button-display: var(--mute-button, var(--center-mute-button)); 2067 --media-captions-button-display: var(--captions-button, var(--center-captions-button)); 2068 --media-captions-menu-button-display: var( 2069 --captions-menu-button, 2070 var(--media-captions-button-display, var(--center-captions-menu-button)) 2071 ); 2072 --media-rendition-menu-button-display: var(--rendition-menu-button, var(--center-rendition-menu-button)); 2073 --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--center-audio-track-menu-button)); 2074 --media-airplay-button-display: var(--airplay-button, var(--center-airplay-button)); 2075 --media-pip-button-display: var(--pip-button, var(--center-pip-button)); 2076 --media-fullscreen-button-display: var(--fullscreen-button, var(--center-fullscreen-button)); 2077 --media-cast-button-display: var(--cast-button, var(--center-cast-button, var(--_cast-button-drm-display))); 2078 --media-playback-rate-button-display: var(--playback-rate-button, var(--center-playback-rate-button)); 2079 --media-playback-rate-menu-button-display: var( 2080 --playback-rate-menu-button, 2081 var(--media-playback-rate-button-display, var(--center-playback-rate-menu-button)) 2082 ); 2083 --media-volume-range-display: var(--volume-range, var(--center-volume-range)); 2084 --media-time-range-display: var(--time-range, var(--center-time-range)); 2085 --media-time-display-display: var(--time-display, var(--center-time-display)); 2086 --media-duration-display-display: var(--duration-display, var(--center-duration-display)); 2087} 2088 2089::part(bottom), 2090[part~='bottom'] { 2091 --media-control-display: var(--controls, var(--bottom-controls)); 2092 --media-play-button-display: var(--play-button, var(--bottom-play-button)); 2093 --media-live-button-display: var(--live-button, var(--bottom-live-button)); 2094 --media-seek-backward-button-display: var(--seek-backward-button, var(--bottom-seek-backward-button)); 2095 --media-seek-forward-button-display: var(--seek-forward-button, var(--bottom-seek-forward-button)); 2096 --media-mute-button-display: var(--mute-button, var(--bottom-mute-button)); 2097 --media-captions-button-display: var(--captions-button, var(--bottom-captions-button)); 2098 --media-captions-menu-button-display: var( 2099 --captions-menu-button, 2100 var(--media-captions-button-display, var(--bottom-captions-menu-button)) 2101 ); 2102 --media-rendition-menu-button-display: var(--rendition-menu-button, var(--bottom-rendition-menu-button)); 2103 --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--bottom-audio-track-menu-button)); 2104 --media-airplay-button-display: var(--airplay-button, var(--bottom-airplay-button)); 2105 --media-pip-button-display: var(--pip-button, var(--bottom-pip-button)); 2106 --media-fullscreen-button-display: var(--fullscreen-button, var(--bottom-fullscreen-button)); 2107 --media-cast-button-display: var(--cast-button, var(--bottom-cast-button, var(--_cast-button-drm-display))); 2108 --media-playback-rate-button-display: var(--playback-rate-button, var(--bottom-playback-rate-button)); 2109 --media-playback-rate-menu-button-display: var( 2110 --playback-rate-menu-button, 2111 var(--media-playback-rate-button-display, var(--bottom-playback-rate-menu-button)) 2112 ); 2113 --media-volume-range-display: var(--volume-range, var(--bottom-volume-range)); 2114 --media-time-range-display: var(--time-range, var(--bottom-time-range)); 2115 --media-time-display-display: var(--time-display, var(--bottom-time-display)); 2116 --media-duration-display-display: var(--duration-display, var(--bottom-duration-display)); 2117 --media-title-display-display: var(--title-display, var(--bottom-title-display)); 2118} 2119 2120:host([no-tooltips]) { 2121 --media-tooltip-display: none; 2122} 2123`,vn=new WeakMap,vs=class e{constructor(e,t){this.element=e,this.type=t,this.element.addEventListener(this.type,this);let i=vn.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=vn.get(this.element);
2123e&&e.delete(this.type)}}static for(t){vn.has(t.element)||vn.set(t.element,new Map);let i=t.attributeName.slice(2),a=vn.get(t.element);return a&&a.has(i)?a.get(i):new e(t.element,i)}},vo=new Map,vl=new WeakMap,vd=new WeakMap,vu=class{constructor(e,t,i){this.strings=e,this.values=t,this.processor=i,this.stringsKey=this.strings.join("\x01")}get template(){if(vo.has(this.stringsKey))return vo.get(this.stringsKey);{let e=p$.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((e,i,a)=>e+i+(a<t?`{{ ${a} }}`:""),""),vo.set(this.stringsKey,e),e}}renderInto(e){var t;let i=this.template;if(vl.get(e)!==i){vl.set(e,i);let t=new lq(i,this.values,this.processor);vd.set(e,t),e instanceof lJ?e.replace(...t.children):e.appendChild(t);return}let a=vd.get(e);null==(t=null==a?void 0:a.update)||t.call(a,this.values)}},vc={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 lX&&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 lX){let i=e.attributeNamespace;return t!==e.element.hasAttributeNS(i,e.attributeName)&&(e.booleanValue=t),!0}return!1}(e,t)||e instanceof lX&&e.attributeName.startsWith("on")&&(vs.for(e).set(t),e.element.removeAttributeNS(e.attributeNamespace,e.attributeName),1)||!1===t&&e instanceof lJ&&(e.replace(""),1)||t instanceof vu&&e instanceof lJ&&(t.renderInto(e),1)||t instanceof DocumentFragment&&e instanceof lJ&&(t.childNodes.length&&e.replace(...t.childNodes),1)||function(e,t){if(e instanceof lX){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 vh(e,...t){return new vu(e,t,vc)}var vm=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",THUMB:"thumb",DISPLAY:"display",CONTROL_BAR:"control-bar",MENU_BUTTON:"menu-button",MENU:"menu",MENU_ITEM:"menu-item",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(", "),vp=e=>e.charAt(0).toUpperCase()+e.slice(1),vv=(e,t)=>{let i=(e=>{if(e.muxCode){if(e.muxCode===tF.NETWORK_TOKEN_EXPIRED)return"403-expired-token.md";if(e.muxCode===tF.NETWORK_TOKEN_MALFORMED)return"403-malformatted-token.md";if([tF.NETWORK_TOKEN_AUD_MISMATCH,tF.NETWORK_TOKEN_AUD_MISSING].includes(e.muxCode))return"403-incorrect-aud-value.md";if(e.muxCode===tF.NETWORK_TOKEN_SUB_MISMATCH)return"403-playback-id-mismatch.md";if(e.muxCode===tF.NETWORK_TOKEN_MISSING)return"missing-signed-tokens.md";if(e.muxCode===tF.NETWORK_NOT_FOUND)return"404-not-found.md";if(e.muxCode===tF.NETWORK_NOT_READY)return"412-not-playable.md"}if(e.code){if(e.code===tK.MEDIA_ERR_NETWORK)return"";if(e.code===tK.MEDIA_ERR_DECODE)return"media-decode-error.md";if(e.code===tK.MEDIA_ERR_SRC_NOT_SUPPORTED)return"media-src-not-supported.md"}return""})(e);return{message:e.message,context:e.context,file:i}},vE
vendor: 8,358 bytes, lines 2123-2406
2123=`<template id="media-theme-gerwig"> 2124 <style> 2125 @keyframes pre-play-hide { 2126 0% { 2127 transform: scale(1); 2128 opacity: 1; 2129 } 2130 2131 30% { 2132 transform: scale(0.7); 2133 } 2134 2135 100% { 2136 transform: scale(1.5); 2137 opacity: 0; 2138 } 2139 } 2140 2141 :host { 2142 --_primary-color: var(--media-primary-color, #fff); 2143 --_secondary-color: var(--media-secondary-color, transparent); 2144 --_accent-color: var(--media-accent-color, #fa50b5); 2145 --_text-color: var(--media-text-color, #000); 2146 2147 --media-icon-color: var(--_primary-color); 2148 --media-control-background: var(--_secondary-color); 2149 --media-control-hover-background: var(--_accent-color); 2150 --media-time-buffered-color: rgba(255, 255, 255, 0.4); 2151 --media-preview-time-text-shadow: none; 2152 --media-control-height: 14px; 2153 --media-control-padding: 6px; 2154 --media-tooltip-container-margin: 6px; 2155 --media-tooltip-distance: 18px; 2156 2157 color: var(--_primary-color); 2158 display: inline-block; 2159 width: 100%; 2160 height: 100%; 2161 } 2162 2163 :host([audio]) { 2164 --_secondary-color: var(--media-secondary-color, black); 2165 --media-preview-time-text-shadow: none; 2166 } 2167 2168 :host([audio]) ::slotted([slot='media']) { 2169 height: 0px; 2170 } 2171 2172 :host([audio]) media-loading-indicator { 2173 display: none; 2174 } 2175 2176 :host([audio]) media-controller { 2177 background: transparent; 2178 } 2179 2180 :host([audio]) media-controller::part(vertical-layer) { 2181 background: transparent; 2182 } 2183 2184 :host([audio]) media-control-bar { 2185 width: 100%; 2186 background-color: var(--media-control-background); 2187 } 2188 2189 /* 2190 * 0.433s is the transition duration for VTT Regions. 2191 * Borrowed here, so the captions don't move too fast. 2192 */ 2193 media-controller { 2194 --media-webkit-text-track-transform: translateY(0) scale(0.98); 2195 --media-webkit-text-track-transition: transform 0.433s ease-out 0.3s; 2196 } 2197 media-controller:is([mediapaused], :not([userinactive])) { 2198 --media-webkit-text-track-transform: translateY(-50px) scale(0.98); 2199 --media-webkit-text-track-transition: transform 0.15s ease; 2200 } 2201 2202 /* 2203 * CSS specific to iOS devices. 2204 * See: https://stackoverflow.com/questions/30102792/css-media-query-to-target-only-ios-devices/60220757#60220757 2205 */ 2206 @supports (-webkit-touch-callout: none) { 2207 /* Disable subtitle adjusting for iOS Safari */ 2208 media-controller[mediaisfullscreen] { 2209 --media-webkit-text-track-transform: unset; 2210 --media-webkit-text-track-transition: unset; 2211 } 2212 } 2213 2214 media-time-range { 2215 --media-box-padding-left: 6px; 2216 --media-box-padding-right: 6px; 2217 --media-range-bar-color: var(--_accent-color); 2218 --media-time-range-buffered-color: var(--_primary-color); 2219 --media-range-track-color: transparent; 2220 --media-range-track-background: rgba(255, 255, 255, 0.4); 2221 --media-range-thumb-background: radial-gradient( 2222 circle, 2223 #000 0%, 2224 #000 25%, 2225 var(--_accent-color) 25%, 2226 var(--_accent-color) 2227 ); 2228 --media-range-thumb-width: 12px; 2229 --media-range-thumb-height: 12px; 2230 --media-range-thumb-transform: scale(0); 2231 --media-range-thumb-transition: transform 0.3s; 2232 --media-range-thumb-opacity: 1; 2233 --media-preview-background: var(--_primary-color); 2234 --media-box-arrow-background: var(--_primary-color); 2235 --media-preview-thumbnail-border: 5px solid var(--_primary-color); 2236 --media-preview-border-radius: 5px; 2237 --media-text-color: var(--_text-color); 2238 --media-control-hover-background: transparent; 2239 --media-preview-chapter-text-shadow: none; 2240 color: var(--_accent-color); 2241 padding: 0 6px; 2242 } 2243 2244 :host([audio]) media-time-range { 2245 --media-preview-time-padding: 1.5px 6px; 2246 --media-preview-box-margin: 0 0 -5px; 2247 } 2248 2249 media-time-range:hover { 2250 --media-range-thumb-transform: scale(1); 2251 } 2252 2253 media-preview-thumbnail { 2254 border-bottom-width: 0; 2255 } 2256 2257 [part~='menu'] { 2258 border-radius: 2px; 2259 border: 1px solid rgba(0, 0, 0, 0.1); 2260 bottom: 50px; 2261 padding: 2.5px 10px; 2262 } 2263 2264 [part~='menu']::part(indicator) { 2265 fill: var(--_accent-color); 2266 } 2267 2268 [part~='menu']::part(menu-item) { 2269 box-sizing: border-box; 2270 display: flex; 2271 align-items: center; 2272 padding: 6px 10px; 2273 min-height: 34px; 2274 } 2275 2276 [part~='menu']::part(checked) { 2277 font-weight: 700; 2278 } 2279 2280 media-captions-menu, 2281 media-rendition-menu, 2282 media-audio-track-menu, 2283 media-playback-rate-menu { 2284 position: absolute; /* ensure they don't take up space in DOM on load */ 2285 --media-menu-background: var(--_primary-color); 2286 --media-menu-item-checked-background: transparent; 2287 --media-text-color: var(--_text-color); 2288 --media-menu-item-hover-background: transparent; 2289 --media-menu-item-hover-outline: var(--_accent-color) solid 1px; 2290 } 2291 2292 media-rendition-menu { 2293 min-width: 140px; 2294 } 2295 2296 /* The icon is a circle so make it 16px high instead of 14px for more balance. */ 2297 media-audio-track-menu-button { 2298 --media-control-padding: 5px; 2299 --media-control-height: 16px; 2300 } 2301 2302 media-playback-rate-menu-button { 2303 --media-control-padding: 6px 3px; 2304 min-width: 4.4ch; 2305 } 2306 2307 media-playback-rate-menu { 2308 --media-menu-flex-direction: row; 2309 --media-menu-item-checked-background: var(--_accent-color); 2310 --media-menu-item-checked-indicator-display: none; 2311 margin-right: 6px; 2312 padding: 0; 2313 --media-menu-gap: 0.25em; 2314 } 2315 2316 media-playback-rate-menu[part~='menu']::part(menu-item) { 2317 padding: 6px 6px 6px 8px; 2318 } 2319 2320 media-playback-rate-menu[part~='menu']::part(checked) { 2321 color: #fff; 2322 } 2323 2324 :host(:not([audio])) media-time-range { 2325 /* Adding px is required here for calc() */ 2326 --media-range-padding: 0px; 2327 background: transparent; 2328 z-index: 10; 2329 height: 10px; 2330 bottom: -3px; 2331 width: 100%; 2332 } 2333 2334 media-control-bar :is([role='button'], [role='switch'], button) { 2335 line-height: 0; 2336 } 2337 2338 media-control-bar :is([part*='button'], [part*='range'], [part*='display']) { 2339 border-radius: 3px; 2340 } 2341 2342 .spacer { 2343 flex-grow: 1; 2344 background-color: var(--media-control-background, rgba(20, 20, 30, 0.7)); 2345 } 2346 2347 media-control-bar[slot~='top-chrome'] { 2348 min-height: 42px; 2349 pointer-events: none; 2350 } 2351 2352 media-control-bar { 2353 --gradient-steps: 2354 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%, 2355 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%, 2356 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%, 2357 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%; 2358 } 2359 2360 :host([title]) media-control-bar[slot='top-chrome']::before, 2361 :host([videotitle]) media-control-bar[slot='top-chrome']::before { 2362 content: ''; 2363 position: absolute; 2364 width: 100%; 2365 padding-bottom: min(100px, 25%); 2366 background: linear-gradient(to top, var(--gradient-steps)); 2367 opacity: 0.8; 2368 pointer-events: none; 2369 } 2370 2371 :host(:not([audio])) media-control-bar[part~='bottom']::before { 2372 content: ''; 2373 position: absolute; 2374 width: 100%; 2375 bottom: 0; 2376 left: 0; 2377 padding-bottom: min(100px, 25%); 2378 background: linear-gradient(to bottom, var(--gradient-steps)); 2379 opacity: 0.8; 2380 z-index: 1; 2381 pointer-events: none; 2382 } 2383 2384 media-control-bar[part~='bottom'] > * { 2385 z-index: 20; 2386 } 2387 2388 media-control-bar[part~='bottom'] { 2389 padding: 6px 6px; 2390 } 2391 2392 media-control-bar[slot~='top-chrome'] > * { 2393 --media-control-background: transparent; 2394 --media-control-hover-background: transparent; 2395 position: relative; 2396 } 2397 2398 media-controller::part(vertical-layer) { 2399 transition: background-color 1s; 2400 } 2401 2402 media-controller:is([mediapaused], :not([userinactive]))::part(vertical-layer) { 2403 background-color: var(--controls-backdrop-color, var(--controls, transparent)); 2404 transition: background-color 0.25s; 2405 } 2406
vendor: 39,699 bytes, lines 2407-3255
2407 .center-controls { 2408 --media-button-icon-width: 100%; 2409 --media-button-icon-height: auto; 2410 --media-tooltip-display: none; 2411 pointer-events: none; 2412 width: 100%; 2413 display: flex; 2414 flex-flow: row; 2415 align-items: center; 2416 justify-content: center; 2417 paint-order: stroke; 2418 stroke: rgba(102, 102, 102, 1); 2419 stroke-width: 0.3px; 2420 text-shadow: 2421 0 0 2px rgb(0 0 0 / 0.25), 2422 0 0 6px rgb(0 0 0 / 0.25); 2423 filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25)); 2424 } 2425 2426 .center-controls media-play-button { 2427 --media-control-background: transparent; 2428 --media-control-hover-background: transparent; 2429 --media-control-padding: 0; 2430 width: 40px; 2431 } 2432 2433 [breakpointsm] .center-controls media-play-button { 2434 width: 90px; 2435 height: 90px; 2436 border-radius: 50%; 2437 transition: background 0.4s; 2438 padding: 24px; 2439 --media-control-background: #000; 2440 --media-control-hover-background: var(--_accent-color); 2441 } 2442 2443 .center-controls media-seek-backward-button, 2444 .center-controls media-seek-forward-button { 2445 --media-control-background: transparent; 2446 --media-control-hover-background: transparent; 2447 padding: 0; 2448 margin: 0 20px; 2449 width: max(33px, min(8%, 40px)); 2450 text-shadow: 2451 0 0 2px rgb(0 0 0 / 0.25), 2452 0 0 6px rgb(0 0 0 / 0.25); 2453 } 2454 2455 [breakpointsm]:not([audio]) .center-controls.pre-playback { 2456 display: grid; 2457 align-items: initial; 2458 justify-content: initial; 2459 height: 100%; 2460 overflow: hidden; 2461 } 2462 2463 [breakpointsm]:not([audio]) .center-controls.pre-playback media-play-button { 2464 place-self: var(--_pre-playback-place, center); 2465 grid-area: 1 / 1; 2466 margin: 16px; 2467 } 2468 2469 /* Show and hide controls or pre-playback state */ 2470 2471 [breakpointsm]:is([mediahasplayed], :not([mediapaused])):not([audio]) 2472 .center-controls.pre-playback 2473 media-play-button { 2474 /* Using \`forwards\` would lead to a laggy UI after the animation got in the end state */ 2475 animation: 0.3s linear pre-play-hide; 2476 opacity: 0; 2477 pointer-events: none; 2478 } 2479 2480 .autoplay-unmute { 2481 --media-control-hover-background: transparent; 2482 width: 100%; 2483 display: flex; 2484 align-items: center; 2485 justify-content: center; 2486 filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25)); 2487 } 2488 2489 .autoplay-unmute-btn { 2490 --media-control-height: 16px; 2491 border-radius: 8px; 2492 background: #000; 2493 color: var(--_primary-color); 2494 display: flex; 2495 align-items: center; 2496 padding: 8px 16px; 2497 font-size: 18px; 2498 font-weight: 500; 2499 cursor: pointer; 2500 } 2501 2502 .autoplay-unmute-btn:hover { 2503 background: var(--_accent-color); 2504 } 2505 2506 [breakpointsm] .autoplay-unmute-btn { 2507 --media-control-height: 30px; 2508 padding: 14px 24px; 2509 font-size: 26px; 2510 } 2511 2512 .autoplay-unmute-btn svg { 2513 margin: 0 6px 0 0; 2514 } 2515 2516 [breakpointsm] .autoplay-unmute-btn svg { 2517 margin: 0 10px 0 0; 2518 } 2519 2520 media-controller:not([audio]):not([mediahasplayed]) *:is(media-control-bar, media-time-range) { 2521 display: none; 2522 } 2523 2524 media-error-dialog:not([mediaerrorcode]) { 2525 opacity: 0; 2526 } 2527 2528 media-loading-indicator { 2529 --media-loading-icon-width: 100%; 2530 --media-button-icon-height: auto; 2531 display: var(--media-control-display, var(--media-loading-indicator-display, flex)); 2532 pointer-events: none; 2533 position: absolute; 2534 width: min(15%, 150px); 2535 flex-flow: row; 2536 align-items: center; 2537 justify-content: center; 2538 } 2539 2540 /* Intentionally don't target the div for transition but the children 2541 of the div. Prevents messing with media-chrome's autohide feature. */ 2542 media-loading-indicator + div * { 2543 transition: opacity 0.15s; 2544 opacity: 1; 2545 } 2546 2547 media-loading-indicator[medialoading]:not([mediapaused]) ~ div > * { 2548 opacity: 0; 2549 transition-delay: 400ms; 2550 } 2551 2552 media-volume-range { 2553 width: min(100%, 100px); 2554 --media-range-padding-left: 10px; 2555 --media-range-padding-right: 10px; 2556 --media-range-thumb-width: 12px; 2557 --media-range-thumb-height: 12px; 2558 --media-range-thumb-background: radial-gradient( 2559 circle, 2560 #000 0%, 2561 #000 25%, 2562 var(--_primary-color) 25%, 2563 var(--_primary-color) 2564 ); 2565 --media-control-hover-background: none; 2566 } 2567 2568 media-time-display { 2569 white-space: nowrap; 2570 } 2571 2572 /* Generic style for explicitly disabled controls */ 2573 media-control-bar[part~='bottom'] [disabled], 2574 media-control-bar[part~='bottom'] [aria-disabled='true'] { 2575 opacity: 60%; 2576 cursor: not-allowed; 2577 } 2578 2579 media-text-display { 2580 --media-font-size: 16px; 2581 --media-control-padding: 14px; 2582 font-weight: 500; 2583 } 2584 2585 media-play-button.animated *:is(g, path) { 2586 transition: all 0.3s; 2587 } 2588 2589 media-play-button.animated[mediapaused] .pause-icon-pt1 { 2590 opacity: 0; 2591 } 2592 2593 media-play-button.animated[mediapaused] .pause-icon-pt2 { 2594 transform-origin: center center; 2595 transform: scaleY(0); 2596 } 2597 2598 media-play-button.animated[mediapaused] .play-icon { 2599 clip-path: inset(0 0 0 0); 2600 } 2601 2602 media-play-button.animated:not([mediapaused]) .play-icon { 2603 clip-path: inset(0 0 0 100%); 2604 } 2605 2606 media-seek-forward-button, 2607 media-seek-backward-button { 2608 --media-font-weight: 400; 2609 } 2610 2611 .mute-icon { 2612 display: inline-block; 2613 } 2614 2615 .mute-icon :is(path, g) { 2616 transition: opacity 0.5s; 2617 } 2618 2619 .muted { 2620 opacity: 0; 2621 } 2622 2623 media-mute-button[mediavolumelevel='low'] :is(.volume-medium, .volume-high), 2624 media-mute-button[mediavolumelevel='medium'] :is(.volume-high) { 2625 opacity: 0; 2626 } 2627 2628 media-mute-button[mediavolumelevel='off'] .unmuted { 2629 opacity: 0; 2630 } 2631 2632 media-mute-button[mediavolumelevel='off'] .muted { 2633 opacity: 1; 2634 } 2635 2636 /** 2637 * Our defaults for these buttons are to hide them at small sizes 2638 * users can override this with CSS 2639 */ 2640 media-controller:not([breakpointsm]):not([audio]) { 2641 --bottom-play-button: none; 2642 --bottom-seek-backward-button: none; 2643 --bottom-seek-forward-button: none; 2644 --bottom-time-display: none; 2645 --bottom-playback-rate-menu-button: none; 2646 --bottom-pip-button: none; 2647 } 2648 2649 [part='mux-badge'] { 2650 position: absolute; 2651 bottom: 10px; 2652 right: 10px; 2653 z-index: 2; 2654 opacity: 0.6; 2655 transition: 2656 opacity 0.2s ease-in-out, 2657 bottom 0.2s ease-in-out; 2658 } 2659 2660 [part='mux-badge']:hover { 2661 opacity: 1; 2662 } 2663 2664 [part='mux-badge'] a { 2665 font-size: 14px; 2666 font-family: var(--_font-family); 2667 color: var(--_primary-color); 2668 text-decoration: none; 2669 display: flex; 2670 align-items: center; 2671 gap: 5px; 2672 } 2673 2674 [part='mux-badge'] .mux-badge-text { 2675 transition: opacity 0.5s ease-in-out; 2676 opacity: 0; 2677 } 2678 2679 [part='mux-badge'] .mux-badge-logo { 2680 width: 40px; 2681 height: auto; 2682 display: inline-block; 2683 } 2684 2685 [part='mux-badge'] .mux-badge-logo svg { 2686 width: 100%; 2687 height: 100%; 2688 fill: white; 2689 } 2690 2691 media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'], 2692 media-controller:not([userinactive]) [part='mux-badge'], 2693 media-controller[mediahasplayed][mediapaused] [part='mux-badge'] { 2694 transition: bottom 0.1s ease-in-out; 2695 } 2696 2697 media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] { 2698 transition: bottom 0.2s ease-in-out 0.62s; 2699 } 2700 2701 media-controller:not([userinactive]) [part='mux-badge'] .mux-badge-text, 2702 media-controller[mediahasplayed][mediapaused] [part='mux-badge'] .mux-badge-text { 2703 opacity: 1; 2704 } 2705 2706 media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] .mux-badge-text { 2707 opacity: 0; 2708 } 2709 2710 media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] { 2711 bottom: 10px; 2712 } 2713 2714 media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'] { 2715 bottom: 10px; 2716 } 2717 2718 media-controller:not([userinactive])[mediahasplayed] [part='mux-badge'], 2719 media-controller[mediahasplayed][mediapaused] [part='mux-badge'] { 2720 bottom: calc(28px + var(--media-control-height, 0px) + var(--media-control-padding, 0px) * 2); 2721 } 2722 </style> 2723 2724 <template partial="TitleDisplay"> 2725 <template if="videotitle"> 2726 <template if="videotitle != true"> 2727 <media-text-display part="top title display" class="title-display">{{videotitle}}</media-text-display> 2728 </template> 2729 </template> 2730 <template if="!videotitle"> 2731 <template if="title"> 2732 <media-text-display part="top title display" class="title-display">{{title}}</media-text-display> 2733 </template> 2734 </template> 2735 </template> 2736 2737 <template partial="PlayButton"> 2738 <media-play-button 2739 part="{{section ?? 'bottom'}} play button" 2740 disabled="{{disabled}}" 2741 aria-disabled="{{disabled}}" 2742 class="animated" 2743 > 2744 <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon"> 2745 <g class="play-icon"> 2746 <path 2747 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" 2748 /> 2749 </g> 2750 <g class="pause-icon"> 2751 <path 2752 class="pause-icon-pt1" 2753 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" 2754 /> 2755 <path 2756 class="pause-icon-pt2" 2757 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" 2758 /> 2759 </g> 2760 </svg> 2761 </media-play-button> 2762 </template> 2763 2764 <template partial="PrePlayButton"> 2765 <media-play-button 2766 part="{{section ?? 'center'}} play button pre-play" 2767 disabled="{{disabled}}" 2768 aria-disabled="{{disabled}}" 2769 > 2770 <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon" style="transform: translate(3px, 0)"> 2771 <path 2772 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" 2773 /> 2774 </svg> 2775 </media-play-button> 2776 </template> 2777 2778 <template partial="SeekBackwardButton"> 2779 <media-seek-backward-button 2780 seekoffset="{{backwardseekoffset}}" 2781 part="{{section ?? 'bottom'}} seek-backward button" 2782 disabled="{{disabled}}" 2783 aria-disabled="{{disabled}}" 2784 > 2785 <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon"> 2786 <path 2787 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" 2788 /> 2789 <text transform="translate(6 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'"> 2790 {{backwardseekoffset}} 2791 </text> 2792 </svg> 2793 </media-seek-backward-button> 2794 </template> 2795 2796 <template partial="SeekForwardButton"> 2797 <media-seek-forward-button 2798 seekoffset="{{forwardseekoffset}}" 2799 part="{{section ?? 'bottom'}} seek-forward button" 2800 disabled="{{disabled}}" 2801 aria-disabled="{{disabled}}" 2802 > 2803 <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon"> 2804 <g> 2805 <text transform="translate(-1 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'"> 2806 {{forwardseekoffset}} 2807 </text> 2808 <path 2809 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" 2810 /> 2811 </g> 2812 </svg> 2813 </media-seek-forward-button> 2814 </template> 2815 2816 <template partial="MuteButton"> 2817 <media-mute-button part="bottom mute button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2818 <svg viewBox="0 0 18 14" slot="icon" class="mute-icon" aria-hidden="true"> 2819 <g class="unmuted"> 2820 <path 2821 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" 2822 /> 2823 <path 2824 class="volume-low" 2825 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" 2826 /> 2827 <path 2828 class="volume-medium" 2829 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" 2830 /> 2831 <path 2832 class="volume-high" 2833 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" 2834 /> 2835 </g> 2836 <g class="muted"> 2837 <path 2838 fill-rule="evenodd" 2839 clip-rule="evenodd" 2840 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" 2841 /> 2842 <path 2843 fill-rule="evenodd" 2844 clip-rule="evenodd" 2845 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" 2846 /> 2847 </g> 2848 </svg> 2849 </media-mute-button> 2850 </template> 2851 2852 <template partial="PipButton"> 2853 <media-pip-button part="bottom pip button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2854 <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon"> 2855 <path 2856 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" 2857 /> 2858 <path 2859 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" 2860 /> 2861 </svg> 2862 </media-pip-button> 2863 </template> 2864 2865 <template partial="CaptionsMenu"> 2866 <media-captions-menu-button part="bottom captions button"> 2867 <svg aria-hidden="true" viewBox="0 0 18 14" slot="on"> 2868 <path 2869 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" 2870 /> 2871 </svg> 2872 <svg aria-hidden="true" viewBox="0 0 18 14" slot="off"> 2873 <path 2874 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" 2875 /> 2876 <path 2877 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" 2878 /> 2879 <path 2880 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" 2881 /> 2882 </svg> 2883 </media-captions-menu-button> 2884 <media-captions-menu 2885 hidden 2886 anchor="auto" 2887 part="bottom captions menu" 2888 disabled="{{disabled}}" 2889 aria-disabled="{{disabled}}" 2890 exportparts="menu-item" 2891 > 2892 <div slot="checked-indicator"> 2893 <style> 2894 .indicator { 2895 position: relative; 2896 top: 1px; 2897 width: 0.9em; 2898 height: auto; 2899 fill: var(--_accent-color); 2900 margin-right: 5px; 2901 } 2902 2903 [aria-checked='false'] .indicator { 2904 display: none; 2905 } 2906 </style> 2907 <svg viewBox="0 0 14 18" class="indicator"> 2908 <path 2909 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" 2910 fill-rule="evenodd" 2911 /> 2912 </svg></div 2913 ></media-captions-menu> 2914 </template> 2915 2916 <template partial="AirplayButton"> 2917 <media-airplay-button part="bottom airplay button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2918 <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon"> 2919 <path 2920 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" 2921 /> 2922 <path 2923 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" 2924 /> 2925 </svg> 2926 </media-airplay-button> 2927 </template> 2928 2929 <template partial="FullscreenButton"> 2930 <media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2931 <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter"> 2932 <path 2933 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" 2934 /> 2935 <path 2936 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" 2937 /> 2938 <path 2939 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" 2940 /> 2941 <path 2942 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" 2943 /> 2944 </svg> 2945 <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit"> 2946 <path 2947 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" 2948 /> 2949 <path 2950 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" 2951 /> 2952 <path 2953 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" 2954 /> 2955 <path 2956 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" 2957 /> 2958 </svg> 2959 </media-fullscreen-button> 2960 </template> 2961 2962 <template partial="CastButton"> 2963 <media-cast-button part="bottom cast button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2964 <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter"> 2965 <path 2966 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" 2967 /> 2968 </svg> 2969 <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit"> 2970 <path 2971 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" 2972 /> 2973 <path d="M2.15002 5.634C5.18352 6.4207 7.57252 8.8151 8.35282 11.8499H15.8501V2.1499H2.15002V5.634Z" /> 2974 </svg> 2975 </media-cast-button> 2976 </template> 2977 2978 <template partial="LiveButton"> 2979 <media-live-button part="{{section ?? 'top'}} live button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 2980 <span slot="text">Live</span> 2981 </media-live-button> 2982 </template> 2983 2984 <template partial="PlaybackRateMenu"> 2985 <media-playback-rate-menu-button part="bottom playback-rate button"></media-playback-rate-menu-button> 2986 <media-playback-rate-menu 2987 hidden 2988 anchor="auto" 2989 rates="{{playbackrates}}" 2990 exportparts="menu-item" 2991 part="bottom playback-rate menu" 2992 disabled="{{disabled}}" 2993 aria-disabled="{{disabled}}" 2994 ></media-playback-rate-menu> 2995 </template> 2996 2997 <template partial="VolumeRange"> 2998 <media-volume-range 2999 part="bottom volume range" 3000 disabled="{{disabled}}" 3001 aria-disabled="{{disabled}}" 3002 ></media-volume-range> 3003 </template> 3004 3005 <template partial="TimeDisplay"> 3006 <media-time-display 3007 remaining="{{defaultshowremainingtime}}" 3008 showduration="{{!hideduration}}" 3009 part="bottom time display" 3010 disabled="{{disabled}}" 3011 aria-disabled="{{disabled}}" 3012 ></media-time-display> 3013 </template> 3014 3015 <template partial="TimeRange"> 3016 <media-time-range part="bottom time range" disabled="{{disabled}}" aria-disabled="{{disabled}}" exportparts="thumb"> 3017 <media-preview-thumbnail slot="preview"></media-preview-thumbnail> 3018 <media-preview-chapter-display slot="preview"></media-preview-chapter-display> 3019 <media-preview-time-display slot="preview"></media-preview-time-display> 3020 <div slot="preview" part="arrow"></div> 3021 </media-time-range> 3022 </template> 3023 3024 <template partial="AudioTrackMenu"> 3025 <media-audio-track-menu-button part="bottom audio-track button"> 3026 <svg aria-hidden="true" slot="icon" viewBox="0 0 18 16"> 3027 <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" /> 3028 <path 3029 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" 3030 /> 3031 </svg> 3032 </media-audio-track-menu-button> 3033 <media-audio-track-menu 3034 hidden 3035 anchor="auto" 3036 part="bottom audio-track menu" 3037 disabled="{{disabled}}" 3038 aria-disabled="{{disabled}}" 3039 exportparts="menu-item" 3040 > 3041 <div slot="checked-indicator"> 3042 <style> 3043 .indicator { 3044 position: relative; 3045 top: 1px; 3046 width: 0.9em; 3047 height: auto; 3048 fill: var(--_accent-color); 3049 margin-right: 5px; 3050 } 3051 3052 [aria-checked='false'] .indicator { 3053 display: none; 3054 } 3055 </style> 3056 <svg viewBox="0 0 14 18" class="indicator"> 3057 <path 3058 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" 3059 fill-rule="evenodd" 3060 /> 3061 </svg> 3062 </div> 3063 </media-audio-track-menu> 3064 </template> 3065 3066 <template partial="RenditionMenu"> 3067 <media-rendition-menu-button part="bottom rendition button"> 3068 <svg aria-hidden="true" slot="icon" viewBox="0 0 18 14"> 3069 <path 3070 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" 3071 /> 3072 </svg> 3073 </media-rendition-menu-button> 3074 <media-rendition-menu 3075 hidden 3076 anchor="auto" 3077 part="bottom rendition menu" 3078 disabled="{{disabled}}" 3079 aria-disabled="{{disabled}}" 3080 > 3081 <div slot="checked-indicator"> 3082 <style> 3083 .indicator { 3084 position: relative; 3085 top: 1px; 3086 width: 0.9em; 3087 height: auto; 3088 fill: var(--_accent-color); 3089 margin-right: 5px; 3090 } 3091 3092 [aria-checked='false'] .indicator { 3093 opacity: 0; 3094 } 3095 </style> 3096 <svg viewBox="0 0 14 18" class="indicator"> 3097 <path 3098 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" 3099 fill-rule="evenodd" 3100 /> 3101 </svg> 3102 </div> 3103 </media-rendition-menu> 3104 </template> 3105 3106 <template partial="MuxBadge"> 3107 <div part="mux-badge"> 3108 <a href="https://www.mux.com/player" target="_blank"> 3109 <span class="mux-badge-text">Powered by</span> 3110 <div class="mux-badge-logo"> 3111 <svg 3112 viewBox="0 0 1600 500" 3113 style="fill-rule: evenodd; clip-rule: evenodd; stroke-linejoin: round; stroke-miterlimit: 2" 3114 > 3115 <g> 3116 <path 3117 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" 3118 style="fill-rule: nonzero" 3119 ></path> 3120 <path 3121 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" 3122 style="fill-rule: nonzero" 3123 ></path> 3124 <path 3125 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" 3126 style="fill-rule: nonzero" 3127 ></path> 3128 </g> 3129 </svg> 3130 </div> 3131 </a> 3132 </div> 3133 </template> 3134 3135 <media-controller 3136 part="controller" 3137 defaultstreamtype="{{defaultstreamtype ?? 'on-demand'}}" 3138 breakpoints="sm:470" 3139 gesturesdisabled="{{disabled}}" 3140 hotkeys="{{hotkeys}}" 3141 nohotkeys="{{nohotkeys}}" 3142 novolumepref="{{novolumepref}}" 3143 audio="{{audio}}" 3144 noautoseektolive="{{noautoseektolive}}" 3145 defaultsubtitles="{{defaultsubtitles}}" 3146 defaultduration="{{defaultduration ?? false}}" 3147 keyboardforwardseekoffset="{{forwardseekoffset}}" 3148 keyboardbackwardseekoffset="{{backwardseekoffset}}" 3149 exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer" 3150 style="--_pre-playback-place:{{preplaybackplace ?? 'center'}}" 3151 > 3152 <slot name="media" slot="media"></slot> 3153 <slot name="poster" slot="poster"></slot> 3154 3155 <media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator> 3156 3157 <template if="!audio"> 3158 <media-error-dialog slot="dialog" noautohide></media-error-dialog> 3159 <!-- Pre-playback UI --> 3160 <!-- same for both on-demand and live --> 3161 <div slot="centered-chrome" class="center-controls pre-playback"> 3162 <template if="!breakpointsm">{{>PlayButton section="center"}}</template> 3163 <template if="breakpointsm">{{>PrePlayButton section="center"}}</template> 3164 </div> 3165 3166 <!-- Mux Badge --> 3167 <template if="proudlydisplaymuxbadge"> {{>MuxBadge}} </template> 3168 3169 <!-- Autoplay centered unmute button --> 3170 <!-- 3171 todo: figure out how show this with available state variables 3172 needs to show when: 3173 - autoplay is enabled 3174 - playback has been successful 3175 - audio is muted 3176 - in place / instead of the pre-plaback play button 3177 - not to show again after user has interacted with this button 3178 - OR user has interacted with the mute button in the control bar 3179 --> 3180 <!-- 3181 There should be a >MuteButton to the left of the "Unmute" text, but a templating bug 3182 makes it appear even if commented out in the markup, add it back when code is un-commented 3183 --> 3184 <!-- <div slot="centered-chrome" class="autoplay-unmute"> 3185 <div role="button" class="autoplay-unmute-btn">Unmute</div> 3186 </div> --> 3187 3188 <template if="streamtype == 'on-demand'"> 3189 <template if="breakpointsm"> 3190 <media-control-bar part="control-bar top" slot="top-chrome">{{>TitleDisplay}} </media-control-bar> 3191 </template> 3192 {{>TimeRange}} 3193 <media-control-bar part="control-bar bottom"> 3194 {{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}} {{>MuteButton}} 3195 {{>VolumeRange}} 3196 <div class="spacer"></div> 3197 {{>RenditionMenu}} {{>PlaybackRateMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}} 3198 {{>CastButton}} {{>PipButton}} {{>FullscreenButton}} 3199 </media-control-bar> 3200 </template> 3201 3202 <template if="streamtype == 'live'"> 3203 <media-control-bar part="control-bar top" slot="top-chrome"> 3204 {{>LiveButton}} 3205 <template if="breakpointsm"> {{>TitleDisplay}} </template> 3206 </media-control-bar> 3207 <template if="targetlivewindow > 0">{{>TimeRange}}</template> 3208 <media-control-bar part="control-bar bottom"> 3209 {{>PlayButton}} 3210 <template if="targetlivewindow > 0">{{>SeekBackwardButton}} {{>SeekForwardButton}}</template> 3211 {{>MuteButton}} {{>VolumeRange}} 3212 <div class="spacer"></div> 3213 {{>RenditionMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}} 3214 {{>FullscreenButton}} 3215 </media-control-bar> 3216 </template> 3217 </template> 3218 3219 <template if="audio"> 3220 <template if="streamtype == 'on-demand'"> 3221 <template if="title"> 3222 <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar> 3223 </template> 3224 <media-control-bar part="control-bar bottom"> 3225 {{>PlayButton}} 3226 <template if="breakpointsm"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template> 3227 {{>MuteButton}} 3228 <template if="breakpointsm">{{>VolumeRange}}</template> 3229 {{>TimeDisplay}} {{>TimeRange}} 3230 <template if="breakpointsm">{{>PlaybackRateMenu}}</template> 3231 {{>AirplayButton}} {{>CastButton}} 3232 </media-control-bar> 3233 </template> 3234 3235 <template if="streamtype == 'live'"> 3236 <template if="title"> 3237 <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar> 3238 </template> 3239 <media-control-bar part="control-bar bottom"> 3240 {{>PlayButton}} {{>LiveButton section="bottom"}} {{>MuteButton}} 3241 <template if="breakpointsm"> 3242 {{>VolumeRange}} 3243 <template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template> 3244 </template> 3245 <template if="targetlivewindow > 0"> {{>TimeDisplay}} {{>TimeRange}} </template> 3246 <template if="!targetlivewindow"><div class="spacer"></div></template> 3247 {{>AirplayButton}} {{>CastButton}} 3248 </media-control-bar> 3249 </template> 3250 </template> 3251 3252 <slot></slot> 3253 </media-controller> 3254</template> 3255`
3255,vb=p$.createElement("template");"innerHTML"in vb&&(vb.innerHTML=vE);var vg,vf,v_=class extends dc{};v_.template=null==(vf=null==(vg=vb.content)?void 0:vg.children)?void 0:vf[0],pK.customElements.get("media-theme-gerwig")||pK.
3255customElements.define("media-theme-gerwig",v_);var vy={SRC:"src",POSTER:"poster"},vT={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",PLAYBACK_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"},vA=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","videotitle","novolumepref","nomutedpref","proudlydisplaymuxbadge"],vk=oA.formatErrorMessage;function vw(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)}oA.formatErrorMessage=e=>{var t,i;if(e instanceof tK){let a=((e,t=!1)=>({title:((e,t=!1)=>{var i,a;if(e.muxCode){let r=vp(null!=(i=e.errorCategory)?i:"video"),n=tV(null!=(a=e.errorCategory)?a:tH.VIDEO);if(e.muxCode===tF.NETWORK_OFFLINE)return ie("Your device appears to be offline",t);if(e.muxCode===tF.NETWORK_RECONNECTING)return ie("Reconnecting...",t);if(e.muxCode===tF.NETWORK_TOKEN_EXPIRED)return ie("{category} URL has expired",t).format({category:r});if([tF.NETWORK_TOKEN_SUB_MISMATCH,tF.NETWORK_TOKEN_AUD_MISMATCH,tF.NETWORK_TOKEN_AUD_MISSING,tF.NETWORK_TOKEN_MALFORMED].includes(e.muxCode))return ie("{category} URL is formatted incorrectly",t).format({category:r});if(e.muxCode===tF.NETWORK_TOKEN_MISSING)return ie("Invalid {categoryName} URL",t).format({categoryName:n});if(e.muxCode===tF.NETWORK_NOT_FOUND)return ie("{category} does not exist",t).format({category:r});if(e.muxCode===tF.NETWORK_NOT_READY){let i="live"===e.streamType?"Live stream":"Video";return ie("{mediaType} is not currently available",t).format({mediaType:i})}}if(e.code){if(e.code===tK.MEDIA_ERR_NETWORK)return ie("Network Error",t);if(e.code===tK.MEDIA_ERR_DECODE)return ie("Media Error",t);if(e.code===tK.MEDIA_ERR_SRC_NOT_SUPPORTED)return ie("Source Not Supported",t)}return ie("Error",t)})(e,t).toString(),message:((e,t=!1)=>{var i,a;if(e.reload)return'Try again later or <a href="#" data-mux-reload style="color: #4a90e2;">click here to retry</a>';if(e.muxCode){let r=vp(null!=(i=e.errorCategory)?i:"video"),n=tV(null!=(a=e.errorCategory)?a:tH.VIDEO);return e.muxCode===tF.NETWORK_OFFLINE?ie("Check your internet connection and try reloading this video.",t):e.muxCode===tF.NETWORK_RECONNECTING?ie("Your connection was interrupted. Attempting to resume playback...",t):e.muxCode===tF.NETWORK_TOKEN_EXPIRED?ie("The videoâs secured {tokenNamePrefix}-token has expired.",t).format({tokenNamePrefix:n}):e.muxCode===tF.NETWORK_TOKEN_SUB_MISMATCH?ie("The videoâs playback ID does not match the one encoded in the {tokenNamePrefix}-token.",t).format({tokenNamePrefix:n}):e.muxCode===tF.NETWORK_TOKEN_MALFORMED?ie("{category} URL is formatted incorrectly",t).format({category:r}):[tF.NETWORK_TOKEN_AUD_MISMATCH,tF.NETWORK_TOKEN_AUD_MISSING].includes(e.muxCode)?ie("The {tokenNamePrefix}-token is formatted with incorrect information.",t).format({tokenNamePrefix:n}):[tF.NETWORK_TOKEN_MISSING,tF.NETWORK_INVALID_URL].includes(e.muxCode)?ie("The video URL or {tokenNamePrefix}-token are formatted with incorrect or incomplete information.",t).format({tokenNamePrefix:n}):e.muxCode===tF.NETWORK_NOT_FOUND?"":e.message}return e.code&&(e.code===tK.MEDIA_ERR_NETWORK||e.code===tK.MEDIA_ERR_DECODE||e.code===tK.MEDIA_ERR_SRC_NOT_SUPPORTED),e.message})(e,t).toString()}))(e,!1);return` 3256 ${null!=a&&a.title?`<h3>${a.title}</h3>`:""} 3257 ${null!=a&&a.message||null!=a&&a.linkUrl?`<p> 3258 ${null==a?void 0:a.message} 3259 ${null!=a&&a.linkUrl?`<a 3260 href="${a.linkUrl}" 3261 target="_blank" 3262 rel="external noopener" 3263 aria-label="${null!=(t=a.linkText)?t:""} ${ie("(opens in a new window)")}" 3264 >${null!=(i=a.linkText)?i:a.linkUrl}</a 3265 >`:""} 3266 </p>`:""} 3267 `}return vk(e)};var vR,vS,vI,vC,vL,vD,vM,vO,vx,vN,vP,vU,vW,vB,vH,vF,vV,vK,v$,vq,vY,vG,vj,vz,vQ=Object.values(aK),vZ=Object.values(vy),vX=Object.values(vT),vJ="mux-player",v0={isDialogOpen:!1},v1={redundant_streams:!0},v2=class extends va{constructor(){super(),uA(this,vF),uA(this,vR),uA(this,vS,!1),uA(this,vI,{}),uA(this,vC,!0),uA(this,vL,new p3(this,"hotkeys")),uA(this,vD),uA(this,vM,()=>uw(this,vF,vq).call(this)),uA(this,vO,()=>uw(this,vF,vq).call(this)),uA(this,vx,()=>uw(this,vF,vq).call(this)),uA(this,vN,e=>{e.composedPath().find(e=>{var t;return null==(t=null==e?void 0:e.hasAttribute)?void 0:t.call(e,"data-mux-reload")})&&(e.preventDefault(),window.location.reload())}),uA(this,vP,e=>{var t;(null==(t=e.composedPath()[0])?void 0:t.localName)==="media-error-dialog"&&uw(this,vF,v$).call(this,{isDialogOpen:!1})}),uA(this,vU,e=>{var t;(null==(t=e.composedPath()[0])?void 0:t.localName)==="media-error-dialog"&&(pX(this,p$.activeElement)||e.preventDefault())}),uA(this,vW),uA(this,vB,{...v0}),uA(this,vH,e=>{var t;let i=null==(t=this.media)?void 0:t.error;if(!(i instanceof tK)){let{message:e,code:t}=null!=i?i:{};i=new tK(e,t)}if(!(null!=i&&i.fatal)){p5(i),i.data&&p5(`${i.name} data:`,i.data);return}let a=vv(i,!1);a.message&&p8(a),p9(i),i.data&&p9(`${i.name} data:`,i.data),uw(this,vF,v$).call(this,{isDialogOpen:!0})}),uk(this,vR,iY()),this.attachShadow({mode:"open"}),uw(this,vF,vK).call(this),this.isConnected&&uw(this,vF,vV).call(this)}static get NAME(){return vJ}static get VERSION(){return p0}static get observedAttributes(){var e;return[...null!=(e=va.observedAttributes)?e:[],...vZ,...vQ,...vX]}setAttribute(e,t){super.setAttribute(e,t),e.startsWith("metadata-")&&this.media&&(this.media.metadata=vw(this))}removeAttribute(e){super.removeAttribute(e),e.startsWith("metadata-")&&this.media&&(this.media.metadata=vw(this))}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(){uw(this,vF,vV).call(this);let e=this.media;e&&(e.metadata=vw(this))}disconnectedCallback(){var e,t,i,a,r,n,s,o,l,d;
3267null==(e=uT(this,vD))||e.disconnect(),null==(t=this.media)||t.removeEventListener("streamtypechange",uT(this,vM)),null==(i=this.media)||i.removeEventListener("loadstart",uT(this,vO)),this.removeEventListener("error",uT(this,vH)),this.removeEventListener("click",uT(this,vN)),null==(a=this.mediaTheme)||a.removeEventListener("close",uT(this,vP)),null==(r=this.mediaTheme)||r.removeEventListener("focusin",uT(this,vU)),this.media&&(this.media.errorTranslator=void 0),null==(s=null==(n=this.media)?void 0:n.textTracks)||s.removeEventListener("addtrack",uT(this,vx)),null==(l=null==(o=this.media)?void 0:o.textTracks)||l.removeEventListener("removetrack",uT(this,vx)),null==(d=uT(this,vW))||d.call(this),uk(this,vW,void 0),uk(this,vS,!1)}attributeChangedCallback(e,t,i){var a;switch(uw(this,vF,vV).call(this),super.attributeChangedCallback(e,t,i),e){case vT.HOTKEYS:uT(this,vL).value=i;break;case vT.THUMBNAIL_TIME:null!=i&&this.tokens.thumbnail&&p5(ie("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break;case vT.THUMBNAIL_TOKEN:if(i){let e=t7(i);if(e){let{aud:t}=e,i=iA.THUMBNAIL;t!==i&&p5(ie("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:i,tokenNamePrefix:"thumbnail"}))}}break;case vT.STORYBOARD_TOKEN:if(i){let e=t7(i);if(e){let{aud:t}=e,i=iA.STORYBOARD;t!==i&&p5(ie("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:i,tokenNamePrefix:"storyboard"}))}}break;case vT.DRM_TOKEN:if(i){let e=t7(i);if(e){let{aud:t}=e,i=iA.DRM;t!==i&&p5(ie("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:i,tokenNamePrefix:"drm"}))}}break;case aK.PLAYBACK_ID:null!=i&&i.includes("?token")&&p9(ie("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:i}));break;case aK.STREAM_TYPE:i&&![tY.LIVE,tY.ON_DEMAND,tY.UNKNOWN].includes(i)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=i.includes("dvr")?1/0:0:p8({file:"invalid-stream-type.md",message:ie("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):i===tY.LIVE?null==this.getAttribute(vT.TARGET_LIVE_WINDOW)&&(this.targetLiveWindow=0):this.targetLiveWindow=NaN;break;case vT.FULLSCREEN_ELEMENT:if(null!=i||i!==t){let e=p$.getElementById(i),t=null==e?void 0:e.querySelector("mux-player");this.mediaController&&e&&t&&(this.mediaController.fullscreenElement=e)}break;case aK.CAP_RENDITION_TO_PLAYER_SIZE:(null==i||i!==t)&&(this.capRenditionToPlayerSize=null!=i||void 0);break;case aK.MAX_RECONNECT_RETRIES:(null==i||i!==t)&&(this.maxReconnectRetries=Number(i))}[aK.PLAYBACK_ID,vy.SRC,vT.PLAYBACK_TOKEN].includes(e)&&t!==i&&uk(this,vB,{...uT(this,vB),...v0}),uw(this,vF,vq).call(this,{[null!=(a=p2[e])?a:pY(e)]:i})}async requestFullscreen(e){var t;if(!(!this.mediaController||this.mediaController.hasAttribute(rF.MEDIA_IS_FULLSCREEN)))return null==(t=this.mediaController)||t.dispatchEvent(new pK.CustomEvent(rU.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,t)=>{var i;null==(i=this.mediaController)||i.addEventListener(rV.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}async exitFullscreen(){var e;if(!(!this.mediaController||!this.mediaController.hasAttribute(rF.MEDIA_IS_FULLSCREEN)))return null==(e=this.mediaController)||e.dispatchEvent(new pK.CustomEvent(rU.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,t)=>{var i;null==(i=this.mediaController)||i.addEventListener(rV.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}get preferCmcd(){var e;return null!=(e=this.getAttribute(aK.PREFER_CMCD))?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?tz.includes(e)?this.setAttribute(aK.PREFER_CMCD,e):p5(`Invalid value for preferCmcd. Must be one of ${tz.join()}`):this.removeAttribute(aK.PREFER_CMCD))}get hasPlayed(){var e,t;return null!=(t=null==(e=this.mediaController)?void 0:e.hasAttribute(rF.MEDIA_HAS_P
3267LAYED))&&t}get inLiveWindow(){var e;return null==(e=this.mediaController)?void 0:e.hasAttribute(rF.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(vT.THEME))?e:"gerwig"}set theme(e){this.setAttribute(vT.THEME,`${e}`)}get themeProps(){let e=this.mediaTheme;if(!e)return;let t={};for(let i of e.getAttributeNames()){if(vA.includes(i))continue;let a=e.getAttribute(i);t[pY(i)]=""===a||a}return t}set themeProps(e){var t,i;uw(this,vF,vV).call(this);let a={...this.themeProps,...e};for(let r in a){if(vA.includes(r))continue;let a=null==e?void 0:e[r];"boolean"==typeof a||null==a?null==(t=this.mediaTheme)||t.toggleAttribute(pq(r),!!a):null==(i=this.mediaTheme)||i.setAttribute(pq(r),a)}}get playbackId(){var e;return null!=(e=this.getAttribute(aK.PLAYBACK_ID))?e:void 0}set playbackId(e){e?this.setAttribute(aK.PLAYBACK_ID,e):this.removeAttribute(aK.PLAYBACK_ID)}get src(){var e,t;return this.playbackId?null!=(e=v3(this,vy.SRC))?e:void 0:null!=(t=this.getAttribute(vy.SRC))?t:void 0}set src(e){e?this.setAttribute(vy.SRC,e):this.removeAttribute(vy.SRC)}get poster(){var e;let t=this.getAttribute(vy.POSTER);if(null!=t)return t;let{tokens:i}=this;return i.playback&&!i.thumbnail?void p5("Missing expected thumbnail token. No poster image will be shown"):this.playbackId&&!this.audio?((e,{token:t,customDomain:i=pJ,thumbnailTime:a,programTime:r}={})=>{var n;let s=null==t?a:void 0,{aud:o}=null!=(n=t7(t))?n:{};if(!(t&&"t"!==o))return`https://image.${i}/${e}/thumbnail.webp${pj({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(vy.POSTER,e):this.removeAttribute(vy.POSTER)}get storyboardSrc(){var e;return null!=(e=this.getAttribute(vT.STORYBOARD_SRC))?e:void 0}set storyboardSrc(e){e?this.setAttribute(vT.STORYBOARD_SRC,e):this.removeAttribute(vT.STORYBOARD_SRC)}get storyboard(){let{tokens:e}=this;return this.storyboardSrc&&!e.storyboard?this.storyboardSrc:this.audio||!this.playbackId||!this.streamType||[tY.LIVE,tY.UNKNOWN].includes(this.streamType)||e.playback&&!e.storyboard?void 0:((e,{token:t,customDomain:i=pJ,programStartTime:a,programEndTime:r}={})=>{var n;let{aud:s}=null!=(n=t7(t))?n:{};if(!(t&&"s"!==s))return`https://image.${i}/${e}/storyboard.vtt${pj({token:t,format:"webp",program_start_time:a,program_end_time:r})}`})(this.playbackId,{customDomain:this.customDomain,token:e.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}get audio(){return this.hasAttribute(vT.AUDIO)}set audio(e){if(!e)return void this.removeAttribute(vT.AUDIO);this.setAttribute(vT.AUDIO,"")}get hotkeys(){return uT(this,vL)}get nohotkeys(){return this.hasAttribute(vT.NOHOTKEYS)}set nohotkeys(e){if(!e)return void this.removeAttribute(vT.NOHOTKEYS);this.setAttribute(vT.NOHOTKEYS,"")}get thumbnailTime(){return pG(this.getAttribute(vT.THUMBNAIL_TIME))}set thumbnailTime(e){this.setAttribute(vT.THUMBNAIL_TIME,`${e}`)}get videoTitle(){var e,t;return null!=(t=null!=(e=this.getAttribute(vT.VIDEO_TITLE))?e:this.getAttribute(vT.TITLE))?t:""}set videoTitle(e){e!==this.videoTitle&&(e?this.setAttribute(vT.VIDEO_TITLE,e):this.removeAttribute(vT.VIDEO_TITLE))}get placeholder(){var e;return null!=(e=v3(this,vT.PLACEHOLDER))?e:""}set placeholder(e){this.setAttribute(vT.PLACEHOLDER,`${e}`)}get primaryColor(){var e,t;let i=this.getAttribute(vT.PRIMARY_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=pK.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_primary-color"))?void 0:t.trim()))return i}set primaryColor(e){this.setAttribute(vT.PRIMARY_COLOR,`${e}`)}get secondaryColor(){var e,t;let i=this.getAttribute(vT.SECONDARY_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=pK.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_secondary-color"))?void 0:t.trim()))return i}set secondaryColor(e){this.setAttribute(vT.SECONDARY_COLOR,`${e}`)}get accentColor(){var e,t;let i=this.getAttribute(vT.ACCENT_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=pK.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_accent-color"))?void 0:t.trim()))return i}set accentColor(e){this.setAttribute(vT.ACCENT_COLOR,`${e}`)}get defaultShowRemainingTime(){return this.hasAttribute(vT.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(e){e?this.setAttribute(vT.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(vT.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(vT.PLAYBACK_RATES))return this.getAttribute(vT.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(e=>Number(e)).filter(e=>!Number.isNaN(e)).sort((e,t)=>
3267e-t)}set playbackRates(e){if(!e)return void this.removeAttribute(vT.PLAYBACK_RATES);this.setAttribute(vT.PLAYBACK_RATES,e.join(" "))}get forwardSeekOffset(){var e;return null!=(e=pG(this.getAttribute(vT.FORWARD_SEEK_OFFSET)))?e:10}set forwardSeekOffset(e){this.setAttribute(vT.FORWARD_SEEK_OFFSET,`${e}`)}get backwardSeekOffset(){var e;return null!=(e=pG(this.getAttribute(vT.BACKWARD_SEEK_OFFSET)))?e:10}set backwardSeekOffset(e){this.setAttribute(vT.BACKWARD_SEEK_OFFSET,`${e}`)}get defaultHiddenCaptions(){return this.hasAttribute(vT.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(e){e?this.setAttribute(vT.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(vT.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return pG(this.getAttribute(vT.DEFAULT_DURATION))}set defaultDuration(e){null==e?this.removeAttribute(vT.DEFAULT_DURATION):this.setAttribute(vT.DEFAULT_DURATION,`${e}`)}get playerInitTime(){return this.hasAttribute(aK.PLAYER_INIT_TIME)?pG(this.getAttribute(aK.PLAYER_INIT_TIME)):uT(this,vR)}set playerInitTime(e){e!=this.playerInitTime&&(null==e?this.removeAttribute(aK.PLAYER_INIT_TIME):this.setAttribute(aK.PLAYER_INIT_TIME,`${+e}`))}get playerSoftwareName(){var e;return null!=(e=this.getAttribute(aK.PLAYER_SOFTWARE_NAME))?e:vJ}get playerSoftwareVersion(){var e;return null!=(e=this.getAttribute(aK.PLAYER_SOFTWARE_VERSION))?e:p0}get beaconCollectionDomain(){var e;return null!=(e=this.getAttribute(aK.BEACON_COLLECTION_DOMAIN))?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(aK.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(aK.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var e;return null!=(e=this.getAttribute(aK.MAX_RESOLUTION))?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(aK.MAX_RESOLUTION,e):this.removeAttribute(aK.MAX_RESOLUTION))}get minResolution(){var e;return null!=(e=this.getAttribute(aK.MIN_RESOLUTION))?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(aK.MIN_RESOLUTION,e):this.removeAttribute(aK.MIN_RESOLUTION))}get maxAutoResolution(){var e;return null!=(e=this.getAttribute(aK.MAX_AUTO_RESOLUTION))?e:void 0}set maxAutoResolution(e){null==e?this.removeAttribute(aK.MAX_AUTO_RESOLUTION):this.setAttribute(aK.MAX_AUTO_RESOLUTION,e)}get renditionOrder(){var e;return null!=(e=this.getAttribute(aK.RENDITION_ORDER))?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(aK.RENDITION_ORDER,e):this.removeAttribute(aK.RENDITION_ORDER))}get programStartTime(){return pG(this.getAttribute(aK.PROGRAM_START_TIME))}set programStartTime(e){null==e?this.removeAttribute(aK.PROGRAM_START_TIME):this.setAttribute(aK.PROGRAM_START_TIME,`${e}`)}get programEndTime(){return pG(this.getAttribute(aK.PROGRAM_END_TIME))}set programEndTime(e){null==e?this.removeAttribute(aK.PROGRAM_END_TIME):this.setAttribute(aK.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){return pG(this.getAttribute(aK.ASSET_START_TIME))}set assetStartTime(e){null==e?this.removeAttribute(aK.ASSET_START_TIME):this.setAttribute(aK.ASSET_START_TIME,`${e}`)}get assetEndTime(){return pG(this.getAttribute(aK.ASSET_END_TIME))}set assetEndTime(e){null==e?this.removeAttribute(aK.ASSET_END_TIME):this.setAttribute(aK.ASSET_END_TIME,`${e}`)}get extraSourceParams(){return this.hasAttribute(vT.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(vT.EXTRA_SOURCE_PARAMS)).entries()].reduce((e,[t,i])=>(e[t]=i,e),{}):v1}set extraSourceParams(e){null==e?this.removeAttribute(vT.EXTRA_SOURCE_PARAMS):this.setAttribute(vT.EXTRA_SOURCE_PARAMS,new URLSearchParams(e).toString())}get customDomain(){var e;return null!=(e=this.getAttribute(aK.CUSTOM_DOMAIN))?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(aK.CUSTOM_DOMAIN,e):this.removeAttribute(aK.CUSTOM_DOMAIN))}get envKey(){var e;return null!=(e=v3(this,aK.ENV_KEY))?e:void 0}set envKey(e){this.setAttribute(aK.ENV_KEY,`${e}`)}get noVolumePref(){return this.hasAttribute(vT.NO_VOLUME_PREF)}set noVolumePref(e){e?this.setAttribute(vT.NO_VOLUME_PREF,""):this.removeAttribute(vT.NO_VOLUME_PREF)}get noMutedPref(){return this.hasAttribute(vT.NO_MUTED_PREF)}set noMutedPref(e){e?this.setAttribute(vT.NO_MUTED_PREF,""):this.removeAttribute(vT.NO_MUTED_PREF)}get debug(){return null!=v3(this,aK.DEBUG)}set debug(e){e?this.setAttribute(aK.DEBUG,""):this.removeAttribute(aK.DEBUG)}get disableTracking(){return null!=v3(this,aK.DISABLE_TRACKING)}set disableTracking(e){this.toggleAttribute(aK.DISABLE_TRACKING,!!e)}get disableCookies(){return null!=v3(this,aK.DISABLE_COOKIES)}set disableCookies(e){e?this.setAttribute(aK.DISABLE_COOKIES,""):this.removeAttribute(aK.DISABLE_COOKIES)}get streamType(){var e,t,i;return null!=(i=null!=(t=this.getAttribute(aK.STREAM_TYPE))?t:null==(e=this.media)?void 0:e.streamType)?i:tY.UNKNOWN}set streamType(e){this.setAttribute(aK.STREAM_TYPE,`${e}`)}get defaultStreamType(){var e,t,i;return null!=(i=null!=(t=this.getAttribute(vT.DEFAULT_STREAM_TYPE))?t:null==(e=this.mediaController)?void 0:e.getAttribute(vT.DEFAULT_STREAM_TYPE))?i:tY.ON_DEMAND}set defaultStreamType(e){e?this.setAttribute(vT.DEFAULT_STREAM_TYPE,e):this.removeAttribute(vT.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var e,t;return this.hasAttribute(vT.TARGET_LIVE_WINDOW)?+this.getAttribute(vT.TARGET_LIVE_WINDOW):null!=(t=null==(e=this.media)?void 0:e.targetLiveWindow)?t:NaN}
3267set targetLiveWindow(e){e==this.targetLiveWindow||Number.isNaN(e)&&Number.isNaN(this.targetLiveWindow)||(null==e?this.removeAttribute(vT.TARGET_LIVE_WINDOW):this.setAttribute(vT.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e;return null==(e=this.media)?void 0:e.liveEdgeStart}get startTime(){return pG(v3(this,aK.START_TIME))}set startTime(e){this.setAttribute(aK.START_TIME,`${e}`)}get initialBandwidthEstimateKbps(){return pG(v3(this,aK.INITIAL_BANDWIDTH_ESTIMATE_KBPS))}set initialBandwidthEstimateKbps(e){null==e?this.removeAttribute(aK.INITIAL_BANDWIDTH_ESTIMATE_KBPS):this.setAttribute(aK.INITIAL_BANDWIDTH_ESTIMATE_KBPS,`${e}`)}get initialEstimateSegments(){return pG(v3(this,aK.INITIAL_ESTIMATE_SEGMENTS))}set initialEstimateSegments(e){null==e?this.removeAttribute(aK.INITIAL_ESTIMATE_SEGMENTS):this.setAttribute(aK.INITIAL_ESTIMATE_SEGMENTS,`${e}`)}get minPreloadSegments(){return pG(v3(this,aK.MIN_PRELOAD_SEGMENTS))}set minPreloadSegments(e){null==e?this.removeAttribute(aK.MIN_PRELOAD_SEGMENTS):this.setAttribute(aK.MIN_PRELOAD_SEGMENTS,`${e}`)}get preferPlayback(){let e=this.getAttribute(aK.PREFER_PLAYBACK);if(e===tG.MSE||e===tG.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===tG.MSE||e===tG.NATIVE?this.setAttribute(aK.PREFER_PLAYBACK,e):this.removeAttribute(aK.PREFER_PLAYBACK))}get metadata(){var e;return null==(e=this.media)?void 0:e.metadata}set metadata(e){if(uw(this,vF,vV).call(this),!this.media)return void p9("underlying media element missing when trying to set metadata. metadata will not be set.");this.media.metadata={...vw(this),...e}}get _hlsConfig(){var e;return null==(e=this.media)?void 0:e._hlsConfig}set _hlsConfig(e){if(uw(this,vF,vV).call(this),!this.media)return void p9("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.");this.media._hlsConfig=e}async addCuePoints(e){var t;return(uw(this,vF,vV).call(this),this.media)?null==(t=this.media)?void 0:t.addCuePoints(e):void p9("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(uw(this,vF,vV).call(this),this.media)?null==(t=this.media)?void 0:t.addChapters(e):void p9("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(vT.PLAYBACK_TOKEN),t=this.getAttribute(vT.DRM_TOKEN),i=this.getAttribute(vT.THUMBNAIL_TOKEN),a=this.getAttribute(vT.STORYBOARD_TOKEN);return{...uT(this,vI),...null!=e?{playback:e}:{},...null!=t?{drm:t}:{},...null!=i?{thumbnail:i}:{},...null!=a?{storyboard:a}:{}}}set tokens(e){uk(this,vI,null!=e?e:{})}get playbackToken(){var e;return null!=(e=this.getAttribute(vT.PLAYBACK_TOKEN))?e:void 0}set playbackToken(e){this.setAttribute(vT.PLAYBACK_TOKEN,`${e}`)}get drmToken(){var e;return null!=(e=this.getAttribute(vT.DRM_TOKEN))?e:void 0}set drmToken(e){this.setAttribute(vT.DRM_TOKEN,`${e}`)}get thumbnailToken(){var e;return null!=(e=this.getAttribute(vT.THUMBNAIL_TOKEN))?e:void 0}set thumbnailToken(e){this.setAttribute(vT.THUMBNAIL_TOKEN,`${e}`)}get storyboardToken(){var e;return null!=(e=this.getAttribute(vT.STORYBOARD_TOKEN))?e:void 0}set storyboardToken(e){this.setAttribute(vT.STORYBOARD_TOKEN,`${e}`)}addTextTrack(e,t,i,a){var r;let n=null==(r=this.media)?void 0:r.nativeEl;if(n)return io(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(vT.CAST_RECEIVER))?e:void 0}set castReceiver(e){e!==this.castReceiver&&(e?this.setAttribute(vT.CAST_RECEIVER,e):this.removeAttribute(vT.CAST_RECEIVER))}get castCustomData(){var e;return null==(e=this.media)?void 0:e.castCustomData}set castCustomData(e){if(!this.media)return void p9("underlying media element missing when trying to set castCustomData. castCustomData will not be set.");this.media.castCustomData=e}get noTooltips(){return this.hasAttribute(vT.NO_TOOLTIPS)}set noTooltips(e){if(!e)return void this.removeAttribute(vT.NO_TOOLTIPS);this.setAttribute(vT.NO_TOOLTIPS,"")}get proudlyDisplayMuxBadge(){return this.hasAttribute(vT.PROUDLY_DISPLAY_MUX_BADGE)}set proudlyDisplayMuxBadge(e){e?this.setAttribute(vT.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(vT.PROUDLY_DISPLAY_MUX_BADGE)}get capRenditionToPlayerSize(){var e;return null==(e=this.media)?void 0:e.capRenditionToPlayerSize}set capRenditionToPlayerSize(e){if(!this.media)return void p9("underlying media element missing when trying to set capRenditionToPlayerSize");this.media.capRenditionToPlayerSize=e}get maxReconnectRetries(){var e;return null==(e=this.media)?void 0:e.maxReconnectRetries}set maxReconnectRetries(e){if(!this.media)return void p9("underlying media element missing when trying to set maxReconnectRetries");this.media.maxReconnectRetries=e}};function v3(e,t){return e.media?e.media.getAttribute(t):e.getAttribute(t)}vR=new WeakMap,vS=new WeakMap,vI=new WeakMap,vC=new WeakMap,vL=new WeakMap,vD=new WeakMap,vM=new WeakMap,vO=new WeakMap,vx=new WeakMap,vN=new WeakMap,vP=new WeakMap,vU=new WeakMap,vW=new WeakMap,vB=new WeakMap,vH=new WeakMap,vF=new WeakSet,vV=function(){var e,t,i,a;if(!uT(this,vS)){uk(this,vS,!0),uw(this,vF,vq).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof pK.HTMLElement))throw""}catch{p9("<media-theme> failed to upgrade!")}try{customElements.upgrade(this.media)}catch{p9("underlying media element failed to upgrade!")}
3267try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof sS))throw""}catch{p9("<media-controller> failed to upgrade!")}uw(this,vF,vY).call(this),uw(this,vF,vG).call(this),uw(this,vF,vj).call(this),uk(this,vC,null==(t=null==(e=this.mediaController)?void 0:e.hasAttribute(nF.USER_INACTIVE))||t),uw(this,vF,vz).call(this),null==(i=this.media)||i.addEventListener("streamtypechange",uT(this,vM)),null==(a=this.media)||a.addEventListener("loadstart",uT(this,vO)),this.media&&(this.media.metadata=vw(this))}},vK=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{}},v$=function(e){Object.assign(uT(this,vB),e),uw(this,vF,vq).call(this)},vq=function(e={}){var t,i,a,r,n,s,o,l,d,u,c,h,m,p,v,E,b,g,f,y,T,A,k,w,R,S,I,C,L,D,M,O,x,N,P,U,W,B,H,F,V,K,$,q,Y,G,j,z,Q,Z;let X,J;t={...uT(this,vB),...e},X={src:!this.playbackId&&this.src,playbackId:this.playbackId,hasSrc:!!this.playbackId||!!this.src||!!this.currentSrc,poster:this.poster,storyboard:(null==(i=this.media)?void 0:i.currentSrc)&&this.storyboard,storyboardSrc:this.getAttribute(vT.STORYBOARD_SRC),fullscreenElement:this.getAttribute(vT.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=pK.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(vT.NOHOTKEYS),hotKeys:this.getAttribute(vT.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,maxAutoResolution:this.maxAutoResolution,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,initialBandwidthEstimateKbps:this.initialBandwidthEstimateKbps,initialEstimateSegments:this.initialEstimateSegments,minPreloadSegments:this.minPreloadSegments,preferPlayback:this.preferPlayback,audio:this.audio,defaultStreamType:this.defaultStreamType,targetLiveWindow:this.getAttribute(aK.TARGET_LIVE_WINDOW),streamType:p1(this.getAttribute(aK.STREAM_TYPE)),primaryColor:this.getAttribute(vT.PRIMARY_COLOR),secondaryColor:this.getAttribute(vT.SECONDARY_COLOR),accentColor:this.getAttribute(vT.ACCENT_COLOR),forwardSeekOffset:this.forwardSeekOffset,backwardSeekOffset:this.backwardSeekOffset,defaultHiddenCaptions:this.defaultHiddenCaptions,defaultDuration:this.defaultDuration,defaultShowRemainingTime:this.defaultShowRemainingTime,hideDuration:(J=null==(n=this.mediaController)?void 0:n.querySelector("media-time-display"))&&"none"===getComputedStyle(J).getPropertyValue("--media-duration-display-display").trim(),playbackRates:this.getAttribute(vT.PLAYBACK_RATES),customDomain:null!=(a=this.getAttribute(aK.CUSTOM_DOMAIN))?a:void 0,title:this.getAttribute(vT.TITLE),videoTitle:null!=(r=this.getAttribute(vT.VIDEO_TITLE))?r:this.getAttribute(vT.TITLE),novolumepref:this.hasAttribute(vT.NO_VOLUME_PREF),nomutedpref:this.hasAttribute(vT.NO_MUTED_PREF),proudlyDisplayMuxBadge:this.hasAttribute(vT.PROUDLY_DISPLAY_MUX_BADGE),castReceiver:this.castReceiver,disablePseudoEnded:this.hasAttribute(vT.DISABLE_PSEUDO_ENDED),maxReconnectRetries:this.maxReconnectRetries,capRenditionToPlayerSize:this.capRenditionToPlayerSize,...t,extraSourceParams:this.extraSourceParams},s=vh` 3268 <style> 3269 ${(e=>{let{tokens:t}=e;return t.drm?":host(:not([cast-receiver])) { --_cast-button-drm-display: none; }":""})(X)} 3270 ${vr} 3271 </style> 3272 ${l=X,vh` 3273 <media-theme 3274 template="${l.themeTemplate||!1}" 3275 defaultstreamtype="${null!=(d=l.defaultStreamType)&&d}" 3276 hotkeys="${(e=>{let t=e.hotKeys?`${e.hotKeys}`:"";return"live"===p1(e.streamType)&&(t+=" noarrowleft noarrowright"),t})(l)||!1}" 3277 nohotkeys="${l.noHotKeys||!l.hasSrc||!1}" 3278 noautoseektolive="${!!(null!=(u=l.streamType)&&u.includes(tY.LIVE))&&0!==l.targetLiveWindow}" 3279 novolumepref="${l.novolumepref||!1}" 3280 nomutedpref="${l.nomutedpref||!1}" 3281 disabled="${!l.hasSrc||l.isDialogOpen}" 3282 audio="${null!=(c=l.audio)&&c}" 3283 style="${null!=(h=function(e){let t="";return Object.entries(e).forEach(([e,i])=>{null!=i&&(t+=`${pq(e)}: ${i}; `)}),t?t.trim():void 0}({"--media-primary-color":l.primaryColor,"--media-secondary-color":l.secondaryColor,"--media-accent-color":l.accentColor}))&&h}"
3284 defaultsubtitles="${!l.defaultHiddenCaptions}" 3285 forwardseekoffset="${null!=(m=l.forwardSeekOffset)&&m}" 3286 backwardseekoffset="${null!=(p=l.backwardSeekOffset)&&p}" 3287 playbackrates="${null!=(v=l.playbackRates)&&v}" 3288 defaultshowremainingtime="${null!=(E=l.defaultShowRemainingTime)&&E}" 3289 defaultduration="${null!=(b=l.defaultDuration)&&b}" 3290 hideduration="${null!=(g=l.hideDuration)&&g}" 3291 title="${null!=(f=l.title)&&f}" 3292 videotitle="${null!=(y=l.videoTitle)&&y}" 3293 proudlydisplaymuxbadge="${null!=(T=l.proudlyDisplayMuxBadge)&&T}" 3294 exportparts="${vm}" 3295 > 3296 <mux-video 3297 slot="media" 3298 inert="${null!=(A=l.noHotKeys)&&A}" 3299 target-live-window="${null!=(k=l.targetLiveWindow)&&k}" 3300 stream-type="${null!=(w=p1(l.streamType))&&w}" 3301 crossorigin="${null!=(R=l.crossOrigin)?R:""}" 3302 playsinline 3303 autoplay="${null!=(S=l.autoplay)&&S}" 3304 muted="${null!=(I=l.muted)&&I}" 3305 loop="${null!=(C=l.loop)&&C}" 3306 preload="${null!=(L=l.preload)&&L}" 3307 debug="${null!=(D=l.debug)&&D}" 3308 prefer-cmcd="${null!=(M=l.preferCmcd)&&M}" 3309 disable-tracking="${null!=(O=l.disableTracking)&&O}" 3310 disable-cookies="${null!=(x=l.disableCookies)&&x}" 3311 prefer-playback="${null!=(N=l.preferPlayback)&&N}" 3312 start-time="${null!=l.startTime&&l.startTime}" 3313 initial-bandwidth-estimate-kbps="${null!=l.initialBandwidthEstimateKbps&&l.initialBandwidthEstimateKbps}" 3314 initial-estimate-segments="${null!=l.initialEstimateSegments&&l.initialEstimateSegments}" 3315 min-preload-segments="${null!=l.minPreloadSegments&&l.minPreloadSegments}" 3316 beacon-collection-domain="${null!=(P=l.beaconCollectionDomain)&&P}" 3317 player-init-time="${null!=(U=l.playerInitTime)&&U}" 3318 player-software-name="${null!=(W=l.playerSoftwareName)&&W}" 3319 player-software-version="${null!=(B=l.playerSoftwareVersion)&&B}" 3320 env-key="${null!=(H=l.envKey)&&H}" 3321 custom-domain="${null!=(F=l.customDomain)&&F}" 3322 src="${l.src?l.src:!!l.playbackId&&ij(l)}" 3323 cast-src="${l.src?l.src:!!l.playbackId&&ij(l)}" 3324 cast-receiver="${null!=(V=l.castReceiver)&&V}" 3325 drm-token="${null!=($=null==(K=l.tokens)?void 0:K.drm)&&$}" 3326 playback-token="${null!=(Y=null==(q=l.tokens)?void 0:q.playback)&&Y}" 3327 exportparts="video" 3328 disable-pseudo-ended="${null!=(G=l.disablePseudoEnded)&&G}" 3329 max-reconnect-retries="${null!=(j=l.maxReconnectRetries)&&j}" 3330 max-auto-resolution="${null!=(z=l.maxAutoResolution)&&z}" 3331 cap-rendition-to-player-size="${null!=(Q=l.capRenditionToPlayerSize)&&Q}" 3332 > 3333 ${l.storyboard?vh`<track label="thumbnails" default kind="metadata" src="${l.storyboard}" />`:vh``} 3334 <slot></slot> 3335 </mux-video> 3336 <slot name="poster" slot="poster"> 3337 <media-poster-image 3338 part="poster" 3339 exportparts="poster, img" 3340 src="${!!l.poster&&l.poster}" 3341 placeholdersrc="${null!=(Z=l.placeholder)&&Z}" 3342 ></media-poster-image> 3343 </slot> 3344 </media-theme> 3345`} 3346`,o=this.shadowRoot,s.renderInto(o)},vY=function(){let e=e=>{var t,i;if(!(null!=e&&e.startsWith("theme-")))return;let a=e.replace(/^theme-/,"");if(vA.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)};uk(this,vD,new MutationObserver(t=>{for(let{attributeName:i}of t)e(i)})),uT(this,vD).observe(this,{attributes:!0}),this.getAttributeNames().forEach(e)},vG=function(){var e,t;this.addEventListener("error",uT(this,vH)),this.addEventListener("click",uT(this,vN)),null==(e=this.mediaTheme)||e.addEventListener("close",uT(this,vP)),null==(t=this.mediaTheme)||t.addEventListener("focusin",uT(this,vU)),this.media&&(this.media.errorTranslator=(e={})=>{var t,i,a;if(!((null==(t=this.media)?void 0:t.error)instanceof tK))return e;let r=vv(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}})},vj=function(){var e,t,i,a;null==(t=null==(e=this.media)?void 0:e.textTracks)||t.addEventListener("addtrack",uT(this,vx)),null==(a=null==(i=this.media)?void 0:i.textTracks)||a.addEventListener("removetrack",uT(this,vx))},vz=function(){var e,t;if(!/Firefox/i.test(navigator.userAgent))return;let i,a=new WeakMap,r=()=>this.streamType===tY.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,n=(e,t,i=!1)=>
3346{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(` 3347`).length,r=-3;this.streamType===tY.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(nF.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,uT(this,vC))};o(),null==(e=this.textTracks)||e.addEventListener("change",o),null==(t=this.textTracks)||t.addEventListener("addtrack",o);let l=()=>{var e,t;let a=null==(t=null==(e=this.mediaController)?void 0:e.hasAttribute(nF.USER_INACTIVE))||t;uT(this,vC)!==a&&(uk(this,vC,a),n(i,uT(this,vC)))};this.addEventListener("userinactivechange",l),uk(this,vW,()=>{var e,t;null==i||i.removeEventListener("cuechange",s),null==(e=this.textTracks)||e.removeEventListener("change",o),null==(t=this.textTracks)||t.removeEventListener("addtrack",o),this.removeEventListener("userinactivechange",l)})};var v4=e=>{throw TypeError(e)},v5=(e,t,i)=>t.has(e)||v4("Cannot "+i),v9=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("undefined"==typeof DocumentFragment){class e extends v9{}globalThis.DocumentFragment=e}var v8,v6=class extends v9{},v7=class{constructor(e,t={}){((e,t,i)=>t.has(e)?v4("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i))(this,v8),((e,t,i,a)=>(v5(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,v8,null==t?void 0:t.detail)}get detail(){let e,t;return v5(this,e=v8,"read from private field"),t?t.call(this):e.get(this)}initCustomEvent(){}};v8=new WeakMap;var Ee={document:{createElement:function(e,t){return new v6}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(v6)},CustomEvent:v7,EventTarget:v9,HTMLElement:v6,HTMLVideoElement:class extends v9{}},Et="undefined"==typeof window||void 0===globalThis.customElements,Ei=Et?Ee:globalThis;Et?Ee.document:globalThis.document,Ei.customElements.get("mux-player")||(Ei.customElements.define("mux-player",v2),Ei.MuxPlayerElement=v2);var Ea=parseInt(s.version)>=19,Er={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},En=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(!(!Ea&&"boolean"==typeof t&&!t)){let i,a;if(i=e,null!=(a=Er)&&i in a)return Er[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=Ea||"boolean"!=typeof a?a:"";return e[r]=n,e},{})};function Es(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}var Eo=Object.prototype.hasOwnProperty,El=(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(!Eo.call(t,i[a])||!Object.is(e[i[a]],t[i[a]]))return!1;return!0})(t,e[i]),Ed=(e,t,i)=>{e[i]=t},Eu=function(e,t,i){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ed,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:El;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])},Ec=(()=>{try{return"3.13.4"}catch(e){}return"UNKNOWN"})(),Eh=(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]),Em=s.forwardRef((e,t)=>
3347{let{children:i,...a}=e;return s.createElement("mux-player",{suppressHydrationWarning:!0,...En(a),ref:t},i)}),Ep=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=Es(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():Es(t[e],null)}}}}(...t),t)}(a,t),[n]=((e,t)=>{var i;let{onAbort:a,onCanPlay:r,onCanPlayThrough:n,onEmptied:s,onLoadStart:o,onLoadedData:l,onLoadedMetadata:d,onProgress:u,onDurationChange:c,onVolumeChange:h,onRateChange:m,onResize:p,onWaiting:v,onPlay:E,onPlaying:b,onTimeUpdate:g,onPause:f,onSeeking:y,onSeeked:T,onStalled:A,onSuspend:k,onEnded:w,onError:R,onCuePointChange:S,onChapterChange:I,metadata:C,tokens:L,paused:D,playbackId:M,playbackRates:O,currentTime:x,themeProps:N,extraSourceParams:P,castCustomData:U,_hlsConfig:W,...B}=t;return Eu("tokens",L,e),Eu("playbackId",M,e),Eu("playbackRates",O,e),Eu("metadata",C,e),Eu("disableCookies",null!=(i=t.disableCookies)&&i,e),Eu("extraSourceParams",P,e),Eu("_hlsConfig",W,e),Eu("themeProps",N,e),Eu("castCustomData",U,e),Eu("paused",D,e,(e,t)=>{null!=t&&(t?e.pause():e.play())},(e,t,i)=>(!e.hasAttribute("autoplay")||!!e.hasPlayed)&&El(e,t,i)),Eu("currentTime",x,e,(e,t)=>{null!=t&&(e.currentTime=t)}),Eh("abort",e,a),Eh("canplay",e,r),Eh("canplaythrough",e,n),Eh("emptied",e,s),Eh("loadstart",e,o),Eh("loadeddata",e,l),Eh("loadedmetadata",e,d),Eh("progress",e,u),Eh("durationchange",e,c),Eh("volumechange",e,h),Eh("ratechange",e,m),Eh("resize",e,p),Eh("waiting",e,v),Eh("play",e,E),Eh("playing",e,b),Eh("timeupdate",e,g),Eh("pause",e,f),Eh("seeking",e,y),Eh("seeked",e,T),Eh("stalled",e,A),Eh("suspend",e,k),Eh("ended",e,w),Eh("error",e,R),Eh("cuepointchange",e,S),Eh("chapterchange",e,I),[B]}
3347)(a,e),[o]=(0,s.useState)(null!=(i=e.playerInitTime)?i:iY());return s.createElement(Em,{ref:r,defaultHiddenCaptions:e.defaultHiddenCaptions,playerSoftwareName:"mux-player-react",playerSoftwareVersion:Ec,playerInitTime:o,...n})})},78471:(e,t,i)=>{i.d(t,{A:()=>a});let a=(0,i(62384).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},82205:(e,t,i)=>{i.d(t,{A:()=>a});let a=(0,i(62384).A)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},83196:(e,t,i)=>{i.d(t,{F:()=>s});var a=i(49642);let r=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=a.$,s=(e,t)=>i=>{var a;if((null==t?void 0:t.variants)==null)return n(e,null==i?void 0:i.class,null==i?void 0:i.className);let{variants:s,defaultVariants:o}=t,l=Object.keys(s).map(e=>{let t=null==i?void 0:i[e],a=null==o?void 0:o[e];if(null===t)return null;let n=r(t)||r(a);return s[e][n]}),d=i&&Object.entries(i).reduce((e,t)=>{let[i,a]=t;return void 0===a||(e[i]=a),e},{});return n(e,l,null==t||null==(a=t.compoundVariants)?void 0:a.reduce((e,t)=>{let{class:i,className:a,...r}=t;return Object.entries(r).every(e=>{let[t,i]=e;return Array.isArray(i)?i.includes({...o,...d}[t]):({...o,...d})[t]===i})?[...e,i,a]:e},[]),null==i?void 0:i.class,null==i?void 0:i.className)}},84178:(e,t,i)=>{var a=i(99910);i.o(a,"useParams")&&i.d(t,{useParams:function(){return a.useParams}}),i.o(a,"usePathname")&&i.d(t,{usePathname:function(){return a.usePathname}}),i.o(a,"useRouter")&&i.d(t,{useRouter:function(){return a.useRouter}}),i.o(a,"useSearchParams")&&i.d(t,{useSearchParams:function(){return a.useSearchParams}})}}]);
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.