@mux/mux-player 3.6.1-canary.0 → 3.6.1

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/base.cjs.js CHANGED
@@ -1,11 +1,11 @@
1
- "use strict";var Jn=Object.defineProperty;var Nm=Object.getOwnPropertyDescriptor;var Pm=Object.getOwnPropertyNames;var Um=Object.prototype.hasOwnProperty;var Rd=t=>{throw TypeError(t)};var Hm=(t,e)=>{for(var i in e)Jn(t,i,{get:e[i],enumerable:!0})},Bm=(t,e,i,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Pm(e))!Um.call(t,r)&&r!==i&&Jn(t,r,{get:()=>e[r],enumerable:!(a=Nm(e,r))||a.enumerable});return t};var $m=t=>Bm(Jn({},"__esModule",{value:!0}),t);var jn=(t,e,i)=>e.has(t)||Rd("Cannot "+i);var U=(t,e,i)=>(jn(t,e,"read from private field"),i?i.call(t):e.get(t)),he=(t,e,i)=>e.has(t)?Rd("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),ye=(t,e,i,a)=>(jn(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),X=(t,e,i)=>(jn(t,e,"access private method"),i);var Cv={};Hm(Cv,{MediaError:()=>b.MediaError,default:()=>Mv,generatePlayerInitTime:()=>w.generatePlayerInitTime,getVideoAttribute:()=>Ht,playerSoftwareName:()=>ud,playerSoftwareVersion:()=>dd});module.exports=$m(Cv);var gi=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class t extends gi{}globalThis.DocumentFragment=t}var Ia=class extends gi{},es=class extends gi{},Wm={get(t){},define(t,e,i){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(Ia)}},Ma,ts=class{constructor(e,i={}){he(this,Ma);ye(this,Ma,i==null?void 0:i.detail)}get detail(){return U(this,Ma)}initCustomEvent(){}};Ma=new WeakMap;function Fm(t,e){return new Ia}var xd={document:{createElement:Fm},DocumentFragment,customElements:Wm,CustomEvent:ts,EventTarget:gi,HTMLElement:Ia,HTMLVideoElement:es},Dd=typeof window=="undefined"||typeof globalThis.customElements=="undefined",ke=Dd?xd:globalThis,_i=Dd?xd.document:globalThis.document;var p={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_TOGGLE_SUBTITLES_REQUEST:"mediatogglesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_AUDIO_TRACK_REQUEST:"mediaaudiotrackrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},L={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},is={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_BUFFERED:"mediaBuffered",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_CHAPTERS_CUES:"mediaChaptersCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_HEIGHT:"mediaHeight",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_IS_PIP:"mediaIsPip",MEDIA_LOADING:"mediaLoading",MEDIA_MUTED:"mediaMuted",MEDIA_PAUSED:"mediaPaused",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_LANG:"mediaLang",MEDIA_WIDTH:"mediaWidth"},Od=Object.entries(is),n=Od.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{}),Vm={USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"},Ce=Od.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{...Vm}),Dv=Object.entries(Ce).reduce((t,[e,i])=>{let a=n[e];return a&&(t[i]=a),t},{userinactivechange:"userinactive"}),Nd=Object.entries(n).reduce((t,[e,i])=>{let a=Ce[e];return a&&(t[i]=a),t},{userinactive:"userinactivechange"}),pe={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},gt={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var as={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},fe={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},xe={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"};var Pd={INLINE:"inline",FULLSCREEN:"fullscreen",PICTURE_IN_PICTURE:"picture-in-picture"};function Ud(t){return t==null?void 0:t.map(Gm).join(" ")}function Hd(t){return t==null?void 0:t.split(/\s+/).map(Ym)}function Gm(t){if(t){let{id:e,width:i,height:a}=t;return[e,i,a].filter(r=>r!=null).join(":")}}function Ym(t){if(t){let[e,i,a]=t.split(":");return{id:e,width:+i,height:+a}}}function Bd(t){return t==null?void 0:t.map(qm).join(" ")}function $d(t){return t==null?void 0:t.split(/\s+/).map(Zm)}function qm(t){if(t){let{id:e,kind:i,language:a,label:r}=t;return[e,i,a,r].filter(o=>o!=null).join(":")}}function Zm(t){if(t){let[e,i,a,r]=t.split(":");return{id:e,kind:i,language:a,label:r}}}function Wd(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function Ai(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}function Vr(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))}var Kr=t=>new Promise(e=>setTimeout(e,t));var Fd=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],zm=(t,e)=>{let i=t===1?Fd[e].singular:Fd[e].plural;return`${t} ${i}`},$t=t=>{if(!Ai(t))return"";let e=Math.abs(t),i=e!==t,a=new Date(0,0,0,0,0,e,0);return`${[a.getHours(),a.getMinutes(),a.getSeconds()].map((l,u)=>l&&zm(l,u)).filter(l=>l).join(", ")}${i?" remaining":""}`};function De(t,e){let i=!1;t<0&&(i=!0,t=0-t),t=t<0?0:t;let a=Math.floor(t%60),r=Math.floor(t/60%60),o=Math.floor(t/3600),s=Math.floor(e/60%60),l=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(o=r=a="0"),o=o>0||l>0?o+":":"",r=((o||s>=10)&&r<10?"0"+r:r)+":",a=a<10?"0"+a:a,(i?"-":"")+o+r+a}var Pv=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}});var Vd={"Start airplay":"Start airplay","Stop airplay":"Stop airplay",Audio:"Audio",Captions:"Captions","Enable captions":"Enable captions","Disable captions":"Disable captions","Start casting":"Start casting","Stop casting":"Stop casting","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",Mute:"Mute",Unmute:"Unmute","Enter picture in picture mode":"Enter picture in picture mode","Exit picture in picture mode":"Exit picture in picture mode",Play:"Play",Pause:"Pause","Playback rate":"Playback rate","Playback rate {playbackRate}":"Playback rate {playbackRate}",Quality:"Quality","Seek backward":"Seek backward","Seek forward":"Seek forward",Settings:"Settings",Auto:"Auto","audio player":"audio player","video player":"video player",volume:"volume",seek:"seek","closed captions":"closed captions","current playback rate":"current playback rate","playback time":"playback time","media loading":"media loading",settings:"settings","audio tracks":"audio tracks",quality:"quality",play:"play",pause:"pause",mute:"mute",unmute:"unmute","chapter: {chapterName}":"chapter: {chapterName}",live:"live",Off:"Off","start airplay":"start airplay","stop airplay":"stop airplay","start casting":"start casting","stop casting":"stop casting","enter fullscreen mode":"enter fullscreen mode","exit fullscreen mode":"exit fullscreen mode","enter picture in picture mode":"enter picture in picture mode","exit picture in picture mode":"exit picture in picture mode","seek to live":"seek to live","playing live":"playing live","seek back {seekOffset} seconds":"seek back {seekOffset} seconds","seek forward {seekOffset} seconds":"seek forward {seekOffset} seconds","Network Error":"Network Error","Decode Error":"Decode Error","Source Not Supported":"Source Not Supported","Encryption Error":"Encryption Error","A network error caused the media download to fail.":"A network error caused the media download to fail.","A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.":"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.","An unsupported error occurred. The server or network failed, or your browser does not support this format.":"An unsupported error occurred. The server or network failed, or your browser does not support this format.","The media is encrypted and there are no keys to decrypt it.":"The media is encrypted and there are no keys to decrypt it."};var Kd,rs={en:Vd},os=((Kd=globalThis.navigator)==null?void 0:Kd.language)||"en",Gd=t=>{os=t};var Xm=t=>{var e,i,a;let[r]=os.split("-");return((e=rs[os])==null?void 0:e[t])||((i=rs[r])==null?void 0:i[t])||((a=rs.en)==null?void 0:a[t])||t},m=(t,e={})=>Xm(t).replace(/\{(\w+)\}/g,(i,a)=>a in e?String(e[a]):`{${a}}`);var Gr=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}},Yr=class extends Gr{},qr=class extends Yr{constructor(){super(...arguments),this.role=null}},ns=class{observe(){}unobserve(){}disconnect(){}},Yd={createElement:function(){return new Ca.HTMLElement},createElementNS:function(){return new Ca.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent(t){return!1}},Ca={ResizeObserver:ns,document:Yd,Node:Yr,Element:qr,HTMLElement:class extends qr{constructor(){super(...arguments),this.innerHTML=""}get content(){return new Ca.DocumentFragment}},DocumentFragment:class extends Gr{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem(t){return null},setItem(t,e){},removeItem(t){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia(t){return{matches:!1,media:t}},DOMParser:class{parseFromString(e,i){return{body:{textContent:e}}}}},qd=typeof window=="undefined"||typeof window.customElements=="undefined",Zd=Object.keys(Ca).every(t=>t in globalThis),d=qd&&!Zd?Ca:globalThis,Y=qd&&!Zd?Yd:globalThis.document;var zd=new WeakMap,ss=t=>{let e=zd.get(t);return e||zd.set(t,e=new Set),e},Qd=new d.ResizeObserver(t=>{for(let e of t)for(let i of ss(e.target))i(e)});function st(t,e){ss(t).add(e),Qd.observe(t)}function lt(t,e){let i=ss(t);i.delete(e),i.size||Qd.unobserve(t)}function q(t){let e={};for(let i of t)e[i.name]=i.value;return e}function Z(t){var e;return(e=Zr(t))!=null?e:Be(t,"media-controller")}function Zr(t){var e;let{MEDIA_CONTROLLER:i}=L,a=t.getAttribute(i);if(a)return(e=Wt(t))==null?void 0:e.getElementById(a)}var zr=(t,e,i=".value")=>{let a=t.querySelector(i);a&&(a.textContent=e)},Jm=(t,e)=>{let i=`slot[name="${e}"]`,a=t.shadowRoot.querySelector(i);return a?a.children:[]},Qr=(t,e)=>Jm(t,e)[0],de=(t,e)=>!t||!e?!1:t!=null&&t.contains(e)?!0:de(t,e.getRootNode().host),Be=(t,e)=>{if(!t)return null;let i=t.closest(e);return i||Be(t.getRootNode().host,e)};function La(t=document){var e;let i=t==null?void 0:t.activeElement;return i?(e=La(i.shadowRoot))!=null?e:i:null}function Wt(t){var e;let i=(e=t==null?void 0:t.getRootNode)==null?void 0:e.call(t);return i instanceof ShadowRoot||i instanceof Document?i:null}function Xr(t,{depth:e=3,checkOpacity:i=!0,checkVisibilityCSS:a=!0}={}){if(t.checkVisibility)return t.checkVisibility({checkOpacity:i,checkVisibilityCSS:a});let r=t;for(;r&&e>0;){let o=getComputedStyle(r);if(i&&o.opacity==="0"||a&&o.visibility==="hidden"||o.display==="none")return!1;r=r.parentElement,e--}return!0}function Xd(t,e,i,a){let r=a.x-i.x,o=a.y-i.y,s=r*r+o*o;if(s===0)return 0;let l=((t-i.x)*r+(e-i.y)*o)/s;return Math.max(0,Math.min(1,l))}function W(t,e){let i=jm(t,a=>a===e);return i||ls(t,e)}function jm(t,e){var i,a;let r;for(r of(i=t.querySelectorAll("style:not([media])"))!=null?i:[]){let o;try{o=(a=r.sheet)==null?void 0:a.cssRules}catch{continue}for(let s of o!=null?o:[])if(e(s.selectorText))return s}}function ls(t,e){var i,a;let r=(i=t.querySelectorAll("style:not([media])"))!=null?i:[],o=r==null?void 0:r[r.length-1];return o!=null&&o.sheet?(o==null||o.sheet.insertRule(`${e}{}`,o.sheet.cssRules.length),(a=o.sheet.cssRules)==null?void 0:a[o.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",t),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function R(t,e,i=Number.NaN){let a=t.getAttribute(e);return a!=null?+a:i}function O(t,e,i){let a=+i;if(i==null||Number.isNaN(a)){t.hasAttribute(e)&&t.removeAttribute(e);return}R(t,e,void 0)!==a&&t.setAttribute(e,`${a}`)}function k(t,e){return t.hasAttribute(e)}function S(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}k(t,e)!=i&&t.toggleAttribute(e,i)}function I(t,e,i=null){var a;return(a=t.getAttribute(e))!=null?a:i}function M(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}let a=`${i}`;I(t,e,void 0)!==a&&t.setAttribute(e,a)}var Jd=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},_t=(t,e,i)=>(Jd(t,e,"read from private field"),i?i.call(t):e.get(t)),eh=(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)},Jr=(t,e,i,a)=>(Jd(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),ve;function th(t){return`
1
+ "use strict";var jn=Object.defineProperty;var Pm=Object.getOwnPropertyDescriptor;var Um=Object.getOwnPropertyNames;var Hm=Object.prototype.hasOwnProperty;var xd=t=>{throw TypeError(t)};var Bm=(t,e)=>{for(var i in e)jn(t,i,{get:e[i],enumerable:!0})},$m=(t,e,i,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Um(e))!Hm.call(t,r)&&r!==i&&jn(t,r,{get:()=>e[r],enumerable:!(a=Pm(e,r))||a.enumerable});return t};var Wm=t=>$m(jn({},"__esModule",{value:!0}),t);var es=(t,e,i)=>e.has(t)||xd("Cannot "+i);var U=(t,e,i)=>(es(t,e,"read from private field"),i?i.call(t):e.get(t)),he=(t,e,i)=>e.has(t)?xd("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),ye=(t,e,i,a)=>(es(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),X=(t,e,i)=>(es(t,e,"access private method"),i);var Lv={};Bm(Lv,{MediaError:()=>E.MediaError,default:()=>Cv,generatePlayerInitTime:()=>w.generatePlayerInitTime,getVideoAttribute:()=>Ht,playerSoftwareName:()=>cd,playerSoftwareVersion:()=>ud});module.exports=Wm(Lv);var gi=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class t extends gi{}globalThis.DocumentFragment=t}var Ma=class extends gi{},ts=class extends gi{},Fm={get(t){},define(t,e,i){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(Ma)}},Ca,is=class{constructor(e,i={}){he(this,Ca);ye(this,Ca,i==null?void 0:i.detail)}get detail(){return U(this,Ca)}initCustomEvent(){}};Ca=new WeakMap;function Vm(t,e){return new Ma}var Dd={document:{createElement:Vm},DocumentFragment,customElements:Fm,CustomEvent:is,EventTarget:gi,HTMLElement:Ma,HTMLVideoElement:ts},Od=typeof window=="undefined"||typeof globalThis.customElements=="undefined",ke=Od?Dd:globalThis,_i=Od?Dd.document:globalThis.document;var p={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_TOGGLE_SUBTITLES_REQUEST:"mediatogglesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_AUDIO_TRACK_REQUEST:"mediaaudiotrackrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},L={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},as={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_BUFFERED:"mediaBuffered",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_CHAPTERS_CUES:"mediaChaptersCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_HEIGHT:"mediaHeight",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_IS_PIP:"mediaIsPip",MEDIA_LOADING:"mediaLoading",MEDIA_MUTED:"mediaMuted",MEDIA_PAUSED:"mediaPaused",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_LANG:"mediaLang",MEDIA_WIDTH:"mediaWidth"},Nd=Object.entries(as),n=Nd.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{}),Km={USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"},Ce=Nd.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{...Km}),Ov=Object.entries(Ce).reduce((t,[e,i])=>{let a=n[e];return a&&(t[i]=a),t},{userinactivechange:"userinactive"}),Pd=Object.entries(n).reduce((t,[e,i])=>{let a=Ce[e];return a&&(t[i]=a),t},{userinactive:"userinactivechange"}),pe={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},gt={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var rs={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},fe={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},De={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"};var Ud={INLINE:"inline",FULLSCREEN:"fullscreen",PICTURE_IN_PICTURE:"picture-in-picture"};function Hd(t){return t==null?void 0:t.map(Ym).join(" ")}function Bd(t){return t==null?void 0:t.split(/\s+/).map(qm)}function Ym(t){if(t){let{id:e,width:i,height:a}=t;return[e,i,a].filter(r=>r!=null).join(":")}}function qm(t){if(t){let[e,i,a]=t.split(":");return{id:e,width:+i,height:+a}}}function $d(t){return t==null?void 0:t.map(Zm).join(" ")}function Wd(t){return t==null?void 0:t.split(/\s+/).map(zm)}function Zm(t){if(t){let{id:e,kind:i,language:a,label:r}=t;return[e,i,a,r].filter(o=>o!=null).join(":")}}function zm(t){if(t){let[e,i,a,r]=t.split(":");return{id:e,kind:i,language:a,label:r}}}function Fd(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function Ai(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}function Kr(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))}var Gr=t=>new Promise(e=>setTimeout(e,t));var Vd=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],Qm=(t,e)=>{let i=t===1?Vd[e].singular:Vd[e].plural;return`${t} ${i}`},$t=t=>{if(!Ai(t))return"";let e=Math.abs(t),i=e!==t,a=new Date(0,0,0,0,0,e,0);return`${[a.getHours(),a.getMinutes(),a.getSeconds()].map((l,u)=>l&&Qm(l,u)).filter(l=>l).join(", ")}${i?" remaining":""}`};function Oe(t,e){let i=!1;t<0&&(i=!0,t=0-t),t=t<0?0:t;let a=Math.floor(t%60),r=Math.floor(t/60%60),o=Math.floor(t/3600),s=Math.floor(e/60%60),l=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(o=r=a="0"),o=o>0||l>0?o+":":"",r=((o||s>=10)&&r<10?"0"+r:r)+":",a=a<10?"0"+a:a,(i?"-":"")+o+r+a}var Uv=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}});var Kd={"Start airplay":"Start airplay","Stop airplay":"Stop airplay",Audio:"Audio",Captions:"Captions","Enable captions":"Enable captions","Disable captions":"Disable captions","Start casting":"Start casting","Stop casting":"Stop casting","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",Mute:"Mute",Unmute:"Unmute","Enter picture in picture mode":"Enter picture in picture mode","Exit picture in picture mode":"Exit picture in picture mode",Play:"Play",Pause:"Pause","Playback rate":"Playback rate","Playback rate {playbackRate}":"Playback rate {playbackRate}",Quality:"Quality","Seek backward":"Seek backward","Seek forward":"Seek forward",Settings:"Settings",Auto:"Auto","audio player":"audio player","video player":"video player",volume:"volume",seek:"seek","closed captions":"closed captions","current playback rate":"current playback rate","playback time":"playback time","media loading":"media loading",settings:"settings","audio tracks":"audio tracks",quality:"quality",play:"play",pause:"pause",mute:"mute",unmute:"unmute","chapter: {chapterName}":"chapter: {chapterName}",live:"live",Off:"Off","start airplay":"start airplay","stop airplay":"stop airplay","start casting":"start casting","stop casting":"stop casting","enter fullscreen mode":"enter fullscreen mode","exit fullscreen mode":"exit fullscreen mode","enter picture in picture mode":"enter picture in picture mode","exit picture in picture mode":"exit picture in picture mode","seek to live":"seek to live","playing live":"playing live","seek back {seekOffset} seconds":"seek back {seekOffset} seconds","seek forward {seekOffset} seconds":"seek forward {seekOffset} seconds","Network Error":"Network Error","Decode Error":"Decode Error","Source Not Supported":"Source Not Supported","Encryption Error":"Encryption Error","A network error caused the media download to fail.":"A network error caused the media download to fail.","A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.":"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.","An unsupported error occurred. The server or network failed, or your browser does not support this format.":"An unsupported error occurred. The server or network failed, or your browser does not support this format.","The media is encrypted and there are no keys to decrypt it.":"The media is encrypted and there are no keys to decrypt it."};var Gd,os={en:Kd},ns=((Gd=globalThis.navigator)==null?void 0:Gd.language)||"en",Yd=t=>{ns=t};var Jm=t=>{var e,i,a;let[r]=ns.split("-");return((e=os[ns])==null?void 0:e[t])||((i=os[r])==null?void 0:i[t])||((a=os.en)==null?void 0:a[t])||t},h=(t,e={})=>Jm(t).replace(/\{(\w+)\}/g,(i,a)=>a in e?String(e[a]):`{${a}}`);var Yr=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}},qr=class extends Yr{},Zr=class extends qr{constructor(){super(...arguments),this.role=null}},ss=class{observe(){}unobserve(){}disconnect(){}},qd={createElement:function(){return new La.HTMLElement},createElementNS:function(){return new La.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent(t){return!1}},La={ResizeObserver:ss,document:qd,Node:qr,Element:Zr,HTMLElement:class extends Zr{constructor(){super(...arguments),this.innerHTML=""}get content(){return new La.DocumentFragment}},DocumentFragment:class extends Yr{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem(t){return null},setItem(t,e){},removeItem(t){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia(t){return{matches:!1,media:t}},DOMParser:class{parseFromString(e,i){return{body:{textContent:e}}}}},Zd=typeof window=="undefined"||typeof window.customElements=="undefined",zd=Object.keys(La).every(t=>t in globalThis),d=Zd&&!zd?La:globalThis,Y=Zd&&!zd?qd:globalThis.document;var Qd=new WeakMap,ls=t=>{let e=Qd.get(t);return e||Qd.set(t,e=new Set),e},Xd=new d.ResizeObserver(t=>{for(let e of t)for(let i of ls(e.target))i(e)});function st(t,e){ls(t).add(e),Xd.observe(t)}function lt(t,e){let i=ls(t);i.delete(e),i.size||Xd.unobserve(t)}function q(t){let e={};for(let i of t)e[i.name]=i.value;return e}function Z(t){var e;return(e=zr(t))!=null?e:$e(t,"media-controller")}function zr(t){var e;let{MEDIA_CONTROLLER:i}=L,a=t.getAttribute(i);if(a)return(e=Wt(t))==null?void 0:e.getElementById(a)}var Qr=(t,e,i=".value")=>{let a=t.querySelector(i);a&&(a.textContent=e)},jm=(t,e)=>{let i=`slot[name="${e}"]`,a=t.shadowRoot.querySelector(i);return a?a.children:[]},Xr=(t,e)=>jm(t,e)[0],de=(t,e)=>!t||!e?!1:t!=null&&t.contains(e)?!0:de(t,e.getRootNode().host),$e=(t,e)=>{if(!t)return null;let i=t.closest(e);return i||$e(t.getRootNode().host,e)};function wa(t=document){var e;let i=t==null?void 0:t.activeElement;return i?(e=wa(i.shadowRoot))!=null?e:i:null}function Wt(t){var e;let i=(e=t==null?void 0:t.getRootNode)==null?void 0:e.call(t);return i instanceof ShadowRoot||i instanceof Document?i:null}function Jr(t,{depth:e=3,checkOpacity:i=!0,checkVisibilityCSS:a=!0}={}){if(t.checkVisibility)return t.checkVisibility({checkOpacity:i,checkVisibilityCSS:a});let r=t;for(;r&&e>0;){let o=getComputedStyle(r);if(i&&o.opacity==="0"||a&&o.visibility==="hidden"||o.display==="none")return!1;r=r.parentElement,e--}return!0}function Jd(t,e,i,a){let r=a.x-i.x,o=a.y-i.y,s=r*r+o*o;if(s===0)return 0;let l=((t-i.x)*r+(e-i.y)*o)/s;return Math.max(0,Math.min(1,l))}function W(t,e){let i=eh(t,a=>a===e);return i||ds(t,e)}function eh(t,e){var i,a;let r;for(r of(i=t.querySelectorAll("style:not([media])"))!=null?i:[]){let o;try{o=(a=r.sheet)==null?void 0:a.cssRules}catch{continue}for(let s of o!=null?o:[])if(e(s.selectorText))return s}}function ds(t,e){var i,a;let r=(i=t.querySelectorAll("style:not([media])"))!=null?i:[],o=r==null?void 0:r[r.length-1];return o!=null&&o.sheet?(o==null||o.sheet.insertRule(`${e}{}`,o.sheet.cssRules.length),(a=o.sheet.cssRules)==null?void 0:a[o.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",t),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function R(t,e,i=Number.NaN){let a=t.getAttribute(e);return a!=null?+a:i}function O(t,e,i){let a=+i;if(i==null||Number.isNaN(a)){t.hasAttribute(e)&&t.removeAttribute(e);return}R(t,e,void 0)!==a&&t.setAttribute(e,`${a}`)}function k(t,e){return t.hasAttribute(e)}function S(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}k(t,e)!=i&&t.toggleAttribute(e,i)}function I(t,e,i=null){var a;return(a=t.getAttribute(e))!=null?a:i}function M(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}let a=`${i}`;I(t,e,void 0)!==a&&t.setAttribute(e,a)}var jd=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},_t=(t,e,i)=>(jd(t,e,"read from private field"),i?i.call(t):e.get(t)),th=(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)},jr=(t,e,i,a)=>(jd(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),ve;function ih(t){return`
2
2
  <style>
3
3
  :host {
4
4
  display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));
5
5
  box-sizing: border-box;
6
6
  }
7
7
  </style>
8
- `}var Ti=class extends d.HTMLElement{constructor(){if(super(),eh(this,ve,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[L.MEDIA_CONTROLLER,n.MEDIA_PAUSED]}attributeChangedCallback(e,i,a){var r,o,s,l,u;e===L.MEDIA_CONTROLLER&&(i&&((o=(r=_t(this,ve))==null?void 0:r.unassociateElement)==null||o.call(r,this),Jr(this,ve,null)),a&&this.isConnected&&(Jr(this,ve,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=_t(this,ve))==null?void 0:l.associateElement)==null||u.call(l,this)))}connectedCallback(){var e,i,a,r;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),Jr(this,ve,ih(this)),this.getAttribute(L.MEDIA_CONTROLLER)&&((i=(e=_t(this,ve))==null?void 0:e.associateElement)==null||i.call(e,this)),(a=_t(this,ve))==null||a.addEventListener("pointerdown",this),(r=_t(this,ve))==null||r.addEventListener("click",this)}disconnectedCallback(){var e,i,a,r;this.getAttribute(L.MEDIA_CONTROLLER)&&((i=(e=_t(this,ve))==null?void 0:e.unassociateElement)==null||i.call(e,this)),(a=_t(this,ve))==null||a.removeEventListener("pointerdown",this),(r=_t(this,ve))==null||r.removeEventListener("click",this),Jr(this,ve,null)}handleEvent(e){var i;let a=(i=e.composedPath())==null?void 0:i[0];if(["video","media-controller"].includes(a==null?void 0:a.localName)){if(e.type==="pointerdown")this._pointerType=e.pointerType;else if(e.type==="click"){let{clientX:o,clientY:s}=e,{left:l,top:u,width:h,height:_}=this.getBoundingClientRect(),g=o-l,f=s-u;if(g<0||f<0||g>h||f>_||h===0&&_===0)return;let v=this._pointerType||"mouse";if(this._pointerType=void 0,v===as.TOUCH){this.handleTap(e);return}else if(v===as.MOUSE){this.handleMouseClick(e);return}}}}get mediaPaused(){return k(this,n.MEDIA_PAUSED)}set mediaPaused(e){S(this,n.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let i=this.mediaPaused?p.MEDIA_PLAY_REQUEST:p.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new d.CustomEvent(i,{composed:!0,bubbles:!0}))}};ve=new WeakMap;Ti.shadowRootOptions={mode:"open"};Ti.getTemplateHTML=th;function ih(t){var e;let i=t.getAttribute(L.MEDIA_CONTROLLER);return i?(e=t.getRootNode())==null?void 0:e.getElementById(i):Be(t,"media-controller")}d.customElements.get("media-gesture-receiver")||d.customElements.define("media-gesture-receiver",Ti);var jr=Ti;var ms=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ie=(t,e,i)=>(ms(t,e,"read from private field"),i?i.call(t):e.get(t)),Se=(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)},Ft=(t,e,i,a)=>(ms(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Le=(t,e,i)=>(ms(t,e,"access private method"),i),io,yi,Ra,ki,eo,ds,jd,wa,to,us,eu,cs,tu,xa,ao,ro,hs,Si,Da,y={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"};function ah(t){return`
8
+ `}var Ti=class extends d.HTMLElement{constructor(){if(super(),th(this,ve,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[L.MEDIA_CONTROLLER,n.MEDIA_PAUSED]}attributeChangedCallback(e,i,a){var r,o,s,l,u;e===L.MEDIA_CONTROLLER&&(i&&((o=(r=_t(this,ve))==null?void 0:r.unassociateElement)==null||o.call(r,this),jr(this,ve,null)),a&&this.isConnected&&(jr(this,ve,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=_t(this,ve))==null?void 0:l.associateElement)==null||u.call(l,this)))}connectedCallback(){var e,i,a,r;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),jr(this,ve,ah(this)),this.getAttribute(L.MEDIA_CONTROLLER)&&((i=(e=_t(this,ve))==null?void 0:e.associateElement)==null||i.call(e,this)),(a=_t(this,ve))==null||a.addEventListener("pointerdown",this),(r=_t(this,ve))==null||r.addEventListener("click",this)}disconnectedCallback(){var e,i,a,r;this.getAttribute(L.MEDIA_CONTROLLER)&&((i=(e=_t(this,ve))==null?void 0:e.unassociateElement)==null||i.call(e,this)),(a=_t(this,ve))==null||a.removeEventListener("pointerdown",this),(r=_t(this,ve))==null||r.removeEventListener("click",this),jr(this,ve,null)}handleEvent(e){var i;let a=(i=e.composedPath())==null?void 0:i[0];if(["video","media-controller"].includes(a==null?void 0:a.localName)){if(e.type==="pointerdown")this._pointerType=e.pointerType;else if(e.type==="click"){let{clientX:o,clientY:s}=e,{left:l,top:u,width:m,height:_}=this.getBoundingClientRect(),g=o-l,f=s-u;if(g<0||f<0||g>m||f>_||m===0&&_===0)return;let v=this._pointerType||"mouse";if(this._pointerType=void 0,v===rs.TOUCH){this.handleTap(e);return}else if(v===rs.MOUSE){this.handleMouseClick(e);return}}}}get mediaPaused(){return k(this,n.MEDIA_PAUSED)}set mediaPaused(e){S(this,n.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let i=this.mediaPaused?p.MEDIA_PLAY_REQUEST:p.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new d.CustomEvent(i,{composed:!0,bubbles:!0}))}};ve=new WeakMap;Ti.shadowRootOptions={mode:"open"};Ti.getTemplateHTML=ih;function ah(t){var e;let i=t.getAttribute(L.MEDIA_CONTROLLER);return i?(e=t.getRootNode())==null?void 0:e.getElementById(i):$e(t,"media-controller")}d.customElements.get("media-gesture-receiver")||d.customElements.define("media-gesture-receiver",Ti);var eo=Ti;var hs=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ie=(t,e,i)=>(hs(t,e,"read from private field"),i?i.call(t):e.get(t)),Se=(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)},Ft=(t,e,i,a)=>(hs(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Le=(t,e,i)=>(hs(t,e,"access private method"),i),ao,yi,xa,ki,to,us,eu,Ra,io,cs,tu,ms,iu,Da,ro,oo,ps,Si,Oa,y={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"};function rh(t){return`
9
9
  <style>
10
10
 
11
11
  :host([${n.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {
@@ -142,8 +142,8 @@
142
142
  <slot name="poster" part="layer poster-layer"></slot>
143
143
  <slot name="gestures-chrome" part="layer gesture-layer">
144
144
  <media-gesture-receiver slot="gestures-chrome">
145
- <template shadowrootmode="${jr.shadowRootOptions.mode}">
146
- ${jr.getTemplateHTML({})}
145
+ <template shadowrootmode="${eo.shadowRootOptions.mode}">
146
+ ${eo.getTemplateHTML({})}
147
147
  </template>
148
148
  </media-gesture-receiver>
149
149
  </slot>
@@ -155,7 +155,7 @@
155
155
  <slot part="bottom chrome"></slot>
156
156
  </span>
157
157
  <slot name="dialog" part="layer dialog-layer"></slot>
158
- `}var rh=Object.values(n),oh="sm:384 md:576 lg:768 xl:960";function nh(t){iu(t.target,t.contentRect.width)}function iu(t,e){var i;if(!t.isConnected)return;let a=(i=t.getAttribute(y.BREAKPOINTS))!=null?i:oh,r=sh(a),o=lh(r,e),s=!1;if(Object.keys(r).forEach(l=>{if(o.includes(l)){t.hasAttribute(`breakpoint${l}`)||(t.setAttribute(`breakpoint${l}`,""),s=!0);return}t.hasAttribute(`breakpoint${l}`)&&(t.removeAttribute(`breakpoint${l}`),s=!0)}),s){let l=new CustomEvent(Ce.BREAKPOINTS_CHANGE,{detail:o});t.dispatchEvent(l)}t.breakpointsComputed||(t.breakpointsComputed=!0,t.dispatchEvent(new CustomEvent(Ce.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}function sh(t){let e=t.split(/\s+/);return Object.fromEntries(e.map(i=>i.split(":")))}function lh(t,e){return Object.keys(t).filter(i=>e>=parseInt(t[i]))}var Vt=class extends d.HTMLElement{constructor(){if(super(),Se(this,ds),Se(this,us),Se(this,cs),Se(this,xa),Se(this,ro),Se(this,Si),Se(this,io,0),Se(this,yi,null),Se(this,Ra,null),Se(this,ki,void 0),this.breakpointsComputed=!1,Se(this,eo,new MutationObserver(Le(this,ds,jd).bind(this))),Se(this,wa,!1),Se(this,to,i=>{Ie(this,wa)||(setTimeout(()=>{nh(i),Ft(this,wa,!1)},0),Ft(this,wa,!0))}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let i=q(this.attributes),a=this.constructor.getTemplateHTML(i);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(a):this.shadowRoot.innerHTML=a}let e=this.querySelector(":scope > slot[slot=media]");e&&e.addEventListener("slotchange",()=>{if(!e.assignedElements({flatten:!0}).length){Ie(this,yi)&&this.mediaUnsetCallback(Ie(this,yi));return}this.handleMediaUpdated(this.media)})}static get observedAttributes(){return[y.AUTOHIDE,y.GESTURES_DISABLED].concat(rh).filter(e=>![n.MEDIA_RENDITION_LIST,n.MEDIA_AUDIO_TRACK_LIST,n.MEDIA_CHAPTERS_CUES,n.MEDIA_WIDTH,n.MEDIA_HEIGHT,n.MEDIA_ERROR,n.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,i,a){e.toLowerCase()==y.AUTOHIDE&&(this.autohide=a)}get media(){let e=this.querySelector(":scope > [slot=media]");return(e==null?void 0:e.nodeName)=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(Ft(this,yi,e),e.localName.includes("-")&&await d.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;Ie(this,eo).observe(this,{childList:!0,subtree:!0}),st(this,Ie(this,to));let a=this.getAttribute(y.AUDIO)!=null?m("audio player"):m("video player");this.setAttribute("role","region"),this.setAttribute("aria-label",a),this.handleMediaUpdated(this.media),this.setAttribute(y.USER_INACTIVE,""),iu(this,this.getBoundingClientRect().width),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),(e=d.window)==null||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;Ie(this,eo).disconnect(),lt(this,Ie(this,to)),this.media&&this.mediaUnsetCallback(this.media),(e=d.window)==null||e.removeEventListener("mouseup",this)}mediaSetCallback(e){}mediaUnsetCallback(e){Ft(this,yi,null)}handleEvent(e){switch(e.type){case"pointerdown":Ft(this,io,e.timeStamp);break;case"pointermove":Le(this,us,eu).call(this,e);break;case"pointerup":Le(this,cs,tu).call(this,e);break;case"mouseleave":Le(this,xa,ao).call(this);break;case"mouseup":this.removeAttribute(y.KEYBOARD_CONTROL);break;case"keyup":Le(this,Si,Da).call(this),this.setAttribute(y.KEYBOARD_CONTROL,"");break}}set autohide(e){let i=Number(e);Ft(this,ki,isNaN(i)?0:i)}get autohide(){return(Ie(this,ki)===void 0?2:Ie(this,ki)).toString()}get breakpoints(){return I(this,y.BREAKPOINTS)}set breakpoints(e){M(this,y.BREAKPOINTS,e)}get audio(){return k(this,y.AUDIO)}set audio(e){S(this,y.AUDIO,e)}get gesturesDisabled(){return k(this,y.GESTURES_DISABLED)}set gesturesDisabled(e){S(this,y.GESTURES_DISABLED,e)}get keyboardControl(){return k(this,y.KEYBOARD_CONTROL)}set keyboardControl(e){S(this,y.KEYBOARD_CONTROL,e)}get noAutohide(){return k(this,y.NO_AUTOHIDE)}set noAutohide(e){S(this,y.NO_AUTOHIDE,e)}get autohideOverControls(){return k(this,y.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){S(this,y.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return k(this,y.USER_INACTIVE)}set userInteractive(e){S(this,y.USER_INACTIVE,e)}};io=new WeakMap;yi=new WeakMap;Ra=new WeakMap;ki=new WeakMap;eo=new WeakMap;ds=new WeakSet;jd=function(t){let e=this.media;for(let i of t){if(i.type!=="childList")continue;let a=i.removedNodes;for(let r of a){if(r.slot!="media"||i.target!=this)continue;let o=i.previousSibling&&i.previousSibling.previousElementSibling;if(!o||!e)this.mediaUnsetCallback(r);else{let s=o.slot!=="media";for(;(o=o.previousSibling)!==null;)o.slot=="media"&&(s=!1);s&&this.mediaUnsetCallback(r)}}if(e)for(let r of i.addedNodes)r===e&&this.handleMediaUpdated(e)}};wa=new WeakMap;to=new WeakMap;us=new WeakSet;eu=function(t){if(t.pointerType!=="mouse"&&t.timeStamp-Ie(this,io)<250)return;Le(this,ro,hs).call(this),clearTimeout(Ie(this,Ra));let e=this.hasAttribute(y.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(t.target)||e)&&Le(this,Si,Da).call(this)};cs=new WeakSet;tu=function(t){if(t.pointerType==="touch"){let e=!this.hasAttribute(y.USER_INACTIVE);[this,this.media].includes(t.target)&&e?Le(this,xa,ao).call(this):Le(this,Si,Da).call(this)}else t.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(e==null?void 0:e.localName))&&Le(this,Si,Da).call(this)};xa=new WeakSet;ao=function(){if(Ie(this,ki)<0||this.hasAttribute(y.USER_INACTIVE))return;this.setAttribute(y.USER_INACTIVE,"");let t=new d.CustomEvent(Ce.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(t)};ro=new WeakSet;hs=function(){if(!this.hasAttribute(y.USER_INACTIVE))return;this.removeAttribute(y.USER_INACTIVE);let t=new d.CustomEvent(Ce.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(t)};Si=new WeakSet;Da=function(){Le(this,ro,hs).call(this),clearTimeout(Ie(this,Ra));let t=parseInt(this.autohide);t<0||Ft(this,Ra,setTimeout(()=>{Le(this,xa,ao).call(this)},t*1e3))};Vt.shadowRootOptions={mode:"open"};Vt.getTemplateHTML=ah;d.customElements.get("media-container")||d.customElements.define("media-container",Vt);var au=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ie=(t,e,i)=>(au(t,e,"read from private field"),i?i.call(t):e.get(t)),Oa=(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)},oo=(t,e,i,a)=>(au(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ii,Mi,no,Kt,dt,At,Tt=class{constructor(e,i,{defaultValue:a}={defaultValue:void 0}){Oa(this,dt),Oa(this,Ii,void 0),Oa(this,Mi,void 0),Oa(this,no,void 0),Oa(this,Kt,new Set),oo(this,Ii,e),oo(this,Mi,i),oo(this,no,new Set(a))}[Symbol.iterator](){return ie(this,dt,At).values()}get length(){return ie(this,dt,At).size}get value(){var e;return(e=[...ie(this,dt,At)].join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(oo(this,Kt,new Set),this.add(...(i=e==null?void 0:e.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return[...ie(this,dt,At)][e]}values(){return ie(this,dt,At).values()}forEach(e,i){ie(this,dt,At).forEach(e,i)}add(...e){var i,a;e.forEach(r=>ie(this,Kt).add(r)),!(this.value===""&&!((i=ie(this,Ii))!=null&&i.hasAttribute(`${ie(this,Mi)}`)))&&((a=ie(this,Ii))==null||a.setAttribute(`${ie(this,Mi)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>ie(this,Kt).delete(a)),(i=ie(this,Ii))==null||i.setAttribute(`${ie(this,Mi)}`,`${this.value}`)}contains(e){return ie(this,dt,At).has(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){return this.remove(e),this.add(i),e===i}};Ii=new WeakMap;Mi=new WeakMap;no=new WeakMap;Kt=new WeakMap;dt=new WeakSet;At=function(){return ie(this,Kt).size?ie(this,Kt):ie(this,no)};var dh=(t="")=>t.split(/\s+/),ru=(t="")=>{let[e,i,a]=t.split(":"),r=a?decodeURIComponent(a):void 0;return{kind:e==="cc"?pe.CAPTIONS:pe.SUBTITLES,language:i,label:r}},Gt=(t="",e={})=>dh(t).map(i=>{let a=ru(i);return{...e,...a}}),ps=t=>t?Array.isArray(t)?t.map(e=>typeof e=="string"?ru(e):e):typeof t=="string"?Gt(t):[t]:[],so=({kind:t,label:e,language:i}={kind:"subtitles"})=>e?`${t==="captions"?"cc":"sb"}:${i}:${encodeURIComponent(e)}`:i,ut=(t=[])=>Array.prototype.map.call(t,so).join(" "),uh=(t,e)=>i=>i[t]===e,ou=t=>{let e=Object.entries(t).map(([i,a])=>uh(i,a));return i=>e.every(a=>a(i))},Yt=(t,e=[],i=[])=>{let a=ps(i).map(ou),r=o=>a.some(s=>s(o));Array.from(e).filter(r).forEach(o=>{o.mode=t})},qt=(t,e=()=>!0)=>{if(!(t!=null&&t.textTracks))return[];let i=typeof e=="function"?e:ou(e);return Array.from(t.textTracks).filter(i)},lo=t=>{var e;return!!((e=t.mediaSubtitlesShowing)!=null&&e.length)||t.hasAttribute(n.MEDIA_SUBTITLES_SHOWING)};var su=t=>{var e;let{media:i,fullscreenElement:a}=t;try{let r=a&&"requestFullscreen"in a?"requestFullscreen":a&&"webkitRequestFullScreen"in a?"webkitRequestFullScreen":void 0;if(r){let o=(e=a[r])==null?void 0:e.call(a);if(o instanceof Promise)return o.catch(()=>{})}else i!=null&&i.webkitEnterFullscreen?i.webkitEnterFullscreen():i!=null&&i.requestFullscreen&&i.requestFullscreen()}catch(r){console.error(r)}},nu="exitFullscreen"in Y?"exitFullscreen":"webkitExitFullscreen"in Y?"webkitExitFullscreen":"webkitCancelFullScreen"in Y?"webkitCancelFullScreen":void 0,lu=t=>{var e;let{documentElement:i}=t;if(nu){let a=(e=i==null?void 0:i[nu])==null?void 0:e.call(i);if(a instanceof Promise)return a.catch(()=>{})}},Na="fullscreenElement"in Y?"fullscreenElement":"webkitFullscreenElement"in Y?"webkitFullscreenElement":void 0,ch=t=>{let{documentElement:e,media:i}=t,a=e==null?void 0:e[Na];return!a&&"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&i.webkitDisplayingFullscreen&&i.webkitPresentationMode===Pd.FULLSCREEN?i:a},du=t=>{var e;let{media:i,documentElement:a,fullscreenElement:r=i}=t;if(!i||!a)return!1;let o=ch(t);if(!o)return!1;if(o===r||o===i)return!0;if(o.localName.includes("-")){let s=o.shadowRoot;if(!(Na in s))return de(o,r);for(;s!=null&&s[Na];){if(s[Na]===r)return!0;s=(e=s[Na])==null?void 0:e.shadowRoot}}return!1},mh="fullscreenEnabled"in Y?"fullscreenEnabled":"webkitFullscreenEnabled"in Y?"webkitFullscreenEnabled":void 0,uu=t=>{let{documentElement:e,media:i}=t;return!!(e!=null&&e[mh])||i&&"webkitSupportsFullscreen"in i};var uo,fs=()=>{var t,e;return uo||(uo=(e=(t=Y)==null?void 0:t.createElement)==null?void 0:e.call(t,"video"),uo)},cu=async(t=fs())=>{if(!t)return!1;let e=t.volume;t.volume=e/2+.1;let i=new AbortController,a=await Promise.race([hh(t,i.signal),ph(t,e)]);return i.abort(),a},hh=(t,e)=>new Promise(i=>{t.addEventListener("volumechange",()=>i(!0),{signal:e})}),ph=async(t,e)=>{for(let i=0;i<10;i++){if(t.volume===e)return!1;await Kr(10)}return t.volume!==e},fh=/.*Version\/.*Safari\/.*/.test(d.navigator.userAgent),vs=(t=fs())=>d.matchMedia("(display-mode: standalone)").matches&&fh?!1:typeof(t==null?void 0:t.requestPictureInPicture)=="function",Es=(t=fs())=>uu({documentElement:Y,media:t}),mu=Es(),hu=vs(),pu=!!d.WebKitPlaybackTargetAvailabilityEvent,fu=!!d.chrome;var Ci=t=>qt(t.media,e=>[pe.SUBTITLES,pe.CAPTIONS].includes(e.kind)).sort((e,i)=>e.kind>=i.kind?1:-1),bs=t=>qt(t.media,e=>e.mode===gt.SHOWING&&[pe.SUBTITLES,pe.CAPTIONS].includes(e.kind)),co=(t,e)=>{let i=Ci(t),a=bs(t),r=!!a.length;if(i.length){if(e===!1||r&&e!==!0)Yt(gt.DISABLED,i,a);else if(e===!0||!r&&e!==!1){let o=i[0],{options:s}=t;if(!(s!=null&&s.noSubtitlesLangPref)){let _=globalThis.localStorage.getItem("media-chrome-pref-subtitles-lang"),g=_?[_,...globalThis.navigator.languages]:globalThis.navigator.languages,f=i.filter(v=>g.some(N=>v.language.toLowerCase().startsWith(N.split("-")[0]))).sort((v,N)=>{let T=g.findIndex(P=>v.language.toLowerCase().startsWith(P.split("-")[0])),C=g.findIndex(P=>N.language.toLowerCase().startsWith(P.split("-")[0]));return T-C});f[0]&&(o=f[0])}let{language:l,label:u,kind:h}=o;Yt(gt.DISABLED,i,a),Yt(gt.SHOWING,i,[{language:l,label:u,kind:h}])}}},mo=(t,e)=>t===e?!0:t==null||e==null||typeof t!=typeof e?!1:typeof t=="number"&&Number.isNaN(t)&&Number.isNaN(e)?!0:typeof t!="object"?!1:Array.isArray(t)?vh(t,e):Object.entries(t).every(([i,a])=>i in e&&mo(a,e[i])),vh=(t,e)=>{let i=Array.isArray(t),a=Array.isArray(e);return i!==a?!1:i||a?t.length!==e.length?!1:t.every((r,o)=>mo(r,e[o])):!0};var Eh=Object.values(xe),ho,bh=cu().then(t=>(ho=t,ho)),vu=async(...t)=>{await Promise.all(t.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof d.HTMLElement))return;let i=e.localName;if(!i.includes("-"))return;let a=d.customElements.get(i);a&&e instanceof a||(await d.customElements.whenDefined(i),d.customElements.upgrade(e))}))},gh=new d.DOMParser,_h=t=>t&&(gh.parseFromString(t,"text/html").body.textContent||t),Li={mediaError:{get(t,e){let{media:i}=t;if((e==null?void 0:e.type)!=="playing")return i==null?void 0:i.error},mediaEvents:["emptied","error","playing"]},mediaErrorCode:{get(t,e){var i;let{media:a}=t;if((e==null?void 0:e.type)!=="playing")return(i=a==null?void 0:a.error)==null?void 0:i.code},mediaEvents:["emptied","error","playing"]},mediaErrorMessage:{get(t,e){var i,a;let{media:r}=t;if((e==null?void 0:e.type)!=="playing")return(a=(i=r==null?void 0:r.error)==null?void 0:i.message)!=null?a:""},mediaEvents:["emptied","error","playing"]},mediaWidth:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.videoWidth)!=null?e:0},mediaEvents:["resize"]},mediaHeight:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.videoHeight)!=null?e:0},mediaEvents:["resize"]},mediaPaused:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.paused)!=null?e:!0},set(t,e){var i;let{media:a}=e;a&&(t?a.pause():(i=a.play())==null||i.catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(t,e){let{media:i}=t;return i?e?e.type==="playing":!i.paused:!1},mediaEvents:["playing","emptied"]},mediaEnded:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.ended)!=null?e:!1},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.playbackRate)!=null?e:1},set(t,e){let{media:i}=e;i&&Number.isFinite(+t)&&(i.playbackRate=+t)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.muted)!=null?e:!1},set(t,e){let{media:i}=e;if(i){try{d.localStorage.setItem("media-chrome-pref-muted",t?"true":"false")}catch(a){console.debug("Error setting muted pref",a)}i.muted=t}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{let{options:{noMutedPref:i}}=e,{media:a}=e;if(!(!a||a.muted||i))try{let r=d.localStorage.getItem("media-chrome-pref-muted")==="true";Li.mediaMuted.set(r,e),t(r)}catch(r){console.debug("Error getting muted pref",r)}}]},mediaVolume:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.volume)!=null?e:1},set(t,e){let{media:i}=e;if(i){try{t==null?d.localStorage.removeItem("media-chrome-pref-volume"):d.localStorage.setItem("media-chrome-pref-volume",t.toString())}catch(a){console.debug("Error setting volume pref",a)}Number.isFinite(+t)&&(i.volume=+t)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{let{options:{noVolumePref:i}}=e;if(!i)try{let{media:a}=e;if(!a)return;let r=d.localStorage.getItem("media-chrome-pref-volume");if(r==null)return;Li.mediaVolume.set(+r,e),t(+r)}catch(a){console.debug("Error getting volume pref",a)}}]},mediaVolumeLevel:{get(t){let{media:e}=t;return typeof(e==null?void 0:e.volume)=="undefined"?"high":e.muted||e.volume===0?"off":e.volume<.5?"low":e.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.currentTime)!=null?e:0},set(t,e){let{media:i}=e;!i||!Ai(t)||(i.currentTime=t)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(t){let{media:e,options:{defaultDuration:i}={}}=t;return i&&(!e||!e.duration||Number.isNaN(e.duration)||!Number.isFinite(e.duration))?i:Number.isFinite(e==null?void 0:e.duration)?e.duration:Number.NaN},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(t){let{media:e}=t;return(e==null?void 0:e.readyState)<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(t){var e;let{media:i}=t;if(!((e=i==null?void 0:i.seekable)!=null&&e.length))return;let a=i.seekable.start(0),r=i.seekable.end(i.seekable.length-1);if(!(!a&&!r))return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get(t){var e;let{media:i}=t,a=(e=i==null?void 0:i.buffered)!=null?e:[];return Array.from(a).map((r,o)=>[Number(a.start(o).toFixed(3)),Number(a.end(o).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(t){let{media:e,options:{defaultStreamType:i}={}}=t,a=[xe.LIVE,xe.ON_DEMAND].includes(i)?i:void 0;if(!e)return a;let{streamType:r}=e;if(Eh.includes(r))return r===xe.UNKNOWN?a:r;let o=e.duration;return o===1/0?xe.LIVE:Number.isFinite(o)?xe.ON_DEMAND:a},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(t){let{media:e}=t;if(!e)return Number.NaN;let{targetLiveWindow:i}=e,a=Li.mediaStreamType.get(t);return(i==null||Number.isNaN(i))&&a===xe.LIVE?0:i},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(t){let{media:e,options:{liveEdgeOffset:i=10}={}}=t;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return Number.isNaN(e.liveEdgeStart)?!1:e.currentTime>=e.liveEdgeStart;if(!(Li.mediaStreamType.get(t)===xe.LIVE))return!1;let r=e.seekable;if(!r)return!0;if(!r.length)return!1;let o=r.end(r.length-1)-i;return e.currentTime>=o},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get(t){return Ci(t).map(({kind:e,label:i,language:a})=>({kind:e,label:i,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get(t){return bs(t).map(({kind:e,label:i,language:a})=>({kind:e,label:i,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var i,a;let{media:r,options:o}=e;if(!r)return;let s=l=>{var u;!o.defaultSubtitles||l&&![pe.CAPTIONS,pe.SUBTITLES].includes((u=l==null?void 0:l.track)==null?void 0:u.kind)||co(e,!0)};return r.addEventListener("loadstart",s),(i=r.textTracks)==null||i.addEventListener("addtrack",s),(a=r.textTracks)==null||a.addEventListener("removetrack",s),()=>{var l,u;r.removeEventListener("loadstart",s),(l=r.textTracks)==null||l.removeEventListener("addtrack",s),(u=r.textTracks)==null||u.removeEventListener("removetrack",s)}}]},mediaChaptersCues:{get(t){var e;let{media:i}=t;if(!i)return[];let[a]=qt(i,{kind:pe.CHAPTERS});return Array.from((e=a==null?void 0:a.cues)!=null?e:[]).map(({text:r,startTime:o,endTime:s})=>({text:_h(r),startTime:o,endTime:s}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var i;let{media:a}=e;if(!a)return;let r=a.querySelector('track[kind="chapters"][default][src]'),o=(i=a.shadowRoot)==null?void 0:i.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return r==null||r.addEventListener("load",t),o==null||o.addEventListener("load",t),()=>{r==null||r.removeEventListener("load",t),o==null||o.removeEventListener("load",t)}}]},mediaIsPip:{get(t){var e,i;let{media:a,documentElement:r}=t;if(!a||!r||!r.pictureInPictureElement)return!1;if(r.pictureInPictureElement===a)return!0;if(r.pictureInPictureElement instanceof HTMLMediaElement)return(e=a.localName)!=null&&e.includes("-")?de(a,r.pictureInPictureElement):!1;if(r.pictureInPictureElement.localName.includes("-")){let o=r.pictureInPictureElement.shadowRoot;for(;o!=null&&o.pictureInPictureElement;){if(o.pictureInPictureElement===a)return!0;o=(i=o.pictureInPictureElement)==null?void 0:i.shadowRoot}}return!1},set(t,e){let{media:i}=e;if(i)if(t){if(!Y.pictureInPictureEnabled){console.warn("MediaChrome: Picture-in-picture is not enabled");return}if(!i.requestPictureInPicture){console.warn("MediaChrome: The current media does not support picture-in-picture");return}let a=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(r=>{if(r.code===11){if(!i.src){console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.");return}if(i.readyState===0&&i.preload==="none"){let o=()=>{i.removeEventListener("loadedmetadata",s),i.preload="none"},s=()=>{i.requestPictureInPicture().catch(a),o()};i.addEventListener("loadedmetadata",s),i.preload="metadata",setTimeout(()=>{i.readyState===0&&a(),o()},1e3)}else throw r}else throw r})}else Y.pictureInPictureElement&&Y.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(t){var e;let{media:i}=t;return[...(e=i==null?void 0:i.videoRenditions)!=null?e:[]].map(a=>({...a}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(t){var e,i,a;let{media:r}=t;return(a=(i=r==null?void 0:r.videoRenditions)==null?void 0:i[(e=r.videoRenditions)==null?void 0:e.selectedIndex])==null?void 0:a.id},set(t,e){let{media:i}=e;if(!(i!=null&&i.videoRenditions)){console.warn("MediaController: Rendition selection not supported by this media.");return}let a=t,r=Array.prototype.findIndex.call(i.videoRenditions,o=>o.id==a);i.videoRenditions.selectedIndex!=r&&(i.videoRenditions.selectedIndex=r)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(t){var e;let{media:i}=t;return[...(e=i==null?void 0:i.audioTracks)!=null?e:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(t){var e,i;let{media:a}=t;return(i=[...(e=a==null?void 0:a.audioTracks)!=null?e:[]].find(r=>r.enabled))==null?void 0:i.id},set(t,e){let{media:i}=e;if(!(i!=null&&i.audioTracks)){console.warn("MediaChrome: Audio track selection not supported by this media.");return}let a=t;for(let r of i.audioTracks)r.enabled=a==r.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get(t){return du(t)},set(t,e){t?su(e):lu(e)},rootEvents:["fullscreenchange","webkitfullscreenchange"],mediaEvents:["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"]},mediaIsCasting:{get(t){var e;let{media:i}=t;return!(i!=null&&i.remote)||((e=i.remote)==null?void 0:e.state)==="disconnected"?!1:!!i.remote.state},set(t,e){var i,a;let{media:r}=e;if(r&&!(t&&((i=r.remote)==null?void 0:i.state)!=="disconnected")&&!(!t&&((a=r.remote)==null?void 0:a.state)!=="connected")){if(typeof r.remote.prompt!="function"){console.warn("MediaChrome: Casting is not supported in this environment");return}r.remote.prompt().catch(()=>{})}},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get(){return!1},set(t,e){let{media:i}=e;if(i){if(!(i.webkitShowPlaybackTargetPicker&&d.WebKitPlaybackTargetAvailabilityEvent)){console.error("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment");return}i.webkitShowPlaybackTargetPicker()}},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(t){let{media:e}=t;if(!mu||!Es(e))return fe.UNSUPPORTED}},mediaPipUnavailable:{get(t){let{media:e}=t;if(!hu||!vs(e))return fe.UNSUPPORTED;if(e!=null&&e.disablePictureInPicture)return fe.UNAVAILABLE}},mediaVolumeUnavailable:{get(t){let{media:e}=t;if(ho===!1||(e==null?void 0:e.volume)==null)return fe.UNSUPPORTED},stateOwnersUpdateHandlers:[t=>{ho==null&&bh.then(e=>t(e?void 0:fe.UNSUPPORTED))}]},mediaCastUnavailable:{get(t,{availability:e="not-available"}={}){var i;let{media:a}=t;if(!fu||!((i=a==null?void 0:a.remote)!=null&&i.state))return fe.UNSUPPORTED;if(!(e==null||e==="available"))return fe.UNAVAILABLE},stateOwnersUpdateHandlers:[(t,e)=>{var i;let{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(i=a==null?void 0:a.remote)==null||i.watchAvailability(o=>{t({availability:o?"available":"not-available"})}).catch(o=>{o.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var o;(o=a==null?void 0:a.remote)==null||o.cancelWatchAvailability().catch(()=>{})}):void 0}]},mediaAirplayUnavailable:{get(t,e){if(!pu)return fe.UNSUPPORTED;if((e==null?void 0:e.availability)==="not-available")return fe.UNAVAILABLE},mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(t,e)=>{var i;let{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(i=a==null?void 0:a.remote)==null||i.watchAvailability(o=>{t({availability:o?"available":"not-available"})}).catch(o=>{o.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var o;(o=a==null?void 0:a.remote)==null||o.cancelWatchAvailability().catch(()=>{})}):void 0}]},mediaRenditionUnavailable:{get(t){var e;let{media:i}=t;if(!(i!=null&&i.videoRenditions))return fe.UNSUPPORTED;if(!((e=i.videoRenditions)!=null&&e.length))return fe.UNAVAILABLE},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(t){var e,i;let{media:a}=t;if(!(a!=null&&a.audioTracks))return fe.UNSUPPORTED;if(((i=(e=a.audioTracks)==null?void 0:e.length)!=null?i:0)<=1)return fe.UNAVAILABLE},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(t){let{options:{mediaLang:e}={}}=t;return e!=null?e:"en"}}};var Eu={[p.MEDIA_PREVIEW_REQUEST](t,e,{detail:i}){var a,r,o;let{media:s}=e,l=i!=null?i:void 0,u,h;if(s&&l!=null){let[v]=qt(s,{kind:pe.METADATA,label:"thumbnails"}),N=Array.prototype.find.call((a=v==null?void 0:v.cues)!=null?a:[],(T,C,P)=>C===0?T.endTime>l:C===P.length-1?T.startTime<=l:T.startTime<=l&&T.endTime>l);if(N){let T=/'^(?:[a-z]+:)?\/\//i.test(N.text)||(r=s==null?void 0:s.querySelector('track[label="thumbnails"]'))==null?void 0:r.src,C=new URL(N.text,T);h=new URLSearchParams(C.hash).get("#xywh").split(",").map(j=>+j),u=C.href}}let _=t.mediaDuration.get(e),f=(o=t.mediaChaptersCues.get(e).find((v,N,T)=>N===T.length-1&&_===v.endTime?v.startTime<=l&&v.endTime>=l:v.startTime<=l&&v.endTime>l))==null?void 0:o.text;return i!=null&&f==null&&(f=""),{mediaPreviewTime:l,mediaPreviewImage:u,mediaPreviewCoords:h,mediaPreviewChapter:f}},[p.MEDIA_PAUSE_REQUEST](t,e){t["mediaPaused"].set(!0,e)},[p.MEDIA_PLAY_REQUEST](t,e){var i,a,r,o;let s="mediaPaused",u=t.mediaStreamType.get(e)===xe.LIVE,h=!((i=e.options)!=null&&i.noAutoSeekToLive),_=t.mediaTargetLiveWindow.get(e)>0;if(u&&h&&!_){let g=(a=t.mediaSeekable.get(e))==null?void 0:a[1];if(g){let f=(o=(r=e.options)==null?void 0:r.seekToLiveOffset)!=null?o:0,v=g-f;t.mediaCurrentTime.set(v,e)}}t[s].set(!1,e)},[p.MEDIA_PLAYBACK_RATE_REQUEST](t,e,{detail:i}){let a="mediaPlaybackRate",r=i;t[a].set(r,e)},[p.MEDIA_MUTE_REQUEST](t,e){t["mediaMuted"].set(!0,e)},[p.MEDIA_UNMUTE_REQUEST](t,e){let i="mediaMuted";t.mediaVolume.get(e)||t.mediaVolume.set(.25,e),t[i].set(!1,e)},[p.MEDIA_VOLUME_REQUEST](t,e,{detail:i}){let a="mediaVolume",r=i;r&&t.mediaMuted.get(e)&&t.mediaMuted.set(!1,e),t[a].set(r,e)},[p.MEDIA_SEEK_REQUEST](t,e,{detail:i}){let a="mediaCurrentTime",r=i;t[a].set(r,e)},[p.MEDIA_SEEK_TO_LIVE_REQUEST](t,e){var i,a,r;let o="mediaCurrentTime",s=(i=t.mediaSeekable.get(e))==null?void 0:i[1];if(Number.isNaN(Number(s)))return;let l=(r=(a=e.options)==null?void 0:a.seekToLiveOffset)!=null?r:0,u=s-l;t[o].set(u,e)},[p.MEDIA_SHOW_SUBTITLES_REQUEST](t,e,{detail:i}){var a;let{options:r}=e,o=Ci(e),s=ps(i),l=(a=s[0])==null?void 0:a.language;l&&!r.noSubtitlesLangPref&&d.localStorage.setItem("media-chrome-pref-subtitles-lang",l),Yt(gt.SHOWING,o,s)},[p.MEDIA_DISABLE_SUBTITLES_REQUEST](t,e,{detail:i}){let a=Ci(e),r=i!=null?i:[];Yt(gt.DISABLED,a,r)},[p.MEDIA_TOGGLE_SUBTITLES_REQUEST](t,e,{detail:i}){co(e,i)},[p.MEDIA_RENDITION_REQUEST](t,e,{detail:i}){let a="mediaRenditionSelected",r=i;t[a].set(r,e)},[p.MEDIA_AUDIO_TRACK_REQUEST](t,e,{detail:i}){let a="mediaAudioTrackEnabled",r=i;t[a].set(r,e)},[p.MEDIA_ENTER_PIP_REQUEST](t,e){let i="mediaIsPip";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[i].set(!0,e)},[p.MEDIA_EXIT_PIP_REQUEST](t,e){t["mediaIsPip"].set(!1,e)},[p.MEDIA_ENTER_FULLSCREEN_REQUEST](t,e){let i="mediaIsFullscreen";t.mediaIsPip.get(e)&&t.mediaIsPip.set(!1,e),t[i].set(!0,e)},[p.MEDIA_EXIT_FULLSCREEN_REQUEST](t,e){t["mediaIsFullscreen"].set(!1,e)},[p.MEDIA_ENTER_CAST_REQUEST](t,e){let i="mediaIsCasting";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[i].set(!0,e)},[p.MEDIA_EXIT_CAST_REQUEST](t,e){t["mediaIsCasting"].set(!1,e)},[p.MEDIA_AIRPLAY_REQUEST](t,e){t["mediaIsAirplaying"].set(!0,e)}};var bu=({media:t,fullscreenElement:e,documentElement:i,stateMediator:a=Li,requestMap:r=Eu,options:o={},monitorStateOwnersOnlyWithSubscriptions:s=!0})=>{let l=[],u={options:{...o}},h=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0}),_=T=>{T!=null&&(mo(T,h)||(h=Object.freeze({...h,...T}),l.forEach(C=>C(h))))},g=()=>{let T=Object.entries(a).reduce((C,[P,{get:j}])=>(C[P]=j(u),C),{});_(T)},f={},v,N=async(T,C)=>{var P,j,_e,bt,ot,ca,ma,ha,pa,fa,va,Ea,ba,ga,_a,Aa;let Fr=!!v;if(v={...u,...v!=null?v:{},...T},Fr)return;await vu(...Object.values(T));let nt=l.length>0&&C===0&&s,Ta=u.media!==v.media,ya=((P=u.media)==null?void 0:P.textTracks)!==((j=v.media)==null?void 0:j.textTracks),ka=((_e=u.media)==null?void 0:_e.videoRenditions)!==((bt=v.media)==null?void 0:bt.videoRenditions),hd=((ot=u.media)==null?void 0:ot.audioTracks)!==((ca=v.media)==null?void 0:ca.audioTracks),pd=((ma=u.media)==null?void 0:ma.remote)!==((ha=v.media)==null?void 0:ha.remote),fd=u.documentElement!==v.documentElement,vd=!!u.media&&(Ta||nt),Ed=!!((pa=u.media)!=null&&pa.textTracks)&&(ya||nt),bd=!!((fa=u.media)!=null&&fa.videoRenditions)&&(ka||nt),gd=!!((va=u.media)!=null&&va.audioTracks)&&(hd||nt),_d=!!((Ea=u.media)!=null&&Ea.remote)&&(pd||nt),Ad=!!u.documentElement&&(fd||nt),Td=vd||Ed||bd||gd||_d||Ad,bi=l.length===0&&C===1&&s,yd=!!v.media&&(Ta||bi),kd=!!((ba=v.media)!=null&&ba.textTracks)&&(ya||bi),Sd=!!((ga=v.media)!=null&&ga.videoRenditions)&&(ka||bi),Id=!!((_a=v.media)!=null&&_a.audioTracks)&&(hd||bi),Md=!!((Aa=v.media)!=null&&Aa.remote)&&(pd||bi),Cd=!!v.documentElement&&(fd||bi),Ld=yd||kd||Sd||Id||Md||Cd;if(!(Td||Ld)){Object.entries(v).forEach(([G,Sa])=>{u[G]=Sa}),g(),v=void 0;return}Object.entries(a).forEach(([G,{get:Sa,mediaEvents:Cm=[],textTracksEvents:Lm=[],videoRenditionsEvents:wm=[],audioTracksEvents:Rm=[],remoteEvents:xm=[],rootEvents:Dm=[],stateOwnersUpdateHandlers:Om=[]}])=>{f[G]||(f[G]={});let Ae=Q=>{let Te=Sa(u,Q);_({[G]:Te})},te;te=f[G].mediaEvents,Cm.forEach(Q=>{te&&vd&&(u.media.removeEventListener(Q,te),f[G].mediaEvents=void 0),yd&&(v.media.addEventListener(Q,Ae),f[G].mediaEvents=Ae)}),te=f[G].textTracksEvents,Lm.forEach(Q=>{var Te,Re;te&&Ed&&((Te=u.media.textTracks)==null||Te.removeEventListener(Q,te),f[G].textTracksEvents=void 0),kd&&((Re=v.media.textTracks)==null||Re.addEventListener(Q,Ae),f[G].textTracksEvents=Ae)}),te=f[G].videoRenditionsEvents,wm.forEach(Q=>{var Te,Re;te&&bd&&((Te=u.media.videoRenditions)==null||Te.removeEventListener(Q,te),f[G].videoRenditionsEvents=void 0),Sd&&((Re=v.media.videoRenditions)==null||Re.addEventListener(Q,Ae),f[G].videoRenditionsEvents=Ae)}),te=f[G].audioTracksEvents,Rm.forEach(Q=>{var Te,Re;te&&gd&&((Te=u.media.audioTracks)==null||Te.removeEventListener(Q,te),f[G].audioTracksEvents=void 0),Id&&((Re=v.media.audioTracks)==null||Re.addEventListener(Q,Ae),f[G].audioTracksEvents=Ae)}),te=f[G].remoteEvents,xm.forEach(Q=>{var Te,Re;te&&_d&&((Te=u.media.remote)==null||Te.removeEventListener(Q,te),f[G].remoteEvents=void 0),Md&&((Re=v.media.remote)==null||Re.addEventListener(Q,Ae),f[G].remoteEvents=Ae)}),te=f[G].rootEvents,Dm.forEach(Q=>{te&&Ad&&(u.documentElement.removeEventListener(Q,te),f[G].rootEvents=void 0),Cd&&(v.documentElement.addEventListener(Q,Ae),f[G].rootEvents=Ae)});let wd=f[G].stateOwnersUpdateHandlers;Om.forEach(Q=>{wd&&Td&&wd(),Ld&&(f[G].stateOwnersUpdateHandlers=Q(Ae,v))})}),Object.entries(v).forEach(([G,Sa])=>{u[G]=Sa}),g(),v=void 0};return N({media:t,fullscreenElement:e,documentElement:i,options:o}),{dispatch(T){let{type:C,detail:P}=T;if(r[C]&&h.mediaErrorCode==null){_(r[C](a,u,T));return}C==="mediaelementchangerequest"?N({media:P}):C==="fullscreenelementchangerequest"?N({fullscreenElement:P}):C==="documentelementchangerequest"?N({documentElement:P}):C==="optionschangerequest"&&(Object.entries(P!=null?P:{}).forEach(([j,_e])=>{u.options[j]=_e}),g())},getState(){return h},subscribe(T){return N({},l.length+1),l.push(T),T(h),()=>{let C=l.indexOf(T);C>=0&&(N({},l.length-1),l.splice(C,1))}}}};var Ts=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},x=(t,e,i)=>(Ts(t,e,"read from private field"),i?i.call(t):e.get(t)),ct=(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)},yt=(t,e,i,a)=>(Ts(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),kt=(t,e,i)=>(Ts(t,e,"access private method"),i),zt,Pa,F,Ua,$e,po,fo,gs,wi,Ha,vo,_s,yu=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],gu=10,E={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",DEFAULT_DURATION:"defaultduration",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYS_USED:"keysused",LIVE_EDGE_OFFSET:"liveedgeoffset",SEEK_TO_LIVE_OFFSET:"seektoliveoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_HOTKEYS:"nohotkeys",NO_VOLUME_PREF:"novolumepref",NO_SUBTITLES_LANG_PREF:"nosubtitleslangpref",NO_DEFAULT_STORE:"nodefaultstore",KEYBOARD_FORWARD_SEEK_OFFSET:"keyboardforwardseekoffset",KEYBOARD_BACKWARD_SEEK_OFFSET:"keyboardbackwardseekoffset",LANG:"lang"},Eo=class extends Vt{constructor(){super(),ct(this,fo),ct(this,wi),ct(this,vo),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,ct(this,zt,new Tt(this,E.HOTKEYS)),ct(this,Pa,void 0),ct(this,F,void 0),ct(this,Ua,void 0),ct(this,$e,void 0),ct(this,po,i=>{var a;(a=x(this,F))==null||a.dispatch(i)}),this.associateElement(this);let e={};yt(this,Ua,i=>{Object.entries(i).forEach(([a,r])=>{if(a in e&&e[a]===r)return;this.propagateMediaState(a,r);let o=a.toLowerCase(),s=new d.CustomEvent(Nd[o],{composed:!0,detail:r});this.dispatchEvent(s)}),e=i}),this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(E.NO_HOTKEYS,E.HOTKEYS,E.DEFAULT_STREAM_TYPE,E.DEFAULT_SUBTITLES,E.DEFAULT_DURATION,E.LANG)}get mediaStore(){return x(this,F)}set mediaStore(e){var i,a;if(x(this,F)&&((i=x(this,$e))==null||i.call(this),yt(this,$e,void 0)),yt(this,F,e),!x(this,F)&&!this.hasAttribute(E.NO_DEFAULT_STORE)){kt(this,fo,gs).call(this);return}yt(this,$e,(a=x(this,F))==null?void 0:a.subscribe(x(this,Ua)))}get fullscreenElement(){var e;return(e=x(this,Pa))!=null?e:this}set fullscreenElement(e){var i;this.hasAttribute(E.FULLSCREEN_ELEMENT)&&this.removeAttribute(E.FULLSCREEN_ELEMENT),yt(this,Pa,e),(i=x(this,F))==null||i.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return k(this,E.DEFAULT_SUBTITLES)}set defaultSubtitles(e){S(this,E.DEFAULT_SUBTITLES,e)}get defaultStreamType(){return I(this,E.DEFAULT_STREAM_TYPE)}set defaultStreamType(e){M(this,E.DEFAULT_STREAM_TYPE,e)}get defaultDuration(){return R(this,E.DEFAULT_DURATION)}set defaultDuration(e){O(this,E.DEFAULT_DURATION,e)}get noHotkeys(){return k(this,E.NO_HOTKEYS)}set noHotkeys(e){S(this,E.NO_HOTKEYS,e)}get keysUsed(){return I(this,E.KEYS_USED)}set keysUsed(e){M(this,E.KEYS_USED,e)}get liveEdgeOffset(){return R(this,E.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){O(this,E.LIVE_EDGE_OFFSET,e)}get noAutoSeekToLive(){return k(this,E.NO_AUTO_SEEK_TO_LIVE)}set noAutoSeekToLive(e){S(this,E.NO_AUTO_SEEK_TO_LIVE,e)}get noVolumePref(){return k(this,E.NO_VOLUME_PREF)}set noVolumePref(e){S(this,E.NO_VOLUME_PREF,e)}get noSubtitlesLangPref(){return k(this,E.NO_SUBTITLES_LANG_PREF)}set noSubtitlesLangPref(e){S(this,E.NO_SUBTITLES_LANG_PREF,e)}get noDefaultStore(){return k(this,E.NO_DEFAULT_STORE)}set noDefaultStore(e){S(this,E.NO_DEFAULT_STORE,e)}attributeChangedCallback(e,i,a){var r,o,s,l,u,h,_,g,f;if(super.attributeChangedCallback(e,i,a),e===E.NO_HOTKEYS)a!==i&&a===""?(this.hasAttribute(E.HOTKEYS)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==i&&a===null&&this.enableHotkeys();else if(e===E.HOTKEYS)x(this,zt).value=a;else if(e===E.DEFAULT_SUBTITLES&&a!==i)(r=x(this,F))==null||r.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(E.DEFAULT_SUBTITLES)}});else if(e===E.DEFAULT_STREAM_TYPE)(s=x(this,F))==null||s.dispatch({type:"optionschangerequest",detail:{defaultStreamType:(o=this.getAttribute(E.DEFAULT_STREAM_TYPE))!=null?o:void 0}});else if(e===E.LIVE_EDGE_OFFSET)(l=x(this,F))==null||l.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(E.LIVE_EDGE_OFFSET)?+this.getAttribute(E.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(E.SEEK_TO_LIVE_OFFSET)?void 0:+this.getAttribute(E.LIVE_EDGE_OFFSET)}});else if(e===E.SEEK_TO_LIVE_OFFSET)(u=x(this,F))==null||u.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(E.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(E.SEEK_TO_LIVE_OFFSET):void 0}});else if(e===E.NO_AUTO_SEEK_TO_LIVE)(h=x(this,F))==null||h.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(E.NO_AUTO_SEEK_TO_LIVE)}});else if(e===E.FULLSCREEN_ELEMENT){let v=a?(_=this.getRootNode())==null?void 0:_.getElementById(a):void 0;yt(this,Pa,v),(g=x(this,F))==null||g.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===E.LANG&&a!==i&&(Gd(a),(f=x(this,F))==null||f.dispatch({type:"optionschangerequest",detail:{mediaLang:a}}))}connectedCallback(){var e,i;!x(this,F)&&!this.hasAttribute(E.NO_DEFAULT_STORE)&&kt(this,fo,gs).call(this),(e=x(this,F))==null||e.dispatch({type:"documentelementchangerequest",detail:Y}),super.connectedCallback(),x(this,F)&&!x(this,$e)&&yt(this,$e,(i=x(this,F))==null?void 0:i.subscribe(x(this,Ua))),this.enableHotkeys()}disconnectedCallback(){var e,i,a,r;(e=super.disconnectedCallback)==null||e.call(this),x(this,F)&&((i=x(this,F))==null||i.dispatch({type:"documentelementchangerequest",detail:void 0}),(a=x(this,F))==null||a.dispatch({type:p.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})),x(this,$e)&&((r=x(this,$e))==null||r.call(this),yt(this,$e,void 0))}mediaSetCallback(e){var i;super.mediaSetCallback(e),(i=x(this,F))==null||i.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var i;super.mediaUnsetCallback(e),(i=x(this,F))==null||i.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,i){Tu(this.mediaStateReceivers,e,i)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:i}=this;if(i.has(e))return;let a=this.registerMediaStateReceiver.bind(this),r=this.unregisterMediaStateReceiver.bind(this),o=Ih(e,a,r);Object.values(p).forEach(s=>{e.addEventListener(s,x(this,po))}),i.set(e,o)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:i}=this;if(!i.has(e))return;i.get(e)(),i.delete(e),Object.values(p).forEach(r=>{e.removeEventListener(r,x(this,po))})}registerMediaStateReceiver(e){if(!e)return;let i=this.mediaStateReceivers;i.indexOf(e)>-1||(i.push(e),x(this,F)&&Object.entries(x(this,F).getState()).forEach(([r,o])=>{Tu([e],r,o)}))}unregisterMediaStateReceiver(e){let i=this.mediaStateReceivers,a=i.indexOf(e);a<0||i.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",kt(this,vo,_s))}disableHotkeys(){this.removeEventListener("keydown",kt(this,vo,_s)),this.removeEventListener("keyup",kt(this,wi,Ha))}get hotkeys(){return I(this,E.HOTKEYS)}set hotkeys(e){M(this,E.HOTKEYS,e)}keyboardShortcutHandler(e){var i,a,r,o,s;let l=e.target;if(((r=(a=(i=l.getAttribute(E.KEYS_USED))==null?void 0:i.split(" "))!=null?a:l==null?void 0:l.keysUsed)!=null?r:[]).map(f=>f==="Space"?" ":f).filter(Boolean).includes(e.key))return;let h,_,g;if(!x(this,zt).contains(`no${e.key.toLowerCase()}`)&&!(e.key===" "&&x(this,zt).contains("nospace")))switch(e.key){case" ":case"k":h=x(this,F).getState().mediaPaused?p.MEDIA_PLAY_REQUEST:p.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new d.CustomEvent(h,{composed:!0,bubbles:!0}));break;case"m":h=this.mediaStore.getState().mediaVolumeLevel==="off"?p.MEDIA_UNMUTE_REQUEST:p.MEDIA_MUTE_REQUEST,this.dispatchEvent(new d.CustomEvent(h,{composed:!0,bubbles:!0}));break;case"f":h=this.mediaStore.getState().mediaIsFullscreen?p.MEDIA_EXIT_FULLSCREEN_REQUEST:p.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new d.CustomEvent(h,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new d.CustomEvent(p.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":{let f=this.hasAttribute(E.KEYBOARD_BACKWARD_SEEK_OFFSET)?+this.getAttribute(E.KEYBOARD_BACKWARD_SEEK_OFFSET):gu;_=Math.max(((o=this.mediaStore.getState().mediaCurrentTime)!=null?o:0)-f,0),g=new d.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:_}),this.dispatchEvent(g);break}case"ArrowRight":{let f=this.hasAttribute(E.KEYBOARD_FORWARD_SEEK_OFFSET)?+this.getAttribute(E.KEYBOARD_FORWARD_SEEK_OFFSET):gu;_=Math.max(((s=this.mediaStore.getState().mediaCurrentTime)!=null?s:0)+f,0),g=new d.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:_}),this.dispatchEvent(g);break}default:break}}};zt=new WeakMap;Pa=new WeakMap;F=new WeakMap;Ua=new WeakMap;$e=new WeakMap;po=new WeakMap;fo=new WeakSet;gs=function(){var t;this.mediaStore=bu({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(E.DEFAULT_SUBTITLES),defaultDuration:this.hasAttribute(E.DEFAULT_DURATION)?+this.getAttribute(E.DEFAULT_DURATION):void 0,defaultStreamType:(t=this.getAttribute(E.DEFAULT_STREAM_TYPE))!=null?t:void 0,liveEdgeOffset:this.hasAttribute(E.LIVE_EDGE_OFFSET)?+this.getAttribute(E.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(E.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(E.SEEK_TO_LIVE_OFFSET):this.hasAttribute(E.LIVE_EDGE_OFFSET)?+this.getAttribute(E.LIVE_EDGE_OFFSET):void 0,noAutoSeekToLive:this.hasAttribute(E.NO_AUTO_SEEK_TO_LIVE),noVolumePref:this.hasAttribute(E.NO_VOLUME_PREF),noSubtitlesLangPref:this.hasAttribute(E.NO_SUBTITLES_LANG_PREF)}})};wi=new WeakSet;Ha=function(t){let{key:e}=t;if(!yu.includes(e)){this.removeEventListener("keyup",kt(this,wi,Ha));return}this.keyboardShortcutHandler(t)};vo=new WeakSet;_s=function(t){let{metaKey:e,altKey:i,key:a}=t;if(e||i||!yu.includes(a)){this.removeEventListener("keyup",kt(this,wi,Ha));return}[" ","ArrowLeft","ArrowRight"].includes(a)&&!(x(this,zt).contains(`no${a.toLowerCase()}`)||a===" "&&x(this,zt).contains("nospace"))&&t.preventDefault(),this.addEventListener("keyup",kt(this,wi,Ha),{once:!0})};var Ah=Object.values(n),Th=Object.values(is),ku=t=>{var e,i,a,r;let{observedAttributes:o}=t.constructor;!o&&((e=t.nodeName)!=null&&e.includes("-"))&&(d.customElements.upgrade(t),{observedAttributes:o}=t.constructor);let s=(r=(a=(i=t==null?void 0:t.getAttribute)==null?void 0:i.call(t,L.MEDIA_CHROME_ATTRIBUTES))==null?void 0:a.split)==null?void 0:r.call(a,/\s+/);return Array.isArray(o||s)?(o||s).filter(l=>Ah.includes(l)):[]},yh=t=>{var e,i;return(e=t.nodeName)!=null&&e.includes("-")&&d.customElements.get((i=t.nodeName)==null?void 0:i.toLowerCase())&&!(t instanceof d.customElements.get(t.nodeName.toLowerCase()))&&d.customElements.upgrade(t),Th.some(a=>a in t)},As=t=>yh(t)||!!ku(t).length,_u=t=>{var e;return(e=t==null?void 0:t.join)==null?void 0:e.call(t,":")},Au={[n.MEDIA_SUBTITLES_LIST]:ut,[n.MEDIA_SUBTITLES_SHOWING]:ut,[n.MEDIA_SEEKABLE]:_u,[n.MEDIA_BUFFERED]:t=>t==null?void 0:t.map(_u).join(" "),[n.MEDIA_PREVIEW_COORDS]:t=>t==null?void 0:t.join(" "),[n.MEDIA_RENDITION_LIST]:Ud,[n.MEDIA_AUDIO_TRACK_LIST]:Bd},kh=async(t,e,i)=>{var a,r;if(t.isConnected||await Kr(0),typeof i=="boolean"||i==null)return S(t,e,i);if(typeof i=="number")return O(t,e,i);if(typeof i=="string")return M(t,e,i);if(Array.isArray(i)&&!i.length)return t.removeAttribute(e);let o=(r=(a=Au[e])==null?void 0:a.call(Au,i))!=null?r:i;return t.setAttribute(e,o)},Sh=t=>{var e;return!!((e=t.closest)!=null&&e.call(t,'*[slot="media"]'))},Zt=(t,e)=>{if(Sh(t))return;let i=(r,o)=>{var s,l;As(r)&&o(r);let{children:u=[]}=r!=null?r:{},h=(l=(s=r==null?void 0:r.shadowRoot)==null?void 0:s.children)!=null?l:[];[...u,...h].forEach(g=>Zt(g,o))},a=t==null?void 0:t.nodeName.toLowerCase();if(a.includes("-")&&!As(t)){d.customElements.whenDefined(a).then(()=>{i(t,e)});return}i(t,e)},Tu=(t,e,i)=>{t.forEach(a=>{if(e in a){a[e]=i;return}let r=ku(a),o=e.toLowerCase();r.includes(o)&&kh(a,o,i)})},Ih=(t,e,i)=>{Zt(t,e);let a=_=>{var g;let f=(g=_==null?void 0:_.composedPath()[0])!=null?g:_.target;e(f)},r=_=>{var g;let f=(g=_==null?void 0:_.composedPath()[0])!=null?g:_.target;i(f)};t.addEventListener(p.REGISTER_MEDIA_STATE_RECEIVER,a),t.addEventListener(p.UNREGISTER_MEDIA_STATE_RECEIVER,r);let o=_=>{_.forEach(g=>{let{addedNodes:f=[],removedNodes:v=[],type:N,target:T,attributeName:C}=g;N==="childList"?(Array.prototype.forEach.call(f,P=>Zt(P,e)),Array.prototype.forEach.call(v,P=>Zt(P,i))):N==="attributes"&&C===L.MEDIA_CHROME_ATTRIBUTES&&(As(T)?e(T):i(T))})},s=[],l=_=>{let g=_.target;g.name!=="media"&&(s.forEach(f=>Zt(f,i)),s=[...g.assignedElements({flatten:!0})],s.forEach(f=>Zt(f,e)))};t.addEventListener("slotchange",l);let u=new MutationObserver(o);return u.observe(t,{childList:!0,attributes:!0,subtree:!0}),()=>{Zt(t,i),t.removeEventListener("slotchange",l),u.disconnect(),t.removeEventListener(p.REGISTER_MEDIA_STATE_RECEIVER,a),t.removeEventListener(p.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};d.customElements.get("media-controller")||d.customElements.define("media-controller",Eo);var ys=Eo;var Ri={PLACEMENT:"placement",BOUNDS:"bounds"};function Mh(t){return`
158
+ `}var oh=Object.values(n),nh="sm:384 md:576 lg:768 xl:960";function sh(t){au(t.target,t.contentRect.width)}function au(t,e){var i;if(!t.isConnected)return;let a=(i=t.getAttribute(y.BREAKPOINTS))!=null?i:nh,r=lh(a),o=dh(r,e),s=!1;if(Object.keys(r).forEach(l=>{if(o.includes(l)){t.hasAttribute(`breakpoint${l}`)||(t.setAttribute(`breakpoint${l}`,""),s=!0);return}t.hasAttribute(`breakpoint${l}`)&&(t.removeAttribute(`breakpoint${l}`),s=!0)}),s){let l=new CustomEvent(Ce.BREAKPOINTS_CHANGE,{detail:o});t.dispatchEvent(l)}t.breakpointsComputed||(t.breakpointsComputed=!0,t.dispatchEvent(new CustomEvent(Ce.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}function lh(t){let e=t.split(/\s+/);return Object.fromEntries(e.map(i=>i.split(":")))}function dh(t,e){return Object.keys(t).filter(i=>e>=parseInt(t[i]))}var Vt=class extends d.HTMLElement{constructor(){if(super(),Se(this,us),Se(this,cs),Se(this,ms),Se(this,Da),Se(this,oo),Se(this,Si),Se(this,ao,0),Se(this,yi,null),Se(this,xa,null),Se(this,ki,void 0),this.breakpointsComputed=!1,Se(this,to,new MutationObserver(Le(this,us,eu).bind(this))),Se(this,Ra,!1),Se(this,io,i=>{Ie(this,Ra)||(setTimeout(()=>{sh(i),Ft(this,Ra,!1)},0),Ft(this,Ra,!0))}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let i=q(this.attributes),a=this.constructor.getTemplateHTML(i);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(a):this.shadowRoot.innerHTML=a}let e=this.querySelector(":scope > slot[slot=media]");e&&e.addEventListener("slotchange",()=>{if(!e.assignedElements({flatten:!0}).length){Ie(this,yi)&&this.mediaUnsetCallback(Ie(this,yi));return}this.handleMediaUpdated(this.media)})}static get observedAttributes(){return[y.AUTOHIDE,y.GESTURES_DISABLED].concat(oh).filter(e=>![n.MEDIA_RENDITION_LIST,n.MEDIA_AUDIO_TRACK_LIST,n.MEDIA_CHAPTERS_CUES,n.MEDIA_WIDTH,n.MEDIA_HEIGHT,n.MEDIA_ERROR,n.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,i,a){e.toLowerCase()==y.AUTOHIDE&&(this.autohide=a)}get media(){let e=this.querySelector(":scope > [slot=media]");return(e==null?void 0:e.nodeName)=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(Ft(this,yi,e),e.localName.includes("-")&&await d.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;Ie(this,to).observe(this,{childList:!0,subtree:!0}),st(this,Ie(this,io));let a=this.getAttribute(y.AUDIO)!=null?h("audio player"):h("video player");this.setAttribute("role","region"),this.setAttribute("aria-label",a),this.handleMediaUpdated(this.media),this.setAttribute(y.USER_INACTIVE,""),au(this,this.getBoundingClientRect().width),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),(e=d.window)==null||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;Ie(this,to).disconnect(),lt(this,Ie(this,io)),this.media&&this.mediaUnsetCallback(this.media),(e=d.window)==null||e.removeEventListener("mouseup",this)}mediaSetCallback(e){}mediaUnsetCallback(e){Ft(this,yi,null)}handleEvent(e){switch(e.type){case"pointerdown":Ft(this,ao,e.timeStamp);break;case"pointermove":Le(this,cs,tu).call(this,e);break;case"pointerup":Le(this,ms,iu).call(this,e);break;case"mouseleave":Le(this,Da,ro).call(this);break;case"mouseup":this.removeAttribute(y.KEYBOARD_CONTROL);break;case"keyup":Le(this,Si,Oa).call(this),this.setAttribute(y.KEYBOARD_CONTROL,"");break}}set autohide(e){let i=Number(e);Ft(this,ki,isNaN(i)?0:i)}get autohide(){return(Ie(this,ki)===void 0?2:Ie(this,ki)).toString()}get breakpoints(){return I(this,y.BREAKPOINTS)}set breakpoints(e){M(this,y.BREAKPOINTS,e)}get audio(){return k(this,y.AUDIO)}set audio(e){S(this,y.AUDIO,e)}get gesturesDisabled(){return k(this,y.GESTURES_DISABLED)}set gesturesDisabled(e){S(this,y.GESTURES_DISABLED,e)}get keyboardControl(){return k(this,y.KEYBOARD_CONTROL)}set keyboardControl(e){S(this,y.KEYBOARD_CONTROL,e)}get noAutohide(){return k(this,y.NO_AUTOHIDE)}set noAutohide(e){S(this,y.NO_AUTOHIDE,e)}get autohideOverControls(){return k(this,y.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){S(this,y.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return k(this,y.USER_INACTIVE)}set userInteractive(e){S(this,y.USER_INACTIVE,e)}};ao=new WeakMap;yi=new WeakMap;xa=new WeakMap;ki=new WeakMap;to=new WeakMap;us=new WeakSet;eu=function(t){let e=this.media;for(let i of t){if(i.type!=="childList")continue;let a=i.removedNodes;for(let r of a){if(r.slot!="media"||i.target!=this)continue;let o=i.previousSibling&&i.previousSibling.previousElementSibling;if(!o||!e)this.mediaUnsetCallback(r);else{let s=o.slot!=="media";for(;(o=o.previousSibling)!==null;)o.slot=="media"&&(s=!1);s&&this.mediaUnsetCallback(r)}}if(e)for(let r of i.addedNodes)r===e&&this.handleMediaUpdated(e)}};Ra=new WeakMap;io=new WeakMap;cs=new WeakSet;tu=function(t){if(t.pointerType!=="mouse"&&t.timeStamp-Ie(this,ao)<250)return;Le(this,oo,ps).call(this),clearTimeout(Ie(this,xa));let e=this.hasAttribute(y.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(t.target)||e)&&Le(this,Si,Oa).call(this)};ms=new WeakSet;iu=function(t){if(t.pointerType==="touch"){let e=!this.hasAttribute(y.USER_INACTIVE);[this,this.media].includes(t.target)&&e?Le(this,Da,ro).call(this):Le(this,Si,Oa).call(this)}else t.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(e==null?void 0:e.localName))&&Le(this,Si,Oa).call(this)};Da=new WeakSet;ro=function(){if(Ie(this,ki)<0||this.hasAttribute(y.USER_INACTIVE))return;this.setAttribute(y.USER_INACTIVE,"");let t=new d.CustomEvent(Ce.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(t)};oo=new WeakSet;ps=function(){if(!this.hasAttribute(y.USER_INACTIVE))return;this.removeAttribute(y.USER_INACTIVE);let t=new d.CustomEvent(Ce.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(t)};Si=new WeakSet;Oa=function(){Le(this,oo,ps).call(this),clearTimeout(Ie(this,xa));let t=parseInt(this.autohide);t<0||Ft(this,xa,setTimeout(()=>{Le(this,Da,ro).call(this)},t*1e3))};Vt.shadowRootOptions={mode:"open"};Vt.getTemplateHTML=rh;d.customElements.get("media-container")||d.customElements.define("media-container",Vt);var ru=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ae=(t,e,i)=>(ru(t,e,"read from private field"),i?i.call(t):e.get(t)),Na=(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)},no=(t,e,i,a)=>(ru(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ii,Mi,so,Kt,dt,At,Tt=class{constructor(e,i,{defaultValue:a}={defaultValue:void 0}){Na(this,dt),Na(this,Ii,void 0),Na(this,Mi,void 0),Na(this,so,void 0),Na(this,Kt,new Set),no(this,Ii,e),no(this,Mi,i),no(this,so,new Set(a))}[Symbol.iterator](){return ae(this,dt,At).values()}get length(){return ae(this,dt,At).size}get value(){var e;return(e=[...ae(this,dt,At)].join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(no(this,Kt,new Set),this.add(...(i=e==null?void 0:e.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return[...ae(this,dt,At)][e]}values(){return ae(this,dt,At).values()}forEach(e,i){ae(this,dt,At).forEach(e,i)}add(...e){var i,a;e.forEach(r=>ae(this,Kt).add(r)),!(this.value===""&&!((i=ae(this,Ii))!=null&&i.hasAttribute(`${ae(this,Mi)}`)))&&((a=ae(this,Ii))==null||a.setAttribute(`${ae(this,Mi)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>ae(this,Kt).delete(a)),(i=ae(this,Ii))==null||i.setAttribute(`${ae(this,Mi)}`,`${this.value}`)}contains(e){return ae(this,dt,At).has(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){return this.remove(e),this.add(i),e===i}};Ii=new WeakMap;Mi=new WeakMap;so=new WeakMap;Kt=new WeakMap;dt=new WeakSet;At=function(){return ae(this,Kt).size?ae(this,Kt):ae(this,so)};var uh=(t="")=>t.split(/\s+/),ou=(t="")=>{let[e,i,a]=t.split(":"),r=a?decodeURIComponent(a):void 0;return{kind:e==="cc"?pe.CAPTIONS:pe.SUBTITLES,language:i,label:r}},Gt=(t="",e={})=>uh(t).map(i=>{let a=ou(i);return{...e,...a}}),fs=t=>t?Array.isArray(t)?t.map(e=>typeof e=="string"?ou(e):e):typeof t=="string"?Gt(t):[t]:[],lo=({kind:t,label:e,language:i}={kind:"subtitles"})=>e?`${t==="captions"?"cc":"sb"}:${i}:${encodeURIComponent(e)}`:i,ut=(t=[])=>Array.prototype.map.call(t,lo).join(" "),ch=(t,e)=>i=>i[t]===e,nu=t=>{let e=Object.entries(t).map(([i,a])=>ch(i,a));return i=>e.every(a=>a(i))},Yt=(t,e=[],i=[])=>{let a=fs(i).map(nu),r=o=>a.some(s=>s(o));Array.from(e).filter(r).forEach(o=>{o.mode=t})},qt=(t,e=()=>!0)=>{if(!(t!=null&&t.textTracks))return[];let i=typeof e=="function"?e:nu(e);return Array.from(t.textTracks).filter(i)},uo=t=>{var e;return!!((e=t.mediaSubtitlesShowing)!=null&&e.length)||t.hasAttribute(n.MEDIA_SUBTITLES_SHOWING)};var lu=t=>{var e;let{media:i,fullscreenElement:a}=t;try{let r=a&&"requestFullscreen"in a?"requestFullscreen":a&&"webkitRequestFullScreen"in a?"webkitRequestFullScreen":void 0;if(r){let o=(e=a[r])==null?void 0:e.call(a);if(o instanceof Promise)return o.catch(()=>{})}else i!=null&&i.webkitEnterFullscreen?i.webkitEnterFullscreen():i!=null&&i.requestFullscreen&&i.requestFullscreen()}catch(r){console.error(r)}},su="exitFullscreen"in Y?"exitFullscreen":"webkitExitFullscreen"in Y?"webkitExitFullscreen":"webkitCancelFullScreen"in Y?"webkitCancelFullScreen":void 0,du=t=>{var e;let{documentElement:i}=t;if(su){let a=(e=i==null?void 0:i[su])==null?void 0:e.call(i);if(a instanceof Promise)return a.catch(()=>{})}},Pa="fullscreenElement"in Y?"fullscreenElement":"webkitFullscreenElement"in Y?"webkitFullscreenElement":void 0,mh=t=>{let{documentElement:e,media:i}=t,a=e==null?void 0:e[Pa];return!a&&"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&i.webkitDisplayingFullscreen&&i.webkitPresentationMode===Ud.FULLSCREEN?i:a},uu=t=>{var e;let{media:i,documentElement:a,fullscreenElement:r=i}=t;if(!i||!a)return!1;let o=mh(t);if(!o)return!1;if(o===r||o===i)return!0;if(o.localName.includes("-")){let s=o.shadowRoot;if(!(Pa in s))return de(o,r);for(;s!=null&&s[Pa];){if(s[Pa]===r)return!0;s=(e=s[Pa])==null?void 0:e.shadowRoot}}return!1},hh="fullscreenEnabled"in Y?"fullscreenEnabled":"webkitFullscreenEnabled"in Y?"webkitFullscreenEnabled":void 0,cu=t=>{let{documentElement:e,media:i}=t;return!!(e!=null&&e[hh])||i&&"webkitSupportsFullscreen"in i};var co,vs=()=>{var t,e;return co||(co=(e=(t=Y)==null?void 0:t.createElement)==null?void 0:e.call(t,"video"),co)},mu=async(t=vs())=>{if(!t)return!1;let e=t.volume;t.volume=e/2+.1;let i=new AbortController,a=await Promise.race([ph(t,i.signal),fh(t,e)]);return i.abort(),a},ph=(t,e)=>new Promise(i=>{t.addEventListener("volumechange",()=>i(!0),{signal:e})}),fh=async(t,e)=>{for(let i=0;i<10;i++){if(t.volume===e)return!1;await Gr(10)}return t.volume!==e},vh=/.*Version\/.*Safari\/.*/.test(d.navigator.userAgent),bs=(t=vs())=>d.matchMedia("(display-mode: standalone)").matches&&vh?!1:typeof(t==null?void 0:t.requestPictureInPicture)=="function",Es=(t=vs())=>cu({documentElement:Y,media:t}),hu=Es(),pu=bs(),fu=!!d.WebKitPlaybackTargetAvailabilityEvent,vu=!!d.chrome;var Ci=t=>qt(t.media,e=>[pe.SUBTITLES,pe.CAPTIONS].includes(e.kind)).sort((e,i)=>e.kind>=i.kind?1:-1),gs=t=>qt(t.media,e=>e.mode===gt.SHOWING&&[pe.SUBTITLES,pe.CAPTIONS].includes(e.kind)),mo=(t,e)=>{let i=Ci(t),a=gs(t),r=!!a.length;if(i.length){if(e===!1||r&&e!==!0)Yt(gt.DISABLED,i,a);else if(e===!0||!r&&e!==!1){let o=i[0],{options:s}=t;if(!(s!=null&&s.noSubtitlesLangPref)){let _=globalThis.localStorage.getItem("media-chrome-pref-subtitles-lang"),g=_?[_,...globalThis.navigator.languages]:globalThis.navigator.languages,f=i.filter(v=>g.some(N=>v.language.toLowerCase().startsWith(N.split("-")[0]))).sort((v,N)=>{let T=g.findIndex(P=>v.language.toLowerCase().startsWith(P.split("-")[0])),C=g.findIndex(P=>N.language.toLowerCase().startsWith(P.split("-")[0]));return T-C});f[0]&&(o=f[0])}let{language:l,label:u,kind:m}=o;Yt(gt.DISABLED,i,a),Yt(gt.SHOWING,i,[{language:l,label:u,kind:m}])}}},ho=(t,e)=>t===e?!0:t==null||e==null||typeof t!=typeof e?!1:typeof t=="number"&&Number.isNaN(t)&&Number.isNaN(e)?!0:typeof t!="object"?!1:Array.isArray(t)?bh(t,e):Object.entries(t).every(([i,a])=>i in e&&ho(a,e[i])),bh=(t,e)=>{let i=Array.isArray(t),a=Array.isArray(e);return i!==a?!1:i||a?t.length!==e.length?!1:t.every((r,o)=>ho(r,e[o])):!0};var Eh=Object.values(De),po,gh=mu().then(t=>(po=t,po)),bu=async(...t)=>{await Promise.all(t.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof d.HTMLElement))return;let i=e.localName;if(!i.includes("-"))return;let a=d.customElements.get(i);a&&e instanceof a||(await d.customElements.whenDefined(i),d.customElements.upgrade(e))}))},_h=new d.DOMParser,Ah=t=>t&&(_h.parseFromString(t,"text/html").body.textContent||t),Li={mediaError:{get(t,e){let{media:i}=t;if((e==null?void 0:e.type)!=="playing")return i==null?void 0:i.error},mediaEvents:["emptied","error","playing"]},mediaErrorCode:{get(t,e){var i;let{media:a}=t;if((e==null?void 0:e.type)!=="playing")return(i=a==null?void 0:a.error)==null?void 0:i.code},mediaEvents:["emptied","error","playing"]},mediaErrorMessage:{get(t,e){var i,a;let{media:r}=t;if((e==null?void 0:e.type)!=="playing")return(a=(i=r==null?void 0:r.error)==null?void 0:i.message)!=null?a:""},mediaEvents:["emptied","error","playing"]},mediaWidth:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.videoWidth)!=null?e:0},mediaEvents:["resize"]},mediaHeight:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.videoHeight)!=null?e:0},mediaEvents:["resize"]},mediaPaused:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.paused)!=null?e:!0},set(t,e){var i;let{media:a}=e;a&&(t?a.pause():(i=a.play())==null||i.catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(t,e){let{media:i}=t;return i?e?e.type==="playing":!i.paused:!1},mediaEvents:["playing","emptied"]},mediaEnded:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.ended)!=null?e:!1},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.playbackRate)!=null?e:1},set(t,e){let{media:i}=e;i&&Number.isFinite(+t)&&(i.playbackRate=+t)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.muted)!=null?e:!1},set(t,e){let{media:i,options:{noMutedPref:a}={}}=e;if(i){if(!i.hasAttribute("muted")&&!a)try{d.localStorage.setItem("media-chrome-pref-muted",t?"true":"false")}catch(r){console.debug("Error setting muted pref",r)}i.muted=t}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{let{options:{noMutedPref:i}}=e,{media:a}=e;if(!(!a||a.muted||i))try{let r=d.localStorage.getItem("media-chrome-pref-muted")==="true";Li.mediaMuted.set(r,e),t(r)}catch(r){console.debug("Error getting muted pref",r)}}]},mediaVolume:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.volume)!=null?e:1},set(t,e){let{media:i,options:{noVolumePref:a}={}}=e;if(i){try{t==null?d.localStorage.removeItem("media-chrome-pref-volume"):!i.hasAttribute("muted")&&!a&&d.localStorage.setItem("media-chrome-pref-volume",t.toString())}catch(r){console.debug("Error setting volume pref",r)}Number.isFinite(+t)&&(i.volume=+t)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{let{options:{noVolumePref:i}}=e;if(!i)try{let{media:a}=e;if(!a)return;let r=d.localStorage.getItem("media-chrome-pref-volume");if(r==null)return;Li.mediaVolume.set(+r,e),t(+r)}catch(a){console.debug("Error getting volume pref",a)}}]},mediaVolumeLevel:{get(t){let{media:e}=t;return typeof(e==null?void 0:e.volume)=="undefined"?"high":e.muted||e.volume===0?"off":e.volume<.5?"low":e.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.currentTime)!=null?e:0},set(t,e){let{media:i}=e;!i||!Ai(t)||(i.currentTime=t)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(t){let{media:e,options:{defaultDuration:i}={}}=t;return i&&(!e||!e.duration||Number.isNaN(e.duration)||!Number.isFinite(e.duration))?i:Number.isFinite(e==null?void 0:e.duration)?e.duration:Number.NaN},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(t){let{media:e}=t;return(e==null?void 0:e.readyState)<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(t){var e;let{media:i}=t;if(!((e=i==null?void 0:i.seekable)!=null&&e.length))return;let a=i.seekable.start(0),r=i.seekable.end(i.seekable.length-1);if(!(!a&&!r))return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get(t){var e;let{media:i}=t,a=(e=i==null?void 0:i.buffered)!=null?e:[];return Array.from(a).map((r,o)=>[Number(a.start(o).toFixed(3)),Number(a.end(o).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(t){let{media:e,options:{defaultStreamType:i}={}}=t,a=[De.LIVE,De.ON_DEMAND].includes(i)?i:void 0;if(!e)return a;let{streamType:r}=e;if(Eh.includes(r))return r===De.UNKNOWN?a:r;let o=e.duration;return o===1/0?De.LIVE:Number.isFinite(o)?De.ON_DEMAND:a},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(t){let{media:e}=t;if(!e)return Number.NaN;let{targetLiveWindow:i}=e,a=Li.mediaStreamType.get(t);return(i==null||Number.isNaN(i))&&a===De.LIVE?0:i},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(t){let{media:e,options:{liveEdgeOffset:i=10}={}}=t;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return Number.isNaN(e.liveEdgeStart)?!1:e.currentTime>=e.liveEdgeStart;if(!(Li.mediaStreamType.get(t)===De.LIVE))return!1;let r=e.seekable;if(!r)return!0;if(!r.length)return!1;let o=r.end(r.length-1)-i;return e.currentTime>=o},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get(t){return Ci(t).map(({kind:e,label:i,language:a})=>({kind:e,label:i,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get(t){return gs(t).map(({kind:e,label:i,language:a})=>({kind:e,label:i,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var i,a;let{media:r,options:o}=e;if(!r)return;let s=l=>{var u;!o.defaultSubtitles||l&&![pe.CAPTIONS,pe.SUBTITLES].includes((u=l==null?void 0:l.track)==null?void 0:u.kind)||mo(e,!0)};return r.addEventListener("loadstart",s),(i=r.textTracks)==null||i.addEventListener("addtrack",s),(a=r.textTracks)==null||a.addEventListener("removetrack",s),()=>{var l,u;r.removeEventListener("loadstart",s),(l=r.textTracks)==null||l.removeEventListener("addtrack",s),(u=r.textTracks)==null||u.removeEventListener("removetrack",s)}}]},mediaChaptersCues:{get(t){var e;let{media:i}=t;if(!i)return[];let[a]=qt(i,{kind:pe.CHAPTERS});return Array.from((e=a==null?void 0:a.cues)!=null?e:[]).map(({text:r,startTime:o,endTime:s})=>({text:Ah(r),startTime:o,endTime:s}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var i;let{media:a}=e;if(!a)return;let r=a.querySelector('track[kind="chapters"][default][src]'),o=(i=a.shadowRoot)==null?void 0:i.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return r==null||r.addEventListener("load",t),o==null||o.addEventListener("load",t),()=>{r==null||r.removeEventListener("load",t),o==null||o.removeEventListener("load",t)}}]},mediaIsPip:{get(t){var e,i;let{media:a,documentElement:r}=t;if(!a||!r||!r.pictureInPictureElement)return!1;if(r.pictureInPictureElement===a)return!0;if(r.pictureInPictureElement instanceof HTMLMediaElement)return(e=a.localName)!=null&&e.includes("-")?de(a,r.pictureInPictureElement):!1;if(r.pictureInPictureElement.localName.includes("-")){let o=r.pictureInPictureElement.shadowRoot;for(;o!=null&&o.pictureInPictureElement;){if(o.pictureInPictureElement===a)return!0;o=(i=o.pictureInPictureElement)==null?void 0:i.shadowRoot}}return!1},set(t,e){let{media:i}=e;if(i)if(t){if(!Y.pictureInPictureEnabled){console.warn("MediaChrome: Picture-in-picture is not enabled");return}if(!i.requestPictureInPicture){console.warn("MediaChrome: The current media does not support picture-in-picture");return}let a=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(r=>{if(r.code===11){if(!i.src){console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.");return}if(i.readyState===0&&i.preload==="none"){let o=()=>{i.removeEventListener("loadedmetadata",s),i.preload="none"},s=()=>{i.requestPictureInPicture().catch(a),o()};i.addEventListener("loadedmetadata",s),i.preload="metadata",setTimeout(()=>{i.readyState===0&&a(),o()},1e3)}else throw r}else throw r})}else Y.pictureInPictureElement&&Y.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(t){var e;let{media:i}=t;return[...(e=i==null?void 0:i.videoRenditions)!=null?e:[]].map(a=>({...a}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(t){var e,i,a;let{media:r}=t;return(a=(i=r==null?void 0:r.videoRenditions)==null?void 0:i[(e=r.videoRenditions)==null?void 0:e.selectedIndex])==null?void 0:a.id},set(t,e){let{media:i}=e;if(!(i!=null&&i.videoRenditions)){console.warn("MediaController: Rendition selection not supported by this media.");return}let a=t,r=Array.prototype.findIndex.call(i.videoRenditions,o=>o.id==a);i.videoRenditions.selectedIndex!=r&&(i.videoRenditions.selectedIndex=r)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(t){var e;let{media:i}=t;return[...(e=i==null?void 0:i.audioTracks)!=null?e:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(t){var e,i;let{media:a}=t;return(i=[...(e=a==null?void 0:a.audioTracks)!=null?e:[]].find(r=>r.enabled))==null?void 0:i.id},set(t,e){let{media:i}=e;if(!(i!=null&&i.audioTracks)){console.warn("MediaChrome: Audio track selection not supported by this media.");return}let a=t;for(let r of i.audioTracks)r.enabled=a==r.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get(t){return uu(t)},set(t,e){t?lu(e):du(e)},rootEvents:["fullscreenchange","webkitfullscreenchange"],mediaEvents:["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"]},mediaIsCasting:{get(t){var e;let{media:i}=t;return!(i!=null&&i.remote)||((e=i.remote)==null?void 0:e.state)==="disconnected"?!1:!!i.remote.state},set(t,e){var i,a;let{media:r}=e;if(r&&!(t&&((i=r.remote)==null?void 0:i.state)!=="disconnected")&&!(!t&&((a=r.remote)==null?void 0:a.state)!=="connected")){if(typeof r.remote.prompt!="function"){console.warn("MediaChrome: Casting is not supported in this environment");return}r.remote.prompt().catch(()=>{})}},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get(){return!1},set(t,e){let{media:i}=e;if(i){if(!(i.webkitShowPlaybackTargetPicker&&d.WebKitPlaybackTargetAvailabilityEvent)){console.error("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment");return}i.webkitShowPlaybackTargetPicker()}},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(t){let{media:e}=t;if(!hu||!Es(e))return fe.UNSUPPORTED}},mediaPipUnavailable:{get(t){let{media:e}=t;if(!pu||!bs(e))return fe.UNSUPPORTED;if(e!=null&&e.disablePictureInPicture)return fe.UNAVAILABLE}},mediaVolumeUnavailable:{get(t){let{media:e}=t;if(po===!1||(e==null?void 0:e.volume)==null)return fe.UNSUPPORTED},stateOwnersUpdateHandlers:[t=>{po==null&&gh.then(e=>t(e?void 0:fe.UNSUPPORTED))}]},mediaCastUnavailable:{get(t,{availability:e="not-available"}={}){var i;let{media:a}=t;if(!vu||!((i=a==null?void 0:a.remote)!=null&&i.state))return fe.UNSUPPORTED;if(!(e==null||e==="available"))return fe.UNAVAILABLE},stateOwnersUpdateHandlers:[(t,e)=>{var i;let{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(i=a==null?void 0:a.remote)==null||i.watchAvailability(o=>{t({availability:o?"available":"not-available"})}).catch(o=>{o.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var o;(o=a==null?void 0:a.remote)==null||o.cancelWatchAvailability().catch(()=>{})}):void 0}]},mediaAirplayUnavailable:{get(t,e){if(!fu)return fe.UNSUPPORTED;if((e==null?void 0:e.availability)==="not-available")return fe.UNAVAILABLE},mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(t,e)=>{var i;let{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(i=a==null?void 0:a.remote)==null||i.watchAvailability(o=>{t({availability:o?"available":"not-available"})}).catch(o=>{o.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var o;(o=a==null?void 0:a.remote)==null||o.cancelWatchAvailability().catch(()=>{})}):void 0}]},mediaRenditionUnavailable:{get(t){var e;let{media:i}=t;if(!(i!=null&&i.videoRenditions))return fe.UNSUPPORTED;if(!((e=i.videoRenditions)!=null&&e.length))return fe.UNAVAILABLE},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(t){var e,i;let{media:a}=t;if(!(a!=null&&a.audioTracks))return fe.UNSUPPORTED;if(((i=(e=a.audioTracks)==null?void 0:e.length)!=null?i:0)<=1)return fe.UNAVAILABLE},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(t){let{options:{mediaLang:e}={}}=t;return e!=null?e:"en"}}};var Eu={[p.MEDIA_PREVIEW_REQUEST](t,e,{detail:i}){var a,r,o;let{media:s}=e,l=i!=null?i:void 0,u,m;if(s&&l!=null){let[v]=qt(s,{kind:pe.METADATA,label:"thumbnails"}),N=Array.prototype.find.call((a=v==null?void 0:v.cues)!=null?a:[],(T,C,P)=>C===0?T.endTime>l:C===P.length-1?T.startTime<=l:T.startTime<=l&&T.endTime>l);if(N){let T=/'^(?:[a-z]+:)?\/\//i.test(N.text)||(r=s==null?void 0:s.querySelector('track[label="thumbnails"]'))==null?void 0:r.src,C=new URL(N.text,T);m=new URLSearchParams(C.hash).get("#xywh").split(",").map(ee=>+ee),u=C.href}}let _=t.mediaDuration.get(e),f=(o=t.mediaChaptersCues.get(e).find((v,N,T)=>N===T.length-1&&_===v.endTime?v.startTime<=l&&v.endTime>=l:v.startTime<=l&&v.endTime>l))==null?void 0:o.text;return i!=null&&f==null&&(f=""),{mediaPreviewTime:l,mediaPreviewImage:u,mediaPreviewCoords:m,mediaPreviewChapter:f}},[p.MEDIA_PAUSE_REQUEST](t,e){t["mediaPaused"].set(!0,e)},[p.MEDIA_PLAY_REQUEST](t,e){var i,a,r,o;let s="mediaPaused",u=t.mediaStreamType.get(e)===De.LIVE,m=!((i=e.options)!=null&&i.noAutoSeekToLive),_=t.mediaTargetLiveWindow.get(e)>0;if(u&&m&&!_){let g=(a=t.mediaSeekable.get(e))==null?void 0:a[1];if(g){let f=(o=(r=e.options)==null?void 0:r.seekToLiveOffset)!=null?o:0,v=g-f;t.mediaCurrentTime.set(v,e)}}t[s].set(!1,e)},[p.MEDIA_PLAYBACK_RATE_REQUEST](t,e,{detail:i}){let a="mediaPlaybackRate",r=i;t[a].set(r,e)},[p.MEDIA_MUTE_REQUEST](t,e){t["mediaMuted"].set(!0,e)},[p.MEDIA_UNMUTE_REQUEST](t,e){let i="mediaMuted";t.mediaVolume.get(e)||t.mediaVolume.set(.25,e),t[i].set(!1,e)},[p.MEDIA_VOLUME_REQUEST](t,e,{detail:i}){let a="mediaVolume",r=i;r&&t.mediaMuted.get(e)&&t.mediaMuted.set(!1,e),t[a].set(r,e)},[p.MEDIA_SEEK_REQUEST](t,e,{detail:i}){let a="mediaCurrentTime",r=i;t[a].set(r,e)},[p.MEDIA_SEEK_TO_LIVE_REQUEST](t,e){var i,a,r;let o="mediaCurrentTime",s=(i=t.mediaSeekable.get(e))==null?void 0:i[1];if(Number.isNaN(Number(s)))return;let l=(r=(a=e.options)==null?void 0:a.seekToLiveOffset)!=null?r:0,u=s-l;t[o].set(u,e)},[p.MEDIA_SHOW_SUBTITLES_REQUEST](t,e,{detail:i}){var a;let{options:r}=e,o=Ci(e),s=fs(i),l=(a=s[0])==null?void 0:a.language;l&&!r.noSubtitlesLangPref&&d.localStorage.setItem("media-chrome-pref-subtitles-lang",l),Yt(gt.SHOWING,o,s)},[p.MEDIA_DISABLE_SUBTITLES_REQUEST](t,e,{detail:i}){let a=Ci(e),r=i!=null?i:[];Yt(gt.DISABLED,a,r)},[p.MEDIA_TOGGLE_SUBTITLES_REQUEST](t,e,{detail:i}){mo(e,i)},[p.MEDIA_RENDITION_REQUEST](t,e,{detail:i}){let a="mediaRenditionSelected",r=i;t[a].set(r,e)},[p.MEDIA_AUDIO_TRACK_REQUEST](t,e,{detail:i}){let a="mediaAudioTrackEnabled",r=i;t[a].set(r,e)},[p.MEDIA_ENTER_PIP_REQUEST](t,e){let i="mediaIsPip";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[i].set(!0,e)},[p.MEDIA_EXIT_PIP_REQUEST](t,e){t["mediaIsPip"].set(!1,e)},[p.MEDIA_ENTER_FULLSCREEN_REQUEST](t,e){let i="mediaIsFullscreen";t.mediaIsPip.get(e)&&t.mediaIsPip.set(!1,e),t[i].set(!0,e)},[p.MEDIA_EXIT_FULLSCREEN_REQUEST](t,e){t["mediaIsFullscreen"].set(!1,e)},[p.MEDIA_ENTER_CAST_REQUEST](t,e){let i="mediaIsCasting";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[i].set(!0,e)},[p.MEDIA_EXIT_CAST_REQUEST](t,e){t["mediaIsCasting"].set(!1,e)},[p.MEDIA_AIRPLAY_REQUEST](t,e){t["mediaIsAirplaying"].set(!0,e)}};var gu=({media:t,fullscreenElement:e,documentElement:i,stateMediator:a=Li,requestMap:r=Eu,options:o={},monitorStateOwnersOnlyWithSubscriptions:s=!0})=>{let l=[],u={options:{...o}},m=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0}),_=T=>{T!=null&&(ho(T,m)||(m=Object.freeze({...m,...T}),l.forEach(C=>C(m))))},g=()=>{let T=Object.entries(a).reduce((C,[P,{get:ee}])=>(C[P]=ee(u),C),{});_(T)},f={},v,N=async(T,C)=>{var P,ee,_e,Et,ot,ma,ha,pa,fa,va,ba,Ea,ga,_a,Aa,Ta;let Vr=!!v;if(v={...u,...v!=null?v:{},...T},Vr)return;await bu(...Object.values(T));let nt=l.length>0&&C===0&&s,ya=u.media!==v.media,ka=((P=u.media)==null?void 0:P.textTracks)!==((ee=v.media)==null?void 0:ee.textTracks),Sa=((_e=u.media)==null?void 0:_e.videoRenditions)!==((Et=v.media)==null?void 0:Et.videoRenditions),pd=((ot=u.media)==null?void 0:ot.audioTracks)!==((ma=v.media)==null?void 0:ma.audioTracks),fd=((ha=u.media)==null?void 0:ha.remote)!==((pa=v.media)==null?void 0:pa.remote),vd=u.documentElement!==v.documentElement,bd=!!u.media&&(ya||nt),Ed=!!((fa=u.media)!=null&&fa.textTracks)&&(ka||nt),gd=!!((va=u.media)!=null&&va.videoRenditions)&&(Sa||nt),_d=!!((ba=u.media)!=null&&ba.audioTracks)&&(pd||nt),Ad=!!((Ea=u.media)!=null&&Ea.remote)&&(fd||nt),Td=!!u.documentElement&&(vd||nt),yd=bd||Ed||gd||_d||Ad||Td,Ei=l.length===0&&C===1&&s,kd=!!v.media&&(ya||Ei),Sd=!!((ga=v.media)!=null&&ga.textTracks)&&(ka||Ei),Id=!!((_a=v.media)!=null&&_a.videoRenditions)&&(Sa||Ei),Md=!!((Aa=v.media)!=null&&Aa.audioTracks)&&(pd||Ei),Cd=!!((Ta=v.media)!=null&&Ta.remote)&&(fd||Ei),Ld=!!v.documentElement&&(vd||Ei),wd=kd||Sd||Id||Md||Cd||Ld;if(!(yd||wd)){Object.entries(v).forEach(([G,Ia])=>{u[G]=Ia}),g(),v=void 0;return}Object.entries(a).forEach(([G,{get:Ia,mediaEvents:Lm=[],textTracksEvents:wm=[],videoRenditionsEvents:Rm=[],audioTracksEvents:xm=[],remoteEvents:Dm=[],rootEvents:Om=[],stateOwnersUpdateHandlers:Nm=[]}])=>{f[G]||(f[G]={});let Ae=Q=>{let Te=Ia(u,Q);_({[G]:Te})},ie;ie=f[G].mediaEvents,Lm.forEach(Q=>{ie&&bd&&(u.media.removeEventListener(Q,ie),f[G].mediaEvents=void 0),kd&&(v.media.addEventListener(Q,Ae),f[G].mediaEvents=Ae)}),ie=f[G].textTracksEvents,wm.forEach(Q=>{var Te,xe;ie&&Ed&&((Te=u.media.textTracks)==null||Te.removeEventListener(Q,ie),f[G].textTracksEvents=void 0),Sd&&((xe=v.media.textTracks)==null||xe.addEventListener(Q,Ae),f[G].textTracksEvents=Ae)}),ie=f[G].videoRenditionsEvents,Rm.forEach(Q=>{var Te,xe;ie&&gd&&((Te=u.media.videoRenditions)==null||Te.removeEventListener(Q,ie),f[G].videoRenditionsEvents=void 0),Id&&((xe=v.media.videoRenditions)==null||xe.addEventListener(Q,Ae),f[G].videoRenditionsEvents=Ae)}),ie=f[G].audioTracksEvents,xm.forEach(Q=>{var Te,xe;ie&&_d&&((Te=u.media.audioTracks)==null||Te.removeEventListener(Q,ie),f[G].audioTracksEvents=void 0),Md&&((xe=v.media.audioTracks)==null||xe.addEventListener(Q,Ae),f[G].audioTracksEvents=Ae)}),ie=f[G].remoteEvents,Dm.forEach(Q=>{var Te,xe;ie&&Ad&&((Te=u.media.remote)==null||Te.removeEventListener(Q,ie),f[G].remoteEvents=void 0),Cd&&((xe=v.media.remote)==null||xe.addEventListener(Q,Ae),f[G].remoteEvents=Ae)}),ie=f[G].rootEvents,Om.forEach(Q=>{ie&&Td&&(u.documentElement.removeEventListener(Q,ie),f[G].rootEvents=void 0),Ld&&(v.documentElement.addEventListener(Q,Ae),f[G].rootEvents=Ae)});let Rd=f[G].stateOwnersUpdateHandlers;Nm.forEach(Q=>{Rd&&yd&&Rd(),wd&&(f[G].stateOwnersUpdateHandlers=Q(Ae,v))})}),Object.entries(v).forEach(([G,Ia])=>{u[G]=Ia}),g(),v=void 0};return N({media:t,fullscreenElement:e,documentElement:i,options:o}),{dispatch(T){let{type:C,detail:P}=T;if(r[C]&&m.mediaErrorCode==null){_(r[C](a,u,T));return}C==="mediaelementchangerequest"?N({media:P}):C==="fullscreenelementchangerequest"?N({fullscreenElement:P}):C==="documentelementchangerequest"?N({documentElement:P}):C==="optionschangerequest"&&(Object.entries(P!=null?P:{}).forEach(([ee,_e])=>{u.options[ee]=_e}),g())},getState(){return m},subscribe(T){return N({},l.length+1),l.push(T),T(m),()=>{let C=l.indexOf(T);C>=0&&(N({},l.length-1),l.splice(C,1))}}}};var ys=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},x=(t,e,i)=>(ys(t,e,"read from private field"),i?i.call(t):e.get(t)),ct=(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)},yt=(t,e,i,a)=>(ys(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),kt=(t,e,i)=>(ys(t,e,"access private method"),i),zt,Ua,F,Ha,We,fo,vo,_s,wi,Ba,bo,As,ku=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],_u=10,b={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",DEFAULT_DURATION:"defaultduration",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYS_USED:"keysused",LIVE_EDGE_OFFSET:"liveedgeoffset",SEEK_TO_LIVE_OFFSET:"seektoliveoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_HOTKEYS:"nohotkeys",NO_VOLUME_PREF:"novolumepref",NO_MUTED_PREF:"nomutedpref",NO_SUBTITLES_LANG_PREF:"nosubtitleslangpref",NO_DEFAULT_STORE:"nodefaultstore",KEYBOARD_FORWARD_SEEK_OFFSET:"keyboardforwardseekoffset",KEYBOARD_BACKWARD_SEEK_OFFSET:"keyboardbackwardseekoffset",LANG:"lang"},Eo=class extends Vt{constructor(){super(),ct(this,vo),ct(this,wi),ct(this,bo),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,ct(this,zt,new Tt(this,b.HOTKEYS)),ct(this,Ua,void 0),ct(this,F,void 0),ct(this,Ha,void 0),ct(this,We,void 0),ct(this,fo,i=>{var a;(a=x(this,F))==null||a.dispatch(i)}),this.associateElement(this);let e={};yt(this,Ha,i=>{Object.entries(i).forEach(([a,r])=>{if(a in e&&e[a]===r)return;this.propagateMediaState(a,r);let o=a.toLowerCase(),s=new d.CustomEvent(Pd[o],{composed:!0,detail:r});this.dispatchEvent(s)}),e=i}),this.hasAttribute(b.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(b.NO_HOTKEYS,b.HOTKEYS,b.DEFAULT_STREAM_TYPE,b.DEFAULT_SUBTITLES,b.DEFAULT_DURATION,b.LANG)}get mediaStore(){return x(this,F)}set mediaStore(e){var i,a;if(x(this,F)&&((i=x(this,We))==null||i.call(this),yt(this,We,void 0)),yt(this,F,e),!x(this,F)&&!this.hasAttribute(b.NO_DEFAULT_STORE)){kt(this,vo,_s).call(this);return}yt(this,We,(a=x(this,F))==null?void 0:a.subscribe(x(this,Ha)))}get fullscreenElement(){var e;return(e=x(this,Ua))!=null?e:this}set fullscreenElement(e){var i;this.hasAttribute(b.FULLSCREEN_ELEMENT)&&this.removeAttribute(b.FULLSCREEN_ELEMENT),yt(this,Ua,e),(i=x(this,F))==null||i.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return k(this,b.DEFAULT_SUBTITLES)}set defaultSubtitles(e){S(this,b.DEFAULT_SUBTITLES,e)}get defaultStreamType(){return I(this,b.DEFAULT_STREAM_TYPE)}set defaultStreamType(e){M(this,b.DEFAULT_STREAM_TYPE,e)}get defaultDuration(){return R(this,b.DEFAULT_DURATION)}set defaultDuration(e){O(this,b.DEFAULT_DURATION,e)}get noHotkeys(){return k(this,b.NO_HOTKEYS)}set noHotkeys(e){S(this,b.NO_HOTKEYS,e)}get keysUsed(){return I(this,b.KEYS_USED)}set keysUsed(e){M(this,b.KEYS_USED,e)}get liveEdgeOffset(){return R(this,b.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){O(this,b.LIVE_EDGE_OFFSET,e)}get noAutoSeekToLive(){return k(this,b.NO_AUTO_SEEK_TO_LIVE)}set noAutoSeekToLive(e){S(this,b.NO_AUTO_SEEK_TO_LIVE,e)}get noVolumePref(){return k(this,b.NO_VOLUME_PREF)}set noVolumePref(e){S(this,b.NO_VOLUME_PREF,e)}get noMutedPref(){return k(this,b.NO_MUTED_PREF)}set noMutedPref(e){S(this,b.NO_MUTED_PREF,e)}get noSubtitlesLangPref(){return k(this,b.NO_SUBTITLES_LANG_PREF)}set noSubtitlesLangPref(e){S(this,b.NO_SUBTITLES_LANG_PREF,e)}get noDefaultStore(){return k(this,b.NO_DEFAULT_STORE)}set noDefaultStore(e){S(this,b.NO_DEFAULT_STORE,e)}attributeChangedCallback(e,i,a){var r,o,s,l,u,m,_,g,f;if(super.attributeChangedCallback(e,i,a),e===b.NO_HOTKEYS)a!==i&&a===""?(this.hasAttribute(b.HOTKEYS)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==i&&a===null&&this.enableHotkeys();else if(e===b.HOTKEYS)x(this,zt).value=a;else if(e===b.DEFAULT_SUBTITLES&&a!==i)(r=x(this,F))==null||r.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(b.DEFAULT_SUBTITLES)}});else if(e===b.DEFAULT_STREAM_TYPE)(s=x(this,F))==null||s.dispatch({type:"optionschangerequest",detail:{defaultStreamType:(o=this.getAttribute(b.DEFAULT_STREAM_TYPE))!=null?o:void 0}});else if(e===b.LIVE_EDGE_OFFSET)(l=x(this,F))==null||l.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(b.LIVE_EDGE_OFFSET)?+this.getAttribute(b.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(b.SEEK_TO_LIVE_OFFSET)?void 0:+this.getAttribute(b.LIVE_EDGE_OFFSET)}});else if(e===b.SEEK_TO_LIVE_OFFSET)(u=x(this,F))==null||u.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(b.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(b.SEEK_TO_LIVE_OFFSET):void 0}});else if(e===b.NO_AUTO_SEEK_TO_LIVE)(m=x(this,F))==null||m.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(b.NO_AUTO_SEEK_TO_LIVE)}});else if(e===b.FULLSCREEN_ELEMENT){let v=a?(_=this.getRootNode())==null?void 0:_.getElementById(a):void 0;yt(this,Ua,v),(g=x(this,F))==null||g.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===b.LANG&&a!==i&&(Yd(a),(f=x(this,F))==null||f.dispatch({type:"optionschangerequest",detail:{mediaLang:a}}))}connectedCallback(){var e,i;!x(this,F)&&!this.hasAttribute(b.NO_DEFAULT_STORE)&&kt(this,vo,_s).call(this),(e=x(this,F))==null||e.dispatch({type:"documentelementchangerequest",detail:Y}),super.connectedCallback(),x(this,F)&&!x(this,We)&&yt(this,We,(i=x(this,F))==null?void 0:i.subscribe(x(this,Ha))),this.hasAttribute(b.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var e,i,a,r;(e=super.disconnectedCallback)==null||e.call(this),x(this,F)&&((i=x(this,F))==null||i.dispatch({type:"documentelementchangerequest",detail:void 0}),(a=x(this,F))==null||a.dispatch({type:p.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})),x(this,We)&&((r=x(this,We))==null||r.call(this),yt(this,We,void 0))}mediaSetCallback(e){var i;super.mediaSetCallback(e),(i=x(this,F))==null||i.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var i;super.mediaUnsetCallback(e),(i=x(this,F))==null||i.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,i){yu(this.mediaStateReceivers,e,i)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:i}=this;if(i.has(e))return;let a=this.registerMediaStateReceiver.bind(this),r=this.unregisterMediaStateReceiver.bind(this),o=Mh(e,a,r);Object.values(p).forEach(s=>{e.addEventListener(s,x(this,fo))}),i.set(e,o)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:i}=this;if(!i.has(e))return;i.get(e)(),i.delete(e),Object.values(p).forEach(r=>{e.removeEventListener(r,x(this,fo))})}registerMediaStateReceiver(e){if(!e)return;let i=this.mediaStateReceivers;i.indexOf(e)>-1||(i.push(e),x(this,F)&&Object.entries(x(this,F).getState()).forEach(([r,o])=>{yu([e],r,o)}))}unregisterMediaStateReceiver(e){let i=this.mediaStateReceivers,a=i.indexOf(e);a<0||i.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",kt(this,bo,As))}disableHotkeys(){this.removeEventListener("keydown",kt(this,bo,As)),this.removeEventListener("keyup",kt(this,wi,Ba))}get hotkeys(){return I(this,b.HOTKEYS)}set hotkeys(e){M(this,b.HOTKEYS,e)}keyboardShortcutHandler(e){var i,a,r,o,s;let l=e.target;if(((r=(a=(i=l.getAttribute(b.KEYS_USED))==null?void 0:i.split(" "))!=null?a:l==null?void 0:l.keysUsed)!=null?r:[]).map(f=>f==="Space"?" ":f).filter(Boolean).includes(e.key))return;let m,_,g;if(!x(this,zt).contains(`no${e.key.toLowerCase()}`)&&!(e.key===" "&&x(this,zt).contains("nospace")))switch(e.key){case" ":case"k":m=x(this,F).getState().mediaPaused?p.MEDIA_PLAY_REQUEST:p.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new d.CustomEvent(m,{composed:!0,bubbles:!0}));break;case"m":m=this.mediaStore.getState().mediaVolumeLevel==="off"?p.MEDIA_UNMUTE_REQUEST:p.MEDIA_MUTE_REQUEST,this.dispatchEvent(new d.CustomEvent(m,{composed:!0,bubbles:!0}));break;case"f":m=this.mediaStore.getState().mediaIsFullscreen?p.MEDIA_EXIT_FULLSCREEN_REQUEST:p.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new d.CustomEvent(m,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new d.CustomEvent(p.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":{let f=this.hasAttribute(b.KEYBOARD_BACKWARD_SEEK_OFFSET)?+this.getAttribute(b.KEYBOARD_BACKWARD_SEEK_OFFSET):_u;_=Math.max(((o=this.mediaStore.getState().mediaCurrentTime)!=null?o:0)-f,0),g=new d.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:_}),this.dispatchEvent(g);break}case"ArrowRight":{let f=this.hasAttribute(b.KEYBOARD_FORWARD_SEEK_OFFSET)?+this.getAttribute(b.KEYBOARD_FORWARD_SEEK_OFFSET):_u;_=Math.max(((s=this.mediaStore.getState().mediaCurrentTime)!=null?s:0)+f,0),g=new d.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:_}),this.dispatchEvent(g);break}default:break}}};zt=new WeakMap;Ua=new WeakMap;F=new WeakMap;Ha=new WeakMap;We=new WeakMap;fo=new WeakMap;vo=new WeakSet;_s=function(){var t;this.mediaStore=gu({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(b.DEFAULT_SUBTITLES),defaultDuration:this.hasAttribute(b.DEFAULT_DURATION)?+this.getAttribute(b.DEFAULT_DURATION):void 0,defaultStreamType:(t=this.getAttribute(b.DEFAULT_STREAM_TYPE))!=null?t:void 0,liveEdgeOffset:this.hasAttribute(b.LIVE_EDGE_OFFSET)?+this.getAttribute(b.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(b.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(b.SEEK_TO_LIVE_OFFSET):this.hasAttribute(b.LIVE_EDGE_OFFSET)?+this.getAttribute(b.LIVE_EDGE_OFFSET):void 0,noAutoSeekToLive:this.hasAttribute(b.NO_AUTO_SEEK_TO_LIVE),noVolumePref:this.hasAttribute(b.NO_VOLUME_PREF),noMutedPref:this.hasAttribute(b.NO_MUTED_PREF),noSubtitlesLangPref:this.hasAttribute(b.NO_SUBTITLES_LANG_PREF)}})};wi=new WeakSet;Ba=function(t){let{key:e}=t;if(!ku.includes(e)){this.removeEventListener("keyup",kt(this,wi,Ba));return}this.keyboardShortcutHandler(t)};bo=new WeakSet;As=function(t){let{metaKey:e,altKey:i,key:a}=t;if(e||i||!ku.includes(a)){this.removeEventListener("keyup",kt(this,wi,Ba));return}[" ","ArrowLeft","ArrowRight"].includes(a)&&!(x(this,zt).contains(`no${a.toLowerCase()}`)||a===" "&&x(this,zt).contains("nospace"))&&t.preventDefault(),this.addEventListener("keyup",kt(this,wi,Ba),{once:!0})};var Th=Object.values(n),yh=Object.values(as),Su=t=>{var e,i,a,r;let{observedAttributes:o}=t.constructor;!o&&((e=t.nodeName)!=null&&e.includes("-"))&&(d.customElements.upgrade(t),{observedAttributes:o}=t.constructor);let s=(r=(a=(i=t==null?void 0:t.getAttribute)==null?void 0:i.call(t,L.MEDIA_CHROME_ATTRIBUTES))==null?void 0:a.split)==null?void 0:r.call(a,/\s+/);return Array.isArray(o||s)?(o||s).filter(l=>Th.includes(l)):[]},kh=t=>{var e,i;return(e=t.nodeName)!=null&&e.includes("-")&&d.customElements.get((i=t.nodeName)==null?void 0:i.toLowerCase())&&!(t instanceof d.customElements.get(t.nodeName.toLowerCase()))&&d.customElements.upgrade(t),yh.some(a=>a in t)},Ts=t=>kh(t)||!!Su(t).length,Au=t=>{var e;return(e=t==null?void 0:t.join)==null?void 0:e.call(t,":")},Tu={[n.MEDIA_SUBTITLES_LIST]:ut,[n.MEDIA_SUBTITLES_SHOWING]:ut,[n.MEDIA_SEEKABLE]:Au,[n.MEDIA_BUFFERED]:t=>t==null?void 0:t.map(Au).join(" "),[n.MEDIA_PREVIEW_COORDS]:t=>t==null?void 0:t.join(" "),[n.MEDIA_RENDITION_LIST]:Hd,[n.MEDIA_AUDIO_TRACK_LIST]:$d},Sh=async(t,e,i)=>{var a,r;if(t.isConnected||await Gr(0),typeof i=="boolean"||i==null)return S(t,e,i);if(typeof i=="number")return O(t,e,i);if(typeof i=="string")return M(t,e,i);if(Array.isArray(i)&&!i.length)return t.removeAttribute(e);let o=(r=(a=Tu[e])==null?void 0:a.call(Tu,i))!=null?r:i;return t.setAttribute(e,o)},Ih=t=>{var e;return!!((e=t.closest)!=null&&e.call(t,'*[slot="media"]'))},Zt=(t,e)=>{if(Ih(t))return;let i=(r,o)=>{var s,l;Ts(r)&&o(r);let{children:u=[]}=r!=null?r:{},m=(l=(s=r==null?void 0:r.shadowRoot)==null?void 0:s.children)!=null?l:[];[...u,...m].forEach(g=>Zt(g,o))},a=t==null?void 0:t.nodeName.toLowerCase();if(a.includes("-")&&!Ts(t)){d.customElements.whenDefined(a).then(()=>{i(t,e)});return}i(t,e)},yu=(t,e,i)=>{t.forEach(a=>{if(e in a){a[e]=i;return}let r=Su(a),o=e.toLowerCase();r.includes(o)&&Sh(a,o,i)})},Mh=(t,e,i)=>{Zt(t,e);let a=_=>{var g;let f=(g=_==null?void 0:_.composedPath()[0])!=null?g:_.target;e(f)},r=_=>{var g;let f=(g=_==null?void 0:_.composedPath()[0])!=null?g:_.target;i(f)};t.addEventListener(p.REGISTER_MEDIA_STATE_RECEIVER,a),t.addEventListener(p.UNREGISTER_MEDIA_STATE_RECEIVER,r);let o=_=>{_.forEach(g=>{let{addedNodes:f=[],removedNodes:v=[],type:N,target:T,attributeName:C}=g;N==="childList"?(Array.prototype.forEach.call(f,P=>Zt(P,e)),Array.prototype.forEach.call(v,P=>Zt(P,i))):N==="attributes"&&C===L.MEDIA_CHROME_ATTRIBUTES&&(Ts(T)?e(T):i(T))})},s=[],l=_=>{let g=_.target;g.name!=="media"&&(s.forEach(f=>Zt(f,i)),s=[...g.assignedElements({flatten:!0})],s.forEach(f=>Zt(f,e)))};t.addEventListener("slotchange",l);let u=new MutationObserver(o);return u.observe(t,{childList:!0,attributes:!0,subtree:!0}),()=>{Zt(t,i),t.removeEventListener("slotchange",l),u.disconnect(),t.removeEventListener(p.REGISTER_MEDIA_STATE_RECEIVER,a),t.removeEventListener(p.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};d.customElements.get("media-controller")||d.customElements.define("media-controller",Eo);var ks=Eo;var Ri={PLACEMENT:"placement",BOUNDS:"bounds"};function Ch(t){return`
159
159
  <style>
160
160
  :host {
161
161
  --_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7)));
@@ -264,7 +264,7 @@
264
264
  </style>
265
265
  <slot></slot>
266
266
  <div id="arrow"></div>
267
- `}var xi=class extends d.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!Xr(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=Be(this,"#"+this.bounds))!=null?e:Z(this);if(!r)return;let{x:o,width:s}=r.getBoundingClientRect(),{x:l,width:u}=this.getBoundingClientRect(),h=l+u,_=o+s,g=a.getPropertyValue("--media-tooltip-offset-x"),f=g?parseFloat(g.replace("px","")):0,v=a.getPropertyValue("--media-tooltip-container-margin"),N=v?parseFloat(v.replace("px","")):0,T=l-o+f-N,C=h-_+f+N;if(T<0){this.style.setProperty("--media-tooltip-offset-x",`${T}px`);return}if(C>0){this.style.setProperty("--media-tooltip-offset-x",`${C}px`);return}this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){let e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[Ri.PLACEMENT,Ri.BOUNDS]}get placement(){return I(this,Ri.PLACEMENT)}set placement(e){M(this,Ri.PLACEMENT,e)}get bounds(){return I(this,Ri.BOUNDS)}set bounds(e){M(this,Ri.BOUNDS,e)}};xi.shadowRootOptions={mode:"open"};xi.getTemplateHTML=Mh;d.customElements.get("media-tooltip")||d.customElements.define("media-tooltip",xi);var bo=xi;var Ss=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},J=(t,e,i)=>(Ss(t,e,"read from private field"),i?i.call(t):e.get(t)),Di=(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)},go=(t,e,i,a)=>(Ss(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ch=(t,e,i)=>(Ss(t,e,"access private method"),i),We,Ni,It,Oi,_o,ks,Su,St={TOOLTIP_PLACEMENT:"tooltipplacement",DISABLED:"disabled",NO_TOOLTIP:"notooltip"};function Lh(t,e={}){return`
267
+ `}var xi=class extends d.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!Jr(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=$e(this,"#"+this.bounds))!=null?e:Z(this);if(!r)return;let{x:o,width:s}=r.getBoundingClientRect(),{x:l,width:u}=this.getBoundingClientRect(),m=l+u,_=o+s,g=a.getPropertyValue("--media-tooltip-offset-x"),f=g?parseFloat(g.replace("px","")):0,v=a.getPropertyValue("--media-tooltip-container-margin"),N=v?parseFloat(v.replace("px","")):0,T=l-o+f-N,C=m-_+f+N;if(T<0){this.style.setProperty("--media-tooltip-offset-x",`${T}px`);return}if(C>0){this.style.setProperty("--media-tooltip-offset-x",`${C}px`);return}this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){let e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[Ri.PLACEMENT,Ri.BOUNDS]}get placement(){return I(this,Ri.PLACEMENT)}set placement(e){M(this,Ri.PLACEMENT,e)}get bounds(){return I(this,Ri.BOUNDS)}set bounds(e){M(this,Ri.BOUNDS,e)}};xi.shadowRootOptions={mode:"open"};xi.getTemplateHTML=Ch;d.customElements.get("media-tooltip")||d.customElements.define("media-tooltip",xi);var go=xi;var Is=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},j=(t,e,i)=>(Is(t,e,"read from private field"),i?i.call(t):e.get(t)),Di=(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)},_o=(t,e,i,a)=>(Is(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Lh=(t,e,i)=>(Is(t,e,"access private method"),i),Fe,Ni,It,Oi,Ao,Ss,Iu,St={TOOLTIP_PLACEMENT:"tooltipplacement",DISABLED:"disabled",NO_TOOLTIP:"notooltip"};function wh(t,e={}){return`
268
268
  <style>
269
269
  :host {
270
270
  position: relative;
@@ -338,20 +338,20 @@
338
338
 
339
339
  <slot name="tooltip">
340
340
  <media-tooltip part="tooltip" aria-hidden="true">
341
- <template shadowrootmode="${bo.shadowRootOptions.mode}">
342
- ${bo.getTemplateHTML({})}
341
+ <template shadowrootmode="${go.shadowRootOptions.mode}">
342
+ ${go.getTemplateHTML({})}
343
343
  </template>
344
344
  <slot name="tooltip-content">
345
345
  ${this.getTooltipContentHTML(t)}
346
346
  </slot>
347
347
  </media-tooltip>
348
348
  </slot>
349
- `}function wh(t,e){return`
349
+ `}function Rh(t,e){return`
350
350
  <slot></slot>
351
- `}function Rh(){return""}var B=class extends d.HTMLElement{constructor(){if(super(),Di(this,ks),Di(this,We,void 0),this.preventClick=!1,this.tooltipEl=null,Di(this,Ni,e=>{this.preventClick||this.handleClick(e),setTimeout(J(this,It),0)}),Di(this,It,()=>{var e,i;(i=(e=this.tooltipEl)==null?void 0:e.updateXOffset)==null||i.call(e)}),Di(this,Oi,e=>{let{key:i}=e;if(!this.keysUsed.includes(i)){this.removeEventListener("keyup",J(this,Oi));return}this.preventClick||this.handleClick(e)}),Di(this,_o,e=>{let{metaKey:i,altKey:a,key:r}=e;if(i||a||!this.keysUsed.includes(r)){this.removeEventListener("keyup",J(this,Oi));return}this.addEventListener("keyup",J(this,Oi),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip")}static get observedAttributes(){return["disabled",St.TOOLTIP_PLACEMENT,L.MEDIA_CONTROLLER,n.MEDIA_LANG]}enable(){this.addEventListener("click",J(this,Ni)),this.addEventListener("keydown",J(this,_o)),this.tabIndex=0}disable(){this.removeEventListener("click",J(this,Ni)),this.removeEventListener("keydown",J(this,_o)),this.removeEventListener("keyup",J(this,Oi)),this.tabIndex=-1}attributeChangedCallback(e,i,a){var r,o,s,l,u;e===L.MEDIA_CONTROLLER?(i&&((o=(r=J(this,We))==null?void 0:r.unassociateElement)==null||o.call(r,this),go(this,We,null)),a&&this.isConnected&&(go(this,We,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=J(this,We))==null?void 0:l.associateElement)==null||u.call(l,this))):e==="disabled"&&a!==i?a==null?this.enable():this.disable():e===St.TOOLTIP_PLACEMENT&&this.tooltipEl&&a!==i?this.tooltipEl.placement=a:e===n.MEDIA_LANG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),J(this,It).call(this)}connectedCallback(){var e,i,a;let{style:r}=W(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");let o=this.getAttribute(L.MEDIA_CONTROLLER);o&&(go(this,We,(e=this.getRootNode())==null?void 0:e.getElementById(o)),(a=(i=J(this,We))==null?void 0:i.associateElement)==null||a.call(i,this)),d.customElements.whenDefined("media-tooltip").then(()=>Ch(this,ks,Su).call(this))}disconnectedCallback(){var e,i;this.disable(),(i=(e=J(this,We))==null?void 0:e.unassociateElement)==null||i.call(e,this),go(this,We,null),this.removeEventListener("mouseenter",J(this,It)),this.removeEventListener("focus",J(this,It)),this.removeEventListener("click",J(this,Ni))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return I(this,St.TOOLTIP_PLACEMENT)}set tooltipPlacement(e){M(this,St.TOOLTIP_PLACEMENT,e)}get mediaController(){return I(this,L.MEDIA_CONTROLLER)}set mediaController(e){M(this,L.MEDIA_CONTROLLER,e)}get disabled(){return k(this,St.DISABLED)}set disabled(e){S(this,St.DISABLED,e)}get noTooltip(){return k(this,St.NO_TOOLTIP)}set noTooltip(e){S(this,St.NO_TOOLTIP,e)}handleClick(e){}};We=new WeakMap;Ni=new WeakMap;It=new WeakMap;Oi=new WeakMap;_o=new WeakMap;ks=new WeakSet;Su=function(){this.addEventListener("mouseenter",J(this,It)),this.addEventListener("focus",J(this,It)),this.addEventListener("click",J(this,Ni));let t=this.tooltipPlacement;t&&this.tooltipEl&&(this.tooltipEl.placement=t)};B.shadowRootOptions={mode:"open"};B.getTemplateHTML=Lh;B.getSlotTemplateHTML=wh;B.getTooltipContentHTML=Rh;d.customElements.get("media-chrome-button")||d.customElements.define("media-chrome-button",B);var Iu=`<svg aria-hidden="true" viewBox="0 0 26 24">
351
+ `}function xh(){return""}var B=class extends d.HTMLElement{constructor(){if(super(),Di(this,Ss),Di(this,Fe,void 0),this.preventClick=!1,this.tooltipEl=null,Di(this,Ni,e=>{this.preventClick||this.handleClick(e),setTimeout(j(this,It),0)}),Di(this,It,()=>{var e,i;(i=(e=this.tooltipEl)==null?void 0:e.updateXOffset)==null||i.call(e)}),Di(this,Oi,e=>{let{key:i}=e;if(!this.keysUsed.includes(i)){this.removeEventListener("keyup",j(this,Oi));return}this.preventClick||this.handleClick(e)}),Di(this,Ao,e=>{let{metaKey:i,altKey:a,key:r}=e;if(i||a||!this.keysUsed.includes(r)){this.removeEventListener("keyup",j(this,Oi));return}this.addEventListener("keyup",j(this,Oi),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip")}static get observedAttributes(){return["disabled",St.TOOLTIP_PLACEMENT,L.MEDIA_CONTROLLER,n.MEDIA_LANG]}enable(){this.addEventListener("click",j(this,Ni)),this.addEventListener("keydown",j(this,Ao)),this.tabIndex=0}disable(){this.removeEventListener("click",j(this,Ni)),this.removeEventListener("keydown",j(this,Ao)),this.removeEventListener("keyup",j(this,Oi)),this.tabIndex=-1}attributeChangedCallback(e,i,a){var r,o,s,l,u;e===L.MEDIA_CONTROLLER?(i&&((o=(r=j(this,Fe))==null?void 0:r.unassociateElement)==null||o.call(r,this),_o(this,Fe,null)),a&&this.isConnected&&(_o(this,Fe,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=j(this,Fe))==null?void 0:l.associateElement)==null||u.call(l,this))):e==="disabled"&&a!==i?a==null?this.enable():this.disable():e===St.TOOLTIP_PLACEMENT&&this.tooltipEl&&a!==i?this.tooltipEl.placement=a:e===n.MEDIA_LANG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),j(this,It).call(this)}connectedCallback(){var e,i,a;let{style:r}=W(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");let o=this.getAttribute(L.MEDIA_CONTROLLER);o&&(_o(this,Fe,(e=this.getRootNode())==null?void 0:e.getElementById(o)),(a=(i=j(this,Fe))==null?void 0:i.associateElement)==null||a.call(i,this)),d.customElements.whenDefined("media-tooltip").then(()=>Lh(this,Ss,Iu).call(this))}disconnectedCallback(){var e,i;this.disable(),(i=(e=j(this,Fe))==null?void 0:e.unassociateElement)==null||i.call(e,this),_o(this,Fe,null),this.removeEventListener("mouseenter",j(this,It)),this.removeEventListener("focus",j(this,It)),this.removeEventListener("click",j(this,Ni))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return I(this,St.TOOLTIP_PLACEMENT)}set tooltipPlacement(e){M(this,St.TOOLTIP_PLACEMENT,e)}get mediaController(){return I(this,L.MEDIA_CONTROLLER)}set mediaController(e){M(this,L.MEDIA_CONTROLLER,e)}get disabled(){return k(this,St.DISABLED)}set disabled(e){S(this,St.DISABLED,e)}get noTooltip(){return k(this,St.NO_TOOLTIP)}set noTooltip(e){S(this,St.NO_TOOLTIP,e)}handleClick(e){}};Fe=new WeakMap;Ni=new WeakMap;It=new WeakMap;Oi=new WeakMap;Ao=new WeakMap;Ss=new WeakSet;Iu=function(){this.addEventListener("mouseenter",j(this,It)),this.addEventListener("focus",j(this,It)),this.addEventListener("click",j(this,Ni));let t=this.tooltipPlacement;t&&this.tooltipEl&&(this.tooltipEl.placement=t)};B.shadowRootOptions={mode:"open"};B.getTemplateHTML=wh;B.getSlotTemplateHTML=Rh;B.getTooltipContentHTML=xh;d.customElements.get("media-chrome-button")||d.customElements.define("media-chrome-button",B);var Mu=`<svg aria-hidden="true" viewBox="0 0 26 24">
352
352
  <path d="M22.13 3H3.87a.87.87 0 0 0-.87.87v13.26a.87.87 0 0 0 .87.87h3.4L9 16H5V5h16v11h-4l1.72 2h3.4a.87.87 0 0 0 .87-.87V3.87a.87.87 0 0 0-.86-.87Zm-8.75 11.44a.5.5 0 0 0-.76 0l-4.91 5.73a.5.5 0 0 0 .38.83h9.82a.501.501 0 0 0 .38-.83l-4.91-5.73Z"/>
353
353
  </svg>
354
- `;function xh(t){return`
354
+ `;function Dh(t){return`
355
355
  <style>
356
356
  :host([${n.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) {
357
357
  display: none !important;
@@ -369,17 +369,17 @@
369
369
  </style>
370
370
 
371
371
  <slot name="icon">
372
- <slot name="enter">${Iu}</slot>
373
- <slot name="exit">${Iu}</slot>
372
+ <slot name="enter">${Mu}</slot>
373
+ <slot name="exit">${Mu}</slot>
374
374
  </slot>
375
- `}function Dh(){return`
376
- <slot name="tooltip-enter">${m("start airplay")}</slot>
377
- <slot name="tooltip-exit">${m("stop airplay")}</slot>
378
- `}var Mu=t=>{let e=t.mediaIsAirplaying?m("stop airplay"):m("start airplay");t.setAttribute("aria-label",e)},Ba=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_IS_AIRPLAYING,n.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Mu(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_IS_AIRPLAYING&&Mu(this)}get mediaIsAirplaying(){return k(this,n.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){S(this,n.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return I(this,n.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){M(this,n.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new d.CustomEvent(p.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}};Ba.getSlotTemplateHTML=xh;Ba.getTooltipContentHTML=Dh;d.customElements.get("media-airplay-button")||d.customElements.define("media-airplay-button",Ba);var Oh=`<svg aria-hidden="true" viewBox="0 0 26 24">
375
+ `}function Oh(){return`
376
+ <slot name="tooltip-enter">${h("start airplay")}</slot>
377
+ <slot name="tooltip-exit">${h("stop airplay")}</slot>
378
+ `}var Cu=t=>{let e=t.mediaIsAirplaying?h("stop airplay"):h("start airplay");t.setAttribute("aria-label",e)},$a=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_IS_AIRPLAYING,n.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Cu(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_IS_AIRPLAYING&&Cu(this)}get mediaIsAirplaying(){return k(this,n.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){S(this,n.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return I(this,n.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){M(this,n.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new d.CustomEvent(p.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}};$a.getSlotTemplateHTML=Dh;$a.getTooltipContentHTML=Oh;d.customElements.get("media-airplay-button")||d.customElements.define("media-airplay-button",$a);var Nh=`<svg aria-hidden="true" viewBox="0 0 26 24">
379
379
  <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
380
- </svg>`,Nh=`<svg aria-hidden="true" viewBox="0 0 26 24">
380
+ </svg>`,Ph=`<svg aria-hidden="true" viewBox="0 0 26 24">
381
381
  <path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>
382
- </svg>`;function Ph(t){return`
382
+ </svg>`;function Uh(t){return`
383
383
  <style>
384
384
  :host([aria-checked="true"]) slot[name=off] {
385
385
  display: none !important;
@@ -397,13 +397,13 @@
397
397
  </style>
398
398
 
399
399
  <slot name="icon">
400
- <slot name="on">${Oh}</slot>
401
- <slot name="off">${Nh}</slot>
400
+ <slot name="on">${Nh}</slot>
401
+ <slot name="off">${Ph}</slot>
402
402
  </slot>
403
- `}function Uh(){return`
404
- <slot name="tooltip-enable">${m("Enable captions")}</slot>
405
- <slot name="tooltip-disable">${m("Disable captions")}</slot>
406
- `}var Cu=t=>{t.setAttribute("aria-checked",lo(t).toString())},$a=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_SUBTITLES_LIST,n.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",m("closed captions")),Cu(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_SUBTITLES_SHOWING&&Cu(this)}get mediaSubtitlesList(){return Lu(this,n.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){wu(this,n.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Lu(this,n.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){wu(this,n.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new d.CustomEvent(p.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}};$a.getSlotTemplateHTML=Ph;$a.getTooltipContentHTML=Uh;var Lu=(t,e)=>{let i=t.getAttribute(e);return i?Gt(i):[]},wu=(t,e,i)=>{if(!(i!=null&&i.length)){t.removeAttribute(e);return}let a=ut(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};d.customElements.get("media-captions-button")||d.customElements.define("media-captions-button",$a);var Hh='<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/></g></svg>',Bh='<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg>';function $h(t){return`
403
+ `}function Hh(){return`
404
+ <slot name="tooltip-enable">${h("Enable captions")}</slot>
405
+ <slot name="tooltip-disable">${h("Disable captions")}</slot>
406
+ `}var Lu=t=>{t.setAttribute("aria-checked",uo(t).toString())},Wa=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_SUBTITLES_LIST,n.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",h("closed captions")),Lu(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_SUBTITLES_SHOWING&&Lu(this)}get mediaSubtitlesList(){return wu(this,n.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Ru(this,n.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return wu(this,n.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Ru(this,n.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new d.CustomEvent(p.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}};Wa.getSlotTemplateHTML=Uh;Wa.getTooltipContentHTML=Hh;var wu=(t,e)=>{let i=t.getAttribute(e);return i?Gt(i):[]},Ru=(t,e,i)=>{if(!(i!=null&&i.length)){t.removeAttribute(e);return}let a=ut(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};d.customElements.get("media-captions-button")||d.customElements.define("media-captions-button",Wa);var Bh='<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/></g></svg>',$h='<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg>';function Wh(t){return`
407
407
  <style>
408
408
  :host([${n.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) {
409
409
  display: none !important;
@@ -421,13 +421,13 @@
421
421
  </style>
422
422
 
423
423
  <slot name="icon">
424
- <slot name="enter">${Hh}</slot>
425
- <slot name="exit">${Bh}</slot>
424
+ <slot name="enter">${Bh}</slot>
425
+ <slot name="exit">${$h}</slot>
426
426
  </slot>
427
- `}function Wh(){return`
428
- <slot name="tooltip-enter">${m("Start casting")}</slot>
429
- <slot name="tooltip-exit">${m("Stop casting")}</slot>
430
- `}var Ru=t=>{let e=t.mediaIsCasting?m("stop casting"):m("start casting");t.setAttribute("aria-label",e)},Wa=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_IS_CASTING,n.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Ru(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_IS_CASTING&&Ru(this)}get mediaIsCasting(){return k(this,n.MEDIA_IS_CASTING)}set mediaIsCasting(e){S(this,n.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return I(this,n.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){M(this,n.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?p.MEDIA_EXIT_CAST_REQUEST:p.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new d.CustomEvent(e,{composed:!0,bubbles:!0}))}};Wa.getSlotTemplateHTML=$h;Wa.getTooltipContentHTML=Wh;d.customElements.get("media-cast-button")||d.customElements.define("media-cast-button",Wa);var xs=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Xt=(t,e,i)=>(xs(t,e,"read from private field"),i?i.call(t):e.get(t)),mt=(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)},Ds=(t,e,i,a)=>(xs(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Qt=(t,e,i)=>(xs(t,e,"access private method"),i),To,Va,Jt,Ao,Is,Ms,xu,Cs,Du,Ls,Ou,ws,Nu,Rs,Pu;function Fh(t){return`
427
+ `}function Fh(){return`
428
+ <slot name="tooltip-enter">${h("Start casting")}</slot>
429
+ <slot name="tooltip-exit">${h("Stop casting")}</slot>
430
+ `}var xu=t=>{let e=t.mediaIsCasting?h("stop casting"):h("start casting");t.setAttribute("aria-label",e)},Fa=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_IS_CASTING,n.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),xu(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_IS_CASTING&&xu(this)}get mediaIsCasting(){return k(this,n.MEDIA_IS_CASTING)}set mediaIsCasting(e){S(this,n.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return I(this,n.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){M(this,n.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?p.MEDIA_EXIT_CAST_REQUEST:p.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new d.CustomEvent(e,{composed:!0,bubbles:!0}))}};Fa.getSlotTemplateHTML=Wh;Fa.getTooltipContentHTML=Fh;d.customElements.get("media-cast-button")||d.customElements.define("media-cast-button",Fa);var Ds=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Xt=(t,e,i)=>(Ds(t,e,"read from private field"),i?i.call(t):e.get(t)),mt=(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)},Os=(t,e,i,a)=>(Ds(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Qt=(t,e,i)=>(Ds(t,e,"access private method"),i),yo,Ka,Jt,To,Ms,Cs,Du,Ls,Ou,ws,Nu,Rs,Pu,xs,Uu;function Vh(t){return`
431
431
  <style>
432
432
  :host {
433
433
  font: var(--media-font,
@@ -468,9 +468,9 @@
468
468
  }
469
469
  </style>
470
470
  ${this.getSlotTemplateHTML(t)}
471
- `}function Vh(t){return`
471
+ `}function Kh(t){return`
472
472
  <slot id="content"></slot>
473
- `}var Fa={OPEN:"open",ANCHOR:"anchor"},Mt=class extends d.HTMLElement{constructor(){super(),mt(this,Ao),mt(this,Ms),mt(this,Cs),mt(this,Ls),mt(this,ws),mt(this,Rs),mt(this,To,!1),mt(this,Va,null),mt(this,Jt,null),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}static get observedAttributes(){return[Fa.OPEN,Fa.ANCHOR]}get open(){return k(this,Fa.OPEN)}set open(e){S(this,Fa.OPEN,e)}handleEvent(e){switch(e.type){case"invoke":Qt(this,Ls,Ou).call(this,e);break;case"focusout":Qt(this,ws,Nu).call(this,e);break;case"keydown":Qt(this,Rs,Pu).call(this,e);break}}connectedCallback(){Qt(this,Ao,Is).call(this),this.role||(this.role="dialog")}attributeChangedCallback(e,i,a){Qt(this,Ao,Is).call(this),e===Fa.OPEN&&a!==i&&(this.open?Qt(this,Ms,xu).call(this):Qt(this,Cs,Du).call(this))}focus(){Ds(this,Va,La());let e=!this.dispatchEvent(new Event("focus",{composed:!0,cancelable:!0})),i=!this.dispatchEvent(new Event("focusin",{composed:!0,bubbles:!0,cancelable:!0}));if(e||i)return;let a=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');a==null||a.focus()}get keysUsed(){return["Escape","Tab"]}};To=new WeakMap;Va=new WeakMap;Jt=new WeakMap;Ao=new WeakSet;Is=function(){if(!Xt(this,To)&&(Ds(this,To,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);let t=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(t),queueMicrotask(()=>{let{style:e}=W(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}};Ms=new WeakSet;xu=function(){var t;(t=Xt(this,Jt))==null||t.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})};Cs=new WeakSet;Du=function(){var t;(t=Xt(this,Jt))==null||t.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))};Ls=new WeakSet;Ou=function(t){Ds(this,Jt,t.relatedTarget),de(this,t.relatedTarget)||(this.open=!this.open)};ws=new WeakSet;Nu=function(t){var e;de(this,t.relatedTarget)||((e=Xt(this,Va))==null||e.focus(),Xt(this,Jt)&&Xt(this,Jt)!==t.relatedTarget&&this.open&&(this.open=!1))};Rs=new WeakSet;Pu=function(t){var e,i,a,r,o;let{key:s,ctrlKey:l,altKey:u,metaKey:h}=t;l||u||h||this.keysUsed.includes(s)&&(t.preventDefault(),t.stopPropagation(),s==="Tab"?(t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()):s==="Escape"&&((o=Xt(this,Va))==null||o.focus(),this.open=!1))};Mt.shadowRootOptions={mode:"open"};Mt.getTemplateHTML=Fh;Mt.getSlotTemplateHTML=Vh;d.customElements.get("media-chrome-dialog")||d.customElements.define("media-chrome-dialog",Mt);var $s=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},z=(t,e,i)=>($s(t,e,"read from private field"),i?i.call(t):e.get(t)),ne=(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)},Ct=(t,e,i,a)=>($s(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Oe=(t,e,i)=>($s(t,e,"access private method"),i),Fe,xo,yo,ko,Ne,wo,So,Io,Mo,Ws,Uu,Co,Os,Lo,Ns,Ro,Fs,Ps,Hu,Us,Bu,Hs,$u,Bs,Wu;function Kh(t){return`
473
+ `}var Va={OPEN:"open",ANCHOR:"anchor"},Mt=class extends d.HTMLElement{constructor(){super(),mt(this,To),mt(this,Cs),mt(this,Ls),mt(this,ws),mt(this,Rs),mt(this,xs),mt(this,yo,!1),mt(this,Ka,null),mt(this,Jt,null),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}static get observedAttributes(){return[Va.OPEN,Va.ANCHOR]}get open(){return k(this,Va.OPEN)}set open(e){S(this,Va.OPEN,e)}handleEvent(e){switch(e.type){case"invoke":Qt(this,ws,Nu).call(this,e);break;case"focusout":Qt(this,Rs,Pu).call(this,e);break;case"keydown":Qt(this,xs,Uu).call(this,e);break}}connectedCallback(){Qt(this,To,Ms).call(this),this.role||(this.role="dialog")}attributeChangedCallback(e,i,a){Qt(this,To,Ms).call(this),e===Va.OPEN&&a!==i&&(this.open?Qt(this,Cs,Du).call(this):Qt(this,Ls,Ou).call(this))}focus(){Os(this,Ka,wa());let e=!this.dispatchEvent(new Event("focus",{composed:!0,cancelable:!0})),i=!this.dispatchEvent(new Event("focusin",{composed:!0,bubbles:!0,cancelable:!0}));if(e||i)return;let a=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');a==null||a.focus()}get keysUsed(){return["Escape","Tab"]}};yo=new WeakMap;Ka=new WeakMap;Jt=new WeakMap;To=new WeakSet;Ms=function(){if(!Xt(this,yo)&&(Os(this,yo,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);let t=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(t),queueMicrotask(()=>{let{style:e}=W(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}};Cs=new WeakSet;Du=function(){var t;(t=Xt(this,Jt))==null||t.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})};Ls=new WeakSet;Ou=function(){var t;(t=Xt(this,Jt))==null||t.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))};ws=new WeakSet;Nu=function(t){Os(this,Jt,t.relatedTarget),de(this,t.relatedTarget)||(this.open=!this.open)};Rs=new WeakSet;Pu=function(t){var e;de(this,t.relatedTarget)||((e=Xt(this,Ka))==null||e.focus(),Xt(this,Jt)&&Xt(this,Jt)!==t.relatedTarget&&this.open&&(this.open=!1))};xs=new WeakSet;Uu=function(t){var e,i,a,r,o;let{key:s,ctrlKey:l,altKey:u,metaKey:m}=t;l||u||m||this.keysUsed.includes(s)&&(t.preventDefault(),t.stopPropagation(),s==="Tab"?(t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()):s==="Escape"&&((o=Xt(this,Ka))==null||o.focus(),this.open=!1))};Mt.shadowRootOptions={mode:"open"};Mt.getTemplateHTML=Vh;Mt.getSlotTemplateHTML=Kh;d.customElements.get("media-chrome-dialog")||d.customElements.define("media-chrome-dialog",Mt);var Ws=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},z=(t,e,i)=>(Ws(t,e,"read from private field"),i?i.call(t):e.get(t)),ne=(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)},Ct=(t,e,i,a)=>(Ws(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ne=(t,e,i)=>(Ws(t,e,"access private method"),i),Ve,Do,ko,So,Pe,Ro,Io,Mo,Co,Fs,Hu,Lo,Ns,wo,Ps,xo,Vs,Us,Bu,Hs,$u,Bs,Wu,$s,Fu;function Gh(t){return`
474
474
  <style>
475
475
  :host {
476
476
  --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
@@ -698,7 +698,7 @@
698
698
  <input id="range" type="range" min="0" max="1" step="any" value="0">
699
699
  </div>
700
700
  <div id="rightgap"></div>
701
- `}var Ve=class extends d.HTMLElement{constructor(){if(super(),ne(this,Ws),ne(this,Co),ne(this,Lo),ne(this,Ro),ne(this,Ps),ne(this,Us),ne(this,Hs),ne(this,Bs),ne(this,Fe,void 0),ne(this,xo,void 0),ne(this,yo,void 0),ne(this,ko,void 0),ne(this,Ne,{}),ne(this,wo,[]),ne(this,So,()=>{if(this.range.matches(":focus-visible")){let{style:e}=W(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),ne(this,Io,()=>{let{style:e}=W(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),ne(this,Mo,()=>{let e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}this.container=this.shadowRoot.querySelector("#container"),Ct(this,yo,this.shadowRoot.querySelector("#startpoint")),Ct(this,ko,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",L.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,o,s,l,u;e===L.MEDIA_CONTROLLER?(i&&((o=(r=z(this,Fe))==null?void 0:r.unassociateElement)==null||o.call(r,this),Ct(this,Fe,null)),a&&this.isConnected&&(Ct(this,Fe,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=z(this,Fe))==null?void 0:l.associateElement)==null||u.call(l,this))):(e==="disabled"||e==="aria-disabled"&&i!==a)&&(a==null?(this.range.removeAttribute(e),Oe(this,Co,Os).call(this)):(this.range.setAttribute(e,a),Oe(this,Lo,Ns).call(this)))}connectedCallback(){var e,i,a;let{style:r}=W(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),z(this,Ne).pointer=W(this.shadowRoot,"#pointer"),z(this,Ne).progress=W(this.shadowRoot,"#progress"),z(this,Ne).thumb=W(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),z(this,Ne).activeSegment=W(this.shadowRoot,"#segments-clipping rect:nth-child(0)");let o=this.getAttribute(L.MEDIA_CONTROLLER);o&&(Ct(this,Fe,(e=this.getRootNode())==null?void 0:e.getElementById(o)),(a=(i=z(this,Fe))==null?void 0:i.associateElement)==null||a.call(i,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",z(this,So)),this.shadowRoot.addEventListener("focusout",z(this,Io)),Oe(this,Co,Os).call(this),st(this.container,z(this,Mo))}disconnectedCallback(){var e,i;Oe(this,Lo,Ns).call(this),(i=(e=z(this,Fe))==null?void 0:e.unassociateElement)==null||i.call(e,this),Ct(this,Fe,null),this.shadowRoot.removeEventListener("focusin",z(this,So)),this.shadowRoot.removeEventListener("focusout",z(this,Io)),lt(this.container,z(this,Mo))}updatePointerBar(e){var i;(i=z(this,Ne).pointer)==null||i.style.setProperty("width",`${this.getPointerRatio(e)*100}%`)}updateBar(){var e,i;let a=this.range.valueAsNumber*100;(e=z(this,Ne).progress)==null||e.style.setProperty("width",`${a}%`),(i=z(this,Ne).thumb)==null||i.style.setProperty("left",`${a}%`)}updateSegments(e){let i=this.shadowRoot.querySelector("#segments-clipping");if(i.textContent="",this.container.classList.toggle("segments",!!(e!=null&&e.length)),!(e!=null&&e.length))return;let a=[...new Set([+this.range.min,...e.flatMap(o=>[o.start,o.end]),+this.range.max])];Ct(this,wo,[...a]);let r=a.pop();for(let[o,s]of a.entries()){let[l,u]=[o===0,o===a.length-1],h=l?"calc(var(--segments-gap) / -1)":`${s*100}%`,g=`calc(${((u?r:a[o+1])-s)*100}%${l||u?"":" - var(--segments-gap)"})`,f=Y.createElementNS("http://www.w3.org/2000/svg","rect"),v=W(this.shadowRoot,`#segments-clipping rect:nth-child(${o+1})`);v.style.setProperty("x",h),v.style.setProperty("width",g),i.append(f)}}getPointerRatio(e){return Xd(e.clientX,e.clientY,z(this,yo).getBoundingClientRect(),z(this,ko).getBoundingClientRect())}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":Oe(this,Bs,Wu).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":Oe(this,Ps,Hu).call(this,e);break;case"pointerdown":Oe(this,Ro,Fs).call(this,e);break;case"pointerup":Oe(this,Us,Bu).call(this);break;case"pointerleave":Oe(this,Hs,$u).call(this);break}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}};Fe=new WeakMap;xo=new WeakMap;yo=new WeakMap;ko=new WeakMap;Ne=new WeakMap;wo=new WeakMap;So=new WeakMap;Io=new WeakMap;Mo=new WeakMap;Ws=new WeakSet;Uu=function(t){let e=z(this,Ne).activeSegment;if(!e)return;let i=this.getPointerRatio(t),r=`#segments-clipping rect:nth-child(${z(this,wo).findIndex((o,s,l)=>{let u=l[s+1];return u!=null&&i>=o&&i<=u})+1})`;(e.selectorText!=r||!e.style.transform)&&(e.selectorText=r,e.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))};Co=new WeakSet;Os=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))};Lo=new WeakSet;Ns=function(){var t,e;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),(t=d.window)==null||t.removeEventListener("pointerup",this),(e=d.window)==null||e.removeEventListener("pointermove",this)};Ro=new WeakSet;Fs=function(t){var e;Ct(this,xo,t.composedPath().includes(this.range)),(e=d.window)==null||e.addEventListener("pointerup",this)};Ps=new WeakSet;Hu=function(t){var e;t.pointerType!=="mouse"&&Oe(this,Ro,Fs).call(this,t),this.addEventListener("pointerleave",this),(e=d.window)==null||e.addEventListener("pointermove",this)};Us=new WeakSet;Bu=function(){var t;(t=d.window)==null||t.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")};Hs=new WeakSet;$u=function(){var t,e;this.removeEventListener("pointerleave",this),(t=d.window)==null||t.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),(e=z(this,Ne).activeSegment)==null||e.style.removeProperty("transform")};Bs=new WeakSet;Wu=function(t){this.toggleAttribute("dragging",t.buttons===1||t.pointerType!=="mouse"),this.updatePointerBar(t),Oe(this,Ws,Uu).call(this,t),this.dragging&&(t.pointerType!=="mouse"||!z(this,xo))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(t),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))};Ve.shadowRootOptions={mode:"open"};Ve.getTemplateHTML=Kh;d.customElements.get("media-chrome-range")||d.customElements.define("media-chrome-range",Ve);var Fu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Do=(t,e,i)=>(Fu(t,e,"read from private field"),i?i.call(t):e.get(t)),Gh=(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)},Oo=(t,e,i,a)=>(Fu(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ke;function Yh(t){return`
701
+ `}var Ke=class extends d.HTMLElement{constructor(){if(super(),ne(this,Fs),ne(this,Lo),ne(this,wo),ne(this,xo),ne(this,Us),ne(this,Hs),ne(this,Bs),ne(this,$s),ne(this,Ve,void 0),ne(this,Do,void 0),ne(this,ko,void 0),ne(this,So,void 0),ne(this,Pe,{}),ne(this,Ro,[]),ne(this,Io,()=>{if(this.range.matches(":focus-visible")){let{style:e}=W(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),ne(this,Mo,()=>{let{style:e}=W(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),ne(this,Co,()=>{let e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}this.container=this.shadowRoot.querySelector("#container"),Ct(this,ko,this.shadowRoot.querySelector("#startpoint")),Ct(this,So,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",L.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,o,s,l,u;e===L.MEDIA_CONTROLLER?(i&&((o=(r=z(this,Ve))==null?void 0:r.unassociateElement)==null||o.call(r,this),Ct(this,Ve,null)),a&&this.isConnected&&(Ct(this,Ve,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=z(this,Ve))==null?void 0:l.associateElement)==null||u.call(l,this))):(e==="disabled"||e==="aria-disabled"&&i!==a)&&(a==null?(this.range.removeAttribute(e),Ne(this,Lo,Ns).call(this)):(this.range.setAttribute(e,a),Ne(this,wo,Ps).call(this)))}connectedCallback(){var e,i,a;let{style:r}=W(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),z(this,Pe).pointer=W(this.shadowRoot,"#pointer"),z(this,Pe).progress=W(this.shadowRoot,"#progress"),z(this,Pe).thumb=W(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),z(this,Pe).activeSegment=W(this.shadowRoot,"#segments-clipping rect:nth-child(0)");let o=this.getAttribute(L.MEDIA_CONTROLLER);o&&(Ct(this,Ve,(e=this.getRootNode())==null?void 0:e.getElementById(o)),(a=(i=z(this,Ve))==null?void 0:i.associateElement)==null||a.call(i,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",z(this,Io)),this.shadowRoot.addEventListener("focusout",z(this,Mo)),Ne(this,Lo,Ns).call(this),st(this.container,z(this,Co))}disconnectedCallback(){var e,i;Ne(this,wo,Ps).call(this),(i=(e=z(this,Ve))==null?void 0:e.unassociateElement)==null||i.call(e,this),Ct(this,Ve,null),this.shadowRoot.removeEventListener("focusin",z(this,Io)),this.shadowRoot.removeEventListener("focusout",z(this,Mo)),lt(this.container,z(this,Co))}updatePointerBar(e){var i;(i=z(this,Pe).pointer)==null||i.style.setProperty("width",`${this.getPointerRatio(e)*100}%`)}updateBar(){var e,i;let a=this.range.valueAsNumber*100;(e=z(this,Pe).progress)==null||e.style.setProperty("width",`${a}%`),(i=z(this,Pe).thumb)==null||i.style.setProperty("left",`${a}%`)}updateSegments(e){let i=this.shadowRoot.querySelector("#segments-clipping");if(i.textContent="",this.container.classList.toggle("segments",!!(e!=null&&e.length)),!(e!=null&&e.length))return;let a=[...new Set([+this.range.min,...e.flatMap(o=>[o.start,o.end]),+this.range.max])];Ct(this,Ro,[...a]);let r=a.pop();for(let[o,s]of a.entries()){let[l,u]=[o===0,o===a.length-1],m=l?"calc(var(--segments-gap) / -1)":`${s*100}%`,g=`calc(${((u?r:a[o+1])-s)*100}%${l||u?"":" - var(--segments-gap)"})`,f=Y.createElementNS("http://www.w3.org/2000/svg","rect"),v=W(this.shadowRoot,`#segments-clipping rect:nth-child(${o+1})`);v.style.setProperty("x",m),v.style.setProperty("width",g),i.append(f)}}getPointerRatio(e){return Jd(e.clientX,e.clientY,z(this,ko).getBoundingClientRect(),z(this,So).getBoundingClientRect())}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":Ne(this,$s,Fu).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":Ne(this,Us,Bu).call(this,e);break;case"pointerdown":Ne(this,xo,Vs).call(this,e);break;case"pointerup":Ne(this,Hs,$u).call(this);break;case"pointerleave":Ne(this,Bs,Wu).call(this);break}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}};Ve=new WeakMap;Do=new WeakMap;ko=new WeakMap;So=new WeakMap;Pe=new WeakMap;Ro=new WeakMap;Io=new WeakMap;Mo=new WeakMap;Co=new WeakMap;Fs=new WeakSet;Hu=function(t){let e=z(this,Pe).activeSegment;if(!e)return;let i=this.getPointerRatio(t),r=`#segments-clipping rect:nth-child(${z(this,Ro).findIndex((o,s,l)=>{let u=l[s+1];return u!=null&&i>=o&&i<=u})+1})`;(e.selectorText!=r||!e.style.transform)&&(e.selectorText=r,e.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))};Lo=new WeakSet;Ns=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))};wo=new WeakSet;Ps=function(){var t,e;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),(t=d.window)==null||t.removeEventListener("pointerup",this),(e=d.window)==null||e.removeEventListener("pointermove",this)};xo=new WeakSet;Vs=function(t){var e;Ct(this,Do,t.composedPath().includes(this.range)),(e=d.window)==null||e.addEventListener("pointerup",this)};Us=new WeakSet;Bu=function(t){var e;t.pointerType!=="mouse"&&Ne(this,xo,Vs).call(this,t),this.addEventListener("pointerleave",this),(e=d.window)==null||e.addEventListener("pointermove",this)};Hs=new WeakSet;$u=function(){var t;(t=d.window)==null||t.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")};Bs=new WeakSet;Wu=function(){var t,e;this.removeEventListener("pointerleave",this),(t=d.window)==null||t.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),(e=z(this,Pe).activeSegment)==null||e.style.removeProperty("transform")};$s=new WeakSet;Fu=function(t){this.toggleAttribute("dragging",t.buttons===1||t.pointerType!=="mouse"),this.updatePointerBar(t),Ne(this,Fs,Hu).call(this,t),this.dragging&&(t.pointerType!=="mouse"||!z(this,Do))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(t),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))};Ke.shadowRootOptions={mode:"open"};Ke.getTemplateHTML=Gh;d.customElements.get("media-chrome-range")||d.customElements.define("media-chrome-range",Ke);var Vu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Oo=(t,e,i)=>(Vu(t,e,"read from private field"),i?i.call(t):e.get(t)),Yh=(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)},No=(t,e,i,a)=>(Vu(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ge;function qh(t){return`
702
702
  <style>
703
703
  :host {
704
704
 
@@ -724,7 +724,7 @@
724
724
  </style>
725
725
 
726
726
  <slot></slot>
727
- `}var Ka=class extends d.HTMLElement{constructor(){if(super(),Gh(this,Ke,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[L.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,o,s,l,u;e===L.MEDIA_CONTROLLER&&(i&&((o=(r=Do(this,Ke))==null?void 0:r.unassociateElement)==null||o.call(r,this),Oo(this,Ke,null)),a&&this.isConnected&&(Oo(this,Ke,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=Do(this,Ke))==null?void 0:l.associateElement)==null||u.call(l,this)))}connectedCallback(){var e,i,a;let r=this.getAttribute(L.MEDIA_CONTROLLER);r&&(Oo(this,Ke,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=Do(this,Ke))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Do(this,Ke))==null?void 0:e.unassociateElement)==null||i.call(e,this),Oo(this,Ke,null)}};Ke=new WeakMap;Ka.shadowRootOptions={mode:"open"};Ka.getTemplateHTML=Yh;d.customElements.get("media-control-bar")||d.customElements.define("media-control-bar",Ka);var Vu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},No=(t,e,i)=>(Vu(t,e,"read from private field"),i?i.call(t):e.get(t)),qh=(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)},Po=(t,e,i,a)=>(Vu(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ge;function Zh(t,e={}){return`
727
+ `}var Ga=class extends d.HTMLElement{constructor(){if(super(),Yh(this,Ge,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[L.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,o,s,l,u;e===L.MEDIA_CONTROLLER&&(i&&((o=(r=Oo(this,Ge))==null?void 0:r.unassociateElement)==null||o.call(r,this),No(this,Ge,null)),a&&this.isConnected&&(No(this,Ge,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=Oo(this,Ge))==null?void 0:l.associateElement)==null||u.call(l,this)))}connectedCallback(){var e,i,a;let r=this.getAttribute(L.MEDIA_CONTROLLER);r&&(No(this,Ge,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=Oo(this,Ge))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Oo(this,Ge))==null?void 0:e.unassociateElement)==null||i.call(e,this),No(this,Ge,null)}};Ge=new WeakMap;Ga.shadowRootOptions={mode:"open"};Ga.getTemplateHTML=qh;d.customElements.get("media-control-bar")||d.customElements.define("media-control-bar",Ga);var Ku=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Po=(t,e,i)=>(Ku(t,e,"read from private field"),i?i.call(t):e.get(t)),Zh=(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)},Uo=(t,e,i,a)=>(Ku(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ye;function zh(t,e={}){return`
728
728
  <style>
729
729
  :host {
730
730
  font: var(--media-font,
@@ -758,11 +758,11 @@
758
758
  </style>
759
759
 
760
760
  ${this.getSlotTemplateHTML(t,e)}
761
- `}function zh(t,e){return`
761
+ `}function Qh(t,e){return`
762
762
  <slot></slot>
763
- `}var Ee=class extends d.HTMLElement{constructor(){if(super(),qh(this,Ge,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[L.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,o,s,l,u;e===L.MEDIA_CONTROLLER&&(i&&((o=(r=No(this,Ge))==null?void 0:r.unassociateElement)==null||o.call(r,this),Po(this,Ge,null)),a&&this.isConnected&&(Po(this,Ge,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=No(this,Ge))==null?void 0:l.associateElement)==null||u.call(l,this)))}connectedCallback(){var e,i,a;let{style:r}=W(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);let o=this.getAttribute(L.MEDIA_CONTROLLER);o&&(Po(this,Ge,(e=this.getRootNode())==null?void 0:e.getElementById(o)),(a=(i=No(this,Ge))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=No(this,Ge))==null?void 0:e.unassociateElement)==null||i.call(e,this),Po(this,Ge,null)}};Ge=new WeakMap;Ee.shadowRootOptions={mode:"open"};Ee.getTemplateHTML=Zh;Ee.getSlotTemplateHTML=zh;d.customElements.get("media-text-display")||d.customElements.define("media-text-display",Ee);var Gu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ku=(t,e,i)=>(Gu(t,e,"read from private field"),i?i.call(t):e.get(t)),Qh=(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)},Xh=(t,e,i,a)=>(Gu(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ga;function Jh(t,e){return`
764
- <slot>${De(e.mediaDuration)}</slot>
765
- `}var Uo=class extends Ee{constructor(){var e;super(),Qh(this,Ga,void 0),Xh(this,Ga,this.shadowRoot.querySelector("slot")),Ku(this,Ga).textContent=De((e=this.mediaDuration)!=null?e:0)}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_DURATION]}attributeChangedCallback(e,i,a){e===n.MEDIA_DURATION&&(Ku(this,Ga).textContent=De(+a)),super.attributeChangedCallback(e,i,a)}get mediaDuration(){return R(this,n.MEDIA_DURATION)}set mediaDuration(e){O(this,n.MEDIA_DURATION,e)}};Ga=new WeakMap;Uo.getSlotTemplateHTML=Jh;d.customElements.get("media-duration-display")||d.customElements.define("media-duration-display",Uo);var jh={2:m("Network Error"),3:m("Decode Error"),4:m("Source Not Supported"),5:m("Encryption Error")},ep={2:m("A network error caused the media download to fail."),3:m("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:m("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:m("The media is encrypted and there are no keys to decrypt it.")},Vs=t=>{var e,i;return t.code===1?null:{title:(e=jh[t.code])!=null?e:`Error ${t.code}`,message:(i=ep[t.code])!=null?i:t.message}};var qu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},tp=(t,e,i)=>(qu(t,e,"read from private field"),i?i.call(t):e.get(t)),ip=(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)},ap=(t,e,i,a)=>(qu(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ho;function rp(t){return`
763
+ `}var be=class extends d.HTMLElement{constructor(){if(super(),Zh(this,Ye,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[L.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,o,s,l,u;e===L.MEDIA_CONTROLLER&&(i&&((o=(r=Po(this,Ye))==null?void 0:r.unassociateElement)==null||o.call(r,this),Uo(this,Ye,null)),a&&this.isConnected&&(Uo(this,Ye,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=Po(this,Ye))==null?void 0:l.associateElement)==null||u.call(l,this)))}connectedCallback(){var e,i,a;let{style:r}=W(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);let o=this.getAttribute(L.MEDIA_CONTROLLER);o&&(Uo(this,Ye,(e=this.getRootNode())==null?void 0:e.getElementById(o)),(a=(i=Po(this,Ye))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Po(this,Ye))==null?void 0:e.unassociateElement)==null||i.call(e,this),Uo(this,Ye,null)}};Ye=new WeakMap;be.shadowRootOptions={mode:"open"};be.getTemplateHTML=zh;be.getSlotTemplateHTML=Qh;d.customElements.get("media-text-display")||d.customElements.define("media-text-display",be);var Yu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Gu=(t,e,i)=>(Yu(t,e,"read from private field"),i?i.call(t):e.get(t)),Xh=(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)},Jh=(t,e,i,a)=>(Yu(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ya;function jh(t,e){return`
764
+ <slot>${Oe(e.mediaDuration)}</slot>
765
+ `}var Ho=class extends be{constructor(){var e;super(),Xh(this,Ya,void 0),Jh(this,Ya,this.shadowRoot.querySelector("slot")),Gu(this,Ya).textContent=Oe((e=this.mediaDuration)!=null?e:0)}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_DURATION]}attributeChangedCallback(e,i,a){e===n.MEDIA_DURATION&&(Gu(this,Ya).textContent=Oe(+a)),super.attributeChangedCallback(e,i,a)}get mediaDuration(){return R(this,n.MEDIA_DURATION)}set mediaDuration(e){O(this,n.MEDIA_DURATION,e)}};Ya=new WeakMap;Ho.getSlotTemplateHTML=jh;d.customElements.get("media-duration-display")||d.customElements.define("media-duration-display",Ho);var ep={2:h("Network Error"),3:h("Decode Error"),4:h("Source Not Supported"),5:h("Encryption Error")},tp={2:h("A network error caused the media download to fail."),3:h("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:h("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:h("The media is encrypted and there are no keys to decrypt it.")},Ks=t=>{var e,i;return t.code===1?null:{title:(e=ep[t.code])!=null?e:`Error ${t.code}`,message:(i=tp[t.code])!=null?i:t.message}};var Zu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ip=(t,e,i)=>(Zu(t,e,"read from private field"),i?i.call(t):e.get(t)),ap=(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)},rp=(t,e,i,a)=>(Zu(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Bo;function op(t){return`
766
766
  <style>
767
767
  :host {
768
768
  background: rgb(20 20 30 / .8);
@@ -779,13 +779,13 @@
779
779
  }
780
780
  </style>
781
781
  <slot name="error-${t.mediaerrorcode}" id="content">
782
- ${Zu({code:+t.mediaerrorcode,message:t.mediaerrormessage})}
782
+ ${zu({code:+t.mediaerrorcode,message:t.mediaerrormessage})}
783
783
  </slot>
784
- `}function op(t){return t.code&&Vs(t)!==null}function Zu(t){var e;let{title:i,message:a}=(e=Vs(t))!=null?e:{},r="";return i&&(r+=`<slot name="error-${t.code}-title"><h3>${i}</h3></slot>`),a&&(r+=`<slot name="error-${t.code}-message"><p>${a}</p></slot>`),r}var Yu=[n.MEDIA_ERROR_CODE,n.MEDIA_ERROR_MESSAGE],Pi=class extends Mt{constructor(){super(...arguments),ip(this,Ho,null)}static get observedAttributes(){return[...super.observedAttributes,...Yu]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,i,a){var r;if(super.attributeChangedCallback(e,i,a),!Yu.includes(e))return;let o=(r=this.mediaError)!=null?r:{code:this.mediaErrorCode,message:this.mediaErrorMessage};this.open=op(o),this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(o))}get mediaError(){return tp(this,Ho)}set mediaError(e){ap(this,Ho,e)}get mediaErrorCode(){return R(this,"mediaerrorcode")}set mediaErrorCode(e){O(this,"mediaerrorcode",e)}get mediaErrorMessage(){return I(this,"mediaerrormessage")}set mediaErrorMessage(e){M(this,"mediaerrormessage",e)}};Ho=new WeakMap;Pi.getSlotTemplateHTML=rp;Pi.formatErrorMessage=Zu;d.customElements.get("media-error-dialog")||d.customElements.define("media-error-dialog",Pi);var Bo=Pi;var np=`<svg aria-hidden="true" viewBox="0 0 26 24">
784
+ `}function np(t){return t.code&&Ks(t)!==null}function zu(t){var e;let{title:i,message:a}=(e=Ks(t))!=null?e:{},r="";return i&&(r+=`<slot name="error-${t.code}-title"><h3>${i}</h3></slot>`),a&&(r+=`<slot name="error-${t.code}-message"><p>${a}</p></slot>`),r}var qu=[n.MEDIA_ERROR_CODE,n.MEDIA_ERROR_MESSAGE],Pi=class extends Mt{constructor(){super(...arguments),ap(this,Bo,null)}static get observedAttributes(){return[...super.observedAttributes,...qu]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,i,a){var r;if(super.attributeChangedCallback(e,i,a),!qu.includes(e))return;let o=(r=this.mediaError)!=null?r:{code:this.mediaErrorCode,message:this.mediaErrorMessage};this.open=np(o),this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(o))}get mediaError(){return ip(this,Bo)}set mediaError(e){rp(this,Bo,e)}get mediaErrorCode(){return R(this,"mediaerrorcode")}set mediaErrorCode(e){O(this,"mediaerrorcode",e)}get mediaErrorMessage(){return I(this,"mediaerrormessage")}set mediaErrorMessage(e){M(this,"mediaerrormessage",e)}};Bo=new WeakMap;Pi.getSlotTemplateHTML=op;Pi.formatErrorMessage=zu;d.customElements.get("media-error-dialog")||d.customElements.define("media-error-dialog",Pi);var $o=Pi;var sp=`<svg aria-hidden="true" viewBox="0 0 26 24">
785
785
  <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>
786
- </svg>`,sp=`<svg aria-hidden="true" viewBox="0 0 26 24">
786
+ </svg>`,lp=`<svg aria-hidden="true" viewBox="0 0 26 24">
787
787
  <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>
788
- </svg>`;function lp(t){return`
788
+ </svg>`;function dp(t){return`
789
789
  <style>
790
790
  :host([${n.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) {
791
791
  display: none !important;
@@ -803,13 +803,13 @@
803
803
  </style>
804
804
 
805
805
  <slot name="icon">
806
- <slot name="enter">${np}</slot>
807
- <slot name="exit">${sp}</slot>
806
+ <slot name="enter">${sp}</slot>
807
+ <slot name="exit">${lp}</slot>
808
808
  </slot>
809
- `}function dp(){return`
810
- <slot name="tooltip-enter">${m("Enter fullscreen mode")}</slot>
811
- <slot name="tooltip-exit">${m("Exit fullscreen mode")}</slot>
812
- `}var zu=t=>{let e=t.mediaIsFullscreen?m("exit fullscreen mode"):m("enter fullscreen mode");t.setAttribute("aria-label",e)},Ya=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_IS_FULLSCREEN,n.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),zu(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_IS_FULLSCREEN&&zu(this)}get mediaFullscreenUnavailable(){return I(this,n.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){M(this,n.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return k(this,n.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){S(this,n.MEDIA_IS_FULLSCREEN,e)}handleClick(){let e=this.mediaIsFullscreen?p.MEDIA_EXIT_FULLSCREEN_REQUEST:p.MEDIA_ENTER_FULLSCREEN_REQUEST;this.dispatchEvent(new d.CustomEvent(e,{composed:!0,bubbles:!0}))}};Ya.getSlotTemplateHTML=lp;Ya.getTooltipContentHTML=dp;d.customElements.get("media-fullscreen-button")||d.customElements.define("media-fullscreen-button",Ya);var{MEDIA_TIME_IS_LIVE:$o,MEDIA_PAUSED:qa}=n,{MEDIA_SEEK_TO_LIVE_REQUEST:up,MEDIA_PLAY_REQUEST:cp}=p,mp='<svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg>';function hp(t){return`
809
+ `}function up(){return`
810
+ <slot name="tooltip-enter">${h("Enter fullscreen mode")}</slot>
811
+ <slot name="tooltip-exit">${h("Exit fullscreen mode")}</slot>
812
+ `}var Qu=t=>{let e=t.mediaIsFullscreen?h("exit fullscreen mode"):h("enter fullscreen mode");t.setAttribute("aria-label",e)},qa=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_IS_FULLSCREEN,n.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Qu(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_IS_FULLSCREEN&&Qu(this)}get mediaFullscreenUnavailable(){return I(this,n.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){M(this,n.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return k(this,n.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){S(this,n.MEDIA_IS_FULLSCREEN,e)}handleClick(){let e=this.mediaIsFullscreen?p.MEDIA_EXIT_FULLSCREEN_REQUEST:p.MEDIA_ENTER_FULLSCREEN_REQUEST;this.dispatchEvent(new d.CustomEvent(e,{composed:!0,bubbles:!0}))}};qa.getSlotTemplateHTML=dp;qa.getTooltipContentHTML=up;d.customElements.get("media-fullscreen-button")||d.customElements.define("media-fullscreen-button",qa);var{MEDIA_TIME_IS_LIVE:Wo,MEDIA_PAUSED:Za}=n,{MEDIA_SEEK_TO_LIVE_REQUEST:cp,MEDIA_PLAY_REQUEST:mp}=p,hp='<svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg>';function pp(t){return`
813
813
  <style>
814
814
  :host { --media-tooltip-display: none; }
815
815
 
@@ -821,13 +821,13 @@
821
821
  color: var(--media-live-button-icon-color, rgb(140, 140, 140));
822
822
  }
823
823
 
824
- :host([${$o}]:not([${qa}])) slot[name=indicator] > *,
825
- :host([${$o}]:not([${qa}])) ::slotted([slot=indicator]) {
824
+ :host([${Wo}]:not([${Za}])) slot[name=indicator] > *,
825
+ :host([${Wo}]:not([${Za}])) ::slotted([slot=indicator]) {
826
826
  fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));
827
827
  color: var(--media-live-button-indicator-color, rgb(255, 0, 0));
828
828
  }
829
829
 
830
- :host([${$o}]:not([${qa}])) {
830
+ :host([${Wo}]:not([${Za}])) {
831
831
  cursor: var(--media-cursor, not-allowed);
832
832
  }
833
833
 
@@ -837,10 +837,10 @@
837
837
 
838
838
  </style>
839
839
 
840
- <slot name="indicator">${mp}</slot>
840
+ <slot name="indicator">${hp}</slot>
841
841
 
842
- <slot name="spacer">&nbsp;</slot><slot name="text">${m("live")}</slot>
843
- `}var Qu=t=>{var e;let i=t.mediaPaused||!t.mediaTimeIsLive,a=i?m("seek to live"):m("playing live");t.setAttribute("aria-label",a);let r=(e=t.shadowRoot)==null?void 0:e.querySelector('slot[name="text"]');r&&(r.textContent=m("live")),i?t.removeAttribute("aria-disabled"):t.setAttribute("aria-disabled","true")},Wo=class extends B{static get observedAttributes(){return[...super.observedAttributes,$o,qa]}connectedCallback(){super.connectedCallback(),Qu(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),Qu(this)}get mediaPaused(){return k(this,n.MEDIA_PAUSED)}set mediaPaused(e){S(this,n.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return k(this,n.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){S(this,n.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new d.CustomEvent(up,{composed:!0,bubbles:!0})),this.hasAttribute(qa)&&this.dispatchEvent(new d.CustomEvent(cp,{composed:!0,bubbles:!0})))}};Wo.getSlotTemplateHTML=hp;d.customElements.get("media-live-button")||d.customElements.define("media-live-button",Wo);var Ju=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Za=(t,e,i)=>(Ju(t,e,"read from private field"),i?i.call(t):e.get(t)),Xu=(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)},za=(t,e,i,a)=>(Ju(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ye,Vo,Fo={LOADING_DELAY:"loadingdelay",NO_AUTOHIDE:"noautohide"},ju=500,pp=`
842
+ <slot name="spacer">&nbsp;</slot><slot name="text">${h("live")}</slot>
843
+ `}var Xu=t=>{var e;let i=t.mediaPaused||!t.mediaTimeIsLive,a=i?h("seek to live"):h("playing live");t.setAttribute("aria-label",a);let r=(e=t.shadowRoot)==null?void 0:e.querySelector('slot[name="text"]');r&&(r.textContent=h("live")),i?t.removeAttribute("aria-disabled"):t.setAttribute("aria-disabled","true")},Fo=class extends B{static get observedAttributes(){return[...super.observedAttributes,Wo,Za]}connectedCallback(){super.connectedCallback(),Xu(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),Xu(this)}get mediaPaused(){return k(this,n.MEDIA_PAUSED)}set mediaPaused(e){S(this,n.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return k(this,n.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){S(this,n.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new d.CustomEvent(cp,{composed:!0,bubbles:!0})),this.hasAttribute(Za)&&this.dispatchEvent(new d.CustomEvent(mp,{composed:!0,bubbles:!0})))}};Fo.getSlotTemplateHTML=pp;d.customElements.get("media-live-button")||d.customElements.define("media-live-button",Fo);var ju=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},za=(t,e,i)=>(ju(t,e,"read from private field"),i?i.call(t):e.get(t)),Ju=(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)},Qa=(t,e,i,a)=>(ju(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),qe,Ko,Vo={LOADING_DELAY:"loadingdelay",NO_AUTOHIDE:"noautohide"},ec=500,fp=`
844
844
  <svg aria-hidden="true" viewBox="0 0 100 100">
845
845
  <path d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">
846
846
  <animateTransform
@@ -853,13 +853,13 @@
853
853
  repeatCount="indefinite" />
854
854
  </path>
855
855
  </svg>
856
- `;function fp(t){return`
856
+ `;function vp(t){return`
857
857
  <style>
858
858
  :host {
859
859
  display: var(--media-control-display, var(--media-loading-indicator-display, inline-block));
860
860
  vertical-align: middle;
861
861
  box-sizing: border-box;
862
- --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, ${ju}ms);
862
+ --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, ${ec}ms);
863
863
  }
864
864
 
865
865
  #status {
@@ -898,15 +898,15 @@
898
898
  }
899
899
  </style>
900
900
 
901
- <slot name="icon">${pp}</slot>
902
- <div id="status" role="status" aria-live="polite">${m("media loading")}</div>
903
- `}var Qa=class extends d.HTMLElement{constructor(){if(super(),Xu(this,Ye,void 0),Xu(this,Vo,ju),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[L.MEDIA_CONTROLLER,n.MEDIA_PAUSED,n.MEDIA_LOADING,Fo.LOADING_DELAY]}attributeChangedCallback(e,i,a){var r,o,s,l,u;e===Fo.LOADING_DELAY&&i!==a?this.loadingDelay=Number(a):e===L.MEDIA_CONTROLLER&&(i&&((o=(r=Za(this,Ye))==null?void 0:r.unassociateElement)==null||o.call(r,this),za(this,Ye,null)),a&&this.isConnected&&(za(this,Ye,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=Za(this,Ye))==null?void 0:l.associateElement)==null||u.call(l,this)))}connectedCallback(){var e,i,a;let r=this.getAttribute(L.MEDIA_CONTROLLER);r&&(za(this,Ye,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=Za(this,Ye))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Za(this,Ye))==null?void 0:e.unassociateElement)==null||i.call(e,this),za(this,Ye,null)}get loadingDelay(){return Za(this,Vo)}set loadingDelay(e){za(this,Vo,e);let{style:i}=W(this.shadowRoot,":host");i.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return k(this,n.MEDIA_PAUSED)}set mediaPaused(e){S(this,n.MEDIA_PAUSED,e)}get mediaLoading(){return k(this,n.MEDIA_LOADING)}set mediaLoading(e){S(this,n.MEDIA_LOADING,e)}get mediaController(){return I(this,L.MEDIA_CONTROLLER)}set mediaController(e){M(this,L.MEDIA_CONTROLLER,e)}get noAutohide(){return k(this,Fo.NO_AUTOHIDE)}set noAutohide(e){S(this,Fo.NO_AUTOHIDE,e)}};Ye=new WeakMap;Vo=new WeakMap;Qa.shadowRootOptions={mode:"open"};Qa.getTemplateHTML=fp;d.customElements.get("media-loading-indicator")||d.customElements.define("media-loading-indicator",Qa);var vp=`<svg aria-hidden="true" viewBox="0 0 24 24">
901
+ <slot name="icon">${fp}</slot>
902
+ <div id="status" role="status" aria-live="polite">${h("media loading")}</div>
903
+ `}var Xa=class extends d.HTMLElement{constructor(){if(super(),Ju(this,qe,void 0),Ju(this,Ko,ec),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[L.MEDIA_CONTROLLER,n.MEDIA_PAUSED,n.MEDIA_LOADING,Vo.LOADING_DELAY]}attributeChangedCallback(e,i,a){var r,o,s,l,u;e===Vo.LOADING_DELAY&&i!==a?this.loadingDelay=Number(a):e===L.MEDIA_CONTROLLER&&(i&&((o=(r=za(this,qe))==null?void 0:r.unassociateElement)==null||o.call(r,this),Qa(this,qe,null)),a&&this.isConnected&&(Qa(this,qe,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=za(this,qe))==null?void 0:l.associateElement)==null||u.call(l,this)))}connectedCallback(){var e,i,a;let r=this.getAttribute(L.MEDIA_CONTROLLER);r&&(Qa(this,qe,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=za(this,qe))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=za(this,qe))==null?void 0:e.unassociateElement)==null||i.call(e,this),Qa(this,qe,null)}get loadingDelay(){return za(this,Ko)}set loadingDelay(e){Qa(this,Ko,e);let{style:i}=W(this.shadowRoot,":host");i.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return k(this,n.MEDIA_PAUSED)}set mediaPaused(e){S(this,n.MEDIA_PAUSED,e)}get mediaLoading(){return k(this,n.MEDIA_LOADING)}set mediaLoading(e){S(this,n.MEDIA_LOADING,e)}get mediaController(){return I(this,L.MEDIA_CONTROLLER)}set mediaController(e){M(this,L.MEDIA_CONTROLLER,e)}get noAutohide(){return k(this,Vo.NO_AUTOHIDE)}set noAutohide(e){S(this,Vo.NO_AUTOHIDE,e)}};qe=new WeakMap;Ko=new WeakMap;Xa.shadowRootOptions={mode:"open"};Xa.getTemplateHTML=vp;d.customElements.get("media-loading-indicator")||d.customElements.define("media-loading-indicator",Xa);var bp=`<svg aria-hidden="true" viewBox="0 0 24 24">
904
904
  <path d="M16.5 12A4.5 4.5 0 0 0 14 8v2.18l2.45 2.45a4.22 4.22 0 0 0 .05-.63Zm2.5 0a6.84 6.84 0 0 1-.54 2.64L20 16.15A8.8 8.8 0 0 0 21 12a9 9 0 0 0-7-8.77v2.06A7 7 0 0 1 19 12ZM4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25A6.92 6.92 0 0 1 14 18.7v2.06A9 9 0 0 0 17.69 19l2 2.05L21 19.73l-9-9L4.27 3ZM12 4 9.91 6.09 12 8.18V4Z"/>
905
- </svg>`,ec=`<svg aria-hidden="true" viewBox="0 0 24 24">
905
+ </svg>`,tc=`<svg aria-hidden="true" viewBox="0 0 24 24">
906
906
  <path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4Z"/>
907
907
  </svg>`,Ep=`<svg aria-hidden="true" viewBox="0 0 24 24">
908
908
  <path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4ZM14 3.23v2.06a7 7 0 0 1 0 13.42v2.06a9 9 0 0 0 0-17.54Z"/>
909
- </svg>`;function bp(t){return`
909
+ </svg>`;function gp(t){return`
910
910
  <style>
911
911
  :host(:not([${n.MEDIA_VOLUME_LEVEL}])) slot[name=icon] slot:not([name=high]),
912
912
  :host([${n.MEDIA_VOLUME_LEVEL}=high]) slot[name=icon] slot:not([name=high]) {
@@ -932,17 +932,17 @@
932
932
  </style>
933
933
 
934
934
  <slot name="icon">
935
- <slot name="off">${vp}</slot>
936
- <slot name="low">${ec}</slot>
937
- <slot name="medium">${ec}</slot>
935
+ <slot name="off">${bp}</slot>
936
+ <slot name="low">${tc}</slot>
937
+ <slot name="medium">${tc}</slot>
938
938
  <slot name="high">${Ep}</slot>
939
939
  </slot>
940
- `}function gp(){return`
941
- <slot name="tooltip-mute">${m("Mute")}</slot>
942
- <slot name="tooltip-unmute">${m("Unmute")}</slot>
943
- `}var tc=t=>{let i=t.mediaVolumeLevel==="off"?m("unmute"):m("mute");t.setAttribute("aria-label",i)},Xa=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),tc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_VOLUME_LEVEL&&tc(this)}get mediaVolumeLevel(){return I(this,n.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){M(this,n.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e=this.mediaVolumeLevel==="off"?p.MEDIA_UNMUTE_REQUEST:p.MEDIA_MUTE_REQUEST;this.dispatchEvent(new d.CustomEvent(e,{composed:!0,bubbles:!0}))}};Xa.getSlotTemplateHTML=bp;Xa.getTooltipContentHTML=gp;d.customElements.get("media-mute-button")||d.customElements.define("media-mute-button",Xa);var ic=`<svg aria-hidden="true" viewBox="0 0 28 24">
940
+ `}function _p(){return`
941
+ <slot name="tooltip-mute">${h("Mute")}</slot>
942
+ <slot name="tooltip-unmute">${h("Unmute")}</slot>
943
+ `}var ic=t=>{let i=t.mediaVolumeLevel==="off"?h("unmute"):h("mute");t.setAttribute("aria-label",i)},Ja=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),ic(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_VOLUME_LEVEL&&ic(this)}get mediaVolumeLevel(){return I(this,n.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){M(this,n.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e=this.mediaVolumeLevel==="off"?p.MEDIA_UNMUTE_REQUEST:p.MEDIA_MUTE_REQUEST;this.dispatchEvent(new d.CustomEvent(e,{composed:!0,bubbles:!0}))}};Ja.getSlotTemplateHTML=gp;Ja.getTooltipContentHTML=_p;d.customElements.get("media-mute-button")||d.customElements.define("media-mute-button",Ja);var ac=`<svg aria-hidden="true" viewBox="0 0 28 24">
944
944
  <path d="M24 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Zm-1 16H5V5h18v14Zm-3-8h-7v5h7v-5Z"/>
945
- </svg>`;function _p(t){return`
945
+ </svg>`;function Ap(t){return`
946
946
  <style>
947
947
  :host([${n.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) {
948
948
  display: none !important;
@@ -959,13 +959,13 @@
959
959
  </style>
960
960
 
961
961
  <slot name="icon">
962
- <slot name="enter">${ic}</slot>
963
- <slot name="exit">${ic}</slot>
962
+ <slot name="enter">${ac}</slot>
963
+ <slot name="exit">${ac}</slot>
964
964
  </slot>
965
- `}function Ap(){return`
966
- <slot name="tooltip-enter">${m("Enter picture in picture mode")}</slot>
967
- <slot name="tooltip-exit">${m("Exit picture in picture mode")}</slot>
968
- `}var ac=t=>{let e=t.mediaIsPip?m("exit picture in picture mode"):m("enter picture in picture mode");t.setAttribute("aria-label",e)},Ja=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_IS_PIP,n.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),ac(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_IS_PIP&&ac(this)}get mediaPipUnavailable(){return I(this,n.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){M(this,n.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return k(this,n.MEDIA_IS_PIP)}set mediaIsPip(e){S(this,n.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?p.MEDIA_EXIT_PIP_REQUEST:p.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new d.CustomEvent(e,{composed:!0,bubbles:!0}))}};Ja.getSlotTemplateHTML=_p;Ja.getTooltipContentHTML=Ap;d.customElements.get("media-pip-button")||d.customElements.define("media-pip-button",Ja);var Tp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ui=(t,e,i)=>(Tp(t,e,"read from private field"),i?i.call(t):e.get(t)),yp=(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)},Lt,Ks={RATES:"rates"},Gs=[1,1.2,1.5,1.7,2],jt=1;function kp(t){return`
965
+ `}function Tp(){return`
966
+ <slot name="tooltip-enter">${h("Enter picture in picture mode")}</slot>
967
+ <slot name="tooltip-exit">${h("Exit picture in picture mode")}</slot>
968
+ `}var rc=t=>{let e=t.mediaIsPip?h("exit picture in picture mode"):h("enter picture in picture mode");t.setAttribute("aria-label",e)},ja=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_IS_PIP,n.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),rc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_IS_PIP&&rc(this)}get mediaPipUnavailable(){return I(this,n.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){M(this,n.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return k(this,n.MEDIA_IS_PIP)}set mediaIsPip(e){S(this,n.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?p.MEDIA_EXIT_PIP_REQUEST:p.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new d.CustomEvent(e,{composed:!0,bubbles:!0}))}};ja.getSlotTemplateHTML=Ap;ja.getTooltipContentHTML=Tp;d.customElements.get("media-pip-button")||d.customElements.define("media-pip-button",ja);var yp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ui=(t,e,i)=>(yp(t,e,"read from private field"),i?i.call(t):e.get(t)),kp=(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)},Lt,Gs={RATES:"rates"},Ys=[1,1.2,1.5,1.7,2],jt=1;function Sp(t){return`
969
969
  <style>
970
970
  :host {
971
971
  min-width: 5ch;
@@ -973,11 +973,11 @@
973
973
  }
974
974
  </style>
975
975
  <slot name="icon">${t.mediaplaybackrate||jt}x</slot>
976
- `}function Sp(){return m("Playback rate")}var ja=class extends B{constructor(){var e;super(),yp(this,Lt,new Tt(this,Ks.RATES,{defaultValue:Gs})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${(e=this.mediaPlaybackRate)!=null?e:jt}x`}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PLAYBACK_RATE,Ks.RATES]}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),e===Ks.RATES&&(Ui(this,Lt).value=a),e===n.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,o=Number.isNaN(r)?jt:r;this.container.innerHTML=`${o}x`,this.setAttribute("aria-label",m("Playback rate {playbackRate}",{playbackRate:o}))}}get rates(){return Ui(this,Lt)}set rates(e){e?Array.isArray(e)?Ui(this,Lt).value=e.join(" "):typeof e=="string"&&(Ui(this,Lt).value=e):Ui(this,Lt).value=""}get mediaPlaybackRate(){return R(this,n.MEDIA_PLAYBACK_RATE,jt)}set mediaPlaybackRate(e){O(this,n.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,i;let a=Array.from(Ui(this,Lt).values(),s=>+s).sort((s,l)=>s-l),r=(i=(e=a.find(s=>s>this.mediaPlaybackRate))!=null?e:a[0])!=null?i:jt,o=new d.CustomEvent(p.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(o)}};Lt=new WeakMap;ja.getSlotTemplateHTML=kp;ja.getTooltipContentHTML=Sp;d.customElements.get("media-playback-rate-button")||d.customElements.define("media-playback-rate-button",ja);var Ip=`<svg aria-hidden="true" viewBox="0 0 24 24">
976
+ `}function Ip(){return h("Playback rate")}var er=class extends B{constructor(){var e;super(),kp(this,Lt,new Tt(this,Gs.RATES,{defaultValue:Ys})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${(e=this.mediaPlaybackRate)!=null?e:jt}x`}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PLAYBACK_RATE,Gs.RATES]}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),e===Gs.RATES&&(Ui(this,Lt).value=a),e===n.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,o=Number.isNaN(r)?jt:r;this.container.innerHTML=`${o}x`,this.setAttribute("aria-label",h("Playback rate {playbackRate}",{playbackRate:o}))}}get rates(){return Ui(this,Lt)}set rates(e){e?Array.isArray(e)?Ui(this,Lt).value=e.join(" "):typeof e=="string"&&(Ui(this,Lt).value=e):Ui(this,Lt).value=""}get mediaPlaybackRate(){return R(this,n.MEDIA_PLAYBACK_RATE,jt)}set mediaPlaybackRate(e){O(this,n.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,i;let a=Array.from(Ui(this,Lt).values(),s=>+s).sort((s,l)=>s-l),r=(i=(e=a.find(s=>s>this.mediaPlaybackRate))!=null?e:a[0])!=null?i:jt,o=new d.CustomEvent(p.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(o)}};Lt=new WeakMap;er.getSlotTemplateHTML=Sp;er.getTooltipContentHTML=Ip;d.customElements.get("media-playback-rate-button")||d.customElements.define("media-playback-rate-button",er);var Mp=`<svg aria-hidden="true" viewBox="0 0 24 24">
977
977
  <path d="m6 21 15-9L6 3v18Z"/>
978
- </svg>`,Mp=`<svg aria-hidden="true" viewBox="0 0 24 24">
978
+ </svg>`,Cp=`<svg aria-hidden="true" viewBox="0 0 24 24">
979
979
  <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>
980
- </svg>`;function Cp(t){return`
980
+ </svg>`;function Lp(t){return`
981
981
  <style>
982
982
  :host([${n.MEDIA_PAUSED}]) slot[name=pause],
983
983
  :host(:not([${n.MEDIA_PAUSED}])) slot[name=play] {
@@ -991,13 +991,13 @@
991
991
  </style>
992
992
 
993
993
  <slot name="icon">
994
- <slot name="play">${Ip}</slot>
995
- <slot name="pause">${Mp}</slot>
994
+ <slot name="play">${Mp}</slot>
995
+ <slot name="pause">${Cp}</slot>
996
996
  </slot>
997
- `}function Lp(){return`
998
- <slot name="tooltip-play">${m("Play")}</slot>
999
- <slot name="tooltip-pause">${m("Pause")}</slot>
1000
- `}var rc=t=>{let e=t.mediaPaused?m("play"):m("pause");t.setAttribute("aria-label",e)},er=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PAUSED,n.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),rc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),(e===n.MEDIA_PAUSED||e===n.MEDIA_LANG)&&rc(this)}get mediaPaused(){return k(this,n.MEDIA_PAUSED)}set mediaPaused(e){S(this,n.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?p.MEDIA_PLAY_REQUEST:p.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new d.CustomEvent(e,{composed:!0,bubbles:!0}))}};er.getSlotTemplateHTML=Cp;er.getTooltipContentHTML=Lp;d.customElements.get("media-play-button")||d.customElements.define("media-play-button",er);var qe={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"};function wp(t){return`
997
+ `}function wp(){return`
998
+ <slot name="tooltip-play">${h("Play")}</slot>
999
+ <slot name="tooltip-pause">${h("Pause")}</slot>
1000
+ `}var oc=t=>{let e=t.mediaPaused?h("play"):h("pause");t.setAttribute("aria-label",e)},tr=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PAUSED,n.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),oc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),(e===n.MEDIA_PAUSED||e===n.MEDIA_LANG)&&oc(this)}get mediaPaused(){return k(this,n.MEDIA_PAUSED)}set mediaPaused(e){S(this,n.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?p.MEDIA_PLAY_REQUEST:p.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new d.CustomEvent(e,{composed:!0,bubbles:!0}))}};tr.getSlotTemplateHTML=Lp;tr.getTooltipContentHTML=wp;d.customElements.get("media-play-button")||d.customElements.define("media-play-button",tr);var Ze={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"};function Rp(t){return`
1001
1001
  <style>
1002
1002
  :host {
1003
1003
  pointer-events: none;
@@ -1019,7 +1019,7 @@
1019
1019
  </style>
1020
1020
 
1021
1021
  <img part="poster img" aria-hidden="true" id="image"/>
1022
- `}var Rp=t=>{t.style.removeProperty("background-image")},xp=(t,e)=>{t.style["background-image"]=`url('${e}')`},tr=class extends d.HTMLElement{static get observedAttributes(){return[qe.PLACEHOLDER_SRC,qe.SRC]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,i,a){e===qe.SRC&&(a==null?this.image.removeAttribute(qe.SRC):this.image.setAttribute(qe.SRC,a)),e===qe.PLACEHOLDER_SRC&&(a==null?Rp(this.image):xp(this.image,a))}get placeholderSrc(){return I(this,qe.PLACEHOLDER_SRC)}set placeholderSrc(e){M(this,qe.SRC,e)}get src(){return I(this,qe.SRC)}set src(e){M(this,qe.SRC,e)}};tr.shadowRootOptions={mode:"open"};tr.getTemplateHTML=wp;d.customElements.get("media-poster-image")||d.customElements.define("media-poster-image",tr);var oc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Dp=(t,e,i)=>(oc(t,e,"read from private field"),i?i.call(t):e.get(t)),Op=(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)},Np=(t,e,i,a)=>(oc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ko,Ys=class extends Ee{constructor(){super(),Op(this,Ko,void 0),Np(this,Ko,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PREVIEW_CHAPTER,n.MEDIA_LANG]}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),(e===n.MEDIA_PREVIEW_CHAPTER||e===n.MEDIA_LANG)&&a!==i&&a!=null)if(Dp(this,Ko).textContent=a,a!==""){let r=m("chapter: {chapterName}",{chapterName:a});this.setAttribute("aria-valuetext",r)}else this.removeAttribute("aria-valuetext")}get mediaPreviewChapter(){return I(this,n.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){M(this,n.MEDIA_PREVIEW_CHAPTER,e)}};Ko=new WeakMap;d.customElements.get("media-preview-chapter-display")||d.customElements.define("media-preview-chapter-display",Ys);var nc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Go=(t,e,i)=>(nc(t,e,"read from private field"),i?i.call(t):e.get(t)),Pp=(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)},Yo=(t,e,i,a)=>(nc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ze;function Up(t){return`
1022
+ `}var xp=t=>{t.style.removeProperty("background-image")},Dp=(t,e)=>{t.style["background-image"]=`url('${e}')`},ir=class extends d.HTMLElement{static get observedAttributes(){return[Ze.PLACEHOLDER_SRC,Ze.SRC]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,i,a){e===Ze.SRC&&(a==null?this.image.removeAttribute(Ze.SRC):this.image.setAttribute(Ze.SRC,a)),e===Ze.PLACEHOLDER_SRC&&(a==null?xp(this.image):Dp(this.image,a))}get placeholderSrc(){return I(this,Ze.PLACEHOLDER_SRC)}set placeholderSrc(e){M(this,Ze.SRC,e)}get src(){return I(this,Ze.SRC)}set src(e){M(this,Ze.SRC,e)}};ir.shadowRootOptions={mode:"open"};ir.getTemplateHTML=Rp;d.customElements.get("media-poster-image")||d.customElements.define("media-poster-image",ir);var nc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Op=(t,e,i)=>(nc(t,e,"read from private field"),i?i.call(t):e.get(t)),Np=(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)},Pp=(t,e,i,a)=>(nc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Go,qs=class extends be{constructor(){super(),Np(this,Go,void 0),Pp(this,Go,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PREVIEW_CHAPTER,n.MEDIA_LANG]}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),(e===n.MEDIA_PREVIEW_CHAPTER||e===n.MEDIA_LANG)&&a!==i&&a!=null)if(Op(this,Go).textContent=a,a!==""){let r=h("chapter: {chapterName}",{chapterName:a});this.setAttribute("aria-valuetext",r)}else this.removeAttribute("aria-valuetext")}get mediaPreviewChapter(){return I(this,n.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){M(this,n.MEDIA_PREVIEW_CHAPTER,e)}};Go=new WeakMap;d.customElements.get("media-preview-chapter-display")||d.customElements.define("media-preview-chapter-display",qs);var sc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Yo=(t,e,i)=>(sc(t,e,"read from private field"),i?i.call(t):e.get(t)),Up=(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)},qo=(t,e,i,a)=>(sc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),ze;function Hp(t){return`
1023
1023
  <style>
1024
1024
  :host {
1025
1025
  box-sizing: border-box;
@@ -1033,28 +1033,28 @@
1033
1033
  }
1034
1034
  </style>
1035
1035
  <img crossorigin loading="eager" decoding="async">
1036
- `}var Hi=class extends d.HTMLElement{constructor(){if(super(),Pp(this,Ze,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[L.MEDIA_CONTROLLER,n.MEDIA_PREVIEW_IMAGE,n.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,i,a;let r=this.getAttribute(L.MEDIA_CONTROLLER);r&&(Yo(this,Ze,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=Go(this,Ze))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Go(this,Ze))==null?void 0:e.unassociateElement)==null||i.call(e,this),Yo(this,Ze,null)}attributeChangedCallback(e,i,a){var r,o,s,l,u;[n.MEDIA_PREVIEW_IMAGE,n.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===L.MEDIA_CONTROLLER&&(i&&((o=(r=Go(this,Ze))==null?void 0:r.unassociateElement)==null||o.call(r,this),Yo(this,Ze,null)),a&&this.isConnected&&(Yo(this,Ze,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=Go(this,Ze))==null?void 0:l.associateElement)==null||u.call(l,this)))}get mediaPreviewImage(){return I(this,n.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){M(this,n.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(n.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(i=>+i)}set mediaPreviewCoords(e){if(!e){this.removeAttribute(n.MEDIA_PREVIEW_COORDS);return}this.setAttribute(n.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){let e=this.mediaPreviewCoords,i=this.mediaPreviewImage;if(!(e&&i))return;let[a,r,o,s]=e,l=i.split("#")[0],u=getComputedStyle(this),{maxWidth:h,maxHeight:_,minWidth:g,minHeight:f}=u,v=Math.min(parseInt(h)/o,parseInt(_)/s),N=Math.max(parseInt(g)/o,parseInt(f)/s),T=v<1,C=T?v:N>1?N:1,{style:P}=W(this.shadowRoot,":host"),j=W(this.shadowRoot,"img").style,_e=this.shadowRoot.querySelector("img"),bt=T?"min":"max";P.setProperty(`${bt}-width`,"initial","important"),P.setProperty(`${bt}-height`,"initial","important"),P.width=`${o*C}px`,P.height=`${s*C}px`;let ot=()=>{j.width=`${this.imgWidth*C}px`,j.height=`${this.imgHeight*C}px`,j.display="block"};_e.src!==l&&(_e.onload=()=>{this.imgWidth=_e.naturalWidth,this.imgHeight=_e.naturalHeight,ot()},_e.src=l,ot()),ot(),j.transform=`translate(-${a*C}px, -${r*C}px)`}};Ze=new WeakMap;Hi.shadowRootOptions={mode:"open"};Hi.getTemplateHTML=Up;d.customElements.get("media-preview-thumbnail")||d.customElements.define("media-preview-thumbnail",Hi);var qo=Hi;var lc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},sc=(t,e,i)=>(lc(t,e,"read from private field"),i?i.call(t):e.get(t)),Hp=(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)},Bp=(t,e,i,a)=>(lc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),ir,qs=class extends Ee{constructor(){super(),Hp(this,ir,void 0),Bp(this,ir,this.shadowRoot.querySelector("slot")),sc(this,ir).textContent=De(0)}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_PREVIEW_TIME&&a!=null&&(sc(this,ir).textContent=De(parseFloat(a)))}get mediaPreviewTime(){return R(this,n.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){O(this,n.MEDIA_PREVIEW_TIME,e)}};ir=new WeakMap;d.customElements.get("media-preview-time-display")||d.customElements.define("media-preview-time-display",qs);var Bi={SEEK_OFFSET:"seekoffset"},Zs=30,$p=t=>`
1036
+ `}var Hi=class extends d.HTMLElement{constructor(){if(super(),Up(this,ze,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[L.MEDIA_CONTROLLER,n.MEDIA_PREVIEW_IMAGE,n.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,i,a;let r=this.getAttribute(L.MEDIA_CONTROLLER);r&&(qo(this,ze,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=Yo(this,ze))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Yo(this,ze))==null?void 0:e.unassociateElement)==null||i.call(e,this),qo(this,ze,null)}attributeChangedCallback(e,i,a){var r,o,s,l,u;[n.MEDIA_PREVIEW_IMAGE,n.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===L.MEDIA_CONTROLLER&&(i&&((o=(r=Yo(this,ze))==null?void 0:r.unassociateElement)==null||o.call(r,this),qo(this,ze,null)),a&&this.isConnected&&(qo(this,ze,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(l=Yo(this,ze))==null?void 0:l.associateElement)==null||u.call(l,this)))}get mediaPreviewImage(){return I(this,n.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){M(this,n.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(n.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(i=>+i)}set mediaPreviewCoords(e){if(!e){this.removeAttribute(n.MEDIA_PREVIEW_COORDS);return}this.setAttribute(n.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){let e=this.mediaPreviewCoords,i=this.mediaPreviewImage;if(!(e&&i))return;let[a,r,o,s]=e,l=i.split("#")[0],u=getComputedStyle(this),{maxWidth:m,maxHeight:_,minWidth:g,minHeight:f}=u,v=Math.min(parseInt(m)/o,parseInt(_)/s),N=Math.max(parseInt(g)/o,parseInt(f)/s),T=v<1,C=T?v:N>1?N:1,{style:P}=W(this.shadowRoot,":host"),ee=W(this.shadowRoot,"img").style,_e=this.shadowRoot.querySelector("img"),Et=T?"min":"max";P.setProperty(`${Et}-width`,"initial","important"),P.setProperty(`${Et}-height`,"initial","important"),P.width=`${o*C}px`,P.height=`${s*C}px`;let ot=()=>{ee.width=`${this.imgWidth*C}px`,ee.height=`${this.imgHeight*C}px`,ee.display="block"};_e.src!==l&&(_e.onload=()=>{this.imgWidth=_e.naturalWidth,this.imgHeight=_e.naturalHeight,ot()},_e.src=l,ot()),ot(),ee.transform=`translate(-${a*C}px, -${r*C}px)`}};ze=new WeakMap;Hi.shadowRootOptions={mode:"open"};Hi.getTemplateHTML=Hp;d.customElements.get("media-preview-thumbnail")||d.customElements.define("media-preview-thumbnail",Hi);var Zo=Hi;var dc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},lc=(t,e,i)=>(dc(t,e,"read from private field"),i?i.call(t):e.get(t)),Bp=(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)},$p=(t,e,i,a)=>(dc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),ar,Zs=class extends be{constructor(){super(),Bp(this,ar,void 0),$p(this,ar,this.shadowRoot.querySelector("slot")),lc(this,ar).textContent=Oe(0)}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_PREVIEW_TIME&&a!=null&&(lc(this,ar).textContent=Oe(parseFloat(a)))}get mediaPreviewTime(){return R(this,n.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){O(this,n.MEDIA_PREVIEW_TIME,e)}};ar=new WeakMap;d.customElements.get("media-preview-time-display")||d.customElements.define("media-preview-time-display",Zs);var Bi={SEEK_OFFSET:"seekoffset"},zs=30,Wp=t=>`
1037
1037
  <svg aria-hidden="true" viewBox="0 0 20 24">
1038
1038
  <defs>
1039
1039
  <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>
1040
1040
  </defs>
1041
1041
  <text class="text value" transform="translate(2.18 19.87)">${t}</text>
1042
1042
  <path d="M10 6V3L4.37 7 10 10.94V8a5.54 5.54 0 0 1 1.9 10.48v2.12A7.5 7.5 0 0 0 10 6Z"/>
1043
- </svg>`;function Wp(t,e){return`
1044
- <slot name="icon">${$p(e.seekOffset)}</slot>
1045
- `}function Fp(){return m("Seek backward")}var Vp=0,ar=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_CURRENT_TIME,Bi.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=R(this,Bi.SEEK_OFFSET,Zs)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===Bi.SEEK_OFFSET&&(this.seekOffset=R(this,Bi.SEEK_OFFSET,Zs))}get seekOffset(){return R(this,Bi.SEEK_OFFSET,Zs)}set seekOffset(e){O(this,Bi.SEEK_OFFSET,e),this.setAttribute("aria-label",m("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),zr(Qr(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return R(this,n.MEDIA_CURRENT_TIME,Vp)}set mediaCurrentTime(e){O(this,n.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),i=new d.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}};ar.getSlotTemplateHTML=Wp;ar.getTooltipContentHTML=Fp;d.customElements.get("media-seek-backward-button")||d.customElements.define("media-seek-backward-button",ar);var $i={SEEK_OFFSET:"seekoffset"},zs=30,Kp=t=>`
1043
+ </svg>`;function Fp(t,e){return`
1044
+ <slot name="icon">${Wp(e.seekOffset)}</slot>
1045
+ `}function Vp(){return h("Seek backward")}var Kp=0,rr=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_CURRENT_TIME,Bi.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=R(this,Bi.SEEK_OFFSET,zs)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===Bi.SEEK_OFFSET&&(this.seekOffset=R(this,Bi.SEEK_OFFSET,zs))}get seekOffset(){return R(this,Bi.SEEK_OFFSET,zs)}set seekOffset(e){O(this,Bi.SEEK_OFFSET,e),this.setAttribute("aria-label",h("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),Qr(Xr(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return R(this,n.MEDIA_CURRENT_TIME,Kp)}set mediaCurrentTime(e){O(this,n.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),i=new d.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}};rr.getSlotTemplateHTML=Fp;rr.getTooltipContentHTML=Vp;d.customElements.get("media-seek-backward-button")||d.customElements.define("media-seek-backward-button",rr);var $i={SEEK_OFFSET:"seekoffset"},Qs=30,Gp=t=>`
1046
1046
  <svg aria-hidden="true" viewBox="0 0 20 24">
1047
1047
  <defs>
1048
1048
  <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>
1049
1049
  </defs>
1050
1050
  <text class="text value" transform="translate(8.9 19.87)">${t}</text>
1051
1051
  <path d="M10 6V3l5.61 4L10 10.94V8a5.54 5.54 0 0 0-1.9 10.48v2.12A7.5 7.5 0 0 1 10 6Z"/>
1052
- </svg>`;function Gp(t,e){return`
1053
- <slot name="icon">${Kp(e.seekOffset)}</slot>
1054
- `}function Yp(){return m("Seek forward")}var qp=0,rr=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_CURRENT_TIME,$i.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=R(this,$i.SEEK_OFFSET,zs)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===$i.SEEK_OFFSET&&(this.seekOffset=R(this,$i.SEEK_OFFSET,zs))}get seekOffset(){return R(this,$i.SEEK_OFFSET,zs)}set seekOffset(e){O(this,$i.SEEK_OFFSET,e),this.setAttribute("aria-label",m("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),zr(Qr(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return R(this,n.MEDIA_CURRENT_TIME,qp)}set mediaCurrentTime(e){O(this,n.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,i=new d.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}};rr.getSlotTemplateHTML=Gp;rr.getTooltipContentHTML=Yp;d.customElements.get("media-seek-forward-button")||d.customElements.define("media-seek-forward-button",rr);var cc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Qs=(t,e,i)=>(cc(t,e,"read from private field"),i?i.call(t):e.get(t)),Zp=(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)},zp=(t,e,i,a)=>(cc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Wi,ei={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},dc=[...Object.values(ei),n.MEDIA_CURRENT_TIME,n.MEDIA_DURATION,n.MEDIA_SEEKABLE],uc=["Enter"," "],Qp="&nbsp;/&nbsp;",Xs=(t,{timesSep:e=Qp}={})=>{var i,a;let r=(i=t.mediaCurrentTime)!=null?i:0,[,o]=(a=t.mediaSeekable)!=null?a:[],s=0;Number.isFinite(t.mediaDuration)?s=t.mediaDuration:Number.isFinite(o)&&(s=o);let l=t.remaining?De(0-(s-r)):De(r);return t.showDuration?`${l}${e}${De(s)}`:l},Xp="video not loaded, unknown time.",Jp=t=>{var e;let i=t.mediaCurrentTime,[,a]=(e=t.mediaSeekable)!=null?e:[],r=null;if(Number.isFinite(t.mediaDuration)?r=t.mediaDuration:Number.isFinite(a)&&(r=a),i==null||r===null){t.setAttribute("aria-valuetext",Xp);return}let o=t.remaining?$t(0-(r-i)):$t(i);if(!t.showDuration){t.setAttribute("aria-valuetext",o);return}let s=$t(r),l=`${o} of ${s}`;t.setAttribute("aria-valuetext",l)};function jp(t,e){return`
1055
- <slot>${Xs(e)}</slot>
1056
- `}var Zo=class extends Ee{constructor(){super(),Zp(this,Wi,void 0),zp(this,Wi,this.shadowRoot.querySelector("slot")),Qs(this,Wi).innerHTML=`${Xs(this)}`}static get observedAttributes(){return[...super.observedAttributes,...dc,"disabled"]}connectedCallback(){let{style:e}=W(this.shadowRoot,":host(:hover:not([notoggle]))");e.setProperty("cursor","var(--media-cursor, pointer)"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))"),this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",m("playback time"));let i=a=>{let{key:r}=a;if(!uc.includes(r)){this.removeEventListener("keyup",i);return}this.toggleTimeDisplay()};this.addEventListener("keydown",a=>{let{metaKey:r,altKey:o,key:s}=a;if(r||o||!uc.includes(s)){this.removeEventListener("keyup",i);return}this.addEventListener("keyup",i)}),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,i,a){dc.includes(e)?this.update():e==="disabled"&&a!==i&&(a==null?this.enable():this.disable()),super.attributeChangedCallback(e,i,a)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return k(this,ei.REMAINING)}set remaining(e){S(this,ei.REMAINING,e)}get showDuration(){return k(this,ei.SHOW_DURATION)}set showDuration(e){S(this,ei.SHOW_DURATION,e)}get noToggle(){return k(this,ei.NO_TOGGLE)}set noToggle(e){S(this,ei.NO_TOGGLE,e)}get mediaDuration(){return R(this,n.MEDIA_DURATION)}set mediaDuration(e){O(this,n.MEDIA_DURATION,e)}get mediaCurrentTime(){return R(this,n.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){O(this,n.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(n.MEDIA_SEEKABLE);if(e)return e.split(":").map(i=>+i)}set mediaSeekable(e){if(e==null){this.removeAttribute(n.MEDIA_SEEKABLE);return}this.setAttribute(n.MEDIA_SEEKABLE,e.join(":"))}update(){let e=Xs(this);Jp(this),e!==Qs(this,Wi).innerHTML&&(Qs(this,Wi).innerHTML=e)}};Wi=new WeakMap;Zo.getSlotTemplateHTML=jp;d.customElements.get("media-time-display")||d.customElements.define("media-time-display",Zo);var mc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ae=(t,e,i)=>(mc(t,e,"read from private field"),i?i.call(t):e.get(t)),ze=(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)},Me=(t,e,i,a)=>(mc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),ef=(t,e,i,a)=>({set _(r){Me(t,e,r,i)},get _(){return ae(t,e,a)}}),Fi,zo,Vi,or,Qo,Xo,Jo,Ki,ti,jo,en=class{constructor(e,i,a){ze(this,Fi,void 0),ze(this,zo,void 0),ze(this,Vi,void 0),ze(this,or,void 0),ze(this,Qo,void 0),ze(this,Xo,void 0),ze(this,Jo,void 0),ze(this,Ki,void 0),ze(this,ti,0),ze(this,jo,(r=performance.now())=>{Me(this,ti,requestAnimationFrame(ae(this,jo))),Me(this,or,performance.now()-ae(this,Vi));let o=1e3/this.fps;if(ae(this,or)>o){Me(this,Vi,r-ae(this,or)%o);let s=1e3/((r-ae(this,zo))/++ef(this,Qo)._),l=(r-ae(this,Xo))/1e3/this.duration,u=ae(this,Jo)+l*this.playbackRate;u-ae(this,Fi).valueAsNumber>0?Me(this,Ki,this.playbackRate/this.duration/s):(Me(this,Ki,.995*ae(this,Ki)),u=ae(this,Fi).valueAsNumber+ae(this,Ki)),this.callback(u)}}),Me(this,Fi,e),this.callback=i,this.fps=a}start(){ae(this,ti)===0&&(Me(this,Vi,performance.now()),Me(this,zo,ae(this,Vi)),Me(this,Qo,0),ae(this,jo).call(this))}stop(){ae(this,ti)!==0&&(cancelAnimationFrame(ae(this,ti)),Me(this,ti,0))}update({start:e,duration:i,playbackRate:a}){let r=e-ae(this,Fi).valueAsNumber,o=Math.abs(i-this.duration);(r>0||r<-.03||o>=.5)&&this.callback(e),Me(this,Jo,e),Me(this,Xo,performance.now()),this.duration=i,this.playbackRate=a}};Fi=new WeakMap;zo=new WeakMap;Vi=new WeakMap;or=new WeakMap;Qo=new WeakMap;Xo=new WeakMap;Jo=new WeakMap;Ki=new WeakMap;ti=new WeakMap;jo=new WeakMap;var tl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ee=(t,e,i)=>(tl(t,e,"read from private field"),i?i.call(t):e.get(t)),re=(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)},Qe=(t,e,i,a)=>(tl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),le=(t,e,i)=>(tl(t,e,"access private method"),i),Gi,ii,rn,sr,on,an,lr,dr,Yi,qi,nr,il,hc,Js,nn,al,sn,rl,ln,ol,js,pc,ur,dn,el,fc,tf="video not loaded, unknown time.",af=t=>{let e=t.range,i=$t(+vc(t)),a=$t(+t.mediaSeekableEnd),r=i&&a?`${i} of ${a}`:tf;e.setAttribute("aria-valuetext",r)};function rf(t){return`
1057
- ${Ve.getTemplateHTML(t)}
1052
+ </svg>`;function Yp(t,e){return`
1053
+ <slot name="icon">${Gp(e.seekOffset)}</slot>
1054
+ `}function qp(){return h("Seek forward")}var Zp=0,or=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_CURRENT_TIME,$i.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=R(this,$i.SEEK_OFFSET,Qs)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===$i.SEEK_OFFSET&&(this.seekOffset=R(this,$i.SEEK_OFFSET,Qs))}get seekOffset(){return R(this,$i.SEEK_OFFSET,Qs)}set seekOffset(e){O(this,$i.SEEK_OFFSET,e),this.setAttribute("aria-label",h("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),Qr(Xr(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return R(this,n.MEDIA_CURRENT_TIME,Zp)}set mediaCurrentTime(e){O(this,n.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,i=new d.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}};or.getSlotTemplateHTML=Yp;or.getTooltipContentHTML=qp;d.customElements.get("media-seek-forward-button")||d.customElements.define("media-seek-forward-button",or);var mc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Xs=(t,e,i)=>(mc(t,e,"read from private field"),i?i.call(t):e.get(t)),zp=(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)},Qp=(t,e,i,a)=>(mc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Wi,ei={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},uc=[...Object.values(ei),n.MEDIA_CURRENT_TIME,n.MEDIA_DURATION,n.MEDIA_SEEKABLE],cc=["Enter"," "],Xp="&nbsp;/&nbsp;",Js=(t,{timesSep:e=Xp}={})=>{var i,a;let r=(i=t.mediaCurrentTime)!=null?i:0,[,o]=(a=t.mediaSeekable)!=null?a:[],s=0;Number.isFinite(t.mediaDuration)?s=t.mediaDuration:Number.isFinite(o)&&(s=o);let l=t.remaining?Oe(0-(s-r)):Oe(r);return t.showDuration?`${l}${e}${Oe(s)}`:l},Jp="video not loaded, unknown time.",jp=t=>{var e;let i=t.mediaCurrentTime,[,a]=(e=t.mediaSeekable)!=null?e:[],r=null;if(Number.isFinite(t.mediaDuration)?r=t.mediaDuration:Number.isFinite(a)&&(r=a),i==null||r===null){t.setAttribute("aria-valuetext",Jp);return}let o=t.remaining?$t(0-(r-i)):$t(i);if(!t.showDuration){t.setAttribute("aria-valuetext",o);return}let s=$t(r),l=`${o} of ${s}`;t.setAttribute("aria-valuetext",l)};function ef(t,e){return`
1055
+ <slot>${Js(e)}</slot>
1056
+ `}var zo=class extends be{constructor(){super(),zp(this,Wi,void 0),Qp(this,Wi,this.shadowRoot.querySelector("slot")),Xs(this,Wi).innerHTML=`${Js(this)}`}static get observedAttributes(){return[...super.observedAttributes,...uc,"disabled"]}connectedCallback(){let{style:e}=W(this.shadowRoot,":host(:hover:not([notoggle]))");e.setProperty("cursor","var(--media-cursor, pointer)"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))"),this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",h("playback time"));let i=a=>{let{key:r}=a;if(!cc.includes(r)){this.removeEventListener("keyup",i);return}this.toggleTimeDisplay()};this.addEventListener("keydown",a=>{let{metaKey:r,altKey:o,key:s}=a;if(r||o||!cc.includes(s)){this.removeEventListener("keyup",i);return}this.addEventListener("keyup",i)}),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,i,a){uc.includes(e)?this.update():e==="disabled"&&a!==i&&(a==null?this.enable():this.disable()),super.attributeChangedCallback(e,i,a)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return k(this,ei.REMAINING)}set remaining(e){S(this,ei.REMAINING,e)}get showDuration(){return k(this,ei.SHOW_DURATION)}set showDuration(e){S(this,ei.SHOW_DURATION,e)}get noToggle(){return k(this,ei.NO_TOGGLE)}set noToggle(e){S(this,ei.NO_TOGGLE,e)}get mediaDuration(){return R(this,n.MEDIA_DURATION)}set mediaDuration(e){O(this,n.MEDIA_DURATION,e)}get mediaCurrentTime(){return R(this,n.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){O(this,n.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(n.MEDIA_SEEKABLE);if(e)return e.split(":").map(i=>+i)}set mediaSeekable(e){if(e==null){this.removeAttribute(n.MEDIA_SEEKABLE);return}this.setAttribute(n.MEDIA_SEEKABLE,e.join(":"))}update(){let e=Js(this);jp(this),e!==Xs(this,Wi).innerHTML&&(Xs(this,Wi).innerHTML=e)}};Wi=new WeakMap;zo.getSlotTemplateHTML=ef;d.customElements.get("media-time-display")||d.customElements.define("media-time-display",zo);var hc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},re=(t,e,i)=>(hc(t,e,"read from private field"),i?i.call(t):e.get(t)),Qe=(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)},Me=(t,e,i,a)=>(hc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),tf=(t,e,i,a)=>({set _(r){Me(t,e,r,i)},get _(){return re(t,e,a)}}),Fi,Qo,Vi,nr,Xo,Jo,jo,Ki,ti,en,tn=class{constructor(e,i,a){Qe(this,Fi,void 0),Qe(this,Qo,void 0),Qe(this,Vi,void 0),Qe(this,nr,void 0),Qe(this,Xo,void 0),Qe(this,Jo,void 0),Qe(this,jo,void 0),Qe(this,Ki,void 0),Qe(this,ti,0),Qe(this,en,(r=performance.now())=>{Me(this,ti,requestAnimationFrame(re(this,en))),Me(this,nr,performance.now()-re(this,Vi));let o=1e3/this.fps;if(re(this,nr)>o){Me(this,Vi,r-re(this,nr)%o);let s=1e3/((r-re(this,Qo))/++tf(this,Xo)._),l=(r-re(this,Jo))/1e3/this.duration,u=re(this,jo)+l*this.playbackRate;u-re(this,Fi).valueAsNumber>0?Me(this,Ki,this.playbackRate/this.duration/s):(Me(this,Ki,.995*re(this,Ki)),u=re(this,Fi).valueAsNumber+re(this,Ki)),this.callback(u)}}),Me(this,Fi,e),this.callback=i,this.fps=a}start(){re(this,ti)===0&&(Me(this,Vi,performance.now()),Me(this,Qo,re(this,Vi)),Me(this,Xo,0),re(this,en).call(this))}stop(){re(this,ti)!==0&&(cancelAnimationFrame(re(this,ti)),Me(this,ti,0))}update({start:e,duration:i,playbackRate:a}){let r=e-re(this,Fi).valueAsNumber,o=Math.abs(i-this.duration);(r>0||r<-.03||o>=.5)&&this.callback(e),Me(this,jo,e),Me(this,Jo,performance.now()),this.duration=i,this.playbackRate=a}};Fi=new WeakMap;Qo=new WeakMap;Vi=new WeakMap;nr=new WeakMap;Xo=new WeakMap;Jo=new WeakMap;jo=new WeakMap;Ki=new WeakMap;ti=new WeakMap;en=new WeakMap;var il=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},J=(t,e,i)=>(il(t,e,"read from private field"),i?i.call(t):e.get(t)),te=(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)},we=(t,e,i,a)=>(il(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),le=(t,e,i)=>(il(t,e,"access private method"),i),Gi,ii,on,lr,nn,rn,dr,ur,Yi,qi,Zi,sr,al,pc,js,sn,rl,ln,ol,dn,nl,el,fc,cr,un,tl,vc,af="video not loaded, unknown time.",rf=t=>{let e=t.range,i=$t(+bc(t)),a=$t(+t.mediaSeekableEnd),r=i&&a?`${i} of ${a}`:af;e.setAttribute("aria-valuetext",r)};function of(t){return`
1057
+ ${Ke.getTemplateHTML(t)}
1058
1058
  <style>
1059
1059
  :host {
1060
1060
  --media-box-border-radius: 4px;
@@ -1257,8 +1257,8 @@
1257
1257
  <div id="preview-rail">
1258
1258
  <slot name="preview" part="box preview-box">
1259
1259
  <media-preview-thumbnail>
1260
- <template shadowrootmode="${qo.shadowRootOptions.mode}">
1261
- ${qo.getTemplateHTML({})}
1260
+ <template shadowrootmode="${Zo.shadowRootOptions.mode}">
1261
+ ${Zo.getTemplateHTML({})}
1262
1262
  </template>
1263
1263
  </media-preview-thumbnail>
1264
1264
  <media-preview-chapter-display></media-preview-chapter-display>
@@ -1271,8 +1271,8 @@
1271
1271
 
1272
1272
  </slot>
1273
1273
  </div>
1274
- `}var tn=(t,e=t.mediaCurrentTime)=>{let i=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,a=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;if(Number.isNaN(a))return 0;let r=(e-i)/(a-i);return Math.max(0,Math.min(r,1))},vc=(t,e=t.range.valueAsNumber)=>{let i=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,a=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;return Number.isNaN(a)?0:e*(a-i)+i},cr=class extends Ve{constructor(){super(),re(this,qi),re(this,il),re(this,nn),re(this,sn),re(this,ln),re(this,js),re(this,ur),re(this,el),re(this,Gi,void 0),re(this,ii,void 0),re(this,rn,void 0),re(this,sr,void 0),re(this,on,void 0),re(this,an,void 0),re(this,lr,void 0),re(this,dr,void 0),re(this,Yi,void 0),re(this,Js,a=>{this.dragging||(Ai(a)&&(this.range.valueAsNumber=a),this.updateBar())}),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),Qe(this,rn,this.shadowRoot.querySelectorAll('[part~="box"]')),Qe(this,on,this.shadowRoot.querySelector('[part~="preview-box"]')),Qe(this,an,this.shadowRoot.querySelector('[part~="current-box"]'));let i=getComputedStyle(this);Qe(this,lr,parseInt(i.getPropertyValue("--media-box-padding-left"))),Qe(this,dr,parseInt(i.getPropertyValue("--media-box-padding-right"))),Qe(this,ii,new en(this.range,ee(this,Js),60))}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PAUSED,n.MEDIA_DURATION,n.MEDIA_SEEKABLE,n.MEDIA_CURRENT_TIME,n.MEDIA_PREVIEW_IMAGE,n.MEDIA_PREVIEW_TIME,n.MEDIA_PREVIEW_CHAPTER,n.MEDIA_BUFFERED,n.MEDIA_PLAYBACK_RATE,n.MEDIA_LOADING,n.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",m("seek")),le(this,qi,nr).call(this),Qe(this,Gi,this.getRootNode()),(e=ee(this,Gi))==null||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),le(this,qi,nr).call(this),(e=ee(this,Gi))==null||e.removeEventListener("transitionstart",this),Qe(this,Gi,null)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),i!=a&&(e===n.MEDIA_CURRENT_TIME||e===n.MEDIA_PAUSED||e===n.MEDIA_ENDED||e===n.MEDIA_LOADING||e===n.MEDIA_DURATION||e===n.MEDIA_SEEKABLE?(ee(this,ii).update({start:tn(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),le(this,qi,nr).call(this),af(this)):e===n.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===n.MEDIA_DURATION||e===n.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=ee(this,Yi),this.updateBar()))}get mediaChaptersCues(){return ee(this,Yi)}set mediaChaptersCues(e){var i;Qe(this,Yi,e),this.updateSegments((i=ee(this,Yi))==null?void 0:i.map(a=>({start:tn(this,a.startTime),end:tn(this,a.endTime)})))}get mediaPaused(){return k(this,n.MEDIA_PAUSED)}set mediaPaused(e){S(this,n.MEDIA_PAUSED,e)}get mediaLoading(){return k(this,n.MEDIA_LOADING)}set mediaLoading(e){S(this,n.MEDIA_LOADING,e)}get mediaDuration(){return R(this,n.MEDIA_DURATION)}set mediaDuration(e){O(this,n.MEDIA_DURATION,e)}get mediaCurrentTime(){return R(this,n.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){O(this,n.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return R(this,n.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){O(this,n.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(n.MEDIA_BUFFERED);return e?e.split(" ").map(i=>i.split(":").map(a=>+a)):[]}set mediaBuffered(e){if(!e){this.removeAttribute(n.MEDIA_BUFFERED);return}let i=e.map(a=>a.join(":")).join(" ");this.setAttribute(n.MEDIA_BUFFERED,i)}get mediaSeekable(){let e=this.getAttribute(n.MEDIA_SEEKABLE);if(e)return e.split(":").map(i=>+i)}set mediaSeekable(e){if(e==null){this.removeAttribute(n.MEDIA_SEEKABLE);return}this.setAttribute(n.MEDIA_SEEKABLE,e.join(":"))}get mediaSeekableEnd(){var e;let[,i=this.mediaDuration]=(e=this.mediaSeekable)!=null?e:[];return i}get mediaSeekableStart(){var e;let[i=0]=(e=this.mediaSeekable)!=null?e:[];return i}get mediaPreviewImage(){return I(this,n.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){M(this,n.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return R(this,n.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){O(this,n.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return k(this,n.MEDIA_ENDED)}set mediaEnded(e){S(this,n.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;let i=this.mediaBuffered;if(!i.length)return;let a;if(this.mediaEnded)a=1;else{let o=this.mediaCurrentTime,[,s=this.mediaSeekableStart]=(e=i.find(([l,u])=>l<=o&&o<=u))!=null?e:[];a=tn(this,s)}let{style:r}=W(this.shadowRoot,"#buffered");r.setProperty("width",`${a*100}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;let i=W(this.shadowRoot,"#current-rail"),a=W(this.shadowRoot,'[part~="current-box"]'),r=le(this,nn,al).call(this,ee(this,an)),o=le(this,sn,rl).call(this,r,this.range.valueAsNumber),s=le(this,ln,ol).call(this,r,this.range.valueAsNumber);i.style.transform=`translateX(${o})`,i.style.setProperty("--_range-width",`${r.range.width}`),a.style.setProperty("--_box-shift",`${s}`),a.style.setProperty("--_box-width",`${r.box.width}px`),a.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":le(this,el,fc).call(this);break;case"pointermove":le(this,js,pc).call(this,e);break;case"pointerup":case"pointerleave":le(this,ur,dn).call(this,null);break;case"transitionstart":de(e.target,this)&&setTimeout(()=>le(this,qi,nr).call(this),0);break}}};Gi=new WeakMap;ii=new WeakMap;rn=new WeakMap;sr=new WeakMap;on=new WeakMap;an=new WeakMap;lr=new WeakMap;dr=new WeakMap;Yi=new WeakMap;qi=new WeakSet;nr=function(){le(this,il,hc).call(this)?ee(this,ii).start():ee(this,ii).stop()};il=new WeakSet;hc=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&Xr(this)};Js=new WeakMap;nn=new WeakSet;al=function(t){var e;let a=((e=this.getAttribute("bounds")?Be(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?e:this).getBoundingClientRect(),r=this.range.getBoundingClientRect(),o=t.offsetWidth,s=-(r.left-a.left-o/2),l=a.right-r.left-o/2;return{box:{width:o,min:s,max:l},bounds:a,range:r}};sn=new WeakSet;rl=function(t,e){let i=`${e*100}%`,{width:a,min:r,max:o}=t.box;if(!a)return i;if(Number.isNaN(r)||(i=`max(${`calc(1 / var(--_range-width) * 100 * ${r}% + var(--media-box-padding-left))`}, ${i})`),!Number.isNaN(o)){let l=`calc(1 / var(--_range-width) * 100 * ${o}% - var(--media-box-padding-right))`;i=`min(${i}, ${l})`}return i};ln=new WeakSet;ol=function(t,e){let{width:i,min:a,max:r}=t.box,o=e*t.range.width;if(o<a+ee(this,lr)){let s=t.range.left-t.bounds.left-ee(this,lr);return`${o-i/2+s}px`}if(o>r-ee(this,dr)){let s=t.bounds.right-t.range.right-ee(this,dr);return`${o+i/2-s-t.range.width}px`}return 0};js=new WeakSet;pc=function(t){let e=[...ee(this,rn)].some(_=>t.composedPath().includes(_));if(!this.dragging&&(e||!t.composedPath().includes(this))){le(this,ur,dn).call(this,null);return}let i=this.mediaSeekableEnd;if(!i)return;let a=W(this.shadowRoot,"#preview-rail"),r=W(this.shadowRoot,'[part~="preview-box"]'),o=le(this,nn,al).call(this,ee(this,on)),s=(t.clientX-o.range.left)/o.range.width;s=Math.max(0,Math.min(1,s));let l=le(this,sn,rl).call(this,o,s),u=le(this,ln,ol).call(this,o,s);a.style.transform=`translateX(${l})`,a.style.setProperty("--_range-width",`${o.range.width}`),r.style.setProperty("--_box-shift",`${u}`),r.style.setProperty("--_box-width",`${o.box.width}px`);let h=Math.round(ee(this,sr))-Math.round(s*i);Math.abs(h)<1&&s>.01&&s<.99||(Qe(this,sr,s*i),le(this,ur,dn).call(this,ee(this,sr)))};ur=new WeakSet;dn=function(t){this.dispatchEvent(new d.CustomEvent(p.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:t}))};el=new WeakSet;fc=function(){ee(this,ii).stop();let t=vc(this);this.dispatchEvent(new d.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:t}))};cr.shadowRootOptions={mode:"open"};cr.getTemplateHTML=rf;d.customElements.get("media-time-range")||d.customElements.define("media-time-range",cr);var of=1,nf=t=>t.mediaMuted?0:t.mediaVolume,sf=t=>`${Math.round(t*100)}%`,nl=class extends Ve{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_VOLUME,n.MEDIA_MUTED,n.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",m("volume"))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),(e===n.MEDIA_VOLUME||e===n.MEDIA_MUTED)&&(this.range.valueAsNumber=nf(this),this.range.setAttribute("aria-valuetext",sf(this.range.valueAsNumber)),this.updateBar())}get mediaVolume(){return R(this,n.MEDIA_VOLUME,of)}set mediaVolume(e){O(this,n.MEDIA_VOLUME,e)}get mediaMuted(){return k(this,n.MEDIA_MUTED)}set mediaMuted(e){S(this,n.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return I(this,n.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){M(this,n.MEDIA_VOLUME_UNAVAILABLE,e)}};d.customElements.get("media-volume-range")||d.customElements.define("media-volume-range",nl);var b=require("@mux/mux-video/base"),w=require("@mux/playback-core");var Tc=require("@mux/playback-core");var oi=require("@mux/playback-core");function Ec(t){let e="";return Object.entries(t).forEach(([i,a])=>{a!=null&&(e+=`${un(i)}: ${a}; `)}),e?e.trim():void 0}function un(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function cn(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function ue(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function sl(t){let e=lf(t).toString();return e?"?"+e:""}function lf(t){let e={};for(let i in t)t[i]!=null&&(e[i]=t[i]);return new URLSearchParams(e)}var ll=(t,e)=>!t||!e?!1:t.contains(e)?!0:ll(t,e.getRootNode().host);var bc="mux.com",df=()=>{try{return"3.6.0"}catch{}return"UNKNOWN"},uf=df(),hn=()=>uf,gc=(t,{token:e,customDomain:i=bc,thumbnailTime:a,programTime:r}={})=>{var l;let o=e==null?a:void 0,{aud:s}=(l=(0,oi.parseJwt)(e))!=null?l:{};if(!(e&&s!=="t"))return`https://image.${i}/${t}/thumbnail.webp${sl({token:e,time:o,program_time:r})}`},_c=(t,{token:e,customDomain:i=bc,programStartTime:a,programEndTime:r}={})=>{var s;let{aud:o}=(s=(0,oi.parseJwt)(e))!=null?s:{};if(!(e&&o!=="s"))return`https://image.${i}/${t}/storyboard.vtt${sl({token:e,format:"webp",program_start_time:a,program_end_time:r})}`},mr=t=>{if(t){if([oi.StreamTypes.LIVE,oi.StreamTypes.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return oi.StreamTypes.LIVE}};var cf={crossorigin:"crossOrigin",playsinline:"playsInline"};function Ac(t){var e;return(e=cf[t])!=null?e:cn(t)}var ai,ri,ce,mn=class{constructor(e,i){he(this,ai);he(this,ri);he(this,ce,[]);ye(this,ai,e),ye(this,ri,i)}[Symbol.iterator](){return U(this,ce).values()}get length(){return U(this,ce).length}get value(){var e;return(e=U(this,ce).join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(ye(this,ce,[]),this.add(...(i=e==null?void 0:e.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return U(this,ce)[e]}values(){return U(this,ce).values()}keys(){return U(this,ce).keys()}forEach(e){U(this,ce).forEach(e)}add(...e){var i,a;e.forEach(r=>{this.contains(r)||U(this,ce).push(r)}),!(this.value===""&&!((i=U(this,ai))!=null&&i.hasAttribute(`${U(this,ri)}`)))&&((a=U(this,ai))==null||a.setAttribute(`${U(this,ri)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>{U(this,ce).splice(U(this,ce).indexOf(a),1)}),(i=U(this,ai))==null||i.setAttribute(`${U(this,ri)}`,`${this.value}`)}contains(e){return U(this,ce).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)}};ai=new WeakMap,ri=new WeakMap,ce=new WeakMap;var yc=`[mux-player ${hn()}]`;function Xe(...t){console.warn(yc,...t)}function be(...t){console.error(yc,...t)}function dl(t){var i;let e=(i=t.message)!=null?i:"";t.context&&(e+=` ${t.context}`),t.file&&(e+=` ${(0,Tc.i18n)("Read more: ")}
1275
- https://github.com/muxinc/elements/blob/main/errors/${t.file}`),Xe(e)}var se={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},wt={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},j1={...se,...wt},Sc=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}}),mf=Object.values(se).filter(t=>se.PLAYSINLINE!==t),hf=Object.values(wt),pf=[...mf,...hf],ul=class extends ke.HTMLElement{static get observedAttributes(){return pf}constructor(){super()}attributeChangedCallback(e,i,a){var r,o;switch(e){case wt.MUTED:{this.media&&(this.media.muted=a!=null,this.media.defaultMuted=a!=null);return}case wt.VOLUME:{let s=(r=ue(a))!=null?r:1;this.media&&(this.media.volume=s);return}case wt.PLAYBACKRATE:{let s=(o=ue(a))!=null?o: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()}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:Sc}get seekable(){var e,i;return(i=(e=this.media)==null?void 0:e.seekable)!=null?i:Sc}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=ue(this.getAttribute(wt.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(wt.PLAYBACKRATE,`${e}`):this.removeAttribute(wt.PLAYBACKRATE)}get crossOrigin(){return hr(this,se.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(se.CROSSORIGIN,`${e}`)}get autoplay(){return hr(this,se.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(se.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(se.AUTOPLAY)}get loop(){return hr(this,se.LOOP)!=null}set loop(e){e?this.setAttribute(se.LOOP,""):this.removeAttribute(se.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 hr(this,se.MUTED)!=null}set defaultMuted(e){e?this.setAttribute(se.MUTED,""):this.removeAttribute(se.MUTED)}get playsInline(){return hr(this,se.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(se.PRELOAD,e):this.removeAttribute(se.PRELOAD)}};function hr(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var cl=ul;var wc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},D=(t,e,i)=>(wc(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)},ht=(t,e,i,a)=>(wc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Zi,pn,ni,pr,Rt,xt,Dt,si,zi,fn,Pe,Ic=1,Mc=0,ff=1,vf={processCallback(t,e,i){if(i){for(let[a,r]of e)if(a in i){let o=i[a];typeof o=="boolean"&&r instanceof me&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=o:typeof o=="function"&&r instanceof me?r.element[r.attributeName]=o:r.value=o}}}},pt=class extends d.DocumentFragment{constructor(e,i,a=vf){var r;super(),Je(this,Zi,void 0),Je(this,pn,void 0),this.append(e.content.cloneNode(!0)),ht(this,Zi,Rc(this)),ht(this,pn,a),(r=a.createCallback)==null||r.call(a,this,D(this,Zi),i),a.processCallback(this,D(this,Zi),i)}update(e){D(this,pn).processCallback(this,D(this,Zi),e)}};Zi=new WeakMap;pn=new WeakMap;var Rc=(t,e=[])=>{let i,a;for(let r of t.attributes||[])if(r.value.includes("{{")){let o=new ml;for([i,a]of Lc(r.value))if(!i)o.append(a);else{let s=new me(t,r.name,r.namespaceURI);o.append(s),e.push([a,s])}r.value=o.toString()}for(let r of t.childNodes)if(r.nodeType===Ic&&!(r instanceof HTMLTemplateElement))Rc(r,e);else{let o=r.data;if(r.nodeType===Ic||o.includes("{{")){let s=[];if(o)for([i,a]of Lc(o))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 fr(t,r);s.push(l),e.push([l.expression,l])}r.replaceWith(...s.flatMap(l=>l.replacementNodes||[l]))}}return e},Cc={},Lc=t=>{let e="",i=0,a=Cc[t],r=0,o;if(a)return a;for(a=[];o=t[r];r++)o==="{"&&t[r+1]==="{"&&t[r-1]!=="\\"&&t[r+2]&&++i==1?(e&&a.push([Mc,e]),e="",r++):o==="}"&&t[r+1]==="}"&&t[r-1]!=="\\"&&!--i?(a.push([ff,e.trim()]),e="",r++):e+=o||"";return e&&a.push([Mc,(i>0?"{{":"")+e]),Cc[t]=a},Ef=11,vn=class{get value(){return""}set value(e){}toString(){return this.value}},xc=new WeakMap,ml=class{constructor(){Je(this,ni,[])}[Symbol.iterator](){return D(this,ni).values()}get length(){return D(this,ni).length}item(e){return D(this,ni)[e]}append(...e){for(let i of e)i instanceof me&&xc.set(i,this),D(this,ni).push(i)}toString(){return D(this,ni).join("")}};ni=new WeakMap;var me=class extends vn{constructor(e,i,a){super(),Je(this,si),Je(this,pr,""),Je(this,Rt,void 0),Je(this,xt,void 0),Je(this,Dt,void 0),ht(this,Rt,e),ht(this,xt,i),ht(this,Dt,a)}get attributeName(){return D(this,xt)}get attributeNamespace(){return D(this,Dt)}get element(){return D(this,Rt)}get value(){return D(this,pr)}set value(e){D(this,pr)!==e&&(ht(this,pr,e),!D(this,si,zi)||D(this,si,zi).length===1?e==null?D(this,Rt).removeAttributeNS(D(this,Dt),D(this,xt)):D(this,Rt).setAttributeNS(D(this,Dt),D(this,xt),e):D(this,Rt).setAttributeNS(D(this,Dt),D(this,xt),D(this,si,zi).toString()))}get booleanValue(){return D(this,Rt).hasAttributeNS(D(this,Dt),D(this,xt))}set booleanValue(e){if(!D(this,si,zi)||D(this,si,zi).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};pr=new WeakMap;Rt=new WeakMap;xt=new WeakMap;Dt=new WeakMap;si=new WeakSet;zi=function(){return xc.get(this)};var ft=class extends vn{constructor(e,i){super(),Je(this,fn,void 0),Je(this,Pe,void 0),ht(this,fn,e),ht(this,Pe,i?[...i]:[new Text])}get replacementNodes(){return D(this,Pe)}get parentNode(){return D(this,fn)}get nextSibling(){return D(this,Pe)[D(this,Pe).length-1].nextSibling}get previousSibling(){return D(this,Pe)[0].previousSibling}get value(){return D(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===Ef?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);i.length||i.push(new Text),ht(this,Pe,bf(D(this,Pe)[0].parentNode,D(this,Pe),i,this.nextSibling))}};fn=new WeakMap;Pe=new WeakMap;var fr=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 bf(t,e,i,a=null){let r=0,o,s,l,u=i.length,h=e.length;for(;r<u&&r<h&&e[r]==i[r];)r++;for(;r<u&&r<h&&i[u-1]==e[h-1];)a=i[--h,--u];if(r==h)for(;r<u;)t.insertBefore(i[r++],a);if(r==u)for(;r<h;)t.removeChild(e[r++]);else{for(o=e[r];r<u;)l=i[r++],s=o?o.nextSibling:a,o==l?o=s:r<u&&i[r]==s?(t.replaceChild(l,o),o=s):t.insertBefore(l,o);for(;o!=a;)s=o.nextSibling,t.removeChild(o),o=s}return i}var Dc={string:t=>String(t)},bn=class{constructor(e){this.template=e,this.state=void 0}},li=new WeakMap,di=new WeakMap,hl={partial:(t,e)=>{e[t.expression]=new bn(t.template)},if:(t,e)=>{var i;if(Nc(t.expression,e))if(li.get(t)!==t.template){li.set(t,t.template);let a=new pt(t.template,e,gn);t.replace(a),di.set(t,a)}else(i=di.get(t))==null||i.update(e);else t.replace(""),li.delete(t),di.delete(t)}},gf=Object.keys(hl),gn={processCallback(t,e,i){var a,r;if(i)for(let[o,s]of e){if(s instanceof fr){if(!s.directive){let u=gf.find(h=>s.template.hasAttribute(h));u&&(s.directive=u,s.expression=s.template.getAttribute(u))}(a=hl[s.directive])==null||a.call(hl,s,i);continue}let l=Nc(o,i);if(l instanceof bn){li.get(s)!==l.template?(li.set(s,l.template),l=new pt(l.template,l.state,gn),s.value=l,di.set(s,l)):(r=di.get(s))==null||r.update(l.state);continue}l?(s instanceof me&&s.attributeName.startsWith("aria-")&&(l=String(l)),s instanceof me?typeof l=="boolean"?s.booleanValue=l:typeof l=="function"?s.element[s.attributeName]=l:s.value=l:(s.value=l,li.delete(s),di.delete(s))):s instanceof me?s.value=void 0:(s.value=void 0,li.delete(s),di.delete(s))}}},Oc={"!":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=Dc[e])==null?void 0:i.call(Dc,t)}};function _f(t){return Af(t,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function Nc(t,e={}){var i,a,r,o,s,l,u;let h=_f(t);if(h.length===0||h.some(({type:_})=>!_))return vr(t);if(((i=h[0])==null?void 0:i.token)===">"){let _=e[(a=h[1])==null?void 0:a.token];if(!_)return vr(t);let g={...e};_.state=g;let f=h.slice(2);for(let v=0;v<f.length;v+=3){let N=(r=f[v])==null?void 0:r.token,T=(o=f[v+1])==null?void 0:o.token,C=(s=f[v+2])==null?void 0:s.token;N&&T==="="&&(g[N]=Er(C,e))}return _}if(h.length===1)return En(h[0])?Er(h[0].token,e):vr(t);if(h.length===2){let _=(l=h[0])==null?void 0:l.token,g=Oc[_];if(!g||!En(h[1]))return vr(t);let f=Er(h[1].token,e);return g(f)}if(h.length===3){let _=(u=h[1])==null?void 0:u.token,g=Oc[_];if(!g||!En(h[0])||!En(h[2]))return vr(t);let f=Er(h[0].token,e);if(_==="|")return g(f,h[2].token);let v=Er(h[2].token,e);return g(f,v)}}function vr(t){return console.warn(`Warning: invalid expression \`${t}\``),!1}function En({type:t}){return["number","boolean","string","param"].includes(t)}function Er(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):Vr(t)?parseFloat(t):e[t]}function Af(t,e){let i,a,r,o=[];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&&o.push({token:t.substr(0,i),type:void 0}),r&&o.push(r),t=t.substr(i+(r?r.token.length:0))}return o}var gl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},vl=(t,e,i)=>(gl(t,e,"read from private field"),i?i.call(t):e.get(t)),br=(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)},ui=(t,e,i,a)=>(gl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),pl=(t,e,i)=>(gl(t,e,"access private method"),i),Qi,_n,Xi,El,Pc,An,bl,fl={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},Uc=Y.createElement("template");Uc.innerHTML=`
1274
+ `}var an=(t,e=t.mediaCurrentTime)=>{let i=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,a=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;if(Number.isNaN(a))return 0;let r=(e-i)/(a-i);return Math.max(0,Math.min(r,1))},bc=(t,e=t.range.valueAsNumber)=>{let i=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,a=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;return Number.isNaN(a)?0:e*(a-i)+i},mr=class extends Ke{constructor(){super(),te(this,Zi),te(this,al),te(this,sn),te(this,ln),te(this,dn),te(this,el),te(this,cr),te(this,tl),te(this,Gi,void 0),te(this,ii,void 0),te(this,on,void 0),te(this,lr,void 0),te(this,nn,void 0),te(this,rn,void 0),te(this,dr,void 0),te(this,ur,void 0),te(this,Yi,void 0),te(this,qi,void 0),te(this,js,a=>{this.dragging||(Ai(a)&&(this.range.valueAsNumber=a),J(this,qi)||this.updateBar())}),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),we(this,on,this.shadowRoot.querySelectorAll('[part~="box"]')),we(this,nn,this.shadowRoot.querySelector('[part~="preview-box"]')),we(this,rn,this.shadowRoot.querySelector('[part~="current-box"]'));let i=getComputedStyle(this);we(this,dr,parseInt(i.getPropertyValue("--media-box-padding-left"))),we(this,ur,parseInt(i.getPropertyValue("--media-box-padding-right"))),we(this,ii,new tn(this.range,J(this,js),60))}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PAUSED,n.MEDIA_DURATION,n.MEDIA_SEEKABLE,n.MEDIA_CURRENT_TIME,n.MEDIA_PREVIEW_IMAGE,n.MEDIA_PREVIEW_TIME,n.MEDIA_PREVIEW_CHAPTER,n.MEDIA_BUFFERED,n.MEDIA_PLAYBACK_RATE,n.MEDIA_LOADING,n.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",h("seek")),le(this,Zi,sr).call(this),we(this,Gi,this.getRootNode()),(e=J(this,Gi))==null||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),le(this,Zi,sr).call(this),(e=J(this,Gi))==null||e.removeEventListener("transitionstart",this),we(this,Gi,null)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),i!=a&&(e===n.MEDIA_CURRENT_TIME||e===n.MEDIA_PAUSED||e===n.MEDIA_ENDED||e===n.MEDIA_LOADING||e===n.MEDIA_DURATION||e===n.MEDIA_SEEKABLE?(J(this,ii).update({start:an(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),le(this,Zi,sr).call(this),rf(this)):e===n.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===n.MEDIA_DURATION||e===n.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=J(this,Yi),this.updateBar()))}get mediaChaptersCues(){return J(this,Yi)}set mediaChaptersCues(e){var i;we(this,Yi,e),this.updateSegments((i=J(this,Yi))==null?void 0:i.map(a=>({start:an(this,a.startTime),end:an(this,a.endTime)})))}get mediaPaused(){return k(this,n.MEDIA_PAUSED)}set mediaPaused(e){S(this,n.MEDIA_PAUSED,e)}get mediaLoading(){return k(this,n.MEDIA_LOADING)}set mediaLoading(e){S(this,n.MEDIA_LOADING,e)}get mediaDuration(){return R(this,n.MEDIA_DURATION)}set mediaDuration(e){O(this,n.MEDIA_DURATION,e)}get mediaCurrentTime(){return R(this,n.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){O(this,n.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return R(this,n.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){O(this,n.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(n.MEDIA_BUFFERED);return e?e.split(" ").map(i=>i.split(":").map(a=>+a)):[]}set mediaBuffered(e){if(!e){this.removeAttribute(n.MEDIA_BUFFERED);return}let i=e.map(a=>a.join(":")).join(" ");this.setAttribute(n.MEDIA_BUFFERED,i)}get mediaSeekable(){let e=this.getAttribute(n.MEDIA_SEEKABLE);if(e)return e.split(":").map(i=>+i)}set mediaSeekable(e){if(e==null){this.removeAttribute(n.MEDIA_SEEKABLE);return}this.setAttribute(n.MEDIA_SEEKABLE,e.join(":"))}get mediaSeekableEnd(){var e;let[,i=this.mediaDuration]=(e=this.mediaSeekable)!=null?e:[];return i}get mediaSeekableStart(){var e;let[i=0]=(e=this.mediaSeekable)!=null?e:[];return i}get mediaPreviewImage(){return I(this,n.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){M(this,n.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return R(this,n.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){O(this,n.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return k(this,n.MEDIA_ENDED)}set mediaEnded(e){S(this,n.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;let i=this.mediaBuffered;if(!i.length)return;let a;if(this.mediaEnded)a=1;else{let o=this.mediaCurrentTime,[,s=this.mediaSeekableStart]=(e=i.find(([l,u])=>l<=o&&o<=u))!=null?e:[];a=an(this,s)}let{style:r}=W(this.shadowRoot,"#buffered");r.setProperty("width",`${a*100}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;let i=W(this.shadowRoot,"#current-rail"),a=W(this.shadowRoot,'[part~="current-box"]'),r=le(this,sn,rl).call(this,J(this,rn)),o=le(this,ln,ol).call(this,r,this.range.valueAsNumber),s=le(this,dn,nl).call(this,r,this.range.valueAsNumber);i.style.transform=`translateX(${o})`,i.style.setProperty("--_range-width",`${r.range.width}`),a.style.setProperty("--_box-shift",`${s}`),a.style.setProperty("--_box-width",`${r.box.width}px`),a.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":le(this,tl,vc).call(this);break;case"pointermove":le(this,el,fc).call(this,e);break;case"pointerup":J(this,qi)&&we(this,qi,!1);break;case"pointerdown":we(this,qi,!0);break;case"pointerleave":le(this,cr,un).call(this,null);break;case"transitionstart":de(e.target,this)&&setTimeout(()=>le(this,Zi,sr).call(this),0);break}}};Gi=new WeakMap;ii=new WeakMap;on=new WeakMap;lr=new WeakMap;nn=new WeakMap;rn=new WeakMap;dr=new WeakMap;ur=new WeakMap;Yi=new WeakMap;qi=new WeakMap;Zi=new WeakSet;sr=function(){le(this,al,pc).call(this)?J(this,ii).start():J(this,ii).stop()};al=new WeakSet;pc=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&Jr(this)};js=new WeakMap;sn=new WeakSet;rl=function(t){var e;let a=((e=this.getAttribute("bounds")?$e(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?e:this).getBoundingClientRect(),r=this.range.getBoundingClientRect(),o=t.offsetWidth,s=-(r.left-a.left-o/2),l=a.right-r.left-o/2;return{box:{width:o,min:s,max:l},bounds:a,range:r}};ln=new WeakSet;ol=function(t,e){let i=`${e*100}%`,{width:a,min:r,max:o}=t.box;if(!a)return i;if(Number.isNaN(r)||(i=`max(${`calc(1 / var(--_range-width) * 100 * ${r}% + var(--media-box-padding-left))`}, ${i})`),!Number.isNaN(o)){let l=`calc(1 / var(--_range-width) * 100 * ${o}% - var(--media-box-padding-right))`;i=`min(${i}, ${l})`}return i};dn=new WeakSet;nl=function(t,e){let{width:i,min:a,max:r}=t.box,o=e*t.range.width;if(o<a+J(this,dr)){let s=t.range.left-t.bounds.left-J(this,dr);return`${o-i/2+s}px`}if(o>r-J(this,ur)){let s=t.bounds.right-t.range.right-J(this,ur);return`${o+i/2-s-t.range.width}px`}return 0};el=new WeakSet;fc=function(t){let e=[...J(this,on)].some(_=>t.composedPath().includes(_));if(!this.dragging&&(e||!t.composedPath().includes(this))){le(this,cr,un).call(this,null);return}let i=this.mediaSeekableEnd;if(!i)return;let a=W(this.shadowRoot,"#preview-rail"),r=W(this.shadowRoot,'[part~="preview-box"]'),o=le(this,sn,rl).call(this,J(this,nn)),s=(t.clientX-o.range.left)/o.range.width;s=Math.max(0,Math.min(1,s));let l=le(this,ln,ol).call(this,o,s),u=le(this,dn,nl).call(this,o,s);a.style.transform=`translateX(${l})`,a.style.setProperty("--_range-width",`${o.range.width}`),r.style.setProperty("--_box-shift",`${u}`),r.style.setProperty("--_box-width",`${o.box.width}px`);let m=Math.round(J(this,lr))-Math.round(s*i);Math.abs(m)<1&&s>.01&&s<.99||(we(this,lr,s*i),le(this,cr,un).call(this,J(this,lr)))};cr=new WeakSet;un=function(t){this.dispatchEvent(new d.CustomEvent(p.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:t}))};tl=new WeakSet;vc=function(){J(this,ii).stop();let t=bc(this);this.dispatchEvent(new d.CustomEvent(p.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:t}))};mr.shadowRootOptions={mode:"open"};mr.getTemplateHTML=of;d.customElements.get("media-time-range")||d.customElements.define("media-time-range",mr);var nf=1,sf=t=>t.mediaMuted?0:t.mediaVolume,lf=t=>`${Math.round(t*100)}%`,sl=class extends Ke{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_VOLUME,n.MEDIA_MUTED,n.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",h("volume"))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),(e===n.MEDIA_VOLUME||e===n.MEDIA_MUTED)&&(this.range.valueAsNumber=sf(this),this.range.setAttribute("aria-valuetext",lf(this.range.valueAsNumber)),this.updateBar())}get mediaVolume(){return R(this,n.MEDIA_VOLUME,nf)}set mediaVolume(e){O(this,n.MEDIA_VOLUME,e)}get mediaMuted(){return k(this,n.MEDIA_MUTED)}set mediaMuted(e){S(this,n.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return I(this,n.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){M(this,n.MEDIA_VOLUME_UNAVAILABLE,e)}};d.customElements.get("media-volume-range")||d.customElements.define("media-volume-range",sl);var E=require("@mux/mux-video/base"),w=require("@mux/playback-core");var yc=require("@mux/playback-core");var oi=require("@mux/playback-core");function Ec(t){let e="";return Object.entries(t).forEach(([i,a])=>{a!=null&&(e+=`${cn(i)}: ${a}; `)}),e?e.trim():void 0}function cn(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function mn(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function ue(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function ll(t){let e=df(t).toString();return e?"?"+e:""}function df(t){let e={};for(let i in t)t[i]!=null&&(e[i]=t[i]);return new URLSearchParams(e)}var dl=(t,e)=>!t||!e?!1:t.contains(e)?!0:dl(t,e.getRootNode().host);var gc="mux.com",uf=()=>{try{return"3.6.1"}catch{}return"UNKNOWN"},cf=uf(),pn=()=>cf,_c=(t,{token:e,customDomain:i=gc,thumbnailTime:a,programTime:r}={})=>{var l;let o=e==null?a:void 0,{aud:s}=(l=(0,oi.parseJwt)(e))!=null?l:{};if(!(e&&s!=="t"))return`https://image.${i}/${t}/thumbnail.webp${ll({token:e,time:o,program_time:r})}`},Ac=(t,{token:e,customDomain:i=gc,programStartTime:a,programEndTime:r}={})=>{var s;let{aud:o}=(s=(0,oi.parseJwt)(e))!=null?s:{};if(!(e&&o!=="s"))return`https://image.${i}/${t}/storyboard.vtt${ll({token:e,format:"webp",program_start_time:a,program_end_time:r})}`},hr=t=>{if(t){if([oi.StreamTypes.LIVE,oi.StreamTypes.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return oi.StreamTypes.LIVE}};var mf={crossorigin:"crossOrigin",playsinline:"playsInline"};function Tc(t){var e;return(e=mf[t])!=null?e:mn(t)}var ai,ri,ce,hn=class{constructor(e,i){he(this,ai);he(this,ri);he(this,ce,[]);ye(this,ai,e),ye(this,ri,i)}[Symbol.iterator](){return U(this,ce).values()}get length(){return U(this,ce).length}get value(){var e;return(e=U(this,ce).join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(ye(this,ce,[]),this.add(...(i=e==null?void 0:e.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return U(this,ce)[e]}values(){return U(this,ce).values()}keys(){return U(this,ce).keys()}forEach(e){U(this,ce).forEach(e)}add(...e){var i,a;e.forEach(r=>{this.contains(r)||U(this,ce).push(r)}),!(this.value===""&&!((i=U(this,ai))!=null&&i.hasAttribute(`${U(this,ri)}`)))&&((a=U(this,ai))==null||a.setAttribute(`${U(this,ri)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>{U(this,ce).splice(U(this,ce).indexOf(a),1)}),(i=U(this,ai))==null||i.setAttribute(`${U(this,ri)}`,`${this.value}`)}contains(e){return U(this,ce).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)}};ai=new WeakMap,ri=new WeakMap,ce=new WeakMap;var kc=`[mux-player ${pn()}]`;function Xe(...t){console.warn(kc,...t)}function Ee(...t){console.error(kc,...t)}function ul(t){var i;let e=(i=t.message)!=null?i:"";t.context&&(e+=` ${t.context}`),t.file&&(e+=` ${(0,yc.i18n)("Read more: ")}
1275
+ https://github.com/muxinc/elements/blob/main/errors/${t.file}`),Xe(e)}var se={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},wt={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},e_={...se,...wt},Ic=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}}),hf=Object.values(se).filter(t=>se.PLAYSINLINE!==t),pf=Object.values(wt),ff=[...hf,...pf],cl=class extends ke.HTMLElement{static get observedAttributes(){return ff}constructor(){super()}attributeChangedCallback(e,i,a){var r,o;switch(e){case wt.MUTED:{this.media&&(this.media.muted=a!=null,this.media.defaultMuted=a!=null);return}case wt.VOLUME:{let s=(r=ue(a))!=null?r:1;this.media&&(this.media.volume=s);return}case wt.PLAYBACKRATE:{let s=(o=ue(a))!=null?o: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()}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:Ic}get seekable(){var e,i;return(i=(e=this.media)==null?void 0:e.seekable)!=null?i:Ic}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=ue(this.getAttribute(wt.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(wt.PLAYBACKRATE,`${e}`):this.removeAttribute(wt.PLAYBACKRATE)}get crossOrigin(){return pr(this,se.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(se.CROSSORIGIN,`${e}`)}get autoplay(){return pr(this,se.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(se.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(se.AUTOPLAY)}get loop(){return pr(this,se.LOOP)!=null}set loop(e){e?this.setAttribute(se.LOOP,""):this.removeAttribute(se.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 pr(this,se.MUTED)!=null}set defaultMuted(e){e?this.setAttribute(se.MUTED,""):this.removeAttribute(se.MUTED)}get playsInline(){return pr(this,se.PLAYSINLINE)!=null}set playsInline(e){Ee("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(se.PRELOAD,e):this.removeAttribute(se.PRELOAD)}};function pr(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var ml=cl;var Rc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},D=(t,e,i)=>(Rc(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)},ht=(t,e,i,a)=>(Rc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),zi,fn,ni,fr,Rt,xt,Dt,si,Qi,vn,Ue,Mc=1,Cc=0,vf=1,bf={processCallback(t,e,i){if(i){for(let[a,r]of e)if(a in i){let o=i[a];typeof o=="boolean"&&r instanceof me&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=o:typeof o=="function"&&r instanceof me?r.element[r.attributeName]=o:r.value=o}}}},pt=class extends d.DocumentFragment{constructor(e,i,a=bf){var r;super(),Je(this,zi,void 0),Je(this,fn,void 0),this.append(e.content.cloneNode(!0)),ht(this,zi,xc(this)),ht(this,fn,a),(r=a.createCallback)==null||r.call(a,this,D(this,zi),i),a.processCallback(this,D(this,zi),i)}update(e){D(this,fn).processCallback(this,D(this,zi),e)}};zi=new WeakMap;fn=new WeakMap;var xc=(t,e=[])=>{let i,a;for(let r of t.attributes||[])if(r.value.includes("{{")){let o=new hl;for([i,a]of wc(r.value))if(!i)o.append(a);else{let s=new me(t,r.name,r.namespaceURI);o.append(s),e.push([a,s])}r.value=o.toString()}for(let r of t.childNodes)if(r.nodeType===Mc&&!(r instanceof HTMLTemplateElement))xc(r,e);else{let o=r.data;if(r.nodeType===Mc||o.includes("{{")){let s=[];if(o)for([i,a]of wc(o))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 vr(t,r);s.push(l),e.push([l.expression,l])}r.replaceWith(...s.flatMap(l=>l.replacementNodes||[l]))}}return e},Lc={},wc=t=>{let e="",i=0,a=Lc[t],r=0,o;if(a)return a;for(a=[];o=t[r];r++)o==="{"&&t[r+1]==="{"&&t[r-1]!=="\\"&&t[r+2]&&++i==1?(e&&a.push([Cc,e]),e="",r++):o==="}"&&t[r+1]==="}"&&t[r-1]!=="\\"&&!--i?(a.push([vf,e.trim()]),e="",r++):e+=o||"";return e&&a.push([Cc,(i>0?"{{":"")+e]),Lc[t]=a},Ef=11,bn=class{get value(){return""}set value(e){}toString(){return this.value}},Dc=new WeakMap,hl=class{constructor(){Je(this,ni,[])}[Symbol.iterator](){return D(this,ni).values()}get length(){return D(this,ni).length}item(e){return D(this,ni)[e]}append(...e){for(let i of e)i instanceof me&&Dc.set(i,this),D(this,ni).push(i)}toString(){return D(this,ni).join("")}};ni=new WeakMap;var me=class extends bn{constructor(e,i,a){super(),Je(this,si),Je(this,fr,""),Je(this,Rt,void 0),Je(this,xt,void 0),Je(this,Dt,void 0),ht(this,Rt,e),ht(this,xt,i),ht(this,Dt,a)}get attributeName(){return D(this,xt)}get attributeNamespace(){return D(this,Dt)}get element(){return D(this,Rt)}get value(){return D(this,fr)}set value(e){D(this,fr)!==e&&(ht(this,fr,e),!D(this,si,Qi)||D(this,si,Qi).length===1?e==null?D(this,Rt).removeAttributeNS(D(this,Dt),D(this,xt)):D(this,Rt).setAttributeNS(D(this,Dt),D(this,xt),e):D(this,Rt).setAttributeNS(D(this,Dt),D(this,xt),D(this,si,Qi).toString()))}get booleanValue(){return D(this,Rt).hasAttributeNS(D(this,Dt),D(this,xt))}set booleanValue(e){if(!D(this,si,Qi)||D(this,si,Qi).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};fr=new WeakMap;Rt=new WeakMap;xt=new WeakMap;Dt=new WeakMap;si=new WeakSet;Qi=function(){return Dc.get(this)};var ft=class extends bn{constructor(e,i){super(),Je(this,vn,void 0),Je(this,Ue,void 0),ht(this,vn,e),ht(this,Ue,i?[...i]:[new Text])}get replacementNodes(){return D(this,Ue)}get parentNode(){return D(this,vn)}get nextSibling(){return D(this,Ue)[D(this,Ue).length-1].nextSibling}get previousSibling(){return D(this,Ue)[0].previousSibling}get value(){return D(this,Ue).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===Ef?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);i.length||i.push(new Text),ht(this,Ue,gf(D(this,Ue)[0].parentNode,D(this,Ue),i,this.nextSibling))}};vn=new WeakMap;Ue=new WeakMap;var vr=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 gf(t,e,i,a=null){let r=0,o,s,l,u=i.length,m=e.length;for(;r<u&&r<m&&e[r]==i[r];)r++;for(;r<u&&r<m&&i[u-1]==e[m-1];)a=i[--m,--u];if(r==m)for(;r<u;)t.insertBefore(i[r++],a);if(r==u)for(;r<m;)t.removeChild(e[r++]);else{for(o=e[r];r<u;)l=i[r++],s=o?o.nextSibling:a,o==l?o=s:r<u&&i[r]==s?(t.replaceChild(l,o),o=s):t.insertBefore(l,o);for(;o!=a;)s=o.nextSibling,t.removeChild(o),o=s}return i}var Oc={string:t=>String(t)},gn=class{constructor(e){this.template=e,this.state=void 0}},li=new WeakMap,di=new WeakMap,pl={partial:(t,e)=>{e[t.expression]=new gn(t.template)},if:(t,e)=>{var i;if(Pc(t.expression,e))if(li.get(t)!==t.template){li.set(t,t.template);let a=new pt(t.template,e,_n);t.replace(a),di.set(t,a)}else(i=di.get(t))==null||i.update(e);else t.replace(""),li.delete(t),di.delete(t)}},_f=Object.keys(pl),_n={processCallback(t,e,i){var a,r;if(i)for(let[o,s]of e){if(s instanceof vr){if(!s.directive){let u=_f.find(m=>s.template.hasAttribute(m));u&&(s.directive=u,s.expression=s.template.getAttribute(u))}(a=pl[s.directive])==null||a.call(pl,s,i);continue}let l=Pc(o,i);if(l instanceof gn){li.get(s)!==l.template?(li.set(s,l.template),l=new pt(l.template,l.state,_n),s.value=l,di.set(s,l)):(r=di.get(s))==null||r.update(l.state);continue}l?(s instanceof me&&s.attributeName.startsWith("aria-")&&(l=String(l)),s instanceof me?typeof l=="boolean"?s.booleanValue=l:typeof l=="function"?s.element[s.attributeName]=l:s.value=l:(s.value=l,li.delete(s),di.delete(s))):s instanceof me?s.value=void 0:(s.value=void 0,li.delete(s),di.delete(s))}}},Nc={"!":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=Oc[e])==null?void 0:i.call(Oc,t)}};function Af(t){return Tf(t,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function Pc(t,e={}){var i,a,r,o,s,l,u;let m=Af(t);if(m.length===0||m.some(({type:_})=>!_))return br(t);if(((i=m[0])==null?void 0:i.token)===">"){let _=e[(a=m[1])==null?void 0:a.token];if(!_)return br(t);let g={...e};_.state=g;let f=m.slice(2);for(let v=0;v<f.length;v+=3){let N=(r=f[v])==null?void 0:r.token,T=(o=f[v+1])==null?void 0:o.token,C=(s=f[v+2])==null?void 0:s.token;N&&T==="="&&(g[N]=Er(C,e))}return _}if(m.length===1)return En(m[0])?Er(m[0].token,e):br(t);if(m.length===2){let _=(l=m[0])==null?void 0:l.token,g=Nc[_];if(!g||!En(m[1]))return br(t);let f=Er(m[1].token,e);return g(f)}if(m.length===3){let _=(u=m[1])==null?void 0:u.token,g=Nc[_];if(!g||!En(m[0])||!En(m[2]))return br(t);let f=Er(m[0].token,e);if(_==="|")return g(f,m[2].token);let v=Er(m[2].token,e);return g(f,v)}}function br(t){return console.warn(`Warning: invalid expression \`${t}\``),!1}function En({type:t}){return["number","boolean","string","param"].includes(t)}function Er(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):Kr(t)?parseFloat(t):e[t]}function Tf(t,e){let i,a,r,o=[];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&&o.push({token:t.substr(0,i),type:void 0}),r&&o.push(r),t=t.substr(i+(r?r.token.length:0))}return o}var _l=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},bl=(t,e,i)=>(_l(t,e,"read from private field"),i?i.call(t):e.get(t)),gr=(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)},ui=(t,e,i,a)=>(_l(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),fl=(t,e,i)=>(_l(t,e,"access private method"),i),Xi,An,Ji,El,Uc,Tn,gl,vl={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},Hc=Y.createElement("template");Hc.innerHTML=`
1276
1276
  <style>
1277
1277
  :host {
1278
1278
  display: inline-block;
@@ -1299,7 +1299,7 @@ https://github.com/muxinc/elements/blob/main/errors/${t.file}`),Xe(e)}var se={AU
1299
1299
  display: none;
1300
1300
  }
1301
1301
  </style>
1302
- `;var ci=class extends d.HTMLElement{constructor(){super(),br(this,El),br(this,An),br(this,Qi,void 0),br(this,_n,void 0),br(this,Xi,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());let e=new MutationObserver(i=>{var a;this.mediaController&&!((a=this.mediaController)!=null&&a.breakpointsComputed)||i.some(r=>{let o=r.target;return o===this?!0:o.localName!=="media-controller"?!1:!!(fl[r.attributeName]||r.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(Ce.BREAKPOINTS_COMPUTED,this.render),pl(this,El,Pc).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return(e=vl(this,Qi))!=null?e:this.constructor.template}set template(e){if(e===null){this.removeAttribute("template");return}typeof e=="string"?this.setAttribute("template",e):e instanceof HTMLTemplateElement&&(ui(this,Qi,e),ui(this,Xi,null),this.createRenderer())}get props(){var e,i,a;let r=[...Array.from((i=(e=this.mediaController)==null?void 0:e.attributes)!=null?i:[]).filter(({name:s})=>fl[s]||s.startsWith("breakpoint")),...Array.from(this.attributes)],o={};for(let s of r){let l=(a=fl[s.name])!=null?a:Wd(s.name),{value:u}=s;u!=null?(Vr(u)&&(u=parseFloat(u)),o[l]=u===""?!0:u):o[l]=!1}return o}attributeChangedCallback(e,i,a){e==="template"&&i!=a&&pl(this,An,bl).call(this)}connectedCallback(){pl(this,An,bl).call(this)}createRenderer(){this.template instanceof HTMLTemplateElement&&this.template!==vl(this,_n)&&(ui(this,_n,this.template),this.renderer=new pt(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(Uc.content.cloneNode(!0),this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}};Qi=new WeakMap;_n=new WeakMap;Xi=new WeakMap;El=new WeakSet;Pc=function(t){if(Object.prototype.hasOwnProperty.call(this,t)){let e=this[t];delete this[t],this[t]=e}};An=new WeakSet;bl=function(){var t;let e=this.getAttribute("template");if(!e||e===vl(this,Xi))return;let i=this.getRootNode(),a=(t=i==null?void 0:i.getElementById)==null?void 0:t.call(i,e);if(a){ui(this,Xi,e),ui(this,Qi,a),this.createRenderer();return}Tf(e)&&(ui(this,Xi,e),yf(e).then(r=>{let o=Y.createElement("template");o.innerHTML=r,ui(this,Qi,o),this.createRenderer()}).catch(console.error))};ci.observedAttributes=["template"];ci.processor=gn;function Tf(t){if(!/^(\/|\.\/|https?:\/\/)/.test(t))return!1;let e=/^https?:\/\//.test(t)?void 0:location.origin;try{new URL(t,e)}catch{return!1}return!0}async function yf(t){let e=await fetch(t);if(e.status!==200)throw new Error(`Failed to load resource: the server responded with a status of ${e.status}`);return e.text()}d.customElements.get("media-theme")||d.customElements.define("media-theme",ci);var Hc=`:host {
1302
+ `;var ci=class extends d.HTMLElement{constructor(){super(),gr(this,El),gr(this,Tn),gr(this,Xi,void 0),gr(this,An,void 0),gr(this,Ji,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());let e=new MutationObserver(i=>{var a;this.mediaController&&!((a=this.mediaController)!=null&&a.breakpointsComputed)||i.some(r=>{let o=r.target;return o===this?!0:o.localName!=="media-controller"?!1:!!(vl[r.attributeName]||r.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(Ce.BREAKPOINTS_COMPUTED,this.render),fl(this,El,Uc).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return(e=bl(this,Xi))!=null?e:this.constructor.template}set template(e){if(e===null){this.removeAttribute("template");return}typeof e=="string"?this.setAttribute("template",e):e instanceof HTMLTemplateElement&&(ui(this,Xi,e),ui(this,Ji,null),this.createRenderer())}get props(){var e,i,a;let r=[...Array.from((i=(e=this.mediaController)==null?void 0:e.attributes)!=null?i:[]).filter(({name:s})=>vl[s]||s.startsWith("breakpoint")),...Array.from(this.attributes)],o={};for(let s of r){let l=(a=vl[s.name])!=null?a:Fd(s.name),{value:u}=s;u!=null?(Kr(u)&&(u=parseFloat(u)),o[l]=u===""?!0:u):o[l]=!1}return o}attributeChangedCallback(e,i,a){e==="template"&&i!=a&&fl(this,Tn,gl).call(this)}connectedCallback(){fl(this,Tn,gl).call(this)}createRenderer(){this.template instanceof HTMLTemplateElement&&this.template!==bl(this,An)&&(ui(this,An,this.template),this.renderer=new pt(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(Hc.content.cloneNode(!0),this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}};Xi=new WeakMap;An=new WeakMap;Ji=new WeakMap;El=new WeakSet;Uc=function(t){if(Object.prototype.hasOwnProperty.call(this,t)){let e=this[t];delete this[t],this[t]=e}};Tn=new WeakSet;gl=function(){var t;let e=this.getAttribute("template");if(!e||e===bl(this,Ji))return;let i=this.getRootNode(),a=(t=i==null?void 0:i.getElementById)==null?void 0:t.call(i,e);if(a){ui(this,Ji,e),ui(this,Xi,a),this.createRenderer();return}yf(e)&&(ui(this,Ji,e),kf(e).then(r=>{let o=Y.createElement("template");o.innerHTML=r,ui(this,Xi,o),this.createRenderer()}).catch(console.error))};ci.observedAttributes=["template"];ci.processor=_n;function yf(t){if(!/^(\/|\.\/|https?:\/\/)/.test(t))return!1;let e=/^https?:\/\//.test(t)?void 0:location.origin;try{new URL(t,e)}catch{return!1}return!0}async function kf(t){let e=await fetch(t);if(e.status!==200)throw new Error(`Failed to load resource: the server responded with a status of ${e.status}`);return e.text()}d.customElements.get("media-theme")||d.customElements.define("media-theme",ci);var Bc=`:host {
1303
1303
  --media-control-display: var(--controls);
1304
1304
  --media-loading-indicator-display: var(--loading-indicator);
1305
1305
  --media-dialog-display: var(--dialog);
@@ -1449,19 +1449,19 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1449
1449
  :host([no-tooltips]) {
1450
1450
  --media-tooltip-display: none;
1451
1451
  }
1452
- `;var gr=new WeakMap,Al=class t{constructor(e,i){this.element=e;this.type=i;this.element.addEventListener(this.type,this);let a=gr.get(this.element);a&&a.set(this.type,this)}set(e){if(typeof e=="function")this.handleEvent=e.bind(this.element);else if(typeof e=="object"&&typeof e.handleEvent=="function")this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let i=gr.get(this.element);i&&i.delete(this.type)}}static for(e){gr.has(e.element)||gr.set(e.element,new Map);let i=e.attributeName.slice(2),a=gr.get(e.element);return a&&a.has(i)?a.get(i):new t(e.element,i)}};function Sf(t,e){return t instanceof me&&t.attributeName.startsWith("on")?(Al.for(t).set(e),t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),!0):!1}function If(t,e){return e instanceof Tn&&t instanceof ft?(e.renderInto(t),!0):!1}function Mf(t,e){return e instanceof DocumentFragment&&t instanceof ft?(e.childNodes.length&&t.replace(...e.childNodes),!0):!1}function Cf(t,e){if(t instanceof me){let i=t.attributeNamespace,a=t.element.getAttributeNS(i,t.attributeName);return String(e)!==a&&(t.value=String(e)),!0}return t.value=String(e),!0}function Lf(t,e){if(t instanceof me&&e instanceof Element){let i=t.element;return i[t.attributeName]!==e&&(t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),i[t.attributeName]=e),!0}return!1}function wf(t,e){if(typeof e=="boolean"&&t instanceof me){let i=t.attributeNamespace,a=t.element.hasAttributeNS(i,t.attributeName);return e!==a&&(t.booleanValue=e),!0}return!1}function Rf(t,e){return e===!1&&t instanceof ft?(t.replace(""),!0):!1}function xf(t,e){Lf(t,e)||wf(t,e)||Sf(t,e)||Rf(t,e)||If(t,e)||Mf(t,e)||Cf(t,e)}var _l=new Map,Bc=new WeakMap,$c=new WeakMap,Tn=class{constructor(e,i,a){this.strings=e;this.values=i;this.processor=a;this.stringsKey=this.strings.join("")}get template(){if(_l.has(this.stringsKey))return _l.get(this.stringsKey);{let e=_i.createElement("template"),i=this.strings.length-1;return e.innerHTML=this.strings.reduce((a,r,o)=>a+r+(o<i?`{{ ${o} }}`:""),""),_l.set(this.stringsKey,e),e}}renderInto(e){var r;let i=this.template;if(Bc.get(e)!==i){Bc.set(e,i);let o=new pt(i,this.values,this.processor);$c.set(e,o),e instanceof ft?e.replace(...o.children):e.appendChild(o);return}let a=$c.get(e);(r=a==null?void 0:a.update)==null||r.call(a,this.values)}},Df={processCallback(t,e,i){var a;if(i){for(let[r,o]of e)if(r in i){let s=(a=i[r])!=null?a:"";xf(o,s)}}}};function _r(t,...e){return new Tn(t,e,Df)}function Wc(t,e){t.renderInto(e)}var Ar=require("@mux/playback-core"),Of=t=>{let{tokens:e}=t;return e.drm?":host(:not([cast-receiver])) { --_cast-button-drm-display: none; }":""},Fc=t=>_r`
1452
+ `;var _r=new WeakMap,Tl=class t{constructor(e,i){this.element=e;this.type=i;this.element.addEventListener(this.type,this);let a=_r.get(this.element);a&&a.set(this.type,this)}set(e){if(typeof e=="function")this.handleEvent=e.bind(this.element);else if(typeof e=="object"&&typeof e.handleEvent=="function")this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let i=_r.get(this.element);i&&i.delete(this.type)}}static for(e){_r.has(e.element)||_r.set(e.element,new Map);let i=e.attributeName.slice(2),a=_r.get(e.element);return a&&a.has(i)?a.get(i):new t(e.element,i)}};function If(t,e){return t instanceof me&&t.attributeName.startsWith("on")?(Tl.for(t).set(e),t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),!0):!1}function Mf(t,e){return e instanceof yn&&t instanceof ft?(e.renderInto(t),!0):!1}function Cf(t,e){return e instanceof DocumentFragment&&t instanceof ft?(e.childNodes.length&&t.replace(...e.childNodes),!0):!1}function Lf(t,e){if(t instanceof me){let i=t.attributeNamespace,a=t.element.getAttributeNS(i,t.attributeName);return String(e)!==a&&(t.value=String(e)),!0}return t.value=String(e),!0}function wf(t,e){if(t instanceof me&&e instanceof Element){let i=t.element;return i[t.attributeName]!==e&&(t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),i[t.attributeName]=e),!0}return!1}function Rf(t,e){if(typeof e=="boolean"&&t instanceof me){let i=t.attributeNamespace,a=t.element.hasAttributeNS(i,t.attributeName);return e!==a&&(t.booleanValue=e),!0}return!1}function xf(t,e){return e===!1&&t instanceof ft?(t.replace(""),!0):!1}function Df(t,e){wf(t,e)||Rf(t,e)||If(t,e)||xf(t,e)||Mf(t,e)||Cf(t,e)||Lf(t,e)}var Al=new Map,$c=new WeakMap,Wc=new WeakMap,yn=class{constructor(e,i,a){this.strings=e;this.values=i;this.processor=a;this.stringsKey=this.strings.join("")}get template(){if(Al.has(this.stringsKey))return Al.get(this.stringsKey);{let e=_i.createElement("template"),i=this.strings.length-1;return e.innerHTML=this.strings.reduce((a,r,o)=>a+r+(o<i?`{{ ${o} }}`:""),""),Al.set(this.stringsKey,e),e}}renderInto(e){var r;let i=this.template;if($c.get(e)!==i){$c.set(e,i);let o=new pt(i,this.values,this.processor);Wc.set(e,o),e instanceof ft?e.replace(...o.children):e.appendChild(o);return}let a=Wc.get(e);(r=a==null?void 0:a.update)==null||r.call(a,this.values)}},Of={processCallback(t,e,i){var a;if(i){for(let[r,o]of e)if(r in i){let s=(a=i[r])!=null?a:"";Df(o,s)}}}};function Ar(t,...e){return new yn(t,e,Of)}function Fc(t,e){t.renderInto(e)}var Tr=require("@mux/playback-core"),Nf=t=>{let{tokens:e}=t;return e.drm?":host(:not([cast-receiver])) { --_cast-button-drm-display: none; }":""},Vc=t=>Ar`
1453
1453
  <style>
1454
- ${Of(t)}
1455
- ${Hc}
1454
+ ${Nf(t)}
1455
+ ${Bc}
1456
1456
  </style>
1457
- ${Hf(t)}
1458
- `,Nf=t=>{let e=t.hotKeys?`${t.hotKeys}`:"";return mr(t.streamType)==="live"&&(e+=" noarrowleft noarrowright"),e},Pf={TOP:"top",CENTER:"center",BOTTOM:"bottom",LAYER:"layer",MEDIA_LAYER:"media-layer",POSTER_LAYER:"poster-layer",VERTICAL_LAYER:"vertical-layer",CENTERED_LAYER:"centered-layer",GESTURE_LAYER:"gesture-layer",CONTROLLER_LAYER:"controller",BUTTON:"button",RANGE:"range",DISPLAY:"display",CONTROL_BAR:"control-bar",MENU_BUTTON:"menu-button",MENU:"menu",OPTION:"option",POSTER:"poster",LIVE:"live",PLAY:"play",PRE_PLAY:"pre-play",SEEK_BACKWARD:"seek-backward",SEEK_FORWARD:"seek-forward",MUTE:"mute",CAPTIONS:"captions",AIRPLAY:"airplay",PIP:"pip",FULLSCREEN:"fullscreen",CAST:"cast",PLAYBACK_RATE:"playback-rate",VOLUME:"volume",TIME:"time",TITLE:"title",AUDIO_TRACK:"audio-track",RENDITION:"rendition"},Uf=Object.values(Pf).join(", "),Hf=t=>{var e,i,a,r,o,s,l,u,h,_,g,f,v,N,T,C,P,j,_e,bt,ot,ca,ma,ha,pa,fa,va,Ea,ba,ga,_a,Aa,Fr,nt,Ta,ya,ka;return _r`
1457
+ ${Bf(t)}
1458
+ `,Pf=t=>{let e=t.hotKeys?`${t.hotKeys}`:"";return hr(t.streamType)==="live"&&(e+=" noarrowleft noarrowright"),e},Uf={TOP:"top",CENTER:"center",BOTTOM:"bottom",LAYER:"layer",MEDIA_LAYER:"media-layer",POSTER_LAYER:"poster-layer",VERTICAL_LAYER:"vertical-layer",CENTERED_LAYER:"centered-layer",GESTURE_LAYER:"gesture-layer",CONTROLLER_LAYER:"controller",BUTTON:"button",RANGE:"range",DISPLAY:"display",CONTROL_BAR:"control-bar",MENU_BUTTON:"menu-button",MENU:"menu",OPTION:"option",POSTER:"poster",LIVE:"live",PLAY:"play",PRE_PLAY:"pre-play",SEEK_BACKWARD:"seek-backward",SEEK_FORWARD:"seek-forward",MUTE:"mute",CAPTIONS:"captions",AIRPLAY:"airplay",PIP:"pip",FULLSCREEN:"fullscreen",CAST:"cast",PLAYBACK_RATE:"playback-rate",VOLUME:"volume",TIME:"time",TITLE:"title",AUDIO_TRACK:"audio-track",RENDITION:"rendition"},Hf=Object.values(Uf).join(", "),Bf=t=>{var e,i,a,r,o,s,l,u,m,_,g,f,v,N,T,C,P,ee,_e,Et,ot,ma,ha,pa,fa,va,ba,Ea,ga,_a,Aa,Ta,Vr,nt,ya,ka,Sa;return Ar`
1459
1459
  <media-theme
1460
1460
  template="${t.themeTemplate||!1}"
1461
1461
  defaultstreamtype="${(e=t.defaultStreamType)!=null?e:!1}"
1462
- hotkeys="${Nf(t)||!1}"
1462
+ hotkeys="${Pf(t)||!1}"
1463
1463
  nohotkeys="${t.noHotKeys||!t.hasSrc||!1}"
1464
- noautoseektolive="${!!((i=t.streamType)!=null&&i.includes(Ar.StreamTypes.LIVE))&&t.targetLiveWindow!==0}"
1464
+ noautoseektolive="${!!((i=t.streamType)!=null&&i.includes(Tr.StreamTypes.LIVE))&&t.targetLiveWindow!==0}"
1465
1465
  novolumepref="${t.novolumepref||!1}"
1466
1466
  disabled="${!t.hasSrc||t.isDialogOpen}"
1467
1467
  audio="${(a=t.audio)!=null?a:!1}"
@@ -1471,12 +1471,12 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1471
1471
  backwardseekoffset="${(s=t.backwardSeekOffset)!=null?s:!1}"
1472
1472
  playbackrates="${(l=t.playbackRates)!=null?l:!1}"
1473
1473
  defaultshowremainingtime="${(u=t.defaultShowRemainingTime)!=null?u:!1}"
1474
- defaultduration="${(h=t.defaultDuration)!=null?h:!1}"
1474
+ defaultduration="${(m=t.defaultDuration)!=null?m:!1}"
1475
1475
  hideduration="${(_=t.hideDuration)!=null?_:!1}"
1476
1476
  title="${(g=t.title)!=null?g:!1}"
1477
1477
  videotitle="${(f=t.videoTitle)!=null?f:!1}"
1478
1478
  proudlydisplaymuxbadge="${(v=t.proudlyDisplayMuxBadge)!=null?v:!1}"
1479
- exportparts="${Uf}"
1479
+ exportparts="${Hf}"
1480
1480
  onclose="${t.onCloseErrorDialog}"
1481
1481
  onfocusin="${t.onFocusInErrorDialog}"
1482
1482
  >
@@ -1484,33 +1484,33 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1484
1484
  slot="media"
1485
1485
  inert="${(N=t.noHotKeys)!=null?N:!1}"
1486
1486
  target-live-window="${(T=t.targetLiveWindow)!=null?T:!1}"
1487
- stream-type="${(C=mr(t.streamType))!=null?C:!1}"
1487
+ stream-type="${(C=hr(t.streamType))!=null?C:!1}"
1488
1488
  crossorigin="${(P=t.crossOrigin)!=null?P:""}"
1489
1489
  playsinline
1490
- autoplay="${(j=t.autoplay)!=null?j:!1}"
1490
+ autoplay="${(ee=t.autoplay)!=null?ee:!1}"
1491
1491
  muted="${(_e=t.muted)!=null?_e:!1}"
1492
- loop="${(bt=t.loop)!=null?bt:!1}"
1492
+ loop="${(Et=t.loop)!=null?Et:!1}"
1493
1493
  preload="${(ot=t.preload)!=null?ot:!1}"
1494
- debug="${(ca=t.debug)!=null?ca:!1}"
1495
- prefer-cmcd="${(ma=t.preferCmcd)!=null?ma:!1}"
1496
- disable-tracking="${(ha=t.disableTracking)!=null?ha:!1}"
1497
- disable-cookies="${(pa=t.disableCookies)!=null?pa:!1}"
1498
- prefer-playback="${(fa=t.preferPlayback)!=null?fa:!1}"
1494
+ debug="${(ma=t.debug)!=null?ma:!1}"
1495
+ prefer-cmcd="${(ha=t.preferCmcd)!=null?ha:!1}"
1496
+ disable-tracking="${(pa=t.disableTracking)!=null?pa:!1}"
1497
+ disable-cookies="${(fa=t.disableCookies)!=null?fa:!1}"
1498
+ prefer-playback="${(va=t.preferPlayback)!=null?va:!1}"
1499
1499
  start-time="${t.startTime!=null?t.startTime:!1}"
1500
- beacon-collection-domain="${(va=t.beaconCollectionDomain)!=null?va:!1}"
1500
+ beacon-collection-domain="${(ba=t.beaconCollectionDomain)!=null?ba:!1}"
1501
1501
  player-init-time="${(Ea=t.playerInitTime)!=null?Ea:!1}"
1502
- player-software-name="${(ba=t.playerSoftwareName)!=null?ba:!1}"
1503
- player-software-version="${(ga=t.playerSoftwareVersion)!=null?ga:!1}"
1504
- env-key="${(_a=t.envKey)!=null?_a:!1}"
1505
- custom-domain="${(Aa=t.customDomain)!=null?Aa:!1}"
1506
- src="${t.src?t.src:t.playbackId?(0,Ar.toMuxVideoURL)(t):!1}"
1507
- cast-src="${t.src?t.src:t.playbackId?(0,Ar.toMuxVideoURL)(t):!1}"
1508
- cast-receiver="${(Fr=t.castReceiver)!=null?Fr:!1}"
1509
- drm-token="${(Ta=(nt=t.tokens)==null?void 0:nt.drm)!=null?Ta:!1}"
1502
+ player-software-name="${(ga=t.playerSoftwareName)!=null?ga:!1}"
1503
+ player-software-version="${(_a=t.playerSoftwareVersion)!=null?_a:!1}"
1504
+ env-key="${(Aa=t.envKey)!=null?Aa:!1}"
1505
+ custom-domain="${(Ta=t.customDomain)!=null?Ta:!1}"
1506
+ src="${t.src?t.src:t.playbackId?(0,Tr.toMuxVideoURL)(t):!1}"
1507
+ cast-src="${t.src?t.src:t.playbackId?(0,Tr.toMuxVideoURL)(t):!1}"
1508
+ cast-receiver="${(Vr=t.castReceiver)!=null?Vr:!1}"
1509
+ drm-token="${(ya=(nt=t.tokens)==null?void 0:nt.drm)!=null?ya:!1}"
1510
1510
  exportparts="video"
1511
- disable-pseudo-ended="${(ya=t.disablePseudoEnded)!=null?ya:!1}"
1511
+ disable-pseudo-ended="${(ka=t.disablePseudoEnded)!=null?ka:!1}"
1512
1512
  >
1513
- ${t.storyboard?_r`<track label="thumbnails" default kind="metadata" src="${t.storyboard}" />`:_r``}
1513
+ ${t.storyboard?Ar`<track label="thumbnails" default kind="metadata" src="${t.storyboard}" />`:Ar``}
1514
1514
  <slot></slot>
1515
1515
  </mux-video>
1516
1516
  <slot name="poster" slot="poster">
@@ -1518,11 +1518,11 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1518
1518
  part="poster"
1519
1519
  exportparts="poster, img"
1520
1520
  src="${t.poster?t.poster:!1}"
1521
- placeholdersrc="${(ka=t.placeholder)!=null?ka:!1}"
1521
+ placeholdersrc="${(Sa=t.placeholder)!=null?Sa:!1}"
1522
1522
  ></media-poster-image>
1523
1523
  </slot>
1524
1524
  </media-theme>
1525
- `};var A=require("@mux/playback-core"),Vc=t=>t.charAt(0).toUpperCase()+t.slice(1),Bf=(t,e=!1)=>{var i,a;if(t.muxCode){let r=Vc((i=t.errorCategory)!=null?i:"video"),o=(0,A.errorCategoryToTokenNameOrPrefix)((a=t.errorCategory)!=null?a:A.MuxErrorCategory.VIDEO);if(t.muxCode===A.MuxErrorCode.NETWORK_OFFLINE)return(0,A.i18n)("Your device appears to be offline",e);if(t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_EXPIRED)return(0,A.i18n)("{category} URL has expired",e).format({category:r});if([A.MuxErrorCode.NETWORK_TOKEN_SUB_MISMATCH,A.MuxErrorCode.NETWORK_TOKEN_AUD_MISMATCH,A.MuxErrorCode.NETWORK_TOKEN_AUD_MISSING,A.MuxErrorCode.NETWORK_TOKEN_MALFORMED].includes(t.muxCode))return(0,A.i18n)("{category} URL is formatted incorrectly",e).format({category:r});if(t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_MISSING)return(0,A.i18n)("Invalid {categoryName} URL",e).format({categoryName:o});if(t.muxCode===A.MuxErrorCode.NETWORK_NOT_FOUND)return(0,A.i18n)("{category} does not exist",e).format({category:r});if(t.muxCode===A.MuxErrorCode.NETWORK_NOT_READY){let s=t.streamType==="live"?"Live stream":"Video";return(0,A.i18n)("{mediaType} is not currently available",e).format({mediaType:s})}}if(t.code){if(t.code===A.MediaError.MEDIA_ERR_NETWORK)return(0,A.i18n)("Network Error",e);if(t.code===A.MediaError.MEDIA_ERR_DECODE)return(0,A.i18n)("Media Error",e);if(t.code===A.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED)return(0,A.i18n)("Source Not Supported",e)}return(0,A.i18n)("Error",e)},$f=(t,e=!1)=>{var i,a;if(t.muxCode){let r=Vc((i=t.errorCategory)!=null?i:"video"),o=(0,A.errorCategoryToTokenNameOrPrefix)((a=t.errorCategory)!=null?a:A.MuxErrorCategory.VIDEO);return t.muxCode===A.MuxErrorCode.NETWORK_OFFLINE?(0,A.i18n)("Check your internet connection and try reloading this video.",e):t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_EXPIRED?(0,A.i18n)("The video\u2019s secured {tokenNamePrefix}-token has expired.",e).format({tokenNamePrefix:o}):t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_SUB_MISMATCH?(0,A.i18n)("The video\u2019s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",e).format({tokenNamePrefix:o}):t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_MALFORMED?(0,A.i18n)("{category} URL is formatted incorrectly",e).format({category:r}):[A.MuxErrorCode.NETWORK_TOKEN_AUD_MISMATCH,A.MuxErrorCode.NETWORK_TOKEN_AUD_MISSING].includes(t.muxCode)?(0,A.i18n)("The {tokenNamePrefix}-token is formatted with incorrect information.",e).format({tokenNamePrefix:o}):[A.MuxErrorCode.NETWORK_TOKEN_MISSING,A.MuxErrorCode.NETWORK_INVALID_URL].includes(t.muxCode)?(0,A.i18n)("The video URL or {tokenNamePrefix}-token are formatted with incorrect or incomplete information.",e).format({tokenNamePrefix:o}):t.muxCode===A.MuxErrorCode.NETWORK_NOT_FOUND?"":t.message}return t.code&&(t.code===A.MediaError.MEDIA_ERR_NETWORK||t.code===A.MediaError.MEDIA_ERR_DECODE||t.code===A.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED),t.message},Kc=(t,e=!1)=>{let i=Bf(t,e).toString(),a=$f(t,e).toString();return{title:i,message:a}},Wf=t=>{if(t.muxCode){if(t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_EXPIRED)return"403-expired-token.md";if(t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_MALFORMED)return"403-malformatted-token.md";if([A.MuxErrorCode.NETWORK_TOKEN_AUD_MISMATCH,A.MuxErrorCode.NETWORK_TOKEN_AUD_MISSING].includes(t.muxCode))return"403-incorrect-aud-value.md";if(t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_SUB_MISMATCH)return"403-playback-id-mismatch.md";if(t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_MISSING)return"missing-signed-tokens.md";if(t.muxCode===A.MuxErrorCode.NETWORK_NOT_FOUND)return"404-not-found.md";if(t.muxCode===A.MuxErrorCode.NETWORK_NOT_READY)return"412-not-playable.md"}if(t.code){if(t.code===A.MediaError.MEDIA_ERR_NETWORK)return"";if(t.code===A.MediaError.MEDIA_ERR_DECODE)return"media-decode-error.md";if(t.code===A.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED)return"media-src-not-supported.md"}return""},Tl=(t,e)=>{let i=Wf(t);return{message:t.message,context:t.context,file:i}};var Gc=`<template id="media-theme-gerwig">
1525
+ `};var A=require("@mux/playback-core"),Kc=t=>t.charAt(0).toUpperCase()+t.slice(1),$f=(t,e=!1)=>{var i,a;if(t.muxCode){let r=Kc((i=t.errorCategory)!=null?i:"video"),o=(0,A.errorCategoryToTokenNameOrPrefix)((a=t.errorCategory)!=null?a:A.MuxErrorCategory.VIDEO);if(t.muxCode===A.MuxErrorCode.NETWORK_OFFLINE)return(0,A.i18n)("Your device appears to be offline",e);if(t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_EXPIRED)return(0,A.i18n)("{category} URL has expired",e).format({category:r});if([A.MuxErrorCode.NETWORK_TOKEN_SUB_MISMATCH,A.MuxErrorCode.NETWORK_TOKEN_AUD_MISMATCH,A.MuxErrorCode.NETWORK_TOKEN_AUD_MISSING,A.MuxErrorCode.NETWORK_TOKEN_MALFORMED].includes(t.muxCode))return(0,A.i18n)("{category} URL is formatted incorrectly",e).format({category:r});if(t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_MISSING)return(0,A.i18n)("Invalid {categoryName} URL",e).format({categoryName:o});if(t.muxCode===A.MuxErrorCode.NETWORK_NOT_FOUND)return(0,A.i18n)("{category} does not exist",e).format({category:r});if(t.muxCode===A.MuxErrorCode.NETWORK_NOT_READY){let s=t.streamType==="live"?"Live stream":"Video";return(0,A.i18n)("{mediaType} is not currently available",e).format({mediaType:s})}}if(t.code){if(t.code===A.MediaError.MEDIA_ERR_NETWORK)return(0,A.i18n)("Network Error",e);if(t.code===A.MediaError.MEDIA_ERR_DECODE)return(0,A.i18n)("Media Error",e);if(t.code===A.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED)return(0,A.i18n)("Source Not Supported",e)}return(0,A.i18n)("Error",e)},Wf=(t,e=!1)=>{var i,a;if(t.muxCode){let r=Kc((i=t.errorCategory)!=null?i:"video"),o=(0,A.errorCategoryToTokenNameOrPrefix)((a=t.errorCategory)!=null?a:A.MuxErrorCategory.VIDEO);return t.muxCode===A.MuxErrorCode.NETWORK_OFFLINE?(0,A.i18n)("Check your internet connection and try reloading this video.",e):t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_EXPIRED?(0,A.i18n)("The video\u2019s secured {tokenNamePrefix}-token has expired.",e).format({tokenNamePrefix:o}):t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_SUB_MISMATCH?(0,A.i18n)("The video\u2019s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",e).format({tokenNamePrefix:o}):t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_MALFORMED?(0,A.i18n)("{category} URL is formatted incorrectly",e).format({category:r}):[A.MuxErrorCode.NETWORK_TOKEN_AUD_MISMATCH,A.MuxErrorCode.NETWORK_TOKEN_AUD_MISSING].includes(t.muxCode)?(0,A.i18n)("The {tokenNamePrefix}-token is formatted with incorrect information.",e).format({tokenNamePrefix:o}):[A.MuxErrorCode.NETWORK_TOKEN_MISSING,A.MuxErrorCode.NETWORK_INVALID_URL].includes(t.muxCode)?(0,A.i18n)("The video URL or {tokenNamePrefix}-token are formatted with incorrect or incomplete information.",e).format({tokenNamePrefix:o}):t.muxCode===A.MuxErrorCode.NETWORK_NOT_FOUND?"":t.message}return t.code&&(t.code===A.MediaError.MEDIA_ERR_NETWORK||t.code===A.MediaError.MEDIA_ERR_DECODE||t.code===A.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED),t.message},Gc=(t,e=!1)=>{let i=$f(t,e).toString(),a=Wf(t,e).toString();return{title:i,message:a}},Ff=t=>{if(t.muxCode){if(t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_EXPIRED)return"403-expired-token.md";if(t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_MALFORMED)return"403-malformatted-token.md";if([A.MuxErrorCode.NETWORK_TOKEN_AUD_MISMATCH,A.MuxErrorCode.NETWORK_TOKEN_AUD_MISSING].includes(t.muxCode))return"403-incorrect-aud-value.md";if(t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_SUB_MISMATCH)return"403-playback-id-mismatch.md";if(t.muxCode===A.MuxErrorCode.NETWORK_TOKEN_MISSING)return"missing-signed-tokens.md";if(t.muxCode===A.MuxErrorCode.NETWORK_NOT_FOUND)return"404-not-found.md";if(t.muxCode===A.MuxErrorCode.NETWORK_NOT_READY)return"412-not-playable.md"}if(t.code){if(t.code===A.MediaError.MEDIA_ERR_NETWORK)return"";if(t.code===A.MediaError.MEDIA_ERR_DECODE)return"media-decode-error.md";if(t.code===A.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED)return"media-src-not-supported.md"}return""},yl=(t,e)=>{let i=Ff(t);return{message:t.message,context:t.context,file:i}};var Yc=`<template id="media-theme-gerwig">
1526
1526
  <style>
1527
1527
  @keyframes pre-play-hide {
1528
1528
  0% {
@@ -2651,7 +2651,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2651
2651
  <slot></slot>
2652
2652
  </media-controller>
2653
2653
  </template>
2654
- `;function Yc({anchor:t,floating:e,placement:i}){let a=Vf({anchor:t,floating:e}),{x:r,y:o}=Gf(a,i);return{x:r,y:o}}function Vf({anchor:t,floating:e}){return{anchor:Kf(t,e.offsetParent),floating:{x:0,y:0,width:e.offsetWidth,height:e.offsetHeight}}}function Kf(t,e){var i;let a=t.getBoundingClientRect(),r=(i=e==null?void 0:e.getBoundingClientRect())!=null?i:{x:0,y:0};return{x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}function Gf({anchor:t,floating:e},i){let a=Yf(i)==="x"?"y":"x",r=a==="y"?"height":"width",o=qc(i),s=t.x+t.width/2-e.width/2,l=t.y+t.height/2-e.height/2,u=t[r]/2-e[r]/2,h;switch(o){case"top":h={x:s,y:t.y-e.height};break;case"bottom":h={x:s,y:t.y+t.height};break;case"right":h={x:t.x+t.width,y:l};break;case"left":h={x:t.x-e.width,y:l};break;default:h={x:t.x,y:t.y}}switch(i.split("-")[1]){case"start":h[a]-=u;break;case"end":h[a]+=u;break}return h}function qc(t){return t.split("-")[0]}function Yf(t){return["top","bottom"].includes(qc(t))?"y":"x"}var Ot=class extends Event{constructor({action:e="auto",relatedTarget:i,...a}){super("invoke",a),this.action=e,this.relatedTarget=i}},yn=class extends Event{constructor({newState:e,oldState:i,...a}){super("toggle",a),this.newState=e,this.oldState=i}};var Ol=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},H=(t,e,i)=>(Ol(t,e,"read from private field"),i?i.call(t):e.get(t)),V=(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)},je=(t,e,i,a)=>(Ol(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),K=(t,e,i)=>(Ol(t,e,"access private method"),i),et,hi,Nt,kn,Sn,pi,kr,yl,Zc,Cn,Nl,Ln,In,kl,Sl,zc,Il,Qc,Ml,Xc,Ji,ji,ea,Sr,wn,Pl,Cl,Jc,Ul,jc,Ll,em,Hl,tm,wl,im,Rl,am,Tr,Rn,xl,rm,yr,xn,Mn,Dl;function tt({type:t,text:e,value:i,checked:a}){let r=Y.createElement("media-chrome-menu-item");r.type=t!=null?t:"",r.part.add("menu-item"),t&&r.part.add(t),r.value=i,r.checked=a;let o=Y.createElement("span");return o.textContent=e,r.append(o),r}function Ue(t,e){let i=t.querySelector(`:scope > [slot="${e}"]`);if((i==null?void 0:i.nodeName)=="SLOT"&&(i=i.assignedElements({flatten:!0})[0]),i)return i=i.cloneNode(!0),i;let a=t.shadowRoot.querySelector(`[name="${e}"] > svg`);return a?a.cloneNode(!0):""}function qf(t){return`
2654
+ `;function qc({anchor:t,floating:e,placement:i}){let a=Kf({anchor:t,floating:e}),{x:r,y:o}=Yf(a,i);return{x:r,y:o}}function Kf({anchor:t,floating:e}){return{anchor:Gf(t,e.offsetParent),floating:{x:0,y:0,width:e.offsetWidth,height:e.offsetHeight}}}function Gf(t,e){var i;let a=t.getBoundingClientRect(),r=(i=e==null?void 0:e.getBoundingClientRect())!=null?i:{x:0,y:0};return{x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}function Yf({anchor:t,floating:e},i){let a=qf(i)==="x"?"y":"x",r=a==="y"?"height":"width",o=Zc(i),s=t.x+t.width/2-e.width/2,l=t.y+t.height/2-e.height/2,u=t[r]/2-e[r]/2,m;switch(o){case"top":m={x:s,y:t.y-e.height};break;case"bottom":m={x:s,y:t.y+t.height};break;case"right":m={x:t.x+t.width,y:l};break;case"left":m={x:t.x-e.width,y:l};break;default:m={x:t.x,y:t.y}}switch(i.split("-")[1]){case"start":m[a]-=u;break;case"end":m[a]+=u;break}return m}function Zc(t){return t.split("-")[0]}function qf(t){return["top","bottom"].includes(Zc(t))?"y":"x"}var Ot=class extends Event{constructor({action:e="auto",relatedTarget:i,...a}){super("invoke",a),this.action=e,this.relatedTarget=i}},kn=class extends Event{constructor({newState:e,oldState:i,...a}){super("toggle",a),this.newState=e,this.oldState=i}};var Nl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},H=(t,e,i)=>(Nl(t,e,"read from private field"),i?i.call(t):e.get(t)),V=(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)},je=(t,e,i,a)=>(Nl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),K=(t,e,i)=>(Nl(t,e,"access private method"),i),et,hi,Nt,Sn,In,pi,Sr,kl,zc,Ln,Pl,wn,Mn,Sl,Il,Qc,Ml,Xc,Cl,Jc,ji,ea,ta,Ir,Rn,Ul,Ll,jc,Hl,em,wl,tm,Bl,im,Rl,am,xl,rm,yr,xn,Dl,om,kr,Dn,Cn,Ol;function tt({type:t,text:e,value:i,checked:a}){let r=Y.createElement("media-chrome-menu-item");r.type=t!=null?t:"",r.part.add("menu-item"),t&&r.part.add(t),r.value=i,r.checked=a;let o=Y.createElement("span");return o.textContent=e,r.append(o),r}function He(t,e){let i=t.querySelector(`:scope > [slot="${e}"]`);if((i==null?void 0:i.nodeName)=="SLOT"&&(i=i.assignedElements({flatten:!0})[0]),i)return i=i.cloneNode(!0),i;let a=t.shadowRoot.querySelector(`[name="${e}"] > svg`);return a?a.cloneNode(!0):""}function Zf(t){return`
2655
2655
  <style>
2656
2656
  :host {
2657
2657
  font: var(--media-font,
@@ -2826,7 +2826,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2826
2826
  <slot></slot>
2827
2827
  </div>
2828
2828
  <slot name="checked-indicator" hidden></slot>
2829
- `}var mi={STYLE:"style",HIDDEN:"hidden",DISABLED:"disabled",ANCHOR:"anchor"},oe=class extends d.HTMLElement{constructor(){if(super(),V(this,yl),V(this,Cn),V(this,In),V(this,Sl),V(this,Il),V(this,Ml),V(this,ea),V(this,wn),V(this,Cl),V(this,Ul),V(this,Ll),V(this,Hl),V(this,wl),V(this,Rl),V(this,Tr),V(this,xl),V(this,yr),V(this,Mn),V(this,et,null),V(this,hi,null),V(this,Nt,null),V(this,kn,new Set),V(this,Sn,void 0),V(this,pi,!1),V(this,kr,null),V(this,Ln,()=>{let e=H(this,kn),i=new Set(this.items);for(let a of e)i.has(a)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:a}));for(let a of i)e.has(a)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:a}));je(this,kn,i)}),V(this,Ji,()=>{K(this,ea,Sr).call(this),K(this,wn,Pl).call(this,!1)}),V(this,ji,()=>{K(this,ea,Sr).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.shadowRoot.addEventListener("slotchange",this),je(this,Sn,new MutationObserver(H(this,Ln))),H(this,Sn).observe(this.defaultSlot,{childList:!0})}static get observedAttributes(){return[mi.DISABLED,mi.HIDDEN,mi.STYLE,mi.ANCHOR,L.MEDIA_CONTROLLER]}static formatMenuItemText(e,i){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this)}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this)}handleEvent(e){switch(e.type){case"slotchange":K(this,yl,Zc).call(this,e);break;case"invoke":K(this,Sl,zc).call(this,e);break;case"click":K(this,Cl,Jc).call(this,e);break;case"toggle":K(this,Ll,em).call(this,e);break;case"focusout":K(this,wl,im).call(this,e);break;case"keydown":K(this,Rl,am).call(this,e);break}}connectedCallback(){var e,i;je(this,kr,ls(this.shadowRoot,":host")),K(this,In,kl).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),je(this,et,Zr(this)),(i=(e=H(this,et))==null?void 0:e.associateElement)==null||i.call(e,this),this.hidden||(st(Ir(this),H(this,Ji)),st(this,H(this,ji))),K(this,Cn,Nl).call(this)}disconnectedCallback(){var e,i;lt(Ir(this),H(this,Ji)),lt(this,H(this,ji)),this.disable(),(i=(e=H(this,et))==null?void 0:e.unassociateElement)==null||i.call(e,this),je(this,et,null)}attributeChangedCallback(e,i,a){var r,o,s,l;e===mi.HIDDEN&&a!==i?(H(this,pi)||je(this,pi,!0),this.hidden?K(this,Ml,Xc).call(this):K(this,Il,Qc).call(this),this.dispatchEvent(new yn({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===L.MEDIA_CONTROLLER?(i&&((o=(r=H(this,et))==null?void 0:r.unassociateElement)==null||o.call(r,this),je(this,et,null)),a&&this.isConnected&&(je(this,et,Zr(this)),(l=(s=H(this,et))==null?void 0:s.associateElement)==null||l.call(s,this))):e===mi.DISABLED&&a!==i?a==null?this.enable():this.disable():e===mi.STYLE&&a!==i&&K(this,In,kl).call(this)}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}get anchor(){return this.getAttribute("anchor")}set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?(e=Wt(this))==null?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(Zf)}get radioGroupItems(){return this.items.filter(e=>e.role==="menuitemradio")}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,i;return(i=(e=this.checkedItems[0])==null?void 0:e.value)!=null?i:""}set value(e){let i=this.items.find(a=>a.value===e);i&&K(this,Mn,Dl).call(this,i)}focus(){if(je(this,hi,La()),this.items.length){K(this,yr,xn).call(this,this.items[0]),this.items[0].focus();return}let e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');e==null||e.focus()}handleSelect(e){var i;let a=K(this,Tr,Rn).call(this,e);a&&(K(this,Mn,Dl).call(this,a,a.type==="checkbox"),H(this,Nt)&&!this.hidden&&((i=H(this,hi))==null||i.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var i,a;let{key:r}=e,o=this.items,s=(a=(i=K(this,Tr,Rn).call(this,e))!=null?i:K(this,xl,rm).call(this))!=null?a:o[0],l=o.indexOf(s),u=Math.max(0,l);r==="ArrowDown"?u++:r==="ArrowUp"?u--:e.key==="Home"?u=0:e.key==="End"&&(u=o.length-1),u<0&&(u=o.length-1),u>o.length-1&&(u=0),K(this,yr,xn).call(this,o[u]),o[u].focus()}};et=new WeakMap;hi=new WeakMap;Nt=new WeakMap;kn=new WeakMap;Sn=new WeakMap;pi=new WeakMap;kr=new WeakMap;yl=new WeakSet;Zc=function(t){let e=t.target;for(let i of e.assignedNodes({flatten:!0}))i.nodeType===3&&i.textContent.trim()===""&&i.remove();["header","title"].includes(e.name)&&K(this,Cn,Nl).call(this),e.name||H(this,Ln).call(this)};Cn=new WeakSet;Nl=function(){let t=this.shadowRoot.querySelector('slot[name="header"]'),e=this.shadowRoot.querySelector('slot[name="title"]');t.hidden=e.assignedNodes().length===0&&t.assignedNodes().length===0};Ln=new WeakMap;In=new WeakSet;kl=function(){var t;let e=this.shadowRoot.querySelector("#layout-row"),i=(t=getComputedStyle(this).getPropertyValue("--media-menu-layout"))==null?void 0:t.trim();e.setAttribute("media",i==="row"?"":"width:0")};Sl=new WeakSet;zc=function(t){je(this,Nt,t.relatedTarget),de(this,t.relatedTarget)||(this.hidden=!this.hidden)};Il=new WeakSet;Qc=function(){var t;(t=H(this,Nt))==null||t.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),st(Ir(this),H(this,Ji)),st(this,H(this,ji))};Ml=new WeakSet;Xc=function(){var t;(t=H(this,Nt))==null||t.setAttribute("aria-expanded","false"),lt(Ir(this),H(this,Ji)),lt(this,H(this,ji))};Ji=new WeakMap;ji=new WeakMap;ea=new WeakSet;Sr=function(t){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;let{x:e,y:i}=Yc({anchor:this.anchorElement,floating:this,placement:"top-start"});t!=null||(t=this.offsetWidth);let r=Ir(this).getBoundingClientRect(),o=r.width-e-t,s=r.height-i-this.offsetHeight,{style:l}=H(this,kr);l.setProperty("position","absolute"),l.setProperty("right",`${Math.max(0,o)}px`),l.setProperty("--_menu-bottom",`${s}px`);let u=getComputedStyle(this),_=l.getPropertyValue("--_menu-bottom")===u.bottom?s:parseFloat(u.bottom),g=r.height-_-parseFloat(u.marginBottom);this.style.setProperty("--_menu-max-height",`${g}px`)};wn=new WeakSet;Pl=function(t){let e=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=e==null?void 0:e.querySelector('[role="menu"]'),{style:a}=H(this,kr);if(t||a.setProperty("--media-menu-transition-in","none"),i){let r=i.offsetHeight,o=Math.max(i.offsetWidth,e.offsetWidth);this.style.setProperty("min-width",`${o}px`),this.style.setProperty("min-height",`${r}px`),K(this,ea,Sr).call(this,o)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),K(this,ea,Sr).call(this);a.removeProperty("--media-menu-transition-in")};Cl=new WeakSet;Jc=function(t){var e;if(t.stopPropagation(),t.composedPath().includes(H(this,Ul,jc))){(e=H(this,hi))==null||e.focus(),this.hidden=!0;return}let i=K(this,Tr,Rn).call(this,t);!i||i.hasAttribute("disabled")||(K(this,yr,xn).call(this,i),this.handleSelect(t))};Ul=new WeakSet;jc=function(){var t;return(t=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))==null?void 0:t.find(i=>i.matches('button[part~="back"]'))};Ll=new WeakSet;em=function(t){if(t.target===this)return;K(this,Hl,tm).call(this);let e=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(let i of e)i.invokeTargetElement!=t.target&&t.newState=="open"&&i.getAttribute("aria-expanded")=="true"&&!i.invokeTargetElement.hidden&&i.invokeTargetElement.dispatchEvent(new Ot({relatedTarget:i}));for(let i of e)i.setAttribute("aria-expanded",`${!i.submenuElement.hidden}`);K(this,wn,Pl).call(this,!0)};Hl=new WeakSet;tm=function(){let e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)};wl=new WeakSet;im=function(t){var e;de(this,t.relatedTarget)||(H(this,pi)&&((e=H(this,hi))==null||e.focus()),H(this,Nt)&&H(this,Nt)!==t.relatedTarget&&!this.hidden&&(this.hidden=!0))};Rl=new WeakSet;am=function(t){var e,i,a,r,o;let{key:s,ctrlKey:l,altKey:u,metaKey:h}=t;if(!(l||u||h)&&this.keysUsed.includes(s))if(t.preventDefault(),t.stopPropagation(),s==="Tab"){if(H(this,pi)){this.hidden=!0;return}t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()}else s==="Escape"?((o=H(this,hi))==null||o.focus(),H(this,pi)&&(this.hidden=!0)):s==="Enter"||s===" "?this.handleSelect(t):this.handleMove(t)};Tr=new WeakSet;Rn=function(t){return t.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))};xl=new WeakSet;rm=function(){return this.items.find(t=>t.tabIndex===0)};yr=new WeakSet;xn=function(t){for(let e of this.items)e.tabIndex=e===t?0:-1};Mn=new WeakSet;Dl=function(t,e){let i=[...this.checkedItems];t.type==="radio"&&this.radioGroupItems.forEach(a=>a.checked=!1),e?t.checked=!t.checked:t.checked=!0,this.checkedItems.some((a,r)=>a!=i[r])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};oe.shadowRootOptions={mode:"open"};oe.getTemplateHTML=qf;function Zf(t){return["menuitem","menuitemradio","menuitemcheckbox"].includes(t==null?void 0:t.role)}function Ir(t){var e;return(e=t.getAttribute("bounds")?Be(t,`#${t.getAttribute("bounds")}`):Z(t)||t.parentElement)!=null?e:t}d.customElements.get("media-chrome-menu")||d.customElements.define("media-chrome-menu",oe);var Kl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},it=(t,e,i)=>(Kl(t,e,"read from private field"),i?i.call(t):e.get(t)),vt=(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)},Bl=(t,e,i,a)=>(Kl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),He=(t,e,i)=>(Kl(t,e,"access private method"),i),Dn,Cr,$l,om,Nn,Gl,Yl,nm,at,ta,Lr,Wl,sm,On,Fl;function zf(t){return`
2829
+ `}var mi={STYLE:"style",HIDDEN:"hidden",DISABLED:"disabled",ANCHOR:"anchor"},oe=class extends d.HTMLElement{constructor(){if(super(),V(this,kl),V(this,Ln),V(this,Mn),V(this,Il),V(this,Ml),V(this,Cl),V(this,ta),V(this,Rn),V(this,Ll),V(this,Hl),V(this,wl),V(this,Bl),V(this,Rl),V(this,xl),V(this,yr),V(this,Dl),V(this,kr),V(this,Cn),V(this,et,null),V(this,hi,null),V(this,Nt,null),V(this,Sn,new Set),V(this,In,void 0),V(this,pi,!1),V(this,Sr,null),V(this,wn,()=>{let e=H(this,Sn),i=new Set(this.items);for(let a of e)i.has(a)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:a}));for(let a of i)e.has(a)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:a}));je(this,Sn,i)}),V(this,ji,()=>{K(this,ta,Ir).call(this),K(this,Rn,Ul).call(this,!1)}),V(this,ea,()=>{K(this,ta,Ir).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.shadowRoot.addEventListener("slotchange",this),je(this,In,new MutationObserver(H(this,wn))),H(this,In).observe(this.defaultSlot,{childList:!0})}static get observedAttributes(){return[mi.DISABLED,mi.HIDDEN,mi.STYLE,mi.ANCHOR,L.MEDIA_CONTROLLER]}static formatMenuItemText(e,i){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this)}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this)}handleEvent(e){switch(e.type){case"slotchange":K(this,kl,zc).call(this,e);break;case"invoke":K(this,Il,Qc).call(this,e);break;case"click":K(this,Ll,jc).call(this,e);break;case"toggle":K(this,wl,tm).call(this,e);break;case"focusout":K(this,Rl,am).call(this,e);break;case"keydown":K(this,xl,rm).call(this,e);break}}connectedCallback(){var e,i;je(this,Sr,ds(this.shadowRoot,":host")),K(this,Mn,Sl).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),je(this,et,zr(this)),(i=(e=H(this,et))==null?void 0:e.associateElement)==null||i.call(e,this),this.hidden||(st(Mr(this),H(this,ji)),st(this,H(this,ea))),K(this,Ln,Pl).call(this)}disconnectedCallback(){var e,i;lt(Mr(this),H(this,ji)),lt(this,H(this,ea)),this.disable(),(i=(e=H(this,et))==null?void 0:e.unassociateElement)==null||i.call(e,this),je(this,et,null)}attributeChangedCallback(e,i,a){var r,o,s,l;e===mi.HIDDEN&&a!==i?(H(this,pi)||je(this,pi,!0),this.hidden?K(this,Cl,Jc).call(this):K(this,Ml,Xc).call(this),this.dispatchEvent(new kn({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===L.MEDIA_CONTROLLER?(i&&((o=(r=H(this,et))==null?void 0:r.unassociateElement)==null||o.call(r,this),je(this,et,null)),a&&this.isConnected&&(je(this,et,zr(this)),(l=(s=H(this,et))==null?void 0:s.associateElement)==null||l.call(s,this))):e===mi.DISABLED&&a!==i?a==null?this.enable():this.disable():e===mi.STYLE&&a!==i&&K(this,Mn,Sl).call(this)}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}get anchor(){return this.getAttribute("anchor")}set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?(e=Wt(this))==null?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(zf)}get radioGroupItems(){return this.items.filter(e=>e.role==="menuitemradio")}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,i;return(i=(e=this.checkedItems[0])==null?void 0:e.value)!=null?i:""}set value(e){let i=this.items.find(a=>a.value===e);i&&K(this,Cn,Ol).call(this,i)}focus(){if(je(this,hi,wa()),this.items.length){K(this,kr,Dn).call(this,this.items[0]),this.items[0].focus();return}let e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');e==null||e.focus()}handleSelect(e){var i;let a=K(this,yr,xn).call(this,e);a&&(K(this,Cn,Ol).call(this,a,a.type==="checkbox"),H(this,Nt)&&!this.hidden&&((i=H(this,hi))==null||i.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var i,a;let{key:r}=e,o=this.items,s=(a=(i=K(this,yr,xn).call(this,e))!=null?i:K(this,Dl,om).call(this))!=null?a:o[0],l=o.indexOf(s),u=Math.max(0,l);r==="ArrowDown"?u++:r==="ArrowUp"?u--:e.key==="Home"?u=0:e.key==="End"&&(u=o.length-1),u<0&&(u=o.length-1),u>o.length-1&&(u=0),K(this,kr,Dn).call(this,o[u]),o[u].focus()}};et=new WeakMap;hi=new WeakMap;Nt=new WeakMap;Sn=new WeakMap;In=new WeakMap;pi=new WeakMap;Sr=new WeakMap;kl=new WeakSet;zc=function(t){let e=t.target;for(let i of e.assignedNodes({flatten:!0}))i.nodeType===3&&i.textContent.trim()===""&&i.remove();["header","title"].includes(e.name)&&K(this,Ln,Pl).call(this),e.name||H(this,wn).call(this)};Ln=new WeakSet;Pl=function(){let t=this.shadowRoot.querySelector('slot[name="header"]'),e=this.shadowRoot.querySelector('slot[name="title"]');t.hidden=e.assignedNodes().length===0&&t.assignedNodes().length===0};wn=new WeakMap;Mn=new WeakSet;Sl=function(){var t;let e=this.shadowRoot.querySelector("#layout-row"),i=(t=getComputedStyle(this).getPropertyValue("--media-menu-layout"))==null?void 0:t.trim();e.setAttribute("media",i==="row"?"":"width:0")};Il=new WeakSet;Qc=function(t){je(this,Nt,t.relatedTarget),de(this,t.relatedTarget)||(this.hidden=!this.hidden)};Ml=new WeakSet;Xc=function(){var t;(t=H(this,Nt))==null||t.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),st(Mr(this),H(this,ji)),st(this,H(this,ea))};Cl=new WeakSet;Jc=function(){var t;(t=H(this,Nt))==null||t.setAttribute("aria-expanded","false"),lt(Mr(this),H(this,ji)),lt(this,H(this,ea))};ji=new WeakMap;ea=new WeakMap;ta=new WeakSet;Ir=function(t){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;let{x:e,y:i}=qc({anchor:this.anchorElement,floating:this,placement:"top-start"});t!=null||(t=this.offsetWidth);let r=Mr(this).getBoundingClientRect(),o=r.width-e-t,s=r.height-i-this.offsetHeight,{style:l}=H(this,Sr);l.setProperty("position","absolute"),l.setProperty("right",`${Math.max(0,o)}px`),l.setProperty("--_menu-bottom",`${s}px`);let u=getComputedStyle(this),_=l.getPropertyValue("--_menu-bottom")===u.bottom?s:parseFloat(u.bottom),g=r.height-_-parseFloat(u.marginBottom);this.style.setProperty("--_menu-max-height",`${g}px`)};Rn=new WeakSet;Ul=function(t){let e=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=e==null?void 0:e.querySelector('[role="menu"]'),{style:a}=H(this,Sr);if(t||a.setProperty("--media-menu-transition-in","none"),i){let r=i.offsetHeight,o=Math.max(i.offsetWidth,e.offsetWidth);this.style.setProperty("min-width",`${o}px`),this.style.setProperty("min-height",`${r}px`),K(this,ta,Ir).call(this,o)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),K(this,ta,Ir).call(this);a.removeProperty("--media-menu-transition-in")};Ll=new WeakSet;jc=function(t){var e;if(t.stopPropagation(),t.composedPath().includes(H(this,Hl,em))){(e=H(this,hi))==null||e.focus(),this.hidden=!0;return}let i=K(this,yr,xn).call(this,t);!i||i.hasAttribute("disabled")||(K(this,kr,Dn).call(this,i),this.handleSelect(t))};Hl=new WeakSet;em=function(){var t;return(t=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))==null?void 0:t.find(i=>i.matches('button[part~="back"]'))};wl=new WeakSet;tm=function(t){if(t.target===this)return;K(this,Bl,im).call(this);let e=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(let i of e)i.invokeTargetElement!=t.target&&t.newState=="open"&&i.getAttribute("aria-expanded")=="true"&&!i.invokeTargetElement.hidden&&i.invokeTargetElement.dispatchEvent(new Ot({relatedTarget:i}));for(let i of e)i.setAttribute("aria-expanded",`${!i.submenuElement.hidden}`);K(this,Rn,Ul).call(this,!0)};Bl=new WeakSet;im=function(){let e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)};Rl=new WeakSet;am=function(t){var e;de(this,t.relatedTarget)||(H(this,pi)&&((e=H(this,hi))==null||e.focus()),H(this,Nt)&&H(this,Nt)!==t.relatedTarget&&!this.hidden&&(this.hidden=!0))};xl=new WeakSet;rm=function(t){var e,i,a,r,o;let{key:s,ctrlKey:l,altKey:u,metaKey:m}=t;if(!(l||u||m)&&this.keysUsed.includes(s))if(t.preventDefault(),t.stopPropagation(),s==="Tab"){if(H(this,pi)){this.hidden=!0;return}t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()}else s==="Escape"?((o=H(this,hi))==null||o.focus(),H(this,pi)&&(this.hidden=!0)):s==="Enter"||s===" "?this.handleSelect(t):this.handleMove(t)};yr=new WeakSet;xn=function(t){return t.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))};Dl=new WeakSet;om=function(){return this.items.find(t=>t.tabIndex===0)};kr=new WeakSet;Dn=function(t){for(let e of this.items)e.tabIndex=e===t?0:-1};Cn=new WeakSet;Ol=function(t,e){let i=[...this.checkedItems];t.type==="radio"&&this.radioGroupItems.forEach(a=>a.checked=!1),e?t.checked=!t.checked:t.checked=!0,this.checkedItems.some((a,r)=>a!=i[r])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};oe.shadowRootOptions={mode:"open"};oe.getTemplateHTML=Zf;function zf(t){return["menuitem","menuitemradio","menuitemcheckbox"].includes(t==null?void 0:t.role)}function Mr(t){var e;return(e=t.getAttribute("bounds")?$e(t,`#${t.getAttribute("bounds")}`):Z(t)||t.parentElement)!=null?e:t}d.customElements.get("media-chrome-menu")||d.customElements.define("media-chrome-menu",oe);var Gl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},it=(t,e,i)=>(Gl(t,e,"read from private field"),i?i.call(t):e.get(t)),vt=(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)},$l=(t,e,i,a)=>(Gl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Be=(t,e,i)=>(Gl(t,e,"access private method"),i),On,Lr,Wl,nm,Pn,Yl,ql,sm,at,ia,wr,Fl,lm,Nn,Vl;function Qf(t){return`
2830
2830
  <style>
2831
2831
  :host {
2832
2832
  transition: var(--media-menu-item-transition,
@@ -2944,7 +2944,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2944
2944
  ${this.getSuffixSlotInnerHTML(t)}
2945
2945
  </slot>
2946
2946
  <slot name="submenu"></slot>
2947
- `}function Qf(t){return""}var we={TYPE:"type",VALUE:"value",CHECKED:"checked",DISABLED:"disabled"},rt=class extends d.HTMLElement{constructor(){if(super(),vt(this,$l),vt(this,Nn),vt(this,Yl),vt(this,ta),vt(this,Wl),vt(this,On),vt(this,Dn,!1),vt(this,Cr,void 0),vt(this,at,()=>{var e,i;this.submenuElement.items&&this.setAttribute("submenusize",`${this.submenuElement.items.length}`);let a=this.shadowRoot.querySelector('slot[name="description"]'),r=(e=this.submenuElement.checkedItems)==null?void 0:e[0],o=(i=r==null?void 0:r.dataset.description)!=null?i:r==null?void 0:r.text,s=Y.createElement("span");s.textContent=o!=null?o:"",a.replaceChildren(s)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.shadowRoot.addEventListener("slotchange",this)}static get observedAttributes(){return[we.TYPE,we.DISABLED,we.CHECKED,we.VALUE]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),Mr(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","false"),this.addEventListener("click",this),this.addEventListener("keydown",this)}disable(){this.removeAttribute("tabindex"),this.removeEventListener("click",this),this.removeEventListener("keydown",this),this.removeEventListener("keyup",this)}handleEvent(e){switch(e.type){case"slotchange":He(this,$l,om).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":He(this,Wl,sm).call(this,e);break;case"keyup":He(this,ta,Lr).call(this,e);break}}attributeChangedCallback(e,i,a){e===we.CHECKED&&Mr(this)&&!it(this,Dn)?this.setAttribute("aria-checked",a!=null?"true":"false"):e===we.TYPE&&a!==i?this.role="menuitem"+a:e===we.DISABLED&&a!==i&&(a==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(we.DISABLED)||this.enable(),this.role="menuitem"+this.type,Bl(this,Cr,Vl(this,this.parentNode)),He(this,On,Fl).call(this),this.submenuElement&&He(this,Nn,Gl).call(this)}disconnectedCallback(){this.disable(),He(this,On,Fl).call(this),Bl(this,Cr,null)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=Wt(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):this.submenuElement}get submenuElement(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}get type(){var e;return(e=this.getAttribute(we.TYPE))!=null?e:""}set type(e){this.setAttribute(we.TYPE,`${e}`)}get value(){var e;return(e=this.getAttribute(we.VALUE))!=null?e:this.text}set value(e){this.setAttribute(we.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get checked(){if(Mr(this))return this.getAttribute("aria-checked")==="true"}set checked(e){Mr(this)&&(Bl(this,Dn,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){Mr(this)||this.invokeTargetElement&&de(this,e.target)&&this.invokeTargetElement.dispatchEvent(new Ot({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}};Dn=new WeakMap;Cr=new WeakMap;$l=new WeakSet;om=function(t){let e=t.target;if(!(e!=null&&e.name))for(let a of e.assignedNodes({flatten:!0}))a instanceof Text&&a.textContent.trim()===""&&a.remove();e.name==="submenu"&&(this.submenuElement?He(this,Nn,Gl).call(this):He(this,Yl,nm).call(this))};Nn=new WeakSet;Gl=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",it(this,at)),this.submenuElement.addEventListener("addmenuitem",it(this,at)),this.submenuElement.addEventListener("removemenuitem",it(this,at)),it(this,at).call(this)};Yl=new WeakSet;nm=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",it(this,at)),this.submenuElement.removeEventListener("addmenuitem",it(this,at)),this.submenuElement.removeEventListener("removemenuitem",it(this,at)),it(this,at).call(this)};at=new WeakMap;ta=new WeakSet;Lr=function(t){let{key:e}=t;if(!this.keysUsed.includes(e)){this.removeEventListener("keyup",He(this,ta,Lr));return}this.handleClick(t)};Wl=new WeakSet;sm=function(t){let{metaKey:e,altKey:i,key:a}=t;if(e||i||!this.keysUsed.includes(a)){this.removeEventListener("keyup",He(this,ta,Lr));return}this.addEventListener("keyup",He(this,ta,Lr),{once:!0})};On=new WeakSet;Fl=function(){var t;let e=(t=it(this,Cr))==null?void 0:t.radioGroupItems;if(!e)return;let i=e.filter(a=>a.getAttribute("aria-checked")==="true").pop();i||(i=e[0]);for(let a of e)a.setAttribute("aria-checked","false");i==null||i.setAttribute("aria-checked","true")};rt.shadowRootOptions={mode:"open"};rt.getTemplateHTML=zf;rt.getSuffixSlotInnerHTML=Qf;function Mr(t){return t.type==="radio"||t.type==="checkbox"}function Vl(t,e){if(!t)return null;let{host:i}=t.getRootNode();return!e&&i?Vl(t,i):e!=null&&e.items?e:Vl(e,e==null?void 0:e.parentNode)}d.customElements.get("media-chrome-menu-item")||d.customElements.define("media-chrome-menu-item",rt);function Xf(t){return`
2947
+ `}function Xf(t){return""}var Re={TYPE:"type",VALUE:"value",CHECKED:"checked",DISABLED:"disabled"},rt=class extends d.HTMLElement{constructor(){if(super(),vt(this,Wl),vt(this,Pn),vt(this,ql),vt(this,ia),vt(this,Fl),vt(this,Nn),vt(this,On,!1),vt(this,Lr,void 0),vt(this,at,()=>{var e,i;this.submenuElement.items&&this.setAttribute("submenusize",`${this.submenuElement.items.length}`);let a=this.shadowRoot.querySelector('slot[name="description"]'),r=(e=this.submenuElement.checkedItems)==null?void 0:e[0],o=(i=r==null?void 0:r.dataset.description)!=null?i:r==null?void 0:r.text,s=Y.createElement("span");s.textContent=o!=null?o:"",a.replaceChildren(s)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=q(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.shadowRoot.addEventListener("slotchange",this)}static get observedAttributes(){return[Re.TYPE,Re.DISABLED,Re.CHECKED,Re.VALUE]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),Cr(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","false"),this.addEventListener("click",this),this.addEventListener("keydown",this)}disable(){this.removeAttribute("tabindex"),this.removeEventListener("click",this),this.removeEventListener("keydown",this),this.removeEventListener("keyup",this)}handleEvent(e){switch(e.type){case"slotchange":Be(this,Wl,nm).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":Be(this,Fl,lm).call(this,e);break;case"keyup":Be(this,ia,wr).call(this,e);break}}attributeChangedCallback(e,i,a){e===Re.CHECKED&&Cr(this)&&!it(this,On)?this.setAttribute("aria-checked",a!=null?"true":"false"):e===Re.TYPE&&a!==i?this.role="menuitem"+a:e===Re.DISABLED&&a!==i&&(a==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(Re.DISABLED)||this.enable(),this.role="menuitem"+this.type,$l(this,Lr,Kl(this,this.parentNode)),Be(this,Nn,Vl).call(this),this.submenuElement&&Be(this,Pn,Yl).call(this)}disconnectedCallback(){this.disable(),Be(this,Nn,Vl).call(this),$l(this,Lr,null)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=Wt(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):this.submenuElement}get submenuElement(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}get type(){var e;return(e=this.getAttribute(Re.TYPE))!=null?e:""}set type(e){this.setAttribute(Re.TYPE,`${e}`)}get value(){var e;return(e=this.getAttribute(Re.VALUE))!=null?e:this.text}set value(e){this.setAttribute(Re.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get checked(){if(Cr(this))return this.getAttribute("aria-checked")==="true"}set checked(e){Cr(this)&&($l(this,On,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){Cr(this)||this.invokeTargetElement&&de(this,e.target)&&this.invokeTargetElement.dispatchEvent(new Ot({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}};On=new WeakMap;Lr=new WeakMap;Wl=new WeakSet;nm=function(t){let e=t.target;if(!(e!=null&&e.name))for(let a of e.assignedNodes({flatten:!0}))a instanceof Text&&a.textContent.trim()===""&&a.remove();e.name==="submenu"&&(this.submenuElement?Be(this,Pn,Yl).call(this):Be(this,ql,sm).call(this))};Pn=new WeakSet;Yl=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",it(this,at)),this.submenuElement.addEventListener("addmenuitem",it(this,at)),this.submenuElement.addEventListener("removemenuitem",it(this,at)),it(this,at).call(this)};ql=new WeakSet;sm=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",it(this,at)),this.submenuElement.removeEventListener("addmenuitem",it(this,at)),this.submenuElement.removeEventListener("removemenuitem",it(this,at)),it(this,at).call(this)};at=new WeakMap;ia=new WeakSet;wr=function(t){let{key:e}=t;if(!this.keysUsed.includes(e)){this.removeEventListener("keyup",Be(this,ia,wr));return}this.handleClick(t)};Fl=new WeakSet;lm=function(t){let{metaKey:e,altKey:i,key:a}=t;if(e||i||!this.keysUsed.includes(a)){this.removeEventListener("keyup",Be(this,ia,wr));return}this.addEventListener("keyup",Be(this,ia,wr),{once:!0})};Nn=new WeakSet;Vl=function(){var t;let e=(t=it(this,Lr))==null?void 0:t.radioGroupItems;if(!e)return;let i=e.filter(a=>a.getAttribute("aria-checked")==="true").pop();i||(i=e[0]);for(let a of e)a.setAttribute("aria-checked","false");i==null||i.setAttribute("aria-checked","true")};rt.shadowRootOptions={mode:"open"};rt.getTemplateHTML=Qf;rt.getSuffixSlotInnerHTML=Xf;function Cr(t){return t.type==="radio"||t.type==="checkbox"}function Kl(t,e){if(!t)return null;let{host:i}=t.getRootNode();return!e&&i?Kl(t,i):e!=null&&e.items?e:Kl(e,e==null?void 0:e.parentNode)}d.customElements.get("media-chrome-menu-item")||d.customElements.define("media-chrome-menu-item",rt);function Jf(t){return`
2948
2948
  ${oe.getTemplateHTML(t)}
2949
2949
  <style>
2950
2950
  :host {
@@ -2979,7 +2979,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2979
2979
  --media-settings-menu-item-opacity: 0;
2980
2980
  }
2981
2981
  </style>
2982
- `}var wr=class extends oe{get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Z(this).querySelector("media-settings-menu-button")}};wr.getTemplateHTML=Xf;d.customElements.get("media-settings-menu")||d.customElements.define("media-settings-menu",wr);function Jf(t){return`
2982
+ `}var Rr=class extends oe{get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Z(this).querySelector("media-settings-menu-button")}};Rr.getTemplateHTML=Jf;d.customElements.get("media-settings-menu")||d.customElements.define("media-settings-menu",Rr);function jf(t){return`
2983
2983
  ${rt.getTemplateHTML.call(this,t)}
2984
2984
  <style>
2985
2985
  slot:not([name="submenu"]) {
@@ -2990,11 +2990,11 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2990
2990
  background: transparent;
2991
2991
  }
2992
2992
  </style>
2993
- `}function jf(t){return`
2993
+ `}function ev(t){return`
2994
2994
  <svg aria-hidden="true" viewBox="0 0 20 24">
2995
2995
  <path d="m8.12 17.585-.742-.669 4.2-4.665-4.2-4.666.743-.669 4.803 5.335-4.803 5.334Z"/>
2996
2996
  </svg>
2997
- `}var fi=class extends rt{};fi.shadowRootOptions={mode:"open"};fi.getTemplateHTML=Jf;fi.getSuffixSlotInnerHTML=jf;d.customElements.get("media-settings-menu-item")||d.customElements.define("media-settings-menu-item",fi);var ge=class extends B{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=Wt(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;(e=this.invokeTargetElement)==null||e.dispatchEvent(new Ot({relatedTarget:this}))}};d.customElements.get("media-chrome-menu-button")||d.customElements.define("media-chrome-menu-button",ge);function ev(){return`
2997
+ `}var fi=class extends rt{};fi.shadowRootOptions={mode:"open"};fi.getTemplateHTML=jf;fi.getSuffixSlotInnerHTML=ev;d.customElements.get("media-settings-menu-item")||d.customElements.define("media-settings-menu-item",fi);var ge=class extends B{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=Wt(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;(e=this.invokeTargetElement)==null||e.dispatchEvent(new Ot({relatedTarget:this}))}};d.customElements.get("media-chrome-menu-button")||d.customElements.define("media-chrome-menu-button",ge);function tv(){return`
2998
2998
  <style>
2999
2999
  :host([aria-expanded="true"]) slot[name=tooltip] {
3000
3000
  display: none;
@@ -3005,34 +3005,34 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3005
3005
  <path d="M4.5 14.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"/>
3006
3006
  </svg>
3007
3007
  </slot>
3008
- `}function tv(){return m("Settings")}var ia=class extends ge{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",m("settings"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Z(this).querySelector("media-settings-menu")}};ia.getSlotTemplateHTML=ev;ia.getTooltipContentHTML=tv;d.customElements.get("media-settings-menu-button")||d.customElements.define("media-settings-menu-button",ia);var Ql=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},lm=(t,e,i)=>(Ql(t,e,"read from private field"),i?i.call(t):e.get(t)),Pn=(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)},ql=(t,e,i,a)=>(Ql(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Un=(t,e,i)=>(Ql(t,e,"access private method"),i),Rr,$n,Hn,Zl,Bn,zl,Wn=class extends oe{constructor(){super(...arguments),Pn(this,Hn),Pn(this,Bn),Pn(this,Rr,[]),Pn(this,$n,void 0)}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_AUDIO_TRACK_LIST,n.MEDIA_AUDIO_TRACK_ENABLED,n.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_AUDIO_TRACK_ENABLED&&i!==a?this.value=a:e===n.MEDIA_AUDIO_TRACK_LIST&&i!==a&&(ql(this,Rr,$d(a!=null?a:"")),Un(this,Hn,Zl).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Un(this,Bn,zl))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Un(this,Bn,zl))}get anchorElement(){var e;return this.anchor!=="auto"?super.anchorElement:(e=Z(this))==null?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return lm(this,Rr)}set mediaAudioTrackList(e){ql(this,Rr,e),Un(this,Hn,Zl).call(this)}get mediaAudioTrackEnabled(){var e;return(e=I(this,n.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){M(this,n.MEDIA_AUDIO_TRACK_ENABLED,e)}};Rr=new WeakMap;$n=new WeakMap;Hn=new WeakSet;Zl=function(){if(lm(this,$n)===JSON.stringify(this.mediaAudioTrackList))return;ql(this,$n,JSON.stringify(this.mediaAudioTrackList));let t=this.mediaAudioTrackList;this.defaultSlot.textContent="";for(let e of t){let i=this.formatMenuItemText(e.label,e),a=tt({type:"radio",text:i,value:`${e.id}`,checked:e.enabled});a.prepend(Ue(this,"checked-indicator")),this.defaultSlot.append(a)}};Bn=new WeakSet;zl=function(){if(this.value==null)return;let t=new d.CustomEvent(p.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};d.customElements.get("media-audio-track-menu")||d.customElements.define("media-audio-track-menu",Wn);var iv=`<svg aria-hidden="true" viewBox="0 0 24 24">
3008
+ `}function iv(){return h("Settings")}var aa=class extends ge{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",h("settings"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Z(this).querySelector("media-settings-menu")}};aa.getSlotTemplateHTML=tv;aa.getTooltipContentHTML=iv;d.customElements.get("media-settings-menu-button")||d.customElements.define("media-settings-menu-button",aa);var Xl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},dm=(t,e,i)=>(Xl(t,e,"read from private field"),i?i.call(t):e.get(t)),Un=(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)},Zl=(t,e,i,a)=>(Xl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Hn=(t,e,i)=>(Xl(t,e,"access private method"),i),xr,Wn,Bn,zl,$n,Ql,Fn=class extends oe{constructor(){super(...arguments),Un(this,Bn),Un(this,$n),Un(this,xr,[]),Un(this,Wn,void 0)}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_AUDIO_TRACK_LIST,n.MEDIA_AUDIO_TRACK_ENABLED,n.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_AUDIO_TRACK_ENABLED&&i!==a?this.value=a:e===n.MEDIA_AUDIO_TRACK_LIST&&i!==a&&(Zl(this,xr,Wd(a!=null?a:"")),Hn(this,Bn,zl).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Hn(this,$n,Ql))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Hn(this,$n,Ql))}get anchorElement(){var e;return this.anchor!=="auto"?super.anchorElement:(e=Z(this))==null?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return dm(this,xr)}set mediaAudioTrackList(e){Zl(this,xr,e),Hn(this,Bn,zl).call(this)}get mediaAudioTrackEnabled(){var e;return(e=I(this,n.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){M(this,n.MEDIA_AUDIO_TRACK_ENABLED,e)}};xr=new WeakMap;Wn=new WeakMap;Bn=new WeakSet;zl=function(){if(dm(this,Wn)===JSON.stringify(this.mediaAudioTrackList))return;Zl(this,Wn,JSON.stringify(this.mediaAudioTrackList));let t=this.mediaAudioTrackList;this.defaultSlot.textContent="";for(let e of t){let i=this.formatMenuItemText(e.label,e),a=tt({type:"radio",text:i,value:`${e.id}`,checked:e.enabled});a.prepend(He(this,"checked-indicator")),this.defaultSlot.append(a)}};$n=new WeakSet;Ql=function(){if(this.value==null)return;let t=new d.CustomEvent(p.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};d.customElements.get("media-audio-track-menu")||d.customElements.define("media-audio-track-menu",Fn);var av=`<svg aria-hidden="true" viewBox="0 0 24 24">
3009
3009
  <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>
3010
3010
  <path d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-2 0a8 8 0 1 0-16 0 8 8 0 0 0 16 0Z"/>
3011
- </svg>`;function av(){return`
3011
+ </svg>`;function rv(){return`
3012
3012
  <style>
3013
3013
  :host([aria-expanded="true"]) slot[name=tooltip] {
3014
3014
  display: none;
3015
3015
  }
3016
3016
  </style>
3017
- <slot name="icon">${iv}</slot>
3018
- `}function rv(){return m("Audio")}var dm=t=>{let e=m("Audio");t.setAttribute("aria-label",e)},aa=class extends ge{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_AUDIO_TRACK_ENABLED,n.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),dm(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_LANG&&dm(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Z(this))==null?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return(e=I(this,n.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){M(this,n.MEDIA_AUDIO_TRACK_ENABLED,e)}};aa.getSlotTemplateHTML=av;aa.getTooltipContentHTML=rv;d.customElements.get("media-audio-track-menu-button")||d.customElements.define("media-audio-track-menu-button",aa);var td=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ov=(t,e,i)=>(td(t,e,"read from private field"),i?i.call(t):e.get(t)),Xl=(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)},nv=(t,e,i,a)=>(td(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Jl=(t,e,i)=>(td(t,e,"access private method"),i),Vn,jl,mm,Fn,ed,sv=`
3017
+ <slot name="icon">${av}</slot>
3018
+ `}function ov(){return h("Audio")}var um=t=>{let e=h("Audio");t.setAttribute("aria-label",e)},ra=class extends ge{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_AUDIO_TRACK_ENABLED,n.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),um(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_LANG&&um(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Z(this))==null?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return(e=I(this,n.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){M(this,n.MEDIA_AUDIO_TRACK_ENABLED,e)}};ra.getSlotTemplateHTML=rv;ra.getTooltipContentHTML=ov;d.customElements.get("media-audio-track-menu-button")||d.customElements.define("media-audio-track-menu-button",ra);var id=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},nv=(t,e,i)=>(id(t,e,"read from private field"),i?i.call(t):e.get(t)),Jl=(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)},sv=(t,e,i,a)=>(id(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),jl=(t,e,i)=>(id(t,e,"access private method"),i),Kn,ed,hm,Vn,td,lv=`
3019
3019
  <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator">
3020
3020
  <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
3021
- </svg>`;function lv(t){return`
3021
+ </svg>`;function dv(t){return`
3022
3022
  ${oe.getTemplateHTML(t)}
3023
- <slot name="captions-indicator" hidden>${sv}</slot>
3024
- `}var xr=class extends oe{constructor(){super(...arguments),Xl(this,jl),Xl(this,Fn),Xl(this,Vn,void 0)}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_SUBTITLES_LIST,n.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_SUBTITLES_LIST&&i!==a?Jl(this,jl,mm).call(this):e===n.MEDIA_SUBTITLES_SHOWING&&i!==a&&(this.value=a)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Jl(this,Fn,ed))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Jl(this,Fn,ed))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Z(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return um(this,n.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){cm(this,n.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return um(this,n.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){cm(this,n.MEDIA_SUBTITLES_SHOWING,e)}};Vn=new WeakMap;jl=new WeakSet;mm=function(){var t;if(ov(this,Vn)===JSON.stringify(this.mediaSubtitlesList))return;nv(this,Vn,JSON.stringify(this.mediaSubtitlesList)),this.defaultSlot.textContent="";let e=!this.value,i=tt({type:"radio",text:this.formatMenuItemText(m("Off")),value:"off",checked:e});i.prepend(Ue(this,"checked-indicator")),this.defaultSlot.append(i);let a=this.mediaSubtitlesList;for(let r of a){let o=tt({type:"radio",text:this.formatMenuItemText(r.label,r),value:so(r),checked:this.value==so(r)});o.prepend(Ue(this,"checked-indicator")),((t=r.kind)!=null?t:"subs")==="captions"&&o.append(Ue(this,"captions-indicator")),this.defaultSlot.append(o)}};Fn=new WeakSet;ed=function(){let t=this.mediaSubtitlesShowing,e=this.getAttribute(n.MEDIA_SUBTITLES_SHOWING),i=this.value!==e;if(t!=null&&t.length&&i&&this.dispatchEvent(new d.CustomEvent(p.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:t})),!this.value||!i)return;let a=new d.CustomEvent(p.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)};xr.getTemplateHTML=lv;var um=(t,e)=>{let i=t.getAttribute(e);return i?Gt(i):[]},cm=(t,e,i)=>{if(!(i!=null&&i.length)){t.removeAttribute(e);return}let a=ut(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};d.customElements.get("media-captions-menu")||d.customElements.define("media-captions-menu",xr);var dv=`<svg aria-hidden="true" viewBox="0 0 26 24">
3023
+ <slot name="captions-indicator" hidden>${lv}</slot>
3024
+ `}var Dr=class extends oe{constructor(){super(...arguments),Jl(this,ed),Jl(this,Vn),Jl(this,Kn,void 0)}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_SUBTITLES_LIST,n.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_SUBTITLES_LIST&&i!==a?jl(this,ed,hm).call(this):e===n.MEDIA_SUBTITLES_SHOWING&&i!==a&&(this.value=a)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",jl(this,Vn,td))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",jl(this,Vn,td))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Z(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return cm(this,n.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){mm(this,n.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return cm(this,n.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){mm(this,n.MEDIA_SUBTITLES_SHOWING,e)}};Kn=new WeakMap;ed=new WeakSet;hm=function(){var t;if(nv(this,Kn)===JSON.stringify(this.mediaSubtitlesList))return;sv(this,Kn,JSON.stringify(this.mediaSubtitlesList)),this.defaultSlot.textContent="";let e=!this.value,i=tt({type:"radio",text:this.formatMenuItemText(h("Off")),value:"off",checked:e});i.prepend(He(this,"checked-indicator")),this.defaultSlot.append(i);let a=this.mediaSubtitlesList;for(let r of a){let o=tt({type:"radio",text:this.formatMenuItemText(r.label,r),value:lo(r),checked:this.value==lo(r)});o.prepend(He(this,"checked-indicator")),((t=r.kind)!=null?t:"subs")==="captions"&&o.append(He(this,"captions-indicator")),this.defaultSlot.append(o)}};Vn=new WeakSet;td=function(){let t=this.mediaSubtitlesShowing,e=this.getAttribute(n.MEDIA_SUBTITLES_SHOWING),i=this.value!==e;if(t!=null&&t.length&&i&&this.dispatchEvent(new d.CustomEvent(p.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:t})),!this.value||!i)return;let a=new d.CustomEvent(p.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)};Dr.getTemplateHTML=dv;var cm=(t,e)=>{let i=t.getAttribute(e);return i?Gt(i):[]},mm=(t,e,i)=>{if(!(i!=null&&i.length)){t.removeAttribute(e);return}let a=ut(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};d.customElements.get("media-captions-menu")||d.customElements.define("media-captions-menu",Dr);var uv=`<svg aria-hidden="true" viewBox="0 0 26 24">
3025
3025
  <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
3026
- </svg>`,uv=`<svg aria-hidden="true" viewBox="0 0 26 24">
3026
+ </svg>`,cv=`<svg aria-hidden="true" viewBox="0 0 26 24">
3027
3027
  <path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>
3028
- </svg>`;function cv(){return`
3028
+ </svg>`;function mv(){return`
3029
3029
  <style>
3030
- :host([aria-checked="true"]) slot[name=off] {
3030
+ :host([data-captions-enabled="true"]) slot[name=off] {
3031
3031
  display: none !important;
3032
3032
  }
3033
3033
 
3034
3034
 
3035
- :host(:not([aria-checked="true"])) slot[name=on] {
3035
+ :host(:not([data-captions-enabled="true"])) slot[name=on] {
3036
3036
  display: none !important;
3037
3037
  }
3038
3038
 
@@ -3042,10 +3042,10 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3042
3042
  </style>
3043
3043
 
3044
3044
  <slot name="icon">
3045
- <slot name="on">${dv}</slot>
3046
- <slot name="off">${uv}</slot>
3045
+ <slot name="on">${uv}</slot>
3046
+ <slot name="off">${cv}</slot>
3047
3047
  </slot>
3048
- `}function mv(){return m("Captions")}var hm=t=>{t.setAttribute("aria-checked",lo(t).toString())},pm=t=>{t.setAttribute("aria-label",m("closed captions"))},ra=class extends ge{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_SUBTITLES_LIST,n.MEDIA_SUBTITLES_SHOWING,n.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),pm(this),hm(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_SUBTITLES_SHOWING?hm(this):e===n.MEDIA_LANG&&pm(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Z(this))==null?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return fm(this,n.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){vm(this,n.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return fm(this,n.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){vm(this,n.MEDIA_SUBTITLES_SHOWING,e)}};ra.getSlotTemplateHTML=cv;ra.getTooltipContentHTML=mv;var fm=(t,e)=>{let i=t.getAttribute(e);return i?Gt(i):[]},vm=(t,e,i)=>{if(!(i!=null&&i.length)){t.removeAttribute(e);return}let a=ut(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};d.customElements.get("media-captions-menu-button")||d.customElements.define("media-captions-menu-button",ra);var Em=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},oa=(t,e,i)=>(Em(t,e,"read from private field"),i?i.call(t):e.get(t)),id=(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)},Dr=(t,e,i)=>(Em(t,e,"access private method"),i),Pt,Or,Kn,Gn,rd,ad={RATES:"rates"},Yn=class extends oe{constructor(){super(),id(this,Or),id(this,Gn),id(this,Pt,new Tt(this,ad.RATES,{defaultValue:Gs})),Dr(this,Or,Kn).call(this)}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PLAYBACK_RATE,ad.RATES]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_PLAYBACK_RATE&&i!=a?this.value=a:e===ad.RATES&&i!=a&&(oa(this,Pt).value=a,Dr(this,Or,Kn).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Dr(this,Gn,rd))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Dr(this,Gn,rd))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Z(this).querySelector("media-playback-rate-menu-button")}get rates(){return oa(this,Pt)}set rates(e){e?Array.isArray(e)?oa(this,Pt).value=e.join(" "):typeof e=="string"&&(oa(this,Pt).value=e):oa(this,Pt).value="",Dr(this,Or,Kn).call(this)}get mediaPlaybackRate(){return R(this,n.MEDIA_PLAYBACK_RATE,jt)}set mediaPlaybackRate(e){O(this,n.MEDIA_PLAYBACK_RATE,e)}};Pt=new WeakMap;Or=new WeakSet;Kn=function(){this.defaultSlot.textContent="";for(let t of oa(this,Pt)){let e=tt({type:"radio",text:this.formatMenuItemText(`${t}x`,t),value:t,checked:this.mediaPlaybackRate===Number(t)});e.prepend(Ue(this,"checked-indicator")),this.defaultSlot.append(e)}};Gn=new WeakSet;rd=function(){if(!this.value)return;let t=new d.CustomEvent(p.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};d.customElements.get("media-playback-rate-menu")||d.customElements.define("media-playback-rate-menu",Yn);var qn=1;function hv(t){return`
3048
+ `}function hv(){return h("Captions")}var pm=t=>{t.setAttribute("data-captions-enabled",uo(t).toString())},fm=t=>{t.setAttribute("aria-label",h("closed captions"))},oa=class extends ge{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_SUBTITLES_LIST,n.MEDIA_SUBTITLES_SHOWING,n.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),fm(this),pm(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_SUBTITLES_SHOWING?pm(this):e===n.MEDIA_LANG&&fm(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Z(this))==null?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return vm(this,n.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){bm(this,n.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return vm(this,n.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){bm(this,n.MEDIA_SUBTITLES_SHOWING,e)}};oa.getSlotTemplateHTML=mv;oa.getTooltipContentHTML=hv;var vm=(t,e)=>{let i=t.getAttribute(e);return i?Gt(i):[]},bm=(t,e,i)=>{if(!(i!=null&&i.length)){t.removeAttribute(e);return}let a=ut(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};d.customElements.get("media-captions-menu-button")||d.customElements.define("media-captions-menu-button",oa);var Em=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},na=(t,e,i)=>(Em(t,e,"read from private field"),i?i.call(t):e.get(t)),ad=(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)},Or=(t,e,i)=>(Em(t,e,"access private method"),i),Pt,Nr,Gn,Yn,od,rd={RATES:"rates"},qn=class extends oe{constructor(){super(),ad(this,Nr),ad(this,Yn),ad(this,Pt,new Tt(this,rd.RATES,{defaultValue:Ys})),Or(this,Nr,Gn).call(this)}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PLAYBACK_RATE,rd.RATES]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_PLAYBACK_RATE&&i!=a?this.value=a:e===rd.RATES&&i!=a&&(na(this,Pt).value=a,Or(this,Nr,Gn).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Or(this,Yn,od))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Or(this,Yn,od))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Z(this).querySelector("media-playback-rate-menu-button")}get rates(){return na(this,Pt)}set rates(e){e?Array.isArray(e)?na(this,Pt).value=e.join(" "):typeof e=="string"&&(na(this,Pt).value=e):na(this,Pt).value="",Or(this,Nr,Gn).call(this)}get mediaPlaybackRate(){return R(this,n.MEDIA_PLAYBACK_RATE,jt)}set mediaPlaybackRate(e){O(this,n.MEDIA_PLAYBACK_RATE,e)}};Pt=new WeakMap;Nr=new WeakSet;Gn=function(){this.defaultSlot.textContent="";for(let t of na(this,Pt)){let e=tt({type:"radio",text:this.formatMenuItemText(`${t}x`,t),value:t,checked:this.mediaPlaybackRate===Number(t)});e.prepend(He(this,"checked-indicator")),this.defaultSlot.append(e)}};Yn=new WeakSet;od=function(){if(!this.value)return;let t=new d.CustomEvent(p.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};d.customElements.get("media-playback-rate-menu")||d.customElements.define("media-playback-rate-menu",qn);var Zn=1;function pv(t){return`
3049
3049
  <style>
3050
3050
  :host {
3051
3051
  min-width: 5ch;
@@ -3056,17 +3056,17 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3056
3056
  display: none;
3057
3057
  }
3058
3058
  </style>
3059
- <slot name="icon">${t.mediaplaybackrate||qn}x</slot>
3060
- `}function pv(){return m("Playback rate")}var na=class extends ge{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${(e=this.mediaPlaybackRate)!=null?e:qn}x`}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),e===n.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,o=Number.isNaN(r)?qn:r;this.container.innerHTML=`${o}x`,this.setAttribute("aria-label",m("Playback rate {playbackRate}",{playbackRate:o}))}}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Z(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return R(this,n.MEDIA_PLAYBACK_RATE,qn)}set mediaPlaybackRate(e){O(this,n.MEDIA_PLAYBACK_RATE,e)}};na.getSlotTemplateHTML=hv;na.getTooltipContentHTML=pv;d.customElements.get("media-playback-rate-menu-button")||d.customElements.define("media-playback-rate-menu-button",na);var nd=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Nr=(t,e,i)=>(nd(t,e,"read from private field"),i?i.call(t):e.get(t)),Zn=(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)},bm=(t,e,i,a)=>(nd(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),sa=(t,e,i)=>(nd(t,e,"access private method"),i),Pr,da,la,Ur,zn,od,Qn=class extends oe{constructor(){super(...arguments),Zn(this,la),Zn(this,zn),Zn(this,Pr,[]),Zn(this,da,{})}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_RENDITION_LIST,n.MEDIA_RENDITION_SELECTED,n.MEDIA_RENDITION_UNAVAILABLE,n.MEDIA_HEIGHT]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_RENDITION_SELECTED&&i!==a?(this.value=a!=null?a:"auto",sa(this,la,Ur).call(this)):e===n.MEDIA_RENDITION_LIST&&i!==a?(bm(this,Pr,Hd(a)),sa(this,la,Ur).call(this)):e===n.MEDIA_HEIGHT&&i!==a&&sa(this,la,Ur).call(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",sa(this,zn,od))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",sa(this,zn,od))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Z(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return Nr(this,Pr)}set mediaRenditionList(e){bm(this,Pr,e),sa(this,la,Ur).call(this)}get mediaRenditionSelected(){return I(this,n.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){M(this,n.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return R(this,n.MEDIA_HEIGHT)}set mediaHeight(e){O(this,n.MEDIA_HEIGHT,e)}};Pr=new WeakMap;da=new WeakMap;la=new WeakSet;Ur=function(){if(Nr(this,da).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&Nr(this,da).mediaHeight===this.mediaHeight)return;Nr(this,da).mediaRenditionList=JSON.stringify(this.mediaRenditionList),Nr(this,da).mediaHeight=this.mediaHeight;let t=this.mediaRenditionList.sort((o,s)=>s.height-o.height);for(let o of t)o.selected=o.id===this.mediaRenditionSelected;this.defaultSlot.textContent="";let e=!this.mediaRenditionSelected;for(let o of t){let s=this.formatMenuItemText(`${Math.min(o.width,o.height)}p`,o),l=tt({type:"radio",text:s,value:`${o.id}`,checked:o.selected&&!e});l.prepend(Ue(this,"checked-indicator")),this.defaultSlot.append(l)}let i=e?this.formatMenuItemText(`${m("Auto")} (${this.mediaHeight}p)`):this.formatMenuItemText(m("Auto")),a=tt({type:"radio",text:i,value:"auto",checked:e}),r=this.mediaHeight>0?`${m("Auto")} (${this.mediaHeight}p)`:m("Auto");a.dataset.description=r,a.prepend(Ue(this,"checked-indicator")),this.defaultSlot.append(a)};zn=new WeakSet;od=function(){if(this.value==null)return;let t=new d.CustomEvent(p.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};d.customElements.get("media-rendition-menu")||d.customElements.define("media-rendition-menu",Qn);var fv=`<svg aria-hidden="true" viewBox="0 0 24 24">
3059
+ <slot name="icon">${t.mediaplaybackrate||Zn}x</slot>
3060
+ `}function fv(){return h("Playback rate")}var sa=class extends ge{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${(e=this.mediaPlaybackRate)!=null?e:Zn}x`}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),e===n.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,o=Number.isNaN(r)?Zn:r;this.container.innerHTML=`${o}x`,this.setAttribute("aria-label",h("Playback rate {playbackRate}",{playbackRate:o}))}}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Z(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return R(this,n.MEDIA_PLAYBACK_RATE,Zn)}set mediaPlaybackRate(e){O(this,n.MEDIA_PLAYBACK_RATE,e)}};sa.getSlotTemplateHTML=pv;sa.getTooltipContentHTML=fv;d.customElements.get("media-playback-rate-menu-button")||d.customElements.define("media-playback-rate-menu-button",sa);var sd=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Pr=(t,e,i)=>(sd(t,e,"read from private field"),i?i.call(t):e.get(t)),zn=(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)},gm=(t,e,i,a)=>(sd(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),la=(t,e,i)=>(sd(t,e,"access private method"),i),Ur,ua,da,Hr,Qn,nd,Xn=class extends oe{constructor(){super(...arguments),zn(this,da),zn(this,Qn),zn(this,Ur,[]),zn(this,ua,{})}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_RENDITION_LIST,n.MEDIA_RENDITION_SELECTED,n.MEDIA_RENDITION_UNAVAILABLE,n.MEDIA_HEIGHT]}static formatMenuItemText(e,i){return super.formatMenuItemText(e,i)}static formatRendition(e,{showBitrate:i=!1}={}){let a=`${Math.min(e.width,e.height)}p`;if(i&&e.bitrate){let r=e.bitrate/1e6,o=`${r.toFixed(r<1?1:0)} Mbps`;return`${a} (${o})`}return this.formatMenuItemText(a,e)}static compareRendition(e,i){var a,r;return i.height===e.height?((a=i.bitrate)!=null?a:0)-((r=e.bitrate)!=null?r:0):i.height-e.height}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_RENDITION_SELECTED&&i!==a?(this.value=a!=null?a:"auto",la(this,da,Hr).call(this)):e===n.MEDIA_RENDITION_LIST&&i!==a?(gm(this,Ur,Bd(a)),la(this,da,Hr).call(this)):e===n.MEDIA_HEIGHT&&i!==a&&la(this,da,Hr).call(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",la(this,Qn,nd))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",la(this,Qn,nd))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Z(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return Pr(this,Ur)}set mediaRenditionList(e){gm(this,Ur,e),la(this,da,Hr).call(this)}get mediaRenditionSelected(){return I(this,n.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){M(this,n.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return R(this,n.MEDIA_HEIGHT)}set mediaHeight(e){O(this,n.MEDIA_HEIGHT,e)}compareRendition(e,i){return this.constructor.compareRendition(e,i)}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}formatRendition(e,i){return this.constructor.formatRendition(e,i)}showRenditionBitrate(e){return this.mediaRenditionList.some(i=>i!==e&&i.height===e.height&&i.bitrate!==e.bitrate)}};Ur=new WeakMap;ua=new WeakMap;da=new WeakSet;Hr=function(){if(Pr(this,ua).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&Pr(this,ua).mediaHeight===this.mediaHeight)return;Pr(this,ua).mediaRenditionList=JSON.stringify(this.mediaRenditionList),Pr(this,ua).mediaHeight=this.mediaHeight;let t=this.mediaRenditionList.sort(this.compareRendition.bind(this)),e=t.find(s=>s.id===this.mediaRenditionSelected);for(let s of t)s.selected=s===e;this.defaultSlot.textContent="";let i=!this.mediaRenditionSelected;for(let s of t){let l=this.formatRendition(s,{showBitrate:this.showRenditionBitrate(s)}),u=tt({type:"radio",text:l,value:`${s.id}`,checked:s.selected&&!i});u.prepend(He(this,"checked-indicator")),this.defaultSlot.append(u)}let a=e&&this.showRenditionBitrate(e),r=i?e?this.formatMenuItemText(`${h("Auto")} \u2022 ${this.formatRendition(e,{showBitrate:a})}`,e):this.formatMenuItemText(`${h("Auto")} (${this.mediaHeight}p)`):this.formatMenuItemText(h("Auto")),o=tt({type:"radio",text:r,value:"auto",checked:i});o.dataset.description=r,o.prepend(He(this,"checked-indicator")),this.defaultSlot.append(o)};Qn=new WeakSet;nd=function(){if(this.value==null)return;let t=new d.CustomEvent(p.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};d.customElements.get("media-rendition-menu")||d.customElements.define("media-rendition-menu",Xn);var vv=`<svg aria-hidden="true" viewBox="0 0 24 24">
3061
3061
  <path d="M13.5 2.5h2v6h-2v-2h-11v-2h11v-2Zm4 2h4v2h-4v-2Zm-12 4h2v6h-2v-2h-3v-2h3v-2Zm4 2h12v2h-12v-2Zm1 4h2v6h-2v-2h-8v-2h8v-2Zm4 2h7v2h-7v-2Z" />
3062
- </svg>`;function vv(){return`
3062
+ </svg>`;function bv(){return`
3063
3063
  <style>
3064
3064
  :host([aria-expanded="true"]) slot[name=tooltip] {
3065
3065
  display: none;
3066
3066
  }
3067
3067
  </style>
3068
- <slot name="icon">${fv}</slot>
3069
- `}function Ev(){return m("Quality")}var ua=class extends ge{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_RENDITION_SELECTED,n.MEDIA_RENDITION_UNAVAILABLE,n.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",m("quality"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Z(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return I(this,n.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){M(this,n.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return R(this,n.MEDIA_HEIGHT)}set mediaHeight(e){O(this,n.MEDIA_HEIGHT,e)}};ua.getSlotTemplateHTML=vv;ua.getTooltipContentHTML=Ev;d.customElements.get("media-rendition-menu-button")||d.customElements.define("media-rendition-menu-button",ua);var sd=_i.createElement("template");"innerHTML"in sd&&(sd.innerHTML=Gc);var gm,_m,Xn=class extends ci{};Xn.template=(_m=(gm=sd.content)==null?void 0:gm.children)==null?void 0:_m[0];ke.customElements.get("media-theme-gerwig")||ke.customElements.define("media-theme-gerwig",Xn);var bv="gerwig",Et={SRC:"src",POSTER:"poster"},c={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",ACCENT_COLOR:"accent-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",PLAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",DRM_TOKEN:"drm-token",STORYBOARD_SRC:"storyboard-src",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio",NOHOTKEYS:"nohotkeys",HOTKEYS:"hotkeys",PLAYBACK_RATES:"playbackrates",DEFAULT_SHOW_REMAINING_TIME:"default-show-remaining-time",DEFAULT_DURATION:"default-duration",TITLE:"title",VIDEO_TITLE:"video-title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",EXTRA_SOURCE_PARAMS:"extra-source-params",NO_VOLUME_PREF:"no-volume-pref",CAST_RECEIVER:"cast-receiver",NO_TOOLTIPS:"no-tooltips",PROUDLY_DISPLAY_MUX_BADGE:"proudly-display-mux-badge",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended"},ld=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","videotitle","novolumepref","proudlydisplaymuxbadge"];function gv(t,e){var a,r;return{src:!t.playbackId&&t.src,playbackId:t.playbackId,hasSrc:!!t.playbackId||!!t.src||!!t.currentSrc,poster:t.poster,storyboard:t.storyboard,storyboardSrc:t.getAttribute(c.STORYBOARD_SRC),placeholder:t.getAttribute("placeholder"),themeTemplate:Av(t),thumbnailTime:!t.tokens.thumbnail&&t.thumbnailTime,autoplay:t.autoplay,crossOrigin:t.crossOrigin,loop:t.loop,noHotKeys:t.hasAttribute(c.NOHOTKEYS),hotKeys:t.getAttribute(c.HOTKEYS),muted:t.muted,paused:t.paused,preload:t.preload,envKey:t.envKey,preferCmcd:t.preferCmcd,debug:t.debug,disableTracking:t.disableTracking,disableCookies:t.disableCookies,tokens:t.tokens,beaconCollectionDomain:t.beaconCollectionDomain,maxResolution:t.maxResolution,minResolution:t.minResolution,programStartTime:t.programStartTime,programEndTime:t.programEndTime,assetStartTime:t.assetStartTime,assetEndTime:t.assetEndTime,renditionOrder:t.renditionOrder,metadata:t.metadata,playerInitTime:t.playerInitTime,playerSoftwareName:t.playerSoftwareName,playerSoftwareVersion:t.playerSoftwareVersion,startTime:t.startTime,preferPlayback:t.preferPlayback,audio:t.audio,defaultStreamType:t.defaultStreamType,targetLiveWindow:t.getAttribute(b.Attributes.TARGET_LIVE_WINDOW),streamType:mr(t.getAttribute(b.Attributes.STREAM_TYPE)),primaryColor:t.getAttribute(c.PRIMARY_COLOR),secondaryColor:t.getAttribute(c.SECONDARY_COLOR),accentColor:t.getAttribute(c.ACCENT_COLOR),forwardSeekOffset:t.forwardSeekOffset,backwardSeekOffset:t.backwardSeekOffset,defaultHiddenCaptions:t.defaultHiddenCaptions,defaultDuration:t.defaultDuration,defaultShowRemainingTime:t.defaultShowRemainingTime,hideDuration:Tv(t),playbackRates:t.getAttribute(c.PLAYBACK_RATES),customDomain:(a=t.getAttribute(b.Attributes.CUSTOM_DOMAIN))!=null?a:void 0,title:t.getAttribute(c.TITLE),videoTitle:(r=t.getAttribute(c.VIDEO_TITLE))!=null?r:t.getAttribute(c.TITLE),novolumepref:t.hasAttribute(c.NO_VOLUME_PREF),proudlyDisplayMuxBadge:t.hasAttribute(c.PROUDLY_DISPLAY_MUX_BADGE),castReceiver:t.castReceiver,disablePseudoEnded:t.hasAttribute(c.DISABLE_PSEUDO_ENDED),...e,extraSourceParams:t.extraSourceParams}}var _v=Bo.formatErrorMessage;Bo.formatErrorMessage=t=>{var e,i;if(t instanceof b.MediaError){let a=Kc(t,!1);return`
3068
+ <slot name="icon">${vv}</slot>
3069
+ `}function Ev(){return h("Quality")}var ca=class extends ge{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_RENDITION_SELECTED,n.MEDIA_RENDITION_UNAVAILABLE,n.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",h("quality"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Z(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return I(this,n.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){M(this,n.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return R(this,n.MEDIA_HEIGHT)}set mediaHeight(e){O(this,n.MEDIA_HEIGHT,e)}};ca.getSlotTemplateHTML=bv;ca.getTooltipContentHTML=Ev;d.customElements.get("media-rendition-menu-button")||d.customElements.define("media-rendition-menu-button",ca);var ld=_i.createElement("template");"innerHTML"in ld&&(ld.innerHTML=Yc);var _m,Am,Jn=class extends ci{};Jn.template=(Am=(_m=ld.content)==null?void 0:_m.children)==null?void 0:Am[0];ke.customElements.get("media-theme-gerwig")||ke.customElements.define("media-theme-gerwig",Jn);var gv="gerwig",bt={SRC:"src",POSTER:"poster"},c={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",ACCENT_COLOR:"accent-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",PLAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",DRM_TOKEN:"drm-token",STORYBOARD_SRC:"storyboard-src",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio",NOHOTKEYS:"nohotkeys",HOTKEYS:"hotkeys",PLAYBACK_RATES:"playbackrates",DEFAULT_SHOW_REMAINING_TIME:"default-show-remaining-time",DEFAULT_DURATION:"default-duration",TITLE:"title",VIDEO_TITLE:"video-title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",EXTRA_SOURCE_PARAMS:"extra-source-params",NO_VOLUME_PREF:"no-volume-pref",CAST_RECEIVER:"cast-receiver",NO_TOOLTIPS:"no-tooltips",PROUDLY_DISPLAY_MUX_BADGE:"proudly-display-mux-badge",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended"},dd=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","videotitle","novolumepref","proudlydisplaymuxbadge"];function _v(t,e){var a,r;return{src:!t.playbackId&&t.src,playbackId:t.playbackId,hasSrc:!!t.playbackId||!!t.src||!!t.currentSrc,poster:t.poster,storyboard:t.storyboard,storyboardSrc:t.getAttribute(c.STORYBOARD_SRC),placeholder:t.getAttribute("placeholder"),themeTemplate:Tv(t),thumbnailTime:!t.tokens.thumbnail&&t.thumbnailTime,autoplay:t.autoplay,crossOrigin:t.crossOrigin,loop:t.loop,noHotKeys:t.hasAttribute(c.NOHOTKEYS),hotKeys:t.getAttribute(c.HOTKEYS),muted:t.muted,paused:t.paused,preload:t.preload,envKey:t.envKey,preferCmcd:t.preferCmcd,debug:t.debug,disableTracking:t.disableTracking,disableCookies:t.disableCookies,tokens:t.tokens,beaconCollectionDomain:t.beaconCollectionDomain,maxResolution:t.maxResolution,minResolution:t.minResolution,programStartTime:t.programStartTime,programEndTime:t.programEndTime,assetStartTime:t.assetStartTime,assetEndTime:t.assetEndTime,renditionOrder:t.renditionOrder,metadata:t.metadata,playerInitTime:t.playerInitTime,playerSoftwareName:t.playerSoftwareName,playerSoftwareVersion:t.playerSoftwareVersion,startTime:t.startTime,preferPlayback:t.preferPlayback,audio:t.audio,defaultStreamType:t.defaultStreamType,targetLiveWindow:t.getAttribute(E.Attributes.TARGET_LIVE_WINDOW),streamType:hr(t.getAttribute(E.Attributes.STREAM_TYPE)),primaryColor:t.getAttribute(c.PRIMARY_COLOR),secondaryColor:t.getAttribute(c.SECONDARY_COLOR),accentColor:t.getAttribute(c.ACCENT_COLOR),forwardSeekOffset:t.forwardSeekOffset,backwardSeekOffset:t.backwardSeekOffset,defaultHiddenCaptions:t.defaultHiddenCaptions,defaultDuration:t.defaultDuration,defaultShowRemainingTime:t.defaultShowRemainingTime,hideDuration:yv(t),playbackRates:t.getAttribute(c.PLAYBACK_RATES),customDomain:(a=t.getAttribute(E.Attributes.CUSTOM_DOMAIN))!=null?a:void 0,title:t.getAttribute(c.TITLE),videoTitle:(r=t.getAttribute(c.VIDEO_TITLE))!=null?r:t.getAttribute(c.TITLE),novolumepref:t.hasAttribute(c.NO_VOLUME_PREF),proudlyDisplayMuxBadge:t.hasAttribute(c.PROUDLY_DISPLAY_MUX_BADGE),castReceiver:t.castReceiver,disablePseudoEnded:t.hasAttribute(c.DISABLE_PSEUDO_ENDED),...e,extraSourceParams:t.extraSourceParams}}var Av=$o.formatErrorMessage;$o.formatErrorMessage=t=>{var e,i;if(t instanceof E.MediaError){let a=Gc(t,!1);return`
3070
3070
  ${a!=null&&a.title?`<h3>${a.title}</h3>`:""}
3071
3071
  ${a!=null&&a.message||a!=null&&a.linkUrl?`<p>
3072
3072
  ${a==null?void 0:a.message}
@@ -3078,5 +3078,5 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3078
3078
  >${(i=a.linkText)!=null?i:a.linkUrl}</a
3079
3079
  >`:""}
3080
3080
  </p>`:""}
3081
- `}return _v(t)};function Av(t){var i,a;let e=t.theme;if(e){let r=(a=(i=t.getRootNode())==null?void 0:i.getElementById)==null?void 0:a.call(i,e);if(r&&r instanceof HTMLTemplateElement)return r;e.startsWith("media-theme-")||(e=`media-theme-${e}`);let o=ke.customElements.get(e);if(o!=null&&o.template)return o.template}}function Tv(t){var i;let e=(i=t.mediaController)==null?void 0:i.querySelector("media-time-display");return e&&getComputedStyle(e).getPropertyValue("--media-duration-display-display").trim()==="none"}function Am(t){let e=t.videoTitle?{video_title:t.videoTitle}:{};return t.getAttributeNames().filter(i=>i.startsWith("metadata-")).reduce((i,a)=>{let r=t.getAttribute(a);return r!==null&&(i[a.replace(/^metadata-/,"").replace(/-/g,"_")]=r),i},e)}var yv=Object.values(b.Attributes),kv=Object.values(Et),Sv=Object.values(c),dd=hn(),ud="mux-player",Tm={isDialogOpen:!1},Iv={redundant_streams:!0},Hr,Br,$r,Bt,Wr,Ei,$,Ut,ym,md,vi,km,Sm,Im,Mm,cd=class extends cl{constructor(){super();he(this,$);he(this,Hr);he(this,Br,!1);he(this,$r,{});he(this,Bt,!0);he(this,Wr,new mn(this,"hotkeys"));he(this,Ei,{...Tm,onCloseErrorDialog:i=>{var r;((r=i.composedPath()[0])==null?void 0:r.localName)==="media-error-dialog"&&X(this,$,md).call(this,{isDialogOpen:!1})},onFocusInErrorDialog:i=>{var o;if(((o=i.composedPath()[0])==null?void 0:o.localName)!=="media-error-dialog")return;ll(this,_i.activeElement)||i.preventDefault()}});ye(this,Hr,(0,w.generatePlayerInitTime)()),this.attachShadow({mode:"open"}),X(this,$,ym).call(this),this.isConnected&&X(this,$,Ut).call(this)}static get NAME(){return ud}static get VERSION(){return dd}static get observedAttributes(){var i;return[...(i=cl.observedAttributes)!=null?i:[],...kv,...yv,...Sv]}get mediaTheme(){var i;return(i=this.shadowRoot)==null?void 0:i.querySelector("media-theme")}get mediaController(){var i,a;return(a=(i=this.mediaTheme)==null?void 0:i.shadowRoot)==null?void 0:a.querySelector("media-controller")}connectedCallback(){let i=this.media;i&&(i.metadata=Am(this))}attributeChangedCallback(i,a,r){switch(X(this,$,Ut).call(this),super.attributeChangedCallback(i,a,r),i){case c.HOTKEYS:U(this,Wr).value=r;break;case c.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&Xe((0,w.i18n)("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break}case c.THUMBNAIL_TOKEN:{if(r){let s=(0,w.parseJwt)(r);if(s){let{aud:l}=s,u=w.MuxJWTAud.THUMBNAIL;l!==u&&Xe((0,w.i18n)("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:l,expectedAud:u,tokenNamePrefix:"thumbnail"}))}}break}case c.STORYBOARD_TOKEN:{if(r){let s=(0,w.parseJwt)(r);if(s){let{aud:l}=s,u=w.MuxJWTAud.STORYBOARD;l!==u&&Xe((0,w.i18n)("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:l,expectedAud:u,tokenNamePrefix:"storyboard"}))}}break}case c.DRM_TOKEN:{if(r){let s=(0,w.parseJwt)(r);if(s){let{aud:l}=s,u=w.MuxJWTAud.DRM;l!==u&&Xe((0,w.i18n)("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:l,expectedAud:u,tokenNamePrefix:"drm"}))}}break}case b.Attributes.PLAYBACK_ID:{r!=null&&r.includes("?token")&&be((0,w.i18n)("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:r}));break}case b.Attributes.STREAM_TYPE:r&&![w.StreamTypes.LIVE,w.StreamTypes.ON_DEMAND,w.StreamTypes.UNKNOWN].includes(r)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=r.includes("dvr")?Number.POSITIVE_INFINITY:0:dl({file:"invalid-stream-type.md",message:(0,w.i18n)("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):r===w.StreamTypes.LIVE?this.getAttribute(c.TARGET_LIVE_WINDOW)==null&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN}[b.Attributes.PLAYBACK_ID,Et.SRC,c.PLAYBACK_TOKEN].includes(i)&&a!==r&&ye(this,Ei,{...U(this,Ei),...Tm}),X(this,$,vi).call(this,{[Ac(i)]:r})}async requestFullscreen(i){var a;if(!(!this.mediaController||this.mediaController.hasAttribute(n.MEDIA_IS_FULLSCREEN)))return(a=this.mediaController)==null||a.dispatchEvent(new ke.CustomEvent(p.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((r,o)=>{var s;(s=this.mediaController)==null||s.addEventListener(Ce.MEDIA_IS_FULLSCREEN,()=>r(),{once:!0})})}async exitFullscreen(){var i;if(!(!this.mediaController||!this.mediaController.hasAttribute(n.MEDIA_IS_FULLSCREEN)))return(i=this.mediaController)==null||i.dispatchEvent(new ke.CustomEvent(p.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((a,r)=>{var o;(o=this.mediaController)==null||o.addEventListener(Ce.MEDIA_IS_FULLSCREEN,()=>a(),{once:!0})})}get preferCmcd(){var i;return(i=this.getAttribute(b.Attributes.PREFER_CMCD))!=null?i:void 0}set preferCmcd(i){i!==this.preferCmcd&&(i?w.CmcdTypeValues.includes(i)?this.setAttribute(b.Attributes.PREFER_CMCD,i):Xe(`Invalid value for preferCmcd. Must be one of ${w.CmcdTypeValues.join()}`):this.removeAttribute(b.Attributes.PREFER_CMCD))}get hasPlayed(){var i,a;return(a=(i=this.mediaController)==null?void 0:i.hasAttribute(n.MEDIA_HAS_PLAYED))!=null?a:!1}get inLiveWindow(){var i;return(i=this.mediaController)==null?void 0:i.hasAttribute(n.MEDIA_TIME_IS_LIVE)}get _hls(){var i;return(i=this.media)==null?void 0:i._hls}get mux(){var i;return(i=this.media)==null?void 0:i.mux}get theme(){var i;return(i=this.getAttribute(c.THEME))!=null?i:bv}set theme(i){this.setAttribute(c.THEME,`${i}`)}get themeProps(){let i=this.mediaTheme;if(!i)return;let a={};for(let r of i.getAttributeNames()){if(ld.includes(r))continue;let o=i.getAttribute(r);a[cn(r)]=o===""?!0:o}return a}set themeProps(i){var r,o;X(this,$,Ut).call(this);let a={...this.themeProps,...i};for(let s in a){if(ld.includes(s))continue;let l=i==null?void 0:i[s];typeof l=="boolean"||l==null?(r=this.mediaTheme)==null||r.toggleAttribute(un(s),!!l):(o=this.mediaTheme)==null||o.setAttribute(un(s),l)}}get playbackId(){var i;return(i=this.getAttribute(b.Attributes.PLAYBACK_ID))!=null?i:void 0}set playbackId(i){i?this.setAttribute(b.Attributes.PLAYBACK_ID,i):this.removeAttribute(b.Attributes.PLAYBACK_ID)}get src(){var i,a;return this.playbackId?(i=Ht(this,Et.SRC))!=null?i:void 0:(a=this.getAttribute(Et.SRC))!=null?a:void 0}set src(i){i?this.setAttribute(Et.SRC,i):this.removeAttribute(Et.SRC)}get poster(){var r;let i=this.getAttribute(Et.POSTER);if(i!=null)return i;let{tokens:a}=this;if(a.playback&&!a.thumbnail){Xe("Missing expected thumbnail token. No poster image will be shown");return}if(this.playbackId&&!this.audio)return gc(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(r=this.thumbnailTime)!=null?r:this.startTime,programTime:this.programStartTime,token:a.thumbnail})}set poster(i){i||i===""?this.setAttribute(Et.POSTER,i):this.removeAttribute(Et.POSTER)}get storyboardSrc(){var i;return(i=this.getAttribute(c.STORYBOARD_SRC))!=null?i:void 0}set storyboardSrc(i){i?this.setAttribute(c.STORYBOARD_SRC,i):this.removeAttribute(c.STORYBOARD_SRC)}get storyboard(){let{tokens:i}=this;if(this.storyboardSrc&&!i.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[w.StreamTypes.LIVE,w.StreamTypes.UNKNOWN].includes(this.streamType)||i.playback&&!i.storyboard))return _c(this.playbackId,{customDomain:this.customDomain,token:i.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}get audio(){return this.hasAttribute(c.AUDIO)}set audio(i){if(!i){this.removeAttribute(c.AUDIO);return}this.setAttribute(c.AUDIO,"")}get hotkeys(){return U(this,Wr)}get nohotkeys(){return this.hasAttribute(c.NOHOTKEYS)}set nohotkeys(i){if(!i){this.removeAttribute(c.NOHOTKEYS);return}this.setAttribute(c.NOHOTKEYS,"")}get thumbnailTime(){return ue(this.getAttribute(c.THUMBNAIL_TIME))}set thumbnailTime(i){this.setAttribute(c.THUMBNAIL_TIME,`${i}`)}get videoTitle(){var i,a;return(a=(i=this.getAttribute(c.VIDEO_TITLE))!=null?i:this.getAttribute(c.TITLE))!=null?a:""}set videoTitle(i){i!==this.videoTitle&&(i?this.setAttribute(c.VIDEO_TITLE,i):this.removeAttribute(c.VIDEO_TITLE))}get placeholder(){var i;return(i=Ht(this,c.PLACEHOLDER))!=null?i:""}set placeholder(i){this.setAttribute(c.PLACEHOLDER,`${i}`)}get primaryColor(){var a,r;let i=this.getAttribute(c.PRIMARY_COLOR);if(i!=null||this.mediaTheme&&(i=(r=(a=ke.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_primary-color"))==null?void 0:r.trim(),i))return i}set primaryColor(i){this.setAttribute(c.PRIMARY_COLOR,`${i}`)}get secondaryColor(){var a,r;let i=this.getAttribute(c.SECONDARY_COLOR);if(i!=null||this.mediaTheme&&(i=(r=(a=ke.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_secondary-color"))==null?void 0:r.trim(),i))return i}set secondaryColor(i){this.setAttribute(c.SECONDARY_COLOR,`${i}`)}get accentColor(){var a,r;let i=this.getAttribute(c.ACCENT_COLOR);if(i!=null||this.mediaTheme&&(i=(r=(a=ke.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_accent-color"))==null?void 0:r.trim(),i))return i}set accentColor(i){this.setAttribute(c.ACCENT_COLOR,`${i}`)}get defaultShowRemainingTime(){return this.hasAttribute(c.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(i){i?this.setAttribute(c.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(c.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(c.PLAYBACK_RATES))return this.getAttribute(c.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(i=>Number(i)).filter(i=>!Number.isNaN(i)).sort((i,a)=>i-a)}set playbackRates(i){if(!i){this.removeAttribute(c.PLAYBACK_RATES);return}this.setAttribute(c.PLAYBACK_RATES,i.join(" "))}get forwardSeekOffset(){var i;return(i=ue(this.getAttribute(c.FORWARD_SEEK_OFFSET)))!=null?i:10}set forwardSeekOffset(i){this.setAttribute(c.FORWARD_SEEK_OFFSET,`${i}`)}get backwardSeekOffset(){var i;return(i=ue(this.getAttribute(c.BACKWARD_SEEK_OFFSET)))!=null?i:10}set backwardSeekOffset(i){this.setAttribute(c.BACKWARD_SEEK_OFFSET,`${i}`)}get defaultHiddenCaptions(){return this.hasAttribute(c.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(i){i?this.setAttribute(c.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(c.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return ue(this.getAttribute(c.DEFAULT_DURATION))}set defaultDuration(i){i==null?this.removeAttribute(c.DEFAULT_DURATION):this.setAttribute(c.DEFAULT_DURATION,`${i}`)}get playerInitTime(){return this.hasAttribute(b.Attributes.PLAYER_INIT_TIME)?ue(this.getAttribute(b.Attributes.PLAYER_INIT_TIME)):U(this,Hr)}set playerInitTime(i){i!=this.playerInitTime&&(i==null?this.removeAttribute(b.Attributes.PLAYER_INIT_TIME):this.setAttribute(b.Attributes.PLAYER_INIT_TIME,`${+i}`))}get playerSoftwareName(){var i;return(i=this.getAttribute(b.Attributes.PLAYER_SOFTWARE_NAME))!=null?i:ud}get playerSoftwareVersion(){var i;return(i=this.getAttribute(b.Attributes.PLAYER_SOFTWARE_VERSION))!=null?i:dd}get beaconCollectionDomain(){var i;return(i=this.getAttribute(b.Attributes.BEACON_COLLECTION_DOMAIN))!=null?i:void 0}set beaconCollectionDomain(i){i!==this.beaconCollectionDomain&&(i?this.setAttribute(b.Attributes.BEACON_COLLECTION_DOMAIN,i):this.removeAttribute(b.Attributes.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var i;return(i=this.getAttribute(b.Attributes.MAX_RESOLUTION))!=null?i:void 0}set maxResolution(i){i!==this.maxResolution&&(i?this.setAttribute(b.Attributes.MAX_RESOLUTION,i):this.removeAttribute(b.Attributes.MAX_RESOLUTION))}get minResolution(){var i;return(i=this.getAttribute(b.Attributes.MIN_RESOLUTION))!=null?i:void 0}set minResolution(i){i!==this.minResolution&&(i?this.setAttribute(b.Attributes.MIN_RESOLUTION,i):this.removeAttribute(b.Attributes.MIN_RESOLUTION))}get renditionOrder(){var i;return(i=this.getAttribute(b.Attributes.RENDITION_ORDER))!=null?i:void 0}set renditionOrder(i){i!==this.renditionOrder&&(i?this.setAttribute(b.Attributes.RENDITION_ORDER,i):this.removeAttribute(b.Attributes.RENDITION_ORDER))}get programStartTime(){return ue(this.getAttribute(b.Attributes.PROGRAM_START_TIME))}set programStartTime(i){i==null?this.removeAttribute(b.Attributes.PROGRAM_START_TIME):this.setAttribute(b.Attributes.PROGRAM_START_TIME,`${i}`)}get programEndTime(){return ue(this.getAttribute(b.Attributes.PROGRAM_END_TIME))}set programEndTime(i){i==null?this.removeAttribute(b.Attributes.PROGRAM_END_TIME):this.setAttribute(b.Attributes.PROGRAM_END_TIME,`${i}`)}get assetStartTime(){return ue(this.getAttribute(b.Attributes.ASSET_START_TIME))}set assetStartTime(i){i==null?this.removeAttribute(b.Attributes.ASSET_START_TIME):this.setAttribute(b.Attributes.ASSET_START_TIME,`${i}`)}get assetEndTime(){return ue(this.getAttribute(b.Attributes.ASSET_END_TIME))}set assetEndTime(i){i==null?this.removeAttribute(b.Attributes.ASSET_END_TIME):this.setAttribute(b.Attributes.ASSET_END_TIME,`${i}`)}get extraSourceParams(){return this.hasAttribute(c.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(c.EXTRA_SOURCE_PARAMS)).entries()].reduce((i,[a,r])=>(i[a]=r,i),{}):Iv}set extraSourceParams(i){i==null?this.removeAttribute(c.EXTRA_SOURCE_PARAMS):this.setAttribute(c.EXTRA_SOURCE_PARAMS,new URLSearchParams(i).toString())}get customDomain(){var i;return(i=this.getAttribute(b.Attributes.CUSTOM_DOMAIN))!=null?i:void 0}set customDomain(i){i!==this.customDomain&&(i?this.setAttribute(b.Attributes.CUSTOM_DOMAIN,i):this.removeAttribute(b.Attributes.CUSTOM_DOMAIN))}get envKey(){var i;return(i=Ht(this,b.Attributes.ENV_KEY))!=null?i:void 0}set envKey(i){this.setAttribute(b.Attributes.ENV_KEY,`${i}`)}get noVolumePref(){return this.hasAttribute(c.NO_VOLUME_PREF)}set noVolumePref(i){i?this.setAttribute(c.NO_VOLUME_PREF,""):this.removeAttribute(c.NO_VOLUME_PREF)}get debug(){return Ht(this,b.Attributes.DEBUG)!=null}set debug(i){i?this.setAttribute(b.Attributes.DEBUG,""):this.removeAttribute(b.Attributes.DEBUG)}get disableTracking(){return Ht(this,b.Attributes.DISABLE_TRACKING)!=null}set disableTracking(i){this.toggleAttribute(b.Attributes.DISABLE_TRACKING,!!i)}get disableCookies(){return Ht(this,b.Attributes.DISABLE_COOKIES)!=null}set disableCookies(i){i?this.setAttribute(b.Attributes.DISABLE_COOKIES,""):this.removeAttribute(b.Attributes.DISABLE_COOKIES)}get streamType(){var i,a,r;return(r=(a=this.getAttribute(b.Attributes.STREAM_TYPE))!=null?a:(i=this.media)==null?void 0:i.streamType)!=null?r:w.StreamTypes.UNKNOWN}set streamType(i){this.setAttribute(b.Attributes.STREAM_TYPE,`${i}`)}get defaultStreamType(){var i,a,r;return(r=(a=this.getAttribute(c.DEFAULT_STREAM_TYPE))!=null?a:(i=this.mediaController)==null?void 0:i.getAttribute(c.DEFAULT_STREAM_TYPE))!=null?r:w.StreamTypes.ON_DEMAND}set defaultStreamType(i){i?this.setAttribute(c.DEFAULT_STREAM_TYPE,i):this.removeAttribute(c.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var i,a;return this.hasAttribute(c.TARGET_LIVE_WINDOW)?+this.getAttribute(c.TARGET_LIVE_WINDOW):(a=(i=this.media)==null?void 0:i.targetLiveWindow)!=null?a:Number.NaN}set targetLiveWindow(i){i==this.targetLiveWindow||Number.isNaN(i)&&Number.isNaN(this.targetLiveWindow)||(i==null?this.removeAttribute(c.TARGET_LIVE_WINDOW):this.setAttribute(c.TARGET_LIVE_WINDOW,`${+i}`))}get liveEdgeStart(){var i;return(i=this.media)==null?void 0:i.liveEdgeStart}get startTime(){return ue(Ht(this,b.Attributes.START_TIME))}set startTime(i){this.setAttribute(b.Attributes.START_TIME,`${i}`)}get preferPlayback(){let i=this.getAttribute(b.Attributes.PREFER_PLAYBACK);if(i===w.PlaybackTypes.MSE||i===w.PlaybackTypes.NATIVE)return i}set preferPlayback(i){i!==this.preferPlayback&&(i===w.PlaybackTypes.MSE||i===w.PlaybackTypes.NATIVE?this.setAttribute(b.Attributes.PREFER_PLAYBACK,i):this.removeAttribute(b.Attributes.PREFER_PLAYBACK))}get metadata(){var i;return(i=this.media)==null?void 0:i.metadata}set metadata(i){if(X(this,$,Ut).call(this),!this.media){be("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...Am(this),...i}}get _hlsConfig(){var i;return(i=this.media)==null?void 0:i._hlsConfig}set _hlsConfig(i){if(X(this,$,Ut).call(this),!this.media){be("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.");return}this.media._hlsConfig=i}async addCuePoints(i){var a;if(X(this,$,Ut).call(this),!this.media){be("underlying media element missing when trying to addCuePoints. cuePoints will not be added.");return}return(a=this.media)==null?void 0:a.addCuePoints(i)}get activeCuePoint(){var i;return(i=this.media)==null?void 0:i.activeCuePoint}get cuePoints(){var i,a;return(a=(i=this.media)==null?void 0:i.cuePoints)!=null?a:[]}addChapters(i){var a;if(X(this,$,Ut).call(this),!this.media){be("underlying media element missing when trying to addChapters. chapters will not be added.");return}return(a=this.media)==null?void 0:a.addChapters(i)}get activeChapter(){var i;return(i=this.media)==null?void 0:i.activeChapter}get chapters(){var i,a;return(a=(i=this.media)==null?void 0:i.chapters)!=null?a:[]}getStartDate(){var i;return(i=this.media)==null?void 0:i.getStartDate()}get currentPdt(){var i;return(i=this.media)==null?void 0:i.currentPdt}get tokens(){let i=this.getAttribute(c.PLAYBACK_TOKEN),a=this.getAttribute(c.DRM_TOKEN),r=this.getAttribute(c.THUMBNAIL_TOKEN),o=this.getAttribute(c.STORYBOARD_TOKEN);return{...U(this,$r),...i!=null?{playback:i}:{},...a!=null?{drm:a}:{},...r!=null?{thumbnail:r}:{},...o!=null?{storyboard:o}:{}}}set tokens(i){ye(this,$r,i!=null?i:{})}get playbackToken(){var i;return(i=this.getAttribute(c.PLAYBACK_TOKEN))!=null?i:void 0}set playbackToken(i){this.setAttribute(c.PLAYBACK_TOKEN,`${i}`)}get drmToken(){var i;return(i=this.getAttribute(c.DRM_TOKEN))!=null?i:void 0}set drmToken(i){this.setAttribute(c.DRM_TOKEN,`${i}`)}get thumbnailToken(){var i;return(i=this.getAttribute(c.THUMBNAIL_TOKEN))!=null?i:void 0}set thumbnailToken(i){this.setAttribute(c.THUMBNAIL_TOKEN,`${i}`)}get storyboardToken(){var i;return(i=this.getAttribute(c.STORYBOARD_TOKEN))!=null?i:void 0}set storyboardToken(i){this.setAttribute(c.STORYBOARD_TOKEN,`${i}`)}addTextTrack(i,a,r,o){var l;let s=(l=this.media)==null?void 0:l.nativeEl;if(s)return(0,w.addTextTrack)(s,i,a,r,o)}removeTextTrack(i){var r;let a=(r=this.media)==null?void 0:r.nativeEl;if(a)return(0,w.removeTextTrack)(a,i)}get textTracks(){var i;return(i=this.media)==null?void 0:i.textTracks}get castReceiver(){var i;return(i=this.getAttribute(c.CAST_RECEIVER))!=null?i:void 0}set castReceiver(i){i!==this.castReceiver&&(i?this.setAttribute(c.CAST_RECEIVER,i):this.removeAttribute(c.CAST_RECEIVER))}get castCustomData(){var i;return(i=this.media)==null?void 0:i.castCustomData}set castCustomData(i){if(!this.media){be("underlying media element missing when trying to set castCustomData. castCustomData will not be set.");return}this.media.castCustomData=i}get noTooltips(){return this.hasAttribute(c.NO_TOOLTIPS)}set noTooltips(i){if(!i){this.removeAttribute(c.NO_TOOLTIPS);return}this.setAttribute(c.NO_TOOLTIPS,"")}get proudlyDisplayMuxBadge(){return this.hasAttribute(c.PROUDLY_DISPLAY_MUX_BADGE)}set proudlyDisplayMuxBadge(i){i?this.setAttribute(c.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(c.PROUDLY_DISPLAY_MUX_BADGE)}};Hr=new WeakMap,Br=new WeakMap,$r=new WeakMap,Bt=new WeakMap,Wr=new WeakMap,Ei=new WeakMap,$=new WeakSet,Ut=function(){var i,a,r,o;if(!U(this,Br)){ye(this,Br,!0),X(this,$,vi).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof ke.HTMLElement))throw""}catch{be("<media-theme> failed to upgrade!")}try{customElements.upgrade(this.media)}catch{be("underlying media element failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof ys))throw""}catch{be("<media-controller> failed to upgrade!")}X(this,$,km).call(this),X(this,$,Sm).call(this),X(this,$,Im).call(this),ye(this,Bt,(a=(i=this.mediaController)==null?void 0:i.hasAttribute(y.USER_INACTIVE))!=null?a:!0),X(this,$,Mm).call(this),(r=this.media)==null||r.addEventListener("streamtypechange",()=>X(this,$,vi).call(this)),(o=this.media)==null||o.addEventListener("loadstart",()=>X(this,$,vi).call(this))}},ym=function(){var i,a;try{(i=window==null?void 0:window.CSS)==null||i.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),(a=window==null?void 0:window.CSS)==null||a.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch{}},md=function(i){Object.assign(U(this,Ei),i),X(this,$,vi).call(this)},vi=function(i={}){Wc(Fc(gv(this,{...U(this,Ei),...i})),this.shadowRoot)},km=function(){let i=r=>{var l,u;if(!(r!=null&&r.startsWith("theme-")))return;let o=r.replace(/^theme-/,"");if(ld.includes(o))return;let s=this.getAttribute(r);s!=null?(l=this.mediaTheme)==null||l.setAttribute(o,s):(u=this.mediaTheme)==null||u.removeAttribute(o)};new MutationObserver(r=>{for(let{attributeName:o}of r)i(o)}).observe(this,{attributes:!0}),this.getAttributeNames().forEach(i)},Sm=function(){let i=a=>{var s;let r=(s=this.media)==null?void 0:s.error;if(!(r instanceof b.MediaError)){let{message:l,code:u}=r!=null?r:{};r=new b.MediaError(l,u)}if(!(r!=null&&r.fatal)){Xe(r),r.data&&Xe(`${r.name} data:`,r.data);return}let o=Tl(r,!1);o.message&&dl(o),be(r),r.data&&be(`${r.name} data:`,r.data),X(this,$,md).call(this,{isDialogOpen:!0})};this.addEventListener("error",i),this.media&&(this.media.errorTranslator=(a={})=>{var o,s,l;if(!(((o=this.media)==null?void 0:o.error)instanceof b.MediaError))return a;let r=Tl((s=this.media)==null?void 0:s.error,!1);return{player_error_code:(l=this.media)==null?void 0:l.error.code,player_error_message:r.message?String(r.message):a.player_error_message,player_error_context:r.context?String(r.context):a.player_error_context}})},Im=function(){var a,r,o,s;let i=()=>X(this,$,vi).call(this);(r=(a=this.media)==null?void 0:a.textTracks)==null||r.addEventListener("addtrack",i),(s=(o=this.media)==null?void 0:o.textTracks)==null||s.addEventListener("removetrack",i)},Mm=function(){var h,_;if(!/Firefox/i.test(navigator.userAgent))return;let a,r=new WeakMap,o=()=>this.streamType===w.StreamTypes.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,s=(g,f,v=!1)=>{if(o())return;Array.from(g&&g.activeCues||[]).forEach(T=>{if(!(!T.snapToLines||T.line<-5||T.line>=0&&T.line<10))if(!f||this.paused){let C=T.text.split(`
3082
- `).length,P=-3;this.streamType===w.StreamTypes.LIVE&&(P=-2);let j=P-C;if(T.line===j&&!v)return;r.has(T)||r.set(T,T.line),T.line=j}else setTimeout(()=>{T.line=r.get(T)||"auto"},500)})},l=()=>{var g,f;s(a,(f=(g=this.mediaController)==null?void 0:g.hasAttribute(y.USER_INACTIVE))!=null?f:!1)},u=()=>{var v,N;let f=Array.from(((N=(v=this.mediaController)==null?void 0:v.media)==null?void 0:N.textTracks)||[]).filter(T=>["subtitles","captions"].includes(T.kind)&&T.mode==="showing")[0];f!==a&&(a==null||a.removeEventListener("cuechange",l)),a=f,a==null||a.addEventListener("cuechange",l),s(a,U(this,Bt))};u(),(h=this.textTracks)==null||h.addEventListener("change",u),(_=this.textTracks)==null||_.addEventListener("addtrack",u),this.addEventListener("userinactivechange",()=>{var f,v;let g=(v=(f=this.mediaController)==null?void 0:f.hasAttribute(y.USER_INACTIVE))!=null?v:!0;U(this,Bt)!==g&&(ye(this,Bt,g),s(a,U(this,Bt)))})};function Ht(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var Mv=cd;
3081
+ `}return Av(t)};function Tv(t){var i,a;let e=t.theme;if(e){let r=(a=(i=t.getRootNode())==null?void 0:i.getElementById)==null?void 0:a.call(i,e);if(r&&r instanceof HTMLTemplateElement)return r;e.startsWith("media-theme-")||(e=`media-theme-${e}`);let o=ke.customElements.get(e);if(o!=null&&o.template)return o.template}}function yv(t){var i;let e=(i=t.mediaController)==null?void 0:i.querySelector("media-time-display");return e&&getComputedStyle(e).getPropertyValue("--media-duration-display-display").trim()==="none"}function Tm(t){let e=t.videoTitle?{video_title:t.videoTitle}:{};return t.getAttributeNames().filter(i=>i.startsWith("metadata-")).reduce((i,a)=>{let r=t.getAttribute(a);return r!==null&&(i[a.replace(/^metadata-/,"").replace(/-/g,"_")]=r),i},e)}var kv=Object.values(E.Attributes),Sv=Object.values(bt),Iv=Object.values(c),ud=pn(),cd="mux-player",ym={isDialogOpen:!1},Mv={redundant_streams:!0},Br,$r,Wr,Bt,Fr,bi,$,Ut,km,hd,vi,Sm,Im,Mm,Cm,md=class extends ml{constructor(){super();he(this,$);he(this,Br);he(this,$r,!1);he(this,Wr,{});he(this,Bt,!0);he(this,Fr,new hn(this,"hotkeys"));he(this,bi,{...ym,onCloseErrorDialog:i=>{var r;((r=i.composedPath()[0])==null?void 0:r.localName)==="media-error-dialog"&&X(this,$,hd).call(this,{isDialogOpen:!1})},onFocusInErrorDialog:i=>{var o;if(((o=i.composedPath()[0])==null?void 0:o.localName)!=="media-error-dialog")return;dl(this,_i.activeElement)||i.preventDefault()}});ye(this,Br,(0,w.generatePlayerInitTime)()),this.attachShadow({mode:"open"}),X(this,$,km).call(this),this.isConnected&&X(this,$,Ut).call(this)}static get NAME(){return cd}static get VERSION(){return ud}static get observedAttributes(){var i;return[...(i=ml.observedAttributes)!=null?i:[],...Sv,...kv,...Iv]}get mediaTheme(){var i;return(i=this.shadowRoot)==null?void 0:i.querySelector("media-theme")}get mediaController(){var i,a;return(a=(i=this.mediaTheme)==null?void 0:i.shadowRoot)==null?void 0:a.querySelector("media-controller")}connectedCallback(){let i=this.media;i&&(i.metadata=Tm(this))}attributeChangedCallback(i,a,r){switch(X(this,$,Ut).call(this),super.attributeChangedCallback(i,a,r),i){case c.HOTKEYS:U(this,Fr).value=r;break;case c.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&Xe((0,w.i18n)("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break}case c.THUMBNAIL_TOKEN:{if(r){let s=(0,w.parseJwt)(r);if(s){let{aud:l}=s,u=w.MuxJWTAud.THUMBNAIL;l!==u&&Xe((0,w.i18n)("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:l,expectedAud:u,tokenNamePrefix:"thumbnail"}))}}break}case c.STORYBOARD_TOKEN:{if(r){let s=(0,w.parseJwt)(r);if(s){let{aud:l}=s,u=w.MuxJWTAud.STORYBOARD;l!==u&&Xe((0,w.i18n)("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:l,expectedAud:u,tokenNamePrefix:"storyboard"}))}}break}case c.DRM_TOKEN:{if(r){let s=(0,w.parseJwt)(r);if(s){let{aud:l}=s,u=w.MuxJWTAud.DRM;l!==u&&Xe((0,w.i18n)("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:l,expectedAud:u,tokenNamePrefix:"drm"}))}}break}case E.Attributes.PLAYBACK_ID:{r!=null&&r.includes("?token")&&Ee((0,w.i18n)("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:r}));break}case E.Attributes.STREAM_TYPE:r&&![w.StreamTypes.LIVE,w.StreamTypes.ON_DEMAND,w.StreamTypes.UNKNOWN].includes(r)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=r.includes("dvr")?Number.POSITIVE_INFINITY:0:ul({file:"invalid-stream-type.md",message:(0,w.i18n)("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):r===w.StreamTypes.LIVE?this.getAttribute(c.TARGET_LIVE_WINDOW)==null&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN}[E.Attributes.PLAYBACK_ID,bt.SRC,c.PLAYBACK_TOKEN].includes(i)&&a!==r&&ye(this,bi,{...U(this,bi),...ym}),X(this,$,vi).call(this,{[Tc(i)]:r})}async requestFullscreen(i){var a;if(!(!this.mediaController||this.mediaController.hasAttribute(n.MEDIA_IS_FULLSCREEN)))return(a=this.mediaController)==null||a.dispatchEvent(new ke.CustomEvent(p.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((r,o)=>{var s;(s=this.mediaController)==null||s.addEventListener(Ce.MEDIA_IS_FULLSCREEN,()=>r(),{once:!0})})}async exitFullscreen(){var i;if(!(!this.mediaController||!this.mediaController.hasAttribute(n.MEDIA_IS_FULLSCREEN)))return(i=this.mediaController)==null||i.dispatchEvent(new ke.CustomEvent(p.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((a,r)=>{var o;(o=this.mediaController)==null||o.addEventListener(Ce.MEDIA_IS_FULLSCREEN,()=>a(),{once:!0})})}get preferCmcd(){var i;return(i=this.getAttribute(E.Attributes.PREFER_CMCD))!=null?i:void 0}set preferCmcd(i){i!==this.preferCmcd&&(i?w.CmcdTypeValues.includes(i)?this.setAttribute(E.Attributes.PREFER_CMCD,i):Xe(`Invalid value for preferCmcd. Must be one of ${w.CmcdTypeValues.join()}`):this.removeAttribute(E.Attributes.PREFER_CMCD))}get hasPlayed(){var i,a;return(a=(i=this.mediaController)==null?void 0:i.hasAttribute(n.MEDIA_HAS_PLAYED))!=null?a:!1}get inLiveWindow(){var i;return(i=this.mediaController)==null?void 0:i.hasAttribute(n.MEDIA_TIME_IS_LIVE)}get _hls(){var i;return(i=this.media)==null?void 0:i._hls}get mux(){var i;return(i=this.media)==null?void 0:i.mux}get theme(){var i;return(i=this.getAttribute(c.THEME))!=null?i:gv}set theme(i){this.setAttribute(c.THEME,`${i}`)}get themeProps(){let i=this.mediaTheme;if(!i)return;let a={};for(let r of i.getAttributeNames()){if(dd.includes(r))continue;let o=i.getAttribute(r);a[mn(r)]=o===""?!0:o}return a}set themeProps(i){var r,o;X(this,$,Ut).call(this);let a={...this.themeProps,...i};for(let s in a){if(dd.includes(s))continue;let l=i==null?void 0:i[s];typeof l=="boolean"||l==null?(r=this.mediaTheme)==null||r.toggleAttribute(cn(s),!!l):(o=this.mediaTheme)==null||o.setAttribute(cn(s),l)}}get playbackId(){var i;return(i=this.getAttribute(E.Attributes.PLAYBACK_ID))!=null?i:void 0}set playbackId(i){i?this.setAttribute(E.Attributes.PLAYBACK_ID,i):this.removeAttribute(E.Attributes.PLAYBACK_ID)}get src(){var i,a;return this.playbackId?(i=Ht(this,bt.SRC))!=null?i:void 0:(a=this.getAttribute(bt.SRC))!=null?a:void 0}set src(i){i?this.setAttribute(bt.SRC,i):this.removeAttribute(bt.SRC)}get poster(){var r;let i=this.getAttribute(bt.POSTER);if(i!=null)return i;let{tokens:a}=this;if(a.playback&&!a.thumbnail){Xe("Missing expected thumbnail token. No poster image will be shown");return}if(this.playbackId&&!this.audio)return _c(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(r=this.thumbnailTime)!=null?r:this.startTime,programTime:this.programStartTime,token:a.thumbnail})}set poster(i){i||i===""?this.setAttribute(bt.POSTER,i):this.removeAttribute(bt.POSTER)}get storyboardSrc(){var i;return(i=this.getAttribute(c.STORYBOARD_SRC))!=null?i:void 0}set storyboardSrc(i){i?this.setAttribute(c.STORYBOARD_SRC,i):this.removeAttribute(c.STORYBOARD_SRC)}get storyboard(){let{tokens:i}=this;if(this.storyboardSrc&&!i.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[w.StreamTypes.LIVE,w.StreamTypes.UNKNOWN].includes(this.streamType)||i.playback&&!i.storyboard))return Ac(this.playbackId,{customDomain:this.customDomain,token:i.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}get audio(){return this.hasAttribute(c.AUDIO)}set audio(i){if(!i){this.removeAttribute(c.AUDIO);return}this.setAttribute(c.AUDIO,"")}get hotkeys(){return U(this,Fr)}get nohotkeys(){return this.hasAttribute(c.NOHOTKEYS)}set nohotkeys(i){if(!i){this.removeAttribute(c.NOHOTKEYS);return}this.setAttribute(c.NOHOTKEYS,"")}get thumbnailTime(){return ue(this.getAttribute(c.THUMBNAIL_TIME))}set thumbnailTime(i){this.setAttribute(c.THUMBNAIL_TIME,`${i}`)}get videoTitle(){var i,a;return(a=(i=this.getAttribute(c.VIDEO_TITLE))!=null?i:this.getAttribute(c.TITLE))!=null?a:""}set videoTitle(i){i!==this.videoTitle&&(i?this.setAttribute(c.VIDEO_TITLE,i):this.removeAttribute(c.VIDEO_TITLE))}get placeholder(){var i;return(i=Ht(this,c.PLACEHOLDER))!=null?i:""}set placeholder(i){this.setAttribute(c.PLACEHOLDER,`${i}`)}get primaryColor(){var a,r;let i=this.getAttribute(c.PRIMARY_COLOR);if(i!=null||this.mediaTheme&&(i=(r=(a=ke.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_primary-color"))==null?void 0:r.trim(),i))return i}set primaryColor(i){this.setAttribute(c.PRIMARY_COLOR,`${i}`)}get secondaryColor(){var a,r;let i=this.getAttribute(c.SECONDARY_COLOR);if(i!=null||this.mediaTheme&&(i=(r=(a=ke.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_secondary-color"))==null?void 0:r.trim(),i))return i}set secondaryColor(i){this.setAttribute(c.SECONDARY_COLOR,`${i}`)}get accentColor(){var a,r;let i=this.getAttribute(c.ACCENT_COLOR);if(i!=null||this.mediaTheme&&(i=(r=(a=ke.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_accent-color"))==null?void 0:r.trim(),i))return i}set accentColor(i){this.setAttribute(c.ACCENT_COLOR,`${i}`)}get defaultShowRemainingTime(){return this.hasAttribute(c.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(i){i?this.setAttribute(c.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(c.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(c.PLAYBACK_RATES))return this.getAttribute(c.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(i=>Number(i)).filter(i=>!Number.isNaN(i)).sort((i,a)=>i-a)}set playbackRates(i){if(!i){this.removeAttribute(c.PLAYBACK_RATES);return}this.setAttribute(c.PLAYBACK_RATES,i.join(" "))}get forwardSeekOffset(){var i;return(i=ue(this.getAttribute(c.FORWARD_SEEK_OFFSET)))!=null?i:10}set forwardSeekOffset(i){this.setAttribute(c.FORWARD_SEEK_OFFSET,`${i}`)}get backwardSeekOffset(){var i;return(i=ue(this.getAttribute(c.BACKWARD_SEEK_OFFSET)))!=null?i:10}set backwardSeekOffset(i){this.setAttribute(c.BACKWARD_SEEK_OFFSET,`${i}`)}get defaultHiddenCaptions(){return this.hasAttribute(c.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(i){i?this.setAttribute(c.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(c.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return ue(this.getAttribute(c.DEFAULT_DURATION))}set defaultDuration(i){i==null?this.removeAttribute(c.DEFAULT_DURATION):this.setAttribute(c.DEFAULT_DURATION,`${i}`)}get playerInitTime(){return this.hasAttribute(E.Attributes.PLAYER_INIT_TIME)?ue(this.getAttribute(E.Attributes.PLAYER_INIT_TIME)):U(this,Br)}set playerInitTime(i){i!=this.playerInitTime&&(i==null?this.removeAttribute(E.Attributes.PLAYER_INIT_TIME):this.setAttribute(E.Attributes.PLAYER_INIT_TIME,`${+i}`))}get playerSoftwareName(){var i;return(i=this.getAttribute(E.Attributes.PLAYER_SOFTWARE_NAME))!=null?i:cd}get playerSoftwareVersion(){var i;return(i=this.getAttribute(E.Attributes.PLAYER_SOFTWARE_VERSION))!=null?i:ud}get beaconCollectionDomain(){var i;return(i=this.getAttribute(E.Attributes.BEACON_COLLECTION_DOMAIN))!=null?i:void 0}set beaconCollectionDomain(i){i!==this.beaconCollectionDomain&&(i?this.setAttribute(E.Attributes.BEACON_COLLECTION_DOMAIN,i):this.removeAttribute(E.Attributes.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var i;return(i=this.getAttribute(E.Attributes.MAX_RESOLUTION))!=null?i:void 0}set maxResolution(i){i!==this.maxResolution&&(i?this.setAttribute(E.Attributes.MAX_RESOLUTION,i):this.removeAttribute(E.Attributes.MAX_RESOLUTION))}get minResolution(){var i;return(i=this.getAttribute(E.Attributes.MIN_RESOLUTION))!=null?i:void 0}set minResolution(i){i!==this.minResolution&&(i?this.setAttribute(E.Attributes.MIN_RESOLUTION,i):this.removeAttribute(E.Attributes.MIN_RESOLUTION))}get renditionOrder(){var i;return(i=this.getAttribute(E.Attributes.RENDITION_ORDER))!=null?i:void 0}set renditionOrder(i){i!==this.renditionOrder&&(i?this.setAttribute(E.Attributes.RENDITION_ORDER,i):this.removeAttribute(E.Attributes.RENDITION_ORDER))}get programStartTime(){return ue(this.getAttribute(E.Attributes.PROGRAM_START_TIME))}set programStartTime(i){i==null?this.removeAttribute(E.Attributes.PROGRAM_START_TIME):this.setAttribute(E.Attributes.PROGRAM_START_TIME,`${i}`)}get programEndTime(){return ue(this.getAttribute(E.Attributes.PROGRAM_END_TIME))}set programEndTime(i){i==null?this.removeAttribute(E.Attributes.PROGRAM_END_TIME):this.setAttribute(E.Attributes.PROGRAM_END_TIME,`${i}`)}get assetStartTime(){return ue(this.getAttribute(E.Attributes.ASSET_START_TIME))}set assetStartTime(i){i==null?this.removeAttribute(E.Attributes.ASSET_START_TIME):this.setAttribute(E.Attributes.ASSET_START_TIME,`${i}`)}get assetEndTime(){return ue(this.getAttribute(E.Attributes.ASSET_END_TIME))}set assetEndTime(i){i==null?this.removeAttribute(E.Attributes.ASSET_END_TIME):this.setAttribute(E.Attributes.ASSET_END_TIME,`${i}`)}get extraSourceParams(){return this.hasAttribute(c.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(c.EXTRA_SOURCE_PARAMS)).entries()].reduce((i,[a,r])=>(i[a]=r,i),{}):Mv}set extraSourceParams(i){i==null?this.removeAttribute(c.EXTRA_SOURCE_PARAMS):this.setAttribute(c.EXTRA_SOURCE_PARAMS,new URLSearchParams(i).toString())}get customDomain(){var i;return(i=this.getAttribute(E.Attributes.CUSTOM_DOMAIN))!=null?i:void 0}set customDomain(i){i!==this.customDomain&&(i?this.setAttribute(E.Attributes.CUSTOM_DOMAIN,i):this.removeAttribute(E.Attributes.CUSTOM_DOMAIN))}get envKey(){var i;return(i=Ht(this,E.Attributes.ENV_KEY))!=null?i:void 0}set envKey(i){this.setAttribute(E.Attributes.ENV_KEY,`${i}`)}get noVolumePref(){return this.hasAttribute(c.NO_VOLUME_PREF)}set noVolumePref(i){i?this.setAttribute(c.NO_VOLUME_PREF,""):this.removeAttribute(c.NO_VOLUME_PREF)}get debug(){return Ht(this,E.Attributes.DEBUG)!=null}set debug(i){i?this.setAttribute(E.Attributes.DEBUG,""):this.removeAttribute(E.Attributes.DEBUG)}get disableTracking(){return Ht(this,E.Attributes.DISABLE_TRACKING)!=null}set disableTracking(i){this.toggleAttribute(E.Attributes.DISABLE_TRACKING,!!i)}get disableCookies(){return Ht(this,E.Attributes.DISABLE_COOKIES)!=null}set disableCookies(i){i?this.setAttribute(E.Attributes.DISABLE_COOKIES,""):this.removeAttribute(E.Attributes.DISABLE_COOKIES)}get streamType(){var i,a,r;return(r=(a=this.getAttribute(E.Attributes.STREAM_TYPE))!=null?a:(i=this.media)==null?void 0:i.streamType)!=null?r:w.StreamTypes.UNKNOWN}set streamType(i){this.setAttribute(E.Attributes.STREAM_TYPE,`${i}`)}get defaultStreamType(){var i,a,r;return(r=(a=this.getAttribute(c.DEFAULT_STREAM_TYPE))!=null?a:(i=this.mediaController)==null?void 0:i.getAttribute(c.DEFAULT_STREAM_TYPE))!=null?r:w.StreamTypes.ON_DEMAND}set defaultStreamType(i){i?this.setAttribute(c.DEFAULT_STREAM_TYPE,i):this.removeAttribute(c.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var i,a;return this.hasAttribute(c.TARGET_LIVE_WINDOW)?+this.getAttribute(c.TARGET_LIVE_WINDOW):(a=(i=this.media)==null?void 0:i.targetLiveWindow)!=null?a:Number.NaN}set targetLiveWindow(i){i==this.targetLiveWindow||Number.isNaN(i)&&Number.isNaN(this.targetLiveWindow)||(i==null?this.removeAttribute(c.TARGET_LIVE_WINDOW):this.setAttribute(c.TARGET_LIVE_WINDOW,`${+i}`))}get liveEdgeStart(){var i;return(i=this.media)==null?void 0:i.liveEdgeStart}get startTime(){return ue(Ht(this,E.Attributes.START_TIME))}set startTime(i){this.setAttribute(E.Attributes.START_TIME,`${i}`)}get preferPlayback(){let i=this.getAttribute(E.Attributes.PREFER_PLAYBACK);if(i===w.PlaybackTypes.MSE||i===w.PlaybackTypes.NATIVE)return i}set preferPlayback(i){i!==this.preferPlayback&&(i===w.PlaybackTypes.MSE||i===w.PlaybackTypes.NATIVE?this.setAttribute(E.Attributes.PREFER_PLAYBACK,i):this.removeAttribute(E.Attributes.PREFER_PLAYBACK))}get metadata(){var i;return(i=this.media)==null?void 0:i.metadata}set metadata(i){if(X(this,$,Ut).call(this),!this.media){Ee("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...Tm(this),...i}}get _hlsConfig(){var i;return(i=this.media)==null?void 0:i._hlsConfig}set _hlsConfig(i){if(X(this,$,Ut).call(this),!this.media){Ee("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.");return}this.media._hlsConfig=i}async addCuePoints(i){var a;if(X(this,$,Ut).call(this),!this.media){Ee("underlying media element missing when trying to addCuePoints. cuePoints will not be added.");return}return(a=this.media)==null?void 0:a.addCuePoints(i)}get activeCuePoint(){var i;return(i=this.media)==null?void 0:i.activeCuePoint}get cuePoints(){var i,a;return(a=(i=this.media)==null?void 0:i.cuePoints)!=null?a:[]}addChapters(i){var a;if(X(this,$,Ut).call(this),!this.media){Ee("underlying media element missing when trying to addChapters. chapters will not be added.");return}return(a=this.media)==null?void 0:a.addChapters(i)}get activeChapter(){var i;return(i=this.media)==null?void 0:i.activeChapter}get chapters(){var i,a;return(a=(i=this.media)==null?void 0:i.chapters)!=null?a:[]}getStartDate(){var i;return(i=this.media)==null?void 0:i.getStartDate()}get currentPdt(){var i;return(i=this.media)==null?void 0:i.currentPdt}get tokens(){let i=this.getAttribute(c.PLAYBACK_TOKEN),a=this.getAttribute(c.DRM_TOKEN),r=this.getAttribute(c.THUMBNAIL_TOKEN),o=this.getAttribute(c.STORYBOARD_TOKEN);return{...U(this,Wr),...i!=null?{playback:i}:{},...a!=null?{drm:a}:{},...r!=null?{thumbnail:r}:{},...o!=null?{storyboard:o}:{}}}set tokens(i){ye(this,Wr,i!=null?i:{})}get playbackToken(){var i;return(i=this.getAttribute(c.PLAYBACK_TOKEN))!=null?i:void 0}set playbackToken(i){this.setAttribute(c.PLAYBACK_TOKEN,`${i}`)}get drmToken(){var i;return(i=this.getAttribute(c.DRM_TOKEN))!=null?i:void 0}set drmToken(i){this.setAttribute(c.DRM_TOKEN,`${i}`)}get thumbnailToken(){var i;return(i=this.getAttribute(c.THUMBNAIL_TOKEN))!=null?i:void 0}set thumbnailToken(i){this.setAttribute(c.THUMBNAIL_TOKEN,`${i}`)}get storyboardToken(){var i;return(i=this.getAttribute(c.STORYBOARD_TOKEN))!=null?i:void 0}set storyboardToken(i){this.setAttribute(c.STORYBOARD_TOKEN,`${i}`)}addTextTrack(i,a,r,o){var l;let s=(l=this.media)==null?void 0:l.nativeEl;if(s)return(0,w.addTextTrack)(s,i,a,r,o)}removeTextTrack(i){var r;let a=(r=this.media)==null?void 0:r.nativeEl;if(a)return(0,w.removeTextTrack)(a,i)}get textTracks(){var i;return(i=this.media)==null?void 0:i.textTracks}get castReceiver(){var i;return(i=this.getAttribute(c.CAST_RECEIVER))!=null?i:void 0}set castReceiver(i){i!==this.castReceiver&&(i?this.setAttribute(c.CAST_RECEIVER,i):this.removeAttribute(c.CAST_RECEIVER))}get castCustomData(){var i;return(i=this.media)==null?void 0:i.castCustomData}set castCustomData(i){if(!this.media){Ee("underlying media element missing when trying to set castCustomData. castCustomData will not be set.");return}this.media.castCustomData=i}get noTooltips(){return this.hasAttribute(c.NO_TOOLTIPS)}set noTooltips(i){if(!i){this.removeAttribute(c.NO_TOOLTIPS);return}this.setAttribute(c.NO_TOOLTIPS,"")}get proudlyDisplayMuxBadge(){return this.hasAttribute(c.PROUDLY_DISPLAY_MUX_BADGE)}set proudlyDisplayMuxBadge(i){i?this.setAttribute(c.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(c.PROUDLY_DISPLAY_MUX_BADGE)}};Br=new WeakMap,$r=new WeakMap,Wr=new WeakMap,Bt=new WeakMap,Fr=new WeakMap,bi=new WeakMap,$=new WeakSet,Ut=function(){var i,a,r,o;if(!U(this,$r)){ye(this,$r,!0),X(this,$,vi).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof ke.HTMLElement))throw""}catch{Ee("<media-theme> failed to upgrade!")}try{customElements.upgrade(this.media)}catch{Ee("underlying media element failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof ks))throw""}catch{Ee("<media-controller> failed to upgrade!")}X(this,$,Sm).call(this),X(this,$,Im).call(this),X(this,$,Mm).call(this),ye(this,Bt,(a=(i=this.mediaController)==null?void 0:i.hasAttribute(y.USER_INACTIVE))!=null?a:!0),X(this,$,Cm).call(this),(r=this.media)==null||r.addEventListener("streamtypechange",()=>X(this,$,vi).call(this)),(o=this.media)==null||o.addEventListener("loadstart",()=>X(this,$,vi).call(this))}},km=function(){var i,a;try{(i=window==null?void 0:window.CSS)==null||i.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),(a=window==null?void 0:window.CSS)==null||a.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch{}},hd=function(i){Object.assign(U(this,bi),i),X(this,$,vi).call(this)},vi=function(i={}){Fc(Vc(_v(this,{...U(this,bi),...i})),this.shadowRoot)},Sm=function(){let i=r=>{var l,u;if(!(r!=null&&r.startsWith("theme-")))return;let o=r.replace(/^theme-/,"");if(dd.includes(o))return;let s=this.getAttribute(r);s!=null?(l=this.mediaTheme)==null||l.setAttribute(o,s):(u=this.mediaTheme)==null||u.removeAttribute(o)};new MutationObserver(r=>{for(let{attributeName:o}of r)i(o)}).observe(this,{attributes:!0}),this.getAttributeNames().forEach(i)},Im=function(){let i=a=>{var s;let r=(s=this.media)==null?void 0:s.error;if(!(r instanceof E.MediaError)){let{message:l,code:u}=r!=null?r:{};r=new E.MediaError(l,u)}if(!(r!=null&&r.fatal)){Xe(r),r.data&&Xe(`${r.name} data:`,r.data);return}let o=yl(r,!1);o.message&&ul(o),Ee(r),r.data&&Ee(`${r.name} data:`,r.data),X(this,$,hd).call(this,{isDialogOpen:!0})};this.addEventListener("error",i),this.media&&(this.media.errorTranslator=(a={})=>{var o,s,l;if(!(((o=this.media)==null?void 0:o.error)instanceof E.MediaError))return a;let r=yl((s=this.media)==null?void 0:s.error,!1);return{player_error_code:(l=this.media)==null?void 0:l.error.code,player_error_message:r.message?String(r.message):a.player_error_message,player_error_context:r.context?String(r.context):a.player_error_context}})},Mm=function(){var a,r,o,s;let i=()=>X(this,$,vi).call(this);(r=(a=this.media)==null?void 0:a.textTracks)==null||r.addEventListener("addtrack",i),(s=(o=this.media)==null?void 0:o.textTracks)==null||s.addEventListener("removetrack",i)},Cm=function(){var m,_;if(!/Firefox/i.test(navigator.userAgent))return;let a,r=new WeakMap,o=()=>this.streamType===w.StreamTypes.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,s=(g,f,v=!1)=>{if(o())return;Array.from(g&&g.activeCues||[]).forEach(T=>{if(!(!T.snapToLines||T.line<-5||T.line>=0&&T.line<10))if(!f||this.paused){let C=T.text.split(`
3082
+ `).length,P=-3;this.streamType===w.StreamTypes.LIVE&&(P=-2);let ee=P-C;if(T.line===ee&&!v)return;r.has(T)||r.set(T,T.line),T.line=ee}else setTimeout(()=>{T.line=r.get(T)||"auto"},500)})},l=()=>{var g,f;s(a,(f=(g=this.mediaController)==null?void 0:g.hasAttribute(y.USER_INACTIVE))!=null?f:!1)},u=()=>{var v,N;let f=Array.from(((N=(v=this.mediaController)==null?void 0:v.media)==null?void 0:N.textTracks)||[]).filter(T=>["subtitles","captions"].includes(T.kind)&&T.mode==="showing")[0];f!==a&&(a==null||a.removeEventListener("cuechange",l)),a=f,a==null||a.addEventListener("cuechange",l),s(a,U(this,Bt))};u(),(m=this.textTracks)==null||m.addEventListener("change",u),(_=this.textTracks)==null||_.addEventListener("addtrack",u),this.addEventListener("userinactivechange",()=>{var f,v;let g=(v=(f=this.mediaController)==null?void 0:f.hasAttribute(y.USER_INACTIVE))!=null?v:!0;U(this,Bt)!==g&&(ye(this,Bt,g),s(a,U(this,Bt)))})};function Ht(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var Cv=md;