@mux/mux-player 3.2.5-canary.5 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1226,7 +1226,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
1226
1226
  </style>
1227
1227
  <slot></slot>
1228
1228
  <div id="arrow"></div>
1229
- `;var js=class extends d.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!Cr(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;let i=this.placement;if(i==="left"||i==="right"){this.style.removeProperty("--media-tooltip-offset-x");return}let a=getComputedStyle(this),r=(e=He(this,"#"+this.bounds))!=null?e:z(this);if(!r)return;let{x:n,width:s}=r.getBoundingClientRect(),{x:l,width:u}=this.getBoundingClientRect(),c=l+u,_=n+s,g=a.getPropertyValue("--media-tooltip-offset-x"),v=g?parseFloat(g.replace("px","")):0,f=a.getPropertyValue("--media-tooltip-container-margin"),L=f?parseFloat(f.replace("px","")):0,A=l-n+v-L,T=c-_+v+L;if(A<0){this.style.setProperty("--media-tooltip-offset-x",`${A}px`);return}if(T>0){this.style.setProperty("--media-tooltip-offset-x",`${T}px`);return}this.style.removeProperty("--media-tooltip-offset-x")},this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Uc.content.cloneNode(!0))),this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){let e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[$i.PLACEMENT,$i.BOUNDS]}get placement(){return R(this,$i.PLACEMENT)}set placement(e){I(this,$i.PLACEMENT,e)}get bounds(){return R(this,$i.BOUNDS)}set bounds(e){I(this,$i.BOUNDS,e)}};d.customElements.get("media-tooltip")||d.customElements.define("media-tooltip",js);var nv=1,ov=t=>t.mediaMuted?0:t.mediaVolume,sv=t=>`${Math.round(t*100)}%`,el=class extends zt{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME,o.MEDIA_MUTED,o.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",()=>{let e=this.range.value,i=new d.CustomEvent(p.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",V.VOLUME())}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),(e===o.MEDIA_VOLUME||e===o.MEDIA_MUTED)&&(this.range.valueAsNumber=ov(this),this.range.setAttribute("aria-valuetext",sv(this.range.valueAsNumber)),this.updateBar())}get mediaVolume(){return M(this,o.MEDIA_VOLUME,nv)}set mediaVolume(e){D(this,o.MEDIA_VOLUME,e)}get mediaMuted(){return H(this,o.MEDIA_MUTED)}set mediaMuted(e){U(this,o.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return R(this,o.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){I(this,o.MEDIA_VOLUME_UNAVAILABLE,e)}};d.customElements.get("media-volume-range")||d.customElements.define("media-volume-range",el);var E=bh(require("@mux/mux-video")),y=require("@mux/playback-core");var qc=require("@mux/mux-video");var Kc=require("@mux/playback-core");var ti=require("@mux/playback-core");function Bc(t){let e="";return Object.entries(t).forEach(([i,a])=>{a!=null&&(e+=`${Pn(i)}: ${a}; `)}),e?e.trim():void 0}function Pn(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Un(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function ce(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function tl(t){let e=lv(t).toString();return e?"?"+e:""}function lv(t){let e={};for(let i in t)t[i]!=null&&(e[i]=t[i]);return new URLSearchParams(e)}var il=(t,e)=>!t||!e?!1:t.contains(e)?!0:il(t,e.getRootNode().host);var Hc="mux.com",dv=()=>{try{return"3.2.4"}catch{}return"UNKNOWN"},uv=dv(),Hn=()=>uv,$c=(t,{token:e,customDomain:i=Hc,thumbnailTime:a,programTime:r}={})=>{var l;let n=e==null?a:void 0,{aud:s}=(l=(0,ti.parseJwt)(e))!=null?l:{};if(!(e&&s!=="t"))return`https://image.${i}/${t}/thumbnail.webp${tl({token:e,time:n,program_time:r})}`},Wc=(t,{token:e,customDomain:i=Hc,programStartTime:a,programEndTime:r}={})=>{var s;let{aud:n}=(s=(0,ti.parseJwt)(e))!=null?s:{};if(!(e&&n!=="s"))return`https://image.${i}/${t}/storyboard.vtt${tl({token:e,format:"webp",program_start_time:a,program_end_time:r})}`},Ba=t=>{if(t){if([ti.StreamTypes.LIVE,ti.StreamTypes.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return ti.StreamTypes.LIVE}};var cv={crossorigin:"crossOrigin",playsinline:"playsInline"};function Fc(t){var e;return(e=cv[t])!=null?e:Un(t)}var jt,ei,me,Bn=class{constructor(e,i){pe(this,jt);pe(this,ei);pe(this,me,[]);Te(this,jt,e),Te(this,ei,i)}[Symbol.iterator](){return P(this,me).values()}get length(){return P(this,me).length}get value(){var e;return(e=P(this,me).join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(Te(this,me,[]),this.add(...(i=e==null?void 0:e.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return P(this,me)[e]}values(){return P(this,me).values()}keys(){return P(this,me).keys()}forEach(e){P(this,me).forEach(e)}add(...e){var i,a;e.forEach(r=>{this.contains(r)||P(this,me).push(r)}),!(this.value===""&&!((i=P(this,jt))!=null&&i.hasAttribute(`${P(this,ei)}`)))&&((a=P(this,jt))==null||a.setAttribute(`${P(this,ei)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>{P(this,me).splice(P(this,me).indexOf(a),1)}),(i=P(this,jt))==null||i.setAttribute(`${P(this,ei)}`,`${this.value}`)}contains(e){return P(this,me).includes(e)}toggle(e,i){return typeof i!="undefined"?i?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,i){this.remove(e),this.add(i)}};jt=new WeakMap,ei=new WeakMap,me=new WeakMap;var Vc=`[mux-player ${Hn()}]`;function Xe(...t){console.warn(Vc,...t)}function be(...t){console.error(Vc,...t)}function al(t){var i;let e=(i=t.message)!=null?i:"";t.context&&(e+=` ${t.context}`),t.file&&(e+=` ${(0,Kc.i18n)("Read more: ")}
1229
+ `;var js=class extends d.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!Cr(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;let i=this.placement;if(i==="left"||i==="right"){this.style.removeProperty("--media-tooltip-offset-x");return}let a=getComputedStyle(this),r=(e=He(this,"#"+this.bounds))!=null?e:z(this);if(!r)return;let{x:n,width:s}=r.getBoundingClientRect(),{x:l,width:u}=this.getBoundingClientRect(),c=l+u,_=n+s,g=a.getPropertyValue("--media-tooltip-offset-x"),v=g?parseFloat(g.replace("px","")):0,f=a.getPropertyValue("--media-tooltip-container-margin"),L=f?parseFloat(f.replace("px","")):0,A=l-n+v-L,T=c-_+v+L;if(A<0){this.style.setProperty("--media-tooltip-offset-x",`${A}px`);return}if(T>0){this.style.setProperty("--media-tooltip-offset-x",`${T}px`);return}this.style.removeProperty("--media-tooltip-offset-x")},this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Uc.content.cloneNode(!0))),this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){let e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[$i.PLACEMENT,$i.BOUNDS]}get placement(){return R(this,$i.PLACEMENT)}set placement(e){I(this,$i.PLACEMENT,e)}get bounds(){return R(this,$i.BOUNDS)}set bounds(e){I(this,$i.BOUNDS,e)}};d.customElements.get("media-tooltip")||d.customElements.define("media-tooltip",js);var nv=1,ov=t=>t.mediaMuted?0:t.mediaVolume,sv=t=>`${Math.round(t*100)}%`,el=class extends zt{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME,o.MEDIA_MUTED,o.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",()=>{let e=this.range.value,i=new d.CustomEvent(p.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",V.VOLUME())}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),(e===o.MEDIA_VOLUME||e===o.MEDIA_MUTED)&&(this.range.valueAsNumber=ov(this),this.range.setAttribute("aria-valuetext",sv(this.range.valueAsNumber)),this.updateBar())}get mediaVolume(){return M(this,o.MEDIA_VOLUME,nv)}set mediaVolume(e){D(this,o.MEDIA_VOLUME,e)}get mediaMuted(){return H(this,o.MEDIA_MUTED)}set mediaMuted(e){U(this,o.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return R(this,o.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){I(this,o.MEDIA_VOLUME_UNAVAILABLE,e)}};d.customElements.get("media-volume-range")||d.customElements.define("media-volume-range",el);var E=bh(require("@mux/mux-video")),y=require("@mux/playback-core");var qc=require("@mux/mux-video");var Kc=require("@mux/playback-core");var ti=require("@mux/playback-core");function Bc(t){let e="";return Object.entries(t).forEach(([i,a])=>{a!=null&&(e+=`${Pn(i)}: ${a}; `)}),e?e.trim():void 0}function Pn(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Un(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function ce(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function tl(t){let e=lv(t).toString();return e?"?"+e:""}function lv(t){let e={};for(let i in t)t[i]!=null&&(e[i]=t[i]);return new URLSearchParams(e)}var il=(t,e)=>!t||!e?!1:t.contains(e)?!0:il(t,e.getRootNode().host);var Hc="mux.com",dv=()=>{try{return"3.3.0"}catch{}return"UNKNOWN"},uv=dv(),Hn=()=>uv,$c=(t,{token:e,customDomain:i=Hc,thumbnailTime:a,programTime:r}={})=>{var l;let n=e==null?a:void 0,{aud:s}=(l=(0,ti.parseJwt)(e))!=null?l:{};if(!(e&&s!=="t"))return`https://image.${i}/${t}/thumbnail.webp${tl({token:e,time:n,program_time:r})}`},Wc=(t,{token:e,customDomain:i=Hc,programStartTime:a,programEndTime:r}={})=>{var s;let{aud:n}=(s=(0,ti.parseJwt)(e))!=null?s:{};if(!(e&&n!=="s"))return`https://image.${i}/${t}/storyboard.vtt${tl({token:e,format:"webp",program_start_time:a,program_end_time:r})}`},Ba=t=>{if(t){if([ti.StreamTypes.LIVE,ti.StreamTypes.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return ti.StreamTypes.LIVE}};var cv={crossorigin:"crossOrigin",playsinline:"playsInline"};function Fc(t){var e;return(e=cv[t])!=null?e:Un(t)}var jt,ei,me,Bn=class{constructor(e,i){pe(this,jt);pe(this,ei);pe(this,me,[]);Te(this,jt,e),Te(this,ei,i)}[Symbol.iterator](){return P(this,me).values()}get length(){return P(this,me).length}get value(){var e;return(e=P(this,me).join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(Te(this,me,[]),this.add(...(i=e==null?void 0:e.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return P(this,me)[e]}values(){return P(this,me).values()}keys(){return P(this,me).keys()}forEach(e){P(this,me).forEach(e)}add(...e){var i,a;e.forEach(r=>{this.contains(r)||P(this,me).push(r)}),!(this.value===""&&!((i=P(this,jt))!=null&&i.hasAttribute(`${P(this,ei)}`)))&&((a=P(this,jt))==null||a.setAttribute(`${P(this,ei)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>{P(this,me).splice(P(this,me).indexOf(a),1)}),(i=P(this,jt))==null||i.setAttribute(`${P(this,ei)}`,`${this.value}`)}contains(e){return P(this,me).includes(e)}toggle(e,i){return typeof i!="undefined"?i?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,i){this.remove(e),this.add(i)}};jt=new WeakMap,ei=new WeakMap,me=new WeakMap;var Vc=`[mux-player ${Hn()}]`;function Xe(...t){console.warn(Vc,...t)}function be(...t){console.error(Vc,...t)}function al(t){var i;let e=(i=t.message)!=null?i:"";t.context&&(e+=` ${t.context}`),t.file&&(e+=` ${(0,Kc.i18n)("Read more: ")}
1230
1230
  https://github.com/muxinc/elements/blob/main/errors/${t.file}`),Xe(e)}var de={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},ii={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},Gc=Object.freeze({length:0,start(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),mv=qc.VideoEvents.filter(t=>t!=="error"),hv=Object.values(de).filter(t=>![de.PLAYSINLINE].includes(t)),pv=Object.values(ii),rl=class extends ve.HTMLElement{static get observedAttributes(){return[...hv,...pv]}constructor(){super()}init(){mv.forEach(e=>{var i;(i=this.media)==null||i.addEventListener(e,a=>{this.dispatchEvent(new Event(a.type))})})}attributeChangedCallback(e,i,a){var r,n;switch(e){case ii.MUTED:{this.media&&(this.media.muted=a!=null,this.media.defaultMuted=a!=null);return}case ii.VOLUME:{let s=(r=ce(a))!=null?r:1;this.media&&(this.media.volume=s);return}case ii.PLAYBACKRATE:{let s=(n=ce(a))!=null?n:1;this.media&&(this.media.playbackRate=s,this.media.defaultPlaybackRate=s);return}}}play(){var e,i;return(i=(e=this.media)==null?void 0:e.play())!=null?i:Promise.reject()}pause(){var e;(e=this.media)==null||e.pause()}load(){var e;(e=this.media)==null||e.load()}requestCast(e){var i;return(i=this.media)==null?void 0:i.requestCast(e)}get media(){var e;return(e=this.shadowRoot)==null?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,i;return(i=(e=this.media)==null?void 0:e.paused)!=null?i:!0}get duration(){var e,i;return(i=(e=this.media)==null?void 0:e.duration)!=null?i:NaN}get ended(){var e,i;return(i=(e=this.media)==null?void 0:e.ended)!=null?i:!1}get buffered(){var e,i;return(i=(e=this.media)==null?void 0:e.buffered)!=null?i:Gc}get seekable(){var e,i;return(i=(e=this.media)==null?void 0:e.seekable)!=null?i:Gc}get readyState(){var e,i;return(i=(e=this.media)==null?void 0:e.readyState)!=null?i:0}get videoWidth(){var e,i;return(i=(e=this.media)==null?void 0:e.videoWidth)!=null?i:0}get videoHeight(){var e,i;return(i=(e=this.media)==null?void 0:e.videoHeight)!=null?i:0}get currentSrc(){var e,i;return(i=(e=this.media)==null?void 0:e.currentSrc)!=null?i:""}get currentTime(){var e,i;return(i=(e=this.media)==null?void 0:e.currentTime)!=null?i:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,i;return(i=(e=this.media)==null?void 0:e.volume)!=null?i:1}set volume(e){this.media&&(this.media.volume=Number(e))}get playbackRate(){var e,i;return(i=(e=this.media)==null?void 0:e.playbackRate)!=null?i:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get defaultPlaybackRate(){var e;return(e=ce(this.getAttribute(ii.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(ii.PLAYBACKRATE,`${e}`):this.removeAttribute(ii.PLAYBACKRATE)}get crossOrigin(){return Ha(this,de.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(de.CROSSORIGIN,`${e}`)}get autoplay(){return Ha(this,de.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(de.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(de.AUTOPLAY)}get loop(){return Ha(this,de.LOOP)!=null}set loop(e){e?this.setAttribute(de.LOOP,""):this.removeAttribute(de.LOOP)}get muted(){var e,i;return(i=(e=this.media)==null?void 0:e.muted)!=null?i:!1}set muted(e){this.media&&(this.media.muted=!!e)}get defaultMuted(){return Ha(this,de.MUTED)!=null}set defaultMuted(e){e?this.setAttribute(de.MUTED,""):this.removeAttribute(de.MUTED)}get playsInline(){return Ha(this,de.PLAYSINLINE)!=null}set playsInline(e){be("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(de.PRELOAD,e):this.removeAttribute(de.PRELOAD)}};function Ha(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var nl=rl;var Jc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},k=(t,e,i)=>(Jc(t,e,"read from private field"),i?i.call(t):e.get(t)),Je=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},pt=(t,e,i,a)=>(Jc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Wi,$n,ai,$a,Mt,Rt,wt,ri,Fi,Wn,Pe,Zc=1,zc=0,vv=1,fv={processCallback(t,e,i){if(i){for(let[a,r]of e)if(a in i){let n=i[a];typeof n=="boolean"&&r instanceof he&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=n:typeof n=="function"&&r instanceof he?r.element[r.attributeName]=n:r.value=n}}}},vt=class extends d.DocumentFragment{constructor(e,i,a=fv){var r;super(),Je(this,Wi,void 0),Je(this,$n,void 0),this.append(e.content.cloneNode(!0)),pt(this,Wi,jc(this)),pt(this,$n,a),(r=a.createCallback)==null||r.call(a,this,k(this,Wi),i),a.processCallback(this,k(this,Wi),i)}update(e){k(this,$n).processCallback(this,k(this,Wi),e)}};Wi=new WeakMap;$n=new WeakMap;var jc=(t,e=[])=>{let i,a;for(let r of t.attributes||[])if(r.value.includes("{{")){let n=new ol;for([i,a]of Xc(r.value))if(!i)n.append(a);else{let s=new he(t,r.name,r.namespaceURI);n.append(s),e.push([a,s])}r.value=n.toString()}for(let r of t.childNodes)if(r.nodeType===Zc&&!(r instanceof HTMLTemplateElement))jc(r,e);else{let n=r.data;if(r.nodeType===Zc||n.includes("{{")){let s=[];if(n)for([i,a]of Xc(n))if(!i)s.push(new Text(a));else{let l=new ft(t);s.push(l),e.push([a,l])}else if(r instanceof HTMLTemplateElement){let l=new Wa(t,r);s.push(l),e.push([l.expression,l])}r.replaceWith(...s.flatMap(l=>l.replacementNodes||[l]))}}return e},Qc={},Xc=t=>{let e="",i=0,a=Qc[t],r=0,n;if(a)return a;for(a=[];n=t[r];r++)n==="{"&&t[r+1]==="{"&&t[r-1]!=="\\"&&t[r+2]&&++i==1?(e&&a.push([zc,e]),e="",r++):n==="}"&&t[r+1]==="}"&&t[r-1]!=="\\"&&!--i?(a.push([vv,e.trim()]),e="",r++):e+=n||"";return e&&a.push([zc,(i>0?"{{":"")+e]),Qc[t]=a},Ev=11,Fn=class{get value(){return""}set value(e){}toString(){return this.value}},em=new WeakMap,ol=class{constructor(){Je(this,ai,[])}[Symbol.iterator](){return k(this,ai).values()}get length(){return k(this,ai).length}item(e){return k(this,ai)[e]}append(...e){for(let i of e)i instanceof he&&em.set(i,this),k(this,ai).push(i)}toString(){return k(this,ai).join("")}};ai=new WeakMap;var he=class extends Fn{constructor(e,i,a){super(),Je(this,ri),Je(this,$a,""),Je(this,Mt,void 0),Je(this,Rt,void 0),Je(this,wt,void 0),pt(this,Mt,e),pt(this,Rt,i),pt(this,wt,a)}get attributeName(){return k(this,Rt)}get attributeNamespace(){return k(this,wt)}get element(){return k(this,Mt)}get value(){return k(this,$a)}set value(e){k(this,$a)!==e&&(pt(this,$a,e),!k(this,ri,Fi)||k(this,ri,Fi).length===1?e==null?k(this,Mt).removeAttributeNS(k(this,wt),k(this,Rt)):k(this,Mt).setAttributeNS(k(this,wt),k(this,Rt),e):k(this,Mt).setAttributeNS(k(this,wt),k(this,Rt),k(this,ri,Fi).toString()))}get booleanValue(){return k(this,Mt).hasAttributeNS(k(this,wt),k(this,Rt))}set booleanValue(e){if(!k(this,ri,Fi)||k(this,ri,Fi).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};$a=new WeakMap;Mt=new WeakMap;Rt=new WeakMap;wt=new WeakMap;ri=new WeakSet;Fi=function(){return em.get(this)};var ft=class extends Fn{constructor(e,i){super(),Je(this,Wn,void 0),Je(this,Pe,void 0),pt(this,Wn,e),pt(this,Pe,i?[...i]:[new Text])}get replacementNodes(){return k(this,Pe)}get parentNode(){return k(this,Wn)}get nextSibling(){return k(this,Pe)[k(this,Pe).length-1].nextSibling}get previousSibling(){return k(this,Pe)[0].previousSibling}get value(){return k(this,Pe).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){let i=e.flat().flatMap(a=>a==null?[new Text]:a.forEach?[...a]:a.nodeType===Ev?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);i.length||i.push(new Text),pt(this,Pe,bv(k(this,Pe)[0].parentNode,k(this,Pe),i,this.nextSibling))}};Wn=new WeakMap;Pe=new WeakMap;var Wa=class extends ft{constructor(e,i){let a=i.getAttribute("directive")||i.getAttribute("type"),r=i.getAttribute("expression")||i.getAttribute(a)||"";r.startsWith("{{")&&(r=r.trim().slice(2,-2).trim()),super(e),this.expression=r,this.template=i,this.directive=a}};function bv(t,e,i,a=null){let r=0,n,s,l,u=i.length,c=e.length;for(;r<u&&r<c&&e[r]==i[r];)r++;for(;r<u&&r<c&&i[u-1]==e[c-1];)a=i[--c,--u];if(r==c)for(;r<u;)t.insertBefore(i[r++],a);if(r==u)for(;r<c;)t.removeChild(e[r++]);else{for(n=e[r];r<u;)l=i[r++],s=n?n.nextSibling:a,n==l?n=s:r<u&&i[r]==s?(t.replaceChild(l,n),n=s):t.insertBefore(l,n);for(;n!=a;)s=n.nextSibling,t.removeChild(n),n=s}return i}var tm={string:t=>String(t)},Vn=class{constructor(e){this.template=e,this.state=void 0}},ni=new WeakMap,oi=new WeakMap,sl={partial:(t,e)=>{e[t.expression]=new Vn(t.template)},if:(t,e)=>{var i;if(am(t.expression,e))if(ni.get(t)!==t.template){ni.set(t,t.template);let a=new vt(t.template,e,Yn);t.replace(a),oi.set(t,a)}else(i=oi.get(t))==null||i.update(e);else t.replace(""),ni.delete(t),oi.delete(t)}},gv=Object.keys(sl),Yn={processCallback(t,e,i){var a,r;if(i)for(let[n,s]of e){if(s instanceof Wa){if(!s.directive){let u=gv.find(c=>s.template.hasAttribute(c));u&&(s.directive=u,s.expression=s.template.getAttribute(u))}(a=sl[s.directive])==null||a.call(sl,s,i);continue}let l=am(n,i);if(l instanceof Vn){ni.get(s)!==l.template?(ni.set(s,l.template),l=new vt(l.template,l.state,Yn),s.value=l,oi.set(s,l)):(r=oi.get(s))==null||r.update(l.state);continue}l?(s instanceof he&&s.attributeName.startsWith("aria-")&&(l=String(l)),s instanceof he?typeof l=="boolean"?s.booleanValue=l:typeof l=="function"?s.element[s.attributeName]=l:s.value=l:(s.value=l,ni.delete(s),oi.delete(s))):s instanceof he?s.value=void 0:(s.value=void 0,ni.delete(s),oi.delete(s))}}},im={"!":t=>!t,"!!":t=>!!t,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,">":(t,e)=>t>e,">=":(t,e)=>t>=e,"<":(t,e)=>t<e,"<=":(t,e)=>t<=e,"??":(t,e)=>t!=null?t:e,"|":(t,e)=>{var i;return(i=tm[e])==null?void 0:i.call(tm,t)}};function _v(t){return Av(t,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function am(t,e={}){var i,a,r,n,s,l,u;let c=_v(t);if(c.length===0||c.some(({type:_})=>!_))return Fa(t);if(((i=c[0])==null?void 0:i.token)===">"){let _=e[(a=c[1])==null?void 0:a.token];if(!_)return Fa(t);let g={...e};_.state=g;let v=c.slice(2);for(let f=0;f<v.length;f+=3){let L=(r=v[f])==null?void 0:r.token,A=(n=v[f+1])==null?void 0:n.token,T=(s=v[f+2])==null?void 0:s.token;L&&A==="="&&(g[L]=Ka(T,e))}return _}if(c.length===1)return Kn(c[0])?Ka(c[0].token,e):Fa(t);if(c.length===2){let _=(l=c[0])==null?void 0:l.token,g=im[_];if(!g||!Kn(c[1]))return Fa(t);let v=Ka(c[1].token,e);return g(v)}if(c.length===3){let _=(u=c[1])==null?void 0:u.token,g=im[_];if(!g||!Kn(c[0])||!Kn(c[2]))return Fa(t);let v=Ka(c[0].token,e);if(_==="|")return g(v,c[2].token);let f=Ka(c[2].token,e);return g(v,f)}}function Fa(t){return console.warn(`Warning: invalid expression \`${t}\``),!1}function Kn({type:t}){return["number","boolean","string","param"].includes(t)}function Ka(t,e){let i=t[0],a=t.slice(-1);return t==="true"||t==="false"?t==="true":i===a&&["'",'"'].includes(i)?t.slice(1,-1):gr(t)?parseFloat(t):e[t]}function Av(t,e){let i,a,r,n=[];for(;t;){r=null,i=t.length;for(let s in e)a=e[s].exec(t),a&&a.index<i&&(r={token:a[0],type:s,matches:a.slice(1)},i=a.index);i&&n.push({token:t.substr(0,i),type:void 0}),r&&n.push(r),t=t.substr(i+(r?r.token.length:0))}return n}var hl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ul=(t,e,i)=>(hl(t,e,"read from private field"),i?i.call(t):e.get(t)),Va=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},si=(t,e,i,a)=>(hl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),ll=(t,e,i)=>(hl(t,e,"access private method"),i),Ki,Gn,Vi,cl,rm,qn,ml,dl={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},nm=h.createElement("template");nm.innerHTML=`
1231
1231
  <style>
