@mux/mux-player 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Hd=Object.create;var Yi=Object.defineProperty;var $d=Object.getOwnPropertyDescriptor;var Vd=Object.getOwnPropertyNames;var Wd=Object.getPrototypeOf,Fd=Object.prototype.hasOwnProperty;var Kd=(i,e)=>{for(var t in e)Yi(i,t,{get:e[t],enumerable:!0})},as=(i,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Vd(e))!Fd.call(i,r)&&r!==t&&Yi(i,r,{get:()=>e[r],enumerable:!(a=$d(e,r))||a.enumerable});return i};var Yd=(i,e,t)=>(t=i!=null?Hd(Wd(i)):{},as(e||!i||!i.__esModule?Yi(t,"default",{value:i,enumerable:!0}):t,i)),Gd=i=>as(Yi({},"__esModule",{value:!0}),i);var Wr=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var k=(i,e,t)=>(Wr(i,e,"read from private field"),t?t.call(i):e.get(i)),V=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},se=(i,e,t,a)=>(Wr(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t);var F=(i,e,t)=>(Wr(i,e,"access private method"),t);var gm={};Kd(gm,{MediaError:()=>g.MediaError,default:()=>fm,getVideoAttribute:()=>Mt});module.exports=Gd(gm);var wt=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class i extends wt{}globalThis.DocumentFragment=i}var ni=class extends wt{},Fr=class extends wt{},Zd={get(i){},define(i,e,t){},upgrade(i){},whenDefined(i){return Promise.resolve(ni)}},oi,Kr=class{constructor(e,t={}){V(this,oi,void 0);se(this,oi,t==null?void 0:t.detail)}get detail(){return k(this,oi)}initCustomEvent(){}};oi=new WeakMap;function qd(i,e){return new ni}var rs={document:{createElement:qd},DocumentFragment,customElements:Zd,CustomEvent:Kr,EventTarget:wt,HTMLElement:ni,HTMLVideoElement:Fr},ns=typeof window=="undefined"||typeof globalThis.customElements=="undefined",U=ns?rs:globalThis,re=ns?rs.document:globalThis.document;var b={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_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"},A={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},dt={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_PAUSED:"mediaPaused",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_ENDED:"mediaEnded",MEDIA_MUTED:"mediaMuted",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_IS_PIP:"mediaIsPip",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_LOADING:"mediaLoading",MEDIA_BUFFERED:"mediaBuffered",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled"},os=Object.entries(dt),o=os.reduce((i,[e,t])=>(i[e]=`${t.toLowerCase()}`,i),{}),De=os.reduce((i,[e,t])=>(i[e]=`${t.toLowerCase()}`,i),{USER_INACTIVE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"}),Tm=Object.entries(De).reduce((i,[e,t])=>{let a=o[e];return a&&(i[t]=a),i},{userinactivechange:"userinactive"}),ss=Object.entries(o).reduce((i,[e,t])=>{let a=De[e];return a&&(i[t]=a),i},{userinactive:"userinactivechange"}),xt={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},Gi={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var Yr={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},ne={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},me={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"};var Z={AUDIO_PLAYER:()=>"audio player",VIDEO_PLAYER:()=>"video player",VOLUME:()=>"volume",SEEK:()=>"seek",CLOSED_CAPTIONS:()=>"closed captions",PLAYBACK_RATE:({playbackRate:i=1}={})=>`current playback rate ${i}`,PLAYBACK_TIME:()=>"playback time",MEDIA_LOADING:()=>"media loading"},O={PLAY:()=>"play",PAUSE:()=>"pause",MUTE:()=>"mute",UNMUTE:()=>"unmute",AIRPLAY:()=>"air play",ENTER_CAST:()=>"start casting",EXIT_CAST:()=>"stop casting",ENTER_FULLSCREEN:()=>"enter fullscreen mode",EXIT_FULLSCREEN:()=>"exit fullscreen mode",ENTER_PIP:()=>"enter picture in picture mode",EXIT_PIP:()=>"exit picture in picture mode",SEEK_FORWARD_N_SECS:({seekOffset:i=30}={})=>`seek forward ${i} seconds`,SEEK_BACK_N_SECS:({seekOffset:i=30}={})=>`seek back ${i} seconds`,SEEK_LIVE:()=>"seek to live",PLAYING_LIVE:()=>"playing live"},zd={...Z,...O};function ls(i){return i==null?void 0:i.map(Xd).join(" ")}function ds(i){return i==null?void 0:i.split(/\s+/).map(Jd)}function Xd(i){if(i){let{id:e,width:t,height:a}=i;return[e,t,a].filter(r=>r!=null).join(":")}}function Jd(i){if(i){let[e,t,a]=i.split(":");return{id:e,width:t,height:a}}}function us(i){return i==null?void 0:i.map(jd).join(" ")}function cs(i){return i==null?void 0:i.split(/\s+/).map(eu)}function jd(i){if(i){let{id:e,kind:t,language:a,label:r}=i;return[e,t,a,r].filter(n=>n!=null).join(":")}}function eu(i){if(i){let[e,t,a,r]=i.split(":");return{id:e,kind:t,language:a,label:r}}}function Zi(i,e=!1){return i.split("_").map(function(t,a){return(a||e?t[0].toUpperCase():t[0].toLowerCase())+t.slice(1).toLowerCase()}).join("")}function ms(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function hs(i){return typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i)}function qi(i){return typeof i!="string"?!1:!isNaN(i)&&!isNaN(parseFloat(i))}var Qi=i=>new Promise(e=>setTimeout(e,i));var ps=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],tu=(i,e)=>{let t=i===1?ps[e].singular:ps[e].plural;return`${i} ${t}`},ut=i=>{if(!hs(i))return"";let e=Math.abs(i),t=e!==i,a=new Date(0,0,0,0,0,e,0);return`${[a.getHours(),a.getMinutes(),a.getSeconds()].map((d,u)=>d&&tu(d,u)).filter(d=>d).join(", ")}${t?" remaining":""}`};function Ae(i,e){let t=!1;i<0&&(t=!0,i=0-i),i=i<0?0:i;let a=Math.floor(i%60),r=Math.floor(i/60%60),n=Math.floor(i/3600),s=Math.floor(e/60%60),d=Math.floor(e/3600);return(isNaN(i)||i===1/0)&&(n=r=a="0"),n=n>0||d>0?n+":":"",r=((n||s>=10)&&r<10?"0"+r:r)+":",a=a<10?"0"+a:a,(t?"-":"")+n+r+a}var Sm=Object.freeze({length:0,start(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}});var zi=(i,e,t=".value")=>{let a=i.querySelector(t);!a||(a.textContent=e)},au=(i,e)=>{let t=`slot[name="${e}"]`,a=i.shadowRoot.querySelector(t);return a?a.children:[]},Xi=(i,e)=>au(i,e)[0],ct=(i,e)=>!i||!e?!1:i.contains(e)?!0:ct(i,e.getRootNode().host),Ye=(i,e)=>{if(!i)return null;let t=i.closest(e);return t||Ye(i.getRootNode().host,e)};function Gr(i=document){var e;let t=i==null?void 0:i.activeElement;return t?(e=Gr(t.shadowRoot))!=null?e:t:null}function N(i,e){var t;let a;for(a of i.querySelectorAll("style")){let r;try{r=(t=a.sheet)==null?void 0:t.cssRules}catch{continue}for(let n of r!=null?r:[])if(n.selectorText===e)return n}return a!=null&&a.sheet?(a.sheet.insertRule(`${e}{}`,a.sheet.cssRules.length),a.sheet.cssRules[a.sheet.cssRules.length-1]):{style:{setProperty:()=>{},removeProperty:()=>{}}}}function C(i,e,t=Number.NaN){let a=i.getAttribute(e);return a!=null?+a:t}function D(i,e,t){let a=+t;if(t==null||Number.isNaN(a)){i.hasAttribute(e)&&i.removeAttribute(e);return}C(i,e,void 0)!==a&&i.setAttribute(e,`${a}`)}function x(i,e){return i.hasAttribute(e)}function R(i,e,t){if(t==null){i.hasAttribute(e)&&i.removeAttribute(e);return}x(i,e)!=t&&i.toggleAttribute(e,t)}function w(i,e,t=null){var a;return(a=i.getAttribute(e))!=null?a:t}function S(i,e,t){if(t==null){i.hasAttribute(e)&&i.removeAttribute(e);return}let a=`${t}`;w(i,e,void 0)!==a&&i.setAttribute(e,a)}var Ji=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}},Zr=class{observe(){}unobserve(){}disconnect(){}},bs={createElement:function(){return new qr.HTMLElement},addEventListener(){},removeEventListener(){}},qr={ResizeObserver:Zr,document:bs,HTMLElement:class extends Ji{},DocumentFragment:class extends Ji{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},CustomEvent:function(){},getComputedStyle:function(){}},Es=typeof window=="undefined"||typeof window.customElements=="undefined",vs=Object.keys(qr).every(i=>i in globalThis),l=Es&&!vs?qr:globalThis,m=Es&&!vs?bs:globalThis.document;var ru=Object.defineProperty,nu=(i,e,t)=>e in i?ru(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,ou=(i,e,t)=>(nu(i,typeof e!="symbol"?e+"":e,t),t),fs=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},le=(i,e,t)=>(fs(i,e,"read from private field"),t?t.call(i):e.get(i)),ji=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ea=(i,e,t,a)=>(fs(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),_e,ta,Dt,ia,gs=m.createElement("template");gs.innerHTML=`
1
+ "use strict";var Bd=Object.create;var Gi=Object.defineProperty;var Vd=Object.getOwnPropertyDescriptor;var Hd=Object.getOwnPropertyNames;var $d=Object.getPrototypeOf,Wd=Object.prototype.hasOwnProperty;var Fd=(i,e)=>{for(var t in e)Gi(i,t,{get:e[t],enumerable:!0})},is=(i,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Hd(e))!Wd.call(i,r)&&r!==t&&Gi(i,r,{get:()=>e[r],enumerable:!(a=Vd(e,r))||a.enumerable});return i};var Kd=(i,e,t)=>(t=i!=null?Bd($d(i)):{},is(e||!i||!i.__esModule?Gi(t,"default",{value:i,enumerable:!0}):t,i)),Yd=i=>is(Gi({},"__esModule",{value:!0}),i);var Wr=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var k=(i,e,t)=>(Wr(i,e,"read from private field"),t?t.call(i):e.get(i)),$=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},se=(i,e,t,a)=>(Wr(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t);var F=(i,e,t)=>(Wr(i,e,"access private method"),t);var fm={};Fd(fm,{MediaError:()=>f.MediaError,default:()=>vm,getVideoAttribute:()=>Mt});module.exports=Yd(fm);var xt=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class i extends xt{}globalThis.DocumentFragment=i}var ni=class extends xt{},Fr=class extends xt{},Gd={get(i){},define(i,e,t){},upgrade(i){},whenDefined(i){return Promise.resolve(ni)}},oi,Kr=class{constructor(e,t={}){$(this,oi,void 0);se(this,oi,t==null?void 0:t.detail)}get detail(){return k(this,oi)}initCustomEvent(){}};oi=new WeakMap;function Zd(i,e){return new ni}var as={document:{createElement:Zd},DocumentFragment,customElements:Gd,CustomEvent:Kr,EventTarget:xt,HTMLElement:ni,HTMLVideoElement:Fr},rs=typeof window=="undefined"||typeof globalThis.customElements=="undefined",U=rs?as:globalThis,re=rs?as.document:globalThis.document;var b={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_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"},A={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},dt={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_PAUSED:"mediaPaused",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_ENDED:"mediaEnded",MEDIA_MUTED:"mediaMuted",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_IS_PIP:"mediaIsPip",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_LOADING:"mediaLoading",MEDIA_BUFFERED:"mediaBuffered",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled"},ns=Object.entries(dt),o=ns.reduce((i,[e,t])=>(i[e]=`${t.toLowerCase()}`,i),{}),De=ns.reduce((i,[e,t])=>(i[e]=`${t.toLowerCase()}`,i),{USER_INACTIVE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"}),ym=Object.entries(De).reduce((i,[e,t])=>{let a=o[e];return a&&(i[t]=a),i},{userinactivechange:"userinactive"}),os=Object.entries(o).reduce((i,[e,t])=>{let a=De[e];return a&&(i[t]=a),i},{userinactive:"userinactivechange"}),wt={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},Zi={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var Yr={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},ne={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},me={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"};var Z={AUDIO_PLAYER:()=>"audio player",VIDEO_PLAYER:()=>"video player",VOLUME:()=>"volume",SEEK:()=>"seek",CLOSED_CAPTIONS:()=>"closed captions",PLAYBACK_RATE:({playbackRate:i=1}={})=>`current playback rate ${i}`,PLAYBACK_TIME:()=>"playback time",MEDIA_LOADING:()=>"media loading"},O={PLAY:()=>"play",PAUSE:()=>"pause",MUTE:()=>"mute",UNMUTE:()=>"unmute",AIRPLAY:()=>"air play",ENTER_CAST:()=>"start casting",EXIT_CAST:()=>"stop casting",ENTER_FULLSCREEN:()=>"enter fullscreen mode",EXIT_FULLSCREEN:()=>"exit fullscreen mode",ENTER_PIP:()=>"enter picture in picture mode",EXIT_PIP:()=>"exit picture in picture mode",SEEK_FORWARD_N_SECS:({seekOffset:i=30}={})=>`seek forward ${i} seconds`,SEEK_BACK_N_SECS:({seekOffset:i=30}={})=>`seek back ${i} seconds`,SEEK_LIVE:()=>"seek to live",PLAYING_LIVE:()=>"playing live"},Qd={...Z,...O};function ss(i){return i==null?void 0:i.map(zd).join(" ")}function ls(i){return i==null?void 0:i.split(/\s+/).map(Xd)}function zd(i){if(i){let{id:e,width:t,height:a}=i;return[e,t,a].filter(r=>r!=null).join(":")}}function Xd(i){if(i){let[e,t,a]=i.split(":");return{id:e,width:t,height:a}}}function ds(i){return i==null?void 0:i.map(Jd).join(" ")}function us(i){return i==null?void 0:i.split(/\s+/).map(jd)}function Jd(i){if(i){let{id:e,kind:t,language:a,label:r}=i;return[e,t,a,r].filter(n=>n!=null).join(":")}}function jd(i){if(i){let[e,t,a,r]=i.split(":");return{id:e,kind:t,language:a,label:r}}}function qi(i,e=!1){return i.split("_").map(function(t,a){return(a||e?t[0].toUpperCase():t[0].toLowerCase())+t.slice(1).toLowerCase()}).join("")}function cs(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function ms(i){return typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i)}function Qi(i){return typeof i!="string"?!1:!isNaN(i)&&!isNaN(parseFloat(i))}var zi=i=>new Promise(e=>setTimeout(e,i));var hs=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],eu=(i,e)=>{let t=i===1?hs[e].singular:hs[e].plural;return`${i} ${t}`},ut=i=>{if(!ms(i))return"";let e=Math.abs(i),t=e!==i,a=new Date(0,0,0,0,0,e,0);return`${[a.getHours(),a.getMinutes(),a.getSeconds()].map((d,u)=>d&&eu(d,u)).filter(d=>d).join(", ")}${t?" remaining":""}`};function Ae(i,e){let t=!1;i<0&&(t=!0,i=0-i),i=i<0?0:i;let a=Math.floor(i%60),r=Math.floor(i/60%60),n=Math.floor(i/3600),s=Math.floor(e/60%60),d=Math.floor(e/3600);return(isNaN(i)||i===1/0)&&(n=r=a="0"),n=n>0||d>0?n+":":"",r=((n||s>=10)&&r<10?"0"+r:r)+":",a=a<10?"0"+a:a,(t?"-":"")+n+r+a}var Cm=Object.freeze({length:0,start(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}});var Xi=(i,e,t=".value")=>{let a=i.querySelector(t);!a||(a.textContent=e)},iu=(i,e)=>{let t=`slot[name="${e}"]`,a=i.shadowRoot.querySelector(t);return a?a.children:[]},Ji=(i,e)=>iu(i,e)[0],ct=(i,e)=>!i||!e?!1:i.contains(e)?!0:ct(i,e.getRootNode().host),Ye=(i,e)=>{if(!i)return null;let t=i.closest(e);return t||Ye(i.getRootNode().host,e)};function Gr(i=document){var e;let t=i==null?void 0:i.activeElement;return t?(e=Gr(t.shadowRoot))!=null?e:t:null}function N(i,e){var t;let a;for(a of i.querySelectorAll("style")){let r;try{r=(t=a.sheet)==null?void 0:t.cssRules}catch{continue}for(let n of r!=null?r:[])if(n.selectorText===e)return n}return a!=null&&a.sheet?(a.sheet.insertRule(`${e}{}`,a.sheet.cssRules.length),a.sheet.cssRules[a.sheet.cssRules.length-1]):{style:{setProperty:()=>{},removeProperty:()=>{}}}}function C(i,e,t=Number.NaN){let a=i.getAttribute(e);return a!=null?+a:t}function D(i,e,t){let a=+t;if(t==null||Number.isNaN(a)){i.hasAttribute(e)&&i.removeAttribute(e);return}C(i,e,void 0)!==a&&i.setAttribute(e,`${a}`)}function w(i,e){return i.hasAttribute(e)}function R(i,e,t){if(t==null){i.hasAttribute(e)&&i.removeAttribute(e);return}w(i,e)!=t&&i.toggleAttribute(e,t)}function x(i,e,t=null){var a;return(a=i.getAttribute(e))!=null?a:t}function S(i,e,t){if(t==null){i.hasAttribute(e)&&i.removeAttribute(e);return}let a=`${t}`;x(i,e,void 0)!==a&&i.setAttribute(e,a)}var ji=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}},Zr=class{observe(){}unobserve(){}disconnect(){}},ps={createElement:function(){return new qr.HTMLElement},addEventListener(){},removeEventListener(){}},qr={ResizeObserver:Zr,document:ps,HTMLElement:class extends ji{},DocumentFragment:class extends ji{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},CustomEvent:function(){},getComputedStyle:function(){}},bs=typeof window=="undefined"||typeof window.customElements=="undefined",Es=Object.keys(qr).every(i=>i in globalThis),l=bs&&!Es?qr:globalThis,m=bs&&!Es?ps:globalThis.document;var au=Object.defineProperty,ru=(i,e,t)=>e in i?au(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,nu=(i,e,t)=>(ru(i,typeof e!="symbol"?e+"":e,t),t),vs=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},le=(i,e,t)=>(vs(i,e,"read from private field"),t?t.call(i):e.get(i)),ea=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ta=(i,e,t,a)=>(vs(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),_e,ia,Dt,aa,fs=m.createElement("template");fs.innerHTML=`
2
2
  <style>
3
3
  :host {
4
4
  font: var(--media-font,
@@ -46,12 +46,12 @@
46
46
  min-width: 100%;
47
47
  }
48
48
  </style>
49
- `;var M=class extends l.HTMLElement{constructor(e={}){if(super(),ji(this,_e,void 0),ou(this,"preventClick",!1),ji(this,ta,a=>{this.preventClick||this.handleClick(a)}),ji(this,Dt,a=>{let{key:r}=a;if(!this.keysUsed.includes(r)){this.removeEventListener("keyup",le(this,Dt));return}this.preventClick||this.handleClick(a)}),ji(this,ia,a=>{let{metaKey:r,altKey:n,key:s}=a;if(r||n||!this.keysUsed.includes(s)){this.removeEventListener("keyup",le(this,Dt));return}this.addEventListener("keyup",le(this,Dt),{once:!0})}),!this.shadowRoot){this.attachShadow({mode:"open"});let a=gs.content.cloneNode(!0);this.nativeEl=a;let r=e.slotTemplate;r||(r=m.createElement("template"),r.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(r.content.cloneNode(!0)),this.shadowRoot.appendChild(a)}let{style:t}=N(this.shadowRoot,":host");t.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`)}static get observedAttributes(){return["disabled",A.MEDIA_CONTROLLER]}enable(){this.addEventListener("click",le(this,ta)),this.addEventListener("keydown",le(this,ia)),this.tabIndex=0}disable(){this.removeEventListener("click",le(this,ta)),this.removeEventListener("keydown",le(this,ia)),this.removeEventListener("keyup",le(this,Dt)),this.tabIndex=-1}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=le(this,_e))==null?void 0:r.unassociateElement)==null||n.call(r,this),ea(this,_e,null)),a&&(ea(this,_e,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=le(this,_e))==null?void 0:d.associateElement)==null||u.call(d,this))):e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e,t,a;this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","button");let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(ea(this,_e,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=le(this,_e))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;this.disable(),(t=(e=le(this,_e))==null?void 0:e.unassociateElement)==null||t.call(e,this),ea(this,_e,null)}get keysUsed(){return["Enter"," "]}handleClick(e){}};_e=new WeakMap;ta=new WeakMap;Dt=new WeakMap;ia=new WeakMap;l.customElements.get("media-chrome-button")||l.customElements.define("media-chrome-button",M);var su=`<svg aria-hidden="true" viewBox="0 0 26 24">
49
+ `;var M=class extends l.HTMLElement{constructor(e={}){if(super(),ea(this,_e,void 0),nu(this,"preventClick",!1),ea(this,ia,a=>{this.preventClick||this.handleClick(a)}),ea(this,Dt,a=>{let{key:r}=a;if(!this.keysUsed.includes(r)){this.removeEventListener("keyup",le(this,Dt));return}this.preventClick||this.handleClick(a)}),ea(this,aa,a=>{let{metaKey:r,altKey:n,key:s}=a;if(r||n||!this.keysUsed.includes(s)){this.removeEventListener("keyup",le(this,Dt));return}this.addEventListener("keyup",le(this,Dt),{once:!0})}),!this.shadowRoot){this.attachShadow({mode:"open"});let a=fs.content.cloneNode(!0);this.nativeEl=a;let r=e.slotTemplate;r||(r=m.createElement("template"),r.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(r.content.cloneNode(!0)),this.shadowRoot.appendChild(a)}let{style:t}=N(this.shadowRoot,":host");t.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`)}static get observedAttributes(){return["disabled",A.MEDIA_CONTROLLER]}enable(){this.addEventListener("click",le(this,ia)),this.addEventListener("keydown",le(this,aa)),this.tabIndex=0}disable(){this.removeEventListener("click",le(this,ia)),this.removeEventListener("keydown",le(this,aa)),this.removeEventListener("keyup",le(this,Dt)),this.tabIndex=-1}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=le(this,_e))==null?void 0:r.unassociateElement)==null||n.call(r,this),ta(this,_e,null)),a&&(ta(this,_e,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=le(this,_e))==null?void 0:d.associateElement)==null||u.call(d,this))):e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e,t,a;this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","button");let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(ta(this,_e,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=le(this,_e))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;this.disable(),(t=(e=le(this,_e))==null?void 0:e.unassociateElement)==null||t.call(e,this),ta(this,_e,null)}get keysUsed(){return["Enter"," "]}handleClick(e){}};_e=new WeakMap;ia=new WeakMap;Dt=new WeakMap;aa=new WeakMap;l.customElements.get("media-chrome-button")||l.customElements.define("media-chrome-button",M);var ou=`<svg aria-hidden="true" viewBox="0 0 26 24">
50
50
  <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"/>
51
51
  </svg>
52
- `,As=m.createElement("template");As.innerHTML=`
53
- <slot name="icon">${su}</slot>
54
- `;var Qr=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AIRPLAY_UNAVAILABLE]}constructor(e={}){super({slotTemplate:As,...e})}connectedCallback(){this.setAttribute("aria-label",O.AIRPLAY()),super.connectedCallback()}get mediaAirplayUnavailable(){return w(this,o.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){S(this,o.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new l.CustomEvent(b.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}};l.customElements.get("media-airplay-button")||l.customElements.define("media-airplay-button",Qr);var lu='<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>',du='<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>',ys=m.createElement("template");ys.innerHTML=`
52
+ `,gs=m.createElement("template");gs.innerHTML=`
53
+ <slot name="icon">${ou}</slot>
54
+ `;var Qr=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AIRPLAY_UNAVAILABLE]}constructor(e={}){super({slotTemplate:gs,...e})}connectedCallback(){this.setAttribute("aria-label",O.AIRPLAY()),super.connectedCallback()}get mediaAirplayUnavailable(){return x(this,o.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){S(this,o.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new l.CustomEvent(b.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}};l.customElements.get("media-airplay-button")||l.customElements.define("media-airplay-button",Qr);var su='<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>',lu='<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>',_s=m.createElement("template");_s.innerHTML=`
55
55
  <style>
56
56
  :host([${o.MEDIA_IS_CASTING}]) slot:not([name=exit]):not([name=icon]) {
57
57
  display: none !important;
@@ -64,17 +64,17 @@
64
64
  </style>
65
65
 
66
66
  <slot name="icon">
67
- <slot name="enter">${lu}</slot>
68
- <slot name="exit">${du}</slot>
67
+ <slot name="enter">${su}</slot>
68
+ <slot name="exit">${lu}</slot>
69
69
  </slot>
70
- `;var _s=i=>{let t=i.getAttribute(o.MEDIA_IS_CASTING)!=null?O.EXIT_CAST():O.ENTER_CAST();i.setAttribute("aria-label",t)},zr=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_CASTING,o.MEDIA_CAST_UNAVAILABLE]}constructor(e={}){super({slotTemplate:ys,...e})}connectedCallback(){_s(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_CASTING&&_s(this),super.attributeChangedCallback(e,t,a)}get mediaIsCasting(){return x(this,o.MEDIA_IS_CASTING)}set mediaIsCasting(e){R(this,o.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return w(this,o.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){S(this,o.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?b.MEDIA_EXIT_CAST_REQUEST:b.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-cast-button")||l.customElements.define("media-cast-button",zr);var Ts=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ge=(i,e,t)=>(Ts(i,e,"read from private field"),t?t.call(i):e.get(i)),uu=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},aa=(i,e,t,a)=>(Ts(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),j,Is=m.createElement("template");Is.innerHTML=`
70
+ `;var As=i=>{let t=i.getAttribute(o.MEDIA_IS_CASTING)!=null?O.EXIT_CAST():O.ENTER_CAST();i.setAttribute("aria-label",t)},zr=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_CASTING,o.MEDIA_CAST_UNAVAILABLE]}constructor(e={}){super({slotTemplate:_s,...e})}connectedCallback(){As(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_CASTING&&As(this),super.attributeChangedCallback(e,t,a)}get mediaIsCasting(){return w(this,o.MEDIA_IS_CASTING)}set mediaIsCasting(e){R(this,o.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return x(this,o.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){S(this,o.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?b.MEDIA_EXIT_CAST_REQUEST:b.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-cast-button")||l.customElements.define("media-cast-button",zr);var ys=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ge=(i,e,t)=>(ys(i,e,"read from private field"),t?t.call(i):e.get(i)),du=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ra=(i,e,t,a)=>(ys(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),j,Ts=m.createElement("template");Ts.innerHTML=`
71
71
  <style>
72
72
  :host {
73
73
  display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));
74
74
  box-sizing: border-box;
75
75
  }
76
76
  </style>
77
- `;var Xr=class extends l.HTMLElement{constructor(e={}){if(super(),uu(this,j,void 0),!this.shadowRoot){let t=this.attachShadow({mode:"open"}),a=Is.content.cloneNode(!0);this.nativeEl=a;let r=e.slotTemplate;r||(r=m.createElement("template"),r.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(r.content.cloneNode(!0)),t.appendChild(a)}}static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PAUSED]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER&&(t&&((n=(r=Ge(this,j))==null?void 0:r.unassociateElement)==null||n.call(r,this),aa(this,j,null)),a&&(aa(this,j,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Ge(this,j))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a,r;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),aa(this,j,cu(this)),this.getAttribute(A.MEDIA_CONTROLLER)&&((t=(e=Ge(this,j))==null?void 0:e.associateElement)==null||t.call(e,this)),(a=Ge(this,j))==null||a.addEventListener("pointerdown",this),(r=Ge(this,j))==null||r.addEventListener("click",this)}disconnectedCallback(){var e,t,a,r;this.getAttribute(A.MEDIA_CONTROLLER)&&((t=(e=Ge(this,j))==null?void 0:e.unassociateElement)==null||t.call(e,this)),(a=Ge(this,j))==null||a.removeEventListener("pointerdown",this),(r=Ge(this,j))==null||r.removeEventListener("click",this),aa(this,j,null)}handleEvent(e){var t;let a=(t=e.composedPath())==null?void 0:t[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:n,clientY:s}=e,{left:d,top:u,width:c,height:h}=this.getBoundingClientRect(),f=n-d,v=s-u;if(f<0||v<0||f>c||v>h||c===0&&h===0)return;let{pointerType:T=this._pointerType}=e;if(this._pointerType=void 0,T===Yr.TOUCH){this.handleTap(e);return}else if(T===Yr.MOUSE){this.handleMouseClick(e);return}}}}get mediaPaused(){return x(this,o.MEDIA_PAUSED)}set mediaPaused(e){R(this,o.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let t=this.mediaPaused?b.MEDIA_PLAY_REQUEST:b.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(t,{composed:!0,bubbles:!0}))}};j=new WeakMap;function cu(i){var e;let t=i.getAttribute(A.MEDIA_CONTROLLER);return t?(e=i.getRootNode())==null?void 0:e.getElementById(t):Ye(i,"media-controller")}l.customElements.get("media-gesture-receiver")||l.customElements.define("media-gesture-receiver",Xr);var mu=Object.defineProperty,hu=(i,e,t)=>e in i?mu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,pu=(i,e,t)=>(hu(i,typeof e!="symbol"?e+"":e,t),t),L={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive"},ks=m.createElement("template");ks.innerHTML=`
77
+ `;var Xr=class extends l.HTMLElement{constructor(e={}){if(super(),du(this,j,void 0),!this.shadowRoot){let t=this.attachShadow({mode:"open"}),a=Ts.content.cloneNode(!0);this.nativeEl=a;let r=e.slotTemplate;r||(r=m.createElement("template"),r.innerHTML=`<slot>${e.defaultContent||""}</slot>`),this.nativeEl.appendChild(r.content.cloneNode(!0)),t.appendChild(a)}}static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PAUSED]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER&&(t&&((n=(r=Ge(this,j))==null?void 0:r.unassociateElement)==null||n.call(r,this),ra(this,j,null)),a&&(ra(this,j,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Ge(this,j))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a,r;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),ra(this,j,uu(this)),this.getAttribute(A.MEDIA_CONTROLLER)&&((t=(e=Ge(this,j))==null?void 0:e.associateElement)==null||t.call(e,this)),(a=Ge(this,j))==null||a.addEventListener("pointerdown",this),(r=Ge(this,j))==null||r.addEventListener("click",this)}disconnectedCallback(){var e,t,a,r;this.getAttribute(A.MEDIA_CONTROLLER)&&((t=(e=Ge(this,j))==null?void 0:e.unassociateElement)==null||t.call(e,this)),(a=Ge(this,j))==null||a.removeEventListener("pointerdown",this),(r=Ge(this,j))==null||r.removeEventListener("click",this),ra(this,j,null)}handleEvent(e){var t;let a=(t=e.composedPath())==null?void 0:t[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:n,clientY:s}=e,{left:d,top:u,width:c,height:h}=this.getBoundingClientRect(),g=n-d,v=s-u;if(g<0||v<0||g>c||v>h||c===0&&h===0)return;let{pointerType:T=this._pointerType}=e;if(this._pointerType=void 0,T===Yr.TOUCH){this.handleTap(e);return}else if(T===Yr.MOUSE){this.handleMouseClick(e);return}}}}get mediaPaused(){return w(this,o.MEDIA_PAUSED)}set mediaPaused(e){R(this,o.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let t=this.mediaPaused?b.MEDIA_PLAY_REQUEST:b.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(t,{composed:!0,bubbles:!0}))}};j=new WeakMap;function uu(i){var e;let t=i.getAttribute(A.MEDIA_CONTROLLER);return t?(e=i.getRootNode())==null?void 0:e.getElementById(t):Ye(i,"media-controller")}l.customElements.get("media-gesture-receiver")||l.customElements.define("media-gesture-receiver",Xr);var cu=Object.defineProperty,mu=(i,e,t)=>e in i?cu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,hu=(i,e,t)=>(mu(i,typeof e!="symbol"?e+"":e,t),t),L={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive"},Is=m.createElement("template");Is.innerHTML=`
78
78
  <style>
79
79
 
80
80
  :host([${o.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {
@@ -199,7 +199,7 @@
199
199
 
200
200
  <slot part="bottom chrome"></slot>
201
201
  </span>
202
- `;var bu=Object.values(o),Eu="sm:384 md:576 lg:768 xl:960";function vu(i){for(let e of i)fu(e.target,e.contentRect.width)}function fu(i,e){var t;if(!i.isConnected)return;let a=(t=i.getAttribute(L.BREAKPOINTS))!=null?t:Eu,r=gu(a),n=Au(r,e),s=!1;if(Object.keys(r).forEach(d=>{if(n.includes(d)){i.hasAttribute(`breakpoint${d}`)||(i.setAttribute(`breakpoint${d}`,""),s=!0);return}i.hasAttribute(`breakpoint${d}`)&&(i.removeAttribute(`breakpoint${d}`),s=!0)}),s){let d=new CustomEvent(De.BREAKPOINTS_CHANGE,{detail:n});i.dispatchEvent(d)}}function gu(i){let e=i.split(/\s+/);return Object.fromEntries(e.map(t=>t.split(":")))}function Au(i,e){return Object.keys(i).filter(t=>e>=i[t])}var ra=class extends l.HTMLElement{constructor(){super(),pu(this,"breakpointsComputed",!1),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(ks.content.cloneNode(!0)));let e=u=>{let c=this.media;for(let h of u)h.type==="childList"&&(h.removedNodes.forEach(f=>{if(f.slot=="media"&&h.target==this){let v=h.previousSibling&&h.previousSibling.previousElementSibling;if(!v||!c)this.mediaUnsetCallback(f);else{let T=v.slot!=="media";for(;(v=v.previousSibling)!==null;)v.slot=="media"&&(T=!1);T&&this.mediaUnsetCallback(f)}}}),c&&h.addedNodes.forEach(f=>{f==c&&this.handleMediaUpdated(c).then(v=>this.mediaSetCallback(v))}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0});let a=!1,r=u=>{a||(setTimeout(()=>{vu(u),a=!1,this.breakpointsComputed||(this.breakpointsComputed=!0,this.dispatchEvent(new CustomEvent(De.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))},0),a=!0)},n=new ResizeObserver(r);this.resizeObserver=n,n.observe(this);let s=this.media,d=this.querySelector(":scope > slot[slot=media]");d&&d.addEventListener("slotchange",()=>{if(!d.assignedElements({flatten:!0}).length){this.mediaUnsetCallback(s);return}this.media&&(s=this.media,this.handleMediaUpdated(this.media).then(c=>this.mediaSetCallback(c)))})}static get observedAttributes(){return[L.AUTOHIDE,L.GESTURES_DISABLED].concat(bu).filter(e=>![o.MEDIA_RENDITION_LIST,o.MEDIA_AUDIO_TRACK_LIST].includes(e))}attributeChangedCallback(e,t,a){e.toLowerCase()==L.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}mediaSetCallback(e){this._mediaClickPlayToggle=()=>{let t=e.paused?b.MEDIA_PLAY_REQUEST:b.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(t,{composed:!0,bubbles:!0}))}}handleMediaUpdated(e){let t=n=>Promise.resolve(n),a=n=>(console.error('<media-chrome>: Media element set with slot="media" does not appear to be compatible.',n),Promise.reject(n));if(!e)return a(e);let r=e.nodeName.toLowerCase();return r.includes("-")?l.customElements.whenDefined(r).then(()=>t(e)):t(e)}mediaUnsetCallback(e){}connectedCallback(){var e;let a=this.getAttribute(L.AUDIO)!=null?Z.AUDIO_PLAYER():Z.VIDEO_PLAYER();this.setAttribute("role","region"),this.setAttribute("aria-label",a),this.media&&this.handleMediaUpdated(this.media).then(d=>this.mediaSetCallback(d)),this.setAttribute(L.USER_INACTIVE,"");let r=()=>{if(this.autohide<0||this.hasAttribute(L.USER_INACTIVE))return;this.setAttribute(L.USER_INACTIVE,"");let d=new l.CustomEvent(De.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(d)},n=()=>{if(!this.hasAttribute(L.USER_INACTIVE))return;this.removeAttribute(L.USER_INACTIVE);let d=new l.CustomEvent(De.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(d)},s=()=>{n(),clearTimeout(this._inactiveTimeout),!(this.autohide<0)&&(this._inactiveTimeout=setTimeout(()=>{r()},this.autohide*1e3))};this.addEventListener("keyup",()=>{s()}),this.addEventListener("pointerup",d=>{d.pointerType==="touch"?[this,this.media].includes(d.target)&&!this.hasAttribute(L.USER_INACTIVE)?r():s():d.composedPath().some(u=>{var c;return["media-play-button","media-fullscreen-button"].includes((c=u==null?void 0:u.nodeName)==null?void 0:c.toLowerCase())})&&s()}),this.addEventListener("pointermove",d=>{d.pointerType==="mouse"&&(n(),clearTimeout(this._inactiveTimeout),[this,this.media].includes(d.target)&&s())}),this.addEventListener("mouseleave",()=>{r()}),this.addEventListener("keyup",()=>{this.setAttribute(L.KEYBOARD_CONTROL,"")}),(e=l.window)==null||e.addEventListener("mouseup",()=>{this.removeAttribute(L.KEYBOARD_CONTROL)})}set autohide(e){e=Number(e),this._autohide=isNaN(e)?0:e}get autohide(){return this._autohide===void 0?2:this._autohide}};var Cs=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},K=(i,e,t)=>(Cs(i,e,"read from private field"),t?t.call(i):e.get(i)),si=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},na=(i,e,t,a)=>(Cs(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ot,Nt,oa,mt,Oe,Ze,qe=class{constructor(e,t,{defaultValue:a}={defaultValue:void 0}){si(this,Oe),si(this,Ot,void 0),si(this,Nt,void 0),si(this,oa,void 0),si(this,mt,new Set),na(this,Ot,e),na(this,Nt,t),na(this,oa,new Set(a))}[Symbol.iterator](){return K(this,Oe,Ze).values()}get length(){return K(this,Oe,Ze).size}get value(){var e;return(e=[...K(this,Oe,Ze)].join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(na(this,mt,new Set),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return[...K(this,Oe,Ze)][e]}values(){return K(this,Oe,Ze).values()}forEach(e){K(this,Oe,Ze).forEach(e)}add(...e){var t,a;e.forEach(r=>K(this,mt).add(r)),!(this.value===""&&!((t=K(this,Ot))!=null&&t.hasAttribute(`${K(this,Nt)}`)))&&((a=K(this,Ot))==null||a.setAttribute(`${K(this,Nt)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>K(this,mt).delete(a)),(t=K(this,Ot))==null||t.setAttribute(`${K(this,Nt)}`,`${this.value}`)}contains(e){return K(this,Oe,Ze).has(e)}toggle(e,t){return typeof t!="undefined"?t?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){return this.remove(e),this.add(t),e===t}};Ot=new WeakMap;Nt=new WeakMap;oa=new WeakMap;mt=new WeakMap;Oe=new WeakSet;Ze=function(){return K(this,mt).size?K(this,mt):K(this,oa)};var Ss=(i="")=>i.split(/\s+/),Ms=(i="")=>{let[e,t,a]=i.split(":"),r=a?decodeURIComponent(a):void 0;return e=e==="cc"?"captions":"subtitles",{kind:e,language:t,label:r}},li=(i="",e={})=>Ss(i).map(t=>{let a=Ms(t);return{...e,...a}}),_u=i=>Array.isArray(i)?i.map(e=>typeof e=="string"?Ms(e):e):typeof i=="string"?li(i):[i],sa=({kind:i,label:e,language:t}={kind:"subtitles"})=>e?`${i==="captions"?"cc":"sb"}:${t}:${encodeURIComponent(e)}`:t,ht=(i=[])=>Array.prototype.map.call(i,sa).join(" "),yu=(i,e)=>t=>t[i]===e,Ls=i=>{let e=Object.entries(i).map(([t,a])=>yu(t,a));return t=>e.every(a=>a(t))},Jr=(i,e=[],t=[])=>{let a=_u(t).map(Ls),r=n=>a.some(s=>s(n));Array.from(e).filter(r).forEach(n=>{n.mode=i})},la=(i,e=()=>!0)=>{if(!(i!=null&&i.textTracks))return[];let t=typeof e=="function"?e:Ls(e);return Array.from(i.textTracks).filter(t)},jr=i=>!!i.getAttribute(o.MEDIA_SUBTITLES_SHOWING),Ne=(i,e)=>{var t,a;let r=jr(i);if(r||e===!1){let n=i.getAttribute(o.MEDIA_SUBTITLES_SHOWING);if(n){let s=new l.CustomEvent(b.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:n});i.dispatchEvent(s)}}else if(!r||e===!0){let[n]=(a=Ss((t=i.getAttribute(o.MEDIA_SUBTITLES_LIST))!=null?t:""))!=null?a:[];if(n){let s=new l.CustomEvent(b.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:n});i.dispatchEvent(s)}}else console.error("Attempting to enable captions or subtitles but none are available! Please verify your media content if this is unexpected.")};var B={enter:"requestFullscreen",exit:"exitFullscreen",rootEvents:["fullscreenchange"],mediaEvents:[],element:"fullscreenElement",error:"fullscreenerror",enabled:"fullscreenEnabled"};m.fullscreenElement===void 0&&(B.enter="webkitRequestFullScreen",B.exit=m.webkitExitFullscreen!=null?"webkitExitFullscreen":"webkitCancelFullScreen",B.rootEvents=["webkitfullscreenchange"],B.mediaEvents=["webkitbeginfullscreen","webkitendfullscreen"],B.element="webkitFullscreenElement",B.error="webkitfullscreenerror",B.enabled="webkitFullscreenEnabled");var da,en=()=>{var i,e;return da||(da=(e=(i=m)==null?void 0:i.createElement)==null?void 0:e.call(i,"video"),da)},Rs=async(i=en())=>{if(!i)return!1;let e=i.volume;return i.volume=e/2+.1,await Qi(0),i.volume!==e},Tu=(i=en())=>typeof(i==null?void 0:i.requestPictureInPicture)=="function",Iu=(i=en())=>{let e=m[B.enabled];return!e&&i&&(e="webkitSupportsFullscreen"in i),e},tn=Iu(),ws=Tu(),xs=!!l.WebKitPlaybackTargetAvailabilityEvent,Ds=!!l.chrome;var ua,Os=Rs().then(i=>(ua=i,ua)),ku=Object.values(me),an=i=>la(i.media,e=>[xt.SUBTITLES,xt.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),Cu=i=>la(i.media,e=>e.mode===Gi.SHOWING&&[xt.SUBTITLES,xt.CAPTIONS].includes(e.kind)),ee={MEDIA_PAUSED:{get:function(i){let{media:e}=i;return e?e.paused:!0},mediaEvents:["play","playing","pause","emptied"]},MEDIA_HAS_PLAYED:{get:function(i){let{media:e}=i;return e?!e.paused:!1},mediaEvents:["playing","emptied"]},MEDIA_ENDED:{get:function(i){let{media:e}=i;return e?e.ended:!1},mediaEvents:["seeked","ended","emptied"]},MEDIA_PLAYBACK_RATE:{get:function(i){let{media:e}=i;return!e||typeof e.playbackRate=="undefined"?1:e.playbackRate},mediaEvents:["ratechange","loadstart"]},MEDIA_MUTED:{get:function(i){let{media:e}=i;return!e||typeof e.muted=="undefined"?!1:e.muted},mediaEvents:["volumechange"]},MEDIA_VOLUME:{get:function(i){let{media:e}=i;return!e||typeof e.volume=="undefined"?1:Number(e.volume)},mediaEvents:["volumechange"]},MEDIA_VOLUME_LEVEL:{get:function(i){let{media:e}=i,t="high";if(!e||typeof e.volume=="undefined")return t;let{muted:a,volume:r}=e;return r===0||a?t="off":r<.5?t="low":r<.75&&(t="medium"),t},mediaEvents:["volumechange"]},MEDIA_CURRENT_TIME:{get:function(i){let{media:e}=i;return!e||typeof e.currentTime=="undefined"?0:e.currentTime},mediaEvents:["timeupdate","loadedmetadata"]},MEDIA_DURATION:{get:function(i){let{media:e}=i;return!e||!Number.isFinite(e.duration)?NaN:e.duration},mediaEvents:["durationchange","loadedmetadata","emptied"]},MEDIA_SEEKABLE:{get:function(i){var e;let{media:t}=i;if(!((e=t==null?void 0:t.seekable)!=null&&e.length))return;let a=t.seekable.start(0),r=t.seekable.end(t.seekable.length-1);if(!(!a&&!r))return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress"]},MEDIA_LOADING:{get:function(i){var e;return((e=i.media)==null?void 0:e.readyState)<3},mediaEvents:["waiting","playing","emptied"]},MEDIA_BUFFERED:{get:function(i){var e,t,a;let r=(e=i.media)==null?void 0:e.buffered;return Array.from((a=(t=i.media)==null?void 0:t.buffered)!=null?a:[]).map((n,s)=>[Number(r.start(s)).toFixed(3),Number(r.end(s)).toFixed(3)])},mediaEvents:["progress","emptied"]},MEDIA_STREAM_TYPE:{get:function(i){let{media:e}=i;if(!e)return;let{streamType:t}=e;if(ku.includes(t)){if(t===me.UNKNOWN){let r=i.getAttribute("defaultstreamtype");return[me.LIVE,me.ON_DEMAND].includes(r)?r:void 0}return t}let a=e.duration;if(a===1/0)return me.LIVE;if(Number.isFinite(a))return me.ON_DEMAND;{let r=i.getAttribute("defaultstreamtype");if([me.LIVE,me.ON_DEMAND].includes(r))return r}},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},MEDIA_TARGET_LIVE_WINDOW:{get:function(i){let{media:e}=i;if(!e)return Number.NaN;let{targetLiveWindow:t}=e,a=ee.MEDIA_STREAM_TYPE.get(i);return(t==null||Number.isNaN(t))&&a===me.LIVE?0:t},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},MEDIA_TIME_IS_LIVE:{get:function(i){let{media:e}=i;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return Number.isNaN(e.liveEdgeStart)?!1:e.currentTime>=e.liveEdgeStart;if(!(ee.MEDIA_STREAM_TYPE.get(i)==="live"))return!1;let a=e.seekable;if(!a)return!0;if(!a.length)return!1;let r=i.hasAttribute("liveedgeoffset")?Number(i.getAttribute("liveedgeoffset")):10,n=a.end(a.length-1)-r;return e.currentTime>=n},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},MEDIA_IS_FULLSCREEN:{get:function(i,e){var t;let a=i.media;if(a&&m[B.element]===void 0&&"webkitDisplayingFullscreen"in a)return a.webkitDisplayingFullscreen&&a.webkitPresentationMode==="fullscreen";let r;return e?r=m[B.element]?e.target:null:r=(t=i.getRootNode().fullscreenElement)!=null?t:m[B.element],ct(i.fullscreenElement,r)},rootEvents:B.rootEvents,mediaEvents:B.mediaEvents},MEDIA_IS_PIP:{get:function(i,e){var t;let a=i.media;if(!a)return!1;if(e)return e.type=="enterpictureinpicture";{let r=(t=i.getRootNode().pictureInPictureElement)!=null?t:m.pictureInPictureElement;return ct(a,r)}},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},MEDIA_IS_CASTING:{get:function(i,e){var t;let{media:a}=i;if(!a)return!1;let r=(t=l.CastableVideoElement)==null?void 0:t.castElement,n=ct(a,r);return(e==null?void 0:e.type)==="castchange"&&(e==null?void 0:e.detail)==="CONNECTING"&&(n="connecting"),n},mediaEvents:["entercast","leavecast","castchange"]},MEDIA_AIRPLAY_UNAVAILABLE:{get:function(i,e){if(!xs)return ne.UNSUPPORTED;if(!!e&&e.availability!=="available"&&e.availability==="not-available")return ne.UNAVAILABLE},mediaEvents:["webkitplaybacktargetavailabilitychanged"]},MEDIA_CAST_UNAVAILABLE:{get:function(){var i;let e=(i=l.CastableVideoElement)==null?void 0:i.castState;if(!Ds||!e)return ne.UNSUPPORTED;if(!e.includes("CONNECT"))return ne.UNAVAILABLE},mediaEvents:["castchange"]},MEDIA_FULLSCREEN_UNAVAILABLE:{get:function(){return tn?void 0:ne.UNAVAILABLE}},MEDIA_PIP_UNAVAILABLE:{get:function(){return ws?void 0:ne.UNSUPPORTED}},MEDIA_RENDITION_UNAVAILABLE:{get:function(i){var e;let{media:t}=i;if(!(t!=null&&t.videoRenditions))return ne.UNSUPPORTED;if(!((e=t.videoRenditions)!=null&&e.length))return ne.UNAVAILABLE},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},MEDIA_AUDIO_TRACK_UNAVAILABLE:{get:function(i){var e,t;let{media:a}=i;if(!(a!=null&&a.audioTracks))return ne.UNSUPPORTED;if(((t=(e=a.audioTracks)==null?void 0:e.length)!=null?t:0)<=1)return ne.UNAVAILABLE},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},MEDIA_VOLUME_UNAVAILABLE:{get:function(i){if(ua!==void 0&&!ua)return ne.UNSUPPORTED;let{media:e}=i;if(e&&typeof e.volume=="undefined")return ne.UNAVAILABLE},mediaEvents:["loadstart"]},MEDIA_SUBTITLES_LIST:{get:function(i){return an(i).map(({kind:e,label:t,language:a})=>({kind:e,label:t,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},MEDIA_SUBTITLES_SHOWING:{get:function(i){return i.hasAttribute("defaultsubtitles")&&!i.hasAttribute(o.MEDIA_HAS_PLAYED)&&!i.hasAttribute(o.MEDIA_SUBTITLES_SHOWING)&&Ne(i,!0),Cu(i).map(({kind:e,label:t,language:a})=>({kind:e,label:t,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"]},MEDIA_RENDITION_LIST:{get:function(i){var e;let{media:t}=i;return[...(e=t==null?void 0:t.videoRenditions)!=null?e:[]]},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},MEDIA_RENDITION_SELECTED:{get:function(i){var e,t,a;let{media:r}=i;return(a=(t=r==null?void 0:r.videoRenditions)==null?void 0:t[(e=r.videoRenditions)==null?void 0:e.selectedIndex])==null?void 0:a.id},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},MEDIA_AUDIO_TRACK_LIST:{get:function(i){var e;let{media:t}=i;return[...(e=t==null?void 0:t.audioTracks)!=null?e:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},MEDIA_AUDIO_TRACK_ENABLED:{get:function(i){var e,t;let{media:a}=i;return(t=[...(e=a==null?void 0:a.audioTracks)!=null?e:[]].find(r=>r.enabled))==null?void 0:t.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]}},ca={MEDIA_PLAY_REQUEST:(i,e,t)=>{var a;let r=ee.MEDIA_STREAM_TYPE.get(t),n=t.getAttribute("noautoseektolive")===null;r==me.LIVE&&n&&ca.MEDIA_SEEK_TO_LIVE_REQUEST(i),(a=i.play())==null||a.catch(()=>{})},MEDIA_PAUSE_REQUEST:i=>i.pause(),MEDIA_MUTE_REQUEST:i=>i.muted=!0,MEDIA_UNMUTE_REQUEST:i=>{i.muted=!1,i.volume===0&&(i.volume=.25)},MEDIA_VOLUME_REQUEST:(i,e,t)=>{let a=e.detail;if(i.volume=a,a>0&&i.muted&&(i.muted=!1),!t.hasAttribute("novolumepref"))try{l.localStorage.setItem("media-chrome-pref-volume",a.toString())}catch{}},MEDIA_ENTER_FULLSCREEN_REQUEST:(i,e,t)=>{if(!tn){console.warn("Fullscreen support is unavailable; not entering fullscreen");return}m.pictureInPictureElement&&m.exitPictureInPicture(),t[B.enter]?t.fullscreenElement[B.enter]():i.webkitEnterFullscreen?i.webkitEnterFullscreen():i.requestFullscreen?i.requestFullscreen():console.warn("MediaChrome: Fullscreen not supported")},MEDIA_EXIT_FULLSCREEN_REQUEST:()=>{m[B.exit]()},MEDIA_ENTER_PIP_REQUEST:i=>{if(!m.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}m[B.element]&&m[B.exit]();let e=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(t=>{if(t.code===11)if(i.readyState===0&&i.preload==="none"){let a=()=>{i.removeEventListener("loadedmetadata",r),i.preload="none"},r=()=>{i.requestPictureInPicture().catch(e),a()};i.addEventListener("loadedmetadata",r),i.preload="metadata",setTimeout(()=>{i.readyState===0&&e(),a()},1e3)}else throw t;else throw t})},MEDIA_EXIT_PIP_REQUEST:()=>{m.pictureInPictureElement&&m.exitPictureInPicture()},MEDIA_ENTER_CAST_REQUEST:i=>{var e;!((e=l.CastableVideoElement)!=null&&e.castEnabled)||(m[B.element]&&m[B.exit](),i.requestCast())},MEDIA_EXIT_CAST_REQUEST:async()=>{var i;(i=l.CastableVideoElement)!=null&&i.castElement&&l.CastableVideoElement.exitCast()},MEDIA_SEEK_REQUEST:(i,e)=>{let t=e.detail;(i.readyState>0||i.readyState===void 0)&&(i.currentTime=t)},MEDIA_PLAYBACK_RATE_REQUEST:(i,e)=>{i.playbackRate=e.detail},MEDIA_PREVIEW_REQUEST:(i,e,t)=>{var a;if(!i)return;let r=e.detail;r===null&&t.propagateMediaState(o.MEDIA_PREVIEW_TIME,void 0),t.propagateMediaState(o.MEDIA_PREVIEW_TIME,r);let[n]=la(i,{kind:xt.METADATA,label:"thumbnails"});if(!(n&&n.cues))return;if(r===null){t.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,void 0),t.propagateMediaState(o.MEDIA_PREVIEW_COORDS,void 0);return}let s=Array.prototype.find.call(n.cues,h=>h.startTime>=r);if(!s)return;let d=/'^(?:[a-z]+:)?\/\//i.test(s.text)||(a=i.querySelector('track[label="thumbnails"]'))==null?void 0:a.src,u=new URL(s.text,d),c=new URLSearchParams(u.hash).get("#xywh");t.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,u.href),t.propagateMediaState(o.MEDIA_PREVIEW_COORDS,c.split(","))},MEDIA_SHOW_SUBTITLES_REQUEST:(i,e,t)=>{let a=an(t),{detail:r=[]}=e;Jr(Gi.SHOWING,a,r)},MEDIA_DISABLE_SUBTITLES_REQUEST:(i,e,t)=>{let a=an(t),{detail:r=[]}=e;Jr(Gi.DISABLED,a,r)},MEDIA_AIRPLAY_REQUEST:i=>{if(!!i){if(!(i.webkitShowPlaybackTargetPicker&&l.WebKitPlaybackTargetAvailabilityEvent)){console.warn("received a request to select AirPlay but AirPlay is not supported in this environment");return}i.webkitShowPlaybackTargetPicker()}},MEDIA_SEEK_TO_LIVE_REQUEST:i=>{let e=i.seekable;if(!e){console.warn("MediaController: Media element does not support seeking to live.");return}if(!e.length){console.warn("MediaController: Media is unable to seek to live.");return}i.currentTime=e.end(e.length-1)},MEDIA_RENDITION_REQUEST:(i,e)=>{if(!(i!=null&&i.videoRenditions)){console.warn("MediaController: Rendition selection not supported by this media.");return}let t=e.detail,a=[...i.videoRenditions].findIndex(r=>r.id==t);i.videoRenditions.selectedIndex!=a&&(i.videoRenditions.selectedIndex=a)},MEDIA_AUDIO_TRACK_REQUEST:(i,e)=>{if(!(i!=null&&i.audioTracks)){console.warn("MediaController: Audio track selection not supported by this media.");return}let t=e.detail;for(let a of i.audioTracks)a.enabled=t==a.id}};var on=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},bt=(i,e,t)=>(on(i,e,"read from private field"),t?t.call(i):e.get(i)),ma=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ns=(i,e,t,a)=>(on(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ut=(i,e,t)=>(on(i,e,"access private method"),t),Qe,di,Pt,ui,ha,rn,Vs=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],Su=10,Us=0,te={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYS_USED:"keysused",LIVE_EDGE_OFFSET:"liveedgeoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_HOTKEYS:"nohotkeys"},pa=class extends ra{constructor(){super(),ma(this,Pt),ma(this,ha),ma(this,Qe,new qe(this,te.HOTKEYS)),ma(this,di,void 0),ee.MEDIA_VOLUME_UNAVAILABLE.get(this)===void 0&&Os.then(()=>{this.propagateMediaState(o.MEDIA_VOLUME_UNAVAILABLE,ee.MEDIA_VOLUME_UNAVAILABLE.get(this))}),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,this.associateElement(this),Object.keys(ca).forEach(e=>{let t=`_handle${Zi(e,!0)}`;this[t]=a=>{if(a.stopPropagation(),!this.media){console.warn("MediaController: No media available.");return}ca[e](this.media,a,this)},this.addEventListener(b[e],this[t])}),this._mediaStatePropagators={},Object.keys(ee).forEach(e=>{this._mediaStatePropagators[e]=t=>{this.propagateMediaState(dt[e],ee[e].get(this,t))}}),this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(te.NO_HOTKEYS,te.HOTKEYS,te.DEFAULT_STREAM_TYPE,te.DEFAULT_SUBTITLES)}get fullscreenElement(){var e;return(e=bt(this,di))!=null?e:this}set fullscreenElement(e){this.hasAttribute(te.FULLSCREEN_ELEMENT)&&this.removeAttribute(te.FULLSCREEN_ELEMENT),Ns(this,di,e)}attributeChangedCallback(e,t,a){var r;if(e===te.NO_HOTKEYS)a!==t&&a===""?(this.hasAttribute(te.HOTKEYS)&&console.warn("Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==t&&a===null&&this.enableHotkeys();else if(e===te.HOTKEYS)bt(this,Qe).value=a;else if(e===te.DEFAULT_SUBTITLES&&a!==t&&a==="")Ne(this,!0);else if(e===te.DEFAULT_STREAM_TYPE)this.propagateMediaState(dt.MEDIA_STREAM_TYPE);else if(e===te.FULLSCREEN_ELEMENT){let n=a?(r=this.getRootNode())==null?void 0:r.getElementById(a):void 0;Ns(this,di,n)}super.attributeChangedCallback(e,t,a)}mediaSetCallback(e){if(super.mediaSetCallback(e),e.hasAttribute("tabindex")||(e.tabIndex=-1),Object.keys(ee).forEach(t=>{let{mediaEvents:a,rootEvents:r,textTracksEvents:n,videoRenditionsEvents:s,audioTracksEvents:d}=ee[t],u=this._mediaStatePropagators[t];a==null||a.forEach(c=>{e.addEventListener(c,u),u()}),r==null||r.forEach(c=>{this.getRootNode().addEventListener(c,u),u()}),n==null||n.forEach(c=>{var h;(h=e.textTracks)==null||h.addEventListener(c,u),u()}),s==null||s.forEach(c=>{var h;(h=e.videoRenditions)==null||h.addEventListener(c,u),u()}),d==null||d.forEach(c=>{var h;(h=e.audioTracks)==null||h.addEventListener(c,u),u()})}),!this.hasAttribute("novolumepref"))try{let t=l.localStorage.getItem("media-chrome-pref-volume");t!==null&&(e.volume=t)}catch(t){console.debug("Error getting volume pref",t)}}mediaUnsetCallback(e){super.mediaUnsetCallback(e),Object.keys(ee).forEach(t=>{let{mediaEvents:a,rootEvents:r,textTracksEvents:n,videoRenditionsEvents:s,audioTracksEvents:d}=ee[t],u=this._mediaStatePropagators[t];a==null||a.forEach(c=>{e.removeEventListener(c,u)}),r==null||r.forEach(c=>{this.getRootNode().removeEventListener(c,u)}),n==null||n.forEach(c=>{var h;(h=e.textTracks)==null||h.removeEventListener(c,u)}),s==null||s.forEach(c=>{var h;(h=e.videoRenditions)==null||h.removeEventListener(c,u),u()}),d==null||d.forEach(c=>{var h;(h=e.audioTracks)==null||h.removeEventListener(c,u),u()})}),this.propagateMediaState(dt.MEDIA_PAUSED,!0)}propagateMediaState(e,t){let a=$s(this.mediaStateReceivers,e);if(Hs(this.mediaStateReceivers,e,t),a===$s(this.mediaStateReceivers,e))return;let r=e.toLowerCase(),n=new l.CustomEvent(ss[r],{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(n)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(t.has(e))return;let a=this.registerMediaStateReceiver.bind(this),r=this.unregisterMediaStateReceiver.bind(this),n=Du(e,a,r);Object.keys(b).forEach(s=>{e.addEventListener(b[s],this[`_handle${Zi(s,!0)}`])}),t.set(e,n)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(!t.has(e))return;t.get(e)(),t.delete(e),Object.keys(b).forEach(r=>{e.removeEventListener(b[r],this[`_handle${Zi(r,!0)}`])})}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;t.indexOf(e)>-1||(t.push(e),Object.keys(ee).forEach(r=>{let n=ee[r];Hs([e],dt[r],n.get(this))}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,a=t.indexOf(e);a<0||t.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",Ut(this,ha,rn))}disableHotkeys(){this.removeEventListener("keydown",Ut(this,ha,rn)),this.removeEventListener("keyup",Ut(this,Pt,ui))}get hotkeys(){return bt(this,Qe)}keyboardShortcutHandler(e){var t,a,r,n;if(((n=(r=(t=e.target.getAttribute(te.KEYS_USED))==null?void 0:t.split(" "))!=null?r:(a=e.target)==null?void 0:a.keysUsed)!=null?n:[]).map(T=>T==="Space"?" ":T).filter(Boolean).includes(e.key))return;let d,u,c,h,f,v=Su;if(!bt(this,Qe).contains(`no${e.key.toLowerCase()}`)&&!(e.key===" "&&bt(this,Qe).contains("nospace")))switch(e.key){case" ":case"k":d=this.getAttribute(o.MEDIA_PAUSED)!=null?b.MEDIA_PLAY_REQUEST:b.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new l.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"m":d=this.getAttribute(o.MEDIA_VOLUME_LEVEL)==="off"?b.MEDIA_UNMUTE_REQUEST:b.MEDIA_MUTE_REQUEST,this.dispatchEvent(new l.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"f":d=this.getAttribute(o.MEDIA_IS_FULLSCREEN)!=null?b.MEDIA_EXIT_FULLSCREEN_REQUEST:b.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new l.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"c":Ne(this);break;case"ArrowLeft":u=this.getAttribute(o.MEDIA_CURRENT_TIME),c=u&&!Number.isNaN(+u)?+u:Us,h=Math.max(c-v,0),f=new l.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(f);break;case"ArrowRight":u=this.getAttribute(o.MEDIA_CURRENT_TIME),c=u&&!Number.isNaN(+u)?+u:Us,h=Math.max(c+v,0),f=new l.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(f);break;default:break}}};Qe=new WeakMap;di=new WeakMap;Pt=new WeakSet;ui=function(i){let{key:e}=i;if(!Vs.includes(e)){this.removeEventListener("keyup",Ut(this,Pt,ui));return}this.keyboardShortcutHandler(i)};ha=new WeakSet;rn=function(i){let{metaKey:e,altKey:t,key:a}=i;if(e||t||!Vs.includes(a)){this.removeEventListener("keyup",Ut(this,Pt,ui));return}[" ","ArrowLeft","ArrowRight"].includes(a)&&!(bt(this,Qe).contains(`no${a.toLowerCase()}`)||a===" "&&bt(this,Qe).contains("nospace"))&&i.preventDefault(),this.addEventListener("keyup",Ut(this,Pt,ui),{once:!0})};var Mu=Object.values(o),Lu=Object.values(dt),sn=i=>{var e,t,a,r;let{observedAttributes:n}=i.constructor;!n&&((e=i.nodeName)==null?void 0:e.includes("-"))&&(l.customElements.upgrade(i),{observedAttributes:n}=i.constructor);let s=(r=(a=(t=i==null?void 0:i.getAttribute)==null?void 0:t.call(i,A.MEDIA_CHROME_ATTRIBUTES))==null?void 0:a.split)==null?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(d=>Mu.includes(d)):[]},Ru=i=>{var e,t;return((e=i.nodeName)==null?void 0:e.includes("-"))&&!!l.customElements.get((t=i.nodeName)==null?void 0:t.toLowerCase())&&!(i instanceof l.customElements.get(i.nodeName.toLowerCase()))&&l.customElements.upgrade(i),Lu.some(a=>a in i)},nn=i=>Ru(i)||!!sn(i).length,Ps=i=>{var e;return(e=i==null?void 0:i.join)==null?void 0:e.call(i,":")},Bs={[o.MEDIA_SUBTITLES_LIST]:ht,[o.MEDIA_SUBTITLES_SHOWING]:ht,[o.MEDIA_SEEKABLE]:Ps,[o.MEDIA_BUFFERED]:i=>i==null?void 0:i.map(Ps).join(" "),[o.MEDIA_PREVIEW_COORDS]:i=>i==null?void 0:i.join(" "),[o.MEDIA_RENDITION_LIST]:ls,[o.MEDIA_AUDIO_TRACK_LIST]:us},wu=async(i,e,t)=>{var a,r;if(i.isConnected||await Qi(0),typeof t=="boolean"||t==null)return R(i,e,t);if(typeof t=="number")return D(i,e,t);if(typeof t=="string")return S(i,e,t);if(Array.isArray(t)&&!t.length)return i.removeAttribute(e);let n=(r=(a=Bs[e])==null?void 0:a.call(Bs,t))!=null?r:t;return i.setAttribute(e,n)},xu=i=>{var e;return!!((e=i.closest)!=null&&e.call(i,'*[slot="media"]'))},pt=(i,e)=>{if(xu(i))return;let t=(r,n)=>{var s,d;nn(r)&&n(r);let{children:u=[]}=r!=null?r:{},c=(d=(s=r==null?void 0:r.shadowRoot)==null?void 0:s.children)!=null?d:[];[...u,...c].forEach(f=>pt(f,n))},a=i==null?void 0:i.nodeName.toLowerCase();if(a.includes("-")&&!nn(i)){l.customElements.whenDefined(a).then(()=>{t(i,e)});return}t(i,e)},Hs=(i,e,t)=>{i.forEach(a=>{if(e in a){a[e]=t;return}let r=sn(a),n=e.toLowerCase();!r.includes(n)||wu(a,n,t)})},$s=(i,e)=>{for(let t of i){if(e in t)return t[e];let a=sn(t),r=e.toLowerCase();if(!!a.includes(r))return t.getAttribute(r)}},Du=(i,e,t)=>{pt(i,e);let a=h=>{var f;let v=(f=h==null?void 0:h.composedPath()[0])!=null?f:h.target;e(v)},r=h=>{var f;let v=(f=h==null?void 0:h.composedPath()[0])!=null?f:h.target;t(v)};i.addEventListener(b.REGISTER_MEDIA_STATE_RECEIVER,a),i.addEventListener(b.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=h=>{h.forEach(f=>{let{addedNodes:v=[],removedNodes:T=[],type:H,target:Y,attributeName:I}=f;H==="childList"?(Array.prototype.forEach.call(v,ae=>pt(ae,e)),Array.prototype.forEach.call(T,ae=>pt(ae,t))):H==="attributes"&&I===A.MEDIA_CHROME_ATTRIBUTES&&(nn(Y)?e(Y):t(Y))})},s=[],d=h=>{let f=h.target;f.name!=="media"&&(s.forEach(v=>pt(v,t)),s=[...f.assignedElements({flatten:!0})],s.forEach(v=>pt(v,e)))};i.addEventListener("slotchange",d);let u=new MutationObserver(n);return u.observe(i,{childList:!0,attributes:!0,subtree:!0}),()=>{pt(i,t),i.removeEventListener("slotchange",d),u.disconnect(),i.removeEventListener(b.REGISTER_MEDIA_STATE_RECEIVER,a),i.removeEventListener(b.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};l.customElements.get("media-controller")||l.customElements.define("media-controller",pa);var ln=pa;var Ou=Object.defineProperty,Nu=(i,e,t)=>e in i?Ou(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Uu=(i,e,t)=>(Nu(i,typeof e!="symbol"?e+"":e,t),t),Fs=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ze=(i,e,t)=>(Fs(i,e,"read from private field"),t?t.call(i):e.get(i)),dn=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ba=(i,e,t,a)=>(Fs(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ye,Ea,va,Ks=m.createElement("template"),Ws=`
202
+ `;var pu=Object.values(o),bu="sm:384 md:576 lg:768 xl:960";function Eu(i){for(let e of i)vu(e.target,e.contentRect.width)}function vu(i,e){var t;if(!i.isConnected)return;let a=(t=i.getAttribute(L.BREAKPOINTS))!=null?t:bu,r=fu(a),n=gu(r,e),s=!1;if(Object.keys(r).forEach(d=>{if(n.includes(d)){i.hasAttribute(`breakpoint${d}`)||(i.setAttribute(`breakpoint${d}`,""),s=!0);return}i.hasAttribute(`breakpoint${d}`)&&(i.removeAttribute(`breakpoint${d}`),s=!0)}),s){let d=new CustomEvent(De.BREAKPOINTS_CHANGE,{detail:n});i.dispatchEvent(d)}}function fu(i){let e=i.split(/\s+/);return Object.fromEntries(e.map(t=>t.split(":")))}function gu(i,e){return Object.keys(i).filter(t=>e>=i[t])}var na=class extends l.HTMLElement{constructor(){super(),hu(this,"breakpointsComputed",!1),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Is.content.cloneNode(!0)));let e=u=>{let c=this.media;for(let h of u)h.type==="childList"&&(h.removedNodes.forEach(g=>{if(g.slot=="media"&&h.target==this){let v=h.previousSibling&&h.previousSibling.previousElementSibling;if(!v||!c)this.mediaUnsetCallback(g);else{let T=v.slot!=="media";for(;(v=v.previousSibling)!==null;)v.slot=="media"&&(T=!1);T&&this.mediaUnsetCallback(g)}}}),c&&h.addedNodes.forEach(g=>{g==c&&this.handleMediaUpdated(c).then(v=>this.mediaSetCallback(v))}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0});let a=!1,r=u=>{a||(setTimeout(()=>{Eu(u),a=!1,this.breakpointsComputed||(this.breakpointsComputed=!0,this.dispatchEvent(new CustomEvent(De.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))},0),a=!0)},n=new ResizeObserver(r);this.resizeObserver=n,n.observe(this);let s=this.media,d=this.querySelector(":scope > slot[slot=media]");d&&d.addEventListener("slotchange",()=>{if(!d.assignedElements({flatten:!0}).length){this.mediaUnsetCallback(s);return}this.media&&(s=this.media,this.handleMediaUpdated(this.media).then(c=>this.mediaSetCallback(c)))})}static get observedAttributes(){return[L.AUTOHIDE,L.GESTURES_DISABLED].concat(pu).filter(e=>![o.MEDIA_RENDITION_LIST,o.MEDIA_AUDIO_TRACK_LIST].includes(e))}attributeChangedCallback(e,t,a){e.toLowerCase()==L.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}mediaSetCallback(e){this._mediaClickPlayToggle=()=>{let t=e.paused?b.MEDIA_PLAY_REQUEST:b.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(t,{composed:!0,bubbles:!0}))}}handleMediaUpdated(e){let t=n=>Promise.resolve(n),a=n=>(console.error('<media-chrome>: Media element set with slot="media" does not appear to be compatible.',n),Promise.reject(n));if(!e)return a(e);let r=e.nodeName.toLowerCase();return r.includes("-")?l.customElements.whenDefined(r).then(()=>t(e)):t(e)}mediaUnsetCallback(e){}connectedCallback(){var e;let a=this.getAttribute(L.AUDIO)!=null?Z.AUDIO_PLAYER():Z.VIDEO_PLAYER();this.setAttribute("role","region"),this.setAttribute("aria-label",a),this.media&&this.handleMediaUpdated(this.media).then(d=>this.mediaSetCallback(d)),this.setAttribute(L.USER_INACTIVE,"");let r=()=>{if(this.autohide<0||this.hasAttribute(L.USER_INACTIVE))return;this.setAttribute(L.USER_INACTIVE,"");let d=new l.CustomEvent(De.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(d)},n=()=>{if(!this.hasAttribute(L.USER_INACTIVE))return;this.removeAttribute(L.USER_INACTIVE);let d=new l.CustomEvent(De.USER_INACTIVE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(d)},s=()=>{n(),clearTimeout(this._inactiveTimeout),!(this.autohide<0)&&(this._inactiveTimeout=setTimeout(()=>{r()},this.autohide*1e3))};this.addEventListener("keyup",()=>{s()}),this.addEventListener("pointerup",d=>{d.pointerType==="touch"?[this,this.media].includes(d.target)&&!this.hasAttribute(L.USER_INACTIVE)?r():s():d.composedPath().some(u=>{var c;return["media-play-button","media-fullscreen-button"].includes((c=u==null?void 0:u.nodeName)==null?void 0:c.toLowerCase())})&&s()}),this.addEventListener("pointermove",d=>{d.pointerType==="mouse"&&(n(),clearTimeout(this._inactiveTimeout),[this,this.media].includes(d.target)&&s())}),this.addEventListener("mouseleave",()=>{r()}),this.addEventListener("keyup",()=>{this.setAttribute(L.KEYBOARD_CONTROL,"")}),(e=l.window)==null||e.addEventListener("mouseup",()=>{this.removeAttribute(L.KEYBOARD_CONTROL)})}set autohide(e){e=Number(e),this._autohide=isNaN(e)?0:e}get autohide(){return this._autohide===void 0?2:this._autohide}};var ks=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},K=(i,e,t)=>(ks(i,e,"read from private field"),t?t.call(i):e.get(i)),si=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},oa=(i,e,t,a)=>(ks(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ot,Nt,sa,mt,Oe,Ze,qe=class{constructor(e,t,{defaultValue:a}={defaultValue:void 0}){si(this,Oe),si(this,Ot,void 0),si(this,Nt,void 0),si(this,sa,void 0),si(this,mt,new Set),oa(this,Ot,e),oa(this,Nt,t),oa(this,sa,new Set(a))}[Symbol.iterator](){return K(this,Oe,Ze).values()}get length(){return K(this,Oe,Ze).size}get value(){var e;return(e=[...K(this,Oe,Ze)].join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(oa(this,mt,new Set),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return[...K(this,Oe,Ze)][e]}values(){return K(this,Oe,Ze).values()}forEach(e){K(this,Oe,Ze).forEach(e)}add(...e){var t,a;e.forEach(r=>K(this,mt).add(r)),!(this.value===""&&!((t=K(this,Ot))!=null&&t.hasAttribute(`${K(this,Nt)}`)))&&((a=K(this,Ot))==null||a.setAttribute(`${K(this,Nt)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>K(this,mt).delete(a)),(t=K(this,Ot))==null||t.setAttribute(`${K(this,Nt)}`,`${this.value}`)}contains(e){return K(this,Oe,Ze).has(e)}toggle(e,t){return typeof t!="undefined"?t?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){return this.remove(e),this.add(t),e===t}};Ot=new WeakMap;Nt=new WeakMap;sa=new WeakMap;mt=new WeakMap;Oe=new WeakSet;Ze=function(){return K(this,mt).size?K(this,mt):K(this,sa)};var Cs=(i="")=>i.split(/\s+/),Ss=(i="")=>{let[e,t,a]=i.split(":"),r=a?decodeURIComponent(a):void 0;return e=e==="cc"?"captions":"subtitles",{kind:e,language:t,label:r}},li=(i="",e={})=>Cs(i).map(t=>{let a=Ss(t);return{...e,...a}}),Au=i=>Array.isArray(i)?i.map(e=>typeof e=="string"?Ss(e):e):typeof i=="string"?li(i):[i],la=({kind:i,label:e,language:t}={kind:"subtitles"})=>e?`${i==="captions"?"cc":"sb"}:${t}:${encodeURIComponent(e)}`:t,ht=(i=[])=>Array.prototype.map.call(i,la).join(" "),_u=(i,e)=>t=>t[i]===e,Ms=i=>{let e=Object.entries(i).map(([t,a])=>_u(t,a));return t=>e.every(a=>a(t))},Jr=(i,e=[],t=[])=>{let a=Au(t).map(Ms),r=n=>a.some(s=>s(n));Array.from(e).filter(r).forEach(n=>{n.mode=i})},da=(i,e=()=>!0)=>{if(!(i!=null&&i.textTracks))return[];let t=typeof e=="function"?e:Ms(e);return Array.from(i.textTracks).filter(t)},jr=i=>!!i.getAttribute(o.MEDIA_SUBTITLES_SHOWING),Ne=(i,e)=>{var t,a;let r=jr(i);if(r||e===!1){let n=i.getAttribute(o.MEDIA_SUBTITLES_SHOWING);if(n){let s=new l.CustomEvent(b.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:n});i.dispatchEvent(s)}}else if(!r||e===!0){let[n]=(a=Cs((t=i.getAttribute(o.MEDIA_SUBTITLES_LIST))!=null?t:""))!=null?a:[];if(n){let s=new l.CustomEvent(b.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:n});i.dispatchEvent(s)}}else console.error("Attempting to enable captions or subtitles but none are available! Please verify your media content if this is unexpected.")};var B={enter:"requestFullscreen",exit:"exitFullscreen",rootEvents:["fullscreenchange"],mediaEvents:[],element:"fullscreenElement",error:"fullscreenerror",enabled:"fullscreenEnabled"};m.fullscreenElement===void 0&&(B.enter="webkitRequestFullScreen",B.exit=m.webkitExitFullscreen!=null?"webkitExitFullscreen":"webkitCancelFullScreen",B.rootEvents=["webkitfullscreenchange"],B.mediaEvents=["webkitbeginfullscreen","webkitendfullscreen"],B.element="webkitFullscreenElement",B.error="webkitfullscreenerror",B.enabled="webkitFullscreenEnabled");var ua,en=()=>{var i,e;return ua||(ua=(e=(i=m)==null?void 0:i.createElement)==null?void 0:e.call(i,"video"),ua)},Ls=async(i=en())=>{if(!i)return!1;let e=i.volume;return i.volume=e/2+.1,await zi(0),i.volume!==e},yu=(i=en())=>typeof(i==null?void 0:i.requestPictureInPicture)=="function",Tu=(i=en())=>{let e=m[B.enabled];return!e&&i&&(e="webkitSupportsFullscreen"in i),e},tn=Tu(),Rs=yu(),xs=!!l.WebKitPlaybackTargetAvailabilityEvent,ws=!!l.chrome;var ca,Ds=Ls().then(i=>(ca=i,ca)),Iu=Object.values(me),an=i=>da(i.media,e=>[wt.SUBTITLES,wt.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),ku=i=>da(i.media,e=>e.mode===Zi.SHOWING&&[wt.SUBTITLES,wt.CAPTIONS].includes(e.kind)),ee={MEDIA_PAUSED:{get:function(i){let{media:e}=i;return e?e.paused:!0},mediaEvents:["play","playing","pause","emptied"]},MEDIA_HAS_PLAYED:{get:function(i){let{media:e}=i;return e?!e.paused:!1},mediaEvents:["playing","emptied"]},MEDIA_ENDED:{get:function(i){let{media:e}=i;return e?e.ended:!1},mediaEvents:["seeked","ended","emptied"]},MEDIA_PLAYBACK_RATE:{get:function(i){let{media:e}=i;return!e||typeof e.playbackRate=="undefined"?1:e.playbackRate},mediaEvents:["ratechange","loadstart"]},MEDIA_MUTED:{get:function(i){let{media:e}=i;return!e||typeof e.muted=="undefined"?!1:e.muted},mediaEvents:["volumechange"]},MEDIA_VOLUME:{get:function(i){let{media:e}=i;return!e||typeof e.volume=="undefined"?1:Number(e.volume)},mediaEvents:["volumechange"]},MEDIA_VOLUME_LEVEL:{get:function(i){let{media:e}=i,t="high";if(!e||typeof e.volume=="undefined")return t;let{muted:a,volume:r}=e;return r===0||a?t="off":r<.5?t="low":r<.75&&(t="medium"),t},mediaEvents:["volumechange"]},MEDIA_CURRENT_TIME:{get:function(i){let{media:e}=i;return!e||typeof e.currentTime=="undefined"?0:e.currentTime},mediaEvents:["timeupdate","loadedmetadata"]},MEDIA_DURATION:{get:function(i){let{media:e}=i;return!e||!Number.isFinite(e.duration)?NaN:e.duration},mediaEvents:["durationchange","loadedmetadata","emptied"]},MEDIA_SEEKABLE:{get:function(i){var e;let{media:t}=i;if(!((e=t==null?void 0:t.seekable)!=null&&e.length))return;let a=t.seekable.start(0),r=t.seekable.end(t.seekable.length-1);if(!(!a&&!r))return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress"]},MEDIA_LOADING:{get:function(i){var e;return((e=i.media)==null?void 0:e.readyState)<3},mediaEvents:["waiting","playing","emptied"]},MEDIA_BUFFERED:{get:function(i){var e,t,a;let r=(e=i.media)==null?void 0:e.buffered;return Array.from((a=(t=i.media)==null?void 0:t.buffered)!=null?a:[]).map((n,s)=>[Number(r.start(s)).toFixed(3),Number(r.end(s)).toFixed(3)])},mediaEvents:["progress","emptied"]},MEDIA_STREAM_TYPE:{get:function(i){let{media:e}=i;if(!e)return;let{streamType:t}=e;if(Iu.includes(t)){if(t===me.UNKNOWN){let r=i.getAttribute("defaultstreamtype");return[me.LIVE,me.ON_DEMAND].includes(r)?r:void 0}return t}let a=e.duration;if(a===1/0)return me.LIVE;if(Number.isFinite(a))return me.ON_DEMAND;{let r=i.getAttribute("defaultstreamtype");if([me.LIVE,me.ON_DEMAND].includes(r))return r}},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},MEDIA_TARGET_LIVE_WINDOW:{get:function(i){let{media:e}=i;if(!e)return Number.NaN;let{targetLiveWindow:t}=e,a=ee.MEDIA_STREAM_TYPE.get(i);return(t==null||Number.isNaN(t))&&a===me.LIVE?0:t},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},MEDIA_TIME_IS_LIVE:{get:function(i){let{media:e}=i;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return Number.isNaN(e.liveEdgeStart)?!1:e.currentTime>=e.liveEdgeStart;if(!(ee.MEDIA_STREAM_TYPE.get(i)==="live"))return!1;let a=e.seekable;if(!a)return!0;if(!a.length)return!1;let r=i.hasAttribute("liveedgeoffset")?Number(i.getAttribute("liveedgeoffset")):10,n=a.end(a.length-1)-r;return e.currentTime>=n},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},MEDIA_IS_FULLSCREEN:{get:function(i,e){var t;let a=i.media;if(a&&m[B.element]===void 0&&"webkitDisplayingFullscreen"in a)return a.webkitDisplayingFullscreen&&a.webkitPresentationMode==="fullscreen";let r;return e?r=m[B.element]?e.target:null:r=(t=i.getRootNode().fullscreenElement)!=null?t:m[B.element],ct(i.fullscreenElement,r)},rootEvents:B.rootEvents,mediaEvents:B.mediaEvents},MEDIA_IS_PIP:{get:function(i,e){var t;let a=i.media;if(!a)return!1;if(e)return e.type=="enterpictureinpicture";{let r=(t=i.getRootNode().pictureInPictureElement)!=null?t:m.pictureInPictureElement;return ct(a,r)}},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},MEDIA_IS_CASTING:{get:function(i,e){var t;let{media:a}=i;if(!a)return!1;let r=(t=l.CastableVideoElement)==null?void 0:t.castElement,n=ct(a,r);return(e==null?void 0:e.type)==="castchange"&&(e==null?void 0:e.detail)==="CONNECTING"&&(n="connecting"),n},mediaEvents:["entercast","leavecast","castchange"]},MEDIA_AIRPLAY_UNAVAILABLE:{get:function(i,e){if(!xs)return ne.UNSUPPORTED;if(!!e&&e.availability!=="available"&&e.availability==="not-available")return ne.UNAVAILABLE},mediaEvents:["webkitplaybacktargetavailabilitychanged"]},MEDIA_CAST_UNAVAILABLE:{get:function(){var i;let e=(i=l.CastableVideoElement)==null?void 0:i.castState;if(!ws||!e)return ne.UNSUPPORTED;if(!e.includes("CONNECT"))return ne.UNAVAILABLE},mediaEvents:["castchange"]},MEDIA_FULLSCREEN_UNAVAILABLE:{get:function(){return tn?void 0:ne.UNAVAILABLE}},MEDIA_PIP_UNAVAILABLE:{get:function(){return Rs?void 0:ne.UNSUPPORTED}},MEDIA_RENDITION_UNAVAILABLE:{get:function(i){var e;let{media:t}=i;if(!(t!=null&&t.videoRenditions))return ne.UNSUPPORTED;if(!((e=t.videoRenditions)!=null&&e.length))return ne.UNAVAILABLE},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},MEDIA_AUDIO_TRACK_UNAVAILABLE:{get:function(i){var e,t;let{media:a}=i;if(!(a!=null&&a.audioTracks))return ne.UNSUPPORTED;if(((t=(e=a.audioTracks)==null?void 0:e.length)!=null?t:0)<=1)return ne.UNAVAILABLE},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},MEDIA_VOLUME_UNAVAILABLE:{get:function(i){if(ca!==void 0&&!ca)return ne.UNSUPPORTED;let{media:e}=i;if(e&&typeof e.volume=="undefined")return ne.UNAVAILABLE},mediaEvents:["loadstart"]},MEDIA_SUBTITLES_LIST:{get:function(i){return an(i).map(({kind:e,label:t,language:a})=>({kind:e,label:t,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},MEDIA_SUBTITLES_SHOWING:{get:function(i){return i.hasAttribute("defaultsubtitles")&&!i.hasAttribute(o.MEDIA_HAS_PLAYED)&&!i.hasAttribute(o.MEDIA_SUBTITLES_SHOWING)&&Ne(i,!0),ku(i).map(({kind:e,label:t,language:a})=>({kind:e,label:t,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"]},MEDIA_RENDITION_LIST:{get:function(i){var e;let{media:t}=i;return[...(e=t==null?void 0:t.videoRenditions)!=null?e:[]]},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},MEDIA_RENDITION_SELECTED:{get:function(i){var e,t,a;let{media:r}=i;return(a=(t=r==null?void 0:r.videoRenditions)==null?void 0:t[(e=r.videoRenditions)==null?void 0:e.selectedIndex])==null?void 0:a.id},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},MEDIA_AUDIO_TRACK_LIST:{get:function(i){var e;let{media:t}=i;return[...(e=t==null?void 0:t.audioTracks)!=null?e:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},MEDIA_AUDIO_TRACK_ENABLED:{get:function(i){var e,t;let{media:a}=i;return(t=[...(e=a==null?void 0:a.audioTracks)!=null?e:[]].find(r=>r.enabled))==null?void 0:t.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]}},ma={MEDIA_PLAY_REQUEST:(i,e,t)=>{var a;let r=ee.MEDIA_STREAM_TYPE.get(t),n=t.getAttribute("noautoseektolive")===null;r==me.LIVE&&n&&ma.MEDIA_SEEK_TO_LIVE_REQUEST(i),(a=i.play())==null||a.catch(()=>{})},MEDIA_PAUSE_REQUEST:i=>i.pause(),MEDIA_MUTE_REQUEST:i=>i.muted=!0,MEDIA_UNMUTE_REQUEST:i=>{i.muted=!1,i.volume===0&&(i.volume=.25)},MEDIA_VOLUME_REQUEST:(i,e,t)=>{let a=e.detail;if(i.volume=a,a>0&&i.muted&&(i.muted=!1),!t.hasAttribute("novolumepref"))try{l.localStorage.setItem("media-chrome-pref-volume",a.toString())}catch{}},MEDIA_ENTER_FULLSCREEN_REQUEST:(i,e,t)=>{if(!tn){console.warn("Fullscreen support is unavailable; not entering fullscreen");return}m.pictureInPictureElement&&m.exitPictureInPicture(),t[B.enter]?t.fullscreenElement[B.enter]():i.webkitEnterFullscreen?i.webkitEnterFullscreen():i.requestFullscreen?i.requestFullscreen():console.warn("MediaChrome: Fullscreen not supported")},MEDIA_EXIT_FULLSCREEN_REQUEST:()=>{m[B.exit]()},MEDIA_ENTER_PIP_REQUEST:i=>{if(!m.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}m[B.element]&&m[B.exit]();let e=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(t=>{if(t.code===11)if(i.readyState===0&&i.preload==="none"){let a=()=>{i.removeEventListener("loadedmetadata",r),i.preload="none"},r=()=>{i.requestPictureInPicture().catch(e),a()};i.addEventListener("loadedmetadata",r),i.preload="metadata",setTimeout(()=>{i.readyState===0&&e(),a()},1e3)}else throw t;else throw t})},MEDIA_EXIT_PIP_REQUEST:()=>{m.pictureInPictureElement&&m.exitPictureInPicture()},MEDIA_ENTER_CAST_REQUEST:i=>{var e;!((e=l.CastableVideoElement)!=null&&e.castEnabled)||(m[B.element]&&m[B.exit](),i.requestCast())},MEDIA_EXIT_CAST_REQUEST:async()=>{var i;(i=l.CastableVideoElement)!=null&&i.castElement&&l.CastableVideoElement.exitCast()},MEDIA_SEEK_REQUEST:(i,e)=>{let t=e.detail;(i.readyState>0||i.readyState===void 0)&&(i.currentTime=t)},MEDIA_PLAYBACK_RATE_REQUEST:(i,e)=>{i.playbackRate=e.detail},MEDIA_PREVIEW_REQUEST:(i,e,t)=>{var a;if(!i)return;let r=e.detail;r===null&&t.propagateMediaState(o.MEDIA_PREVIEW_TIME,void 0),t.propagateMediaState(o.MEDIA_PREVIEW_TIME,r);let[n]=da(i,{kind:wt.METADATA,label:"thumbnails"});if(!(n&&n.cues))return;if(r===null){t.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,void 0),t.propagateMediaState(o.MEDIA_PREVIEW_COORDS,void 0);return}let s=Array.prototype.find.call(n.cues,h=>h.startTime>=r);if(!s)return;let d=/'^(?:[a-z]+:)?\/\//i.test(s.text)||(a=i.querySelector('track[label="thumbnails"]'))==null?void 0:a.src,u=new URL(s.text,d),c=new URLSearchParams(u.hash).get("#xywh");t.propagateMediaState(o.MEDIA_PREVIEW_IMAGE,u.href),t.propagateMediaState(o.MEDIA_PREVIEW_COORDS,c.split(","))},MEDIA_SHOW_SUBTITLES_REQUEST:(i,e,t)=>{let a=an(t),{detail:r=[]}=e;Jr(Zi.SHOWING,a,r)},MEDIA_DISABLE_SUBTITLES_REQUEST:(i,e,t)=>{let a=an(t),{detail:r=[]}=e;Jr(Zi.DISABLED,a,r)},MEDIA_AIRPLAY_REQUEST:i=>{if(!!i){if(!(i.webkitShowPlaybackTargetPicker&&l.WebKitPlaybackTargetAvailabilityEvent)){console.warn("received a request to select AirPlay but AirPlay is not supported in this environment");return}i.webkitShowPlaybackTargetPicker()}},MEDIA_SEEK_TO_LIVE_REQUEST:i=>{let e=i.seekable;if(!e){console.warn("MediaController: Media element does not support seeking to live.");return}if(!e.length){console.warn("MediaController: Media is unable to seek to live.");return}i.currentTime=e.end(e.length-1)},MEDIA_RENDITION_REQUEST:(i,e)=>{if(!(i!=null&&i.videoRenditions)){console.warn("MediaController: Rendition selection not supported by this media.");return}let t=e.detail,a=[...i.videoRenditions].findIndex(r=>r.id==t);i.videoRenditions.selectedIndex!=a&&(i.videoRenditions.selectedIndex=a)},MEDIA_AUDIO_TRACK_REQUEST:(i,e)=>{if(!(i!=null&&i.audioTracks)){console.warn("MediaController: Audio track selection not supported by this media.");return}let t=e.detail;for(let a of i.audioTracks)a.enabled=t==a.id}};var on=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},bt=(i,e,t)=>(on(i,e,"read from private field"),t?t.call(i):e.get(i)),ha=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Os=(i,e,t,a)=>(on(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ut=(i,e,t)=>(on(i,e,"access private method"),t),Qe,di,Pt,ui,pa,rn,Hs=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],Cu=10,Ns=0,te={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYS_USED:"keysused",LIVE_EDGE_OFFSET:"liveedgeoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_HOTKEYS:"nohotkeys"},ba=class extends na{constructor(){super(),ha(this,Pt),ha(this,pa),ha(this,Qe,new qe(this,te.HOTKEYS)),ha(this,di,void 0),ee.MEDIA_VOLUME_UNAVAILABLE.get(this)===void 0&&Ds.then(()=>{this.propagateMediaState(o.MEDIA_VOLUME_UNAVAILABLE,ee.MEDIA_VOLUME_UNAVAILABLE.get(this))}),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,this.associateElement(this),Object.keys(ma).forEach(e=>{let t=`_handle${qi(e,!0)}`;this[t]=a=>{if(a.stopPropagation(),!this.media){console.warn("MediaController: No media available.");return}ma[e](this.media,a,this)},this.addEventListener(b[e],this[t])}),this._mediaStatePropagators={},Object.keys(ee).forEach(e=>{this._mediaStatePropagators[e]=t=>{this.propagateMediaState(dt[e],ee[e].get(this,t))}}),this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(te.NO_HOTKEYS,te.HOTKEYS,te.DEFAULT_STREAM_TYPE,te.DEFAULT_SUBTITLES)}get fullscreenElement(){var e;return(e=bt(this,di))!=null?e:this}set fullscreenElement(e){this.hasAttribute(te.FULLSCREEN_ELEMENT)&&this.removeAttribute(te.FULLSCREEN_ELEMENT),Os(this,di,e)}attributeChangedCallback(e,t,a){var r;if(e===te.NO_HOTKEYS)a!==t&&a===""?(this.hasAttribute(te.HOTKEYS)&&console.warn("Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==t&&a===null&&this.enableHotkeys();else if(e===te.HOTKEYS)bt(this,Qe).value=a;else if(e===te.DEFAULT_SUBTITLES&&a!==t&&a==="")Ne(this,!0);else if(e===te.DEFAULT_STREAM_TYPE)this.propagateMediaState(dt.MEDIA_STREAM_TYPE);else if(e===te.FULLSCREEN_ELEMENT){let n=a?(r=this.getRootNode())==null?void 0:r.getElementById(a):void 0;Os(this,di,n)}super.attributeChangedCallback(e,t,a)}mediaSetCallback(e){if(super.mediaSetCallback(e),e.hasAttribute("tabindex")||(e.tabIndex=-1),Object.keys(ee).forEach(t=>{let{mediaEvents:a,rootEvents:r,textTracksEvents:n,videoRenditionsEvents:s,audioTracksEvents:d}=ee[t],u=this._mediaStatePropagators[t];a==null||a.forEach(c=>{e.addEventListener(c,u),u()}),r==null||r.forEach(c=>{this.getRootNode().addEventListener(c,u),u()}),n==null||n.forEach(c=>{var h;(h=e.textTracks)==null||h.addEventListener(c,u),u()}),s==null||s.forEach(c=>{var h;(h=e.videoRenditions)==null||h.addEventListener(c,u),u()}),d==null||d.forEach(c=>{var h;(h=e.audioTracks)==null||h.addEventListener(c,u),u()})}),!this.hasAttribute("novolumepref"))try{let t=l.localStorage.getItem("media-chrome-pref-volume");t!==null&&(e.volume=t)}catch(t){console.debug("Error getting volume pref",t)}}mediaUnsetCallback(e){super.mediaUnsetCallback(e),Object.keys(ee).forEach(t=>{let{mediaEvents:a,rootEvents:r,textTracksEvents:n,videoRenditionsEvents:s,audioTracksEvents:d}=ee[t],u=this._mediaStatePropagators[t];a==null||a.forEach(c=>{e.removeEventListener(c,u)}),r==null||r.forEach(c=>{this.getRootNode().removeEventListener(c,u)}),n==null||n.forEach(c=>{var h;(h=e.textTracks)==null||h.removeEventListener(c,u)}),s==null||s.forEach(c=>{var h;(h=e.videoRenditions)==null||h.removeEventListener(c,u),u()}),d==null||d.forEach(c=>{var h;(h=e.audioTracks)==null||h.removeEventListener(c,u),u()})}),this.propagateMediaState(dt.MEDIA_PAUSED,!0)}propagateMediaState(e,t){let a=Vs(this.mediaStateReceivers,e);if(Bs(this.mediaStateReceivers,e,t),a===Vs(this.mediaStateReceivers,e))return;let r=e.toLowerCase(),n=new l.CustomEvent(os[r],{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(n)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(t.has(e))return;let a=this.registerMediaStateReceiver.bind(this),r=this.unregisterMediaStateReceiver.bind(this),n=wu(e,a,r);Object.keys(b).forEach(s=>{e.addEventListener(b[s],this[`_handle${qi(s,!0)}`])}),t.set(e,n)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(!t.has(e))return;t.get(e)(),t.delete(e),Object.keys(b).forEach(r=>{e.removeEventListener(b[r],this[`_handle${qi(r,!0)}`])})}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;t.indexOf(e)>-1||(t.push(e),Object.keys(ee).forEach(r=>{let n=ee[r];Bs([e],dt[r],n.get(this))}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,a=t.indexOf(e);a<0||t.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",Ut(this,pa,rn))}disableHotkeys(){this.removeEventListener("keydown",Ut(this,pa,rn)),this.removeEventListener("keyup",Ut(this,Pt,ui))}get hotkeys(){return bt(this,Qe)}keyboardShortcutHandler(e){var t,a,r,n;if(((n=(r=(t=e.target.getAttribute(te.KEYS_USED))==null?void 0:t.split(" "))!=null?r:(a=e.target)==null?void 0:a.keysUsed)!=null?n:[]).map(T=>T==="Space"?" ":T).filter(Boolean).includes(e.key))return;let d,u,c,h,g,v=Cu;if(!bt(this,Qe).contains(`no${e.key.toLowerCase()}`)&&!(e.key===" "&&bt(this,Qe).contains("nospace")))switch(e.key){case" ":case"k":d=this.getAttribute(o.MEDIA_PAUSED)!=null?b.MEDIA_PLAY_REQUEST:b.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new l.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"m":d=this.getAttribute(o.MEDIA_VOLUME_LEVEL)==="off"?b.MEDIA_UNMUTE_REQUEST:b.MEDIA_MUTE_REQUEST,this.dispatchEvent(new l.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"f":d=this.getAttribute(o.MEDIA_IS_FULLSCREEN)!=null?b.MEDIA_EXIT_FULLSCREEN_REQUEST:b.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new l.CustomEvent(d,{composed:!0,bubbles:!0}));break;case"c":Ne(this);break;case"ArrowLeft":u=this.getAttribute(o.MEDIA_CURRENT_TIME),c=u&&!Number.isNaN(+u)?+u:Ns,h=Math.max(c-v,0),g=new l.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(g);break;case"ArrowRight":u=this.getAttribute(o.MEDIA_CURRENT_TIME),c=u&&!Number.isNaN(+u)?+u:Ns,h=Math.max(c+v,0),g=new l.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(g);break;default:break}}};Qe=new WeakMap;di=new WeakMap;Pt=new WeakSet;ui=function(i){let{key:e}=i;if(!Hs.includes(e)){this.removeEventListener("keyup",Ut(this,Pt,ui));return}this.keyboardShortcutHandler(i)};pa=new WeakSet;rn=function(i){let{metaKey:e,altKey:t,key:a}=i;if(e||t||!Hs.includes(a)){this.removeEventListener("keyup",Ut(this,Pt,ui));return}[" ","ArrowLeft","ArrowRight"].includes(a)&&!(bt(this,Qe).contains(`no${a.toLowerCase()}`)||a===" "&&bt(this,Qe).contains("nospace"))&&i.preventDefault(),this.addEventListener("keyup",Ut(this,Pt,ui),{once:!0})};var Su=Object.values(o),Mu=Object.values(dt),sn=i=>{var e,t,a,r;let{observedAttributes:n}=i.constructor;!n&&((e=i.nodeName)==null?void 0:e.includes("-"))&&(l.customElements.upgrade(i),{observedAttributes:n}=i.constructor);let s=(r=(a=(t=i==null?void 0:i.getAttribute)==null?void 0:t.call(i,A.MEDIA_CHROME_ATTRIBUTES))==null?void 0:a.split)==null?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(d=>Su.includes(d)):[]},Lu=i=>{var e,t;return((e=i.nodeName)==null?void 0:e.includes("-"))&&!!l.customElements.get((t=i.nodeName)==null?void 0:t.toLowerCase())&&!(i instanceof l.customElements.get(i.nodeName.toLowerCase()))&&l.customElements.upgrade(i),Mu.some(a=>a in i)},nn=i=>Lu(i)||!!sn(i).length,Us=i=>{var e;return(e=i==null?void 0:i.join)==null?void 0:e.call(i,":")},Ps={[o.MEDIA_SUBTITLES_LIST]:ht,[o.MEDIA_SUBTITLES_SHOWING]:ht,[o.MEDIA_SEEKABLE]:Us,[o.MEDIA_BUFFERED]:i=>i==null?void 0:i.map(Us).join(" "),[o.MEDIA_PREVIEW_COORDS]:i=>i==null?void 0:i.join(" "),[o.MEDIA_RENDITION_LIST]:ss,[o.MEDIA_AUDIO_TRACK_LIST]:ds},Ru=async(i,e,t)=>{var a,r;if(i.isConnected||await zi(0),typeof t=="boolean"||t==null)return R(i,e,t);if(typeof t=="number")return D(i,e,t);if(typeof t=="string")return S(i,e,t);if(Array.isArray(t)&&!t.length)return i.removeAttribute(e);let n=(r=(a=Ps[e])==null?void 0:a.call(Ps,t))!=null?r:t;return i.setAttribute(e,n)},xu=i=>{var e;return!!((e=i.closest)!=null&&e.call(i,'*[slot="media"]'))},pt=(i,e)=>{if(xu(i))return;let t=(r,n)=>{var s,d;nn(r)&&n(r);let{children:u=[]}=r!=null?r:{},c=(d=(s=r==null?void 0:r.shadowRoot)==null?void 0:s.children)!=null?d:[];[...u,...c].forEach(g=>pt(g,n))},a=i==null?void 0:i.nodeName.toLowerCase();if(a.includes("-")&&!nn(i)){l.customElements.whenDefined(a).then(()=>{t(i,e)});return}t(i,e)},Bs=(i,e,t)=>{i.forEach(a=>{if(e in a){a[e]=t;return}let r=sn(a),n=e.toLowerCase();!r.includes(n)||Ru(a,n,t)})},Vs=(i,e)=>{for(let t of i){if(e in t)return t[e];let a=sn(t),r=e.toLowerCase();if(!!a.includes(r))return t.getAttribute(r)}},wu=(i,e,t)=>{pt(i,e);let a=h=>{var g;let v=(g=h==null?void 0:h.composedPath()[0])!=null?g:h.target;e(v)},r=h=>{var g;let v=(g=h==null?void 0:h.composedPath()[0])!=null?g:h.target;t(v)};i.addEventListener(b.REGISTER_MEDIA_STATE_RECEIVER,a),i.addEventListener(b.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=h=>{h.forEach(g=>{let{addedNodes:v=[],removedNodes:T=[],type:V,target:Y,attributeName:I}=g;V==="childList"?(Array.prototype.forEach.call(v,ae=>pt(ae,e)),Array.prototype.forEach.call(T,ae=>pt(ae,t))):V==="attributes"&&I===A.MEDIA_CHROME_ATTRIBUTES&&(nn(Y)?e(Y):t(Y))})},s=[],d=h=>{let g=h.target;g.name!=="media"&&(s.forEach(v=>pt(v,t)),s=[...g.assignedElements({flatten:!0})],s.forEach(v=>pt(v,e)))};i.addEventListener("slotchange",d);let u=new MutationObserver(n);return u.observe(i,{childList:!0,attributes:!0,subtree:!0}),()=>{pt(i,t),i.removeEventListener("slotchange",d),u.disconnect(),i.removeEventListener(b.REGISTER_MEDIA_STATE_RECEIVER,a),i.removeEventListener(b.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};l.customElements.get("media-controller")||l.customElements.define("media-controller",ba);var ln=ba;var Du=Object.defineProperty,Ou=(i,e,t)=>e in i?Du(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Nu=(i,e,t)=>(Ou(i,typeof e!="symbol"?e+"":e,t),t),Ws=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ze=(i,e,t)=>(Ws(i,e,"read from private field"),t?t.call(i):e.get(i)),dn=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ea=(i,e,t,a)=>(Ws(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ye,va,fa,Fs=m.createElement("template"),$s=`
203
203
  height: var(--thumb-height);
204
204
  width: var(--media-range-thumb-width, 10px);
205
205
  border: var(--media-range-thumb-border, none);
@@ -223,7 +223,7 @@
223
223
  transition: var(--media-range-track-transition, none);
224
224
  transform: translate(var(--media-range-track-translate-x, 0), var(--media-range-track-translate-y, 0));
225
225
  cursor: pointer;
226
- `;Ks.innerHTML=`
226
+ `;Fs.innerHTML=`
227
227
  <style>
228
228
  :host {
229
229
  --thumb-height: var(--media-range-thumb-height, 10px);
@@ -281,14 +281,14 @@
281
281
 
282
282
  input[type=range]::-webkit-slider-thumb {
283
283
  -webkit-appearance: none;
284
- ${Ws}
284
+ ${$s}
285
285
 
286
286
  margin-top: calc(calc(0px - var(--thumb-height) + var(--track-height)) / 2);
287
287
  }
288
288
 
289
289
 
290
290
  input[type=range]::-moz-range-thumb {
291
- ${Ws}
291
+ ${$s}
292
292
  translate: var(--media-range-track-translate-x, 0) var(--media-range-track-translate-y, 0);
293
293
  }
294
294
 
@@ -366,7 +366,7 @@
366
366
  <div id="hoverzone"></div>
367
367
  <input id="range" type="range" min="0" max="1000" step="any" value="0">
368
368
  </div>
369
- `;var Et=class extends l.HTMLElement{constructor(){super(),Uu(this,"thumbWidth"),dn(this,ye,void 0),dn(this,Ea,()=>{if(this.range.matches(":focus-visible")){let{style:t}=N(this.shadowRoot,":host");t.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),dn(this,va,()=>{let{style:t}=N(this.shadowRoot,":host");t.removeProperty("--_focus-visible-box-shadow")}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Ks.content.cloneNode(!0)));let{style:e}=N(this.shadowRoot,":host");e.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-block))`),this.container=this.shadowRoot.querySelector("#container"),this.range=this.shadowRoot.querySelector("#range"),this.range.addEventListener("input",this.updateBar.bind(this)),this.thumbWidth=parseInt(getComputedStyle(this).getPropertyValue("--media-range-thumb-width")||"10",10)}static get observedAttributes(){return["disabled","aria-disabled",A.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=ze(this,ye))==null?void 0:r.unassociateElement)==null||n.call(r,this),ba(this,ye,null)),a&&(ba(this,ye,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=ze(this,ye))==null?void 0:d.associateElement)==null||u.call(d,this))):(e==="disabled"||e==="aria-disabled"&&t!==a)&&(a==null?this.range.removeAttribute(e):this.range.setAttribute(e,a))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(ba(this,ye,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=ze(this,ye))==null?void 0:t.associateElement)==null||a.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",ze(this,Ea)),this.shadowRoot.addEventListener("focusout",ze(this,va))}disconnectedCallback(){var e,t;(t=(e=ze(this,ye))==null?void 0:e.unassociateElement)==null||t.call(e,this),ba(this,ye,null),this.shadowRoot.removeEventListener("focusin",ze(this,Ea)),this.shadowRoot.removeEventListener("focusout",ze(this,va))}updatePointerBar(e){let t=this.range.getBoundingClientRect(),a=(e.clientX-t.left)/t.width;a=Math.max(0,Math.min(1,a));let{style:r}=N(this.shadowRoot,"#pointer");r.setProperty("width",`${a*t.width}px`)}updateBar(){let e=this.getBarColors(),t="linear-gradient(to right, ",a=0;e.forEach(n=>{n[1]<a||(t=t+`${n[0]} ${a}%, ${n[0]} ${n[1]}%,`,a=n[1])}),t=t.slice(0,t.length-1)+")";let{style:r}=N(this.shadowRoot,"#range");r.setProperty("--media-range-track-progress-internal",t)}getRelativeValues(){let{range:e}=this;return{relativeValue:e.value-e.min,relativeMax:e.max-e.min}}getBarColors(){let e=this.range,{relativeValue:t,relativeMax:a}=this.getRelativeValues(),r=t/a*100,n=0;return!!t&&t<a&&(n=this.thumbWidth*(.5-r/100)/e.offsetWidth*100),[["var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238)))",r+n],["var(--media-range-track-color, transparent)",100]]}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}};ye=new WeakMap;Ea=new WeakMap;va=new WeakMap;l.customElements.get("media-chrome-range")||l.customElements.define("media-chrome-range",Et);var Ys=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},fa=(i,e,t)=>(Ys(i,e,"read from private field"),t?t.call(i):e.get(i)),Pu=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ga=(i,e,t,a)=>(Ys(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Te,Gs=m.createElement("template");Gs.innerHTML=`
369
+ `;var Et=class extends l.HTMLElement{constructor(){super(),Nu(this,"thumbWidth"),dn(this,ye,void 0),dn(this,va,()=>{if(this.range.matches(":focus-visible")){let{style:t}=N(this.shadowRoot,":host");t.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),dn(this,fa,()=>{let{style:t}=N(this.shadowRoot,":host");t.removeProperty("--_focus-visible-box-shadow")}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Fs.content.cloneNode(!0)));let{style:e}=N(this.shadowRoot,":host");e.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-block))`),this.container=this.shadowRoot.querySelector("#container"),this.range=this.shadowRoot.querySelector("#range"),this.range.addEventListener("input",this.updateBar.bind(this)),this.thumbWidth=parseInt(getComputedStyle(this).getPropertyValue("--media-range-thumb-width")||"10",10)}static get observedAttributes(){return["disabled","aria-disabled",A.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=ze(this,ye))==null?void 0:r.unassociateElement)==null||n.call(r,this),Ea(this,ye,null)),a&&(Ea(this,ye,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=ze(this,ye))==null?void 0:d.associateElement)==null||u.call(d,this))):(e==="disabled"||e==="aria-disabled"&&t!==a)&&(a==null?this.range.removeAttribute(e):this.range.setAttribute(e,a))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Ea(this,ye,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=ze(this,ye))==null?void 0:t.associateElement)==null||a.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",ze(this,va)),this.shadowRoot.addEventListener("focusout",ze(this,fa))}disconnectedCallback(){var e,t;(t=(e=ze(this,ye))==null?void 0:e.unassociateElement)==null||t.call(e,this),Ea(this,ye,null),this.shadowRoot.removeEventListener("focusin",ze(this,va)),this.shadowRoot.removeEventListener("focusout",ze(this,fa))}updatePointerBar(e){let t=this.range.getBoundingClientRect(),a=(e.clientX-t.left)/t.width;a=Math.max(0,Math.min(1,a));let{style:r}=N(this.shadowRoot,"#pointer");r.setProperty("width",`${a*t.width}px`)}updateBar(){let e=this.getBarColors(),t="linear-gradient(to right, ",a=0;e.forEach(n=>{n[1]<a||(t=t+`${n[0]} ${a}%, ${n[0]} ${n[1]}%,`,a=n[1])}),t=t.slice(0,t.length-1)+")";let{style:r}=N(this.shadowRoot,"#range");r.setProperty("--media-range-track-progress-internal",t)}getRelativeValues(){let{range:e}=this;return{relativeValue:e.value-e.min,relativeMax:e.max-e.min}}getBarColors(){let e=this.range,{relativeValue:t,relativeMax:a}=this.getRelativeValues(),r=t/a*100,n=0;return!!t&&t<a&&(n=this.thumbWidth*(.5-r/100)/e.offsetWidth*100),[["var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238)))",r+n],["var(--media-range-track-color, transparent)",100]]}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}};ye=new WeakMap;va=new WeakMap;fa=new WeakMap;l.customElements.get("media-chrome-range")||l.customElements.define("media-chrome-range",Et);var Ks=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ga=(i,e,t)=>(Ks(i,e,"read from private field"),t?t.call(i):e.get(i)),Uu=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Aa=(i,e,t,a)=>(Ks(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Te,Ys=m.createElement("template");Ys.innerHTML=`
370
370
  <style>
371
371
  :host {
372
372
 
@@ -392,7 +392,7 @@
392
392
  </style>
393
393
 
394
394
  <slot></slot>
395
- `;var cn=class extends l.HTMLElement{constructor(){super(),Pu(this,Te,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Gs.content.cloneNode(!0))),this.shadowRoot.querySelector("slot").addEventListener("slotchange",({target:e})=>{let t=e.assignedElements({flatten:!0}).every(n=>["media-time-range","media-volume-range"].includes(n.nodeName.toLowerCase())),{style:a}=N(this.shadowRoot,":host"),r=t?"unset":"initial";a.setProperty("--_range-auto-size",r)})}static get observedAttributes(){return[A.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER&&(t&&((n=(r=fa(this,Te))==null?void 0:r.unassociateElement)==null||n.call(r,this),ga(this,Te,null)),a&&(ga(this,Te,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=fa(this,Te))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(ga(this,Te,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=fa(this,Te))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=fa(this,Te))==null?void 0:e.unassociateElement)==null||t.call(e,this),ga(this,Te,null)}};Te=new WeakMap;l.customElements.get("media-control-bar")||l.customElements.define("media-control-bar",cn);var Zs=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Aa=(i,e,t)=>(Zs(i,e,"read from private field"),t?t.call(i):e.get(i)),Bu=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},_a=(i,e,t,a)=>(Zs(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ie,qs=m.createElement("template");qs.innerHTML=`
395
+ `;var cn=class extends l.HTMLElement{constructor(){super(),Uu(this,Te,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Ys.content.cloneNode(!0))),this.shadowRoot.querySelector("slot").addEventListener("slotchange",({target:e})=>{let t=e.assignedElements({flatten:!0}).every(n=>["media-time-range","media-volume-range"].includes(n.nodeName.toLowerCase())),{style:a}=N(this.shadowRoot,":host"),r=t?"unset":"initial";a.setProperty("--_range-auto-size",r)})}static get observedAttributes(){return[A.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER&&(t&&((n=(r=ga(this,Te))==null?void 0:r.unassociateElement)==null||n.call(r,this),Aa(this,Te,null)),a&&(Aa(this,Te,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=ga(this,Te))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Aa(this,Te,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=ga(this,Te))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=ga(this,Te))==null?void 0:e.unassociateElement)==null||t.call(e,this),Aa(this,Te,null)}};Te=new WeakMap;l.customElements.get("media-control-bar")||l.customElements.define("media-control-bar",cn);var Gs=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},_a=(i,e,t)=>(Gs(i,e,"read from private field"),t?t.call(i):e.get(i)),Pu=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},ya=(i,e,t,a)=>(Gs(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ie,Zs=m.createElement("template");Zs.innerHTML=`
396
396
  <style>
397
397
  :host {
398
398
  font: var(--media-font,
@@ -425,11 +425,11 @@
425
425
  }
426
426
  </style>
427
427
  <slot></slot>
428
- `;var Ue=class extends l.HTMLElement{constructor(){super(),Bu(this,Ie,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(qs.content.cloneNode(!0)));let{style:e}=N(this.shadowRoot,":host");e.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`)}static get observedAttributes(){return[A.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER&&(t&&((n=(r=Aa(this,Ie))==null?void 0:r.unassociateElement)==null||n.call(r,this),_a(this,Ie,null)),a&&(_a(this,Ie,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Aa(this,Ie))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(_a(this,Ie,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=Aa(this,Ie))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=Aa(this,Ie))==null?void 0:e.unassociateElement)==null||t.call(e,this),_a(this,Ie,null)}};Ie=new WeakMap;l.customElements.get("media-text-display")||l.customElements.define("media-text-display",Ue);var zs=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Qs=(i,e,t)=>(zs(i,e,"read from private field"),t?t.call(i):e.get(i)),Hu=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},$u=(i,e,t,a)=>(zs(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ci,mn=class extends Ue{constructor(){super(),Hu(this,ci,void 0),$u(this,ci,this.shadowRoot.querySelector("slot")),Qs(this,ci).textContent=Ae(0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_DURATION]}attributeChangedCallback(e,t,a){e===o.MEDIA_DURATION&&(Qs(this,ci).textContent=Ae(a)),super.attributeChangedCallback(e,t,a)}get mediaDuration(){return C(this,o.MEDIA_DURATION)}set mediaDuration(e){D(this,o.MEDIA_DURATION,e)}};ci=new WeakMap;l.customElements.get("media-duration-display")||l.customElements.define("media-duration-display",mn);var el=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},hn=(i,e,t)=>(el(i,e,"read from private field"),t?t.call(i):e.get(i)),Vu=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Wu=(i,e,t,a)=>(el(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Bt,he={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},Xs=[...Object.values(he),o.MEDIA_CURRENT_TIME,o.MEDIA_DURATION,o.MEDIA_SEEKABLE],Js=["Enter"," "],Fu="&nbsp;/&nbsp;",js=(i,{timesSep:e=Fu}={})=>{var t,a,r,n;let s=i.hasAttribute(he.REMAINING),d=i.hasAttribute(he.SHOW_DURATION),u=(t=i.mediaCurrentTime)!=null?t:0,[,c]=(a=i.mediaSeekable)!=null?a:[],h=(n=(r=i.mediaDuration)!=null?r:c)!=null?n:0,f=s?Ae(0-(h-u)):Ae(u);return d?`${f}${e}${Ae(h)}`:f},Ku="video not loaded, unknown time.",Yu=i=>{var e;let t=i.mediaCurrentTime,[,a]=(e=i.mediaSeekable)!=null?e:[],r=i.mediaDuration||a;if(t==null||r==null){i.setAttribute("aria-valuetext",Ku);return}let n=i.hasAttribute(he.REMAINING),s=i.hasAttribute(he.SHOW_DURATION),d=n?ut(0-(r-t)):ut(t);if(!s){i.setAttribute("aria-valuetext",d);return}let u=ut(r),c=`${d} of ${u}`;i.setAttribute("aria-valuetext",c)},pn=class extends Ue{constructor(){super(),Vu(this,Bt,void 0),Wu(this,Bt,this.shadowRoot.querySelector("slot")),hn(this,Bt).innerHTML=`${js(this)}`;let{style:e}=N(this.shadowRoot,":host:not([notoggle])");e.setProperty("cursor","pointer");let{style:t}=N(this.shadowRoot,":host(:hover:not([notoggle]))");t.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))")}static get observedAttributes(){return[...super.observedAttributes,...Xs,"disabled"]}connectedCallback(){this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",Z.PLAYBACK_TIME());let e=t=>{let{key:a}=t;if(!Js.includes(a)){this.removeEventListener("keyup",e);return}this.toggleTimeDisplay()};this.addEventListener("keydown",t=>{let{metaKey:a,altKey:r,key:n}=t;if(a||r||!Js.includes(n)){this.removeEventListener("keyup",e);return}this.addEventListener("keyup",e)}),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,t,a){Xs.includes(e)?this.update():e==="disabled"&&a!==t&&(a==null?this.enable():this.disable()),super.attributeChangedCallback(e,t,a)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return x(this,he.REMAINING)}set remaining(e){R(this,he.REMAINING,e)}get showDuration(){return x(this,he.SHOW_DURATION)}set showDuration(e){R(this,he.SHOW_DURATION,e)}get noToggle(){return x(this,he.NO_TOGGLE)}set noToggle(e){R(this,he.NO_TOGGLE,e)}get mediaDuration(){return C(this,o.MEDIA_DURATION)}set mediaDuration(e){D(this,o.MEDIA_DURATION,e)}get mediaCurrentTime(){return C(this,o.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){D(this,o.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(o.MEDIA_SEEKABLE);if(!!e)return e.split(":").map(t=>+t)}set mediaSeekable(e){if(e==null){this.removeAttribute(o.MEDIA_SEEKABLE);return}this.setAttribute(o.MEDIA_SEEKABLE,e.join(":"))}update(){let e=js(this);Yu(this),e!==hn(this,Bt).innerHTML&&(hn(this,Bt).innerHTML=e)}};Bt=new WeakMap;l.customElements.get("media-time-display")||l.customElements.define("media-time-display",pn);var Gu=`<svg aria-hidden="true" viewBox="0 0 26 24">
428
+ `;var Ue=class extends l.HTMLElement{constructor(){super(),Pu(this,Ie,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Zs.content.cloneNode(!0)));let{style:e}=N(this.shadowRoot,":host");e.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`)}static get observedAttributes(){return[A.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER&&(t&&((n=(r=_a(this,Ie))==null?void 0:r.unassociateElement)==null||n.call(r,this),ya(this,Ie,null)),a&&(ya(this,Ie,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=_a(this,Ie))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(ya(this,Ie,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=_a(this,Ie))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=_a(this,Ie))==null?void 0:e.unassociateElement)==null||t.call(e,this),ya(this,Ie,null)}};Ie=new WeakMap;l.customElements.get("media-text-display")||l.customElements.define("media-text-display",Ue);var Qs=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},qs=(i,e,t)=>(Qs(i,e,"read from private field"),t?t.call(i):e.get(i)),Bu=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Vu=(i,e,t,a)=>(Qs(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),ci,mn=class extends Ue{constructor(){super(),Bu(this,ci,void 0),Vu(this,ci,this.shadowRoot.querySelector("slot")),qs(this,ci).textContent=Ae(0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_DURATION]}attributeChangedCallback(e,t,a){e===o.MEDIA_DURATION&&(qs(this,ci).textContent=Ae(a)),super.attributeChangedCallback(e,t,a)}get mediaDuration(){return C(this,o.MEDIA_DURATION)}set mediaDuration(e){D(this,o.MEDIA_DURATION,e)}};ci=new WeakMap;l.customElements.get("media-duration-display")||l.customElements.define("media-duration-display",mn);var js=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},hn=(i,e,t)=>(js(i,e,"read from private field"),t?t.call(i):e.get(i)),Hu=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},$u=(i,e,t,a)=>(js(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Bt,he={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},zs=[...Object.values(he),o.MEDIA_CURRENT_TIME,o.MEDIA_DURATION,o.MEDIA_SEEKABLE],Xs=["Enter"," "],Wu="&nbsp;/&nbsp;",Js=(i,{timesSep:e=Wu}={})=>{var t,a,r,n;let s=i.hasAttribute(he.REMAINING),d=i.hasAttribute(he.SHOW_DURATION),u=(t=i.mediaCurrentTime)!=null?t:0,[,c]=(a=i.mediaSeekable)!=null?a:[],h=(n=(r=i.mediaDuration)!=null?r:c)!=null?n:0,g=s?Ae(0-(h-u)):Ae(u);return d?`${g}${e}${Ae(h)}`:g},Fu="video not loaded, unknown time.",Ku=i=>{var e;let t=i.mediaCurrentTime,[,a]=(e=i.mediaSeekable)!=null?e:[],r=i.mediaDuration||a;if(t==null||r==null){i.setAttribute("aria-valuetext",Fu);return}let n=i.hasAttribute(he.REMAINING),s=i.hasAttribute(he.SHOW_DURATION),d=n?ut(0-(r-t)):ut(t);if(!s){i.setAttribute("aria-valuetext",d);return}let u=ut(r),c=`${d} of ${u}`;i.setAttribute("aria-valuetext",c)},pn=class extends Ue{constructor(){super(),Hu(this,Bt,void 0),$u(this,Bt,this.shadowRoot.querySelector("slot")),hn(this,Bt).innerHTML=`${Js(this)}`;let{style:e}=N(this.shadowRoot,":host:not([notoggle])");e.setProperty("cursor","pointer");let{style:t}=N(this.shadowRoot,":host(:hover:not([notoggle]))");t.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))")}static get observedAttributes(){return[...super.observedAttributes,...zs,"disabled"]}connectedCallback(){this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",Z.PLAYBACK_TIME());let e=t=>{let{key:a}=t;if(!Xs.includes(a)){this.removeEventListener("keyup",e);return}this.toggleTimeDisplay()};this.addEventListener("keydown",t=>{let{metaKey:a,altKey:r,key:n}=t;if(a||r||!Xs.includes(n)){this.removeEventListener("keyup",e);return}this.addEventListener("keyup",e)}),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,t,a){zs.includes(e)?this.update():e==="disabled"&&a!==t&&(a==null?this.enable():this.disable()),super.attributeChangedCallback(e,t,a)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return w(this,he.REMAINING)}set remaining(e){R(this,he.REMAINING,e)}get showDuration(){return w(this,he.SHOW_DURATION)}set showDuration(e){R(this,he.SHOW_DURATION,e)}get noToggle(){return w(this,he.NO_TOGGLE)}set noToggle(e){R(this,he.NO_TOGGLE,e)}get mediaDuration(){return C(this,o.MEDIA_DURATION)}set mediaDuration(e){D(this,o.MEDIA_DURATION,e)}get mediaCurrentTime(){return C(this,o.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){D(this,o.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(o.MEDIA_SEEKABLE);if(!!e)return e.split(":").map(t=>+t)}set mediaSeekable(e){if(e==null){this.removeAttribute(o.MEDIA_SEEKABLE);return}this.setAttribute(o.MEDIA_SEEKABLE,e.join(":"))}update(){let e=Js(this);Ku(this),e!==hn(this,Bt).innerHTML&&(hn(this,Bt).innerHTML=e)}};Bt=new WeakMap;l.customElements.get("media-time-display")||l.customElements.define("media-time-display",pn);var Yu=`<svg aria-hidden="true" viewBox="0 0 26 24">
429
429
  <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"/>
430
- </svg>`,Zu=`<svg aria-hidden="true" viewBox="0 0 26 24">
430
+ </svg>`,Gu=`<svg aria-hidden="true" viewBox="0 0 26 24">
431
431
  <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"/>
432
- </svg>`,rl=m.createElement("template");rl.innerHTML=`
432
+ </svg>`,al=m.createElement("template");al.innerHTML=`
433
433
  <style>
434
434
  :host([aria-checked="true"]) slot[name=off] {
435
435
  display: none !important;
@@ -442,16 +442,16 @@
442
442
  </style>
443
443
 
444
444
  <slot name="icon">
445
- <slot name="on">${Gu}</slot>
446
- <slot name="off">${Zu}</slot>
445
+ <slot name="on">${Yu}</slot>
446
+ <slot name="off">${Gu}</slot>
447
447
  </slot>
448
- `;var tl=i=>{i.setAttribute("aria-checked",jr(i))},bn=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:rl,...e}),this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",Z.CLOSED_CAPTIONS()),tl(this)}attributeChangedCallback(e,t,a){e===o.MEDIA_SUBTITLES_SHOWING&&tl(this),super.attributeChangedCallback(e,t,a)}get mediaSubtitlesList(){return il(this,o.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){al(this,o.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return il(this,o.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){al(this,o.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){Ne(this)}},il=(i,e)=>{let t=i.getAttribute(e);return t?li(t):[]},al=(i,e,t)=>{if(!(t!=null&&t.length)){i.removeAttribute(e);return}let a=ht(t);i.getAttribute(e)!==a&&i.setAttribute(e,a)};l.customElements.get("media-captions-button")||l.customElements.define("media-captions-button",bn);var Ht={SEEK_OFFSET:"seekoffset"},ya=30,qu=`<svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(8.9 19.87)">${ya}</text><path d="M10 6V3l5.61 4L10 10.94V8a5.54 5.54 0 0 0-1.9 10.48v2.12A7.5 7.5 0 0 1 10 6Z"/></svg>`,nl=m.createElement("template");nl.innerHTML=`
449
- <slot name="icon">${qu}</slot>
450
- `;var Qu=0,En=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,Ht.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:nl,...e})}connectedCallback(){this.seekOffset=C(this,Ht.SEEK_OFFSET,ya),super.connectedCallback()}attributeChangedCallback(e,t,a){e===Ht.SEEK_OFFSET&&(this.seekOffset=C(this,Ht.SEEK_OFFSET,ya)),super.attributeChangedCallback(e,t,a)}get seekOffset(){return C(this,Ht.SEEK_OFFSET,ya)}set seekOffset(e){D(this,Ht.SEEK_OFFSET,e),this.setAttribute("aria-label",O.SEEK_FORWARD_N_SECS({seekOffset:this.seekOffset})),zi(Xi(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return C(this,o.MEDIA_CURRENT_TIME,Qu)}set mediaCurrentTime(e){D(this,o.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,t=new l.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}};l.customElements.get("media-seek-forward-button")||l.customElements.define("media-seek-forward-button",En);var zu=`<svg aria-hidden="true" viewBox="0 0 26 24">
448
+ `;var el=i=>{i.setAttribute("aria-checked",jr(i))},bn=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING]}constructor(e={}){super({slotTemplate:al,...e}),this._captionsReady=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",Z.CLOSED_CAPTIONS()),el(this)}attributeChangedCallback(e,t,a){e===o.MEDIA_SUBTITLES_SHOWING&&el(this),super.attributeChangedCallback(e,t,a)}get mediaSubtitlesList(){return tl(this,o.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){il(this,o.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return tl(this,o.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){il(this,o.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){Ne(this)}},tl=(i,e)=>{let t=i.getAttribute(e);return t?li(t):[]},il=(i,e,t)=>{if(!(t!=null&&t.length)){i.removeAttribute(e);return}let a=ht(t);i.getAttribute(e)!==a&&i.setAttribute(e,a)};l.customElements.get("media-captions-button")||l.customElements.define("media-captions-button",bn);var Vt={SEEK_OFFSET:"seekoffset"},Ta=30,Zu=`<svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(8.9 19.87)">${Ta}</text><path d="M10 6V3l5.61 4L10 10.94V8a5.54 5.54 0 0 0-1.9 10.48v2.12A7.5 7.5 0 0 1 10 6Z"/></svg>`,rl=m.createElement("template");rl.innerHTML=`
449
+ <slot name="icon">${Zu}</slot>
450
+ `;var qu=0,En=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,Vt.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:rl,...e})}connectedCallback(){this.seekOffset=C(this,Vt.SEEK_OFFSET,Ta),super.connectedCallback()}attributeChangedCallback(e,t,a){e===Vt.SEEK_OFFSET&&(this.seekOffset=C(this,Vt.SEEK_OFFSET,Ta)),super.attributeChangedCallback(e,t,a)}get seekOffset(){return C(this,Vt.SEEK_OFFSET,Ta)}set seekOffset(e){D(this,Vt.SEEK_OFFSET,e),this.setAttribute("aria-label",O.SEEK_FORWARD_N_SECS({seekOffset:this.seekOffset})),Xi(Ji(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return C(this,o.MEDIA_CURRENT_TIME,qu)}set mediaCurrentTime(e){D(this,o.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,t=new l.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}};l.customElements.get("media-seek-forward-button")||l.customElements.define("media-seek-forward-button",En);var Qu=`<svg aria-hidden="true" viewBox="0 0 26 24">
451
451
  <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>
452
- </svg>`,Xu=`<svg aria-hidden="true" viewBox="0 0 26 24">
452
+ </svg>`,zu=`<svg aria-hidden="true" viewBox="0 0 26 24">
453
453
  <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>
454
- </svg>`,sl=m.createElement("template");sl.innerHTML=`
454
+ </svg>`,ol=m.createElement("template");ol.innerHTML=`
455
455
  <style>
456
456
  :host([${o.MEDIA_IS_FULLSCREEN}]) slot:not([name=exit]):not([name=icon]) {
457
457
  display: none !important;
@@ -464,10 +464,10 @@
464
464
  </style>
465
465
 
466
466
  <slot name="icon">
467
- <slot name="enter">${zu}</slot>
468
- <slot name="exit">${Xu}</slot>
467
+ <slot name="enter">${Qu}</slot>
468
+ <slot name="exit">${zu}</slot>
469
469
  </slot>
470
- `;var ol=i=>{let e=i.mediaIsFullscreen?O.EXIT_FULLSCREEN():O.ENTER_FULLSCREEN();i.setAttribute("aria-label",e)},vn=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_FULLSCREEN,o.MEDIA_FULLSCREEN_UNAVAILABLE]}constructor(e={}){super({slotTemplate:sl,...e})}connectedCallback(){ol(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_FULLSCREEN&&ol(this),super.attributeChangedCallback(e,t,a)}get mediaFullscreenUnavailable(){return w(this,o.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){S(this,o.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return x(this,o.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){R(this,o.MEDIA_IS_FULLSCREEN,e)}handleClick(){let e=this.mediaIsFullscreen?b.MEDIA_EXIT_FULLSCREEN_REQUEST:b.MEDIA_ENTER_FULLSCREEN_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-fullscreen-button")||l.customElements.define("media-fullscreen-button",vn);var{MEDIA_TIME_IS_LIVE:Ta,MEDIA_PAUSED:mi}=o,{MEDIA_SEEK_TO_LIVE_REQUEST:Ju,MEDIA_PLAY_REQUEST:ju}=b,ec='<svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg>',dl=m.createElement("template");dl.innerHTML=`
470
+ `;var nl=i=>{let e=i.mediaIsFullscreen?O.EXIT_FULLSCREEN():O.ENTER_FULLSCREEN();i.setAttribute("aria-label",e)},vn=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_FULLSCREEN,o.MEDIA_FULLSCREEN_UNAVAILABLE]}constructor(e={}){super({slotTemplate:ol,...e})}connectedCallback(){nl(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_FULLSCREEN&&nl(this),super.attributeChangedCallback(e,t,a)}get mediaFullscreenUnavailable(){return x(this,o.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){S(this,o.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return w(this,o.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){R(this,o.MEDIA_IS_FULLSCREEN,e)}handleClick(){let e=this.mediaIsFullscreen?b.MEDIA_EXIT_FULLSCREEN_REQUEST:b.MEDIA_ENTER_FULLSCREEN_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-fullscreen-button")||l.customElements.define("media-fullscreen-button",vn);var{MEDIA_TIME_IS_LIVE:Ia,MEDIA_PAUSED:mi}=o,{MEDIA_SEEK_TO_LIVE_REQUEST:Xu,MEDIA_PLAY_REQUEST:Ju}=b,ju='<svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg>',ll=m.createElement("template");ll.innerHTML=`
471
471
  <style>
472
472
 
473
473
  slot[name=indicator] > *,
@@ -478,28 +478,28 @@
478
478
  color: var(--media-live-button-icon-color, rgb(140, 140, 140));
479
479
  }
480
480
 
481
- :host([${Ta}]:not([${mi}])) slot[name=indicator] > *,
482
- :host([${Ta}]:not([${mi}])) ::slotted([slot=indicator]) {
481
+ :host([${Ia}]:not([${mi}])) slot[name=indicator] > *,
482
+ :host([${Ia}]:not([${mi}])) ::slotted([slot=indicator]) {
483
483
  fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));
484
484
  color: var(--media-live-button-indicator-color, rgb(255, 0, 0));
485
485
  }
486
486
 
487
- :host([${Ta}]:not([${mi}])) {
487
+ :host([${Ia}]:not([${mi}])) {
488
488
  cursor: not-allowed;
489
489
  }
490
490
 
491
491
  </style>
492
492
 
493
- <slot name="indicator">${ec}</slot>
493
+ <slot name="indicator">${ju}</slot>
494
494
 
495
495
  <slot name="spacer">&nbsp;</slot><slot name="text">LIVE</slot>
496
- `;var ll=i=>{let e=i.mediaPaused||!i.mediaTimeIsLive,t=e?O.SEEK_LIVE():O.PLAYING_LIVE();i.setAttribute("aria-label",t),e?i.removeAttribute("aria-disabled"):i.setAttribute("aria-disabled","true")},fn=class extends M{static get observedAttributes(){return[...super.observedAttributes,mi,Ta]}constructor(e={}){super({slotTemplate:dl,...e})}connectedCallback(){ll(this),super.connectedCallback()}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),ll(this)}get mediaPaused(){return x(this,o.MEDIA_PAUSED)}set mediaPaused(e){R(this,o.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return x(this,o.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){R(this,o.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new l.CustomEvent(Ju,{composed:!0,bubbles:!0})),this.hasAttribute(mi)&&this.dispatchEvent(new l.CustomEvent(ju,{composed:!0,bubbles:!0})))}};l.customElements.get("media-live-button")||l.customElements.define("media-live-button",fn);var{MEDIA_VOLUME_LEVEL:hi}=o,tc=`<svg aria-hidden="true" viewBox="0 0 24 24">
496
+ `;var sl=i=>{let e=i.mediaPaused||!i.mediaTimeIsLive,t=e?O.SEEK_LIVE():O.PLAYING_LIVE();i.setAttribute("aria-label",t),e?i.removeAttribute("aria-disabled"):i.setAttribute("aria-disabled","true")},fn=class extends M{static get observedAttributes(){return[...super.observedAttributes,mi,Ia]}constructor(e={}){super({slotTemplate:ll,...e})}connectedCallback(){sl(this),super.connectedCallback()}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),sl(this)}get mediaPaused(){return w(this,o.MEDIA_PAUSED)}set mediaPaused(e){R(this,o.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return w(this,o.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){R(this,o.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new l.CustomEvent(Xu,{composed:!0,bubbles:!0})),this.hasAttribute(mi)&&this.dispatchEvent(new l.CustomEvent(Ju,{composed:!0,bubbles:!0})))}};l.customElements.get("media-live-button")||l.customElements.define("media-live-button",fn);var{MEDIA_VOLUME_LEVEL:hi}=o,ec=`<svg aria-hidden="true" viewBox="0 0 24 24">
497
497
  <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"/>
498
- </svg>`,ul=`<svg aria-hidden="true" viewBox="0 0 24 24">
498
+ </svg>`,dl=`<svg aria-hidden="true" viewBox="0 0 24 24">
499
499
  <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"/>
500
- </svg>`,ic=`<svg aria-hidden="true" viewBox="0 0 24 24">
500
+ </svg>`,tc=`<svg aria-hidden="true" viewBox="0 0 24 24">
501
501
  <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"/>
502
- </svg>`,ml=m.createElement("template");ml.innerHTML=`
502
+ </svg>`,cl=m.createElement("template");cl.innerHTML=`
503
503
  <style>
504
504
 
505
505
  :host(:not([${hi}])) slot:not([name=high]):not([name=icon]),
@@ -521,14 +521,14 @@
521
521
  </style>
522
522
 
523
523
  <slot name="icon">
524
- <slot name="off">${tc}</slot>
525
- <slot name="low">${ul}</slot>
526
- <slot name="medium">${ul}</slot>
527
- <slot name="high">${ic}</slot>
524
+ <slot name="off">${ec}</slot>
525
+ <slot name="low">${dl}</slot>
526
+ <slot name="medium">${dl}</slot>
527
+ <slot name="high">${tc}</slot>
528
528
  </slot>
529
- `;var cl=i=>{let t=i.mediaVolumeLevel==="off"?O.UNMUTE():O.MUTE();i.setAttribute("aria-label",t)},gn=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME_LEVEL]}constructor(e={}){super({slotTemplate:ml,...e})}connectedCallback(){cl(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_VOLUME_LEVEL&&cl(this),super.attributeChangedCallback(e,t,a)}get mediaVolumeLevel(){return w(this,o.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){S(this,o.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e=this.mediaVolumeLevel==="off"?b.MEDIA_UNMUTE_REQUEST:b.MEDIA_MUTE_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-mute-button")||l.customElements.define("media-mute-button",gn);var hl=`<svg aria-hidden="true" viewBox="0 0 28 24">
529
+ `;var ul=i=>{let t=i.mediaVolumeLevel==="off"?O.UNMUTE():O.MUTE();i.setAttribute("aria-label",t)},gn=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME_LEVEL]}constructor(e={}){super({slotTemplate:cl,...e})}connectedCallback(){ul(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_VOLUME_LEVEL&&ul(this),super.attributeChangedCallback(e,t,a)}get mediaVolumeLevel(){return x(this,o.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){S(this,o.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e=this.mediaVolumeLevel==="off"?b.MEDIA_UNMUTE_REQUEST:b.MEDIA_MUTE_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-mute-button")||l.customElements.define("media-mute-button",gn);var ml=`<svg aria-hidden="true" viewBox="0 0 28 24">
530
530
  <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"/>
531
- </svg>`,bl=m.createElement("template");bl.innerHTML=`
531
+ </svg>`,pl=m.createElement("template");pl.innerHTML=`
532
532
  <style>
533
533
  :host([${o.MEDIA_IS_PIP}]) slot:not([name=exit]):not([name=icon]) {
534
534
  display: none !important;
@@ -541,14 +541,14 @@
541
541
  </style>
542
542
 
543
543
  <slot name="icon">
544
- <slot name="enter">${hl}</slot>
545
- <slot name="exit">${hl}</slot>
544
+ <slot name="enter">${ml}</slot>
545
+ <slot name="exit">${ml}</slot>
546
546
  </slot>
547
- `;var pl=i=>{let e=i.mediaIsPip?O.EXIT_PIP():O.ENTER_PIP();i.setAttribute("aria-label",e)},An=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_PIP,o.MEDIA_PIP_UNAVAILABLE]}constructor(e={}){super({slotTemplate:bl,...e})}connectedCallback(){pl(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_PIP&&pl(this),super.attributeChangedCallback(e,t,a)}get mediaPipUnavailable(){return w(this,o.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){S(this,o.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return x(this,o.MEDIA_IS_PIP)}set mediaIsPip(e){R(this,o.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?b.MEDIA_EXIT_PIP_REQUEST:b.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-pip-button")||l.customElements.define("media-pip-button",An);var ac=`<svg aria-hidden="true" viewBox="0 0 24 24">
547
+ `;var hl=i=>{let e=i.mediaIsPip?O.EXIT_PIP():O.ENTER_PIP();i.setAttribute("aria-label",e)},An=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_PIP,o.MEDIA_PIP_UNAVAILABLE]}constructor(e={}){super({slotTemplate:pl,...e})}connectedCallback(){hl(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_IS_PIP&&hl(this),super.attributeChangedCallback(e,t,a)}get mediaPipUnavailable(){return x(this,o.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){S(this,o.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return w(this,o.MEDIA_IS_PIP)}set mediaIsPip(e){R(this,o.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?b.MEDIA_EXIT_PIP_REQUEST:b.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-pip-button")||l.customElements.define("media-pip-button",An);var ic=`<svg aria-hidden="true" viewBox="0 0 24 24">
548
548
  <path d="m6 21 15-9L6 3v18Z"/>
549
- </svg>`,rc=`<svg aria-hidden="true" viewBox="0 0 24 24">
549
+ </svg>`,ac=`<svg aria-hidden="true" viewBox="0 0 24 24">
550
550
  <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>
551
- </svg>`,vl=m.createElement("template");vl.innerHTML=`
551
+ </svg>`,El=m.createElement("template");El.innerHTML=`
552
552
  <style>
553
553
  :host([${o.MEDIA_PAUSED}]) slot[name=pause] {
554
554
  display: none !important;
@@ -560,12 +560,12 @@
560
560
  </style>
561
561
 
562
562
  <slot name="icon">
563
- <slot name="play">${ac}</slot>
564
- <slot name="pause">${rc}</slot>
563
+ <slot name="play">${ic}</slot>
564
+ <slot name="pause">${ac}</slot>
565
565
  </slot>
566
- `;var El=i=>{let e=i.mediaPaused?O.PLAY():O.PAUSE();i.setAttribute("aria-label",e)},_n=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PAUSED,o.MEDIA_ENDED]}constructor(e={}){super({slotTemplate:vl,...e})}connectedCallback(){El(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_PAUSED&&El(this),super.attributeChangedCallback(e,t,a)}get mediaPaused(){return x(this,o.MEDIA_PAUSED)}set mediaPaused(e){R(this,o.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?b.MEDIA_PLAY_REQUEST:b.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-play-button")||l.customElements.define("media-play-button",_n);var nc=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ia=(i,e,t)=>(nc(i,e,"read from private field"),t?t.call(i):e.get(i)),oc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},$t,yn={RATES:"rates"},In=[1,1.25,1.5,1.75,2],Vt=1,fl=m.createElement("template");fl.innerHTML=`
566
+ `;var bl=i=>{let e=i.mediaPaused?O.PLAY():O.PAUSE();i.setAttribute("aria-label",e)},_n=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PAUSED,o.MEDIA_ENDED]}constructor(e={}){super({slotTemplate:El,...e})}connectedCallback(){bl(this),super.connectedCallback()}attributeChangedCallback(e,t,a){e===o.MEDIA_PAUSED&&bl(this),super.attributeChangedCallback(e,t,a)}get mediaPaused(){return w(this,o.MEDIA_PAUSED)}set mediaPaused(e){R(this,o.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?b.MEDIA_PLAY_REQUEST:b.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};l.customElements.get("media-play-button")||l.customElements.define("media-play-button",_n);var rc=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ka=(i,e,t)=>(rc(i,e,"read from private field"),t?t.call(i):e.get(i)),nc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ht,yn={RATES:"rates"},In=[1,1.25,1.5,1.75,2],$t=1,vl=m.createElement("template");vl.innerHTML=`
567
567
  <span id="container"></span>
568
- `;var Tn=class extends M{constructor(e={}){super({slotTemplate:fl,...e}),oc(this,$t,new qe(this,yn.RATES,{defaultValue:In})),this.container=this.shadowRoot.querySelector("#container"),this.container.innerHTML=`${Vt}x`}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PLAYBACK_RATE,yn.RATES]}attributeChangedCallback(e,t,a){if(e===yn.RATES&&(Ia(this,$t).value=a),e===o.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,n=Number.isNaN(r)?Vt:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",Z.PLAYBACK_RATE({playbackRate:n}));return}super.attributeChangedCallback(e,t,a)}get rates(){return Ia(this,$t)}set rates(e){e?Array.isArray(e)&&(Ia(this,$t).value=e.join(" ")):Ia(this,$t).value=""}get mediaPlaybackRate(){return C(this,o.MEDIA_PLAYBACK_RATE,Vt)}set mediaPlaybackRate(e){D(this,o.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;let a=Array.from(this.rates.values(),s=>+s).sort((s,d)=>s-d),r=(t=(e=a.find(s=>s>this.mediaPlaybackRate))!=null?e:a[0])!=null?t:Vt,n=new l.CustomEvent(b.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(n)}};$t=new WeakMap;l.customElements.get("media-playback-rate-button")||l.customElements.define("media-playback-rate-button",Tn);var ke={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"},gl=m.createElement("template");gl.innerHTML=`
568
+ `;var Tn=class extends M{constructor(e={}){super({slotTemplate:vl,...e}),nc(this,Ht,new qe(this,yn.RATES,{defaultValue:In})),this.container=this.shadowRoot.querySelector("#container"),this.container.innerHTML=`${$t}x`}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PLAYBACK_RATE,yn.RATES]}attributeChangedCallback(e,t,a){if(e===yn.RATES&&(ka(this,Ht).value=a),e===o.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,n=Number.isNaN(r)?$t:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",Z.PLAYBACK_RATE({playbackRate:n}));return}super.attributeChangedCallback(e,t,a)}get rates(){return ka(this,Ht)}set rates(e){e?Array.isArray(e)&&(ka(this,Ht).value=e.join(" ")):ka(this,Ht).value=""}get mediaPlaybackRate(){return C(this,o.MEDIA_PLAYBACK_RATE,$t)}set mediaPlaybackRate(e){D(this,o.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;let a=Array.from(this.rates.values(),s=>+s).sort((s,d)=>s-d),r=(t=(e=a.find(s=>s>this.mediaPlaybackRate))!=null?e:a[0])!=null?t:$t,n=new l.CustomEvent(b.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(n)}};Ht=new WeakMap;l.customElements.get("media-playback-rate-button")||l.customElements.define("media-playback-rate-button",Tn);var ke={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"},fl=m.createElement("template");fl.innerHTML=`
569
569
  <style>
570
570
  :host {
571
571
  pointer-events: none;
@@ -587,9 +587,9 @@
587
587
  </style>
588
588
 
589
589
  <img part="poster img" aria-hidden="true" id="image"/>
590
- `;var sc=i=>{i.style.removeProperty("background-image")},lc=(i,e)=>{i.style["background-image"]=`url('${e}')`},kn=class extends l.HTMLElement{static get observedAttributes(){return[ke.PLACEHOLDER_SRC,ke.SRC]}constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(gl.content.cloneNode(!0))),this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,a){e===ke.SRC&&(a==null?this.image.removeAttribute(ke.SRC):this.image.setAttribute(ke.SRC,a)),e===ke.PLACEHOLDER_SRC&&(a==null?sc(this.image):lc(this.image,a))}get placeholderSrc(){return w(this,ke.PLACEHOLDER_SRC)}set placeholderSrc(e){S(this,ke.SRC,e)}get src(){return w(this,ke.SRC)}set src(e){S(this,ke.SRC,e)}};l.customElements.get("media-poster-image")||l.customElements.define("media-poster-image",kn);var Wt={SEEK_OFFSET:"seekoffset"},ka=30,dc=`<svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(2.18 19.87)">${ka}</text><path d="M10 6V3L4.37 7 10 10.94V8a5.54 5.54 0 0 1 1.9 10.48v2.12A7.5 7.5 0 0 0 10 6Z"/></svg>`,Al=m.createElement("template");Al.innerHTML=`
591
- <slot name="icon">${dc}</slot>
592
- `;var uc=0,Cn=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,Wt.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:Al,...e})}connectedCallback(){this.seekOffset=C(this,Wt.SEEK_OFFSET,ka),super.connectedCallback()}attributeChangedCallback(e,t,a){e===Wt.SEEK_OFFSET&&(this.seekOffset=C(this,Wt.SEEK_OFFSET,ka)),super.attributeChangedCallback(e,t,a)}get seekOffset(){return C(this,Wt.SEEK_OFFSET,ka)}set seekOffset(e){D(this,Wt.SEEK_OFFSET,e),this.setAttribute("aria-label",O.SEEK_BACK_N_SECS({seekOffset:this.seekOffset})),zi(Xi(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return C(this,o.MEDIA_CURRENT_TIME,uc)}set mediaCurrentTime(e){D(this,o.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new l.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}};l.customElements.get("media-seek-backward-button")||l.customElements.define("media-seek-backward-button",Cn);var yl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},_l=(i,e,t)=>(yl(i,e,"read from private field"),t?t.call(i):e.get(i)),cc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},mc=(i,e,t,a)=>(yl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),pi,Sn=class extends Ue{constructor(){super(),cc(this,pi,void 0),mc(this,pi,this.shadowRoot.querySelector("slot")),_l(this,pi).textContent=Ae(0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,a){e===o.MEDIA_PREVIEW_TIME&&a!=null&&(_l(this,pi).textContent=Ae(a)),super.attributeChangedCallback(e,t,a)}get mediaPreviewTime(){return C(this,o.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){D(this,o.MEDIA_PREVIEW_TIME,e)}};pi=new WeakMap;l.customElements.get("media-preview-time-display")||l.customElements.define("media-preview-time-display",Sn);var Tl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Ca=(i,e,t)=>(Tl(i,e,"read from private field"),t?t.call(i):e.get(i)),hc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Sa=(i,e,t,a)=>(Tl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ce,Il=m.createElement("template");Il.innerHTML=`
590
+ `;var oc=i=>{i.style.removeProperty("background-image")},sc=(i,e)=>{i.style["background-image"]=`url('${e}')`},kn=class extends l.HTMLElement{static get observedAttributes(){return[ke.PLACEHOLDER_SRC,ke.SRC]}constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(fl.content.cloneNode(!0))),this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,a){e===ke.SRC&&(a==null?this.image.removeAttribute(ke.SRC):this.image.setAttribute(ke.SRC,a)),e===ke.PLACEHOLDER_SRC&&(a==null?oc(this.image):sc(this.image,a))}get placeholderSrc(){return x(this,ke.PLACEHOLDER_SRC)}set placeholderSrc(e){S(this,ke.SRC,e)}get src(){return x(this,ke.SRC)}set src(e){S(this,ke.SRC,e)}};l.customElements.get("media-poster-image")||l.customElements.define("media-poster-image",kn);var Wt={SEEK_OFFSET:"seekoffset"},Ca=30,lc=`<svg aria-hidden="true" viewBox="0 0 20 24"><defs><style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style></defs><text class="text value" transform="translate(2.18 19.87)">${Ca}</text><path d="M10 6V3L4.37 7 10 10.94V8a5.54 5.54 0 0 1 1.9 10.48v2.12A7.5 7.5 0 0 0 10 6Z"/></svg>`,gl=m.createElement("template");gl.innerHTML=`
591
+ <slot name="icon">${lc}</slot>
592
+ `;var dc=0,Cn=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,Wt.SEEK_OFFSET]}constructor(e={}){super({slotTemplate:gl,...e})}connectedCallback(){this.seekOffset=C(this,Wt.SEEK_OFFSET,Ca),super.connectedCallback()}attributeChangedCallback(e,t,a){e===Wt.SEEK_OFFSET&&(this.seekOffset=C(this,Wt.SEEK_OFFSET,Ca)),super.attributeChangedCallback(e,t,a)}get seekOffset(){return C(this,Wt.SEEK_OFFSET,Ca)}set seekOffset(e){D(this,Wt.SEEK_OFFSET,e),this.setAttribute("aria-label",O.SEEK_BACK_N_SECS({seekOffset:this.seekOffset})),Xi(Ji(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return C(this,o.MEDIA_CURRENT_TIME,dc)}set mediaCurrentTime(e){D(this,o.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new l.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}};l.customElements.get("media-seek-backward-button")||l.customElements.define("media-seek-backward-button",Cn);var _l=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Al=(i,e,t)=>(_l(i,e,"read from private field"),t?t.call(i):e.get(i)),uc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},cc=(i,e,t,a)=>(_l(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),pi,Sn=class extends Ue{constructor(){super(),uc(this,pi,void 0),cc(this,pi,this.shadowRoot.querySelector("slot")),Al(this,pi).textContent=Ae(0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,a){e===o.MEDIA_PREVIEW_TIME&&a!=null&&(Al(this,pi).textContent=Ae(a)),super.attributeChangedCallback(e,t,a)}get mediaPreviewTime(){return C(this,o.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){D(this,o.MEDIA_PREVIEW_TIME,e)}};pi=new WeakMap;l.customElements.get("media-preview-time-display")||l.customElements.define("media-preview-time-display",Sn);var yl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Sa=(i,e,t)=>(yl(i,e,"read from private field"),t?t.call(i):e.get(i)),mc=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ma=(i,e,t,a)=>(yl(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ce,Tl=m.createElement("template");Tl.innerHTML=`
593
593
  <style>
594
594
  :host {
595
595
  box-sizing: border-box;
@@ -603,7 +603,7 @@
603
603
  }
604
604
  </style>
605
605
  <img crossorigin loading="eager" decoding="async">
606
- `;var Mn=class extends l.HTMLElement{constructor(){super(),hc(this,Ce,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Il.content.cloneNode(!0)))}static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Sa(this,Ce,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=Ca(this,Ce))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=Ca(this,Ce))==null?void 0:e.unassociateElement)==null||t.call(e,this),Sa(this,Ce,null)}attributeChangedCallback(e,t,a){var r,n,s,d,u;[o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===A.MEDIA_CONTROLLER&&(t&&((n=(r=Ca(this,Ce))==null?void 0:r.unassociateElement)==null||n.call(r,this),Sa(this,Ce,null)),a&&(Sa(this,Ce,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Ca(this,Ce))==null?void 0:d.associateElement)==null||u.call(d,this)))}get mediaPreviewImage(){return w(this,o.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){S(this,o.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(o.MEDIA_PREVIEW_COORDS);if(!!e)return e.split(/\s+/).map(t=>+t)}set mediaPreviewCoords(e){if(!e){this.removeAttribute(o.MEDIA_PREVIEW_COORDS);return}this.setAttribute(o.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){let e=this.mediaPreviewCoords,t=this.mediaPreviewImage;if(!(e&&t))return;let[a,r,n,s]=e,d=t.split("#")[0],u=getComputedStyle(this),{maxWidth:c,maxHeight:h,minWidth:f,minHeight:v}=u,T=Math.min(parseInt(c)/n,parseInt(h)/s),H=Math.max(parseInt(f)/n,parseInt(v)/s),Y=T<1,I=Y?T:H>1?H:1,{style:ae}=N(this.shadowRoot,":host"),ge=N(this.shadowRoot,"img").style,oe=this.shadowRoot.querySelector("img"),ri=Y?"min":"max";ae.setProperty(`${ri}-width`,"initial","important"),ae.setProperty(`${ri}-height`,"initial","important"),ae.width=`${n*I}px`,ae.height=`${s*I}px`;let Rt=()=>{ge.width=`${this.imgWidth*I}px`,ge.height=`${this.imgHeight*I}px`,ge.display="block"};oe.src!==d&&(oe.onload=()=>{this.imgWidth=oe.naturalWidth,this.imgHeight=oe.naturalHeight,Rt()},oe.src=d,Rt()),Rt(),ge.transform=`translate(-${a*I}px, -${r*I}px)`}};Ce=new WeakMap;l.customElements.get("media-preview-thumbnail")||l.customElements.define("media-preview-thumbnail",Mn);var Pn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},$=(i,e,t)=>(Pn(i,e,"read from private field"),t?t.call(i):e.get(i)),q=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Xe=(i,e,t,a)=>(Pn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),bi=(i,e,t)=>(Pn(i,e,"access private method"),t),Ei,Ma,vi,Da,Oa,La,Rn,wn,kl,Ra,xn,wa,Ft,fi,Dn,Na,Ua,xa,On,Nn,Cl,pc="video not loaded, unknown time.",Ln=i=>{let e=i.range,t=ut(+e.value),a=ut(+e.max),r=t&&a?`${t} of ${a}`:pc;e.setAttribute("aria-valuetext",r)},Sl=m.createElement("template");Sl.innerHTML=`
606
+ `;var Mn=class extends l.HTMLElement{constructor(){super(),mc(this,Ce,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Tl.content.cloneNode(!0)))}static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Ma(this,Ce,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=Sa(this,Ce))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=Sa(this,Ce))==null?void 0:e.unassociateElement)==null||t.call(e,this),Ma(this,Ce,null)}attributeChangedCallback(e,t,a){var r,n,s,d,u;[o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===A.MEDIA_CONTROLLER&&(t&&((n=(r=Sa(this,Ce))==null?void 0:r.unassociateElement)==null||n.call(r,this),Ma(this,Ce,null)),a&&(Ma(this,Ce,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Sa(this,Ce))==null?void 0:d.associateElement)==null||u.call(d,this)))}get mediaPreviewImage(){return x(this,o.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){S(this,o.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(o.MEDIA_PREVIEW_COORDS);if(!!e)return e.split(/\s+/).map(t=>+t)}set mediaPreviewCoords(e){if(!e){this.removeAttribute(o.MEDIA_PREVIEW_COORDS);return}this.setAttribute(o.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){let e=this.mediaPreviewCoords,t=this.mediaPreviewImage;if(!(e&&t))return;let[a,r,n,s]=e,d=t.split("#")[0],u=getComputedStyle(this),{maxWidth:c,maxHeight:h,minWidth:g,minHeight:v}=u,T=Math.min(parseInt(c)/n,parseInt(h)/s),V=Math.max(parseInt(g)/n,parseInt(v)/s),Y=T<1,I=Y?T:V>1?V:1,{style:ae}=N(this.shadowRoot,":host"),ge=N(this.shadowRoot,"img").style,oe=this.shadowRoot.querySelector("img"),ri=Y?"min":"max";ae.setProperty(`${ri}-width`,"initial","important"),ae.setProperty(`${ri}-height`,"initial","important"),ae.width=`${n*I}px`,ae.height=`${s*I}px`;let Rt=()=>{ge.width=`${this.imgWidth*I}px`,ge.height=`${this.imgHeight*I}px`,ge.display="block"};oe.src!==d&&(oe.onload=()=>{this.imgWidth=oe.naturalWidth,this.imgHeight=oe.naturalHeight,Rt()},oe.src=d,Rt()),Rt(),ge.transform=`translate(-${a*I}px, -${r*I}px)`}};Ce=new WeakMap;l.customElements.get("media-preview-thumbnail")||l.customElements.define("media-preview-thumbnail",Mn);var Pn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},H=(i,e,t)=>(Pn(i,e,"read from private field"),t?t.call(i):e.get(i)),q=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Xe=(i,e,t,a)=>(Pn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),bi=(i,e,t)=>(Pn(i,e,"access private method"),t),Ei,La,vi,Oa,Na,Ra,Rn,xn,Il,xa,wn,wa,Ft,fi,Dn,Ua,Pa,Da,On,Nn,kl,hc="video not loaded, unknown time.",Ln=i=>{let e=i.range,t=ut(+e.value),a=ut(+e.max),r=t&&a?`${t} of ${a}`:hc;e.setAttribute("aria-valuetext",r)},Cl=m.createElement("template");Cl.innerHTML=`
607
607
  <style>
608
608
  :host {
609
609
  --media-preview-border-radius: 3px;
@@ -708,7 +708,7 @@
708
708
 
709
709
  </slot>
710
710
  </div>
711
- `;var Un=class extends Et{constructor(){super(),q(this,La),q(this,wn),q(this,Ra),q(this,xa),q(this,Nn),q(this,Ei,void 0),q(this,Ma,void 0),q(this,vi,void 0),q(this,Da,void 0),q(this,Oa,void 0),q(this,wa,t=>{if([...$(this,Ei)].some(h=>t.composedPath().includes(h)))return;this.updatePointerBar(t);let a=this.mediaDuration;if(!a)return;let r=this.range.getBoundingClientRect(),n=(t.clientX-r.left-this.thumbWidth/2)/(r.width-this.thumbWidth);n=Math.max(0,Math.min(1,n));let s=bi(this,Ra,xn).call(this,$(this,Ma),n),{style:d}=N(this.shadowRoot,"#preview-rail");d.transform=`translateX(${s})`;let u=n*a,c=new l.CustomEvent(b.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:u});this.dispatchEvent(c)}),q(this,Ft,!1),q(this,fi,t=>{var a;(!t.composedPath().includes(this)||[...$(this,Ei)].some(r=>t.composedPath().includes(r)))&&((a=l.window)==null||a.removeEventListener("pointermove",$(this,fi)),Xe(this,Ft,!1),$(this,Na).call(this))}),q(this,Dn,()=>{var t;(t=l.window)==null||t.addEventListener("pointermove",$(this,wa),!1)}),q(this,Na,()=>{var t;(t=l.window)==null||t.removeEventListener("pointermove",$(this,wa));let a=new l.CustomEvent(b.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:null});this.dispatchEvent(a)}),q(this,Ua,()=>{var t;let a=this.getAttribute(o.MEDIA_DURATION);!$(this,Ft)&&a&&(Xe(this,Ft,!0),$(this,Dn).call(this),(t=l.window)==null||t.addEventListener("pointermove",$(this,fi),!1))}),this.container.appendChild(Sl.content.cloneNode(!0)),this.range.addEventListener("input",()=>{cancelAnimationFrame(this._refreshId);let a=this.range.value,r=new l.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(r)}),this._refreshBar=()=>{let t=(performance.now()-this._updateTimestamp)/1e3;this.range.value=this.mediaCurrentTime+t*this.mediaPlaybackRate,this.updateBar(),this.updateCurrentBox(),this._refreshId=requestAnimationFrame(this._refreshBar)},Xe(this,Ei,this.shadowRoot.querySelectorAll('[part~="box"]')),Xe(this,Ma,this.shadowRoot.querySelector('[part~="preview-box"]')),Xe(this,vi,this.shadowRoot.querySelector('[part~="current-box"]'));let e=getComputedStyle(this);Xe(this,Da,parseInt(e.getPropertyValue("--media-box-padding-left"))),Xe(this,Oa,parseInt(e.getPropertyValue("--media-box-padding-right"))),bi(this,xa,On).call(this)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PAUSED,o.MEDIA_DURATION,o.MEDIA_SEEKABLE,o.MEDIA_CURRENT_TIME,o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_TIME,o.MEDIA_BUFFERED,o.MEDIA_PLAYBACK_RATE,o.MEDIA_LOADING,o.MEDIA_ENDED]}connectedCallback(){this.range.setAttribute("aria-label",Z.SEEK()),super.connectedCallback()}disconnectedCallback(){cancelAnimationFrame(this._refreshId),super.disconnectedCallback()}attributeChangedCallback(e,t,a){var r,n,s,d,u;(e===o.MEDIA_CURRENT_TIME||e===o.MEDIA_PAUSED||e===o.MEDIA_ENDED||e===o.MEDIA_LOADING)&&(this._updateTimestamp=performance.now(),this.range.value=this.mediaCurrentTime,Ln(this),this.updateBar(),this.updateCurrentBox(),cancelAnimationFrame(this._refreshId),!this.mediaPaused&&!this.mediaLoading&&(this._refreshId=requestAnimationFrame(this._refreshBar))),e===o.MEDIA_DURATION&&(this.range.max=(n=(r=$(this,La,Rn))!=null?r:this.mediaDuration)!=null?n:1e3,Ln(this),this.updateBar(),this.updateCurrentBox()),e===o.MEDIA_SEEKABLE&&(this.range.min=(s=$(this,wn,kl))!=null?s:0,this.range.max=(u=(d=$(this,La,Rn))!=null?d:this.mediaDuration)!=null?u:1e3,Ln(this),this.updateBar()),e===o.MEDIA_BUFFERED&&this.updateBar(),e==="disabled"&&(a==null?bi(this,xa,On).call(this):bi(this,Nn,Cl).call(this)),super.attributeChangedCallback(e,t,a)}get mediaPaused(){return x(this,o.MEDIA_PAUSED)}set mediaPaused(e){R(this,o.MEDIA_PAUSED,e)}get mediaLoading(){return x(this,o.MEDIA_LOADING)}set mediaLoading(e){R(this,o.MEDIA_LOADING,e)}get mediaDuration(){return C(this,o.MEDIA_DURATION)}set mediaDuration(e){D(this,o.MEDIA_DURATION,e)}get mediaCurrentTime(){return C(this,o.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){D(this,o.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return C(this,o.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){D(this,o.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(o.MEDIA_BUFFERED);return e?e.split(" ").map(t=>t.split(":").map(a=>+a)):[]}set mediaBuffered(e){if(!e){this.removeAttribute(o.MEDIA_BUFFERED);return}let t=e.map(a=>a.join(":")).join(" ");this.setAttribute(o.MEDIA_BUFFERED,t)}get mediaSeekable(){let e=this.getAttribute(o.MEDIA_SEEKABLE);if(!!e)return e.split(":").map(t=>+t)}set mediaSeekable(e){if(e==null){this.removeAttribute(o.MEDIA_SEEKABLE);return}this.setAttribute(o.MEDIA_SEEKABLE,e.join(":"))}get mediaPreviewImage(){return w(this,o.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){S(this,o.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return C(this,o.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){D(this,o.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return x(this,o.MEDIA_ENDED)}set mediaEnded(e){R(this,o.MEDIA_ENDED,e)}getRelativeValues(){let e=super.getRelativeValues();return this.mediaEnded?{...e,relativeValue:e.relativeMax}:e}getBarColors(){var e;let t=super.getBarColors(),{range:a}=this,r=a.max-a.min,n=this.mediaBuffered;if(!n.length||!Number.isFinite(r)||r<=0)return t;let s;if(this.mediaEnded)s=r;else{let u=this.mediaCurrentTime,[,c=a.min]=(e=n.find(([h,f])=>h<=u&&u<=f))!=null?e:[];s=c-a.min}let d=s/r*100;return t.splice(1,0,["var(--media-time-range-buffered-color, rgb(255 255 255 / .4))",d]),t}updateCurrentBox(){if(!$(this,vi).assignedElements().length)return;let e=this.range.value/(this.range.max-this.range.min),t=bi(this,Ra,xn).call(this,$(this,vi),e),{style:a}=N(this.shadowRoot,"#current-rail");a.transform=`translateX(${t})`}};Ei=new WeakMap;Ma=new WeakMap;vi=new WeakMap;Da=new WeakMap;Oa=new WeakMap;La=new WeakSet;Rn=function(){var i;let[,e]=(i=this.mediaSeekable)!=null?i:[];return e};wn=new WeakSet;kl=function(){var i;let[e]=(i=this.mediaSeekable)!=null?i:[];return e};Ra=new WeakSet;xn=function(i,e){var t;let a=`${e*100*100}%`,r=i.offsetWidth;if(!r)return a;let n=(t=this.getAttribute("bounds")?Ye(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?t:this,s=this.range.getBoundingClientRect(),d=n.getBoundingClientRect(),u=($(this,Da)-(s.left-d.left-r/2))/s.width*100,c=(d.right-s.left-r/2-$(this,Oa))/s.width*100;return Number.isNaN(u)||(a=`max(${u*100}%, ${a})`),Number.isNaN(c)||(a=`min(${a}, ${c*100}%)`),a};wa=new WeakMap;Ft=new WeakMap;fi=new WeakMap;Dn=new WeakMap;Na=new WeakMap;Ua=new WeakMap;xa=new WeakSet;On=function(){this.addEventListener("pointermove",$(this,Ua),!1)};Nn=new WeakSet;Cl=function(){var i;(i=l.window)==null||i.removeEventListener("pointermove",$(this,fi)),this.removeEventListener("pointermove",$(this,Ua)),Xe(this,Ft,!1),$(this,Na).call(this)};l.customElements.get("media-time-range")||l.customElements.define("media-time-range",Un);var Ll=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Kt=(i,e,t)=>(Ll(i,e,"read from private field"),t?t.call(i):e.get(i)),Bn=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Yt=(i,e,t,a)=>(Ll(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Se,Pa,Ba,Ml={LOADING_DELAY:"loadingdelay"},Rl=500,wl=m.createElement("template"),bc=`
711
+ `;var Un=class extends Et{constructor(){super(),q(this,Ra),q(this,xn),q(this,xa),q(this,Da),q(this,Nn),q(this,Ei,void 0),q(this,La,void 0),q(this,vi,void 0),q(this,Oa,void 0),q(this,Na,void 0),q(this,wa,t=>{if([...H(this,Ei)].some(h=>t.composedPath().includes(h)))return;this.updatePointerBar(t);let a=this.mediaDuration;if(!a)return;let r=this.range.getBoundingClientRect(),n=(t.clientX-r.left-this.thumbWidth/2)/(r.width-this.thumbWidth);n=Math.max(0,Math.min(1,n));let s=bi(this,xa,wn).call(this,H(this,La),n),{style:d}=N(this.shadowRoot,"#preview-rail");d.transform=`translateX(${s})`;let u=n*a,c=new l.CustomEvent(b.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:u});this.dispatchEvent(c)}),q(this,Ft,!1),q(this,fi,t=>{var a;(!t.composedPath().includes(this)||[...H(this,Ei)].some(r=>t.composedPath().includes(r)))&&((a=l.window)==null||a.removeEventListener("pointermove",H(this,fi)),Xe(this,Ft,!1),H(this,Ua).call(this))}),q(this,Dn,()=>{var t;(t=l.window)==null||t.addEventListener("pointermove",H(this,wa),!1)}),q(this,Ua,()=>{var t;(t=l.window)==null||t.removeEventListener("pointermove",H(this,wa));let a=new l.CustomEvent(b.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:null});this.dispatchEvent(a)}),q(this,Pa,()=>{var t;let a=this.getAttribute(o.MEDIA_DURATION);!H(this,Ft)&&a&&(Xe(this,Ft,!0),H(this,Dn).call(this),(t=l.window)==null||t.addEventListener("pointermove",H(this,fi),!1))}),this.container.appendChild(Cl.content.cloneNode(!0)),this.range.addEventListener("input",()=>{cancelAnimationFrame(this._refreshId);let a=this.range.value,r=new l.CustomEvent(b.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(r)}),this._refreshBar=()=>{let t=(performance.now()-this._updateTimestamp)/1e3;this.range.value=this.mediaCurrentTime+t*this.mediaPlaybackRate,this.updateBar(),this.updateCurrentBox(),this._refreshId=requestAnimationFrame(this._refreshBar)},Xe(this,Ei,this.shadowRoot.querySelectorAll('[part~="box"]')),Xe(this,La,this.shadowRoot.querySelector('[part~="preview-box"]')),Xe(this,vi,this.shadowRoot.querySelector('[part~="current-box"]'));let e=getComputedStyle(this);Xe(this,Oa,parseInt(e.getPropertyValue("--media-box-padding-left"))),Xe(this,Na,parseInt(e.getPropertyValue("--media-box-padding-right"))),bi(this,Da,On).call(this)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PAUSED,o.MEDIA_DURATION,o.MEDIA_SEEKABLE,o.MEDIA_CURRENT_TIME,o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_TIME,o.MEDIA_BUFFERED,o.MEDIA_PLAYBACK_RATE,o.MEDIA_LOADING,o.MEDIA_ENDED]}connectedCallback(){this.range.setAttribute("aria-label",Z.SEEK()),super.connectedCallback()}disconnectedCallback(){cancelAnimationFrame(this._refreshId),super.disconnectedCallback()}attributeChangedCallback(e,t,a){var r,n,s,d,u;(e===o.MEDIA_CURRENT_TIME||e===o.MEDIA_PAUSED||e===o.MEDIA_ENDED||e===o.MEDIA_LOADING)&&(this._updateTimestamp=performance.now(),this.range.value=this.mediaCurrentTime,Ln(this),this.updateBar(),this.updateCurrentBox(),cancelAnimationFrame(this._refreshId),!this.mediaPaused&&!this.mediaLoading&&(this._refreshId=requestAnimationFrame(this._refreshBar))),e===o.MEDIA_DURATION&&(this.range.max=(n=(r=H(this,Ra,Rn))!=null?r:this.mediaDuration)!=null?n:1e3,Ln(this),this.updateBar(),this.updateCurrentBox()),e===o.MEDIA_SEEKABLE&&(this.range.min=(s=H(this,xn,Il))!=null?s:0,this.range.max=(u=(d=H(this,Ra,Rn))!=null?d:this.mediaDuration)!=null?u:1e3,Ln(this),this.updateBar()),e===o.MEDIA_BUFFERED&&this.updateBar(),e==="disabled"&&(a==null?bi(this,Da,On).call(this):bi(this,Nn,kl).call(this)),super.attributeChangedCallback(e,t,a)}get mediaPaused(){return w(this,o.MEDIA_PAUSED)}set mediaPaused(e){R(this,o.MEDIA_PAUSED,e)}get mediaLoading(){return w(this,o.MEDIA_LOADING)}set mediaLoading(e){R(this,o.MEDIA_LOADING,e)}get mediaDuration(){return C(this,o.MEDIA_DURATION)}set mediaDuration(e){D(this,o.MEDIA_DURATION,e)}get mediaCurrentTime(){return C(this,o.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){D(this,o.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return C(this,o.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){D(this,o.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(o.MEDIA_BUFFERED);return e?e.split(" ").map(t=>t.split(":").map(a=>+a)):[]}set mediaBuffered(e){if(!e){this.removeAttribute(o.MEDIA_BUFFERED);return}let t=e.map(a=>a.join(":")).join(" ");this.setAttribute(o.MEDIA_BUFFERED,t)}get mediaSeekable(){let e=this.getAttribute(o.MEDIA_SEEKABLE);if(!!e)return e.split(":").map(t=>+t)}set mediaSeekable(e){if(e==null){this.removeAttribute(o.MEDIA_SEEKABLE);return}this.setAttribute(o.MEDIA_SEEKABLE,e.join(":"))}get mediaPreviewImage(){return x(this,o.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){S(this,o.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return C(this,o.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){D(this,o.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return w(this,o.MEDIA_ENDED)}set mediaEnded(e){R(this,o.MEDIA_ENDED,e)}getRelativeValues(){let e=super.getRelativeValues();return this.mediaEnded?{...e,relativeValue:e.relativeMax}:e}getBarColors(){var e;let t=super.getBarColors(),{range:a}=this,r=a.max-a.min,n=this.mediaBuffered;if(!n.length||!Number.isFinite(r)||r<=0)return t;let s;if(this.mediaEnded)s=r;else{let u=this.mediaCurrentTime,[,c=a.min]=(e=n.find(([h,g])=>h<=u&&u<=g))!=null?e:[];s=c-a.min}let d=s/r*100;return t.splice(1,0,["var(--media-time-range-buffered-color, rgb(255 255 255 / .4))",d]),t}updateCurrentBox(){if(!H(this,vi).assignedElements().length)return;let e=this.range.value/(this.range.max-this.range.min),t=bi(this,xa,wn).call(this,H(this,vi),e),{style:a}=N(this.shadowRoot,"#current-rail");a.transform=`translateX(${t})`}};Ei=new WeakMap;La=new WeakMap;vi=new WeakMap;Oa=new WeakMap;Na=new WeakMap;Ra=new WeakSet;Rn=function(){var i;let[,e]=(i=this.mediaSeekable)!=null?i:[];return e};xn=new WeakSet;Il=function(){var i;let[e]=(i=this.mediaSeekable)!=null?i:[];return e};xa=new WeakSet;wn=function(i,e){var t;let a=`${e*100*100}%`,r=i.offsetWidth;if(!r)return a;let n=(t=this.getAttribute("bounds")?Ye(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?t:this,s=this.range.getBoundingClientRect(),d=n.getBoundingClientRect(),u=(H(this,Oa)-(s.left-d.left-r/2))/s.width*100,c=(d.right-s.left-r/2-H(this,Na))/s.width*100;return Number.isNaN(u)||(a=`max(${u*100}%, ${a})`),Number.isNaN(c)||(a=`min(${a}, ${c*100}%)`),a};wa=new WeakMap;Ft=new WeakMap;fi=new WeakMap;Dn=new WeakMap;Ua=new WeakMap;Pa=new WeakMap;Da=new WeakSet;On=function(){this.addEventListener("pointermove",H(this,Pa),!1)};Nn=new WeakSet;kl=function(){var i;(i=l.window)==null||i.removeEventListener("pointermove",H(this,fi)),this.removeEventListener("pointermove",H(this,Pa)),Xe(this,Ft,!1),H(this,Ua).call(this)};l.customElements.get("media-time-range")||l.customElements.define("media-time-range",Un);var Ml=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Kt=(i,e,t)=>(Ml(i,e,"read from private field"),t?t.call(i):e.get(i)),Bn=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Yt=(i,e,t,a)=>(Ml(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Se,Ba,Va,Sl={LOADING_DELAY:"loadingdelay"},Ll=500,Rl=m.createElement("template"),pc=`
712
712
  <svg aria-hidden="true" viewBox="0 0 100 100">
713
713
  <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">
714
714
  <animateTransform
@@ -721,13 +721,13 @@
721
721
  repeatCount="indefinite" />
722
722
  </path>
723
723
  </svg>
724
- `;wl.innerHTML=`
724
+ `;Rl.innerHTML=`
725
725
  <style>
726
726
  :host {
727
727
  display: var(--media-control-display, var(--media-loading-indicator-display, inline-block));
728
728
  vertical-align: middle;
729
729
  box-sizing: border-box;
730
- --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, ${Rl}ms);
730
+ --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, ${Ll}ms);
731
731
  }
732
732
 
733
733
  #status {
@@ -766,12 +766,12 @@ svg, img, ::slotted(svg), ::slotted(img) {
766
766
  }
767
767
  </style>
768
768
 
769
- <slot name="icon">${bc}</slot>
769
+ <slot name="icon">${pc}</slot>
770
770
  <div id="status" role="status" aria-live="polite">${Z.MEDIA_LOADING()}</div>
771
- `;var Hn=class extends l.HTMLElement{constructor(){if(super(),Bn(this,Se,void 0),Bn(this,Pa,Rl),Bn(this,Ba,void 0),!this.shadowRoot){let t=this.attachShadow({mode:"open"}),a=wl.content.cloneNode(!0);t.appendChild(a)}let{style:e}=N(this.shadowRoot,":host");Yt(this,Ba,e)}static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PAUSED,o.MEDIA_LOADING,Ml.LOADING_DELAY]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===Ml.LOADING_DELAY&&t!==a?this.loadingDelay=Number(a):e===A.MEDIA_CONTROLLER&&(t&&((n=(r=Kt(this,Se))==null?void 0:r.unassociateElement)==null||n.call(r,this),Yt(this,Se,null)),a&&(Yt(this,Se,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Kt(this,Se))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Yt(this,Se,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=Kt(this,Se))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=Kt(this,Se))==null?void 0:e.unassociateElement)==null||t.call(e,this),Yt(this,Se,null)}get loadingDelay(){return Kt(this,Pa)}set loadingDelay(e){Yt(this,Pa,e),Kt(this,Ba).setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return x(this,o.MEDIA_PAUSED)}set mediaPaused(e){R(this,o.MEDIA_PAUSED,e)}get mediaLoading(){return x(this,o.MEDIA_LOADING)}set mediaLoading(e){R(this,o.MEDIA_LOADING,e)}};Se=new WeakMap;Pa=new WeakMap;Ba=new WeakMap;l.customElements.get("media-loading-indicator")||l.customElements.define("media-loading-indicator",Hn);var Ec=100,vc=1,fc=i=>i.mediaMuted?0:Math.round(i.mediaVolume*i.range.max),gc=({value:i,max:e})=>`${Math.round(i/e*100)}%`,$n=class extends Et{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME,o.MEDIA_MUTED,o.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.max=Ec,this.range.addEventListener("input",()=>{let t=this.range.value/this.range.max,a=new l.CustomEvent(b.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(a)})}connectedCallback(){this.range.setAttribute("aria-label",Z.VOLUME()),super.connectedCallback()}attributeChangedCallback(e,t,a){if(e===o.MEDIA_VOLUME||e===o.MEDIA_MUTED){let r=fc(this);this.range.value=r,this.range.setAttribute("aria-valuetext",gc(this.range)),this.updateBar()}super.attributeChangedCallback(e,t,a)}get mediaVolume(){return C(this,o.MEDIA_VOLUME,vc)}set mediaVolume(e){D(this,o.MEDIA_VOLUME,e)}get mediaMuted(){return x(this,o.MEDIA_MUTED)}set mediaMuted(e){R(this,o.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return w(this,o.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){S(this,o.MEDIA_VOLUME_UNAVAILABLE,e)}};l.customElements.get("media-volume-range")||l.customElements.define("media-volume-range",$n);var Yn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},G=(i,e,t)=>(Yn(i,e,"read from private field"),t?t.call(i):e.get(i)),de=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},pe=(i,e,t,a)=>(Yn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Pe=(i,e,t)=>(Yn(i,e,"access private method"),t),Me,Je,Zt,gi,Ha,$a,Vn,Gt,Wn,Ai,Va,Wa,Fn,Kn,xl,Gn,Dl,Ac=`
771
+ `;var Vn=class extends l.HTMLElement{constructor(){if(super(),Bn(this,Se,void 0),Bn(this,Ba,Ll),Bn(this,Va,void 0),!this.shadowRoot){let t=this.attachShadow({mode:"open"}),a=Rl.content.cloneNode(!0);t.appendChild(a)}let{style:e}=N(this.shadowRoot,":host");Yt(this,Va,e)}static get observedAttributes(){return[A.MEDIA_CONTROLLER,o.MEDIA_PAUSED,o.MEDIA_LOADING,Sl.LOADING_DELAY]}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===Sl.LOADING_DELAY&&t!==a?this.loadingDelay=Number(a):e===A.MEDIA_CONTROLLER&&(t&&((n=(r=Kt(this,Se))==null?void 0:r.unassociateElement)==null||n.call(r,this),Yt(this,Se,null)),a&&(Yt(this,Se,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Kt(this,Se))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Yt(this,Se,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=Kt(this,Se))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;(t=(e=Kt(this,Se))==null?void 0:e.unassociateElement)==null||t.call(e,this),Yt(this,Se,null)}get loadingDelay(){return Kt(this,Ba)}set loadingDelay(e){Yt(this,Ba,e),Kt(this,Va).setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return w(this,o.MEDIA_PAUSED)}set mediaPaused(e){R(this,o.MEDIA_PAUSED,e)}get mediaLoading(){return w(this,o.MEDIA_LOADING)}set mediaLoading(e){R(this,o.MEDIA_LOADING,e)}};Se=new WeakMap;Ba=new WeakMap;Va=new WeakMap;l.customElements.get("media-loading-indicator")||l.customElements.define("media-loading-indicator",Vn);var bc=100,Ec=1,vc=i=>i.mediaMuted?0:Math.round(i.mediaVolume*i.range.max),fc=({value:i,max:e})=>`${Math.round(i/e*100)}%`,Hn=class extends Et{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME,o.MEDIA_MUTED,o.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.max=bc,this.range.addEventListener("input",()=>{let t=this.range.value/this.range.max,a=new l.CustomEvent(b.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:t});this.dispatchEvent(a)})}connectedCallback(){this.range.setAttribute("aria-label",Z.VOLUME()),super.connectedCallback()}attributeChangedCallback(e,t,a){if(e===o.MEDIA_VOLUME||e===o.MEDIA_MUTED){let r=vc(this);this.range.value=r,this.range.setAttribute("aria-valuetext",fc(this.range)),this.updateBar()}super.attributeChangedCallback(e,t,a)}get mediaVolume(){return C(this,o.MEDIA_VOLUME,Ec)}set mediaVolume(e){D(this,o.MEDIA_VOLUME,e)}get mediaMuted(){return w(this,o.MEDIA_MUTED)}set mediaMuted(e){R(this,o.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return x(this,o.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){S(this,o.MEDIA_VOLUME_UNAVAILABLE,e)}};l.customElements.get("media-volume-range")||l.customElements.define("media-volume-range",Hn);var Yn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},G=(i,e,t)=>(Yn(i,e,"read from private field"),t?t.call(i):e.get(i)),de=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},pe=(i,e,t,a)=>(Yn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Pe=(i,e,t)=>(Yn(i,e,"access private method"),t),Me,Je,Zt,gi,Ha,$a,$n,Gt,Wn,Ai,Wa,Fa,Fn,Kn,xl,Gn,wl,gc=`
772
772
  <svg aria-hidden="true" viewBox="0 1 24 24" part="select-indicator indicator">
773
773
  <path d="m10 15.17 9.193-9.191 1.414 1.414-10.606 10.606-6.364-6.364 1.414-1.414 4.95 4.95Z"/>
774
- </svg>`;function Le(i,e,t){let a=m.createElement("media-chrome-option");a.part.add("option"),a.value=e,a.selected=t;let r=m.createElement("span");return r.textContent=i,a.append(r),a}function be(i,e){let t=i.querySelector(`:scope > [slot="${e}"]`);return(t==null?void 0:t.nodeName)=="SLOT"&&(t=t.assignedElements({flatten:!0})[0]),t?(t=t.cloneNode(!0),t.removeAttribute("slot"),t):i.shadowRoot.querySelector(`[name="${e}"] > svg`).cloneNode(!0)}var Ol=m.createElement("template");Ol.innerHTML=`
774
+ </svg>`;function Le(i,e,t){let a=m.createElement("media-chrome-option");a.part.add("option"),a.value=e,a.selected=t;let r=m.createElement("span");return r.textContent=i,a.append(r),a}function be(i,e){let t=i.querySelector(`:scope > [slot="${e}"]`);return(t==null?void 0:t.nodeName)=="SLOT"&&(t=t.assignedElements({flatten:!0})[0]),t?(t=t.cloneNode(!0),t.removeAttribute("slot"),t):i.shadowRoot.querySelector(`[name="${e}"] > svg`).cloneNode(!0)}var Dl=m.createElement("template");Dl.innerHTML=`
775
775
  <style>
776
776
  :host {
777
777
  font: var(--media-font,
@@ -823,8 +823,8 @@ svg, img, ::slotted(svg), ::slotted(img) {
823
823
  </style>
824
824
  <slot name="header"></slot>
825
825
  <slot id="container"></slot>
826
- <slot name="select-indicator" hidden>${Ac}</slot>
827
- `;var ue=class extends l.HTMLElement{constructor(e={}){super(),de(this,$a),de(this,Ai),de(this,Wa),de(this,Kn),de(this,Gn),de(this,Me,void 0),de(this,Je,""),de(this,Zt,null),de(this,gi,!1),de(this,Ha,t=>{this.handleClick(t)}),de(this,Gt,t=>{let{key:a}=t;if(a==="Escape"){this.removeEventListener("keyup",G(this,Gt));return}if(a==="Meta"){pe(this,gi,!1);return}Pe(this,$a,Vn).call(this,t)}),de(this,Wn,t=>{let{key:a,altKey:r}=t;if(r){this.removeEventListener("keyup",G(this,Gt));return}if(a==="Meta"){pe(this,gi,!0);return}if(this.keysUsed.includes(a)&&t.preventDefault(),G(this,gi)&&this.keysUsed.includes(a)){Pe(this,$a,Vn).call(this,t);return}this.addEventListener("keyup",G(this,Gt),{once:!0})}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=Ol.content.cloneNode(!0),e.slotTemplate&&this.nativeEl.append(e.slotTemplate.content.cloneNode(!0)),this.shadowRoot.append(this.nativeEl)),this.container=this.shadowRoot.querySelector("#container"),this.container.addEventListener("slotchange",t=>{for(let a of t.target.assignedNodes({flatten:!0}))a.nodeType===3&&a.textContent.trim()===""&&a.remove()})}static get observedAttributes(){return["disabled",A.MEDIA_CONTROLLER]}static formatOptionText(e){return e}formatOptionText(e,t){return this.constructor.formatOptionText(e,t)}get options(){var e;let t=this.querySelectorAll("media-chrome-option");return t.length||(t=(e=this.container)==null?void 0:e.querySelectorAll("media-chrome-option")),Array.from(t)}get selectedOptions(){return this.options.filter(e=>e.selected)}get value(){var e,t;return(t=(e=this.selectedOptions[0])==null?void 0:e.value)!=null?t:""}set value(e){let t=this.options.find(a=>a.value===e);!t||Pe(this,Wa,Fn).call(this,t)}focus(){var e;(e=this.selectedOptions[0])==null||e.focus()}enable(){this.addEventListener("click",G(this,Ha)),this.addEventListener("keydown",G(this,Wn))}disable(){this.removeEventListener("click",G(this,Ha)),this.removeEventListener("keyup",G(this,Gt))}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=G(this,Me))==null?void 0:r.unassociateElement)==null||n.call(r,this),pe(this,Me,null)),a&&(pe(this,Me,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=G(this,Me))==null?void 0:d.associateElement)==null||u.call(d,this))):e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e,t,a;this.hasAttribute("disabled")||this.enable(),this.hasAttribute("role")||this.setAttribute("role","listbox");let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(pe(this,Me,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=G(this,Me))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;this.disable(),(t=(e=G(this,Me))==null?void 0:e.unassociateElement)==null||t.call(e,this),pe(this,Me,null)}get keysUsed(){return["Enter"," ","ArrowDown","ArrowUp","Home","End"]}handleSelection(e,t){let a=Pe(this,Ai,Va).call(this,e);!a||Pe(this,Wa,Fn).call(this,a,t)}handleMovement(e){let{key:t}=e,a=this.options,r=Pe(this,Ai,Va).call(this,e);r||(r=a.filter(s=>s.getAttribute("tabindex")==="0")[0]);let n;switch(t){case"ArrowDown":n=r.nextElementSibling,n!=null&&n.hasAttribute("disabled")&&(n=n.nextElementSibling);break;case"ArrowUp":n=r.previousElementSibling,n!=null&&n.hasAttribute("disabled")&&(n=n.previousElementSibling);break;case"Home":n=a[0];break;case"End":n=a[a.length-1];break;default:n=Pe(this,Kn,xl).call(this,t);break}n&&(a.forEach(s=>s.setAttribute("tabindex","-1")),n.setAttribute("tabindex","0"),n.focus())}handleClick(e){let t=Pe(this,Ai,Va).call(this,e);!t||t.hasAttribute("disabled")||(this.options.forEach(a=>a.setAttribute("tabindex","-1")),t.setAttribute("tabindex","0"),this.handleSelection(e,this.hasAttribute("aria-multiselectable")&&this.getAttribute("aria-multiselectable")==="true"))}};Me=new WeakMap;Je=new WeakMap;Zt=new WeakMap;gi=new WeakMap;Ha=new WeakMap;$a=new WeakSet;Vn=function(i){let{key:e}=i;e==="Enter"||e===" "?this.handleSelection(i,this.hasAttribute("aria-multiselectable")&&this.getAttribute("aria-multiselectable")==="true"):this.handleMovement(i)};Gt=new WeakMap;Wn=new WeakMap;Ai=new WeakSet;Va=function(i){let e=i.composedPath(),t=e.findIndex(a=>a.nodeName==="MEDIA-CHROME-OPTION");return e[t]};Wa=new WeakSet;Fn=function(i,e){let t=[...this.selectedOptions];(!this.hasAttribute("aria-multiselectable")||this.getAttribute("aria-multiselectable")!=="true")&&this.options.forEach(a=>a.selected=!1),e?i.selected=!i.selected:i.selected=!0,this.selectedOptions.some((a,r)=>a!=t[r])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};Kn=new WeakSet;xl=function(i){Pe(this,Gn,Dl).call(this);let e=this.options,t=e.findIndex(c=>c.getAttribute("tabindex")==="0");pe(this,Je,G(this,Je)+i);let a=G(this,Je).split("").every(c=>c===i),r=e.slice(t+(a?1:0)).filter(c=>c.textContent.toLowerCase().startsWith(G(this,Je))),n=e.slice(0,t-(a?1:0)).filter(c=>c.textContent.toLowerCase().startsWith(G(this,Je))),s=[],d=[];return a&&(s=e.slice(t+(a?1:0)).filter(c=>c.textContent.startsWith(i)),d=e.slice(0,t-(a?1:0)).filter(c=>c.textContent.startsWith(i))),[...r,...n,...s,...d][0]};Gn=new WeakSet;Dl=function(){clearTimeout(G(this,Zt)),pe(this,Zt,null),pe(this,Zt,setTimeout(()=>{pe(this,Je,""),pe(this,Zt,null)},500))};l.customElements.get("media-chrome-listbox")||l.customElements.define("media-chrome-listbox",ue);var Jn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Qn=(i,e,t)=>(Jn(i,e,"read from private field"),t?t.call(i):e.get(i)),Zn=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},qn=(i,e,t,a)=>(Jn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Nl=(i,e,t)=>(Jn(i,e,"access private method"),t),Fa,qt,Ka,zn,Ul=m.createElement("template");Ul.innerHTML=`
826
+ <slot name="select-indicator" hidden>${gc}</slot>
827
+ `;var ue=class extends l.HTMLElement{constructor(e={}){super(),de(this,$a),de(this,Ai),de(this,Fa),de(this,Kn),de(this,Gn),de(this,Me,void 0),de(this,Je,""),de(this,Zt,null),de(this,gi,!1),de(this,Ha,t=>{this.handleClick(t)}),de(this,Gt,t=>{let{key:a}=t;if(a==="Escape"){this.removeEventListener("keyup",G(this,Gt));return}if(a==="Meta"){pe(this,gi,!1);return}Pe(this,$a,$n).call(this,t)}),de(this,Wn,t=>{let{key:a,altKey:r}=t;if(r){this.removeEventListener("keyup",G(this,Gt));return}if(a==="Meta"){pe(this,gi,!0);return}if(this.keysUsed.includes(a)&&t.preventDefault(),G(this,gi)&&this.keysUsed.includes(a)){Pe(this,$a,$n).call(this,t);return}this.addEventListener("keyup",G(this,Gt),{once:!0})}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.nativeEl=Dl.content.cloneNode(!0),e.slotTemplate&&this.nativeEl.append(e.slotTemplate.content.cloneNode(!0)),this.shadowRoot.append(this.nativeEl)),this.container=this.shadowRoot.querySelector("#container"),this.container.addEventListener("slotchange",t=>{for(let a of t.target.assignedNodes({flatten:!0}))a.nodeType===3&&a.textContent.trim()===""&&a.remove()})}static get observedAttributes(){return["disabled",A.MEDIA_CONTROLLER]}static formatOptionText(e){return e}formatOptionText(e,t){return this.constructor.formatOptionText(e,t)}get options(){var e;let t=this.querySelectorAll("media-chrome-option");return t.length||(t=(e=this.container)==null?void 0:e.querySelectorAll("media-chrome-option")),Array.from(t)}get selectedOptions(){return this.options.filter(e=>e.selected)}get value(){var e,t;return(t=(e=this.selectedOptions[0])==null?void 0:e.value)!=null?t:""}set value(e){let t=this.options.find(a=>a.value===e);!t||Pe(this,Fa,Fn).call(this,t)}focus(){var e;(e=this.selectedOptions[0])==null||e.focus()}enable(){this.addEventListener("click",G(this,Ha)),this.addEventListener("keydown",G(this,Wn))}disable(){this.removeEventListener("click",G(this,Ha)),this.removeEventListener("keyup",G(this,Gt))}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=G(this,Me))==null?void 0:r.unassociateElement)==null||n.call(r,this),pe(this,Me,null)),a&&(pe(this,Me,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=G(this,Me))==null?void 0:d.associateElement)==null||u.call(d,this))):e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e,t,a;this.hasAttribute("disabled")||this.enable(),this.hasAttribute("role")||this.setAttribute("role","listbox");let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(pe(this,Me,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=G(this,Me))==null?void 0:t.associateElement)==null||a.call(t,this))}disconnectedCallback(){var e,t;this.disable(),(t=(e=G(this,Me))==null?void 0:e.unassociateElement)==null||t.call(e,this),pe(this,Me,null)}get keysUsed(){return["Enter"," ","ArrowDown","ArrowUp","Home","End"]}handleSelection(e,t){let a=Pe(this,Ai,Wa).call(this,e);!a||Pe(this,Fa,Fn).call(this,a,t)}handleMovement(e){let{key:t}=e,a=this.options,r=Pe(this,Ai,Wa).call(this,e);r||(r=a.filter(s=>s.getAttribute("tabindex")==="0")[0]);let n;switch(t){case"ArrowDown":n=r.nextElementSibling,n!=null&&n.hasAttribute("disabled")&&(n=n.nextElementSibling);break;case"ArrowUp":n=r.previousElementSibling,n!=null&&n.hasAttribute("disabled")&&(n=n.previousElementSibling);break;case"Home":n=a[0];break;case"End":n=a[a.length-1];break;default:n=Pe(this,Kn,xl).call(this,t);break}n&&(a.forEach(s=>s.setAttribute("tabindex","-1")),n.setAttribute("tabindex","0"),n.focus())}handleClick(e){let t=Pe(this,Ai,Wa).call(this,e);!t||t.hasAttribute("disabled")||(this.options.forEach(a=>a.setAttribute("tabindex","-1")),t.setAttribute("tabindex","0"),this.handleSelection(e,this.hasAttribute("aria-multiselectable")&&this.getAttribute("aria-multiselectable")==="true"))}};Me=new WeakMap;Je=new WeakMap;Zt=new WeakMap;gi=new WeakMap;Ha=new WeakMap;$a=new WeakSet;$n=function(i){let{key:e}=i;e==="Enter"||e===" "?this.handleSelection(i,this.hasAttribute("aria-multiselectable")&&this.getAttribute("aria-multiselectable")==="true"):this.handleMovement(i)};Gt=new WeakMap;Wn=new WeakMap;Ai=new WeakSet;Wa=function(i){let e=i.composedPath(),t=e.findIndex(a=>a.nodeName==="MEDIA-CHROME-OPTION");return e[t]};Fa=new WeakSet;Fn=function(i,e){let t=[...this.selectedOptions];(!this.hasAttribute("aria-multiselectable")||this.getAttribute("aria-multiselectable")!=="true")&&this.options.forEach(a=>a.selected=!1),e?i.selected=!i.selected:i.selected=!0,this.selectedOptions.some((a,r)=>a!=t[r])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};Kn=new WeakSet;xl=function(i){Pe(this,Gn,wl).call(this);let e=this.options,t=e.findIndex(c=>c.getAttribute("tabindex")==="0");pe(this,Je,G(this,Je)+i);let a=G(this,Je).split("").every(c=>c===i),r=e.slice(t+(a?1:0)).filter(c=>c.textContent.toLowerCase().startsWith(G(this,Je))),n=e.slice(0,t-(a?1:0)).filter(c=>c.textContent.toLowerCase().startsWith(G(this,Je))),s=[],d=[];return a&&(s=e.slice(t+(a?1:0)).filter(c=>c.textContent.startsWith(i)),d=e.slice(0,t-(a?1:0)).filter(c=>c.textContent.startsWith(i))),[...r,...n,...s,...d][0]};Gn=new WeakSet;wl=function(){clearTimeout(G(this,Zt)),pe(this,Zt,null),pe(this,Zt,setTimeout(()=>{pe(this,Je,""),pe(this,Zt,null)},500))};l.customElements.get("media-chrome-listbox")||l.customElements.define("media-chrome-listbox",ue);var Jn=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Qn=(i,e,t)=>(Jn(i,e,"read from private field"),t?t.call(i):e.get(i)),Zn=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},qn=(i,e,t,a)=>(Jn(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Ol=(i,e,t)=>(Jn(i,e,"access private method"),t),Ka,qt,Ya,zn,Nl=m.createElement("template");Nl.innerHTML=`
828
828
  <style>
829
829
  :host {
830
830
  cursor: pointer;
@@ -863,7 +863,7 @@ svg, img, ::slotted(svg), ::slotted(img) {
863
863
  }
864
864
  </style>
865
865
  <slot></slot>
866
- `;var je={VALUE:"value",SELECTED:"selected",DISABLED:"disabled"},Ya=class extends l.HTMLElement{constructor(){super(),Zn(this,Ka),Zn(this,Fa,!1),Zn(this,qt,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Ul.content.cloneNode(!0)))}static get observedAttributes(){return[je.DISABLED,je.SELECTED,je.VALUE]}get value(){var e;return(e=this.getAttribute(je.VALUE))!=null?e:this.text}set value(e){this.setAttribute(je.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get selected(){return this.getAttribute("aria-selected")==="true"}set selected(e){qn(this,Fa,!0),this.setAttribute("aria-selected",e?"true":"false"),e?this.part.add("option-selected"):this.part.remove("option-selected")}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex",-1),this.hasAttribute("aria-selected")||this.setAttribute("aria-selected","false")}disable(){this.removeAttribute("tabindex")}attributeChangedCallback(e,t,a){e===je.SELECTED&&!Qn(this,Fa)?this.setAttribute("aria-selected",a!=null?"true":"false"):e===je.DISABLED&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(je.DISABLED)||this.enable(),this.setAttribute("role","option"),qn(this,qt,Xn(this,this.parentNode)),Nl(this,Ka,zn).call(this)}disconnectedCallback(){this.disable(),Nl(this,Ka,zn).call(this),qn(this,qt,null)}handleClick(){}};Fa=new WeakMap;qt=new WeakMap;Ka=new WeakSet;zn=function(){var i;let e=(i=Qn(this,qt))==null?void 0:i.options;if(!e)return;let t=e.filter(a=>a.getAttribute("aria-selected")==="true").pop();t||(t=e[0]),Qn(this,qt).getAttribute("aria-multiselectable")!=="true"&&e.forEach(a=>{a.setAttribute("tabindex","-1"),a.setAttribute("aria-selected","false")}),t==null||t.setAttribute("tabindex","0"),t==null||t.setAttribute("aria-selected","true")};function Xn(i,e){if(!i)return null;let{host:t}=i.getRootNode();return!e&&t?Xn(i,t):e!=null&&e.options?e:Xn(e,e==null?void 0:e.parentNode)}l.customElements.get("media-chrome-option")||l.customElements.define("media-chrome-option",Ya);var Pl=new WeakMap,jn=i=>{let e=Pl.get(i);return e||Pl.set(i,e=new Set),e},Bl=new l.ResizeObserver(i=>{for(let e of i)for(let t of jn(e.target))t(e)});function eo(i,e){jn(i).add(e),Bl.observe(i)}function to(i,e){let t=jn(i);t.delete(e),t.size||Bl.unobserve(i)}var ao=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},E=(i,e,t)=>(ao(i,e,"read from private field"),t?t.call(i):e.get(i)),ie=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Re=(i,e,t,a)=>(ao(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),vt=(i,e,t)=>(ao(i,e,"access private method"),t),we,Q,_i,W,Ee,Qt,Ga,Za,qa,Qa,za,io,ro,Hl,zt,yi,ft,$l=m.createElement("template");$l.innerHTML=`
866
+ `;var je={VALUE:"value",SELECTED:"selected",DISABLED:"disabled"},Ga=class extends l.HTMLElement{constructor(){super(),Zn(this,Ya),Zn(this,Ka,!1),Zn(this,qt,void 0),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Nl.content.cloneNode(!0)))}static get observedAttributes(){return[je.DISABLED,je.SELECTED,je.VALUE]}get value(){var e;return(e=this.getAttribute(je.VALUE))!=null?e:this.text}set value(e){this.setAttribute(je.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get selected(){return this.getAttribute("aria-selected")==="true"}set selected(e){qn(this,Ka,!0),this.setAttribute("aria-selected",e?"true":"false"),e?this.part.add("option-selected"):this.part.remove("option-selected")}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex",-1),this.hasAttribute("aria-selected")||this.setAttribute("aria-selected","false")}disable(){this.removeAttribute("tabindex")}attributeChangedCallback(e,t,a){e===je.SELECTED&&!Qn(this,Ka)?this.setAttribute("aria-selected",a!=null?"true":"false"):e===je.DISABLED&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(je.DISABLED)||this.enable(),this.setAttribute("role","option"),qn(this,qt,Xn(this,this.parentNode)),Ol(this,Ya,zn).call(this)}disconnectedCallback(){this.disable(),Ol(this,Ya,zn).call(this),qn(this,qt,null)}handleClick(){}};Ka=new WeakMap;qt=new WeakMap;Ya=new WeakSet;zn=function(){var i;let e=(i=Qn(this,qt))==null?void 0:i.options;if(!e)return;let t=e.filter(a=>a.getAttribute("aria-selected")==="true").pop();t||(t=e[0]),Qn(this,qt).getAttribute("aria-multiselectable")!=="true"&&e.forEach(a=>{a.setAttribute("tabindex","-1"),a.setAttribute("aria-selected","false")}),t==null||t.setAttribute("tabindex","0"),t==null||t.setAttribute("aria-selected","true")};function Xn(i,e){if(!i)return null;let{host:t}=i.getRootNode();return!e&&t?Xn(i,t):e!=null&&e.options?e:Xn(e,e==null?void 0:e.parentNode)}l.customElements.get("media-chrome-option")||l.customElements.define("media-chrome-option",Ga);var Ul=new WeakMap,jn=i=>{let e=Ul.get(i);return e||Ul.set(i,e=new Set),e},Pl=new l.ResizeObserver(i=>{for(let e of i)for(let t of jn(e.target))t(e)});function eo(i,e){jn(i).add(e),Pl.observe(i)}function to(i,e){let t=jn(i);t.delete(e),t.size||Pl.unobserve(i)}var ao=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},E=(i,e,t)=>(ao(i,e,"read from private field"),t?t.call(i):e.get(i)),ie=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Re=(i,e,t,a)=>(ao(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),vt=(i,e,t)=>(ao(i,e,"access private method"),t),xe,Q,_i,W,Ee,Qt,Za,qa,Qa,za,Xa,io,ro,Bl,zt,yi,ft,Vl=m.createElement("template");Vl.innerHTML=`
867
867
  <style>
868
868
  :host {
869
869
  font: var(--media-font,
@@ -915,22 +915,22 @@ svg, img, ::slotted(svg), ::slotted(img) {
915
915
  <slot></slot>
916
916
  </media-chrome-listbox>
917
917
  </slot>
918
- `;var ce=class extends l.HTMLElement{constructor(){var e;super(),ie(this,za),ie(this,ro),ie(this,zt),ie(this,we,void 0),ie(this,Q,void 0),ie(this,_i,void 0),ie(this,W,void 0),ie(this,Ee,void 0),ie(this,Qt,a=>{let{key:r}=a;if(!this.keysUsed.includes(r)){this.removeEventListener("keyup",E(this,Qt));return}a.composedPath().includes(E(this,Q))&&(r==="Enter"||r===" ")?vt(this,za,io).call(this):r==="Escape"&&vt(this,zt,yi).call(this)}),ie(this,Ga,a=>{let{metaKey:r,altKey:n,key:s}=a;if(r||n||!this.keysUsed.includes(s)){this.removeEventListener("keyup",E(this,Qt));return}a.preventDefault(),this.addEventListener("keyup",E(this,Qt),{once:!0})}),ie(this,Za,a=>{a.composedPath().includes(this)||vt(this,zt,yi).call(this)}),ie(this,qa,a=>{a.composedPath().includes(E(this,Q))&&vt(this,za,io).call(this)}),ie(this,Qa,()=>{vt(this,zt,yi).call(this)}),ie(this,ft,()=>{if(E(this,W).offsetWidth===0)return;let a=E(this,Q).getBoundingClientRect();if(this.hasAttribute("mediacontroller")||E(this,Q).hasAttribute("mediacontroller")||E(this,W).hasAttribute("mediacontroller")){E(this,W).style.zIndex="1",E(this,W).style.bottom="unset",E(this,W).style.top=a.height+"px";return}let r=Ti(this),n=E(this,W).offsetWidth,s=r.getBoundingClientRect(),d=-Math.max(a.x+n-s.right,0);E(this,W).style.left=`${d}px`,E(this,W).style.maxHeight=`${s.height-a.height}px`}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild($l.content.cloneNode(!0)));let{style:t}=N(this.shadowRoot,":host");t.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),(e=this.init)==null||e.call(this),Re(this,Q,this.shadowRoot.querySelector("[part=button]")),Re(this,W,this.shadowRoot.querySelector("[part=listbox]")),Re(this,_i,this.shadowRoot.querySelector("slot[name=button]")),E(this,_i).addEventListener("slotchange",()=>{let a=E(this,_i).assignedElements()[0];if(!a)return;Re(this,Q,a),E(this,Q).preventClick=!0,this.hasAttribute("disabled")||E(this,Q).hasAttribute("disabled")?this.disable():(this.enable(),E(this,Q).setAttribute("aria-haspopup","listbox"))}),Re(this,Ee,this.shadowRoot.querySelector("slot[name=listbox]")),E(this,Ee).addEventListener("slotchange",()=>{Re(this,W,E(this,Ee).assignedElements()[0]||E(this,W))})}static get observedAttributes(){return["disabled",A.MEDIA_CONTROLLER]}enable(){E(this,Q).toggleAttribute("disabled",!1),this.addEventListener("change",E(this,Qa)),this.addEventListener("keydown",E(this,Ga)),this.addEventListener("click",E(this,qa)),m.addEventListener("click",E(this,Za))}disable(){E(this,Q).toggleAttribute("disabled",!0),this.removeEventListener("change",E(this,Qa)),this.removeEventListener("keydown",E(this,Ga)),this.removeEventListener("keyup",E(this,Qt)),this.removeEventListener("click",E(this,qa)),m.removeEventListener("click",E(this,Za))}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=E(this,we))==null?void 0:r.unassociateElement)==null||n.call(r,this),Re(this,we,null),E(this,W).removeAttribute(A.MEDIA_CONTROLLER)),a&&(Re(this,we,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=E(this,we))==null?void 0:d.associateElement)==null||u.call(d,this),E(this,W).setAttribute(A.MEDIA_CONTROLLER,a))):e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Re(this,we,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=E(this,we))==null?void 0:t.associateElement)==null||a.call(t,this),E(this,W).setAttribute(A.MEDIA_CONTROLLER,r)),this.hasAttribute("disabled")||this.enable(),E(this,Ee).hidden||eo(Ti(this),E(this,ft))}disconnectedCallback(){var e,t;to(Ti(this),E(this,ft)),this.disable(),(t=(e=E(this,we))==null?void 0:e.unassociateElement)==null||t.call(e,this),Re(this,we,null),E(this,W).removeAttribute(A.MEDIA_CONTROLLER)}get keysUsed(){return["Enter","Escape"," ","ArrowUp","ArrowDown","f","c","k","m"]}};we=new WeakMap;Q=new WeakMap;_i=new WeakMap;W=new WeakMap;Ee=new WeakMap;Qt=new WeakMap;Ga=new WeakMap;Za=new WeakMap;qa=new WeakMap;Qa=new WeakMap;za=new WeakSet;io=function(){E(this,Ee).hidden?vt(this,ro,Hl).call(this):vt(this,zt,yi).call(this)};ro=new WeakSet;Hl=function(){!E(this,Ee).hidden||(E(this,Ee).hidden=!1,E(this,Q).setAttribute("aria-expanded","true"),E(this,ft).call(this),E(this,W).focus(),eo(Ti(this),E(this,ft)))};zt=new WeakSet;yi=function(){if(E(this,Ee).hidden)return;let i=Gr();E(this,Ee).hidden=!0,E(this,Q).setAttribute("aria-expanded","false"),ct(E(this,W),i)&&E(this,Q).focus(),to(Ti(this),E(this,ft))};ft=new WeakMap;function Ti(i){var e;return(e=i.getAttribute("bounds")?Ye(i,`#${i.getAttribute("bounds")}`):_c(i)||i.parentElement)!=null?e:i}function _c(i){var e;let t=i.getAttribute(A.MEDIA_CONTROLLER);return t?(e=i.getRootNode())==null?void 0:e.getElementById(t):Ye(i,"media-controller")}l.customElements.get("media-chrome-selectmenu")||l.customElements.define("media-chrome-selectmenu",ce);var uo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},yc=(i,e,t)=>(uo(i,e,"read from private field"),t?t.call(i):e.get(i)),no=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Tc=(i,e,t,a)=>(uo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),oo=(i,e,t)=>(uo(i,e,"access private method"),t),Ja,so,Fl,Xa,lo,Ic=`
918
+ `;var ce=class extends l.HTMLElement{constructor(){var e;super(),ie(this,Xa),ie(this,ro),ie(this,zt),ie(this,xe,void 0),ie(this,Q,void 0),ie(this,_i,void 0),ie(this,W,void 0),ie(this,Ee,void 0),ie(this,Qt,a=>{let{key:r}=a;if(!this.keysUsed.includes(r)){this.removeEventListener("keyup",E(this,Qt));return}a.composedPath().includes(E(this,Q))&&(r==="Enter"||r===" ")?vt(this,Xa,io).call(this):r==="Escape"&&vt(this,zt,yi).call(this)}),ie(this,Za,a=>{let{metaKey:r,altKey:n,key:s}=a;if(r||n||!this.keysUsed.includes(s)){this.removeEventListener("keyup",E(this,Qt));return}a.preventDefault(),this.addEventListener("keyup",E(this,Qt),{once:!0})}),ie(this,qa,a=>{a.composedPath().includes(this)||vt(this,zt,yi).call(this)}),ie(this,Qa,a=>{a.composedPath().includes(E(this,Q))&&vt(this,Xa,io).call(this)}),ie(this,za,()=>{vt(this,zt,yi).call(this)}),ie(this,ft,()=>{if(E(this,W).offsetWidth===0)return;let a=E(this,Q).getBoundingClientRect();if(this.hasAttribute("mediacontroller")||E(this,Q).hasAttribute("mediacontroller")||E(this,W).hasAttribute("mediacontroller")){E(this,W).style.zIndex="1",E(this,W).style.bottom="unset",E(this,W).style.top=a.height+"px";return}let r=Ti(this),n=E(this,W).offsetWidth,s=r.getBoundingClientRect(),d=-Math.max(a.x+n-s.right,0);E(this,W).style.left=`${d}px`,E(this,W).style.maxHeight=`${s.height-a.height}px`}),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(Vl.content.cloneNode(!0)));let{style:t}=N(this.shadowRoot,":host");t.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),(e=this.init)==null||e.call(this),Re(this,Q,this.shadowRoot.querySelector("[part=button]")),Re(this,W,this.shadowRoot.querySelector("[part=listbox]")),Re(this,_i,this.shadowRoot.querySelector("slot[name=button]")),E(this,_i).addEventListener("slotchange",()=>{let a=E(this,_i).assignedElements()[0];if(!a)return;Re(this,Q,a),E(this,Q).preventClick=!0,this.hasAttribute("disabled")||E(this,Q).hasAttribute("disabled")?this.disable():(this.enable(),E(this,Q).setAttribute("aria-haspopup","listbox"))}),Re(this,Ee,this.shadowRoot.querySelector("slot[name=listbox]")),E(this,Ee).addEventListener("slotchange",()=>{Re(this,W,E(this,Ee).assignedElements()[0]||E(this,W))})}static get observedAttributes(){return["disabled",A.MEDIA_CONTROLLER]}enable(){E(this,Q).toggleAttribute("disabled",!1),this.addEventListener("change",E(this,za)),this.addEventListener("keydown",E(this,Za)),this.addEventListener("click",E(this,Qa)),m.addEventListener("click",E(this,qa))}disable(){E(this,Q).toggleAttribute("disabled",!0),this.removeEventListener("change",E(this,za)),this.removeEventListener("keydown",E(this,Za)),this.removeEventListener("keyup",E(this,Qt)),this.removeEventListener("click",E(this,Qa)),m.removeEventListener("click",E(this,qa))}attributeChangedCallback(e,t,a){var r,n,s,d,u;e===A.MEDIA_CONTROLLER?(t&&((n=(r=E(this,xe))==null?void 0:r.unassociateElement)==null||n.call(r,this),Re(this,xe,null),E(this,W).removeAttribute(A.MEDIA_CONTROLLER)),a&&(Re(this,xe,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=E(this,xe))==null?void 0:d.associateElement)==null||u.call(d,this),E(this,W).setAttribute(A.MEDIA_CONTROLLER,a))):e==="disabled"&&a!==t&&(a==null?this.enable():this.disable())}connectedCallback(){var e,t,a;let r=this.getAttribute(A.MEDIA_CONTROLLER);r&&(Re(this,xe,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(t=E(this,xe))==null?void 0:t.associateElement)==null||a.call(t,this),E(this,W).setAttribute(A.MEDIA_CONTROLLER,r)),this.hasAttribute("disabled")||this.enable(),E(this,Ee).hidden||eo(Ti(this),E(this,ft))}disconnectedCallback(){var e,t;to(Ti(this),E(this,ft)),this.disable(),(t=(e=E(this,xe))==null?void 0:e.unassociateElement)==null||t.call(e,this),Re(this,xe,null),E(this,W).removeAttribute(A.MEDIA_CONTROLLER)}get keysUsed(){return["Enter","Escape"," ","ArrowUp","ArrowDown","f","c","k","m"]}};xe=new WeakMap;Q=new WeakMap;_i=new WeakMap;W=new WeakMap;Ee=new WeakMap;Qt=new WeakMap;Za=new WeakMap;qa=new WeakMap;Qa=new WeakMap;za=new WeakMap;Xa=new WeakSet;io=function(){E(this,Ee).hidden?vt(this,ro,Bl).call(this):vt(this,zt,yi).call(this)};ro=new WeakSet;Bl=function(){!E(this,Ee).hidden||(E(this,Ee).hidden=!1,E(this,Q).setAttribute("aria-expanded","true"),E(this,ft).call(this),E(this,W).focus(),eo(Ti(this),E(this,ft)))};zt=new WeakSet;yi=function(){if(E(this,Ee).hidden)return;let i=Gr();E(this,Ee).hidden=!0,E(this,Q).setAttribute("aria-expanded","false"),ct(E(this,W),i)&&E(this,Q).focus(),to(Ti(this),E(this,ft))};ft=new WeakMap;function Ti(i){var e;return(e=i.getAttribute("bounds")?Ye(i,`#${i.getAttribute("bounds")}`):Ac(i)||i.parentElement)!=null?e:i}function Ac(i){var e;let t=i.getAttribute(A.MEDIA_CONTROLLER);return t?(e=i.getRootNode())==null?void 0:e.getElementById(t):Ye(i,"media-controller")}l.customElements.get("media-chrome-selectmenu")||l.customElements.define("media-chrome-selectmenu",ce);var uo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},_c=(i,e,t)=>(uo(i,e,"read from private field"),t?t.call(i):e.get(i)),no=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},yc=(i,e,t,a)=>(uo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),oo=(i,e,t)=>(uo(i,e,"access private method"),t),ja,so,Wl,Ja,lo,Tc=`
919
919
  <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator">
920
920
  <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"/>
921
- </svg>`,Kl=m.createElement("template");Kl.innerHTML=`
922
- <slot name="captions-indicator" hidden>${Ic}</slot>
923
- `;var ja=class extends ue{constructor(){super({slotTemplate:Kl}),no(this,so),no(this,Xa),no(this,Ja,void 0)}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_SUBTITLES_LIST&&t!==a?oo(this,so,Fl).call(this):e===o.MEDIA_SUBTITLES_SHOWING&&t!==a?this.value=a:e==="aria-multiselectable"&&(this.removeAttribute("aria-multiselectable"),console.warn("Captions List doesn't currently support multiple selections. You can enable multiple items via the media.textTrack API."))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",oo(this,Xa,lo))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",oo(this,Xa,lo))}get mediaSubtitlesList(){return Vl(this,o.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Wl(this,o.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Vl(this,o.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Wl(this,o.MEDIA_SUBTITLES_SHOWING,e)}};Ja=new WeakMap;so=new WeakSet;Fl=function(){var i;if(yc(this,Ja)===JSON.stringify(this.mediaSubtitlesList))return;Tc(this,Ja,JSON.stringify(this.mediaSubtitlesList));let e=this.shadowRoot.querySelector("#container");e.textContent="";let t=!this.value,a=Le(this.formatOptionText("Off"),"off",t);a.prepend(be(this,"select-indicator")),e.append(a);let r=this.mediaSubtitlesList;for(let n of r){let s=Le(this.formatOptionText(n.label,n),sa(n),this.value==sa(n));s.prepend(be(this,"select-indicator")),((i=n.kind)!=null?i:"subs")==="captions"&&s.append(be(this,"captions-indicator")),e.append(s)}};Xa=new WeakSet;lo=function(){if(Ne(this,!1),!this.value)return;let i=new l.CustomEvent(b.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};var Vl=(i,e)=>{let t=i.getAttribute(e);return t?li(t):[]},Wl=(i,e,t)=>{if(!(t!=null&&t.length)){i.removeAttribute(e);return}let a=ht(t);i.getAttribute(e)!==a&&i.setAttribute(e,a)};l.customElements.get("media-captions-listbox")||l.customElements.define("media-captions-listbox",ja);var er=class extends ce{init(){let e=m.createElement("media-captions-button");e.part.add("button"),e.preventClick=!0;let t=m.createElement("media-captions-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");let a=this.shadowRoot.querySelector("slot[name=button]"),r=this.shadowRoot.querySelector("slot[name=listbox]");a.textContent="",r.textContent="",a.append(e),r.append(t)}};l.customElements.get("media-captions-selectmenu")||l.customElements.define("media-captions-selectmenu",er);var Yl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},tr=(i,e,t)=>(Yl(i,e,"read from private field"),t?t.call(i):e.get(i)),co=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ii=(i,e,t)=>(Yl(i,e,"access private method"),t),Xt,ki,ir,ar,ho,mo={RATES:"rates"},rr=class extends ue{constructor(){super(),co(this,ki),co(this,ar),co(this,Xt,new qe(this,mo.RATES,{defaultValue:In})),Ii(this,ki,ir).call(this)}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",o.MEDIA_PLAYBACK_RATE,mo.RATES]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_PLAYBACK_RATE&&t!=a?this.value=a:e===mo.RATES&&t!=a&&(tr(this,Xt).value=a,Ii(this,ki,ir).call(this))}get rates(){return tr(this,Xt)}set rates(e){e?Array.isArray(e)&&(tr(this,Xt).value=e.join(" ")):tr(this,Xt).value="",Ii(this,ki,ir).call(this)}get mediaPlaybackRate(){return C(this,o.MEDIA_PLAYBACK_RATE,Vt)}set mediaPlaybackRate(e){D(this,o.MEDIA_PLAYBACK_RATE,e)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Ii(this,ar,ho))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Ii(this,ar,ho))}};Xt=new WeakMap;ki=new WeakSet;ir=function(){let i=this.shadowRoot.querySelector("#container");i.textContent="";for(let e of this.rates){let t=Le(this.formatOptionText(`${e}x`,e),e,this.mediaPlaybackRate==e);t.prepend(be(this,"select-indicator")),i.append(t)}};ar=new WeakSet;ho=function(){if(!this.value)return;let i=new l.CustomEvent(b.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};l.customElements.get("media-playback-rate-listbox")||l.customElements.define("media-playback-rate-listbox",rr);var nr=class extends ce{init(){let e=m.createElement("media-playback-rate-button");e.part.add("button"),e.preventClick=!0;let t=m.createElement("media-playback-rate-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");let a=this.shadowRoot.querySelector("slot[name=button]"),r=this.shadowRoot.querySelector("slot[name=listbox]");a.textContent="",r.textContent="",a.append(e),r.append(t)}};l.customElements.get("media-playback-rate-selectmenu")||l.customElements.define("media-playback-rate-selectmenu",nr);var vo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Gl=(i,e,t)=>(vo(i,e,"read from private field"),t?t.call(i):e.get(i)),or=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},po=(i,e,t,a)=>(vo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),sr=(i,e,t)=>(vo(i,e,"access private method"),t),Ci,ur,lr,bo,dr,Eo,cr=class extends ue{constructor(){super(...arguments),or(this,lr),or(this,dr),or(this,Ci,[]),or(this,ur,void 0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_LIST,o.MEDIA_RENDITION_SELECTED]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_RENDITION_SELECTED&&t!==a?this.value=a!=null?a:"auto":e===o.MEDIA_RENDITION_LIST&&t!==a&&(po(this,Ci,ds(a)),sr(this,lr,bo).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",sr(this,dr,Eo))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",sr(this,dr,Eo))}get mediaRenditionList(){return Gl(this,Ci)}set mediaRenditionList(e){po(this,Ci,e),sr(this,lr,bo).call(this)}get mediaRenditionSelected(){return w(this,o.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){S(this,o.MEDIA_RENDITION_SELECTED,e)}};Ci=new WeakMap;ur=new WeakMap;lr=new WeakSet;bo=function(){if(Gl(this,ur)===JSON.stringify(this.mediaRenditionList))return;po(this,ur,JSON.stringify(this.mediaRenditionList));let i=this.mediaRenditionList.sort((r,n)=>n.height-r.height),e=this.shadowRoot.querySelector("#container");e.textContent="";let t=!this.mediaRenditionSelected;for(let r of i){let n=this.formatOptionText(`${Math.min(r.width,r.height)}p`,r),s=Le(n,`${r.id}`,r.selected&&!t);s.prepend(be(this,"select-indicator")),e.append(s)}let a=Le(this.formatOptionText("Auto"),"auto",t);a.prepend(be(this,"select-indicator")),e.append(a)};dr=new WeakSet;Eo=function(){if(this.value==null)return;let i=new l.CustomEvent(b.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};l.customElements.get("media-rendition-listbox")||l.customElements.define("media-rendition-listbox",cr);var kc=`<svg aria-hidden="true" viewBox="0 0 24 24">
921
+ </svg>`,Fl=m.createElement("template");Fl.innerHTML=`
922
+ <slot name="captions-indicator" hidden>${Tc}</slot>
923
+ `;var er=class extends ue{constructor(){super({slotTemplate:Fl}),no(this,so),no(this,Ja),no(this,ja,void 0)}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_SUBTITLES_LIST&&t!==a?oo(this,so,Wl).call(this):e===o.MEDIA_SUBTITLES_SHOWING&&t!==a?this.value=a:e==="aria-multiselectable"&&(this.removeAttribute("aria-multiselectable"),console.warn("Captions List doesn't currently support multiple selections. You can enable multiple items via the media.textTrack API."))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",oo(this,Ja,lo))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",oo(this,Ja,lo))}get mediaSubtitlesList(){return Hl(this,o.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){$l(this,o.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Hl(this,o.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){$l(this,o.MEDIA_SUBTITLES_SHOWING,e)}};ja=new WeakMap;so=new WeakSet;Wl=function(){var i;if(_c(this,ja)===JSON.stringify(this.mediaSubtitlesList))return;yc(this,ja,JSON.stringify(this.mediaSubtitlesList));let e=this.shadowRoot.querySelector("#container");e.textContent="";let t=!this.value,a=Le(this.formatOptionText("Off"),"off",t);a.prepend(be(this,"select-indicator")),e.append(a);let r=this.mediaSubtitlesList;for(let n of r){let s=Le(this.formatOptionText(n.label,n),la(n),this.value==la(n));s.prepend(be(this,"select-indicator")),((i=n.kind)!=null?i:"subs")==="captions"&&s.append(be(this,"captions-indicator")),e.append(s)}};Ja=new WeakSet;lo=function(){if(Ne(this,!1),!this.value)return;let i=new l.CustomEvent(b.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};var Hl=(i,e)=>{let t=i.getAttribute(e);return t?li(t):[]},$l=(i,e,t)=>{if(!(t!=null&&t.length)){i.removeAttribute(e);return}let a=ht(t);i.getAttribute(e)!==a&&i.setAttribute(e,a)};l.customElements.get("media-captions-listbox")||l.customElements.define("media-captions-listbox",er);var tr=class extends ce{init(){let e=m.createElement("media-captions-button");e.part.add("button"),e.preventClick=!0;let t=m.createElement("media-captions-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");let a=this.shadowRoot.querySelector("slot[name=button]"),r=this.shadowRoot.querySelector("slot[name=listbox]");a.textContent="",r.textContent="",a.append(e),r.append(t)}};l.customElements.get("media-captions-selectmenu")||l.customElements.define("media-captions-selectmenu",tr);var Kl=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ir=(i,e,t)=>(Kl(i,e,"read from private field"),t?t.call(i):e.get(i)),co=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ii=(i,e,t)=>(Kl(i,e,"access private method"),t),Xt,ki,ar,rr,ho,mo={RATES:"rates"},nr=class extends ue{constructor(){super(),co(this,ki),co(this,rr),co(this,Xt,new qe(this,mo.RATES,{defaultValue:In})),Ii(this,ki,ar).call(this)}static get observedAttributes(){return[...super.observedAttributes,"aria-multiselectable",o.MEDIA_PLAYBACK_RATE,mo.RATES]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_PLAYBACK_RATE&&t!=a?this.value=a:e===mo.RATES&&t!=a&&(ir(this,Xt).value=a,Ii(this,ki,ar).call(this))}get rates(){return ir(this,Xt)}set rates(e){e?Array.isArray(e)&&(ir(this,Xt).value=e.join(" ")):ir(this,Xt).value="",Ii(this,ki,ar).call(this)}get mediaPlaybackRate(){return C(this,o.MEDIA_PLAYBACK_RATE,$t)}set mediaPlaybackRate(e){D(this,o.MEDIA_PLAYBACK_RATE,e)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Ii(this,rr,ho))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Ii(this,rr,ho))}};Xt=new WeakMap;ki=new WeakSet;ar=function(){let i=this.shadowRoot.querySelector("#container");i.textContent="";for(let e of this.rates){let t=Le(this.formatOptionText(`${e}x`,e),e,this.mediaPlaybackRate==e);t.prepend(be(this,"select-indicator")),i.append(t)}};rr=new WeakSet;ho=function(){if(!this.value)return;let i=new l.CustomEvent(b.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};l.customElements.get("media-playback-rate-listbox")||l.customElements.define("media-playback-rate-listbox",nr);var or=class extends ce{init(){let e=m.createElement("media-playback-rate-button");e.part.add("button"),e.preventClick=!0;let t=m.createElement("media-playback-rate-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");let a=this.shadowRoot.querySelector("slot[name=button]"),r=this.shadowRoot.querySelector("slot[name=listbox]");a.textContent="",r.textContent="",a.append(e),r.append(t)}};l.customElements.get("media-playback-rate-selectmenu")||l.customElements.define("media-playback-rate-selectmenu",or);var vo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Yl=(i,e,t)=>(vo(i,e,"read from private field"),t?t.call(i):e.get(i)),sr=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},po=(i,e,t,a)=>(vo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),lr=(i,e,t)=>(vo(i,e,"access private method"),t),Ci,cr,dr,bo,ur,Eo,mr=class extends ue{constructor(){super(...arguments),sr(this,dr),sr(this,ur),sr(this,Ci,[]),sr(this,cr,void 0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_LIST,o.MEDIA_RENDITION_SELECTED]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_RENDITION_SELECTED&&t!==a?this.value=a!=null?a:"auto":e===o.MEDIA_RENDITION_LIST&&t!==a&&(po(this,Ci,ls(a)),lr(this,dr,bo).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",lr(this,ur,Eo))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",lr(this,ur,Eo))}get mediaRenditionList(){return Yl(this,Ci)}set mediaRenditionList(e){po(this,Ci,e),lr(this,dr,bo).call(this)}get mediaRenditionSelected(){return x(this,o.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){S(this,o.MEDIA_RENDITION_SELECTED,e)}};Ci=new WeakMap;cr=new WeakMap;dr=new WeakSet;bo=function(){if(Yl(this,cr)===JSON.stringify(this.mediaRenditionList))return;po(this,cr,JSON.stringify(this.mediaRenditionList));let i=this.mediaRenditionList.sort((r,n)=>n.height-r.height),e=this.shadowRoot.querySelector("#container");e.textContent="";let t=!this.mediaRenditionSelected;for(let r of i){let n=this.formatOptionText(`${Math.min(r.width,r.height)}p`,r),s=Le(n,`${r.id}`,r.selected&&!t);s.prepend(be(this,"select-indicator")),e.append(s)}let a=Le(this.formatOptionText("Auto"),"auto",t);a.prepend(be(this,"select-indicator")),e.append(a)};ur=new WeakSet;Eo=function(){if(this.value==null)return;let i=new l.CustomEvent(b.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};l.customElements.get("media-rendition-listbox")||l.customElements.define("media-rendition-listbox",mr);var Ic=`<svg aria-hidden="true" viewBox="0 0 24 24">
924
924
  <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" />
925
- </svg>`,Zl=m.createElement("template");Zl.innerHTML=`
926
- <slot name="icon">${kc}</slot>
927
- `;var fo=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_SELECTED,o.MEDIA_RENDITION_UNAVAILABLE]}constructor(){super({slotTemplate:Zl})}get mediaRenditionSelected(){return w(this,o.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){S(this,o.MEDIA_RENDITION_SELECTED,e)}};l.customElements.get("media-rendition-button")||l.customElements.define("media-rendition-button",fo);var mr=class extends ce{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_SELECTED,o.MEDIA_RENDITION_UNAVAILABLE]}init(){let e=m.createElement("media-rendition-button");e.part.add("button"),e.preventClick=!0;let t=m.createElement("media-rendition-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");let a=this.shadowRoot.querySelector("slot[name=button]"),r=this.shadowRoot.querySelector("slot[name=listbox]");a.textContent="",r.textContent="",a.append(e),r.append(t)}};l.customElements.get("media-rendition-selectmenu")||l.customElements.define("media-rendition-selectmenu",mr);var yo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},ql=(i,e,t)=>(yo(i,e,"read from private field"),t?t.call(i):e.get(i)),hr=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},go=(i,e,t,a)=>(yo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),pr=(i,e,t)=>(yo(i,e,"access private method"),t),Si,vr,br,Ao,Er,_o,fr=class extends ue{constructor(){super(...arguments),hr(this,br),hr(this,Er),hr(this,Si,[]),hr(this,vr,void 0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AUDIO_TRACK_LIST,o.MEDIA_AUDIO_TRACK_ENABLED]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_AUDIO_TRACK_ENABLED&&t!==a?this.value=a:e===o.MEDIA_AUDIO_TRACK_LIST&&t!==a&&(go(this,Si,cs(a)),pr(this,br,Ao).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",pr(this,Er,_o))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",pr(this,Er,_o))}get mediaAudioTrackList(){return ql(this,Si)}set mediaAudioTrackList(e){go(this,Si,e),pr(this,br,Ao).call(this)}get mediaAudioTrackEnabled(){return w(this,o.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){S(this,o.MEDIA_AUDIO_TRACK_ENABLED,e)}};Si=new WeakMap;vr=new WeakMap;br=new WeakSet;Ao=function(){if(ql(this,vr)===JSON.stringify(this.mediaAudioTrackList))return;go(this,vr,JSON.stringify(this.mediaAudioTrackList));let i=this.mediaAudioTrackList,e=this.shadowRoot.querySelector("#container");e.textContent="";for(let t of i){let a=this.formatOptionText(t.label,t),r=Le(a,`${t.id}`,t.enabled);r.prepend(be(this,"select-indicator")),e.append(r)}};Er=new WeakSet;_o=function(){if(this.value==null)return;let i=new l.CustomEvent(b.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};l.customElements.get("media-audio-track-listbox")||l.customElements.define("media-audio-track-listbox",fr);var Cc=`<svg aria-hidden="true" viewBox="0 0 24 24">
925
+ </svg>`,Gl=m.createElement("template");Gl.innerHTML=`
926
+ <slot name="icon">${Ic}</slot>
927
+ `;var fo=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_SELECTED,o.MEDIA_RENDITION_UNAVAILABLE]}constructor(){super({slotTemplate:Gl})}get mediaRenditionSelected(){return x(this,o.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){S(this,o.MEDIA_RENDITION_SELECTED,e)}};l.customElements.get("media-rendition-button")||l.customElements.define("media-rendition-button",fo);var hr=class extends ce{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_SELECTED,o.MEDIA_RENDITION_UNAVAILABLE]}init(){let e=m.createElement("media-rendition-button");e.part.add("button"),e.preventClick=!0;let t=m.createElement("media-rendition-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");let a=this.shadowRoot.querySelector("slot[name=button]"),r=this.shadowRoot.querySelector("slot[name=listbox]");a.textContent="",r.textContent="",a.append(e),r.append(t)}};l.customElements.get("media-rendition-selectmenu")||l.customElements.define("media-rendition-selectmenu",hr);var yo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Zl=(i,e,t)=>(yo(i,e,"read from private field"),t?t.call(i):e.get(i)),pr=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},go=(i,e,t,a)=>(yo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),br=(i,e,t)=>(yo(i,e,"access private method"),t),Si,fr,Er,Ao,vr,_o,gr=class extends ue{constructor(){super(...arguments),pr(this,Er),pr(this,vr),pr(this,Si,[]),pr(this,fr,void 0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AUDIO_TRACK_LIST,o.MEDIA_AUDIO_TRACK_ENABLED]}attributeChangedCallback(e,t,a){super.attributeChangedCallback(e,t,a),e===o.MEDIA_AUDIO_TRACK_ENABLED&&t!==a?this.value=a:e===o.MEDIA_AUDIO_TRACK_LIST&&t!==a&&(go(this,Si,us(a)),br(this,Er,Ao).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",br(this,vr,_o))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",br(this,vr,_o))}get mediaAudioTrackList(){return Zl(this,Si)}set mediaAudioTrackList(e){go(this,Si,e),br(this,Er,Ao).call(this)}get mediaAudioTrackEnabled(){return x(this,o.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){S(this,o.MEDIA_AUDIO_TRACK_ENABLED,e)}};Si=new WeakMap;fr=new WeakMap;Er=new WeakSet;Ao=function(){if(Zl(this,fr)===JSON.stringify(this.mediaAudioTrackList))return;go(this,fr,JSON.stringify(this.mediaAudioTrackList));let i=this.mediaAudioTrackList,e=this.shadowRoot.querySelector("#container");e.textContent="";for(let t of i){let a=this.formatOptionText(t.label,t),r=Le(a,`${t.id}`,t.enabled);r.prepend(be(this,"select-indicator")),e.append(r)}};vr=new WeakSet;_o=function(){if(this.value==null)return;let i=new l.CustomEvent(b.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(i)};l.customElements.get("media-audio-track-listbox")||l.customElements.define("media-audio-track-listbox",gr);var kc=`<svg aria-hidden="true" viewBox="0 0 24 24">
928
928
  <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>
929
929
  <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"/>
930
- </svg>`,Ql=m.createElement("template");Ql.innerHTML=`
931
- <slot name="icon">${Cc}</slot>
932
- `;var To=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AUDIO_TRACK_ENABLED,o.MEDIA_AUDIO_TRACK_UNAVAILABLE]}constructor(){super({slotTemplate:Ql})}get mediaAudioTrackEnabled(){return w(this,o.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){S(this,o.MEDIA_AUDIO_TRACK_ENABLED,e)}};l.customElements.get("media-audio-track-button")||l.customElements.define("media-audio-track-button",To);var gr=class extends ce{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AUDIO_TRACK_ENABLED,o.MEDIA_AUDIO_TRACK_UNAVAILABLE]}init(){let e=m.createElement("media-audio-track-button");e.part.add("button"),e.preventClick=!0;let t=m.createElement("media-audio-track-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");let a=this.shadowRoot.querySelector("slot[name=button]"),r=this.shadowRoot.querySelector("slot[name=listbox]");a.textContent="",r.textContent="",a.append(e),r.append(t)}};l.customElements.get("media-audio-track-selectmenu")||l.customElements.define("media-audio-track-selectmenu",gr);var g=Yd(require("@mux/mux-video")),P=require("@mux/playback-core");var rd=require("@mux/mux-video");var Sc="en",gt={code:Sc};var zl="en";function y(i,e=!0){var r,n;let t=e&&(n=(r=gt)==null?void 0:r[i])!=null?n:i,a=e?gt.code:zl;return new Io(t,a)}var Io=class{constructor(e,t=(a=>(a=gt.code)!=null?a:zl)()){this.message=e,this.locale=t}format(e){return this.message.replace(/\{(\w+)\}/g,(t,a)=>{var r;return(r=e[a])!=null?r:""})}toString(){return this.message}};function Xl(i){let e="";return Object.entries(i).forEach(([t,a])=>{a!=null&&(e+=`${Ar(t)}: ${a}; `)}),e?e.trim():void 0}function Ar(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function _r(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function Be(i){if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}function yr(i){let e=Mc(i).toString();return e?"?"+e:""}function Mc(i){let e={};for(let t in i)i[t]!=null&&(e[t]=i[t]);return new URLSearchParams(e)}function et(i){let e=(i!=null?i:"").split(".")[1];if(!e)return{};let t=e.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(t).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}var ko=(i,e)=>!i||!e?!1:i.contains(e)?!0:ko(i,e.getRootNode().host);var Tr=require("@mux/playback-core");var Co="mux.com",Lc=()=>{try{return"2.0.1"}catch{}return"UNKNOWN"},Rc=Lc(),kr=()=>Rc,So=(i,{maxResolution:e,token:t,domain:a=Co}={})=>{let s=!!t?{token:t}:{redundant_streams:!0,...e?{max_resolution:e}:{}};return`https://stream.${a}/${i}.m3u8${yr(s)}`},Jl=(i,{token:e,thumbnailTime:t,domain:a=Co}={})=>{let r=e==null?t:void 0,{aud:n}=et(e);if(!(e&&n!=="t"))return`https://image.${a}/${i}/thumbnail.webp${yr({token:e,time:r})}`},jl=(i,{token:e,domain:t=Co}={})=>{let{aud:a}=et(e);if(!(e&&a!=="s"))return`https://image.${t}/${i}/storyboard.vtt${yr({token:e,format:"webp"})}`},Mi=i=>{if(!!i){if([Tr.StreamTypes.LIVE,Tr.StreamTypes.ON_DEMAND].includes(i))return i;if(i!=null&&i.includes("live"))return Tr.StreamTypes.LIVE}};var wc={crossorigin:"crossOrigin",playsinline:"playsInline"};function ed(i){var e;return(e=wc[i])!=null?e:_r(i)}var At,_t,X,Ir=class{constructor(e,t){V(this,At,void 0);V(this,_t,void 0);V(this,X,[]);se(this,At,e),se(this,_t,t)}[Symbol.iterator](){return k(this,X).values()}get length(){return k(this,X).length}get value(){var e;return(e=k(this,X).join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(se(this,X,[]),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return k(this,X)[e]}values(){return k(this,X).values()}keys(){return k(this,X).keys()}forEach(e){k(this,X).forEach(e)}add(...e){var t,a;e.forEach(r=>{this.contains(r)||k(this,X).push(r)}),!(this.value===""&&!((t=k(this,At))!=null&&t.hasAttribute(`${k(this,_t)}`)))&&((a=k(this,At))==null||a.setAttribute(`${k(this,_t)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>{k(this,X).splice(k(this,X).indexOf(a),1)}),(t=k(this,At))==null||t.setAttribute(`${k(this,_t)}`,`${this.value}`)}contains(e){return k(this,X).includes(e)}toggle(e,t){return typeof t!="undefined"?t?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){this.remove(e),this.add(t)}};At=new WeakMap,_t=new WeakMap,X=new WeakMap;var td=`[mux-player ${kr()}]`;function tt(...i){console.warn(td,...i)}function ve(...i){console.error(td,...i)}function Mo(i){var t;let e=(t=i.message)!=null?t:"";if(i.context&&(e+=` ${i.context}`),i.file){let a="https://github.com/muxinc/elements/blob/main/errors/";e+=` ${y("Read more: ")}
933
- ${a}${i.file}`}tt(e)}var z={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},yt={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},ad=Object.freeze({length:0,start(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),xc=rd.VideoEvents.filter(i=>i!=="error"),Dc=Object.values(z).filter(i=>![z.PLAYSINLINE].includes(i)),Oc=Object.values(yt);function nd(i){i.querySelectorAll(":scope > track").forEach(e=>{var t;(t=i.media)==null||t.append(e.cloneNode())}),xc.forEach(e=>{var t;(t=i.media)==null||t.addEventListener(e,a=>{i.dispatchEvent(new Event(a.type))})})}var Lo=class extends U.HTMLElement{static get observedAttributes(){return[...Dc,...Oc]}constructor(){super(),this.querySelectorAll(":scope > track").forEach(a=>{var r;(r=this.media)==null||r.append(a.cloneNode())});let e=a=>{for(let r of a)r.type==="childList"&&(r.removedNodes.forEach(n=>{var d,u;let s=(d=this.media)==null?void 0:d.querySelector(`track[src="${n.src}"]`);s&&((u=this.media)==null||u.removeChild(s))}),r.addedNodes.forEach(n=>{var s;(s=this.media)==null||s.append(n.cloneNode())}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0})}attributeChangedCallback(e,t,a){var r,n;switch(e){case yt.MUTED:{this.media&&(this.media.muted=a!=null,this.media.defaultMuted=a!=null);return}case yt.VOLUME:{let s=(r=Be(a))!=null?r:1;this.media&&(this.media.volume=s);return}case yt.PLAYBACKRATE:{let s=(n=Be(a))!=null?n:1;this.media&&(this.media.playbackRate=s,this.media.defaultPlaybackRate=s);return}}}play(){var e,t;return(t=(e=this.media)==null?void 0:e.play())!=null?t:Promise.reject()}pause(){var e;(e=this.media)==null||e.pause()}requestCast(e){var t;return(t=this.media)==null?void 0:t.requestCast(e)}get media(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("mux-video")}get audioTracks(){return this.media.audioTracks}get videoTracks(){return this.media.videoTracks}get audioRenditions(){return this.media.audioRenditions}get videoRenditions(){return this.media.videoRenditions}get paused(){var e,t;return(t=(e=this.media)==null?void 0:e.paused)!=null?t:!0}get duration(){var e,t;return(t=(e=this.media)==null?void 0:e.duration)!=null?t:NaN}get ended(){var e,t;return(t=(e=this.media)==null?void 0:e.ended)!=null?t:!1}get buffered(){var e,t;return(t=(e=this.media)==null?void 0:e.buffered)!=null?t:ad}get seekable(){var e,t;return(t=(e=this.media)==null?void 0:e.seekable)!=null?t:ad}get readyState(){var e,t;return(t=(e=this.media)==null?void 0:e.readyState)!=null?t:0}get videoWidth(){var e,t;return(t=(e=this.media)==null?void 0:e.videoWidth)!=null?t:0}get videoHeight(){var e,t;return(t=(e=this.media)==null?void 0:e.videoHeight)!=null?t:0}get currentTime(){var e,t;return(t=(e=this.media)==null?void 0:e.currentTime)!=null?t:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,t;return(t=(e=this.media)==null?void 0:e.volume)!=null?t:1}set volume(e){this.media&&(this.media.volume=Number(e))}get playbackRate(){var e,t;return(t=(e=this.media)==null?void 0:e.playbackRate)!=null?t:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get defaultPlaybackRate(){var e;return(e=Be(this.getAttribute(yt.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(yt.PLAYBACKRATE,`${e}`):this.removeAttribute(yt.PLAYBACKRATE)}get crossOrigin(){return Li(this,z.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(z.CROSSORIGIN,`${e}`)}get autoplay(){return Li(this,z.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(z.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(z.AUTOPLAY)}get loop(){return Li(this,z.LOOP)!=null}set loop(e){e?this.setAttribute(z.LOOP,""):this.removeAttribute(z.LOOP)}get muted(){var e,t;return(t=(e=this.media)==null?void 0:e.muted)!=null?t:!1}set muted(e){this.media&&(this.media.muted=Boolean(e))}get defaultMuted(){return Li(this,z.MUTED)!=null}set defaultMuted(e){e?this.setAttribute(z.MUTED,""):this.removeAttribute(z.MUTED)}get playsInline(){return Li(this,z.PLAYSINLINE)!=null}set playsInline(e){ve("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(z.PRELOAD,e):this.removeAttribute(z.PRELOAD)}};function Li(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}var Ro=Lo;var Nc=Object.defineProperty,Uc=(i,e,t)=>e in i?Nc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Pc=(i,e,t)=>(Uc(i,typeof e!="symbol"?e+"":e,t),t),ud=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},_=(i,e,t)=>(ud(i,e,"read from private field"),t?t.call(i):e.get(i)),xe=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},He=(i,e,t,a)=>(ud(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Jt,Cr,Tt,Ri,it,at,rt,It,jt,Sr,fe,od=1,sd=0,Bc=1,Hc={processCallback(i,e,t){if(!!t){for(let[a,r]of e)if(a in t){let n=t[a];typeof n=="boolean"&&r instanceof J&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=n:typeof n=="function"&&r instanceof J?r.element[r.attributeName]=n:r.value=n}}}},$e=class extends l.DocumentFragment{constructor(e,t,a=Hc){var r;super(),xe(this,Jt,void 0),xe(this,Cr,void 0),this.append(e.content.cloneNode(!0)),He(this,Jt,cd(this)),He(this,Cr,a),(r=a.createCallback)==null||r.call(a,this,_(this,Jt),t),a.processCallback(this,_(this,Jt),t)}update(e){_(this,Cr).processCallback(this,_(this,Jt),e)}};Jt=new WeakMap;Cr=new WeakMap;var cd=(i,e=[])=>{let t,a;for(let r of i.attributes||[])if(r.value.includes("{{")){let n=new wo;for([t,a]of dd(r.value))if(!t)n.append(a);else{let s=new J(i,r.name,r.namespaceURI);n.append(s),e.push([a,s])}r.value=n.toString()}for(let r of i.childNodes)if(r.nodeType===od&&!(r instanceof HTMLTemplateElement))cd(r,e);else if(r.nodeType===od||r.data.includes("{{")){let n=[];if(r.data)for([t,a]of dd(r.data))if(!t)n.push(new Text(a));else{let s=new Ve(i);n.push(s),e.push([a,s])}else if(r instanceof HTMLTemplateElement){let s=new wi(i,r);n.push(s),e.push([s.expression,s])}r.replaceWith(...n.flatMap(s=>s.replacementNodes||[s]))}return e},ld={},dd=i=>{let e="",t=0,a=ld[i],r=0,n;if(a)return a;for(a=[];n=i[r];r++)n==="{"&&i[r+1]==="{"&&i[r-1]!=="\\"&&i[r+2]&&++t==1?(e&&a.push([sd,e]),e="",r++):n==="}"&&i[r+1]==="}"&&i[r-1]!=="\\"&&!--t?(a.push([Bc,e.trim()]),e="",r++):e+=n||"";return e&&a.push([sd,(t>0?"{{":"")+e]),ld[i]=a},$c=11,Mr=class{get value(){return""}set value(e){}toString(){return this.value}},md=new WeakMap,wo=class{constructor(){xe(this,Tt,[])}[Symbol.iterator](){return _(this,Tt).values()}get length(){return _(this,Tt).length}item(e){return _(this,Tt)[e]}append(...e){for(let t of e)t instanceof J&&md.set(t,this),_(this,Tt).push(t)}toString(){return _(this,Tt).join("")}};Tt=new WeakMap;var J=class extends Mr{constructor(e,t,a){super(),xe(this,It),xe(this,Ri,""),xe(this,it,void 0),xe(this,at,void 0),xe(this,rt,void 0),He(this,it,e),He(this,at,t),He(this,rt,a)}get attributeName(){return _(this,at)}get attributeNamespace(){return _(this,rt)}get element(){return _(this,it)}get value(){return _(this,Ri)}set value(e){_(this,Ri)!==e&&(He(this,Ri,e),!_(this,It,jt)||_(this,It,jt).length===1?e==null?_(this,it).removeAttributeNS(_(this,rt),_(this,at)):_(this,it).setAttributeNS(_(this,rt),_(this,at),e):_(this,it).setAttributeNS(_(this,rt),_(this,at),_(this,It,jt)))}get booleanValue(){return _(this,it).hasAttributeNS(_(this,rt),_(this,at))}set booleanValue(e){if(!_(this,It,jt)||_(this,It,jt).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};Ri=new WeakMap;it=new WeakMap;at=new WeakMap;rt=new WeakMap;It=new WeakSet;jt=function(){return md.get(this)};var Ve=class extends Mr{constructor(e,t){super(),xe(this,Sr,void 0),xe(this,fe,void 0),He(this,Sr,e),He(this,fe,t?[...t]:[new Text])}get replacementNodes(){return _(this,fe)}get parentNode(){return _(this,Sr)}get nextSibling(){return _(this,fe)[_(this,fe).length-1].nextSibling}get previousSibling(){return _(this,fe)[0].previousSibling}get value(){return _(this,fe).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){let t=e.flat().flatMap(a=>a==null?[new Text]:a.forEach?[...a]:a.nodeType===$c?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);t.length||t.push(new Text),He(this,fe,Vc(_(this,fe)[0].parentNode,_(this,fe),t,this.nextSibling))}};Sr=new WeakMap;fe=new WeakMap;var wi=class extends Ve{constructor(e,t){let a=t.getAttribute("directive")||t.getAttribute("type"),r=t.getAttribute("expression")||t.getAttribute(a)||"";r.startsWith("{{")&&(r=r.trim().slice(2,-2).trim()),super(e),Pc(this,"directive"),this.expression=r,this.template=t,this.directive=a}};function Vc(i,e,t,a=null){let r=0,n,s,d,u=t.length,c=e.length;for(;r<u&&r<c&&e[r]==t[r];)r++;for(;r<u&&r<c&&t[u-1]==e[c-1];)a=t[--c,--u];if(r==c)for(;r<u;)i.insertBefore(t[r++],a);if(r==u)for(;r<c;)i.removeChild(e[r++]);else{for(n=e[r];r<u;)d=t[r++],s=n?n.nextSibling:a,n==d?n=s:r<u&&t[r]==s?(i.replaceChild(d,n),n=s):i.insertBefore(d,n);for(;n!=a;)s=n.nextSibling,i.removeChild(n),n=s}return t}var hd={string:i=>String(i)},Rr=class{constructor(e){this.template=e,this.state=void 0}},kt=new WeakMap,Ct=new WeakMap,xo={partial:(i,e)=>{e[i.expression]=new Rr(i.template)},if:(i,e)=>{var t;if(bd(i.expression,e))if(kt.get(i)!==i.template){kt.set(i,i.template);let a=new $e(i.template,e,wr);i.replace(a),Ct.set(i,a)}else(t=Ct.get(i))==null||t.update(e);else i.replace(""),kt.delete(i),Ct.delete(i)}},Wc=Object.keys(xo),wr={processCallback(i,e,t){var a,r;if(!!t)for(let[n,s]of e){if(s instanceof wi){if(!s.directive){let u=Wc.find(c=>s.template.hasAttribute(c));u&&(s.directive=u,s.expression=s.template.getAttribute(u))}(a=xo[s.directive])==null||a.call(xo,s,t);continue}let d=bd(n,t);if(d instanceof Rr){kt.get(s)!==d.template?(kt.set(s,d.template),d=new $e(d.template,d.state,wr),s.value=d,Ct.set(s,d)):(r=Ct.get(s))==null||r.update(d.state);continue}d?(s instanceof J&&s.attributeName.startsWith("aria-")&&(d=String(d)),s instanceof J?typeof d=="boolean"?s.booleanValue=d:typeof d=="function"?s.element[s.attributeName]=d:s.value=d:(s.value=d,kt.delete(s),Ct.delete(s))):s instanceof J?s.value=void 0:(s.value=void 0,kt.delete(s),Ct.delete(s))}}},pd={"!":i=>!i,"!!":i=>!!i,"==":(i,e)=>i==e,"!=":(i,e)=>i!=e,">":(i,e)=>i>e,">=":(i,e)=>i>=e,"<":(i,e)=>i<e,"<=":(i,e)=>i<=e,"??":(i,e)=>i!=null?i:e,"|":(i,e)=>{var t;return(t=hd[e])==null?void 0:t.call(hd,i)}};function Fc(i){return Kc(i,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function bd(i,e={}){var t,a,r,n,s,d,u;let c=Fc(i);if(c.length===0||c.some(({type:h})=>!h))return xi(i);if(((t=c[0])==null?void 0:t.token)===">"){let h=e[(a=c[1])==null?void 0:a.token];if(!h)return xi(i);let f={...e};h.state=f;let v=c.slice(2);for(let T=0;T<v.length;T+=3){let H=(r=v[T])==null?void 0:r.token,Y=(n=v[T+1])==null?void 0:n.token,I=(s=v[T+2])==null?void 0:s.token;H&&Y==="="&&(f[H]=Di(I,e))}return h}if(c.length===1)return Lr(c[0])?Di(c[0].token,e):xi(i);if(c.length===2){let h=(d=c[0])==null?void 0:d.token,f=pd[h];if(!f||!Lr(c[1]))return xi(i);let v=Di(c[1].token,e);return f(v)}if(c.length===3){let h=(u=c[1])==null?void 0:u.token,f=pd[h];if(!f||!Lr(c[0])||!Lr(c[2]))return xi(i);let v=Di(c[0].token,e);if(h==="|")return f(v,c[2].token);let T=Di(c[2].token,e);return f(v,T)}}function xi(i){return console.warn(`Warning: invalid expression \`${i}\``),!1}function Lr({type:i}){return["number","boolean","string","param"].includes(i)}function Di(i,e){let t=i[0],a=i.slice(-1);return i==="true"||i==="false"?i==="true":t===a&&["'",'"'].includes(t)?i.slice(1,-1):qi(i)?parseFloat(i):e[i]}function Kc(i,e){let t,a,r,n=[];for(;i;){r=null,t=i.length;for(let s in e)a=e[s].exec(i),a&&a.index<t&&(r={token:a[0],type:s,matches:a.slice(1)},t=a.index);t&&n.push({token:i.substr(0,t),type:void 0}),r&&n.push(r),i=i.substr(t+(r?r.token.length:0))}return n}var Yc=Object.defineProperty,Gc=(i,e,t)=>e in i?Yc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ni=(i,e,t)=>(Gc(i,typeof e!="symbol"?e+"":e,t),t),Bo=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},No=(i,e,t)=>(Bo(i,e,"read from private field"),t?t.call(i):e.get(i)),Oi=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},St=(i,e,t,a)=>(Bo(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Do=(i,e,t)=>(Bo(i,e,"access private method"),t),ei,xr,ti,Uo,Ed,Dr,Po,Oo={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},vd=m.createElement("template");vd.innerHTML=`
930
+ </svg>`,ql=m.createElement("template");ql.innerHTML=`
931
+ <slot name="icon">${kc}</slot>
932
+ `;var To=class extends M{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AUDIO_TRACK_ENABLED,o.MEDIA_AUDIO_TRACK_UNAVAILABLE]}constructor(){super({slotTemplate:ql})}get mediaAudioTrackEnabled(){return x(this,o.MEDIA_AUDIO_TRACK_ENABLED)}set mediaAudioTrackEnabled(e){S(this,o.MEDIA_AUDIO_TRACK_ENABLED,e)}};l.customElements.get("media-audio-track-button")||l.customElements.define("media-audio-track-button",To);var Ar=class extends ce{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AUDIO_TRACK_ENABLED,o.MEDIA_AUDIO_TRACK_UNAVAILABLE]}init(){let e=m.createElement("media-audio-track-button");e.part.add("button"),e.preventClick=!0;let t=m.createElement("media-audio-track-listbox");t.part.add("listbox"),t.setAttribute("exportparts","option, option-selected, indicator");let a=this.shadowRoot.querySelector("slot[name=button]"),r=this.shadowRoot.querySelector("slot[name=listbox]");a.textContent="",r.textContent="",a.append(e),r.append(t)}};l.customElements.get("media-audio-track-selectmenu")||l.customElements.define("media-audio-track-selectmenu",Ar);var f=Kd(require("@mux/mux-video")),P=require("@mux/playback-core");var rd=require("@mux/mux-video");var Cc="en",gt={code:Cc};var Ql="en";function y(i,e=!0){var r,n;let t=e&&(n=(r=gt)==null?void 0:r[i])!=null?n:i,a=e?gt.code:Ql;return new Io(t,a)}var Io=class{constructor(e,t=(a=>(a=gt.code)!=null?a:Ql)()){this.message=e,this.locale=t}format(e){return this.message.replace(/\{(\w+)\}/g,(t,a)=>{var r;return(r=e[a])!=null?r:""})}toString(){return this.message}};function zl(i){let e="";return Object.entries(i).forEach(([t,a])=>{a!=null&&(e+=`${_r(t)}: ${a}; `)}),e?e.trim():void 0}function _r(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function yr(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function Be(i){if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}function ko(i){let e=Sc(i).toString();return e?"?"+e:""}function Sc(i){let e={};for(let t in i)i[t]!=null&&(e[t]=i[t]);return new URLSearchParams(e)}function et(i){let e=(i!=null?i:"").split(".")[1];if(!e)return{};let t=e.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(t).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}var Co=(i,e)=>!i||!e?!1:i.contains(e)?!0:Co(i,e.getRootNode().host);var Tr=require("@mux/playback-core");var Xl="mux.com",Mc=()=>{try{return"2.1.0"}catch{}return"UNKNOWN"},Lc=Mc(),kr=()=>Lc,Jl=(i,{token:e,customDomain:t=Xl,thumbnailTime:a}={})=>{let r=e==null?a:void 0,{aud:n}=et(e);if(!(e&&n!=="t"))return`https://image.${t}/${i}/thumbnail.webp${ko({token:e,time:r})}`},jl=(i,{token:e,customDomain:t=Xl}={})=>{let{aud:a}=et(e);if(!(e&&a!=="s"))return`https://image.${t}/${i}/storyboard.vtt${ko({token:e,format:"webp"})}`},Mi=i=>{if(!!i){if([Tr.StreamTypes.LIVE,Tr.StreamTypes.ON_DEMAND].includes(i))return i;if(i!=null&&i.includes("live"))return Tr.StreamTypes.LIVE}};var Rc={crossorigin:"crossOrigin",playsinline:"playsInline"};function ed(i){var e;return(e=Rc[i])!=null?e:yr(i)}var At,_t,X,Ir=class{constructor(e,t){$(this,At,void 0);$(this,_t,void 0);$(this,X,[]);se(this,At,e),se(this,_t,t)}[Symbol.iterator](){return k(this,X).values()}get length(){return k(this,X).length}get value(){var e;return(e=k(this,X).join(" "))!=null?e:""}set value(e){var t;e!==this.value&&(se(this,X,[]),this.add(...(t=e==null?void 0:e.split(" "))!=null?t:[]))}toString(){return this.value}item(e){return k(this,X)[e]}values(){return k(this,X).values()}keys(){return k(this,X).keys()}forEach(e){k(this,X).forEach(e)}add(...e){var t,a;e.forEach(r=>{this.contains(r)||k(this,X).push(r)}),!(this.value===""&&!((t=k(this,At))!=null&&t.hasAttribute(`${k(this,_t)}`)))&&((a=k(this,At))==null||a.setAttribute(`${k(this,_t)}`,`${this.value}`))}remove(...e){var t;e.forEach(a=>{k(this,X).splice(k(this,X).indexOf(a),1)}),(t=k(this,At))==null||t.setAttribute(`${k(this,_t)}`,`${this.value}`)}contains(e){return k(this,X).includes(e)}toggle(e,t){return typeof t!="undefined"?t?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){this.remove(e),this.add(t)}};At=new WeakMap,_t=new WeakMap,X=new WeakMap;var td=`[mux-player ${kr()}]`;function tt(...i){console.warn(td,...i)}function ve(...i){console.error(td,...i)}function So(i){var t;let e=(t=i.message)!=null?t:"";if(i.context&&(e+=` ${i.context}`),i.file){let a="https://github.com/muxinc/elements/blob/main/errors/";e+=` ${y("Read more: ")}
933
+ ${a}${i.file}`}tt(e)}var z={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},yt={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},ad=Object.freeze({length:0,start(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),xc=rd.VideoEvents.filter(i=>i!=="error"),wc=Object.values(z).filter(i=>![z.PLAYSINLINE].includes(i)),Dc=Object.values(yt);function nd(i){i.querySelectorAll(":scope > track").forEach(e=>{var t;(t=i.media)==null||t.append(e.cloneNode())}),xc.forEach(e=>{var t;(t=i.media)==null||t.addEventListener(e,a=>{i.dispatchEvent(new Event(a.type))})})}var Mo=class extends U.HTMLElement{static get observedAttributes(){return[...wc,...Dc]}constructor(){super(),this.querySelectorAll(":scope > track").forEach(a=>{var r;(r=this.media)==null||r.append(a.cloneNode())});let e=a=>{for(let r of a)r.type==="childList"&&(r.removedNodes.forEach(n=>{var d,u;let s=(d=this.media)==null?void 0:d.querySelector(`track[src="${n.src}"]`);s&&((u=this.media)==null||u.removeChild(s))}),r.addedNodes.forEach(n=>{var s;(s=this.media)==null||s.append(n.cloneNode())}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0})}attributeChangedCallback(e,t,a){var r,n;switch(e){case yt.MUTED:{this.media&&(this.media.muted=a!=null,this.media.defaultMuted=a!=null);return}case yt.VOLUME:{let s=(r=Be(a))!=null?r:1;this.media&&(this.media.volume=s);return}case yt.PLAYBACKRATE:{let s=(n=Be(a))!=null?n:1;this.media&&(this.media.playbackRate=s,this.media.defaultPlaybackRate=s);return}}}play(){var e,t;return(t=(e=this.media)==null?void 0:e.play())!=null?t:Promise.reject()}pause(){var e;(e=this.media)==null||e.pause()}requestCast(e){var t;return(t=this.media)==null?void 0:t.requestCast(e)}get media(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("mux-video")}get audioTracks(){return this.media.audioTracks}get videoTracks(){return this.media.videoTracks}get audioRenditions(){return this.media.audioRenditions}get videoRenditions(){return this.media.videoRenditions}get paused(){var e,t;return(t=(e=this.media)==null?void 0:e.paused)!=null?t:!0}get duration(){var e,t;return(t=(e=this.media)==null?void 0:e.duration)!=null?t:NaN}get ended(){var e,t;return(t=(e=this.media)==null?void 0:e.ended)!=null?t:!1}get buffered(){var e,t;return(t=(e=this.media)==null?void 0:e.buffered)!=null?t:ad}get seekable(){var e,t;return(t=(e=this.media)==null?void 0:e.seekable)!=null?t:ad}get readyState(){var e,t;return(t=(e=this.media)==null?void 0:e.readyState)!=null?t:0}get videoWidth(){var e,t;return(t=(e=this.media)==null?void 0:e.videoWidth)!=null?t:0}get videoHeight(){var e,t;return(t=(e=this.media)==null?void 0:e.videoHeight)!=null?t:0}get currentTime(){var e,t;return(t=(e=this.media)==null?void 0:e.currentTime)!=null?t:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,t;return(t=(e=this.media)==null?void 0:e.volume)!=null?t:1}set volume(e){this.media&&(this.media.volume=Number(e))}get playbackRate(){var e,t;return(t=(e=this.media)==null?void 0:e.playbackRate)!=null?t:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get defaultPlaybackRate(){var e;return(e=Be(this.getAttribute(yt.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(yt.PLAYBACKRATE,`${e}`):this.removeAttribute(yt.PLAYBACKRATE)}get crossOrigin(){return Li(this,z.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(z.CROSSORIGIN,`${e}`)}get autoplay(){return Li(this,z.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(z.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(z.AUTOPLAY)}get loop(){return Li(this,z.LOOP)!=null}set loop(e){e?this.setAttribute(z.LOOP,""):this.removeAttribute(z.LOOP)}get muted(){var e,t;return(t=(e=this.media)==null?void 0:e.muted)!=null?t:!1}set muted(e){this.media&&(this.media.muted=Boolean(e))}get defaultMuted(){return Li(this,z.MUTED)!=null}set defaultMuted(e){e?this.setAttribute(z.MUTED,""):this.removeAttribute(z.MUTED)}get playsInline(){return Li(this,z.PLAYSINLINE)!=null}set playsInline(e){ve("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(z.PRELOAD,e):this.removeAttribute(z.PRELOAD)}};function Li(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}var Lo=Mo;var Oc=Object.defineProperty,Nc=(i,e,t)=>e in i?Oc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Uc=(i,e,t)=>(Nc(i,typeof e!="symbol"?e+"":e,t),t),ud=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},_=(i,e,t)=>(ud(i,e,"read from private field"),t?t.call(i):e.get(i)),we=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},Ve=(i,e,t,a)=>(ud(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),Jt,Cr,Tt,Ri,it,at,rt,It,jt,Sr,fe,od=1,sd=0,Pc=1,Bc={processCallback(i,e,t){if(!!t){for(let[a,r]of e)if(a in t){let n=t[a];typeof n=="boolean"&&r instanceof J&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=n:typeof n=="function"&&r instanceof J?r.element[r.attributeName]=n:r.value=n}}}},He=class extends l.DocumentFragment{constructor(e,t,a=Bc){var r;super(),we(this,Jt,void 0),we(this,Cr,void 0),this.append(e.content.cloneNode(!0)),Ve(this,Jt,cd(this)),Ve(this,Cr,a),(r=a.createCallback)==null||r.call(a,this,_(this,Jt),t),a.processCallback(this,_(this,Jt),t)}update(e){_(this,Cr).processCallback(this,_(this,Jt),e)}};Jt=new WeakMap;Cr=new WeakMap;var cd=(i,e=[])=>{let t,a;for(let r of i.attributes||[])if(r.value.includes("{{")){let n=new Ro;for([t,a]of dd(r.value))if(!t)n.append(a);else{let s=new J(i,r.name,r.namespaceURI);n.append(s),e.push([a,s])}r.value=n.toString()}for(let r of i.childNodes)if(r.nodeType===od&&!(r instanceof HTMLTemplateElement))cd(r,e);else if(r.nodeType===od||r.data.includes("{{")){let n=[];if(r.data)for([t,a]of dd(r.data))if(!t)n.push(new Text(a));else{let s=new $e(i);n.push(s),e.push([a,s])}else if(r instanceof HTMLTemplateElement){let s=new xi(i,r);n.push(s),e.push([s.expression,s])}r.replaceWith(...n.flatMap(s=>s.replacementNodes||[s]))}return e},ld={},dd=i=>{let e="",t=0,a=ld[i],r=0,n;if(a)return a;for(a=[];n=i[r];r++)n==="{"&&i[r+1]==="{"&&i[r-1]!=="\\"&&i[r+2]&&++t==1?(e&&a.push([sd,e]),e="",r++):n==="}"&&i[r+1]==="}"&&i[r-1]!=="\\"&&!--t?(a.push([Pc,e.trim()]),e="",r++):e+=n||"";return e&&a.push([sd,(t>0?"{{":"")+e]),ld[i]=a},Vc=11,Mr=class{get value(){return""}set value(e){}toString(){return this.value}},md=new WeakMap,Ro=class{constructor(){we(this,Tt,[])}[Symbol.iterator](){return _(this,Tt).values()}get length(){return _(this,Tt).length}item(e){return _(this,Tt)[e]}append(...e){for(let t of e)t instanceof J&&md.set(t,this),_(this,Tt).push(t)}toString(){return _(this,Tt).join("")}};Tt=new WeakMap;var J=class extends Mr{constructor(e,t,a){super(),we(this,It),we(this,Ri,""),we(this,it,void 0),we(this,at,void 0),we(this,rt,void 0),Ve(this,it,e),Ve(this,at,t),Ve(this,rt,a)}get attributeName(){return _(this,at)}get attributeNamespace(){return _(this,rt)}get element(){return _(this,it)}get value(){return _(this,Ri)}set value(e){_(this,Ri)!==e&&(Ve(this,Ri,e),!_(this,It,jt)||_(this,It,jt).length===1?e==null?_(this,it).removeAttributeNS(_(this,rt),_(this,at)):_(this,it).setAttributeNS(_(this,rt),_(this,at),e):_(this,it).setAttributeNS(_(this,rt),_(this,at),_(this,It,jt)))}get booleanValue(){return _(this,it).hasAttributeNS(_(this,rt),_(this,at))}set booleanValue(e){if(!_(this,It,jt)||_(this,It,jt).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};Ri=new WeakMap;it=new WeakMap;at=new WeakMap;rt=new WeakMap;It=new WeakSet;jt=function(){return md.get(this)};var $e=class extends Mr{constructor(e,t){super(),we(this,Sr,void 0),we(this,fe,void 0),Ve(this,Sr,e),Ve(this,fe,t?[...t]:[new Text])}get replacementNodes(){return _(this,fe)}get parentNode(){return _(this,Sr)}get nextSibling(){return _(this,fe)[_(this,fe).length-1].nextSibling}get previousSibling(){return _(this,fe)[0].previousSibling}get value(){return _(this,fe).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){let t=e.flat().flatMap(a=>a==null?[new Text]:a.forEach?[...a]:a.nodeType===Vc?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);t.length||t.push(new Text),Ve(this,fe,Hc(_(this,fe)[0].parentNode,_(this,fe),t,this.nextSibling))}};Sr=new WeakMap;fe=new WeakMap;var xi=class extends $e{constructor(e,t){let a=t.getAttribute("directive")||t.getAttribute("type"),r=t.getAttribute("expression")||t.getAttribute(a)||"";r.startsWith("{{")&&(r=r.trim().slice(2,-2).trim()),super(e),Uc(this,"directive"),this.expression=r,this.template=t,this.directive=a}};function Hc(i,e,t,a=null){let r=0,n,s,d,u=t.length,c=e.length;for(;r<u&&r<c&&e[r]==t[r];)r++;for(;r<u&&r<c&&t[u-1]==e[c-1];)a=t[--c,--u];if(r==c)for(;r<u;)i.insertBefore(t[r++],a);if(r==u)for(;r<c;)i.removeChild(e[r++]);else{for(n=e[r];r<u;)d=t[r++],s=n?n.nextSibling:a,n==d?n=s:r<u&&t[r]==s?(i.replaceChild(d,n),n=s):i.insertBefore(d,n);for(;n!=a;)s=n.nextSibling,i.removeChild(n),n=s}return t}var hd={string:i=>String(i)},Rr=class{constructor(e){this.template=e,this.state=void 0}},kt=new WeakMap,Ct=new WeakMap,xo={partial:(i,e)=>{e[i.expression]=new Rr(i.template)},if:(i,e)=>{var t;if(bd(i.expression,e))if(kt.get(i)!==i.template){kt.set(i,i.template);let a=new He(i.template,e,xr);i.replace(a),Ct.set(i,a)}else(t=Ct.get(i))==null||t.update(e);else i.replace(""),kt.delete(i),Ct.delete(i)}},$c=Object.keys(xo),xr={processCallback(i,e,t){var a,r;if(!!t)for(let[n,s]of e){if(s instanceof xi){if(!s.directive){let u=$c.find(c=>s.template.hasAttribute(c));u&&(s.directive=u,s.expression=s.template.getAttribute(u))}(a=xo[s.directive])==null||a.call(xo,s,t);continue}let d=bd(n,t);if(d instanceof Rr){kt.get(s)!==d.template?(kt.set(s,d.template),d=new He(d.template,d.state,xr),s.value=d,Ct.set(s,d)):(r=Ct.get(s))==null||r.update(d.state);continue}d?(s instanceof J&&s.attributeName.startsWith("aria-")&&(d=String(d)),s instanceof J?typeof d=="boolean"?s.booleanValue=d:typeof d=="function"?s.element[s.attributeName]=d:s.value=d:(s.value=d,kt.delete(s),Ct.delete(s))):s instanceof J?s.value=void 0:(s.value=void 0,kt.delete(s),Ct.delete(s))}}},pd={"!":i=>!i,"!!":i=>!!i,"==":(i,e)=>i==e,"!=":(i,e)=>i!=e,">":(i,e)=>i>e,">=":(i,e)=>i>=e,"<":(i,e)=>i<e,"<=":(i,e)=>i<=e,"??":(i,e)=>i!=null?i:e,"|":(i,e)=>{var t;return(t=hd[e])==null?void 0:t.call(hd,i)}};function Wc(i){return Fc(i,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function bd(i,e={}){var t,a,r,n,s,d,u;let c=Wc(i);if(c.length===0||c.some(({type:h})=>!h))return wi(i);if(((t=c[0])==null?void 0:t.token)===">"){let h=e[(a=c[1])==null?void 0:a.token];if(!h)return wi(i);let g={...e};h.state=g;let v=c.slice(2);for(let T=0;T<v.length;T+=3){let V=(r=v[T])==null?void 0:r.token,Y=(n=v[T+1])==null?void 0:n.token,I=(s=v[T+2])==null?void 0:s.token;V&&Y==="="&&(g[V]=Di(I,e))}return h}if(c.length===1)return Lr(c[0])?Di(c[0].token,e):wi(i);if(c.length===2){let h=(d=c[0])==null?void 0:d.token,g=pd[h];if(!g||!Lr(c[1]))return wi(i);let v=Di(c[1].token,e);return g(v)}if(c.length===3){let h=(u=c[1])==null?void 0:u.token,g=pd[h];if(!g||!Lr(c[0])||!Lr(c[2]))return wi(i);let v=Di(c[0].token,e);if(h==="|")return g(v,c[2].token);let T=Di(c[2].token,e);return g(v,T)}}function wi(i){return console.warn(`Warning: invalid expression \`${i}\``),!1}function Lr({type:i}){return["number","boolean","string","param"].includes(i)}function Di(i,e){let t=i[0],a=i.slice(-1);return i==="true"||i==="false"?i==="true":t===a&&["'",'"'].includes(t)?i.slice(1,-1):Qi(i)?parseFloat(i):e[i]}function Fc(i,e){let t,a,r,n=[];for(;i;){r=null,t=i.length;for(let s in e)a=e[s].exec(i),a&&a.index<t&&(r={token:a[0],type:s,matches:a.slice(1)},t=a.index);t&&n.push({token:i.substr(0,t),type:void 0}),r&&n.push(r),i=i.substr(t+(r?r.token.length:0))}return n}var Kc=Object.defineProperty,Yc=(i,e,t)=>e in i?Kc(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ni=(i,e,t)=>(Yc(i,typeof e!="symbol"?e+"":e,t),t),Po=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)},Oo=(i,e,t)=>(Po(i,e,"read from private field"),t?t.call(i):e.get(i)),Oi=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},St=(i,e,t,a)=>(Po(i,e,"write to private field"),a?a.call(i,t):e.set(i,t),t),wo=(i,e,t)=>(Po(i,e,"access private method"),t),ei,wr,ti,No,Ed,Dr,Uo,Do={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},vd=m.createElement("template");vd.innerHTML=`
934
934
  <style>
935
935
  :host {
936
936
  display: inline-block;
@@ -954,7 +954,7 @@ ${a}${i.file}`}tt(e)}var z={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"
954
954
  display: none;
955
955
  }
956
956
  </style>
957
- `;var nt=class extends l.HTMLElement{constructor(){super(),Oi(this,Uo),Oi(this,Dr),Ni(this,"renderRoot"),Ni(this,"renderer"),Oi(this,ei,void 0),Oi(this,xr,void 0),Oi(this,ti,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());let e=new MutationObserver(t=>{var a;this.mediaController&&!((a=this.mediaController)!=null&&a.breakpointsComputed)||t.some(r=>{let n=r.target;return n===this?!0:n.localName!=="media-controller"?!1:!!(Oo[r.attributeName]||r.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(De.BREAKPOINTS_COMPUTED,this.render),Do(this,Uo,Ed).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return(e=No(this,ei))!=null?e:this.constructor.template}set template(e){St(this,ti,null),St(this,ei,e),this.createRenderer()}get props(){var e,t,a;let r=[...Array.from((t=(e=this.mediaController)==null?void 0:e.attributes)!=null?t:[]).filter(({name:s})=>Oo[s]||s.startsWith("breakpoint")),...Array.from(this.attributes)],n={};for(let s of r){let d=(a=Oo[s.name])!=null?a:ms(s.name),{value:u}=s;u!=null?(qi(u)&&(u=parseFloat(u)),n[d]=u===""?!0:u):n[d]=!1}return n}attributeChangedCallback(e,t,a){e==="template"&&t!=a&&Do(this,Dr,Po).call(this)}connectedCallback(){Do(this,Dr,Po).call(this)}createRenderer(){this.template&&this.template!==No(this,xr)&&(St(this,xr,this.template),this.renderer=new $e(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(vd.content.cloneNode(!0),this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}};ei=new WeakMap;xr=new WeakMap;ti=new WeakMap;Uo=new WeakSet;Ed=function(i){if(Object.prototype.hasOwnProperty.call(this,i)){let e=this[i];delete this[i],this[i]=e}};Dr=new WeakSet;Po=function(){var i;let e=this.getAttribute("template");if(!e||e===No(this,ti))return;let t=this.getRootNode(),a=(i=t==null?void 0:t.getElementById)==null?void 0:i.call(t,e);if(a){St(this,ti,e),St(this,ei,a),this.createRenderer();return}Zc(e)&&(St(this,ti,e),qc(e).then(r=>{let n=m.createElement("template");n.innerHTML=r,St(this,ei,n),this.createRenderer()}).catch(console.error))};Ni(nt,"template");Ni(nt,"observedAttributes",["template"]);Ni(nt,"processor",wr);function Zc(i){if(!/^(\/|\.\/|https?:\/\/)/.test(i))return!1;let e=/^https?:\/\//.test(i)?void 0:location.origin;try{new URL(i,e)}catch{return!1}return!0}async function qc(i){let e=await fetch(i);if(e.status!==200)throw new Error(`Failed to load resource: the server responded with a status of ${e.status}`);return e.text()}l.customElements.get("media-theme")||l.customElements.define("media-theme",nt);var fd=`:host {
957
+ `;var nt=class extends l.HTMLElement{constructor(){super(),Oi(this,No),Oi(this,Dr),Ni(this,"renderRoot"),Ni(this,"renderer"),Oi(this,ei,void 0),Oi(this,wr,void 0),Oi(this,ti,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());let e=new MutationObserver(t=>{var a;this.mediaController&&!((a=this.mediaController)!=null&&a.breakpointsComputed)||t.some(r=>{let n=r.target;return n===this?!0:n.localName!=="media-controller"?!1:!!(Do[r.attributeName]||r.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(De.BREAKPOINTS_COMPUTED,this.render),wo(this,No,Ed).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return(e=Oo(this,ei))!=null?e:this.constructor.template}set template(e){St(this,ti,null),St(this,ei,e),this.createRenderer()}get props(){var e,t,a;let r=[...Array.from((t=(e=this.mediaController)==null?void 0:e.attributes)!=null?t:[]).filter(({name:s})=>Do[s]||s.startsWith("breakpoint")),...Array.from(this.attributes)],n={};for(let s of r){let d=(a=Do[s.name])!=null?a:cs(s.name),{value:u}=s;u!=null?(Qi(u)&&(u=parseFloat(u)),n[d]=u===""?!0:u):n[d]=!1}return n}attributeChangedCallback(e,t,a){e==="template"&&t!=a&&wo(this,Dr,Uo).call(this)}connectedCallback(){wo(this,Dr,Uo).call(this)}createRenderer(){this.template&&this.template!==Oo(this,wr)&&(St(this,wr,this.template),this.renderer=new He(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(vd.content.cloneNode(!0),this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}};ei=new WeakMap;wr=new WeakMap;ti=new WeakMap;No=new WeakSet;Ed=function(i){if(Object.prototype.hasOwnProperty.call(this,i)){let e=this[i];delete this[i],this[i]=e}};Dr=new WeakSet;Uo=function(){var i;let e=this.getAttribute("template");if(!e||e===Oo(this,ti))return;let t=this.getRootNode(),a=(i=t==null?void 0:t.getElementById)==null?void 0:i.call(t,e);if(a){St(this,ti,e),St(this,ei,a),this.createRenderer();return}Gc(e)&&(St(this,ti,e),Zc(e).then(r=>{let n=m.createElement("template");n.innerHTML=r,St(this,ei,n),this.createRenderer()}).catch(console.error))};Ni(nt,"template");Ni(nt,"observedAttributes",["template"]);Ni(nt,"processor",xr);function Gc(i){if(!/^(\/|\.\/|https?:\/\/)/.test(i))return!1;let e=/^https?:\/\//.test(i)?void 0:location.origin;try{new URL(i,e)}catch{return!1}return!0}async function Zc(i){let e=await fetch(i);if(e.status!==200)throw new Error(`Failed to load resource: the server responded with a status of ${e.status}`);return e.text()}l.customElements.get("media-theme")||l.customElements.define("media-theme",nt);var fd=`:host {
958
958
  --media-control-display: var(--controls);
959
959
  --media-loading-indicator-display: var(--loading-indicator);
960
960
  --media-dialog-display: var(--dialog);
@@ -1148,9 +1148,9 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1148
1148
  <div class="dialog">
1149
1149
  <slot></slot>
1150
1150
  </div>
1151
- `;var ot=class extends U.HTMLElement{constructor(){var t;super();this.attachShadow({mode:"open"}),(t=this.shadowRoot)==null||t.appendChild(this.constructor.template.content.cloneNode(!0))}show(){this.setAttribute("open",""),this.dispatchEvent(new CustomEvent("open",{composed:!0,bubbles:!0})),gd(this)}close(){!this.hasAttribute("open")||(this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("close",{composed:!0,bubbles:!0})),zc(this))}attributeChangedCallback(t,a,r){t==="open"&&a!==r&&(r!=null?this.show():this.close())}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),this.hasAttribute("open")&&gd(this)}};ot.styles=Ad,ot.template=_d,ot.observedAttributes=["open"];function gd(i){let e=new CustomEvent("initfocus",{composed:!0,bubbles:!0,cancelable:!0});if(i.dispatchEvent(e),e.defaultPrevented)return;let t=i.querySelector("[autofocus]:not([disabled])");!t&&i.tabIndex>=0&&(t=i),t||(t=yd(i.shadowRoot)),i._previouslyFocusedElement=re.activeElement,re.activeElement instanceof HTMLElement&&re.activeElement.blur(),i.addEventListener("transitionend",()=>{t instanceof HTMLElement&&t.focus({preventScroll:!0})},{once:!0})}function yd(i){let t=["button","input","keygen","select","textarea"].map(function(r){return r+":not([disabled])"});t.push('[tabindex]:not([disabled]):not([tabindex=""])');let a=i==null?void 0:i.querySelector(t.join(", "));if(!a&&"attachShadow"in Element.prototype){let r=(i==null?void 0:i.querySelectorAll("*"))||[];for(let n=0;n<r.length&&!(r[n].tagName&&r[n].shadowRoot&&(a=yd(r[n].shadowRoot),a));n++);}return a}function zc(i){i._previouslyFocusedElement instanceof HTMLElement&&i._previouslyFocusedElement.focus()}U.customElements.get("media-dialog")||(U.customElements.define("media-dialog",ot),U.MediaDialog=ot);var Ho=ot;var Td=re.createElement("template");Td.innerHTML=`
1151
+ `;var ot=class extends U.HTMLElement{constructor(){var t;super();this.attachShadow({mode:"open"}),(t=this.shadowRoot)==null||t.appendChild(this.constructor.template.content.cloneNode(!0))}show(){this.setAttribute("open",""),this.dispatchEvent(new CustomEvent("open",{composed:!0,bubbles:!0})),gd(this)}close(){!this.hasAttribute("open")||(this.removeAttribute("open"),this.dispatchEvent(new CustomEvent("close",{composed:!0,bubbles:!0})),Qc(this))}attributeChangedCallback(t,a,r){t==="open"&&a!==r&&(r!=null?this.show():this.close())}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),this.hasAttribute("open")&&gd(this)}};ot.styles=Ad,ot.template=_d,ot.observedAttributes=["open"];function gd(i){let e=new CustomEvent("initfocus",{composed:!0,bubbles:!0,cancelable:!0});if(i.dispatchEvent(e),e.defaultPrevented)return;let t=i.querySelector("[autofocus]:not([disabled])");!t&&i.tabIndex>=0&&(t=i),t||(t=yd(i.shadowRoot)),i._previouslyFocusedElement=re.activeElement,re.activeElement instanceof HTMLElement&&re.activeElement.blur(),i.addEventListener("transitionend",()=>{t instanceof HTMLElement&&t.focus({preventScroll:!0})},{once:!0})}function yd(i){let t=["button","input","keygen","select","textarea"].map(function(r){return r+":not([disabled])"});t.push('[tabindex]:not([disabled]):not([tabindex=""])');let a=i==null?void 0:i.querySelector(t.join(", "));if(!a&&"attachShadow"in Element.prototype){let r=(i==null?void 0:i.querySelectorAll("*"))||[];for(let n=0;n<r.length&&!(r[n].tagName&&r[n].shadowRoot&&(a=yd(r[n].shadowRoot),a));n++);}return a}function Qc(i){i._previouslyFocusedElement instanceof HTMLElement&&i._previouslyFocusedElement.focus()}U.customElements.get("media-dialog")||(U.customElements.define("media-dialog",ot),U.MediaDialog=ot);var Bo=ot;var Td=re.createElement("template");Td.innerHTML=`
1152
1152
  <style>
1153
- ${Ho.styles}
1153
+ ${Bo.styles}
1154
1154
 
1155
1155
  .close {
1156
1156
  background: none;
@@ -1179,22 +1179,22 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1179
1179
  </svg>
1180
1180
  </button>
1181
1181
  </slot>
1182
- `;var Ui=class extends Ho{constructor(){var e,t;super(),(t=(e=this.shadowRoot)==null?void 0:e.querySelector(".close"))==null||t.addEventListener("click",()=>{this.close()})}};Ui.template=Td;U.customElements.get("mxp-dialog")||(U.customElements.define("mxp-dialog",Ui),U.MxpDialog=Ui);var Pi=new WeakMap,Bi=class{constructor(e,t){this.element=e;this.type=t;this.element.addEventListener(this.type,this);let a=Pi.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 t=Pi.get(this.element);t&&t.delete(this.type)}}static for(e){Pi.has(e.element)||Pi.set(e.element,new Map);let t=e.attributeName.slice(2),a=Pi.get(e.element);return a&&a.has(t)?a.get(t):new Bi(e.element,t)}};function Xc(i,e){return i instanceof J&&i.attributeName.startsWith("on")?(Bi.for(i).set(e),i.element.removeAttributeNS(i.attributeNamespace,i.attributeName),!0):!1}function Jc(i,e){return e instanceof Or&&i instanceof Ve?(e.renderInto(i),!0):!1}function jc(i,e){return e instanceof DocumentFragment&&i instanceof Ve?(e.childNodes.length&&i.replace(...e.childNodes),!0):!1}function em(i,e){if(i instanceof J){let t=i.attributeNamespace,a=i.element.getAttributeNS(t,i.attributeName);return String(e)!==a&&(i.value=String(e)),!0}return i.value=String(e),!0}function tm(i,e){if(i instanceof J&&e instanceof Element){let t=i.element;return t[i.attributeName]!==e&&(i.element.removeAttributeNS(i.attributeNamespace,i.attributeName),t[i.attributeName]=e),!0}return!1}function im(i,e){if(typeof e=="boolean"&&i instanceof J){let t=i.attributeNamespace,a=i.element.hasAttributeNS(t,i.attributeName);return e!==a&&(i.booleanValue=e),!0}return!1}function am(i,e){return e===!1&&i instanceof Ve?(i.replace(""),!0):!1}function rm(i,e){tm(i,e)||im(i,e)||Xc(i,e)||am(i,e)||Jc(i,e)||jc(i,e)||em(i,e)}var $o=new Map,Id=new WeakMap,kd=new WeakMap,Or=class{constructor(e,t,a){this.strings=e;this.values=t;this.processor=a;this.stringsKey=this.strings.join("")}get template(){if($o.has(this.stringsKey))return $o.get(this.stringsKey);{let e=re.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((a,r,n)=>a+r+(n<t?`{{ ${n} }}`:""),""),$o.set(this.stringsKey,e),e}}renderInto(e){var r;let t=this.template;if(Id.get(e)!==t){Id.set(e,t);let n=new $e(t,this.values,this.processor);kd.set(e,n),e instanceof Ve?e.replace(...n.children):e.appendChild(n);return}let a=kd.get(e);(r=a==null?void 0:a.update)==null||r.call(a,this.values)}},nm={processCallback(i,e,t){var a;if(!!t){for(let[r,n]of e)if(r in t){let s=(a=t[r])!=null?a:"";rm(n,s)}}}};function We(i,...e){return new Or(i,e,nm)}function Cd(i,e){i.renderInto(e)}var Sd=require("@mux/playback-core"),Md=i=>We`
1182
+ `;var Ui=class extends Bo{constructor(){var e,t;super(),(t=(e=this.shadowRoot)==null?void 0:e.querySelector(".close"))==null||t.addEventListener("click",()=>{this.close()})}};Ui.template=Td;U.customElements.get("mxp-dialog")||(U.customElements.define("mxp-dialog",Ui),U.MxpDialog=Ui);var Pi=new WeakMap,Bi=class{constructor(e,t){this.element=e;this.type=t;this.element.addEventListener(this.type,this);let a=Pi.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 t=Pi.get(this.element);t&&t.delete(this.type)}}static for(e){Pi.has(e.element)||Pi.set(e.element,new Map);let t=e.attributeName.slice(2),a=Pi.get(e.element);return a&&a.has(t)?a.get(t):new Bi(e.element,t)}};function zc(i,e){return i instanceof J&&i.attributeName.startsWith("on")?(Bi.for(i).set(e),i.element.removeAttributeNS(i.attributeNamespace,i.attributeName),!0):!1}function Xc(i,e){return e instanceof Or&&i instanceof $e?(e.renderInto(i),!0):!1}function Jc(i,e){return e instanceof DocumentFragment&&i instanceof $e?(e.childNodes.length&&i.replace(...e.childNodes),!0):!1}function jc(i,e){if(i instanceof J){let t=i.attributeNamespace,a=i.element.getAttributeNS(t,i.attributeName);return String(e)!==a&&(i.value=String(e)),!0}return i.value=String(e),!0}function em(i,e){if(i instanceof J&&e instanceof Element){let t=i.element;return t[i.attributeName]!==e&&(i.element.removeAttributeNS(i.attributeNamespace,i.attributeName),t[i.attributeName]=e),!0}return!1}function tm(i,e){if(typeof e=="boolean"&&i instanceof J){let t=i.attributeNamespace,a=i.element.hasAttributeNS(t,i.attributeName);return e!==a&&(i.booleanValue=e),!0}return!1}function im(i,e){return e===!1&&i instanceof $e?(i.replace(""),!0):!1}function am(i,e){em(i,e)||tm(i,e)||zc(i,e)||im(i,e)||Xc(i,e)||Jc(i,e)||jc(i,e)}var Vo=new Map,Id=new WeakMap,kd=new WeakMap,Or=class{constructor(e,t,a){this.strings=e;this.values=t;this.processor=a;this.stringsKey=this.strings.join("")}get template(){if(Vo.has(this.stringsKey))return Vo.get(this.stringsKey);{let e=re.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((a,r,n)=>a+r+(n<t?`{{ ${n} }}`:""),""),Vo.set(this.stringsKey,e),e}}renderInto(e){var r;let t=this.template;if(Id.get(e)!==t){Id.set(e,t);let n=new He(t,this.values,this.processor);kd.set(e,n),e instanceof $e?e.replace(...n.children):e.appendChild(n);return}let a=kd.get(e);(r=a==null?void 0:a.update)==null||r.call(a,this.values)}},rm={processCallback(i,e,t){var a;if(!!t){for(let[r,n]of e)if(r in t){let s=(a=t[r])!=null?a:"";am(n,s)}}}};function We(i,...e){return new Or(i,e,rm)}function Cd(i,e){i.renderInto(e)}var Vi=require("@mux/playback-core"),Sd=i=>We`
1183
1183
  <style>
1184
1184
  ${fd}
1185
1185
  </style>
1186
- ${sm(i)}
1187
- `,om=i=>{let e=i.hotKeys?`${i.hotKeys}`:"";return Mi(i.streamType)==="live"&&(e+=" noarrowleft noarrowright"),e},sm=i=>{var e,t,a,r,n,s,d,u,c,h,f,v,T,H,Y,I,ae,ge,oe,ri,Rt,Ko,Yo,Go,Zo,qo,Qo,zo,Xo,Jo,jo,es,ts,is;return We`
1186
+ ${om(i)}
1187
+ `,nm=i=>{let e=i.hotKeys?`${i.hotKeys}`:"";return Mi(i.streamType)==="live"&&(e+=" noarrowleft noarrowright"),e},om=i=>{var e,t,a,r,n,s,d,u,c,h,g,v,T,V,Y,I,ae,ge,oe,ri,Rt,Fo,Ko,Yo,Go,Zo,qo,Qo,zo,Xo,Jo,jo,es,ts;return We`
1188
1188
  <media-theme
1189
1189
  template="${i.themeTemplate||!1}"
1190
1190
  defaultstreamtype="${(e=i.defaultStreamType)!=null?e:!1}"
1191
- hotkeys="${om(i)||!1}"
1191
+ hotkeys="${nm(i)||!1}"
1192
1192
  nohotkeys="${i.noHotKeys||!i.hasSrc||i.isDialogOpen||!1}"
1193
- noautoseektolive="${!!((t=i.streamType)!=null&&t.includes(Sd.StreamTypes.LIVE))&&i.targetLiveWindow!==0}"
1193
+ noautoseektolive="${!!((t=i.streamType)!=null&&t.includes(Vi.StreamTypes.LIVE))&&i.targetLiveWindow!==0}"
1194
1194
  novolumepref="${i.novolumepref||!1}"
1195
1195
  disabled="${!i.hasSrc||i.isDialogOpen}"
1196
1196
  audio="${(a=i.audio)!=null?a:!1}"
1197
- style="${(r=Xl({"--media-primary-color":i.primaryColor,"--media-secondary-color":i.secondaryColor,"--media-accent-color":i.accentColor}))!=null?r:!1}"
1197
+ style="${(r=zl({"--media-primary-color":i.primaryColor,"--media-secondary-color":i.secondaryColor,"--media-accent-color":i.accentColor}))!=null?r:!1}"
1198
1198
  defaultsubtitles="${!i.defaultHiddenCaptions}"
1199
1199
  forwardseekoffset="${(n=i.forwardSeekOffset)!=null?n:!1}"
1200
1200
  backwardseekoffset="${(s=i.backwardSeekOffset)!=null?s:!1}"
@@ -1206,11 +1206,11 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1206
1206
  >
1207
1207
  <mux-video
1208
1208
  slot="media"
1209
- target-live-window="${(f=i.targetLiveWindow)!=null?f:!1}"
1209
+ target-live-window="${(g=i.targetLiveWindow)!=null?g:!1}"
1210
1210
  stream-type="${(v=Mi(i.streamType))!=null?v:!1}"
1211
1211
  crossorigin="${(T=i.crossOrigin)!=null?T:""}"
1212
1212
  playsinline
1213
- autoplay="${(H=i.autoplay)!=null?H:!1}"
1213
+ autoplay="${(V=i.autoplay)!=null?V:!1}"
1214
1214
  muted="${(Y=i.muted)!=null?Y:!1}"
1215
1215
  loop="${(I=i.loop)!=null?I:!1}"
1216
1216
  preload="${(ae=i.preload)!=null?ae:!1}"
@@ -1219,13 +1219,13 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1219
1219
  disable-cookies="${(ri=i.disableCookies)!=null?ri:!1}"
1220
1220
  prefer-playback="${(Rt=i.preferPlayback)!=null?Rt:!1}"
1221
1221
  start-time="${i.startTime!=null?i.startTime:!1}"
1222
- beacon-collection-domain="${(Ko=i.beaconCollectionDomain)!=null?Ko:!1}"
1223
- player-software-name="${(Yo=i.playerSoftwareName)!=null?Yo:!1}"
1224
- player-software-version="${(Go=i.playerSoftwareVersion)!=null?Go:!1}"
1225
- env-key="${(Zo=i.envKey)!=null?Zo:!1}"
1226
- custom-domain="${(qo=i.customDomain)!=null?qo:!1}"
1227
- src="${i.src?i.src:i.playbackId?So(i.playbackId,{maxResolution:i.maxResolution,domain:i.customDomain,token:i.tokens.playback}):!1}"
1228
- cast-src="${i.src?i.src:i.playbackId?So(i.playbackId,{maxResolution:i.maxResolution,domain:i.customDomain,token:i.tokens.playback}):!1}"
1222
+ beacon-collection-domain="${(Fo=i.beaconCollectionDomain)!=null?Fo:!1}"
1223
+ player-software-name="${(Ko=i.playerSoftwareName)!=null?Ko:!1}"
1224
+ player-software-version="${(Yo=i.playerSoftwareVersion)!=null?Yo:!1}"
1225
+ env-key="${(Go=i.envKey)!=null?Go:!1}"
1226
+ custom-domain="${(Zo=i.customDomain)!=null?Zo:!1}"
1227
+ src="${i.src?i.src:i.playbackId?(0,Vi.toMuxVideoURL)(i):!1}"
1228
+ cast-src="${i.src?i.src:i.playbackId?(0,Vi.toMuxVideoURL)(i):!1}"
1229
1229
  exportparts="video"
1230
1230
  >
1231
1231
  ${i.storyboard?We`<track label="thumbnails" default kind="metadata" src="${i.storyboard}" />`:We``}
@@ -1234,30 +1234,30 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1234
1234
  <media-poster-image
1235
1235
  part="poster"
1236
1236
  exportparts="poster, img"
1237
- src="${i.poster===""?!1:(Qo=i.poster)!=null?Qo:!1}"
1238
- placeholdersrc="${(zo=i.placeholder)!=null?zo:!1}"
1237
+ src="${i.poster===""?!1:(qo=i.poster)!=null?qo:!1}"
1238
+ placeholdersrc="${(Qo=i.placeholder)!=null?Qo:!1}"
1239
1239
  ></media-poster-image>
1240
1240
  </slot>
1241
1241
  <mxp-dialog
1242
1242
  no-auto-hide
1243
- open="${(Xo=i.isDialogOpen)!=null?Xo:!1}"
1243
+ open="${(zo=i.isDialogOpen)!=null?zo:!1}"
1244
1244
  onclose="${i.onCloseErrorDialog}"
1245
1245
  oninitfocus="${i.onInitFocusDialog}"
1246
1246
  >
1247
- ${(Jo=i.dialog)!=null&&Jo.title?We`<h3>${i.dialog.title}</h3>`:We``}
1247
+ ${(Xo=i.dialog)!=null&&Xo.title?We`<h3>${i.dialog.title}</h3>`:We``}
1248
1248
  <p>
1249
- ${(jo=i.dialog)==null?void 0:jo.message}
1250
- ${(es=i.dialog)!=null&&es.linkUrl?We`<a
1249
+ ${(Jo=i.dialog)==null?void 0:Jo.message}
1250
+ ${(jo=i.dialog)!=null&&jo.linkUrl?We`<a
1251
1251
  href="${i.dialog.linkUrl}"
1252
1252
  target="_blank"
1253
1253
  rel="external noopener"
1254
- aria-label="${(ts=i.dialog.linkText)!=null?ts:""} ${y("(opens in a new window)")}"
1255
- >${(is=i.dialog.linkText)!=null?is:i.dialog.linkUrl}</a
1254
+ aria-label="${(es=i.dialog.linkText)!=null?es:""} ${y("(opens in a new window)")}"
1255
+ >${(ts=i.dialog.linkText)!=null?ts:i.dialog.linkUrl}</a
1256
1256
  >`:We``}
1257
1257
  </p>
1258
1258
  </mxp-dialog>
1259
1259
  </media-theme>
1260
- `};var Hi=require("@mux/mux-video");function Nr(i,e,t,a,r){var d,u,c;let n={},s={};switch(i.code){case Hi.MediaError.MEDIA_ERR_NETWORK:{switch(n.title=y("Network Error",r),n.message=i.message,(d=i.data)==null?void 0:d.response.code){case 412:{n.title=y("Video is not currently available",r),n.message=y("The live stream or video file are not yet ready.",r),s.message=y("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),s.file="412-not-playable.md";break}case 404:{n.title=y("Video does not exist",r),n.message="",s.message=y("This playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),s.file="404-not-found.md";break}case 403:{if(n.title=y("Invalid playback URL",r),n.message=y("The video URL or playback-token are formatted with incorrect or incomplete information.",r),s.message=y("403 error trying to access this playback URL. If this is a signed URL, you might need to provide a playback-token.",r),s.file="missing-signed-tokens.md",!a)break;let{exp:h,aud:f,sub:v}=et(a),T=Date.now()>h*1e3,H=v!==t,Y=f!=="v",I={timeStyle:"medium",dateStyle:"medium"};if(T){n.title=y("Video URL has expired",r),n.message=y("The video\u2019s secured playback-token has expired.",r),s.message=y("The video\u2019s secured playback-token has expired.",r),s.context=y("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat(gt.code,I).format(h*1e3),currentDate:new Intl.DateTimeFormat(gt.code,I).format(Date.now())}),s.file="403-expired-token.md";break}if(H){n.title=y("Video URL is formatted incorrectly",r),n.message=y("The video\u2019s playback ID does not match the one encoded in the playback-token.",r),s.message=y("The video\u2019s playback ID does not match the one encoded in the playback-token.",r),s.context=y("Specified playback ID: {playbackId} and the playback ID encoded in the playback-token: {tokenPlaybackId}",r).format({playbackId:t,tokenPlaybackId:v}),s.file="403-playback-id-mismatch.md";break}if(Y){n.title=y("Video URL is formatted incorrectly",r),n.message=y("The playback-token is formatted with incorrect information.",r),s.message=y("The playback-token is formatted with incorrect information.",r),s.context=y("The playback-token has an incorrect aud value: {tokenType}. aud value should be v.",r).format({tokenType:f}),s.file="403-incorrect-aud-value.md";break}s.message=y("403 error trying to access this playback URL. If this is a signed playback ID, the token might not have been generated correctly.",r),s.file="403-malformatted-token.md";break}}break}case Hi.MediaError.MEDIA_ERR_DECODE:{let{message:h}=i;n={title:y("Media Error",r),message:h},s.file="media-decode-error.md";break}case Hi.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:{let h=(c=(u=i.data)==null?void 0:u.response)==null?void 0:c.code;if(h>=400&&h<500){i.code=Hi.MediaError.MEDIA_ERR_NETWORK,i.data={response:{code:h}},{dialog:n,devlog:s}=Nr(i,e,t,a);break}n={title:y("Source Not Supported",r),message:i.message},s.file="media-src-not-supported.md";break}default:n={title:y("Error",r),message:i.message};break}return e&&(n={title:y("Your device appears to be offline",r),message:y("Check your internet connection and try reloading this video.",r)}),{dialog:n,devlog:s}}var Ld=`<template id="media-theme-gerwig">
1260
+ `};var Hi=require("@mux/mux-video");function Nr(i,e,t,a,r){var d,u,c;let n={},s={};switch(i.code){case Hi.MediaError.MEDIA_ERR_NETWORK:{switch(n.title=y("Network Error",r),n.message=i.message,(d=i.data)==null?void 0:d.response.code){case 412:{n.title=y("Video is not currently available",r),n.message=y("The live stream or video file are not yet ready.",r),s.message=y("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),s.file="412-not-playable.md";break}case 404:{n.title=y("Video does not exist",r),n.message="",s.message=y("This playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),s.file="404-not-found.md";break}case 403:{if(n.title=y("Invalid playback URL",r),n.message=y("The video URL or playback-token are formatted with incorrect or incomplete information.",r),s.message=y("403 error trying to access this playback URL. If this is a signed URL, you might need to provide a playback-token.",r),s.file="missing-signed-tokens.md",!a)break;let{exp:h,aud:g,sub:v}=et(a),T=Date.now()>h*1e3,V=v!==t,Y=g!=="v",I={timeStyle:"medium",dateStyle:"medium"};if(T){n.title=y("Video URL has expired",r),n.message=y("The video\u2019s secured playback-token has expired.",r),s.message=y("The video\u2019s secured playback-token has expired.",r),s.context=y("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat(gt.code,I).format(h*1e3),currentDate:new Intl.DateTimeFormat(gt.code,I).format(Date.now())}),s.file="403-expired-token.md";break}if(V){n.title=y("Video URL is formatted incorrectly",r),n.message=y("The video\u2019s playback ID does not match the one encoded in the playback-token.",r),s.message=y("The video\u2019s playback ID does not match the one encoded in the playback-token.",r),s.context=y("Specified playback ID: {playbackId} and the playback ID encoded in the playback-token: {tokenPlaybackId}",r).format({playbackId:t,tokenPlaybackId:v}),s.file="403-playback-id-mismatch.md";break}if(Y){n.title=y("Video URL is formatted incorrectly",r),n.message=y("The playback-token is formatted with incorrect information.",r),s.message=y("The playback-token is formatted with incorrect information.",r),s.context=y("The playback-token has an incorrect aud value: {tokenType}. aud value should be v.",r).format({tokenType:g}),s.file="403-incorrect-aud-value.md";break}s.message=y("403 error trying to access this playback URL. If this is a signed playback ID, the token might not have been generated correctly.",r),s.file="403-malformatted-token.md";break}}break}case Hi.MediaError.MEDIA_ERR_DECODE:{let{message:h}=i;n={title:y("Media Error",r),message:h},s.file="media-decode-error.md";break}case Hi.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED:{let h=(c=(u=i.data)==null?void 0:u.response)==null?void 0:c.code;if(h>=400&&h<500){i.code=Hi.MediaError.MEDIA_ERR_NETWORK,i.data={response:{code:h}},{dialog:n,devlog:s}=Nr(i,e,t,a);break}n={title:y("Source Not Supported",r),message:i.message},s.file="media-src-not-supported.md";break}default:n={title:y("Error",r),message:i.message};break}return e&&(n={title:y("Your device appears to be offline",r),message:y("Check your internet connection and try reloading this video.",r)}),{dialog:n,devlog:s}}var Md=`<template id="media-theme-gerwig">
1261
1261
  <style>
1262
1262
  @keyframes pre-play-hide {
1263
1263
  0% {
@@ -1464,6 +1464,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1464
1464
  padding-bottom: min(100px, 25%);
1465
1465
  background: linear-gradient(#000, transparent);
1466
1466
  opacity: 0.8;
1467
+ pointer-events: none;
1467
1468
  }
1468
1469
 
1469
1470
  :host(:not([audio])) media-control-bar[part~='bottom']::before {
@@ -1476,6 +1477,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1476
1477
  background: linear-gradient(transparent, #000);
1477
1478
  opacity: 0.8;
1478
1479
  z-index: 1;
1480
+ pointer-events: none;
1479
1481
  }
1480
1482
 
1481
1483
  media-control-bar[part~='bottom'] > * {
@@ -2165,7 +2167,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2165
2167
  {{>PlayButton}}
2166
2168
  <template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template>
2167
2169
  </template>
2168
- {{>MuteButton}}
2170
+ {{>MuteButton}} {{>VolumeRange}}
2169
2171
  <div class="spacer"></div>
2170
2172
  {{>RenditionSelect}} {{>AudioTrackSelect}} {{>CaptionsMenuButton}} {{>AirplayButton}} {{>CastButton}}
2171
2173
  <template if="breakpointsm">{{>PipButton}}</template>
@@ -2210,5 +2212,5 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2210
2212
  <slot></slot>
2211
2213
  </media-controller>
2212
2214
  </template>
2213
- `;var Vo=re.createElement("template");"innerHTML"in Vo&&(Vo.innerHTML=Ld);var Rd,wd,Ur=class extends nt{};Ur.template=(wd=(Rd=Vo.content)==null?void 0:Rd.children)==null?void 0:wd[0];U.customElements.get("media-theme-gerwig")||U.customElements.define("media-theme-gerwig",Ur);var dm="gerwig";var Fe={SRC:"src",POSTER:"poster"},p={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",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",TITLE:"title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",NO_VOLUME_PREF:"no-volume-pref"},Wo=["audio","backwardseekoffset","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","novolumepref"];function um(i,e){var a;return{src:!i.playbackId&&i.src,playbackId:i.playbackId,hasSrc:!!i.playbackId||!!i.src,poster:i.poster,storyboard:i.storyboard,storyboardSrc:i.getAttribute(p.STORYBOARD_SRC),placeholder:i.getAttribute("placeholder"),themeTemplate:cm(i),thumbnailTime:!i.tokens.thumbnail&&i.thumbnailTime,autoplay:i.autoplay,crossOrigin:i.crossOrigin,loop:i.loop,noHotKeys:i.hasAttribute(p.NOHOTKEYS),hotKeys:i.getAttribute(p.HOTKEYS),muted:i.muted,paused:i.paused,preload:i.preload,envKey:i.envKey,preferCmcd:i.preferCmcd,debug:i.debug,disableCookies:i.disableCookies,tokens:i.tokens,beaconCollectionDomain:i.beaconCollectionDomain,maxResolution:i.maxResolution,metadata:i.metadata,playerSoftwareName:i.playerSoftwareName,playerSoftwareVersion:i.playerSoftwareVersion,startTime:i.startTime,preferPlayback:i.preferPlayback,audio:i.audio,defaultStreamType:i.defaultStreamType,targetLiveWindow:i.getAttribute(g.Attributes.TARGET_LIVE_WINDOW),streamType:Mi(i.getAttribute(g.Attributes.STREAM_TYPE)),primaryColor:i.primaryColor,secondaryColor:i.secondaryColor,accentColor:i.accentColor,forwardSeekOffset:i.forwardSeekOffset,backwardSeekOffset:i.backwardSeekOffset,defaultHiddenCaptions:i.defaultHiddenCaptions,defaultShowRemainingTime:i.defaultShowRemainingTime,hideDuration:mm(i),playbackRates:i.getAttribute(p.PLAYBACK_RATES),customDomain:(a=i.getAttribute(g.Attributes.CUSTOM_DOMAIN))!=null?a:void 0,title:i.getAttribute(p.TITLE),novolumepref:i.hasAttribute(p.NO_VOLUME_PREF),...e}}function cm(i){var t,a;let e=i.theme;if(e){let r=(a=(t=i.getRootNode())==null?void 0:t.getElementById)==null?void 0:a.call(t,e);if(r&&r instanceof HTMLTemplateElement)return r;e.startsWith("media-theme-")||(e=`media-theme-${e}`);let n=U.customElements.get(e);if(n!=null&&n.template)return n.template}}function mm(i){var t;let e=(t=i.mediaController)==null?void 0:t.querySelector("media-time-display");return e&&getComputedStyle(e).getPropertyValue("--media-duration-display-display").trim()==="none"}function xd(i){let e=i.hasAttribute(p.TITLE)?{video_title:i.getAttribute(p.TITLE)}:{};return i.getAttributeNames().filter(t=>t.startsWith("metadata-")).reduce((t,a)=>{let r=i.getAttribute(a);return r!==null&&(t[a.replace(/^metadata-/,"").replace(/-/g,"_")]=r),t},e)}var hm=Object.values(g.Attributes),pm=Object.values(Fe),bm=Object.values(p),Em=kr(),vm="mux-player",Dd={dialog:void 0,isDialogOpen:!1},Vi,Wi,Ke,Fi,Lt,st,ii,Pr,Od,Ki,Fo,lt,ai,Br,Nd,Hr,Ud,$r,Pd,Vr,Bd,$i=class extends Ro{constructor(){super();V(this,st);V(this,Pr);V(this,Ki);V(this,lt);V(this,Br);V(this,Hr);V(this,$r);V(this,Vr);V(this,Vi,!1);V(this,Wi,{});V(this,Ke,!0);V(this,Fi,new Ir(this,"hotkeys"));V(this,Lt,{...Dd,onCloseErrorDialog:()=>F(this,Ki,Fo).call(this,{dialog:void 0,isDialogOpen:!1}),onInitFocusDialog:t=>{ko(this,re.activeElement)||t.preventDefault()}});this.attachShadow({mode:"open"}),F(this,Pr,Od).call(this),this.isConnected&&F(this,st,ii).call(this)}static get observedAttributes(){var t;return[...(t=Ro.observedAttributes)!=null?t:[],...pm,...hm,...bm]}get mediaTheme(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("media-theme")}get mediaController(){var t,a;return(a=(t=this.mediaTheme)==null?void 0:t.shadowRoot)==null?void 0:a.querySelector("media-controller")}connectedCallback(){var a;let t=(a=this.shadowRoot)==null?void 0:a.querySelector("mux-video");t&&(t.metadata=xd(this))}attributeChangedCallback(t,a,r){switch(F(this,st,ii).call(this),super.attributeChangedCallback(t,a,r),t){case p.HOTKEYS:k(this,Fi).value=r;break;case p.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&tt(y("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").format({}));break}case p.THUMBNAIL_TOKEN:{let{aud:s}=et(r);r&&s!=="t"&&tt(y("The provided thumbnail-token should have audience value 't' instead of '{aud}'.").format({aud:s}));break}case p.STORYBOARD_TOKEN:{let{aud:s}=et(r);r&&s!=="s"&&tt(y("The provided storyboard-token should have audience value 's' instead of '{aud}'.").format({aud:s}));break}case g.Attributes.PLAYBACK_ID:{r!=null&&r.includes("?token")&&ve(y("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:r}));break}case g.Attributes.STREAM_TYPE:r&&![P.StreamTypes.LIVE,P.StreamTypes.ON_DEMAND,P.StreamTypes.UNKNOWN].includes(r)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=r.includes("dvr")?Number.POSITIVE_INFINITY:0:Mo({file:"invalid-stream-type.md",message:y("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):this.targetLiveWindow=r===P.StreamTypes.LIVE?0:Number.NaN}[g.Attributes.PLAYBACK_ID,Fe.SRC,p.PLAYBACK_TOKEN].includes(t)&&a!==r&&se(this,Lt,{...k(this,Lt),...Dd}),F(this,lt,ai).call(this,{[ed(t)]:r})}get preferCmcd(){var t;return(t=this.getAttribute(g.Attributes.PREFER_CMCD))!=null?t:void 0}set preferCmcd(t){t!==this.preferCmcd&&(t?P.CmcdTypeValues.includes(t)?this.setAttribute(g.Attributes.PREFER_CMCD,t):tt(`Invalid value for preferCmcd. Must be one of ${P.CmcdTypeValues.join()}`):this.removeAttribute(g.Attributes.PREFER_CMCD))}get hasPlayed(){var t,a;return(a=(t=this.mediaController)==null?void 0:t.hasAttribute("media-has-played"))!=null?a:!1}get inLiveWindow(){var t;return(t=this.mediaController)==null?void 0:t.hasAttribute("media-time-is-live")}get _hls(){var t;return(t=this.media)==null?void 0:t._hls}get mux(){var t;return(t=this.media)==null?void 0:t.mux}get theme(){var t;return(t=this.getAttribute(p.THEME))!=null?t:dm}set theme(t){this.setAttribute(p.THEME,`${t}`)}get themeProps(){let t=this.mediaTheme;if(!t)return;let a={};for(let r of t.getAttributeNames()){if(Wo.includes(r))continue;let n=t.getAttribute(r);a[_r(r)]=n===""?!0:n}return a}set themeProps(t){var r,n;F(this,st,ii).call(this);let a={...this.themeProps,...t};for(let s in a){if(Wo.includes(s))continue;let d=t==null?void 0:t[s];typeof d=="boolean"||d==null?(r=this.mediaTheme)==null||r.toggleAttribute(Ar(s),Boolean(d)):(n=this.mediaTheme)==null||n.setAttribute(Ar(s),d)}}get playbackId(){var t;return(t=this.getAttribute(g.Attributes.PLAYBACK_ID))!=null?t:void 0}set playbackId(t){t?this.setAttribute(g.Attributes.PLAYBACK_ID,t):this.removeAttribute(g.Attributes.PLAYBACK_ID)}get src(){var t,a;return this.playbackId?(t=Mt(this,Fe.SRC))!=null?t:void 0:(a=this.getAttribute(Fe.SRC))!=null?a:void 0}set src(t){t?this.setAttribute(Fe.SRC,t):this.removeAttribute(Fe.SRC)}get poster(){var a;let t=this.getAttribute(Fe.POSTER);if(t!=null)return t;if(this.playbackId&&!this.audio)return Jl(this.playbackId,{domain:this.customDomain,thumbnailTime:(a=this.thumbnailTime)!=null?a:this.startTime,token:this.tokens.thumbnail})}set poster(t){t||t===""?this.setAttribute(Fe.POSTER,t):this.removeAttribute(Fe.POSTER)}get storyboardSrc(){var t;return(t=this.getAttribute(p.STORYBOARD_SRC))!=null?t:void 0}set storyboardSrc(t){t?this.setAttribute(p.STORYBOARD_SRC,t):this.removeAttribute(p.STORYBOARD_SRC)}get storyboard(){if(this.storyboardSrc&&!this.tokens.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[P.StreamTypes.LIVE,P.StreamTypes.UNKNOWN].includes(this.streamType)))return jl(this.playbackId,{domain:this.customDomain,token:this.tokens.storyboard})}get audio(){return this.hasAttribute(p.AUDIO)}set audio(t){if(!t){this.removeAttribute(p.AUDIO);return}this.setAttribute(p.AUDIO,"")}get hotkeys(){return k(this,Fi)}get nohotkeys(){return this.hasAttribute(p.NOHOTKEYS)}set nohotkeys(t){if(!t){this.removeAttribute(p.NOHOTKEYS);return}this.setAttribute(p.NOHOTKEYS,"")}get thumbnailTime(){return Be(this.getAttribute(p.THUMBNAIL_TIME))}set thumbnailTime(t){this.setAttribute(p.THUMBNAIL_TIME,`${t}`)}get title(){var t;return(t=this.getAttribute(p.TITLE))!=null?t:""}set title(t){t!==this.title&&(t?this.setAttribute(p.TITLE,t):this.removeAttribute("title"),super.title=t)}get placeholder(){var t;return(t=Mt(this,p.PLACEHOLDER))!=null?t:""}set placeholder(t){this.setAttribute(p.PLACEHOLDER,`${t}`)}get primaryColor(){var a,r;let t=this.getAttribute(p.PRIMARY_COLOR);if(t!=null||this.mediaTheme&&(t=(r=(a=U.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_primary-color"))==null?void 0:r.trim(),t))return t}set primaryColor(t){this.setAttribute(p.PRIMARY_COLOR,`${t}`)}get secondaryColor(){var a,r;let t=this.getAttribute(p.SECONDARY_COLOR);if(t!=null||this.mediaTheme&&(t=(r=(a=U.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_secondary-color"))==null?void 0:r.trim(),t))return t}set secondaryColor(t){this.setAttribute(p.SECONDARY_COLOR,`${t}`)}get accentColor(){var a,r;let t=this.getAttribute(p.ACCENT_COLOR);if(t!=null||this.mediaTheme&&(t=(r=(a=U.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_accent-color"))==null?void 0:r.trim(),t))return t}set accentColor(t){this.setAttribute(p.ACCENT_COLOR,`${t}`)}get defaultShowRemainingTime(){return this.hasAttribute(p.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(t){t?this.setAttribute(p.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(p.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(!!this.hasAttribute(p.PLAYBACK_RATES))return this.getAttribute(p.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(t=>Number(t)).filter(t=>!Number.isNaN(t)).sort((t,a)=>t-a)}set playbackRates(t){if(!t){this.removeAttribute(p.PLAYBACK_RATES);return}this.setAttribute(p.PLAYBACK_RATES,t.join(" "))}get forwardSeekOffset(){var t;return(t=Be(this.getAttribute(p.FORWARD_SEEK_OFFSET)))!=null?t:10}set forwardSeekOffset(t){this.setAttribute(p.FORWARD_SEEK_OFFSET,`${t}`)}get backwardSeekOffset(){var t;return(t=Be(this.getAttribute(p.BACKWARD_SEEK_OFFSET)))!=null?t:10}set backwardSeekOffset(t){this.setAttribute(p.BACKWARD_SEEK_OFFSET,`${t}`)}get defaultHiddenCaptions(){return this.hasAttribute(p.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(t){t?this.setAttribute(p.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(p.DEFAULT_HIDDEN_CAPTIONS)}get playerSoftwareName(){var t;return(t=this.getAttribute(g.Attributes.PLAYER_SOFTWARE_NAME))!=null?t:vm}get playerSoftwareVersion(){var t;return(t=this.getAttribute(g.Attributes.PLAYER_SOFTWARE_VERSION))!=null?t:Em}get beaconCollectionDomain(){var t;return(t=this.getAttribute(g.Attributes.BEACON_COLLECTION_DOMAIN))!=null?t:void 0}set beaconCollectionDomain(t){t!==this.beaconCollectionDomain&&(t?this.setAttribute(g.Attributes.BEACON_COLLECTION_DOMAIN,t):this.removeAttribute(g.Attributes.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var t;return(t=this.getAttribute(g.Attributes.MAX_RESOLUTION))!=null?t:void 0}set maxResolution(t){t!==this.maxResolution&&(t?this.setAttribute(g.Attributes.MAX_RESOLUTION,t):this.removeAttribute(g.Attributes.MAX_RESOLUTION))}get customDomain(){var t;return(t=this.getAttribute(g.Attributes.CUSTOM_DOMAIN))!=null?t:void 0}set customDomain(t){t!==this.customDomain&&(t?this.setAttribute(g.Attributes.CUSTOM_DOMAIN,t):this.removeAttribute(g.Attributes.CUSTOM_DOMAIN))}get envKey(){var t;return(t=Mt(this,g.Attributes.ENV_KEY))!=null?t:void 0}set envKey(t){this.setAttribute(g.Attributes.ENV_KEY,`${t}`)}get noVolumePref(){return this.hasAttribute(p.NO_VOLUME_PREF)}set noVolumePref(t){t?this.setAttribute(p.NO_VOLUME_PREF,""):this.removeAttribute(p.NO_VOLUME_PREF)}get debug(){return Mt(this,g.Attributes.DEBUG)!=null}set debug(t){t?this.setAttribute(g.Attributes.DEBUG,""):this.removeAttribute(g.Attributes.DEBUG)}get disableCookies(){return Mt(this,g.Attributes.DISABLE_COOKIES)!=null}set disableCookies(t){t?this.setAttribute(g.Attributes.DISABLE_COOKIES,""):this.removeAttribute(g.Attributes.DISABLE_COOKIES)}get streamType(){var t,a,r;return(r=(a=this.getAttribute(g.Attributes.STREAM_TYPE))!=null?a:(t=this.media)==null?void 0:t.streamType)!=null?r:P.StreamTypes.UNKNOWN}set streamType(t){this.setAttribute(g.Attributes.STREAM_TYPE,`${t}`)}get defaultStreamType(){var t,a,r;return(r=(a=this.getAttribute(p.DEFAULT_STREAM_TYPE))!=null?a:(t=this.mediaController)==null?void 0:t.getAttribute(p.DEFAULT_STREAM_TYPE))!=null?r:P.StreamTypes.ON_DEMAND}set defaultStreamType(t){t?this.setAttribute(p.DEFAULT_STREAM_TYPE,t):this.removeAttribute(p.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var t,a;return this.hasAttribute(p.TARGET_LIVE_WINDOW)?+this.getAttribute(p.TARGET_LIVE_WINDOW):(a=(t=this.media)==null?void 0:t.targetLiveWindow)!=null?a:Number.NaN}set targetLiveWindow(t){t!=this.targetLiveWindow&&(t==null?this.removeAttribute(p.TARGET_LIVE_WINDOW):this.setAttribute(p.TARGET_LIVE_WINDOW,`${+t}`))}get liveEdgeStart(){var t;return(t=this.media)==null?void 0:t.liveEdgeStart}get startTime(){return Be(Mt(this,g.Attributes.START_TIME))}set startTime(t){this.setAttribute(g.Attributes.START_TIME,`${t}`)}get preferPlayback(){let t=this.getAttribute(g.Attributes.PREFER_PLAYBACK);if(t===P.PlaybackTypes.MSE||t===P.PlaybackTypes.NATIVE)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===P.PlaybackTypes.MSE||t===P.PlaybackTypes.NATIVE?this.setAttribute(g.Attributes.PREFER_PLAYBACK,t):this.removeAttribute(g.Attributes.PREFER_PLAYBACK))}get metadata(){var t;return(t=this.media)==null?void 0:t.metadata}set metadata(t){if(F(this,st,ii).call(this),!this.media){ve("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...xd(this),...t}}async addCuePoints(t){var a;if(F(this,st,ii).call(this),!this.media){ve("underlying media element missing when trying to addCuePoints. cuePoints will not be added.");return}return(a=this.media)==null?void 0:a.addCuePoints(t)}get activeCuePoint(){var t;return(t=this.media)==null?void 0:t.activeCuePoint}get cuePoints(){var t,a;return(a=(t=this.media)==null?void 0:t.cuePoints)!=null?a:[]}getStartDate(){var t;return(t=this.media)==null?void 0:t.getStartDate()}get currentPdt(){var t;return(t=this.media)==null?void 0:t.currentPdt}get tokens(){let t=this.getAttribute(p.PLAYBACK_TOKEN),a=this.getAttribute(p.THUMBNAIL_TOKEN),r=this.getAttribute(p.STORYBOARD_TOKEN);return{...k(this,Wi),...t!=null?{playback:t}:{},...a!=null?{thumbnail:a}:{},...r!=null?{storyboard:r}:{}}}set tokens(t){se(this,Wi,t!=null?t:{})}get playbackToken(){var t;return(t=this.getAttribute(p.PLAYBACK_TOKEN))!=null?t:void 0}set playbackToken(t){this.setAttribute(p.PLAYBACK_TOKEN,`${t}`)}get thumbnailToken(){var t;return(t=this.getAttribute(p.THUMBNAIL_TOKEN))!=null?t:void 0}set thumbnailToken(t){this.setAttribute(p.THUMBNAIL_TOKEN,`${t}`)}get storyboardToken(){var t;return(t=this.getAttribute(p.STORYBOARD_TOKEN))!=null?t:void 0}set storyboardToken(t){this.setAttribute(p.STORYBOARD_TOKEN,`${t}`)}addTextTrack(t,a,r,n){var d;let s=(d=this.media)==null?void 0:d.nativeEl;if(!!s)return(0,P.addTextTrack)(s,t,a,r,n)}removeTextTrack(t){var r;let a=(r=this.media)==null?void 0:r.nativeEl;if(!!a)return(0,P.removeTextTrack)(a,t)}get textTracks(){var t;return(t=this.media)==null?void 0:t.textTracks}};Vi=new WeakMap,Wi=new WeakMap,Ke=new WeakMap,Fi=new WeakMap,Lt=new WeakMap,st=new WeakSet,ii=function(){var t,a,r;if(!k(this,Vi)){se(this,Vi,!0),F(this,lt,ai).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof U.HTMLElement))throw""}catch{ve("<media-theme> failed to upgrade!")}try{if(customElements.upgrade(this.media),!(this.media instanceof g.default))throw""}catch{ve("<mux-video> failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof ln))throw""}catch{ve("<media-controller> failed to upgrade!")}nd(this),F(this,Br,Nd).call(this),F(this,Hr,Ud).call(this),F(this,$r,Pd).call(this),se(this,Ke,(a=(t=this.mediaController)==null?void 0:t.hasAttribute("userinactive"))!=null?a:!0),F(this,Vr,Bd).call(this),(r=this.media)==null||r.addEventListener("streamtypechange",()=>{F(this,lt,ai).call(this)})}},Pr=new WeakSet,Od=function(){var t,a;try{(t=window==null?void 0:window.CSS)==null||t.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{}},Ki=new WeakSet,Fo=function(t){Object.assign(k(this,Lt),t),F(this,lt,ai).call(this)},lt=new WeakSet,ai=function(t={}){Cd(Md(um(this,{...k(this,Lt),...t})),this.shadowRoot)},Br=new WeakSet,Nd=function(){let t=r=>{var d,u;if(!(r!=null&&r.startsWith("theme-")))return;let n=r.replace(/^theme-/,"");if(Wo.includes(n))return;let s=this.getAttribute(r);s!=null?(d=this.mediaTheme)==null||d.setAttribute(n,s):(u=this.mediaTheme)==null||u.removeAttribute(n)};new MutationObserver(r=>{for(let{attributeName:n}of r)t(n)}).observe(this,{attributes:!0}),this.getAttributeNames().forEach(t)},Hr=new WeakSet,Ud=function(){var a;let t=r=>{let{detail:n}=r;if(n instanceof g.MediaError||(n=new g.MediaError(n.message,n.code,n.fatal)),!(n!=null&&n.fatal)){tt(n),n.data&&tt(`${n.name} data:`,n.data);return}let{dialog:s,devlog:d}=Nr(n,!window.navigator.onLine,this.playbackId,this.playbackToken);d.message&&Mo(d),ve(n),n.data&&ve(`${n.name} data:`,n.data),F(this,Ki,Fo).call(this,{isDialogOpen:!0,dialog:s})};this.addEventListener("error",t),this.media&&(this.media.errorTranslator=(r={})=>{var s,d,u;if(!(((s=this.media)==null?void 0:s.error)instanceof g.MediaError))return r;let{devlog:n}=Nr((d=this.media)==null?void 0:d.error,!window.navigator.onLine,this.playbackId,this.playbackToken,!1);return{player_error_code:(u=this.media)==null?void 0:u.error.code,player_error_message:n.message?String(n.message):r.player_error_message,player_error_context:n.context?String(n.context):r.player_error_context}}),(a=this.media)==null||a.addEventListener("error",r=>{var s,d;let{detail:n}=r;if(!n){let{message:u,code:c}=(d=(s=this.media)==null?void 0:s.error)!=null?d:{};n=new g.MediaError(u,c)}!(n!=null&&n.fatal)||this.dispatchEvent(new CustomEvent("error",{detail:n}))})},$r=new WeakSet,Pd=function(){var a,r,n,s;let t=()=>F(this,lt,ai).call(this);(r=(a=this.media)==null?void 0:a.textTracks)==null||r.addEventListener("addtrack",t),(s=(n=this.media)==null?void 0:n.textTracks)==null||s.addEventListener("removetrack",t)},Vr=new WeakSet,Bd=function(){var h,f;let t=/.*Version\/.*Safari\/.*/.test(navigator.userAgent);if(!/Firefox/i.test(navigator.userAgent))return;let r,n=new WeakMap,s=()=>this.streamType===P.StreamTypes.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,d=(v,T,H=!1)=>{if(s())return;Array.from(v&&v.activeCues||[]).forEach(I=>{if(!(!I.snapToLines||I.line<-5||I.line>=0&&I.line<10))if(!T||this.paused){let ae=I.text.split(`
2214
- `).length,ge=t?-2:-3;this.streamType===P.StreamTypes.LIVE&&(ge=t?-1:-2);let oe=ge-ae;if(I.line===oe&&!H)return;n.has(I)||n.set(I,I.line),I.line=oe-1,I.line=oe}else setTimeout(()=>{I.line=n.get(I)||"auto"},500)})},u=()=>{var v,T;d(r,(T=(v=this.mediaController)==null?void 0:v.hasAttribute("userinactive"))!=null?T:!1)},c=()=>{var H,Y;let T=Array.from(((Y=(H=this.mediaController)==null?void 0:H.media)==null?void 0:Y.textTracks)||[]).filter(I=>["subtitles","captions"].includes(I.kind)&&I.mode==="showing")[0];T!==r&&(r==null||r.removeEventListener("cuechange",u)),r=T,r==null||r.addEventListener("cuechange",u),d(r,k(this,Ke))};if(c(),(h=this.textTracks)==null||h.addEventListener("change",c),(f=this.textTracks)==null||f.addEventListener("addtrack",c),navigator.userAgent.includes("Chrome/")){let v=()=>{d(r,k(this,Ke),!0),this.paused||window.requestAnimationFrame(v)};this.addEventListener("playing",()=>{v()})}this.addEventListener("userinactivechange",()=>{var T,H;let v=(H=(T=this.mediaController)==null?void 0:T.hasAttribute("userinactive"))!=null?H:!0;k(this,Ke)!==v&&(se(this,Ke,v),d(r,k(this,Ke)))})};function Mt(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}U.customElements.get("mux-player")||(U.customElements.define("mux-player",$i),U.MuxPlayerElement=$i);var fm=$i;
2215
+ `;var Ho=re.createElement("template");"innerHTML"in Ho&&(Ho.innerHTML=Md);var Ld,Rd,Ur=class extends nt{};Ur.template=(Rd=(Ld=Ho.content)==null?void 0:Ld.children)==null?void 0:Rd[0];U.customElements.get("media-theme-gerwig")||U.customElements.define("media-theme-gerwig",Ur);var lm="gerwig";var Fe={SRC:"src",POSTER:"poster"},p={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",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",TITLE:"title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",NO_VOLUME_PREF:"no-volume-pref"},$o=["audio","backwardseekoffset","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","novolumepref"];function dm(i,e){var a;return{src:!i.playbackId&&i.src,playbackId:i.playbackId,hasSrc:!!i.playbackId||!!i.src,poster:i.poster,storyboard:i.storyboard,storyboardSrc:i.getAttribute(p.STORYBOARD_SRC),placeholder:i.getAttribute("placeholder"),themeTemplate:um(i),thumbnailTime:!i.tokens.thumbnail&&i.thumbnailTime,autoplay:i.autoplay,crossOrigin:i.crossOrigin,loop:i.loop,noHotKeys:i.hasAttribute(p.NOHOTKEYS),hotKeys:i.getAttribute(p.HOTKEYS),muted:i.muted,paused:i.paused,preload:i.preload,envKey:i.envKey,preferCmcd:i.preferCmcd,debug:i.debug,disableCookies:i.disableCookies,tokens:i.tokens,beaconCollectionDomain:i.beaconCollectionDomain,maxResolution:i.maxResolution,minResolution:i.minResolution,renditionOrder:i.renditionOrder,metadata:i.metadata,playerSoftwareName:i.playerSoftwareName,playerSoftwareVersion:i.playerSoftwareVersion,startTime:i.startTime,preferPlayback:i.preferPlayback,audio:i.audio,defaultStreamType:i.defaultStreamType,targetLiveWindow:i.getAttribute(f.Attributes.TARGET_LIVE_WINDOW),streamType:Mi(i.getAttribute(f.Attributes.STREAM_TYPE)),primaryColor:i.primaryColor,secondaryColor:i.secondaryColor,accentColor:i.accentColor,forwardSeekOffset:i.forwardSeekOffset,backwardSeekOffset:i.backwardSeekOffset,defaultHiddenCaptions:i.defaultHiddenCaptions,defaultShowRemainingTime:i.defaultShowRemainingTime,hideDuration:cm(i),playbackRates:i.getAttribute(p.PLAYBACK_RATES),customDomain:(a=i.getAttribute(f.Attributes.CUSTOM_DOMAIN))!=null?a:void 0,title:i.getAttribute(p.TITLE),novolumepref:i.hasAttribute(p.NO_VOLUME_PREF),extraPlaylistParams:{redundant_streams:!0},...e}}function um(i){var t,a;let e=i.theme;if(e){let r=(a=(t=i.getRootNode())==null?void 0:t.getElementById)==null?void 0:a.call(t,e);if(r&&r instanceof HTMLTemplateElement)return r;e.startsWith("media-theme-")||(e=`media-theme-${e}`);let n=U.customElements.get(e);if(n!=null&&n.template)return n.template}}function cm(i){var t;let e=(t=i.mediaController)==null?void 0:t.querySelector("media-time-display");return e&&getComputedStyle(e).getPropertyValue("--media-duration-display-display").trim()==="none"}function xd(i){let e=i.hasAttribute(p.TITLE)?{video_title:i.getAttribute(p.TITLE)}:{};return i.getAttributeNames().filter(t=>t.startsWith("metadata-")).reduce((t,a)=>{let r=i.getAttribute(a);return r!==null&&(t[a.replace(/^metadata-/,"").replace(/-/g,"_")]=r),t},e)}var mm=Object.values(f.Attributes),hm=Object.values(Fe),pm=Object.values(p),bm=kr(),Em="mux-player",wd={dialog:void 0,isDialogOpen:!1},Wi,Fi,Ke,Ki,Lt,st,ii,Pr,Dd,Yi,Wo,lt,ai,Br,Od,Vr,Nd,Hr,Ud,$r,Pd,$i=class extends Lo{constructor(){super();$(this,st);$(this,Pr);$(this,Yi);$(this,lt);$(this,Br);$(this,Vr);$(this,Hr);$(this,$r);$(this,Wi,!1);$(this,Fi,{});$(this,Ke,!0);$(this,Ki,new Ir(this,"hotkeys"));$(this,Lt,{...wd,onCloseErrorDialog:()=>F(this,Yi,Wo).call(this,{dialog:void 0,isDialogOpen:!1}),onInitFocusDialog:t=>{Co(this,re.activeElement)||t.preventDefault()}});this.attachShadow({mode:"open"}),F(this,Pr,Dd).call(this),this.isConnected&&F(this,st,ii).call(this)}static get observedAttributes(){var t;return[...(t=Lo.observedAttributes)!=null?t:[],...hm,...mm,...pm]}get mediaTheme(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("media-theme")}get mediaController(){var t,a;return(a=(t=this.mediaTheme)==null?void 0:t.shadowRoot)==null?void 0:a.querySelector("media-controller")}connectedCallback(){var a;let t=(a=this.shadowRoot)==null?void 0:a.querySelector("mux-video");t&&(t.metadata=xd(this))}attributeChangedCallback(t,a,r){switch(F(this,st,ii).call(this),super.attributeChangedCallback(t,a,r),t){case p.HOTKEYS:k(this,Ki).value=r;break;case p.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&tt(y("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").format({}));break}case p.THUMBNAIL_TOKEN:{let{aud:s}=et(r);r&&s!=="t"&&tt(y("The provided thumbnail-token should have audience value 't' instead of '{aud}'.").format({aud:s}));break}case p.STORYBOARD_TOKEN:{let{aud:s}=et(r);r&&s!=="s"&&tt(y("The provided storyboard-token should have audience value 's' instead of '{aud}'.").format({aud:s}));break}case f.Attributes.PLAYBACK_ID:{r!=null&&r.includes("?token")&&ve(y("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:r}));break}case f.Attributes.STREAM_TYPE:r&&![P.StreamTypes.LIVE,P.StreamTypes.ON_DEMAND,P.StreamTypes.UNKNOWN].includes(r)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=r.includes("dvr")?Number.POSITIVE_INFINITY:0:So({file:"invalid-stream-type.md",message:y("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):this.targetLiveWindow=r===P.StreamTypes.LIVE?0:Number.NaN}[f.Attributes.PLAYBACK_ID,Fe.SRC,p.PLAYBACK_TOKEN].includes(t)&&a!==r&&se(this,Lt,{...k(this,Lt),...wd}),F(this,lt,ai).call(this,{[ed(t)]:r})}get preferCmcd(){var t;return(t=this.getAttribute(f.Attributes.PREFER_CMCD))!=null?t:void 0}set preferCmcd(t){t!==this.preferCmcd&&(t?P.CmcdTypeValues.includes(t)?this.setAttribute(f.Attributes.PREFER_CMCD,t):tt(`Invalid value for preferCmcd. Must be one of ${P.CmcdTypeValues.join()}`):this.removeAttribute(f.Attributes.PREFER_CMCD))}get hasPlayed(){var t,a;return(a=(t=this.mediaController)==null?void 0:t.hasAttribute("media-has-played"))!=null?a:!1}get inLiveWindow(){var t;return(t=this.mediaController)==null?void 0:t.hasAttribute("media-time-is-live")}get _hls(){var t;return(t=this.media)==null?void 0:t._hls}get mux(){var t;return(t=this.media)==null?void 0:t.mux}get theme(){var t;return(t=this.getAttribute(p.THEME))!=null?t:lm}set theme(t){this.setAttribute(p.THEME,`${t}`)}get themeProps(){let t=this.mediaTheme;if(!t)return;let a={};for(let r of t.getAttributeNames()){if($o.includes(r))continue;let n=t.getAttribute(r);a[yr(r)]=n===""?!0:n}return a}set themeProps(t){var r,n;F(this,st,ii).call(this);let a={...this.themeProps,...t};for(let s in a){if($o.includes(s))continue;let d=t==null?void 0:t[s];typeof d=="boolean"||d==null?(r=this.mediaTheme)==null||r.toggleAttribute(_r(s),Boolean(d)):(n=this.mediaTheme)==null||n.setAttribute(_r(s),d)}}get playbackId(){var t;return(t=this.getAttribute(f.Attributes.PLAYBACK_ID))!=null?t:void 0}set playbackId(t){t?this.setAttribute(f.Attributes.PLAYBACK_ID,t):this.removeAttribute(f.Attributes.PLAYBACK_ID)}get src(){var t,a;return this.playbackId?(t=Mt(this,Fe.SRC))!=null?t:void 0:(a=this.getAttribute(Fe.SRC))!=null?a:void 0}set src(t){t?this.setAttribute(Fe.SRC,t):this.removeAttribute(Fe.SRC)}get poster(){var a;let t=this.getAttribute(Fe.POSTER);if(t!=null)return t;if(this.playbackId&&!this.audio)return Jl(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(a=this.thumbnailTime)!=null?a:this.startTime,token:this.tokens.thumbnail})}set poster(t){t||t===""?this.setAttribute(Fe.POSTER,t):this.removeAttribute(Fe.POSTER)}get storyboardSrc(){var t;return(t=this.getAttribute(p.STORYBOARD_SRC))!=null?t:void 0}set storyboardSrc(t){t?this.setAttribute(p.STORYBOARD_SRC,t):this.removeAttribute(p.STORYBOARD_SRC)}get storyboard(){if(this.storyboardSrc&&!this.tokens.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[P.StreamTypes.LIVE,P.StreamTypes.UNKNOWN].includes(this.streamType)))return jl(this.playbackId,{customDomain:this.customDomain,token:this.tokens.storyboard})}get audio(){return this.hasAttribute(p.AUDIO)}set audio(t){if(!t){this.removeAttribute(p.AUDIO);return}this.setAttribute(p.AUDIO,"")}get hotkeys(){return k(this,Ki)}get nohotkeys(){return this.hasAttribute(p.NOHOTKEYS)}set nohotkeys(t){if(!t){this.removeAttribute(p.NOHOTKEYS);return}this.setAttribute(p.NOHOTKEYS,"")}get thumbnailTime(){return Be(this.getAttribute(p.THUMBNAIL_TIME))}set thumbnailTime(t){this.setAttribute(p.THUMBNAIL_TIME,`${t}`)}get title(){var t;return(t=this.getAttribute(p.TITLE))!=null?t:""}set title(t){t!==this.title&&(t?this.setAttribute(p.TITLE,t):this.removeAttribute("title"),super.title=t)}get placeholder(){var t;return(t=Mt(this,p.PLACEHOLDER))!=null?t:""}set placeholder(t){this.setAttribute(p.PLACEHOLDER,`${t}`)}get primaryColor(){var a,r;let t=this.getAttribute(p.PRIMARY_COLOR);if(t!=null||this.mediaTheme&&(t=(r=(a=U.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_primary-color"))==null?void 0:r.trim(),t))return t}set primaryColor(t){this.setAttribute(p.PRIMARY_COLOR,`${t}`)}get secondaryColor(){var a,r;let t=this.getAttribute(p.SECONDARY_COLOR);if(t!=null||this.mediaTheme&&(t=(r=(a=U.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_secondary-color"))==null?void 0:r.trim(),t))return t}set secondaryColor(t){this.setAttribute(p.SECONDARY_COLOR,`${t}`)}get accentColor(){var a,r;let t=this.getAttribute(p.ACCENT_COLOR);if(t!=null||this.mediaTheme&&(t=(r=(a=U.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_accent-color"))==null?void 0:r.trim(),t))return t}set accentColor(t){this.setAttribute(p.ACCENT_COLOR,`${t}`)}get defaultShowRemainingTime(){return this.hasAttribute(p.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(t){t?this.setAttribute(p.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(p.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(!!this.hasAttribute(p.PLAYBACK_RATES))return this.getAttribute(p.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(t=>Number(t)).filter(t=>!Number.isNaN(t)).sort((t,a)=>t-a)}set playbackRates(t){if(!t){this.removeAttribute(p.PLAYBACK_RATES);return}this.setAttribute(p.PLAYBACK_RATES,t.join(" "))}get forwardSeekOffset(){var t;return(t=Be(this.getAttribute(p.FORWARD_SEEK_OFFSET)))!=null?t:10}set forwardSeekOffset(t){this.setAttribute(p.FORWARD_SEEK_OFFSET,`${t}`)}get backwardSeekOffset(){var t;return(t=Be(this.getAttribute(p.BACKWARD_SEEK_OFFSET)))!=null?t:10}set backwardSeekOffset(t){this.setAttribute(p.BACKWARD_SEEK_OFFSET,`${t}`)}get defaultHiddenCaptions(){return this.hasAttribute(p.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(t){t?this.setAttribute(p.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(p.DEFAULT_HIDDEN_CAPTIONS)}get playerSoftwareName(){var t;return(t=this.getAttribute(f.Attributes.PLAYER_SOFTWARE_NAME))!=null?t:Em}get playerSoftwareVersion(){var t;return(t=this.getAttribute(f.Attributes.PLAYER_SOFTWARE_VERSION))!=null?t:bm}get beaconCollectionDomain(){var t;return(t=this.getAttribute(f.Attributes.BEACON_COLLECTION_DOMAIN))!=null?t:void 0}set beaconCollectionDomain(t){t!==this.beaconCollectionDomain&&(t?this.setAttribute(f.Attributes.BEACON_COLLECTION_DOMAIN,t):this.removeAttribute(f.Attributes.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var t;return(t=this.getAttribute(f.Attributes.MAX_RESOLUTION))!=null?t:void 0}set maxResolution(t){t!==this.maxResolution&&(t?this.setAttribute(f.Attributes.MAX_RESOLUTION,t):this.removeAttribute(f.Attributes.MAX_RESOLUTION))}get minResolution(){var t;return(t=this.getAttribute(f.Attributes.MIN_RESOLUTION))!=null?t:void 0}set minResolution(t){t!==this.minResolution&&(t?this.setAttribute(f.Attributes.MIN_RESOLUTION,t):this.removeAttribute(f.Attributes.MIN_RESOLUTION))}get renditionOrder(){var t;return(t=this.getAttribute(f.Attributes.RENDITION_ORDER))!=null?t:void 0}set renditionOrder(t){t!==this.renditionOrder&&(t?this.setAttribute(f.Attributes.RENDITION_ORDER,t):this.removeAttribute(f.Attributes.RENDITION_ORDER))}get customDomain(){var t;return(t=this.getAttribute(f.Attributes.CUSTOM_DOMAIN))!=null?t:void 0}set customDomain(t){t!==this.customDomain&&(t?this.setAttribute(f.Attributes.CUSTOM_DOMAIN,t):this.removeAttribute(f.Attributes.CUSTOM_DOMAIN))}get envKey(){var t;return(t=Mt(this,f.Attributes.ENV_KEY))!=null?t:void 0}set envKey(t){this.setAttribute(f.Attributes.ENV_KEY,`${t}`)}get noVolumePref(){return this.hasAttribute(p.NO_VOLUME_PREF)}set noVolumePref(t){t?this.setAttribute(p.NO_VOLUME_PREF,""):this.removeAttribute(p.NO_VOLUME_PREF)}get debug(){return Mt(this,f.Attributes.DEBUG)!=null}set debug(t){t?this.setAttribute(f.Attributes.DEBUG,""):this.removeAttribute(f.Attributes.DEBUG)}get disableCookies(){return Mt(this,f.Attributes.DISABLE_COOKIES)!=null}set disableCookies(t){t?this.setAttribute(f.Attributes.DISABLE_COOKIES,""):this.removeAttribute(f.Attributes.DISABLE_COOKIES)}get streamType(){var t,a,r;return(r=(a=this.getAttribute(f.Attributes.STREAM_TYPE))!=null?a:(t=this.media)==null?void 0:t.streamType)!=null?r:P.StreamTypes.UNKNOWN}set streamType(t){this.setAttribute(f.Attributes.STREAM_TYPE,`${t}`)}get defaultStreamType(){var t,a,r;return(r=(a=this.getAttribute(p.DEFAULT_STREAM_TYPE))!=null?a:(t=this.mediaController)==null?void 0:t.getAttribute(p.DEFAULT_STREAM_TYPE))!=null?r:P.StreamTypes.ON_DEMAND}set defaultStreamType(t){t?this.setAttribute(p.DEFAULT_STREAM_TYPE,t):this.removeAttribute(p.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var t,a;return this.hasAttribute(p.TARGET_LIVE_WINDOW)?+this.getAttribute(p.TARGET_LIVE_WINDOW):(a=(t=this.media)==null?void 0:t.targetLiveWindow)!=null?a:Number.NaN}set targetLiveWindow(t){t!=this.targetLiveWindow&&(t==null?this.removeAttribute(p.TARGET_LIVE_WINDOW):this.setAttribute(p.TARGET_LIVE_WINDOW,`${+t}`))}get liveEdgeStart(){var t;return(t=this.media)==null?void 0:t.liveEdgeStart}get startTime(){return Be(Mt(this,f.Attributes.START_TIME))}set startTime(t){this.setAttribute(f.Attributes.START_TIME,`${t}`)}get preferPlayback(){let t=this.getAttribute(f.Attributes.PREFER_PLAYBACK);if(t===P.PlaybackTypes.MSE||t===P.PlaybackTypes.NATIVE)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===P.PlaybackTypes.MSE||t===P.PlaybackTypes.NATIVE?this.setAttribute(f.Attributes.PREFER_PLAYBACK,t):this.removeAttribute(f.Attributes.PREFER_PLAYBACK))}get metadata(){var t;return(t=this.media)==null?void 0:t.metadata}set metadata(t){if(F(this,st,ii).call(this),!this.media){ve("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...xd(this),...t}}async addCuePoints(t){var a;if(F(this,st,ii).call(this),!this.media){ve("underlying media element missing when trying to addCuePoints. cuePoints will not be added.");return}return(a=this.media)==null?void 0:a.addCuePoints(t)}get activeCuePoint(){var t;return(t=this.media)==null?void 0:t.activeCuePoint}get cuePoints(){var t,a;return(a=(t=this.media)==null?void 0:t.cuePoints)!=null?a:[]}getStartDate(){var t;return(t=this.media)==null?void 0:t.getStartDate()}get currentPdt(){var t;return(t=this.media)==null?void 0:t.currentPdt}get tokens(){let t=this.getAttribute(p.PLAYBACK_TOKEN),a=this.getAttribute(p.THUMBNAIL_TOKEN),r=this.getAttribute(p.STORYBOARD_TOKEN);return{...k(this,Fi),...t!=null?{playback:t}:{},...a!=null?{thumbnail:a}:{},...r!=null?{storyboard:r}:{}}}set tokens(t){se(this,Fi,t!=null?t:{})}get playbackToken(){var t;return(t=this.getAttribute(p.PLAYBACK_TOKEN))!=null?t:void 0}set playbackToken(t){this.setAttribute(p.PLAYBACK_TOKEN,`${t}`)}get thumbnailToken(){var t;return(t=this.getAttribute(p.THUMBNAIL_TOKEN))!=null?t:void 0}set thumbnailToken(t){this.setAttribute(p.THUMBNAIL_TOKEN,`${t}`)}get storyboardToken(){var t;return(t=this.getAttribute(p.STORYBOARD_TOKEN))!=null?t:void 0}set storyboardToken(t){this.setAttribute(p.STORYBOARD_TOKEN,`${t}`)}addTextTrack(t,a,r,n){var d;let s=(d=this.media)==null?void 0:d.nativeEl;if(!!s)return(0,P.addTextTrack)(s,t,a,r,n)}removeTextTrack(t){var r;let a=(r=this.media)==null?void 0:r.nativeEl;if(!!a)return(0,P.removeTextTrack)(a,t)}get textTracks(){var t;return(t=this.media)==null?void 0:t.textTracks}};Wi=new WeakMap,Fi=new WeakMap,Ke=new WeakMap,Ki=new WeakMap,Lt=new WeakMap,st=new WeakSet,ii=function(){var t,a,r;if(!k(this,Wi)){se(this,Wi,!0),F(this,lt,ai).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof U.HTMLElement))throw""}catch{ve("<media-theme> failed to upgrade!")}try{if(customElements.upgrade(this.media),!(this.media instanceof f.default))throw""}catch{ve("<mux-video> failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof ln))throw""}catch{ve("<media-controller> failed to upgrade!")}nd(this),F(this,Br,Od).call(this),F(this,Vr,Nd).call(this),F(this,Hr,Ud).call(this),se(this,Ke,(a=(t=this.mediaController)==null?void 0:t.hasAttribute("userinactive"))!=null?a:!0),F(this,$r,Pd).call(this),(r=this.media)==null||r.addEventListener("streamtypechange",()=>{F(this,lt,ai).call(this)})}},Pr=new WeakSet,Dd=function(){var t,a;try{(t=window==null?void 0:window.CSS)==null||t.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{}},Yi=new WeakSet,Wo=function(t){Object.assign(k(this,Lt),t),F(this,lt,ai).call(this)},lt=new WeakSet,ai=function(t={}){Cd(Sd(dm(this,{...k(this,Lt),...t})),this.shadowRoot)},Br=new WeakSet,Od=function(){let t=r=>{var d,u;if(!(r!=null&&r.startsWith("theme-")))return;let n=r.replace(/^theme-/,"");if($o.includes(n))return;let s=this.getAttribute(r);s!=null?(d=this.mediaTheme)==null||d.setAttribute(n,s):(u=this.mediaTheme)==null||u.removeAttribute(n)};new MutationObserver(r=>{for(let{attributeName:n}of r)t(n)}).observe(this,{attributes:!0}),this.getAttributeNames().forEach(t)},Vr=new WeakSet,Nd=function(){var a;let t=r=>{let{detail:n}=r;if(n instanceof f.MediaError||(n=new f.MediaError(n.message,n.code,n.fatal)),!(n!=null&&n.fatal)){tt(n),n.data&&tt(`${n.name} data:`,n.data);return}let{dialog:s,devlog:d}=Nr(n,!window.navigator.onLine,this.playbackId,this.playbackToken);d.message&&So(d),ve(n),n.data&&ve(`${n.name} data:`,n.data),F(this,Yi,Wo).call(this,{isDialogOpen:!0,dialog:s})};this.addEventListener("error",t),this.media&&(this.media.errorTranslator=(r={})=>{var s,d,u;if(!(((s=this.media)==null?void 0:s.error)instanceof f.MediaError))return r;let{devlog:n}=Nr((d=this.media)==null?void 0:d.error,!window.navigator.onLine,this.playbackId,this.playbackToken,!1);return{player_error_code:(u=this.media)==null?void 0:u.error.code,player_error_message:n.message?String(n.message):r.player_error_message,player_error_context:n.context?String(n.context):r.player_error_context}}),(a=this.media)==null||a.addEventListener("error",r=>{var s,d;let{detail:n}=r;if(!n){let{message:u,code:c}=(d=(s=this.media)==null?void 0:s.error)!=null?d:{};n=new f.MediaError(u,c)}!(n!=null&&n.fatal)||this.dispatchEvent(new CustomEvent("error",{detail:n}))})},Hr=new WeakSet,Ud=function(){var a,r,n,s;let t=()=>F(this,lt,ai).call(this);(r=(a=this.media)==null?void 0:a.textTracks)==null||r.addEventListener("addtrack",t),(s=(n=this.media)==null?void 0:n.textTracks)==null||s.addEventListener("removetrack",t)},$r=new WeakSet,Pd=function(){var h,g;let t=/.*Version\/.*Safari\/.*/.test(navigator.userAgent);if(!/Firefox/i.test(navigator.userAgent))return;let r,n=new WeakMap,s=()=>this.streamType===P.StreamTypes.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,d=(v,T,V=!1)=>{if(s())return;Array.from(v&&v.activeCues||[]).forEach(I=>{if(!(!I.snapToLines||I.line<-5||I.line>=0&&I.line<10))if(!T||this.paused){let ae=I.text.split(`
2216
+ `).length,ge=t?-2:-3;this.streamType===P.StreamTypes.LIVE&&(ge=t?-1:-2);let oe=ge-ae;if(I.line===oe&&!V)return;n.has(I)||n.set(I,I.line),I.line=oe-1,I.line=oe}else setTimeout(()=>{I.line=n.get(I)||"auto"},500)})},u=()=>{var v,T;d(r,(T=(v=this.mediaController)==null?void 0:v.hasAttribute("userinactive"))!=null?T:!1)},c=()=>{var V,Y;let T=Array.from(((Y=(V=this.mediaController)==null?void 0:V.media)==null?void 0:Y.textTracks)||[]).filter(I=>["subtitles","captions"].includes(I.kind)&&I.mode==="showing")[0];T!==r&&(r==null||r.removeEventListener("cuechange",u)),r=T,r==null||r.addEventListener("cuechange",u),d(r,k(this,Ke))};if(c(),(h=this.textTracks)==null||h.addEventListener("change",c),(g=this.textTracks)==null||g.addEventListener("addtrack",c),navigator.userAgent.includes("Chrome/")){let v=()=>{d(r,k(this,Ke),!0),this.paused||window.requestAnimationFrame(v)};this.addEventListener("playing",()=>{v()})}this.addEventListener("userinactivechange",()=>{var T,V;let v=(V=(T=this.mediaController)==null?void 0:T.hasAttribute("userinactive"))!=null?V:!0;k(this,Ke)!==v&&(se(this,Ke,v),d(r,k(this,Ke)))})};function Mt(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}U.customElements.get("mux-player")||(U.customElements.define("mux-player",$i),U.MuxPlayerElement=$i);var vm=$i;