1232
1232
  :host {
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- var ze=t=>{throw TypeError(t)};var he=(t,a,e)=>a.has(t)||ze("Cannot "+e);var u=(t,a,e)=>(he(t,a,"read from private field"),e?e.call(t):a.get(t)),T=(t,a,e)=>a.has(t)?ze("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(t):a.set(t,e),k=(t,a,e,i)=>(he(t,a,"write to private field"),i?i.call(t,e):a.set(t,e),e),b=(t,a,e)=>(he(t,a,"access private method"),e);var $=class{addEventListener(){}removeEventListener(){}dispatchEvent(a){return!0}};if(typeof DocumentFragment=="undefined"){class t extends ${}globalThis.DocumentFragment=t}var G=class extends ${},ge=class extends ${},St={get(t){},define(t,a,e){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(G)}},j,fe=class{constructor(a,e={}){T(this,j);k(this,j,e==null?void 0:e.detail)}get detail(){return u(this,j)}initCustomEvent(){}};j=new WeakMap;function wt(t,a){return new G}var Xe={document:{createElement:wt},DocumentFragment,customElements:St,CustomEvent:fe,EventTarget:$,HTMLElement:G,HTMLVideoElement:ge},qe=typeof window=="undefined"||typeof globalThis.customElements=="undefined",E=qe?Xe:globalThis,Y=qe?Xe.document:globalThis.document;import{MediaController as ma,MediaErrorDialog as Rt}from"media-chrome";import{Attributes as Oe}from"media-chrome/dist/media-container.js";import{MediaUIAttributes as Tt}from"media-chrome/dist/constants.js";import"media-chrome/dist/experimental/index.js";import ca,{MediaError as Q,Attributes as s}from"@mux/mux-video";import{StreamTypes as M,PlaybackTypes as be,addTextTrack as pa,removeTextTrack as ba,CmcdTypeValues as Et,i18n as U,parseJwt as Me,MuxJWTAud as Le,generatePlayerInitTime as ha}from"@mux/playback-core";import{VideoEvents as Kt}from"@mux/mux-video";import{i18n as Ut}from"@mux/playback-core";import{StreamTypes as Te,parseJwt as Qe}from"@mux/playback-core";function Je(t){let a="";return Object.entries(t).forEach(([e,i])=>{i!=null&&(a+=`${ne(e)}: ${i}; `)}),a?a.trim():void 0}function ne(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function se(t){return t.replace(/[-_]([a-z])/g,(a,e)=>e.toUpperCase())}function y(t){if(t==null)return;let a=+t;return Number.isNaN(a)?void 0:a}function ye(t){let a=Pt(t).toString();return a?"?"+a:""}function Pt(t){let a={};for(let e in t)t[e]!=null&&(a[e]=t[e]);return new URLSearchParams(a)}var ve=(t,a)=>!t||!a?!1:t.contains(a)?!0:ve(t,a.getRootNode().host);var et="mux.com",It=()=>{try{return"3.2.4"}catch{}return"UNKNOWN"},Dt=It(),le=()=>Dt,tt=(t,{token:a,customDomain:e=et,thumbnailTime:i,programTime:r}={})=>{var l;let n=a==null?i:void 0,{aud:d}=(l=Qe(a))!=null?l:{};if(!(a&&d!=="t"))return`https://image.${e}/${t}/thumbnail.webp${ye({token:a,time:n,program_time:r})}`},at=(t,{token:a,customDomain:e=et,programStartTime:i,programEndTime:r}={})=>{var d;let{aud:n}=(d=Qe(a))!=null?d:{};if(!(a&&n!=="s"))return`https://image.${e}/${t}/storyboard.vtt${ye({token:a,format:"webp",program_start_time:i,program_end_time:r})}`},z=t=>{if(t){if([Te.LIVE,Te.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return Te.LIVE}};var Vt={crossorigin:"crossOrigin",playsinline:"playsInline"};function it(t){var a;return(a=Vt[t])!=null?a:se(t)}var P,I,v,de=class{constructor(a,e){T(this,P);T(this,I);T(this,v,[]);k(this,P,a),k(this,I,e)}[Symbol.iterator](){return u(this,v).values()}get length(){return u(this,v).length}get value(){var a;return(a=u(this,v).join(" "))!=null?a:""}set value(a){var e;a!==this.value&&(k(this,v,[]),this.add(...(e=a==null?void 0:a.split(" "))!=null?e:[]))}toString(){return this.value}item(a){return u(this,v)[a]}values(){return u(this,v).values()}keys(){return u(this,v).keys()}forEach(a){u(this,v).forEach(a)}add(...a){var e,i;a.forEach(r=>{this.contains(r)||u(this,v).push(r)}),!(this.value===""&&!((e=u(this,P))!=null&&e.hasAttribute(`${u(this,I)}`)))&&((i=u(this,P))==null||i.setAttribute(`${u(this,I)}`,`${this.value}`))}remove(...a){var e;a.forEach(i=>{u(this,v).splice(u(this,v).indexOf(i),1)}),(e=u(this,P))==null||e.setAttribute(`${u(this,I)}`,`${this.value}`)}contains(a){return u(this,v).includes(a)}toggle(a,e){return typeof e!="undefined"?e?(this.add(a),!0):(this.remove(a),!1):this.contains(a)?(this.remove(a),!1):(this.add(a),!0)}replace(a,e){this.remove(a),this.add(e)}};P=new WeakMap,I=new WeakMap,v=new WeakMap;var rt=`[mux-player ${le()}]`;function O(...t){console.warn(rt,...t)}function A(...t){console.error(rt,...t)}function Ee(t){var e;let a=(e=t.message)!=null?e:"";t.context&&(a+=` ${t.context}`),t.file&&(a+=` ${Ut("Read more: ")}
1
+ var ze=t=>{throw TypeError(t)};var he=(t,a,e)=>a.has(t)||ze("Cannot "+e);var u=(t,a,e)=>(he(t,a,"read from private field"),e?e.call(t):a.get(t)),T=(t,a,e)=>a.has(t)?ze("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(t):a.set(t,e),k=(t,a,e,i)=>(he(t,a,"write to private field"),i?i.call(t,e):a.set(t,e),e),b=(t,a,e)=>(he(t,a,"access private method"),e);var $=class{addEventListener(){}removeEventListener(){}dispatchEvent(a){return!0}};if(typeof DocumentFragment=="undefined"){class t extends ${}globalThis.DocumentFragment=t}var G=class extends ${},ge=class extends ${},St={get(t){},define(t,a,e){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(G)}},j,fe=class{constructor(a,e={}){T(this,j);k(this,j,e==null?void 0:e.detail)}get detail(){return u(this,j)}initCustomEvent(){}};j=new WeakMap;function wt(t,a){return new G}var Xe={document:{createElement:wt},DocumentFragment,customElements:St,CustomEvent:fe,EventTarget:$,HTMLElement:G,HTMLVideoElement:ge},qe=typeof window=="undefined"||typeof globalThis.customElements=="undefined",E=qe?Xe:globalThis,Y=qe?Xe.document:globalThis.document;import{MediaController as ma,MediaErrorDialog as Rt}from"media-chrome";import{Attributes as Oe}from"media-chrome/dist/media-container.js";import{MediaUIAttributes as Tt}from"media-chrome/dist/constants.js";import"media-chrome/dist/experimental/index.js";import ca,{MediaError as Q,Attributes as s}from"@mux/mux-video";import{StreamTypes as M,PlaybackTypes as be,addTextTrack as pa,removeTextTrack as ba,CmcdTypeValues as Et,i18n as U,parseJwt as Me,MuxJWTAud as Le,generatePlayerInitTime as ha}from"@mux/playback-core";import{VideoEvents as Kt}from"@mux/mux-video";import{i18n as Ut}from"@mux/playback-core";import{StreamTypes as Te,parseJwt as Qe}from"@mux/playback-core";function Je(t){let a="";return Object.entries(t).forEach(([e,i])=>{i!=null&&(a+=`${ne(e)}: ${i}; `)}),a?a.trim():void 0}function ne(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function se(t){return t.replace(/[-_]([a-z])/g,(a,e)=>e.toUpperCase())}function y(t){if(t==null)return;let a=+t;return Number.isNaN(a)?void 0:a}function ye(t){let a=Pt(t).toString();return a?"?"+a:""}function Pt(t){let a={};for(let e in t)t[e]!=null&&(a[e]=t[e]);return new URLSearchParams(a)}var ve=(t,a)=>!t||!a?!1:t.contains(a)?!0:ve(t,a.getRootNode().host);var et="mux.com",It=()=>{try{return"3.3.0"}catch{}return"UNKNOWN"},Dt=It(),le=()=>Dt,tt=(t,{token:a,customDomain:e=et,thumbnailTime:i,programTime:r}={})=>{var l;let n=a==null?i:void 0,{aud:d}=(l=Qe(a))!=null?l:{};if(!(a&&d!=="t"))return`https://image.${e}/${t}/thumbnail.webp${ye({token:a,time:n,program_time:r})}`},at=(t,{token:a,customDomain:e=et,programStartTime:i,programEndTime:r}={})=>{var d;let{aud:n}=(d=Qe(a))!=null?d:{};if(!(a&&n!=="s"))return`https://image.${e}/${t}/storyboard.vtt${ye({token:a,format:"webp",program_start_time:i,program_end_time:r})}`},z=t=>{if(t){if([Te.LIVE,Te.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return Te.LIVE}};var Vt={crossorigin:"crossOrigin",playsinline:"playsInline"};function it(t){var a;return(a=Vt[t])!=null?a:se(t)}var P,I,v,de=class{constructor(a,e){T(this,P);T(this,I);T(this,v,[]);k(this,P,a),k(this,I,e)}[Symbol.iterator](){return u(this,v).values()}get length(){return u(this,v).length}get value(){var a;return(a=u(this,v).join(" "))!=null?a:""}set value(a){var e;a!==this.value&&(k(this,v,[]),this.add(...(e=a==null?void 0:a.split(" "))!=null?e:[]))}toString(){return this.value}item(a){return u(this,v)[a]}values(){return u(this,v).values()}keys(){return u(this,v).keys()}forEach(a){u(this,v).forEach(a)}add(...a){var e,i;a.forEach(r=>{this.contains(r)||u(this,v).push(r)}),!(this.value===""&&!((e=u(this,P))!=null&&e.hasAttribute(`${u(this,I)}`)))&&((i=u(this,P))==null||i.setAttribute(`${u(this,I)}`,`${this.value}`))}remove(...a){var e;a.forEach(i=>{u(this,v).splice(u(this,v).indexOf(i),1)}),(e=u(this,P))==null||e.setAttribute(`${u(this,I)}`,`${this.value}`)}contains(a){return u(this,v).includes(a)}toggle(a,e){return typeof e!="undefined"?e?(this.add(a),!0):(this.remove(a),!1):this.contains(a)?(this.remove(a),!1):(this.add(a),!0)}replace(a,e){this.remove(a),this.add(e)}};P=new WeakMap,I=new WeakMap,v=new WeakMap;var rt=`[mux-player ${le()}]`;function O(...t){console.warn(rt,...t)}function A(...t){console.error(rt,...t)}function Ee(t){var e;let a=(e=t.message)!=null?e:"";t.context&&(a+=` ${t.context}`),t.file&&(a+=` ${Ut("Read more: ")}
2
2
  https://github.com/muxinc/elements/blob/main/errors/${t.file}`),O(a)}var f={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},D={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},nt=Object.freeze({length:0,start(t){let a=t>>>0;if(a>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${a}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(t){let a=t>>>0;if(a>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${a}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),Ht=Kt.filter(t=>t!=="error"),Bt=Object.values(f).filter(t=>![f.PLAYSINLINE].includes(t)),$t=Object.values(D),Ae=class extends E.HTMLElement{static get observedAttributes(){return[...Bt,...$t]}constructor(){super()}init(){Ht.forEach(a=>{var e;(e=this.media)==null||e.addEventListener(a,i=>{this.dispatchEvent(new Event(i.type))})})}attributeChangedCallback(a,e,i){var r,n;switch(a){case D.MUTED:{this.media&&(this.media.muted=i!=null,this.media.defaultMuted=i!=null);return}case D.VOLUME:{let d=(r=y(i))!=null?r:1;this.media&&(this.media.volume=d);return}case D.PLAYBACKRATE:{let d=(n=y(i))!=null?n:1;this.media&&(this.media.playbackRate=d,this.media.defaultPlaybackRate=d);return}}}play(){var a,e;return(e=(a=this.media)==null?void 0:a.play())!=null?e:Promise.reject()}pause(){var a;(a=this.media)==null||a.pause()}load(){var a;(a=this.media)==null||a.load()}requestCast(a){var e;return(e=this.media)==null?void 0:e.requestCast(a)}get media(){var a;return(a=this.shadowRoot)==null?void 0:a.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 a,e;return(e=(a=this.media)==null?void 0:a.paused)!=null?e:!0}get duration(){var a,e;return(e=(a=this.media)==null?void 0:a.duration)!=null?e:NaN}get ended(){var a,e;return(e=(a=this.media)==null?void 0:a.ended)!=null?e:!1}get buffered(){var a,e;return(e=(a=this.media)==null?void 0:a.buffered)!=null?e:nt}get seekable(){var a,e;return(e=(a=this.media)==null?void 0:a.seekable)!=null?e:nt}get readyState(){var a,e;return(e=(a=this.media)==null?void 0:a.readyState)!=null?e:0}get videoWidth(){var a,e;return(e=(a=this.media)==null?void 0:a.videoWidth)!=null?e:0}get videoHeight(){var a,e;return(e=(a=this.media)==null?void 0:a.videoHeight)!=null?e:0}get currentSrc(){var a,e;return(e=(a=this.media)==null?void 0:a.currentSrc)!=null?e:""}get currentTime(){var a,e;return(e=(a=this.media)==null?void 0:a.currentTime)!=null?e:0}set currentTime(a){this.media&&(this.media.currentTime=Number(a))}get volume(){var a,e;return(e=(a=this.media)==null?void 0:a.volume)!=null?e:1}set volume(a){this.media&&(this.media.volume=Number(a))}get playbackRate(){var a,e;return(e=(a=this.media)==null?void 0:a.playbackRate)!=null?e:1}set playbackRate(a){this.media&&(this.media.playbackRate=Number(a))}get defaultPlaybackRate(){var a;return(a=y(this.getAttribute(D.PLAYBACKRATE)))!=null?a:1}set defaultPlaybackRate(a){a!=null?this.setAttribute(D.PLAYBACKRATE,`${a}`):this.removeAttribute(D.PLAYBACKRATE)}get crossOrigin(){return X(this,f.CROSSORIGIN)}set crossOrigin(a){this.setAttribute(f.CROSSORIGIN,`${a}`)}get autoplay(){return X(this,f.AUTOPLAY)!=null}set autoplay(a){a?this.setAttribute(f.AUTOPLAY,typeof a=="string"?a:""):this.removeAttribute(f.AUTOPLAY)}get loop(){return X(this,f.LOOP)!=null}set loop(a){a?this.setAttribute(f.LOOP,""):this.removeAttribute(f.LOOP)}get muted(){var a,e;return(e=(a=this.media)==null?void 0:a.muted)!=null?e:!1}set muted(a){this.media&&(this.media.muted=!!a)}get defaultMuted(){return X(this,f.MUTED)!=null}set defaultMuted(a){a?this.setAttribute(f.MUTED,""):this.removeAttribute(f.MUTED)}get playsInline(){return X(this,f.PLAYSINLINE)!=null}set playsInline(a){A("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(a){["","none","metadata","auto"].includes(a)?this.setAttribute(f.PRELOAD,a):this.removeAttribute(f.PRELOAD)}};function X(t,a){return t.media?t.media.getAttribute(a):t.getAttribute(a)}var Ce=Ae;import"media-chrome/dist/media-theme-element.js";var st=`:host {
3
3
  --media-control-display: var(--controls);
4
4
  --media-loading-indicator-display: var(--loading-indicator);
@@ -1277,7 +1277,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1277
1277
  `:""}${i.error?`error: ${i.error}
1278
1278
  `:""}${i.event?`event: ${i.event}
1279
1279
  `:""}${i.err?`error message: ${(s=i.err)==null?void 0:s.message}
1280
- `:""}`),l.data=i,l};var Ew=Object.defineProperty,bw=Object.getPrototypeOf,yw=Reflect.get,cT=i=>{throw TypeError(i)},Tw=(i,e,t)=>e in i?Ew(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ke=(i,e,t)=>Tw(i,typeof e!="symbol"?e+"":e,t),Rp=(i,e,t)=>e.has(i)||cT("Cannot "+t),I=(i,e,t)=>(Rp(i,e,"read from private field"),t?t.call(i):e.get(i)),ie=(i,e,t)=>e.has(i)?cT("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Q=(i,e,t,r)=>(Rp(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),Ne=(i,e,t)=>(Rp(i,e,"access private method"),t),lp=(i,e,t)=>yw(bw(i),t,e),bu=class{addEventListener(){}removeEventListener(){}dispatchEvent(i){return!0}};if(typeof DocumentFragment=="undefined"){class i extends bu{}globalThis.DocumentFragment=i}var Ip=class extends bu{},_w=class extends bu{},Aw={get(i){},define(i,e,t){},getName(i){return null},upgrade(i){},whenDefined(i){return Promise.resolve(Ip)}},au,Sw=class{constructor(i,e={}){ie(this,au),Q(this,au,e==null?void 0:e.detail)}get detail(){return I(this,au)}initCustomEvent(){}};au=new WeakMap;function xw(i,e){return new Ip}var hT={document:{createElement:xw},DocumentFragment,customElements:Aw,CustomEvent:Sw,EventTarget:bu,HTMLElement:Ip,HTMLVideoElement:_w},fT=typeof window=="undefined"||typeof globalThis.customElements=="undefined",dp=fT?hT:globalThis,LN=fT?hT.document:globalThis.document,Rw=()=>{try{return"0.24.2"}catch{}return"UNKNOWN"},Iw=Rw(),Lw=()=>Iw,yu=["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"],mT=["autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"];function kw(i){return`
1280
+ `:""}`),l.data=i,l};var Ew=Object.defineProperty,bw=Object.getPrototypeOf,yw=Reflect.get,cT=i=>{throw TypeError(i)},Tw=(i,e,t)=>e in i?Ew(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ke=(i,e,t)=>Tw(i,typeof e!="symbol"?e+"":e,t),Rp=(i,e,t)=>e.has(i)||cT("Cannot "+t),I=(i,e,t)=>(Rp(i,e,"read from private field"),t?t.call(i):e.get(i)),ie=(i,e,t)=>e.has(i)?cT("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Q=(i,e,t,r)=>(Rp(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),Ne=(i,e,t)=>(Rp(i,e,"access private method"),t),lp=(i,e,t)=>yw(bw(i),t,e),bu=class{addEventListener(){}removeEventListener(){}dispatchEvent(i){return!0}};if(typeof DocumentFragment=="undefined"){class i extends bu{}globalThis.DocumentFragment=i}var Ip=class extends bu{},_w=class extends bu{},Aw={get(i){},define(i,e,t){},getName(i){return null},upgrade(i){},whenDefined(i){return Promise.resolve(Ip)}},au,Sw=class{constructor(i,e={}){ie(this,au),Q(this,au,e==null?void 0:e.detail)}get detail(){return I(this,au)}initCustomEvent(){}};au=new WeakMap;function xw(i,e){return new Ip}var hT={document:{createElement:xw},DocumentFragment,customElements:Aw,CustomEvent:Sw,EventTarget:bu,HTMLElement:Ip,HTMLVideoElement:_w},fT=typeof window=="undefined"||typeof globalThis.customElements=="undefined",dp=fT?hT:globalThis,LN=fT?hT.document:globalThis.document,Rw=()=>{try{return"0.24.3"}catch{}return"UNKNOWN"},Iw=Rw(),Lw=()=>Iw,yu=["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"],mT=["autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"];function kw(i){return`
1281
1281
  <style>
1282
1282
  :host {
1283
1283
  display: inline-flex;
@@ -1319,7 +1319,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1319
1319
  <video${gT(i)}></video>
1320
1320
  </slot>
1321
1321
  <slot></slot>
1322
- `}function pT(i,{tag:e,is:t}){var r,s,n,a,o,l,d,u,c,h,f,m,p,g,E,b,T;let _=(s=(r=globalThis.document)==null?void 0:r.createElement)==null?void 0:s.call(r,e,{is:t}),A=_?Cw(_):[];return n=class extends i{constructor(){super(...arguments),ie(this,f),ie(this,d,!1),ie(this,u,null),ie(this,c,new Map),ie(this,h),ke(this,"get"),ke(this,"set"),ke(this,"call")}static get observedAttributes(){var x,S,C;return Ne(x=n,o,l).call(x),[...(C=(S=_==null?void 0:_.constructor)==null?void 0:S.observedAttributes)!=null?C:[],...mT]}get nativeEl(){var x,S,C,M,k;return Ne(this,f,m).call(this),(k=(M=(S=(x=I(this,u))!=null?x:this.querySelector(":scope > [slot=media]"))!=null?S:this.querySelector(e))!=null?M:(C=this.shadowRoot)==null?void 0:C.querySelector(e))!=null?k:null}set nativeEl(x){Q(this,u,x)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(x){this.toggleAttribute("muted",x)}get src(){return this.getAttribute("src")}set src(x){this.setAttribute("src",`${x}`)}get preload(){var x,S;return(S=this.getAttribute("preload"))!=null?S:(x=this.nativeEl)==null?void 0:x.preload}set preload(x){this.setAttribute("preload",`${x}`)}init(){var x;if(!this.shadowRoot){this.attachShadow({mode:"open"});let S=Dw(this.attributes);t&&(S.is=t),e&&(S.part=e),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(S)}this.nativeEl.muted=this.hasAttribute("muted");for(let S of A)Ne(this,f,b).call(this,S);Q(this,h,new MutationObserver(Ne(this,f,g).bind(this))),this.shadowRoot.addEventListener("slotchange",this),Ne(this,f,p).call(this);for(let S of this.constructor.Events)(x=this.shadowRoot)==null||x.addEventListener(S,this,!0)}handleEvent(x){if(x.type==="slotchange"){Ne(this,f,p).call(this);return}x.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(x.type,{detail:x.detail}))}attributeChangedCallback(x,S,C){Ne(this,f,m).call(this),Ne(this,f,T).call(this,x,S,C)}connectedCallback(){Ne(this,f,m).call(this)}},a=new WeakMap,o=new WeakSet,l=function(){if(I(this,a))return;Q(this,a,!0);let x=new Set(this.observedAttributes);x.delete("muted");for(let S of A)if(!(S in this.prototype))if(typeof _[S]=="function")this.prototype[S]=function(...C){return Ne(this,f,m).call(this),(()=>{var M;if(this.call)return this.call(S,...C);let k=(M=this.nativeEl)==null?void 0:M[S];return k==null?void 0:k.apply(this.nativeEl,C)})()};else{let C={get(){var M,k,P;Ne(this,f,m).call(this);let U=S.toLowerCase();if(x.has(U)){let B=this.getAttribute(U);return B===null?!1:B===""?!0:B}return(P=(M=this.get)==null?void 0:M.call(this,S))!=null?P:(k=this.nativeEl)==null?void 0:k[S]}};S!==S.toUpperCase()&&(C.set=function(M){Ne(this,f,m).call(this);let k=S.toLowerCase();if(x.has(k)){M===!0||M===!1||M==null?this.toggleAttribute(k,!!M):this.setAttribute(k,M);return}if(this.set){this.set(S,M);return}this.nativeEl&&(this.nativeEl[S]=M)}),Object.defineProperty(this.prototype,S,C)}},d=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakMap,f=new WeakSet,m=function(){I(this,d)||(Q(this,d,!0),this.init())},p=function(){var x;let S=new Map(I(this,c)),C=(x=this.shadowRoot)==null?void 0:x.querySelector("slot:not([name])");(C==null?void 0:C.assignedElements({flatten:!0}).filter(M=>["track","source"].includes(M.localName))).forEach(M=>{var k,P;S.delete(M);let U=I(this,c).get(M);U||(U=M.cloneNode(),I(this,c).set(M,U),(k=I(this,h))==null||k.observe(M,{attributes:!0})),(P=this.nativeEl)==null||P.append(U),Ne(this,f,E).call(this,U)}),S.forEach((M,k)=>{M.remove(),I(this,c).delete(k)})},g=function(x){var S;for(let C of x)if(C.type==="attributes"){let{target:M,attributeName:k}=C,P=I(this,c).get(M);P&&k&&(P.setAttribute(k,(S=M.getAttribute(k))!=null?S:""),Ne(this,f,E).call(this,P))}},E=function(x){x&&x.localName==="track"&&x.default&&(x.kind==="chapters"||x.kind==="metadata")&&x.track.mode==="disabled"&&(x.track.mode="hidden")},b=function(x){if(Object.prototype.hasOwnProperty.call(this,x)){let S=this[x];delete this[x],this[x]=S}},T=function(x,S,C){var M,k,P;["id","class"].includes(x)||!n.observedAttributes.includes(x)&&this.constructor.observedAttributes.includes(x)||(C===null?(M=this.nativeEl)==null||M.removeAttribute(x):((k=this.nativeEl)==null?void 0:k.getAttribute(x))!==C&&((P=this.nativeEl)==null||P.setAttribute(x,C)))},ie(n,o),ke(n,"getTemplateHTML",e.endsWith("audio")?kw:ww),ke(n,"shadowRootOptions",{mode:"open"}),ke(n,"Events",yu),ie(n,a,!1),n}function Cw(i){let e=[];for(let t=Object.getPrototypeOf(i);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t)){let r=Object.getOwnPropertyNames(t);e.push(...r)}return e}function gT(i){let e="";for(let t in i){if(!mT.includes(t))continue;let r=i[t];r===""?e+=` ${t}`:e+=` ${t}="${r}"`}return e}function Dw(i){let e={};for(let t of i)e[t.name]=t.value;return e}var iT,up=pT((iT=globalThis.HTMLElement)!=null?iT:class{},{tag:"video"}),rT,wN=pT((rT=globalThis.HTMLElement)!=null?rT:class{},{tag:"audio"}),_s=new WeakMap,cp=class extends Error{},Mw=class extends Error{},Pw=globalThis.WeakRef?class extends Set{add(i){super.add(new WeakRef(i))}forEach(i){super.forEach(e=>{let t=e.deref();t&&i(t)})}}:Set;function Ow(i){var e,t,r;(t=(e=globalThis.chrome)==null?void 0:e.cast)!=null&&t.isAvailable?(r=globalThis.cast)!=null&&r.framework?i():customElements.whenDefined("google-cast-button").then(i):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(i)}}function Nw(){return globalThis.chrome}function Uw(){var i;let e="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if((i=globalThis.chrome)!=null&&i.cast||document.querySelector(`script[src="${e}"]`))return;let t=document.createElement("script");t.src=e,document.head.append(t)}function As(){var i,e;return(e=(i=globalThis.cast)==null?void 0:i.framework)==null?void 0:e.CastContext.getInstance()}function Lp(){var i;return(i=As())==null?void 0:i.getCurrentSession()}function kp(){var i;return(i=Lp())==null?void 0:i.getSessionObj().media[0]}function Fw(i){return new Promise((e,t)=>{kp().editTracksInfo(i,e,t)})}function Bw(i){return new Promise((e,t)=>{kp().getStatus(i,e,t)})}function vT(i){return As().setOptions({...ET(),...i})}function ET(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}var ou=new Pw,Rr=new WeakSet,ot;Ow(()=>{var i,e,t,r;if(!((e=(i=globalThis.chrome)==null?void 0:i.cast)!=null&&e.isAvailable)){console.debug("chrome.cast.isAvailable",(r=(t=globalThis.chrome)==null?void 0:t.cast)==null?void 0:r.isAvailable);return}ot||(ot=cast.framework,As().addEventListener(ot.CastContextEventType.CAST_STATE_CHANGED,s=>{ou.forEach(n=>{var a,o;return(o=(a=_s.get(n)).onCastStateChanged)==null?void 0:o.call(a,s)})}),As().addEventListener(ot.CastContextEventType.SESSION_STATE_CHANGED,s=>{ou.forEach(n=>{var a,o;return(o=(a=_s.get(n)).onSessionStateChanged)==null?void 0:o.call(a,s)})}),ou.forEach(s=>{var n,a;return(a=(n=_s.get(s)).init)==null?void 0:a.call(n)}))});var sT=0,Le,lu,Qt,xr,Mn,kn,Ts,fp,bt,ls,nT,mp,bT,pp,aT,hp,$w=class extends EventTarget{constructor(i){super(),ie(this,bt),ie(this,Le),ie(this,lu),ie(this,Qt),ie(this,xr),ie(this,Mn,"disconnected"),ie(this,kn,!1),ie(this,Ts,new Set),ie(this,fp,new WeakMap),Q(this,Le,i),ou.add(this),_s.set(this,{init:()=>Ne(this,bt,pp).call(this),onCastStateChanged:()=>Ne(this,bt,mp).call(this),onSessionStateChanged:()=>Ne(this,bt,bT).call(this),getCastPlayer:()=>I(this,bt,ls)}),Ne(this,bt,pp).call(this)}get state(){return I(this,Mn)}async watchAvailability(i){if(I(this,Le).disableRemotePlayback)throw new cp("disableRemotePlayback attribute is present.");return I(this,fp).set(i,++sT),I(this,Ts).add(i),sT}async cancelWatchAvailability(i){if(I(this,Le).disableRemotePlayback)throw new cp("disableRemotePlayback attribute is present.");i?I(this,Ts).delete(i):I(this,Ts).clear()}async prompt(){var i,e,t,r;if(I(this,Le).disableRemotePlayback)throw new cp("disableRemotePlayback attribute is present.");if(!((e=(i=globalThis.chrome)==null?void 0:i.cast)!=null&&e.isAvailable))throw new Mw("The RemotePlayback API is disabled on this platform.");let s=Rr.has(I(this,Le));Rr.add(I(this,Le)),vT(I(this,Le).castOptions),Object.entries(I(this,xr)).forEach(([n,a])=>{I(this,Qt).controller.addEventListener(n,a)});try{await As().requestSession()}catch(n){if(n==="cancel"){s||Rr.delete(I(this,Le));return}throw new Error(n)}(r=(t=_s.get(I(this,Le)))==null?void 0:t.loadOnPrompt)==null||r.call(t)}};Le=new WeakMap,lu=new WeakMap,Qt=new WeakMap,xr=new WeakMap,Mn=new WeakMap,kn=new WeakMap,Ts=new WeakMap,fp=new WeakMap,bt=new WeakSet,ls=function(){if(Rr.has(I(this,Le)))return I(this,Qt)},nT=function(){Rr.has(I(this,Le))&&(Object.entries(I(this,xr)).forEach(([i,e])=>{I(this,Qt).controller.removeEventListener(i,e)}),Rr.delete(I(this,Le)),I(this,Le).muted=I(this,Qt).isMuted,I(this,Le).currentTime=I(this,Qt).savedPlayerState.currentTime,I(this,Qt).savedPlayerState.isPaused===!1&&I(this,Le).play())},mp=function(){let i=As().getCastState();if(Rr.has(I(this,Le))&&i==="CONNECTING"&&(Q(this,Mn,"connecting"),this.dispatchEvent(new Event("connecting"))),!I(this,kn)&&i!=null&&i.includes("CONNECT")){Q(this,kn,!0);for(let e of I(this,Ts))e(!0)}else if(I(this,kn)&&(!i||i==="NO_DEVICES_AVAILABLE")){Q(this,kn,!1);for(let e of I(this,Ts))e(!1)}},bT=async function(){var i;let{SESSION_RESUMED:e}=ot.SessionState;if(As().getSessionState()===e&&I(this,Le).castSrc===((i=kp())==null?void 0:i.media.contentId)){Rr.add(I(this,Le)),Object.entries(I(this,xr)).forEach(([t,r])=>{I(this,Qt).controller.addEventListener(t,r)});try{await Bw(new chrome.cast.media.GetStatusRequest)}catch(t){console.error(t)}I(this,xr)[ot.RemotePlayerEventType.IS_PAUSED_CHANGED](),I(this,xr)[ot.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}},pp=function(){!ot||I(this,lu)||(Q(this,lu,!0),vT(I(this,Le).castOptions),I(this,Le).textTracks.addEventListener("change",()=>Ne(this,bt,hp).call(this)),Ne(this,bt,mp).call(this),Q(this,Qt,new ot.RemotePlayer),new ot.RemotePlayerController(I(this,Qt)),Q(this,xr,{[ot.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:i})=>{i===!0?(Q(this,Mn,"connected"),this.dispatchEvent(new Event("connect"))):(Ne(this,bt,nT).call(this),Q(this,Mn,"disconnected"),this.dispatchEvent(new Event("disconnect")))},[ot.RemotePlayerEventType.DURATION_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event("durationchange"))},[ot.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event("volumechange"))},[ot.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event("volumechange"))},[ot.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{var i;(i=I(this,bt,ls))!=null&&i.isMediaLoaded&&I(this,Le).dispatchEvent(new Event("timeupdate"))},[ot.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event("resize"))},[ot.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event(this.paused?"pause":"play"))},[ot.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{var i,e;((i=I(this,bt,ls))==null?void 0:i.playerState)!==chrome.cast.media.PlayerState.PAUSED&&I(this,Le).dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[(e=I(this,bt,ls))==null?void 0:e.playerState]))},[ot.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{var i;(i=I(this,bt,ls))!=null&&i.isMediaLoaded&&(await Promise.resolve(),Ne(this,bt,aT).call(this))}}))},aT=function(){Ne(this,bt,hp).call(this)},hp=async function(){var i,e,t,r,s;if(!I(this,bt,ls))return;let n=((e=(i=I(this,Qt).mediaInfo)==null?void 0:i.tracks)!=null?e:[]).filter(({type:h})=>h===chrome.cast.media.TrackType.TEXT),a=[...I(this,Le).textTracks].filter(({kind:h})=>h==="subtitles"||h==="captions"),o=n.map(({language:h,name:f,trackId:m})=>{var p;let{mode:g}=(p=a.find(E=>E.language===h&&E.label===f))!=null?p:{};return g?{mode:g,trackId:m}:!1}).filter(Boolean),l=o.filter(({mode:h})=>h!=="showing").map(({trackId:h})=>h),d=o.find(({mode:h})=>h==="showing"),u=(s=(r=(t=Lp())==null?void 0:t.getSessionObj().media[0])==null?void 0:r.activeTrackIds)!=null?s:[],c=u;if(u.length&&(c=c.filter(h=>!l.includes(h))),d!=null&&d.trackId&&(c=[...c,d.trackId]),c=[...new Set(c)],!((h,f)=>h.length===f.length&&h.every(m=>f.includes(m)))(u,c))try{let h=new chrome.cast.media.EditTracksInfoRequest(c);await Fw(h)}catch(h){console.error(h)}};var Hw=i=>{var e,t,r,s,n,a,o,l,d;return t=class extends i{constructor(){super(...arguments),ie(this,o),ie(this,r,{paused:!1}),ie(this,s,ET()),ie(this,n),ie(this,a)}get remote(){return I(this,a)?I(this,a):Nw()?(this.disableRemotePlayback||Uw(),_s.set(this,{loadOnPrompt:()=>Ne(this,o,d).call(this)}),Q(this,a,new $w(this))):super.remote}attributeChangedCallback(u,c,h){if(super.attributeChangedCallback(u,c,h),u==="cast-receiver"&&h){I(this,s).receiverApplicationId=h;return}if(I(this,o,l))switch(u){case"cast-stream-type":case"cast-src":this.load();break}}async load(){var u,c;if(!I(this,o,l))return super.load();let h=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType);h.customData=this.castCustomData;let f=[...this.querySelectorAll("track")].filter(({kind:E,src:b})=>b&&(E==="subtitles"||E==="captions")),m=[],p=0;f.length&&(h.tracks=f.map(E=>{let b=++p;m.length===0&&E.track.mode==="showing"&&m.push(b);let T=new chrome.cast.media.Track(b,chrome.cast.media.TrackType.TEXT);return T.trackContentId=E.src,T.trackContentType="text/vtt",T.subtype=E.kind==="captions"?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,T.name=E.label,T.language=E.srclang,T})),this.castStreamType==="live"?h.streamType=chrome.cast.media.StreamType.LIVE:h.streamType=chrome.cast.media.StreamType.BUFFERED,h.metadata=new chrome.cast.media.GenericMediaMetadata,h.metadata.title=this.title,h.metadata.images=[{url:this.poster}];let g=new chrome.cast.media.LoadRequest(h);g.currentTime=(u=super.currentTime)!=null?u:0,g.autoplay=!I(this,r).paused,g.activeTrackIds=m,await((c=Lp())==null?void 0:c.loadMedia(g)),this.dispatchEvent(new Event("volumechange"))}play(){var u;if(I(this,o,l)){I(this,o,l).isPaused&&((u=I(this,o,l).controller)==null||u.playOrPause());return}return super.play()}pause(){var u;if(I(this,o,l)){I(this,o,l).isPaused||(u=I(this,o,l).controller)==null||u.playOrPause();return}super.pause()}get castOptions(){return I(this,s)}get castReceiver(){var u;return(u=this.getAttribute("cast-receiver"))!=null?u:void 0}set castReceiver(u){this.castReceiver!=u&&this.setAttribute("cast-receiver",`${u}`)}get castSrc(){var u,c,h;return(h=(c=this.getAttribute("cast-src"))!=null?c:(u=this.querySelector("source"))==null?void 0:u.src)!=null?h:this.currentSrc}set castSrc(u){this.castSrc!=u&&this.setAttribute("cast-src",`${u}`)}get castContentType(){var u;return(u=this.getAttribute("cast-content-type"))!=null?u:void 0}set castContentType(u){this.setAttribute("cast-content-type",`${u}`)}get castStreamType(){var u,c;return(c=(u=this.getAttribute("cast-stream-type"))!=null?u:this.streamType)!=null?c:void 0}set castStreamType(u){this.setAttribute("cast-stream-type",`${u}`)}get castCustomData(){return I(this,n)}set castCustomData(u){let c=typeof u;if(!["object","undefined"].includes(c)){console.error(`castCustomData must be nullish or an object but value was of type ${c}`);return}Q(this,n,u)}get readyState(){if(I(this,o,l))switch(I(this,o,l).playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return I(this,o,l)?I(this,o,l).isPaused:super.paused}get muted(){var u;return I(this,o,l)?(u=I(this,o,l))==null?void 0:u.isMuted:super.muted}set muted(u){var c;if(I(this,o,l)){(u&&!I(this,o,l).isMuted||!u&&I(this,o,l).isMuted)&&((c=I(this,o,l).controller)==null||c.muteOrUnmute());return}super.muted=u}get volume(){var u,c;return I(this,o,l)?(c=(u=I(this,o,l))==null?void 0:u.volumeLevel)!=null?c:1:super.volume}set volume(u){var c;if(I(this,o,l)){I(this,o,l).volumeLevel=+u,(c=I(this,o,l).controller)==null||c.setVolumeLevel();return}super.volume=u}get duration(){var u,c,h;return I(this,o,l)&&(u=I(this,o,l))!=null&&u.isMediaLoaded?(h=(c=I(this,o,l))==null?void 0:c.duration)!=null?h:NaN:super.duration}get currentTime(){var u,c,h;return I(this,o,l)&&(u=I(this,o,l))!=null&&u.isMediaLoaded?(h=(c=I(this,o,l))==null?void 0:c.currentTime)!=null?h:0:super.currentTime}set currentTime(u){var c;if(I(this,o,l)){I(this,o,l).currentTime=u,(c=I(this,o,l).controller)==null||c.seek();return}super.currentTime=u}},r=new WeakMap,s=new WeakMap,n=new WeakMap,a=new WeakMap,o=new WeakSet,l=function(){var u,c;return(c=(u=_s.get(this.remote))==null?void 0:u.getCastPlayer)==null?void 0:c.call(u)},d=async function(){I(this,r).paused=lp(t.prototype,this,"paused"),lp(t.prototype,this,"pause").call(this),this.muted=lp(t.prototype,this,"muted");try{await this.load()}catch(u){console.error(u)}},ke(t,"observedAttributes",[...(e=i.observedAttributes)!=null?e:[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"]),t},Tu=class extends Event{constructor(i,e){super(i),ke(this,"track"),this.track=e.track}},gp=new WeakMap;function Y(i){var e;return(e=gp.get(i))!=null?e:Gw(i,{})}function Gw(i,e){let t=gp.get(i);return t||gp.set(i,t={}),Object.assign(t,e)}function vp(i,e){let t=i.videoTracks;Y(e).media=i,Y(e).renditionSet||(Y(e).renditionSet=new Set);let r=Y(t).trackSet;r.add(e);let s=r.size-1;s in bp.prototype||Object.defineProperty(bp.prototype,s,{get(){return[...Y(this).trackSet][s]}}),queueMicrotask(()=>{t.dispatchEvent(new Tu("addtrack",{track:e}))})}function Ep(i){var e;let t=(e=Y(i).media)==null?void 0:e.videoTracks;t&&(Y(t).trackSet.delete(i),queueMicrotask(()=>{t.dispatchEvent(new Tu("removetrack",{track:i}))}))}function Kw(i){var e;let t=(e=Y(i).media.videoTracks)!=null?e:[],r=!1;for(let s of t)s!==i&&(s.selected=!1,r=!0);if(r){if(Y(t).changeRequested)return;Y(t).changeRequested=!0,queueMicrotask(()=>{delete Y(t).changeRequested,t.dispatchEvent(new Event("change"))})}}var ds,us,cs,wn,Va,bp=class extends EventTarget{constructor(){super(),ie(this,wn),ie(this,ds),ie(this,us),ie(this,cs),Y(this).trackSet=new Set}[Symbol.iterator](){return I(this,wn,Va).values()}get length(){return I(this,wn,Va).size}getTrackById(i){var e;return(e=[...I(this,wn,Va)].find(t=>t.id===i))!=null?e:null}get selectedIndex(){return[...I(this,wn,Va)].findIndex(i=>i.selected)}get onaddtrack(){return I(this,ds)}set onaddtrack(i){I(this,ds)&&(this.removeEventListener("addtrack",I(this,ds)),Q(this,ds,void 0)),typeof i=="function"&&(Q(this,ds,i),this.addEventListener("addtrack",i))}get onremovetrack(){return I(this,us)}set onremovetrack(i){I(this,us)&&(this.removeEventListener("removetrack",I(this,us)),Q(this,us,void 0)),typeof i=="function"&&(Q(this,us,i),this.addEventListener("removetrack",i))}get onchange(){return I(this,cs)}set onchange(i){I(this,cs)&&(this.removeEventListener("change",I(this,cs)),Q(this,cs,void 0)),typeof i=="function"&&(Q(this,cs,i),this.addEventListener("change",i))}};ds=new WeakMap,us=new WeakMap,cs=new WeakMap,wn=new WeakSet,Va=function(){return Y(this).trackSet};var _u=class extends Event{constructor(i,e){super(i),ke(this,"rendition"),this.rendition=e.rendition}};function Vw(i,e){let t=Y(i).media.videoRenditions;Y(e).media=Y(i).media,Y(e).track=i;let r=Y(i).renditionSet;r.add(e);let s=r.size-1;s in yp.prototype||Object.defineProperty(yp.prototype,s,{get(){return Cn(this)[s]}}),queueMicrotask(()=>{i.selected&&t.dispatchEvent(new _u("addrendition",{rendition:e}))})}function Ww(i){let e=Y(i).media.videoRenditions,t=Y(i).track;Y(t).renditionSet.delete(i),queueMicrotask(()=>{Y(i).track.selected&&e.dispatchEvent(new _u("removerendition",{rendition:i}))})}function Yw(i){let e=Y(i).media.videoRenditions;!e||Y(e).changeRequested||(Y(e).changeRequested=!0,queueMicrotask(()=>{delete Y(e).changeRequested,Y(i).track.selected&&e.dispatchEvent(new Event("change"))}))}function Cn(i){return[...Y(i).media.videoTracks].filter(e=>e.selected).flatMap(e=>[...Y(e).renditionSet])}var hs,fs,ms,yp=class extends EventTarget{constructor(){super(...arguments),ie(this,hs),ie(this,fs),ie(this,ms)}[Symbol.iterator](){return Cn(this).values()}get length(){return Cn(this).length}getRenditionById(i){var e;return(e=Cn(this).find(t=>`${t.id}`==`${i}`))!=null?e:null}get selectedIndex(){return Cn(this).findIndex(i=>i.selected)}set selectedIndex(i){for(let[e,t]of Cn(this).entries())t.selected=e===i}get onaddrendition(){return I(this,hs)}set onaddrendition(i){I(this,hs)&&(this.removeEventListener("addrendition",I(this,hs)),Q(this,hs,void 0)),typeof i=="function"&&(Q(this,hs,i),this.addEventListener("addrendition",i))}get onremoverendition(){return I(this,fs)}set onremoverendition(i){I(this,fs)&&(this.removeEventListener("removerendition",I(this,fs)),Q(this,fs,void 0)),typeof i=="function"&&(Q(this,fs,i),this.addEventListener("removerendition",i))}get onchange(){return I(this,ms)}set onchange(i){I(this,ms)&&(this.removeEventListener("change",I(this,ms)),Q(this,ms,void 0)),typeof i=="function"&&(Q(this,ms,i),this.addEventListener("change",i))}};hs=new WeakMap,fs=new WeakMap,ms=new WeakMap;var Wa,qw=class{constructor(){ke(this,"src"),ke(this,"id"),ke(this,"width"),ke(this,"height"),ke(this,"bitrate"),ke(this,"frameRate"),ke(this,"codec"),ie(this,Wa,!1)}get selected(){return I(this,Wa)}set selected(i){I(this,Wa)!==i&&(Q(this,Wa,i),Yw(this))}};Wa=new WeakMap;var Ya,yT=class{constructor(){ke(this,"id"),ke(this,"kind"),ke(this,"label",""),ke(this,"language",""),ke(this,"sourceBuffer"),ie(this,Ya,!1)}addRendition(i,e,t,r,s,n){let a=new qw;return a.src=i,a.width=e,a.height=t,a.frameRate=n,a.bitrate=s,a.codec=r,Vw(this,a),a}removeRendition(i){Ww(i)}get selected(){return I(this,Ya)}set selected(i){I(this,Ya)!==i&&(Q(this,Ya,i),i===!0&&Kw(this))}};Ya=new WeakMap;function jw(i,e){let t=Y(i).media.audioRenditions;Y(e).media=Y(i).media,Y(e).track=i;let r=Y(i).renditionSet;r.add(e);let s=r.size-1;s in Tp.prototype||Object.defineProperty(Tp.prototype,s,{get(){return Dn(this)[s]}}),queueMicrotask(()=>{i.enabled&&t.dispatchEvent(new _u("addrendition",{rendition:e}))})}function zw(i){let e=Y(i).media.audioRenditions,t=Y(i).track;Y(t).renditionSet.delete(i),queueMicrotask(()=>{Y(i).track.enabled&&e.dispatchEvent(new _u("removerendition",{rendition:i}))})}function Xw(i){let e=Y(i).media.audioRenditions;!e||Y(e).changeRequested||(Y(e).changeRequested=!0,queueMicrotask(()=>{delete Y(e).changeRequested,Y(i).track.enabled&&e.dispatchEvent(new Event("change"))}))}function Dn(i){return[...Y(i).media.audioTracks].filter(e=>e.enabled).flatMap(e=>[...Y(e).renditionSet])}var ps,gs,vs,Tp=class extends EventTarget{constructor(){super(...arguments),ie(this,ps),ie(this,gs),ie(this,vs)}[Symbol.iterator](){return Dn(this).values()}get length(){return Dn(this).length}getRenditionById(i){var e;return(e=Dn(this).find(t=>`${t.id}`==`${i}`))!=null?e:null}get selectedIndex(){return Dn(this).findIndex(i=>i.selected)}set selectedIndex(i){for(let[e,t]of Dn(this).entries())t.selected=e===i}get onaddrendition(){return I(this,ps)}set onaddrendition(i){I(this,ps)&&(this.removeEventListener("addrendition",I(this,ps)),Q(this,ps,void 0)),typeof i=="function"&&(Q(this,ps,i),this.addEventListener("addrendition",i))}get onremoverendition(){return I(this,gs)}set onremoverendition(i){I(this,gs)&&(this.removeEventListener("removerendition",I(this,gs)),Q(this,gs,void 0)),typeof i=="function"&&(Q(this,gs,i),this.addEventListener("removerendition",i))}get onchange(){return I(this,vs)}set onchange(i){I(this,vs)&&(this.removeEventListener("change",I(this,vs)),Q(this,vs,void 0)),typeof i=="function"&&(Q(this,vs,i),this.addEventListener("change",i))}};ps=new WeakMap,gs=new WeakMap,vs=new WeakMap;var qa,Qw=class{constructor(){ke(this,"src"),ke(this,"id"),ke(this,"bitrate"),ke(this,"codec"),ie(this,qa,!1)}get selected(){return I(this,qa)}set selected(i){I(this,qa)!==i&&(Q(this,qa,i),Xw(this))}};qa=new WeakMap;function _p(i,e){let t=i.audioTracks;Y(e).media=i,Y(e).renditionSet||(Y(e).renditionSet=new Set);let r=Y(t).trackSet;r.add(e);let s=r.size-1;s in Sp.prototype||Object.defineProperty(Sp.prototype,s,{get(){return[...Y(this).trackSet][s]}}),queueMicrotask(()=>{t.dispatchEvent(new Tu("addtrack",{track:e}))})}function Ap(i){var e;let t=(e=Y(i).media)==null?void 0:e.audioTracks;t&&(Y(t).trackSet.delete(i),queueMicrotask(()=>{t.dispatchEvent(new Tu("removetrack",{track:i}))}))}function Zw(i){let e=Y(i).media.audioTracks;!e||Y(e).changeRequested||(Y(e).changeRequested=!0,queueMicrotask(()=>{delete Y(e).changeRequested,e.dispatchEvent(new Event("change"))}))}var Es,bs,ys,ja,du,Sp=class extends EventTarget{constructor(){super(),ie(this,ja),ie(this,Es),ie(this,bs),ie(this,ys),Y(this).trackSet=new Set}[Symbol.iterator](){return I(this,ja,du).values()}get length(){return I(this,ja,du).size}getTrackById(i){var e;return(e=[...I(this,ja,du)].find(t=>t.id===i))!=null?e:null}get onaddtrack(){return I(this,Es)}set onaddtrack(i){I(this,Es)&&(this.removeEventListener("addtrack",I(this,Es)),Q(this,Es,void 0)),typeof i=="function"&&(Q(this,Es,i),this.addEventListener("addtrack",i))}get onremovetrack(){return I(this,bs)}set onremovetrack(i){I(this,bs)&&(this.removeEventListener("removetrack",I(this,bs)),Q(this,bs,void 0)),typeof i=="function"&&(Q(this,bs,i),this.addEventListener("removetrack",i))}get onchange(){return I(this,ys)}set onchange(i){I(this,ys)&&(this.removeEventListener("change",I(this,ys)),Q(this,ys,void 0)),typeof i=="function"&&(Q(this,ys,i),this.addEventListener("change",i))}};Es=new WeakMap,bs=new WeakMap,ys=new WeakMap,ja=new WeakSet,du=function(){return Y(this).trackSet};var za,TT=class{constructor(){ke(this,"id"),ke(this,"kind"),ke(this,"label",""),ke(this,"language",""),ke(this,"sourceBuffer"),ie(this,za,!1)}addRendition(i,e,t){let r=new Qw;return r.src=i,r.codec=e,r.bitrate=t,jw(this,r),r}removeRendition(i){zw(i)}get enabled(){return I(this,za)}set enabled(i){I(this,za)!==i&&(Q(this,za,i),Zw(this))}};za=new WeakMap;var oT=Eu(globalThis.HTMLMediaElement,"video"),lT=Eu(globalThis.HTMLMediaElement,"audio");function Jw(i){if(!(i!=null&&i.prototype))return i;let e=Eu(i,"video");(!e||`${e}`.includes("[native code]"))&&Object.defineProperty(i.prototype,"videoTracks",{get(){return eC(this)}});let t=Eu(i,"audio");(!t||`${t}`.includes("[native code]"))&&Object.defineProperty(i.prototype,"audioTracks",{get(){return tC(this)}}),"addVideoTrack"in i.prototype||(i.prototype.addVideoTrack=function(n,a="",o=""){let l=new yT;return l.kind=n,l.label=a,l.language=o,vp(this,l),l}),"removeVideoTrack"in i.prototype||(i.prototype.removeVideoTrack=Ep),"addAudioTrack"in i.prototype||(i.prototype.addAudioTrack=function(n,a="",o=""){let l=new TT;return l.kind=n,l.label=a,l.language=o,_p(this,l),l}),"removeAudioTrack"in i.prototype||(i.prototype.removeAudioTrack=Ap),"videoRenditions"in i.prototype||Object.defineProperty(i.prototype,"videoRenditions",{get(){return r(this)}});let r=n=>{let a=Y(n).videoRenditions;return a||(a=new yp,Y(a).media=n,Y(n).videoRenditions=a),a};"audioRenditions"in i.prototype||Object.defineProperty(i.prototype,"audioRenditions",{get(){return s(this)}});let s=n=>{let a=Y(n).audioRenditions;return a||(a=new Tp,Y(a).media=n,Y(n).audioRenditions=a),a};return i}function Eu(i,e){var t;if(i!=null&&i.prototype)return(t=Object.getOwnPropertyDescriptor(i.prototype,`${e}Tracks`))==null?void 0:t.get}function eC(i){var e;let t=Y(i).videoTracks;if(!t&&(t=new bp,Y(i).videoTracks=t,oT)){let r=oT.call((e=i.nativeEl)!=null?e:i);for(let s of r)vp(i,s);r.addEventListener("change",()=>{t.dispatchEvent(new Event("change"))}),r.addEventListener("addtrack",s=>{if([...t].some(n=>n instanceof yT)){for(let n of r)Ep(n);return}vp(i,s.track)}),r.addEventListener("removetrack",s=>{Ep(s.track)})}return t}function tC(i){var e;let t=Y(i).audioTracks;if(!t&&(t=new Sp,Y(i).audioTracks=t,lT)){let r=lT.call((e=i.nativeEl)!=null?e:i);for(let s of r)_p(i,s);r.addEventListener("change",()=>{t.dispatchEvent(new Event("change"))}),r.addEventListener("addtrack",s=>{if([...t].some(n=>n instanceof TT)){for(let n of r)Ap(n);return}_p(i,s.track)}),r.addEventListener("removetrack",s=>{Ap(s.track)})}return t}yu.push("castchange","entercast","leavecast");var w={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type"},iC=Object.values(w),dT=Lw(),uT="mux-video",Ni,Xa,uu,Qa,cu,hu,fu,mu,pu,Za,gu,rC=class extends up{constructor(){super(),ie(this,Za),ie(this,Ni),ie(this,Xa),ie(this,uu),ie(this,Qa,{}),ie(this,cu,{}),ie(this,hu),ie(this,fu),ie(this,mu),ie(this,pu),Q(this,uu,ru())}static get NAME(){return uT}static get VERSION(){return dT}static get observedAttributes(){var i;return[...iC,...(i=up.observedAttributes)!=null?i:[]]}get preferCmcd(){var i;return(i=this.getAttribute(w.PREFER_CMCD))!=null?i:void 0}set preferCmcd(i){i!==this.preferCmcd&&(i?Ln.includes(i)?this.setAttribute(w.PREFER_CMCD,i):console.warn(`Invalid value for preferCmcd. Must be one of ${Ln.join()}`):this.removeAttribute(w.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(w.PLAYER_INIT_TIME)?+this.getAttribute(w.PLAYER_INIT_TIME):I(this,uu)}set playerInitTime(i){i!=this.playerInitTime&&(i==null?this.removeAttribute(w.PLAYER_INIT_TIME):this.setAttribute(w.PLAYER_INIT_TIME,`${+i}`))}get playerSoftwareName(){var i;return(i=I(this,mu))!=null?i:uT}set playerSoftwareName(i){Q(this,mu,i)}get playerSoftwareVersion(){var i;return(i=I(this,fu))!=null?i:dT}set playerSoftwareVersion(i){Q(this,fu,i)}get _hls(){var i;return(i=I(this,Ni))==null?void 0:i.engine}get mux(){var i;return(i=this.nativeEl)==null?void 0:i.mux}get error(){var i;return(i=sp(this.nativeEl))!=null?i:null}get errorTranslator(){return I(this,pu)}set errorTranslator(i){Q(this,pu,i)}get src(){return this.getAttribute("src")}set src(i){i!==this.src&&(i==null?this.removeAttribute("src"):this.setAttribute("src",i))}get type(){var i;return(i=this.getAttribute(w.TYPE))!=null?i:void 0}set type(i){i!==this.type&&(i?this.setAttribute(w.TYPE,i):this.removeAttribute(w.TYPE))}get autoplay(){let i=this.getAttribute("autoplay");return i===null?!1:i===""?!0:i}set autoplay(i){let e=this.autoplay;i!==e&&(i?this.setAttribute("autoplay",typeof i=="string"?i:""):this.removeAttribute("autoplay"))}get preload(){let i=this.getAttribute("preload");return i===""?"auto":["none","metadata","auto"].includes(i)?i:super.preload}set preload(i){i!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(i)?this.setAttribute("preload",i):this.removeAttribute("preload"))}get debug(){return this.getAttribute(w.DEBUG)!=null}set debug(i){i!==this.debug&&(i?this.setAttribute(w.DEBUG,""):this.removeAttribute(w.DEBUG))}get disableTracking(){return this.hasAttribute(w.DISABLE_TRACKING)}set disableTracking(i){i!==this.disableTracking&&this.toggleAttribute(w.DISABLE_TRACKING,!!i)}get disableCookies(){return this.hasAttribute(w.DISABLE_COOKIES)}set disableCookies(i){i!==this.disableCookies&&(i?this.setAttribute(w.DISABLE_COOKIES,""):this.removeAttribute(w.DISABLE_COOKIES))}get startTime(){let i=this.getAttribute(w.START_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set startTime(i){i!==this.startTime&&(i==null?this.removeAttribute(w.START_TIME):this.setAttribute(w.START_TIME,`${i}`))}get playbackId(){var i;return this.hasAttribute(w.PLAYBACK_ID)?this.getAttribute(w.PLAYBACK_ID):(i=rp(this.src))!=null?i:void 0}set playbackId(i){i!==this.playbackId&&(i?this.setAttribute(w.PLAYBACK_ID,i):this.removeAttribute(w.PLAYBACK_ID))}get maxResolution(){var i;return(i=this.getAttribute(w.MAX_RESOLUTION))!=null?i:void 0}set maxResolution(i){i!==this.maxResolution&&(i?this.setAttribute(w.MAX_RESOLUTION,i):this.removeAttribute(w.MAX_RESOLUTION))}get minResolution(){var i;return(i=this.getAttribute(w.MIN_RESOLUTION))!=null?i:void 0}set minResolution(i){i!==this.minResolution&&(i?this.setAttribute(w.MIN_RESOLUTION,i):this.removeAttribute(w.MIN_RESOLUTION))}get renditionOrder(){var i;return(i=this.getAttribute(w.RENDITION_ORDER))!=null?i:void 0}set renditionOrder(i){i!==this.renditionOrder&&(i?this.setAttribute(w.RENDITION_ORDER,i):this.removeAttribute(w.RENDITION_ORDER))}get programStartTime(){let i=this.getAttribute(w.PROGRAM_START_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set programStartTime(i){i==null?this.removeAttribute(w.PROGRAM_START_TIME):this.setAttribute(w.PROGRAM_START_TIME,`${i}`)}get programEndTime(){let i=this.getAttribute(w.PROGRAM_END_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set programEndTime(i){i==null?this.removeAttribute(w.PROGRAM_END_TIME):this.setAttribute(w.PROGRAM_END_TIME,`${i}`)}get assetStartTime(){let i=this.getAttribute(w.ASSET_START_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set assetStartTime(i){i==null?this.removeAttribute(w.ASSET_START_TIME):this.setAttribute(w.ASSET_START_TIME,`${i}`)}get assetEndTime(){let i=this.getAttribute(w.ASSET_END_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set assetEndTime(i){i==null?this.removeAttribute(w.ASSET_END_TIME):this.setAttribute(w.ASSET_END_TIME,`${i}`)}get customDomain(){var i;return(i=this.getAttribute(w.CUSTOM_DOMAIN))!=null?i:void 0}set customDomain(i){i!==this.customDomain&&(i?this.setAttribute(w.CUSTOM_DOMAIN,i):this.removeAttribute(w.CUSTOM_DOMAIN))}get drmToken(){var i;return(i=this.getAttribute(w.DRM_TOKEN))!=null?i:void 0}set drmToken(i){i!==this.drmToken&&(i?this.setAttribute(w.DRM_TOKEN,i):this.removeAttribute(w.DRM_TOKEN))}get playbackToken(){var i,e,t,r;if(this.hasAttribute(w.PLAYBACK_TOKEN))return(i=this.getAttribute(w.PLAYBACK_TOKEN))!=null?i:void 0;if(this.hasAttribute(w.PLAYBACK_ID)){let[,s]=eu((e=this.playbackId)!=null?e:"");return(t=new URLSearchParams(s).get("token"))!=null?t:void 0}if(this.src)return(r=new URLSearchParams(this.src).get("token"))!=null?r:void 0}set playbackToken(i){i!==this.playbackToken&&(i?this.setAttribute(w.PLAYBACK_TOKEN,i):this.removeAttribute(w.PLAYBACK_TOKEN))}get tokens(){let i=this.getAttribute(w.PLAYBACK_TOKEN),e=this.getAttribute(w.DRM_TOKEN);return{...I(this,cu),...i!=null?{playback:i}:{},...e!=null?{drm:e}:{}}}set tokens(i){Q(this,cu,i!=null?i:{})}get ended(){return ap(this.nativeEl,this._hls)}get envKey(){var i;return(i=this.getAttribute(w.ENV_KEY))!=null?i:void 0}set envKey(i){i!==this.envKey&&(i?this.setAttribute(w.ENV_KEY,i):this.removeAttribute(w.ENV_KEY))}get beaconCollectionDomain(){var i;return(i=this.getAttribute(w.BEACON_COLLECTION_DOMAIN))!=null?i:void 0}set beaconCollectionDomain(i){i!==this.beaconCollectionDomain&&(i?this.setAttribute(w.BEACON_COLLECTION_DOMAIN,i):this.removeAttribute(w.BEACON_COLLECTION_DOMAIN))}get streamType(){var i;return(i=this.getAttribute(w.STREAM_TYPE))!=null?i:Jd(this.nativeEl)}set streamType(i){i!==this.streamType&&(i?this.setAttribute(w.STREAM_TYPE,i):this.removeAttribute(w.STREAM_TYPE))}get targetLiveWindow(){return this.hasAttribute(w.TARGET_LIVE_WINDOW)?+this.getAttribute(w.TARGET_LIVE_WINDOW):Yy(this.nativeEl)}set targetLiveWindow(i){i!=this.targetLiveWindow&&(i==null?this.removeAttribute(w.TARGET_LIVE_WINDOW):this.setAttribute(w.TARGET_LIVE_WINDOW,`${+i}`))}get liveEdgeStart(){var i,e;if(this.hasAttribute(w.LIVE_EDGE_OFFSET)){let{liveEdgeOffset:t}=this,r=(i=this.nativeEl.seekable.end(0))!=null?i:0,s=(e=this.nativeEl.seekable.start(0))!=null?e:0;return Math.max(s,r-t)}return qy(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(w.LIVE_EDGE_OFFSET))return+this.getAttribute(w.LIVE_EDGE_OFFSET)}set liveEdgeOffset(i){i!=this.liveEdgeOffset&&(i==null?this.removeAttribute(w.LIVE_EDGE_OFFSET):this.setAttribute(w.LIVE_EDGE_OFFSET,`${+i}`))}get seekable(){return nu(this.nativeEl)}async addCuePoints(i){return Zm(this.nativeEl,i)}get activeCuePoint(){return Jm(this.nativeEl)}get cuePoints(){return Fy(this.nativeEl)}async addChapters(i){return tp(this.nativeEl,i)}get activeChapter(){return ip(this.nativeEl)}get chapters(){return $y(this.nativeEl)}getStartDate(){return Hy(this.nativeEl,this._hls)}get currentPdt(){return Gy(this.nativeEl,this._hls)}get preferPlayback(){let i=this.getAttribute(w.PREFER_PLAYBACK);if(i===Xt.MSE||i===Xt.NATIVE)return i}set preferPlayback(i){i!==this.preferPlayback&&(i===Xt.MSE||i===Xt.NATIVE?this.setAttribute(w.PREFER_PLAYBACK,i):this.removeAttribute(w.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(i=>i.startsWith("metadata-")&&![w.METADATA_URL].includes(i)).reduce((i,e)=>{let t=this.getAttribute(e);return t!=null&&(i[e.replace(/^metadata-/,"").replace(/-/g,"_")]=t),i},{}),...I(this,Qa)}}set metadata(i){Q(this,Qa,i!=null?i:{}),this.mux&&this.mux.emit("hb",I(this,Qa))}get _hlsConfig(){return I(this,hu)}set _hlsConfig(i){Q(this,hu,i)}load(){Q(this,Ni,Xy(this,this.nativeEl,I(this,Ni)))}unload(){op(this.nativeEl,I(this,Ni)),Q(this,Ni,void 0)}attributeChangedCallback(i,e,t){var r,s;switch(up.observedAttributes.includes(i)&&!["src","autoplay","preload"].includes(i)&&super.attributeChangedCallback(i,e,t),i){case w.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=t!=null?t:void 0;break;case w.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=t!=null?t:void 0;break;case"src":{let n=!!e,a=!!t;!n&&a?Ne(this,Za,gu).call(this):n&&!a?this.unload():n&&a&&(this.unload(),Ne(this,Za,gu).call(this));break}case"autoplay":if(t===e)break;(r=I(this,Ni))==null||r.setAutoplay(this.autoplay);break;case"preload":if(t===e)break;(s=I(this,Ni))==null||s.setPreload(t);break;case w.PLAYBACK_ID:this.src=Ka(this);break;case w.DEBUG:{let n=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=n);break}case w.METADATA_URL:t&&fetch(t).then(n=>n.json()).then(n=>this.metadata=n).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${t}!`));break;case w.STREAM_TYPE:(t==null||t!==e)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case w.TARGET_LIVE_WINDOW:(t==null||t!==e)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;default:break}}connectedCallback(){var i;(i=super.connectedCallback)==null||i.call(this),this.nativeEl&&this.src&&!I(this,Ni)&&Ne(this,Za,gu).call(this)}disconnectedCallback(){this.unload()}};Ni=new WeakMap,Xa=new WeakMap,uu=new WeakMap,Qa=new WeakMap,cu=new WeakMap,hu=new WeakMap,fu=new WeakMap,mu=new WeakMap,pu=new WeakMap,Za=new WeakSet,gu=async function(){I(this,Xa)||(await Q(this,Xa,Promise.resolve()),Q(this,Xa,null),this.load())};var vu,xp=class extends Hw(Jw(rC)){constructor(){super(...arguments),ie(this,vu)}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 i;return(i=I(this,vu))!=null?i:this.muxCastCustomData}set castCustomData(i){Q(this,vu,i)}};vu=new WeakMap;dp.customElements.get("mux-video")||(dp.customElements.define("mux-video",xp),dp.MuxVideoElement=xp);var _T=xp;function AT(i){let e="";return Object.entries(i).forEach(([t,r])=>{r!=null&&(e+=`${Au(t)}: ${r}; `)}),e?e.trim():void 0}function Au(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Su(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function Rt(i){if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}function wp(i){let e=sC(i).toString();return e?"?"+e:""}function sC(i){let e={};for(let t in i)i[t]!=null&&(e[t]=i[t]);return new URLSearchParams(e)}var Cp=(i,e)=>!i||!e?!1:i.contains(e)?!0:Cp(i,e.getRootNode().host);var ST="mux.com",nC=()=>{try{return"3.2.4"}catch{}return"UNKNOWN"},aC=nC(),Ru=()=>aC,xT=(i,{token:e,customDomain:t=ST,thumbnailTime:r,programTime:s}={})=>{var o;let n=e==null?r:void 0,{aud:a}=(o=Sr(e))!=null?o:{};if(!(e&&a!=="t"))return`https://image.${t}/${i}/thumbnail.webp${wp({token:e,time:n,program_time:s})}`},RT=(i,{token:e,customDomain:t=ST,programStartTime:r,programEndTime:s}={})=>{var a;let{aud:n}=(a=Sr(e))!=null?a:{};if(!(e&&n!=="s"))return`https://image.${t}/${i}/storyboard.vtt${wp({token:e,format:"webp",program_start_time:r,program_end_time:s})}`},Ja=i=>{if(i){if([Re.LIVE,Re.ON_DEMAND].includes(i))return i;if(i!=null&&i.includes("live"))return Re.LIVE}};var oC={crossorigin:"crossOrigin",playsinline:"playsInline"};function IT(i){var e;return(e=oC[i])!=null?e:Su(i)}var Ss,xs,It,xu=class{constructor(e,t){kt(this,Ss);kt(this,xs);kt(this,It,[]);$t(this,Ss,e),$t(this,xs,t)}[Symbol.iterator](){return _e(this,It).values()}get length(){return _e(this,It).length}get value(){var e;return(e=_e(this,It).join(" "))!=null?e:""}set value(e){var t;e!==this.value&&($t(this,It,[]),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return _e(this,It)[e]}values(){return _e(this,It).values()}keys(){return _e(this,It).keys()}forEach(e){_e(this,It).forEach(e)}add(...e){var t,r;e.forEach(s=>{this.contains(s)||_e(this,It).push(s)}),!(this.value===""&&!((t=_e(this,Ss))!=null&&t.hasAttribute(`${_e(this,xs)}`)))&&((r=_e(this,Ss))==null||r.setAttribute(`${_e(this,xs)}`,`${this.value}`))}remove(...e){var t;e.forEach(r=>{_e(this,It).splice(_e(this,It).indexOf(r),1)}),(t=_e(this,Ss))==null||t.setAttribute(`${_e(this,xs)}`,`${this.value}`)}contains(e){return _e(this,It).includes(e)}toggle(e,t){return typeof t!="undefined"?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)}};Ss=new WeakMap,xs=new WeakMap,It=new WeakMap;var LT=`[mux-player ${Ru()}]`;function Ui(...i){console.warn(LT,...i)}function Ut(...i){console.error(LT,...i)}function Dp(i){var t;let e=(t=i.message)!=null?t:"";i.context&&(e+=` ${i.context}`),i.file&&(e+=` ${j("Read more: ")}
1322
+ `}function pT(i,{tag:e,is:t}){var r,s,n,a,o,l,d,u,c,h,f,m,p,g,E,b,T;let _=(s=(r=globalThis.document)==null?void 0:r.createElement)==null?void 0:s.call(r,e,{is:t}),A=_?Cw(_):[];return n=class extends i{constructor(){super(...arguments),ie(this,f),ie(this,d,!1),ie(this,u,null),ie(this,c,new Map),ie(this,h),ke(this,"get"),ke(this,"set"),ke(this,"call")}static get observedAttributes(){var x,S,C;return Ne(x=n,o,l).call(x),[...(C=(S=_==null?void 0:_.constructor)==null?void 0:S.observedAttributes)!=null?C:[],...mT]}get nativeEl(){var x,S,C,M,k;return Ne(this,f,m).call(this),(k=(M=(S=(x=I(this,u))!=null?x:this.querySelector(":scope > [slot=media]"))!=null?S:this.querySelector(e))!=null?M:(C=this.shadowRoot)==null?void 0:C.querySelector(e))!=null?k:null}set nativeEl(x){Q(this,u,x)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(x){this.toggleAttribute("muted",x)}get src(){return this.getAttribute("src")}set src(x){this.setAttribute("src",`${x}`)}get preload(){var x,S;return(S=this.getAttribute("preload"))!=null?S:(x=this.nativeEl)==null?void 0:x.preload}set preload(x){this.setAttribute("preload",`${x}`)}init(){var x;if(!this.shadowRoot){this.attachShadow({mode:"open"});let S=Dw(this.attributes);t&&(S.is=t),e&&(S.part=e),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(S)}this.nativeEl.muted=this.hasAttribute("muted");for(let S of A)Ne(this,f,b).call(this,S);Q(this,h,new MutationObserver(Ne(this,f,g).bind(this))),this.shadowRoot.addEventListener("slotchange",this),Ne(this,f,p).call(this);for(let S of this.constructor.Events)(x=this.shadowRoot)==null||x.addEventListener(S,this,!0)}handleEvent(x){if(x.type==="slotchange"){Ne(this,f,p).call(this);return}x.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(x.type,{detail:x.detail}))}attributeChangedCallback(x,S,C){Ne(this,f,m).call(this),Ne(this,f,T).call(this,x,S,C)}connectedCallback(){Ne(this,f,m).call(this)}},a=new WeakMap,o=new WeakSet,l=function(){if(I(this,a))return;Q(this,a,!0);let x=new Set(this.observedAttributes);x.delete("muted");for(let S of A)if(!(S in this.prototype))if(typeof _[S]=="function")this.prototype[S]=function(...C){return Ne(this,f,m).call(this),(()=>{var M;if(this.call)return this.call(S,...C);let k=(M=this.nativeEl)==null?void 0:M[S];return k==null?void 0:k.apply(this.nativeEl,C)})()};else{let C={get(){var M,k,P;Ne(this,f,m).call(this);let U=S.toLowerCase();if(x.has(U)){let B=this.getAttribute(U);return B===null?!1:B===""?!0:B}return(P=(M=this.get)==null?void 0:M.call(this,S))!=null?P:(k=this.nativeEl)==null?void 0:k[S]}};S!==S.toUpperCase()&&(C.set=function(M){Ne(this,f,m).call(this);let k=S.toLowerCase();if(x.has(k)){M===!0||M===!1||M==null?this.toggleAttribute(k,!!M):this.setAttribute(k,M);return}if(this.set){this.set(S,M);return}this.nativeEl&&(this.nativeEl[S]=M)}),Object.defineProperty(this.prototype,S,C)}},d=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakMap,f=new WeakSet,m=function(){I(this,d)||(Q(this,d,!0),this.init())},p=function(){var x;let S=new Map(I(this,c)),C=(x=this.shadowRoot)==null?void 0:x.querySelector("slot:not([name])");(C==null?void 0:C.assignedElements({flatten:!0}).filter(M=>["track","source"].includes(M.localName))).forEach(M=>{var k,P;S.delete(M);let U=I(this,c).get(M);U||(U=M.cloneNode(),I(this,c).set(M,U),(k=I(this,h))==null||k.observe(M,{attributes:!0})),(P=this.nativeEl)==null||P.append(U),Ne(this,f,E).call(this,U)}),S.forEach((M,k)=>{M.remove(),I(this,c).delete(k)})},g=function(x){var S;for(let C of x)if(C.type==="attributes"){let{target:M,attributeName:k}=C,P=I(this,c).get(M);P&&k&&(P.setAttribute(k,(S=M.getAttribute(k))!=null?S:""),Ne(this,f,E).call(this,P))}},E=function(x){x&&x.localName==="track"&&x.default&&(x.kind==="chapters"||x.kind==="metadata")&&x.track.mode==="disabled"&&(x.track.mode="hidden")},b=function(x){if(Object.prototype.hasOwnProperty.call(this,x)){let S=this[x];delete this[x],this[x]=S}},T=function(x,S,C){var M,k,P;["id","class"].includes(x)||!n.observedAttributes.includes(x)&&this.constructor.observedAttributes.includes(x)||(C===null?(M=this.nativeEl)==null||M.removeAttribute(x):((k=this.nativeEl)==null?void 0:k.getAttribute(x))!==C&&((P=this.nativeEl)==null||P.setAttribute(x,C)))},ie(n,o),ke(n,"getTemplateHTML",e.endsWith("audio")?kw:ww),ke(n,"shadowRootOptions",{mode:"open"}),ke(n,"Events",yu),ie(n,a,!1),n}function Cw(i){let e=[];for(let t=Object.getPrototypeOf(i);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t)){let r=Object.getOwnPropertyNames(t);e.push(...r)}return e}function gT(i){let e="";for(let t in i){if(!mT.includes(t))continue;let r=i[t];r===""?e+=` ${t}`:e+=` ${t}="${r}"`}return e}function Dw(i){let e={};for(let t of i)e[t.name]=t.value;return e}var iT,up=pT((iT=globalThis.HTMLElement)!=null?iT:class{},{tag:"video"}),rT,wN=pT((rT=globalThis.HTMLElement)!=null?rT:class{},{tag:"audio"}),_s=new WeakMap,cp=class extends Error{},Mw=class extends Error{},Pw=globalThis.WeakRef?class extends Set{add(i){super.add(new WeakRef(i))}forEach(i){super.forEach(e=>{let t=e.deref();t&&i(t)})}}:Set;function Ow(i){var e,t,r;(t=(e=globalThis.chrome)==null?void 0:e.cast)!=null&&t.isAvailable?(r=globalThis.cast)!=null&&r.framework?i():customElements.whenDefined("google-cast-button").then(i):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(i)}}function Nw(){return globalThis.chrome}function Uw(){var i;let e="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if((i=globalThis.chrome)!=null&&i.cast||document.querySelector(`script[src="${e}"]`))return;let t=document.createElement("script");t.src=e,document.head.append(t)}function As(){var i,e;return(e=(i=globalThis.cast)==null?void 0:i.framework)==null?void 0:e.CastContext.getInstance()}function Lp(){var i;return(i=As())==null?void 0:i.getCurrentSession()}function kp(){var i;return(i=Lp())==null?void 0:i.getSessionObj().media[0]}function Fw(i){return new Promise((e,t)=>{kp().editTracksInfo(i,e,t)})}function Bw(i){return new Promise((e,t)=>{kp().getStatus(i,e,t)})}function vT(i){return As().setOptions({...ET(),...i})}function ET(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}var ou=new Pw,Rr=new WeakSet,ot;Ow(()=>{var i,e,t,r;if(!((e=(i=globalThis.chrome)==null?void 0:i.cast)!=null&&e.isAvailable)){console.debug("chrome.cast.isAvailable",(r=(t=globalThis.chrome)==null?void 0:t.cast)==null?void 0:r.isAvailable);return}ot||(ot=cast.framework,As().addEventListener(ot.CastContextEventType.CAST_STATE_CHANGED,s=>{ou.forEach(n=>{var a,o;return(o=(a=_s.get(n)).onCastStateChanged)==null?void 0:o.call(a,s)})}),As().addEventListener(ot.CastContextEventType.SESSION_STATE_CHANGED,s=>{ou.forEach(n=>{var a,o;return(o=(a=_s.get(n)).onSessionStateChanged)==null?void 0:o.call(a,s)})}),ou.forEach(s=>{var n,a;return(a=(n=_s.get(s)).init)==null?void 0:a.call(n)}))});var sT=0,Le,lu,Qt,xr,Mn,kn,Ts,fp,bt,ls,nT,mp,bT,pp,aT,hp,$w=class extends EventTarget{constructor(i){super(),ie(this,bt),ie(this,Le),ie(this,lu),ie(this,Qt),ie(this,xr),ie(this,Mn,"disconnected"),ie(this,kn,!1),ie(this,Ts,new Set),ie(this,fp,new WeakMap),Q(this,Le,i),ou.add(this),_s.set(this,{init:()=>Ne(this,bt,pp).call(this),onCastStateChanged:()=>Ne(this,bt,mp).call(this),onSessionStateChanged:()=>Ne(this,bt,bT).call(this),getCastPlayer:()=>I(this,bt,ls)}),Ne(this,bt,pp).call(this)}get state(){return I(this,Mn)}async watchAvailability(i){if(I(this,Le).disableRemotePlayback)throw new cp("disableRemotePlayback attribute is present.");return I(this,fp).set(i,++sT),I(this,Ts).add(i),sT}async cancelWatchAvailability(i){if(I(this,Le).disableRemotePlayback)throw new cp("disableRemotePlayback attribute is present.");i?I(this,Ts).delete(i):I(this,Ts).clear()}async prompt(){var i,e,t,r;if(I(this,Le).disableRemotePlayback)throw new cp("disableRemotePlayback attribute is present.");if(!((e=(i=globalThis.chrome)==null?void 0:i.cast)!=null&&e.isAvailable))throw new Mw("The RemotePlayback API is disabled on this platform.");let s=Rr.has(I(this,Le));Rr.add(I(this,Le)),vT(I(this,Le).castOptions),Object.entries(I(this,xr)).forEach(([n,a])=>{I(this,Qt).controller.addEventListener(n,a)});try{await As().requestSession()}catch(n){if(n==="cancel"){s||Rr.delete(I(this,Le));return}throw new Error(n)}(r=(t=_s.get(I(this,Le)))==null?void 0:t.loadOnPrompt)==null||r.call(t)}};Le=new WeakMap,lu=new WeakMap,Qt=new WeakMap,xr=new WeakMap,Mn=new WeakMap,kn=new WeakMap,Ts=new WeakMap,fp=new WeakMap,bt=new WeakSet,ls=function(){if(Rr.has(I(this,Le)))return I(this,Qt)},nT=function(){Rr.has(I(this,Le))&&(Object.entries(I(this,xr)).forEach(([i,e])=>{I(this,Qt).controller.removeEventListener(i,e)}),Rr.delete(I(this,Le)),I(this,Le).muted=I(this,Qt).isMuted,I(this,Le).currentTime=I(this,Qt).savedPlayerState.currentTime,I(this,Qt).savedPlayerState.isPaused===!1&&I(this,Le).play())},mp=function(){let i=As().getCastState();if(Rr.has(I(this,Le))&&i==="CONNECTING"&&(Q(this,Mn,"connecting"),this.dispatchEvent(new Event("connecting"))),!I(this,kn)&&i!=null&&i.includes("CONNECT")){Q(this,kn,!0);for(let e of I(this,Ts))e(!0)}else if(I(this,kn)&&(!i||i==="NO_DEVICES_AVAILABLE")){Q(this,kn,!1);for(let e of I(this,Ts))e(!1)}},bT=async function(){var i;let{SESSION_RESUMED:e}=ot.SessionState;if(As().getSessionState()===e&&I(this,Le).castSrc===((i=kp())==null?void 0:i.media.contentId)){Rr.add(I(this,Le)),Object.entries(I(this,xr)).forEach(([t,r])=>{I(this,Qt).controller.addEventListener(t,r)});try{await Bw(new chrome.cast.media.GetStatusRequest)}catch(t){console.error(t)}I(this,xr)[ot.RemotePlayerEventType.IS_PAUSED_CHANGED](),I(this,xr)[ot.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}},pp=function(){!ot||I(this,lu)||(Q(this,lu,!0),vT(I(this,Le).castOptions),I(this,Le).textTracks.addEventListener("change",()=>Ne(this,bt,hp).call(this)),Ne(this,bt,mp).call(this),Q(this,Qt,new ot.RemotePlayer),new ot.RemotePlayerController(I(this,Qt)),Q(this,xr,{[ot.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:i})=>{i===!0?(Q(this,Mn,"connected"),this.dispatchEvent(new Event("connect"))):(Ne(this,bt,nT).call(this),Q(this,Mn,"disconnected"),this.dispatchEvent(new Event("disconnect")))},[ot.RemotePlayerEventType.DURATION_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event("durationchange"))},[ot.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event("volumechange"))},[ot.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event("volumechange"))},[ot.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{var i;(i=I(this,bt,ls))!=null&&i.isMediaLoaded&&I(this,Le).dispatchEvent(new Event("timeupdate"))},[ot.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event("resize"))},[ot.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event(this.paused?"pause":"play"))},[ot.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{var i,e;((i=I(this,bt,ls))==null?void 0:i.playerState)!==chrome.cast.media.PlayerState.PAUSED&&I(this,Le).dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[(e=I(this,bt,ls))==null?void 0:e.playerState]))},[ot.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{var i;(i=I(this,bt,ls))!=null&&i.isMediaLoaded&&(await Promise.resolve(),Ne(this,bt,aT).call(this))}}))},aT=function(){Ne(this,bt,hp).call(this)},hp=async function(){var i,e,t,r,s;if(!I(this,bt,ls))return;let n=((e=(i=I(this,Qt).mediaInfo)==null?void 0:i.tracks)!=null?e:[]).filter(({type:h})=>h===chrome.cast.media.TrackType.TEXT),a=[...I(this,Le).textTracks].filter(({kind:h})=>h==="subtitles"||h==="captions"),o=n.map(({language:h,name:f,trackId:m})=>{var p;let{mode:g}=(p=a.find(E=>E.language===h&&E.label===f))!=null?p:{};return g?{mode:g,trackId:m}:!1}).filter(Boolean),l=o.filter(({mode:h})=>h!=="showing").map(({trackId:h})=>h),d=o.find(({mode:h})=>h==="showing"),u=(s=(r=(t=Lp())==null?void 0:t.getSessionObj().media[0])==null?void 0:r.activeTrackIds)!=null?s:[],c=u;if(u.length&&(c=c.filter(h=>!l.includes(h))),d!=null&&d.trackId&&(c=[...c,d.trackId]),c=[...new Set(c)],!((h,f)=>h.length===f.length&&h.every(m=>f.includes(m)))(u,c))try{let h=new chrome.cast.media.EditTracksInfoRequest(c);await Fw(h)}catch(h){console.error(h)}};var Hw=i=>{var e,t,r,s,n,a,o,l,d;return t=class extends i{constructor(){super(...arguments),ie(this,o),ie(this,r,{paused:!1}),ie(this,s,ET()),ie(this,n),ie(this,a)}get remote(){return I(this,a)?I(this,a):Nw()?(this.disableRemotePlayback||Uw(),_s.set(this,{loadOnPrompt:()=>Ne(this,o,d).call(this)}),Q(this,a,new $w(this))):super.remote}attributeChangedCallback(u,c,h){if(super.attributeChangedCallback(u,c,h),u==="cast-receiver"&&h){I(this,s).receiverApplicationId=h;return}if(I(this,o,l))switch(u){case"cast-stream-type":case"cast-src":this.load();break}}async load(){var u,c;if(!I(this,o,l))return super.load();let h=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType);h.customData=this.castCustomData;let f=[...this.querySelectorAll("track")].filter(({kind:E,src:b})=>b&&(E==="subtitles"||E==="captions")),m=[],p=0;f.length&&(h.tracks=f.map(E=>{let b=++p;m.length===0&&E.track.mode==="showing"&&m.push(b);let T=new chrome.cast.media.Track(b,chrome.cast.media.TrackType.TEXT);return T.trackContentId=E.src,T.trackContentType="text/vtt",T.subtype=E.kind==="captions"?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,T.name=E.label,T.language=E.srclang,T})),this.castStreamType==="live"?h.streamType=chrome.cast.media.StreamType.LIVE:h.streamType=chrome.cast.media.StreamType.BUFFERED,h.metadata=new chrome.cast.media.GenericMediaMetadata,h.metadata.title=this.title,h.metadata.images=[{url:this.poster}];let g=new chrome.cast.media.LoadRequest(h);g.currentTime=(u=super.currentTime)!=null?u:0,g.autoplay=!I(this,r).paused,g.activeTrackIds=m,await((c=Lp())==null?void 0:c.loadMedia(g)),this.dispatchEvent(new Event("volumechange"))}play(){var u;if(I(this,o,l)){I(this,o,l).isPaused&&((u=I(this,o,l).controller)==null||u.playOrPause());return}return super.play()}pause(){var u;if(I(this,o,l)){I(this,o,l).isPaused||(u=I(this,o,l).controller)==null||u.playOrPause();return}super.pause()}get castOptions(){return I(this,s)}get castReceiver(){var u;return(u=this.getAttribute("cast-receiver"))!=null?u:void 0}set castReceiver(u){this.castReceiver!=u&&this.setAttribute("cast-receiver",`${u}`)}get castSrc(){var u,c,h;return(h=(c=this.getAttribute("cast-src"))!=null?c:(u=this.querySelector("source"))==null?void 0:u.src)!=null?h:this.currentSrc}set castSrc(u){this.castSrc!=u&&this.setAttribute("cast-src",`${u}`)}get castContentType(){var u;return(u=this.getAttribute("cast-content-type"))!=null?u:void 0}set castContentType(u){this.setAttribute("cast-content-type",`${u}`)}get castStreamType(){var u,c;return(c=(u=this.getAttribute("cast-stream-type"))!=null?u:this.streamType)!=null?c:void 0}set castStreamType(u){this.setAttribute("cast-stream-type",`${u}`)}get castCustomData(){return I(this,n)}set castCustomData(u){let c=typeof u;if(!["object","undefined"].includes(c)){console.error(`castCustomData must be nullish or an object but value was of type ${c}`);return}Q(this,n,u)}get readyState(){if(I(this,o,l))switch(I(this,o,l).playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return I(this,o,l)?I(this,o,l).isPaused:super.paused}get muted(){var u;return I(this,o,l)?(u=I(this,o,l))==null?void 0:u.isMuted:super.muted}set muted(u){var c;if(I(this,o,l)){(u&&!I(this,o,l).isMuted||!u&&I(this,o,l).isMuted)&&((c=I(this,o,l).controller)==null||c.muteOrUnmute());return}super.muted=u}get volume(){var u,c;return I(this,o,l)?(c=(u=I(this,o,l))==null?void 0:u.volumeLevel)!=null?c:1:super.volume}set volume(u){var c;if(I(this,o,l)){I(this,o,l).volumeLevel=+u,(c=I(this,o,l).controller)==null||c.setVolumeLevel();return}super.volume=u}get duration(){var u,c,h;return I(this,o,l)&&(u=I(this,o,l))!=null&&u.isMediaLoaded?(h=(c=I(this,o,l))==null?void 0:c.duration)!=null?h:NaN:super.duration}get currentTime(){var u,c,h;return I(this,o,l)&&(u=I(this,o,l))!=null&&u.isMediaLoaded?(h=(c=I(this,o,l))==null?void 0:c.currentTime)!=null?h:0:super.currentTime}set currentTime(u){var c;if(I(this,o,l)){I(this,o,l).currentTime=u,(c=I(this,o,l).controller)==null||c.seek();return}super.currentTime=u}},r=new WeakMap,s=new WeakMap,n=new WeakMap,a=new WeakMap,o=new WeakSet,l=function(){var u,c;return(c=(u=_s.get(this.remote))==null?void 0:u.getCastPlayer)==null?void 0:c.call(u)},d=async function(){I(this,r).paused=lp(t.prototype,this,"paused"),lp(t.prototype,this,"pause").call(this),this.muted=lp(t.prototype,this,"muted");try{await this.load()}catch(u){console.error(u)}},ke(t,"observedAttributes",[...(e=i.observedAttributes)!=null?e:[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"]),t},Tu=class extends Event{constructor(i,e){super(i),ke(this,"track"),this.track=e.track}},gp=new WeakMap;function Y(i){var e;return(e=gp.get(i))!=null?e:Gw(i,{})}function Gw(i,e){let t=gp.get(i);return t||gp.set(i,t={}),Object.assign(t,e)}function vp(i,e){let t=i.videoTracks;Y(e).media=i,Y(e).renditionSet||(Y(e).renditionSet=new Set);let r=Y(t).trackSet;r.add(e);let s=r.size-1;s in bp.prototype||Object.defineProperty(bp.prototype,s,{get(){return[...Y(this).trackSet][s]}}),queueMicrotask(()=>{t.dispatchEvent(new Tu("addtrack",{track:e}))})}function Ep(i){var e;let t=(e=Y(i).media)==null?void 0:e.videoTracks;t&&(Y(t).trackSet.delete(i),queueMicrotask(()=>{t.dispatchEvent(new Tu("removetrack",{track:i}))}))}function Kw(i){var e;let t=(e=Y(i).media.videoTracks)!=null?e:[],r=!1;for(let s of t)s!==i&&(s.selected=!1,r=!0);if(r){if(Y(t).changeRequested)return;Y(t).changeRequested=!0,queueMicrotask(()=>{delete Y(t).changeRequested,t.dispatchEvent(new Event("change"))})}}var ds,us,cs,wn,Va,bp=class extends EventTarget{constructor(){super(),ie(this,wn),ie(this,ds),ie(this,us),ie(this,cs),Y(this).trackSet=new Set}[Symbol.iterator](){return I(this,wn,Va).values()}get length(){return I(this,wn,Va).size}getTrackById(i){var e;return(e=[...I(this,wn,Va)].find(t=>t.id===i))!=null?e:null}get selectedIndex(){return[...I(this,wn,Va)].findIndex(i=>i.selected)}get onaddtrack(){return I(this,ds)}set onaddtrack(i){I(this,ds)&&(this.removeEventListener("addtrack",I(this,ds)),Q(this,ds,void 0)),typeof i=="function"&&(Q(this,ds,i),this.addEventListener("addtrack",i))}get onremovetrack(){return I(this,us)}set onremovetrack(i){I(this,us)&&(this.removeEventListener("removetrack",I(this,us)),Q(this,us,void 0)),typeof i=="function"&&(Q(this,us,i),this.addEventListener("removetrack",i))}get onchange(){return I(this,cs)}set onchange(i){I(this,cs)&&(this.removeEventListener("change",I(this,cs)),Q(this,cs,void 0)),typeof i=="function"&&(Q(this,cs,i),this.addEventListener("change",i))}};ds=new WeakMap,us=new WeakMap,cs=new WeakMap,wn=new WeakSet,Va=function(){return Y(this).trackSet};var _u=class extends Event{constructor(i,e){super(i),ke(this,"rendition"),this.rendition=e.rendition}};function Vw(i,e){let t=Y(i).media.videoRenditions;Y(e).media=Y(i).media,Y(e).track=i;let r=Y(i).renditionSet;r.add(e);let s=r.size-1;s in yp.prototype||Object.defineProperty(yp.prototype,s,{get(){return Cn(this)[s]}}),queueMicrotask(()=>{i.selected&&t.dispatchEvent(new _u("addrendition",{rendition:e}))})}function Ww(i){let e=Y(i).media.videoRenditions,t=Y(i).track;Y(t).renditionSet.delete(i),queueMicrotask(()=>{Y(i).track.selected&&e.dispatchEvent(new _u("removerendition",{rendition:i}))})}function Yw(i){let e=Y(i).media.videoRenditions;!e||Y(e).changeRequested||(Y(e).changeRequested=!0,queueMicrotask(()=>{delete Y(e).changeRequested,Y(i).track.selected&&e.dispatchEvent(new Event("change"))}))}function Cn(i){return[...Y(i).media.videoTracks].filter(e=>e.selected).flatMap(e=>[...Y(e).renditionSet])}var hs,fs,ms,yp=class extends EventTarget{constructor(){super(...arguments),ie(this,hs),ie(this,fs),ie(this,ms)}[Symbol.iterator](){return Cn(this).values()}get length(){return Cn(this).length}getRenditionById(i){var e;return(e=Cn(this).find(t=>`${t.id}`==`${i}`))!=null?e:null}get selectedIndex(){return Cn(this).findIndex(i=>i.selected)}set selectedIndex(i){for(let[e,t]of Cn(this).entries())t.selected=e===i}get onaddrendition(){return I(this,hs)}set onaddrendition(i){I(this,hs)&&(this.removeEventListener("addrendition",I(this,hs)),Q(this,hs,void 0)),typeof i=="function"&&(Q(this,hs,i),this.addEventListener("addrendition",i))}get onremoverendition(){return I(this,fs)}set onremoverendition(i){I(this,fs)&&(this.removeEventListener("removerendition",I(this,fs)),Q(this,fs,void 0)),typeof i=="function"&&(Q(this,fs,i),this.addEventListener("removerendition",i))}get onchange(){return I(this,ms)}set onchange(i){I(this,ms)&&(this.removeEventListener("change",I(this,ms)),Q(this,ms,void 0)),typeof i=="function"&&(Q(this,ms,i),this.addEventListener("change",i))}};hs=new WeakMap,fs=new WeakMap,ms=new WeakMap;var Wa,qw=class{constructor(){ke(this,"src"),ke(this,"id"),ke(this,"width"),ke(this,"height"),ke(this,"bitrate"),ke(this,"frameRate"),ke(this,"codec"),ie(this,Wa,!1)}get selected(){return I(this,Wa)}set selected(i){I(this,Wa)!==i&&(Q(this,Wa,i),Yw(this))}};Wa=new WeakMap;var Ya,yT=class{constructor(){ke(this,"id"),ke(this,"kind"),ke(this,"label",""),ke(this,"language",""),ke(this,"sourceBuffer"),ie(this,Ya,!1)}addRendition(i,e,t,r,s,n){let a=new qw;return a.src=i,a.width=e,a.height=t,a.frameRate=n,a.bitrate=s,a.codec=r,Vw(this,a),a}removeRendition(i){Ww(i)}get selected(){return I(this,Ya)}set selected(i){I(this,Ya)!==i&&(Q(this,Ya,i),i===!0&&Kw(this))}};Ya=new WeakMap;function jw(i,e){let t=Y(i).media.audioRenditions;Y(e).media=Y(i).media,Y(e).track=i;let r=Y(i).renditionSet;r.add(e);let s=r.size-1;s in Tp.prototype||Object.defineProperty(Tp.prototype,s,{get(){return Dn(this)[s]}}),queueMicrotask(()=>{i.enabled&&t.dispatchEvent(new _u("addrendition",{rendition:e}))})}function zw(i){let e=Y(i).media.audioRenditions,t=Y(i).track;Y(t).renditionSet.delete(i),queueMicrotask(()=>{Y(i).track.enabled&&e.dispatchEvent(new _u("removerendition",{rendition:i}))})}function Xw(i){let e=Y(i).media.audioRenditions;!e||Y(e).changeRequested||(Y(e).changeRequested=!0,queueMicrotask(()=>{delete Y(e).changeRequested,Y(i).track.enabled&&e.dispatchEvent(new Event("change"))}))}function Dn(i){return[...Y(i).media.audioTracks].filter(e=>e.enabled).flatMap(e=>[...Y(e).renditionSet])}var ps,gs,vs,Tp=class extends EventTarget{constructor(){super(...arguments),ie(this,ps),ie(this,gs),ie(this,vs)}[Symbol.iterator](){return Dn(this).values()}get length(){return Dn(this).length}getRenditionById(i){var e;return(e=Dn(this).find(t=>`${t.id}`==`${i}`))!=null?e:null}get selectedIndex(){return Dn(this).findIndex(i=>i.selected)}set selectedIndex(i){for(let[e,t]of Dn(this).entries())t.selected=e===i}get onaddrendition(){return I(this,ps)}set onaddrendition(i){I(this,ps)&&(this.removeEventListener("addrendition",I(this,ps)),Q(this,ps,void 0)),typeof i=="function"&&(Q(this,ps,i),this.addEventListener("addrendition",i))}get onremoverendition(){return I(this,gs)}set onremoverendition(i){I(this,gs)&&(this.removeEventListener("removerendition",I(this,gs)),Q(this,gs,void 0)),typeof i=="function"&&(Q(this,gs,i),this.addEventListener("removerendition",i))}get onchange(){return I(this,vs)}set onchange(i){I(this,vs)&&(this.removeEventListener("change",I(this,vs)),Q(this,vs,void 0)),typeof i=="function"&&(Q(this,vs,i),this.addEventListener("change",i))}};ps=new WeakMap,gs=new WeakMap,vs=new WeakMap;var qa,Qw=class{constructor(){ke(this,"src"),ke(this,"id"),ke(this,"bitrate"),ke(this,"codec"),ie(this,qa,!1)}get selected(){return I(this,qa)}set selected(i){I(this,qa)!==i&&(Q(this,qa,i),Xw(this))}};qa=new WeakMap;function _p(i,e){let t=i.audioTracks;Y(e).media=i,Y(e).renditionSet||(Y(e).renditionSet=new Set);let r=Y(t).trackSet;r.add(e);let s=r.size-1;s in Sp.prototype||Object.defineProperty(Sp.prototype,s,{get(){return[...Y(this).trackSet][s]}}),queueMicrotask(()=>{t.dispatchEvent(new Tu("addtrack",{track:e}))})}function Ap(i){var e;let t=(e=Y(i).media)==null?void 0:e.audioTracks;t&&(Y(t).trackSet.delete(i),queueMicrotask(()=>{t.dispatchEvent(new Tu("removetrack",{track:i}))}))}function Zw(i){let e=Y(i).media.audioTracks;!e||Y(e).changeRequested||(Y(e).changeRequested=!0,queueMicrotask(()=>{delete Y(e).changeRequested,e.dispatchEvent(new Event("change"))}))}var Es,bs,ys,ja,du,Sp=class extends EventTarget{constructor(){super(),ie(this,ja),ie(this,Es),ie(this,bs),ie(this,ys),Y(this).trackSet=new Set}[Symbol.iterator](){return I(this,ja,du).values()}get length(){return I(this,ja,du).size}getTrackById(i){var e;return(e=[...I(this,ja,du)].find(t=>t.id===i))!=null?e:null}get onaddtrack(){return I(this,Es)}set onaddtrack(i){I(this,Es)&&(this.removeEventListener("addtrack",I(this,Es)),Q(this,Es,void 0)),typeof i=="function"&&(Q(this,Es,i),this.addEventListener("addtrack",i))}get onremovetrack(){return I(this,bs)}set onremovetrack(i){I(this,bs)&&(this.removeEventListener("removetrack",I(this,bs)),Q(this,bs,void 0)),typeof i=="function"&&(Q(this,bs,i),this.addEventListener("removetrack",i))}get onchange(){return I(this,ys)}set onchange(i){I(this,ys)&&(this.removeEventListener("change",I(this,ys)),Q(this,ys,void 0)),typeof i=="function"&&(Q(this,ys,i),this.addEventListener("change",i))}};Es=new WeakMap,bs=new WeakMap,ys=new WeakMap,ja=new WeakSet,du=function(){return Y(this).trackSet};var za,TT=class{constructor(){ke(this,"id"),ke(this,"kind"),ke(this,"label",""),ke(this,"language",""),ke(this,"sourceBuffer"),ie(this,za,!1)}addRendition(i,e,t){let r=new Qw;return r.src=i,r.codec=e,r.bitrate=t,jw(this,r),r}removeRendition(i){zw(i)}get enabled(){return I(this,za)}set enabled(i){I(this,za)!==i&&(Q(this,za,i),Zw(this))}};za=new WeakMap;var oT=Eu(globalThis.HTMLMediaElement,"video"),lT=Eu(globalThis.HTMLMediaElement,"audio");function Jw(i){if(!(i!=null&&i.prototype))return i;let e=Eu(i,"video");(!e||`${e}`.includes("[native code]"))&&Object.defineProperty(i.prototype,"videoTracks",{get(){return eC(this)}});let t=Eu(i,"audio");(!t||`${t}`.includes("[native code]"))&&Object.defineProperty(i.prototype,"audioTracks",{get(){return tC(this)}}),"addVideoTrack"in i.prototype||(i.prototype.addVideoTrack=function(n,a="",o=""){let l=new yT;return l.kind=n,l.label=a,l.language=o,vp(this,l),l}),"removeVideoTrack"in i.prototype||(i.prototype.removeVideoTrack=Ep),"addAudioTrack"in i.prototype||(i.prototype.addAudioTrack=function(n,a="",o=""){let l=new TT;return l.kind=n,l.label=a,l.language=o,_p(this,l),l}),"removeAudioTrack"in i.prototype||(i.prototype.removeAudioTrack=Ap),"videoRenditions"in i.prototype||Object.defineProperty(i.prototype,"videoRenditions",{get(){return r(this)}});let r=n=>{let a=Y(n).videoRenditions;return a||(a=new yp,Y(a).media=n,Y(n).videoRenditions=a),a};"audioRenditions"in i.prototype||Object.defineProperty(i.prototype,"audioRenditions",{get(){return s(this)}});let s=n=>{let a=Y(n).audioRenditions;return a||(a=new Tp,Y(a).media=n,Y(n).audioRenditions=a),a};return i}function Eu(i,e){var t;if(i!=null&&i.prototype)return(t=Object.getOwnPropertyDescriptor(i.prototype,`${e}Tracks`))==null?void 0:t.get}function eC(i){var e;let t=Y(i).videoTracks;if(!t&&(t=new bp,Y(i).videoTracks=t,oT)){let r=oT.call((e=i.nativeEl)!=null?e:i);for(let s of r)vp(i,s);r.addEventListener("change",()=>{t.dispatchEvent(new Event("change"))}),r.addEventListener("addtrack",s=>{if([...t].some(n=>n instanceof yT)){for(let n of r)Ep(n);return}vp(i,s.track)}),r.addEventListener("removetrack",s=>{Ep(s.track)})}return t}function tC(i){var e;let t=Y(i).audioTracks;if(!t&&(t=new Sp,Y(i).audioTracks=t,lT)){let r=lT.call((e=i.nativeEl)!=null?e:i);for(let s of r)_p(i,s);r.addEventListener("change",()=>{t.dispatchEvent(new Event("change"))}),r.addEventListener("addtrack",s=>{if([...t].some(n=>n instanceof TT)){for(let n of r)Ap(n);return}_p(i,s.track)}),r.addEventListener("removetrack",s=>{Ap(s.track)})}return t}yu.push("castchange","entercast","leavecast");var w={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type"},iC=Object.values(w),dT=Lw(),uT="mux-video",Ni,Xa,uu,Qa,cu,hu,fu,mu,pu,Za,gu,rC=class extends up{constructor(){super(),ie(this,Za),ie(this,Ni),ie(this,Xa),ie(this,uu),ie(this,Qa,{}),ie(this,cu,{}),ie(this,hu),ie(this,fu),ie(this,mu),ie(this,pu),Q(this,uu,ru())}static get NAME(){return uT}static get VERSION(){return dT}static get observedAttributes(){var i;return[...iC,...(i=up.observedAttributes)!=null?i:[]]}get preferCmcd(){var i;return(i=this.getAttribute(w.PREFER_CMCD))!=null?i:void 0}set preferCmcd(i){i!==this.preferCmcd&&(i?Ln.includes(i)?this.setAttribute(w.PREFER_CMCD,i):console.warn(`Invalid value for preferCmcd. Must be one of ${Ln.join()}`):this.removeAttribute(w.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(w.PLAYER_INIT_TIME)?+this.getAttribute(w.PLAYER_INIT_TIME):I(this,uu)}set playerInitTime(i){i!=this.playerInitTime&&(i==null?this.removeAttribute(w.PLAYER_INIT_TIME):this.setAttribute(w.PLAYER_INIT_TIME,`${+i}`))}get playerSoftwareName(){var i;return(i=I(this,mu))!=null?i:uT}set playerSoftwareName(i){Q(this,mu,i)}get playerSoftwareVersion(){var i;return(i=I(this,fu))!=null?i:dT}set playerSoftwareVersion(i){Q(this,fu,i)}get _hls(){var i;return(i=I(this,Ni))==null?void 0:i.engine}get mux(){var i;return(i=this.nativeEl)==null?void 0:i.mux}get error(){var i;return(i=sp(this.nativeEl))!=null?i:null}get errorTranslator(){return I(this,pu)}set errorTranslator(i){Q(this,pu,i)}get src(){return this.getAttribute("src")}set src(i){i!==this.src&&(i==null?this.removeAttribute("src"):this.setAttribute("src",i))}get type(){var i;return(i=this.getAttribute(w.TYPE))!=null?i:void 0}set type(i){i!==this.type&&(i?this.setAttribute(w.TYPE,i):this.removeAttribute(w.TYPE))}get autoplay(){let i=this.getAttribute("autoplay");return i===null?!1:i===""?!0:i}set autoplay(i){let e=this.autoplay;i!==e&&(i?this.setAttribute("autoplay",typeof i=="string"?i:""):this.removeAttribute("autoplay"))}get preload(){let i=this.getAttribute("preload");return i===""?"auto":["none","metadata","auto"].includes(i)?i:super.preload}set preload(i){i!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(i)?this.setAttribute("preload",i):this.removeAttribute("preload"))}get debug(){return this.getAttribute(w.DEBUG)!=null}set debug(i){i!==this.debug&&(i?this.setAttribute(w.DEBUG,""):this.removeAttribute(w.DEBUG))}get disableTracking(){return this.hasAttribute(w.DISABLE_TRACKING)}set disableTracking(i){i!==this.disableTracking&&this.toggleAttribute(w.DISABLE_TRACKING,!!i)}get disableCookies(){return this.hasAttribute(w.DISABLE_COOKIES)}set disableCookies(i){i!==this.disableCookies&&(i?this.setAttribute(w.DISABLE_COOKIES,""):this.removeAttribute(w.DISABLE_COOKIES))}get startTime(){let i=this.getAttribute(w.START_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set startTime(i){i!==this.startTime&&(i==null?this.removeAttribute(w.START_TIME):this.setAttribute(w.START_TIME,`${i}`))}get playbackId(){var i;return this.hasAttribute(w.PLAYBACK_ID)?this.getAttribute(w.PLAYBACK_ID):(i=rp(this.src))!=null?i:void 0}set playbackId(i){i!==this.playbackId&&(i?this.setAttribute(w.PLAYBACK_ID,i):this.removeAttribute(w.PLAYBACK_ID))}get maxResolution(){var i;return(i=this.getAttribute(w.MAX_RESOLUTION))!=null?i:void 0}set maxResolution(i){i!==this.maxResolution&&(i?this.setAttribute(w.MAX_RESOLUTION,i):this.removeAttribute(w.MAX_RESOLUTION))}get minResolution(){var i;return(i=this.getAttribute(w.MIN_RESOLUTION))!=null?i:void 0}set minResolution(i){i!==this.minResolution&&(i?this.setAttribute(w.MIN_RESOLUTION,i):this.removeAttribute(w.MIN_RESOLUTION))}get renditionOrder(){var i;return(i=this.getAttribute(w.RENDITION_ORDER))!=null?i:void 0}set renditionOrder(i){i!==this.renditionOrder&&(i?this.setAttribute(w.RENDITION_ORDER,i):this.removeAttribute(w.RENDITION_ORDER))}get programStartTime(){let i=this.getAttribute(w.PROGRAM_START_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set programStartTime(i){i==null?this.removeAttribute(w.PROGRAM_START_TIME):this.setAttribute(w.PROGRAM_START_TIME,`${i}`)}get programEndTime(){let i=this.getAttribute(w.PROGRAM_END_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set programEndTime(i){i==null?this.removeAttribute(w.PROGRAM_END_TIME):this.setAttribute(w.PROGRAM_END_TIME,`${i}`)}get assetStartTime(){let i=this.getAttribute(w.ASSET_START_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set assetStartTime(i){i==null?this.removeAttribute(w.ASSET_START_TIME):this.setAttribute(w.ASSET_START_TIME,`${i}`)}get assetEndTime(){let i=this.getAttribute(w.ASSET_END_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set assetEndTime(i){i==null?this.removeAttribute(w.ASSET_END_TIME):this.setAttribute(w.ASSET_END_TIME,`${i}`)}get customDomain(){var i;return(i=this.getAttribute(w.CUSTOM_DOMAIN))!=null?i:void 0}set customDomain(i){i!==this.customDomain&&(i?this.setAttribute(w.CUSTOM_DOMAIN,i):this.removeAttribute(w.CUSTOM_DOMAIN))}get drmToken(){var i;return(i=this.getAttribute(w.DRM_TOKEN))!=null?i:void 0}set drmToken(i){i!==this.drmToken&&(i?this.setAttribute(w.DRM_TOKEN,i):this.removeAttribute(w.DRM_TOKEN))}get playbackToken(){var i,e,t,r;if(this.hasAttribute(w.PLAYBACK_TOKEN))return(i=this.getAttribute(w.PLAYBACK_TOKEN))!=null?i:void 0;if(this.hasAttribute(w.PLAYBACK_ID)){let[,s]=eu((e=this.playbackId)!=null?e:"");return(t=new URLSearchParams(s).get("token"))!=null?t:void 0}if(this.src)return(r=new URLSearchParams(this.src).get("token"))!=null?r:void 0}set playbackToken(i){i!==this.playbackToken&&(i?this.setAttribute(w.PLAYBACK_TOKEN,i):this.removeAttribute(w.PLAYBACK_TOKEN))}get tokens(){let i=this.getAttribute(w.PLAYBACK_TOKEN),e=this.getAttribute(w.DRM_TOKEN);return{...I(this,cu),...i!=null?{playback:i}:{},...e!=null?{drm:e}:{}}}set tokens(i){Q(this,cu,i!=null?i:{})}get ended(){return ap(this.nativeEl,this._hls)}get envKey(){var i;return(i=this.getAttribute(w.ENV_KEY))!=null?i:void 0}set envKey(i){i!==this.envKey&&(i?this.setAttribute(w.ENV_KEY,i):this.removeAttribute(w.ENV_KEY))}get beaconCollectionDomain(){var i;return(i=this.getAttribute(w.BEACON_COLLECTION_DOMAIN))!=null?i:void 0}set beaconCollectionDomain(i){i!==this.beaconCollectionDomain&&(i?this.setAttribute(w.BEACON_COLLECTION_DOMAIN,i):this.removeAttribute(w.BEACON_COLLECTION_DOMAIN))}get streamType(){var i;return(i=this.getAttribute(w.STREAM_TYPE))!=null?i:Jd(this.nativeEl)}set streamType(i){i!==this.streamType&&(i?this.setAttribute(w.STREAM_TYPE,i):this.removeAttribute(w.STREAM_TYPE))}get targetLiveWindow(){return this.hasAttribute(w.TARGET_LIVE_WINDOW)?+this.getAttribute(w.TARGET_LIVE_WINDOW):Yy(this.nativeEl)}set targetLiveWindow(i){i!=this.targetLiveWindow&&(i==null?this.removeAttribute(w.TARGET_LIVE_WINDOW):this.setAttribute(w.TARGET_LIVE_WINDOW,`${+i}`))}get liveEdgeStart(){var i,e;if(this.hasAttribute(w.LIVE_EDGE_OFFSET)){let{liveEdgeOffset:t}=this,r=(i=this.nativeEl.seekable.end(0))!=null?i:0,s=(e=this.nativeEl.seekable.start(0))!=null?e:0;return Math.max(s,r-t)}return qy(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(w.LIVE_EDGE_OFFSET))return+this.getAttribute(w.LIVE_EDGE_OFFSET)}set liveEdgeOffset(i){i!=this.liveEdgeOffset&&(i==null?this.removeAttribute(w.LIVE_EDGE_OFFSET):this.setAttribute(w.LIVE_EDGE_OFFSET,`${+i}`))}get seekable(){return nu(this.nativeEl)}async addCuePoints(i){return Zm(this.nativeEl,i)}get activeCuePoint(){return Jm(this.nativeEl)}get cuePoints(){return Fy(this.nativeEl)}async addChapters(i){return tp(this.nativeEl,i)}get activeChapter(){return ip(this.nativeEl)}get chapters(){return $y(this.nativeEl)}getStartDate(){return Hy(this.nativeEl,this._hls)}get currentPdt(){return Gy(this.nativeEl,this._hls)}get preferPlayback(){let i=this.getAttribute(w.PREFER_PLAYBACK);if(i===Xt.MSE||i===Xt.NATIVE)return i}set preferPlayback(i){i!==this.preferPlayback&&(i===Xt.MSE||i===Xt.NATIVE?this.setAttribute(w.PREFER_PLAYBACK,i):this.removeAttribute(w.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(i=>i.startsWith("metadata-")&&![w.METADATA_URL].includes(i)).reduce((i,e)=>{let t=this.getAttribute(e);return t!=null&&(i[e.replace(/^metadata-/,"").replace(/-/g,"_")]=t),i},{}),...I(this,Qa)}}set metadata(i){Q(this,Qa,i!=null?i:{}),this.mux&&this.mux.emit("hb",I(this,Qa))}get _hlsConfig(){return I(this,hu)}set _hlsConfig(i){Q(this,hu,i)}load(){Q(this,Ni,Xy(this,this.nativeEl,I(this,Ni)))}unload(){op(this.nativeEl,I(this,Ni)),Q(this,Ni,void 0)}attributeChangedCallback(i,e,t){var r,s;switch(up.observedAttributes.includes(i)&&!["src","autoplay","preload"].includes(i)&&super.attributeChangedCallback(i,e,t),i){case w.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=t!=null?t:void 0;break;case w.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=t!=null?t:void 0;break;case"src":{let n=!!e,a=!!t;!n&&a?Ne(this,Za,gu).call(this):n&&!a?this.unload():n&&a&&(this.unload(),Ne(this,Za,gu).call(this));break}case"autoplay":if(t===e)break;(r=I(this,Ni))==null||r.setAutoplay(this.autoplay);break;case"preload":if(t===e)break;(s=I(this,Ni))==null||s.setPreload(t);break;case w.PLAYBACK_ID:this.src=Ka(this);break;case w.DEBUG:{let n=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=n);break}case w.METADATA_URL:t&&fetch(t).then(n=>n.json()).then(n=>this.metadata=n).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${t}!`));break;case w.STREAM_TYPE:(t==null||t!==e)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case w.TARGET_LIVE_WINDOW:(t==null||t!==e)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;default:break}}connectedCallback(){var i;(i=super.connectedCallback)==null||i.call(this),this.nativeEl&&this.src&&!I(this,Ni)&&Ne(this,Za,gu).call(this)}disconnectedCallback(){this.unload()}};Ni=new WeakMap,Xa=new WeakMap,uu=new WeakMap,Qa=new WeakMap,cu=new WeakMap,hu=new WeakMap,fu=new WeakMap,mu=new WeakMap,pu=new WeakMap,Za=new WeakSet,gu=async function(){I(this,Xa)||(await Q(this,Xa,Promise.resolve()),Q(this,Xa,null),this.load())};var vu,xp=class extends Hw(Jw(rC)){constructor(){super(...arguments),ie(this,vu)}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 i;return(i=I(this,vu))!=null?i:this.muxCastCustomData}set castCustomData(i){Q(this,vu,i)}};vu=new WeakMap;dp.customElements.get("mux-video")||(dp.customElements.define("mux-video",xp),dp.MuxVideoElement=xp);var _T=xp;function AT(i){let e="";return Object.entries(i).forEach(([t,r])=>{r!=null&&(e+=`${Au(t)}: ${r}; `)}),e?e.trim():void 0}function Au(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Su(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function Rt(i){if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}function wp(i){let e=sC(i).toString();return e?"?"+e:""}function sC(i){let e={};for(let t in i)i[t]!=null&&(e[t]=i[t]);return new URLSearchParams(e)}var Cp=(i,e)=>!i||!e?!1:i.contains(e)?!0:Cp(i,e.getRootNode().host);var ST="mux.com",nC=()=>{try{return"3.3.0"}catch{}return"UNKNOWN"},aC=nC(),Ru=()=>aC,xT=(i,{token:e,customDomain:t=ST,thumbnailTime:r,programTime:s}={})=>{var o;let n=e==null?r:void 0,{aud:a}=(o=Sr(e))!=null?o:{};if(!(e&&a!=="t"))return`https://image.${t}/${i}/thumbnail.webp${wp({token:e,time:n,program_time:s})}`},RT=(i,{token:e,customDomain:t=ST,programStartTime:r,programEndTime:s}={})=>{var a;let{aud:n}=(a=Sr(e))!=null?a:{};if(!(e&&n!=="s"))return`https://image.${t}/${i}/storyboard.vtt${wp({token:e,format:"webp",program_start_time:r,program_end_time:s})}`},Ja=i=>{if(i){if([Re.LIVE,Re.ON_DEMAND].includes(i))return i;if(i!=null&&i.includes("live"))return Re.LIVE}};var oC={crossorigin:"crossOrigin",playsinline:"playsInline"};function IT(i){var e;return(e=oC[i])!=null?e:Su(i)}var Ss,xs,It,xu=class{constructor(e,t){kt(this,Ss);kt(this,xs);kt(this,It,[]);$t(this,Ss,e),$t(this,xs,t)}[Symbol.iterator](){return _e(this,It).values()}get length(){return _e(this,It).length}get value(){var e;return(e=_e(this,It).join(" "))!=null?e:""}set value(e){var t;e!==this.value&&($t(this,It,[]),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return _e(this,It)[e]}values(){return _e(this,It).values()}keys(){return _e(this,It).keys()}forEach(e){_e(this,It).forEach(e)}add(...e){var t,r;e.forEach(s=>{this.contains(s)||_e(this,It).push(s)}),!(this.value===""&&!((t=_e(this,Ss))!=null&&t.hasAttribute(`${_e(this,xs)}`)))&&((r=_e(this,Ss))==null||r.setAttribute(`${_e(this,xs)}`,`${this.value}`))}remove(...e){var t;e.forEach(r=>{_e(this,It).splice(_e(this,It).indexOf(r),1)}),(t=_e(this,Ss))==null||t.setAttribute(`${_e(this,xs)}`,`${this.value}`)}contains(e){return _e(this,It).includes(e)}toggle(e,t){return typeof t!="undefined"?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)}};Ss=new WeakMap,xs=new WeakMap,It=new WeakMap;var LT=`[mux-player ${Ru()}]`;function Ui(...i){console.warn(LT,...i)}function Ut(...i){console.error(LT,...i)}function Dp(i){var t;let e=(t=i.message)!=null?t:"";i.context&&(e+=` ${i.context}`),i.file&&(e+=` ${j("Read more: ")}
1323
1323
  https://github.com/muxinc/elements/blob/main/errors/${i.file}`),Ui(e)}var At={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},Rs={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},wT=Object.freeze({length:0,start(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),lC=yu.filter(i=>i!=="error"),dC=Object.values(At).filter(i=>![At.PLAYSINLINE].includes(i)),uC=Object.values(Rs),Mp=class extends wt.HTMLElement{static get observedAttributes(){return[...dC,...uC]}constructor(){super()}init(){lC.forEach(e=>{var t;(t=this.media)==null||t.addEventListener(e,r=>{this.dispatchEvent(new Event(r.type))})})}attributeChangedCallback(e,t,r){var s,n;switch(e){case Rs.MUTED:{this.media&&(this.media.muted=r!=null,this.media.defaultMuted=r!=null);return}case Rs.VOLUME:{let a=(s=Rt(r))!=null?s:1;this.media&&(this.media.volume=a);return}case Rs.PLAYBACKRATE:{let a=(n=Rt(r))!=null?n:1;this.media&&(this.media.playbackRate=a,this.media.defaultPlaybackRate=a);return}}}play(){var e,t;return(t=(e=this.media)==null?void 0:e.play())!=null?t:Promise.reject()}pause(){var e;(e=this.media)==null||e.pause()}load(){var e;(e=this.media)==null||e.load()}requestCast(e){var t;return(t=this.media)==null?void 0:t.requestCast(e)}get media(){var e;return(e=this.shadowRoot)==null?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(t=(e=this.media)==null?void 0:e.paused)!=null?t:!0}get duration(){var e,t;return(t=(e=this.media)==null?void 0:e.duration)!=null?t:NaN}get ended(){var e,t;return(t=(e=this.media)==null?void 0:e.ended)!=null?t:!1}get buffered(){var e,t;return(t=(e=this.media)==null?void 0:e.buffered)!=null?t:wT}get seekable(){var e,t;return(t=(e=this.media)==null?void 0:e.seekable)!=null?t:wT}get readyState(){var e,t;return(t=(e=this.media)==null?void 0:e.readyState)!=null?t:0}get videoWidth(){var e,t;return(t=(e=this.media)==null?void 0:e.videoWidth)!=null?t:0}get videoHeight(){var e,t;return(t=(e=this.media)==null?void 0:e.videoHeight)!=null?t:0}get currentSrc(){var e,t;return(t=(e=this.media)==null?void 0:e.currentSrc)!=null?t:""}get currentTime(){var e,t;return(t=(e=this.media)==null?void 0:e.currentTime)!=null?t:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,t;return(t=(e=this.media)==null?void 0:e.volume)!=null?t:1}set volume(e){this.media&&(this.media.volume=Number(e))}get playbackRate(){var e,t;return(t=(e=this.media)==null?void 0:e.playbackRate)!=null?t:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get defaultPlaybackRate(){var e;return(e=Rt(this.getAttribute(Rs.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(Rs.PLAYBACKRATE,`${e}`):this.removeAttribute(Rs.PLAYBACKRATE)}get crossOrigin(){return eo(this,At.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(At.CROSSORIGIN,`${e}`)}get autoplay(){return eo(this,At.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(At.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(At.AUTOPLAY)}get loop(){return eo(this,At.LOOP)!=null}set loop(e){e?this.setAttribute(At.LOOP,""):this.removeAttribute(At.LOOP)}get muted(){var e,t;return(t=(e=this.media)==null?void 0:e.muted)!=null?t:!1}set muted(e){this.media&&(this.media.muted=!!e)}get defaultMuted(){return eo(this,At.MUTED)!=null}set defaultMuted(e){e?this.setAttribute(At.MUTED,""):this.removeAttribute(At.MUTED)}get playsInline(){return eo(this,At.PLAYSINLINE)!=null}set playsInline(e){Ut("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(At.PRELOAD,e):this.removeAttribute(At.PRELOAD)}};function eo(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}var Pp=Mp;var OT=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},de=(i,e,t)=>(OT(i,e,"read from private field"),t?t.call(i):e.get(i)),Fi=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},rr=(i,e,t,r)=>(OT(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),Pn,Iu,Is,to,Ir,Lr,kr,Ls,On,Lu,fi,CT=1,DT=0,cC=1,hC={processCallback(i,e,t){if(t){for(let[r,s]of e)if(r in t){let n=t[r];typeof n=="boolean"&&s instanceof Lt&&typeof s.element[s.attributeName]=="boolean"?s.booleanValue=n:typeof n=="function"&&s instanceof Lt?s.element[s.attributeName]=n:s.value=n}}}},sr=class extends R.DocumentFragment{constructor(e,t,r=hC){var s;super(),Fi(this,Pn,void 0),Fi(this,Iu,void 0),this.append(e.content.cloneNode(!0)),rr(this,Pn,NT(this)),rr(this,Iu,r),(s=r.createCallback)==null||s.call(r,this,de(this,Pn),t),r.processCallback(this,de(this,Pn),t)}update(e){de(this,Iu).processCallback(this,de(this,Pn),e)}};Pn=new WeakMap;Iu=new WeakMap;var NT=(i,e=[])=>{let t,r;for(let s of i.attributes||[])if(s.value.includes("{{")){let n=new Op;for([t,r]of PT(s.value))if(!t)n.append(r);else{let a=new Lt(i,s.name,s.namespaceURI);n.append(a),e.push([r,a])}s.value=n.toString()}for(let s of i.childNodes)if(s.nodeType===CT&&!(s instanceof HTMLTemplateElement))NT(s,e);else{let n=s.data;if(s.nodeType===CT||n.includes("{{")){let a=[];if(n)for([t,r]of PT(n))if(!t)a.push(new Text(r));else{let o=new nr(i);a.push(o),e.push([r,o])}else if(s instanceof HTMLTemplateElement){let o=new io(i,s);a.push(o),e.push([o.expression,o])}s.replaceWith(...a.flatMap(o=>o.replacementNodes||[o]))}}return e},MT={},PT=i=>{let e="",t=0,r=MT[i],s=0,n;if(r)return r;for(r=[];n=i[s];s++)n==="{"&&i[s+1]==="{"&&i[s-1]!=="\\"&&i[s+2]&&++t==1?(e&&r.push([DT,e]),e="",s++):n==="}"&&i[s+1]==="}"&&i[s-1]!=="\\"&&!--t?(r.push([cC,e.trim()]),e="",s++):e+=n||"";return e&&r.push([DT,(t>0?"{{":"")+e]),MT[i]=r},fC=11,ku=class{get value(){return""}set value(e){}toString(){return this.value}},UT=new WeakMap,Op=class{constructor(){Fi(this,Is,[])}[Symbol.iterator](){return de(this,Is).values()}get length(){return de(this,Is).length}item(e){return de(this,Is)[e]}append(...e){for(let t of e)t instanceof Lt&&UT.set(t,this),de(this,Is).push(t)}toString(){return de(this,Is).join("")}};Is=new WeakMap;var Lt=class extends ku{constructor(e,t,r){super(),Fi(this,Ls),Fi(this,to,""),Fi(this,Ir,void 0),Fi(this,Lr,void 0),Fi(this,kr,void 0),rr(this,Ir,e),rr(this,Lr,t),rr(this,kr,r)}get attributeName(){return de(this,Lr)}get attributeNamespace(){return de(this,kr)}get element(){return de(this,Ir)}get value(){return de(this,to)}set value(e){de(this,to)!==e&&(rr(this,to,e),!de(this,Ls,On)||de(this,Ls,On).length===1?e==null?de(this,Ir).removeAttributeNS(de(this,kr),de(this,Lr)):de(this,Ir).setAttributeNS(de(this,kr),de(this,Lr),e):de(this,Ir).setAttributeNS(de(this,kr),de(this,Lr),de(this,Ls,On).toString()))}get booleanValue(){return de(this,Ir).hasAttributeNS(de(this,kr),de(this,Lr))}set booleanValue(e){if(!de(this,Ls,On)||de(this,Ls,On).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};to=new WeakMap;Ir=new WeakMap;Lr=new WeakMap;kr=new WeakMap;Ls=new WeakSet;On=function(){return UT.get(this)};var nr=class extends ku{constructor(e,t){super(),Fi(this,Lu,void 0),Fi(this,fi,void 0),rr(this,Lu,e),rr(this,fi,t?[...t]:[new Text])}get replacementNodes(){return de(this,fi)}get parentNode(){return de(this,Lu)}get nextSibling(){return de(this,fi)[de(this,fi).length-1].nextSibling}get previousSibling(){return de(this,fi)[0].previousSibling}get value(){return de(this,fi).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){let t=e.flat().flatMap(r=>r==null?[new Text]:r.forEach?[...r]:r.nodeType===fC?[...r.childNodes]:r.nodeType?[r]:[new Text(r)]);t.length||t.push(new Text),rr(this,fi,mC(de(this,fi)[0].parentNode,de(this,fi),t,this.nextSibling))}};Lu=new WeakMap;fi=new WeakMap;var io=class extends nr{constructor(e,t){let r=t.getAttribute("directive")||t.getAttribute("type"),s=t.getAttribute("expression")||t.getAttribute(r)||"";s.startsWith("{{")&&(s=s.trim().slice(2,-2).trim()),super(e),this.expression=s,this.template=t,this.directive=r}};function mC(i,e,t,r=null){let s=0,n,a,o,l=t.length,d=e.length;for(;s<l&&s<d&&e[s]==t[s];)s++;for(;s<l&&s<d&&t[l-1]==e[d-1];)r=t[--d,--l];if(s==d)for(;s<l;)i.insertBefore(t[s++],r);if(s==l)for(;s<d;)i.removeChild(e[s++]);else{for(n=e[s];s<l;)o=t[s++],a=n?n.nextSibling:r,n==o?n=a:s<l&&t[s]==a?(i.replaceChild(o,n),n=a):i.insertBefore(o,n);for(;n!=r;)a=n.nextSibling,i.removeChild(n),n=a}return t}var FT={string:i=>String(i)},Cu=class{constructor(e){this.template=e,this.state=void 0}},ks=new WeakMap,ws=new WeakMap,Np={partial:(i,e)=>{e[i.expression]=new Cu(i.template)},if:(i,e)=>{var t;if($T(i.expression,e))if(ks.get(i)!==i.template){ks.set(i,i.template);let r=new sr(i.template,e,Du);i.replace(r),ws.set(i,r)}else(t=ws.get(i))==null||t.update(e);else i.replace(""),ks.delete(i),ws.delete(i)}},pC=Object.keys(Np),Du={processCallback(i,e,t){var r,s;if(t)for(let[n,a]of e){if(a instanceof io){if(!a.directive){let l=pC.find(d=>a.template.hasAttribute(d));l&&(a.directive=l,a.expression=a.template.getAttribute(l))}(r=Np[a.directive])==null||r.call(Np,a,t);continue}let o=$T(n,t);if(o instanceof Cu){ks.get(a)!==o.template?(ks.set(a,o.template),o=new sr(o.template,o.state,Du),a.value=o,ws.set(a,o)):(s=ws.get(a))==null||s.update(o.state);continue}o?(a instanceof Lt&&a.attributeName.startsWith("aria-")&&(o=String(o)),a instanceof Lt?typeof o=="boolean"?a.booleanValue=o:typeof o=="function"?a.element[a.attributeName]=o:a.value=o:(a.value=o,ks.delete(a),ws.delete(a))):a instanceof Lt?a.value=void 0:(a.value=void 0,ks.delete(a),ws.delete(a))}}},BT={"!":i=>!i,"!!":i=>!!i,"==":(i,e)=>i==e,"!=":(i,e)=>i!=e,">":(i,e)=>i>e,">=":(i,e)=>i>=e,"<":(i,e)=>i<e,"<=":(i,e)=>i<=e,"??":(i,e)=>i!=null?i:e,"|":(i,e)=>{var t;return(t=FT[e])==null?void 0:t.call(FT,i)}};function gC(i){return vC(i,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function $T(i,e={}){var t,r,s,n,a,o,l;let d=gC(i);if(d.length===0||d.some(({type:u})=>!u))return ro(i);if(((t=d[0])==null?void 0:t.token)===">"){let u=e[(r=d[1])==null?void 0:r.token];if(!u)return ro(i);let c={...e};u.state=c;let h=d.slice(2);for(let f=0;f<h.length;f+=3){let m=(s=h[f])==null?void 0:s.token,p=(n=h[f+1])==null?void 0:n.token,g=(a=h[f+2])==null?void 0:a.token;m&&p==="="&&(c[m]=so(g,e))}return u}if(d.length===1)return wu(d[0])?so(d[0].token,e):ro(i);if(d.length===2){let u=(o=d[0])==null?void 0:o.token,c=BT[u];if(!c||!wu(d[1]))return ro(i);let h=so(d[1].token,e);return c(h)}if(d.length===3){let u=(l=d[1])==null?void 0:l.token,c=BT[u];if(!c||!wu(d[0])||!wu(d[2]))return ro(i);let h=so(d[0].token,e);if(u==="|")return c(h,d[2].token);let f=so(d[2].token,e);return c(h,f)}}function ro(i){return console.warn(`Warning: invalid expression \`${i}\``),!1}function wu({type:i}){return["number","boolean","string","param"].includes(i)}function so(i,e){let t=i[0],r=i.slice(-1);return i==="true"||i==="false"?i==="true":t===r&&["'",'"'].includes(t)?i.slice(1,-1):Do(i)?parseFloat(i):e[i]}function vC(i,e){let t,r,s,n=[];for(;i;){s=null,t=i.length;for(let a in e)r=e[a].exec(i),r&&r.index<t&&(s={token:r[0],type:a,matches:r.slice(1)},t=r.index);t&&n.push({token:i.substr(0,t),type:void 0}),s&&n.push(s),i=i.substr(t+(s?s.token.length:0))}return n}var Gp=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Bp=(i,e,t)=>(Gp(i,e,"read from private field"),t?t.call(i):e.get(i)),no=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Cs=(i,e,t,r)=>(Gp(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),Up=(i,e,t)=>(Gp(i,e,"access private method"),t),Nn,Mu,Un,$p,HT,Pu,Hp,Fp={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},GT=F.createElement("template");GT.innerHTML=`
1324
1324
  <style>
1325
1325
  :host {
@@ -1277,7 +1277,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1277
1277
  `:""}${i.error?`error: ${i.error}
1278
1278
  `:""}${i.event?`event: ${i.event}
1279
1279
  `:""}${i.err?`error message: ${(s=i.err)==null?void 0:s.message}
1280
- `:""}`),l.data=i,l};var Ew=Object.defineProperty,bw=Object.getPrototypeOf,yw=Reflect.get,cT=i=>{throw TypeError(i)},Tw=(i,e,t)=>e in i?Ew(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ke=(i,e,t)=>Tw(i,typeof e!="symbol"?e+"":e,t),Rp=(i,e,t)=>e.has(i)||cT("Cannot "+t),I=(i,e,t)=>(Rp(i,e,"read from private field"),t?t.call(i):e.get(i)),ie=(i,e,t)=>e.has(i)?cT("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Q=(i,e,t,r)=>(Rp(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),Ne=(i,e,t)=>(Rp(i,e,"access private method"),t),lp=(i,e,t)=>yw(bw(i),t,e),bu=class{addEventListener(){}removeEventListener(){}dispatchEvent(i){return!0}};if(typeof DocumentFragment=="undefined"){class i extends bu{}globalThis.DocumentFragment=i}var Ip=class extends bu{},_w=class extends bu{},Aw={get(i){},define(i,e,t){},getName(i){return null},upgrade(i){},whenDefined(i){return Promise.resolve(Ip)}},au,Sw=class{constructor(i,e={}){ie(this,au),Q(this,au,e==null?void 0:e.detail)}get detail(){return I(this,au)}initCustomEvent(){}};au=new WeakMap;function xw(i,e){return new Ip}var hT={document:{createElement:xw},DocumentFragment,customElements:Aw,CustomEvent:Sw,EventTarget:bu,HTMLElement:Ip,HTMLVideoElement:_w},fT=typeof window=="undefined"||typeof globalThis.customElements=="undefined",dp=fT?hT:globalThis,LN=fT?hT.document:globalThis.document,Rw=()=>{try{return"0.24.2"}catch{}return"UNKNOWN"},Iw=Rw(),Lw=()=>Iw,yu=["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"],mT=["autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"];function kw(i){return`
1280
+ `:""}`),l.data=i,l};var Ew=Object.defineProperty,bw=Object.getPrototypeOf,yw=Reflect.get,cT=i=>{throw TypeError(i)},Tw=(i,e,t)=>e in i?Ew(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ke=(i,e,t)=>Tw(i,typeof e!="symbol"?e+"":e,t),Rp=(i,e,t)=>e.has(i)||cT("Cannot "+t),I=(i,e,t)=>(Rp(i,e,"read from private field"),t?t.call(i):e.get(i)),ie=(i,e,t)=>e.has(i)?cT("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Q=(i,e,t,r)=>(Rp(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),Ne=(i,e,t)=>(Rp(i,e,"access private method"),t),lp=(i,e,t)=>yw(bw(i),t,e),bu=class{addEventListener(){}removeEventListener(){}dispatchEvent(i){return!0}};if(typeof DocumentFragment=="undefined"){class i extends bu{}globalThis.DocumentFragment=i}var Ip=class extends bu{},_w=class extends bu{},Aw={get(i){},define(i,e,t){},getName(i){return null},upgrade(i){},whenDefined(i){return Promise.resolve(Ip)}},au,Sw=class{constructor(i,e={}){ie(this,au),Q(this,au,e==null?void 0:e.detail)}get detail(){return I(this,au)}initCustomEvent(){}};au=new WeakMap;function xw(i,e){return new Ip}var hT={document:{createElement:xw},DocumentFragment,customElements:Aw,CustomEvent:Sw,EventTarget:bu,HTMLElement:Ip,HTMLVideoElement:_w},fT=typeof window=="undefined"||typeof globalThis.customElements=="undefined",dp=fT?hT:globalThis,LN=fT?hT.document:globalThis.document,Rw=()=>{try{return"0.24.3"}catch{}return"UNKNOWN"},Iw=Rw(),Lw=()=>Iw,yu=["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"],mT=["autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"];function kw(i){return`
1281
1281
  <style>
1282
1282
  :host {
1283
1283
  display: inline-flex;
@@ -1319,7 +1319,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1319
1319
  <video${gT(i)}></video>
1320
1320
  </slot>
1321
1321
  <slot></slot>
1322
- `}function pT(i,{tag:e,is:t}){var r,s,n,a,o,l,d,u,c,h,f,m,p,g,E,b,T;let _=(s=(r=globalThis.document)==null?void 0:r.createElement)==null?void 0:s.call(r,e,{is:t}),A=_?Cw(_):[];return n=class extends i{constructor(){super(...arguments),ie(this,f),ie(this,d,!1),ie(this,u,null),ie(this,c,new Map),ie(this,h),ke(this,"get"),ke(this,"set"),ke(this,"call")}static get observedAttributes(){var x,S,C;return Ne(x=n,o,l).call(x),[...(C=(S=_==null?void 0:_.constructor)==null?void 0:S.observedAttributes)!=null?C:[],...mT]}get nativeEl(){var x,S,C,M,k;return Ne(this,f,m).call(this),(k=(M=(S=(x=I(this,u))!=null?x:this.querySelector(":scope > [slot=media]"))!=null?S:this.querySelector(e))!=null?M:(C=this.shadowRoot)==null?void 0:C.querySelector(e))!=null?k:null}set nativeEl(x){Q(this,u,x)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(x){this.toggleAttribute("muted",x)}get src(){return this.getAttribute("src")}set src(x){this.setAttribute("src",`${x}`)}get preload(){var x,S;return(S=this.getAttribute("preload"))!=null?S:(x=this.nativeEl)==null?void 0:x.preload}set preload(x){this.setAttribute("preload",`${x}`)}init(){var x;if(!this.shadowRoot){this.attachShadow({mode:"open"});let S=Dw(this.attributes);t&&(S.is=t),e&&(S.part=e),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(S)}this.nativeEl.muted=this.hasAttribute("muted");for(let S of A)Ne(this,f,b).call(this,S);Q(this,h,new MutationObserver(Ne(this,f,g).bind(this))),this.shadowRoot.addEventListener("slotchange",this),Ne(this,f,p).call(this);for(let S of this.constructor.Events)(x=this.shadowRoot)==null||x.addEventListener(S,this,!0)}handleEvent(x){if(x.type==="slotchange"){Ne(this,f,p).call(this);return}x.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(x.type,{detail:x.detail}))}attributeChangedCallback(x,S,C){Ne(this,f,m).call(this),Ne(this,f,T).call(this,x,S,C)}connectedCallback(){Ne(this,f,m).call(this)}},a=new WeakMap,o=new WeakSet,l=function(){if(I(this,a))return;Q(this,a,!0);let x=new Set(this.observedAttributes);x.delete("muted");for(let S of A)if(!(S in this.prototype))if(typeof _[S]=="function")this.prototype[S]=function(...C){return Ne(this,f,m).call(this),(()=>{var M;if(this.call)return this.call(S,...C);let k=(M=this.nativeEl)==null?void 0:M[S];return k==null?void 0:k.apply(this.nativeEl,C)})()};else{let C={get(){var M,k,P;Ne(this,f,m).call(this);let U=S.toLowerCase();if(x.has(U)){let B=this.getAttribute(U);return B===null?!1:B===""?!0:B}return(P=(M=this.get)==null?void 0:M.call(this,S))!=null?P:(k=this.nativeEl)==null?void 0:k[S]}};S!==S.toUpperCase()&&(C.set=function(M){Ne(this,f,m).call(this);let k=S.toLowerCase();if(x.has(k)){M===!0||M===!1||M==null?this.toggleAttribute(k,!!M):this.setAttribute(k,M);return}if(this.set){this.set(S,M);return}this.nativeEl&&(this.nativeEl[S]=M)}),Object.defineProperty(this.prototype,S,C)}},d=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakMap,f=new WeakSet,m=function(){I(this,d)||(Q(this,d,!0),this.init())},p=function(){var x;let S=new Map(I(this,c)),C=(x=this.shadowRoot)==null?void 0:x.querySelector("slot:not([name])");(C==null?void 0:C.assignedElements({flatten:!0}).filter(M=>["track","source"].includes(M.localName))).forEach(M=>{var k,P;S.delete(M);let U=I(this,c).get(M);U||(U=M.cloneNode(),I(this,c).set(M,U),(k=I(this,h))==null||k.observe(M,{attributes:!0})),(P=this.nativeEl)==null||P.append(U),Ne(this,f,E).call(this,U)}),S.forEach((M,k)=>{M.remove(),I(this,c).delete(k)})},g=function(x){var S;for(let C of x)if(C.type==="attributes"){let{target:M,attributeName:k}=C,P=I(this,c).get(M);P&&k&&(P.setAttribute(k,(S=M.getAttribute(k))!=null?S:""),Ne(this,f,E).call(this,P))}},E=function(x){x&&x.localName==="track"&&x.default&&(x.kind==="chapters"||x.kind==="metadata")&&x.track.mode==="disabled"&&(x.track.mode="hidden")},b=function(x){if(Object.prototype.hasOwnProperty.call(this,x)){let S=this[x];delete this[x],this[x]=S}},T=function(x,S,C){var M,k,P;["id","class"].includes(x)||!n.observedAttributes.includes(x)&&this.constructor.observedAttributes.includes(x)||(C===null?(M=this.nativeEl)==null||M.removeAttribute(x):((k=this.nativeEl)==null?void 0:k.getAttribute(x))!==C&&((P=this.nativeEl)==null||P.setAttribute(x,C)))},ie(n,o),ke(n,"getTemplateHTML",e.endsWith("audio")?kw:ww),ke(n,"shadowRootOptions",{mode:"open"}),ke(n,"Events",yu),ie(n,a,!1),n}function Cw(i){let e=[];for(let t=Object.getPrototypeOf(i);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t)){let r=Object.getOwnPropertyNames(t);e.push(...r)}return e}function gT(i){let e="";for(let t in i){if(!mT.includes(t))continue;let r=i[t];r===""?e+=` ${t}`:e+=` ${t}="${r}"`}return e}function Dw(i){let e={};for(let t of i)e[t.name]=t.value;return e}var iT,up=pT((iT=globalThis.HTMLElement)!=null?iT:class{},{tag:"video"}),rT,wN=pT((rT=globalThis.HTMLElement)!=null?rT:class{},{tag:"audio"}),_s=new WeakMap,cp=class extends Error{},Mw=class extends Error{},Pw=globalThis.WeakRef?class extends Set{add(i){super.add(new WeakRef(i))}forEach(i){super.forEach(e=>{let t=e.deref();t&&i(t)})}}:Set;function Ow(i){var e,t,r;(t=(e=globalThis.chrome)==null?void 0:e.cast)!=null&&t.isAvailable?(r=globalThis.cast)!=null&&r.framework?i():customElements.whenDefined("google-cast-button").then(i):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(i)}}function Nw(){return globalThis.chrome}function Uw(){var i;let e="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if((i=globalThis.chrome)!=null&&i.cast||document.querySelector(`script[src="${e}"]`))return;let t=document.createElement("script");t.src=e,document.head.append(t)}function As(){var i,e;return(e=(i=globalThis.cast)==null?void 0:i.framework)==null?void 0:e.CastContext.getInstance()}function Lp(){var i;return(i=As())==null?void 0:i.getCurrentSession()}function kp(){var i;return(i=Lp())==null?void 0:i.getSessionObj().media[0]}function Fw(i){return new Promise((e,t)=>{kp().editTracksInfo(i,e,t)})}function Bw(i){return new Promise((e,t)=>{kp().getStatus(i,e,t)})}function vT(i){return As().setOptions({...ET(),...i})}function ET(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}var ou=new Pw,Rr=new WeakSet,ot;Ow(()=>{var i,e,t,r;if(!((e=(i=globalThis.chrome)==null?void 0:i.cast)!=null&&e.isAvailable)){console.debug("chrome.cast.isAvailable",(r=(t=globalThis.chrome)==null?void 0:t.cast)==null?void 0:r.isAvailable);return}ot||(ot=cast.framework,As().addEventListener(ot.CastContextEventType.CAST_STATE_CHANGED,s=>{ou.forEach(n=>{var a,o;return(o=(a=_s.get(n)).onCastStateChanged)==null?void 0:o.call(a,s)})}),As().addEventListener(ot.CastContextEventType.SESSION_STATE_CHANGED,s=>{ou.forEach(n=>{var a,o;return(o=(a=_s.get(n)).onSessionStateChanged)==null?void 0:o.call(a,s)})}),ou.forEach(s=>{var n,a;return(a=(n=_s.get(s)).init)==null?void 0:a.call(n)}))});var sT=0,Le,lu,Qt,xr,Mn,kn,Ts,fp,bt,ls,nT,mp,bT,pp,aT,hp,$w=class extends EventTarget{constructor(i){super(),ie(this,bt),ie(this,Le),ie(this,lu),ie(this,Qt),ie(this,xr),ie(this,Mn,"disconnected"),ie(this,kn,!1),ie(this,Ts,new Set),ie(this,fp,new WeakMap),Q(this,Le,i),ou.add(this),_s.set(this,{init:()=>Ne(this,bt,pp).call(this),onCastStateChanged:()=>Ne(this,bt,mp).call(this),onSessionStateChanged:()=>Ne(this,bt,bT).call(this),getCastPlayer:()=>I(this,bt,ls)}),Ne(this,bt,pp).call(this)}get state(){return I(this,Mn)}async watchAvailability(i){if(I(this,Le).disableRemotePlayback)throw new cp("disableRemotePlayback attribute is present.");return I(this,fp).set(i,++sT),I(this,Ts).add(i),sT}async cancelWatchAvailability(i){if(I(this,Le).disableRemotePlayback)throw new cp("disableRemotePlayback attribute is present.");i?I(this,Ts).delete(i):I(this,Ts).clear()}async prompt(){var i,e,t,r;if(I(this,Le).disableRemotePlayback)throw new cp("disableRemotePlayback attribute is present.");if(!((e=(i=globalThis.chrome)==null?void 0:i.cast)!=null&&e.isAvailable))throw new Mw("The RemotePlayback API is disabled on this platform.");let s=Rr.has(I(this,Le));Rr.add(I(this,Le)),vT(I(this,Le).castOptions),Object.entries(I(this,xr)).forEach(([n,a])=>{I(this,Qt).controller.addEventListener(n,a)});try{await As().requestSession()}catch(n){if(n==="cancel"){s||Rr.delete(I(this,Le));return}throw new Error(n)}(r=(t=_s.get(I(this,Le)))==null?void 0:t.loadOnPrompt)==null||r.call(t)}};Le=new WeakMap,lu=new WeakMap,Qt=new WeakMap,xr=new WeakMap,Mn=new WeakMap,kn=new WeakMap,Ts=new WeakMap,fp=new WeakMap,bt=new WeakSet,ls=function(){if(Rr.has(I(this,Le)))return I(this,Qt)},nT=function(){Rr.has(I(this,Le))&&(Object.entries(I(this,xr)).forEach(([i,e])=>{I(this,Qt).controller.removeEventListener(i,e)}),Rr.delete(I(this,Le)),I(this,Le).muted=I(this,Qt).isMuted,I(this,Le).currentTime=I(this,Qt).savedPlayerState.currentTime,I(this,Qt).savedPlayerState.isPaused===!1&&I(this,Le).play())},mp=function(){let i=As().getCastState();if(Rr.has(I(this,Le))&&i==="CONNECTING"&&(Q(this,Mn,"connecting"),this.dispatchEvent(new Event("connecting"))),!I(this,kn)&&i!=null&&i.includes("CONNECT")){Q(this,kn,!0);for(let e of I(this,Ts))e(!0)}else if(I(this,kn)&&(!i||i==="NO_DEVICES_AVAILABLE")){Q(this,kn,!1);for(let e of I(this,Ts))e(!1)}},bT=async function(){var i;let{SESSION_RESUMED:e}=ot.SessionState;if(As().getSessionState()===e&&I(this,Le).castSrc===((i=kp())==null?void 0:i.media.contentId)){Rr.add(I(this,Le)),Object.entries(I(this,xr)).forEach(([t,r])=>{I(this,Qt).controller.addEventListener(t,r)});try{await Bw(new chrome.cast.media.GetStatusRequest)}catch(t){console.error(t)}I(this,xr)[ot.RemotePlayerEventType.IS_PAUSED_CHANGED](),I(this,xr)[ot.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}},pp=function(){!ot||I(this,lu)||(Q(this,lu,!0),vT(I(this,Le).castOptions),I(this,Le).textTracks.addEventListener("change",()=>Ne(this,bt,hp).call(this)),Ne(this,bt,mp).call(this),Q(this,Qt,new ot.RemotePlayer),new ot.RemotePlayerController(I(this,Qt)),Q(this,xr,{[ot.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:i})=>{i===!0?(Q(this,Mn,"connected"),this.dispatchEvent(new Event("connect"))):(Ne(this,bt,nT).call(this),Q(this,Mn,"disconnected"),this.dispatchEvent(new Event("disconnect")))},[ot.RemotePlayerEventType.DURATION_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event("durationchange"))},[ot.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event("volumechange"))},[ot.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event("volumechange"))},[ot.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{var i;(i=I(this,bt,ls))!=null&&i.isMediaLoaded&&I(this,Le).dispatchEvent(new Event("timeupdate"))},[ot.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event("resize"))},[ot.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event(this.paused?"pause":"play"))},[ot.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{var i,e;((i=I(this,bt,ls))==null?void 0:i.playerState)!==chrome.cast.media.PlayerState.PAUSED&&I(this,Le).dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[(e=I(this,bt,ls))==null?void 0:e.playerState]))},[ot.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{var i;(i=I(this,bt,ls))!=null&&i.isMediaLoaded&&(await Promise.resolve(),Ne(this,bt,aT).call(this))}}))},aT=function(){Ne(this,bt,hp).call(this)},hp=async function(){var i,e,t,r,s;if(!I(this,bt,ls))return;let n=((e=(i=I(this,Qt).mediaInfo)==null?void 0:i.tracks)!=null?e:[]).filter(({type:h})=>h===chrome.cast.media.TrackType.TEXT),a=[...I(this,Le).textTracks].filter(({kind:h})=>h==="subtitles"||h==="captions"),o=n.map(({language:h,name:f,trackId:m})=>{var p;let{mode:g}=(p=a.find(E=>E.language===h&&E.label===f))!=null?p:{};return g?{mode:g,trackId:m}:!1}).filter(Boolean),l=o.filter(({mode:h})=>h!=="showing").map(({trackId:h})=>h),d=o.find(({mode:h})=>h==="showing"),u=(s=(r=(t=Lp())==null?void 0:t.getSessionObj().media[0])==null?void 0:r.activeTrackIds)!=null?s:[],c=u;if(u.length&&(c=c.filter(h=>!l.includes(h))),d!=null&&d.trackId&&(c=[...c,d.trackId]),c=[...new Set(c)],!((h,f)=>h.length===f.length&&h.every(m=>f.includes(m)))(u,c))try{let h=new chrome.cast.media.EditTracksInfoRequest(c);await Fw(h)}catch(h){console.error(h)}};var Hw=i=>{var e,t,r,s,n,a,o,l,d;return t=class extends i{constructor(){super(...arguments),ie(this,o),ie(this,r,{paused:!1}),ie(this,s,ET()),ie(this,n),ie(this,a)}get remote(){return I(this,a)?I(this,a):Nw()?(this.disableRemotePlayback||Uw(),_s.set(this,{loadOnPrompt:()=>Ne(this,o,d).call(this)}),Q(this,a,new $w(this))):super.remote}attributeChangedCallback(u,c,h){if(super.attributeChangedCallback(u,c,h),u==="cast-receiver"&&h){I(this,s).receiverApplicationId=h;return}if(I(this,o,l))switch(u){case"cast-stream-type":case"cast-src":this.load();break}}async load(){var u,c;if(!I(this,o,l))return super.load();let h=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType);h.customData=this.castCustomData;let f=[...this.querySelectorAll("track")].filter(({kind:E,src:b})=>b&&(E==="subtitles"||E==="captions")),m=[],p=0;f.length&&(h.tracks=f.map(E=>{let b=++p;m.length===0&&E.track.mode==="showing"&&m.push(b);let T=new chrome.cast.media.Track(b,chrome.cast.media.TrackType.TEXT);return T.trackContentId=E.src,T.trackContentType="text/vtt",T.subtype=E.kind==="captions"?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,T.name=E.label,T.language=E.srclang,T})),this.castStreamType==="live"?h.streamType=chrome.cast.media.StreamType.LIVE:h.streamType=chrome.cast.media.StreamType.BUFFERED,h.metadata=new chrome.cast.media.GenericMediaMetadata,h.metadata.title=this.title,h.metadata.images=[{url:this.poster}];let g=new chrome.cast.media.LoadRequest(h);g.currentTime=(u=super.currentTime)!=null?u:0,g.autoplay=!I(this,r).paused,g.activeTrackIds=m,await((c=Lp())==null?void 0:c.loadMedia(g)),this.dispatchEvent(new Event("volumechange"))}play(){var u;if(I(this,o,l)){I(this,o,l).isPaused&&((u=I(this,o,l).controller)==null||u.playOrPause());return}return super.play()}pause(){var u;if(I(this,o,l)){I(this,o,l).isPaused||(u=I(this,o,l).controller)==null||u.playOrPause();return}super.pause()}get castOptions(){return I(this,s)}get castReceiver(){var u;return(u=this.getAttribute("cast-receiver"))!=null?u:void 0}set castReceiver(u){this.castReceiver!=u&&this.setAttribute("cast-receiver",`${u}`)}get castSrc(){var u,c,h;return(h=(c=this.getAttribute("cast-src"))!=null?c:(u=this.querySelector("source"))==null?void 0:u.src)!=null?h:this.currentSrc}set castSrc(u){this.castSrc!=u&&this.setAttribute("cast-src",`${u}`)}get castContentType(){var u;return(u=this.getAttribute("cast-content-type"))!=null?u:void 0}set castContentType(u){this.setAttribute("cast-content-type",`${u}`)}get castStreamType(){var u,c;return(c=(u=this.getAttribute("cast-stream-type"))!=null?u:this.streamType)!=null?c:void 0}set castStreamType(u){this.setAttribute("cast-stream-type",`${u}`)}get castCustomData(){return I(this,n)}set castCustomData(u){let c=typeof u;if(!["object","undefined"].includes(c)){console.error(`castCustomData must be nullish or an object but value was of type ${c}`);return}Q(this,n,u)}get readyState(){if(I(this,o,l))switch(I(this,o,l).playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return I(this,o,l)?I(this,o,l).isPaused:super.paused}get muted(){var u;return I(this,o,l)?(u=I(this,o,l))==null?void 0:u.isMuted:super.muted}set muted(u){var c;if(I(this,o,l)){(u&&!I(this,o,l).isMuted||!u&&I(this,o,l).isMuted)&&((c=I(this,o,l).controller)==null||c.muteOrUnmute());return}super.muted=u}get volume(){var u,c;return I(this,o,l)?(c=(u=I(this,o,l))==null?void 0:u.volumeLevel)!=null?c:1:super.volume}set volume(u){var c;if(I(this,o,l)){I(this,o,l).volumeLevel=+u,(c=I(this,o,l).controller)==null||c.setVolumeLevel();return}super.volume=u}get duration(){var u,c,h;return I(this,o,l)&&(u=I(this,o,l))!=null&&u.isMediaLoaded?(h=(c=I(this,o,l))==null?void 0:c.duration)!=null?h:NaN:super.duration}get currentTime(){var u,c,h;return I(this,o,l)&&(u=I(this,o,l))!=null&&u.isMediaLoaded?(h=(c=I(this,o,l))==null?void 0:c.currentTime)!=null?h:0:super.currentTime}set currentTime(u){var c;if(I(this,o,l)){I(this,o,l).currentTime=u,(c=I(this,o,l).controller)==null||c.seek();return}super.currentTime=u}},r=new WeakMap,s=new WeakMap,n=new WeakMap,a=new WeakMap,o=new WeakSet,l=function(){var u,c;return(c=(u=_s.get(this.remote))==null?void 0:u.getCastPlayer)==null?void 0:c.call(u)},d=async function(){I(this,r).paused=lp(t.prototype,this,"paused"),lp(t.prototype,this,"pause").call(this),this.muted=lp(t.prototype,this,"muted");try{await this.load()}catch(u){console.error(u)}},ke(t,"observedAttributes",[...(e=i.observedAttributes)!=null?e:[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"]),t},Tu=class extends Event{constructor(i,e){super(i),ke(this,"track"),this.track=e.track}},gp=new WeakMap;function Y(i){var e;return(e=gp.get(i))!=null?e:Gw(i,{})}function Gw(i,e){let t=gp.get(i);return t||gp.set(i,t={}),Object.assign(t,e)}function vp(i,e){let t=i.videoTracks;Y(e).media=i,Y(e).renditionSet||(Y(e).renditionSet=new Set);let r=Y(t).trackSet;r.add(e);let s=r.size-1;s in bp.prototype||Object.defineProperty(bp.prototype,s,{get(){return[...Y(this).trackSet][s]}}),queueMicrotask(()=>{t.dispatchEvent(new Tu("addtrack",{track:e}))})}function Ep(i){var e;let t=(e=Y(i).media)==null?void 0:e.videoTracks;t&&(Y(t).trackSet.delete(i),queueMicrotask(()=>{t.dispatchEvent(new Tu("removetrack",{track:i}))}))}function Kw(i){var e;let t=(e=Y(i).media.videoTracks)!=null?e:[],r=!1;for(let s of t)s!==i&&(s.selected=!1,r=!0);if(r){if(Y(t).changeRequested)return;Y(t).changeRequested=!0,queueMicrotask(()=>{delete Y(t).changeRequested,t.dispatchEvent(new Event("change"))})}}var ds,us,cs,wn,Va,bp=class extends EventTarget{constructor(){super(),ie(this,wn),ie(this,ds),ie(this,us),ie(this,cs),Y(this).trackSet=new Set}[Symbol.iterator](){return I(this,wn,Va).values()}get length(){return I(this,wn,Va).size}getTrackById(i){var e;return(e=[...I(this,wn,Va)].find(t=>t.id===i))!=null?e:null}get selectedIndex(){return[...I(this,wn,Va)].findIndex(i=>i.selected)}get onaddtrack(){return I(this,ds)}set onaddtrack(i){I(this,ds)&&(this.removeEventListener("addtrack",I(this,ds)),Q(this,ds,void 0)),typeof i=="function"&&(Q(this,ds,i),this.addEventListener("addtrack",i))}get onremovetrack(){return I(this,us)}set onremovetrack(i){I(this,us)&&(this.removeEventListener("removetrack",I(this,us)),Q(this,us,void 0)),typeof i=="function"&&(Q(this,us,i),this.addEventListener("removetrack",i))}get onchange(){return I(this,cs)}set onchange(i){I(this,cs)&&(this.removeEventListener("change",I(this,cs)),Q(this,cs,void 0)),typeof i=="function"&&(Q(this,cs,i),this.addEventListener("change",i))}};ds=new WeakMap,us=new WeakMap,cs=new WeakMap,wn=new WeakSet,Va=function(){return Y(this).trackSet};var _u=class extends Event{constructor(i,e){super(i),ke(this,"rendition"),this.rendition=e.rendition}};function Vw(i,e){let t=Y(i).media.videoRenditions;Y(e).media=Y(i).media,Y(e).track=i;let r=Y(i).renditionSet;r.add(e);let s=r.size-1;s in yp.prototype||Object.defineProperty(yp.prototype,s,{get(){return Cn(this)[s]}}),queueMicrotask(()=>{i.selected&&t.dispatchEvent(new _u("addrendition",{rendition:e}))})}function Ww(i){let e=Y(i).media.videoRenditions,t=Y(i).track;Y(t).renditionSet.delete(i),queueMicrotask(()=>{Y(i).track.selected&&e.dispatchEvent(new _u("removerendition",{rendition:i}))})}function Yw(i){let e=Y(i).media.videoRenditions;!e||Y(e).changeRequested||(Y(e).changeRequested=!0,queueMicrotask(()=>{delete Y(e).changeRequested,Y(i).track.selected&&e.dispatchEvent(new Event("change"))}))}function Cn(i){return[...Y(i).media.videoTracks].filter(e=>e.selected).flatMap(e=>[...Y(e).renditionSet])}var hs,fs,ms,yp=class extends EventTarget{constructor(){super(...arguments),ie(this,hs),ie(this,fs),ie(this,ms)}[Symbol.iterator](){return Cn(this).values()}get length(){return Cn(this).length}getRenditionById(i){var e;return(e=Cn(this).find(t=>`${t.id}`==`${i}`))!=null?e:null}get selectedIndex(){return Cn(this).findIndex(i=>i.selected)}set selectedIndex(i){for(let[e,t]of Cn(this).entries())t.selected=e===i}get onaddrendition(){return I(this,hs)}set onaddrendition(i){I(this,hs)&&(this.removeEventListener("addrendition",I(this,hs)),Q(this,hs,void 0)),typeof i=="function"&&(Q(this,hs,i),this.addEventListener("addrendition",i))}get onremoverendition(){return I(this,fs)}set onremoverendition(i){I(this,fs)&&(this.removeEventListener("removerendition",I(this,fs)),Q(this,fs,void 0)),typeof i=="function"&&(Q(this,fs,i),this.addEventListener("removerendition",i))}get onchange(){return I(this,ms)}set onchange(i){I(this,ms)&&(this.removeEventListener("change",I(this,ms)),Q(this,ms,void 0)),typeof i=="function"&&(Q(this,ms,i),this.addEventListener("change",i))}};hs=new WeakMap,fs=new WeakMap,ms=new WeakMap;var Wa,qw=class{constructor(){ke(this,"src"),ke(this,"id"),ke(this,"width"),ke(this,"height"),ke(this,"bitrate"),ke(this,"frameRate"),ke(this,"codec"),ie(this,Wa,!1)}get selected(){return I(this,Wa)}set selected(i){I(this,Wa)!==i&&(Q(this,Wa,i),Yw(this))}};Wa=new WeakMap;var Ya,yT=class{constructor(){ke(this,"id"),ke(this,"kind"),ke(this,"label",""),ke(this,"language",""),ke(this,"sourceBuffer"),ie(this,Ya,!1)}addRendition(i,e,t,r,s,n){let a=new qw;return a.src=i,a.width=e,a.height=t,a.frameRate=n,a.bitrate=s,a.codec=r,Vw(this,a),a}removeRendition(i){Ww(i)}get selected(){return I(this,Ya)}set selected(i){I(this,Ya)!==i&&(Q(this,Ya,i),i===!0&&Kw(this))}};Ya=new WeakMap;function jw(i,e){let t=Y(i).media.audioRenditions;Y(e).media=Y(i).media,Y(e).track=i;let r=Y(i).renditionSet;r.add(e);let s=r.size-1;s in Tp.prototype||Object.defineProperty(Tp.prototype,s,{get(){return Dn(this)[s]}}),queueMicrotask(()=>{i.enabled&&t.dispatchEvent(new _u("addrendition",{rendition:e}))})}function zw(i){let e=Y(i).media.audioRenditions,t=Y(i).track;Y(t).renditionSet.delete(i),queueMicrotask(()=>{Y(i).track.enabled&&e.dispatchEvent(new _u("removerendition",{rendition:i}))})}function Xw(i){let e=Y(i).media.audioRenditions;!e||Y(e).changeRequested||(Y(e).changeRequested=!0,queueMicrotask(()=>{delete Y(e).changeRequested,Y(i).track.enabled&&e.dispatchEvent(new Event("change"))}))}function Dn(i){return[...Y(i).media.audioTracks].filter(e=>e.enabled).flatMap(e=>[...Y(e).renditionSet])}var ps,gs,vs,Tp=class extends EventTarget{constructor(){super(...arguments),ie(this,ps),ie(this,gs),ie(this,vs)}[Symbol.iterator](){return Dn(this).values()}get length(){return Dn(this).length}getRenditionById(i){var e;return(e=Dn(this).find(t=>`${t.id}`==`${i}`))!=null?e:null}get selectedIndex(){return Dn(this).findIndex(i=>i.selected)}set selectedIndex(i){for(let[e,t]of Dn(this).entries())t.selected=e===i}get onaddrendition(){return I(this,ps)}set onaddrendition(i){I(this,ps)&&(this.removeEventListener("addrendition",I(this,ps)),Q(this,ps,void 0)),typeof i=="function"&&(Q(this,ps,i),this.addEventListener("addrendition",i))}get onremoverendition(){return I(this,gs)}set onremoverendition(i){I(this,gs)&&(this.removeEventListener("removerendition",I(this,gs)),Q(this,gs,void 0)),typeof i=="function"&&(Q(this,gs,i),this.addEventListener("removerendition",i))}get onchange(){return I(this,vs)}set onchange(i){I(this,vs)&&(this.removeEventListener("change",I(this,vs)),Q(this,vs,void 0)),typeof i=="function"&&(Q(this,vs,i),this.addEventListener("change",i))}};ps=new WeakMap,gs=new WeakMap,vs=new WeakMap;var qa,Qw=class{constructor(){ke(this,"src"),ke(this,"id"),ke(this,"bitrate"),ke(this,"codec"),ie(this,qa,!1)}get selected(){return I(this,qa)}set selected(i){I(this,qa)!==i&&(Q(this,qa,i),Xw(this))}};qa=new WeakMap;function _p(i,e){let t=i.audioTracks;Y(e).media=i,Y(e).renditionSet||(Y(e).renditionSet=new Set);let r=Y(t).trackSet;r.add(e);let s=r.size-1;s in Sp.prototype||Object.defineProperty(Sp.prototype,s,{get(){return[...Y(this).trackSet][s]}}),queueMicrotask(()=>{t.dispatchEvent(new Tu("addtrack",{track:e}))})}function Ap(i){var e;let t=(e=Y(i).media)==null?void 0:e.audioTracks;t&&(Y(t).trackSet.delete(i),queueMicrotask(()=>{t.dispatchEvent(new Tu("removetrack",{track:i}))}))}function Zw(i){let e=Y(i).media.audioTracks;!e||Y(e).changeRequested||(Y(e).changeRequested=!0,queueMicrotask(()=>{delete Y(e).changeRequested,e.dispatchEvent(new Event("change"))}))}var Es,bs,ys,ja,du,Sp=class extends EventTarget{constructor(){super(),ie(this,ja),ie(this,Es),ie(this,bs),ie(this,ys),Y(this).trackSet=new Set}[Symbol.iterator](){return I(this,ja,du).values()}get length(){return I(this,ja,du).size}getTrackById(i){var e;return(e=[...I(this,ja,du)].find(t=>t.id===i))!=null?e:null}get onaddtrack(){return I(this,Es)}set onaddtrack(i){I(this,Es)&&(this.removeEventListener("addtrack",I(this,Es)),Q(this,Es,void 0)),typeof i=="function"&&(Q(this,Es,i),this.addEventListener("addtrack",i))}get onremovetrack(){return I(this,bs)}set onremovetrack(i){I(this,bs)&&(this.removeEventListener("removetrack",I(this,bs)),Q(this,bs,void 0)),typeof i=="function"&&(Q(this,bs,i),this.addEventListener("removetrack",i))}get onchange(){return I(this,ys)}set onchange(i){I(this,ys)&&(this.removeEventListener("change",I(this,ys)),Q(this,ys,void 0)),typeof i=="function"&&(Q(this,ys,i),this.addEventListener("change",i))}};Es=new WeakMap,bs=new WeakMap,ys=new WeakMap,ja=new WeakSet,du=function(){return Y(this).trackSet};var za,TT=class{constructor(){ke(this,"id"),ke(this,"kind"),ke(this,"label",""),ke(this,"language",""),ke(this,"sourceBuffer"),ie(this,za,!1)}addRendition(i,e,t){let r=new Qw;return r.src=i,r.codec=e,r.bitrate=t,jw(this,r),r}removeRendition(i){zw(i)}get enabled(){return I(this,za)}set enabled(i){I(this,za)!==i&&(Q(this,za,i),Zw(this))}};za=new WeakMap;var oT=Eu(globalThis.HTMLMediaElement,"video"),lT=Eu(globalThis.HTMLMediaElement,"audio");function Jw(i){if(!(i!=null&&i.prototype))return i;let e=Eu(i,"video");(!e||`${e}`.includes("[native code]"))&&Object.defineProperty(i.prototype,"videoTracks",{get(){return eC(this)}});let t=Eu(i,"audio");(!t||`${t}`.includes("[native code]"))&&Object.defineProperty(i.prototype,"audioTracks",{get(){return tC(this)}}),"addVideoTrack"in i.prototype||(i.prototype.addVideoTrack=function(n,a="",o=""){let l=new yT;return l.kind=n,l.label=a,l.language=o,vp(this,l),l}),"removeVideoTrack"in i.prototype||(i.prototype.removeVideoTrack=Ep),"addAudioTrack"in i.prototype||(i.prototype.addAudioTrack=function(n,a="",o=""){let l=new TT;return l.kind=n,l.label=a,l.language=o,_p(this,l),l}),"removeAudioTrack"in i.prototype||(i.prototype.removeAudioTrack=Ap),"videoRenditions"in i.prototype||Object.defineProperty(i.prototype,"videoRenditions",{get(){return r(this)}});let r=n=>{let a=Y(n).videoRenditions;return a||(a=new yp,Y(a).media=n,Y(n).videoRenditions=a),a};"audioRenditions"in i.prototype||Object.defineProperty(i.prototype,"audioRenditions",{get(){return s(this)}});let s=n=>{let a=Y(n).audioRenditions;return a||(a=new Tp,Y(a).media=n,Y(n).audioRenditions=a),a};return i}function Eu(i,e){var t;if(i!=null&&i.prototype)return(t=Object.getOwnPropertyDescriptor(i.prototype,`${e}Tracks`))==null?void 0:t.get}function eC(i){var e;let t=Y(i).videoTracks;if(!t&&(t=new bp,Y(i).videoTracks=t,oT)){let r=oT.call((e=i.nativeEl)!=null?e:i);for(let s of r)vp(i,s);r.addEventListener("change",()=>{t.dispatchEvent(new Event("change"))}),r.addEventListener("addtrack",s=>{if([...t].some(n=>n instanceof yT)){for(let n of r)Ep(n);return}vp(i,s.track)}),r.addEventListener("removetrack",s=>{Ep(s.track)})}return t}function tC(i){var e;let t=Y(i).audioTracks;if(!t&&(t=new Sp,Y(i).audioTracks=t,lT)){let r=lT.call((e=i.nativeEl)!=null?e:i);for(let s of r)_p(i,s);r.addEventListener("change",()=>{t.dispatchEvent(new Event("change"))}),r.addEventListener("addtrack",s=>{if([...t].some(n=>n instanceof TT)){for(let n of r)Ap(n);return}_p(i,s.track)}),r.addEventListener("removetrack",s=>{Ap(s.track)})}return t}yu.push("castchange","entercast","leavecast");var w={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type"},iC=Object.values(w),dT=Lw(),uT="mux-video",Ni,Xa,uu,Qa,cu,hu,fu,mu,pu,Za,gu,rC=class extends up{constructor(){super(),ie(this,Za),ie(this,Ni),ie(this,Xa),ie(this,uu),ie(this,Qa,{}),ie(this,cu,{}),ie(this,hu),ie(this,fu),ie(this,mu),ie(this,pu),Q(this,uu,ru())}static get NAME(){return uT}static get VERSION(){return dT}static get observedAttributes(){var i;return[...iC,...(i=up.observedAttributes)!=null?i:[]]}get preferCmcd(){var i;return(i=this.getAttribute(w.PREFER_CMCD))!=null?i:void 0}set preferCmcd(i){i!==this.preferCmcd&&(i?Ln.includes(i)?this.setAttribute(w.PREFER_CMCD,i):console.warn(`Invalid value for preferCmcd. Must be one of ${Ln.join()}`):this.removeAttribute(w.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(w.PLAYER_INIT_TIME)?+this.getAttribute(w.PLAYER_INIT_TIME):I(this,uu)}set playerInitTime(i){i!=this.playerInitTime&&(i==null?this.removeAttribute(w.PLAYER_INIT_TIME):this.setAttribute(w.PLAYER_INIT_TIME,`${+i}`))}get playerSoftwareName(){var i;return(i=I(this,mu))!=null?i:uT}set playerSoftwareName(i){Q(this,mu,i)}get playerSoftwareVersion(){var i;return(i=I(this,fu))!=null?i:dT}set playerSoftwareVersion(i){Q(this,fu,i)}get _hls(){var i;return(i=I(this,Ni))==null?void 0:i.engine}get mux(){var i;return(i=this.nativeEl)==null?void 0:i.mux}get error(){var i;return(i=sp(this.nativeEl))!=null?i:null}get errorTranslator(){return I(this,pu)}set errorTranslator(i){Q(this,pu,i)}get src(){return this.getAttribute("src")}set src(i){i!==this.src&&(i==null?this.removeAttribute("src"):this.setAttribute("src",i))}get type(){var i;return(i=this.getAttribute(w.TYPE))!=null?i:void 0}set type(i){i!==this.type&&(i?this.setAttribute(w.TYPE,i):this.removeAttribute(w.TYPE))}get autoplay(){let i=this.getAttribute("autoplay");return i===null?!1:i===""?!0:i}set autoplay(i){let e=this.autoplay;i!==e&&(i?this.setAttribute("autoplay",typeof i=="string"?i:""):this.removeAttribute("autoplay"))}get preload(){let i=this.getAttribute("preload");return i===""?"auto":["none","metadata","auto"].includes(i)?i:super.preload}set preload(i){i!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(i)?this.setAttribute("preload",i):this.removeAttribute("preload"))}get debug(){return this.getAttribute(w.DEBUG)!=null}set debug(i){i!==this.debug&&(i?this.setAttribute(w.DEBUG,""):this.removeAttribute(w.DEBUG))}get disableTracking(){return this.hasAttribute(w.DISABLE_TRACKING)}set disableTracking(i){i!==this.disableTracking&&this.toggleAttribute(w.DISABLE_TRACKING,!!i)}get disableCookies(){return this.hasAttribute(w.DISABLE_COOKIES)}set disableCookies(i){i!==this.disableCookies&&(i?this.setAttribute(w.DISABLE_COOKIES,""):this.removeAttribute(w.DISABLE_COOKIES))}get startTime(){let i=this.getAttribute(w.START_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set startTime(i){i!==this.startTime&&(i==null?this.removeAttribute(w.START_TIME):this.setAttribute(w.START_TIME,`${i}`))}get playbackId(){var i;return this.hasAttribute(w.PLAYBACK_ID)?this.getAttribute(w.PLAYBACK_ID):(i=rp(this.src))!=null?i:void 0}set playbackId(i){i!==this.playbackId&&(i?this.setAttribute(w.PLAYBACK_ID,i):this.removeAttribute(w.PLAYBACK_ID))}get maxResolution(){var i;return(i=this.getAttribute(w.MAX_RESOLUTION))!=null?i:void 0}set maxResolution(i){i!==this.maxResolution&&(i?this.setAttribute(w.MAX_RESOLUTION,i):this.removeAttribute(w.MAX_RESOLUTION))}get minResolution(){var i;return(i=this.getAttribute(w.MIN_RESOLUTION))!=null?i:void 0}set minResolution(i){i!==this.minResolution&&(i?this.setAttribute(w.MIN_RESOLUTION,i):this.removeAttribute(w.MIN_RESOLUTION))}get renditionOrder(){var i;return(i=this.getAttribute(w.RENDITION_ORDER))!=null?i:void 0}set renditionOrder(i){i!==this.renditionOrder&&(i?this.setAttribute(w.RENDITION_ORDER,i):this.removeAttribute(w.RENDITION_ORDER))}get programStartTime(){let i=this.getAttribute(w.PROGRAM_START_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set programStartTime(i){i==null?this.removeAttribute(w.PROGRAM_START_TIME):this.setAttribute(w.PROGRAM_START_TIME,`${i}`)}get programEndTime(){let i=this.getAttribute(w.PROGRAM_END_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set programEndTime(i){i==null?this.removeAttribute(w.PROGRAM_END_TIME):this.setAttribute(w.PROGRAM_END_TIME,`${i}`)}get assetStartTime(){let i=this.getAttribute(w.ASSET_START_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set assetStartTime(i){i==null?this.removeAttribute(w.ASSET_START_TIME):this.setAttribute(w.ASSET_START_TIME,`${i}`)}get assetEndTime(){let i=this.getAttribute(w.ASSET_END_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set assetEndTime(i){i==null?this.removeAttribute(w.ASSET_END_TIME):this.setAttribute(w.ASSET_END_TIME,`${i}`)}get customDomain(){var i;return(i=this.getAttribute(w.CUSTOM_DOMAIN))!=null?i:void 0}set customDomain(i){i!==this.customDomain&&(i?this.setAttribute(w.CUSTOM_DOMAIN,i):this.removeAttribute(w.CUSTOM_DOMAIN))}get drmToken(){var i;return(i=this.getAttribute(w.DRM_TOKEN))!=null?i:void 0}set drmToken(i){i!==this.drmToken&&(i?this.setAttribute(w.DRM_TOKEN,i):this.removeAttribute(w.DRM_TOKEN))}get playbackToken(){var i,e,t,r;if(this.hasAttribute(w.PLAYBACK_TOKEN))return(i=this.getAttribute(w.PLAYBACK_TOKEN))!=null?i:void 0;if(this.hasAttribute(w.PLAYBACK_ID)){let[,s]=eu((e=this.playbackId)!=null?e:"");return(t=new URLSearchParams(s).get("token"))!=null?t:void 0}if(this.src)return(r=new URLSearchParams(this.src).get("token"))!=null?r:void 0}set playbackToken(i){i!==this.playbackToken&&(i?this.setAttribute(w.PLAYBACK_TOKEN,i):this.removeAttribute(w.PLAYBACK_TOKEN))}get tokens(){let i=this.getAttribute(w.PLAYBACK_TOKEN),e=this.getAttribute(w.DRM_TOKEN);return{...I(this,cu),...i!=null?{playback:i}:{},...e!=null?{drm:e}:{}}}set tokens(i){Q(this,cu,i!=null?i:{})}get ended(){return ap(this.nativeEl,this._hls)}get envKey(){var i;return(i=this.getAttribute(w.ENV_KEY))!=null?i:void 0}set envKey(i){i!==this.envKey&&(i?this.setAttribute(w.ENV_KEY,i):this.removeAttribute(w.ENV_KEY))}get beaconCollectionDomain(){var i;return(i=this.getAttribute(w.BEACON_COLLECTION_DOMAIN))!=null?i:void 0}set beaconCollectionDomain(i){i!==this.beaconCollectionDomain&&(i?this.setAttribute(w.BEACON_COLLECTION_DOMAIN,i):this.removeAttribute(w.BEACON_COLLECTION_DOMAIN))}get streamType(){var i;return(i=this.getAttribute(w.STREAM_TYPE))!=null?i:Jd(this.nativeEl)}set streamType(i){i!==this.streamType&&(i?this.setAttribute(w.STREAM_TYPE,i):this.removeAttribute(w.STREAM_TYPE))}get targetLiveWindow(){return this.hasAttribute(w.TARGET_LIVE_WINDOW)?+this.getAttribute(w.TARGET_LIVE_WINDOW):Yy(this.nativeEl)}set targetLiveWindow(i){i!=this.targetLiveWindow&&(i==null?this.removeAttribute(w.TARGET_LIVE_WINDOW):this.setAttribute(w.TARGET_LIVE_WINDOW,`${+i}`))}get liveEdgeStart(){var i,e;if(this.hasAttribute(w.LIVE_EDGE_OFFSET)){let{liveEdgeOffset:t}=this,r=(i=this.nativeEl.seekable.end(0))!=null?i:0,s=(e=this.nativeEl.seekable.start(0))!=null?e:0;return Math.max(s,r-t)}return qy(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(w.LIVE_EDGE_OFFSET))return+this.getAttribute(w.LIVE_EDGE_OFFSET)}set liveEdgeOffset(i){i!=this.liveEdgeOffset&&(i==null?this.removeAttribute(w.LIVE_EDGE_OFFSET):this.setAttribute(w.LIVE_EDGE_OFFSET,`${+i}`))}get seekable(){return nu(this.nativeEl)}async addCuePoints(i){return Zm(this.nativeEl,i)}get activeCuePoint(){return Jm(this.nativeEl)}get cuePoints(){return Fy(this.nativeEl)}async addChapters(i){return tp(this.nativeEl,i)}get activeChapter(){return ip(this.nativeEl)}get chapters(){return $y(this.nativeEl)}getStartDate(){return Hy(this.nativeEl,this._hls)}get currentPdt(){return Gy(this.nativeEl,this._hls)}get preferPlayback(){let i=this.getAttribute(w.PREFER_PLAYBACK);if(i===Xt.MSE||i===Xt.NATIVE)return i}set preferPlayback(i){i!==this.preferPlayback&&(i===Xt.MSE||i===Xt.NATIVE?this.setAttribute(w.PREFER_PLAYBACK,i):this.removeAttribute(w.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(i=>i.startsWith("metadata-")&&![w.METADATA_URL].includes(i)).reduce((i,e)=>{let t=this.getAttribute(e);return t!=null&&(i[e.replace(/^metadata-/,"").replace(/-/g,"_")]=t),i},{}),...I(this,Qa)}}set metadata(i){Q(this,Qa,i!=null?i:{}),this.mux&&this.mux.emit("hb",I(this,Qa))}get _hlsConfig(){return I(this,hu)}set _hlsConfig(i){Q(this,hu,i)}load(){Q(this,Ni,Xy(this,this.nativeEl,I(this,Ni)))}unload(){op(this.nativeEl,I(this,Ni)),Q(this,Ni,void 0)}attributeChangedCallback(i,e,t){var r,s;switch(up.observedAttributes.includes(i)&&!["src","autoplay","preload"].includes(i)&&super.attributeChangedCallback(i,e,t),i){case w.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=t!=null?t:void 0;break;case w.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=t!=null?t:void 0;break;case"src":{let n=!!e,a=!!t;!n&&a?Ne(this,Za,gu).call(this):n&&!a?this.unload():n&&a&&(this.unload(),Ne(this,Za,gu).call(this));break}case"autoplay":if(t===e)break;(r=I(this,Ni))==null||r.setAutoplay(this.autoplay);break;case"preload":if(t===e)break;(s=I(this,Ni))==null||s.setPreload(t);break;case w.PLAYBACK_ID:this.src=Ka(this);break;case w.DEBUG:{let n=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=n);break}case w.METADATA_URL:t&&fetch(t).then(n=>n.json()).then(n=>this.metadata=n).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${t}!`));break;case w.STREAM_TYPE:(t==null||t!==e)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case w.TARGET_LIVE_WINDOW:(t==null||t!==e)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;default:break}}connectedCallback(){var i;(i=super.connectedCallback)==null||i.call(this),this.nativeEl&&this.src&&!I(this,Ni)&&Ne(this,Za,gu).call(this)}disconnectedCallback(){this.unload()}};Ni=new WeakMap,Xa=new WeakMap,uu=new WeakMap,Qa=new WeakMap,cu=new WeakMap,hu=new WeakMap,fu=new WeakMap,mu=new WeakMap,pu=new WeakMap,Za=new WeakSet,gu=async function(){I(this,Xa)||(await Q(this,Xa,Promise.resolve()),Q(this,Xa,null),this.load())};var vu,xp=class extends Hw(Jw(rC)){constructor(){super(...arguments),ie(this,vu)}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 i;return(i=I(this,vu))!=null?i:this.muxCastCustomData}set castCustomData(i){Q(this,vu,i)}};vu=new WeakMap;dp.customElements.get("mux-video")||(dp.customElements.define("mux-video",xp),dp.MuxVideoElement=xp);var _T=xp;function AT(i){let e="";return Object.entries(i).forEach(([t,r])=>{r!=null&&(e+=`${Au(t)}: ${r}; `)}),e?e.trim():void 0}function Au(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Su(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function Rt(i){if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}function wp(i){let e=sC(i).toString();return e?"?"+e:""}function sC(i){let e={};for(let t in i)i[t]!=null&&(e[t]=i[t]);return new URLSearchParams(e)}var Cp=(i,e)=>!i||!e?!1:i.contains(e)?!0:Cp(i,e.getRootNode().host);var ST="mux.com",nC=()=>{try{return"3.2.4"}catch{}return"UNKNOWN"},aC=nC(),Ru=()=>aC,xT=(i,{token:e,customDomain:t=ST,thumbnailTime:r,programTime:s}={})=>{var o;let n=e==null?r:void 0,{aud:a}=(o=Sr(e))!=null?o:{};if(!(e&&a!=="t"))return`https://image.${t}/${i}/thumbnail.webp${wp({token:e,time:n,program_time:s})}`},RT=(i,{token:e,customDomain:t=ST,programStartTime:r,programEndTime:s}={})=>{var a;let{aud:n}=(a=Sr(e))!=null?a:{};if(!(e&&n!=="s"))return`https://image.${t}/${i}/storyboard.vtt${wp({token:e,format:"webp",program_start_time:r,program_end_time:s})}`},Ja=i=>{if(i){if([Re.LIVE,Re.ON_DEMAND].includes(i))return i;if(i!=null&&i.includes("live"))return Re.LIVE}};var oC={crossorigin:"crossOrigin",playsinline:"playsInline"};function IT(i){var e;return(e=oC[i])!=null?e:Su(i)}var Ss,xs,It,xu=class{constructor(e,t){kt(this,Ss);kt(this,xs);kt(this,It,[]);$t(this,Ss,e),$t(this,xs,t)}[Symbol.iterator](){return _e(this,It).values()}get length(){return _e(this,It).length}get value(){var e;return(e=_e(this,It).join(" "))!=null?e:""}set value(e){var t;e!==this.value&&($t(this,It,[]),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return _e(this,It)[e]}values(){return _e(this,It).values()}keys(){return _e(this,It).keys()}forEach(e){_e(this,It).forEach(e)}add(...e){var t,r;e.forEach(s=>{this.contains(s)||_e(this,It).push(s)}),!(this.value===""&&!((t=_e(this,Ss))!=null&&t.hasAttribute(`${_e(this,xs)}`)))&&((r=_e(this,Ss))==null||r.setAttribute(`${_e(this,xs)}`,`${this.value}`))}remove(...e){var t;e.forEach(r=>{_e(this,It).splice(_e(this,It).indexOf(r),1)}),(t=_e(this,Ss))==null||t.setAttribute(`${_e(this,xs)}`,`${this.value}`)}contains(e){return _e(this,It).includes(e)}toggle(e,t){return typeof t!="undefined"?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)}};Ss=new WeakMap,xs=new WeakMap,It=new WeakMap;var LT=`[mux-player ${Ru()}]`;function Ui(...i){console.warn(LT,...i)}function Ut(...i){console.error(LT,...i)}function Dp(i){var t;let e=(t=i.message)!=null?t:"";i.context&&(e+=` ${i.context}`),i.file&&(e+=` ${j("Read more: ")}
1322
+ `}function pT(i,{tag:e,is:t}){var r,s,n,a,o,l,d,u,c,h,f,m,p,g,E,b,T;let _=(s=(r=globalThis.document)==null?void 0:r.createElement)==null?void 0:s.call(r,e,{is:t}),A=_?Cw(_):[];return n=class extends i{constructor(){super(...arguments),ie(this,f),ie(this,d,!1),ie(this,u,null),ie(this,c,new Map),ie(this,h),ke(this,"get"),ke(this,"set"),ke(this,"call")}static get observedAttributes(){var x,S,C;return Ne(x=n,o,l).call(x),[...(C=(S=_==null?void 0:_.constructor)==null?void 0:S.observedAttributes)!=null?C:[],...mT]}get nativeEl(){var x,S,C,M,k;return Ne(this,f,m).call(this),(k=(M=(S=(x=I(this,u))!=null?x:this.querySelector(":scope > [slot=media]"))!=null?S:this.querySelector(e))!=null?M:(C=this.shadowRoot)==null?void 0:C.querySelector(e))!=null?k:null}set nativeEl(x){Q(this,u,x)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(x){this.toggleAttribute("muted",x)}get src(){return this.getAttribute("src")}set src(x){this.setAttribute("src",`${x}`)}get preload(){var x,S;return(S=this.getAttribute("preload"))!=null?S:(x=this.nativeEl)==null?void 0:x.preload}set preload(x){this.setAttribute("preload",`${x}`)}init(){var x;if(!this.shadowRoot){this.attachShadow({mode:"open"});let S=Dw(this.attributes);t&&(S.is=t),e&&(S.part=e),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(S)}this.nativeEl.muted=this.hasAttribute("muted");for(let S of A)Ne(this,f,b).call(this,S);Q(this,h,new MutationObserver(Ne(this,f,g).bind(this))),this.shadowRoot.addEventListener("slotchange",this),Ne(this,f,p).call(this);for(let S of this.constructor.Events)(x=this.shadowRoot)==null||x.addEventListener(S,this,!0)}handleEvent(x){if(x.type==="slotchange"){Ne(this,f,p).call(this);return}x.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(x.type,{detail:x.detail}))}attributeChangedCallback(x,S,C){Ne(this,f,m).call(this),Ne(this,f,T).call(this,x,S,C)}connectedCallback(){Ne(this,f,m).call(this)}},a=new WeakMap,o=new WeakSet,l=function(){if(I(this,a))return;Q(this,a,!0);let x=new Set(this.observedAttributes);x.delete("muted");for(let S of A)if(!(S in this.prototype))if(typeof _[S]=="function")this.prototype[S]=function(...C){return Ne(this,f,m).call(this),(()=>{var M;if(this.call)return this.call(S,...C);let k=(M=this.nativeEl)==null?void 0:M[S];return k==null?void 0:k.apply(this.nativeEl,C)})()};else{let C={get(){var M,k,P;Ne(this,f,m).call(this);let U=S.toLowerCase();if(x.has(U)){let B=this.getAttribute(U);return B===null?!1:B===""?!0:B}return(P=(M=this.get)==null?void 0:M.call(this,S))!=null?P:(k=this.nativeEl)==null?void 0:k[S]}};S!==S.toUpperCase()&&(C.set=function(M){Ne(this,f,m).call(this);let k=S.toLowerCase();if(x.has(k)){M===!0||M===!1||M==null?this.toggleAttribute(k,!!M):this.setAttribute(k,M);return}if(this.set){this.set(S,M);return}this.nativeEl&&(this.nativeEl[S]=M)}),Object.defineProperty(this.prototype,S,C)}},d=new WeakMap,u=new WeakMap,c=new WeakMap,h=new WeakMap,f=new WeakSet,m=function(){I(this,d)||(Q(this,d,!0),this.init())},p=function(){var x;let S=new Map(I(this,c)),C=(x=this.shadowRoot)==null?void 0:x.querySelector("slot:not([name])");(C==null?void 0:C.assignedElements({flatten:!0}).filter(M=>["track","source"].includes(M.localName))).forEach(M=>{var k,P;S.delete(M);let U=I(this,c).get(M);U||(U=M.cloneNode(),I(this,c).set(M,U),(k=I(this,h))==null||k.observe(M,{attributes:!0})),(P=this.nativeEl)==null||P.append(U),Ne(this,f,E).call(this,U)}),S.forEach((M,k)=>{M.remove(),I(this,c).delete(k)})},g=function(x){var S;for(let C of x)if(C.type==="attributes"){let{target:M,attributeName:k}=C,P=I(this,c).get(M);P&&k&&(P.setAttribute(k,(S=M.getAttribute(k))!=null?S:""),Ne(this,f,E).call(this,P))}},E=function(x){x&&x.localName==="track"&&x.default&&(x.kind==="chapters"||x.kind==="metadata")&&x.track.mode==="disabled"&&(x.track.mode="hidden")},b=function(x){if(Object.prototype.hasOwnProperty.call(this,x)){let S=this[x];delete this[x],this[x]=S}},T=function(x,S,C){var M,k,P;["id","class"].includes(x)||!n.observedAttributes.includes(x)&&this.constructor.observedAttributes.includes(x)||(C===null?(M=this.nativeEl)==null||M.removeAttribute(x):((k=this.nativeEl)==null?void 0:k.getAttribute(x))!==C&&((P=this.nativeEl)==null||P.setAttribute(x,C)))},ie(n,o),ke(n,"getTemplateHTML",e.endsWith("audio")?kw:ww),ke(n,"shadowRootOptions",{mode:"open"}),ke(n,"Events",yu),ie(n,a,!1),n}function Cw(i){let e=[];for(let t=Object.getPrototypeOf(i);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t)){let r=Object.getOwnPropertyNames(t);e.push(...r)}return e}function gT(i){let e="";for(let t in i){if(!mT.includes(t))continue;let r=i[t];r===""?e+=` ${t}`:e+=` ${t}="${r}"`}return e}function Dw(i){let e={};for(let t of i)e[t.name]=t.value;return e}var iT,up=pT((iT=globalThis.HTMLElement)!=null?iT:class{},{tag:"video"}),rT,wN=pT((rT=globalThis.HTMLElement)!=null?rT:class{},{tag:"audio"}),_s=new WeakMap,cp=class extends Error{},Mw=class extends Error{},Pw=globalThis.WeakRef?class extends Set{add(i){super.add(new WeakRef(i))}forEach(i){super.forEach(e=>{let t=e.deref();t&&i(t)})}}:Set;function Ow(i){var e,t,r;(t=(e=globalThis.chrome)==null?void 0:e.cast)!=null&&t.isAvailable?(r=globalThis.cast)!=null&&r.framework?i():customElements.whenDefined("google-cast-button").then(i):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(i)}}function Nw(){return globalThis.chrome}function Uw(){var i;let e="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if((i=globalThis.chrome)!=null&&i.cast||document.querySelector(`script[src="${e}"]`))return;let t=document.createElement("script");t.src=e,document.head.append(t)}function As(){var i,e;return(e=(i=globalThis.cast)==null?void 0:i.framework)==null?void 0:e.CastContext.getInstance()}function Lp(){var i;return(i=As())==null?void 0:i.getCurrentSession()}function kp(){var i;return(i=Lp())==null?void 0:i.getSessionObj().media[0]}function Fw(i){return new Promise((e,t)=>{kp().editTracksInfo(i,e,t)})}function Bw(i){return new Promise((e,t)=>{kp().getStatus(i,e,t)})}function vT(i){return As().setOptions({...ET(),...i})}function ET(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}var ou=new Pw,Rr=new WeakSet,ot;Ow(()=>{var i,e,t,r;if(!((e=(i=globalThis.chrome)==null?void 0:i.cast)!=null&&e.isAvailable)){console.debug("chrome.cast.isAvailable",(r=(t=globalThis.chrome)==null?void 0:t.cast)==null?void 0:r.isAvailable);return}ot||(ot=cast.framework,As().addEventListener(ot.CastContextEventType.CAST_STATE_CHANGED,s=>{ou.forEach(n=>{var a,o;return(o=(a=_s.get(n)).onCastStateChanged)==null?void 0:o.call(a,s)})}),As().addEventListener(ot.CastContextEventType.SESSION_STATE_CHANGED,s=>{ou.forEach(n=>{var a,o;return(o=(a=_s.get(n)).onSessionStateChanged)==null?void 0:o.call(a,s)})}),ou.forEach(s=>{var n,a;return(a=(n=_s.get(s)).init)==null?void 0:a.call(n)}))});var sT=0,Le,lu,Qt,xr,Mn,kn,Ts,fp,bt,ls,nT,mp,bT,pp,aT,hp,$w=class extends EventTarget{constructor(i){super(),ie(this,bt),ie(this,Le),ie(this,lu),ie(this,Qt),ie(this,xr),ie(this,Mn,"disconnected"),ie(this,kn,!1),ie(this,Ts,new Set),ie(this,fp,new WeakMap),Q(this,Le,i),ou.add(this),_s.set(this,{init:()=>Ne(this,bt,pp).call(this),onCastStateChanged:()=>Ne(this,bt,mp).call(this),onSessionStateChanged:()=>Ne(this,bt,bT).call(this),getCastPlayer:()=>I(this,bt,ls)}),Ne(this,bt,pp).call(this)}get state(){return I(this,Mn)}async watchAvailability(i){if(I(this,Le).disableRemotePlayback)throw new cp("disableRemotePlayback attribute is present.");return I(this,fp).set(i,++sT),I(this,Ts).add(i),sT}async cancelWatchAvailability(i){if(I(this,Le).disableRemotePlayback)throw new cp("disableRemotePlayback attribute is present.");i?I(this,Ts).delete(i):I(this,Ts).clear()}async prompt(){var i,e,t,r;if(I(this,Le).disableRemotePlayback)throw new cp("disableRemotePlayback attribute is present.");if(!((e=(i=globalThis.chrome)==null?void 0:i.cast)!=null&&e.isAvailable))throw new Mw("The RemotePlayback API is disabled on this platform.");let s=Rr.has(I(this,Le));Rr.add(I(this,Le)),vT(I(this,Le).castOptions),Object.entries(I(this,xr)).forEach(([n,a])=>{I(this,Qt).controller.addEventListener(n,a)});try{await As().requestSession()}catch(n){if(n==="cancel"){s||Rr.delete(I(this,Le));return}throw new Error(n)}(r=(t=_s.get(I(this,Le)))==null?void 0:t.loadOnPrompt)==null||r.call(t)}};Le=new WeakMap,lu=new WeakMap,Qt=new WeakMap,xr=new WeakMap,Mn=new WeakMap,kn=new WeakMap,Ts=new WeakMap,fp=new WeakMap,bt=new WeakSet,ls=function(){if(Rr.has(I(this,Le)))return I(this,Qt)},nT=function(){Rr.has(I(this,Le))&&(Object.entries(I(this,xr)).forEach(([i,e])=>{I(this,Qt).controller.removeEventListener(i,e)}),Rr.delete(I(this,Le)),I(this,Le).muted=I(this,Qt).isMuted,I(this,Le).currentTime=I(this,Qt).savedPlayerState.currentTime,I(this,Qt).savedPlayerState.isPaused===!1&&I(this,Le).play())},mp=function(){let i=As().getCastState();if(Rr.has(I(this,Le))&&i==="CONNECTING"&&(Q(this,Mn,"connecting"),this.dispatchEvent(new Event("connecting"))),!I(this,kn)&&i!=null&&i.includes("CONNECT")){Q(this,kn,!0);for(let e of I(this,Ts))e(!0)}else if(I(this,kn)&&(!i||i==="NO_DEVICES_AVAILABLE")){Q(this,kn,!1);for(let e of I(this,Ts))e(!1)}},bT=async function(){var i;let{SESSION_RESUMED:e}=ot.SessionState;if(As().getSessionState()===e&&I(this,Le).castSrc===((i=kp())==null?void 0:i.media.contentId)){Rr.add(I(this,Le)),Object.entries(I(this,xr)).forEach(([t,r])=>{I(this,Qt).controller.addEventListener(t,r)});try{await Bw(new chrome.cast.media.GetStatusRequest)}catch(t){console.error(t)}I(this,xr)[ot.RemotePlayerEventType.IS_PAUSED_CHANGED](),I(this,xr)[ot.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}},pp=function(){!ot||I(this,lu)||(Q(this,lu,!0),vT(I(this,Le).castOptions),I(this,Le).textTracks.addEventListener("change",()=>Ne(this,bt,hp).call(this)),Ne(this,bt,mp).call(this),Q(this,Qt,new ot.RemotePlayer),new ot.RemotePlayerController(I(this,Qt)),Q(this,xr,{[ot.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:i})=>{i===!0?(Q(this,Mn,"connected"),this.dispatchEvent(new Event("connect"))):(Ne(this,bt,nT).call(this),Q(this,Mn,"disconnected"),this.dispatchEvent(new Event("disconnect")))},[ot.RemotePlayerEventType.DURATION_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event("durationchange"))},[ot.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event("volumechange"))},[ot.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event("volumechange"))},[ot.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{var i;(i=I(this,bt,ls))!=null&&i.isMediaLoaded&&I(this,Le).dispatchEvent(new Event("timeupdate"))},[ot.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event("resize"))},[ot.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{I(this,Le).dispatchEvent(new Event(this.paused?"pause":"play"))},[ot.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{var i,e;((i=I(this,bt,ls))==null?void 0:i.playerState)!==chrome.cast.media.PlayerState.PAUSED&&I(this,Le).dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[(e=I(this,bt,ls))==null?void 0:e.playerState]))},[ot.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{var i;(i=I(this,bt,ls))!=null&&i.isMediaLoaded&&(await Promise.resolve(),Ne(this,bt,aT).call(this))}}))},aT=function(){Ne(this,bt,hp).call(this)},hp=async function(){var i,e,t,r,s;if(!I(this,bt,ls))return;let n=((e=(i=I(this,Qt).mediaInfo)==null?void 0:i.tracks)!=null?e:[]).filter(({type:h})=>h===chrome.cast.media.TrackType.TEXT),a=[...I(this,Le).textTracks].filter(({kind:h})=>h==="subtitles"||h==="captions"),o=n.map(({language:h,name:f,trackId:m})=>{var p;let{mode:g}=(p=a.find(E=>E.language===h&&E.label===f))!=null?p:{};return g?{mode:g,trackId:m}:!1}).filter(Boolean),l=o.filter(({mode:h})=>h!=="showing").map(({trackId:h})=>h),d=o.find(({mode:h})=>h==="showing"),u=(s=(r=(t=Lp())==null?void 0:t.getSessionObj().media[0])==null?void 0:r.activeTrackIds)!=null?s:[],c=u;if(u.length&&(c=c.filter(h=>!l.includes(h))),d!=null&&d.trackId&&(c=[...c,d.trackId]),c=[...new Set(c)],!((h,f)=>h.length===f.length&&h.every(m=>f.includes(m)))(u,c))try{let h=new chrome.cast.media.EditTracksInfoRequest(c);await Fw(h)}catch(h){console.error(h)}};var Hw=i=>{var e,t,r,s,n,a,o,l,d;return t=class extends i{constructor(){super(...arguments),ie(this,o),ie(this,r,{paused:!1}),ie(this,s,ET()),ie(this,n),ie(this,a)}get remote(){return I(this,a)?I(this,a):Nw()?(this.disableRemotePlayback||Uw(),_s.set(this,{loadOnPrompt:()=>Ne(this,o,d).call(this)}),Q(this,a,new $w(this))):super.remote}attributeChangedCallback(u,c,h){if(super.attributeChangedCallback(u,c,h),u==="cast-receiver"&&h){I(this,s).receiverApplicationId=h;return}if(I(this,o,l))switch(u){case"cast-stream-type":case"cast-src":this.load();break}}async load(){var u,c;if(!I(this,o,l))return super.load();let h=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType);h.customData=this.castCustomData;let f=[...this.querySelectorAll("track")].filter(({kind:E,src:b})=>b&&(E==="subtitles"||E==="captions")),m=[],p=0;f.length&&(h.tracks=f.map(E=>{let b=++p;m.length===0&&E.track.mode==="showing"&&m.push(b);let T=new chrome.cast.media.Track(b,chrome.cast.media.TrackType.TEXT);return T.trackContentId=E.src,T.trackContentType="text/vtt",T.subtype=E.kind==="captions"?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,T.name=E.label,T.language=E.srclang,T})),this.castStreamType==="live"?h.streamType=chrome.cast.media.StreamType.LIVE:h.streamType=chrome.cast.media.StreamType.BUFFERED,h.metadata=new chrome.cast.media.GenericMediaMetadata,h.metadata.title=this.title,h.metadata.images=[{url:this.poster}];let g=new chrome.cast.media.LoadRequest(h);g.currentTime=(u=super.currentTime)!=null?u:0,g.autoplay=!I(this,r).paused,g.activeTrackIds=m,await((c=Lp())==null?void 0:c.loadMedia(g)),this.dispatchEvent(new Event("volumechange"))}play(){var u;if(I(this,o,l)){I(this,o,l).isPaused&&((u=I(this,o,l).controller)==null||u.playOrPause());return}return super.play()}pause(){var u;if(I(this,o,l)){I(this,o,l).isPaused||(u=I(this,o,l).controller)==null||u.playOrPause();return}super.pause()}get castOptions(){return I(this,s)}get castReceiver(){var u;return(u=this.getAttribute("cast-receiver"))!=null?u:void 0}set castReceiver(u){this.castReceiver!=u&&this.setAttribute("cast-receiver",`${u}`)}get castSrc(){var u,c,h;return(h=(c=this.getAttribute("cast-src"))!=null?c:(u=this.querySelector("source"))==null?void 0:u.src)!=null?h:this.currentSrc}set castSrc(u){this.castSrc!=u&&this.setAttribute("cast-src",`${u}`)}get castContentType(){var u;return(u=this.getAttribute("cast-content-type"))!=null?u:void 0}set castContentType(u){this.setAttribute("cast-content-type",`${u}`)}get castStreamType(){var u,c;return(c=(u=this.getAttribute("cast-stream-type"))!=null?u:this.streamType)!=null?c:void 0}set castStreamType(u){this.setAttribute("cast-stream-type",`${u}`)}get castCustomData(){return I(this,n)}set castCustomData(u){let c=typeof u;if(!["object","undefined"].includes(c)){console.error(`castCustomData must be nullish or an object but value was of type ${c}`);return}Q(this,n,u)}get readyState(){if(I(this,o,l))switch(I(this,o,l).playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return I(this,o,l)?I(this,o,l).isPaused:super.paused}get muted(){var u;return I(this,o,l)?(u=I(this,o,l))==null?void 0:u.isMuted:super.muted}set muted(u){var c;if(I(this,o,l)){(u&&!I(this,o,l).isMuted||!u&&I(this,o,l).isMuted)&&((c=I(this,o,l).controller)==null||c.muteOrUnmute());return}super.muted=u}get volume(){var u,c;return I(this,o,l)?(c=(u=I(this,o,l))==null?void 0:u.volumeLevel)!=null?c:1:super.volume}set volume(u){var c;if(I(this,o,l)){I(this,o,l).volumeLevel=+u,(c=I(this,o,l).controller)==null||c.setVolumeLevel();return}super.volume=u}get duration(){var u,c,h;return I(this,o,l)&&(u=I(this,o,l))!=null&&u.isMediaLoaded?(h=(c=I(this,o,l))==null?void 0:c.duration)!=null?h:NaN:super.duration}get currentTime(){var u,c,h;return I(this,o,l)&&(u=I(this,o,l))!=null&&u.isMediaLoaded?(h=(c=I(this,o,l))==null?void 0:c.currentTime)!=null?h:0:super.currentTime}set currentTime(u){var c;if(I(this,o,l)){I(this,o,l).currentTime=u,(c=I(this,o,l).controller)==null||c.seek();return}super.currentTime=u}},r=new WeakMap,s=new WeakMap,n=new WeakMap,a=new WeakMap,o=new WeakSet,l=function(){var u,c;return(c=(u=_s.get(this.remote))==null?void 0:u.getCastPlayer)==null?void 0:c.call(u)},d=async function(){I(this,r).paused=lp(t.prototype,this,"paused"),lp(t.prototype,this,"pause").call(this),this.muted=lp(t.prototype,this,"muted");try{await this.load()}catch(u){console.error(u)}},ke(t,"observedAttributes",[...(e=i.observedAttributes)!=null?e:[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"]),t},Tu=class extends Event{constructor(i,e){super(i),ke(this,"track"),this.track=e.track}},gp=new WeakMap;function Y(i){var e;return(e=gp.get(i))!=null?e:Gw(i,{})}function Gw(i,e){let t=gp.get(i);return t||gp.set(i,t={}),Object.assign(t,e)}function vp(i,e){let t=i.videoTracks;Y(e).media=i,Y(e).renditionSet||(Y(e).renditionSet=new Set);let r=Y(t).trackSet;r.add(e);let s=r.size-1;s in bp.prototype||Object.defineProperty(bp.prototype,s,{get(){return[...Y(this).trackSet][s]}}),queueMicrotask(()=>{t.dispatchEvent(new Tu("addtrack",{track:e}))})}function Ep(i){var e;let t=(e=Y(i).media)==null?void 0:e.videoTracks;t&&(Y(t).trackSet.delete(i),queueMicrotask(()=>{t.dispatchEvent(new Tu("removetrack",{track:i}))}))}function Kw(i){var e;let t=(e=Y(i).media.videoTracks)!=null?e:[],r=!1;for(let s of t)s!==i&&(s.selected=!1,r=!0);if(r){if(Y(t).changeRequested)return;Y(t).changeRequested=!0,queueMicrotask(()=>{delete Y(t).changeRequested,t.dispatchEvent(new Event("change"))})}}var ds,us,cs,wn,Va,bp=class extends EventTarget{constructor(){super(),ie(this,wn),ie(this,ds),ie(this,us),ie(this,cs),Y(this).trackSet=new Set}[Symbol.iterator](){return I(this,wn,Va).values()}get length(){return I(this,wn,Va).size}getTrackById(i){var e;return(e=[...I(this,wn,Va)].find(t=>t.id===i))!=null?e:null}get selectedIndex(){return[...I(this,wn,Va)].findIndex(i=>i.selected)}get onaddtrack(){return I(this,ds)}set onaddtrack(i){I(this,ds)&&(this.removeEventListener("addtrack",I(this,ds)),Q(this,ds,void 0)),typeof i=="function"&&(Q(this,ds,i),this.addEventListener("addtrack",i))}get onremovetrack(){return I(this,us)}set onremovetrack(i){I(this,us)&&(this.removeEventListener("removetrack",I(this,us)),Q(this,us,void 0)),typeof i=="function"&&(Q(this,us,i),this.addEventListener("removetrack",i))}get onchange(){return I(this,cs)}set onchange(i){I(this,cs)&&(this.removeEventListener("change",I(this,cs)),Q(this,cs,void 0)),typeof i=="function"&&(Q(this,cs,i),this.addEventListener("change",i))}};ds=new WeakMap,us=new WeakMap,cs=new WeakMap,wn=new WeakSet,Va=function(){return Y(this).trackSet};var _u=class extends Event{constructor(i,e){super(i),ke(this,"rendition"),this.rendition=e.rendition}};function Vw(i,e){let t=Y(i).media.videoRenditions;Y(e).media=Y(i).media,Y(e).track=i;let r=Y(i).renditionSet;r.add(e);let s=r.size-1;s in yp.prototype||Object.defineProperty(yp.prototype,s,{get(){return Cn(this)[s]}}),queueMicrotask(()=>{i.selected&&t.dispatchEvent(new _u("addrendition",{rendition:e}))})}function Ww(i){let e=Y(i).media.videoRenditions,t=Y(i).track;Y(t).renditionSet.delete(i),queueMicrotask(()=>{Y(i).track.selected&&e.dispatchEvent(new _u("removerendition",{rendition:i}))})}function Yw(i){let e=Y(i).media.videoRenditions;!e||Y(e).changeRequested||(Y(e).changeRequested=!0,queueMicrotask(()=>{delete Y(e).changeRequested,Y(i).track.selected&&e.dispatchEvent(new Event("change"))}))}function Cn(i){return[...Y(i).media.videoTracks].filter(e=>e.selected).flatMap(e=>[...Y(e).renditionSet])}var hs,fs,ms,yp=class extends EventTarget{constructor(){super(...arguments),ie(this,hs),ie(this,fs),ie(this,ms)}[Symbol.iterator](){return Cn(this).values()}get length(){return Cn(this).length}getRenditionById(i){var e;return(e=Cn(this).find(t=>`${t.id}`==`${i}`))!=null?e:null}get selectedIndex(){return Cn(this).findIndex(i=>i.selected)}set selectedIndex(i){for(let[e,t]of Cn(this).entries())t.selected=e===i}get onaddrendition(){return I(this,hs)}set onaddrendition(i){I(this,hs)&&(this.removeEventListener("addrendition",I(this,hs)),Q(this,hs,void 0)),typeof i=="function"&&(Q(this,hs,i),this.addEventListener("addrendition",i))}get onremoverendition(){return I(this,fs)}set onremoverendition(i){I(this,fs)&&(this.removeEventListener("removerendition",I(this,fs)),Q(this,fs,void 0)),typeof i=="function"&&(Q(this,fs,i),this.addEventListener("removerendition",i))}get onchange(){return I(this,ms)}set onchange(i){I(this,ms)&&(this.removeEventListener("change",I(this,ms)),Q(this,ms,void 0)),typeof i=="function"&&(Q(this,ms,i),this.addEventListener("change",i))}};hs=new WeakMap,fs=new WeakMap,ms=new WeakMap;var Wa,qw=class{constructor(){ke(this,"src"),ke(this,"id"),ke(this,"width"),ke(this,"height"),ke(this,"bitrate"),ke(this,"frameRate"),ke(this,"codec"),ie(this,Wa,!1)}get selected(){return I(this,Wa)}set selected(i){I(this,Wa)!==i&&(Q(this,Wa,i),Yw(this))}};Wa=new WeakMap;var Ya,yT=class{constructor(){ke(this,"id"),ke(this,"kind"),ke(this,"label",""),ke(this,"language",""),ke(this,"sourceBuffer"),ie(this,Ya,!1)}addRendition(i,e,t,r,s,n){let a=new qw;return a.src=i,a.width=e,a.height=t,a.frameRate=n,a.bitrate=s,a.codec=r,Vw(this,a),a}removeRendition(i){Ww(i)}get selected(){return I(this,Ya)}set selected(i){I(this,Ya)!==i&&(Q(this,Ya,i),i===!0&&Kw(this))}};Ya=new WeakMap;function jw(i,e){let t=Y(i).media.audioRenditions;Y(e).media=Y(i).media,Y(e).track=i;let r=Y(i).renditionSet;r.add(e);let s=r.size-1;s in Tp.prototype||Object.defineProperty(Tp.prototype,s,{get(){return Dn(this)[s]}}),queueMicrotask(()=>{i.enabled&&t.dispatchEvent(new _u("addrendition",{rendition:e}))})}function zw(i){let e=Y(i).media.audioRenditions,t=Y(i).track;Y(t).renditionSet.delete(i),queueMicrotask(()=>{Y(i).track.enabled&&e.dispatchEvent(new _u("removerendition",{rendition:i}))})}function Xw(i){let e=Y(i).media.audioRenditions;!e||Y(e).changeRequested||(Y(e).changeRequested=!0,queueMicrotask(()=>{delete Y(e).changeRequested,Y(i).track.enabled&&e.dispatchEvent(new Event("change"))}))}function Dn(i){return[...Y(i).media.audioTracks].filter(e=>e.enabled).flatMap(e=>[...Y(e).renditionSet])}var ps,gs,vs,Tp=class extends EventTarget{constructor(){super(...arguments),ie(this,ps),ie(this,gs),ie(this,vs)}[Symbol.iterator](){return Dn(this).values()}get length(){return Dn(this).length}getRenditionById(i){var e;return(e=Dn(this).find(t=>`${t.id}`==`${i}`))!=null?e:null}get selectedIndex(){return Dn(this).findIndex(i=>i.selected)}set selectedIndex(i){for(let[e,t]of Dn(this).entries())t.selected=e===i}get onaddrendition(){return I(this,ps)}set onaddrendition(i){I(this,ps)&&(this.removeEventListener("addrendition",I(this,ps)),Q(this,ps,void 0)),typeof i=="function"&&(Q(this,ps,i),this.addEventListener("addrendition",i))}get onremoverendition(){return I(this,gs)}set onremoverendition(i){I(this,gs)&&(this.removeEventListener("removerendition",I(this,gs)),Q(this,gs,void 0)),typeof i=="function"&&(Q(this,gs,i),this.addEventListener("removerendition",i))}get onchange(){return I(this,vs)}set onchange(i){I(this,vs)&&(this.removeEventListener("change",I(this,vs)),Q(this,vs,void 0)),typeof i=="function"&&(Q(this,vs,i),this.addEventListener("change",i))}};ps=new WeakMap,gs=new WeakMap,vs=new WeakMap;var qa,Qw=class{constructor(){ke(this,"src"),ke(this,"id"),ke(this,"bitrate"),ke(this,"codec"),ie(this,qa,!1)}get selected(){return I(this,qa)}set selected(i){I(this,qa)!==i&&(Q(this,qa,i),Xw(this))}};qa=new WeakMap;function _p(i,e){let t=i.audioTracks;Y(e).media=i,Y(e).renditionSet||(Y(e).renditionSet=new Set);let r=Y(t).trackSet;r.add(e);let s=r.size-1;s in Sp.prototype||Object.defineProperty(Sp.prototype,s,{get(){return[...Y(this).trackSet][s]}}),queueMicrotask(()=>{t.dispatchEvent(new Tu("addtrack",{track:e}))})}function Ap(i){var e;let t=(e=Y(i).media)==null?void 0:e.audioTracks;t&&(Y(t).trackSet.delete(i),queueMicrotask(()=>{t.dispatchEvent(new Tu("removetrack",{track:i}))}))}function Zw(i){let e=Y(i).media.audioTracks;!e||Y(e).changeRequested||(Y(e).changeRequested=!0,queueMicrotask(()=>{delete Y(e).changeRequested,e.dispatchEvent(new Event("change"))}))}var Es,bs,ys,ja,du,Sp=class extends EventTarget{constructor(){super(),ie(this,ja),ie(this,Es),ie(this,bs),ie(this,ys),Y(this).trackSet=new Set}[Symbol.iterator](){return I(this,ja,du).values()}get length(){return I(this,ja,du).size}getTrackById(i){var e;return(e=[...I(this,ja,du)].find(t=>t.id===i))!=null?e:null}get onaddtrack(){return I(this,Es)}set onaddtrack(i){I(this,Es)&&(this.removeEventListener("addtrack",I(this,Es)),Q(this,Es,void 0)),typeof i=="function"&&(Q(this,Es,i),this.addEventListener("addtrack",i))}get onremovetrack(){return I(this,bs)}set onremovetrack(i){I(this,bs)&&(this.removeEventListener("removetrack",I(this,bs)),Q(this,bs,void 0)),typeof i=="function"&&(Q(this,bs,i),this.addEventListener("removetrack",i))}get onchange(){return I(this,ys)}set onchange(i){I(this,ys)&&(this.removeEventListener("change",I(this,ys)),Q(this,ys,void 0)),typeof i=="function"&&(Q(this,ys,i),this.addEventListener("change",i))}};Es=new WeakMap,bs=new WeakMap,ys=new WeakMap,ja=new WeakSet,du=function(){return Y(this).trackSet};var za,TT=class{constructor(){ke(this,"id"),ke(this,"kind"),ke(this,"label",""),ke(this,"language",""),ke(this,"sourceBuffer"),ie(this,za,!1)}addRendition(i,e,t){let r=new Qw;return r.src=i,r.codec=e,r.bitrate=t,jw(this,r),r}removeRendition(i){zw(i)}get enabled(){return I(this,za)}set enabled(i){I(this,za)!==i&&(Q(this,za,i),Zw(this))}};za=new WeakMap;var oT=Eu(globalThis.HTMLMediaElement,"video"),lT=Eu(globalThis.HTMLMediaElement,"audio");function Jw(i){if(!(i!=null&&i.prototype))return i;let e=Eu(i,"video");(!e||`${e}`.includes("[native code]"))&&Object.defineProperty(i.prototype,"videoTracks",{get(){return eC(this)}});let t=Eu(i,"audio");(!t||`${t}`.includes("[native code]"))&&Object.defineProperty(i.prototype,"audioTracks",{get(){return tC(this)}}),"addVideoTrack"in i.prototype||(i.prototype.addVideoTrack=function(n,a="",o=""){let l=new yT;return l.kind=n,l.label=a,l.language=o,vp(this,l),l}),"removeVideoTrack"in i.prototype||(i.prototype.removeVideoTrack=Ep),"addAudioTrack"in i.prototype||(i.prototype.addAudioTrack=function(n,a="",o=""){let l=new TT;return l.kind=n,l.label=a,l.language=o,_p(this,l),l}),"removeAudioTrack"in i.prototype||(i.prototype.removeAudioTrack=Ap),"videoRenditions"in i.prototype||Object.defineProperty(i.prototype,"videoRenditions",{get(){return r(this)}});let r=n=>{let a=Y(n).videoRenditions;return a||(a=new yp,Y(a).media=n,Y(n).videoRenditions=a),a};"audioRenditions"in i.prototype||Object.defineProperty(i.prototype,"audioRenditions",{get(){return s(this)}});let s=n=>{let a=Y(n).audioRenditions;return a||(a=new Tp,Y(a).media=n,Y(n).audioRenditions=a),a};return i}function Eu(i,e){var t;if(i!=null&&i.prototype)return(t=Object.getOwnPropertyDescriptor(i.prototype,`${e}Tracks`))==null?void 0:t.get}function eC(i){var e;let t=Y(i).videoTracks;if(!t&&(t=new bp,Y(i).videoTracks=t,oT)){let r=oT.call((e=i.nativeEl)!=null?e:i);for(let s of r)vp(i,s);r.addEventListener("change",()=>{t.dispatchEvent(new Event("change"))}),r.addEventListener("addtrack",s=>{if([...t].some(n=>n instanceof yT)){for(let n of r)Ep(n);return}vp(i,s.track)}),r.addEventListener("removetrack",s=>{Ep(s.track)})}return t}function tC(i){var e;let t=Y(i).audioTracks;if(!t&&(t=new Sp,Y(i).audioTracks=t,lT)){let r=lT.call((e=i.nativeEl)!=null?e:i);for(let s of r)_p(i,s);r.addEventListener("change",()=>{t.dispatchEvent(new Event("change"))}),r.addEventListener("addtrack",s=>{if([...t].some(n=>n instanceof TT)){for(let n of r)Ap(n);return}_p(i,s.track)}),r.addEventListener("removetrack",s=>{Ap(s.track)})}return t}yu.push("castchange","entercast","leavecast");var w={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type"},iC=Object.values(w),dT=Lw(),uT="mux-video",Ni,Xa,uu,Qa,cu,hu,fu,mu,pu,Za,gu,rC=class extends up{constructor(){super(),ie(this,Za),ie(this,Ni),ie(this,Xa),ie(this,uu),ie(this,Qa,{}),ie(this,cu,{}),ie(this,hu),ie(this,fu),ie(this,mu),ie(this,pu),Q(this,uu,ru())}static get NAME(){return uT}static get VERSION(){return dT}static get observedAttributes(){var i;return[...iC,...(i=up.observedAttributes)!=null?i:[]]}get preferCmcd(){var i;return(i=this.getAttribute(w.PREFER_CMCD))!=null?i:void 0}set preferCmcd(i){i!==this.preferCmcd&&(i?Ln.includes(i)?this.setAttribute(w.PREFER_CMCD,i):console.warn(`Invalid value for preferCmcd. Must be one of ${Ln.join()}`):this.removeAttribute(w.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(w.PLAYER_INIT_TIME)?+this.getAttribute(w.PLAYER_INIT_TIME):I(this,uu)}set playerInitTime(i){i!=this.playerInitTime&&(i==null?this.removeAttribute(w.PLAYER_INIT_TIME):this.setAttribute(w.PLAYER_INIT_TIME,`${+i}`))}get playerSoftwareName(){var i;return(i=I(this,mu))!=null?i:uT}set playerSoftwareName(i){Q(this,mu,i)}get playerSoftwareVersion(){var i;return(i=I(this,fu))!=null?i:dT}set playerSoftwareVersion(i){Q(this,fu,i)}get _hls(){var i;return(i=I(this,Ni))==null?void 0:i.engine}get mux(){var i;return(i=this.nativeEl)==null?void 0:i.mux}get error(){var i;return(i=sp(this.nativeEl))!=null?i:null}get errorTranslator(){return I(this,pu)}set errorTranslator(i){Q(this,pu,i)}get src(){return this.getAttribute("src")}set src(i){i!==this.src&&(i==null?this.removeAttribute("src"):this.setAttribute("src",i))}get type(){var i;return(i=this.getAttribute(w.TYPE))!=null?i:void 0}set type(i){i!==this.type&&(i?this.setAttribute(w.TYPE,i):this.removeAttribute(w.TYPE))}get autoplay(){let i=this.getAttribute("autoplay");return i===null?!1:i===""?!0:i}set autoplay(i){let e=this.autoplay;i!==e&&(i?this.setAttribute("autoplay",typeof i=="string"?i:""):this.removeAttribute("autoplay"))}get preload(){let i=this.getAttribute("preload");return i===""?"auto":["none","metadata","auto"].includes(i)?i:super.preload}set preload(i){i!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(i)?this.setAttribute("preload",i):this.removeAttribute("preload"))}get debug(){return this.getAttribute(w.DEBUG)!=null}set debug(i){i!==this.debug&&(i?this.setAttribute(w.DEBUG,""):this.removeAttribute(w.DEBUG))}get disableTracking(){return this.hasAttribute(w.DISABLE_TRACKING)}set disableTracking(i){i!==this.disableTracking&&this.toggleAttribute(w.DISABLE_TRACKING,!!i)}get disableCookies(){return this.hasAttribute(w.DISABLE_COOKIES)}set disableCookies(i){i!==this.disableCookies&&(i?this.setAttribute(w.DISABLE_COOKIES,""):this.removeAttribute(w.DISABLE_COOKIES))}get startTime(){let i=this.getAttribute(w.START_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set startTime(i){i!==this.startTime&&(i==null?this.removeAttribute(w.START_TIME):this.setAttribute(w.START_TIME,`${i}`))}get playbackId(){var i;return this.hasAttribute(w.PLAYBACK_ID)?this.getAttribute(w.PLAYBACK_ID):(i=rp(this.src))!=null?i:void 0}set playbackId(i){i!==this.playbackId&&(i?this.setAttribute(w.PLAYBACK_ID,i):this.removeAttribute(w.PLAYBACK_ID))}get maxResolution(){var i;return(i=this.getAttribute(w.MAX_RESOLUTION))!=null?i:void 0}set maxResolution(i){i!==this.maxResolution&&(i?this.setAttribute(w.MAX_RESOLUTION,i):this.removeAttribute(w.MAX_RESOLUTION))}get minResolution(){var i;return(i=this.getAttribute(w.MIN_RESOLUTION))!=null?i:void 0}set minResolution(i){i!==this.minResolution&&(i?this.setAttribute(w.MIN_RESOLUTION,i):this.removeAttribute(w.MIN_RESOLUTION))}get renditionOrder(){var i;return(i=this.getAttribute(w.RENDITION_ORDER))!=null?i:void 0}set renditionOrder(i){i!==this.renditionOrder&&(i?this.setAttribute(w.RENDITION_ORDER,i):this.removeAttribute(w.RENDITION_ORDER))}get programStartTime(){let i=this.getAttribute(w.PROGRAM_START_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set programStartTime(i){i==null?this.removeAttribute(w.PROGRAM_START_TIME):this.setAttribute(w.PROGRAM_START_TIME,`${i}`)}get programEndTime(){let i=this.getAttribute(w.PROGRAM_END_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set programEndTime(i){i==null?this.removeAttribute(w.PROGRAM_END_TIME):this.setAttribute(w.PROGRAM_END_TIME,`${i}`)}get assetStartTime(){let i=this.getAttribute(w.ASSET_START_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set assetStartTime(i){i==null?this.removeAttribute(w.ASSET_START_TIME):this.setAttribute(w.ASSET_START_TIME,`${i}`)}get assetEndTime(){let i=this.getAttribute(w.ASSET_END_TIME);if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}set assetEndTime(i){i==null?this.removeAttribute(w.ASSET_END_TIME):this.setAttribute(w.ASSET_END_TIME,`${i}`)}get customDomain(){var i;return(i=this.getAttribute(w.CUSTOM_DOMAIN))!=null?i:void 0}set customDomain(i){i!==this.customDomain&&(i?this.setAttribute(w.CUSTOM_DOMAIN,i):this.removeAttribute(w.CUSTOM_DOMAIN))}get drmToken(){var i;return(i=this.getAttribute(w.DRM_TOKEN))!=null?i:void 0}set drmToken(i){i!==this.drmToken&&(i?this.setAttribute(w.DRM_TOKEN,i):this.removeAttribute(w.DRM_TOKEN))}get playbackToken(){var i,e,t,r;if(this.hasAttribute(w.PLAYBACK_TOKEN))return(i=this.getAttribute(w.PLAYBACK_TOKEN))!=null?i:void 0;if(this.hasAttribute(w.PLAYBACK_ID)){let[,s]=eu((e=this.playbackId)!=null?e:"");return(t=new URLSearchParams(s).get("token"))!=null?t:void 0}if(this.src)return(r=new URLSearchParams(this.src).get("token"))!=null?r:void 0}set playbackToken(i){i!==this.playbackToken&&(i?this.setAttribute(w.PLAYBACK_TOKEN,i):this.removeAttribute(w.PLAYBACK_TOKEN))}get tokens(){let i=this.getAttribute(w.PLAYBACK_TOKEN),e=this.getAttribute(w.DRM_TOKEN);return{...I(this,cu),...i!=null?{playback:i}:{},...e!=null?{drm:e}:{}}}set tokens(i){Q(this,cu,i!=null?i:{})}get ended(){return ap(this.nativeEl,this._hls)}get envKey(){var i;return(i=this.getAttribute(w.ENV_KEY))!=null?i:void 0}set envKey(i){i!==this.envKey&&(i?this.setAttribute(w.ENV_KEY,i):this.removeAttribute(w.ENV_KEY))}get beaconCollectionDomain(){var i;return(i=this.getAttribute(w.BEACON_COLLECTION_DOMAIN))!=null?i:void 0}set beaconCollectionDomain(i){i!==this.beaconCollectionDomain&&(i?this.setAttribute(w.BEACON_COLLECTION_DOMAIN,i):this.removeAttribute(w.BEACON_COLLECTION_DOMAIN))}get streamType(){var i;return(i=this.getAttribute(w.STREAM_TYPE))!=null?i:Jd(this.nativeEl)}set streamType(i){i!==this.streamType&&(i?this.setAttribute(w.STREAM_TYPE,i):this.removeAttribute(w.STREAM_TYPE))}get targetLiveWindow(){return this.hasAttribute(w.TARGET_LIVE_WINDOW)?+this.getAttribute(w.TARGET_LIVE_WINDOW):Yy(this.nativeEl)}set targetLiveWindow(i){i!=this.targetLiveWindow&&(i==null?this.removeAttribute(w.TARGET_LIVE_WINDOW):this.setAttribute(w.TARGET_LIVE_WINDOW,`${+i}`))}get liveEdgeStart(){var i,e;if(this.hasAttribute(w.LIVE_EDGE_OFFSET)){let{liveEdgeOffset:t}=this,r=(i=this.nativeEl.seekable.end(0))!=null?i:0,s=(e=this.nativeEl.seekable.start(0))!=null?e:0;return Math.max(s,r-t)}return qy(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(w.LIVE_EDGE_OFFSET))return+this.getAttribute(w.LIVE_EDGE_OFFSET)}set liveEdgeOffset(i){i!=this.liveEdgeOffset&&(i==null?this.removeAttribute(w.LIVE_EDGE_OFFSET):this.setAttribute(w.LIVE_EDGE_OFFSET,`${+i}`))}get seekable(){return nu(this.nativeEl)}async addCuePoints(i){return Zm(this.nativeEl,i)}get activeCuePoint(){return Jm(this.nativeEl)}get cuePoints(){return Fy(this.nativeEl)}async addChapters(i){return tp(this.nativeEl,i)}get activeChapter(){return ip(this.nativeEl)}get chapters(){return $y(this.nativeEl)}getStartDate(){return Hy(this.nativeEl,this._hls)}get currentPdt(){return Gy(this.nativeEl,this._hls)}get preferPlayback(){let i=this.getAttribute(w.PREFER_PLAYBACK);if(i===Xt.MSE||i===Xt.NATIVE)return i}set preferPlayback(i){i!==this.preferPlayback&&(i===Xt.MSE||i===Xt.NATIVE?this.setAttribute(w.PREFER_PLAYBACK,i):this.removeAttribute(w.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(i=>i.startsWith("metadata-")&&![w.METADATA_URL].includes(i)).reduce((i,e)=>{let t=this.getAttribute(e);return t!=null&&(i[e.replace(/^metadata-/,"").replace(/-/g,"_")]=t),i},{}),...I(this,Qa)}}set metadata(i){Q(this,Qa,i!=null?i:{}),this.mux&&this.mux.emit("hb",I(this,Qa))}get _hlsConfig(){return I(this,hu)}set _hlsConfig(i){Q(this,hu,i)}load(){Q(this,Ni,Xy(this,this.nativeEl,I(this,Ni)))}unload(){op(this.nativeEl,I(this,Ni)),Q(this,Ni,void 0)}attributeChangedCallback(i,e,t){var r,s;switch(up.observedAttributes.includes(i)&&!["src","autoplay","preload"].includes(i)&&super.attributeChangedCallback(i,e,t),i){case w.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=t!=null?t:void 0;break;case w.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=t!=null?t:void 0;break;case"src":{let n=!!e,a=!!t;!n&&a?Ne(this,Za,gu).call(this):n&&!a?this.unload():n&&a&&(this.unload(),Ne(this,Za,gu).call(this));break}case"autoplay":if(t===e)break;(r=I(this,Ni))==null||r.setAutoplay(this.autoplay);break;case"preload":if(t===e)break;(s=I(this,Ni))==null||s.setPreload(t);break;case w.PLAYBACK_ID:this.src=Ka(this);break;case w.DEBUG:{let n=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=n);break}case w.METADATA_URL:t&&fetch(t).then(n=>n.json()).then(n=>this.metadata=n).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${t}!`));break;case w.STREAM_TYPE:(t==null||t!==e)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case w.TARGET_LIVE_WINDOW:(t==null||t!==e)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;default:break}}connectedCallback(){var i;(i=super.connectedCallback)==null||i.call(this),this.nativeEl&&this.src&&!I(this,Ni)&&Ne(this,Za,gu).call(this)}disconnectedCallback(){this.unload()}};Ni=new WeakMap,Xa=new WeakMap,uu=new WeakMap,Qa=new WeakMap,cu=new WeakMap,hu=new WeakMap,fu=new WeakMap,mu=new WeakMap,pu=new WeakMap,Za=new WeakSet,gu=async function(){I(this,Xa)||(await Q(this,Xa,Promise.resolve()),Q(this,Xa,null),this.load())};var vu,xp=class extends Hw(Jw(rC)){constructor(){super(...arguments),ie(this,vu)}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 i;return(i=I(this,vu))!=null?i:this.muxCastCustomData}set castCustomData(i){Q(this,vu,i)}};vu=new WeakMap;dp.customElements.get("mux-video")||(dp.customElements.define("mux-video",xp),dp.MuxVideoElement=xp);var _T=xp;function AT(i){let e="";return Object.entries(i).forEach(([t,r])=>{r!=null&&(e+=`${Au(t)}: ${r}; `)}),e?e.trim():void 0}function Au(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Su(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function Rt(i){if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}function wp(i){let e=sC(i).toString();return e?"?"+e:""}function sC(i){let e={};for(let t in i)i[t]!=null&&(e[t]=i[t]);return new URLSearchParams(e)}var Cp=(i,e)=>!i||!e?!1:i.contains(e)?!0:Cp(i,e.getRootNode().host);var ST="mux.com",nC=()=>{try{return"3.3.0"}catch{}return"UNKNOWN"},aC=nC(),Ru=()=>aC,xT=(i,{token:e,customDomain:t=ST,thumbnailTime:r,programTime:s}={})=>{var o;let n=e==null?r:void 0,{aud:a}=(o=Sr(e))!=null?o:{};if(!(e&&a!=="t"))return`https://image.${t}/${i}/thumbnail.webp${wp({token:e,time:n,program_time:s})}`},RT=(i,{token:e,customDomain:t=ST,programStartTime:r,programEndTime:s}={})=>{var a;let{aud:n}=(a=Sr(e))!=null?a:{};if(!(e&&n!=="s"))return`https://image.${t}/${i}/storyboard.vtt${wp({token:e,format:"webp",program_start_time:r,program_end_time:s})}`},Ja=i=>{if(i){if([Re.LIVE,Re.ON_DEMAND].includes(i))return i;if(i!=null&&i.includes("live"))return Re.LIVE}};var oC={crossorigin:"crossOrigin",playsinline:"playsInline"};function IT(i){var e;return(e=oC[i])!=null?e:Su(i)}var Ss,xs,It,xu=class{constructor(e,t){kt(this,Ss);kt(this,xs);kt(this,It,[]);$t(this,Ss,e),$t(this,xs,t)}[Symbol.iterator](){return _e(this,It).values()}get length(){return _e(this,It).length}get value(){var e;return(e=_e(this,It).join(" "))!=null?e:""}set value(e){var t;e!==this.value&&($t(this,It,[]),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return _e(this,It)[e]}values(){return _e(this,It).values()}keys(){return _e(this,It).keys()}forEach(e){_e(this,It).forEach(e)}add(...e){var t,r;e.forEach(s=>{this.contains(s)||_e(this,It).push(s)}),!(this.value===""&&!((t=_e(this,Ss))!=null&&t.hasAttribute(`${_e(this,xs)}`)))&&((r=_e(this,Ss))==null||r.setAttribute(`${_e(this,xs)}`,`${this.value}`))}remove(...e){var t;e.forEach(r=>{_e(this,It).splice(_e(this,It).indexOf(r),1)}),(t=_e(this,Ss))==null||t.setAttribute(`${_e(this,xs)}`,`${this.value}`)}contains(e){return _e(this,It).includes(e)}toggle(e,t){return typeof t!="undefined"?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)}};Ss=new WeakMap,xs=new WeakMap,It=new WeakMap;var LT=`[mux-player ${Ru()}]`;function Ui(...i){console.warn(LT,...i)}function Ut(...i){console.error(LT,...i)}function Dp(i){var t;let e=(t=i.message)!=null?t:"";i.context&&(e+=` ${i.context}`),i.file&&(e+=` ${j("Read more: ")}
1323
1323
  https://github.com/muxinc/elements/blob/main/errors/${i.file}`),Ui(e)}var At={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},Rs={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},wT=Object.freeze({length:0,start(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),lC=yu.filter(i=>i!=="error"),dC=Object.values(At).filter(i=>![At.PLAYSINLINE].includes(i)),uC=Object.values(Rs),Mp=class extends wt.HTMLElement{static get observedAttributes(){return[...dC,...uC]}constructor(){super()}init(){lC.forEach(e=>{var t;(t=this.media)==null||t.addEventListener(e,r=>{this.dispatchEvent(new Event(r.type))})})}attributeChangedCallback(e,t,r){var s,n;switch(e){case Rs.MUTED:{this.media&&(this.media.muted=r!=null,this.media.defaultMuted=r!=null);return}case Rs.VOLUME:{let a=(s=Rt(r))!=null?s:1;this.media&&(this.media.volume=a);return}case Rs.PLAYBACKRATE:{let a=(n=Rt(r))!=null?n:1;this.media&&(this.media.playbackRate=a,this.media.defaultPlaybackRate=a);return}}}play(){var e,t;return(t=(e=this.media)==null?void 0:e.play())!=null?t:Promise.reject()}pause(){var e;(e=this.media)==null||e.pause()}load(){var e;(e=this.media)==null||e.load()}requestCast(e){var t;return(t=this.media)==null?void 0:t.requestCast(e)}get media(){var e;return(e=this.shadowRoot)==null?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(t=(e=this.media)==null?void 0:e.paused)!=null?t:!0}get duration(){var e,t;return(t=(e=this.media)==null?void 0:e.duration)!=null?t:NaN}get ended(){var e,t;return(t=(e=this.media)==null?void 0:e.ended)!=null?t:!1}get buffered(){var e,t;return(t=(e=this.media)==null?void 0:e.buffered)!=null?t:wT}get seekable(){var e,t;return(t=(e=this.media)==null?void 0:e.seekable)!=null?t:wT}get readyState(){var e,t;return(t=(e=this.media)==null?void 0:e.readyState)!=null?t:0}get videoWidth(){var e,t;return(t=(e=this.media)==null?void 0:e.videoWidth)!=null?t:0}get videoHeight(){var e,t;return(t=(e=this.media)==null?void 0:e.videoHeight)!=null?t:0}get currentSrc(){var e,t;return(t=(e=this.media)==null?void 0:e.currentSrc)!=null?t:""}get currentTime(){var e,t;return(t=(e=this.media)==null?void 0:e.currentTime)!=null?t:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,t;return(t=(e=this.media)==null?void 0:e.volume)!=null?t:1}set volume(e){this.media&&(this.media.volume=Number(e))}get playbackRate(){var e,t;return(t=(e=this.media)==null?void 0:e.playbackRate)!=null?t:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get defaultPlaybackRate(){var e;return(e=Rt(this.getAttribute(Rs.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(Rs.PLAYBACKRATE,`${e}`):this.removeAttribute(Rs.PLAYBACKRATE)}get crossOrigin(){return eo(this,At.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(At.CROSSORIGIN,`${e}`)}get autoplay(){return eo(this,At.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(At.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(At.AUTOPLAY)}get loop(){return eo(this,At.LOOP)!=null}set loop(e){e?this.setAttribute(At.LOOP,""):this.removeAttribute(At.LOOP)}get muted(){var e,t;return(t=(e=this.media)==null?void 0:e.muted)!=null?t:!1}set muted(e){this.media&&(this.media.muted=!!e)}get defaultMuted(){return eo(this,At.MUTED)!=null}set defaultMuted(e){e?this.setAttribute(At.MUTED,""):this.removeAttribute(At.MUTED)}get playsInline(){return eo(this,At.PLAYSINLINE)!=null}set playsInline(e){Ut("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(At.PRELOAD,e):this.removeAttribute(At.PRELOAD)}};function eo(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}var Pp=Mp;var OT=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},de=(i,e,t)=>(OT(i,e,"read from private field"),t?t.call(i):e.get(i)),Fi=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},rr=(i,e,t,r)=>(OT(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),Pn,Iu,Is,to,Ir,Lr,kr,Ls,On,Lu,fi,CT=1,DT=0,cC=1,hC={processCallback(i,e,t){if(t){for(let[r,s]of e)if(r in t){let n=t[r];typeof n=="boolean"&&s instanceof Lt&&typeof s.element[s.attributeName]=="boolean"?s.booleanValue=n:typeof n=="function"&&s instanceof Lt?s.element[s.attributeName]=n:s.value=n}}}},sr=class extends R.DocumentFragment{constructor(e,t,r=hC){var s;super(),Fi(this,Pn,void 0),Fi(this,Iu,void 0),this.append(e.content.cloneNode(!0)),rr(this,Pn,NT(this)),rr(this,Iu,r),(s=r.createCallback)==null||s.call(r,this,de(this,Pn),t),r.processCallback(this,de(this,Pn),t)}update(e){de(this,Iu).processCallback(this,de(this,Pn),e)}};Pn=new WeakMap;Iu=new WeakMap;var NT=(i,e=[])=>{let t,r;for(let s of i.attributes||[])if(s.value.includes("{{")){let n=new Op;for([t,r]of PT(s.value))if(!t)n.append(r);else{let a=new Lt(i,s.name,s.namespaceURI);n.append(a),e.push([r,a])}s.value=n.toString()}for(let s of i.childNodes)if(s.nodeType===CT&&!(s instanceof HTMLTemplateElement))NT(s,e);else{let n=s.data;if(s.nodeType===CT||n.includes("{{")){let a=[];if(n)for([t,r]of PT(n))if(!t)a.push(new Text(r));else{let o=new nr(i);a.push(o),e.push([r,o])}else if(s instanceof HTMLTemplateElement){let o=new io(i,s);a.push(o),e.push([o.expression,o])}s.replaceWith(...a.flatMap(o=>o.replacementNodes||[o]))}}return e},MT={},PT=i=>{let e="",t=0,r=MT[i],s=0,n;if(r)return r;for(r=[];n=i[s];s++)n==="{"&&i[s+1]==="{"&&i[s-1]!=="\\"&&i[s+2]&&++t==1?(e&&r.push([DT,e]),e="",s++):n==="}"&&i[s+1]==="}"&&i[s-1]!=="\\"&&!--t?(r.push([cC,e.trim()]),e="",s++):e+=n||"";return e&&r.push([DT,(t>0?"{{":"")+e]),MT[i]=r},fC=11,ku=class{get value(){return""}set value(e){}toString(){return this.value}},UT=new WeakMap,Op=class{constructor(){Fi(this,Is,[])}[Symbol.iterator](){return de(this,Is).values()}get length(){return de(this,Is).length}item(e){return de(this,Is)[e]}append(...e){for(let t of e)t instanceof Lt&&UT.set(t,this),de(this,Is).push(t)}toString(){return de(this,Is).join("")}};Is=new WeakMap;var Lt=class extends ku{constructor(e,t,r){super(),Fi(this,Ls),Fi(this,to,""),Fi(this,Ir,void 0),Fi(this,Lr,void 0),Fi(this,kr,void 0),rr(this,Ir,e),rr(this,Lr,t),rr(this,kr,r)}get attributeName(){return de(this,Lr)}get attributeNamespace(){return de(this,kr)}get element(){return de(this,Ir)}get value(){return de(this,to)}set value(e){de(this,to)!==e&&(rr(this,to,e),!de(this,Ls,On)||de(this,Ls,On).length===1?e==null?de(this,Ir).removeAttributeNS(de(this,kr),de(this,Lr)):de(this,Ir).setAttributeNS(de(this,kr),de(this,Lr),e):de(this,Ir).setAttributeNS(de(this,kr),de(this,Lr),de(this,Ls,On).toString()))}get booleanValue(){return de(this,Ir).hasAttributeNS(de(this,kr),de(this,Lr))}set booleanValue(e){if(!de(this,Ls,On)||de(this,Ls,On).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};to=new WeakMap;Ir=new WeakMap;Lr=new WeakMap;kr=new WeakMap;Ls=new WeakSet;On=function(){return UT.get(this)};var nr=class extends ku{constructor(e,t){super(),Fi(this,Lu,void 0),Fi(this,fi,void 0),rr(this,Lu,e),rr(this,fi,t?[...t]:[new Text])}get replacementNodes(){return de(this,fi)}get parentNode(){return de(this,Lu)}get nextSibling(){return de(this,fi)[de(this,fi).length-1].nextSibling}get previousSibling(){return de(this,fi)[0].previousSibling}get value(){return de(this,fi).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){let t=e.flat().flatMap(r=>r==null?[new Text]:r.forEach?[...r]:r.nodeType===fC?[...r.childNodes]:r.nodeType?[r]:[new Text(r)]);t.length||t.push(new Text),rr(this,fi,mC(de(this,fi)[0].parentNode,de(this,fi),t,this.nextSibling))}};Lu=new WeakMap;fi=new WeakMap;var io=class extends nr{constructor(e,t){let r=t.getAttribute("directive")||t.getAttribute("type"),s=t.getAttribute("expression")||t.getAttribute(r)||"";s.startsWith("{{")&&(s=s.trim().slice(2,-2).trim()),super(e),this.expression=s,this.template=t,this.directive=r}};function mC(i,e,t,r=null){let s=0,n,a,o,l=t.length,d=e.length;for(;s<l&&s<d&&e[s]==t[s];)s++;for(;s<l&&s<d&&t[l-1]==e[d-1];)r=t[--d,--l];if(s==d)for(;s<l;)i.insertBefore(t[s++],r);if(s==l)for(;s<d;)i.removeChild(e[s++]);else{for(n=e[s];s<l;)o=t[s++],a=n?n.nextSibling:r,n==o?n=a:s<l&&t[s]==a?(i.replaceChild(o,n),n=a):i.insertBefore(o,n);for(;n!=r;)a=n.nextSibling,i.removeChild(n),n=a}return t}var FT={string:i=>String(i)},Cu=class{constructor(e){this.template=e,this.state=void 0}},ks=new WeakMap,ws=new WeakMap,Np={partial:(i,e)=>{e[i.expression]=new Cu(i.template)},if:(i,e)=>{var t;if($T(i.expression,e))if(ks.get(i)!==i.template){ks.set(i,i.template);let r=new sr(i.template,e,Du);i.replace(r),ws.set(i,r)}else(t=ws.get(i))==null||t.update(e);else i.replace(""),ks.delete(i),ws.delete(i)}},pC=Object.keys(Np),Du={processCallback(i,e,t){var r,s;if(t)for(let[n,a]of e){if(a instanceof io){if(!a.directive){let l=pC.find(d=>a.template.hasAttribute(d));l&&(a.directive=l,a.expression=a.template.getAttribute(l))}(r=Np[a.directive])==null||r.call(Np,a,t);continue}let o=$T(n,t);if(o instanceof Cu){ks.get(a)!==o.template?(ks.set(a,o.template),o=new sr(o.template,o.state,Du),a.value=o,ws.set(a,o)):(s=ws.get(a))==null||s.update(o.state);continue}o?(a instanceof Lt&&a.attributeName.startsWith("aria-")&&(o=String(o)),a instanceof Lt?typeof o=="boolean"?a.booleanValue=o:typeof o=="function"?a.element[a.attributeName]=o:a.value=o:(a.value=o,ks.delete(a),ws.delete(a))):a instanceof Lt?a.value=void 0:(a.value=void 0,ks.delete(a),ws.delete(a))}}},BT={"!":i=>!i,"!!":i=>!!i,"==":(i,e)=>i==e,"!=":(i,e)=>i!=e,">":(i,e)=>i>e,">=":(i,e)=>i>=e,"<":(i,e)=>i<e,"<=":(i,e)=>i<=e,"??":(i,e)=>i!=null?i:e,"|":(i,e)=>{var t;return(t=FT[e])==null?void 0:t.call(FT,i)}};function gC(i){return vC(i,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function $T(i,e={}){var t,r,s,n,a,o,l;let d=gC(i);if(d.length===0||d.some(({type:u})=>!u))return ro(i);if(((t=d[0])==null?void 0:t.token)===">"){let u=e[(r=d[1])==null?void 0:r.token];if(!u)return ro(i);let c={...e};u.state=c;let h=d.slice(2);for(let f=0;f<h.length;f+=3){let m=(s=h[f])==null?void 0:s.token,p=(n=h[f+1])==null?void 0:n.token,g=(a=h[f+2])==null?void 0:a.token;m&&p==="="&&(c[m]=so(g,e))}return u}if(d.length===1)return wu(d[0])?so(d[0].token,e):ro(i);if(d.length===2){let u=(o=d[0])==null?void 0:o.token,c=BT[u];if(!c||!wu(d[1]))return ro(i);let h=so(d[1].token,e);return c(h)}if(d.length===3){let u=(l=d[1])==null?void 0:l.token,c=BT[u];if(!c||!wu(d[0])||!wu(d[2]))return ro(i);let h=so(d[0].token,e);if(u==="|")return c(h,d[2].token);let f=so(d[2].token,e);return c(h,f)}}function ro(i){return console.warn(`Warning: invalid expression \`${i}\``),!1}function wu({type:i}){return["number","boolean","string","param"].includes(i)}function so(i,e){let t=i[0],r=i.slice(-1);return i==="true"||i==="false"?i==="true":t===r&&["'",'"'].includes(t)?i.slice(1,-1):Do(i)?parseFloat(i):e[i]}function vC(i,e){let t,r,s,n=[];for(;i;){s=null,t=i.length;for(let a in e)r=e[a].exec(i),r&&r.index<t&&(s={token:r[0],type:a,matches:r.slice(1)},t=r.index);t&&n.push({token:i.substr(0,t),type:void 0}),s&&n.push(s),i=i.substr(t+(s?s.token.length:0))}return n}var Gp=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Bp=(i,e,t)=>(Gp(i,e,"read from private field"),t?t.call(i):e.get(i)),no=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Cs=(i,e,t,r)=>(Gp(i,e,"write to private field"),r?r.call(i,t):e.set(i,t),t),Up=(i,e,t)=>(Gp(i,e,"access private method"),t),Nn,Mu,Un,$p,HT,Pu,Hp,Fp={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},GT=F.createElement("template");GT.innerHTML=`
1324
1324
  <style>
1325
1325
  :host {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mux/mux-player",
3
- "version": "3.2.5-canary.5",
3
+ "version": "3.3.0",
4
4
  "description": "An open source Mux player web component that Just Works™",
5
5
  "homepage": "https://mux.com/player",
6
6
  "keywords": [
@@ -93,8 +93,8 @@
93
93
  "build": "npm-run-all --parallel 'build:esm --minify' 'build:iife --minify' 'build:cjs --minify' 'build:esm-module --minify' 'build:themes'"
94
94
  },
95
95
  "dependencies": {
96
- "@mux/mux-video": "0.24.2",
97
- "@mux/playback-core": "0.28.2",
96
+ "@mux/mux-video": "0.24.3",
97
+ "@mux/playback-core": "0.28.3",
98
98
  "media-chrome": "~4.5.0",
99
99
  "player.style": "^0.1.4"
100
100
  },