@mux/mux-player 3.12.0 → 3.12.1-canary.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/base.cjs.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";var Xs=Object.defineProperty;var Hh=Object.getOwnPropertyDescriptor;var Bh=Object.getOwnPropertyNames;var $h=Object.prototype.hasOwnProperty;var Lu=t=>{throw TypeError(t)};var Wh=(t,e)=>{for(var i in e)Xs(t,i,{get:e[i],enumerable:!0})},Fh=(t,e,i,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Bh(e))!$h.call(t,r)&&r!==i&&Xs(t,r,{get:()=>e[r],enumerable:!(a=Hh(e,r))||a.enumerable});return t};var Vh=t=>Fh(Xs({},"__esModule",{value:!0}),t);var Js=(t,e,i)=>e.has(t)||Lu("Cannot "+i);var R=(t,e,i)=>(Js(t,e,"read from private field"),i?i.call(t):e.get(t)),ae=(t,e,i)=>e.has(t)?Lu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),de=(t,e,i,a)=>(Js(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),J=(t,e,i)=>(Js(t,e,"access private method"),i);var GE={};Wh(GE,{MediaError:()=>b.MediaError,default:()=>KE,generatePlayerInitTime:()=>O.generatePlayerInitTime,getVideoAttribute:()=>ri,playerSoftwareName:()=>hu,playerSoftwareVersion:()=>mu});module.exports=Vh(GE);var Bi=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class t extends Bi{}globalThis.DocumentFragment=t}var ar=class extends Bi{},js=class extends Bi{},Kh={get(t){},define(t,e,i){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(ar)}},rr,el=class{constructor(e,i={}){ae(this,rr);de(this,rr,i==null?void 0:i.detail)}get detail(){return R(this,rr)}initCustomEvent(){}};rr=new WeakMap;function Gh(t,e){return new ar}var Cu={document:{createElement:Gh},DocumentFragment,customElements:Kh,CustomEvent:el,EventTarget:Bi,HTMLElement:ar,HTMLVideoElement:js},wu=typeof window=="undefined"||typeof globalThis.customElements=="undefined",Se=wu?Cu:globalThis,ni=wu?Cu.document:globalThis.document;var h={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_LOOP_REQUEST:"medialooprequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_TOGGLE_SUBTITLES_REQUEST:"mediatogglesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_AUDIO_TRACK_REQUEST:"mediaaudiotrackrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},D={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},tl={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_BUFFERED:"mediaBuffered",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_CHAPTERS_CUES:"mediaChaptersCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_HEIGHT:"mediaHeight",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_IS_PIP:"mediaIsPip",MEDIA_LOADING:"mediaLoading",MEDIA_MUTED:"mediaMuted",MEDIA_LOOP:"mediaLoop",MEDIA_PAUSED:"mediaPaused",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_LANG:"mediaLang",MEDIA_WIDTH:"mediaWidth"},Ru=Object.entries(tl),n=Ru.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{}),Yh={USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"},Ie=Ru.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{...Yh}),QE=Object.entries(Ie).reduce((t,[e,i])=>{let a=n[e];return a&&(t[i]=a),t},{userinactivechange:"userinactive"}),xu=Object.entries(n).reduce((t,[e,i])=>{let a=Ie[e];return a&&(t[i]=a),t},{userinactive:"userinactivechange"}),_e={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},Ht={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var Mo={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},Ae={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},Be={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"};var Du={INLINE:"inline",FULLSCREEN:"fullscreen",PICTURE_IN_PICTURE:"picture-in-picture"};function Ou(t){return t==null?void 0:t.map(Zh).join(" ")}function Pu(t){return t==null?void 0:t.split(/\s+/).map(zh)}function Zh(t){if(t){let{id:e,width:i,height:a}=t;return[e,i,a].filter(r=>r!=null).join(":")}}function zh(t){if(t){let[e,i,a]=t.split(":");return{id:e,width:+i,height:+a}}}function Nu(t){return t==null?void 0:t.map(Qh).join(" ")}function Uu(t){return t==null?void 0:t.split(/\s+/).map(Xh)}function Qh(t){if(t){let{id:e,kind:i,language:a,label:r}=t;return[e,i,a,r].filter(o=>o!=null).join(":")}}function Xh(t){if(t){let[e,i,a,r]=t.split(":");return{id:e,kind:i,language:a,label:r}}}function Hu(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function $i(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}function Lo(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))}var Co=t=>new Promise(e=>setTimeout(e,t));var Bu={"Start airplay":"Start airplay","Stop airplay":"Stop airplay",Audio:"Audio",Captions:"Captions","Enable captions":"Enable captions","Disable captions":"Disable captions","Start casting":"Start casting","Stop casting":"Stop casting","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",Mute:"Mute",Unmute:"Unmute",Loop:"Loop","Enter picture in picture mode":"Enter picture in picture mode","Exit picture in picture mode":"Exit picture in picture mode",Play:"Play",Pause:"Pause","Playback rate":"Playback rate","Playback rate {playbackRate}":"Playback rate {playbackRate}",Quality:"Quality","Seek backward":"Seek backward","Seek forward":"Seek forward",Settings:"Settings",Auto:"Auto","audio player":"audio player","video player":"video player",volume:"volume",seek:"seek","closed captions":"closed captions","current playback rate":"current playback rate","playback time":"playback time","media loading":"media loading",settings:"settings","audio tracks":"audio tracks",quality:"quality",play:"play",pause:"pause",mute:"mute",unmute:"unmute","chapter: {chapterName}":"chapter: {chapterName}",live:"live",Off:"Off","start airplay":"start airplay","stop airplay":"stop airplay","start casting":"start casting","stop casting":"stop casting","enter fullscreen mode":"enter fullscreen mode","exit fullscreen mode":"exit fullscreen mode","enter picture in picture mode":"enter picture in picture mode","exit picture in picture mode":"exit picture in picture mode","seek to live":"seek to live","playing live":"playing live","seek back {seekOffset} seconds":"seek back {seekOffset} seconds","seek forward {seekOffset} seconds":"seek forward {seekOffset} seconds","Network Error":"Network Error","Decode Error":"Decode Error","Source Not Supported":"Source Not Supported","Encryption Error":"Encryption Error","A network error caused the media download to fail.":"A network error caused the media download to fail.","A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.":"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.","An unsupported error occurred. The server or network failed, or your browser does not support this format.":"An unsupported error occurred. The server or network failed, or your browser does not support this format.","The media is encrypted and there are no keys to decrypt it.":"The media is encrypted and there are no keys to decrypt it.",hour:"hour",hours:"hours",minute:"minute",minutes:"minutes",second:"second",seconds:"seconds","{time} remaining":"{time} remaining","{currentTime} of {totalTime}":"{currentTime} of {totalTime}","video not loaded, unknown time.":"video not loaded, unknown time."};var $u,il={en:Bu},al=(($u=globalThis.navigator)==null?void 0:$u.language)||"en",Wu=t=>{al=t};var Jh=t=>{var e,i,a;let[r]=al.split("-");return((e=il[al])==null?void 0:e[t])||((i=il[r])==null?void 0:i[t])||((a=il.en)==null?void 0:a[t])||t},c=(t,e={})=>Jh(t).replace(/\{(\w+)\}/g,(i,a)=>a in e?String(e[a]):`{${a}}`);var Fu=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],jh=(t,e)=>{let i=t===1?c(Fu[e].singular):c(Fu[e].plural);return`${t} ${i}`},si=t=>{if(!$i(t))return"";let e=Math.abs(t),i=e!==t,a=new Date(0,0,0,0,0,e,0),o=[a.getHours(),a.getMinutes(),a.getSeconds()].map((s,d)=>s&&jh(s,d)).filter(s=>s).join(", ");return i?c("{time} remaining",{time:o}):o};function $e(t,e){let i=!1;t<0&&(i=!0,t=0-t),t=t<0?0:t;let a=Math.floor(t%60),r=Math.floor(t/60%60),o=Math.floor(t/3600),s=Math.floor(e/60%60),d=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(o=r=a="0"),o=o>0||d>0?o+":":"",r=((o||s>=10)&&r<10?"0"+r:r)+":",a=a<10?"0"+a:a,(i?"-":"")+o+r+a}var ab=Object.freeze({length:0,start(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}});var wo=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}},Ro=class extends wo{},xo=class extends Ro{constructor(){super(...arguments),this.role=null}},rl=class{observe(){}unobserve(){}disconnect(){}},Vu={createElement:function(){return new or.HTMLElement},createElementNS:function(){return new or.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent(t){return!1}},or={ResizeObserver:rl,document:Vu,Node:Ro,Element:xo,HTMLElement:class extends xo{constructor(){super(...arguments),this.innerHTML=""}get content(){return new or.DocumentFragment}},DocumentFragment:class extends wo{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem(t){return null},setItem(t,e){},removeItem(t){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia(t){return{matches:!1,media:t}},DOMParser:class{parseFromString(e,i){return{body:{textContent:e}}}}},Ku="global"in globalThis&&(globalThis==null?void 0:globalThis.global)===globalThis||typeof window=="undefined"||typeof window.customElements=="undefined",Gu=Object.keys(or).every(t=>t in globalThis),l=Ku&&!Gu?or:globalThis,V=Ku&&!Gu?Vu:globalThis.document;var Yu=new WeakMap,ol=t=>{let e=Yu.get(t);return e||Yu.set(t,e=new Set),e},qu=new l.ResizeObserver(t=>{for(let e of t)for(let i of ol(e.target))i(e)});function At(t,e){ol(t).add(e),qu.observe(t)}function Tt(t,e){let i=ol(t);i.delete(e),i.size||qu.unobserve(t)}function Z(t){let e={};for(let i of t)e[i.name]=i.value;return e}function Y(t){var e;return(e=Do(t))!=null?e:Xe(t,"media-controller")}function Do(t){var e;let{MEDIA_CONTROLLER:i}=D,a=t.getAttribute(i);if(a)return(e=li(t))==null?void 0:e.getElementById(a)}var Oo=(t,e,i=".value")=>{let a=t.querySelector(i);a&&(a.textContent=e)},tp=(t,e)=>{let i=`slot[name="${e}"]`,a=t.shadowRoot.querySelector(i);return a?a.children:[]},Po=(t,e)=>tp(t,e)[0],he=(t,e)=>!t||!e?!1:t!=null&&t.contains(e)?!0:he(t,e.getRootNode().host),Xe=(t,e)=>{if(!t)return null;let i=t.closest(e);return i||Xe(t.getRootNode().host,e)};function nr(t=document){var e;let i=t==null?void 0:t.activeElement;return i?(e=nr(i.shadowRoot))!=null?e:i:null}function li(t){var e;let i=(e=t==null?void 0:t.getRootNode)==null?void 0:e.call(t);return i instanceof ShadowRoot||i instanceof Document?i:null}function No(t,{depth:e=3,checkOpacity:i=!0,checkVisibilityCSS:a=!0}={}){if(t.checkVisibility)return t.checkVisibility({checkOpacity:i,checkVisibilityCSS:a});let r=t;for(;r&&e>0;){let o=getComputedStyle(r);if(i&&o.opacity==="0"||a&&o.visibility==="hidden"||o.display==="none")return!1;r=r.parentElement,e--}return!0}function Zu(t,e,i,a){let r=a.x-i.x,o=a.y-i.y,s=r*r+o*o;if(s===0)return 0;let d=((t-i.x)*r+(e-i.y)*o)/s;return Math.max(0,Math.min(1,d))}function q(t,e){let i=ip(t,a=>a===e);return i||sr(t,e)}function ip(t,e){var i,a;let r;for(r of(i=t.querySelectorAll("style:not([media])"))!=null?i:[]){let o;try{o=(a=r.sheet)==null?void 0:a.cssRules}catch{continue}for(let s of o!=null?o:[])if(e(s.selectorText))return s}}function sr(t,e){var i,a;let r=(i=t.querySelectorAll("style:not([media])"))!=null?i:[],o=r==null?void 0:r[r.length-1];if(!(o!=null&&o.sheet))return console.warn("Media Chrome: No style sheet found on style tag of",t),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}};let s=o==null?void 0:o.sheet.insertRule(`${e}{}`,o.sheet.cssRules.length);return(a=o.sheet.cssRules)==null?void 0:a[s]}function P(t,e,i=Number.NaN){let a=t.getAttribute(e);return a!=null?+a:i}function U(t,e,i){let a=+i;if(i==null||Number.isNaN(a)){t.hasAttribute(e)&&t.removeAttribute(e);return}P(t,e,void 0)!==a&&t.setAttribute(e,`${a}`)}function M(t,e){return t.hasAttribute(e)}function L(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}M(t,e)!=i&&t.toggleAttribute(e,i)}function x(t,e,i=null){var a;return(a=t.getAttribute(e))!=null?a:i}function w(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}let a=`${i}`;x(t,e,void 0)!==a&&t.setAttribute(e,a)}var zu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},We=(t,e,i)=>(zu(t,e,"read from private field"),i?i.call(t):e.get(t)),ap=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Uo=(t,e,i,a)=>(zu(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),ue;function rp(t){return`
1
+ "use strict";var Xs=Object.defineProperty;var Hh=Object.getOwnPropertyDescriptor;var Bh=Object.getOwnPropertyNames;var $h=Object.prototype.hasOwnProperty;var Lu=t=>{throw TypeError(t)};var Wh=(t,e)=>{for(var i in e)Xs(t,i,{get:e[i],enumerable:!0})},Fh=(t,e,i,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Bh(e))!$h.call(t,r)&&r!==i&&Xs(t,r,{get:()=>e[r],enumerable:!(a=Hh(e,r))||a.enumerable});return t};var Vh=t=>Fh(Xs({},"__esModule",{value:!0}),t);var Js=(t,e,i)=>e.has(t)||Lu("Cannot "+i);var R=(t,e,i)=>(Js(t,e,"read from private field"),i?i.call(t):e.get(t)),ae=(t,e,i)=>e.has(t)?Lu("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),ue=(t,e,i,a)=>(Js(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),J=(t,e,i)=>(Js(t,e,"access private method"),i);var GE={};Wh(GE,{MediaError:()=>b.MediaError,default:()=>KE,generatePlayerInitTime:()=>O.generatePlayerInitTime,getVideoAttribute:()=>Qe,playerSoftwareName:()=>hu,playerSoftwareVersion:()=>mu});module.exports=Vh(GE);var Bi=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment=="undefined"){class t extends Bi{}globalThis.DocumentFragment=t}var ar=class extends Bi{},js=class extends Bi{},Kh={get(t){},define(t,e,i){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(ar)}},rr,el=class{constructor(e,i={}){ae(this,rr);ue(this,rr,i==null?void 0:i.detail)}get detail(){return R(this,rr)}initCustomEvent(){}};rr=new WeakMap;function Gh(t,e){return new ar}var Cu={document:{createElement:Gh},DocumentFragment,customElements:Kh,CustomEvent:el,EventTarget:Bi,HTMLElement:ar,HTMLVideoElement:js},wu=typeof window=="undefined"||typeof globalThis.customElements=="undefined",Se=wu?Cu:globalThis,oi=wu?Cu.document:globalThis.document;var h={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_LOOP_REQUEST:"medialooprequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_TOGGLE_SUBTITLES_REQUEST:"mediatogglesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_AUDIO_TRACK_REQUEST:"mediaaudiotrackrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},D={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},tl={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_BUFFERED:"mediaBuffered",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_CHAPTERS_CUES:"mediaChaptersCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_HEIGHT:"mediaHeight",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_IS_PIP:"mediaIsPip",MEDIA_LOADING:"mediaLoading",MEDIA_MUTED:"mediaMuted",MEDIA_LOOP:"mediaLoop",MEDIA_PAUSED:"mediaPaused",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_LANG:"mediaLang",MEDIA_WIDTH:"mediaWidth"},Ru=Object.entries(tl),o=Ru.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{}),Yh={USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"},Ie=Ru.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{...Yh}),QE=Object.entries(Ie).reduce((t,[e,i])=>{let a=o[e];return a&&(t[i]=a),t},{userinactivechange:"userinactive"}),xu=Object.entries(o).reduce((t,[e,i])=>{let a=Ie[e];return a&&(t[i]=a),t},{userinactive:"userinactivechange"}),_e={SUBTITLES:"subtitles",CAPTIONS:"captions",DESCRIPTIONS:"descriptions",CHAPTERS:"chapters",METADATA:"metadata"},Bt={DISABLED:"disabled",HIDDEN:"hidden",SHOWING:"showing"};var Mn={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},Ae={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},Be={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"};var Du={INLINE:"inline",FULLSCREEN:"fullscreen",PICTURE_IN_PICTURE:"picture-in-picture"};function Ou(t){return t==null?void 0:t.map(Zh).join(" ")}function Nu(t){return t==null?void 0:t.split(/\s+/).map(zh)}function Zh(t){if(t){let{id:e,width:i,height:a}=t;return[e,i,a].filter(r=>r!=null).join(":")}}function zh(t){if(t){let[e,i,a]=t.split(":");return{id:e,width:+i,height:+a}}}function Pu(t){return t==null?void 0:t.map(Qh).join(" ")}function Uu(t){return t==null?void 0:t.split(/\s+/).map(Xh)}function Qh(t){if(t){let{id:e,kind:i,language:a,label:r}=t;return[e,i,a,r].filter(n=>n!=null).join(":")}}function Xh(t){if(t){let[e,i,a,r]=t.split(":");return{id:e,kind:i,language:a,label:r}}}function Hu(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function $i(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}function Ln(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))}var Cn=t=>new Promise(e=>setTimeout(e,t));var Bu={"Start airplay":"Start airplay","Stop airplay":"Stop airplay",Audio:"Audio",Captions:"Captions","Enable captions":"Enable captions","Disable captions":"Disable captions","Start casting":"Start casting","Stop casting":"Stop casting","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",Mute:"Mute",Unmute:"Unmute",Loop:"Loop","Enter picture in picture mode":"Enter picture in picture mode","Exit picture in picture mode":"Exit picture in picture mode",Play:"Play",Pause:"Pause","Playback rate":"Playback rate","Playback rate {playbackRate}":"Playback rate {playbackRate}",Quality:"Quality","Seek backward":"Seek backward","Seek forward":"Seek forward",Settings:"Settings",Auto:"Auto","audio player":"audio player","video player":"video player",volume:"volume",seek:"seek","closed captions":"closed captions","current playback rate":"current playback rate","playback time":"playback time","media loading":"media loading",settings:"settings","audio tracks":"audio tracks",quality:"quality",play:"play",pause:"pause",mute:"mute",unmute:"unmute","chapter: {chapterName}":"chapter: {chapterName}",live:"live",Off:"Off","start airplay":"start airplay","stop airplay":"stop airplay","start casting":"start casting","stop casting":"stop casting","enter fullscreen mode":"enter fullscreen mode","exit fullscreen mode":"exit fullscreen mode","enter picture in picture mode":"enter picture in picture mode","exit picture in picture mode":"exit picture in picture mode","seek to live":"seek to live","playing live":"playing live","seek back {seekOffset} seconds":"seek back {seekOffset} seconds","seek forward {seekOffset} seconds":"seek forward {seekOffset} seconds","Network Error":"Network Error","Decode Error":"Decode Error","Source Not Supported":"Source Not Supported","Encryption Error":"Encryption Error","A network error caused the media download to fail.":"A network error caused the media download to fail.","A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.":"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.","An unsupported error occurred. The server or network failed, or your browser does not support this format.":"An unsupported error occurred. The server or network failed, or your browser does not support this format.","The media is encrypted and there are no keys to decrypt it.":"The media is encrypted and there are no keys to decrypt it.",hour:"hour",hours:"hours",minute:"minute",minutes:"minutes",second:"second",seconds:"seconds","{time} remaining":"{time} remaining","{currentTime} of {totalTime}":"{currentTime} of {totalTime}","video not loaded, unknown time.":"video not loaded, unknown time."};var $u,il={en:Bu},al=(($u=globalThis.navigator)==null?void 0:$u.language)||"en",Wu=t=>{al=t};var Jh=t=>{var e,i,a;let[r]=al.split("-");return((e=il[al])==null?void 0:e[t])||((i=il[r])==null?void 0:i[t])||((a=il.en)==null?void 0:a[t])||t},c=(t,e={})=>Jh(t).replace(/\{(\w+)\}/g,(i,a)=>a in e?String(e[a]):`{${a}}`);var Fu=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],jh=(t,e)=>{let i=t===1?c(Fu[e].singular):c(Fu[e].plural);return`${t} ${i}`},si=t=>{if(!$i(t))return"";let e=Math.abs(t),i=e!==t,a=new Date(0,0,0,0,0,e,0),n=[a.getHours(),a.getMinutes(),a.getSeconds()].map((s,d)=>s&&jh(s,d)).filter(s=>s).join(", ");return i?c("{time} remaining",{time:n}):n};function $e(t,e){let i=!1;t<0&&(i=!0,t=0-t),t=t<0?0:t;let a=Math.floor(t%60),r=Math.floor(t/60%60),n=Math.floor(t/3600),s=Math.floor(e/60%60),d=Math.floor(e/3600);return(isNaN(t)||t===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,(i?"-":"")+n+r+a}var ab=Object.freeze({length:0,start(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}});var wn=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}},Rn=class extends wn{},xn=class extends Rn{constructor(){super(...arguments),this.role=null}},rl=class{observe(){}unobserve(){}disconnect(){}},Vu={createElement:function(){return new nr.HTMLElement},createElementNS:function(){return new nr.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent(t){return!1}},nr={ResizeObserver:rl,document:Vu,Node:Rn,Element:xn,HTMLElement:class extends xn{constructor(){super(...arguments),this.innerHTML=""}get content(){return new nr.DocumentFragment}},DocumentFragment:class extends wn{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem(t){return null},setItem(t,e){},removeItem(t){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia(t){return{matches:!1,media:t}},DOMParser:class{parseFromString(e,i){return{body:{textContent:e}}}}},Ku="global"in globalThis&&(globalThis==null?void 0:globalThis.global)===globalThis||typeof window=="undefined"||typeof window.customElements=="undefined",Gu=Object.keys(nr).every(t=>t in globalThis),l=Ku&&!Gu?nr:globalThis,V=Ku&&!Gu?Vu:globalThis.document;var Yu=new WeakMap,nl=t=>{let e=Yu.get(t);return e||Yu.set(t,e=new Set),e},qu=new l.ResizeObserver(t=>{for(let e of t)for(let i of nl(e.target))i(e)});function Tt(t,e){nl(t).add(e),qu.observe(t)}function yt(t,e){let i=nl(t);i.delete(e),i.size||qu.unobserve(t)}function Z(t){let e={};for(let i of t)e[i.name]=i.value;return e}function Y(t){var e;return(e=Dn(t))!=null?e:Je(t,"media-controller")}function Dn(t){var e;let{MEDIA_CONTROLLER:i}=D,a=t.getAttribute(i);if(a)return(e=li(t))==null?void 0:e.getElementById(a)}var On=(t,e,i=".value")=>{let a=t.querySelector(i);a&&(a.textContent=e)},tp=(t,e)=>{let i=`slot[name="${e}"]`,a=t.shadowRoot.querySelector(i);return a?a.children:[]},Nn=(t,e)=>tp(t,e)[0],pe=(t,e)=>!t||!e?!1:t!=null&&t.contains(e)?!0:pe(t,e.getRootNode().host),Je=(t,e)=>{if(!t)return null;let i=t.closest(e);return i||Je(t.getRootNode().host,e)};function or(t=document){var e;let i=t==null?void 0:t.activeElement;return i?(e=or(i.shadowRoot))!=null?e:i:null}function li(t){var e;let i=(e=t==null?void 0:t.getRootNode)==null?void 0:e.call(t);return i instanceof ShadowRoot||i instanceof Document?i:null}function Pn(t,{depth:e=3,checkOpacity:i=!0,checkVisibilityCSS:a=!0}={}){if(t.checkVisibility)return t.checkVisibility({checkOpacity:i,checkVisibilityCSS:a});let r=t;for(;r&&e>0;){let n=getComputedStyle(r);if(i&&n.opacity==="0"||a&&n.visibility==="hidden"||n.display==="none")return!1;r=r.parentElement,e--}return!0}function Zu(t,e,i,a){let r=a.x-i.x,n=a.y-i.y,s=r*r+n*n;if(s===0)return 0;let d=((t-i.x)*r+(e-i.y)*n)/s;return Math.max(0,Math.min(1,d))}function q(t,e){let i=ip(t,a=>a===e);return i||sr(t,e)}function ip(t,e){var i,a;let r;for(r of(i=t.querySelectorAll("style:not([media])"))!=null?i:[]){let n;try{n=(a=r.sheet)==null?void 0:a.cssRules}catch{continue}for(let s of n!=null?n:[])if(e(s.selectorText))return s}}function sr(t,e){var i,a;let r=(i=t.querySelectorAll("style:not([media])"))!=null?i:[],n=r==null?void 0:r[r.length-1];if(!(n!=null&&n.sheet))return console.warn("Media Chrome: No style sheet found on style tag of",t),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}};let s=n==null?void 0:n.sheet.insertRule(`${e}{}`,n.sheet.cssRules.length);return(a=n.sheet.cssRules)==null?void 0:a[s]}function N(t,e,i=Number.NaN){let a=t.getAttribute(e);return a!=null?+a:i}function U(t,e,i){let a=+i;if(i==null||Number.isNaN(a)){t.hasAttribute(e)&&t.removeAttribute(e);return}N(t,e,void 0)!==a&&t.setAttribute(e,`${a}`)}function M(t,e){return t.hasAttribute(e)}function L(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}M(t,e)!=i&&t.toggleAttribute(e,i)}function x(t,e,i=null){var a;return(a=t.getAttribute(e))!=null?a:i}function w(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}let a=`${i}`;x(t,e,void 0)!==a&&t.setAttribute(e,a)}var zu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},We=(t,e,i)=>(zu(t,e,"read from private field"),i?i.call(t):e.get(t)),ap=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Un=(t,e,i,a)=>(zu(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),ce;function rp(t){return`
2
2
  <style>
3
3
  :host {
4
4
  display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));
5
5
  box-sizing: border-box;
6
6
  }
7
7
  </style>
8
- `}var Wi=class extends l.HTMLElement{constructor(){if(super(),ap(this,ue,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[D.MEDIA_CONTROLLER,n.MEDIA_PAUSED]}attributeChangedCallback(e,i,a){var r,o,s,d,u;e===D.MEDIA_CONTROLLER&&(i&&((o=(r=We(this,ue))==null?void 0:r.unassociateElement)==null||o.call(r,this),Uo(this,ue,null)),a&&this.isConnected&&(Uo(this,ue,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=We(this,ue))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,i;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),Uo(this,ue,op(this)),this.getAttribute(D.MEDIA_CONTROLLER)&&((i=(e=We(this,ue))==null?void 0:e.associateElement)==null||i.call(e,this)),We(this,ue)&&(We(this,ue).addEventListener("pointerdown",this),We(this,ue).addEventListener("click",this),We(this,ue).hasAttribute("tabindex")||(We(this,ue).tabIndex=0))}disconnectedCallback(){var e,i,a,r;this.getAttribute(D.MEDIA_CONTROLLER)&&((i=(e=We(this,ue))==null?void 0:e.unassociateElement)==null||i.call(e,this)),(a=We(this,ue))==null||a.removeEventListener("pointerdown",this),(r=We(this,ue))==null||r.removeEventListener("click",this),Uo(this,ue,null)}handleEvent(e){var i;let a=(i=e.composedPath())==null?void 0:i[0];if(["video","media-controller"].includes(a==null?void 0:a.localName)){if(e.type==="pointerdown")this._pointerType=e.pointerType;else if(e.type==="click"){let{clientX:o,clientY:s}=e,{left:d,top:u,width:f,height:y}=this.getBoundingClientRect(),A=o-d,E=s-u;if(A<0||E<0||A>f||E>y||f===0&&y===0)return;let p=this._pointerType||"mouse";if(this._pointerType=void 0,p===Mo.TOUCH){this.handleTap(e);return}else if(p===Mo.MOUSE||p===Mo.PEN){this.handleMouseClick(e);return}}}}get mediaPaused(){return M(this,n.MEDIA_PAUSED)}set mediaPaused(e){L(this,n.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let i=this.mediaPaused?h.MEDIA_PLAY_REQUEST:h.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(i,{composed:!0,bubbles:!0}))}};ue=new WeakMap;Wi.shadowRootOptions={mode:"open"};Wi.getTemplateHTML=rp;function op(t){var e;let i=t.getAttribute(D.MEDIA_CONTROLLER);return i?(e=t.getRootNode())==null?void 0:e.getElementById(i):Xe(t,"media-controller")}l.customElements.get("media-gesture-receiver")||l.customElements.define("media-gesture-receiver",Wi);var Ho=Wi;var dl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ee=(t,e,i)=>(dl(t,e,"read from private field"),i?i.call(t):e.get(t)),pe=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Fe=(t,e,i,a)=>(dl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ve=(t,e,i)=>(dl(t,e,"access private method"),i),lr,Wo,Fi,Gi,Ki,nl,Vi,Bo,sl,Qu,ll,Xu,dr,Fo,Vo,ul,Yi,ur,Bt,$o,I={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"};function np(t){return`
8
+ `}var Wi=class extends l.HTMLElement{constructor(){if(super(),ap(this,ce,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[D.MEDIA_CONTROLLER,o.MEDIA_PAUSED]}attributeChangedCallback(e,i,a){var r,n,s,d,u;e===D.MEDIA_CONTROLLER&&(i&&((n=(r=We(this,ce))==null?void 0:r.unassociateElement)==null||n.call(r,this),Un(this,ce,null)),a&&this.isConnected&&(Un(this,ce,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=We(this,ce))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,i;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),Un(this,ce,np(this)),this.getAttribute(D.MEDIA_CONTROLLER)&&((i=(e=We(this,ce))==null?void 0:e.associateElement)==null||i.call(e,this)),We(this,ce)&&(We(this,ce).addEventListener("pointerdown",this),We(this,ce).addEventListener("click",this),We(this,ce).hasAttribute("tabindex")||(We(this,ce).tabIndex=0))}disconnectedCallback(){var e,i,a,r;this.getAttribute(D.MEDIA_CONTROLLER)&&((i=(e=We(this,ce))==null?void 0:e.unassociateElement)==null||i.call(e,this)),(a=We(this,ce))==null||a.removeEventListener("pointerdown",this),(r=We(this,ce))==null||r.removeEventListener("click",this),Un(this,ce,null)}handleEvent(e){var i;let a=(i=e.composedPath())==null?void 0:i[0];if(["video","media-controller"].includes(a==null?void 0:a.localName)){if(e.type==="pointerdown")this._pointerType=e.pointerType;else if(e.type==="click"){let{clientX:n,clientY:s}=e,{left:d,top:u,width:f,height:y}=this.getBoundingClientRect(),A=n-d,E=s-u;if(A<0||E<0||A>f||E>y||f===0&&y===0)return;let p=this._pointerType||"mouse";if(this._pointerType=void 0,p===Mn.TOUCH){this.handleTap(e);return}else if(p===Mn.MOUSE||p===Mn.PEN){this.handleMouseClick(e);return}}}}get mediaPaused(){return M(this,o.MEDIA_PAUSED)}set mediaPaused(e){L(this,o.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let i=this.mediaPaused?h.MEDIA_PLAY_REQUEST:h.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(i,{composed:!0,bubbles:!0}))}};ce=new WeakMap;Wi.shadowRootOptions={mode:"open"};Wi.getTemplateHTML=rp;function np(t){var e;let i=t.getAttribute(D.MEDIA_CONTROLLER);return i?(e=t.getRootNode())==null?void 0:e.getElementById(i):Je(t,"media-controller")}l.customElements.get("media-gesture-receiver")||l.customElements.define("media-gesture-receiver",Wi);var Hn=Wi;var dl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ee=(t,e,i)=>(dl(t,e,"read from private field"),i?i.call(t):e.get(t)),fe=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Fe=(t,e,i,a)=>(dl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ve=(t,e,i)=>(dl(t,e,"access private method"),i),lr,Wn,Fi,Gi,Ki,ol,Vi,Bn,sl,Qu,ll,Xu,dr,Fn,Vn,ul,Yi,ur,$t,$n,I={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"};function op(t){return`
9
9
  <style>
10
10
 
11
- :host([${n.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {
11
+ :host([${o.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {
12
12
  outline: none;
13
13
  }
14
14
 
@@ -104,16 +104,16 @@
104
104
  }
105
105
 
106
106
 
107
- :host([${I.USER_INACTIVE}]:not([${n.MEDIA_PAUSED}]):not([${n.MEDIA_IS_AIRPLAYING}]):not([${n.MEDIA_IS_CASTING}]):not([${I.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${I.NO_AUTOHIDE}]):not([role=dialog])) {
107
+ :host([${I.USER_INACTIVE}]:not([${o.MEDIA_PAUSED}]):not([${o.MEDIA_IS_AIRPLAYING}]):not([${o.MEDIA_IS_CASTING}]):not([${I.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${I.NO_AUTOHIDE}]):not([role=dialog])) {
108
108
  opacity: 0;
109
109
  transition: var(--media-control-transition-out, opacity 1s);
110
110
  }
111
111
 
112
- :host([${I.USER_INACTIVE}]:not([${I.NO_AUTOHIDE}]):not([${n.MEDIA_PAUSED}]):not([${n.MEDIA_IS_CASTING}]):not([${I.AUDIO}])) ::slotted([slot=media]) {
112
+ :host([${I.USER_INACTIVE}]:not([${I.NO_AUTOHIDE}]):not([${o.MEDIA_PAUSED}]):not([${o.MEDIA_IS_CASTING}]):not([${I.AUDIO}])) ::slotted([slot=media]) {
113
113
  cursor: none;
114
114
  }
115
115
 
116
- :host([${I.USER_INACTIVE}][${I.AUTOHIDE_OVER_CONTROLS}]:not([${I.NO_AUTOHIDE}]):not([${n.MEDIA_PAUSED}]):not([${n.MEDIA_IS_CASTING}]):not([${I.AUDIO}])) * {
116
+ :host([${I.USER_INACTIVE}][${I.AUTOHIDE_OVER_CONTROLS}]:not([${I.NO_AUTOHIDE}]):not([${o.MEDIA_PAUSED}]):not([${o.MEDIA_IS_CASTING}]):not([${I.AUDIO}])) * {
117
117
  --media-cursor: none;
118
118
  cursor: none;
119
119
  }
@@ -124,7 +124,7 @@
124
124
  }
125
125
 
126
126
 
127
- :host(:not([${I.AUDIO}])[${n.MEDIA_HAS_PLAYED}]) slot[name=poster] {
127
+ :host(:not([${I.AUDIO}])[${o.MEDIA_HAS_PLAYED}]) slot[name=poster] {
128
128
  display: none;
129
129
  }
130
130
 
@@ -143,8 +143,8 @@
143
143
  <slot name="poster" part="layer poster-layer"></slot>
144
144
  <slot name="gestures-chrome" part="layer gesture-layer">
145
145
  <media-gesture-receiver slot="gestures-chrome">
146
- <template shadowrootmode="${Ho.shadowRootOptions.mode}">
147
- ${Ho.getTemplateHTML({})}
146
+ <template shadowrootmode="${Hn.shadowRootOptions.mode}">
147
+ ${Hn.getTemplateHTML({})}
148
148
  </template>
149
149
  </media-gesture-receiver>
150
150
  </slot>
@@ -156,7 +156,7 @@
156
156
  <slot part="bottom chrome"></slot>
157
157
  </span>
158
158
  <slot name="dialog" part="layer dialog-layer"></slot>
159
- `}var sp=Object.values(n),lp="sm:384 md:576 lg:768 xl:960";function dp(t){Ju(t.target,t.contentRect.width)}function Ju(t,e){var i;if(!t.isConnected)return;let a=(i=t.getAttribute(I.BREAKPOINTS))!=null?i:lp,r=up(a),o=cp(r,e),s=!1;if(Object.keys(r).forEach(d=>{if(o.includes(d)){t.hasAttribute(`breakpoint${d}`)||(t.setAttribute(`breakpoint${d}`,""),s=!0);return}t.hasAttribute(`breakpoint${d}`)&&(t.removeAttribute(`breakpoint${d}`),s=!0)}),s){let d=new CustomEvent(Ie.BREAKPOINTS_CHANGE,{detail:o});t.dispatchEvent(d)}t.breakpointsComputed||(t.breakpointsComputed=!0,t.dispatchEvent(new CustomEvent(Ie.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}function up(t){let e=t.split(/\s+/);return Object.fromEntries(e.map(i=>i.split(":")))}function cp(t,e){return Object.keys(t).filter(i=>e>=parseInt(t[i]))}var di=class extends l.HTMLElement{constructor(){if(super(),pe(this,sl),pe(this,ll),pe(this,dr),pe(this,Vo),pe(this,Yi),pe(this,lr,void 0),pe(this,Wo,0),pe(this,Fi,null),pe(this,Gi,null),pe(this,Ki,void 0),this.breakpointsComputed=!1,pe(this,nl,e=>{let i=this.media;for(let a of e){if(a.type!=="childList")continue;let r=a.removedNodes;for(let o of r){if(o.slot!="media"||a.target!=this)continue;let s=a.previousSibling&&a.previousSibling.previousElementSibling;if(!s||!i)this.mediaUnsetCallback(o);else{let d=s.slot!=="media";for(;(s=s.previousSibling)!==null;)s.slot=="media"&&(d=!1);d&&this.mediaUnsetCallback(o)}}if(i)for(let o of a.addedNodes)o===i&&this.handleMediaUpdated(i)}}),pe(this,Vi,!1),pe(this,Bo,e=>{ee(this,Vi)||(setTimeout(()=>{dp(e),Fe(this,Vi,!1)},0),Fe(this,Vi,!0))}),pe(this,Bt,void 0),pe(this,$o,()=>{if(!ee(this,Bt).assignedElements({flatten:!0}).length){ee(this,Fi)&&this.mediaUnsetCallback(ee(this,Fi));return}this.handleMediaUpdated(this.media)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}Fe(this,lr,new MutationObserver(ee(this,nl)))}static get observedAttributes(){return[I.AUTOHIDE,I.GESTURES_DISABLED].concat(sp).filter(e=>![n.MEDIA_RENDITION_LIST,n.MEDIA_AUDIO_TRACK_LIST,n.MEDIA_CHAPTERS_CUES,n.MEDIA_WIDTH,n.MEDIA_HEIGHT,n.MEDIA_ERROR,n.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,i,a){e.toLowerCase()==I.AUTOHIDE&&(this.autohide=a)}get media(){let e=this.querySelector(":scope > [slot=media]");return(e==null?void 0:e.nodeName)=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(Fe(this,Fi,e),e.localName.includes("-")&&await l.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;ee(this,lr).observe(this,{childList:!0,subtree:!0}),At(this,ee(this,Bo));let a=this.getAttribute(I.AUDIO)!=null?c("audio player"):c("video player");this.setAttribute("role","region"),this.setAttribute("aria-label",a),this.handleMediaUpdated(this.media),this.setAttribute(I.USER_INACTIVE,""),Ju(this,this.getBoundingClientRect().width);let r=this.querySelector(":scope > slot[slot=media]");r&&(Fe(this,Bt,r),ee(this,Bt).addEventListener("slotchange",ee(this,$o))),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),(e=l.window)==null||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;Tt(this,ee(this,Bo)),clearTimeout(ee(this,Gi)),ee(this,lr).disconnect(),this.media&&this.mediaUnsetCallback(this.media),(e=l.window)==null||e.removeEventListener("mouseup",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointermove",this),this.removeEventListener("pointerup",this),this.removeEventListener("mouseleave",this),this.removeEventListener("keyup",this),ee(this,Bt)&&(ee(this,Bt).removeEventListener("slotchange",ee(this,$o)),Fe(this,Bt,null)),Fe(this,Vi,!1)}mediaSetCallback(e){}mediaUnsetCallback(e){Fe(this,Fi,null)}handleEvent(e){switch(e.type){case"pointerdown":Fe(this,Wo,e.timeStamp);break;case"pointermove":Ve(this,sl,Qu).call(this,e);break;case"pointerup":Ve(this,ll,Xu).call(this,e);break;case"mouseleave":Ve(this,dr,Fo).call(this);break;case"mouseup":this.removeAttribute(I.KEYBOARD_CONTROL);break;case"keyup":Ve(this,Yi,ur).call(this),this.setAttribute(I.KEYBOARD_CONTROL,"");break}}set autohide(e){let i=Number(e);Fe(this,Ki,isNaN(i)?0:i)}get autohide(){return(ee(this,Ki)===void 0?2:ee(this,Ki)).toString()}get breakpoints(){return x(this,I.BREAKPOINTS)}set breakpoints(e){w(this,I.BREAKPOINTS,e)}get audio(){return M(this,I.AUDIO)}set audio(e){L(this,I.AUDIO,e)}get gesturesDisabled(){return M(this,I.GESTURES_DISABLED)}set gesturesDisabled(e){L(this,I.GESTURES_DISABLED,e)}get keyboardControl(){return M(this,I.KEYBOARD_CONTROL)}set keyboardControl(e){L(this,I.KEYBOARD_CONTROL,e)}get noAutohide(){return M(this,I.NO_AUTOHIDE)}set noAutohide(e){L(this,I.NO_AUTOHIDE,e)}get autohideOverControls(){return M(this,I.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){L(this,I.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return M(this,I.USER_INACTIVE)}set userInteractive(e){L(this,I.USER_INACTIVE,e)}};lr=new WeakMap;Wo=new WeakMap;Fi=new WeakMap;Gi=new WeakMap;Ki=new WeakMap;nl=new WeakMap;Vi=new WeakMap;Bo=new WeakMap;sl=new WeakSet;Qu=function(t){if(t.pointerType!=="mouse"&&t.timeStamp-ee(this,Wo)<250)return;Ve(this,Vo,ul).call(this),clearTimeout(ee(this,Gi));let e=this.hasAttribute(I.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(t.target)||e)&&Ve(this,Yi,ur).call(this)};ll=new WeakSet;Xu=function(t){if(t.pointerType==="touch"){let e=!this.hasAttribute(I.USER_INACTIVE);[this,this.media].includes(t.target)&&e?Ve(this,dr,Fo).call(this):Ve(this,Yi,ur).call(this)}else t.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(e==null?void 0:e.localName))&&Ve(this,Yi,ur).call(this)};dr=new WeakSet;Fo=function(){if(ee(this,Ki)<0||this.hasAttribute(I.USER_INACTIVE))return;this.setAttribute(I.USER_INACTIVE,"");let t=new l.CustomEvent(Ie.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(t)};Vo=new WeakSet;ul=function(){if(!this.hasAttribute(I.USER_INACTIVE))return;this.removeAttribute(I.USER_INACTIVE);let t=new l.CustomEvent(Ie.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(t)};Yi=new WeakSet;ur=function(){Ve(this,Vo,ul).call(this),clearTimeout(ee(this,Gi));let t=parseInt(this.autohide);t<0||Fe(this,Gi,setTimeout(()=>{Ve(this,dr,Fo).call(this)},t*1e3))};Bt=new WeakMap;$o=new WeakMap;di.shadowRootOptions={mode:"open"};di.getTemplateHTML=np;l.customElements.get("media-container")||l.customElements.define("media-container",di);var ju=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},se=(t,e,i)=>(ju(t,e,"read from private field"),i?i.call(t):e.get(t)),cr=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ko=(t,e,i,a)=>(ju(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),qi,Zi,Go,ui,yt,$t,Wt=class{constructor(e,i,{defaultValue:a}={defaultValue:void 0}){cr(this,yt),cr(this,qi,void 0),cr(this,Zi,void 0),cr(this,Go,void 0),cr(this,ui,new Set),Ko(this,qi,e),Ko(this,Zi,i),Ko(this,Go,new Set(a))}[Symbol.iterator](){return se(this,yt,$t).values()}get length(){return se(this,yt,$t).size}get value(){var e;return(e=[...se(this,yt,$t)].join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(Ko(this,ui,new Set),this.add(...(i=e==null?void 0:e.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return[...se(this,yt,$t)][e]}values(){return se(this,yt,$t).values()}forEach(e,i){se(this,yt,$t).forEach(e,i)}add(...e){var i,a;e.forEach(r=>se(this,ui).add(r)),!(this.value===""&&!((i=se(this,qi))!=null&&i.hasAttribute(`${se(this,Zi)}`)))&&((a=se(this,qi))==null||a.setAttribute(`${se(this,Zi)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>se(this,ui).delete(a)),(i=se(this,qi))==null||i.setAttribute(`${se(this,Zi)}`,`${this.value}`)}contains(e){return se(this,yt,$t).has(e)}toggle(e,i){return typeof i!="undefined"?i?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,i){return this.remove(e),this.add(i),e===i}};qi=new WeakMap;Zi=new WeakMap;Go=new WeakMap;ui=new WeakMap;yt=new WeakSet;$t=function(){return se(this,ui).size?se(this,ui):se(this,Go)};var mp=(t="")=>t.split(/\s+/),ec=(t="")=>{let[e,i,a]=t.split(":"),r=a?decodeURIComponent(a):void 0;return{kind:e==="cc"?_e.CAPTIONS:_e.SUBTITLES,language:i,label:r}},ci=(t="",e={})=>mp(t).map(i=>{let a=ec(i);return{...e,...a}}),cl=t=>t?Array.isArray(t)?t.map(e=>typeof e=="string"?ec(e):e):typeof t=="string"?ci(t):[t]:[],Yo=({kind:t,label:e,language:i}={kind:"subtitles"})=>e?`${t==="captions"?"cc":"sb"}:${i}:${encodeURIComponent(e)}`:i,kt=(t=[])=>Array.prototype.map.call(t,Yo).join(" "),hp=(t,e)=>i=>i[t]===e,tc=t=>{let e=Object.entries(t).map(([i,a])=>hp(i,a));return i=>e.every(a=>a(i))},mi=(t,e=[],i=[])=>{let a=cl(i).map(tc),r=o=>a.some(s=>s(o));Array.from(e).filter(r).forEach(o=>{o.mode=t})},hi=(t,e=()=>!0)=>{if(!(t!=null&&t.textTracks))return[];let i=typeof e=="function"?e:tc(e);return Array.from(t.textTracks).filter(i)},qo=t=>{var e;return!!((e=t.mediaSubtitlesShowing)!=null&&e.length)||t.hasAttribute(n.MEDIA_SUBTITLES_SHOWING)};var ac=t=>{var e;let{media:i,fullscreenElement:a}=t;try{let r=a&&"requestFullscreen"in a?"requestFullscreen":a&&"webkitRequestFullScreen"in a?"webkitRequestFullScreen":void 0;if(r){let o=(e=a[r])==null?void 0:e.call(a);if(o instanceof Promise)return o.catch(()=>{})}else i!=null&&i.webkitEnterFullscreen?i.webkitEnterFullscreen():i!=null&&i.requestFullscreen&&i.requestFullscreen()}catch(r){console.error(r)}},ic="exitFullscreen"in V?"exitFullscreen":"webkitExitFullscreen"in V?"webkitExitFullscreen":"webkitCancelFullScreen"in V?"webkitCancelFullScreen":void 0,rc=t=>{var e;let{documentElement:i}=t;if(ic){let a=(e=i==null?void 0:i[ic])==null?void 0:e.call(i);if(a instanceof Promise)return a.catch(()=>{})}},mr="fullscreenElement"in V?"fullscreenElement":"webkitFullscreenElement"in V?"webkitFullscreenElement":void 0,pp=t=>{let{documentElement:e,media:i}=t,a=e==null?void 0:e[mr];return!a&&"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&i.webkitDisplayingFullscreen&&i.webkitPresentationMode===Du.FULLSCREEN?i:a},oc=t=>{var e;let{media:i,documentElement:a,fullscreenElement:r=i}=t;if(!i||!a)return!1;let o=pp(t);if(!o)return!1;if(o===r||o===i)return!0;if(o.localName.includes("-")){let s=o.shadowRoot;if(!(mr in s))return he(o,r);for(;s!=null&&s[mr];){if(s[mr]===r)return!0;s=(e=s[mr])==null?void 0:e.shadowRoot}}return!1},fp="fullscreenEnabled"in V?"fullscreenEnabled":"webkitFullscreenEnabled"in V?"webkitFullscreenEnabled":void 0,nc=t=>{let{documentElement:e,media:i}=t;return!!(e!=null&&e[fp])||i&&"webkitSupportsFullscreen"in i};var Zo,ml=()=>{var t,e;return Zo||(Zo=(e=(t=V)==null?void 0:t.createElement)==null?void 0:e.call(t,"video"),Zo)},sc=async(t=ml())=>{if(!t)return!1;let e=t.volume;t.volume=e/2+.1;let i=new AbortController,a=await Promise.race([vp(t,i.signal),Ep(t,e)]);return i.abort(),a},vp=(t,e)=>new Promise(i=>{t.addEventListener("volumechange",()=>i(!0),{signal:e})}),Ep=async(t,e)=>{for(let i=0;i<10;i++){if(t.volume===e)return!1;await Co(10)}return t.volume!==e},bp=/.*Version\/.*Safari\/.*/.test(l.navigator.userAgent),hl=(t=ml())=>l.matchMedia("(display-mode: standalone)").matches&&bp?!1:typeof(t==null?void 0:t.requestPictureInPicture)=="function",pl=(t=ml())=>nc({documentElement:V,media:t}),lc=pl(),dc=hl(),uc=!!l.WebKitPlaybackTargetAvailabilityEvent,cc=!!l.chrome;var zi=t=>hi(t.media,e=>[_e.SUBTITLES,_e.CAPTIONS].includes(e.kind)).sort((e,i)=>e.kind>=i.kind?1:-1),fl=t=>hi(t.media,e=>e.mode===Ht.SHOWING&&[_e.SUBTITLES,_e.CAPTIONS].includes(e.kind)),zo=(t,e)=>{let i=zi(t),a=fl(t),r=!!a.length;if(i.length){if(e===!1||r&&e!==!0)mi(Ht.DISABLED,i,a);else if(e===!0||!r&&e!==!1){let o=i[0],{options:s}=t;if(!(s!=null&&s.noSubtitlesLangPref)){let y=l.localStorage.getItem("media-chrome-pref-subtitles-lang"),A=y?[y,...l.navigator.languages]:l.navigator.languages,E=i.filter(p=>A.some(k=>p.language.toLowerCase().startsWith(k.split("-")[0]))).sort((p,k)=>{let g=A.findIndex(C=>p.language.toLowerCase().startsWith(C.split("-")[0])),S=A.findIndex(C=>k.language.toLowerCase().startsWith(C.split("-")[0]));return g-S});E[0]&&(o=E[0])}let{language:d,label:u,kind:f}=o;mi(Ht.DISABLED,i,a),mi(Ht.SHOWING,i,[{language:d,label:u,kind:f}])}}},Qo=(t,e)=>t===e?!0:t==null||e==null||typeof t!=typeof e?!1:typeof t=="number"&&Number.isNaN(t)&&Number.isNaN(e)?!0:typeof t!="object"?!1:Array.isArray(t)?gp(t,e):Object.entries(t).every(([i,a])=>i in e&&Qo(a,e[i])),gp=(t,e)=>{let i=Array.isArray(t),a=Array.isArray(e);return i!==a?!1:i||a?t.length!==e.length?!1:t.every((r,o)=>Qo(r,e[o])):!0};var _p=Object.values(Be),Xo,Ap=sc().then(t=>(Xo=t,Xo)),mc=async(...t)=>{await Promise.all(t.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof l.HTMLElement))return;let i=e.localName;if(!i.includes("-"))return;let a=l.customElements.get(i);a&&e instanceof a||(await l.customElements.whenDefined(i),l.customElements.upgrade(e))}))},Tp=new l.DOMParser,yp=t=>t&&(Tp.parseFromString(t,"text/html").body.textContent||t),Qi={mediaError:{get(t,e){let{media:i}=t;if((e==null?void 0:e.type)!=="playing")return i==null?void 0:i.error},mediaEvents:["emptied","error","playing"]},mediaErrorCode:{get(t,e){var i;let{media:a}=t;if((e==null?void 0:e.type)!=="playing")return(i=a==null?void 0:a.error)==null?void 0:i.code},mediaEvents:["emptied","error","playing"]},mediaErrorMessage:{get(t,e){var i,a;let{media:r}=t;if((e==null?void 0:e.type)!=="playing")return(a=(i=r==null?void 0:r.error)==null?void 0:i.message)!=null?a:""},mediaEvents:["emptied","error","playing"]},mediaWidth:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.videoWidth)!=null?e:0},mediaEvents:["resize"]},mediaHeight:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.videoHeight)!=null?e:0},mediaEvents:["resize"]},mediaPaused:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.paused)!=null?e:!0},set(t,e){var i;let{media:a}=e;a&&(t?a.pause():(i=a.play())==null||i.catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(t,e){let{media:i}=t;return i?e?e.type==="playing":!i.paused:!1},mediaEvents:["playing","emptied"]},mediaEnded:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.ended)!=null?e:!1},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.playbackRate)!=null?e:1},set(t,e){let{media:i}=e;i&&Number.isFinite(+t)&&(i.playbackRate=+t)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.muted)!=null?e:!1},set(t,e){let{media:i,options:{noMutedPref:a}={}}=e;if(i){i.muted=t;try{let r=l.localStorage.getItem("media-chrome-pref-muted")!==null,o=i.hasAttribute("muted");if(a){r&&l.localStorage.removeItem("media-chrome-pref-muted");return}if(o&&!r)return;l.localStorage.setItem("media-chrome-pref-muted",t?"true":"false")}catch(r){console.debug("Error setting muted pref",r)}}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{let{options:{noMutedPref:i}}=e,{media:a}=e;if(!(!a||a.muted||i))try{let r=l.localStorage.getItem("media-chrome-pref-muted")==="true";Qi.mediaMuted.set(r,e),t(r)}catch(r){console.debug("Error getting muted pref",r)}}]},mediaLoop:{get(t){let{media:e}=t;return e==null?void 0:e.loop},set(t,e){let{media:i}=e;i&&(i.loop=t)},mediaEvents:["medialooprequest"]},mediaVolume:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.volume)!=null?e:1},set(t,e){let{media:i,options:{noVolumePref:a}={}}=e;if(i){try{t==null?l.localStorage.removeItem("media-chrome-pref-volume"):!i.hasAttribute("muted")&&!a&&l.localStorage.setItem("media-chrome-pref-volume",t.toString())}catch(r){console.debug("Error setting volume pref",r)}Number.isFinite(+t)&&(i.volume=+t)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{let{options:{noVolumePref:i}}=e;if(!i)try{let{media:a}=e;if(!a)return;let r=l.localStorage.getItem("media-chrome-pref-volume");if(r==null)return;Qi.mediaVolume.set(+r,e),t(+r)}catch(a){console.debug("Error getting volume pref",a)}}]},mediaVolumeLevel:{get(t){let{media:e}=t;return typeof(e==null?void 0:e.volume)=="undefined"?"high":e.muted||e.volume===0?"off":e.volume<.5?"low":e.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.currentTime)!=null?e:0},set(t,e){let{media:i}=e;!i||!$i(t)||(i.currentTime=t)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(t){let{media:e,options:{defaultDuration:i}={}}=t;return i&&(!e||!e.duration||Number.isNaN(e.duration)||!Number.isFinite(e.duration))?i:Number.isFinite(e==null?void 0:e.duration)?e.duration:Number.NaN},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(t){let{media:e}=t;return(e==null?void 0:e.readyState)<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(t){var e;let{media:i}=t;if(!((e=i==null?void 0:i.seekable)!=null&&e.length))return;let a=i.seekable.start(0),r=i.seekable.end(i.seekable.length-1);if(!(!a&&!r))return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get(t){var e;let{media:i}=t,a=(e=i==null?void 0:i.buffered)!=null?e:[];return Array.from(a).map((r,o)=>[Number(a.start(o).toFixed(3)),Number(a.end(o).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(t){let{media:e,options:{defaultStreamType:i}={}}=t,a=[Be.LIVE,Be.ON_DEMAND].includes(i)?i:void 0;if(!e)return a;let{streamType:r}=e;if(_p.includes(r))return r===Be.UNKNOWN?a:r;let o=e.duration;return o===1/0?Be.LIVE:Number.isFinite(o)?Be.ON_DEMAND:a},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(t){let{media:e}=t;if(!e)return Number.NaN;let{targetLiveWindow:i}=e,a=Qi.mediaStreamType.get(t);return(i==null||Number.isNaN(i))&&a===Be.LIVE?0:i},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(t){let{media:e,options:{liveEdgeOffset:i=10}={}}=t;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return Number.isNaN(e.liveEdgeStart)?!1:e.currentTime>=e.liveEdgeStart;if(!(Qi.mediaStreamType.get(t)===Be.LIVE))return!1;let r=e.seekable;if(!r)return!0;if(!r.length)return!1;let o=r.end(r.length-1)-i;return e.currentTime>=o},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get(t){return zi(t).map(({kind:e,label:i,language:a})=>({kind:e,label:i,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get(t){return fl(t).map(({kind:e,label:i,language:a})=>({kind:e,label:i,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var i,a;let{media:r,options:o}=e;if(!r)return;let s=d=>{var u;!o.defaultSubtitles||d&&![_e.CAPTIONS,_e.SUBTITLES].includes((u=d==null?void 0:d.track)==null?void 0:u.kind)||zo(e,!0)};return r.addEventListener("loadstart",s),(i=r.textTracks)==null||i.addEventListener("addtrack",s),(a=r.textTracks)==null||a.addEventListener("removetrack",s),()=>{var d,u;r.removeEventListener("loadstart",s),(d=r.textTracks)==null||d.removeEventListener("addtrack",s),(u=r.textTracks)==null||u.removeEventListener("removetrack",s)}}]},mediaChaptersCues:{get(t){var e;let{media:i}=t;if(!i)return[];let[a]=hi(i,{kind:_e.CHAPTERS});return Array.from((e=a==null?void 0:a.cues)!=null?e:[]).map(({text:r,startTime:o,endTime:s})=>({text:yp(r),startTime:o,endTime:s}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var i;let{media:a}=e;if(!a)return;let r=a.querySelector('track[kind="chapters"][default][src]'),o=(i=a.shadowRoot)==null?void 0:i.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return r==null||r.addEventListener("load",t),o==null||o.addEventListener("load",t),()=>{r==null||r.removeEventListener("load",t),o==null||o.removeEventListener("load",t)}}]},mediaIsPip:{get(t){var e,i;let{media:a,documentElement:r}=t;if(!a||!r||!r.pictureInPictureElement)return!1;if(r.pictureInPictureElement===a)return!0;if(r.pictureInPictureElement instanceof HTMLMediaElement)return(e=a.localName)!=null&&e.includes("-")?he(a,r.pictureInPictureElement):!1;if(r.pictureInPictureElement.localName.includes("-")){let o=r.pictureInPictureElement.shadowRoot;for(;o!=null&&o.pictureInPictureElement;){if(o.pictureInPictureElement===a)return!0;o=(i=o.pictureInPictureElement)==null?void 0:i.shadowRoot}}return!1},set(t,e){let{media:i}=e;if(i)if(t){if(!V.pictureInPictureEnabled){console.warn("MediaChrome: Picture-in-picture is not enabled");return}if(!i.requestPictureInPicture){console.warn("MediaChrome: The current media does not support picture-in-picture");return}let a=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(r=>{if(r.code===11){if(!i.src){console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.");return}if(i.readyState===0&&i.preload==="none"){let o=()=>{i.removeEventListener("loadedmetadata",s),i.preload="none"},s=()=>{i.requestPictureInPicture().catch(a),o()};i.addEventListener("loadedmetadata",s),i.preload="metadata",setTimeout(()=>{i.readyState===0&&a(),o()},1e3)}else throw r}else throw r})}else V.pictureInPictureElement&&V.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(t){var e;let{media:i}=t;return[...(e=i==null?void 0:i.videoRenditions)!=null?e:[]].map(a=>({...a}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(t){var e,i,a;let{media:r}=t;return(a=(i=r==null?void 0:r.videoRenditions)==null?void 0:i[(e=r.videoRenditions)==null?void 0:e.selectedIndex])==null?void 0:a.id},set(t,e){let{media:i}=e;if(!(i!=null&&i.videoRenditions)){console.warn("MediaController: Rendition selection not supported by this media.");return}let a=t,r=Array.prototype.findIndex.call(i.videoRenditions,o=>o.id==a);i.videoRenditions.selectedIndex!=r&&(i.videoRenditions.selectedIndex=r)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(t){var e;let{media:i}=t;return[...(e=i==null?void 0:i.audioTracks)!=null?e:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(t){var e,i;let{media:a}=t;return(i=[...(e=a==null?void 0:a.audioTracks)!=null?e:[]].find(r=>r.enabled))==null?void 0:i.id},set(t,e){let{media:i}=e;if(!(i!=null&&i.audioTracks)){console.warn("MediaChrome: Audio track selection not supported by this media.");return}let a=t;for(let r of i.audioTracks)r.enabled=a==r.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get(t){return oc(t)},set(t,e,i){var a,r;t?(ac(e),i.detail&&!((a=e.media)!=null&&a.inert)&&((r=e.media)==null||r.focus())):rc(e)},rootEvents:["fullscreenchange","webkitfullscreenchange"],mediaEvents:["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"]},mediaIsCasting:{get(t){var e;let{media:i}=t;return!(i!=null&&i.remote)||((e=i.remote)==null?void 0:e.state)==="disconnected"?!1:!!i.remote.state},set(t,e){var i,a;let{media:r}=e;if(r&&!(t&&((i=r.remote)==null?void 0:i.state)!=="disconnected")&&!(!t&&((a=r.remote)==null?void 0:a.state)!=="connected")){if(typeof r.remote.prompt!="function"){console.warn("MediaChrome: Casting is not supported in this environment");return}r.remote.prompt().catch(()=>{})}},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get(){return!1},set(t,e){let{media:i}=e;if(i){if(!(i.webkitShowPlaybackTargetPicker&&l.WebKitPlaybackTargetAvailabilityEvent)){console.error("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment");return}i.webkitShowPlaybackTargetPicker()}},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(t){let{media:e}=t;if(!lc||!pl(e))return Ae.UNSUPPORTED}},mediaPipUnavailable:{get(t){let{media:e}=t;if(!dc||!hl(e))return Ae.UNSUPPORTED;if(e!=null&&e.disablePictureInPicture)return Ae.UNAVAILABLE}},mediaVolumeUnavailable:{get(t){let{media:e}=t;if(Xo===!1||(e==null?void 0:e.volume)==null)return Ae.UNSUPPORTED},stateOwnersUpdateHandlers:[t=>{Xo==null&&Ap.then(e=>t(e?void 0:Ae.UNSUPPORTED))}]},mediaCastUnavailable:{get(t,{availability:e="not-available"}={}){var i;let{media:a}=t;if(!cc||!((i=a==null?void 0:a.remote)!=null&&i.state))return Ae.UNSUPPORTED;if(!(e==null||e==="available"))return Ae.UNAVAILABLE},stateOwnersUpdateHandlers:[(t,e)=>{var i;let{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(i=a==null?void 0:a.remote)==null||i.watchAvailability(o=>{t({availability:o?"available":"not-available"})}).catch(o=>{o.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var o;(o=a==null?void 0:a.remote)==null||o.cancelWatchAvailability().catch(()=>{})}):void 0}]},mediaAirplayUnavailable:{get(t,e){if(!uc)return Ae.UNSUPPORTED;if((e==null?void 0:e.availability)==="not-available")return Ae.UNAVAILABLE},mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(t,e)=>{var i;let{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(i=a==null?void 0:a.remote)==null||i.watchAvailability(o=>{t({availability:o?"available":"not-available"})}).catch(o=>{o.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var o;(o=a==null?void 0:a.remote)==null||o.cancelWatchAvailability().catch(()=>{})}):void 0}]},mediaRenditionUnavailable:{get(t){var e;let{media:i}=t;if(!(i!=null&&i.videoRenditions))return Ae.UNSUPPORTED;if(!((e=i.videoRenditions)!=null&&e.length))return Ae.UNAVAILABLE},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(t){var e,i;let{media:a}=t;if(!(a!=null&&a.audioTracks))return Ae.UNSUPPORTED;if(((i=(e=a.audioTracks)==null?void 0:e.length)!=null?i:0)<=1)return Ae.UNAVAILABLE},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(t){let{options:{mediaLang:e}={}}=t;return e!=null?e:"en"}}};var hc={[h.MEDIA_PREVIEW_REQUEST](t,e,{detail:i}){var a,r,o;let{media:s}=e,d=i!=null?i:void 0,u,f;if(s&&d!=null){let[p]=hi(s,{kind:_e.METADATA,label:"thumbnails"}),k=Array.prototype.find.call((a=p==null?void 0:p.cues)!=null?a:[],(g,S,C)=>S===0?g.endTime>d:S===C.length-1?g.startTime<=d:g.startTime<=d&&g.endTime>d);if(k){let g=/'^(?:[a-z]+:)?\/\//i.test(k.text)||(r=s==null?void 0:s.querySelector('track[label="thumbnails"]'))==null?void 0:r.src,S=new URL(k.text,g);f=new URLSearchParams(S.hash).get("#xywh").split(",").map(j=>+j),u=S.href}}let y=t.mediaDuration.get(e),E=(o=t.mediaChaptersCues.get(e).find((p,k,g)=>k===g.length-1&&y===p.endTime?p.startTime<=d&&p.endTime>=d:p.startTime<=d&&p.endTime>d))==null?void 0:o.text;return i!=null&&E==null&&(E=""),{mediaPreviewTime:d,mediaPreviewImage:u,mediaPreviewCoords:f,mediaPreviewChapter:E}},[h.MEDIA_PAUSE_REQUEST](t,e){t["mediaPaused"].set(!0,e)},[h.MEDIA_PLAY_REQUEST](t,e){var i,a,r,o;let s="mediaPaused",u=t.mediaStreamType.get(e)===Be.LIVE,f=!((i=e.options)!=null&&i.noAutoSeekToLive),y=t.mediaTargetLiveWindow.get(e)>0;if(u&&f&&!y){let A=(a=t.mediaSeekable.get(e))==null?void 0:a[1];if(A){let E=(o=(r=e.options)==null?void 0:r.seekToLiveOffset)!=null?o:0,p=A-E;t.mediaCurrentTime.set(p,e)}}t[s].set(!1,e)},[h.MEDIA_PLAYBACK_RATE_REQUEST](t,e,{detail:i}){let a="mediaPlaybackRate",r=i;t[a].set(r,e)},[h.MEDIA_MUTE_REQUEST](t,e){t["mediaMuted"].set(!0,e)},[h.MEDIA_UNMUTE_REQUEST](t,e){let i="mediaMuted";t.mediaVolume.get(e)||t.mediaVolume.set(.25,e),t[i].set(!1,e)},[h.MEDIA_LOOP_REQUEST](t,e,{detail:i}){let a="mediaLoop",r=!!i;return t[a].set(r,e),{mediaLoop:r}},[h.MEDIA_VOLUME_REQUEST](t,e,{detail:i}){let a="mediaVolume",r=i;r&&t.mediaMuted.get(e)&&t.mediaMuted.set(!1,e),t[a].set(r,e)},[h.MEDIA_SEEK_REQUEST](t,e,{detail:i}){let a="mediaCurrentTime",r=i;t[a].set(r,e)},[h.MEDIA_SEEK_TO_LIVE_REQUEST](t,e){var i,a,r;let o="mediaCurrentTime",s=(i=t.mediaSeekable.get(e))==null?void 0:i[1];if(Number.isNaN(Number(s)))return;let d=(r=(a=e.options)==null?void 0:a.seekToLiveOffset)!=null?r:0,u=s-d;t[o].set(u,e)},[h.MEDIA_SHOW_SUBTITLES_REQUEST](t,e,{detail:i}){var a;let{options:r}=e,o=zi(e),s=cl(i),d=(a=s[0])==null?void 0:a.language;d&&!r.noSubtitlesLangPref&&l.localStorage.setItem("media-chrome-pref-subtitles-lang",d),mi(Ht.SHOWING,o,s)},[h.MEDIA_DISABLE_SUBTITLES_REQUEST](t,e,{detail:i}){let a=zi(e),r=i!=null?i:[];mi(Ht.DISABLED,a,r)},[h.MEDIA_TOGGLE_SUBTITLES_REQUEST](t,e,{detail:i}){zo(e,i)},[h.MEDIA_RENDITION_REQUEST](t,e,{detail:i}){let a="mediaRenditionSelected",r=i;t[a].set(r,e)},[h.MEDIA_AUDIO_TRACK_REQUEST](t,e,{detail:i}){let a="mediaAudioTrackEnabled",r=i;t[a].set(r,e)},[h.MEDIA_ENTER_PIP_REQUEST](t,e){let i="mediaIsPip";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[i].set(!0,e)},[h.MEDIA_EXIT_PIP_REQUEST](t,e){t["mediaIsPip"].set(!1,e)},[h.MEDIA_ENTER_FULLSCREEN_REQUEST](t,e,i){let a="mediaIsFullscreen";t.mediaIsPip.get(e)&&t.mediaIsPip.set(!1,e),t[a].set(!0,e,i)},[h.MEDIA_EXIT_FULLSCREEN_REQUEST](t,e){t["mediaIsFullscreen"].set(!1,e)},[h.MEDIA_ENTER_CAST_REQUEST](t,e){let i="mediaIsCasting";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[i].set(!0,e)},[h.MEDIA_EXIT_CAST_REQUEST](t,e){t["mediaIsCasting"].set(!1,e)},[h.MEDIA_AIRPLAY_REQUEST](t,e){t["mediaIsAirplaying"].set(!0,e)}};var pc=({media:t,fullscreenElement:e,documentElement:i,stateMediator:a=Qi,requestMap:r=hc,options:o={},monitorStateOwnersOnlyWithSubscriptions:s=!0})=>{let d=[],u={options:{...o}},f=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0}),y=g=>{g!=null&&(Qo(g,f)||(f=Object.freeze({...f,...g}),d.forEach(S=>S(f))))},A=()=>{let g=Object.entries(a).reduce((S,[C,{get:j}])=>(S[C]=j(u),S),{});y(g)},E={},p,k=async(g,S)=>{var C,j,Ue,Nt,gt,Ce,we,Ut,Qe,Fa,Va,Ka,Ga,Ya,qa,Za;let So=!!p;if(p={...u,...p!=null?p:{},...g},So)return;await mc(...Object.values(g));let _t=d.length>0&&S===0&&s,za=u.media!==p.media,Qa=((C=u.media)==null?void 0:C.textTracks)!==((j=p.media)==null?void 0:j.textTracks),Xa=((Ue=u.media)==null?void 0:Ue.videoRenditions)!==((Nt=p.media)==null?void 0:Nt.videoRenditions),Ja=((gt=u.media)==null?void 0:gt.audioTracks)!==((Ce=p.media)==null?void 0:Ce.audioTracks),ja=((we=u.media)==null?void 0:we.remote)!==((Ut=p.media)==null?void 0:Ut.remote),er=u.documentElement!==p.documentElement,tr=!!u.media&&(za||_t),vu=!!((Qe=u.media)!=null&&Qe.textTracks)&&(Qa||_t),Eu=!!((Fa=u.media)!=null&&Fa.videoRenditions)&&(Xa||_t),bu=!!((Va=u.media)!=null&&Va.audioTracks)&&(Ja||_t),gu=!!((Ka=u.media)!=null&&Ka.remote)&&(ja||_t),_u=!!u.documentElement&&(er||_t),Qs=tr||vu||Eu||bu||gu||_u,Hi=d.length===0&&S===1&&s,Au=!!p.media&&(za||Hi),Tu=!!((Ga=p.media)!=null&&Ga.textTracks)&&(Qa||Hi),yu=!!((Ya=p.media)!=null&&Ya.videoRenditions)&&(Xa||Hi),ku=!!((qa=p.media)!=null&&qa.audioTracks)&&(Ja||Hi),Su=!!((Za=p.media)!=null&&Za.remote)&&(ja||Hi),Iu=!!p.documentElement&&(er||Hi),Mu=Au||Tu||yu||ku||Su||Iu;if(!(Qs||Mu)){Object.entries(p).forEach(([F,ir])=>{u[F]=ir}),A(),p=void 0;return}Object.entries(a).forEach(([F,{get:ir,mediaEvents:Rh=[],textTracksEvents:xh=[],videoRenditionsEvents:Dh=[],audioTracksEvents:Oh=[],remoteEvents:Ph=[],rootEvents:Nh=[],stateOwnersUpdateHandlers:Uh=[]}])=>{E[F]||(E[F]={});let ke=Q=>{let ie=ir(u,Q);y({[F]:ie})},ne;ne=E[F].mediaEvents,Rh.forEach(Q=>{ne&&tr&&(u.media.removeEventListener(Q,ne),E[F].mediaEvents=void 0),Au&&(p.media.addEventListener(Q,ke),E[F].mediaEvents=ke)}),ne=E[F].textTracksEvents,xh.forEach(Q=>{var ie,He;ne&&vu&&((ie=u.media.textTracks)==null||ie.removeEventListener(Q,ne),E[F].textTracksEvents=void 0),Tu&&((He=p.media.textTracks)==null||He.addEventListener(Q,ke),E[F].textTracksEvents=ke)}),ne=E[F].videoRenditionsEvents,Dh.forEach(Q=>{var ie,He;ne&&Eu&&((ie=u.media.videoRenditions)==null||ie.removeEventListener(Q,ne),E[F].videoRenditionsEvents=void 0),yu&&((He=p.media.videoRenditions)==null||He.addEventListener(Q,ke),E[F].videoRenditionsEvents=ke)}),ne=E[F].audioTracksEvents,Oh.forEach(Q=>{var ie,He;ne&&bu&&((ie=u.media.audioTracks)==null||ie.removeEventListener(Q,ne),E[F].audioTracksEvents=void 0),ku&&((He=p.media.audioTracks)==null||He.addEventListener(Q,ke),E[F].audioTracksEvents=ke)}),ne=E[F].remoteEvents,Ph.forEach(Q=>{var ie,He;ne&&gu&&((ie=u.media.remote)==null||ie.removeEventListener(Q,ne),E[F].remoteEvents=void 0),Su&&((He=p.media.remote)==null||He.addEventListener(Q,ke),E[F].remoteEvents=ke)}),ne=E[F].rootEvents,Nh.forEach(Q=>{ne&&_u&&(u.documentElement.removeEventListener(Q,ne),E[F].rootEvents=void 0),Iu&&(p.documentElement.addEventListener(Q,ke),E[F].rootEvents=ke)});let Io=E[F].stateOwnersUpdateHandlers;if(Io&&Qs&&(Array.isArray(Io)?Io:[Io]).forEach(ie=>{typeof ie=="function"&&ie()}),Mu){let Q=Uh.map(ie=>ie(ke,p)).filter(ie=>typeof ie=="function");E[F].stateOwnersUpdateHandlers=Q.length===1?Q[0]:Q}else Qs&&(E[F].stateOwnersUpdateHandlers=void 0)}),Object.entries(p).forEach(([F,ir])=>{u[F]=ir}),A(),p=void 0};return k({media:t,fullscreenElement:e,documentElement:i,options:o}),{dispatch(g){let{type:S,detail:C}=g;if(r[S]&&f.mediaErrorCode==null){y(r[S](a,u,g));return}S==="mediaelementchangerequest"?k({media:C}):S==="fullscreenelementchangerequest"?k({fullscreenElement:C}):S==="documentelementchangerequest"?k({documentElement:C}):S==="optionschangerequest"&&(Object.entries(C!=null?C:{}).forEach(([j,Ue])=>{u.options[j]=Ue}),A())},getState(){return f},subscribe(g){return k({},d.length+1),d.push(g),g(f),()=>{let S=d.indexOf(g);S>=0&&(k({},d.length-1),d.splice(S,1))}}}};var _l=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},_=(t,e,i)=>(_l(t,e,"read from private field"),i?i.call(t):e.get(t)),Re=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ke=(t,e,i,a)=>(_l(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),hr=(t,e,i)=>(_l(t,e,"access private method"),i),St,pr,H,je,fr,Je,Jo,vr,jo,vl,fi,en,El,bl,Ac,Tc=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," ","f","m","k","c","l","j",">","<","p"],fc=10,vc=.025,Ec=.25,kp=.25,Sp=2,v={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",DEFAULT_DURATION:"defaultduration",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYBOARD_BACKWARD_SEEK_OFFSET:"keyboardbackwardseekoffset",KEYBOARD_FORWARD_SEEK_OFFSET:"keyboardforwardseekoffset",KEYBOARD_DOWN_VOLUME_STEP:"keyboarddownvolumestep",KEYBOARD_UP_VOLUME_STEP:"keyboardupvolumestep",KEYS_USED:"keysused",LANG:"lang",LOOP:"loop",LIVE_EDGE_OFFSET:"liveedgeoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_DEFAULT_STORE:"nodefaultstore",NO_HOTKEYS:"nohotkeys",NO_MUTED_PREF:"nomutedpref",NO_SUBTITLES_LANG_PREF:"nosubtitleslangpref",NO_VOLUME_PREF:"novolumepref",SEEK_TO_LIVE_OFFSET:"seektoliveoffset"},tn=class extends di{constructor(){super(),Re(this,jo),Re(this,en),Re(this,bl),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,Re(this,St,new Wt(this,v.HOTKEYS)),Re(this,pr,void 0),Re(this,H,void 0),Re(this,je,null),Re(this,fr,void 0),Re(this,Je,void 0),Re(this,Jo,i=>{var a;(a=_(this,H))==null||a.dispatch(i)}),Re(this,vr,void 0),Re(this,fi,i=>{let{key:a,shiftKey:r}=i;if(!(r&&(a==="/"||a==="?")||Tc.includes(a))){this.removeEventListener("keyup",_(this,fi));return}this.keyboardShortcutHandler(i)}),this.associateElement(this);let e={};Ke(this,fr,i=>{Object.entries(i).forEach(([a,r])=>{if(a in e&&e[a]===r)return;this.propagateMediaState(a,r);let o=a.toLowerCase(),s=new l.CustomEvent(xu[o],{composed:!0,detail:r});this.dispatchEvent(s)}),e=i})}static get observedAttributes(){return super.observedAttributes.concat(v.NO_HOTKEYS,v.HOTKEYS,v.DEFAULT_STREAM_TYPE,v.DEFAULT_SUBTITLES,v.DEFAULT_DURATION,v.NO_MUTED_PREF,v.NO_VOLUME_PREF,v.LANG,v.LOOP,v.LIVE_EDGE_OFFSET,v.SEEK_TO_LIVE_OFFSET,v.NO_AUTO_SEEK_TO_LIVE)}get mediaStore(){return _(this,H)}set mediaStore(e){var i,a;if(_(this,H)&&((i=_(this,Je))==null||i.call(this),Ke(this,Je,void 0)),Ke(this,H,e),!_(this,H)&&!this.hasAttribute(v.NO_DEFAULT_STORE)){hr(this,jo,vl).call(this);return}Ke(this,Je,(a=_(this,H))==null?void 0:a.subscribe(_(this,fr)))}get fullscreenElement(){var e;return(e=_(this,pr))!=null?e:this}set fullscreenElement(e){var i;this.hasAttribute(v.FULLSCREEN_ELEMENT)&&this.removeAttribute(v.FULLSCREEN_ELEMENT),Ke(this,pr,e),(i=_(this,H))==null||i.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return M(this,v.DEFAULT_SUBTITLES)}set defaultSubtitles(e){L(this,v.DEFAULT_SUBTITLES,e)}get defaultStreamType(){return x(this,v.DEFAULT_STREAM_TYPE)}set defaultStreamType(e){w(this,v.DEFAULT_STREAM_TYPE,e)}get defaultDuration(){return P(this,v.DEFAULT_DURATION)}set defaultDuration(e){U(this,v.DEFAULT_DURATION,e)}get noHotkeys(){return M(this,v.NO_HOTKEYS)}set noHotkeys(e){L(this,v.NO_HOTKEYS,e)}get keysUsed(){return x(this,v.KEYS_USED)}set keysUsed(e){w(this,v.KEYS_USED,e)}get liveEdgeOffset(){return P(this,v.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){U(this,v.LIVE_EDGE_OFFSET,e)}get noAutoSeekToLive(){return M(this,v.NO_AUTO_SEEK_TO_LIVE)}set noAutoSeekToLive(e){L(this,v.NO_AUTO_SEEK_TO_LIVE,e)}get noVolumePref(){return M(this,v.NO_VOLUME_PREF)}set noVolumePref(e){L(this,v.NO_VOLUME_PREF,e)}get noMutedPref(){return M(this,v.NO_MUTED_PREF)}set noMutedPref(e){L(this,v.NO_MUTED_PREF,e)}get noSubtitlesLangPref(){return M(this,v.NO_SUBTITLES_LANG_PREF)}set noSubtitlesLangPref(e){L(this,v.NO_SUBTITLES_LANG_PREF,e)}get noDefaultStore(){return M(this,v.NO_DEFAULT_STORE)}set noDefaultStore(e){L(this,v.NO_DEFAULT_STORE,e)}attributeChangedCallback(e,i,a){var r,o,s,d,u,f,y,A,E,p,k,g;if(super.attributeChangedCallback(e,i,a),e===v.NO_HOTKEYS)a!==i&&a===""?(this.hasAttribute(v.HOTKEYS)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==i&&a===null&&this.enableHotkeys();else if(e===v.HOTKEYS)_(this,St).value=a;else if(e===v.DEFAULT_SUBTITLES&&a!==i)(r=_(this,H))==null||r.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(v.DEFAULT_SUBTITLES)}});else if(e===v.DEFAULT_STREAM_TYPE)(s=_(this,H))==null||s.dispatch({type:"optionschangerequest",detail:{defaultStreamType:(o=this.getAttribute(v.DEFAULT_STREAM_TYPE))!=null?o:void 0}});else if(e===v.LIVE_EDGE_OFFSET&&a!==i)(d=_(this,H))==null||d.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(v.LIVE_EDGE_OFFSET)?+this.getAttribute(v.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(v.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(v.SEEK_TO_LIVE_OFFSET):this.hasAttribute(v.LIVE_EDGE_OFFSET)?+this.getAttribute(v.LIVE_EDGE_OFFSET):void 0}});else if(e===v.SEEK_TO_LIVE_OFFSET&&a!==i)(u=_(this,H))==null||u.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(v.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(v.SEEK_TO_LIVE_OFFSET):this.hasAttribute(v.LIVE_EDGE_OFFSET)?+this.getAttribute(v.LIVE_EDGE_OFFSET):void 0}});else if(e===v.NO_AUTO_SEEK_TO_LIVE)(f=_(this,H))==null||f.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(v.NO_AUTO_SEEK_TO_LIVE)}});else if(e===v.FULLSCREEN_ELEMENT){let S=a?(y=this.getRootNode())==null?void 0:y.getElementById(a):void 0;Ke(this,pr,S),(A=_(this,H))==null||A.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===v.LANG&&a!==i?(Wu(a),(E=_(this,H))==null||E.dispatch({type:"optionschangerequest",detail:{mediaLang:a}})):e===v.LOOP&&a!==i?(p=_(this,H))==null||p.dispatch({type:h.MEDIA_LOOP_REQUEST,detail:a!=null}):e===v.NO_VOLUME_PREF&&a!==i?(k=_(this,H))==null||k.dispatch({type:"optionschangerequest",detail:{noVolumePref:this.hasAttribute(v.NO_VOLUME_PREF)}}):e===v.NO_MUTED_PREF&&a!==i&&((g=_(this,H))==null||g.dispatch({type:"optionschangerequest",detail:{noMutedPref:this.hasAttribute(v.NO_MUTED_PREF)}}))}connectedCallback(){var e,i,a;this.associateElement(this),!_(this,H)&&!this.hasAttribute(v.NO_DEFAULT_STORE)&&hr(this,jo,vl).call(this),(e=_(this,H))==null||e.dispatch({type:"documentelementchangerequest",detail:V}),(i=_(this,H))==null||i.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement}),super.connectedCallback(),_(this,H)&&!_(this,Je)&&Ke(this,Je,(a=_(this,H))==null?void 0:a.subscribe(_(this,fr))),_(this,vr)!==void 0&&_(this,H)&&this.media&&setTimeout(()=>{var r,o,s;(o=(r=this.media)==null?void 0:r.textTracks)!=null&&o.length&&((s=_(this,H))==null||s.dispatch({type:h.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:_(this,vr)}))},0),this.hasAttribute(v.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var e,i,a,r,o,s;if((e=super.disconnectedCallback)==null||e.call(this),this.disableHotkeys(),_(this,H)){let d=_(this,H).getState();Ke(this,vr,!!((i=d.mediaSubtitlesShowing)!=null&&i.length)),(a=_(this,H))==null||a.dispatch({type:"fullscreenelementchangerequest",detail:void 0}),(r=_(this,H))==null||r.dispatch({type:"documentelementchangerequest",detail:void 0}),(o=_(this,H))==null||o.dispatch({type:h.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})}_(this,Je)&&((s=_(this,Je))==null||s.call(this),Ke(this,Je,void 0)),this.unassociateElement(this),_(this,je)&&(_(this,je).remove(),Ke(this,je,null))}mediaSetCallback(e){var i;super.mediaSetCallback(e),(i=_(this,H))==null||i.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var i;super.mediaUnsetCallback(e),(i=_(this,H))==null||i.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,i){_c(this.mediaStateReceivers,e,i)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:i}=this;if(i.has(e))return;let a=this.registerMediaStateReceiver.bind(this),r=this.unregisterMediaStateReceiver.bind(this),o=Rp(e,a,r);Object.values(h).forEach(s=>{e.addEventListener(s,_(this,Jo))}),i.set(e,o)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:i}=this;if(!i.has(e))return;i.get(e)(),i.delete(e),Object.values(h).forEach(r=>{e.removeEventListener(r,_(this,Jo))})}registerMediaStateReceiver(e){if(!e)return;let i=this.mediaStateReceivers;i.indexOf(e)>-1||(i.push(e),_(this,H)&&Object.entries(_(this,H).getState()).forEach(([r,o])=>{_c([e],r,o)}))}unregisterMediaStateReceiver(e){let i=this.mediaStateReceivers,a=i.indexOf(e);a<0||i.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",hr(this,en,El))}disableHotkeys(){this.removeEventListener("keydown",hr(this,en,El)),this.removeEventListener("keyup",_(this,fi))}get hotkeys(){return _(this,St)}set hotkeys(e){w(this,v.HOTKEYS,e)}keyboardShortcutHandler(e){var i,a,r,o,s,d,u,f,y;let A=e.target;if(((r=(a=(i=A.getAttribute(v.KEYS_USED))==null?void 0:i.split(" "))!=null?a:A==null?void 0:A.keysUsed)!=null?r:[]).map(C=>C==="Space"?" ":C).filter(Boolean).includes(e.key))return;let p,k,g;if(!(_(this,St).contains(`no${e.key.toLowerCase()}`)||e.key===" "&&_(this,St).contains("nospace")||e.shiftKey&&(e.key==="/"||e.key==="?")&&_(this,St).contains("noshift+/")))switch(e.key){case" ":case"k":p=_(this,H).getState().mediaPaused?h.MEDIA_PLAY_REQUEST:h.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new l.CustomEvent(p,{composed:!0,bubbles:!0}));break;case"m":p=this.mediaStore.getState().mediaVolumeLevel==="off"?h.MEDIA_UNMUTE_REQUEST:h.MEDIA_MUTE_REQUEST,this.dispatchEvent(new l.CustomEvent(p,{composed:!0,bubbles:!0}));break;case"f":p=this.mediaStore.getState().mediaIsFullscreen?h.MEDIA_EXIT_FULLSCREEN_REQUEST:h.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new l.CustomEvent(p,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new l.CustomEvent(h.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":case"j":{let C=this.hasAttribute(v.KEYBOARD_BACKWARD_SEEK_OFFSET)?+this.getAttribute(v.KEYBOARD_BACKWARD_SEEK_OFFSET):fc;k=Math.max(((o=this.mediaStore.getState().mediaCurrentTime)!=null?o:0)-C,0),g=new l.CustomEvent(h.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:k}),this.dispatchEvent(g);break}case"ArrowRight":case"l":{let C=this.hasAttribute(v.KEYBOARD_FORWARD_SEEK_OFFSET)?+this.getAttribute(v.KEYBOARD_FORWARD_SEEK_OFFSET):fc;k=Math.max(((s=this.mediaStore.getState().mediaCurrentTime)!=null?s:0)+C,0),g=new l.CustomEvent(h.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:k}),this.dispatchEvent(g);break}case"ArrowUp":{let C=this.hasAttribute(v.KEYBOARD_UP_VOLUME_STEP)?+this.getAttribute(v.KEYBOARD_UP_VOLUME_STEP):vc;k=Math.min(((d=this.mediaStore.getState().mediaVolume)!=null?d:1)+C,1),g=new l.CustomEvent(h.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:k}),this.dispatchEvent(g);break}case"ArrowDown":{let C=this.hasAttribute(v.KEYBOARD_DOWN_VOLUME_STEP)?+this.getAttribute(v.KEYBOARD_DOWN_VOLUME_STEP):vc;k=Math.max(((u=this.mediaStore.getState().mediaVolume)!=null?u:1)-C,0),g=new l.CustomEvent(h.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:k}),this.dispatchEvent(g);break}case"<":{let C=(f=this.mediaStore.getState().mediaPlaybackRate)!=null?f:1;k=Math.max(C-Ec,kp).toFixed(2),g=new l.CustomEvent(h.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:k}),this.dispatchEvent(g);break}case">":{let C=(y=this.mediaStore.getState().mediaPlaybackRate)!=null?y:1;k=Math.min(C+Ec,Sp).toFixed(2),g=new l.CustomEvent(h.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:k}),this.dispatchEvent(g);break}case"/":case"?":{e.shiftKey&&hr(this,bl,Ac).call(this);break}case"p":{p=this.mediaStore.getState().mediaIsPip?h.MEDIA_EXIT_PIP_REQUEST:h.MEDIA_ENTER_PIP_REQUEST,g=new l.CustomEvent(p,{composed:!0,bubbles:!0}),this.dispatchEvent(g);break}default:break}}};St=new WeakMap;pr=new WeakMap;H=new WeakMap;je=new WeakMap;fr=new WeakMap;Je=new WeakMap;Jo=new WeakMap;vr=new WeakMap;jo=new WeakSet;vl=function(){var t;this.mediaStore=pc({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(v.DEFAULT_SUBTITLES),defaultDuration:this.hasAttribute(v.DEFAULT_DURATION)?+this.getAttribute(v.DEFAULT_DURATION):void 0,defaultStreamType:(t=this.getAttribute(v.DEFAULT_STREAM_TYPE))!=null?t:void 0,liveEdgeOffset:this.hasAttribute(v.LIVE_EDGE_OFFSET)?+this.getAttribute(v.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(v.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(v.SEEK_TO_LIVE_OFFSET):this.hasAttribute(v.LIVE_EDGE_OFFSET)?+this.getAttribute(v.LIVE_EDGE_OFFSET):void 0,noAutoSeekToLive:this.hasAttribute(v.NO_AUTO_SEEK_TO_LIVE),noVolumePref:this.hasAttribute(v.NO_VOLUME_PREF),noMutedPref:this.hasAttribute(v.NO_MUTED_PREF),noSubtitlesLangPref:this.hasAttribute(v.NO_SUBTITLES_LANG_PREF)}})};fi=new WeakMap;en=new WeakSet;El=function(t){var e;let{metaKey:i,altKey:a,key:r,shiftKey:o}=t,s=o&&(r==="/"||r==="?");if(s&&((e=_(this,je))!=null&&e.open)){this.removeEventListener("keyup",_(this,fi));return}if(i||a||!s&&!Tc.includes(r)){this.removeEventListener("keyup",_(this,fi));return}let d=t.target,u=d instanceof HTMLElement&&(d.tagName.toLowerCase()==="media-volume-range"||d.tagName.toLowerCase()==="media-time-range");[" ","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&!(_(this,St).contains(`no${r.toLowerCase()}`)||r===" "&&_(this,St).contains("nospace"))&&!u&&t.preventDefault(),this.addEventListener("keyup",_(this,fi),{once:!0})};bl=new WeakSet;Ac=function(){_(this,je)||(Ke(this,je,V.createElement("media-keyboard-shortcuts-dialog")),this.appendChild(_(this,je))),_(this,je).open=!0};var Ip=Object.values(n),Mp=Object.values(tl),yc=t=>{var e,i,a,r;let{observedAttributes:o}=t.constructor;!o&&((e=t.nodeName)!=null&&e.includes("-"))&&(l.customElements.upgrade(t),{observedAttributes:o}=t.constructor);let s=(r=(a=(i=t==null?void 0:t.getAttribute)==null?void 0:i.call(t,D.MEDIA_CHROME_ATTRIBUTES))==null?void 0:a.split)==null?void 0:r.call(a,/\s+/);return Array.isArray(o||s)?(o||s).filter(d=>Ip.includes(d)):[]},Lp=t=>{var e,i;return(e=t.nodeName)!=null&&e.includes("-")&&l.customElements.get((i=t.nodeName)==null?void 0:i.toLowerCase())&&!(t instanceof l.customElements.get(t.nodeName.toLowerCase()))&&l.customElements.upgrade(t),Mp.some(a=>a in t)},gl=t=>Lp(t)||!!yc(t).length,bc=t=>{var e;return(e=t==null?void 0:t.join)==null?void 0:e.call(t,":")},gc={[n.MEDIA_SUBTITLES_LIST]:kt,[n.MEDIA_SUBTITLES_SHOWING]:kt,[n.MEDIA_SEEKABLE]:bc,[n.MEDIA_BUFFERED]:t=>t==null?void 0:t.map(bc).join(" "),[n.MEDIA_PREVIEW_COORDS]:t=>t==null?void 0:t.join(" "),[n.MEDIA_RENDITION_LIST]:Ou,[n.MEDIA_AUDIO_TRACK_LIST]:Nu},Cp=async(t,e,i)=>{var a,r;if(t.isConnected||await Co(0),typeof i=="boolean"||i==null)return L(t,e,i);if(typeof i=="number")return U(t,e,i);if(typeof i=="string")return w(t,e,i);if(Array.isArray(i)&&!i.length)return t.removeAttribute(e);let o=(r=(a=gc[e])==null?void 0:a.call(gc,i))!=null?r:i;return t.setAttribute(e,o)},wp=t=>{var e;return!!((e=t.closest)!=null&&e.call(t,'*[slot="media"]'))},pi=(t,e)=>{if(wp(t))return;let i=(r,o)=>{var s,d;gl(r)&&o(r);let{children:u=[]}=r!=null?r:{},f=(d=(s=r==null?void 0:r.shadowRoot)==null?void 0:s.children)!=null?d:[];[...u,...f].forEach(A=>pi(A,o))},a=t==null?void 0:t.nodeName.toLowerCase();if(a.includes("-")&&!gl(t)){l.customElements.whenDefined(a).then(()=>{i(t,e)});return}i(t,e)},_c=(t,e,i)=>{t.forEach(a=>{if(e in a){a[e]=i;return}let r=yc(a),o=e.toLowerCase();r.includes(o)&&Cp(a,o,i)})},Rp=(t,e,i)=>{pi(t,e);let a=y=>{var A;let E=(A=y==null?void 0:y.composedPath()[0])!=null?A:y.target;e(E)},r=y=>{var A;let E=(A=y==null?void 0:y.composedPath()[0])!=null?A:y.target;i(E)};t.addEventListener(h.REGISTER_MEDIA_STATE_RECEIVER,a),t.addEventListener(h.UNREGISTER_MEDIA_STATE_RECEIVER,r);let o=y=>{y.forEach(A=>{let{addedNodes:E=[],removedNodes:p=[],type:k,target:g,attributeName:S}=A;k==="childList"?(Array.prototype.forEach.call(E,C=>pi(C,e)),Array.prototype.forEach.call(p,C=>pi(C,i))):k==="attributes"&&S===D.MEDIA_CHROME_ATTRIBUTES&&(gl(g)?e(g):i(g))})},s=[],d=y=>{let A=y.target;A.name!=="media"&&(s.forEach(E=>pi(E,i)),s=[...A.assignedElements({flatten:!0})],s.forEach(E=>pi(E,e)))};t.addEventListener("slotchange",d);let u=new MutationObserver(o);return u.observe(t,{childList:!0,attributes:!0,subtree:!0}),()=>{pi(t,i),t.removeEventListener("slotchange",d),u.disconnect(),t.removeEventListener(h.REGISTER_MEDIA_STATE_RECEIVER,a),t.removeEventListener(h.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};l.customElements.get("media-controller")||l.customElements.define("media-controller",tn);var Al=tn;var Xi={PLACEMENT:"placement",BOUNDS:"bounds"};function xp(t){return`
159
+ `}var sp=Object.values(o),lp="sm:384 md:576 lg:768 xl:960";function dp(t){Ju(t.target,t.contentRect.width)}function Ju(t,e){var i;if(!t.isConnected)return;let a=(i=t.getAttribute(I.BREAKPOINTS))!=null?i:lp,r=up(a),n=cp(r,e),s=!1;if(Object.keys(r).forEach(d=>{if(n.includes(d)){t.hasAttribute(`breakpoint${d}`)||(t.setAttribute(`breakpoint${d}`,""),s=!0);return}t.hasAttribute(`breakpoint${d}`)&&(t.removeAttribute(`breakpoint${d}`),s=!0)}),s){let d=new CustomEvent(Ie.BREAKPOINTS_CHANGE,{detail:n});t.dispatchEvent(d)}t.breakpointsComputed||(t.breakpointsComputed=!0,t.dispatchEvent(new CustomEvent(Ie.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}function up(t){let e=t.split(/\s+/);return Object.fromEntries(e.map(i=>i.split(":")))}function cp(t,e){return Object.keys(t).filter(i=>e>=parseInt(t[i]))}var di=class extends l.HTMLElement{constructor(){if(super(),fe(this,sl),fe(this,ll),fe(this,dr),fe(this,Vn),fe(this,Yi),fe(this,lr,void 0),fe(this,Wn,0),fe(this,Fi,null),fe(this,Gi,null),fe(this,Ki,void 0),this.breakpointsComputed=!1,fe(this,ol,e=>{let i=this.media;for(let a of e){if(a.type!=="childList")continue;let r=a.removedNodes;for(let n of r){if(n.slot!="media"||a.target!=this)continue;let s=a.previousSibling&&a.previousSibling.previousElementSibling;if(!s||!i)this.mediaUnsetCallback(n);else{let d=s.slot!=="media";for(;(s=s.previousSibling)!==null;)s.slot=="media"&&(d=!1);d&&this.mediaUnsetCallback(n)}}if(i)for(let n of a.addedNodes)n===i&&this.handleMediaUpdated(i)}}),fe(this,Vi,!1),fe(this,Bn,e=>{ee(this,Vi)||(setTimeout(()=>{dp(e),Fe(this,Vi,!1)},0),Fe(this,Vi,!0))}),fe(this,$t,void 0),fe(this,$n,()=>{if(!ee(this,$t).assignedElements({flatten:!0}).length){ee(this,Fi)&&this.mediaUnsetCallback(ee(this,Fi));return}this.handleMediaUpdated(this.media)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}Fe(this,lr,new MutationObserver(ee(this,ol)))}static get observedAttributes(){return[I.AUTOHIDE,I.GESTURES_DISABLED].concat(sp).filter(e=>![o.MEDIA_RENDITION_LIST,o.MEDIA_AUDIO_TRACK_LIST,o.MEDIA_CHAPTERS_CUES,o.MEDIA_WIDTH,o.MEDIA_HEIGHT,o.MEDIA_ERROR,o.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,i,a){e.toLowerCase()==I.AUTOHIDE&&(this.autohide=a)}get media(){let e=this.querySelector(":scope > [slot=media]");return(e==null?void 0:e.nodeName)=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(Fe(this,Fi,e),e.localName.includes("-")&&await l.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;ee(this,lr).observe(this,{childList:!0,subtree:!0}),Tt(this,ee(this,Bn));let a=this.getAttribute(I.AUDIO)!=null?c("audio player"):c("video player");this.setAttribute("role","region"),this.setAttribute("aria-label",a),this.handleMediaUpdated(this.media),this.setAttribute(I.USER_INACTIVE,""),Ju(this,this.getBoundingClientRect().width);let r=this.querySelector(":scope > slot[slot=media]");r&&(Fe(this,$t,r),ee(this,$t).addEventListener("slotchange",ee(this,$n))),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),(e=l.window)==null||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;yt(this,ee(this,Bn)),clearTimeout(ee(this,Gi)),ee(this,lr).disconnect(),this.media&&this.mediaUnsetCallback(this.media),(e=l.window)==null||e.removeEventListener("mouseup",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointermove",this),this.removeEventListener("pointerup",this),this.removeEventListener("mouseleave",this),this.removeEventListener("keyup",this),ee(this,$t)&&(ee(this,$t).removeEventListener("slotchange",ee(this,$n)),Fe(this,$t,null)),Fe(this,Vi,!1)}mediaSetCallback(e){}mediaUnsetCallback(e){Fe(this,Fi,null)}handleEvent(e){switch(e.type){case"pointerdown":Fe(this,Wn,e.timeStamp);break;case"pointermove":Ve(this,sl,Qu).call(this,e);break;case"pointerup":Ve(this,ll,Xu).call(this,e);break;case"mouseleave":Ve(this,dr,Fn).call(this);break;case"mouseup":this.removeAttribute(I.KEYBOARD_CONTROL);break;case"keyup":Ve(this,Yi,ur).call(this),this.setAttribute(I.KEYBOARD_CONTROL,"");break}}set autohide(e){let i=Number(e);Fe(this,Ki,isNaN(i)?0:i)}get autohide(){return(ee(this,Ki)===void 0?2:ee(this,Ki)).toString()}get breakpoints(){return x(this,I.BREAKPOINTS)}set breakpoints(e){w(this,I.BREAKPOINTS,e)}get audio(){return M(this,I.AUDIO)}set audio(e){L(this,I.AUDIO,e)}get gesturesDisabled(){return M(this,I.GESTURES_DISABLED)}set gesturesDisabled(e){L(this,I.GESTURES_DISABLED,e)}get keyboardControl(){return M(this,I.KEYBOARD_CONTROL)}set keyboardControl(e){L(this,I.KEYBOARD_CONTROL,e)}get noAutohide(){return M(this,I.NO_AUTOHIDE)}set noAutohide(e){L(this,I.NO_AUTOHIDE,e)}get autohideOverControls(){return M(this,I.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){L(this,I.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return M(this,I.USER_INACTIVE)}set userInteractive(e){L(this,I.USER_INACTIVE,e)}};lr=new WeakMap;Wn=new WeakMap;Fi=new WeakMap;Gi=new WeakMap;Ki=new WeakMap;ol=new WeakMap;Vi=new WeakMap;Bn=new WeakMap;sl=new WeakSet;Qu=function(t){if(t.pointerType!=="mouse"&&t.timeStamp-ee(this,Wn)<250)return;Ve(this,Vn,ul).call(this),clearTimeout(ee(this,Gi));let e=this.hasAttribute(I.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(t.target)||e)&&Ve(this,Yi,ur).call(this)};ll=new WeakSet;Xu=function(t){if(t.pointerType==="touch"){let e=!this.hasAttribute(I.USER_INACTIVE);[this,this.media].includes(t.target)&&e?Ve(this,dr,Fn).call(this):Ve(this,Yi,ur).call(this)}else t.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(e==null?void 0:e.localName))&&Ve(this,Yi,ur).call(this)};dr=new WeakSet;Fn=function(){if(ee(this,Ki)<0||this.hasAttribute(I.USER_INACTIVE))return;this.setAttribute(I.USER_INACTIVE,"");let t=new l.CustomEvent(Ie.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(t)};Vn=new WeakSet;ul=function(){if(!this.hasAttribute(I.USER_INACTIVE))return;this.removeAttribute(I.USER_INACTIVE);let t=new l.CustomEvent(Ie.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(t)};Yi=new WeakSet;ur=function(){Ve(this,Vn,ul).call(this),clearTimeout(ee(this,Gi));let t=parseInt(this.autohide);t<0||Fe(this,Gi,setTimeout(()=>{Ve(this,dr,Fn).call(this)},t*1e3))};$t=new WeakMap;$n=new WeakMap;di.shadowRootOptions={mode:"open"};di.getTemplateHTML=op;l.customElements.get("media-container")||l.customElements.define("media-container",di);var ju=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},se=(t,e,i)=>(ju(t,e,"read from private field"),i?i.call(t):e.get(t)),cr=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Kn=(t,e,i,a)=>(ju(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),qi,Zi,Gn,ui,kt,Wt,Ft=class{constructor(e,i,{defaultValue:a}={defaultValue:void 0}){cr(this,kt),cr(this,qi,void 0),cr(this,Zi,void 0),cr(this,Gn,void 0),cr(this,ui,new Set),Kn(this,qi,e),Kn(this,Zi,i),Kn(this,Gn,new Set(a))}[Symbol.iterator](){return se(this,kt,Wt).values()}get length(){return se(this,kt,Wt).size}get value(){var e;return(e=[...se(this,kt,Wt)].join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(Kn(this,ui,new Set),this.add(...(i=e==null?void 0:e.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return[...se(this,kt,Wt)][e]}values(){return se(this,kt,Wt).values()}forEach(e,i){se(this,kt,Wt).forEach(e,i)}add(...e){var i,a;e.forEach(r=>se(this,ui).add(r)),!(this.value===""&&!((i=se(this,qi))!=null&&i.hasAttribute(`${se(this,Zi)}`)))&&((a=se(this,qi))==null||a.setAttribute(`${se(this,Zi)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>se(this,ui).delete(a)),(i=se(this,qi))==null||i.setAttribute(`${se(this,Zi)}`,`${this.value}`)}contains(e){return se(this,kt,Wt).has(e)}toggle(e,i){return typeof i!="undefined"?i?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,i){return this.remove(e),this.add(i),e===i}};qi=new WeakMap;Zi=new WeakMap;Gn=new WeakMap;ui=new WeakMap;kt=new WeakSet;Wt=function(){return se(this,ui).size?se(this,ui):se(this,Gn)};var mp=(t="")=>t.split(/\s+/),ec=(t="")=>{let[e,i,a]=t.split(":"),r=a?decodeURIComponent(a):void 0;return{kind:e==="cc"?_e.CAPTIONS:_e.SUBTITLES,language:i,label:r}},ci=(t="",e={})=>mp(t).map(i=>{let a=ec(i);return{...e,...a}}),cl=t=>t?Array.isArray(t)?t.map(e=>typeof e=="string"?ec(e):e):typeof t=="string"?ci(t):[t]:[],Yn=({kind:t,label:e,language:i}={kind:"subtitles"})=>e?`${t==="captions"?"cc":"sb"}:${i}:${encodeURIComponent(e)}`:i,St=(t=[])=>Array.prototype.map.call(t,Yn).join(" "),hp=(t,e)=>i=>i[t]===e,tc=t=>{let e=Object.entries(t).map(([i,a])=>hp(i,a));return i=>e.every(a=>a(i))},mi=(t,e=[],i=[])=>{let a=cl(i).map(tc),r=n=>a.some(s=>s(n));Array.from(e).filter(r).forEach(n=>{n.mode=t})},hi=(t,e=()=>!0)=>{if(!(t!=null&&t.textTracks))return[];let i=typeof e=="function"?e:tc(e);return Array.from(t.textTracks).filter(i)},qn=t=>{var e;return!!((e=t.mediaSubtitlesShowing)!=null&&e.length)||t.hasAttribute(o.MEDIA_SUBTITLES_SHOWING)};var ac=t=>{var e;let{media:i,fullscreenElement:a}=t;try{let r=a&&"requestFullscreen"in a?"requestFullscreen":a&&"webkitRequestFullScreen"in a?"webkitRequestFullScreen":void 0;if(r){let n=(e=a[r])==null?void 0:e.call(a);if(n instanceof Promise)return n.catch(()=>{})}else i!=null&&i.webkitEnterFullscreen?i.webkitEnterFullscreen():i!=null&&i.requestFullscreen&&i.requestFullscreen()}catch(r){console.error(r)}},ic="exitFullscreen"in V?"exitFullscreen":"webkitExitFullscreen"in V?"webkitExitFullscreen":"webkitCancelFullScreen"in V?"webkitCancelFullScreen":void 0,rc=t=>{var e;let{documentElement:i}=t;if(ic){let a=(e=i==null?void 0:i[ic])==null?void 0:e.call(i);if(a instanceof Promise)return a.catch(()=>{})}},mr="fullscreenElement"in V?"fullscreenElement":"webkitFullscreenElement"in V?"webkitFullscreenElement":void 0,pp=t=>{let{documentElement:e,media:i}=t,a=e==null?void 0:e[mr];return!a&&"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&i.webkitDisplayingFullscreen&&i.webkitPresentationMode===Du.FULLSCREEN?i:a},nc=t=>{var e;let{media:i,documentElement:a,fullscreenElement:r=i}=t;if(!i||!a)return!1;let n=pp(t);if(!n)return!1;if(n===r||n===i)return!0;if(n.localName.includes("-")){let s=n.shadowRoot;if(!(mr in s))return pe(n,r);for(;s!=null&&s[mr];){if(s[mr]===r)return!0;s=(e=s[mr])==null?void 0:e.shadowRoot}}return!1},fp="fullscreenEnabled"in V?"fullscreenEnabled":"webkitFullscreenEnabled"in V?"webkitFullscreenEnabled":void 0,oc=t=>{let{documentElement:e,media:i}=t;return!!(e!=null&&e[fp])||i&&"webkitSupportsFullscreen"in i};var Zn,ml=()=>{var t,e;return Zn||(Zn=(e=(t=V)==null?void 0:t.createElement)==null?void 0:e.call(t,"video"),Zn)},sc=async(t=ml())=>{if(!t)return!1;let e=t.volume;t.volume=e/2+.1;let i=new AbortController,a=await Promise.race([vp(t,i.signal),Ep(t,e)]);return i.abort(),a},vp=(t,e)=>new Promise(i=>{t.addEventListener("volumechange",()=>i(!0),{signal:e})}),Ep=async(t,e)=>{for(let i=0;i<10;i++){if(t.volume===e)return!1;await Cn(10)}return t.volume!==e},bp=/.*Version\/.*Safari\/.*/.test(l.navigator.userAgent),hl=(t=ml())=>l.matchMedia("(display-mode: standalone)").matches&&bp?!1:typeof(t==null?void 0:t.requestPictureInPicture)=="function",pl=(t=ml())=>oc({documentElement:V,media:t}),lc=pl(),dc=hl(),uc=!!l.WebKitPlaybackTargetAvailabilityEvent,cc=!!l.chrome;var zi=t=>hi(t.media,e=>[_e.SUBTITLES,_e.CAPTIONS].includes(e.kind)).sort((e,i)=>e.kind>=i.kind?1:-1),fl=t=>hi(t.media,e=>e.mode===Bt.SHOWING&&[_e.SUBTITLES,_e.CAPTIONS].includes(e.kind)),zn=(t,e)=>{let i=zi(t),a=fl(t),r=!!a.length;if(i.length){if(e===!1||r&&e!==!0)mi(Bt.DISABLED,i,a);else if(e===!0||!r&&e!==!1){let n=i[0],{options:s}=t;if(!(s!=null&&s.noSubtitlesLangPref)){let y=l.localStorage.getItem("media-chrome-pref-subtitles-lang"),A=y?[y,...l.navigator.languages]:l.navigator.languages,E=i.filter(p=>A.some(k=>p.language.toLowerCase().startsWith(k.split("-")[0]))).sort((p,k)=>{let g=A.findIndex(C=>p.language.toLowerCase().startsWith(C.split("-")[0])),S=A.findIndex(C=>k.language.toLowerCase().startsWith(C.split("-")[0]));return g-S});E[0]&&(n=E[0])}let{language:d,label:u,kind:f}=n;mi(Bt.DISABLED,i,a),mi(Bt.SHOWING,i,[{language:d,label:u,kind:f}])}}},Qn=(t,e)=>t===e?!0:t==null||e==null||typeof t!=typeof e?!1:typeof t=="number"&&Number.isNaN(t)&&Number.isNaN(e)?!0:typeof t!="object"?!1:Array.isArray(t)?gp(t,e):Object.entries(t).every(([i,a])=>i in e&&Qn(a,e[i])),gp=(t,e)=>{let i=Array.isArray(t),a=Array.isArray(e);return i!==a?!1:i||a?t.length!==e.length?!1:t.every((r,n)=>Qn(r,e[n])):!0};var _p=Object.values(Be),Xn,Ap=sc().then(t=>(Xn=t,Xn)),mc=async(...t)=>{await Promise.all(t.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof l.HTMLElement))return;let i=e.localName;if(!i.includes("-"))return;let a=l.customElements.get(i);a&&e instanceof a||(await l.customElements.whenDefined(i),l.customElements.upgrade(e))}))},Tp=new l.DOMParser,yp=t=>t&&(Tp.parseFromString(t,"text/html").body.textContent||t),Qi={mediaError:{get(t,e){let{media:i}=t;if((e==null?void 0:e.type)!=="playing")return i==null?void 0:i.error},mediaEvents:["emptied","error","playing"]},mediaErrorCode:{get(t,e){var i;let{media:a}=t;if((e==null?void 0:e.type)!=="playing")return(i=a==null?void 0:a.error)==null?void 0:i.code},mediaEvents:["emptied","error","playing"]},mediaErrorMessage:{get(t,e){var i,a;let{media:r}=t;if((e==null?void 0:e.type)!=="playing")return(a=(i=r==null?void 0:r.error)==null?void 0:i.message)!=null?a:""},mediaEvents:["emptied","error","playing"]},mediaWidth:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.videoWidth)!=null?e:0},mediaEvents:["resize"]},mediaHeight:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.videoHeight)!=null?e:0},mediaEvents:["resize"]},mediaPaused:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.paused)!=null?e:!0},set(t,e){var i;let{media:a}=e;a&&(t?a.pause():(i=a.play())==null||i.catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(t,e){let{media:i}=t;return i?e?e.type==="playing":!i.paused:!1},mediaEvents:["playing","emptied"]},mediaEnded:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.ended)!=null?e:!1},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.playbackRate)!=null?e:1},set(t,e){let{media:i}=e;i&&Number.isFinite(+t)&&(i.playbackRate=+t)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.muted)!=null?e:!1},set(t,e){let{media:i,options:{noMutedPref:a}={}}=e;if(i){i.muted=t;try{let r=l.localStorage.getItem("media-chrome-pref-muted")!==null,n=i.hasAttribute("muted");if(a){r&&l.localStorage.removeItem("media-chrome-pref-muted");return}if(n&&!r)return;l.localStorage.setItem("media-chrome-pref-muted",t?"true":"false")}catch(r){console.debug("Error setting muted pref",r)}}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{let{options:{noMutedPref:i}}=e,{media:a}=e;if(!(!a||a.muted||i))try{let r=l.localStorage.getItem("media-chrome-pref-muted")==="true";Qi.mediaMuted.set(r,e),t(r)}catch(r){console.debug("Error getting muted pref",r)}}]},mediaLoop:{get(t){let{media:e}=t;return e==null?void 0:e.loop},set(t,e){let{media:i}=e;i&&(i.loop=t)},mediaEvents:["medialooprequest"]},mediaVolume:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.volume)!=null?e:1},set(t,e){let{media:i,options:{noVolumePref:a}={}}=e;if(i){try{t==null?l.localStorage.removeItem("media-chrome-pref-volume"):!i.hasAttribute("muted")&&!a&&l.localStorage.setItem("media-chrome-pref-volume",t.toString())}catch(r){console.debug("Error setting volume pref",r)}Number.isFinite(+t)&&(i.volume=+t)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{let{options:{noVolumePref:i}}=e;if(!i)try{let{media:a}=e;if(!a)return;let r=l.localStorage.getItem("media-chrome-pref-volume");if(r==null)return;Qi.mediaVolume.set(+r,e),t(+r)}catch(a){console.debug("Error getting volume pref",a)}}]},mediaVolumeLevel:{get(t){let{media:e}=t;return typeof(e==null?void 0:e.volume)=="undefined"?"high":e.muted||e.volume===0?"off":e.volume<.5?"low":e.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get(t){var e;let{media:i}=t;return(e=i==null?void 0:i.currentTime)!=null?e:0},set(t,e){let{media:i}=e;!i||!$i(t)||(i.currentTime=t)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(t){let{media:e,options:{defaultDuration:i}={}}=t;return i&&(!e||!e.duration||Number.isNaN(e.duration)||!Number.isFinite(e.duration))?i:Number.isFinite(e==null?void 0:e.duration)?e.duration:Number.NaN},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(t){let{media:e}=t;return(e==null?void 0:e.readyState)<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(t){var e;let{media:i}=t;if(!((e=i==null?void 0:i.seekable)!=null&&e.length))return;let a=i.seekable.start(0),r=i.seekable.end(i.seekable.length-1);if(!(!a&&!r))return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get(t){var e;let{media:i}=t,a=(e=i==null?void 0:i.buffered)!=null?e:[];return Array.from(a).map((r,n)=>[Number(a.start(n).toFixed(3)),Number(a.end(n).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(t){let{media:e,options:{defaultStreamType:i}={}}=t,a=[Be.LIVE,Be.ON_DEMAND].includes(i)?i:void 0;if(!e)return a;let{streamType:r}=e;if(_p.includes(r))return r===Be.UNKNOWN?a:r;let n=e.duration;return n===1/0?Be.LIVE:Number.isFinite(n)?Be.ON_DEMAND:a},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(t){let{media:e}=t;if(!e)return Number.NaN;let{targetLiveWindow:i}=e,a=Qi.mediaStreamType.get(t);return(i==null||Number.isNaN(i))&&a===Be.LIVE?0:i},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(t){let{media:e,options:{liveEdgeOffset:i=10}={}}=t;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return Number.isNaN(e.liveEdgeStart)?!1:e.currentTime>=e.liveEdgeStart;if(!(Qi.mediaStreamType.get(t)===Be.LIVE))return!1;let r=e.seekable;if(!r)return!0;if(!r.length)return!1;let n=r.end(r.length-1)-i;return e.currentTime>=n},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get(t){return zi(t).map(({kind:e,label:i,language:a})=>({kind:e,label:i,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get(t){return fl(t).map(({kind:e,label:i,language:a})=>({kind:e,label:i,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var i,a;let{media:r,options:n}=e;if(!r)return;let s=d=>{var u;!n.defaultSubtitles||d&&![_e.CAPTIONS,_e.SUBTITLES].includes((u=d==null?void 0:d.track)==null?void 0:u.kind)||zn(e,!0)};return r.addEventListener("loadstart",s),(i=r.textTracks)==null||i.addEventListener("addtrack",s),(a=r.textTracks)==null||a.addEventListener("removetrack",s),()=>{var d,u;r.removeEventListener("loadstart",s),(d=r.textTracks)==null||d.removeEventListener("addtrack",s),(u=r.textTracks)==null||u.removeEventListener("removetrack",s)}}]},mediaChaptersCues:{get(t){var e;let{media:i}=t;if(!i)return[];let[a]=hi(i,{kind:_e.CHAPTERS});return Array.from((e=a==null?void 0:a.cues)!=null?e:[]).map(({text:r,startTime:n,endTime:s})=>({text:yp(r),startTime:n,endTime:s}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var i;let{media:a}=e;if(!a)return;let r=a.querySelector('track[kind="chapters"][default][src]'),n=(i=a.shadowRoot)==null?void 0:i.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return r==null||r.addEventListener("load",t),n==null||n.addEventListener("load",t),()=>{r==null||r.removeEventListener("load",t),n==null||n.removeEventListener("load",t)}}]},mediaIsPip:{get(t){var e,i;let{media:a,documentElement:r}=t;if(!a||!r||!r.pictureInPictureElement)return!1;if(r.pictureInPictureElement===a)return!0;if(r.pictureInPictureElement instanceof HTMLMediaElement)return(e=a.localName)!=null&&e.includes("-")?pe(a,r.pictureInPictureElement):!1;if(r.pictureInPictureElement.localName.includes("-")){let n=r.pictureInPictureElement.shadowRoot;for(;n!=null&&n.pictureInPictureElement;){if(n.pictureInPictureElement===a)return!0;n=(i=n.pictureInPictureElement)==null?void 0:i.shadowRoot}}return!1},set(t,e){let{media:i}=e;if(i)if(t){if(!V.pictureInPictureEnabled){console.warn("MediaChrome: Picture-in-picture is not enabled");return}if(!i.requestPictureInPicture){console.warn("MediaChrome: The current media does not support picture-in-picture");return}let a=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(r=>{if(r.code===11){if(!i.src){console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.");return}if(i.readyState===0&&i.preload==="none"){let n=()=>{i.removeEventListener("loadedmetadata",s),i.preload="none"},s=()=>{i.requestPictureInPicture().catch(a),n()};i.addEventListener("loadedmetadata",s),i.preload="metadata",setTimeout(()=>{i.readyState===0&&a(),n()},1e3)}else throw r}else throw r})}else V.pictureInPictureElement&&V.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(t){var e;let{media:i}=t;return[...(e=i==null?void 0:i.videoRenditions)!=null?e:[]].map(a=>({...a}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(t){var e,i,a;let{media:r}=t;return(a=(i=r==null?void 0:r.videoRenditions)==null?void 0:i[(e=r.videoRenditions)==null?void 0:e.selectedIndex])==null?void 0:a.id},set(t,e){let{media:i}=e;if(!(i!=null&&i.videoRenditions)){console.warn("MediaController: Rendition selection not supported by this media.");return}let a=t,r=Array.prototype.findIndex.call(i.videoRenditions,n=>n.id==a);i.videoRenditions.selectedIndex!=r&&(i.videoRenditions.selectedIndex=r)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(t){var e;let{media:i}=t;return[...(e=i==null?void 0:i.audioTracks)!=null?e:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(t){var e,i;let{media:a}=t;return(i=[...(e=a==null?void 0:a.audioTracks)!=null?e:[]].find(r=>r.enabled))==null?void 0:i.id},set(t,e){let{media:i}=e;if(!(i!=null&&i.audioTracks)){console.warn("MediaChrome: Audio track selection not supported by this media.");return}let a=t;for(let r of i.audioTracks)r.enabled=a==r.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get(t){return nc(t)},set(t,e,i){var a,r;t?(ac(e),i.detail&&!((a=e.media)!=null&&a.inert)&&((r=e.media)==null||r.focus())):rc(e)},rootEvents:["fullscreenchange","webkitfullscreenchange"],mediaEvents:["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"]},mediaIsCasting:{get(t){var e;let{media:i}=t;return!(i!=null&&i.remote)||((e=i.remote)==null?void 0:e.state)==="disconnected"?!1:!!i.remote.state},set(t,e){var i,a;let{media:r}=e;if(r&&!(t&&((i=r.remote)==null?void 0:i.state)!=="disconnected")&&!(!t&&((a=r.remote)==null?void 0:a.state)!=="connected")){if(typeof r.remote.prompt!="function"){console.warn("MediaChrome: Casting is not supported in this environment");return}r.remote.prompt().catch(()=>{})}},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get(){return!1},set(t,e){let{media:i}=e;if(i){if(!(i.webkitShowPlaybackTargetPicker&&l.WebKitPlaybackTargetAvailabilityEvent)){console.error("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment");return}i.webkitShowPlaybackTargetPicker()}},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(t){let{media:e}=t;if(!lc||!pl(e))return Ae.UNSUPPORTED}},mediaPipUnavailable:{get(t){let{media:e}=t;if(!dc||!hl(e))return Ae.UNSUPPORTED;if(e!=null&&e.disablePictureInPicture)return Ae.UNAVAILABLE}},mediaVolumeUnavailable:{get(t){let{media:e}=t;if(Xn===!1||(e==null?void 0:e.volume)==null)return Ae.UNSUPPORTED},stateOwnersUpdateHandlers:[t=>{Xn==null&&Ap.then(e=>t(e?void 0:Ae.UNSUPPORTED))}]},mediaCastUnavailable:{get(t,{availability:e="not-available"}={}){var i;let{media:a}=t;if(!cc||!((i=a==null?void 0:a.remote)!=null&&i.state))return Ae.UNSUPPORTED;if(!(e==null||e==="available"))return Ae.UNAVAILABLE},stateOwnersUpdateHandlers:[(t,e)=>{var i;let{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(i=a==null?void 0:a.remote)==null||i.watchAvailability(n=>{t({availability:n?"available":"not-available"})}).catch(n=>{n.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var n;(n=a==null?void 0:a.remote)==null||n.cancelWatchAvailability().catch(()=>{})}):void 0}]},mediaAirplayUnavailable:{get(t,e){if(!uc)return Ae.UNSUPPORTED;if((e==null?void 0:e.availability)==="not-available")return Ae.UNAVAILABLE},mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(t,e)=>{var i;let{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(i=a==null?void 0:a.remote)==null||i.watchAvailability(n=>{t({availability:n?"available":"not-available"})}).catch(n=>{n.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var n;(n=a==null?void 0:a.remote)==null||n.cancelWatchAvailability().catch(()=>{})}):void 0}]},mediaRenditionUnavailable:{get(t){var e;let{media:i}=t;if(!(i!=null&&i.videoRenditions))return Ae.UNSUPPORTED;if(!((e=i.videoRenditions)!=null&&e.length))return Ae.UNAVAILABLE},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(t){var e,i;let{media:a}=t;if(!(a!=null&&a.audioTracks))return Ae.UNSUPPORTED;if(((i=(e=a.audioTracks)==null?void 0:e.length)!=null?i:0)<=1)return Ae.UNAVAILABLE},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(t){let{options:{mediaLang:e}={}}=t;return e!=null?e:"en"}}};var hc={[h.MEDIA_PREVIEW_REQUEST](t,e,{detail:i}){var a,r,n;let{media:s}=e,d=i!=null?i:void 0,u,f;if(s&&d!=null){let[p]=hi(s,{kind:_e.METADATA,label:"thumbnails"}),k=Array.prototype.find.call((a=p==null?void 0:p.cues)!=null?a:[],(g,S,C)=>S===0?g.endTime>d:S===C.length-1?g.startTime<=d:g.startTime<=d&&g.endTime>d);if(k){let g=/'^(?:[a-z]+:)?\/\//i.test(k.text)||(r=s==null?void 0:s.querySelector('track[label="thumbnails"]'))==null?void 0:r.src,S=new URL(k.text,g);f=new URLSearchParams(S.hash).get("#xywh").split(",").map(j=>+j),u=S.href}}let y=t.mediaDuration.get(e),E=(n=t.mediaChaptersCues.get(e).find((p,k,g)=>k===g.length-1&&y===p.endTime?p.startTime<=d&&p.endTime>=d:p.startTime<=d&&p.endTime>d))==null?void 0:n.text;return i!=null&&E==null&&(E=""),{mediaPreviewTime:d,mediaPreviewImage:u,mediaPreviewCoords:f,mediaPreviewChapter:E}},[h.MEDIA_PAUSE_REQUEST](t,e){t["mediaPaused"].set(!0,e)},[h.MEDIA_PLAY_REQUEST](t,e){var i,a,r,n;let s="mediaPaused",u=t.mediaStreamType.get(e)===Be.LIVE,f=!((i=e.options)!=null&&i.noAutoSeekToLive),y=t.mediaTargetLiveWindow.get(e)>0;if(u&&f&&!y){let A=(a=t.mediaSeekable.get(e))==null?void 0:a[1];if(A){let E=(n=(r=e.options)==null?void 0:r.seekToLiveOffset)!=null?n:0,p=A-E;t.mediaCurrentTime.set(p,e)}}t[s].set(!1,e)},[h.MEDIA_PLAYBACK_RATE_REQUEST](t,e,{detail:i}){let a="mediaPlaybackRate",r=i;t[a].set(r,e)},[h.MEDIA_MUTE_REQUEST](t,e){t["mediaMuted"].set(!0,e)},[h.MEDIA_UNMUTE_REQUEST](t,e){let i="mediaMuted";t.mediaVolume.get(e)||t.mediaVolume.set(.25,e),t[i].set(!1,e)},[h.MEDIA_LOOP_REQUEST](t,e,{detail:i}){let a="mediaLoop",r=!!i;return t[a].set(r,e),{mediaLoop:r}},[h.MEDIA_VOLUME_REQUEST](t,e,{detail:i}){let a="mediaVolume",r=i;r&&t.mediaMuted.get(e)&&t.mediaMuted.set(!1,e),t[a].set(r,e)},[h.MEDIA_SEEK_REQUEST](t,e,{detail:i}){let a="mediaCurrentTime",r=i;t[a].set(r,e)},[h.MEDIA_SEEK_TO_LIVE_REQUEST](t,e){var i,a,r;let n="mediaCurrentTime",s=(i=t.mediaSeekable.get(e))==null?void 0:i[1];if(Number.isNaN(Number(s)))return;let d=(r=(a=e.options)==null?void 0:a.seekToLiveOffset)!=null?r:0,u=s-d;t[n].set(u,e)},[h.MEDIA_SHOW_SUBTITLES_REQUEST](t,e,{detail:i}){var a;let{options:r}=e,n=zi(e),s=cl(i),d=(a=s[0])==null?void 0:a.language;d&&!r.noSubtitlesLangPref&&l.localStorage.setItem("media-chrome-pref-subtitles-lang",d),mi(Bt.SHOWING,n,s)},[h.MEDIA_DISABLE_SUBTITLES_REQUEST](t,e,{detail:i}){let a=zi(e),r=i!=null?i:[];mi(Bt.DISABLED,a,r)},[h.MEDIA_TOGGLE_SUBTITLES_REQUEST](t,e,{detail:i}){zn(e,i)},[h.MEDIA_RENDITION_REQUEST](t,e,{detail:i}){let a="mediaRenditionSelected",r=i;t[a].set(r,e)},[h.MEDIA_AUDIO_TRACK_REQUEST](t,e,{detail:i}){let a="mediaAudioTrackEnabled",r=i;t[a].set(r,e)},[h.MEDIA_ENTER_PIP_REQUEST](t,e){let i="mediaIsPip";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[i].set(!0,e)},[h.MEDIA_EXIT_PIP_REQUEST](t,e){t["mediaIsPip"].set(!1,e)},[h.MEDIA_ENTER_FULLSCREEN_REQUEST](t,e,i){let a="mediaIsFullscreen";t.mediaIsPip.get(e)&&t.mediaIsPip.set(!1,e),t[a].set(!0,e,i)},[h.MEDIA_EXIT_FULLSCREEN_REQUEST](t,e){t["mediaIsFullscreen"].set(!1,e)},[h.MEDIA_ENTER_CAST_REQUEST](t,e){let i="mediaIsCasting";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[i].set(!0,e)},[h.MEDIA_EXIT_CAST_REQUEST](t,e){t["mediaIsCasting"].set(!1,e)},[h.MEDIA_AIRPLAY_REQUEST](t,e){t["mediaIsAirplaying"].set(!0,e)}};var pc=({media:t,fullscreenElement:e,documentElement:i,stateMediator:a=Qi,requestMap:r=hc,options:n={},monitorStateOwnersOnlyWithSubscriptions:s=!0})=>{let d=[],u={options:{...n}},f=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0}),y=g=>{g!=null&&(Qn(g,f)||(f=Object.freeze({...f,...g}),d.forEach(S=>S(f))))},A=()=>{let g=Object.entries(a).reduce((S,[C,{get:j}])=>(S[C]=j(u),S),{});y(g)},E={},p,k=async(g,S)=>{var C,j,Ue,Ut,_t,Ce,we,Ht,Xe,Fa,Va,Ka,Ga,Ya,qa,Za;let Sn=!!p;if(p={...u,...p!=null?p:{},...g},Sn)return;await mc(...Object.values(g));let At=d.length>0&&S===0&&s,za=u.media!==p.media,Qa=((C=u.media)==null?void 0:C.textTracks)!==((j=p.media)==null?void 0:j.textTracks),Xa=((Ue=u.media)==null?void 0:Ue.videoRenditions)!==((Ut=p.media)==null?void 0:Ut.videoRenditions),Ja=((_t=u.media)==null?void 0:_t.audioTracks)!==((Ce=p.media)==null?void 0:Ce.audioTracks),ja=((we=u.media)==null?void 0:we.remote)!==((Ht=p.media)==null?void 0:Ht.remote),er=u.documentElement!==p.documentElement,tr=!!u.media&&(za||At),vu=!!((Xe=u.media)!=null&&Xe.textTracks)&&(Qa||At),Eu=!!((Fa=u.media)!=null&&Fa.videoRenditions)&&(Xa||At),bu=!!((Va=u.media)!=null&&Va.audioTracks)&&(Ja||At),gu=!!((Ka=u.media)!=null&&Ka.remote)&&(ja||At),_u=!!u.documentElement&&(er||At),Qs=tr||vu||Eu||bu||gu||_u,Hi=d.length===0&&S===1&&s,Au=!!p.media&&(za||Hi),Tu=!!((Ga=p.media)!=null&&Ga.textTracks)&&(Qa||Hi),yu=!!((Ya=p.media)!=null&&Ya.videoRenditions)&&(Xa||Hi),ku=!!((qa=p.media)!=null&&qa.audioTracks)&&(Ja||Hi),Su=!!((Za=p.media)!=null&&Za.remote)&&(ja||Hi),Iu=!!p.documentElement&&(er||Hi),Mu=Au||Tu||yu||ku||Su||Iu;if(!(Qs||Mu)){Object.entries(p).forEach(([F,ir])=>{u[F]=ir}),A(),p=void 0;return}Object.entries(a).forEach(([F,{get:ir,mediaEvents:Rh=[],textTracksEvents:xh=[],videoRenditionsEvents:Dh=[],audioTracksEvents:Oh=[],remoteEvents:Nh=[],rootEvents:Ph=[],stateOwnersUpdateHandlers:Uh=[]}])=>{E[F]||(E[F]={});let ke=Q=>{let ie=ir(u,Q);y({[F]:ie})},oe;oe=E[F].mediaEvents,Rh.forEach(Q=>{oe&&tr&&(u.media.removeEventListener(Q,oe),E[F].mediaEvents=void 0),Au&&(p.media.addEventListener(Q,ke),E[F].mediaEvents=ke)}),oe=E[F].textTracksEvents,xh.forEach(Q=>{var ie,He;oe&&vu&&((ie=u.media.textTracks)==null||ie.removeEventListener(Q,oe),E[F].textTracksEvents=void 0),Tu&&((He=p.media.textTracks)==null||He.addEventListener(Q,ke),E[F].textTracksEvents=ke)}),oe=E[F].videoRenditionsEvents,Dh.forEach(Q=>{var ie,He;oe&&Eu&&((ie=u.media.videoRenditions)==null||ie.removeEventListener(Q,oe),E[F].videoRenditionsEvents=void 0),yu&&((He=p.media.videoRenditions)==null||He.addEventListener(Q,ke),E[F].videoRenditionsEvents=ke)}),oe=E[F].audioTracksEvents,Oh.forEach(Q=>{var ie,He;oe&&bu&&((ie=u.media.audioTracks)==null||ie.removeEventListener(Q,oe),E[F].audioTracksEvents=void 0),ku&&((He=p.media.audioTracks)==null||He.addEventListener(Q,ke),E[F].audioTracksEvents=ke)}),oe=E[F].remoteEvents,Nh.forEach(Q=>{var ie,He;oe&&gu&&((ie=u.media.remote)==null||ie.removeEventListener(Q,oe),E[F].remoteEvents=void 0),Su&&((He=p.media.remote)==null||He.addEventListener(Q,ke),E[F].remoteEvents=ke)}),oe=E[F].rootEvents,Ph.forEach(Q=>{oe&&_u&&(u.documentElement.removeEventListener(Q,oe),E[F].rootEvents=void 0),Iu&&(p.documentElement.addEventListener(Q,ke),E[F].rootEvents=ke)});let In=E[F].stateOwnersUpdateHandlers;if(In&&Qs&&(Array.isArray(In)?In:[In]).forEach(ie=>{typeof ie=="function"&&ie()}),Mu){let Q=Uh.map(ie=>ie(ke,p)).filter(ie=>typeof ie=="function");E[F].stateOwnersUpdateHandlers=Q.length===1?Q[0]:Q}else Qs&&(E[F].stateOwnersUpdateHandlers=void 0)}),Object.entries(p).forEach(([F,ir])=>{u[F]=ir}),A(),p=void 0};return k({media:t,fullscreenElement:e,documentElement:i,options:n}),{dispatch(g){let{type:S,detail:C}=g;if(r[S]&&f.mediaErrorCode==null){y(r[S](a,u,g));return}S==="mediaelementchangerequest"?k({media:C}):S==="fullscreenelementchangerequest"?k({fullscreenElement:C}):S==="documentelementchangerequest"?k({documentElement:C}):S==="optionschangerequest"&&(Object.entries(C!=null?C:{}).forEach(([j,Ue])=>{u.options[j]=Ue}),A())},getState(){return f},subscribe(g){return k({},d.length+1),d.push(g),g(f),()=>{let S=d.indexOf(g);S>=0&&(k({},d.length-1),d.splice(S,1))}}}};var _l=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},_=(t,e,i)=>(_l(t,e,"read from private field"),i?i.call(t):e.get(t)),Re=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ke=(t,e,i,a)=>(_l(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),hr=(t,e,i)=>(_l(t,e,"access private method"),i),It,pr,H,et,fr,je,Jn,vr,jn,vl,fi,eo,El,bl,Ac,Tc=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," ","f","m","k","c","l","j",">","<","p"],fc=10,vc=.025,Ec=.25,kp=.25,Sp=2,v={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",DEFAULT_DURATION:"defaultduration",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYBOARD_BACKWARD_SEEK_OFFSET:"keyboardbackwardseekoffset",KEYBOARD_FORWARD_SEEK_OFFSET:"keyboardforwardseekoffset",KEYBOARD_DOWN_VOLUME_STEP:"keyboarddownvolumestep",KEYBOARD_UP_VOLUME_STEP:"keyboardupvolumestep",KEYS_USED:"keysused",LANG:"lang",LOOP:"loop",LIVE_EDGE_OFFSET:"liveedgeoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_DEFAULT_STORE:"nodefaultstore",NO_HOTKEYS:"nohotkeys",NO_MUTED_PREF:"nomutedpref",NO_SUBTITLES_LANG_PREF:"nosubtitleslangpref",NO_VOLUME_PREF:"novolumepref",SEEK_TO_LIVE_OFFSET:"seektoliveoffset"},to=class extends di{constructor(){super(),Re(this,jn),Re(this,eo),Re(this,bl),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,Re(this,It,new Ft(this,v.HOTKEYS)),Re(this,pr,void 0),Re(this,H,void 0),Re(this,et,null),Re(this,fr,void 0),Re(this,je,void 0),Re(this,Jn,i=>{var a;(a=_(this,H))==null||a.dispatch(i)}),Re(this,vr,void 0),Re(this,fi,i=>{let{key:a,shiftKey:r}=i;if(!(r&&(a==="/"||a==="?")||Tc.includes(a))){this.removeEventListener("keyup",_(this,fi));return}this.keyboardShortcutHandler(i)}),this.associateElement(this);let e={};Ke(this,fr,i=>{Object.entries(i).forEach(([a,r])=>{if(a in e&&e[a]===r)return;this.propagateMediaState(a,r);let n=a.toLowerCase(),s=new l.CustomEvent(xu[n],{composed:!0,detail:r});this.dispatchEvent(s)}),e=i})}static get observedAttributes(){return super.observedAttributes.concat(v.NO_HOTKEYS,v.HOTKEYS,v.DEFAULT_STREAM_TYPE,v.DEFAULT_SUBTITLES,v.DEFAULT_DURATION,v.NO_MUTED_PREF,v.NO_VOLUME_PREF,v.LANG,v.LOOP,v.LIVE_EDGE_OFFSET,v.SEEK_TO_LIVE_OFFSET,v.NO_AUTO_SEEK_TO_LIVE)}get mediaStore(){return _(this,H)}set mediaStore(e){var i,a;if(_(this,H)&&((i=_(this,je))==null||i.call(this),Ke(this,je,void 0)),Ke(this,H,e),!_(this,H)&&!this.hasAttribute(v.NO_DEFAULT_STORE)){hr(this,jn,vl).call(this);return}Ke(this,je,(a=_(this,H))==null?void 0:a.subscribe(_(this,fr)))}get fullscreenElement(){var e;return(e=_(this,pr))!=null?e:this}set fullscreenElement(e){var i;this.hasAttribute(v.FULLSCREEN_ELEMENT)&&this.removeAttribute(v.FULLSCREEN_ELEMENT),Ke(this,pr,e),(i=_(this,H))==null||i.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return M(this,v.DEFAULT_SUBTITLES)}set defaultSubtitles(e){L(this,v.DEFAULT_SUBTITLES,e)}get defaultStreamType(){return x(this,v.DEFAULT_STREAM_TYPE)}set defaultStreamType(e){w(this,v.DEFAULT_STREAM_TYPE,e)}get defaultDuration(){return N(this,v.DEFAULT_DURATION)}set defaultDuration(e){U(this,v.DEFAULT_DURATION,e)}get noHotkeys(){return M(this,v.NO_HOTKEYS)}set noHotkeys(e){L(this,v.NO_HOTKEYS,e)}get keysUsed(){return x(this,v.KEYS_USED)}set keysUsed(e){w(this,v.KEYS_USED,e)}get liveEdgeOffset(){return N(this,v.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){U(this,v.LIVE_EDGE_OFFSET,e)}get noAutoSeekToLive(){return M(this,v.NO_AUTO_SEEK_TO_LIVE)}set noAutoSeekToLive(e){L(this,v.NO_AUTO_SEEK_TO_LIVE,e)}get noVolumePref(){return M(this,v.NO_VOLUME_PREF)}set noVolumePref(e){L(this,v.NO_VOLUME_PREF,e)}get noMutedPref(){return M(this,v.NO_MUTED_PREF)}set noMutedPref(e){L(this,v.NO_MUTED_PREF,e)}get noSubtitlesLangPref(){return M(this,v.NO_SUBTITLES_LANG_PREF)}set noSubtitlesLangPref(e){L(this,v.NO_SUBTITLES_LANG_PREF,e)}get noDefaultStore(){return M(this,v.NO_DEFAULT_STORE)}set noDefaultStore(e){L(this,v.NO_DEFAULT_STORE,e)}attributeChangedCallback(e,i,a){var r,n,s,d,u,f,y,A,E,p,k,g;if(super.attributeChangedCallback(e,i,a),e===v.NO_HOTKEYS)a!==i&&a===""?(this.hasAttribute(v.HOTKEYS)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==i&&a===null&&this.enableHotkeys();else if(e===v.HOTKEYS)_(this,It).value=a;else if(e===v.DEFAULT_SUBTITLES&&a!==i)(r=_(this,H))==null||r.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(v.DEFAULT_SUBTITLES)}});else if(e===v.DEFAULT_STREAM_TYPE)(s=_(this,H))==null||s.dispatch({type:"optionschangerequest",detail:{defaultStreamType:(n=this.getAttribute(v.DEFAULT_STREAM_TYPE))!=null?n:void 0}});else if(e===v.LIVE_EDGE_OFFSET&&a!==i)(d=_(this,H))==null||d.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(v.LIVE_EDGE_OFFSET)?+this.getAttribute(v.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(v.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(v.SEEK_TO_LIVE_OFFSET):this.hasAttribute(v.LIVE_EDGE_OFFSET)?+this.getAttribute(v.LIVE_EDGE_OFFSET):void 0}});else if(e===v.SEEK_TO_LIVE_OFFSET&&a!==i)(u=_(this,H))==null||u.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(v.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(v.SEEK_TO_LIVE_OFFSET):this.hasAttribute(v.LIVE_EDGE_OFFSET)?+this.getAttribute(v.LIVE_EDGE_OFFSET):void 0}});else if(e===v.NO_AUTO_SEEK_TO_LIVE)(f=_(this,H))==null||f.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(v.NO_AUTO_SEEK_TO_LIVE)}});else if(e===v.FULLSCREEN_ELEMENT){let S=a?(y=this.getRootNode())==null?void 0:y.getElementById(a):void 0;Ke(this,pr,S),(A=_(this,H))==null||A.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===v.LANG&&a!==i?(Wu(a),(E=_(this,H))==null||E.dispatch({type:"optionschangerequest",detail:{mediaLang:a}})):e===v.LOOP&&a!==i?(p=_(this,H))==null||p.dispatch({type:h.MEDIA_LOOP_REQUEST,detail:a!=null}):e===v.NO_VOLUME_PREF&&a!==i?(k=_(this,H))==null||k.dispatch({type:"optionschangerequest",detail:{noVolumePref:this.hasAttribute(v.NO_VOLUME_PREF)}}):e===v.NO_MUTED_PREF&&a!==i&&((g=_(this,H))==null||g.dispatch({type:"optionschangerequest",detail:{noMutedPref:this.hasAttribute(v.NO_MUTED_PREF)}}))}connectedCallback(){var e,i,a;this.associateElement(this),!_(this,H)&&!this.hasAttribute(v.NO_DEFAULT_STORE)&&hr(this,jn,vl).call(this),(e=_(this,H))==null||e.dispatch({type:"documentelementchangerequest",detail:V}),(i=_(this,H))==null||i.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement}),super.connectedCallback(),_(this,H)&&!_(this,je)&&Ke(this,je,(a=_(this,H))==null?void 0:a.subscribe(_(this,fr))),_(this,vr)!==void 0&&_(this,H)&&this.media&&setTimeout(()=>{var r,n,s;(n=(r=this.media)==null?void 0:r.textTracks)!=null&&n.length&&((s=_(this,H))==null||s.dispatch({type:h.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:_(this,vr)}))},0),this.hasAttribute(v.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var e,i,a,r,n,s;if((e=super.disconnectedCallback)==null||e.call(this),this.disableHotkeys(),_(this,H)){let d=_(this,H).getState();Ke(this,vr,!!((i=d.mediaSubtitlesShowing)!=null&&i.length)),(a=_(this,H))==null||a.dispatch({type:"fullscreenelementchangerequest",detail:void 0}),(r=_(this,H))==null||r.dispatch({type:"documentelementchangerequest",detail:void 0}),(n=_(this,H))==null||n.dispatch({type:h.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})}_(this,je)&&((s=_(this,je))==null||s.call(this),Ke(this,je,void 0)),this.unassociateElement(this),_(this,et)&&(_(this,et).remove(),Ke(this,et,null))}mediaSetCallback(e){var i;super.mediaSetCallback(e),(i=_(this,H))==null||i.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var i;super.mediaUnsetCallback(e),(i=_(this,H))==null||i.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,i){_c(this.mediaStateReceivers,e,i)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:i}=this;if(i.has(e))return;let a=this.registerMediaStateReceiver.bind(this),r=this.unregisterMediaStateReceiver.bind(this),n=Rp(e,a,r);Object.values(h).forEach(s=>{e.addEventListener(s,_(this,Jn))}),i.set(e,n)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:i}=this;if(!i.has(e))return;i.get(e)(),i.delete(e),Object.values(h).forEach(r=>{e.removeEventListener(r,_(this,Jn))})}registerMediaStateReceiver(e){if(!e)return;let i=this.mediaStateReceivers;i.indexOf(e)>-1||(i.push(e),_(this,H)&&Object.entries(_(this,H).getState()).forEach(([r,n])=>{_c([e],r,n)}))}unregisterMediaStateReceiver(e){let i=this.mediaStateReceivers,a=i.indexOf(e);a<0||i.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",hr(this,eo,El))}disableHotkeys(){this.removeEventListener("keydown",hr(this,eo,El)),this.removeEventListener("keyup",_(this,fi))}get hotkeys(){return _(this,It)}set hotkeys(e){w(this,v.HOTKEYS,e)}keyboardShortcutHandler(e){var i,a,r,n,s,d,u,f,y;let A=e.target;if(((r=(a=(i=A.getAttribute(v.KEYS_USED))==null?void 0:i.split(" "))!=null?a:A==null?void 0:A.keysUsed)!=null?r:[]).map(C=>C==="Space"?" ":C).filter(Boolean).includes(e.key))return;let p,k,g;if(!(_(this,It).contains(`no${e.key.toLowerCase()}`)||e.key===" "&&_(this,It).contains("nospace")||e.shiftKey&&(e.key==="/"||e.key==="?")&&_(this,It).contains("noshift+/")))switch(e.key){case" ":case"k":p=_(this,H).getState().mediaPaused?h.MEDIA_PLAY_REQUEST:h.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new l.CustomEvent(p,{composed:!0,bubbles:!0}));break;case"m":p=this.mediaStore.getState().mediaVolumeLevel==="off"?h.MEDIA_UNMUTE_REQUEST:h.MEDIA_MUTE_REQUEST,this.dispatchEvent(new l.CustomEvent(p,{composed:!0,bubbles:!0}));break;case"f":p=this.mediaStore.getState().mediaIsFullscreen?h.MEDIA_EXIT_FULLSCREEN_REQUEST:h.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new l.CustomEvent(p,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new l.CustomEvent(h.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":case"j":{let C=this.hasAttribute(v.KEYBOARD_BACKWARD_SEEK_OFFSET)?+this.getAttribute(v.KEYBOARD_BACKWARD_SEEK_OFFSET):fc;k=Math.max(((n=this.mediaStore.getState().mediaCurrentTime)!=null?n:0)-C,0),g=new l.CustomEvent(h.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:k}),this.dispatchEvent(g);break}case"ArrowRight":case"l":{let C=this.hasAttribute(v.KEYBOARD_FORWARD_SEEK_OFFSET)?+this.getAttribute(v.KEYBOARD_FORWARD_SEEK_OFFSET):fc;k=Math.max(((s=this.mediaStore.getState().mediaCurrentTime)!=null?s:0)+C,0),g=new l.CustomEvent(h.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:k}),this.dispatchEvent(g);break}case"ArrowUp":{let C=this.hasAttribute(v.KEYBOARD_UP_VOLUME_STEP)?+this.getAttribute(v.KEYBOARD_UP_VOLUME_STEP):vc;k=Math.min(((d=this.mediaStore.getState().mediaVolume)!=null?d:1)+C,1),g=new l.CustomEvent(h.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:k}),this.dispatchEvent(g);break}case"ArrowDown":{let C=this.hasAttribute(v.KEYBOARD_DOWN_VOLUME_STEP)?+this.getAttribute(v.KEYBOARD_DOWN_VOLUME_STEP):vc;k=Math.max(((u=this.mediaStore.getState().mediaVolume)!=null?u:1)-C,0),g=new l.CustomEvent(h.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:k}),this.dispatchEvent(g);break}case"<":{let C=(f=this.mediaStore.getState().mediaPlaybackRate)!=null?f:1;k=Math.max(C-Ec,kp).toFixed(2),g=new l.CustomEvent(h.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:k}),this.dispatchEvent(g);break}case">":{let C=(y=this.mediaStore.getState().mediaPlaybackRate)!=null?y:1;k=Math.min(C+Ec,Sp).toFixed(2),g=new l.CustomEvent(h.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:k}),this.dispatchEvent(g);break}case"/":case"?":{e.shiftKey&&hr(this,bl,Ac).call(this);break}case"p":{p=this.mediaStore.getState().mediaIsPip?h.MEDIA_EXIT_PIP_REQUEST:h.MEDIA_ENTER_PIP_REQUEST,g=new l.CustomEvent(p,{composed:!0,bubbles:!0}),this.dispatchEvent(g);break}default:break}}};It=new WeakMap;pr=new WeakMap;H=new WeakMap;et=new WeakMap;fr=new WeakMap;je=new WeakMap;Jn=new WeakMap;vr=new WeakMap;jn=new WeakSet;vl=function(){var t;this.mediaStore=pc({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(v.DEFAULT_SUBTITLES),defaultDuration:this.hasAttribute(v.DEFAULT_DURATION)?+this.getAttribute(v.DEFAULT_DURATION):void 0,defaultStreamType:(t=this.getAttribute(v.DEFAULT_STREAM_TYPE))!=null?t:void 0,liveEdgeOffset:this.hasAttribute(v.LIVE_EDGE_OFFSET)?+this.getAttribute(v.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(v.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(v.SEEK_TO_LIVE_OFFSET):this.hasAttribute(v.LIVE_EDGE_OFFSET)?+this.getAttribute(v.LIVE_EDGE_OFFSET):void 0,noAutoSeekToLive:this.hasAttribute(v.NO_AUTO_SEEK_TO_LIVE),noVolumePref:this.hasAttribute(v.NO_VOLUME_PREF),noMutedPref:this.hasAttribute(v.NO_MUTED_PREF),noSubtitlesLangPref:this.hasAttribute(v.NO_SUBTITLES_LANG_PREF)}})};fi=new WeakMap;eo=new WeakSet;El=function(t){var e;let{metaKey:i,altKey:a,key:r,shiftKey:n}=t,s=n&&(r==="/"||r==="?");if(s&&((e=_(this,et))!=null&&e.open)){this.removeEventListener("keyup",_(this,fi));return}if(i||a||!s&&!Tc.includes(r)){this.removeEventListener("keyup",_(this,fi));return}let d=t.target,u=d instanceof HTMLElement&&(d.tagName.toLowerCase()==="media-volume-range"||d.tagName.toLowerCase()==="media-time-range");[" ","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&!(_(this,It).contains(`no${r.toLowerCase()}`)||r===" "&&_(this,It).contains("nospace"))&&!u&&t.preventDefault(),this.addEventListener("keyup",_(this,fi),{once:!0})};bl=new WeakSet;Ac=function(){_(this,et)||(Ke(this,et,V.createElement("media-keyboard-shortcuts-dialog")),this.appendChild(_(this,et))),_(this,et).open=!0};var Ip=Object.values(o),Mp=Object.values(tl),yc=t=>{var e,i,a,r;let{observedAttributes:n}=t.constructor;!n&&((e=t.nodeName)!=null&&e.includes("-"))&&(l.customElements.upgrade(t),{observedAttributes:n}=t.constructor);let s=(r=(a=(i=t==null?void 0:t.getAttribute)==null?void 0:i.call(t,D.MEDIA_CHROME_ATTRIBUTES))==null?void 0:a.split)==null?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(d=>Ip.includes(d)):[]},Lp=t=>{var e,i;return(e=t.nodeName)!=null&&e.includes("-")&&l.customElements.get((i=t.nodeName)==null?void 0:i.toLowerCase())&&!(t instanceof l.customElements.get(t.nodeName.toLowerCase()))&&l.customElements.upgrade(t),Mp.some(a=>a in t)},gl=t=>Lp(t)||!!yc(t).length,bc=t=>{var e;return(e=t==null?void 0:t.join)==null?void 0:e.call(t,":")},gc={[o.MEDIA_SUBTITLES_LIST]:St,[o.MEDIA_SUBTITLES_SHOWING]:St,[o.MEDIA_SEEKABLE]:bc,[o.MEDIA_BUFFERED]:t=>t==null?void 0:t.map(bc).join(" "),[o.MEDIA_PREVIEW_COORDS]:t=>t==null?void 0:t.join(" "),[o.MEDIA_RENDITION_LIST]:Ou,[o.MEDIA_AUDIO_TRACK_LIST]:Pu},Cp=async(t,e,i)=>{var a,r;if(t.isConnected||await Cn(0),typeof i=="boolean"||i==null)return L(t,e,i);if(typeof i=="number")return U(t,e,i);if(typeof i=="string")return w(t,e,i);if(Array.isArray(i)&&!i.length)return t.removeAttribute(e);let n=(r=(a=gc[e])==null?void 0:a.call(gc,i))!=null?r:i;return t.setAttribute(e,n)},wp=t=>{var e;return!!((e=t.closest)!=null&&e.call(t,'*[slot="media"]'))},pi=(t,e)=>{if(wp(t))return;let i=(r,n)=>{var s,d;gl(r)&&n(r);let{children:u=[]}=r!=null?r:{},f=(d=(s=r==null?void 0:r.shadowRoot)==null?void 0:s.children)!=null?d:[];[...u,...f].forEach(A=>pi(A,n))},a=t==null?void 0:t.nodeName.toLowerCase();if(a.includes("-")&&!gl(t)){l.customElements.whenDefined(a).then(()=>{i(t,e)});return}i(t,e)},_c=(t,e,i)=>{t.forEach(a=>{if(e in a){a[e]=i;return}let r=yc(a),n=e.toLowerCase();r.includes(n)&&Cp(a,n,i)})},Rp=(t,e,i)=>{pi(t,e);let a=y=>{var A;let E=(A=y==null?void 0:y.composedPath()[0])!=null?A:y.target;e(E)},r=y=>{var A;let E=(A=y==null?void 0:y.composedPath()[0])!=null?A:y.target;i(E)};t.addEventListener(h.REGISTER_MEDIA_STATE_RECEIVER,a),t.addEventListener(h.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=y=>{y.forEach(A=>{let{addedNodes:E=[],removedNodes:p=[],type:k,target:g,attributeName:S}=A;k==="childList"?(Array.prototype.forEach.call(E,C=>pi(C,e)),Array.prototype.forEach.call(p,C=>pi(C,i))):k==="attributes"&&S===D.MEDIA_CHROME_ATTRIBUTES&&(gl(g)?e(g):i(g))})},s=[],d=y=>{let A=y.target;A.name!=="media"&&(s.forEach(E=>pi(E,i)),s=[...A.assignedElements({flatten:!0})],s.forEach(E=>pi(E,e)))};t.addEventListener("slotchange",d);let u=new MutationObserver(n);return u.observe(t,{childList:!0,attributes:!0,subtree:!0}),()=>{pi(t,i),t.removeEventListener("slotchange",d),u.disconnect(),t.removeEventListener(h.REGISTER_MEDIA_STATE_RECEIVER,a),t.removeEventListener(h.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};l.customElements.get("media-controller")||l.customElements.define("media-controller",to);var Al=to;var Xi={PLACEMENT:"placement",BOUNDS:"bounds"};function xp(t){return`
160
160
  <style>
161
161
  :host {
162
162
  --_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7)));
@@ -265,7 +265,7 @@
265
265
  </style>
266
266
  <slot></slot>
267
267
  <div id="arrow"></div>
268
- `}var Ji=class extends l.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!No(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;let i=this.placement;if(i==="left"||i==="right"){this.style.removeProperty("--media-tooltip-offset-x");return}let a=getComputedStyle(this),r=(e=Xe(this,"#"+this.bounds))!=null?e:Y(this);if(!r)return;let{x:o,width:s}=r.getBoundingClientRect(),{x:d,width:u}=this.getBoundingClientRect(),f=d+u,y=o+s,A=a.getPropertyValue("--media-tooltip-offset-x"),E=A?parseFloat(A.replace("px","")):0,p=a.getPropertyValue("--media-tooltip-container-margin"),k=p?parseFloat(p.replace("px","")):0,g=d-o+E-k,S=f-y+E+k;if(g<0){this.style.setProperty("--media-tooltip-offset-x",`${g}px`);return}if(S>0){this.style.setProperty("--media-tooltip-offset-x",`${S}px`);return}this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){let e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[Xi.PLACEMENT,Xi.BOUNDS]}get placement(){return x(this,Xi.PLACEMENT)}set placement(e){w(this,Xi.PLACEMENT,e)}get bounds(){return x(this,Xi.BOUNDS)}set bounds(e){w(this,Xi.BOUNDS,e)}};Ji.shadowRootOptions={mode:"open"};Ji.getTemplateHTML=xp;l.customElements.get("media-tooltip")||l.customElements.define("media-tooltip",Ji);var an=Ji;var yl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},re=(t,e,i)=>(yl(t,e,"read from private field"),i?i.call(t):e.get(t)),ji=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},rn=(t,e,i,a)=>(yl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Dp=(t,e,i)=>(yl(t,e,"access private method"),i),et,ta,Vt,ea,on,Tl,kc,Ft={TOOLTIP_PLACEMENT:"tooltipplacement",DISABLED:"disabled",NO_TOOLTIP:"notooltip"};function Op(t,e={}){return`
268
+ `}var Ji=class extends l.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!Pn(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;let i=this.placement;if(i==="left"||i==="right"){this.style.removeProperty("--media-tooltip-offset-x");return}let a=getComputedStyle(this),r=(e=Je(this,"#"+this.bounds))!=null?e:Y(this);if(!r)return;let{x:n,width:s}=r.getBoundingClientRect(),{x:d,width:u}=this.getBoundingClientRect(),f=d+u,y=n+s,A=a.getPropertyValue("--media-tooltip-offset-x"),E=A?parseFloat(A.replace("px","")):0,p=a.getPropertyValue("--media-tooltip-container-margin"),k=p?parseFloat(p.replace("px","")):0,g=d-n+E-k,S=f-y+E+k;if(g<0){this.style.setProperty("--media-tooltip-offset-x",`${g}px`);return}if(S>0){this.style.setProperty("--media-tooltip-offset-x",`${S}px`);return}this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){let e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[Xi.PLACEMENT,Xi.BOUNDS]}get placement(){return x(this,Xi.PLACEMENT)}set placement(e){w(this,Xi.PLACEMENT,e)}get bounds(){return x(this,Xi.BOUNDS)}set bounds(e){w(this,Xi.BOUNDS,e)}};Ji.shadowRootOptions={mode:"open"};Ji.getTemplateHTML=xp;l.customElements.get("media-tooltip")||l.customElements.define("media-tooltip",Ji);var io=Ji;var yl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},re=(t,e,i)=>(yl(t,e,"read from private field"),i?i.call(t):e.get(t)),ji=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},ao=(t,e,i,a)=>(yl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Dp=(t,e,i)=>(yl(t,e,"access private method"),i),tt,ta,Kt,ea,ro,Tl,kc,Vt={TOOLTIP_PLACEMENT:"tooltipplacement",DISABLED:"disabled",NO_TOOLTIP:"notooltip"};function Op(t,e={}){return`
269
269
  <style>
270
270
  :host {
271
271
  position: relative;
@@ -339,32 +339,32 @@
339
339
 
340
340
  <slot name="tooltip">
341
341
  <media-tooltip part="tooltip" aria-hidden="true">
342
- <template shadowrootmode="${an.shadowRootOptions.mode}">
343
- ${an.getTemplateHTML({})}
342
+ <template shadowrootmode="${io.shadowRootOptions.mode}">
343
+ ${io.getTemplateHTML({})}
344
344
  </template>
345
345
  <slot name="tooltip-content">
346
346
  ${this.getTooltipContentHTML(t)}
347
347
  </slot>
348
348
  </media-tooltip>
349
349
  </slot>
350
- `}function Pp(t,e){return`
350
+ `}function Np(t,e){return`
351
351
  <slot></slot>
352
- `}function Np(){return""}var B=class extends l.HTMLElement{constructor(){if(super(),ji(this,Tl),ji(this,et,void 0),this.preventClick=!1,this.tooltipEl=null,ji(this,ta,e=>{this.preventClick||this.handleClick(e),setTimeout(re(this,Vt),0)}),ji(this,Vt,()=>{var e,i;(i=(e=this.tooltipEl)==null?void 0:e.updateXOffset)==null||i.call(e)}),ji(this,ea,e=>{let{key:i}=e;if(!this.keysUsed.includes(i)){this.removeEventListener("keyup",re(this,ea));return}this.preventClick||this.handleClick(e)}),ji(this,on,e=>{let{metaKey:i,altKey:a,key:r}=e;if(i||a||!this.keysUsed.includes(r)){this.removeEventListener("keyup",re(this,ea));return}this.addEventListener("keyup",re(this,ea),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip")}static get observedAttributes(){return["disabled",Ft.TOOLTIP_PLACEMENT,D.MEDIA_CONTROLLER,n.MEDIA_LANG]}enable(){this.addEventListener("click",re(this,ta)),this.addEventListener("keydown",re(this,on)),this.tabIndex=0}disable(){this.removeEventListener("click",re(this,ta)),this.removeEventListener("keydown",re(this,on)),this.removeEventListener("keyup",re(this,ea)),this.tabIndex=-1}attributeChangedCallback(e,i,a){var r,o,s,d,u;e===D.MEDIA_CONTROLLER?(i&&((o=(r=re(this,et))==null?void 0:r.unassociateElement)==null||o.call(r,this),rn(this,et,null)),a&&this.isConnected&&(rn(this,et,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=re(this,et))==null?void 0:d.associateElement)==null||u.call(d,this))):e==="disabled"&&a!==i?a==null?this.enable():this.disable():e===Ft.TOOLTIP_PLACEMENT&&this.tooltipEl&&a!==i?this.tooltipEl.placement=a:e===n.MEDIA_LANG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),re(this,Vt).call(this)}connectedCallback(){var e,i,a;let{style:r}=q(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");let o=this.getAttribute(D.MEDIA_CONTROLLER);o&&(rn(this,et,(e=this.getRootNode())==null?void 0:e.getElementById(o)),(a=(i=re(this,et))==null?void 0:i.associateElement)==null||a.call(i,this)),l.customElements.whenDefined("media-tooltip").then(()=>Dp(this,Tl,kc).call(this))}disconnectedCallback(){var e,i;this.disable(),(i=(e=re(this,et))==null?void 0:e.unassociateElement)==null||i.call(e,this),rn(this,et,null),this.removeEventListener("mouseenter",re(this,Vt)),this.removeEventListener("focus",re(this,Vt)),this.removeEventListener("click",re(this,ta))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return x(this,Ft.TOOLTIP_PLACEMENT)}set tooltipPlacement(e){w(this,Ft.TOOLTIP_PLACEMENT,e)}get mediaController(){return x(this,D.MEDIA_CONTROLLER)}set mediaController(e){w(this,D.MEDIA_CONTROLLER,e)}get disabled(){return M(this,Ft.DISABLED)}set disabled(e){L(this,Ft.DISABLED,e)}get noTooltip(){return M(this,Ft.NO_TOOLTIP)}set noTooltip(e){L(this,Ft.NO_TOOLTIP,e)}handleClick(e){}};et=new WeakMap;ta=new WeakMap;Vt=new WeakMap;ea=new WeakMap;on=new WeakMap;Tl=new WeakSet;kc=function(){this.addEventListener("mouseenter",re(this,Vt)),this.addEventListener("focus",re(this,Vt)),this.addEventListener("click",re(this,ta));let t=this.tooltipPlacement;t&&this.tooltipEl&&(this.tooltipEl.placement=t)};B.shadowRootOptions={mode:"open"};B.getTemplateHTML=Op;B.getSlotTemplateHTML=Pp;B.getTooltipContentHTML=Np;l.customElements.get("media-chrome-button")||l.customElements.define("media-chrome-button",B);var Sc=`<svg aria-hidden="true" viewBox="0 0 26 24">
352
+ `}function Pp(){return""}var B=class extends l.HTMLElement{constructor(){if(super(),ji(this,Tl),ji(this,tt,void 0),this.preventClick=!1,this.tooltipEl=null,ji(this,ta,e=>{this.preventClick||this.handleClick(e),setTimeout(re(this,Kt),0)}),ji(this,Kt,()=>{var e,i;(i=(e=this.tooltipEl)==null?void 0:e.updateXOffset)==null||i.call(e)}),ji(this,ea,e=>{let{key:i}=e;if(!this.keysUsed.includes(i)){this.removeEventListener("keyup",re(this,ea));return}this.preventClick||this.handleClick(e)}),ji(this,ro,e=>{let{metaKey:i,altKey:a,key:r}=e;if(i||a||!this.keysUsed.includes(r)){this.removeEventListener("keyup",re(this,ea));return}this.addEventListener("keyup",re(this,ea),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip")}static get observedAttributes(){return["disabled",Vt.TOOLTIP_PLACEMENT,D.MEDIA_CONTROLLER,o.MEDIA_LANG]}enable(){this.addEventListener("click",re(this,ta)),this.addEventListener("keydown",re(this,ro)),this.tabIndex=0}disable(){this.removeEventListener("click",re(this,ta)),this.removeEventListener("keydown",re(this,ro)),this.removeEventListener("keyup",re(this,ea)),this.tabIndex=-1}attributeChangedCallback(e,i,a){var r,n,s,d,u;e===D.MEDIA_CONTROLLER?(i&&((n=(r=re(this,tt))==null?void 0:r.unassociateElement)==null||n.call(r,this),ao(this,tt,null)),a&&this.isConnected&&(ao(this,tt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=re(this,tt))==null?void 0:d.associateElement)==null||u.call(d,this))):e==="disabled"&&a!==i?a==null?this.enable():this.disable():e===Vt.TOOLTIP_PLACEMENT&&this.tooltipEl&&a!==i?this.tooltipEl.placement=a:e===o.MEDIA_LANG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),re(this,Kt).call(this)}connectedCallback(){var e,i,a;let{style:r}=q(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");let n=this.getAttribute(D.MEDIA_CONTROLLER);n&&(ao(this,tt,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(i=re(this,tt))==null?void 0:i.associateElement)==null||a.call(i,this)),l.customElements.whenDefined("media-tooltip").then(()=>Dp(this,Tl,kc).call(this))}disconnectedCallback(){var e,i;this.disable(),(i=(e=re(this,tt))==null?void 0:e.unassociateElement)==null||i.call(e,this),ao(this,tt,null),this.removeEventListener("mouseenter",re(this,Kt)),this.removeEventListener("focus",re(this,Kt)),this.removeEventListener("click",re(this,ta))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return x(this,Vt.TOOLTIP_PLACEMENT)}set tooltipPlacement(e){w(this,Vt.TOOLTIP_PLACEMENT,e)}get mediaController(){return x(this,D.MEDIA_CONTROLLER)}set mediaController(e){w(this,D.MEDIA_CONTROLLER,e)}get disabled(){return M(this,Vt.DISABLED)}set disabled(e){L(this,Vt.DISABLED,e)}get noTooltip(){return M(this,Vt.NO_TOOLTIP)}set noTooltip(e){L(this,Vt.NO_TOOLTIP,e)}handleClick(e){}};tt=new WeakMap;ta=new WeakMap;Kt=new WeakMap;ea=new WeakMap;ro=new WeakMap;Tl=new WeakSet;kc=function(){this.addEventListener("mouseenter",re(this,Kt)),this.addEventListener("focus",re(this,Kt)),this.addEventListener("click",re(this,ta));let t=this.tooltipPlacement;t&&this.tooltipEl&&(this.tooltipEl.placement=t)};B.shadowRootOptions={mode:"open"};B.getTemplateHTML=Op;B.getSlotTemplateHTML=Np;B.getTooltipContentHTML=Pp;l.customElements.get("media-chrome-button")||l.customElements.define("media-chrome-button",B);var Sc=`<svg aria-hidden="true" viewBox="0 0 26 24">
353
353
  <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"/>
354
354
  </svg>
355
355
  `;function Up(t){return`
356
356
  <style>
357
- :host([${n.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) {
357
+ :host([${o.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) {
358
358
  display: none !important;
359
359
  }
360
360
 
361
361
 
362
- :host(:not([${n.MEDIA_IS_AIRPLAYING}])) slot[name=icon] slot:not([name=enter]) {
362
+ :host(:not([${o.MEDIA_IS_AIRPLAYING}])) slot[name=icon] slot:not([name=enter]) {
363
363
  display: none !important;
364
364
  }
365
365
 
366
- :host([${n.MEDIA_IS_AIRPLAYING}]) slot[name=tooltip-enter],
367
- :host(:not([${n.MEDIA_IS_AIRPLAYING}])) slot[name=tooltip-exit] {
366
+ :host([${o.MEDIA_IS_AIRPLAYING}]) slot[name=tooltip-enter],
367
+ :host(:not([${o.MEDIA_IS_AIRPLAYING}])) slot[name=tooltip-exit] {
368
368
  display: none;
369
369
  }
370
370
  </style>
@@ -376,7 +376,7 @@
376
376
  `}function Hp(){return`
377
377
  <slot name="tooltip-enter">${c("start airplay")}</slot>
378
378
  <slot name="tooltip-exit">${c("stop airplay")}</slot>
379
- `}var Ic=t=>{let e=t.mediaIsAirplaying?c("stop airplay"):c("start airplay");t.setAttribute("aria-label",e)},Er=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_IS_AIRPLAYING,n.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Ic(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_IS_AIRPLAYING&&Ic(this)}get mediaIsAirplaying(){return M(this,n.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){L(this,n.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return x(this,n.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){w(this,n.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new l.CustomEvent(h.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}};Er.getSlotTemplateHTML=Up;Er.getTooltipContentHTML=Hp;l.customElements.get("media-airplay-button")||l.customElements.define("media-airplay-button",Er);var Bp=`<svg aria-hidden="true" viewBox="0 0 26 24">
379
+ `}var Ic=t=>{let e=t.mediaIsAirplaying?c("stop airplay"):c("start airplay");t.setAttribute("aria-label",e)},Er=class extends B{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_AIRPLAYING,o.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Ic(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===o.MEDIA_IS_AIRPLAYING&&Ic(this)}get mediaIsAirplaying(){return M(this,o.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){L(this,o.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return x(this,o.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){w(this,o.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new l.CustomEvent(h.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}};Er.getSlotTemplateHTML=Up;Er.getTooltipContentHTML=Hp;l.customElements.get("media-airplay-button")||l.customElements.define("media-airplay-button",Er);var Bp=`<svg aria-hidden="true" viewBox="0 0 26 24">
380
380
  <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"/>
381
381
  </svg>`,$p=`<svg aria-hidden="true" viewBox="0 0 26 24">
382
382
  <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"/>
@@ -404,19 +404,19 @@
404
404
  `}function Fp(){return`
405
405
  <slot name="tooltip-enable">${c("Enable captions")}</slot>
406
406
  <slot name="tooltip-disable">${c("Disable captions")}</slot>
407
- `}var Mc=t=>{t.setAttribute("aria-checked",qo(t).toString())},br=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_SUBTITLES_LIST,n.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.setAttribute("aria-label",c("closed captions")),Mc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_SUBTITLES_SHOWING&&Mc(this)}get mediaSubtitlesList(){return Lc(this,n.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Cc(this,n.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Lc(this,n.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Cc(this,n.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new l.CustomEvent(h.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}};br.getSlotTemplateHTML=Wp;br.getTooltipContentHTML=Fp;var Lc=(t,e)=>{let i=t.getAttribute(e);return i?ci(i):[]},Cc=(t,e,i)=>{if(!(i!=null&&i.length)){t.removeAttribute(e);return}let a=kt(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};l.customElements.get("media-captions-button")||l.customElements.define("media-captions-button",br);var Vp='<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>',Kp='<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg>';function Gp(t){return`
407
+ `}var Mc=t=>{t.setAttribute("aria-checked",qn(t).toString())},br=class extends B{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.setAttribute("aria-label",c("closed captions")),Mc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===o.MEDIA_SUBTITLES_SHOWING&&Mc(this)}get mediaSubtitlesList(){return Lc(this,o.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Cc(this,o.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Lc(this,o.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Cc(this,o.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new l.CustomEvent(h.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}};br.getSlotTemplateHTML=Wp;br.getTooltipContentHTML=Fp;var Lc=(t,e)=>{let i=t.getAttribute(e);return i?ci(i):[]},Cc=(t,e,i)=>{if(!(i!=null&&i.length)){t.removeAttribute(e);return}let a=St(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};l.customElements.get("media-captions-button")||l.customElements.define("media-captions-button",br);var Vp='<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>',Kp='<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg>';function Gp(t){return`
408
408
  <style>
409
- :host([${n.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) {
409
+ :host([${o.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) {
410
410
  display: none !important;
411
411
  }
412
412
 
413
413
 
414
- :host(:not([${n.MEDIA_IS_CASTING}])) slot[name=icon] slot:not([name=enter]) {
414
+ :host(:not([${o.MEDIA_IS_CASTING}])) slot[name=icon] slot:not([name=enter]) {
415
415
  display: none !important;
416
416
  }
417
417
 
418
- :host([${n.MEDIA_IS_CASTING}]) slot[name=tooltip-enter],
419
- :host(:not([${n.MEDIA_IS_CASTING}])) slot[name=tooltip-exit] {
418
+ :host([${o.MEDIA_IS_CASTING}]) slot[name=tooltip-enter],
419
+ :host(:not([${o.MEDIA_IS_CASTING}])) slot[name=tooltip-exit] {
420
420
  display: none;
421
421
  }
422
422
  </style>
@@ -428,7 +428,7 @@
428
428
  `}function Yp(){return`
429
429
  <slot name="tooltip-enter">${c("Start casting")}</slot>
430
430
  <slot name="tooltip-exit">${c("Stop casting")}</slot>
431
- `}var wc=t=>{let e=t.mediaIsCasting?c("stop casting"):c("start casting");t.setAttribute("aria-label",e)},gr=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_IS_CASTING,n.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),wc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_IS_CASTING&&wc(this)}get mediaIsCasting(){return M(this,n.MEDIA_IS_CASTING)}set mediaIsCasting(e){L(this,n.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return x(this,n.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){w(this,n.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?h.MEDIA_EXIT_CAST_REQUEST:h.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};gr.getSlotTemplateHTML=Gp;gr.getTooltipContentHTML=Yp;l.customElements.get("media-cast-button")||l.customElements.define("media-cast-button",gr);var wl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ei=(t,e,i)=>(wl(t,e,"read from private field"),i?i.call(t):e.get(t)),It=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Rl=(t,e,i,a)=>(wl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),vi=(t,e,i)=>(wl(t,e,"access private method"),i),sn,Ar,bi,nn,kl,Sl,Rc,Il,xc,Ml,Dc,Ll,Oc,Cl,Pc;function qp(t){return`
431
+ `}var wc=t=>{let e=t.mediaIsCasting?c("stop casting"):c("start casting");t.setAttribute("aria-label",e)},gr=class extends B{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_CASTING,o.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),wc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===o.MEDIA_IS_CASTING&&wc(this)}get mediaIsCasting(){return M(this,o.MEDIA_IS_CASTING)}set mediaIsCasting(e){L(this,o.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return x(this,o.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){w(this,o.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?h.MEDIA_EXIT_CAST_REQUEST:h.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};gr.getSlotTemplateHTML=Gp;gr.getTooltipContentHTML=Yp;l.customElements.get("media-cast-button")||l.customElements.define("media-cast-button",gr);var wl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ei=(t,e,i)=>(wl(t,e,"read from private field"),i?i.call(t):e.get(t)),Mt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Rl=(t,e,i,a)=>(wl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),vi=(t,e,i)=>(wl(t,e,"access private method"),i),oo,Ar,bi,no,kl,Sl,Rc,Il,xc,Ml,Dc,Ll,Oc,Cl,Nc;function qp(t){return`
432
432
  <style>
433
433
  :host {
434
434
  font: var(--media-font,
@@ -471,7 +471,7 @@
471
471
  ${this.getSlotTemplateHTML(t)}
472
472
  `}function Zp(t){return`
473
473
  <slot id="content"></slot>
474
- `}var _r={OPEN:"open",ANCHOR:"anchor"},tt=class extends l.HTMLElement{constructor(){super(),It(this,nn),It(this,Sl),It(this,Il),It(this,Ml),It(this,Ll),It(this,Cl),It(this,sn,!1),It(this,Ar,null),It(this,bi,null)}static get observedAttributes(){return[_r.OPEN,_r.ANCHOR]}get open(){return M(this,_r.OPEN)}set open(e){L(this,_r.OPEN,e)}handleEvent(e){switch(e.type){case"invoke":vi(this,Ml,Dc).call(this,e);break;case"focusout":vi(this,Ll,Oc).call(this,e);break;case"keydown":vi(this,Cl,Pc).call(this,e);break}}connectedCallback(){vi(this,nn,kl).call(this),this.role||(this.role="dialog"),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}disconnectedCallback(){this.removeEventListener("invoke",this),this.removeEventListener("focusout",this),this.removeEventListener("keydown",this)}attributeChangedCallback(e,i,a){vi(this,nn,kl).call(this),e===_r.OPEN&&a!==i&&(this.open?vi(this,Sl,Rc).call(this):vi(this,Il,xc).call(this))}focus(){Rl(this,Ar,nr());let e=!this.dispatchEvent(new Event("focus",{composed:!0,cancelable:!0})),i=!this.dispatchEvent(new Event("focusin",{composed:!0,bubbles:!0,cancelable:!0}));if(e||i)return;let a=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');a==null||a.focus()}get keysUsed(){return["Escape","Tab"]}};sn=new WeakMap;Ar=new WeakMap;bi=new WeakMap;nn=new WeakSet;kl=function(){if(!Ei(this,sn)&&(Rl(this,sn,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);let t=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(t),queueMicrotask(()=>{let{style:e}=q(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}};Sl=new WeakSet;Rc=function(){var t;(t=Ei(this,bi))==null||t.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})};Il=new WeakSet;xc=function(){var t;(t=Ei(this,bi))==null||t.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))};Ml=new WeakSet;Dc=function(t){Rl(this,bi,t.relatedTarget),he(this,t.relatedTarget)||(this.open=!this.open)};Ll=new WeakSet;Oc=function(t){var e;he(this,t.relatedTarget)||((e=Ei(this,Ar))==null||e.focus(),Ei(this,bi)&&Ei(this,bi)!==t.relatedTarget&&this.open&&(this.open=!1))};Cl=new WeakSet;Pc=function(t){var e,i,a,r,o;let{key:s,ctrlKey:d,altKey:u,metaKey:f}=t;d||u||f||this.keysUsed.includes(s)&&(t.preventDefault(),t.stopPropagation(),s==="Tab"?(t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()):s==="Escape"&&((o=Ei(this,Ar))==null||o.focus(),this.open=!1))};tt.shadowRootOptions={mode:"open"};tt.getTemplateHTML=qp;tt.getSlotTemplateHTML=Zp;l.customElements.get("media-chrome-dialog")||l.customElements.define("media-chrome-dialog",tt);var Hl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},X=(t,e,i)=>(Hl(t,e,"read from private field"),i?i.call(t):e.get(t)),ce=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Kt=(t,e,i,a)=>(Hl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ge=(t,e,i)=>(Hl(t,e,"access private method"),i),it,En,ln,dn,Ye,fn,un,cn,mn,Bl,Nc,hn,xl,pn,Dl,vn,$l,Ol,Uc,Pl,Hc,Nl,Bc,Ul,$c;function zp(t){return`
474
+ `}var _r={OPEN:"open",ANCHOR:"anchor"},it=class extends l.HTMLElement{constructor(){super(),Mt(this,no),Mt(this,Sl),Mt(this,Il),Mt(this,Ml),Mt(this,Ll),Mt(this,Cl),Mt(this,oo,!1),Mt(this,Ar,null),Mt(this,bi,null)}static get observedAttributes(){return[_r.OPEN,_r.ANCHOR]}get open(){return M(this,_r.OPEN)}set open(e){L(this,_r.OPEN,e)}handleEvent(e){switch(e.type){case"invoke":vi(this,Ml,Dc).call(this,e);break;case"focusout":vi(this,Ll,Oc).call(this,e);break;case"keydown":vi(this,Cl,Nc).call(this,e);break}}connectedCallback(){vi(this,no,kl).call(this),this.role||(this.role="dialog"),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}disconnectedCallback(){this.removeEventListener("invoke",this),this.removeEventListener("focusout",this),this.removeEventListener("keydown",this)}attributeChangedCallback(e,i,a){vi(this,no,kl).call(this),e===_r.OPEN&&a!==i&&(this.open?vi(this,Sl,Rc).call(this):vi(this,Il,xc).call(this))}focus(){Rl(this,Ar,or());let e=!this.dispatchEvent(new Event("focus",{composed:!0,cancelable:!0})),i=!this.dispatchEvent(new Event("focusin",{composed:!0,bubbles:!0,cancelable:!0}));if(e||i)return;let a=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');a==null||a.focus()}get keysUsed(){return["Escape","Tab"]}};oo=new WeakMap;Ar=new WeakMap;bi=new WeakMap;no=new WeakSet;kl=function(){if(!Ei(this,oo)&&(Rl(this,oo,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);let t=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(t),queueMicrotask(()=>{let{style:e}=q(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}};Sl=new WeakSet;Rc=function(){var t;(t=Ei(this,bi))==null||t.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})};Il=new WeakSet;xc=function(){var t;(t=Ei(this,bi))==null||t.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))};Ml=new WeakSet;Dc=function(t){Rl(this,bi,t.relatedTarget),pe(this,t.relatedTarget)||(this.open=!this.open)};Ll=new WeakSet;Oc=function(t){var e;pe(this,t.relatedTarget)||((e=Ei(this,Ar))==null||e.focus(),Ei(this,bi)&&Ei(this,bi)!==t.relatedTarget&&this.open&&(this.open=!1))};Cl=new WeakSet;Nc=function(t){var e,i,a,r,n;let{key:s,ctrlKey:d,altKey:u,metaKey:f}=t;d||u||f||this.keysUsed.includes(s)&&(t.preventDefault(),t.stopPropagation(),s==="Tab"?(t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()):s==="Escape"&&((n=Ei(this,Ar))==null||n.focus(),this.open=!1))};it.shadowRootOptions={mode:"open"};it.getTemplateHTML=qp;it.getSlotTemplateHTML=Zp;l.customElements.get("media-chrome-dialog")||l.customElements.define("media-chrome-dialog",it);var Hl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},X=(t,e,i)=>(Hl(t,e,"read from private field"),i?i.call(t):e.get(t)),me=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Gt=(t,e,i,a)=>(Hl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ge=(t,e,i)=>(Hl(t,e,"access private method"),i),at,Eo,so,lo,Ye,fo,uo,co,mo,Bl,Pc,ho,xl,po,Dl,vo,$l,Ol,Uc,Nl,Hc,Pl,Bc,Ul,$c;function zp(t){return`
475
475
  <style>
476
476
  :host {
477
477
  --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
@@ -710,7 +710,7 @@
710
710
  ${this.getContainerTemplateHTML(t)}
711
711
  </div>
712
712
  <div id="rightgap"></div>
713
- `}function Qp(t){return""}var at=class extends l.HTMLElement{constructor(){if(super(),ce(this,Bl),ce(this,hn),ce(this,pn),ce(this,vn),ce(this,Ol),ce(this,Pl),ce(this,Nl),ce(this,Ul),ce(this,it,void 0),ce(this,En,void 0),ce(this,ln,void 0),ce(this,dn,void 0),ce(this,Ye,{}),ce(this,fn,[]),ce(this,un,()=>{if(this.range.matches(":focus-visible")){let{style:e}=q(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),ce(this,cn,()=>{let{style:e}=q(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),ce(this,mn,()=>{let e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}this.container=this.shadowRoot.querySelector("#container"),Kt(this,ln,this.shadowRoot.querySelector("#startpoint")),Kt(this,dn,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",D.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,o,s,d,u;e===D.MEDIA_CONTROLLER?(i&&((o=(r=X(this,it))==null?void 0:r.unassociateElement)==null||o.call(r,this),Kt(this,it,null)),a&&this.isConnected&&(Kt(this,it,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=X(this,it))==null?void 0:d.associateElement)==null||u.call(d,this))):(e==="disabled"||e==="aria-disabled"&&i!==a)&&(a==null?(this.range.removeAttribute(e),Ge(this,hn,xl).call(this)):(this.range.setAttribute(e,a),Ge(this,pn,Dl).call(this)))}connectedCallback(){var e,i,a;let{style:r}=q(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),X(this,Ye).pointer=q(this.shadowRoot,"#pointer"),X(this,Ye).progress=q(this.shadowRoot,"#progress"),X(this,Ye).thumb=q(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),X(this,Ye).activeSegment=q(this.shadowRoot,"#segments-clipping rect:nth-child(0)");let o=this.getAttribute(D.MEDIA_CONTROLLER);o&&(Kt(this,it,(e=this.getRootNode())==null?void 0:e.getElementById(o)),(a=(i=X(this,it))==null?void 0:i.associateElement)==null||a.call(i,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",X(this,un)),this.shadowRoot.addEventListener("focusout",X(this,cn)),Ge(this,hn,xl).call(this),At(this.container,X(this,mn))}disconnectedCallback(){var e,i;Ge(this,pn,Dl).call(this),(i=(e=X(this,it))==null?void 0:e.unassociateElement)==null||i.call(e,this),Kt(this,it,null),this.shadowRoot.removeEventListener("focusin",X(this,un)),this.shadowRoot.removeEventListener("focusout",X(this,cn)),Tt(this.container,X(this,mn))}updatePointerBar(e){var i;(i=X(this,Ye).pointer)==null||i.style.setProperty("width",`${this.getPointerRatio(e)*100}%`)}updateBar(){var e,i;let a=this.range.valueAsNumber*100;(e=X(this,Ye).progress)==null||e.style.setProperty("width",`${a}%`),(i=X(this,Ye).thumb)==null||i.style.setProperty("left",`${a}%`)}updateSegments(e){let i=this.shadowRoot.querySelector("#segments-clipping");if(i.textContent="",this.container.classList.toggle("segments",!!(e!=null&&e.length)),!(e!=null&&e.length))return;let a=[...new Set([+this.range.min,...e.flatMap(o=>[o.start,o.end]),+this.range.max])];Kt(this,fn,[...a]);let r=a.pop();for(let[o,s]of a.entries()){let[d,u]=[o===0,o===a.length-1],f=d?"calc(var(--segments-gap) / -1)":`${s*100}%`,A=`calc(${((u?r:a[o+1])-s)*100}%${d||u?"":" - var(--segments-gap)"})`,E=V.createElementNS("http://www.w3.org/2000/svg","rect"),p=sr(this.shadowRoot,`#segments-clipping rect:nth-child(${o+1})`);p.style.setProperty("x",f),p.style.setProperty("width",A),i.append(E)}}getPointerRatio(e){return Zu(e.clientX,e.clientY,X(this,ln).getBoundingClientRect(),X(this,dn).getBoundingClientRect())}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":Ge(this,Ul,$c).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":Ge(this,Ol,Uc).call(this,e);break;case"pointerdown":Ge(this,vn,$l).call(this,e);break;case"pointerup":Ge(this,Pl,Hc).call(this);break;case"pointerleave":Ge(this,Nl,Bc).call(this);break}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}};it=new WeakMap;En=new WeakMap;ln=new WeakMap;dn=new WeakMap;Ye=new WeakMap;fn=new WeakMap;un=new WeakMap;cn=new WeakMap;mn=new WeakMap;Bl=new WeakSet;Nc=function(t){let e=X(this,Ye).activeSegment;if(!e)return;let i=this.getPointerRatio(t),r=`#segments-clipping rect:nth-child(${X(this,fn).findIndex((o,s,d)=>{let u=d[s+1];return u!=null&&i>=o&&i<=u})+1})`;(e.selectorText!=r||!e.style.transform)&&(e.selectorText=r,e.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))};hn=new WeakSet;xl=function(){this.hasAttribute("disabled")||!this.isConnected||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))};pn=new WeakSet;Dl=function(){var t,e;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),this.removeEventListener("pointerleave",this),(t=l.window)==null||t.removeEventListener("pointerup",this),(e=l.window)==null||e.removeEventListener("pointermove",this)};vn=new WeakSet;$l=function(t){var e;Kt(this,En,t.composedPath().includes(this.range)),(e=l.window)==null||e.addEventListener("pointerup",this,{once:!0})};Ol=new WeakSet;Uc=function(t){var e;t.pointerType!=="mouse"&&Ge(this,vn,$l).call(this,t),this.addEventListener("pointerleave",this,{once:!0}),(e=l.window)==null||e.addEventListener("pointermove",this)};Pl=new WeakSet;Hc=function(){var t;(t=l.window)==null||t.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")};Nl=new WeakSet;Bc=function(){var t,e;this.removeEventListener("pointerleave",this),(t=l.window)==null||t.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),(e=X(this,Ye).activeSegment)==null||e.style.removeProperty("transform")};Ul=new WeakSet;$c=function(t){t.pointerType==="pen"&&t.buttons===0||(this.toggleAttribute("dragging",t.buttons===1||t.pointerType!=="mouse"),this.updatePointerBar(t),Ge(this,Bl,Nc).call(this,t),this.dragging&&(t.pointerType!=="mouse"||!X(this,En))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(t),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))))};at.shadowRootOptions={mode:"open"};at.getTemplateHTML=zp;at.getContainerTemplateHTML=Qp;l.customElements.get("media-chrome-range")||l.customElements.define("media-chrome-range",at);var Wc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},bn=(t,e,i)=>(Wc(t,e,"read from private field"),i?i.call(t):e.get(t)),Xp=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},gn=(t,e,i,a)=>(Wc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),rt;function Jp(t){return`
713
+ `}function Qp(t){return""}var rt=class extends l.HTMLElement{constructor(){if(super(),me(this,Bl),me(this,ho),me(this,po),me(this,vo),me(this,Ol),me(this,Nl),me(this,Pl),me(this,Ul),me(this,at,void 0),me(this,Eo,void 0),me(this,so,void 0),me(this,lo,void 0),me(this,Ye,{}),me(this,fo,[]),me(this,uo,()=>{if(this.range.matches(":focus-visible")){let{style:e}=q(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),me(this,co,()=>{let{style:e}=q(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),me(this,mo,()=>{let e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}this.container=this.shadowRoot.querySelector("#container"),Gt(this,so,this.shadowRoot.querySelector("#startpoint")),Gt(this,lo,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",D.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,n,s,d,u;e===D.MEDIA_CONTROLLER?(i&&((n=(r=X(this,at))==null?void 0:r.unassociateElement)==null||n.call(r,this),Gt(this,at,null)),a&&this.isConnected&&(Gt(this,at,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=X(this,at))==null?void 0:d.associateElement)==null||u.call(d,this))):(e==="disabled"||e==="aria-disabled"&&i!==a)&&(a==null?(this.range.removeAttribute(e),Ge(this,ho,xl).call(this)):(this.range.setAttribute(e,a),Ge(this,po,Dl).call(this)))}connectedCallback(){var e,i,a;let{style:r}=q(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),X(this,Ye).pointer=q(this.shadowRoot,"#pointer"),X(this,Ye).progress=q(this.shadowRoot,"#progress"),X(this,Ye).thumb=q(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),X(this,Ye).activeSegment=q(this.shadowRoot,"#segments-clipping rect:nth-child(0)");let n=this.getAttribute(D.MEDIA_CONTROLLER);n&&(Gt(this,at,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(i=X(this,at))==null?void 0:i.associateElement)==null||a.call(i,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",X(this,uo)),this.shadowRoot.addEventListener("focusout",X(this,co)),Ge(this,ho,xl).call(this),Tt(this.container,X(this,mo))}disconnectedCallback(){var e,i;Ge(this,po,Dl).call(this),(i=(e=X(this,at))==null?void 0:e.unassociateElement)==null||i.call(e,this),Gt(this,at,null),this.shadowRoot.removeEventListener("focusin",X(this,uo)),this.shadowRoot.removeEventListener("focusout",X(this,co)),yt(this.container,X(this,mo))}updatePointerBar(e){var i;(i=X(this,Ye).pointer)==null||i.style.setProperty("width",`${this.getPointerRatio(e)*100}%`)}updateBar(){var e,i;let a=this.range.valueAsNumber*100;(e=X(this,Ye).progress)==null||e.style.setProperty("width",`${a}%`),(i=X(this,Ye).thumb)==null||i.style.setProperty("left",`${a}%`)}updateSegments(e){let i=this.shadowRoot.querySelector("#segments-clipping");if(i.textContent="",this.container.classList.toggle("segments",!!(e!=null&&e.length)),!(e!=null&&e.length))return;let a=[...new Set([+this.range.min,...e.flatMap(n=>[n.start,n.end]),+this.range.max])];Gt(this,fo,[...a]);let r=a.pop();for(let[n,s]of a.entries()){let[d,u]=[n===0,n===a.length-1],f=d?"calc(var(--segments-gap) / -1)":`${s*100}%`,A=`calc(${((u?r:a[n+1])-s)*100}%${d||u?"":" - var(--segments-gap)"})`,E=V.createElementNS("http://www.w3.org/2000/svg","rect"),p=sr(this.shadowRoot,`#segments-clipping rect:nth-child(${n+1})`);p.style.setProperty("x",f),p.style.setProperty("width",A),i.append(E)}}getPointerRatio(e){return Zu(e.clientX,e.clientY,X(this,so).getBoundingClientRect(),X(this,lo).getBoundingClientRect())}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":Ge(this,Ul,$c).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":Ge(this,Ol,Uc).call(this,e);break;case"pointerdown":Ge(this,vo,$l).call(this,e);break;case"pointerup":Ge(this,Nl,Hc).call(this);break;case"pointerleave":Ge(this,Pl,Bc).call(this);break}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}};at=new WeakMap;Eo=new WeakMap;so=new WeakMap;lo=new WeakMap;Ye=new WeakMap;fo=new WeakMap;uo=new WeakMap;co=new WeakMap;mo=new WeakMap;Bl=new WeakSet;Pc=function(t){let e=X(this,Ye).activeSegment;if(!e)return;let i=this.getPointerRatio(t),r=`#segments-clipping rect:nth-child(${X(this,fo).findIndex((n,s,d)=>{let u=d[s+1];return u!=null&&i>=n&&i<=u})+1})`;(e.selectorText!=r||!e.style.transform)&&(e.selectorText=r,e.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))};ho=new WeakSet;xl=function(){this.hasAttribute("disabled")||!this.isConnected||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))};po=new WeakSet;Dl=function(){var t,e;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),this.removeEventListener("pointerleave",this),(t=l.window)==null||t.removeEventListener("pointerup",this),(e=l.window)==null||e.removeEventListener("pointermove",this)};vo=new WeakSet;$l=function(t){var e;Gt(this,Eo,t.composedPath().includes(this.range)),(e=l.window)==null||e.addEventListener("pointerup",this,{once:!0})};Ol=new WeakSet;Uc=function(t){var e;t.pointerType!=="mouse"&&Ge(this,vo,$l).call(this,t),this.addEventListener("pointerleave",this,{once:!0}),(e=l.window)==null||e.addEventListener("pointermove",this)};Nl=new WeakSet;Hc=function(){var t;(t=l.window)==null||t.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")};Pl=new WeakSet;Bc=function(){var t,e;this.removeEventListener("pointerleave",this),(t=l.window)==null||t.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),(e=X(this,Ye).activeSegment)==null||e.style.removeProperty("transform")};Ul=new WeakSet;$c=function(t){t.pointerType==="pen"&&t.buttons===0||(this.toggleAttribute("dragging",t.buttons===1||t.pointerType!=="mouse"),this.updatePointerBar(t),Ge(this,Bl,Pc).call(this,t),this.dragging&&(t.pointerType!=="mouse"||!X(this,Eo))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(t),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))))};rt.shadowRootOptions={mode:"open"};rt.getTemplateHTML=zp;rt.getContainerTemplateHTML=Qp;l.customElements.get("media-chrome-range")||l.customElements.define("media-chrome-range",rt);var Wc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},bo=(t,e,i)=>(Wc(t,e,"read from private field"),i?i.call(t):e.get(t)),Xp=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},go=(t,e,i,a)=>(Wc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),nt;function Jp(t){return`
714
714
  <style>
715
715
  :host {
716
716
 
@@ -736,7 +736,7 @@
736
736
  </style>
737
737
 
738
738
  <slot></slot>
739
- `}var Tr=class extends l.HTMLElement{constructor(){if(super(),Xp(this,rt,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[D.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,o,s,d,u;e===D.MEDIA_CONTROLLER&&(i&&((o=(r=bn(this,rt))==null?void 0:r.unassociateElement)==null||o.call(r,this),gn(this,rt,null)),a&&this.isConnected&&(gn(this,rt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=bn(this,rt))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,i,a;let r=this.getAttribute(D.MEDIA_CONTROLLER);r&&(gn(this,rt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=bn(this,rt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=bn(this,rt))==null?void 0:e.unassociateElement)==null||i.call(e,this),gn(this,rt,null)}};rt=new WeakMap;Tr.shadowRootOptions={mode:"open"};Tr.getTemplateHTML=Jp;l.customElements.get("media-control-bar")||l.customElements.define("media-control-bar",Tr);var Fc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},_n=(t,e,i)=>(Fc(t,e,"read from private field"),i?i.call(t):e.get(t)),jp=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},An=(t,e,i,a)=>(Fc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),ot;function ef(t,e={}){return`
739
+ `}var Tr=class extends l.HTMLElement{constructor(){if(super(),Xp(this,nt,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[D.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,n,s,d,u;e===D.MEDIA_CONTROLLER&&(i&&((n=(r=bo(this,nt))==null?void 0:r.unassociateElement)==null||n.call(r,this),go(this,nt,null)),a&&this.isConnected&&(go(this,nt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=bo(this,nt))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,i,a;let r=this.getAttribute(D.MEDIA_CONTROLLER);r&&(go(this,nt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=bo(this,nt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=bo(this,nt))==null?void 0:e.unassociateElement)==null||i.call(e,this),go(this,nt,null)}};nt=new WeakMap;Tr.shadowRootOptions={mode:"open"};Tr.getTemplateHTML=Jp;l.customElements.get("media-control-bar")||l.customElements.define("media-control-bar",Tr);var Fc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},_o=(t,e,i)=>(Fc(t,e,"read from private field"),i?i.call(t):e.get(t)),jp=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ao=(t,e,i,a)=>(Fc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),ot;function ef(t,e={}){return`
740
740
  <style>
741
741
  :host {
742
742
  font: var(--media-font,
@@ -772,9 +772,9 @@
772
772
  ${this.getSlotTemplateHTML(t,e)}
773
773
  `}function tf(t,e){return`
774
774
  <slot></slot>
775
- `}var Te=class extends l.HTMLElement{constructor(){if(super(),jp(this,ot,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[D.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,o,s,d,u;e===D.MEDIA_CONTROLLER&&(i&&((o=(r=_n(this,ot))==null?void 0:r.unassociateElement)==null||o.call(r,this),An(this,ot,null)),a&&this.isConnected&&(An(this,ot,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=_n(this,ot))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,i,a;let{style:r}=q(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);let o=this.getAttribute(D.MEDIA_CONTROLLER);o&&(An(this,ot,(e=this.getRootNode())==null?void 0:e.getElementById(o)),(a=(i=_n(this,ot))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=_n(this,ot))==null?void 0:e.unassociateElement)==null||i.call(e,this),An(this,ot,null)}};ot=new WeakMap;Te.shadowRootOptions={mode:"open"};Te.getTemplateHTML=ef;Te.getSlotTemplateHTML=tf;l.customElements.get("media-text-display")||l.customElements.define("media-text-display",Te);var Kc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Vc=(t,e,i)=>(Kc(t,e,"read from private field"),i?i.call(t):e.get(t)),af=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},rf=(t,e,i,a)=>(Kc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),yr;function of(t,e){return`
775
+ `}var Te=class extends l.HTMLElement{constructor(){if(super(),jp(this,ot,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[D.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,n,s,d,u;e===D.MEDIA_CONTROLLER&&(i&&((n=(r=_o(this,ot))==null?void 0:r.unassociateElement)==null||n.call(r,this),Ao(this,ot,null)),a&&this.isConnected&&(Ao(this,ot,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=_o(this,ot))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,i,a;let{style:r}=q(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);let n=this.getAttribute(D.MEDIA_CONTROLLER);n&&(Ao(this,ot,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(i=_o(this,ot))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=_o(this,ot))==null?void 0:e.unassociateElement)==null||i.call(e,this),Ao(this,ot,null)}};ot=new WeakMap;Te.shadowRootOptions={mode:"open"};Te.getTemplateHTML=ef;Te.getSlotTemplateHTML=tf;l.customElements.get("media-text-display")||l.customElements.define("media-text-display",Te);var Kc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Vc=(t,e,i)=>(Kc(t,e,"read from private field"),i?i.call(t):e.get(t)),af=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},rf=(t,e,i,a)=>(Kc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),yr;function nf(t,e){return`
776
776
  <slot>${$e(e.mediaDuration)}</slot>
777
- `}var Tn=class extends Te{constructor(){var e;super(),af(this,yr,void 0),rf(this,yr,this.shadowRoot.querySelector("slot")),Vc(this,yr).textContent=$e((e=this.mediaDuration)!=null?e:0)}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_DURATION]}attributeChangedCallback(e,i,a){e===n.MEDIA_DURATION&&(Vc(this,yr).textContent=$e(+a)),super.attributeChangedCallback(e,i,a)}get mediaDuration(){return P(this,n.MEDIA_DURATION)}set mediaDuration(e){U(this,n.MEDIA_DURATION,e)}};yr=new WeakMap;Tn.getSlotTemplateHTML=of;l.customElements.get("media-duration-display")||l.customElements.define("media-duration-display",Tn);var nf={2:c("Network Error"),3:c("Decode Error"),4:c("Source Not Supported"),5:c("Encryption Error")},sf={2:c("A network error caused the media download to fail."),3:c("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:c("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:c("The media is encrypted and there are no keys to decrypt it.")},yn=t=>{var e,i;return t.code===1?null:{title:(e=nf[t.code])!=null?e:`Error ${t.code}`,message:(i=sf[t.code])!=null?i:t.message}};var Yc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},lf=(t,e,i)=>(Yc(t,e,"read from private field"),i?i.call(t):e.get(t)),df=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},uf=(t,e,i,a)=>(Yc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),kn;function cf(t){return`
777
+ `}var To=class extends Te{constructor(){var e;super(),af(this,yr,void 0),rf(this,yr,this.shadowRoot.querySelector("slot")),Vc(this,yr).textContent=$e((e=this.mediaDuration)!=null?e:0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_DURATION]}attributeChangedCallback(e,i,a){e===o.MEDIA_DURATION&&(Vc(this,yr).textContent=$e(+a)),super.attributeChangedCallback(e,i,a)}get mediaDuration(){return N(this,o.MEDIA_DURATION)}set mediaDuration(e){U(this,o.MEDIA_DURATION,e)}};yr=new WeakMap;To.getSlotTemplateHTML=nf;l.customElements.get("media-duration-display")||l.customElements.define("media-duration-display",To);var of={2:c("Network Error"),3:c("Decode Error"),4:c("Source Not Supported"),5:c("Encryption Error")},sf={2:c("A network error caused the media download to fail."),3:c("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:c("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:c("The media is encrypted and there are no keys to decrypt it.")},yo=t=>{var e,i;return t.code===1?null:{title:(e=of[t.code])!=null?e:`Error ${t.code}`,message:(i=sf[t.code])!=null?i:t.message}};var Yc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},lf=(t,e,i)=>(Yc(t,e,"read from private field"),i?i.call(t):e.get(t)),df=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},uf=(t,e,i,a)=>(Yc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),ko;function cf(t){return`
778
778
  <style>
779
779
  :host {
780
780
  background: rgb(20 20 30 / .8);
@@ -793,7 +793,7 @@
793
793
  <slot name="error-${t.mediaerrorcode}" id="content">
794
794
  ${qc({code:+t.mediaerrorcode,message:t.mediaerrormessage})}
795
795
  </slot>
796
- `}function mf(t){return t.code&&yn(t)!==null}function qc(t){var e;let{title:i,message:a}=(e=yn(t))!=null?e:{},r="";return i&&(r+=`<slot name="error-${t.code}-title"><h3>${i}</h3></slot>`),a&&(r+=`<slot name="error-${t.code}-message"><p>${a}</p></slot>`),r}var Gc=[n.MEDIA_ERROR_CODE,n.MEDIA_ERROR_MESSAGE],ia=class extends tt{constructor(){super(...arguments),df(this,kn,null)}static get observedAttributes(){return[...super.observedAttributes,...Gc]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,i,a){var r;if(super.attributeChangedCallback(e,i,a),!Gc.includes(e))return;let o=(r=this.mediaError)!=null?r:{code:this.mediaErrorCode,message:this.mediaErrorMessage};if(this.open=mf(o),this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(o),!this.hasAttribute("aria-label"))){let{title:s}=yn(o);s&&this.setAttribute("aria-label",s)}}get mediaError(){return lf(this,kn)}set mediaError(e){uf(this,kn,e)}get mediaErrorCode(){return P(this,"mediaerrorcode")}set mediaErrorCode(e){U(this,"mediaerrorcode",e)}get mediaErrorMessage(){return x(this,"mediaerrormessage")}set mediaErrorMessage(e){w(this,"mediaerrormessage",e)}};kn=new WeakMap;ia.getSlotTemplateHTML=cf;ia.formatErrorMessage=qc;l.customElements.get("media-error-dialog")||l.customElements.define("media-error-dialog",ia);var Sn=ia;var hf=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Gt=(t,e,i)=>(hf(t,e,"read from private field"),i?i.call(t):e.get(t)),Zc=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},aa,ra;function pf(t){return`
796
+ `}function mf(t){return t.code&&yo(t)!==null}function qc(t){var e;let{title:i,message:a}=(e=yo(t))!=null?e:{},r="";return i&&(r+=`<slot name="error-${t.code}-title"><h3>${i}</h3></slot>`),a&&(r+=`<slot name="error-${t.code}-message"><p>${a}</p></slot>`),r}var Gc=[o.MEDIA_ERROR_CODE,o.MEDIA_ERROR_MESSAGE],ia=class extends it{constructor(){super(...arguments),df(this,ko,null)}static get observedAttributes(){return[...super.observedAttributes,...Gc]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,i,a){var r;if(super.attributeChangedCallback(e,i,a),!Gc.includes(e))return;let n=(r=this.mediaError)!=null?r:{code:this.mediaErrorCode,message:this.mediaErrorMessage};if(this.open=mf(n),this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(n),!this.hasAttribute("aria-label"))){let{title:s}=yo(n);s&&this.setAttribute("aria-label",s)}}get mediaError(){return lf(this,ko)}set mediaError(e){uf(this,ko,e)}get mediaErrorCode(){return N(this,"mediaerrorcode")}set mediaErrorCode(e){U(this,"mediaerrorcode",e)}get mediaErrorMessage(){return x(this,"mediaerrormessage")}set mediaErrorMessage(e){w(this,"mediaerrormessage",e)}};ko=new WeakMap;ia.getSlotTemplateHTML=cf;ia.formatErrorMessage=qc;l.customElements.get("media-error-dialog")||l.customElements.define("media-error-dialog",ia);var So=ia;var hf=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Yt=(t,e,i)=>(hf(t,e,"read from private field"),i?i.call(t):e.get(t)),Zc=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},aa,ra;function pf(t){return`
797
797
  <style>
798
798
  :host {
799
799
  position: fixed;
@@ -885,28 +885,28 @@
885
885
  <table class="shortcuts-table">${[{keys:["Space","k"],description:"Toggle Playback"},{keys:["m"],description:"Toggle mute"},{keys:["f"],description:"Toggle fullscreen"},{keys:["c"],description:"Toggle captions or subtitles, if available"},{keys:["p"],description:"Toggle Picture in Picture"},{keys:["\u2190","j"],description:"Seek back 10s"},{keys:["\u2192","l"],description:"Seek forward 10s"},{keys:["\u2191"],description:"Turn volume up"},{keys:["\u2193"],description:"Turn volume down"},{keys:["< (SHIFT+,)"],description:"Decrease playback rate"},{keys:["> (SHIFT+.)"],description:"Increase playback rate"}].map(({keys:i,description:a})=>`
886
886
  <tr>
887
887
  <td>
888
- <div class="key-combo">${i.map((o,s)=>s>0?`<span class="key-separator">or</span><span class="key">${o}</span>`:`<span class="key">${o}</span>`).join("")}</div>
888
+ <div class="key-combo">${i.map((n,s)=>s>0?`<span class="key-separator">or</span><span class="key">${n}</span>`:`<span class="key">${n}</span>`).join("")}</div>
889
889
  </td>
890
890
  <td class="description">${a}</td>
891
891
  </tr>
892
892
  `).join("")}</table>
893
- `}var In=class extends tt{constructor(){super(...arguments),Zc(this,aa,e=>{var i;if(!this.open)return;let a=(i=this.shadowRoot)==null?void 0:i.querySelector("#content");if(!a)return;let r=e.composedPath(),o=r[0]===this||r.includes(this),s=r.includes(a);o&&!s&&(this.open=!1)}),Zc(this,ra,e=>{if(!this.open)return;let i=e.shiftKey&&(e.key==="/"||e.key==="?");(e.key==="Escape"||i)&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&(this.open=!1,e.preventDefault(),e.stopPropagation())})}connectedCallback(){super.connectedCallback(),this.open&&(this.addEventListener("click",Gt(this,aa)),document.addEventListener("keydown",Gt(this,ra)))}disconnectedCallback(){this.removeEventListener("click",Gt(this,aa)),document.removeEventListener("keydown",Gt(this,ra))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e==="open"&&(this.open?(this.addEventListener("click",Gt(this,aa)),document.addEventListener("keydown",Gt(this,ra))):(this.removeEventListener("click",Gt(this,aa)),document.removeEventListener("keydown",Gt(this,ra))))}};aa=new WeakMap;ra=new WeakMap;In.getSlotTemplateHTML=pf;l.customElements.get("media-keyboard-shortcuts-dialog")||l.customElements.define("media-keyboard-shortcuts-dialog",In);var Qc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},vf=(t,e,i)=>(Qc(t,e,"read from private field"),i?i.call(t):e.get(t)),Ef=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},bf=(t,e,i,a)=>(Qc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Mn,gf=`<svg aria-hidden="true" viewBox="0 0 26 24">
893
+ `}var Io=class extends it{constructor(){super(...arguments),Zc(this,aa,e=>{var i;if(!this.open)return;let a=(i=this.shadowRoot)==null?void 0:i.querySelector("#content");if(!a)return;let r=e.composedPath(),n=r[0]===this||r.includes(this),s=r.includes(a);n&&!s&&(this.open=!1)}),Zc(this,ra,e=>{if(!this.open)return;let i=e.shiftKey&&(e.key==="/"||e.key==="?");(e.key==="Escape"||i)&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&(this.open=!1,e.preventDefault(),e.stopPropagation())})}connectedCallback(){super.connectedCallback(),this.open&&(this.addEventListener("click",Yt(this,aa)),document.addEventListener("keydown",Yt(this,ra)))}disconnectedCallback(){this.removeEventListener("click",Yt(this,aa)),document.removeEventListener("keydown",Yt(this,ra))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e==="open"&&(this.open?(this.addEventListener("click",Yt(this,aa)),document.addEventListener("keydown",Yt(this,ra))):(this.removeEventListener("click",Yt(this,aa)),document.removeEventListener("keydown",Yt(this,ra))))}};aa=new WeakMap;ra=new WeakMap;Io.getSlotTemplateHTML=pf;l.customElements.get("media-keyboard-shortcuts-dialog")||l.customElements.define("media-keyboard-shortcuts-dialog",Io);var Qc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},vf=(t,e,i)=>(Qc(t,e,"read from private field"),i?i.call(t):e.get(t)),Ef=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},bf=(t,e,i,a)=>(Qc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Mo,gf=`<svg aria-hidden="true" viewBox="0 0 26 24">
894
894
  <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>
895
895
  </svg>`,_f=`<svg aria-hidden="true" viewBox="0 0 26 24">
896
896
  <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>
897
897
  </svg>`;function Af(t){return`
898
898
  <style>
899
- :host([${n.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) {
899
+ :host([${o.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) {
900
900
  display: none !important;
901
901
  }
902
902
 
903
903
 
904
- :host(:not([${n.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) {
904
+ :host(:not([${o.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) {
905
905
  display: none !important;
906
906
  }
907
907
 
908
- :host([${n.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter],
909
- :host(:not([${n.MEDIA_IS_FULLSCREEN}])) slot[name=tooltip-exit] {
908
+ :host([${o.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter],
909
+ :host(:not([${o.MEDIA_IS_FULLSCREEN}])) slot[name=tooltip-exit] {
910
910
  display: none;
911
911
  }
912
912
  </style>
@@ -918,7 +918,7 @@
918
918
  `}function Tf(){return`
919
919
  <slot name="tooltip-enter">${c("Enter fullscreen mode")}</slot>
920
920
  <slot name="tooltip-exit">${c("Exit fullscreen mode")}</slot>
921
- `}var zc=t=>{let e=t.mediaIsFullscreen?c("exit fullscreen mode"):c("enter fullscreen mode");t.setAttribute("aria-label",e)},kr=class extends B{constructor(){super(...arguments),Ef(this,Mn,null)}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_IS_FULLSCREEN,n.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),zc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_IS_FULLSCREEN&&zc(this)}get mediaFullscreenUnavailable(){return x(this,n.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){w(this,n.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return M(this,n.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){L(this,n.MEDIA_IS_FULLSCREEN,e)}handleClick(e){bf(this,Mn,e);let i=vf(this,Mn)instanceof PointerEvent,a=this.mediaIsFullscreen?new l.CustomEvent(h.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new l.CustomEvent(h.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:i});this.dispatchEvent(a)}};Mn=new WeakMap;kr.getSlotTemplateHTML=Af;kr.getTooltipContentHTML=Tf;l.customElements.get("media-fullscreen-button")||l.customElements.define("media-fullscreen-button",kr);var{MEDIA_TIME_IS_LIVE:Ln,MEDIA_PAUSED:Sr}=n,{MEDIA_SEEK_TO_LIVE_REQUEST:yf,MEDIA_PLAY_REQUEST:kf}=h,Sf='<svg viewBox="0 0 6 12" aria-hidden="true"><circle cx="3" cy="6" r="2"></circle></svg>';function If(t){return`
921
+ `}var zc=t=>{let e=t.mediaIsFullscreen?c("exit fullscreen mode"):c("enter fullscreen mode");t.setAttribute("aria-label",e)},kr=class extends B{constructor(){super(...arguments),Ef(this,Mo,null)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_FULLSCREEN,o.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),zc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===o.MEDIA_IS_FULLSCREEN&&zc(this)}get mediaFullscreenUnavailable(){return x(this,o.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){w(this,o.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return M(this,o.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){L(this,o.MEDIA_IS_FULLSCREEN,e)}handleClick(e){bf(this,Mo,e);let i=vf(this,Mo)instanceof PointerEvent,a=this.mediaIsFullscreen?new l.CustomEvent(h.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new l.CustomEvent(h.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:i});this.dispatchEvent(a)}};Mo=new WeakMap;kr.getSlotTemplateHTML=Af;kr.getTooltipContentHTML=Tf;l.customElements.get("media-fullscreen-button")||l.customElements.define("media-fullscreen-button",kr);var{MEDIA_TIME_IS_LIVE:Lo,MEDIA_PAUSED:Sr}=o,{MEDIA_SEEK_TO_LIVE_REQUEST:yf,MEDIA_PLAY_REQUEST:kf}=h,Sf='<svg viewBox="0 0 6 12" aria-hidden="true"><circle cx="3" cy="6" r="2"></circle></svg>';function If(t){return`
922
922
  <style>
923
923
  :host { --media-tooltip-display: none; }
924
924
 
@@ -930,13 +930,13 @@
930
930
  color: var(--media-live-button-icon-color, rgb(140, 140, 140));
931
931
  }
932
932
 
933
- :host([${Ln}]:not([${Sr}])) slot[name=indicator] > *,
934
- :host([${Ln}]:not([${Sr}])) ::slotted([slot=indicator]) {
933
+ :host([${Lo}]:not([${Sr}])) slot[name=indicator] > *,
934
+ :host([${Lo}]:not([${Sr}])) ::slotted([slot=indicator]) {
935
935
  fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));
936
936
  color: var(--media-live-button-indicator-color, rgb(255, 0, 0));
937
937
  }
938
938
 
939
- :host([${Ln}]:not([${Sr}])) {
939
+ :host([${Lo}]:not([${Sr}])) {
940
940
  cursor: var(--media-cursor, not-allowed);
941
941
  }
942
942
 
@@ -949,7 +949,7 @@
949
949
  <slot name="indicator">${Sf}</slot>
950
950
 
951
951
  <slot name="spacer">&nbsp;</slot><slot name="text">${c("live")}</slot>
952
- `}var Xc=t=>{var e;let i=t.mediaPaused||!t.mediaTimeIsLive,a=i?c("seek to live"):c("playing live");t.setAttribute("aria-label",a);let r=(e=t.shadowRoot)==null?void 0:e.querySelector('slot[name="text"]');r&&(r.textContent=c("live")),i?t.removeAttribute("aria-disabled"):t.setAttribute("aria-disabled","true")},Cn=class extends B{static get observedAttributes(){return[...super.observedAttributes,Ln,Sr]}connectedCallback(){super.connectedCallback(),Xc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),Xc(this)}get mediaPaused(){return M(this,n.MEDIA_PAUSED)}set mediaPaused(e){L(this,n.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return M(this,n.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){L(this,n.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new l.CustomEvent(yf,{composed:!0,bubbles:!0})),this.hasAttribute(Sr)&&this.dispatchEvent(new l.CustomEvent(kf,{composed:!0,bubbles:!0})))}};Cn.getSlotTemplateHTML=If;l.customElements.get("media-live-button")||l.customElements.define("media-live-button",Cn);var jc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ir=(t,e,i)=>(jc(t,e,"read from private field"),i?i.call(t):e.get(t)),Jc=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Mr=(t,e,i,a)=>(jc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),nt,Rn,wn={LOADING_DELAY:"loadingdelay",NO_AUTOHIDE:"noautohide"},em=500,Mf=`
952
+ `}var Xc=t=>{var e;let i=t.mediaPaused||!t.mediaTimeIsLive,a=i?c("seek to live"):c("playing live");t.setAttribute("aria-label",a);let r=(e=t.shadowRoot)==null?void 0:e.querySelector('slot[name="text"]');r&&(r.textContent=c("live")),i?t.removeAttribute("aria-disabled"):t.setAttribute("aria-disabled","true")},Co=class extends B{static get observedAttributes(){return[...super.observedAttributes,Lo,Sr]}connectedCallback(){super.connectedCallback(),Xc(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),Xc(this)}get mediaPaused(){return M(this,o.MEDIA_PAUSED)}set mediaPaused(e){L(this,o.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return M(this,o.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){L(this,o.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new l.CustomEvent(yf,{composed:!0,bubbles:!0})),this.hasAttribute(Sr)&&this.dispatchEvent(new l.CustomEvent(kf,{composed:!0,bubbles:!0})))}};Co.getSlotTemplateHTML=If;l.customElements.get("media-live-button")||l.customElements.define("media-live-button",Co);var jc=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ir=(t,e,i)=>(jc(t,e,"read from private field"),i?i.call(t):e.get(t)),Jc=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Mr=(t,e,i,a)=>(jc(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),st,Ro,wo={LOADING_DELAY:"loadingdelay",NO_AUTOHIDE:"noautohide"},em=500,Mf=`
953
953
  <svg aria-hidden="true" viewBox="0 0 100 100">
954
954
  <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">
955
955
  <animateTransform
@@ -983,8 +983,8 @@
983
983
  transition: opacity 0.15s;
984
984
  }
985
985
 
986
- :host([${n.MEDIA_LOADING}]:not([${n.MEDIA_PAUSED}])) slot[name=icon] > *,
987
- :host([${n.MEDIA_LOADING}]:not([${n.MEDIA_PAUSED}])) ::slotted([slot=icon]) {
986
+ :host([${o.MEDIA_LOADING}]:not([${o.MEDIA_PAUSED}])) slot[name=icon] > *,
987
+ :host([${o.MEDIA_LOADING}]:not([${o.MEDIA_PAUSED}])) ::slotted([slot=icon]) {
988
988
  opacity: var(--media-loading-indicator-opacity, 1);
989
989
  transition: opacity 0.15s var(--_loading-indicator-delay);
990
990
  }
@@ -994,7 +994,7 @@
994
994
  transition: visibility 0.15s;
995
995
  }
996
996
 
997
- :host([${n.MEDIA_LOADING}]:not([${n.MEDIA_PAUSED}])) #status {
997
+ :host([${o.MEDIA_LOADING}]:not([${o.MEDIA_PAUSED}])) #status {
998
998
  visibility: var(--media-loading-indicator-opacity, visible);
999
999
  transition: visibility 0.15s var(--_loading-indicator-delay);
1000
1000
  }
@@ -1009,7 +1009,7 @@
1009
1009
 
1010
1010
  <slot name="icon">${Mf}</slot>
1011
1011
  <div id="status" role="status" aria-live="polite">${c("media loading")}</div>
1012
- `}var Lr=class extends l.HTMLElement{constructor(){if(super(),Jc(this,nt,void 0),Jc(this,Rn,em),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[D.MEDIA_CONTROLLER,n.MEDIA_PAUSED,n.MEDIA_LOADING,wn.LOADING_DELAY]}attributeChangedCallback(e,i,a){var r,o,s,d,u;e===wn.LOADING_DELAY&&i!==a?this.loadingDelay=Number(a):e===D.MEDIA_CONTROLLER&&(i&&((o=(r=Ir(this,nt))==null?void 0:r.unassociateElement)==null||o.call(r,this),Mr(this,nt,null)),a&&this.isConnected&&(Mr(this,nt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Ir(this,nt))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,i,a;let r=this.getAttribute(D.MEDIA_CONTROLLER);r&&(Mr(this,nt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=Ir(this,nt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Ir(this,nt))==null?void 0:e.unassociateElement)==null||i.call(e,this),Mr(this,nt,null)}get loadingDelay(){return Ir(this,Rn)}set loadingDelay(e){Mr(this,Rn,e);let{style:i}=q(this.shadowRoot,":host");i.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return M(this,n.MEDIA_PAUSED)}set mediaPaused(e){L(this,n.MEDIA_PAUSED,e)}get mediaLoading(){return M(this,n.MEDIA_LOADING)}set mediaLoading(e){L(this,n.MEDIA_LOADING,e)}get mediaController(){return x(this,D.MEDIA_CONTROLLER)}set mediaController(e){w(this,D.MEDIA_CONTROLLER,e)}get noAutohide(){return M(this,wn.NO_AUTOHIDE)}set noAutohide(e){L(this,wn.NO_AUTOHIDE,e)}};nt=new WeakMap;Rn=new WeakMap;Lr.shadowRootOptions={mode:"open"};Lr.getTemplateHTML=Lf;l.customElements.get("media-loading-indicator")||l.customElements.define("media-loading-indicator",Lr);var Cf=`<svg aria-hidden="true" viewBox="0 0 24 24">
1012
+ `}var Lr=class extends l.HTMLElement{constructor(){if(super(),Jc(this,st,void 0),Jc(this,Ro,em),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[D.MEDIA_CONTROLLER,o.MEDIA_PAUSED,o.MEDIA_LOADING,wo.LOADING_DELAY]}attributeChangedCallback(e,i,a){var r,n,s,d,u;e===wo.LOADING_DELAY&&i!==a?this.loadingDelay=Number(a):e===D.MEDIA_CONTROLLER&&(i&&((n=(r=Ir(this,st))==null?void 0:r.unassociateElement)==null||n.call(r,this),Mr(this,st,null)),a&&this.isConnected&&(Mr(this,st,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Ir(this,st))==null?void 0:d.associateElement)==null||u.call(d,this)))}connectedCallback(){var e,i,a;let r=this.getAttribute(D.MEDIA_CONTROLLER);r&&(Mr(this,st,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=Ir(this,st))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Ir(this,st))==null?void 0:e.unassociateElement)==null||i.call(e,this),Mr(this,st,null)}get loadingDelay(){return Ir(this,Ro)}set loadingDelay(e){Mr(this,Ro,e);let{style:i}=q(this.shadowRoot,":host");i.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return M(this,o.MEDIA_PAUSED)}set mediaPaused(e){L(this,o.MEDIA_PAUSED,e)}get mediaLoading(){return M(this,o.MEDIA_LOADING)}set mediaLoading(e){L(this,o.MEDIA_LOADING,e)}get mediaController(){return x(this,D.MEDIA_CONTROLLER)}set mediaController(e){w(this,D.MEDIA_CONTROLLER,e)}get noAutohide(){return M(this,wo.NO_AUTOHIDE)}set noAutohide(e){L(this,wo.NO_AUTOHIDE,e)}};st=new WeakMap;Ro=new WeakMap;Lr.shadowRootOptions={mode:"open"};Lr.getTemplateHTML=Lf;l.customElements.get("media-loading-indicator")||l.customElements.define("media-loading-indicator",Lr);var Cf=`<svg aria-hidden="true" viewBox="0 0 24 24">
1013
1013
  <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"/>
1014
1014
  </svg>`,tm=`<svg aria-hidden="true" viewBox="0 0 24 24">
1015
1015
  <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"/>
@@ -1017,25 +1017,25 @@
1017
1017
  <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"/>
1018
1018
  </svg>`;function Rf(t){return`
1019
1019
  <style>
1020
- :host(:not([${n.MEDIA_VOLUME_LEVEL}])) slot[name=icon] slot:not([name=high]),
1021
- :host([${n.MEDIA_VOLUME_LEVEL}=high]) slot[name=icon] slot:not([name=high]) {
1020
+ :host(:not([${o.MEDIA_VOLUME_LEVEL}])) slot[name=icon] slot:not([name=high]),
1021
+ :host([${o.MEDIA_VOLUME_LEVEL}=high]) slot[name=icon] slot:not([name=high]) {
1022
1022
  display: none !important;
1023
1023
  }
1024
1024
 
1025
- :host([${n.MEDIA_VOLUME_LEVEL}=off]) slot[name=icon] slot:not([name=off]) {
1025
+ :host([${o.MEDIA_VOLUME_LEVEL}=off]) slot[name=icon] slot:not([name=off]) {
1026
1026
  display: none !important;
1027
1027
  }
1028
1028
 
1029
- :host([${n.MEDIA_VOLUME_LEVEL}=low]) slot[name=icon] slot:not([name=low]) {
1029
+ :host([${o.MEDIA_VOLUME_LEVEL}=low]) slot[name=icon] slot:not([name=low]) {
1030
1030
  display: none !important;
1031
1031
  }
1032
1032
 
1033
- :host([${n.MEDIA_VOLUME_LEVEL}=medium]) slot[name=icon] slot:not([name=medium]) {
1033
+ :host([${o.MEDIA_VOLUME_LEVEL}=medium]) slot[name=icon] slot:not([name=medium]) {
1034
1034
  display: none !important;
1035
1035
  }
1036
1036
 
1037
- :host(:not([${n.MEDIA_VOLUME_LEVEL}=off])) slot[name=tooltip-unmute],
1038
- :host([${n.MEDIA_VOLUME_LEVEL}=off]) slot[name=tooltip-mute] {
1037
+ :host(:not([${o.MEDIA_VOLUME_LEVEL}=off])) slot[name=tooltip-unmute],
1038
+ :host([${o.MEDIA_VOLUME_LEVEL}=off]) slot[name=tooltip-mute] {
1039
1039
  display: none;
1040
1040
  }
1041
1041
  </style>
@@ -1049,20 +1049,20 @@
1049
1049
  `}function xf(){return`
1050
1050
  <slot name="tooltip-mute">${c("Mute")}</slot>
1051
1051
  <slot name="tooltip-unmute">${c("Unmute")}</slot>
1052
- `}var im=t=>{let i=t.mediaVolumeLevel==="off"?c("unmute"):c("mute");t.setAttribute("aria-label",i)},Cr=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),im(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_VOLUME_LEVEL&&im(this)}get mediaVolumeLevel(){return x(this,n.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){w(this,n.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e=this.mediaVolumeLevel==="off"?h.MEDIA_UNMUTE_REQUEST:h.MEDIA_MUTE_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};Cr.getSlotTemplateHTML=Rf;Cr.getTooltipContentHTML=xf;l.customElements.get("media-mute-button")||l.customElements.define("media-mute-button",Cr);var am=`<svg aria-hidden="true" viewBox="0 0 28 24">
1052
+ `}var im=t=>{let i=t.mediaVolumeLevel==="off"?c("unmute"):c("mute");t.setAttribute("aria-label",i)},Cr=class extends B{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),im(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===o.MEDIA_VOLUME_LEVEL&&im(this)}get mediaVolumeLevel(){return x(this,o.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){w(this,o.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e=this.mediaVolumeLevel==="off"?h.MEDIA_UNMUTE_REQUEST:h.MEDIA_MUTE_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};Cr.getSlotTemplateHTML=Rf;Cr.getTooltipContentHTML=xf;l.customElements.get("media-mute-button")||l.customElements.define("media-mute-button",Cr);var am=`<svg aria-hidden="true" viewBox="0 0 28 24">
1053
1053
  <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"/>
1054
1054
  </svg>`;function Df(t){return`
1055
1055
  <style>
1056
- :host([${n.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) {
1056
+ :host([${o.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) {
1057
1057
  display: none !important;
1058
1058
  }
1059
1059
 
1060
- :host(:not([${n.MEDIA_IS_PIP}])) slot[name=icon] slot:not([name=enter]) {
1060
+ :host(:not([${o.MEDIA_IS_PIP}])) slot[name=icon] slot:not([name=enter]) {
1061
1061
  display: none !important;
1062
1062
  }
1063
1063
 
1064
- :host([${n.MEDIA_IS_PIP}]) slot[name=tooltip-enter],
1065
- :host(:not([${n.MEDIA_IS_PIP}])) slot[name=tooltip-exit] {
1064
+ :host([${o.MEDIA_IS_PIP}]) slot[name=tooltip-enter],
1065
+ :host(:not([${o.MEDIA_IS_PIP}])) slot[name=tooltip-exit] {
1066
1066
  display: none;
1067
1067
  }
1068
1068
  </style>
@@ -1074,7 +1074,7 @@
1074
1074
  `}function Of(){return`
1075
1075
  <slot name="tooltip-enter">${c("Enter picture in picture mode")}</slot>
1076
1076
  <slot name="tooltip-exit">${c("Exit picture in picture mode")}</slot>
1077
- `}var rm=t=>{let e=t.mediaIsPip?c("exit picture in picture mode"):c("enter picture in picture mode");t.setAttribute("aria-label",e)},wr=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_IS_PIP,n.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),rm(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_IS_PIP&&rm(this)}get mediaPipUnavailable(){return x(this,n.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){w(this,n.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return M(this,n.MEDIA_IS_PIP)}set mediaIsPip(e){L(this,n.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?h.MEDIA_EXIT_PIP_REQUEST:h.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};wr.getSlotTemplateHTML=Df;wr.getTooltipContentHTML=Of;l.customElements.get("media-pip-button")||l.customElements.define("media-pip-button",wr);var Pf=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},oa=(t,e,i)=>(Pf(t,e,"read from private field"),i?i.call(t):e.get(t)),Nf=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Yt,Wl={RATES:"rates"},Fl=[1,1.2,1.5,1.7,2],gi=1;function Uf(t){return`
1077
+ `}var rm=t=>{let e=t.mediaIsPip?c("exit picture in picture mode"):c("enter picture in picture mode");t.setAttribute("aria-label",e)},wr=class extends B{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_IS_PIP,o.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),rm(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===o.MEDIA_IS_PIP&&rm(this)}get mediaPipUnavailable(){return x(this,o.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){w(this,o.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return M(this,o.MEDIA_IS_PIP)}set mediaIsPip(e){L(this,o.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?h.MEDIA_EXIT_PIP_REQUEST:h.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};wr.getSlotTemplateHTML=Df;wr.getTooltipContentHTML=Of;l.customElements.get("media-pip-button")||l.customElements.define("media-pip-button",wr);var Nf=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},na=(t,e,i)=>(Nf(t,e,"read from private field"),i?i.call(t):e.get(t)),Pf=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},qt,Wl={RATES:"rates"},Fl=[1,1.2,1.5,1.7,2],gi=1;function Uf(t){return`
1078
1078
  <style>
1079
1079
  :host {
1080
1080
  min-width: 5ch;
@@ -1082,19 +1082,19 @@
1082
1082
  }
1083
1083
  </style>
1084
1084
  <slot name="icon">${t.mediaplaybackrate||gi}x</slot>
1085
- `}function Hf(){return c("Playback rate")}var Rr=class extends B{constructor(){var e;super(),Nf(this,Yt,new Wt(this,Wl.RATES,{defaultValue:Fl})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${(e=this.mediaPlaybackRate)!=null?e:gi}x`}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PLAYBACK_RATE,Wl.RATES]}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),e===Wl.RATES&&(oa(this,Yt).value=a),e===n.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,o=Number.isNaN(r)?gi:r;this.container.innerHTML=`${o}x`,this.setAttribute("aria-label",c("Playback rate {playbackRate}",{playbackRate:o}))}}get rates(){return oa(this,Yt)}set rates(e){e?Array.isArray(e)?oa(this,Yt).value=e.join(" "):typeof e=="string"&&(oa(this,Yt).value=e):oa(this,Yt).value=""}get mediaPlaybackRate(){return P(this,n.MEDIA_PLAYBACK_RATE,gi)}set mediaPlaybackRate(e){U(this,n.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,i;let a=Array.from(oa(this,Yt).values(),s=>+s).sort((s,d)=>s-d),r=(i=(e=a.find(s=>s>this.mediaPlaybackRate))!=null?e:a[0])!=null?i:gi,o=new l.CustomEvent(h.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(o)}};Yt=new WeakMap;Rr.getSlotTemplateHTML=Uf;Rr.getTooltipContentHTML=Hf;l.customElements.get("media-playback-rate-button")||l.customElements.define("media-playback-rate-button",Rr);var Bf=`<svg aria-hidden="true" viewBox="0 0 24 24">
1085
+ `}function Hf(){return c("Playback rate")}var Rr=class extends B{constructor(){var e;super(),Pf(this,qt,new Ft(this,Wl.RATES,{defaultValue:Fl})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${(e=this.mediaPlaybackRate)!=null?e:gi}x`}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PLAYBACK_RATE,Wl.RATES]}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),e===Wl.RATES&&(na(this,qt).value=a),e===o.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,n=Number.isNaN(r)?gi:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",c("Playback rate {playbackRate}",{playbackRate:n}))}}get rates(){return na(this,qt)}set rates(e){e?Array.isArray(e)?na(this,qt).value=e.join(" "):typeof e=="string"&&(na(this,qt).value=e):na(this,qt).value=""}get mediaPlaybackRate(){return N(this,o.MEDIA_PLAYBACK_RATE,gi)}set mediaPlaybackRate(e){U(this,o.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,i;let a=Array.from(na(this,qt).values(),s=>+s).sort((s,d)=>s-d),r=(i=(e=a.find(s=>s>this.mediaPlaybackRate))!=null?e:a[0])!=null?i:gi,n=new l.CustomEvent(h.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:r});this.dispatchEvent(n)}};qt=new WeakMap;Rr.getSlotTemplateHTML=Uf;Rr.getTooltipContentHTML=Hf;l.customElements.get("media-playback-rate-button")||l.customElements.define("media-playback-rate-button",Rr);var Bf=`<svg aria-hidden="true" viewBox="0 0 24 24">
1086
1086
  <path d="m6 21 15-9L6 3v18Z"/>
1087
1087
  </svg>`,$f=`<svg aria-hidden="true" viewBox="0 0 24 24">
1088
1088
  <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/>
1089
1089
  </svg>`;function Wf(t){return`
1090
1090
  <style>
1091
- :host([${n.MEDIA_PAUSED}]) slot[name=pause],
1092
- :host(:not([${n.MEDIA_PAUSED}])) slot[name=play] {
1091
+ :host([${o.MEDIA_PAUSED}]) slot[name=pause],
1092
+ :host(:not([${o.MEDIA_PAUSED}])) slot[name=play] {
1093
1093
  display: none !important;
1094
1094
  }
1095
1095
 
1096
- :host([${n.MEDIA_PAUSED}]) slot[name=tooltip-pause],
1097
- :host(:not([${n.MEDIA_PAUSED}])) slot[name=tooltip-play] {
1096
+ :host([${o.MEDIA_PAUSED}]) slot[name=tooltip-pause],
1097
+ :host(:not([${o.MEDIA_PAUSED}])) slot[name=tooltip-play] {
1098
1098
  display: none;
1099
1099
  }
1100
1100
  </style>
@@ -1106,7 +1106,7 @@
1106
1106
  `}function Ff(){return`
1107
1107
  <slot name="tooltip-play">${c("Play")}</slot>
1108
1108
  <slot name="tooltip-pause">${c("Pause")}</slot>
1109
- `}var om=t=>{let e=t.mediaPaused?c("play"):c("pause");t.setAttribute("aria-label",e)},xr=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PAUSED,n.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),om(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),(e===n.MEDIA_PAUSED||e===n.MEDIA_LANG)&&om(this)}get mediaPaused(){return M(this,n.MEDIA_PAUSED)}set mediaPaused(e){L(this,n.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?h.MEDIA_PLAY_REQUEST:h.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};xr.getSlotTemplateHTML=Wf;xr.getTooltipContentHTML=Ff;l.customElements.get("media-play-button")||l.customElements.define("media-play-button",xr);var st={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"};function Vf(t){return`
1109
+ `}var nm=t=>{let e=t.mediaPaused?c("play"):c("pause");t.setAttribute("aria-label",e)},xr=class extends B{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PAUSED,o.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),nm(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),(e===o.MEDIA_PAUSED||e===o.MEDIA_LANG)&&nm(this)}get mediaPaused(){return M(this,o.MEDIA_PAUSED)}set mediaPaused(e){L(this,o.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?h.MEDIA_PLAY_REQUEST:h.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new l.CustomEvent(e,{composed:!0,bubbles:!0}))}};xr.getSlotTemplateHTML=Wf;xr.getTooltipContentHTML=Ff;l.customElements.get("media-play-button")||l.customElements.define("media-play-button",xr);var lt={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"};function Vf(t){return`
1110
1110
  <style>
1111
1111
  :host {
1112
1112
  pointer-events: none;
@@ -1128,7 +1128,7 @@
1128
1128
  </style>
1129
1129
 
1130
1130
  <img part="poster img" aria-hidden="true" id="image"/>
1131
- `}var Kf=t=>{t.style.removeProperty("background-image")},Gf=(t,e)=>{t.style["background-image"]=`url('${e}')`},Dr=class extends l.HTMLElement{static get observedAttributes(){return[st.PLACEHOLDER_SRC,st.SRC]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,i,a){e===st.SRC&&(a==null?this.image.removeAttribute(st.SRC):this.image.setAttribute(st.SRC,a)),e===st.PLACEHOLDER_SRC&&(a==null?Kf(this.image):Gf(this.image,a))}get placeholderSrc(){return x(this,st.PLACEHOLDER_SRC)}set placeholderSrc(e){w(this,st.SRC,e)}get src(){return x(this,st.SRC)}set src(e){w(this,st.SRC,e)}};Dr.shadowRootOptions={mode:"open"};Dr.getTemplateHTML=Vf;l.customElements.get("media-poster-image")||l.customElements.define("media-poster-image",Dr);var nm=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Yf=(t,e,i)=>(nm(t,e,"read from private field"),i?i.call(t):e.get(t)),qf=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Zf=(t,e,i,a)=>(nm(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),xn,Vl=class extends Te{constructor(){super(),qf(this,xn,void 0),Zf(this,xn,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PREVIEW_CHAPTER,n.MEDIA_LANG]}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),(e===n.MEDIA_PREVIEW_CHAPTER||e===n.MEDIA_LANG)&&a!==i&&a!=null)if(Yf(this,xn).textContent=a,a!==""){let r=c("chapter: {chapterName}",{chapterName:a});this.setAttribute("aria-valuetext",r)}else this.removeAttribute("aria-valuetext")}get mediaPreviewChapter(){return x(this,n.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){w(this,n.MEDIA_PREVIEW_CHAPTER,e)}};xn=new WeakMap;l.customElements.get("media-preview-chapter-display")||l.customElements.define("media-preview-chapter-display",Vl);var sm=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Dn=(t,e,i)=>(sm(t,e,"read from private field"),i?i.call(t):e.get(t)),zf=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},On=(t,e,i,a)=>(sm(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),lt;function Qf(t){return`
1131
+ `}var Kf=t=>{t.style.removeProperty("background-image")},Gf=(t,e)=>{t.style["background-image"]=`url('${e}')`},Dr=class extends l.HTMLElement{static get observedAttributes(){return[lt.PLACEHOLDER_SRC,lt.SRC]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,i,a){e===lt.SRC&&(a==null?this.image.removeAttribute(lt.SRC):this.image.setAttribute(lt.SRC,a)),e===lt.PLACEHOLDER_SRC&&(a==null?Kf(this.image):Gf(this.image,a))}get placeholderSrc(){return x(this,lt.PLACEHOLDER_SRC)}set placeholderSrc(e){w(this,lt.SRC,e)}get src(){return x(this,lt.SRC)}set src(e){w(this,lt.SRC,e)}};Dr.shadowRootOptions={mode:"open"};Dr.getTemplateHTML=Vf;l.customElements.get("media-poster-image")||l.customElements.define("media-poster-image",Dr);var om=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Yf=(t,e,i)=>(om(t,e,"read from private field"),i?i.call(t):e.get(t)),qf=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Zf=(t,e,i,a)=>(om(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),xo,Vl=class extends Te{constructor(){super(),qf(this,xo,void 0),Zf(this,xo,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PREVIEW_CHAPTER,o.MEDIA_LANG]}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),(e===o.MEDIA_PREVIEW_CHAPTER||e===o.MEDIA_LANG)&&a!==i&&a!=null)if(Yf(this,xo).textContent=a,a!==""){let r=c("chapter: {chapterName}",{chapterName:a});this.setAttribute("aria-valuetext",r)}else this.removeAttribute("aria-valuetext")}get mediaPreviewChapter(){return x(this,o.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){w(this,o.MEDIA_PREVIEW_CHAPTER,e)}};xo=new WeakMap;l.customElements.get("media-preview-chapter-display")||l.customElements.define("media-preview-chapter-display",Vl);var sm=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Do=(t,e,i)=>(sm(t,e,"read from private field"),i?i.call(t):e.get(t)),zf=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Oo=(t,e,i,a)=>(sm(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),dt;function Qf(t){return`
1132
1132
  <style>
1133
1133
  :host {
1134
1134
  box-sizing: border-box;
@@ -1142,7 +1142,7 @@
1142
1142
  }
1143
1143
  </style>
1144
1144
  <img crossorigin loading="eager" decoding="async">
1145
- `}var na=class extends l.HTMLElement{constructor(){if(super(),zf(this,lt,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[D.MEDIA_CONTROLLER,n.MEDIA_PREVIEW_IMAGE,n.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,i,a;let r=this.getAttribute(D.MEDIA_CONTROLLER);r&&(On(this,lt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=Dn(this,lt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Dn(this,lt))==null?void 0:e.unassociateElement)==null||i.call(e,this),On(this,lt,null)}attributeChangedCallback(e,i,a){var r,o,s,d,u;[n.MEDIA_PREVIEW_IMAGE,n.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===D.MEDIA_CONTROLLER&&(i&&((o=(r=Dn(this,lt))==null?void 0:r.unassociateElement)==null||o.call(r,this),On(this,lt,null)),a&&this.isConnected&&(On(this,lt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Dn(this,lt))==null?void 0:d.associateElement)==null||u.call(d,this)))}get mediaPreviewImage(){return x(this,n.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){w(this,n.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(n.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(i=>+i)}set mediaPreviewCoords(e){if(!e){this.removeAttribute(n.MEDIA_PREVIEW_COORDS);return}this.setAttribute(n.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){let e=this.mediaPreviewCoords,i=this.mediaPreviewImage;if(!(e&&i))return;let[a,r,o,s]=e,d=i.split("#")[0],u=getComputedStyle(this),{maxWidth:f,maxHeight:y,minWidth:A,minHeight:E}=u,p=u.getPropertyValue("--media-preview-thumbnail-object-fit").trim()||"contain",k,g;if(p==="fill"){let Ce=parseInt(f)/o,we=parseInt(y)/s,Ut=parseInt(A)/o,Qe=parseInt(E)/s;k=Ce<1?Ce:Math.max(Ce,Ut),g=we<1?we:Math.max(we,Qe)}else{let Ce=Math.min(parseInt(f)/o,parseInt(y)/s),we=Math.max(parseInt(A)/o,parseInt(E)/s),Qe=Ce<1?Ce:we>1?we:1;k=Qe,g=Qe}let{style:S}=q(this.shadowRoot,":host"),C=q(this.shadowRoot,"img").style,j=this.shadowRoot.querySelector("img"),Nt=Math.min(k,g)<1?"min":"max";S.setProperty(`${Nt}-width`,"initial","important"),S.setProperty(`${Nt}-height`,"initial","important"),S.width=`${o*k}px`,S.height=`${s*g}px`;let gt=()=>{C.width=`${this.imgWidth*k}px`,C.height=`${this.imgHeight*g}px`,C.display="block"};j.src!==d&&(j.onload=()=>{this.imgWidth=j.naturalWidth,this.imgHeight=j.naturalHeight,gt(),j.onload=null},j.src=d,gt()),gt(),C.transform=`translate(-${a*k}px, -${r*g}px)`}};lt=new WeakMap;na.shadowRootOptions={mode:"open"};na.getTemplateHTML=Qf;l.customElements.get("media-preview-thumbnail")||l.customElements.define("media-preview-thumbnail",na);var Pn=na;var dm=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},lm=(t,e,i)=>(dm(t,e,"read from private field"),i?i.call(t):e.get(t)),Xf=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Jf=(t,e,i,a)=>(dm(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Or,Kl=class extends Te{constructor(){super(),Xf(this,Or,void 0),Jf(this,Or,this.shadowRoot.querySelector("slot")),lm(this,Or).textContent=$e(0)}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_PREVIEW_TIME&&a!=null&&(lm(this,Or).textContent=$e(parseFloat(a)))}get mediaPreviewTime(){return P(this,n.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){U(this,n.MEDIA_PREVIEW_TIME,e)}};Or=new WeakMap;l.customElements.get("media-preview-time-display")||l.customElements.define("media-preview-time-display",Kl);var sa={SEEK_OFFSET:"seekoffset"},Gl=30,jf=t=>`
1145
+ `}var oa=class extends l.HTMLElement{constructor(){if(super(),zf(this,dt,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[D.MEDIA_CONTROLLER,o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,i,a;let r=this.getAttribute(D.MEDIA_CONTROLLER);r&&(Oo(this,dt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=Do(this,dt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Do(this,dt))==null?void 0:e.unassociateElement)==null||i.call(e,this),Oo(this,dt,null)}attributeChangedCallback(e,i,a){var r,n,s,d,u;[o.MEDIA_PREVIEW_IMAGE,o.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===D.MEDIA_CONTROLLER&&(i&&((n=(r=Do(this,dt))==null?void 0:r.unassociateElement)==null||n.call(r,this),Oo(this,dt,null)),a&&this.isConnected&&(Oo(this,dt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(u=(d=Do(this,dt))==null?void 0:d.associateElement)==null||u.call(d,this)))}get mediaPreviewImage(){return x(this,o.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){w(this,o.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(o.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(i=>+i)}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,i=this.mediaPreviewImage;if(!(e&&i))return;let[a,r,n,s]=e,d=i.split("#")[0],u=getComputedStyle(this),{maxWidth:f,maxHeight:y,minWidth:A,minHeight:E}=u,p=u.getPropertyValue("--media-preview-thumbnail-object-fit").trim()||"contain",k,g;if(p==="fill"){let Ce=parseInt(f)/n,we=parseInt(y)/s,Ht=parseInt(A)/n,Xe=parseInt(E)/s;k=Ce<1?Ce:Math.max(Ce,Ht),g=we<1?we:Math.max(we,Xe)}else{let Ce=Math.min(parseInt(f)/n,parseInt(y)/s),we=Math.max(parseInt(A)/n,parseInt(E)/s),Xe=Ce<1?Ce:we>1?we:1;k=Xe,g=Xe}let{style:S}=q(this.shadowRoot,":host"),C=q(this.shadowRoot,"img").style,j=this.shadowRoot.querySelector("img"),Ut=Math.min(k,g)<1?"min":"max";S.setProperty(`${Ut}-width`,"initial","important"),S.setProperty(`${Ut}-height`,"initial","important"),S.width=`${n*k}px`,S.height=`${s*g}px`;let _t=()=>{C.width=`${this.imgWidth*k}px`,C.height=`${this.imgHeight*g}px`,C.display="block"};j.src!==d&&(j.onload=()=>{this.imgWidth=j.naturalWidth,this.imgHeight=j.naturalHeight,_t(),j.onload=null},j.src=d,_t()),_t(),C.transform=`translate(-${a*k}px, -${r*g}px)`}};dt=new WeakMap;oa.shadowRootOptions={mode:"open"};oa.getTemplateHTML=Qf;l.customElements.get("media-preview-thumbnail")||l.customElements.define("media-preview-thumbnail",oa);var No=oa;var dm=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},lm=(t,e,i)=>(dm(t,e,"read from private field"),i?i.call(t):e.get(t)),Xf=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Jf=(t,e,i,a)=>(dm(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Or,Kl=class extends Te{constructor(){super(),Xf(this,Or,void 0),Jf(this,Or,this.shadowRoot.querySelector("slot")),lm(this,Or).textContent=$e(0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===o.MEDIA_PREVIEW_TIME&&a!=null&&(lm(this,Or).textContent=$e(parseFloat(a)))}get mediaPreviewTime(){return N(this,o.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){U(this,o.MEDIA_PREVIEW_TIME,e)}};Or=new WeakMap;l.customElements.get("media-preview-time-display")||l.customElements.define("media-preview-time-display",Kl);var sa={SEEK_OFFSET:"seekoffset"},Gl=30,jf=t=>`
1146
1146
  <svg aria-hidden="true" viewBox="0 0 20 24">
1147
1147
  <defs>
1148
1148
  <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>
@@ -1151,18 +1151,18 @@
1151
1151
  <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"/>
1152
1152
  </svg>`;function ev(t,e){return`
1153
1153
  <slot name="icon">${jf(e.seekOffset)}</slot>
1154
- `}var tv=(t,e)=>{t.setAttribute("aria-label",c("seek back {seekOffset} seconds",{seekOffset:e}))};function iv(){return c("Seek backward")}var av=0,Pr=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_CURRENT_TIME,sa.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=P(this,sa.SEEK_OFFSET,Gl)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),tv(this,this.seekOffset),e===sa.SEEK_OFFSET&&(this.seekOffset=P(this,sa.SEEK_OFFSET,Gl))}get seekOffset(){return P(this,sa.SEEK_OFFSET,Gl)}set seekOffset(e){U(this,sa.SEEK_OFFSET,e),this.setAttribute("aria-label",c("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),Oo(Po(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return P(this,n.MEDIA_CURRENT_TIME,av)}set mediaCurrentTime(e){U(this,n.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),i=new l.CustomEvent(h.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}};Pr.getSlotTemplateHTML=ev;Pr.getTooltipContentHTML=iv;l.customElements.get("media-seek-backward-button")||l.customElements.define("media-seek-backward-button",Pr);var la={SEEK_OFFSET:"seekoffset"},Yl=30,rv=t=>`
1154
+ `}var tv=(t,e)=>{t.setAttribute("aria-label",c("seek back {seekOffset} seconds",{seekOffset:e}))};function iv(){return c("Seek backward")}var av=0,Nr=class extends B{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,sa.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=N(this,sa.SEEK_OFFSET,Gl)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),tv(this,this.seekOffset),e===sa.SEEK_OFFSET&&(this.seekOffset=N(this,sa.SEEK_OFFSET,Gl))}get seekOffset(){return N(this,sa.SEEK_OFFSET,Gl)}set seekOffset(e){U(this,sa.SEEK_OFFSET,e),this.setAttribute("aria-label",c("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),On(Nn(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return N(this,o.MEDIA_CURRENT_TIME,av)}set mediaCurrentTime(e){U(this,o.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),i=new l.CustomEvent(h.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}};Nr.getSlotTemplateHTML=ev;Nr.getTooltipContentHTML=iv;l.customElements.get("media-seek-backward-button")||l.customElements.define("media-seek-backward-button",Nr);var la={SEEK_OFFSET:"seekoffset"},Yl=30,rv=t=>`
1155
1155
  <svg aria-hidden="true" viewBox="0 0 20 24">
1156
1156
  <defs>
1157
1157
  <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>
1158
1158
  </defs>
1159
1159
  <text class="text value" transform="translate(8.9 19.87)">${t}</text>
1160
1160
  <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"/>
1161
- </svg>`;function ov(t,e){return`
1161
+ </svg>`;function nv(t,e){return`
1162
1162
  <slot name="icon">${rv(e.seekOffset)}</slot>
1163
- `}var nv=(t,e)=>{t.setAttribute("aria-label",c("seek forward {seekOffset} seconds",{seekOffset:e}))};function sv(){return c("Seek forward")}var lv=0,Nr=class extends B{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_CURRENT_TIME,la.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=P(this,la.SEEK_OFFSET,Yl)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),nv(this,this.seekOffset),e===la.SEEK_OFFSET&&(this.seekOffset=P(this,la.SEEK_OFFSET,Yl))}get seekOffset(){return P(this,la.SEEK_OFFSET,Yl)}set seekOffset(e){U(this,la.SEEK_OFFSET,e),this.setAttribute("aria-label",c("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),Oo(Po(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return P(this,n.MEDIA_CURRENT_TIME,lv)}set mediaCurrentTime(e){U(this,n.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,i=new l.CustomEvent(h.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}};Nr.getSlotTemplateHTML=ov;Nr.getTooltipContentHTML=sv;l.customElements.get("media-seek-forward-button")||l.customElements.define("media-seek-forward-button",Nr);var zl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},qe=(t,e,i)=>(zl(t,e,"read from private field"),i?i.call(t):e.get(t)),_i=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ql=(t,e,i,a)=>(zl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Zt=(t,e,i)=>(zl(t,e,"access private method"),i),da,dt,$n,Xl,cm,Hn,Jl,Ur,Nn,Un,ql,qt={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},um=[...Object.values(qt),n.MEDIA_CURRENT_TIME,n.MEDIA_DURATION,n.MEDIA_SEEKABLE],mm=["Enter"," "],dv="&nbsp;/&nbsp;",Zl=(t,{timesSep:e=dv}={})=>{var i,a;let r=(i=t.mediaCurrentTime)!=null?i:0,[,o]=(a=t.mediaSeekable)!=null?a:[],s=0;Number.isFinite(t.mediaDuration)?s=t.mediaDuration:Number.isFinite(o)&&(s=o);let d=t.remaining?$e(0-(s-r)):$e(r);return t.showDuration?`${d}${e}${$e(s)}`:d},uv=t=>{var e;let i=t.mediaCurrentTime,[,a]=(e=t.mediaSeekable)!=null?e:[],r=null;if(Number.isFinite(t.mediaDuration)?r=t.mediaDuration:Number.isFinite(a)&&(r=a),i==null||r===null){t.setAttribute("aria-description",c("video not loaded, unknown time."));return}let o=t.remaining?si(0-(r-i)):si(i);if(!t.showDuration){t.setAttribute("aria-description",o);return}let s=si(r),d=c("{currentTime} of {totalTime}",{currentTime:o,totalTime:s});t.setAttribute("aria-description",d)};function cv(t,e){return`
1163
+ `}var ov=(t,e)=>{t.setAttribute("aria-label",c("seek forward {seekOffset} seconds",{seekOffset:e}))};function sv(){return c("Seek forward")}var lv=0,Pr=class extends B{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_CURRENT_TIME,la.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=N(this,la.SEEK_OFFSET,Yl)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),ov(this,this.seekOffset),e===la.SEEK_OFFSET&&(this.seekOffset=N(this,la.SEEK_OFFSET,Yl))}get seekOffset(){return N(this,la.SEEK_OFFSET,Yl)}set seekOffset(e){U(this,la.SEEK_OFFSET,e),this.setAttribute("aria-label",c("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),On(Nn(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return N(this,o.MEDIA_CURRENT_TIME,lv)}set mediaCurrentTime(e){U(this,o.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,i=new l.CustomEvent(h.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}};Pr.getSlotTemplateHTML=nv;Pr.getTooltipContentHTML=sv;l.customElements.get("media-seek-forward-button")||l.customElements.define("media-seek-forward-button",Pr);var zl=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},qe=(t,e,i)=>(zl(t,e,"read from private field"),i?i.call(t):e.get(t)),_i=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ql=(t,e,i,a)=>(zl(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),zt=(t,e,i)=>(zl(t,e,"access private method"),i),da,ut,$o,Xl,cm,Ho,Jl,Ur,Po,Uo,ql,Zt={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},um=[...Object.values(Zt),o.MEDIA_CURRENT_TIME,o.MEDIA_DURATION,o.MEDIA_SEEKABLE],mm=["Enter"," "],dv="&nbsp;/&nbsp;",Zl=(t,{timesSep:e=dv}={})=>{var i,a;let r=(i=t.mediaCurrentTime)!=null?i:0,[,n]=(a=t.mediaSeekable)!=null?a:[],s=0;Number.isFinite(t.mediaDuration)?s=t.mediaDuration:Number.isFinite(n)&&(s=n);let d=t.remaining?$e(0-(s-r)):$e(r);return t.showDuration?`${d}${e}${$e(s)}`:d},uv=t=>{var e;let i=t.mediaCurrentTime,[,a]=(e=t.mediaSeekable)!=null?e:[],r=null;if(Number.isFinite(t.mediaDuration)?r=t.mediaDuration:Number.isFinite(a)&&(r=a),i==null||r===null){t.setAttribute("aria-description",c("video not loaded, unknown time."));return}let n=t.remaining?si(0-(r-i)):si(i);if(!t.showDuration){t.setAttribute("aria-description",n);return}let s=si(r),d=c("{currentTime} of {totalTime}",{currentTime:n,totalTime:s});t.setAttribute("aria-description",d)};function cv(t,e){return`
1164
1164
  <slot>${Zl(e)}</slot>
1165
- `}var mv=t=>{t.setAttribute("aria-label",c("playback time"))},Bn=class extends Te{constructor(){super(),_i(this,Xl),_i(this,Hn),_i(this,Ur),_i(this,Un),_i(this,da,void 0),_i(this,dt,null),_i(this,$n,e=>{let{metaKey:i,altKey:a,key:r}=e;if(i||a||!mm.includes(r)){this.removeEventListener("keyup",qe(this,dt));return}this.addEventListener("keyup",qe(this,dt))}),Ql(this,da,this.shadowRoot.querySelector("slot")),qe(this,da).innerHTML=`${Zl(this)}`}static get observedAttributes(){return[...super.observedAttributes,...um,"disabled"]}connectedCallback(){let{style:e}=q(this.shadowRoot,":host(:hover:not([notoggle]))");e.setProperty("cursor","var(--media-cursor, pointer)"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))"),this.setAttribute("aria-label",c("playback time")),Zt(this,Ur,Nn).call(this),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),Zt(this,Hn,Jl).call(this),super.disconnectedCallback()}attributeChangedCallback(e,i,a){mv(this),um.includes(e)?this.update():e==="disabled"&&a!==i?a==null?Zt(this,Ur,Nn).call(this):Zt(this,Un,ql).call(this):e===qt.NO_TOGGLE&&a!==i&&(this.noToggle?Zt(this,Un,ql).call(this):Zt(this,Ur,Nn).call(this)),super.attributeChangedCallback(e,i,a)}enable(){this.noToggle||(this.tabIndex=0)}disable(){this.tabIndex=-1}get remaining(){return M(this,qt.REMAINING)}set remaining(e){L(this,qt.REMAINING,e)}get showDuration(){return M(this,qt.SHOW_DURATION)}set showDuration(e){L(this,qt.SHOW_DURATION,e)}get noToggle(){return M(this,qt.NO_TOGGLE)}set noToggle(e){L(this,qt.NO_TOGGLE,e)}get mediaDuration(){return P(this,n.MEDIA_DURATION)}set mediaDuration(e){U(this,n.MEDIA_DURATION,e)}get mediaCurrentTime(){return P(this,n.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){U(this,n.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(n.MEDIA_SEEKABLE);if(e)return e.split(":").map(i=>+i)}set mediaSeekable(e){if(e==null){this.removeAttribute(n.MEDIA_SEEKABLE);return}this.setAttribute(n.MEDIA_SEEKABLE,e.join(":"))}update(){let e=Zl(this);uv(this),e!==qe(this,da).innerHTML&&(qe(this,da).innerHTML=e)}};da=new WeakMap;dt=new WeakMap;$n=new WeakMap;Xl=new WeakSet;cm=function(){qe(this,dt)||(Ql(this,dt,t=>{let{key:e}=t;if(!mm.includes(e)){this.removeEventListener("keyup",qe(this,dt));return}this.toggleTimeDisplay()}),this.addEventListener("keydown",qe(this,$n)),this.addEventListener("click",this.toggleTimeDisplay))};Hn=new WeakSet;Jl=function(){qe(this,dt)&&(this.removeEventListener("keyup",qe(this,dt)),this.removeEventListener("keydown",qe(this,$n)),this.removeEventListener("click",this.toggleTimeDisplay),Ql(this,dt,null))};Ur=new WeakSet;Nn=function(){!this.noToggle&&!this.hasAttribute("disabled")&&(this.setAttribute("role","button"),this.enable(),Zt(this,Xl,cm).call(this))};Un=new WeakSet;ql=function(){this.removeAttribute("role"),this.disable(),Zt(this,Hn,Jl).call(this)};Bn.getSlotTemplateHTML=cv;l.customElements.get("media-time-display")||l.customElements.define("media-time-display",Bn);var hm=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},le=(t,e,i)=>(hm(t,e,"read from private field"),i?i.call(t):e.get(t)),ut=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Me=(t,e,i,a)=>(hm(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),hv=(t,e,i,a)=>({set _(r){Me(t,e,r,i)},get _(){return le(t,e,a)}}),ua,Wn,ca,Hr,Fn,Vn,Kn,ma,Ai,Gn,Yn=class{constructor(e,i,a){ut(this,ua,void 0),ut(this,Wn,void 0),ut(this,ca,void 0),ut(this,Hr,void 0),ut(this,Fn,void 0),ut(this,Vn,void 0),ut(this,Kn,void 0),ut(this,ma,void 0),ut(this,Ai,0),ut(this,Gn,(r=performance.now())=>{Me(this,Ai,requestAnimationFrame(le(this,Gn))),Me(this,Hr,performance.now()-le(this,ca));let o=1e3/this.fps;if(le(this,Hr)>o){Me(this,ca,r-le(this,Hr)%o);let s=1e3/((r-le(this,Wn))/++hv(this,Fn)._),d=(r-le(this,Vn))/1e3/this.duration,u=le(this,Kn)+d*this.playbackRate;u-le(this,ua).valueAsNumber>0?Me(this,ma,this.playbackRate/this.duration/s):(Me(this,ma,.995*le(this,ma)),u=le(this,ua).valueAsNumber+le(this,ma)),this.callback(u)}}),Me(this,ua,e),this.callback=i,this.fps=a}start(){le(this,Ai)===0&&(Me(this,ca,performance.now()),Me(this,Wn,le(this,ca)),Me(this,Fn,0),le(this,Gn).call(this))}stop(){le(this,Ai)!==0&&(cancelAnimationFrame(le(this,Ai)),Me(this,Ai,0))}update({start:e,duration:i,playbackRate:a}){let r=e-le(this,ua).valueAsNumber,o=Math.abs(i-this.duration);(r>0||r<-.03||o>=.5)&&this.callback(e),Me(this,Kn,e),Me(this,Vn,performance.now()),this.duration=i,this.playbackRate=a}};ua=new WeakMap;Wn=new WeakMap;ca=new WeakMap;Hr=new WeakMap;Fn=new WeakMap;Vn=new WeakMap;Kn=new WeakMap;ma=new WeakMap;Ai=new WeakMap;Gn=new WeakMap;var ad=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},z=(t,e,i)=>(ad(t,e,"read from private field"),i?i.call(t):e.get(t)),oe=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},xe=(t,e,i,a)=>(ad(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),De=(t,e,i)=>(ad(t,e,"access private method"),i),ha,zt,zn,$r,Qn,Zn,Wr,Fr,pa,fa,Br,jl,pm,ed,Xn,rd,Jn,od,jn,nd,td,fm,Vr,es,id,vm,pv=t=>{let e=t.range,i=si(+Em(t)),a=si(+t.mediaSeekableEnd),r=i&&a?c("{currentTime} of {totalTime}",{currentTime:i,totalTime:a}):c("video not loaded, unknown time.");e.setAttribute("aria-valuetext",r)};function fv(t){return`
1165
+ `}var mv=t=>{t.setAttribute("aria-label",c("playback time"))},Bo=class extends Te{constructor(){super(),_i(this,Xl),_i(this,Ho),_i(this,Ur),_i(this,Uo),_i(this,da,void 0),_i(this,ut,null),_i(this,$o,e=>{let{metaKey:i,altKey:a,key:r}=e;if(i||a||!mm.includes(r)){this.removeEventListener("keyup",qe(this,ut));return}this.addEventListener("keyup",qe(this,ut))}),Ql(this,da,this.shadowRoot.querySelector("slot")),qe(this,da).innerHTML=`${Zl(this)}`}static get observedAttributes(){return[...super.observedAttributes,...um,"disabled"]}connectedCallback(){let{style:e}=q(this.shadowRoot,":host(:hover:not([notoggle]))");e.setProperty("cursor","var(--media-cursor, pointer)"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))"),this.setAttribute("aria-label",c("playback time")),zt(this,Ur,Po).call(this),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),zt(this,Ho,Jl).call(this),super.disconnectedCallback()}attributeChangedCallback(e,i,a){mv(this),um.includes(e)?this.update():e==="disabled"&&a!==i?a==null?zt(this,Ur,Po).call(this):zt(this,Uo,ql).call(this):e===Zt.NO_TOGGLE&&a!==i&&(this.noToggle?zt(this,Uo,ql).call(this):zt(this,Ur,Po).call(this)),super.attributeChangedCallback(e,i,a)}enable(){this.noToggle||(this.tabIndex=0)}disable(){this.tabIndex=-1}get remaining(){return M(this,Zt.REMAINING)}set remaining(e){L(this,Zt.REMAINING,e)}get showDuration(){return M(this,Zt.SHOW_DURATION)}set showDuration(e){L(this,Zt.SHOW_DURATION,e)}get noToggle(){return M(this,Zt.NO_TOGGLE)}set noToggle(e){L(this,Zt.NO_TOGGLE,e)}get mediaDuration(){return N(this,o.MEDIA_DURATION)}set mediaDuration(e){U(this,o.MEDIA_DURATION,e)}get mediaCurrentTime(){return N(this,o.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){U(this,o.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(o.MEDIA_SEEKABLE);if(e)return e.split(":").map(i=>+i)}set mediaSeekable(e){if(e==null){this.removeAttribute(o.MEDIA_SEEKABLE);return}this.setAttribute(o.MEDIA_SEEKABLE,e.join(":"))}update(){let e=Zl(this);uv(this),e!==qe(this,da).innerHTML&&(qe(this,da).innerHTML=e)}};da=new WeakMap;ut=new WeakMap;$o=new WeakMap;Xl=new WeakSet;cm=function(){qe(this,ut)||(Ql(this,ut,t=>{let{key:e}=t;if(!mm.includes(e)){this.removeEventListener("keyup",qe(this,ut));return}this.toggleTimeDisplay()}),this.addEventListener("keydown",qe(this,$o)),this.addEventListener("click",this.toggleTimeDisplay))};Ho=new WeakSet;Jl=function(){qe(this,ut)&&(this.removeEventListener("keyup",qe(this,ut)),this.removeEventListener("keydown",qe(this,$o)),this.removeEventListener("click",this.toggleTimeDisplay),Ql(this,ut,null))};Ur=new WeakSet;Po=function(){!this.noToggle&&!this.hasAttribute("disabled")&&(this.setAttribute("role","button"),this.enable(),zt(this,Xl,cm).call(this))};Uo=new WeakSet;ql=function(){this.removeAttribute("role"),this.disable(),zt(this,Ho,Jl).call(this)};Bo.getSlotTemplateHTML=cv;l.customElements.get("media-time-display")||l.customElements.define("media-time-display",Bo);var hm=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},le=(t,e,i)=>(hm(t,e,"read from private field"),i?i.call(t):e.get(t)),ct=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Me=(t,e,i,a)=>(hm(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),hv=(t,e,i,a)=>({set _(r){Me(t,e,r,i)},get _(){return le(t,e,a)}}),ua,Wo,ca,Hr,Fo,Vo,Ko,ma,Ai,Go,Yo=class{constructor(e,i,a){ct(this,ua,void 0),ct(this,Wo,void 0),ct(this,ca,void 0),ct(this,Hr,void 0),ct(this,Fo,void 0),ct(this,Vo,void 0),ct(this,Ko,void 0),ct(this,ma,void 0),ct(this,Ai,0),ct(this,Go,(r=performance.now())=>{Me(this,Ai,requestAnimationFrame(le(this,Go))),Me(this,Hr,performance.now()-le(this,ca));let n=1e3/this.fps;if(le(this,Hr)>n){Me(this,ca,r-le(this,Hr)%n);let s=1e3/((r-le(this,Wo))/++hv(this,Fo)._),d=(r-le(this,Vo))/1e3/this.duration,u=le(this,Ko)+d*this.playbackRate;u-le(this,ua).valueAsNumber>0?Me(this,ma,this.playbackRate/this.duration/s):(Me(this,ma,.995*le(this,ma)),u=le(this,ua).valueAsNumber+le(this,ma)),this.callback(u)}}),Me(this,ua,e),this.callback=i,this.fps=a}start(){le(this,Ai)===0&&(Me(this,ca,performance.now()),Me(this,Wo,le(this,ca)),Me(this,Fo,0),le(this,Go).call(this))}stop(){le(this,Ai)!==0&&(cancelAnimationFrame(le(this,Ai)),Me(this,Ai,0))}update({start:e,duration:i,playbackRate:a}){let r=e-le(this,ua).valueAsNumber,n=Math.abs(i-this.duration);(r>0||r<-.03||n>=.5)&&this.callback(e),Me(this,Ko,e),Me(this,Vo,performance.now()),this.duration=i,this.playbackRate=a}};ua=new WeakMap;Wo=new WeakMap;ca=new WeakMap;Hr=new WeakMap;Fo=new WeakMap;Vo=new WeakMap;Ko=new WeakMap;ma=new WeakMap;Ai=new WeakMap;Go=new WeakMap;var ad=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},z=(t,e,i)=>(ad(t,e,"read from private field"),i?i.call(t):e.get(t)),ne=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},xe=(t,e,i,a)=>(ad(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),De=(t,e,i)=>(ad(t,e,"access private method"),i),ha,Qt,zo,$r,Qo,Zo,Wr,Fr,pa,fa,Br,jl,pm,ed,Xo,rd,Jo,nd,jo,od,td,fm,Vr,es,id,vm,pv=t=>{let e=t.range,i=si(+Em(t)),a=si(+t.mediaSeekableEnd),r=i&&a?c("{currentTime} of {totalTime}",{currentTime:i,totalTime:a}):c("video not loaded, unknown time.");e.setAttribute("aria-valuetext",r)};function fv(t){return`
1166
1166
  <style>
1167
1167
  :host {
1168
1168
  --media-box-border-radius: 4px;
@@ -1220,7 +1220,7 @@
1220
1220
  opacity: 0;
1221
1221
  }
1222
1222
 
1223
- :host(:is([${n.MEDIA_PREVIEW_IMAGE}], [${n.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] {
1223
+ :host(:is([${o.MEDIA_PREVIEW_IMAGE}], [${o.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] {
1224
1224
  transition-duration: var(--media-preview-transition-duration-in, .5s);
1225
1225
  transition-delay: var(--media-preview-transition-delay-in, .25s);
1226
1226
  visibility: visible;
@@ -1228,7 +1228,7 @@
1228
1228
  }
1229
1229
 
1230
1230
  @media (hover: hover) {
1231
- :host(:is([${n.MEDIA_PREVIEW_IMAGE}], [${n.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] {
1231
+ :host(:is([${o.MEDIA_PREVIEW_IMAGE}], [${o.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] {
1232
1232
  transition-duration: var(--media-preview-transition-duration-in, .5s);
1233
1233
  transition-delay: var(--media-preview-transition-delay-in, .25s);
1234
1234
  visibility: visible;
@@ -1253,20 +1253,20 @@
1253
1253
  var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0);
1254
1254
  }
1255
1255
 
1256
- :host([${n.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail,
1257
- :host([${n.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) {
1256
+ :host([${o.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail,
1257
+ :host([${o.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) {
1258
1258
  transition-delay: var(--media-preview-transition-delay-in, .25s);
1259
1259
  visibility: visible;
1260
1260
  }
1261
1261
 
1262
1262
  @media (hover: hover) {
1263
- :host([${n.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail,
1264
- :host([${n.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) {
1263
+ :host([${o.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail,
1264
+ :host([${o.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) {
1265
1265
  transition-delay: var(--media-preview-transition-delay-in, .25s);
1266
1266
  visibility: visible;
1267
1267
  }
1268
1268
 
1269
- :host([${n.MEDIA_PREVIEW_TIME}]:hover) {
1269
+ :host([${o.MEDIA_PREVIEW_TIME}]:hover) {
1270
1270
  --media-time-range-hover-display: block;
1271
1271
  }
1272
1272
  }
@@ -1289,8 +1289,8 @@
1289
1289
  text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75));
1290
1290
  }
1291
1291
 
1292
- :host([${n.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display,
1293
- :host([${n.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) {
1292
+ :host([${o.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display,
1293
+ :host([${o.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) {
1294
1294
  transition-delay: var(--media-preview-transition-delay-in, .25s);
1295
1295
  border-radius: var(--media-preview-chapter-border-radius, 0);
1296
1296
  padding: var(--media-preview-chapter-padding, 3.5px 9px 0);
@@ -1298,8 +1298,8 @@
1298
1298
  min-width: 100%;
1299
1299
  }
1300
1300
 
1301
- media-preview-chapter-display[${n.MEDIA_PREVIEW_CHAPTER}],
1302
- ::slotted(media-preview-chapter-display[${n.MEDIA_PREVIEW_CHAPTER}]) {
1301
+ media-preview-chapter-display[${o.MEDIA_PREVIEW_CHAPTER}],
1302
+ ::slotted(media-preview-chapter-display[${o.MEDIA_PREVIEW_CHAPTER}]) {
1303
1303
  visibility: visible;
1304
1304
  }
1305
1305
 
@@ -1332,15 +1332,15 @@
1332
1332
  ));
1333
1333
  }
1334
1334
 
1335
- :host([${n.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display,
1336
- :host([${n.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) {
1335
+ :host([${o.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display,
1336
+ :host([${o.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) {
1337
1337
  transition-delay: var(--media-preview-transition-delay-in, .25s);
1338
1338
  border-radius: var(--media-preview-time-border-radius,
1339
1339
  0 0 var(--media-preview-border-radius) var(--media-preview-border-radius));
1340
1340
  min-width: 100%;
1341
1341
  }
1342
1342
 
1343
- :host([${n.MEDIA_PREVIEW_TIME}]:hover) {
1343
+ :host([${o.MEDIA_PREVIEW_TIME}]:hover) {
1344
1344
  --media-time-range-hover-display: block;
1345
1345
  }
1346
1346
 
@@ -1365,8 +1365,8 @@
1365
1365
  <div id="preview-rail">
1366
1366
  <slot name="preview" part="box preview-box">
1367
1367
  <media-preview-thumbnail>
1368
- <template shadowrootmode="${Pn.shadowRootOptions.mode}">
1369
- ${Pn.getTemplateHTML({})}
1368
+ <template shadowrootmode="${No.shadowRootOptions.mode}">
1369
+ ${No.getTemplateHTML({})}
1370
1370
  </template>
1371
1371
  </media-preview-thumbnail>
1372
1372
  <media-preview-chapter-display></media-preview-chapter-display>
@@ -1379,7 +1379,7 @@
1379
1379
 
1380
1380
  </slot>
1381
1381
  </div>
1382
- `}var qn=(t,e=t.mediaCurrentTime)=>{let i=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,a=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;if(Number.isNaN(a))return 0;let r=(e-i)/(a-i);return Math.max(0,Math.min(r,1))},Em=(t,e=t.range.valueAsNumber)=>{let i=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,a=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;return Number.isNaN(a)?0:e*(a-i)+i},Kr=class extends at{constructor(){super(),oe(this,jl),oe(this,Xn),oe(this,Jn),oe(this,jn),oe(this,td),oe(this,Vr),oe(this,id),oe(this,ha,null),oe(this,zt,void 0),oe(this,zn,void 0),oe(this,$r,void 0),oe(this,Qn,void 0),oe(this,Zn,void 0),oe(this,Wr,void 0),oe(this,Fr,void 0),oe(this,pa,void 0),oe(this,fa,void 0),oe(this,Br,()=>{De(this,jl,pm).call(this)?z(this,zt).start():z(this,zt).stop()}),oe(this,ed,a=>{this.dragging||($i(a)&&(this.range.valueAsNumber=a),z(this,fa)||this.updateBar())}),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),xe(this,zn,this.shadowRoot.querySelectorAll('[part~="box"]')),xe(this,Qn,this.shadowRoot.querySelector('[part~="preview-box"]')),xe(this,Zn,this.shadowRoot.querySelector('[part~="current-box"]'));let i=getComputedStyle(this);xe(this,Wr,parseInt(i.getPropertyValue("--media-box-padding-left"))),xe(this,Fr,parseInt(i.getPropertyValue("--media-box-padding-right"))),xe(this,zt,new Yn(this.range,z(this,ed),60))}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PAUSED,n.MEDIA_DURATION,n.MEDIA_SEEKABLE,n.MEDIA_CURRENT_TIME,n.MEDIA_PREVIEW_IMAGE,n.MEDIA_PREVIEW_TIME,n.MEDIA_PREVIEW_CHAPTER,n.MEDIA_BUFFERED,n.MEDIA_PLAYBACK_RATE,n.MEDIA_LOADING,n.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",c("seek")),z(this,Br).call(this),xe(this,ha,this.getRootNode()),(e=z(this,ha))==null||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),z(this,zt).stop(),(e=z(this,ha))==null||e.removeEventListener("transitionstart",this),xe(this,ha,null)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),i!=a&&(e===n.MEDIA_CURRENT_TIME||e===n.MEDIA_PAUSED||e===n.MEDIA_ENDED||e===n.MEDIA_LOADING||e===n.MEDIA_DURATION||e===n.MEDIA_SEEKABLE?(z(this,zt).update({start:qn(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),z(this,Br).call(this),pv(this)):e===n.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===n.MEDIA_DURATION||e===n.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=z(this,pa),this.updateBar()))}get mediaChaptersCues(){return z(this,pa)}set mediaChaptersCues(e){var i;xe(this,pa,e),this.updateSegments((i=z(this,pa))==null?void 0:i.map(a=>({start:qn(this,a.startTime),end:qn(this,a.endTime)})))}get mediaPaused(){return M(this,n.MEDIA_PAUSED)}set mediaPaused(e){L(this,n.MEDIA_PAUSED,e)}get mediaLoading(){return M(this,n.MEDIA_LOADING)}set mediaLoading(e){L(this,n.MEDIA_LOADING,e)}get mediaDuration(){return P(this,n.MEDIA_DURATION)}set mediaDuration(e){U(this,n.MEDIA_DURATION,e)}get mediaCurrentTime(){return P(this,n.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){U(this,n.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return P(this,n.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){U(this,n.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(n.MEDIA_BUFFERED);return e?e.split(" ").map(i=>i.split(":").map(a=>+a)):[]}set mediaBuffered(e){if(!e){this.removeAttribute(n.MEDIA_BUFFERED);return}let i=e.map(a=>a.join(":")).join(" ");this.setAttribute(n.MEDIA_BUFFERED,i)}get mediaSeekable(){let e=this.getAttribute(n.MEDIA_SEEKABLE);if(e)return e.split(":").map(i=>+i)}set mediaSeekable(e){if(e==null){this.removeAttribute(n.MEDIA_SEEKABLE);return}this.setAttribute(n.MEDIA_SEEKABLE,e.join(":"))}get mediaSeekableEnd(){var e;let[,i=this.mediaDuration]=(e=this.mediaSeekable)!=null?e:[];return i}get mediaSeekableStart(){var e;let[i=0]=(e=this.mediaSeekable)!=null?e:[];return i}get mediaPreviewImage(){return x(this,n.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){w(this,n.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return P(this,n.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){U(this,n.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return M(this,n.MEDIA_ENDED)}set mediaEnded(e){L(this,n.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;let i=this.mediaBuffered;if(!i.length)return;let a;if(this.mediaEnded)a=1;else{let o=this.mediaCurrentTime,[,s=this.mediaSeekableStart]=(e=i.find(([d,u])=>d<=o&&o<=u))!=null?e:[];a=qn(this,s)}let{style:r}=q(this.shadowRoot,"#buffered");r.setProperty("width",`${a*100}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;let i=q(this.shadowRoot,"#current-rail"),a=q(this.shadowRoot,'[part~="current-box"]'),r=De(this,Xn,rd).call(this,z(this,Zn)),o=De(this,Jn,od).call(this,r,this.range.valueAsNumber),s=De(this,jn,nd).call(this,r,this.range.valueAsNumber);i.style.transform=`translateX(${o})`,i.style.setProperty("--_range-width",`${r.range.width}`),a.style.setProperty("--_box-shift",`${s}`),a.style.setProperty("--_box-width",`${r.box.width}px`),a.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":De(this,id,vm).call(this);break;case"pointermove":De(this,td,fm).call(this,e);break;case"pointerup":z(this,fa)&&xe(this,fa,!1);break;case"pointerdown":xe(this,fa,!0);break;case"pointerleave":De(this,Vr,es).call(this,null);break;case"transitionstart":he(e.target,this)&&setTimeout(()=>z(this,Br).call(this),0);break}}};ha=new WeakMap;zt=new WeakMap;zn=new WeakMap;$r=new WeakMap;Qn=new WeakMap;Zn=new WeakMap;Wr=new WeakMap;Fr=new WeakMap;pa=new WeakMap;fa=new WeakMap;Br=new WeakMap;jl=new WeakSet;pm=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&No(this)};ed=new WeakMap;Xn=new WeakSet;rd=function(t){var e;let a=((e=this.getAttribute("bounds")?Xe(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?e:this).getBoundingClientRect(),r=this.range.getBoundingClientRect(),o=t.offsetWidth,s=-(r.left-a.left-o/2),d=a.right-r.left-o/2;return{box:{width:o,min:s,max:d},bounds:a,range:r}};Jn=new WeakSet;od=function(t,e){let i=`${e*100}%`,{width:a,min:r,max:o}=t.box;if(!a)return i;if(Number.isNaN(r)||(i=`max(${`calc(1 / var(--_range-width) * 100 * ${r}% + var(--media-box-padding-left))`}, ${i})`),!Number.isNaN(o)){let d=`calc(1 / var(--_range-width) * 100 * ${o}% - var(--media-box-padding-right))`;i=`min(${i}, ${d})`}return i};jn=new WeakSet;nd=function(t,e){let{width:i,min:a,max:r}=t.box,o=e*t.range.width;if(o<a+z(this,Wr)){let s=t.range.left-t.bounds.left-z(this,Wr);return`${o-i/2+s}px`}if(o>r-z(this,Fr)){let s=t.bounds.right-t.range.right-z(this,Fr);return`${o+i/2-s-t.range.width}px`}return 0};td=new WeakSet;fm=function(t){let e=[...z(this,zn)].some(y=>t.composedPath().includes(y));if(!this.dragging&&(e||!t.composedPath().includes(this))){De(this,Vr,es).call(this,null);return}let i=this.mediaSeekableEnd;if(!i)return;let a=q(this.shadowRoot,"#preview-rail"),r=q(this.shadowRoot,'[part~="preview-box"]'),o=De(this,Xn,rd).call(this,z(this,Qn)),s=(t.clientX-o.range.left)/o.range.width;s=Math.max(0,Math.min(1,s));let d=De(this,Jn,od).call(this,o,s),u=De(this,jn,nd).call(this,o,s);a.style.transform=`translateX(${d})`,a.style.setProperty("--_range-width",`${o.range.width}`),r.style.setProperty("--_box-shift",`${u}`),r.style.setProperty("--_box-width",`${o.box.width}px`);let f=Math.round(z(this,$r))-Math.round(s*i);Math.abs(f)<1&&s>.01&&s<.99||(xe(this,$r,s*i),De(this,Vr,es).call(this,z(this,$r)))};Vr=new WeakSet;es=function(t){this.dispatchEvent(new l.CustomEvent(h.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:t}))};id=new WeakSet;vm=function(){z(this,zt).stop();let t=Em(this);this.dispatchEvent(new l.CustomEvent(h.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:t}))};Kr.shadowRootOptions={mode:"open"};Kr.getContainerTemplateHTML=fv;l.customElements.get("media-time-range")||l.customElements.define("media-time-range",Kr);var vv=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},bm=(t,e,i)=>(vv(t,e,"read from private field"),i?i.call(t):e.get(t)),Ev=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},ts,bv=1,gv=t=>t.mediaMuted?0:t.mediaVolume,_v=t=>`${Math.round(t*100)}%`,sd=class extends at{constructor(){super(...arguments),Ev(this,ts,()=>{let e=this.range.value,i=new l.CustomEvent(h.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)})}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_VOLUME,n.MEDIA_MUTED,n.MEDIA_VOLUME_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",c("volume")),this.range.addEventListener("input",bm(this,ts))}disconnectedCallback(){this.range.removeEventListener("input",bm(this,ts)),super.disconnectedCallback()}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),(e===n.MEDIA_VOLUME||e===n.MEDIA_MUTED)&&(this.range.valueAsNumber=gv(this),this.range.setAttribute("aria-valuetext",_v(this.range.valueAsNumber)),this.updateBar())}get mediaVolume(){return P(this,n.MEDIA_VOLUME,bv)}set mediaVolume(e){U(this,n.MEDIA_VOLUME,e)}get mediaMuted(){return M(this,n.MEDIA_MUTED)}set mediaMuted(e){L(this,n.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return x(this,n.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){w(this,n.MEDIA_VOLUME_UNAVAILABLE,e)}};ts=new WeakMap;l.customElements.get("media-volume-range")||l.customElements.define("media-volume-range",sd);function Av(t){return`
1382
+ `}var qo=(t,e=t.mediaCurrentTime)=>{let i=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,a=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;if(Number.isNaN(a))return 0;let r=(e-i)/(a-i);return Math.max(0,Math.min(r,1))},Em=(t,e=t.range.valueAsNumber)=>{let i=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,a=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;return Number.isNaN(a)?0:e*(a-i)+i},Kr=class extends rt{constructor(){super(),ne(this,jl),ne(this,Xo),ne(this,Jo),ne(this,jo),ne(this,td),ne(this,Vr),ne(this,id),ne(this,ha,null),ne(this,Qt,void 0),ne(this,zo,void 0),ne(this,$r,void 0),ne(this,Qo,void 0),ne(this,Zo,void 0),ne(this,Wr,void 0),ne(this,Fr,void 0),ne(this,pa,void 0),ne(this,fa,void 0),ne(this,Br,()=>{De(this,jl,pm).call(this)?z(this,Qt).start():z(this,Qt).stop()}),ne(this,ed,a=>{this.dragging||($i(a)&&(this.range.valueAsNumber=a),z(this,fa)||this.updateBar())}),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),xe(this,zo,this.shadowRoot.querySelectorAll('[part~="box"]')),xe(this,Qo,this.shadowRoot.querySelector('[part~="preview-box"]')),xe(this,Zo,this.shadowRoot.querySelector('[part~="current-box"]'));let i=getComputedStyle(this);xe(this,Wr,parseInt(i.getPropertyValue("--media-box-padding-left"))),xe(this,Fr,parseInt(i.getPropertyValue("--media-box-padding-right"))),xe(this,Qt,new Yo(this.range,z(this,ed),60))}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_PREVIEW_CHAPTER,o.MEDIA_BUFFERED,o.MEDIA_PLAYBACK_RATE,o.MEDIA_LOADING,o.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",c("seek")),z(this,Br).call(this),xe(this,ha,this.getRootNode()),(e=z(this,ha))==null||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),z(this,Qt).stop(),(e=z(this,ha))==null||e.removeEventListener("transitionstart",this),xe(this,ha,null)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),i!=a&&(e===o.MEDIA_CURRENT_TIME||e===o.MEDIA_PAUSED||e===o.MEDIA_ENDED||e===o.MEDIA_LOADING||e===o.MEDIA_DURATION||e===o.MEDIA_SEEKABLE?(z(this,Qt).update({start:qo(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),z(this,Br).call(this),pv(this)):e===o.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===o.MEDIA_DURATION||e===o.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=z(this,pa),this.updateBar()))}get mediaChaptersCues(){return z(this,pa)}set mediaChaptersCues(e){var i;xe(this,pa,e),this.updateSegments((i=z(this,pa))==null?void 0:i.map(a=>({start:qo(this,a.startTime),end:qo(this,a.endTime)})))}get mediaPaused(){return M(this,o.MEDIA_PAUSED)}set mediaPaused(e){L(this,o.MEDIA_PAUSED,e)}get mediaLoading(){return M(this,o.MEDIA_LOADING)}set mediaLoading(e){L(this,o.MEDIA_LOADING,e)}get mediaDuration(){return N(this,o.MEDIA_DURATION)}set mediaDuration(e){U(this,o.MEDIA_DURATION,e)}get mediaCurrentTime(){return N(this,o.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){U(this,o.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return N(this,o.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){U(this,o.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(o.MEDIA_BUFFERED);return e?e.split(" ").map(i=>i.split(":").map(a=>+a)):[]}set mediaBuffered(e){if(!e){this.removeAttribute(o.MEDIA_BUFFERED);return}let i=e.map(a=>a.join(":")).join(" ");this.setAttribute(o.MEDIA_BUFFERED,i)}get mediaSeekable(){let e=this.getAttribute(o.MEDIA_SEEKABLE);if(e)return e.split(":").map(i=>+i)}set mediaSeekable(e){if(e==null){this.removeAttribute(o.MEDIA_SEEKABLE);return}this.setAttribute(o.MEDIA_SEEKABLE,e.join(":"))}get mediaSeekableEnd(){var e;let[,i=this.mediaDuration]=(e=this.mediaSeekable)!=null?e:[];return i}get mediaSeekableStart(){var e;let[i=0]=(e=this.mediaSeekable)!=null?e:[];return i}get mediaPreviewImage(){return x(this,o.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){w(this,o.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return N(this,o.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){U(this,o.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return M(this,o.MEDIA_ENDED)}set mediaEnded(e){L(this,o.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;let i=this.mediaBuffered;if(!i.length)return;let a;if(this.mediaEnded)a=1;else{let n=this.mediaCurrentTime,[,s=this.mediaSeekableStart]=(e=i.find(([d,u])=>d<=n&&n<=u))!=null?e:[];a=qo(this,s)}let{style:r}=q(this.shadowRoot,"#buffered");r.setProperty("width",`${a*100}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;let i=q(this.shadowRoot,"#current-rail"),a=q(this.shadowRoot,'[part~="current-box"]'),r=De(this,Xo,rd).call(this,z(this,Zo)),n=De(this,Jo,nd).call(this,r,this.range.valueAsNumber),s=De(this,jo,od).call(this,r,this.range.valueAsNumber);i.style.transform=`translateX(${n})`,i.style.setProperty("--_range-width",`${r.range.width}`),a.style.setProperty("--_box-shift",`${s}`),a.style.setProperty("--_box-width",`${r.box.width}px`),a.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":De(this,id,vm).call(this);break;case"pointermove":De(this,td,fm).call(this,e);break;case"pointerup":z(this,fa)&&xe(this,fa,!1);break;case"pointerdown":xe(this,fa,!0);break;case"pointerleave":De(this,Vr,es).call(this,null);break;case"transitionstart":pe(e.target,this)&&setTimeout(()=>z(this,Br).call(this),0);break}}};ha=new WeakMap;Qt=new WeakMap;zo=new WeakMap;$r=new WeakMap;Qo=new WeakMap;Zo=new WeakMap;Wr=new WeakMap;Fr=new WeakMap;pa=new WeakMap;fa=new WeakMap;Br=new WeakMap;jl=new WeakSet;pm=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&Pn(this)};ed=new WeakMap;Xo=new WeakSet;rd=function(t){var e;let a=((e=this.getAttribute("bounds")?Je(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?e:this).getBoundingClientRect(),r=this.range.getBoundingClientRect(),n=t.offsetWidth,s=-(r.left-a.left-n/2),d=a.right-r.left-n/2;return{box:{width:n,min:s,max:d},bounds:a,range:r}};Jo=new WeakSet;nd=function(t,e){let i=`${e*100}%`,{width:a,min:r,max:n}=t.box;if(!a)return i;if(Number.isNaN(r)||(i=`max(${`calc(1 / var(--_range-width) * 100 * ${r}% + var(--media-box-padding-left))`}, ${i})`),!Number.isNaN(n)){let d=`calc(1 / var(--_range-width) * 100 * ${n}% - var(--media-box-padding-right))`;i=`min(${i}, ${d})`}return i};jo=new WeakSet;od=function(t,e){let{width:i,min:a,max:r}=t.box,n=e*t.range.width;if(n<a+z(this,Wr)){let s=t.range.left-t.bounds.left-z(this,Wr);return`${n-i/2+s}px`}if(n>r-z(this,Fr)){let s=t.bounds.right-t.range.right-z(this,Fr);return`${n+i/2-s-t.range.width}px`}return 0};td=new WeakSet;fm=function(t){let e=[...z(this,zo)].some(y=>t.composedPath().includes(y));if(!this.dragging&&(e||!t.composedPath().includes(this))){De(this,Vr,es).call(this,null);return}let i=this.mediaSeekableEnd;if(!i)return;let a=q(this.shadowRoot,"#preview-rail"),r=q(this.shadowRoot,'[part~="preview-box"]'),n=De(this,Xo,rd).call(this,z(this,Qo)),s=(t.clientX-n.range.left)/n.range.width;s=Math.max(0,Math.min(1,s));let d=De(this,Jo,nd).call(this,n,s),u=De(this,jo,od).call(this,n,s);a.style.transform=`translateX(${d})`,a.style.setProperty("--_range-width",`${n.range.width}`),r.style.setProperty("--_box-shift",`${u}`),r.style.setProperty("--_box-width",`${n.box.width}px`);let f=Math.round(z(this,$r))-Math.round(s*i);Math.abs(f)<1&&s>.01&&s<.99||(xe(this,$r,s*i),De(this,Vr,es).call(this,z(this,$r)))};Vr=new WeakSet;es=function(t){this.dispatchEvent(new l.CustomEvent(h.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:t}))};id=new WeakSet;vm=function(){z(this,Qt).stop();let t=Em(this);this.dispatchEvent(new l.CustomEvent(h.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:t}))};Kr.shadowRootOptions={mode:"open"};Kr.getContainerTemplateHTML=fv;l.customElements.get("media-time-range")||l.customElements.define("media-time-range",Kr);var vv=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},bm=(t,e,i)=>(vv(t,e,"read from private field"),i?i.call(t):e.get(t)),Ev=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},ts,bv=1,gv=t=>t.mediaMuted?0:t.mediaVolume,_v=t=>`${Math.round(t*100)}%`,sd=class extends rt{constructor(){super(...arguments),Ev(this,ts,()=>{let e=this.range.value,i=new l.CustomEvent(h.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)})}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_VOLUME,o.MEDIA_MUTED,o.MEDIA_VOLUME_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",c("volume")),this.range.addEventListener("input",bm(this,ts))}disconnectedCallback(){this.range.removeEventListener("input",bm(this,ts)),super.disconnectedCallback()}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),(e===o.MEDIA_VOLUME||e===o.MEDIA_MUTED)&&(this.range.valueAsNumber=gv(this),this.range.setAttribute("aria-valuetext",_v(this.range.valueAsNumber)),this.updateBar())}get mediaVolume(){return N(this,o.MEDIA_VOLUME,bv)}set mediaVolume(e){U(this,o.MEDIA_VOLUME,e)}get mediaMuted(){return M(this,o.MEDIA_MUTED)}set mediaMuted(e){L(this,o.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return x(this,o.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){w(this,o.MEDIA_VOLUME_UNAVAILABLE,e)}};ts=new WeakMap;l.customElements.get("media-volume-range")||l.customElements.define("media-volume-range",sd);function Av(t){return`
1383
1383
  <style>
1384
1384
  :host {
1385
1385
  min-width: 4ch;
@@ -1395,7 +1395,7 @@
1395
1395
  display: none;
1396
1396
  }
1397
1397
 
1398
- :host([${n.MEDIA_LOOP}]) #checked-indicator {
1398
+ :host([${o.MEDIA_LOOP}]) #checked-indicator {
1399
1399
  display: block;
1400
1400
  }
1401
1401
  </style>
@@ -1408,8 +1408,8 @@
1408
1408
  <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"/>
1409
1409
  </svg>
1410
1410
  </div>
1411
- `}function Tv(){return c("Loop")}var Gr=class extends B{constructor(){super(...arguments),this.container=null}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_LOOP]}connectedCallback(){var e;super.connectedCallback(),this.container=((e=this.shadowRoot)==null?void 0:e.querySelector("#icon"))||null,this.container&&(this.container.textContent=c("Loop"))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_LOOP&&this.container&&this.setAttribute("aria-checked",this.mediaLoop?"true":"false")}get mediaLoop(){return M(this,n.MEDIA_LOOP)}set mediaLoop(e){L(this,n.MEDIA_LOOP,e)}handleClick(){let e=!this.mediaLoop,i=new l.CustomEvent(h.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}};Gr.getSlotTemplateHTML=Av;Gr.getTooltipContentHTML=Tv;l.customElements.get("media-loop-button")||l.customElements.define("media-loop-button",Gr);var b=require("@mux/mux-video/base"),O=require("@mux/playback-core");var km=require("@mux/playback-core");var ki=require("@mux/playback-core");function gm(t){let e="";return Object.entries(t).forEach(([i,a])=>{a!=null&&(e+=`${is(i)}: ${a}; `)}),e?e.trim():void 0}function is(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function as(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function fe(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function ld(t){let e=yv(t).toString();return e?"?"+e:""}function yv(t){let e={};for(let i in t)t[i]!=null&&(e[i]=t[i]);return new URLSearchParams(e)}var dd=(t,e)=>!t||!e?!1:t.contains(e)?!0:dd(t,e.getRootNode().host);var _m="mux.com",kv=()=>{try{return"3.12.0"}catch{}return"UNKNOWN"},Sv=kv(),os=()=>Sv,Am=(t,{token:e,customDomain:i=_m,thumbnailTime:a,programTime:r}={})=>{var d;let o=e==null?a:void 0,{aud:s}=(d=(0,ki.parseJwt)(e))!=null?d:{};if(!(e&&s!=="t"))return`https://image.${i}/${t}/thumbnail.webp${ld({token:e,time:o,program_time:r})}`},Tm=(t,{token:e,customDomain:i=_m,programStartTime:a,programEndTime:r}={})=>{var s;let{aud:o}=(s=(0,ki.parseJwt)(e))!=null?s:{};if(!(e&&o!=="s"))return`https://image.${i}/${t}/storyboard.vtt${ld({token:e,format:"webp",program_start_time:a,program_end_time:r})}`},Yr=t=>{if(t){if([ki.StreamTypes.LIVE,ki.StreamTypes.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return ki.StreamTypes.LIVE}};var Iv={crossorigin:"crossOrigin",playsinline:"playsInline"};function ym(t){var e;return(e=Iv[t])!=null?e:as(t)}var Ti,yi,ve,rs=class{constructor(e,i){ae(this,Ti);ae(this,yi);ae(this,ve,[]);de(this,Ti,e),de(this,yi,i)}[Symbol.iterator](){return R(this,ve).values()}get length(){return R(this,ve).length}get value(){var e;return(e=R(this,ve).join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(de(this,ve,[]),this.add(...(i=e==null?void 0:e.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return R(this,ve)[e]}values(){return R(this,ve).values()}keys(){return R(this,ve).keys()}forEach(e){R(this,ve).forEach(e)}add(...e){var i,a;e.forEach(r=>{this.contains(r)||R(this,ve).push(r)}),!(this.value===""&&!((i=R(this,Ti))!=null&&i.hasAttribute(`${R(this,yi)}`)))&&((a=R(this,Ti))==null||a.setAttribute(`${R(this,yi)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>{R(this,ve).splice(R(this,ve).indexOf(a),1)}),(i=R(this,Ti))==null||i.setAttribute(`${R(this,yi)}`,`${this.value}`)}contains(e){return R(this,ve).includes(e)}toggle(e,i){return typeof i!="undefined"?i?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,i){this.remove(e),this.add(i)}};Ti=new WeakMap,yi=new WeakMap,ve=new WeakMap;var Sm=`[mux-player ${os()}]`;function ct(...t){console.warn(Sm,...t)}function Ee(...t){console.error(Sm,...t)}function ud(t){var i;let e=(i=t.message)!=null?i:"";t.context&&(e+=` ${t.context}`),t.file&&(e+=` ${(0,km.i18n)("Read more: ")}
1412
- https://github.com/muxinc/elements/blob/main/errors/${t.file}`),ct(e)}var me={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},Qt={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},RA={...me,...Qt},Mm=Object.freeze({length:0,start(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),Mv=Object.values(me).filter(t=>me.PLAYSINLINE!==t),Lv=Object.values(Qt),Cv=[...Mv,...Lv],cd=class extends Se.HTMLElement{static get observedAttributes(){return Cv}constructor(){super()}attributeChangedCallback(e,i,a){var r,o;switch(e){case Qt.MUTED:{this.media&&(this.media.muted=a!=null,this.media.defaultMuted=a!=null);return}case Qt.VOLUME:{let s=(r=fe(a))!=null?r:1;this.media&&(this.media.volume=s);return}case Qt.PLAYBACKRATE:{let s=(o=fe(a))!=null?o:1;this.media&&(this.media.playbackRate=s,this.media.defaultPlaybackRate=s);return}}}play(){var e,i;return(i=(e=this.media)==null?void 0:e.play())!=null?i:Promise.reject()}pause(){var e;(e=this.media)==null||e.pause()}load(){var e;(e=this.media)==null||e.load()}get media(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("mux-video")}get audioTracks(){return this.media.audioTracks}get videoTracks(){return this.media.videoTracks}get audioRenditions(){return this.media.audioRenditions}get videoRenditions(){return this.media.videoRenditions}get paused(){var e,i;return(i=(e=this.media)==null?void 0:e.paused)!=null?i:!0}get duration(){var e,i;return(i=(e=this.media)==null?void 0:e.duration)!=null?i:NaN}get ended(){var e,i;return(i=(e=this.media)==null?void 0:e.ended)!=null?i:!1}get buffered(){var e,i;return(i=(e=this.media)==null?void 0:e.buffered)!=null?i:Mm}get seekable(){var e,i;return(i=(e=this.media)==null?void 0:e.seekable)!=null?i:Mm}get readyState(){var e,i;return(i=(e=this.media)==null?void 0:e.readyState)!=null?i:0}get videoWidth(){var e,i;return(i=(e=this.media)==null?void 0:e.videoWidth)!=null?i:0}get videoHeight(){var e,i;return(i=(e=this.media)==null?void 0:e.videoHeight)!=null?i:0}get currentSrc(){var e,i;return(i=(e=this.media)==null?void 0:e.currentSrc)!=null?i:""}get currentTime(){var e,i;return(i=(e=this.media)==null?void 0:e.currentTime)!=null?i:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,i;return(i=(e=this.media)==null?void 0:e.volume)!=null?i:1}set volume(e){this.media&&(this.media.volume=Number(e))}get playbackRate(){var e,i;return(i=(e=this.media)==null?void 0:e.playbackRate)!=null?i:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get defaultPlaybackRate(){var e;return(e=fe(this.getAttribute(Qt.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(Qt.PLAYBACKRATE,`${e}`):this.removeAttribute(Qt.PLAYBACKRATE)}get crossOrigin(){return qr(this,me.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(me.CROSSORIGIN,`${e}`)}get autoplay(){return qr(this,me.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(me.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(me.AUTOPLAY)}get loop(){return qr(this,me.LOOP)!=null}set loop(e){e?this.setAttribute(me.LOOP,""):this.removeAttribute(me.LOOP)}get muted(){var e,i;return(i=(e=this.media)==null?void 0:e.muted)!=null?i:!1}set muted(e){this.media&&(this.media.muted=!!e)}get defaultMuted(){return qr(this,me.MUTED)!=null}set defaultMuted(e){e?this.setAttribute(me.MUTED,""):this.removeAttribute(me.MUTED)}get playsInline(){return qr(this,me.PLAYSINLINE)!=null}set playsInline(e){Ee("playsInline is set to true by default and is not currently supported as a setter.")}get preload(){return this.media?this.media.preload:this.getAttribute("preload")}set preload(e){["","none","metadata","auto"].includes(e)?this.setAttribute(me.PRELOAD,e):this.removeAttribute(me.PRELOAD)}};function qr(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var md=cd;var xm=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},N=(t,e,i)=>(xm(t,e,"read from private field"),i?i.call(t):e.get(t)),mt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Mt=(t,e,i,a)=>(xm(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),va,ns,Si,Zr,Xt,Jt,jt,Ii,Ea,ss,Ze,Lm=1,Cm=0,wv=1,Rv={processCallback(t,e,i){if(i){for(let[a,r]of e)if(a in i){let o=i[a];typeof o=="boolean"&&r instanceof be&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=o:typeof o=="function"&&r instanceof be?r.element[r.attributeName]=o:r.value=o}}}},Lt=class extends l.DocumentFragment{constructor(e,i,a=Rv){var r;super(),mt(this,va,void 0),mt(this,ns,void 0),this.append(e.content.cloneNode(!0)),Mt(this,va,Dm(this)),Mt(this,ns,a),(r=a.createCallback)==null||r.call(a,this,N(this,va),i),a.processCallback(this,N(this,va),i)}update(e){N(this,ns).processCallback(this,N(this,va),e)}};va=new WeakMap;ns=new WeakMap;var Dm=(t,e=[])=>{let i,a;for(let r of t.attributes||[])if(r.value.includes("{{")){let o=new hd;for([i,a]of Rm(r.value))if(!i)o.append(a);else{let s=new be(t,r.name,r.namespaceURI);o.append(s),e.push([a,s])}r.value=o.toString()}for(let r of t.childNodes)if(r.nodeType===Lm&&!(r instanceof HTMLTemplateElement))Dm(r,e);else{let o=r.data;if(r.nodeType===Lm||o.includes("{{")){let s=[];if(o)for([i,a]of Rm(o))if(!i)s.push(new Text(a));else{let d=new Ct(t);s.push(d),e.push([a,d])}else if(r instanceof HTMLTemplateElement){let d=new zr(t,r);s.push(d),e.push([d.expression,d])}r.replaceWith(...s.flatMap(d=>d.replacementNodes||[d]))}}return e},wm={},Rm=t=>{let e="",i=0,a=wm[t],r=0,o;if(a)return a;for(a=[];o=t[r];r++)o==="{"&&t[r+1]==="{"&&t[r-1]!=="\\"&&t[r+2]&&++i==1?(e&&a.push([Cm,e]),e="",r++):o==="}"&&t[r+1]==="}"&&t[r-1]!=="\\"&&!--i?(a.push([wv,e.trim()]),e="",r++):e+=o||"";return e&&a.push([Cm,(i>0?"{{":"")+e]),wm[t]=a},xv=11,ls=class{get value(){return""}set value(e){}toString(){return this.value}},Om=new WeakMap,hd=class{constructor(){mt(this,Si,[])}[Symbol.iterator](){return N(this,Si).values()}get length(){return N(this,Si).length}item(e){return N(this,Si)[e]}append(...e){for(let i of e)i instanceof be&&Om.set(i,this),N(this,Si).push(i)}toString(){return N(this,Si).join("")}};Si=new WeakMap;var be=class extends ls{constructor(e,i,a){super(),mt(this,Ii),mt(this,Zr,""),mt(this,Xt,void 0),mt(this,Jt,void 0),mt(this,jt,void 0),Mt(this,Xt,e),Mt(this,Jt,i),Mt(this,jt,a)}get attributeName(){return N(this,Jt)}get attributeNamespace(){return N(this,jt)}get element(){return N(this,Xt)}get value(){return N(this,Zr)}set value(e){N(this,Zr)!==e&&(Mt(this,Zr,e),!N(this,Ii,Ea)||N(this,Ii,Ea).length===1?e==null?N(this,Xt).removeAttributeNS(N(this,jt),N(this,Jt)):N(this,Xt).setAttributeNS(N(this,jt),N(this,Jt),e):N(this,Xt).setAttributeNS(N(this,jt),N(this,Jt),N(this,Ii,Ea).toString()))}get booleanValue(){return N(this,Xt).hasAttributeNS(N(this,jt),N(this,Jt))}set booleanValue(e){if(!N(this,Ii,Ea)||N(this,Ii,Ea).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};Zr=new WeakMap;Xt=new WeakMap;Jt=new WeakMap;jt=new WeakMap;Ii=new WeakSet;Ea=function(){return Om.get(this)};var Ct=class extends ls{constructor(e,i){super(),mt(this,ss,void 0),mt(this,Ze,void 0),Mt(this,ss,e),Mt(this,Ze,i?[...i]:[new Text])}get replacementNodes(){return N(this,Ze)}get parentNode(){return N(this,ss)}get nextSibling(){return N(this,Ze)[N(this,Ze).length-1].nextSibling}get previousSibling(){return N(this,Ze)[0].previousSibling}get value(){return N(this,Ze).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){let i=e.flat().flatMap(a=>a==null?[new Text]:a.forEach?[...a]:a.nodeType===xv?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);i.length||i.push(new Text),Mt(this,Ze,Dv(N(this,Ze)[0].parentNode,N(this,Ze),i,this.nextSibling))}};ss=new WeakMap;Ze=new WeakMap;var zr=class extends Ct{constructor(e,i){let a=i.getAttribute("directive")||i.getAttribute("type"),r=i.getAttribute("expression")||i.getAttribute(a)||"";r.startsWith("{{")&&(r=r.trim().slice(2,-2).trim()),super(e),this.expression=r,this.template=i,this.directive=a}};function Dv(t,e,i,a=null){let r=0,o,s,d,u=i.length,f=e.length;for(;r<u&&r<f&&e[r]==i[r];)r++;for(;r<u&&r<f&&i[u-1]==e[f-1];)a=i[--f,--u];if(r==f)for(;r<u;)t.insertBefore(i[r++],a);if(r==u)for(;r<f;)t.removeChild(e[r++]);else{for(o=e[r];r<u;)d=i[r++],s=o?o.nextSibling:a,o==d?o=s:r<u&&i[r]==s?(t.replaceChild(d,o),o=s):t.insertBefore(d,o);for(;o!=a;)s=o.nextSibling,t.removeChild(o),o=s}return i}var Pm={string:t=>String(t)},us=class{constructor(e){this.template=e,this.state=void 0}},Mi=new WeakMap,Li=new WeakMap,pd={partial:(t,e)=>{e[t.expression]=new us(t.template)},if:(t,e)=>{var i;if(Um(t.expression,e))if(Mi.get(t)!==t.template){Mi.set(t,t.template);let a=new Lt(t.template,e,cs);t.replace(a),Li.set(t,a)}else(i=Li.get(t))==null||i.update(e);else t.replace(""),Mi.delete(t),Li.delete(t)}},Ov=Object.keys(pd),cs={processCallback(t,e,i){var a,r;if(i)for(let[o,s]of e){if(s instanceof zr){if(!s.directive){let u=Ov.find(f=>s.template.hasAttribute(f));u&&(s.directive=u,s.expression=s.template.getAttribute(u))}(a=pd[s.directive])==null||a.call(pd,s,i);continue}let d=Um(o,i);if(d instanceof us){Mi.get(s)!==d.template?(Mi.set(s,d.template),d=new Lt(d.template,d.state,cs),s.value=d,Li.set(s,d)):(r=Li.get(s))==null||r.update(d.state);continue}d?(s instanceof be&&s.attributeName.startsWith("aria-")&&(d=String(d)),s instanceof be?typeof d=="boolean"?s.booleanValue=d:typeof d=="function"?s.element[s.attributeName]=d:s.value=d:(s.value=d,Mi.delete(s),Li.delete(s))):s instanceof be?s.value=void 0:(s.value=void 0,Mi.delete(s),Li.delete(s))}}},Nm={"!":t=>!t,"!!":t=>!!t,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,">":(t,e)=>t>e,">=":(t,e)=>t>=e,"<":(t,e)=>t<e,"<=":(t,e)=>t<=e,"??":(t,e)=>t!=null?t:e,"|":(t,e)=>{var i;return(i=Pm[e])==null?void 0:i.call(Pm,t)}};function Pv(t){return Nv(t,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function Um(t,e={}){var i,a,r,o,s,d,u;let f=Pv(t);if(f.length===0||f.some(({type:y})=>!y))return Qr(t);if(((i=f[0])==null?void 0:i.token)===">"){let y=e[(a=f[1])==null?void 0:a.token];if(!y)return Qr(t);let A={...e};y.state=A;let E=f.slice(2);for(let p=0;p<E.length;p+=3){let k=(r=E[p])==null?void 0:r.token,g=(o=E[p+1])==null?void 0:o.token,S=(s=E[p+2])==null?void 0:s.token;k&&g==="="&&(A[k]=Xr(S,e))}return y}if(f.length===1)return ds(f[0])?Xr(f[0].token,e):Qr(t);if(f.length===2){let y=(d=f[0])==null?void 0:d.token,A=Nm[y];if(!A||!ds(f[1]))return Qr(t);let E=Xr(f[1].token,e);return A(E)}if(f.length===3){let y=(u=f[1])==null?void 0:u.token,A=Nm[y];if(!A||!ds(f[0])||!ds(f[2]))return Qr(t);let E=Xr(f[0].token,e);if(y==="|")return A(E,f[2].token);let p=Xr(f[2].token,e);return A(E,p)}}function Qr(t){return console.warn(`Warning: invalid expression \`${t}\``),!1}function ds({type:t}){return["number","boolean","string","param"].includes(t)}function Xr(t,e){let i=t[0],a=t.slice(-1);return t==="true"||t==="false"?t==="true":i===a&&["'",'"'].includes(i)?t.slice(1,-1):Lo(t)?parseFloat(t):e[t]}function Nv(t,e){let i,a,r,o=[];for(;t;){r=null,i=t.length;for(let s in e)a=e[s].exec(t),a&&a.index<i&&(r={token:a[0],type:s,matches:a.slice(1)},i=a.index);i&&o.push({token:t.substr(0,i),type:void 0}),r&&o.push(r),t=t.substr(i+(r?r.token.length:0))}return o}var gd=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ei=(t,e,i)=>(gd(t,e,"read from private field"),i?i.call(t):e.get(t)),Ci=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},wt=(t,e,i,a)=>(gd(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),fd=(t,e,i)=>(gd(t,e,"access private method"),i),ga,ms,_a,ba,Ed,Hm,hs,bd,Jr,vd={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},Bm=V.createElement("template");Bm.innerHTML=`
1411
+ `}function Tv(){return c("Loop")}var Gr=class extends B{constructor(){super(...arguments),this.container=null}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_LOOP]}connectedCallback(){var e;super.connectedCallback(),this.container=((e=this.shadowRoot)==null?void 0:e.querySelector("#icon"))||null,this.container&&(this.container.textContent=c("Loop"))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===o.MEDIA_LOOP&&this.container&&this.setAttribute("aria-checked",this.mediaLoop?"true":"false")}get mediaLoop(){return M(this,o.MEDIA_LOOP)}set mediaLoop(e){L(this,o.MEDIA_LOOP,e)}handleClick(){let e=!this.mediaLoop,i=new l.CustomEvent(h.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}};Gr.getSlotTemplateHTML=Av;Gr.getTooltipContentHTML=Tv;l.customElements.get("media-loop-button")||l.customElements.define("media-loop-button",Gr);var b=require("@mux/mux-video/base"),O=require("@mux/playback-core");var km=require("@mux/playback-core");var ki=require("@mux/playback-core");function gm(t){let e="";return Object.entries(t).forEach(([i,a])=>{a!=null&&(e+=`${is(i)}: ${a}; `)}),e?e.trim():void 0}function is(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function as(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function de(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function ld(t){let e=yv(t).toString();return e?"?"+e:""}function yv(t){let e={};for(let i in t)t[i]!=null&&(e[i]=t[i]);return new URLSearchParams(e)}var dd=(t,e)=>!t||!e?!1:t.contains(e)?!0:dd(t,e.getRootNode().host);var _m="mux.com",kv=()=>{try{return"3.12.0"}catch{}return"UNKNOWN"},Sv=kv(),ns=()=>Sv,Am=(t,{token:e,customDomain:i=_m,thumbnailTime:a,programTime:r}={})=>{var d;let n=e==null?a:void 0,{aud:s}=(d=(0,ki.parseJwt)(e))!=null?d:{};if(!(e&&s!=="t"))return`https://image.${i}/${t}/thumbnail.webp${ld({token:e,time:n,program_time:r})}`},Tm=(t,{token:e,customDomain:i=_m,programStartTime:a,programEndTime:r}={})=>{var s;let{aud:n}=(s=(0,ki.parseJwt)(e))!=null?s:{};if(!(e&&n!=="s"))return`https://image.${i}/${t}/storyboard.vtt${ld({token:e,format:"webp",program_start_time:a,program_end_time:r})}`},Yr=t=>{if(t){if([ki.StreamTypes.LIVE,ki.StreamTypes.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return ki.StreamTypes.LIVE}};var Iv={crossorigin:"crossOrigin",playsinline:"playsInline"};function ym(t){var e;return(e=Iv[t])!=null?e:as(t)}var Ti,yi,ve,rs=class{constructor(e,i){ae(this,Ti);ae(this,yi);ae(this,ve,[]);ue(this,Ti,e),ue(this,yi,i)}[Symbol.iterator](){return R(this,ve).values()}get length(){return R(this,ve).length}get value(){var e;return(e=R(this,ve).join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(ue(this,ve,[]),this.add(...(i=e==null?void 0:e.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return R(this,ve)[e]}values(){return R(this,ve).values()}keys(){return R(this,ve).keys()}forEach(e){R(this,ve).forEach(e)}add(...e){var i,a;e.forEach(r=>{this.contains(r)||R(this,ve).push(r)}),!(this.value===""&&!((i=R(this,Ti))!=null&&i.hasAttribute(`${R(this,yi)}`)))&&((a=R(this,Ti))==null||a.setAttribute(`${R(this,yi)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>{R(this,ve).splice(R(this,ve).indexOf(a),1)}),(i=R(this,Ti))==null||i.setAttribute(`${R(this,yi)}`,`${this.value}`)}contains(e){return R(this,ve).includes(e)}toggle(e,i){return typeof i!="undefined"?i?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,i){this.remove(e),this.add(i)}};Ti=new WeakMap,yi=new WeakMap,ve=new WeakMap;var Sm=`[mux-player ${ns()}]`;function mt(...t){console.warn(Sm,...t)}function Ee(...t){console.error(Sm,...t)}function ud(t){var i;let e=(i=t.message)!=null?i:"";t.context&&(e+=` ${t.context}`),t.file&&(e+=` ${(0,km.i18n)("Read more: ")}
1412
+ https://github.com/muxinc/elements/blob/main/errors/${t.file}`),mt(e)}var he={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},Xt={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},RA={...he,...Xt},Mm=Object.freeze({length:0,start(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),Mv=Object.values(he).filter(t=>he.PLAYSINLINE!==t),Lv=Object.values(Xt),Cv=[...Mv,...Lv],cd=class extends Se.HTMLElement{static get observedAttributes(){return Cv}constructor(){super()}attributeChangedCallback(e,i,a){var r,n;switch(e){case Xt.MUTED:{this.media&&(this.media.muted=a!=null,this.media.defaultMuted=a!=null);return}case Xt.VOLUME:{let s=(r=de(a))!=null?r:1;this.media&&(this.media.volume=s);return}case Xt.PLAYBACKRATE:{let s=(n=de(a))!=null?n:1;this.media&&(this.media.playbackRate=s,this.media.defaultPlaybackRate=s);return}}}play(){var e,i;return(i=(e=this.media)==null?void 0:e.play())!=null?i:Promise.reject()}pause(){var e;(e=this.media)==null||e.pause()}load(){var e;(e=this.media)==null||e.load()}get media(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("mux-video")}get audioTracks(){return this.media.audioTracks}get videoTracks(){return this.media.videoTracks}get audioRenditions(){return this.media.audioRenditions}get videoRenditions(){return this.media.videoRenditions}get paused(){var e,i;return(i=(e=this.media)==null?void 0:e.paused)!=null?i:!0}get duration(){var e,i;return(i=(e=this.media)==null?void 0:e.duration)!=null?i:NaN}get ended(){var e,i;return(i=(e=this.media)==null?void 0:e.ended)!=null?i:!1}get buffered(){var e,i;return(i=(e=this.media)==null?void 0:e.buffered)!=null?i:Mm}get seekable(){var e,i;return(i=(e=this.media)==null?void 0:e.seekable)!=null?i:Mm}get readyState(){var e,i;return(i=(e=this.media)==null?void 0:e.readyState)!=null?i:0}get videoWidth(){var e,i;return(i=(e=this.media)==null?void 0:e.videoWidth)!=null?i:0}get videoHeight(){var e,i;return(i=(e=this.media)==null?void 0:e.videoHeight)!=null?i:0}get currentSrc(){var e,i;return(i=(e=this.media)==null?void 0:e.currentSrc)!=null?i:""}get currentTime(){var e,i;return(i=(e=this.media)==null?void 0:e.currentTime)!=null?i:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,i;return(i=(e=this.media)==null?void 0:e.volume)!=null?i:1}set volume(e){this.media&&(this.media.volume=Number(e))}get playbackRate(){var e,i;return(i=(e=this.media)==null?void 0:e.playbackRate)!=null?i:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get defaultPlaybackRate(){var e;return(e=de(this.getAttribute(Xt.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(Xt.PLAYBACKRATE,`${e}`):this.removeAttribute(Xt.PLAYBACKRATE)}get crossOrigin(){return qr(this,he.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(he.CROSSORIGIN,`${e}`)}get autoplay(){return qr(this,he.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(he.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(he.AUTOPLAY)}get loop(){return qr(this,he.LOOP)!=null}set loop(e){e?this.setAttribute(he.LOOP,""):this.removeAttribute(he.LOOP)}get muted(){var e,i;return(i=(e=this.media)==null?void 0:e.muted)!=null?i:!1}set muted(e){this.media&&(this.media.muted=!!e)}get defaultMuted(){return qr(this,he.MUTED)!=null}set defaultMuted(e){e?this.setAttribute(he.MUTED,""):this.removeAttribute(he.MUTED)}get playsInline(){return qr(this,he.PLAYSINLINE)!=null}set playsInline(e){Ee("playsInline is set to true by default and is not currently supported as a setter.")}get preload(){return this.media?this.media.preload:this.getAttribute("preload")}set preload(e){["","none","metadata","auto"].includes(e)?this.setAttribute(he.PRELOAD,e):this.removeAttribute(he.PRELOAD)}};function qr(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var md=cd;var xm=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},P=(t,e,i)=>(xm(t,e,"read from private field"),i?i.call(t):e.get(t)),ht=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Lt=(t,e,i,a)=>(xm(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),va,os,Si,Zr,Jt,jt,ei,Ii,Ea,ss,Ze,Lm=1,Cm=0,wv=1,Rv={processCallback(t,e,i){if(i){for(let[a,r]of e)if(a in i){let n=i[a];typeof n=="boolean"&&r instanceof be&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=n:typeof n=="function"&&r instanceof be?r.element[r.attributeName]=n:r.value=n}}}},Ct=class extends l.DocumentFragment{constructor(e,i,a=Rv){var r;super(),ht(this,va,void 0),ht(this,os,void 0),this.append(e.content.cloneNode(!0)),Lt(this,va,Dm(this)),Lt(this,os,a),(r=a.createCallback)==null||r.call(a,this,P(this,va),i),a.processCallback(this,P(this,va),i)}update(e){P(this,os).processCallback(this,P(this,va),e)}};va=new WeakMap;os=new WeakMap;var Dm=(t,e=[])=>{let i,a;for(let r of t.attributes||[])if(r.value.includes("{{")){let n=new hd;for([i,a]of Rm(r.value))if(!i)n.append(a);else{let s=new be(t,r.name,r.namespaceURI);n.append(s),e.push([a,s])}r.value=n.toString()}for(let r of t.childNodes)if(r.nodeType===Lm&&!(r instanceof HTMLTemplateElement))Dm(r,e);else{let n=r.data;if(r.nodeType===Lm||n.includes("{{")){let s=[];if(n)for([i,a]of Rm(n))if(!i)s.push(new Text(a));else{let d=new wt(t);s.push(d),e.push([a,d])}else if(r instanceof HTMLTemplateElement){let d=new zr(t,r);s.push(d),e.push([d.expression,d])}r.replaceWith(...s.flatMap(d=>d.replacementNodes||[d]))}}return e},wm={},Rm=t=>{let e="",i=0,a=wm[t],r=0,n;if(a)return a;for(a=[];n=t[r];r++)n==="{"&&t[r+1]==="{"&&t[r-1]!=="\\"&&t[r+2]&&++i==1?(e&&a.push([Cm,e]),e="",r++):n==="}"&&t[r+1]==="}"&&t[r-1]!=="\\"&&!--i?(a.push([wv,e.trim()]),e="",r++):e+=n||"";return e&&a.push([Cm,(i>0?"{{":"")+e]),wm[t]=a},xv=11,ls=class{get value(){return""}set value(e){}toString(){return this.value}},Om=new WeakMap,hd=class{constructor(){ht(this,Si,[])}[Symbol.iterator](){return P(this,Si).values()}get length(){return P(this,Si).length}item(e){return P(this,Si)[e]}append(...e){for(let i of e)i instanceof be&&Om.set(i,this),P(this,Si).push(i)}toString(){return P(this,Si).join("")}};Si=new WeakMap;var be=class extends ls{constructor(e,i,a){super(),ht(this,Ii),ht(this,Zr,""),ht(this,Jt,void 0),ht(this,jt,void 0),ht(this,ei,void 0),Lt(this,Jt,e),Lt(this,jt,i),Lt(this,ei,a)}get attributeName(){return P(this,jt)}get attributeNamespace(){return P(this,ei)}get element(){return P(this,Jt)}get value(){return P(this,Zr)}set value(e){P(this,Zr)!==e&&(Lt(this,Zr,e),!P(this,Ii,Ea)||P(this,Ii,Ea).length===1?e==null?P(this,Jt).removeAttributeNS(P(this,ei),P(this,jt)):P(this,Jt).setAttributeNS(P(this,ei),P(this,jt),e):P(this,Jt).setAttributeNS(P(this,ei),P(this,jt),P(this,Ii,Ea).toString()))}get booleanValue(){return P(this,Jt).hasAttributeNS(P(this,ei),P(this,jt))}set booleanValue(e){if(!P(this,Ii,Ea)||P(this,Ii,Ea).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};Zr=new WeakMap;Jt=new WeakMap;jt=new WeakMap;ei=new WeakMap;Ii=new WeakSet;Ea=function(){return Om.get(this)};var wt=class extends ls{constructor(e,i){super(),ht(this,ss,void 0),ht(this,Ze,void 0),Lt(this,ss,e),Lt(this,Ze,i?[...i]:[new Text])}get replacementNodes(){return P(this,Ze)}get parentNode(){return P(this,ss)}get nextSibling(){return P(this,Ze)[P(this,Ze).length-1].nextSibling}get previousSibling(){return P(this,Ze)[0].previousSibling}get value(){return P(this,Ze).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){let i=e.flat().flatMap(a=>a==null?[new Text]:a.forEach?[...a]:a.nodeType===xv?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);i.length||i.push(new Text),Lt(this,Ze,Dv(P(this,Ze)[0].parentNode,P(this,Ze),i,this.nextSibling))}};ss=new WeakMap;Ze=new WeakMap;var zr=class extends wt{constructor(e,i){let a=i.getAttribute("directive")||i.getAttribute("type"),r=i.getAttribute("expression")||i.getAttribute(a)||"";r.startsWith("{{")&&(r=r.trim().slice(2,-2).trim()),super(e),this.expression=r,this.template=i,this.directive=a}};function Dv(t,e,i,a=null){let r=0,n,s,d,u=i.length,f=e.length;for(;r<u&&r<f&&e[r]==i[r];)r++;for(;r<u&&r<f&&i[u-1]==e[f-1];)a=i[--f,--u];if(r==f)for(;r<u;)t.insertBefore(i[r++],a);if(r==u)for(;r<f;)t.removeChild(e[r++]);else{for(n=e[r];r<u;)d=i[r++],s=n?n.nextSibling:a,n==d?n=s:r<u&&i[r]==s?(t.replaceChild(d,n),n=s):t.insertBefore(d,n);for(;n!=a;)s=n.nextSibling,t.removeChild(n),n=s}return i}var Nm={string:t=>String(t)},us=class{constructor(e){this.template=e,this.state=void 0}},Mi=new WeakMap,Li=new WeakMap,pd={partial:(t,e)=>{e[t.expression]=new us(t.template)},if:(t,e)=>{var i;if(Um(t.expression,e))if(Mi.get(t)!==t.template){Mi.set(t,t.template);let a=new Ct(t.template,e,cs);t.replace(a),Li.set(t,a)}else(i=Li.get(t))==null||i.update(e);else t.replace(""),Mi.delete(t),Li.delete(t)}},Ov=Object.keys(pd),cs={processCallback(t,e,i){var a,r;if(i)for(let[n,s]of e){if(s instanceof zr){if(!s.directive){let u=Ov.find(f=>s.template.hasAttribute(f));u&&(s.directive=u,s.expression=s.template.getAttribute(u))}(a=pd[s.directive])==null||a.call(pd,s,i);continue}let d=Um(n,i);if(d instanceof us){Mi.get(s)!==d.template?(Mi.set(s,d.template),d=new Ct(d.template,d.state,cs),s.value=d,Li.set(s,d)):(r=Li.get(s))==null||r.update(d.state);continue}d?(s instanceof be&&s.attributeName.startsWith("aria-")&&(d=String(d)),s instanceof be?typeof d=="boolean"?s.booleanValue=d:typeof d=="function"?s.element[s.attributeName]=d:s.value=d:(s.value=d,Mi.delete(s),Li.delete(s))):s instanceof be?s.value=void 0:(s.value=void 0,Mi.delete(s),Li.delete(s))}}},Pm={"!":t=>!t,"!!":t=>!!t,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,">":(t,e)=>t>e,">=":(t,e)=>t>=e,"<":(t,e)=>t<e,"<=":(t,e)=>t<=e,"??":(t,e)=>t!=null?t:e,"|":(t,e)=>{var i;return(i=Nm[e])==null?void 0:i.call(Nm,t)}};function Nv(t){return Pv(t,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function Um(t,e={}){var i,a,r,n,s,d,u;let f=Nv(t);if(f.length===0||f.some(({type:y})=>!y))return Qr(t);if(((i=f[0])==null?void 0:i.token)===">"){let y=e[(a=f[1])==null?void 0:a.token];if(!y)return Qr(t);let A={...e};y.state=A;let E=f.slice(2);for(let p=0;p<E.length;p+=3){let k=(r=E[p])==null?void 0:r.token,g=(n=E[p+1])==null?void 0:n.token,S=(s=E[p+2])==null?void 0:s.token;k&&g==="="&&(A[k]=Xr(S,e))}return y}if(f.length===1)return ds(f[0])?Xr(f[0].token,e):Qr(t);if(f.length===2){let y=(d=f[0])==null?void 0:d.token,A=Pm[y];if(!A||!ds(f[1]))return Qr(t);let E=Xr(f[1].token,e);return A(E)}if(f.length===3){let y=(u=f[1])==null?void 0:u.token,A=Pm[y];if(!A||!ds(f[0])||!ds(f[2]))return Qr(t);let E=Xr(f[0].token,e);if(y==="|")return A(E,f[2].token);let p=Xr(f[2].token,e);return A(E,p)}}function Qr(t){return console.warn(`Warning: invalid expression \`${t}\``),!1}function ds({type:t}){return["number","boolean","string","param"].includes(t)}function Xr(t,e){let i=t[0],a=t.slice(-1);return t==="true"||t==="false"?t==="true":i===a&&["'",'"'].includes(i)?t.slice(1,-1):Ln(t)?parseFloat(t):e[t]}function Pv(t,e){let i,a,r,n=[];for(;t;){r=null,i=t.length;for(let s in e)a=e[s].exec(t),a&&a.index<i&&(r={token:a[0],type:s,matches:a.slice(1)},i=a.index);i&&n.push({token:t.substr(0,i),type:void 0}),r&&n.push(r),t=t.substr(i+(r?r.token.length:0))}return n}var gd=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ti=(t,e,i)=>(gd(t,e,"read from private field"),i?i.call(t):e.get(t)),Ci=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Rt=(t,e,i,a)=>(gd(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),fd=(t,e,i)=>(gd(t,e,"access private method"),i),ga,ms,_a,ba,Ed,Hm,hs,bd,Jr,vd={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},Bm=V.createElement("template");Bm.innerHTML=`
1413
1413
  <style>
1414
1414
  :host {
1415
1415
  display: inline-block;
@@ -1436,7 +1436,7 @@ https://github.com/muxinc/elements/blob/main/errors/${t.file}`),ct(e)}var me={AU
1436
1436
  display: none;
1437
1437
  }
1438
1438
  </style>
1439
- `;var wi=class extends l.HTMLElement{constructor(){super(),Ci(this,Ed),Ci(this,hs),Ci(this,ga,void 0),Ci(this,ms,void 0),Ci(this,_a,void 0),Ci(this,ba,void 0),Ci(this,Jr,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer()),wt(this,ba,new MutationObserver(e=>{var i;this.mediaController&&!((i=this.mediaController)!=null&&i.breakpointsComputed)||e.some(a=>{let r=a.target;return r===this?!0:r.localName!=="media-controller"?!1:!!(vd[a.attributeName]||a.attributeName.startsWith("breakpoint"))})&&this.render()})),wt(this,Jr,this.render.bind(this)),fd(this,Ed,Hm).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return(e=ei(this,ga))!=null?e:this.constructor.template}set template(e){if(e===null){this.removeAttribute("template");return}typeof e=="string"?this.setAttribute("template",e):e instanceof HTMLTemplateElement&&(wt(this,ga,e),wt(this,_a,null),this.createRenderer())}get props(){var e,i,a;let r=[...Array.from((i=(e=this.mediaController)==null?void 0:e.attributes)!=null?i:[]).filter(({name:s})=>vd[s]||s.startsWith("breakpoint")),...Array.from(this.attributes)],o={};for(let s of r){let d=(a=vd[s.name])!=null?a:Hu(s.name),{value:u}=s;u!=null?(Lo(u)&&(u=parseFloat(u)),o[d]=u===""?!0:u):o[d]=!1}return o}attributeChangedCallback(e,i,a){e==="template"&&i!=a&&fd(this,hs,bd).call(this)}connectedCallback(){this.addEventListener(Ie.BREAKPOINTS_COMPUTED,ei(this,Jr)),ei(this,ba).observe(this,{attributes:!0}),ei(this,ba).observe(this.renderRoot,{attributes:!0,subtree:!0}),fd(this,hs,bd).call(this)}disconnectedCallback(){this.removeEventListener(Ie.BREAKPOINTS_COMPUTED,ei(this,Jr)),ei(this,ba).disconnect()}createRenderer(){this.template instanceof HTMLTemplateElement&&this.template!==ei(this,ms)&&(wt(this,ms,this.template),this.renderer=new Lt(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(Bm.content.cloneNode(!0),this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}};ga=new WeakMap;ms=new WeakMap;_a=new WeakMap;ba=new WeakMap;Ed=new WeakSet;Hm=function(t){if(Object.prototype.hasOwnProperty.call(this,t)){let e=this[t];delete this[t],this[t]=e}};hs=new WeakSet;bd=function(){var t;let e=this.getAttribute("template");if(!e||e===ei(this,_a))return;let i=this.getRootNode(),a=(t=i==null?void 0:i.getElementById)==null?void 0:t.call(i,e);if(a){wt(this,_a,e),wt(this,ga,a),this.createRenderer();return}Uv(e)&&(wt(this,_a,e),Hv(e).then(r=>{let o=V.createElement("template");o.innerHTML=r,wt(this,ga,o),this.createRenderer()}).catch(console.error))};Jr=new WeakMap;wi.observedAttributes=["template"];wi.processor=cs;function Uv(t){if(!/^(\/|\.\/|https?:\/\/)/.test(t))return!1;let e=/^https?:\/\//.test(t)?void 0:location.origin;try{new URL(t,e)}catch{return!1}return!0}async function Hv(t){let e=await fetch(t);if(e.status!==200)throw new Error(`Failed to load resource: the server responded with a status of ${e.status}`);return e.text()}l.customElements.get("media-theme")||l.customElements.define("media-theme",wi);var $m=`:host {
1439
+ `;var wi=class extends l.HTMLElement{constructor(){super(),Ci(this,Ed),Ci(this,hs),Ci(this,ga,void 0),Ci(this,ms,void 0),Ci(this,_a,void 0),Ci(this,ba,void 0),Ci(this,Jr,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer()),Rt(this,ba,new MutationObserver(e=>{var i;this.mediaController&&!((i=this.mediaController)!=null&&i.breakpointsComputed)||e.some(a=>{let r=a.target;return r===this?!0:r.localName!=="media-controller"?!1:!!(vd[a.attributeName]||a.attributeName.startsWith("breakpoint"))})&&this.render()})),Rt(this,Jr,this.render.bind(this)),fd(this,Ed,Hm).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return(e=ti(this,ga))!=null?e:this.constructor.template}set template(e){if(e===null){this.removeAttribute("template");return}typeof e=="string"?this.setAttribute("template",e):e instanceof HTMLTemplateElement&&(Rt(this,ga,e),Rt(this,_a,null),this.createRenderer())}get props(){var e,i,a;let r=[...Array.from((i=(e=this.mediaController)==null?void 0:e.attributes)!=null?i:[]).filter(({name:s})=>vd[s]||s.startsWith("breakpoint")),...Array.from(this.attributes)],n={};for(let s of r){let d=(a=vd[s.name])!=null?a:Hu(s.name),{value:u}=s;u!=null?(Ln(u)&&(u=parseFloat(u)),n[d]=u===""?!0:u):n[d]=!1}return n}attributeChangedCallback(e,i,a){e==="template"&&i!=a&&fd(this,hs,bd).call(this)}connectedCallback(){this.addEventListener(Ie.BREAKPOINTS_COMPUTED,ti(this,Jr)),ti(this,ba).observe(this,{attributes:!0}),ti(this,ba).observe(this.renderRoot,{attributes:!0,subtree:!0}),fd(this,hs,bd).call(this)}disconnectedCallback(){this.removeEventListener(Ie.BREAKPOINTS_COMPUTED,ti(this,Jr)),ti(this,ba).disconnect()}createRenderer(){this.template instanceof HTMLTemplateElement&&this.template!==ti(this,ms)&&(Rt(this,ms,this.template),this.renderer=new Ct(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(Bm.content.cloneNode(!0),this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}};ga=new WeakMap;ms=new WeakMap;_a=new WeakMap;ba=new WeakMap;Ed=new WeakSet;Hm=function(t){if(Object.prototype.hasOwnProperty.call(this,t)){let e=this[t];delete this[t],this[t]=e}};hs=new WeakSet;bd=function(){var t;let e=this.getAttribute("template");if(!e||e===ti(this,_a))return;let i=this.getRootNode(),a=(t=i==null?void 0:i.getElementById)==null?void 0:t.call(i,e);if(a){Rt(this,_a,e),Rt(this,ga,a),this.createRenderer();return}Uv(e)&&(Rt(this,_a,e),Hv(e).then(r=>{let n=V.createElement("template");n.innerHTML=r,Rt(this,ga,n),this.createRenderer()}).catch(console.error))};Jr=new WeakMap;wi.observedAttributes=["template"];wi.processor=cs;function Uv(t){if(!/^(\/|\.\/|https?:\/\/)/.test(t))return!1;let e=/^https?:\/\//.test(t)?void 0:location.origin;try{new URL(t,e)}catch{return!1}return!0}async function Hv(t){let e=await fetch(t);if(e.status!==200)throw new Error(`Failed to load resource: the server responded with a status of ${e.status}`);return e.text()}l.customElements.get("media-theme")||l.customElements.define("media-theme",wi);var $m=`:host {
1440
1440
  --media-control-display: var(--controls);
1441
1441
  --media-loading-indicator-display: var(--loading-indicator);
1442
1442
  --media-dialog-display: var(--dialog);
@@ -1586,26 +1586,26 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1586
1586
  :host([no-tooltips]) {
1587
1587
  --media-tooltip-display: none;
1588
1588
  }
1589
- `;var jr=new WeakMap,Ad=class t{constructor(e,i){this.element=e;this.type=i;this.element.addEventListener(this.type,this);let a=jr.get(this.element);a&&a.set(this.type,this)}set(e){if(typeof e=="function")this.handleEvent=e.bind(this.element);else if(typeof e=="object"&&typeof e.handleEvent=="function")this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let i=jr.get(this.element);i&&i.delete(this.type)}}static for(e){jr.has(e.element)||jr.set(e.element,new Map);let i=e.attributeName.slice(2),a=jr.get(e.element);return a&&a.has(i)?a.get(i):new t(e.element,i)}};function $v(t,e){return t instanceof be&&t.attributeName.startsWith("on")?(Ad.for(t).set(e),t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),!0):!1}function Wv(t,e){return e instanceof ps&&t instanceof Ct?(e.renderInto(t),!0):!1}function Fv(t,e){return e instanceof DocumentFragment&&t instanceof Ct?(e.childNodes.length&&t.replace(...e.childNodes),!0):!1}function Vv(t,e){if(t instanceof be){let i=t.attributeNamespace,a=t.element.getAttributeNS(i,t.attributeName);return String(e)!==a&&(t.value=String(e)),!0}return t.value=String(e),!0}function Kv(t,e){if(t instanceof be&&e instanceof Element){let i=t.element;return i[t.attributeName]!==e&&(t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),i[t.attributeName]=e),!0}return!1}function Gv(t,e){if(typeof e=="boolean"&&t instanceof be){let i=t.attributeNamespace,a=t.element.hasAttributeNS(i,t.attributeName);return e!==a&&(t.booleanValue=e),!0}return!1}function Yv(t,e){return e===!1&&t instanceof Ct?(t.replace(""),!0):!1}function qv(t,e){Kv(t,e)||Gv(t,e)||$v(t,e)||Yv(t,e)||Wv(t,e)||Fv(t,e)||Vv(t,e)}var _d=new Map,Wm=new WeakMap,Fm=new WeakMap,ps=class{constructor(e,i,a){this.strings=e;this.values=i;this.processor=a;this.stringsKey=this.strings.join("")}get template(){if(_d.has(this.stringsKey))return _d.get(this.stringsKey);{let e=ni.createElement("template"),i=this.strings.length-1;return e.innerHTML=this.strings.reduce((a,r,o)=>a+r+(o<i?`{{ ${o} }}`:""),""),_d.set(this.stringsKey,e),e}}renderInto(e){var r;let i=this.template;if(Wm.get(e)!==i){Wm.set(e,i);let o=new Lt(i,this.values,this.processor);Fm.set(e,o),e instanceof Ct?e.replace(...o.children):e.appendChild(o);return}let a=Fm.get(e);(r=a==null?void 0:a.update)==null||r.call(a,this.values)}},Zv={processCallback(t,e,i){var a;if(i){for(let[r,o]of e)if(r in i){let s=(a=i[r])!=null?a:"";qv(o,s)}}}};function eo(t,...e){return new ps(t,e,Zv)}function Vm(t,e){t.renderInto(e)}var to=require("@mux/playback-core"),zv=t=>{let{tokens:e}=t;return e.drm?":host(:not([cast-receiver])) { --_cast-button-drm-display: none; }":""},Km=t=>eo`
1589
+ `;var jr=new WeakMap,Ad=class t{constructor(e,i){this.element=e;this.type=i;this.element.addEventListener(this.type,this);let a=jr.get(this.element);a&&a.set(this.type,this)}set(e){if(typeof e=="function")this.handleEvent=e.bind(this.element);else if(typeof e=="object"&&typeof e.handleEvent=="function")this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let i=jr.get(this.element);i&&i.delete(this.type)}}static for(e){jr.has(e.element)||jr.set(e.element,new Map);let i=e.attributeName.slice(2),a=jr.get(e.element);return a&&a.has(i)?a.get(i):new t(e.element,i)}};function $v(t,e){return t instanceof be&&t.attributeName.startsWith("on")?(Ad.for(t).set(e),t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),!0):!1}function Wv(t,e){return e instanceof ps&&t instanceof wt?(e.renderInto(t),!0):!1}function Fv(t,e){return e instanceof DocumentFragment&&t instanceof wt?(e.childNodes.length&&t.replace(...e.childNodes),!0):!1}function Vv(t,e){if(t instanceof be){let i=t.attributeNamespace,a=t.element.getAttributeNS(i,t.attributeName);return String(e)!==a&&(t.value=String(e)),!0}return t.value=String(e),!0}function Kv(t,e){if(t instanceof be&&e instanceof Element){let i=t.element;return i[t.attributeName]!==e&&(t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),i[t.attributeName]=e),!0}return!1}function Gv(t,e){if(typeof e=="boolean"&&t instanceof be){let i=t.attributeNamespace,a=t.element.hasAttributeNS(i,t.attributeName);return e!==a&&(t.booleanValue=e),!0}return!1}function Yv(t,e){return e===!1&&t instanceof wt?(t.replace(""),!0):!1}function qv(t,e){Kv(t,e)||Gv(t,e)||$v(t,e)||Yv(t,e)||Wv(t,e)||Fv(t,e)||Vv(t,e)}var _d=new Map,Wm=new WeakMap,Fm=new WeakMap,ps=class{constructor(e,i,a){this.strings=e;this.values=i;this.processor=a;this.stringsKey=this.strings.join("")}get template(){if(_d.has(this.stringsKey))return _d.get(this.stringsKey);{let e=oi.createElement("template"),i=this.strings.length-1;return e.innerHTML=this.strings.reduce((a,r,n)=>a+r+(n<i?`{{ ${n} }}`:""),""),_d.set(this.stringsKey,e),e}}renderInto(e){var r;let i=this.template;if(Wm.get(e)!==i){Wm.set(e,i);let n=new Ct(i,this.values,this.processor);Fm.set(e,n),e instanceof wt?e.replace(...n.children):e.appendChild(n);return}let a=Fm.get(e);(r=a==null?void 0:a.update)==null||r.call(a,this.values)}},Zv={processCallback(t,e,i){var a;if(i){for(let[r,n]of e)if(r in i){let s=(a=i[r])!=null?a:"";qv(n,s)}}}};function en(t,...e){return new ps(t,e,Zv)}function Vm(t,e){t.renderInto(e)}var tn=require("@mux/playback-core"),zv=t=>{let{tokens:e}=t;return e.drm?":host(:not([cast-receiver])) { --_cast-button-drm-display: none; }":""},Km=t=>en`
1590
1590
  <style>
1591
1591
  ${zv(t)}
1592
1592
  ${$m}
1593
1593
  </style>
1594
1594
  ${jv(t)}
1595
- `,Qv=t=>{let e=t.hotKeys?`${t.hotKeys}`:"";return Yr(t.streamType)==="live"&&(e+=" noarrowleft noarrowright"),e},Xv={TOP:"top",CENTER:"center",BOTTOM:"bottom",LAYER:"layer",MEDIA_LAYER:"media-layer",POSTER_LAYER:"poster-layer",VERTICAL_LAYER:"vertical-layer",CENTERED_LAYER:"centered-layer",GESTURE_LAYER:"gesture-layer",CONTROLLER_LAYER:"controller",BUTTON:"button",RANGE:"range",THUMB:"thumb",DISPLAY:"display",CONTROL_BAR:"control-bar",MENU_BUTTON:"menu-button",MENU:"menu",MENU_ITEM:"menu-item",OPTION:"option",POSTER:"poster",LIVE:"live",PLAY:"play",PRE_PLAY:"pre-play",SEEK_BACKWARD:"seek-backward",SEEK_FORWARD:"seek-forward",MUTE:"mute",CAPTIONS:"captions",AIRPLAY:"airplay",PIP:"pip",FULLSCREEN:"fullscreen",CAST:"cast",PLAYBACK_RATE:"playback-rate",VOLUME:"volume",TIME:"time",TITLE:"title",AUDIO_TRACK:"audio-track",RENDITION:"rendition"},Jv=Object.values(Xv).join(", "),jv=t=>{var e,i,a,r,o,s,d,u,f,y,A,E,p,k,g,S,C,j,Ue,Nt,gt,Ce,we,Ut,Qe,Fa,Va,Ka,Ga,Ya,qa,Za,So,_t,za,Qa,Xa,Ja,ja,er,tr;return eo`
1595
+ `,Qv=t=>{let e=t.hotKeys?`${t.hotKeys}`:"";return Yr(t.streamType)==="live"&&(e+=" noarrowleft noarrowright"),e},Xv={TOP:"top",CENTER:"center",BOTTOM:"bottom",LAYER:"layer",MEDIA_LAYER:"media-layer",POSTER_LAYER:"poster-layer",VERTICAL_LAYER:"vertical-layer",CENTERED_LAYER:"centered-layer",GESTURE_LAYER:"gesture-layer",CONTROLLER_LAYER:"controller",BUTTON:"button",RANGE:"range",THUMB:"thumb",DISPLAY:"display",CONTROL_BAR:"control-bar",MENU_BUTTON:"menu-button",MENU:"menu",MENU_ITEM:"menu-item",OPTION:"option",POSTER:"poster",LIVE:"live",PLAY:"play",PRE_PLAY:"pre-play",SEEK_BACKWARD:"seek-backward",SEEK_FORWARD:"seek-forward",MUTE:"mute",CAPTIONS:"captions",AIRPLAY:"airplay",PIP:"pip",FULLSCREEN:"fullscreen",CAST:"cast",PLAYBACK_RATE:"playback-rate",VOLUME:"volume",TIME:"time",TITLE:"title",AUDIO_TRACK:"audio-track",RENDITION:"rendition"},Jv=Object.values(Xv).join(", "),jv=t=>{var e,i,a,r,n,s,d,u,f,y,A,E,p,k,g,S,C,j,Ue,Ut,_t,Ce,we,Ht,Xe,Fa,Va,Ka,Ga,Ya,qa,Za,Sn,At,za,Qa,Xa,Ja,ja,er,tr;return en`
1596
1596
  <media-theme
1597
1597
  template="${t.themeTemplate||!1}"
1598
1598
  defaultstreamtype="${(e=t.defaultStreamType)!=null?e:!1}"
1599
1599
  hotkeys="${Qv(t)||!1}"
1600
1600
  nohotkeys="${t.noHotKeys||!t.hasSrc||!1}"
1601
- noautoseektolive="${!!((i=t.streamType)!=null&&i.includes(to.StreamTypes.LIVE))&&t.targetLiveWindow!==0}"
1601
+ noautoseektolive="${!!((i=t.streamType)!=null&&i.includes(tn.StreamTypes.LIVE))&&t.targetLiveWindow!==0}"
1602
1602
  novolumepref="${t.novolumepref||!1}"
1603
1603
  nomutedpref="${t.nomutedpref||!1}"
1604
1604
  disabled="${!t.hasSrc||t.isDialogOpen}"
1605
1605
  audio="${(a=t.audio)!=null?a:!1}"
1606
1606
  style="${(r=gm({"--media-primary-color":t.primaryColor,"--media-secondary-color":t.secondaryColor,"--media-accent-color":t.accentColor}))!=null?r:!1}"
1607
1607
  defaultsubtitles="${!t.defaultHiddenCaptions}"
1608
- forwardseekoffset="${(o=t.forwardSeekOffset)!=null?o:!1}"
1608
+ forwardseekoffset="${(n=t.forwardSeekOffset)!=null?n:!1}"
1609
1609
  backwardseekoffset="${(s=t.backwardSeekOffset)!=null?s:!1}"
1610
1610
  playbackrates="${(d=t.playbackRates)!=null?d:!1}"
1611
1611
  defaultshowremainingtime="${(u=t.defaultShowRemainingTime)!=null?u:!1}"
@@ -1627,31 +1627,34 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1627
1627
  playsinline
1628
1628
  autoplay="${(j=t.autoplay)!=null?j:!1}"
1629
1629
  muted="${(Ue=t.muted)!=null?Ue:!1}"
1630
- loop="${(Nt=t.loop)!=null?Nt:!1}"
1631
- preload="${(gt=t.preload)!=null?gt:!1}"
1630
+ loop="${(Ut=t.loop)!=null?Ut:!1}"
1631
+ preload="${(_t=t.preload)!=null?_t:!1}"
1632
1632
  debug="${(Ce=t.debug)!=null?Ce:!1}"
1633
1633
  prefer-cmcd="${(we=t.preferCmcd)!=null?we:!1}"
1634
- disable-tracking="${(Ut=t.disableTracking)!=null?Ut:!1}"
1635
- disable-cookies="${(Qe=t.disableCookies)!=null?Qe:!1}"
1634
+ disable-tracking="${(Ht=t.disableTracking)!=null?Ht:!1}"
1635
+ disable-cookies="${(Xe=t.disableCookies)!=null?Xe:!1}"
1636
1636
  prefer-playback="${(Fa=t.preferPlayback)!=null?Fa:!1}"
1637
1637
  start-time="${t.startTime!=null?t.startTime:!1}"
1638
+ initial-bandwidth-estimate-kbps="${t.initialBandwidthEstimateKbps!=null?t.initialBandwidthEstimateKbps:!1}"
1639
+ initial-estimate-segments="${t.initialEstimateSegments!=null?t.initialEstimateSegments:!1}"
1640
+ min-preload-segments="${t.minPreloadSegments!=null?t.minPreloadSegments:!1}"
1638
1641
  beacon-collection-domain="${(Va=t.beaconCollectionDomain)!=null?Va:!1}"
1639
1642
  player-init-time="${(Ka=t.playerInitTime)!=null?Ka:!1}"
1640
1643
  player-software-name="${(Ga=t.playerSoftwareName)!=null?Ga:!1}"
1641
1644
  player-software-version="${(Ya=t.playerSoftwareVersion)!=null?Ya:!1}"
1642
1645
  env-key="${(qa=t.envKey)!=null?qa:!1}"
1643
1646
  custom-domain="${(Za=t.customDomain)!=null?Za:!1}"
1644
- src="${t.src?t.src:t.playbackId?(0,to.toMuxVideoURL)(t):!1}"
1645
- cast-src="${t.src?t.src:t.playbackId?(0,to.toMuxVideoURL)(t):!1}"
1646
- cast-receiver="${(So=t.castReceiver)!=null?So:!1}"
1647
- drm-token="${(za=(_t=t.tokens)==null?void 0:_t.drm)!=null?za:!1}"
1647
+ src="${t.src?t.src:t.playbackId?(0,tn.toMuxVideoURL)(t):!1}"
1648
+ cast-src="${t.src?t.src:t.playbackId?(0,tn.toMuxVideoURL)(t):!1}"
1649
+ cast-receiver="${(Sn=t.castReceiver)!=null?Sn:!1}"
1650
+ drm-token="${(za=(At=t.tokens)==null?void 0:At.drm)!=null?za:!1}"
1648
1651
  playback-token="${(Xa=(Qa=t.tokens)==null?void 0:Qa.playback)!=null?Xa:!1}"
1649
1652
  exportparts="video"
1650
1653
  disable-pseudo-ended="${(Ja=t.disablePseudoEnded)!=null?Ja:!1}"
1651
1654
  max-auto-resolution="${(ja=t.maxAutoResolution)!=null?ja:!1}"
1652
1655
  cap-rendition-to-player-size="${(er=t.capRenditionToPlayerSize)!=null?er:!1}"
1653
1656
  >
1654
- ${t.storyboard?eo`<track label="thumbnails" default kind="metadata" src="${t.storyboard}" />`:eo``}
1657
+ ${t.storyboard?en`<track label="thumbnails" default kind="metadata" src="${t.storyboard}" />`:en``}
1655
1658
  <slot></slot>
1656
1659
  </mux-video>
1657
1660
  <slot name="poster" slot="poster">
@@ -1663,7 +1666,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
1663
1666
  ></media-poster-image>
1664
1667
  </slot>
1665
1668
  </media-theme>
1666
- `};var T=require("@mux/playback-core"),Gm=t=>t.charAt(0).toUpperCase()+t.slice(1),eE=(t,e=!1)=>{var i,a;if(t.muxCode){let r=Gm((i=t.errorCategory)!=null?i:"video"),o=(0,T.errorCategoryToTokenNameOrPrefix)((a=t.errorCategory)!=null?a:T.MuxErrorCategory.VIDEO);if(t.muxCode===T.MuxErrorCode.NETWORK_OFFLINE)return(0,T.i18n)("Your device appears to be offline",e);if(t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_EXPIRED)return(0,T.i18n)("{category} URL has expired",e).format({category:r});if([T.MuxErrorCode.NETWORK_TOKEN_SUB_MISMATCH,T.MuxErrorCode.NETWORK_TOKEN_AUD_MISMATCH,T.MuxErrorCode.NETWORK_TOKEN_AUD_MISSING,T.MuxErrorCode.NETWORK_TOKEN_MALFORMED].includes(t.muxCode))return(0,T.i18n)("{category} URL is formatted incorrectly",e).format({category:r});if(t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_MISSING)return(0,T.i18n)("Invalid {categoryName} URL",e).format({categoryName:o});if(t.muxCode===T.MuxErrorCode.NETWORK_NOT_FOUND)return(0,T.i18n)("{category} does not exist",e).format({category:r});if(t.muxCode===T.MuxErrorCode.NETWORK_NOT_READY){let s=t.streamType==="live"?"Live stream":"Video";return(0,T.i18n)("{mediaType} is not currently available",e).format({mediaType:s})}}if(t.code){if(t.code===T.MediaError.MEDIA_ERR_NETWORK)return(0,T.i18n)("Network Error",e);if(t.code===T.MediaError.MEDIA_ERR_DECODE)return(0,T.i18n)("Media Error",e);if(t.code===T.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED)return(0,T.i18n)("Source Not Supported",e)}return(0,T.i18n)("Error",e)},tE=(t,e=!1)=>{var i,a;if(t.muxCode){let r=Gm((i=t.errorCategory)!=null?i:"video"),o=(0,T.errorCategoryToTokenNameOrPrefix)((a=t.errorCategory)!=null?a:T.MuxErrorCategory.VIDEO);return t.muxCode===T.MuxErrorCode.NETWORK_OFFLINE?(0,T.i18n)("Check your internet connection and try reloading this video.",e):t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_EXPIRED?(0,T.i18n)("The video\u2019s secured {tokenNamePrefix}-token has expired.",e).format({tokenNamePrefix:o}):t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_SUB_MISMATCH?(0,T.i18n)("The video\u2019s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",e).format({tokenNamePrefix:o}):t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_MALFORMED?(0,T.i18n)("{category} URL is formatted incorrectly",e).format({category:r}):[T.MuxErrorCode.NETWORK_TOKEN_AUD_MISMATCH,T.MuxErrorCode.NETWORK_TOKEN_AUD_MISSING].includes(t.muxCode)?(0,T.i18n)("The {tokenNamePrefix}-token is formatted with incorrect information.",e).format({tokenNamePrefix:o}):[T.MuxErrorCode.NETWORK_TOKEN_MISSING,T.MuxErrorCode.NETWORK_INVALID_URL].includes(t.muxCode)?(0,T.i18n)("The video URL or {tokenNamePrefix}-token are formatted with incorrect or incomplete information.",e).format({tokenNamePrefix:o}):t.muxCode===T.MuxErrorCode.NETWORK_NOT_FOUND?"":t.message}return t.code&&(t.code===T.MediaError.MEDIA_ERR_NETWORK||t.code===T.MediaError.MEDIA_ERR_DECODE||t.code===T.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED),t.message},Ym=(t,e=!1)=>{let i=eE(t,e).toString(),a=tE(t,e).toString();return{title:i,message:a}},iE=t=>{if(t.muxCode){if(t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_EXPIRED)return"403-expired-token.md";if(t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_MALFORMED)return"403-malformatted-token.md";if([T.MuxErrorCode.NETWORK_TOKEN_AUD_MISMATCH,T.MuxErrorCode.NETWORK_TOKEN_AUD_MISSING].includes(t.muxCode))return"403-incorrect-aud-value.md";if(t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_SUB_MISMATCH)return"403-playback-id-mismatch.md";if(t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_MISSING)return"missing-signed-tokens.md";if(t.muxCode===T.MuxErrorCode.NETWORK_NOT_FOUND)return"404-not-found.md";if(t.muxCode===T.MuxErrorCode.NETWORK_NOT_READY)return"412-not-playable.md"}if(t.code){if(t.code===T.MediaError.MEDIA_ERR_NETWORK)return"";if(t.code===T.MediaError.MEDIA_ERR_DECODE)return"media-decode-error.md";if(t.code===T.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED)return"media-src-not-supported.md"}return""},Td=(t,e)=>{let i=iE(t);return{message:t.message,context:t.context,file:i}};var qm=`<template id="media-theme-gerwig">
1669
+ `};var T=require("@mux/playback-core"),Gm=t=>t.charAt(0).toUpperCase()+t.slice(1),eE=(t,e=!1)=>{var i,a;if(t.muxCode){let r=Gm((i=t.errorCategory)!=null?i:"video"),n=(0,T.errorCategoryToTokenNameOrPrefix)((a=t.errorCategory)!=null?a:T.MuxErrorCategory.VIDEO);if(t.muxCode===T.MuxErrorCode.NETWORK_OFFLINE)return(0,T.i18n)("Your device appears to be offline",e);if(t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_EXPIRED)return(0,T.i18n)("{category} URL has expired",e).format({category:r});if([T.MuxErrorCode.NETWORK_TOKEN_SUB_MISMATCH,T.MuxErrorCode.NETWORK_TOKEN_AUD_MISMATCH,T.MuxErrorCode.NETWORK_TOKEN_AUD_MISSING,T.MuxErrorCode.NETWORK_TOKEN_MALFORMED].includes(t.muxCode))return(0,T.i18n)("{category} URL is formatted incorrectly",e).format({category:r});if(t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_MISSING)return(0,T.i18n)("Invalid {categoryName} URL",e).format({categoryName:n});if(t.muxCode===T.MuxErrorCode.NETWORK_NOT_FOUND)return(0,T.i18n)("{category} does not exist",e).format({category:r});if(t.muxCode===T.MuxErrorCode.NETWORK_NOT_READY){let s=t.streamType==="live"?"Live stream":"Video";return(0,T.i18n)("{mediaType} is not currently available",e).format({mediaType:s})}}if(t.code){if(t.code===T.MediaError.MEDIA_ERR_NETWORK)return(0,T.i18n)("Network Error",e);if(t.code===T.MediaError.MEDIA_ERR_DECODE)return(0,T.i18n)("Media Error",e);if(t.code===T.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED)return(0,T.i18n)("Source Not Supported",e)}return(0,T.i18n)("Error",e)},tE=(t,e=!1)=>{var i,a;if(t.muxCode){let r=Gm((i=t.errorCategory)!=null?i:"video"),n=(0,T.errorCategoryToTokenNameOrPrefix)((a=t.errorCategory)!=null?a:T.MuxErrorCategory.VIDEO);return t.muxCode===T.MuxErrorCode.NETWORK_OFFLINE?(0,T.i18n)("Check your internet connection and try reloading this video.",e):t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_EXPIRED?(0,T.i18n)("The video\u2019s secured {tokenNamePrefix}-token has expired.",e).format({tokenNamePrefix:n}):t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_SUB_MISMATCH?(0,T.i18n)("The video\u2019s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",e).format({tokenNamePrefix:n}):t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_MALFORMED?(0,T.i18n)("{category} URL is formatted incorrectly",e).format({category:r}):[T.MuxErrorCode.NETWORK_TOKEN_AUD_MISMATCH,T.MuxErrorCode.NETWORK_TOKEN_AUD_MISSING].includes(t.muxCode)?(0,T.i18n)("The {tokenNamePrefix}-token is formatted with incorrect information.",e).format({tokenNamePrefix:n}):[T.MuxErrorCode.NETWORK_TOKEN_MISSING,T.MuxErrorCode.NETWORK_INVALID_URL].includes(t.muxCode)?(0,T.i18n)("The video URL or {tokenNamePrefix}-token are formatted with incorrect or incomplete information.",e).format({tokenNamePrefix:n}):t.muxCode===T.MuxErrorCode.NETWORK_NOT_FOUND?"":t.message}return t.code&&(t.code===T.MediaError.MEDIA_ERR_NETWORK||t.code===T.MediaError.MEDIA_ERR_DECODE||t.code===T.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED),t.message},Ym=(t,e=!1)=>{let i=eE(t,e).toString(),a=tE(t,e).toString();return{title:i,message:a}},iE=t=>{if(t.muxCode){if(t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_EXPIRED)return"403-expired-token.md";if(t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_MALFORMED)return"403-malformatted-token.md";if([T.MuxErrorCode.NETWORK_TOKEN_AUD_MISMATCH,T.MuxErrorCode.NETWORK_TOKEN_AUD_MISSING].includes(t.muxCode))return"403-incorrect-aud-value.md";if(t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_SUB_MISMATCH)return"403-playback-id-mismatch.md";if(t.muxCode===T.MuxErrorCode.NETWORK_TOKEN_MISSING)return"missing-signed-tokens.md";if(t.muxCode===T.MuxErrorCode.NETWORK_NOT_FOUND)return"404-not-found.md";if(t.muxCode===T.MuxErrorCode.NETWORK_NOT_READY)return"412-not-playable.md"}if(t.code){if(t.code===T.MediaError.MEDIA_ERR_NETWORK)return"";if(t.code===T.MediaError.MEDIA_ERR_DECODE)return"media-decode-error.md";if(t.code===T.MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED)return"media-src-not-supported.md"}return""},Td=(t,e)=>{let i=iE(t);return{message:t.message,context:t.context,file:i}};var qm=`<template id="media-theme-gerwig">
1667
1670
  <style>
1668
1671
  @keyframes pre-play-hide {
1669
1672
  0% {
@@ -2795,7 +2798,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2795
2798
  <slot></slot>
2796
2799
  </media-controller>
2797
2800
  </template>
2798
- `;function Zm({anchor:t,floating:e,placement:i}){let a=rE({anchor:t,floating:e}),{x:r,y:o}=nE(a,i);return{x:r,y:o}}function rE({anchor:t,floating:e}){return{anchor:oE(t,e.offsetParent),floating:{x:0,y:0,width:e.offsetWidth,height:e.offsetHeight}}}function oE(t,e){var i;let a=t.getBoundingClientRect(),r=(i=e==null?void 0:e.getBoundingClientRect())!=null?i:{x:0,y:0};return{x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}function nE({anchor:t,floating:e},i){let a=sE(i)==="x"?"y":"x",r=a==="y"?"height":"width",o=zm(i),s=t.x+t.width/2-e.width/2,d=t.y+t.height/2-e.height/2,u=t[r]/2-e[r]/2,f;switch(o){case"top":f={x:s,y:t.y-e.height};break;case"bottom":f={x:s,y:t.y+t.height};break;case"right":f={x:t.x+t.width,y:d};break;case"left":f={x:t.x-e.width,y:d};break;default:f={x:t.x,y:t.y}}switch(i.split("-")[1]){case"start":f[a]-=u;break;case"end":f[a]+=u;break}return f}function zm(t){return t.split("-")[0]}function sE(t){return["top","bottom"].includes(zm(t))?"y":"x"}var ti=class extends Event{constructor({action:e="auto",relatedTarget:i,...a}){super("invoke",a),this.action=e,this.relatedTarget=i}},fs=class extends Event{constructor({newState:e,oldState:i,...a}){super("toggle",a),this.newState=e,this.oldState=i}};var Od=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},$=(t,e,i)=>(Od(t,e,"read from private field"),i?i.call(t):e.get(t)),K=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Oe=(t,e,i,a)=>(Od(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),G=(t,e,i)=>(Od(t,e,"access private method"),i),ht,ii,Rt,vs,io,xi,oo,yd,Qm,gs,Pd,_s,Es,kd,Sd,Xm,Id,Jm,Md,jm,Aa,Ta,ya,no,As,Nd,Ld,eh,Ud,th,Cd,ih,Hd,ah,wd,rh,Rd,oh,ao,Ts,xd,nh,ro,ys,bs,Dd;function pt({type:t,text:e,value:i,checked:a}){let r=V.createElement("media-chrome-menu-item");r.type=t!=null?t:"",r.part.add("menu-item"),t&&r.part.add(t),r.value=i,r.checked=a;let o=V.createElement("span");return o.textContent=e,r.append(o),r}function ze(t,e){let i=t.querySelector(`:scope > [slot="${e}"]`);if((i==null?void 0:i.nodeName)=="SLOT"&&(i=i.assignedElements({flatten:!0})[0]),i)return i=i.cloneNode(!0),i;let a=t.shadowRoot.querySelector(`[name="${e}"] > svg`);return a?a.cloneNode(!0):""}function lE(t){return`
2801
+ `;function Zm({anchor:t,floating:e,placement:i}){let a=rE({anchor:t,floating:e}),{x:r,y:n}=oE(a,i);return{x:r,y:n}}function rE({anchor:t,floating:e}){return{anchor:nE(t,e.offsetParent),floating:{x:0,y:0,width:e.offsetWidth,height:e.offsetHeight}}}function nE(t,e){var i;let a=t.getBoundingClientRect(),r=(i=e==null?void 0:e.getBoundingClientRect())!=null?i:{x:0,y:0};return{x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}function oE({anchor:t,floating:e},i){let a=sE(i)==="x"?"y":"x",r=a==="y"?"height":"width",n=zm(i),s=t.x+t.width/2-e.width/2,d=t.y+t.height/2-e.height/2,u=t[r]/2-e[r]/2,f;switch(n){case"top":f={x:s,y:t.y-e.height};break;case"bottom":f={x:s,y:t.y+t.height};break;case"right":f={x:t.x+t.width,y:d};break;case"left":f={x:t.x-e.width,y:d};break;default:f={x:t.x,y:t.y}}switch(i.split("-")[1]){case"start":f[a]-=u;break;case"end":f[a]+=u;break}return f}function zm(t){return t.split("-")[0]}function sE(t){return["top","bottom"].includes(zm(t))?"y":"x"}var ii=class extends Event{constructor({action:e="auto",relatedTarget:i,...a}){super("invoke",a),this.action=e,this.relatedTarget=i}},fs=class extends Event{constructor({newState:e,oldState:i,...a}){super("toggle",a),this.newState=e,this.oldState=i}};var Od=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},$=(t,e,i)=>(Od(t,e,"read from private field"),i?i.call(t):e.get(t)),K=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Oe=(t,e,i,a)=>(Od(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),G=(t,e,i)=>(Od(t,e,"access private method"),i),pt,ai,xt,vs,an,xi,on,yd,Qm,gs,Nd,_s,Es,kd,Sd,Xm,Id,Jm,Md,jm,Aa,Ta,ya,sn,As,Pd,Ld,eh,Ud,th,Cd,ih,Hd,ah,wd,rh,Rd,nh,rn,Ts,xd,oh,nn,ys,bs,Dd;function ft({type:t,text:e,value:i,checked:a}){let r=V.createElement("media-chrome-menu-item");r.type=t!=null?t:"",r.part.add("menu-item"),t&&r.part.add(t),r.value=i,r.checked=a;let n=V.createElement("span");return n.textContent=e,r.append(n),r}function ze(t,e){let i=t.querySelector(`:scope > [slot="${e}"]`);if((i==null?void 0:i.nodeName)=="SLOT"&&(i=i.assignedElements({flatten:!0})[0]),i)return i=i.cloneNode(!0),i;let a=t.shadowRoot.querySelector(`[name="${e}"] > svg`);return a?a.cloneNode(!0):""}function lE(t){return`
2799
2802
  <style>
2800
2803
  :host {
2801
2804
  font: var(--media-font,
@@ -2970,7 +2973,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2970
2973
  <slot></slot>
2971
2974
  </div>
2972
2975
  <slot name="checked-indicator" hidden></slot>
2973
- `}var Ri={STYLE:"style",HIDDEN:"hidden",DISABLED:"disabled",ANCHOR:"anchor"},te=class extends l.HTMLElement{constructor(){if(super(),K(this,yd),K(this,gs),K(this,Es),K(this,Sd),K(this,Id),K(this,Md),K(this,ya),K(this,As),K(this,Ld),K(this,Ud),K(this,Cd),K(this,Hd),K(this,wd),K(this,Rd),K(this,ao),K(this,xd),K(this,ro),K(this,bs),K(this,ht,null),K(this,ii,null),K(this,Rt,null),K(this,vs,new Set),K(this,io,void 0),K(this,xi,!1),K(this,oo,null),K(this,_s,()=>{let e=$(this,vs),i=new Set(this.items);for(let a of e)i.has(a)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:a}));for(let a of i)e.has(a)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:a}));Oe(this,vs,i)}),K(this,Aa,()=>{G(this,ya,no).call(this),G(this,As,Nd).call(this,!1)}),K(this,Ta,()=>{G(this,ya,no).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),Oe(this,io,new MutationObserver($(this,_s)))}static get observedAttributes(){return[Ri.DISABLED,Ri.HIDDEN,Ri.STYLE,Ri.ANCHOR,D.MEDIA_CONTROLLER]}static formatMenuItemText(e,i){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this)}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this)}handleEvent(e){switch(e.type){case"slotchange":G(this,yd,Qm).call(this,e);break;case"invoke":G(this,Sd,Xm).call(this,e);break;case"click":G(this,Ld,eh).call(this,e);break;case"toggle":G(this,Cd,ih).call(this,e);break;case"focusout":G(this,wd,rh).call(this,e);break;case"keydown":G(this,Rd,oh).call(this,e);break}}connectedCallback(){var e,i;$(this,io).observe(this.defaultSlot,{childList:!0}),Oe(this,oo,sr(this.shadowRoot,":host")),G(this,Es,kd).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),Oe(this,ht,Do(this)),(i=(e=$(this,ht))==null?void 0:e.associateElement)==null||i.call(e,this),this.hidden||(At(so(this),$(this,Aa)),At(this,$(this,Ta))),G(this,gs,Pd).call(this),this.shadowRoot.addEventListener("slotchange",this)}disconnectedCallback(){var e,i;$(this,io).disconnect(),Tt(so(this),$(this,Aa)),Tt(this,$(this,Ta)),this.disable(),(i=(e=$(this,ht))==null?void 0:e.unassociateElement)==null||i.call(e,this),Oe(this,ht,null),Oe(this,ii,null),Oe(this,Rt,null),this.shadowRoot.removeEventListener("slotchange",this)}attributeChangedCallback(e,i,a){var r,o,s,d;e===Ri.HIDDEN&&a!==i?($(this,xi)||Oe(this,xi,!0),this.hidden?G(this,Md,jm).call(this):G(this,Id,Jm).call(this),this.dispatchEvent(new fs({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===D.MEDIA_CONTROLLER?(i&&((o=(r=$(this,ht))==null?void 0:r.unassociateElement)==null||o.call(r,this),Oe(this,ht,null)),a&&this.isConnected&&(Oe(this,ht,Do(this)),(d=(s=$(this,ht))==null?void 0:s.associateElement)==null||d.call(s,this))):e===Ri.DISABLED&&a!==i?a==null?this.enable():this.disable():e===Ri.STYLE&&a!==i&&G(this,Es,kd).call(this)}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}get anchor(){return this.getAttribute("anchor")}set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?(e=li(this))==null?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(dE)}get radioGroupItems(){return this.items.filter(e=>e.role==="menuitemradio")}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,i;return(i=(e=this.checkedItems[0])==null?void 0:e.value)!=null?i:""}set value(e){let i=this.items.find(a=>a.value===e);i&&G(this,bs,Dd).call(this,i)}focus(){if(Oe(this,ii,nr()),this.items.length){G(this,ro,ys).call(this,this.items[0]),this.items[0].focus();return}let e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');e==null||e.focus()}handleSelect(e){var i;let a=G(this,ao,Ts).call(this,e);a&&(G(this,bs,Dd).call(this,a,a.type==="checkbox"),$(this,Rt)&&!this.hidden&&((i=$(this,ii))==null||i.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var i,a;let{key:r}=e,o=this.items,s=(a=(i=G(this,ao,Ts).call(this,e))!=null?i:G(this,xd,nh).call(this))!=null?a:o[0],d=o.indexOf(s),u=Math.max(0,d);r==="ArrowDown"?u++:r==="ArrowUp"?u--:e.key==="Home"?u=0:e.key==="End"&&(u=o.length-1),u<0&&(u=o.length-1),u>o.length-1&&(u=0),G(this,ro,ys).call(this,o[u]),o[u].focus()}};ht=new WeakMap;ii=new WeakMap;Rt=new WeakMap;vs=new WeakMap;io=new WeakMap;xi=new WeakMap;oo=new WeakMap;yd=new WeakSet;Qm=function(t){let e=t.target;for(let i of e.assignedNodes({flatten:!0}))i.nodeType===3&&i.textContent.trim()===""&&i.remove();["header","title"].includes(e.name)&&G(this,gs,Pd).call(this),e.name||$(this,_s).call(this)};gs=new WeakSet;Pd=function(){let t=this.shadowRoot.querySelector('slot[name="header"]'),e=this.shadowRoot.querySelector('slot[name="title"]');t.hidden=e.assignedNodes().length===0&&t.assignedNodes().length===0};_s=new WeakMap;Es=new WeakSet;kd=function(){var t;let e=this.shadowRoot.querySelector("#layout-row"),i=(t=getComputedStyle(this).getPropertyValue("--media-menu-layout"))==null?void 0:t.trim();e.setAttribute("media",i==="row"?"":"width:0")};Sd=new WeakSet;Xm=function(t){Oe(this,Rt,t.relatedTarget),he(this,t.relatedTarget)||(this.hidden=!this.hidden)};Id=new WeakSet;Jm=function(){var t;(t=$(this,Rt))==null||t.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),At(so(this),$(this,Aa)),At(this,$(this,Ta))};Md=new WeakSet;jm=function(){var t;(t=$(this,Rt))==null||t.setAttribute("aria-expanded","false"),Tt(so(this),$(this,Aa)),Tt(this,$(this,Ta))};Aa=new WeakMap;Ta=new WeakMap;ya=new WeakSet;no=function(t){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;let{x:e,y:i}=Zm({anchor:this.anchorElement,floating:this,placement:"top-start"});t!=null||(t=this.offsetWidth);let r=so(this).getBoundingClientRect(),o=r.width-e-t,s=r.height-i-this.offsetHeight,{style:d}=$(this,oo);d.setProperty("position","absolute"),d.setProperty("right",`${Math.max(0,o)}px`),d.setProperty("--_menu-bottom",`${s}px`);let u=getComputedStyle(this),y=d.getPropertyValue("--_menu-bottom")===u.bottom?s:parseFloat(u.bottom),A=r.height-y-parseFloat(u.marginBottom);this.style.setProperty("--_menu-max-height",`${A}px`)};As=new WeakSet;Nd=function(t){let e=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=e==null?void 0:e.querySelector('[role="menu"]'),{style:a}=$(this,oo);if(t||a.setProperty("--media-menu-transition-in","none"),i){let r=i.offsetHeight,o=Math.max(i.offsetWidth,e.offsetWidth);this.style.setProperty("min-width",`${o}px`),this.style.setProperty("min-height",`${r}px`),G(this,ya,no).call(this,o)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),G(this,ya,no).call(this);a.removeProperty("--media-menu-transition-in")};Ld=new WeakSet;eh=function(t){var e;if(t.stopPropagation(),t.composedPath().includes($(this,Ud,th))){(e=$(this,ii))==null||e.focus(),this.hidden=!0;return}let i=G(this,ao,Ts).call(this,t);!i||i.hasAttribute("disabled")||(G(this,ro,ys).call(this,i),this.handleSelect(t))};Ud=new WeakSet;th=function(){var t;return(t=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))==null?void 0:t.find(i=>i.matches('button[part~="back"]'))};Cd=new WeakSet;ih=function(t){if(t.target===this)return;G(this,Hd,ah).call(this);let e=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(let i of e)i.invokeTargetElement!=t.target&&t.newState=="open"&&i.getAttribute("aria-expanded")=="true"&&!i.invokeTargetElement.hidden&&i.invokeTargetElement.dispatchEvent(new ti({relatedTarget:i}));for(let i of e)i.setAttribute("aria-expanded",`${!i.submenuElement.hidden}`);G(this,As,Nd).call(this,!0)};Hd=new WeakSet;ah=function(){let e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)};wd=new WeakSet;rh=function(t){var e;he(this,t.relatedTarget)||($(this,xi)&&((e=$(this,ii))==null||e.focus()),$(this,Rt)&&$(this,Rt)!==t.relatedTarget&&!this.hidden&&(this.hidden=!0))};Rd=new WeakSet;oh=function(t){var e,i,a,r,o;let{key:s,ctrlKey:d,altKey:u,metaKey:f}=t;if(!(d||u||f)&&this.keysUsed.includes(s))if(t.preventDefault(),t.stopPropagation(),s==="Tab"){if($(this,xi)){this.hidden=!0;return}t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()}else s==="Escape"?((o=$(this,ii))==null||o.focus(),$(this,xi)&&(this.hidden=!0)):s==="Enter"||s===" "?this.handleSelect(t):this.handleMove(t)};ao=new WeakSet;Ts=function(t){return t.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))};xd=new WeakSet;nh=function(){return this.items.find(t=>t.tabIndex===0)};ro=new WeakSet;ys=function(t){for(let e of this.items)e.tabIndex=e===t?0:-1};bs=new WeakSet;Dd=function(t,e){let i=[...this.checkedItems];t.type==="radio"&&this.radioGroupItems.forEach(a=>a.checked=!1),e?t.checked=!t.checked:t.checked=!0,this.checkedItems.some((a,r)=>a!=i[r])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};te.shadowRootOptions={mode:"open"};te.getTemplateHTML=lE;function dE(t){return["menuitem","menuitemradio","menuitemcheckbox"].includes(t==null?void 0:t.role)}function so(t){var e;return(e=t.getAttribute("bounds")?Xe(t,`#${t.getAttribute("bounds")}`):Y(t)||t.parentElement)!=null?e:t}l.customElements.get("media-chrome-menu")||l.customElements.define("media-chrome-menu",te);var Kd=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ge=(t,e,i)=>(Kd(t,e,"read from private field"),i?i.call(t):e.get(t)),xt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Bd=(t,e,i,a)=>(Kd(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Sa=(t,e,i)=>(Kd(t,e,"access private method"),i),ks,uo,$d,sh,Is,Gd,Yd,lh,ft,ka,Wd,Ss,Fd;function uE(t){return`
2976
+ `}var Ri={STYLE:"style",HIDDEN:"hidden",DISABLED:"disabled",ANCHOR:"anchor"},te=class extends l.HTMLElement{constructor(){if(super(),K(this,yd),K(this,gs),K(this,Es),K(this,Sd),K(this,Id),K(this,Md),K(this,ya),K(this,As),K(this,Ld),K(this,Ud),K(this,Cd),K(this,Hd),K(this,wd),K(this,Rd),K(this,rn),K(this,xd),K(this,nn),K(this,bs),K(this,pt,null),K(this,ai,null),K(this,xt,null),K(this,vs,new Set),K(this,an,void 0),K(this,xi,!1),K(this,on,null),K(this,_s,()=>{let e=$(this,vs),i=new Set(this.items);for(let a of e)i.has(a)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:a}));for(let a of i)e.has(a)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:a}));Oe(this,vs,i)}),K(this,Aa,()=>{G(this,ya,sn).call(this),G(this,As,Pd).call(this,!1)}),K(this,Ta,()=>{G(this,ya,sn).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),Oe(this,an,new MutationObserver($(this,_s)))}static get observedAttributes(){return[Ri.DISABLED,Ri.HIDDEN,Ri.STYLE,Ri.ANCHOR,D.MEDIA_CONTROLLER]}static formatMenuItemText(e,i){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this)}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this)}handleEvent(e){switch(e.type){case"slotchange":G(this,yd,Qm).call(this,e);break;case"invoke":G(this,Sd,Xm).call(this,e);break;case"click":G(this,Ld,eh).call(this,e);break;case"toggle":G(this,Cd,ih).call(this,e);break;case"focusout":G(this,wd,rh).call(this,e);break;case"keydown":G(this,Rd,nh).call(this,e);break}}connectedCallback(){var e,i;$(this,an).observe(this.defaultSlot,{childList:!0}),Oe(this,on,sr(this.shadowRoot,":host")),G(this,Es,kd).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),Oe(this,pt,Dn(this)),(i=(e=$(this,pt))==null?void 0:e.associateElement)==null||i.call(e,this),this.hidden||(Tt(ln(this),$(this,Aa)),Tt(this,$(this,Ta))),G(this,gs,Nd).call(this),this.shadowRoot.addEventListener("slotchange",this)}disconnectedCallback(){var e,i;$(this,an).disconnect(),yt(ln(this),$(this,Aa)),yt(this,$(this,Ta)),this.disable(),(i=(e=$(this,pt))==null?void 0:e.unassociateElement)==null||i.call(e,this),Oe(this,pt,null),Oe(this,ai,null),Oe(this,xt,null),this.shadowRoot.removeEventListener("slotchange",this)}attributeChangedCallback(e,i,a){var r,n,s,d;e===Ri.HIDDEN&&a!==i?($(this,xi)||Oe(this,xi,!0),this.hidden?G(this,Md,jm).call(this):G(this,Id,Jm).call(this),this.dispatchEvent(new fs({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===D.MEDIA_CONTROLLER?(i&&((n=(r=$(this,pt))==null?void 0:r.unassociateElement)==null||n.call(r,this),Oe(this,pt,null)),a&&this.isConnected&&(Oe(this,pt,Dn(this)),(d=(s=$(this,pt))==null?void 0:s.associateElement)==null||d.call(s,this))):e===Ri.DISABLED&&a!==i?a==null?this.enable():this.disable():e===Ri.STYLE&&a!==i&&G(this,Es,kd).call(this)}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}get anchor(){return this.getAttribute("anchor")}set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?(e=li(this))==null?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(dE)}get radioGroupItems(){return this.items.filter(e=>e.role==="menuitemradio")}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,i;return(i=(e=this.checkedItems[0])==null?void 0:e.value)!=null?i:""}set value(e){let i=this.items.find(a=>a.value===e);i&&G(this,bs,Dd).call(this,i)}focus(){if(Oe(this,ai,or()),this.items.length){G(this,nn,ys).call(this,this.items[0]),this.items[0].focus();return}let e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');e==null||e.focus()}handleSelect(e){var i;let a=G(this,rn,Ts).call(this,e);a&&(G(this,bs,Dd).call(this,a,a.type==="checkbox"),$(this,xt)&&!this.hidden&&((i=$(this,ai))==null||i.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var i,a;let{key:r}=e,n=this.items,s=(a=(i=G(this,rn,Ts).call(this,e))!=null?i:G(this,xd,oh).call(this))!=null?a:n[0],d=n.indexOf(s),u=Math.max(0,d);r==="ArrowDown"?u++:r==="ArrowUp"?u--:e.key==="Home"?u=0:e.key==="End"&&(u=n.length-1),u<0&&(u=n.length-1),u>n.length-1&&(u=0),G(this,nn,ys).call(this,n[u]),n[u].focus()}};pt=new WeakMap;ai=new WeakMap;xt=new WeakMap;vs=new WeakMap;an=new WeakMap;xi=new WeakMap;on=new WeakMap;yd=new WeakSet;Qm=function(t){let e=t.target;for(let i of e.assignedNodes({flatten:!0}))i.nodeType===3&&i.textContent.trim()===""&&i.remove();["header","title"].includes(e.name)&&G(this,gs,Nd).call(this),e.name||$(this,_s).call(this)};gs=new WeakSet;Nd=function(){let t=this.shadowRoot.querySelector('slot[name="header"]'),e=this.shadowRoot.querySelector('slot[name="title"]');t.hidden=e.assignedNodes().length===0&&t.assignedNodes().length===0};_s=new WeakMap;Es=new WeakSet;kd=function(){var t;let e=this.shadowRoot.querySelector("#layout-row"),i=(t=getComputedStyle(this).getPropertyValue("--media-menu-layout"))==null?void 0:t.trim();e.setAttribute("media",i==="row"?"":"width:0")};Sd=new WeakSet;Xm=function(t){Oe(this,xt,t.relatedTarget),pe(this,t.relatedTarget)||(this.hidden=!this.hidden)};Id=new WeakSet;Jm=function(){var t;(t=$(this,xt))==null||t.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),Tt(ln(this),$(this,Aa)),Tt(this,$(this,Ta))};Md=new WeakSet;jm=function(){var t;(t=$(this,xt))==null||t.setAttribute("aria-expanded","false"),yt(ln(this),$(this,Aa)),yt(this,$(this,Ta))};Aa=new WeakMap;Ta=new WeakMap;ya=new WeakSet;sn=function(t){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;let{x:e,y:i}=Zm({anchor:this.anchorElement,floating:this,placement:"top-start"});t!=null||(t=this.offsetWidth);let r=ln(this).getBoundingClientRect(),n=r.width-e-t,s=r.height-i-this.offsetHeight,{style:d}=$(this,on);d.setProperty("position","absolute"),d.setProperty("right",`${Math.max(0,n)}px`),d.setProperty("--_menu-bottom",`${s}px`);let u=getComputedStyle(this),y=d.getPropertyValue("--_menu-bottom")===u.bottom?s:parseFloat(u.bottom),A=r.height-y-parseFloat(u.marginBottom);this.style.setProperty("--_menu-max-height",`${A}px`)};As=new WeakSet;Pd=function(t){let e=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=e==null?void 0:e.querySelector('[role="menu"]'),{style:a}=$(this,on);if(t||a.setProperty("--media-menu-transition-in","none"),i){let r=i.offsetHeight,n=Math.max(i.offsetWidth,e.offsetWidth);this.style.setProperty("min-width",`${n}px`),this.style.setProperty("min-height",`${r}px`),G(this,ya,sn).call(this,n)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),G(this,ya,sn).call(this);a.removeProperty("--media-menu-transition-in")};Ld=new WeakSet;eh=function(t){var e;if(t.stopPropagation(),t.composedPath().includes($(this,Ud,th))){(e=$(this,ai))==null||e.focus(),this.hidden=!0;return}let i=G(this,rn,Ts).call(this,t);!i||i.hasAttribute("disabled")||(G(this,nn,ys).call(this,i),this.handleSelect(t))};Ud=new WeakSet;th=function(){var t;return(t=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))==null?void 0:t.find(i=>i.matches('button[part~="back"]'))};Cd=new WeakSet;ih=function(t){if(t.target===this)return;G(this,Hd,ah).call(this);let e=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(let i of e)i.invokeTargetElement!=t.target&&t.newState=="open"&&i.getAttribute("aria-expanded")=="true"&&!i.invokeTargetElement.hidden&&i.invokeTargetElement.dispatchEvent(new ii({relatedTarget:i}));for(let i of e)i.setAttribute("aria-expanded",`${!i.submenuElement.hidden}`);G(this,As,Pd).call(this,!0)};Hd=new WeakSet;ah=function(){let e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)};wd=new WeakSet;rh=function(t){var e;pe(this,t.relatedTarget)||($(this,xi)&&((e=$(this,ai))==null||e.focus()),$(this,xt)&&$(this,xt)!==t.relatedTarget&&!this.hidden&&(this.hidden=!0))};Rd=new WeakSet;nh=function(t){var e,i,a,r,n;let{key:s,ctrlKey:d,altKey:u,metaKey:f}=t;if(!(d||u||f)&&this.keysUsed.includes(s))if(t.preventDefault(),t.stopPropagation(),s==="Tab"){if($(this,xi)){this.hidden=!0;return}t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()}else s==="Escape"?((n=$(this,ai))==null||n.focus(),$(this,xi)&&(this.hidden=!0)):s==="Enter"||s===" "?this.handleSelect(t):this.handleMove(t)};rn=new WeakSet;Ts=function(t){return t.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))};xd=new WeakSet;oh=function(){return this.items.find(t=>t.tabIndex===0)};nn=new WeakSet;ys=function(t){for(let e of this.items)e.tabIndex=e===t?0:-1};bs=new WeakSet;Dd=function(t,e){let i=[...this.checkedItems];t.type==="radio"&&this.radioGroupItems.forEach(a=>a.checked=!1),e?t.checked=!t.checked:t.checked=!0,this.checkedItems.some((a,r)=>a!=i[r])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};te.shadowRootOptions={mode:"open"};te.getTemplateHTML=lE;function dE(t){return["menuitem","menuitemradio","menuitemcheckbox"].includes(t==null?void 0:t.role)}function ln(t){var e;return(e=t.getAttribute("bounds")?Je(t,`#${t.getAttribute("bounds")}`):Y(t)||t.parentElement)!=null?e:t}l.customElements.get("media-chrome-menu")||l.customElements.define("media-chrome-menu",te);var Kd=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ge=(t,e,i)=>(Kd(t,e,"read from private field"),i?i.call(t):e.get(t)),Dt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Bd=(t,e,i,a)=>(Kd(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Sa=(t,e,i)=>(Kd(t,e,"access private method"),i),ks,un,$d,sh,Is,Gd,Yd,lh,vt,ka,Wd,Ss,Fd;function uE(t){return`
2974
2977
  <style>
2975
2978
  :host {
2976
2979
  transition: var(--media-menu-item-transition,
@@ -3088,7 +3091,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3088
3091
  ${this.getSuffixSlotInnerHTML(t)}
3089
3092
  </slot>
3090
3093
  <slot name="submenu"></slot>
3091
- `}function cE(t){return""}var Pe={TYPE:"type",VALUE:"value",CHECKED:"checked",DISABLED:"disabled"},Le=class extends l.HTMLElement{constructor(){if(super(),xt(this,$d),xt(this,Is),xt(this,Yd),xt(this,Ss),xt(this,ks,!1),xt(this,uo,void 0),xt(this,ft,()=>{var e,i;this.submenuElement.items&&this.setAttribute("submenusize",`${this.submenuElement.items.length}`);let a=this.shadowRoot.querySelector('slot[name="description"]'),r=(e=this.submenuElement.checkedItems)==null?void 0:e[0],o=(i=r==null?void 0:r.dataset.description)!=null?i:r==null?void 0:r.text,s=V.createElement("span");s.textContent=o!=null?o:"",a.replaceChildren(s)}),xt(this,ka,e=>{let{key:i}=e;if(!this.keysUsed.includes(i)){this.removeEventListener("keyup",ge(this,ka));return}this.handleClick(e)}),xt(this,Wd,e=>{let{metaKey:i,altKey:a,key:r}=e;if(i||a||!this.keysUsed.includes(r)){this.removeEventListener("keyup",ge(this,ka));return}this.addEventListener("keyup",ge(this,ka),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Pe.TYPE,Pe.DISABLED,Pe.CHECKED,Pe.VALUE]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),lo(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","false"),this.addEventListener("click",this),this.addEventListener("keydown",this)}disable(){this.removeAttribute("tabindex"),this.removeEventListener("click",this),this.removeEventListener("keydown",this),this.removeEventListener("keyup",this)}handleEvent(e){switch(e.type){case"slotchange":Sa(this,$d,sh).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":ge(this,Wd).call(this,e);break;case"keyup":ge(this,ka).call(this,e);break}}attributeChangedCallback(e,i,a){e===Pe.CHECKED&&lo(this)&&!ge(this,ks)?this.setAttribute("aria-checked",a!=null?"true":"false"):e===Pe.TYPE&&a!==i?this.role="menuitem"+a:e===Pe.DISABLED&&a!==i&&(a==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(Pe.DISABLED)||this.enable(),this.role="menuitem"+this.type,Bd(this,uo,Vd(this,this.parentNode)),Sa(this,Ss,Fd).call(this),this.submenuElement&&Sa(this,Is,Gd).call(this),this.shadowRoot.addEventListener("slotchange",this)}disconnectedCallback(){this.disable(),Sa(this,Ss,Fd).call(this),Bd(this,uo,null),this.shadowRoot.removeEventListener("slotchange",this)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=li(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):this.submenuElement}get submenuElement(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}get type(){var e;return(e=this.getAttribute(Pe.TYPE))!=null?e:""}set type(e){this.setAttribute(Pe.TYPE,`${e}`)}get value(){var e;return(e=this.getAttribute(Pe.VALUE))!=null?e:this.text}set value(e){this.setAttribute(Pe.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get checked(){if(lo(this))return this.getAttribute("aria-checked")==="true"}set checked(e){lo(this)&&(Bd(this,ks,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){lo(this)||this.invokeTargetElement&&he(this,e.target)&&this.invokeTargetElement.dispatchEvent(new ti({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}};ks=new WeakMap;uo=new WeakMap;$d=new WeakSet;sh=function(t){let e=t.target;if(!(e!=null&&e.name))for(let a of e.assignedNodes({flatten:!0}))a instanceof Text&&a.textContent.trim()===""&&a.remove();e.name==="submenu"&&(this.submenuElement?Sa(this,Is,Gd).call(this):Sa(this,Yd,lh).call(this))};Is=new WeakSet;Gd=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",ge(this,ft)),this.submenuElement.addEventListener("addmenuitem",ge(this,ft)),this.submenuElement.addEventListener("removemenuitem",ge(this,ft)),ge(this,ft).call(this)};Yd=new WeakSet;lh=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",ge(this,ft)),this.submenuElement.removeEventListener("addmenuitem",ge(this,ft)),this.submenuElement.removeEventListener("removemenuitem",ge(this,ft)),ge(this,ft).call(this)};ft=new WeakMap;ka=new WeakMap;Wd=new WeakMap;Ss=new WeakSet;Fd=function(){var t;let e=(t=ge(this,uo))==null?void 0:t.radioGroupItems;if(!e)return;let i=e.filter(a=>a.getAttribute("aria-checked")==="true").pop();i||(i=e[0]);for(let a of e)a.setAttribute("aria-checked","false");i==null||i.setAttribute("aria-checked","true")};Le.shadowRootOptions={mode:"open"};Le.getTemplateHTML=uE;Le.getSuffixSlotInnerHTML=cE;function lo(t){return t.type==="radio"||t.type==="checkbox"}function Vd(t,e){if(!t)return null;let{host:i}=t.getRootNode();return!e&&i?Vd(t,i):e!=null&&e.items?e:Vd(e,e==null?void 0:e.parentNode)}l.customElements.get("media-chrome-menu-item")||l.customElements.define("media-chrome-menu-item",Le);function mE(t){return`
3094
+ `}function cE(t){return""}var Ne={TYPE:"type",VALUE:"value",CHECKED:"checked",DISABLED:"disabled"},Le=class extends l.HTMLElement{constructor(){if(super(),Dt(this,$d),Dt(this,Is),Dt(this,Yd),Dt(this,Ss),Dt(this,ks,!1),Dt(this,un,void 0),Dt(this,vt,()=>{var e,i;this.submenuElement.items&&this.setAttribute("submenusize",`${this.submenuElement.items.length}`);let a=this.shadowRoot.querySelector('slot[name="description"]'),r=(e=this.submenuElement.checkedItems)==null?void 0:e[0],n=(i=r==null?void 0:r.dataset.description)!=null?i:r==null?void 0:r.text,s=V.createElement("span");s.textContent=n!=null?n:"",a.replaceChildren(s)}),Dt(this,ka,e=>{let{key:i}=e;if(!this.keysUsed.includes(i)){this.removeEventListener("keyup",ge(this,ka));return}this.handleClick(e)}),Dt(this,Wd,e=>{let{metaKey:i,altKey:a,key:r}=e;if(i||a||!this.keysUsed.includes(r)){this.removeEventListener("keyup",ge(this,ka));return}this.addEventListener("keyup",ge(this,ka),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=Z(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Ne.TYPE,Ne.DISABLED,Ne.CHECKED,Ne.VALUE]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),dn(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","false"),this.addEventListener("click",this),this.addEventListener("keydown",this)}disable(){this.removeAttribute("tabindex"),this.removeEventListener("click",this),this.removeEventListener("keydown",this),this.removeEventListener("keyup",this)}handleEvent(e){switch(e.type){case"slotchange":Sa(this,$d,sh).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":ge(this,Wd).call(this,e);break;case"keyup":ge(this,ka).call(this,e);break}}attributeChangedCallback(e,i,a){e===Ne.CHECKED&&dn(this)&&!ge(this,ks)?this.setAttribute("aria-checked",a!=null?"true":"false"):e===Ne.TYPE&&a!==i?this.role="menuitem"+a:e===Ne.DISABLED&&a!==i&&(a==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(Ne.DISABLED)||this.enable(),this.role="menuitem"+this.type,Bd(this,un,Vd(this,this.parentNode)),Sa(this,Ss,Fd).call(this),this.submenuElement&&Sa(this,Is,Gd).call(this),this.shadowRoot.addEventListener("slotchange",this)}disconnectedCallback(){this.disable(),Sa(this,Ss,Fd).call(this),Bd(this,un,null),this.shadowRoot.removeEventListener("slotchange",this)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=li(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):this.submenuElement}get submenuElement(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}get type(){var e;return(e=this.getAttribute(Ne.TYPE))!=null?e:""}set type(e){this.setAttribute(Ne.TYPE,`${e}`)}get value(){var e;return(e=this.getAttribute(Ne.VALUE))!=null?e:this.text}set value(e){this.setAttribute(Ne.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get checked(){if(dn(this))return this.getAttribute("aria-checked")==="true"}set checked(e){dn(this)&&(Bd(this,ks,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){dn(this)||this.invokeTargetElement&&pe(this,e.target)&&this.invokeTargetElement.dispatchEvent(new ii({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}};ks=new WeakMap;un=new WeakMap;$d=new WeakSet;sh=function(t){let e=t.target;if(!(e!=null&&e.name))for(let a of e.assignedNodes({flatten:!0}))a instanceof Text&&a.textContent.trim()===""&&a.remove();e.name==="submenu"&&(this.submenuElement?Sa(this,Is,Gd).call(this):Sa(this,Yd,lh).call(this))};Is=new WeakSet;Gd=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",ge(this,vt)),this.submenuElement.addEventListener("addmenuitem",ge(this,vt)),this.submenuElement.addEventListener("removemenuitem",ge(this,vt)),ge(this,vt).call(this)};Yd=new WeakSet;lh=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",ge(this,vt)),this.submenuElement.removeEventListener("addmenuitem",ge(this,vt)),this.submenuElement.removeEventListener("removemenuitem",ge(this,vt)),ge(this,vt).call(this)};vt=new WeakMap;ka=new WeakMap;Wd=new WeakMap;Ss=new WeakSet;Fd=function(){var t;let e=(t=ge(this,un))==null?void 0:t.radioGroupItems;if(!e)return;let i=e.filter(a=>a.getAttribute("aria-checked")==="true").pop();i||(i=e[0]);for(let a of e)a.setAttribute("aria-checked","false");i==null||i.setAttribute("aria-checked","true")};Le.shadowRootOptions={mode:"open"};Le.getTemplateHTML=uE;Le.getSuffixSlotInnerHTML=cE;function dn(t){return t.type==="radio"||t.type==="checkbox"}function Vd(t,e){if(!t)return null;let{host:i}=t.getRootNode();return!e&&i?Vd(t,i):e!=null&&e.items?e:Vd(e,e==null?void 0:e.parentNode)}l.customElements.get("media-chrome-menu-item")||l.customElements.define("media-chrome-menu-item",Le);function mE(t){return`
3092
3095
  ${te.getTemplateHTML(t)}
3093
3096
  <style>
3094
3097
  :host {
@@ -3123,7 +3126,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3123
3126
  --media-settings-menu-item-opacity: 0;
3124
3127
  }
3125
3128
  </style>
3126
- `}var co=class extends te{get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Y(this).querySelector("media-settings-menu-button")}};co.getTemplateHTML=mE;l.customElements.get("media-settings-menu")||l.customElements.define("media-settings-menu",co);function hE(t){return`
3129
+ `}var cn=class extends te{get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Y(this).querySelector("media-settings-menu-button")}};cn.getTemplateHTML=mE;l.customElements.get("media-settings-menu")||l.customElements.define("media-settings-menu",cn);function hE(t){return`
3127
3130
  ${Le.getTemplateHTML.call(this,t)}
3128
3131
  <style>
3129
3132
  slot:not([name="submenu"]) {
@@ -3138,7 +3141,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3138
3141
  <svg aria-hidden="true" viewBox="0 0 20 24">
3139
3142
  <path d="m8.12 17.585-.742-.669 4.2-4.665-4.2-4.666.743-.669 4.803 5.335-4.803 5.334Z"/>
3140
3143
  </svg>
3141
- `}var Di=class extends Le{};Di.shadowRootOptions={mode:"open"};Di.getTemplateHTML=hE;Di.getSuffixSlotInnerHTML=pE;l.customElements.get("media-settings-menu-item")||l.customElements.define("media-settings-menu-item",Di);var ye=class extends B{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=li(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;(e=this.invokeTargetElement)==null||e.dispatchEvent(new ti({relatedTarget:this}))}};l.customElements.get("media-chrome-menu-button")||l.customElements.define("media-chrome-menu-button",ye);function fE(){return`
3144
+ `}var Di=class extends Le{};Di.shadowRootOptions={mode:"open"};Di.getTemplateHTML=hE;Di.getSuffixSlotInnerHTML=pE;l.customElements.get("media-settings-menu-item")||l.customElements.define("media-settings-menu-item",Di);var ye=class extends B{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=li(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;(e=this.invokeTargetElement)==null||e.dispatchEvent(new ii({relatedTarget:this}))}};l.customElements.get("media-chrome-menu-button")||l.customElements.define("media-chrome-menu-button",ye);function fE(){return`
3142
3145
  <style>
3143
3146
  :host([aria-expanded="true"]) slot[name=tooltip] {
3144
3147
  display: none;
@@ -3149,7 +3152,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3149
3152
  <path d="M4.5 14.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"/>
3150
3153
  </svg>
3151
3154
  </slot>
3152
- `}function vE(){return c("Settings")}var Ia=class extends ye{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",c("settings"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Y(this).querySelector("media-settings-menu")}};Ia.getSlotTemplateHTML=fE;Ia.getTooltipContentHTML=vE;l.customElements.get("media-settings-menu-button")||l.customElements.define("media-settings-menu-button",Ia);var Qd=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},dh=(t,e,i)=>(Qd(t,e,"read from private field"),i?i.call(t):e.get(t)),Ms=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},qd=(t,e,i,a)=>(Qd(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ls=(t,e,i)=>(Qd(t,e,"access private method"),i),mo,Rs,Cs,Zd,ws,zd,xs=class extends te{constructor(){super(...arguments),Ms(this,Cs),Ms(this,ws),Ms(this,mo,[]),Ms(this,Rs,void 0)}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_AUDIO_TRACK_LIST,n.MEDIA_AUDIO_TRACK_ENABLED,n.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_AUDIO_TRACK_ENABLED&&i!==a?this.value=a:e===n.MEDIA_AUDIO_TRACK_LIST&&i!==a&&(qd(this,mo,Uu(a!=null?a:"")),Ls(this,Cs,Zd).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Ls(this,ws,zd))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Ls(this,ws,zd))}get anchorElement(){var e;return this.anchor!=="auto"?super.anchorElement:(e=Y(this))==null?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return dh(this,mo)}set mediaAudioTrackList(e){qd(this,mo,e),Ls(this,Cs,Zd).call(this)}get mediaAudioTrackEnabled(){var e;return(e=x(this,n.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){w(this,n.MEDIA_AUDIO_TRACK_ENABLED,e)}};mo=new WeakMap;Rs=new WeakMap;Cs=new WeakSet;Zd=function(){if(dh(this,Rs)===JSON.stringify(this.mediaAudioTrackList))return;qd(this,Rs,JSON.stringify(this.mediaAudioTrackList));let t=this.mediaAudioTrackList;this.defaultSlot.textContent="",t.sort((e,i)=>e.id.localeCompare(i.id,void 0,{numeric:!0}));for(let e of t){let i=this.formatMenuItemText(e.label,e),a=pt({type:"radio",text:i,value:`${e.id}`,checked:e.enabled});a.prepend(ze(this,"checked-indicator")),this.defaultSlot.append(a)}};ws=new WeakSet;zd=function(){if(this.value==null)return;let t=new l.CustomEvent(h.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};l.customElements.get("media-audio-track-menu")||l.customElements.define("media-audio-track-menu",xs);var EE=`<svg aria-hidden="true" viewBox="0 0 24 24">
3155
+ `}function vE(){return c("Settings")}var Ia=class extends ye{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",c("settings"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Y(this).querySelector("media-settings-menu")}};Ia.getSlotTemplateHTML=fE;Ia.getTooltipContentHTML=vE;l.customElements.get("media-settings-menu-button")||l.customElements.define("media-settings-menu-button",Ia);var Qd=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},dh=(t,e,i)=>(Qd(t,e,"read from private field"),i?i.call(t):e.get(t)),Ms=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},qd=(t,e,i,a)=>(Qd(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ls=(t,e,i)=>(Qd(t,e,"access private method"),i),mn,Rs,Cs,Zd,ws,zd,xs=class extends te{constructor(){super(...arguments),Ms(this,Cs),Ms(this,ws),Ms(this,mn,[]),Ms(this,Rs,void 0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AUDIO_TRACK_LIST,o.MEDIA_AUDIO_TRACK_ENABLED,o.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===o.MEDIA_AUDIO_TRACK_ENABLED&&i!==a?this.value=a:e===o.MEDIA_AUDIO_TRACK_LIST&&i!==a&&(qd(this,mn,Uu(a!=null?a:"")),Ls(this,Cs,Zd).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Ls(this,ws,zd))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Ls(this,ws,zd))}get anchorElement(){var e;return this.anchor!=="auto"?super.anchorElement:(e=Y(this))==null?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return dh(this,mn)}set mediaAudioTrackList(e){qd(this,mn,e),Ls(this,Cs,Zd).call(this)}get mediaAudioTrackEnabled(){var e;return(e=x(this,o.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){w(this,o.MEDIA_AUDIO_TRACK_ENABLED,e)}};mn=new WeakMap;Rs=new WeakMap;Cs=new WeakSet;Zd=function(){if(dh(this,Rs)===JSON.stringify(this.mediaAudioTrackList))return;qd(this,Rs,JSON.stringify(this.mediaAudioTrackList));let t=this.mediaAudioTrackList;this.defaultSlot.textContent="",t.sort((e,i)=>e.id.localeCompare(i.id,void 0,{numeric:!0}));for(let e of t){let i=this.formatMenuItemText(e.label,e),a=ft({type:"radio",text:i,value:`${e.id}`,checked:e.enabled});a.prepend(ze(this,"checked-indicator")),this.defaultSlot.append(a)}};ws=new WeakSet;zd=function(){if(this.value==null)return;let t=new l.CustomEvent(h.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};l.customElements.get("media-audio-track-menu")||l.customElements.define("media-audio-track-menu",xs);var EE=`<svg aria-hidden="true" viewBox="0 0 24 24">
3153
3156
  <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>
3154
3157
  <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"/>
3155
3158
  </svg>`;function bE(){return`
@@ -3159,13 +3162,13 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3159
3162
  }
3160
3163
  </style>
3161
3164
  <slot name="icon">${EE}</slot>
3162
- `}function gE(){return c("Audio")}var uh=t=>{let e=c("Audio");t.setAttribute("aria-label",e)},Ma=class extends ye{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_AUDIO_TRACK_ENABLED,n.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),uh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_LANG&&uh(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Y(this))==null?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return(e=x(this,n.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){w(this,n.MEDIA_AUDIO_TRACK_ENABLED,e)}};Ma.getSlotTemplateHTML=bE;Ma.getTooltipContentHTML=gE;l.customElements.get("media-audio-track-menu-button")||l.customElements.define("media-audio-track-menu-button",Ma);var eu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},_E=(t,e,i)=>(eu(t,e,"read from private field"),i?i.call(t):e.get(t)),Xd=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},AE=(t,e,i,a)=>(eu(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ds=(t,e,i)=>(eu(t,e,"access private method"),i),Ns,Os,Jd,Ps,jd,TE=`
3165
+ `}function gE(){return c("Audio")}var uh=t=>{let e=c("Audio");t.setAttribute("aria-label",e)},Ma=class extends ye{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_AUDIO_TRACK_ENABLED,o.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),uh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===o.MEDIA_LANG&&uh(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Y(this))==null?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return(e=x(this,o.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){w(this,o.MEDIA_AUDIO_TRACK_ENABLED,e)}};Ma.getSlotTemplateHTML=bE;Ma.getTooltipContentHTML=gE;l.customElements.get("media-audio-track-menu-button")||l.customElements.define("media-audio-track-menu-button",Ma);var eu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},_E=(t,e,i)=>(eu(t,e,"read from private field"),i?i.call(t):e.get(t)),Xd=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},AE=(t,e,i,a)=>(eu(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ds=(t,e,i)=>(eu(t,e,"access private method"),i),Ps,Os,Jd,Ns,jd,TE=`
3163
3166
  <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator">
3164
3167
  <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"/>
3165
3168
  </svg>`;function yE(t){return`
3166
3169
  ${te.getTemplateHTML(t)}
3167
3170
  <slot name="captions-indicator" hidden>${TE}</slot>
3168
- `}var ho=class extends te{constructor(){super(...arguments),Xd(this,Os),Xd(this,Ps),Xd(this,Ns,void 0)}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_SUBTITLES_LIST,n.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_SUBTITLES_LIST&&i!==a?Ds(this,Os,Jd).call(this):e===n.MEDIA_SUBTITLES_SHOWING&&i!==a&&(this.value=a||"",Ds(this,Os,Jd).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Ds(this,Ps,jd))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Ds(this,Ps,jd))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Y(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return ch(this,n.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){mh(this,n.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return ch(this,n.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){mh(this,n.MEDIA_SUBTITLES_SHOWING,e)}};Ns=new WeakMap;Os=new WeakSet;Jd=function(){var t;let e=_E(this,Ns)!==JSON.stringify(this.mediaSubtitlesList),i=this.value!==this.getAttribute(n.MEDIA_SUBTITLES_SHOWING);if(!e&&!i)return;AE(this,Ns,JSON.stringify(this.mediaSubtitlesList)),this.defaultSlot.textContent="";let a=!this.value,r=pt({type:"radio",text:this.formatMenuItemText(c("Off")),value:"off",checked:a});r.prepend(ze(this,"checked-indicator")),this.defaultSlot.append(r);let o=this.mediaSubtitlesList;for(let s of o){let d=pt({type:"radio",text:this.formatMenuItemText(s.label,s),value:Yo(s),checked:this.value==Yo(s)});d.prepend(ze(this,"checked-indicator")),((t=s.kind)!=null?t:"subs")==="captions"&&d.append(ze(this,"captions-indicator")),this.defaultSlot.append(d)}};Ps=new WeakSet;jd=function(){let t=this.mediaSubtitlesShowing,e=this.getAttribute(n.MEDIA_SUBTITLES_SHOWING),i=this.value!==e;if(t!=null&&t.length&&i&&this.dispatchEvent(new l.CustomEvent(h.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:t})),!this.value||!i)return;let a=new l.CustomEvent(h.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)};ho.getTemplateHTML=yE;var ch=(t,e)=>{let i=t.getAttribute(e);return i?ci(i):[]},mh=(t,e,i)=>{if(!(i!=null&&i.length)){t.removeAttribute(e);return}let a=kt(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};l.customElements.get("media-captions-menu")||l.customElements.define("media-captions-menu",ho);var kE=`<svg aria-hidden="true" viewBox="0 0 26 24">
3171
+ `}var hn=class extends te{constructor(){super(...arguments),Xd(this,Os),Xd(this,Ns),Xd(this,Ps,void 0)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===o.MEDIA_SUBTITLES_LIST&&i!==a?Ds(this,Os,Jd).call(this):e===o.MEDIA_SUBTITLES_SHOWING&&i!==a&&(this.value=a||"",Ds(this,Os,Jd).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Ds(this,Ns,jd))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Ds(this,Ns,jd))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Y(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return ch(this,o.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){mh(this,o.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return ch(this,o.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){mh(this,o.MEDIA_SUBTITLES_SHOWING,e)}};Ps=new WeakMap;Os=new WeakSet;Jd=function(){var t;let e=_E(this,Ps)!==JSON.stringify(this.mediaSubtitlesList),i=this.value!==this.getAttribute(o.MEDIA_SUBTITLES_SHOWING);if(!e&&!i)return;AE(this,Ps,JSON.stringify(this.mediaSubtitlesList)),this.defaultSlot.textContent="";let a=!this.value,r=ft({type:"radio",text:this.formatMenuItemText(c("Off")),value:"off",checked:a});r.prepend(ze(this,"checked-indicator")),this.defaultSlot.append(r);let n=this.mediaSubtitlesList;for(let s of n){let d=ft({type:"radio",text:this.formatMenuItemText(s.label,s),value:Yn(s),checked:this.value==Yn(s)});d.prepend(ze(this,"checked-indicator")),((t=s.kind)!=null?t:"subs")==="captions"&&d.append(ze(this,"captions-indicator")),this.defaultSlot.append(d)}};Ns=new WeakSet;jd=function(){let t=this.mediaSubtitlesShowing,e=this.getAttribute(o.MEDIA_SUBTITLES_SHOWING),i=this.value!==e;if(t!=null&&t.length&&i&&this.dispatchEvent(new l.CustomEvent(h.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:t})),!this.value||!i)return;let a=new l.CustomEvent(h.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)};hn.getTemplateHTML=yE;var ch=(t,e)=>{let i=t.getAttribute(e);return i?ci(i):[]},mh=(t,e,i)=>{if(!(i!=null&&i.length)){t.removeAttribute(e);return}let a=St(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};l.customElements.get("media-captions-menu")||l.customElements.define("media-captions-menu",hn);var kE=`<svg aria-hidden="true" viewBox="0 0 26 24">
3169
3172
  <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"/>
3170
3173
  </svg>`,SE=`<svg aria-hidden="true" viewBox="0 0 26 24">
3171
3174
  <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"/>
@@ -3189,7 +3192,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3189
3192
  <slot name="on">${kE}</slot>
3190
3193
  <slot name="off">${SE}</slot>
3191
3194
  </slot>
3192
- `}function ME(){return c("Captions")}var hh=t=>{t.setAttribute("data-captions-enabled",qo(t).toString())},ph=t=>{t.setAttribute("aria-label",c("closed captions"))},La=class extends ye{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_SUBTITLES_LIST,n.MEDIA_SUBTITLES_SHOWING,n.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),ph(this),hh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_SUBTITLES_SHOWING?hh(this):e===n.MEDIA_LANG&&ph(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Y(this))==null?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return fh(this,n.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){vh(this,n.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return fh(this,n.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){vh(this,n.MEDIA_SUBTITLES_SHOWING,e)}};La.getSlotTemplateHTML=IE;La.getTooltipContentHTML=ME;var fh=(t,e)=>{let i=t.getAttribute(e);return i?ci(i):[]},vh=(t,e,i)=>{if(!(i!=null&&i.length)){t.removeAttribute(e);return}let a=kt(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};l.customElements.get("media-captions-menu-button")||l.customElements.define("media-captions-menu-button",La);var Eh=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},wa=(t,e,i)=>(Eh(t,e,"read from private field"),i?i.call(t):e.get(t)),tu=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ca=(t,e,i)=>(Eh(t,e,"access private method"),i),ai,Ra,po,Us,au,iu={RATES:"rates"},Hs=class extends te{constructor(){super(),tu(this,Ra),tu(this,Us),tu(this,ai,new Wt(this,iu.RATES,{defaultValue:Fl})),Ca(this,Ra,po).call(this)}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PLAYBACK_RATE,iu.RATES]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_PLAYBACK_RATE&&i!=a?(this.value=a,Ca(this,Ra,po).call(this)):e===iu.RATES&&i!=a&&(wa(this,ai).value=a,Ca(this,Ra,po).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Ca(this,Us,au))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Ca(this,Us,au))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Y(this).querySelector("media-playback-rate-menu-button")}get rates(){return wa(this,ai)}set rates(e){e?Array.isArray(e)?wa(this,ai).value=e.join(" "):typeof e=="string"&&(wa(this,ai).value=e):wa(this,ai).value="",Ca(this,Ra,po).call(this)}get mediaPlaybackRate(){return P(this,n.MEDIA_PLAYBACK_RATE,gi)}set mediaPlaybackRate(e){U(this,n.MEDIA_PLAYBACK_RATE,e)}};ai=new WeakMap;Ra=new WeakSet;po=function(){this.defaultSlot.textContent="";let t=this.mediaPlaybackRate,e=new Set(Array.from(wa(this,ai)).map(a=>Number(a)));t>0&&!e.has(t)&&e.add(t);let i=Array.from(e).sort((a,r)=>a-r);for(let a of i){let r=pt({type:"radio",text:this.formatMenuItemText(`${a}x`,a),value:a.toString(),checked:t===a});r.prepend(ze(this,"checked-indicator")),this.defaultSlot.append(r)}};Us=new WeakSet;au=function(){if(!this.value)return;let t=new l.CustomEvent(h.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};l.customElements.get("media-playback-rate-menu")||l.customElements.define("media-playback-rate-menu",Hs);var Bs=1;function LE(t){return`
3195
+ `}function ME(){return c("Captions")}var hh=t=>{t.setAttribute("data-captions-enabled",qn(t).toString())},ph=t=>{t.setAttribute("aria-label",c("closed captions"))},La=class extends ye{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_SUBTITLES_LIST,o.MEDIA_SUBTITLES_SHOWING,o.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),ph(this),hh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===o.MEDIA_SUBTITLES_SHOWING?hh(this):e===o.MEDIA_LANG&&ph(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Y(this))==null?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return fh(this,o.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){vh(this,o.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return fh(this,o.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){vh(this,o.MEDIA_SUBTITLES_SHOWING,e)}};La.getSlotTemplateHTML=IE;La.getTooltipContentHTML=ME;var fh=(t,e)=>{let i=t.getAttribute(e);return i?ci(i):[]},vh=(t,e,i)=>{if(!(i!=null&&i.length)){t.removeAttribute(e);return}let a=St(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};l.customElements.get("media-captions-menu-button")||l.customElements.define("media-captions-menu-button",La);var Eh=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},wa=(t,e,i)=>(Eh(t,e,"read from private field"),i?i.call(t):e.get(t)),tu=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ca=(t,e,i)=>(Eh(t,e,"access private method"),i),ri,Ra,pn,Us,au,iu={RATES:"rates"},Hs=class extends te{constructor(){super(),tu(this,Ra),tu(this,Us),tu(this,ri,new Ft(this,iu.RATES,{defaultValue:Fl})),Ca(this,Ra,pn).call(this)}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PLAYBACK_RATE,iu.RATES]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===o.MEDIA_PLAYBACK_RATE&&i!=a?(this.value=a,Ca(this,Ra,pn).call(this)):e===iu.RATES&&i!=a&&(wa(this,ri).value=a,Ca(this,Ra,pn).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Ca(this,Us,au))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Ca(this,Us,au))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Y(this).querySelector("media-playback-rate-menu-button")}get rates(){return wa(this,ri)}set rates(e){e?Array.isArray(e)?wa(this,ri).value=e.join(" "):typeof e=="string"&&(wa(this,ri).value=e):wa(this,ri).value="",Ca(this,Ra,pn).call(this)}get mediaPlaybackRate(){return N(this,o.MEDIA_PLAYBACK_RATE,gi)}set mediaPlaybackRate(e){U(this,o.MEDIA_PLAYBACK_RATE,e)}};ri=new WeakMap;Ra=new WeakSet;pn=function(){this.defaultSlot.textContent="";let t=this.mediaPlaybackRate,e=new Set(Array.from(wa(this,ri)).map(a=>Number(a)));t>0&&!e.has(t)&&e.add(t);let i=Array.from(e).sort((a,r)=>a-r);for(let a of i){let r=ft({type:"radio",text:this.formatMenuItemText(`${a}x`,a),value:a.toString(),checked:t===a});r.prepend(ze(this,"checked-indicator")),this.defaultSlot.append(r)}};Us=new WeakSet;au=function(){if(!this.value)return;let t=new l.CustomEvent(h.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};l.customElements.get("media-playback-rate-menu")||l.customElements.define("media-playback-rate-menu",Hs);var Bs=1;function LE(t){return`
3193
3196
  <style>
3194
3197
  :host {
3195
3198
  min-width: 5ch;
@@ -3205,7 +3208,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3205
3208
  }
3206
3209
  </style>
3207
3210
  <slot name="icon">${t.mediaplaybackrate||Bs}x</slot>
3208
- `}function CE(){return c("Playback rate")}var xa=class extends ye{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${(e=this.mediaPlaybackRate)!=null?e:Bs}x`}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),e===n.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,o=Number.isNaN(r)?Bs:r;this.container.innerHTML=`${o}x`,this.setAttribute("aria-label",c("Playback rate {playbackRate}",{playbackRate:o}))}}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Y(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return P(this,n.MEDIA_PLAYBACK_RATE,Bs)}set mediaPlaybackRate(e){U(this,n.MEDIA_PLAYBACK_RATE,e)}};xa.getSlotTemplateHTML=LE;xa.getTooltipContentHTML=CE;l.customElements.get("media-playback-rate-menu-button")||l.customElements.define("media-playback-rate-menu-button",xa);var ou=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Dt=(t,e,i)=>(ou(t,e,"read from private field"),i?i.call(t):e.get(t)),$s=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},bh=(t,e,i,a)=>(ou(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Da=(t,e,i)=>(ou(t,e,"access private method"),i),fo,vt,Oa,vo,Ws,ru,Fs=class extends te{constructor(){super(...arguments),$s(this,Oa),$s(this,Ws),$s(this,fo,[]),$s(this,vt,{})}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_RENDITION_LIST,n.MEDIA_RENDITION_SELECTED,n.MEDIA_RENDITION_UNAVAILABLE,n.MEDIA_HEIGHT,n.MEDIA_WIDTH]}static formatMenuItemText(e,i){return super.formatMenuItemText(e,i)}static formatRendition(e,{showBitrate:i=!1}={}){let a=`${Math.min(e.width,e.height)}p`;if(i&&e.bitrate){let r=e.bitrate/1e6,o=`${r.toFixed(r<1?1:0)} Mbps`;return`${a} (${o})`}return this.formatMenuItemText(a,e)}static compareRendition(e,i){var a,r;return i.height===e.height?((a=i.bitrate)!=null?a:0)-((r=e.bitrate)!=null?r:0):i.height-e.height}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),i!==a)switch(e){case n.MEDIA_RENDITION_SELECTED:this.value=a!=null?a:"auto",Da(this,Oa,vo).call(this);break;case n.MEDIA_RENDITION_LIST:bh(this,fo,Pu(a)),Da(this,Oa,vo).call(this);break;case n.MEDIA_HEIGHT:case n.MEDIA_WIDTH:Da(this,Oa,vo).call(this);break}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Da(this,Ws,ru))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Da(this,Ws,ru))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Y(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return Dt(this,fo)}set mediaRenditionList(e){bh(this,fo,e),Da(this,Oa,vo).call(this)}get mediaRenditionSelected(){return x(this,n.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){w(this,n.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return P(this,n.MEDIA_HEIGHT)}set mediaHeight(e){U(this,n.MEDIA_HEIGHT,e)}get mediaWidth(){return P(this,n.MEDIA_WIDTH)}set mediaWidth(e){U(this,n.MEDIA_WIDTH,e)}compareRendition(e,i){return this.constructor.compareRendition(e,i)}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}formatRendition(e,i){return this.constructor.formatRendition(e,i)}showRenditionBitrate(e){return this.mediaRenditionList.some(i=>i!==e&&i.height===e.height&&i.bitrate!==e.bitrate)}};fo=new WeakMap;vt=new WeakMap;Oa=new WeakSet;vo=function(){let t=!this.mediaRenditionSelected;if(Dt(this,vt).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&Dt(this,vt).mediaHeight===this.mediaHeight&&Dt(this,vt).mediaWidth===this.mediaWidth&&Dt(this,vt).isAuto===t)return;Dt(this,vt).mediaRenditionList=JSON.stringify(this.mediaRenditionList),Dt(this,vt).mediaHeight=this.mediaHeight,Dt(this,vt).mediaWidth=this.mediaWidth,Dt(this,vt).isAuto=t;let e=this.mediaRenditionList.sort(this.compareRendition.bind(this)),i=e.find(s=>s.id===this.mediaRenditionSelected);for(let s of e)s.selected=s===i;this.defaultSlot.textContent="";for(let s of e){let d=this.formatRendition(s,{showBitrate:this.showRenditionBitrate(s)}),u=pt({type:"radio",text:d,value:`${s.id}`,checked:s.selected&&!t});u.prepend(ze(this,"checked-indicator")),this.defaultSlot.append(u)}let a=i&&this.showRenditionBitrate(i),r;t&&(i?r=this.formatMenuItemText(`${c("Auto")} \u2022 ${this.formatRendition(i,{showBitrate:a})}`,i):this.mediaHeight>0&&this.mediaWidth>0&&(r=this.formatMenuItemText(`${c("Auto")} (${Math.min(this.mediaWidth,this.mediaHeight)}p)`))),r||(r=this.formatMenuItemText(c("Auto")));let o=pt({type:"radio",text:r,value:"auto",checked:t});o.dataset.description=r,o.prepend(ze(this,"checked-indicator")),this.defaultSlot.append(o)};Ws=new WeakSet;ru=function(){if(this.value==null)return;let t=new l.CustomEvent(h.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};l.customElements.get("media-rendition-menu")||l.customElements.define("media-rendition-menu",Fs);var wE=`<svg aria-hidden="true" viewBox="0 0 24 24">
3211
+ `}function CE(){return c("Playback rate")}var xa=class extends ye{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${(e=this.mediaPlaybackRate)!=null?e:Bs}x`}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),e===o.MEDIA_PLAYBACK_RATE){let r=a?+a:Number.NaN,n=Number.isNaN(r)?Bs:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",c("Playback rate {playbackRate}",{playbackRate:n}))}}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Y(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return N(this,o.MEDIA_PLAYBACK_RATE,Bs)}set mediaPlaybackRate(e){U(this,o.MEDIA_PLAYBACK_RATE,e)}};xa.getSlotTemplateHTML=LE;xa.getTooltipContentHTML=CE;l.customElements.get("media-playback-rate-menu-button")||l.customElements.define("media-playback-rate-menu-button",xa);var nu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ot=(t,e,i)=>(nu(t,e,"read from private field"),i?i.call(t):e.get(t)),$s=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},bh=(t,e,i,a)=>(nu(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Da=(t,e,i)=>(nu(t,e,"access private method"),i),fn,Et,Oa,vn,Ws,ru,Fs=class extends te{constructor(){super(...arguments),$s(this,Oa),$s(this,Ws),$s(this,fn,[]),$s(this,Et,{})}static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_LIST,o.MEDIA_RENDITION_SELECTED,o.MEDIA_RENDITION_UNAVAILABLE,o.MEDIA_HEIGHT,o.MEDIA_WIDTH]}static formatMenuItemText(e,i){return super.formatMenuItemText(e,i)}static formatRendition(e,{showBitrate:i=!1}={}){let a=`${Math.min(e.width,e.height)}p`;if(i&&e.bitrate){let r=e.bitrate/1e6,n=`${r.toFixed(r<1?1:0)} Mbps`;return`${a} (${n})`}return this.formatMenuItemText(a,e)}static compareRendition(e,i){var a,r;return i.height===e.height?((a=i.bitrate)!=null?a:0)-((r=e.bitrate)!=null?r:0):i.height-e.height}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),i!==a)switch(e){case o.MEDIA_RENDITION_SELECTED:this.value=a!=null?a:"auto",Da(this,Oa,vn).call(this);break;case o.MEDIA_RENDITION_LIST:bh(this,fn,Nu(a)),Da(this,Oa,vn).call(this);break;case o.MEDIA_HEIGHT:case o.MEDIA_WIDTH:Da(this,Oa,vn).call(this);break}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Da(this,Ws,ru))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Da(this,Ws,ru))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Y(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return Ot(this,fn)}set mediaRenditionList(e){bh(this,fn,e),Da(this,Oa,vn).call(this)}get mediaRenditionSelected(){return x(this,o.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){w(this,o.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return N(this,o.MEDIA_HEIGHT)}set mediaHeight(e){U(this,o.MEDIA_HEIGHT,e)}get mediaWidth(){return N(this,o.MEDIA_WIDTH)}set mediaWidth(e){U(this,o.MEDIA_WIDTH,e)}compareRendition(e,i){return this.constructor.compareRendition(e,i)}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}formatRendition(e,i){return this.constructor.formatRendition(e,i)}showRenditionBitrate(e){return this.mediaRenditionList.some(i=>i!==e&&i.height===e.height&&i.bitrate!==e.bitrate)}};fn=new WeakMap;Et=new WeakMap;Oa=new WeakSet;vn=function(){let t=!this.mediaRenditionSelected;if(Ot(this,Et).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&Ot(this,Et).mediaHeight===this.mediaHeight&&Ot(this,Et).mediaWidth===this.mediaWidth&&Ot(this,Et).isAuto===t)return;Ot(this,Et).mediaRenditionList=JSON.stringify(this.mediaRenditionList),Ot(this,Et).mediaHeight=this.mediaHeight,Ot(this,Et).mediaWidth=this.mediaWidth,Ot(this,Et).isAuto=t;let e=this.mediaRenditionList.sort(this.compareRendition.bind(this)),i=e.find(s=>s.id===this.mediaRenditionSelected);for(let s of e)s.selected=s===i;this.defaultSlot.textContent="";for(let s of e){let d=this.formatRendition(s,{showBitrate:this.showRenditionBitrate(s)}),u=ft({type:"radio",text:d,value:`${s.id}`,checked:s.selected&&!t});u.prepend(ze(this,"checked-indicator")),this.defaultSlot.append(u)}let a=i&&this.showRenditionBitrate(i),r;t&&(i?r=this.formatMenuItemText(`${c("Auto")} \u2022 ${this.formatRendition(i,{showBitrate:a})}`,i):this.mediaHeight>0&&this.mediaWidth>0&&(r=this.formatMenuItemText(`${c("Auto")} (${Math.min(this.mediaWidth,this.mediaHeight)}p)`))),r||(r=this.formatMenuItemText(c("Auto")));let n=ft({type:"radio",text:r,value:"auto",checked:t});n.dataset.description=r,n.prepend(ze(this,"checked-indicator")),this.defaultSlot.append(n)};Ws=new WeakSet;ru=function(){if(this.value==null)return;let t=new l.CustomEvent(h.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};l.customElements.get("media-rendition-menu")||l.customElements.define("media-rendition-menu",Fs);var wE=`<svg aria-hidden="true" viewBox="0 0 24 24">
3209
3212
  <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" />
3210
3213
  </svg>`;function RE(){return`
3211
3214
  <style>
@@ -3214,7 +3217,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3214
3217
  }
3215
3218
  </style>
3216
3219
  <slot name="icon">${wE}</slot>
3217
- `}function xE(){return c("Quality")}var Pa=class extends ye{static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_RENDITION_SELECTED,n.MEDIA_RENDITION_UNAVAILABLE,n.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",c("quality"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Y(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return x(this,n.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){w(this,n.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return P(this,n.MEDIA_HEIGHT)}set mediaHeight(e){U(this,n.MEDIA_HEIGHT,e)}};Pa.getSlotTemplateHTML=RE;Pa.getTooltipContentHTML=xE;l.customElements.get("media-rendition-menu-button")||l.customElements.define("media-rendition-menu-button",Pa);var lu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},bt=(t,e,i)=>(lu(t,e,"read from private field"),i?i.call(t):e.get(t)),Et=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},gh=(t,e,i,a)=>(lu(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Ne=(t,e,i)=>(lu(t,e,"access private method"),i),Ua,Eo,Zs,Oi,Na,du,_h,Vs,nu,Ks,su,Ah,Ys,qs,Gs;function DE(t){return`
3220
+ `}function xE(){return c("Quality")}var Na=class extends ye{static get observedAttributes(){return[...super.observedAttributes,o.MEDIA_RENDITION_SELECTED,o.MEDIA_RENDITION_UNAVAILABLE,o.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",c("quality"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Y(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return x(this,o.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){w(this,o.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return N(this,o.MEDIA_HEIGHT)}set mediaHeight(e){U(this,o.MEDIA_HEIGHT,e)}};Na.getSlotTemplateHTML=RE;Na.getTooltipContentHTML=xE;l.customElements.get("media-rendition-menu-button")||l.customElements.define("media-rendition-menu-button",Na);var lu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},gt=(t,e,i)=>(lu(t,e,"read from private field"),i?i.call(t):e.get(t)),bt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},gh=(t,e,i,a)=>(lu(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),Pe=(t,e,i)=>(lu(t,e,"access private method"),i),Ua,En,Zs,Oi,Pa,du,_h,Vs,ou,Ks,su,Ah,Ys,qs,Gs;function DE(t){return`
3218
3221
  ${te.getTemplateHTML(t)}
3219
3222
  <style>
3220
3223
  :host {
@@ -3228,7 +3231,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3228
3231
  overflow: hidden;
3229
3232
  }
3230
3233
  </style>
3231
- `}var bo=class extends te{constructor(){super(),Et(this,Eo),Et(this,Oi),Et(this,du),Et(this,Vs),Et(this,su),Et(this,Ua,!1),Et(this,Ks,e=>{let i=e.target,a=(i==null?void 0:i.nodeName)==="VIDEO",r=Ne(this,Vs,nu).call(this,i);(a||r)&&(bt(this,Ua)?Ne(this,Oi,Na).call(this):Ne(this,su,Ah).call(this,e))}),Et(this,Ys,e=>{let i=e.target,a=this.contains(i),r=e.button===2,o=(i==null?void 0:i.nodeName)==="VIDEO",s=Ne(this,Vs,nu).call(this,i);a||r&&(o||s)||Ne(this,Oi,Na).call(this)}),Et(this,qs,e=>{e.key==="Escape"&&Ne(this,Oi,Na).call(this)}),Et(this,Gs,e=>{var i,a;let r=e.target;if((i=r.matches)!=null&&i.call(r,'button[invoke="copy"]')){let o=(a=r.closest("media-context-menu-item"))==null?void 0:a.querySelector('input[slot="copy"]');o&&navigator.clipboard.writeText(o.value)}Ne(this,Oi,Na).call(this)}),this.setAttribute("noautohide",""),Ne(this,Eo,Zs).call(this)}connectedCallback(){super.connectedCallback(),Y(this).addEventListener("contextmenu",bt(this,Ks)),this.addEventListener("click",bt(this,Gs))}disconnectedCallback(){super.disconnectedCallback(),Y(this).removeEventListener("contextmenu",bt(this,Ks)),this.removeEventListener("click",bt(this,Gs)),document.removeEventListener("mousedown",bt(this,Ys)),document.removeEventListener("keydown",bt(this,qs))}};Ua=new WeakMap;Eo=new WeakSet;Zs=function(){this.hidden=!bt(this,Ua)};Oi=new WeakSet;Na=function(){gh(this,Ua,!1),Ne(this,Eo,Zs).call(this)};du=new WeakSet;_h=function(){document.querySelectorAll("media-context-menu").forEach(e=>{var i;e!==this&&Ne(i=e,Oi,Na).call(i)})};Vs=new WeakSet;nu=function(t){return t?t.hasAttribute("slot")&&t.getAttribute("slot")==="media"?!0:t.nodeName.includes("-")&&t.tagName.includes("-")?t.hasAttribute("src")||t.hasAttribute("poster")||t.hasAttribute("preload")||t.hasAttribute("playsinline"):!1:!1};Ks=new WeakMap;su=new WeakSet;Ah=function(t){t.preventDefault(),Ne(this,du,_h).call(this),gh(this,Ua,!0),this.style.position="fixed",this.style.left=`${t.clientX}px`,this.style.top=`${t.clientY}px`,Ne(this,Eo,Zs).call(this),document.addEventListener("mousedown",bt(this,Ys),{once:!0}),document.addEventListener("keydown",bt(this,qs),{once:!0})};Ys=new WeakMap;qs=new WeakMap;Gs=new WeakMap;bo.getTemplateHTML=DE;l.customElements.get("media-context-menu")||l.customElements.define("media-context-menu",bo);function OE(t){return`
3234
+ `}var bn=class extends te{constructor(){super(),bt(this,En),bt(this,Oi),bt(this,du),bt(this,Vs),bt(this,su),bt(this,Ua,!1),bt(this,Ks,e=>{let i=e.target,a=(i==null?void 0:i.nodeName)==="VIDEO",r=Pe(this,Vs,ou).call(this,i);(a||r)&&(gt(this,Ua)?Pe(this,Oi,Pa).call(this):Pe(this,su,Ah).call(this,e))}),bt(this,Ys,e=>{let i=e.target,a=this.contains(i),r=e.button===2,n=(i==null?void 0:i.nodeName)==="VIDEO",s=Pe(this,Vs,ou).call(this,i);a||r&&(n||s)||Pe(this,Oi,Pa).call(this)}),bt(this,qs,e=>{e.key==="Escape"&&Pe(this,Oi,Pa).call(this)}),bt(this,Gs,e=>{var i,a;let r=e.target;if((i=r.matches)!=null&&i.call(r,'button[invoke="copy"]')){let n=(a=r.closest("media-context-menu-item"))==null?void 0:a.querySelector('input[slot="copy"]');n&&navigator.clipboard.writeText(n.value)}Pe(this,Oi,Pa).call(this)}),this.setAttribute("noautohide",""),Pe(this,En,Zs).call(this)}connectedCallback(){super.connectedCallback(),Y(this).addEventListener("contextmenu",gt(this,Ks)),this.addEventListener("click",gt(this,Gs))}disconnectedCallback(){super.disconnectedCallback(),Y(this).removeEventListener("contextmenu",gt(this,Ks)),this.removeEventListener("click",gt(this,Gs)),document.removeEventListener("mousedown",gt(this,Ys)),document.removeEventListener("keydown",gt(this,qs))}};Ua=new WeakMap;En=new WeakSet;Zs=function(){this.hidden=!gt(this,Ua)};Oi=new WeakSet;Pa=function(){gh(this,Ua,!1),Pe(this,En,Zs).call(this)};du=new WeakSet;_h=function(){document.querySelectorAll("media-context-menu").forEach(e=>{var i;e!==this&&Pe(i=e,Oi,Pa).call(i)})};Vs=new WeakSet;ou=function(t){return t?t.hasAttribute("slot")&&t.getAttribute("slot")==="media"?!0:t.nodeName.includes("-")&&t.tagName.includes("-")?t.hasAttribute("src")||t.hasAttribute("poster")||t.hasAttribute("preload")||t.hasAttribute("playsinline"):!1:!1};Ks=new WeakMap;su=new WeakSet;Ah=function(t){t.preventDefault(),Pe(this,du,_h).call(this),gh(this,Ua,!0),this.style.position="fixed",this.style.left=`${t.clientX}px`,this.style.top=`${t.clientY}px`,Pe(this,En,Zs).call(this),document.addEventListener("mousedown",gt(this,Ys),{once:!0}),document.addEventListener("keydown",gt(this,qs),{once:!0})};Ys=new WeakMap;qs=new WeakMap;Gs=new WeakMap;bn.getTemplateHTML=DE;l.customElements.get("media-context-menu")||l.customElements.define("media-context-menu",bn);function OE(t){return`
3232
3235
  ${Le.getTemplateHTML.call(this,t)}
3233
3236
  <style>
3234
3237
  ::slotted(*) {
@@ -3241,7 +3244,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3241
3244
  min-height: var(--media-control-height, 24px);
3242
3245
  }
3243
3246
  </style>
3244
- `}var Ha=class extends Le{};Ha.shadowRootOptions={mode:"open"};Ha.getTemplateHTML=OE;l.customElements.get("media-context-menu-item")||l.customElements.define("media-context-menu-item",Ha);var uu=ni.createElement("template");"innerHTML"in uu&&(uu.innerHTML=qm);var Th,yh,zs=class extends wi{};zs.template=(yh=(Th=uu.content)==null?void 0:Th.children)==null?void 0:yh[0];Se.customElements.get("media-theme-gerwig")||Se.customElements.define("media-theme-gerwig",zs);var PE="gerwig",Ot={SRC:"src",POSTER:"poster"},m={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",ACCENT_COLOR:"accent-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",PLAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",FULLSCREEN_ELEMENT:"fullscreen-element",DRM_TOKEN:"drm-token",STORYBOARD_SRC:"storyboard-src",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio",NOHOTKEYS:"nohotkeys",HOTKEYS:"hotkeys",PLAYBACK_RATES:"playbackrates",DEFAULT_SHOW_REMAINING_TIME:"default-show-remaining-time",DEFAULT_DURATION:"default-duration",TITLE:"title",VIDEO_TITLE:"video-title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",EXTRA_SOURCE_PARAMS:"extra-source-params",NO_VOLUME_PREF:"no-volume-pref",NO_MUTED_PREF:"no-muted-pref",CAST_RECEIVER:"cast-receiver",NO_TOOLTIPS:"no-tooltips",PROUDLY_DISPLAY_MUX_BADGE:"proudly-display-mux-badge",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended"},cu=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","videotitle","novolumepref","nomutedpref","proudlydisplaymuxbadge"];function NE(t,e){var a,r,o;return{src:!t.playbackId&&t.src,playbackId:t.playbackId,hasSrc:!!t.playbackId||!!t.src||!!t.currentSrc,poster:t.poster,storyboard:((a=t.media)==null?void 0:a.currentSrc)&&t.storyboard,storyboardSrc:t.getAttribute(m.STORYBOARD_SRC),fullscreenElement:t.getAttribute(m.FULLSCREEN_ELEMENT),placeholder:t.getAttribute("placeholder"),themeTemplate:HE(t),thumbnailTime:!t.tokens.thumbnail&&t.thumbnailTime,autoplay:t.autoplay,crossOrigin:t.crossOrigin,loop:t.loop,noHotKeys:t.hasAttribute(m.NOHOTKEYS),hotKeys:t.getAttribute(m.HOTKEYS),muted:t.muted,paused:t.paused,preload:t.preload,envKey:t.envKey,preferCmcd:t.preferCmcd,debug:t.debug,disableTracking:t.disableTracking,disableCookies:t.disableCookies,tokens:t.tokens,beaconCollectionDomain:t.beaconCollectionDomain,maxResolution:t.maxResolution,minResolution:t.minResolution,maxAutoResolution:t.maxAutoResolution,programStartTime:t.programStartTime,programEndTime:t.programEndTime,assetStartTime:t.assetStartTime,assetEndTime:t.assetEndTime,renditionOrder:t.renditionOrder,metadata:t.metadata,playerInitTime:t.playerInitTime,playerSoftwareName:t.playerSoftwareName,playerSoftwareVersion:t.playerSoftwareVersion,startTime:t.startTime,preferPlayback:t.preferPlayback,audio:t.audio,defaultStreamType:t.defaultStreamType,targetLiveWindow:t.getAttribute(b.Attributes.TARGET_LIVE_WINDOW),streamType:Yr(t.getAttribute(b.Attributes.STREAM_TYPE)),primaryColor:t.getAttribute(m.PRIMARY_COLOR),secondaryColor:t.getAttribute(m.SECONDARY_COLOR),accentColor:t.getAttribute(m.ACCENT_COLOR),forwardSeekOffset:t.forwardSeekOffset,backwardSeekOffset:t.backwardSeekOffset,defaultHiddenCaptions:t.defaultHiddenCaptions,defaultDuration:t.defaultDuration,defaultShowRemainingTime:t.defaultShowRemainingTime,hideDuration:BE(t),playbackRates:t.getAttribute(m.PLAYBACK_RATES),customDomain:(r=t.getAttribute(b.Attributes.CUSTOM_DOMAIN))!=null?r:void 0,title:t.getAttribute(m.TITLE),videoTitle:(o=t.getAttribute(m.VIDEO_TITLE))!=null?o:t.getAttribute(m.TITLE),novolumepref:t.hasAttribute(m.NO_VOLUME_PREF),nomutedpref:t.hasAttribute(m.NO_MUTED_PREF),proudlyDisplayMuxBadge:t.hasAttribute(m.PROUDLY_DISPLAY_MUX_BADGE),castReceiver:t.castReceiver,disablePseudoEnded:t.hasAttribute(m.DISABLE_PSEUDO_ENDED),capRenditionToPlayerSize:t.capRenditionToPlayerSize,...e,extraSourceParams:t.extraSourceParams}}var UE=Sn.formatErrorMessage;Sn.formatErrorMessage=t=>{var e,i;if(t instanceof b.MediaError){let a=Ym(t,!1);return`
3247
+ `}var Ha=class extends Le{};Ha.shadowRootOptions={mode:"open"};Ha.getTemplateHTML=OE;l.customElements.get("media-context-menu-item")||l.customElements.define("media-context-menu-item",Ha);var uu=oi.createElement("template");"innerHTML"in uu&&(uu.innerHTML=qm);var Th,yh,zs=class extends wi{};zs.template=(yh=(Th=uu.content)==null?void 0:Th.children)==null?void 0:yh[0];Se.customElements.get("media-theme-gerwig")||Se.customElements.define("media-theme-gerwig",zs);var NE="gerwig",Nt={SRC:"src",POSTER:"poster"},m={STYLE:"style",DEFAULT_HIDDEN_CAPTIONS:"default-hidden-captions",PRIMARY_COLOR:"primary-color",SECONDARY_COLOR:"secondary-color",ACCENT_COLOR:"accent-color",FORWARD_SEEK_OFFSET:"forward-seek-offset",BACKWARD_SEEK_OFFSET:"backward-seek-offset",PLAYBACK_TOKEN:"playback-token",THUMBNAIL_TOKEN:"thumbnail-token",STORYBOARD_TOKEN:"storyboard-token",FULLSCREEN_ELEMENT:"fullscreen-element",DRM_TOKEN:"drm-token",STORYBOARD_SRC:"storyboard-src",THUMBNAIL_TIME:"thumbnail-time",AUDIO:"audio",NOHOTKEYS:"nohotkeys",HOTKEYS:"hotkeys",PLAYBACK_RATES:"playbackrates",DEFAULT_SHOW_REMAINING_TIME:"default-show-remaining-time",DEFAULT_DURATION:"default-duration",TITLE:"title",VIDEO_TITLE:"video-title",PLACEHOLDER:"placeholder",THEME:"theme",DEFAULT_STREAM_TYPE:"default-stream-type",TARGET_LIVE_WINDOW:"target-live-window",EXTRA_SOURCE_PARAMS:"extra-source-params",NO_VOLUME_PREF:"no-volume-pref",NO_MUTED_PREF:"no-muted-pref",CAST_RECEIVER:"cast-receiver",NO_TOOLTIPS:"no-tooltips",PROUDLY_DISPLAY_MUX_BADGE:"proudly-display-mux-badge",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended"},cu=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","videotitle","novolumepref","nomutedpref","proudlydisplaymuxbadge"];function PE(t,e){var a,r,n;return{src:!t.playbackId&&t.src,playbackId:t.playbackId,hasSrc:!!t.playbackId||!!t.src||!!t.currentSrc,poster:t.poster,storyboard:((a=t.media)==null?void 0:a.currentSrc)&&t.storyboard,storyboardSrc:t.getAttribute(m.STORYBOARD_SRC),fullscreenElement:t.getAttribute(m.FULLSCREEN_ELEMENT),placeholder:t.getAttribute("placeholder"),themeTemplate:HE(t),thumbnailTime:!t.tokens.thumbnail&&t.thumbnailTime,autoplay:t.autoplay,crossOrigin:t.crossOrigin,loop:t.loop,noHotKeys:t.hasAttribute(m.NOHOTKEYS),hotKeys:t.getAttribute(m.HOTKEYS),muted:t.muted,paused:t.paused,preload:t.preload,envKey:t.envKey,preferCmcd:t.preferCmcd,debug:t.debug,disableTracking:t.disableTracking,disableCookies:t.disableCookies,tokens:t.tokens,beaconCollectionDomain:t.beaconCollectionDomain,maxResolution:t.maxResolution,minResolution:t.minResolution,maxAutoResolution:t.maxAutoResolution,programStartTime:t.programStartTime,programEndTime:t.programEndTime,assetStartTime:t.assetStartTime,assetEndTime:t.assetEndTime,renditionOrder:t.renditionOrder,metadata:t.metadata,playerInitTime:t.playerInitTime,playerSoftwareName:t.playerSoftwareName,playerSoftwareVersion:t.playerSoftwareVersion,startTime:t.startTime,initialBandwidthEstimateKbps:t.initialBandwidthEstimateKbps,initialEstimateSegments:t.initialEstimateSegments,minPreloadSegments:t.minPreloadSegments,preferPlayback:t.preferPlayback,audio:t.audio,defaultStreamType:t.defaultStreamType,targetLiveWindow:t.getAttribute(b.Attributes.TARGET_LIVE_WINDOW),streamType:Yr(t.getAttribute(b.Attributes.STREAM_TYPE)),primaryColor:t.getAttribute(m.PRIMARY_COLOR),secondaryColor:t.getAttribute(m.SECONDARY_COLOR),accentColor:t.getAttribute(m.ACCENT_COLOR),forwardSeekOffset:t.forwardSeekOffset,backwardSeekOffset:t.backwardSeekOffset,defaultHiddenCaptions:t.defaultHiddenCaptions,defaultDuration:t.defaultDuration,defaultShowRemainingTime:t.defaultShowRemainingTime,hideDuration:BE(t),playbackRates:t.getAttribute(m.PLAYBACK_RATES),customDomain:(r=t.getAttribute(b.Attributes.CUSTOM_DOMAIN))!=null?r:void 0,title:t.getAttribute(m.TITLE),videoTitle:(n=t.getAttribute(m.VIDEO_TITLE))!=null?n:t.getAttribute(m.TITLE),novolumepref:t.hasAttribute(m.NO_VOLUME_PREF),nomutedpref:t.hasAttribute(m.NO_MUTED_PREF),proudlyDisplayMuxBadge:t.hasAttribute(m.PROUDLY_DISPLAY_MUX_BADGE),castReceiver:t.castReceiver,disablePseudoEnded:t.hasAttribute(m.DISABLE_PSEUDO_ENDED),capRenditionToPlayerSize:t.capRenditionToPlayerSize,...e,extraSourceParams:t.extraSourceParams}}var UE=So.formatErrorMessage;So.formatErrorMessage=t=>{var e,i;if(t instanceof b.MediaError){let a=Ym(t,!1);return`
3245
3248
  ${a!=null&&a.title?`<h3>${a.title}</h3>`:""}
3246
3249
  ${a!=null&&a.message||a!=null&&a.linkUrl?`<p>
3247
3250
  ${a==null?void 0:a.message}
@@ -3253,5 +3256,5 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3253
3256
  >${(i=a.linkText)!=null?i:a.linkUrl}</a
3254
3257
  >`:""}
3255
3258
  </p>`:""}
3256
- `}return UE(t)};function HE(t){var i,a;let e=t.theme;if(e){let r=(a=(i=t.getRootNode())==null?void 0:i.getElementById)==null?void 0:a.call(i,e);if(r&&r instanceof HTMLTemplateElement)return r;e.startsWith("media-theme-")||(e=`media-theme-${e}`);let o=Se.customElements.get(e);if(o!=null&&o.template)return o.template}}function BE(t){var i;let e=(i=t.mediaController)==null?void 0:i.querySelector("media-time-display");return e&&getComputedStyle(e).getPropertyValue("--media-duration-display-display").trim()==="none"}function kh(t){let e=t.videoTitle?{video_title:t.videoTitle}:{};return t.getAttributeNames().filter(i=>i.startsWith("metadata-")).reduce((i,a)=>{let r=t.getAttribute(a);return r!==null&&(i[a.replace(/^metadata-/,"").replace(/-/g,"_")]=r),i},e)}var $E=Object.values(b.Attributes),WE=Object.values(Ot),FE=Object.values(m),mu=os(),hu="mux-player",Sh={isDialogOpen:!1},VE={redundant_streams:!0},go,Ba,_o,oi,Ao,$a,To,yo,Ni,Wa,Ui,ko,W,Pt,Ih,fu,Pi,Mh,Lh,Ch,wh,pu=class extends md{constructor(){super();ae(this,W);ae(this,go);ae(this,Ba,!1);ae(this,_o,{});ae(this,oi,!0);ae(this,Ao,new rs(this,"hotkeys"));ae(this,$a);ae(this,To,()=>J(this,W,Pi).call(this));ae(this,yo,()=>J(this,W,Pi).call(this));ae(this,Ni,()=>J(this,W,Pi).call(this));ae(this,Wa);ae(this,Ui,{...Sh,onCloseErrorDialog:i=>{var r;((r=i.composedPath()[0])==null?void 0:r.localName)==="media-error-dialog"&&J(this,W,fu).call(this,{isDialogOpen:!1})},onFocusInErrorDialog:i=>{var o;if(((o=i.composedPath()[0])==null?void 0:o.localName)!=="media-error-dialog")return;dd(this,ni.activeElement)||i.preventDefault()}});ae(this,ko,i=>{var o;let a=(o=this.media)==null?void 0:o.error;if(!(a instanceof b.MediaError)){let{message:s,code:d}=a!=null?a:{};a=new b.MediaError(s,d)}if(!(a!=null&&a.fatal)){ct(a),a.data&&ct(`${a.name} data:`,a.data);return}let r=Td(a,!1);r.message&&ud(r),Ee(a),a.data&&Ee(`${a.name} data:`,a.data),J(this,W,fu).call(this,{isDialogOpen:!0})});de(this,go,(0,O.generatePlayerInitTime)()),this.attachShadow({mode:"open"}),J(this,W,Ih).call(this),this.isConnected&&J(this,W,Pt).call(this)}static get NAME(){return hu}static get VERSION(){return mu}static get observedAttributes(){var i;return[...(i=md.observedAttributes)!=null?i:[],...WE,...$E,...FE]}get mediaTheme(){var i;return(i=this.shadowRoot)==null?void 0:i.querySelector("media-theme")}get mediaController(){var i,a;return(a=(i=this.mediaTheme)==null?void 0:i.shadowRoot)==null?void 0:a.querySelector("media-controller")}connectedCallback(){J(this,W,Pt).call(this);let i=this.media;i&&(i.metadata=kh(this))}disconnectedCallback(){var i,a,r,o,s,d,u,f;(i=R(this,$a))==null||i.disconnect(),(a=this.media)==null||a.removeEventListener("streamtypechange",R(this,To)),(r=this.media)==null||r.removeEventListener("loadstart",R(this,yo)),this.removeEventListener("error",R(this,ko)),this.media&&(this.media.errorTranslator=void 0),(s=(o=this.media)==null?void 0:o.textTracks)==null||s.removeEventListener("addtrack",R(this,Ni)),(u=(d=this.media)==null?void 0:d.textTracks)==null||u.removeEventListener("removetrack",R(this,Ni)),(f=R(this,Wa))==null||f.call(this),de(this,Wa,void 0),de(this,Ba,!1)}attributeChangedCallback(i,a,r){switch(J(this,W,Pt).call(this),super.attributeChangedCallback(i,a,r),i){case m.HOTKEYS:R(this,Ao).value=r;break;case m.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&ct((0,O.i18n)("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break}case m.THUMBNAIL_TOKEN:{if(r){let s=(0,O.parseJwt)(r);if(s){let{aud:d}=s,u=O.MuxJWTAud.THUMBNAIL;d!==u&&ct((0,O.i18n)("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:d,expectedAud:u,tokenNamePrefix:"thumbnail"}))}}break}case m.STORYBOARD_TOKEN:{if(r){let s=(0,O.parseJwt)(r);if(s){let{aud:d}=s,u=O.MuxJWTAud.STORYBOARD;d!==u&&ct((0,O.i18n)("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:d,expectedAud:u,tokenNamePrefix:"storyboard"}))}}break}case m.DRM_TOKEN:{if(r){let s=(0,O.parseJwt)(r);if(s){let{aud:d}=s,u=O.MuxJWTAud.DRM;d!==u&&ct((0,O.i18n)("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:d,expectedAud:u,tokenNamePrefix:"drm"}))}}break}case b.Attributes.PLAYBACK_ID:{r!=null&&r.includes("?token")&&Ee((0,O.i18n)("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:r}));break}case b.Attributes.STREAM_TYPE:{r&&![O.StreamTypes.LIVE,O.StreamTypes.ON_DEMAND,O.StreamTypes.UNKNOWN].includes(r)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=r.includes("dvr")?Number.POSITIVE_INFINITY:0:ud({file:"invalid-stream-type.md",message:(0,O.i18n)("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):r===O.StreamTypes.LIVE?this.getAttribute(m.TARGET_LIVE_WINDOW)==null&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN;break}case m.FULLSCREEN_ELEMENT:{if(r!=null||r!==a){let s=ni.getElementById(r),d=s==null?void 0:s.querySelector("mux-player");this.mediaController&&s&&d&&(this.mediaController.fullscreenElement=s)}break}case b.Attributes.CAP_RENDITION_TO_PLAYER_SIZE:{(r==null||r!==a)&&(this.capRenditionToPlayerSize=r!=null?!0:void 0);break}}[b.Attributes.PLAYBACK_ID,Ot.SRC,m.PLAYBACK_TOKEN].includes(i)&&a!==r&&de(this,Ui,{...R(this,Ui),...Sh}),J(this,W,Pi).call(this,{[ym(i)]:r})}async requestFullscreen(i){var a;if(!(!this.mediaController||this.mediaController.hasAttribute(n.MEDIA_IS_FULLSCREEN)))return(a=this.mediaController)==null||a.dispatchEvent(new Se.CustomEvent(h.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((r,o)=>{var s;(s=this.mediaController)==null||s.addEventListener(Ie.MEDIA_IS_FULLSCREEN,()=>r(),{once:!0})})}async exitFullscreen(){var i;if(!(!this.mediaController||!this.mediaController.hasAttribute(n.MEDIA_IS_FULLSCREEN)))return(i=this.mediaController)==null||i.dispatchEvent(new Se.CustomEvent(h.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((a,r)=>{var o;(o=this.mediaController)==null||o.addEventListener(Ie.MEDIA_IS_FULLSCREEN,()=>a(),{once:!0})})}get preferCmcd(){var i;return(i=this.getAttribute(b.Attributes.PREFER_CMCD))!=null?i:void 0}set preferCmcd(i){i!==this.preferCmcd&&(i?O.CmcdTypeValues.includes(i)?this.setAttribute(b.Attributes.PREFER_CMCD,i):ct(`Invalid value for preferCmcd. Must be one of ${O.CmcdTypeValues.join()}`):this.removeAttribute(b.Attributes.PREFER_CMCD))}get hasPlayed(){var i,a;return(a=(i=this.mediaController)==null?void 0:i.hasAttribute(n.MEDIA_HAS_PLAYED))!=null?a:!1}get inLiveWindow(){var i;return(i=this.mediaController)==null?void 0:i.hasAttribute(n.MEDIA_TIME_IS_LIVE)}get _hls(){var i;return(i=this.media)==null?void 0:i._hls}get mux(){var i;return(i=this.media)==null?void 0:i.mux}get theme(){var i;return(i=this.getAttribute(m.THEME))!=null?i:PE}set theme(i){this.setAttribute(m.THEME,`${i}`)}get themeProps(){let i=this.mediaTheme;if(!i)return;let a={};for(let r of i.getAttributeNames()){if(cu.includes(r))continue;let o=i.getAttribute(r);a[as(r)]=o===""?!0:o}return a}set themeProps(i){var r,o;J(this,W,Pt).call(this);let a={...this.themeProps,...i};for(let s in a){if(cu.includes(s))continue;let d=i==null?void 0:i[s];typeof d=="boolean"||d==null?(r=this.mediaTheme)==null||r.toggleAttribute(is(s),!!d):(o=this.mediaTheme)==null||o.setAttribute(is(s),d)}}get playbackId(){var i;return(i=this.getAttribute(b.Attributes.PLAYBACK_ID))!=null?i:void 0}set playbackId(i){i?this.setAttribute(b.Attributes.PLAYBACK_ID,i):this.removeAttribute(b.Attributes.PLAYBACK_ID)}get src(){var i,a;return this.playbackId?(i=ri(this,Ot.SRC))!=null?i:void 0:(a=this.getAttribute(Ot.SRC))!=null?a:void 0}set src(i){i?this.setAttribute(Ot.SRC,i):this.removeAttribute(Ot.SRC)}get poster(){var r;let i=this.getAttribute(Ot.POSTER);if(i!=null)return i;let{tokens:a}=this;if(a.playback&&!a.thumbnail){ct("Missing expected thumbnail token. No poster image will be shown");return}if(this.playbackId&&!this.audio)return Am(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(r=this.thumbnailTime)!=null?r:this.startTime,programTime:this.programStartTime,token:a.thumbnail})}set poster(i){i||i===""?this.setAttribute(Ot.POSTER,i):this.removeAttribute(Ot.POSTER)}get storyboardSrc(){var i;return(i=this.getAttribute(m.STORYBOARD_SRC))!=null?i:void 0}set storyboardSrc(i){i?this.setAttribute(m.STORYBOARD_SRC,i):this.removeAttribute(m.STORYBOARD_SRC)}get storyboard(){let{tokens:i}=this;if(this.storyboardSrc&&!i.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[O.StreamTypes.LIVE,O.StreamTypes.UNKNOWN].includes(this.streamType)||i.playback&&!i.storyboard))return Tm(this.playbackId,{customDomain:this.customDomain,token:i.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}get audio(){return this.hasAttribute(m.AUDIO)}set audio(i){if(!i){this.removeAttribute(m.AUDIO);return}this.setAttribute(m.AUDIO,"")}get hotkeys(){return R(this,Ao)}get nohotkeys(){return this.hasAttribute(m.NOHOTKEYS)}set nohotkeys(i){if(!i){this.removeAttribute(m.NOHOTKEYS);return}this.setAttribute(m.NOHOTKEYS,"")}get thumbnailTime(){return fe(this.getAttribute(m.THUMBNAIL_TIME))}set thumbnailTime(i){this.setAttribute(m.THUMBNAIL_TIME,`${i}`)}get videoTitle(){var i,a;return(a=(i=this.getAttribute(m.VIDEO_TITLE))!=null?i:this.getAttribute(m.TITLE))!=null?a:""}set videoTitle(i){i!==this.videoTitle&&(i?this.setAttribute(m.VIDEO_TITLE,i):this.removeAttribute(m.VIDEO_TITLE))}get placeholder(){var i;return(i=ri(this,m.PLACEHOLDER))!=null?i:""}set placeholder(i){this.setAttribute(m.PLACEHOLDER,`${i}`)}get primaryColor(){var a,r;let i=this.getAttribute(m.PRIMARY_COLOR);if(i!=null||this.mediaTheme&&(i=(r=(a=Se.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_primary-color"))==null?void 0:r.trim(),i))return i}set primaryColor(i){this.setAttribute(m.PRIMARY_COLOR,`${i}`)}get secondaryColor(){var a,r;let i=this.getAttribute(m.SECONDARY_COLOR);if(i!=null||this.mediaTheme&&(i=(r=(a=Se.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_secondary-color"))==null?void 0:r.trim(),i))return i}set secondaryColor(i){this.setAttribute(m.SECONDARY_COLOR,`${i}`)}get accentColor(){var a,r;let i=this.getAttribute(m.ACCENT_COLOR);if(i!=null||this.mediaTheme&&(i=(r=(a=Se.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_accent-color"))==null?void 0:r.trim(),i))return i}set accentColor(i){this.setAttribute(m.ACCENT_COLOR,`${i}`)}get defaultShowRemainingTime(){return this.hasAttribute(m.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(i){i?this.setAttribute(m.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(m.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(m.PLAYBACK_RATES))return this.getAttribute(m.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(i=>Number(i)).filter(i=>!Number.isNaN(i)).sort((i,a)=>i-a)}set playbackRates(i){if(!i){this.removeAttribute(m.PLAYBACK_RATES);return}this.setAttribute(m.PLAYBACK_RATES,i.join(" "))}get forwardSeekOffset(){var i;return(i=fe(this.getAttribute(m.FORWARD_SEEK_OFFSET)))!=null?i:10}set forwardSeekOffset(i){this.setAttribute(m.FORWARD_SEEK_OFFSET,`${i}`)}get backwardSeekOffset(){var i;return(i=fe(this.getAttribute(m.BACKWARD_SEEK_OFFSET)))!=null?i:10}set backwardSeekOffset(i){this.setAttribute(m.BACKWARD_SEEK_OFFSET,`${i}`)}get defaultHiddenCaptions(){return this.hasAttribute(m.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(i){i?this.setAttribute(m.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(m.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return fe(this.getAttribute(m.DEFAULT_DURATION))}set defaultDuration(i){i==null?this.removeAttribute(m.DEFAULT_DURATION):this.setAttribute(m.DEFAULT_DURATION,`${i}`)}get playerInitTime(){return this.hasAttribute(b.Attributes.PLAYER_INIT_TIME)?fe(this.getAttribute(b.Attributes.PLAYER_INIT_TIME)):R(this,go)}set playerInitTime(i){i!=this.playerInitTime&&(i==null?this.removeAttribute(b.Attributes.PLAYER_INIT_TIME):this.setAttribute(b.Attributes.PLAYER_INIT_TIME,`${+i}`))}get playerSoftwareName(){var i;return(i=this.getAttribute(b.Attributes.PLAYER_SOFTWARE_NAME))!=null?i:hu}get playerSoftwareVersion(){var i;return(i=this.getAttribute(b.Attributes.PLAYER_SOFTWARE_VERSION))!=null?i:mu}get beaconCollectionDomain(){var i;return(i=this.getAttribute(b.Attributes.BEACON_COLLECTION_DOMAIN))!=null?i:void 0}set beaconCollectionDomain(i){i!==this.beaconCollectionDomain&&(i?this.setAttribute(b.Attributes.BEACON_COLLECTION_DOMAIN,i):this.removeAttribute(b.Attributes.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var i;return(i=this.getAttribute(b.Attributes.MAX_RESOLUTION))!=null?i:void 0}set maxResolution(i){i!==this.maxResolution&&(i?this.setAttribute(b.Attributes.MAX_RESOLUTION,i):this.removeAttribute(b.Attributes.MAX_RESOLUTION))}get minResolution(){var i;return(i=this.getAttribute(b.Attributes.MIN_RESOLUTION))!=null?i:void 0}set minResolution(i){i!==this.minResolution&&(i?this.setAttribute(b.Attributes.MIN_RESOLUTION,i):this.removeAttribute(b.Attributes.MIN_RESOLUTION))}get maxAutoResolution(){var i;return(i=this.getAttribute(b.Attributes.MAX_AUTO_RESOLUTION))!=null?i:void 0}set maxAutoResolution(i){i==null?this.removeAttribute(b.Attributes.MAX_AUTO_RESOLUTION):this.setAttribute(b.Attributes.MAX_AUTO_RESOLUTION,i)}get renditionOrder(){var i;return(i=this.getAttribute(b.Attributes.RENDITION_ORDER))!=null?i:void 0}set renditionOrder(i){i!==this.renditionOrder&&(i?this.setAttribute(b.Attributes.RENDITION_ORDER,i):this.removeAttribute(b.Attributes.RENDITION_ORDER))}get programStartTime(){return fe(this.getAttribute(b.Attributes.PROGRAM_START_TIME))}set programStartTime(i){i==null?this.removeAttribute(b.Attributes.PROGRAM_START_TIME):this.setAttribute(b.Attributes.PROGRAM_START_TIME,`${i}`)}get programEndTime(){return fe(this.getAttribute(b.Attributes.PROGRAM_END_TIME))}set programEndTime(i){i==null?this.removeAttribute(b.Attributes.PROGRAM_END_TIME):this.setAttribute(b.Attributes.PROGRAM_END_TIME,`${i}`)}get assetStartTime(){return fe(this.getAttribute(b.Attributes.ASSET_START_TIME))}set assetStartTime(i){i==null?this.removeAttribute(b.Attributes.ASSET_START_TIME):this.setAttribute(b.Attributes.ASSET_START_TIME,`${i}`)}get assetEndTime(){return fe(this.getAttribute(b.Attributes.ASSET_END_TIME))}set assetEndTime(i){i==null?this.removeAttribute(b.Attributes.ASSET_END_TIME):this.setAttribute(b.Attributes.ASSET_END_TIME,`${i}`)}get extraSourceParams(){return this.hasAttribute(m.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(m.EXTRA_SOURCE_PARAMS)).entries()].reduce((i,[a,r])=>(i[a]=r,i),{}):VE}set extraSourceParams(i){i==null?this.removeAttribute(m.EXTRA_SOURCE_PARAMS):this.setAttribute(m.EXTRA_SOURCE_PARAMS,new URLSearchParams(i).toString())}get customDomain(){var i;return(i=this.getAttribute(b.Attributes.CUSTOM_DOMAIN))!=null?i:void 0}set customDomain(i){i!==this.customDomain&&(i?this.setAttribute(b.Attributes.CUSTOM_DOMAIN,i):this.removeAttribute(b.Attributes.CUSTOM_DOMAIN))}get envKey(){var i;return(i=ri(this,b.Attributes.ENV_KEY))!=null?i:void 0}set envKey(i){this.setAttribute(b.Attributes.ENV_KEY,`${i}`)}get noVolumePref(){return this.hasAttribute(m.NO_VOLUME_PREF)}set noVolumePref(i){i?this.setAttribute(m.NO_VOLUME_PREF,""):this.removeAttribute(m.NO_VOLUME_PREF)}get noMutedPref(){return this.hasAttribute(m.NO_MUTED_PREF)}set noMutedPref(i){i?this.setAttribute(m.NO_MUTED_PREF,""):this.removeAttribute(m.NO_MUTED_PREF)}get debug(){return ri(this,b.Attributes.DEBUG)!=null}set debug(i){i?this.setAttribute(b.Attributes.DEBUG,""):this.removeAttribute(b.Attributes.DEBUG)}get disableTracking(){return ri(this,b.Attributes.DISABLE_TRACKING)!=null}set disableTracking(i){this.toggleAttribute(b.Attributes.DISABLE_TRACKING,!!i)}get disableCookies(){return ri(this,b.Attributes.DISABLE_COOKIES)!=null}set disableCookies(i){i?this.setAttribute(b.Attributes.DISABLE_COOKIES,""):this.removeAttribute(b.Attributes.DISABLE_COOKIES)}get streamType(){var i,a,r;return(r=(a=this.getAttribute(b.Attributes.STREAM_TYPE))!=null?a:(i=this.media)==null?void 0:i.streamType)!=null?r:O.StreamTypes.UNKNOWN}set streamType(i){this.setAttribute(b.Attributes.STREAM_TYPE,`${i}`)}get defaultStreamType(){var i,a,r;return(r=(a=this.getAttribute(m.DEFAULT_STREAM_TYPE))!=null?a:(i=this.mediaController)==null?void 0:i.getAttribute(m.DEFAULT_STREAM_TYPE))!=null?r:O.StreamTypes.ON_DEMAND}set defaultStreamType(i){i?this.setAttribute(m.DEFAULT_STREAM_TYPE,i):this.removeAttribute(m.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var i,a;return this.hasAttribute(m.TARGET_LIVE_WINDOW)?+this.getAttribute(m.TARGET_LIVE_WINDOW):(a=(i=this.media)==null?void 0:i.targetLiveWindow)!=null?a:Number.NaN}set targetLiveWindow(i){i==this.targetLiveWindow||Number.isNaN(i)&&Number.isNaN(this.targetLiveWindow)||(i==null?this.removeAttribute(m.TARGET_LIVE_WINDOW):this.setAttribute(m.TARGET_LIVE_WINDOW,`${+i}`))}get liveEdgeStart(){var i;return(i=this.media)==null?void 0:i.liveEdgeStart}get startTime(){return fe(ri(this,b.Attributes.START_TIME))}set startTime(i){this.setAttribute(b.Attributes.START_TIME,`${i}`)}get preferPlayback(){let i=this.getAttribute(b.Attributes.PREFER_PLAYBACK);if(i===O.PlaybackTypes.MSE||i===O.PlaybackTypes.NATIVE)return i}set preferPlayback(i){i!==this.preferPlayback&&(i===O.PlaybackTypes.MSE||i===O.PlaybackTypes.NATIVE?this.setAttribute(b.Attributes.PREFER_PLAYBACK,i):this.removeAttribute(b.Attributes.PREFER_PLAYBACK))}get metadata(){var i;return(i=this.media)==null?void 0:i.metadata}set metadata(i){if(J(this,W,Pt).call(this),!this.media){Ee("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...kh(this),...i}}get _hlsConfig(){var i;return(i=this.media)==null?void 0:i._hlsConfig}set _hlsConfig(i){if(J(this,W,Pt).call(this),!this.media){Ee("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.");return}this.media._hlsConfig=i}async addCuePoints(i){var a;if(J(this,W,Pt).call(this),!this.media){Ee("underlying media element missing when trying to addCuePoints. cuePoints will not be added.");return}return(a=this.media)==null?void 0:a.addCuePoints(i)}get activeCuePoint(){var i;return(i=this.media)==null?void 0:i.activeCuePoint}get cuePoints(){var i,a;return(a=(i=this.media)==null?void 0:i.cuePoints)!=null?a:[]}addChapters(i){var a;if(J(this,W,Pt).call(this),!this.media){Ee("underlying media element missing when trying to addChapters. chapters will not be added.");return}return(a=this.media)==null?void 0:a.addChapters(i)}get activeChapter(){var i;return(i=this.media)==null?void 0:i.activeChapter}get chapters(){var i,a;return(a=(i=this.media)==null?void 0:i.chapters)!=null?a:[]}getStartDate(){var i;return(i=this.media)==null?void 0:i.getStartDate()}get currentPdt(){var i;return(i=this.media)==null?void 0:i.currentPdt}get tokens(){let i=this.getAttribute(m.PLAYBACK_TOKEN),a=this.getAttribute(m.DRM_TOKEN),r=this.getAttribute(m.THUMBNAIL_TOKEN),o=this.getAttribute(m.STORYBOARD_TOKEN);return{...R(this,_o),...i!=null?{playback:i}:{},...a!=null?{drm:a}:{},...r!=null?{thumbnail:r}:{},...o!=null?{storyboard:o}:{}}}set tokens(i){de(this,_o,i!=null?i:{})}get playbackToken(){var i;return(i=this.getAttribute(m.PLAYBACK_TOKEN))!=null?i:void 0}set playbackToken(i){this.setAttribute(m.PLAYBACK_TOKEN,`${i}`)}get drmToken(){var i;return(i=this.getAttribute(m.DRM_TOKEN))!=null?i:void 0}set drmToken(i){this.setAttribute(m.DRM_TOKEN,`${i}`)}get thumbnailToken(){var i;return(i=this.getAttribute(m.THUMBNAIL_TOKEN))!=null?i:void 0}set thumbnailToken(i){this.setAttribute(m.THUMBNAIL_TOKEN,`${i}`)}get storyboardToken(){var i;return(i=this.getAttribute(m.STORYBOARD_TOKEN))!=null?i:void 0}set storyboardToken(i){this.setAttribute(m.STORYBOARD_TOKEN,`${i}`)}addTextTrack(i,a,r,o){var d;let s=(d=this.media)==null?void 0:d.nativeEl;if(s)return(0,O.addTextTrack)(s,i,a,r,o)}removeTextTrack(i){var r;let a=(r=this.media)==null?void 0:r.nativeEl;if(a)return(0,O.removeTextTrack)(a,i)}get textTracks(){var i;return(i=this.media)==null?void 0:i.textTracks}get castReceiver(){var i;return(i=this.getAttribute(m.CAST_RECEIVER))!=null?i:void 0}set castReceiver(i){i!==this.castReceiver&&(i?this.setAttribute(m.CAST_RECEIVER,i):this.removeAttribute(m.CAST_RECEIVER))}get castCustomData(){var i;return(i=this.media)==null?void 0:i.castCustomData}set castCustomData(i){if(!this.media){Ee("underlying media element missing when trying to set castCustomData. castCustomData will not be set.");return}this.media.castCustomData=i}get noTooltips(){return this.hasAttribute(m.NO_TOOLTIPS)}set noTooltips(i){if(!i){this.removeAttribute(m.NO_TOOLTIPS);return}this.setAttribute(m.NO_TOOLTIPS,"")}get proudlyDisplayMuxBadge(){return this.hasAttribute(m.PROUDLY_DISPLAY_MUX_BADGE)}set proudlyDisplayMuxBadge(i){i?this.setAttribute(m.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(m.PROUDLY_DISPLAY_MUX_BADGE)}get capRenditionToPlayerSize(){var i;return(i=this.media)==null?void 0:i.capRenditionToPlayerSize}set capRenditionToPlayerSize(i){if(!this.media){Ee("underlying media element missing when trying to set capRenditionToPlayerSize");return}this.media.capRenditionToPlayerSize=i}};go=new WeakMap,Ba=new WeakMap,_o=new WeakMap,oi=new WeakMap,Ao=new WeakMap,$a=new WeakMap,To=new WeakMap,yo=new WeakMap,Ni=new WeakMap,Wa=new WeakMap,Ui=new WeakMap,ko=new WeakMap,W=new WeakSet,Pt=function(){var i,a,r,o;if(!R(this,Ba)){de(this,Ba,!0),J(this,W,Pi).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof Se.HTMLElement))throw""}catch{Ee("<media-theme> failed to upgrade!")}try{customElements.upgrade(this.media)}catch{Ee("underlying media element failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof Al))throw""}catch{Ee("<media-controller> failed to upgrade!")}J(this,W,Mh).call(this),J(this,W,Lh).call(this),J(this,W,Ch).call(this),de(this,oi,(a=(i=this.mediaController)==null?void 0:i.hasAttribute(I.USER_INACTIVE))!=null?a:!0),J(this,W,wh).call(this),(r=this.media)==null||r.addEventListener("streamtypechange",R(this,To)),(o=this.media)==null||o.addEventListener("loadstart",R(this,yo))}},Ih=function(){var i,a;try{(i=window==null?void 0:window.CSS)==null||i.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),(a=window==null?void 0:window.CSS)==null||a.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch{}},fu=function(i){Object.assign(R(this,Ui),i),J(this,W,Pi).call(this)},Pi=function(i={}){Vm(Km(NE(this,{...R(this,Ui),...i})),this.shadowRoot)},Mh=function(){let i=a=>{var s,d;if(!(a!=null&&a.startsWith("theme-")))return;let r=a.replace(/^theme-/,"");if(cu.includes(r))return;let o=this.getAttribute(a);o!=null?(s=this.mediaTheme)==null||s.setAttribute(r,o):(d=this.mediaTheme)==null||d.removeAttribute(r)};de(this,$a,new MutationObserver(a=>{for(let{attributeName:r}of a)i(r)})),R(this,$a).observe(this,{attributes:!0}),this.getAttributeNames().forEach(i)},Lh=function(){this.addEventListener("error",R(this,ko)),this.media&&(this.media.errorTranslator=(i={})=>{var r,o,s;if(!(((r=this.media)==null?void 0:r.error)instanceof b.MediaError))return i;let a=Td((o=this.media)==null?void 0:o.error,!1);return{player_error_code:(s=this.media)==null?void 0:s.error.code,player_error_message:a.message?String(a.message):i.player_error_message,player_error_context:a.context?String(a.context):i.player_error_context}})},Ch=function(){var i,a,r,o;(a=(i=this.media)==null?void 0:i.textTracks)==null||a.addEventListener("addtrack",R(this,Ni)),(o=(r=this.media)==null?void 0:r.textTracks)==null||o.addEventListener("removetrack",R(this,Ni))},wh=function(){var y,A;if(!/Firefox/i.test(navigator.userAgent))return;let a,r=new WeakMap,o=()=>this.streamType===O.StreamTypes.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,s=(E,p,k=!1)=>{if(o())return;Array.from(E&&E.activeCues||[]).forEach(S=>{if(!(!S.snapToLines||S.line<-5||S.line>=0&&S.line<10))if(!p||this.paused){let C=S.text.split(`
3257
- `).length,j=-3;this.streamType===O.StreamTypes.LIVE&&(j=-2);let Ue=j-C;if(S.line===Ue&&!k)return;r.has(S)||r.set(S,S.line),S.line=Ue}else setTimeout(()=>{S.line=r.get(S)||"auto"},500)})},d=()=>{var E,p;s(a,(p=(E=this.mediaController)==null?void 0:E.hasAttribute(I.USER_INACTIVE))!=null?p:!1)},u=()=>{var k,g;let p=Array.from(((g=(k=this.mediaController)==null?void 0:k.media)==null?void 0:g.textTracks)||[]).filter(S=>["subtitles","captions"].includes(S.kind)&&S.mode==="showing")[0];p!==a&&(a==null||a.removeEventListener("cuechange",d)),a=p,a==null||a.addEventListener("cuechange",d),s(a,R(this,oi))};u(),(y=this.textTracks)==null||y.addEventListener("change",u),(A=this.textTracks)==null||A.addEventListener("addtrack",u);let f=()=>{var p,k;let E=(k=(p=this.mediaController)==null?void 0:p.hasAttribute(I.USER_INACTIVE))!=null?k:!0;R(this,oi)!==E&&(de(this,oi,E),s(a,R(this,oi)))};this.addEventListener("userinactivechange",f),de(this,Wa,()=>{var E,p;a==null||a.removeEventListener("cuechange",d),(E=this.textTracks)==null||E.removeEventListener("change",u),(p=this.textTracks)==null||p.removeEventListener("addtrack",u),this.removeEventListener("userinactivechange",f)})};function ri(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var KE=pu;
3259
+ `}return UE(t)};function HE(t){var i,a;let e=t.theme;if(e){let r=(a=(i=t.getRootNode())==null?void 0:i.getElementById)==null?void 0:a.call(i,e);if(r&&r instanceof HTMLTemplateElement)return r;e.startsWith("media-theme-")||(e=`media-theme-${e}`);let n=Se.customElements.get(e);if(n!=null&&n.template)return n.template}}function BE(t){var i;let e=(i=t.mediaController)==null?void 0:i.querySelector("media-time-display");return e&&getComputedStyle(e).getPropertyValue("--media-duration-display-display").trim()==="none"}function kh(t){let e=t.videoTitle?{video_title:t.videoTitle}:{};return t.getAttributeNames().filter(i=>i.startsWith("metadata-")).reduce((i,a)=>{let r=t.getAttribute(a);return r!==null&&(i[a.replace(/^metadata-/,"").replace(/-/g,"_")]=r),i},e)}var $E=Object.values(b.Attributes),WE=Object.values(Nt),FE=Object.values(m),mu=ns(),hu="mux-player",Sh={isDialogOpen:!1},VE={redundant_streams:!0},gn,Ba,_n,ni,An,$a,Tn,yn,Pi,Wa,Ui,kn,W,Pt,Ih,fu,Ni,Mh,Lh,Ch,wh,pu=class extends md{constructor(){super();ae(this,W);ae(this,gn);ae(this,Ba,!1);ae(this,_n,{});ae(this,ni,!0);ae(this,An,new rs(this,"hotkeys"));ae(this,$a);ae(this,Tn,()=>J(this,W,Ni).call(this));ae(this,yn,()=>J(this,W,Ni).call(this));ae(this,Pi,()=>J(this,W,Ni).call(this));ae(this,Wa);ae(this,Ui,{...Sh,onCloseErrorDialog:i=>{var r;((r=i.composedPath()[0])==null?void 0:r.localName)==="media-error-dialog"&&J(this,W,fu).call(this,{isDialogOpen:!1})},onFocusInErrorDialog:i=>{var n;if(((n=i.composedPath()[0])==null?void 0:n.localName)!=="media-error-dialog")return;dd(this,oi.activeElement)||i.preventDefault()}});ae(this,kn,i=>{var n;let a=(n=this.media)==null?void 0:n.error;if(!(a instanceof b.MediaError)){let{message:s,code:d}=a!=null?a:{};a=new b.MediaError(s,d)}if(!(a!=null&&a.fatal)){mt(a),a.data&&mt(`${a.name} data:`,a.data);return}let r=Td(a,!1);r.message&&ud(r),Ee(a),a.data&&Ee(`${a.name} data:`,a.data),J(this,W,fu).call(this,{isDialogOpen:!0})});ue(this,gn,(0,O.generatePlayerInitTime)()),this.attachShadow({mode:"open"}),J(this,W,Ih).call(this),this.isConnected&&J(this,W,Pt).call(this)}static get NAME(){return hu}static get VERSION(){return mu}static get observedAttributes(){var i;return[...(i=md.observedAttributes)!=null?i:[],...WE,...$E,...FE]}get mediaTheme(){var i;return(i=this.shadowRoot)==null?void 0:i.querySelector("media-theme")}get mediaController(){var i,a;return(a=(i=this.mediaTheme)==null?void 0:i.shadowRoot)==null?void 0:a.querySelector("media-controller")}connectedCallback(){J(this,W,Pt).call(this);let i=this.media;i&&(i.metadata=kh(this))}disconnectedCallback(){var i,a,r,n,s,d,u,f;(i=R(this,$a))==null||i.disconnect(),(a=this.media)==null||a.removeEventListener("streamtypechange",R(this,Tn)),(r=this.media)==null||r.removeEventListener("loadstart",R(this,yn)),this.removeEventListener("error",R(this,kn)),this.media&&(this.media.errorTranslator=void 0),(s=(n=this.media)==null?void 0:n.textTracks)==null||s.removeEventListener("addtrack",R(this,Pi)),(u=(d=this.media)==null?void 0:d.textTracks)==null||u.removeEventListener("removetrack",R(this,Pi)),(f=R(this,Wa))==null||f.call(this),ue(this,Wa,void 0),ue(this,Ba,!1)}attributeChangedCallback(i,a,r){switch(J(this,W,Pt).call(this),super.attributeChangedCallback(i,a,r),i){case m.HOTKEYS:R(this,An).value=r;break;case m.THUMBNAIL_TIME:{r!=null&&this.tokens.thumbnail&&mt((0,O.i18n)("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break}case m.THUMBNAIL_TOKEN:{if(r){let s=(0,O.parseJwt)(r);if(s){let{aud:d}=s,u=O.MuxJWTAud.THUMBNAIL;d!==u&&mt((0,O.i18n)("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:d,expectedAud:u,tokenNamePrefix:"thumbnail"}))}}break}case m.STORYBOARD_TOKEN:{if(r){let s=(0,O.parseJwt)(r);if(s){let{aud:d}=s,u=O.MuxJWTAud.STORYBOARD;d!==u&&mt((0,O.i18n)("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:d,expectedAud:u,tokenNamePrefix:"storyboard"}))}}break}case m.DRM_TOKEN:{if(r){let s=(0,O.parseJwt)(r);if(s){let{aud:d}=s,u=O.MuxJWTAud.DRM;d!==u&&mt((0,O.i18n)("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:d,expectedAud:u,tokenNamePrefix:"drm"}))}}break}case b.Attributes.PLAYBACK_ID:{r!=null&&r.includes("?token")&&Ee((0,O.i18n)("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:r}));break}case b.Attributes.STREAM_TYPE:{r&&![O.StreamTypes.LIVE,O.StreamTypes.ON_DEMAND,O.StreamTypes.UNKNOWN].includes(r)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=r.includes("dvr")?Number.POSITIVE_INFINITY:0:ud({file:"invalid-stream-type.md",message:(0,O.i18n)("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):r===O.StreamTypes.LIVE?this.getAttribute(m.TARGET_LIVE_WINDOW)==null&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN;break}case m.FULLSCREEN_ELEMENT:{if(r!=null||r!==a){let s=oi.getElementById(r),d=s==null?void 0:s.querySelector("mux-player");this.mediaController&&s&&d&&(this.mediaController.fullscreenElement=s)}break}case b.Attributes.CAP_RENDITION_TO_PLAYER_SIZE:{(r==null||r!==a)&&(this.capRenditionToPlayerSize=r!=null?!0:void 0);break}}[b.Attributes.PLAYBACK_ID,Nt.SRC,m.PLAYBACK_TOKEN].includes(i)&&a!==r&&ue(this,Ui,{...R(this,Ui),...Sh}),J(this,W,Ni).call(this,{[ym(i)]:r})}async requestFullscreen(i){var a;if(!(!this.mediaController||this.mediaController.hasAttribute(o.MEDIA_IS_FULLSCREEN)))return(a=this.mediaController)==null||a.dispatchEvent(new Se.CustomEvent(h.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((r,n)=>{var s;(s=this.mediaController)==null||s.addEventListener(Ie.MEDIA_IS_FULLSCREEN,()=>r(),{once:!0})})}async exitFullscreen(){var i;if(!(!this.mediaController||!this.mediaController.hasAttribute(o.MEDIA_IS_FULLSCREEN)))return(i=this.mediaController)==null||i.dispatchEvent(new Se.CustomEvent(h.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((a,r)=>{var n;(n=this.mediaController)==null||n.addEventListener(Ie.MEDIA_IS_FULLSCREEN,()=>a(),{once:!0})})}get preferCmcd(){var i;return(i=this.getAttribute(b.Attributes.PREFER_CMCD))!=null?i:void 0}set preferCmcd(i){i!==this.preferCmcd&&(i?O.CmcdTypeValues.includes(i)?this.setAttribute(b.Attributes.PREFER_CMCD,i):mt(`Invalid value for preferCmcd. Must be one of ${O.CmcdTypeValues.join()}`):this.removeAttribute(b.Attributes.PREFER_CMCD))}get hasPlayed(){var i,a;return(a=(i=this.mediaController)==null?void 0:i.hasAttribute(o.MEDIA_HAS_PLAYED))!=null?a:!1}get inLiveWindow(){var i;return(i=this.mediaController)==null?void 0:i.hasAttribute(o.MEDIA_TIME_IS_LIVE)}get _hls(){var i;return(i=this.media)==null?void 0:i._hls}get mux(){var i;return(i=this.media)==null?void 0:i.mux}get theme(){var i;return(i=this.getAttribute(m.THEME))!=null?i:NE}set theme(i){this.setAttribute(m.THEME,`${i}`)}get themeProps(){let i=this.mediaTheme;if(!i)return;let a={};for(let r of i.getAttributeNames()){if(cu.includes(r))continue;let n=i.getAttribute(r);a[as(r)]=n===""?!0:n}return a}set themeProps(i){var r,n;J(this,W,Pt).call(this);let a={...this.themeProps,...i};for(let s in a){if(cu.includes(s))continue;let d=i==null?void 0:i[s];typeof d=="boolean"||d==null?(r=this.mediaTheme)==null||r.toggleAttribute(is(s),!!d):(n=this.mediaTheme)==null||n.setAttribute(is(s),d)}}get playbackId(){var i;return(i=this.getAttribute(b.Attributes.PLAYBACK_ID))!=null?i:void 0}set playbackId(i){i?this.setAttribute(b.Attributes.PLAYBACK_ID,i):this.removeAttribute(b.Attributes.PLAYBACK_ID)}get src(){var i,a;return this.playbackId?(i=Qe(this,Nt.SRC))!=null?i:void 0:(a=this.getAttribute(Nt.SRC))!=null?a:void 0}set src(i){i?this.setAttribute(Nt.SRC,i):this.removeAttribute(Nt.SRC)}get poster(){var r;let i=this.getAttribute(Nt.POSTER);if(i!=null)return i;let{tokens:a}=this;if(a.playback&&!a.thumbnail){mt("Missing expected thumbnail token. No poster image will be shown");return}if(this.playbackId&&!this.audio)return Am(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(r=this.thumbnailTime)!=null?r:this.startTime,programTime:this.programStartTime,token:a.thumbnail})}set poster(i){i||i===""?this.setAttribute(Nt.POSTER,i):this.removeAttribute(Nt.POSTER)}get storyboardSrc(){var i;return(i=this.getAttribute(m.STORYBOARD_SRC))!=null?i:void 0}set storyboardSrc(i){i?this.setAttribute(m.STORYBOARD_SRC,i):this.removeAttribute(m.STORYBOARD_SRC)}get storyboard(){let{tokens:i}=this;if(this.storyboardSrc&&!i.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[O.StreamTypes.LIVE,O.StreamTypes.UNKNOWN].includes(this.streamType)||i.playback&&!i.storyboard))return Tm(this.playbackId,{customDomain:this.customDomain,token:i.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}get audio(){return this.hasAttribute(m.AUDIO)}set audio(i){if(!i){this.removeAttribute(m.AUDIO);return}this.setAttribute(m.AUDIO,"")}get hotkeys(){return R(this,An)}get nohotkeys(){return this.hasAttribute(m.NOHOTKEYS)}set nohotkeys(i){if(!i){this.removeAttribute(m.NOHOTKEYS);return}this.setAttribute(m.NOHOTKEYS,"")}get thumbnailTime(){return de(this.getAttribute(m.THUMBNAIL_TIME))}set thumbnailTime(i){this.setAttribute(m.THUMBNAIL_TIME,`${i}`)}get videoTitle(){var i,a;return(a=(i=this.getAttribute(m.VIDEO_TITLE))!=null?i:this.getAttribute(m.TITLE))!=null?a:""}set videoTitle(i){i!==this.videoTitle&&(i?this.setAttribute(m.VIDEO_TITLE,i):this.removeAttribute(m.VIDEO_TITLE))}get placeholder(){var i;return(i=Qe(this,m.PLACEHOLDER))!=null?i:""}set placeholder(i){this.setAttribute(m.PLACEHOLDER,`${i}`)}get primaryColor(){var a,r;let i=this.getAttribute(m.PRIMARY_COLOR);if(i!=null||this.mediaTheme&&(i=(r=(a=Se.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_primary-color"))==null?void 0:r.trim(),i))return i}set primaryColor(i){this.setAttribute(m.PRIMARY_COLOR,`${i}`)}get secondaryColor(){var a,r;let i=this.getAttribute(m.SECONDARY_COLOR);if(i!=null||this.mediaTheme&&(i=(r=(a=Se.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_secondary-color"))==null?void 0:r.trim(),i))return i}set secondaryColor(i){this.setAttribute(m.SECONDARY_COLOR,`${i}`)}get accentColor(){var a,r;let i=this.getAttribute(m.ACCENT_COLOR);if(i!=null||this.mediaTheme&&(i=(r=(a=Se.getComputedStyle(this.mediaTheme))==null?void 0:a.getPropertyValue("--_accent-color"))==null?void 0:r.trim(),i))return i}set accentColor(i){this.setAttribute(m.ACCENT_COLOR,`${i}`)}get defaultShowRemainingTime(){return this.hasAttribute(m.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(i){i?this.setAttribute(m.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(m.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(m.PLAYBACK_RATES))return this.getAttribute(m.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(i=>Number(i)).filter(i=>!Number.isNaN(i)).sort((i,a)=>i-a)}set playbackRates(i){if(!i){this.removeAttribute(m.PLAYBACK_RATES);return}this.setAttribute(m.PLAYBACK_RATES,i.join(" "))}get forwardSeekOffset(){var i;return(i=de(this.getAttribute(m.FORWARD_SEEK_OFFSET)))!=null?i:10}set forwardSeekOffset(i){this.setAttribute(m.FORWARD_SEEK_OFFSET,`${i}`)}get backwardSeekOffset(){var i;return(i=de(this.getAttribute(m.BACKWARD_SEEK_OFFSET)))!=null?i:10}set backwardSeekOffset(i){this.setAttribute(m.BACKWARD_SEEK_OFFSET,`${i}`)}get defaultHiddenCaptions(){return this.hasAttribute(m.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(i){i?this.setAttribute(m.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(m.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return de(this.getAttribute(m.DEFAULT_DURATION))}set defaultDuration(i){i==null?this.removeAttribute(m.DEFAULT_DURATION):this.setAttribute(m.DEFAULT_DURATION,`${i}`)}get playerInitTime(){return this.hasAttribute(b.Attributes.PLAYER_INIT_TIME)?de(this.getAttribute(b.Attributes.PLAYER_INIT_TIME)):R(this,gn)}set playerInitTime(i){i!=this.playerInitTime&&(i==null?this.removeAttribute(b.Attributes.PLAYER_INIT_TIME):this.setAttribute(b.Attributes.PLAYER_INIT_TIME,`${+i}`))}get playerSoftwareName(){var i;return(i=this.getAttribute(b.Attributes.PLAYER_SOFTWARE_NAME))!=null?i:hu}get playerSoftwareVersion(){var i;return(i=this.getAttribute(b.Attributes.PLAYER_SOFTWARE_VERSION))!=null?i:mu}get beaconCollectionDomain(){var i;return(i=this.getAttribute(b.Attributes.BEACON_COLLECTION_DOMAIN))!=null?i:void 0}set beaconCollectionDomain(i){i!==this.beaconCollectionDomain&&(i?this.setAttribute(b.Attributes.BEACON_COLLECTION_DOMAIN,i):this.removeAttribute(b.Attributes.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var i;return(i=this.getAttribute(b.Attributes.MAX_RESOLUTION))!=null?i:void 0}set maxResolution(i){i!==this.maxResolution&&(i?this.setAttribute(b.Attributes.MAX_RESOLUTION,i):this.removeAttribute(b.Attributes.MAX_RESOLUTION))}get minResolution(){var i;return(i=this.getAttribute(b.Attributes.MIN_RESOLUTION))!=null?i:void 0}set minResolution(i){i!==this.minResolution&&(i?this.setAttribute(b.Attributes.MIN_RESOLUTION,i):this.removeAttribute(b.Attributes.MIN_RESOLUTION))}get maxAutoResolution(){var i;return(i=this.getAttribute(b.Attributes.MAX_AUTO_RESOLUTION))!=null?i:void 0}set maxAutoResolution(i){i==null?this.removeAttribute(b.Attributes.MAX_AUTO_RESOLUTION):this.setAttribute(b.Attributes.MAX_AUTO_RESOLUTION,i)}get renditionOrder(){var i;return(i=this.getAttribute(b.Attributes.RENDITION_ORDER))!=null?i:void 0}set renditionOrder(i){i!==this.renditionOrder&&(i?this.setAttribute(b.Attributes.RENDITION_ORDER,i):this.removeAttribute(b.Attributes.RENDITION_ORDER))}get programStartTime(){return de(this.getAttribute(b.Attributes.PROGRAM_START_TIME))}set programStartTime(i){i==null?this.removeAttribute(b.Attributes.PROGRAM_START_TIME):this.setAttribute(b.Attributes.PROGRAM_START_TIME,`${i}`)}get programEndTime(){return de(this.getAttribute(b.Attributes.PROGRAM_END_TIME))}set programEndTime(i){i==null?this.removeAttribute(b.Attributes.PROGRAM_END_TIME):this.setAttribute(b.Attributes.PROGRAM_END_TIME,`${i}`)}get assetStartTime(){return de(this.getAttribute(b.Attributes.ASSET_START_TIME))}set assetStartTime(i){i==null?this.removeAttribute(b.Attributes.ASSET_START_TIME):this.setAttribute(b.Attributes.ASSET_START_TIME,`${i}`)}get assetEndTime(){return de(this.getAttribute(b.Attributes.ASSET_END_TIME))}set assetEndTime(i){i==null?this.removeAttribute(b.Attributes.ASSET_END_TIME):this.setAttribute(b.Attributes.ASSET_END_TIME,`${i}`)}get extraSourceParams(){return this.hasAttribute(m.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(m.EXTRA_SOURCE_PARAMS)).entries()].reduce((i,[a,r])=>(i[a]=r,i),{}):VE}set extraSourceParams(i){i==null?this.removeAttribute(m.EXTRA_SOURCE_PARAMS):this.setAttribute(m.EXTRA_SOURCE_PARAMS,new URLSearchParams(i).toString())}get customDomain(){var i;return(i=this.getAttribute(b.Attributes.CUSTOM_DOMAIN))!=null?i:void 0}set customDomain(i){i!==this.customDomain&&(i?this.setAttribute(b.Attributes.CUSTOM_DOMAIN,i):this.removeAttribute(b.Attributes.CUSTOM_DOMAIN))}get envKey(){var i;return(i=Qe(this,b.Attributes.ENV_KEY))!=null?i:void 0}set envKey(i){this.setAttribute(b.Attributes.ENV_KEY,`${i}`)}get noVolumePref(){return this.hasAttribute(m.NO_VOLUME_PREF)}set noVolumePref(i){i?this.setAttribute(m.NO_VOLUME_PREF,""):this.removeAttribute(m.NO_VOLUME_PREF)}get noMutedPref(){return this.hasAttribute(m.NO_MUTED_PREF)}set noMutedPref(i){i?this.setAttribute(m.NO_MUTED_PREF,""):this.removeAttribute(m.NO_MUTED_PREF)}get debug(){return Qe(this,b.Attributes.DEBUG)!=null}set debug(i){i?this.setAttribute(b.Attributes.DEBUG,""):this.removeAttribute(b.Attributes.DEBUG)}get disableTracking(){return Qe(this,b.Attributes.DISABLE_TRACKING)!=null}set disableTracking(i){this.toggleAttribute(b.Attributes.DISABLE_TRACKING,!!i)}get disableCookies(){return Qe(this,b.Attributes.DISABLE_COOKIES)!=null}set disableCookies(i){i?this.setAttribute(b.Attributes.DISABLE_COOKIES,""):this.removeAttribute(b.Attributes.DISABLE_COOKIES)}get streamType(){var i,a,r;return(r=(a=this.getAttribute(b.Attributes.STREAM_TYPE))!=null?a:(i=this.media)==null?void 0:i.streamType)!=null?r:O.StreamTypes.UNKNOWN}set streamType(i){this.setAttribute(b.Attributes.STREAM_TYPE,`${i}`)}get defaultStreamType(){var i,a,r;return(r=(a=this.getAttribute(m.DEFAULT_STREAM_TYPE))!=null?a:(i=this.mediaController)==null?void 0:i.getAttribute(m.DEFAULT_STREAM_TYPE))!=null?r:O.StreamTypes.ON_DEMAND}set defaultStreamType(i){i?this.setAttribute(m.DEFAULT_STREAM_TYPE,i):this.removeAttribute(m.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var i,a;return this.hasAttribute(m.TARGET_LIVE_WINDOW)?+this.getAttribute(m.TARGET_LIVE_WINDOW):(a=(i=this.media)==null?void 0:i.targetLiveWindow)!=null?a:Number.NaN}set targetLiveWindow(i){i==this.targetLiveWindow||Number.isNaN(i)&&Number.isNaN(this.targetLiveWindow)||(i==null?this.removeAttribute(m.TARGET_LIVE_WINDOW):this.setAttribute(m.TARGET_LIVE_WINDOW,`${+i}`))}get liveEdgeStart(){var i;return(i=this.media)==null?void 0:i.liveEdgeStart}get startTime(){return de(Qe(this,b.Attributes.START_TIME))}set startTime(i){this.setAttribute(b.Attributes.START_TIME,`${i}`)}get initialBandwidthEstimateKbps(){return de(Qe(this,b.Attributes.INITIAL_BANDWIDTH_ESTIMATE_KBPS))}set initialBandwidthEstimateKbps(i){i==null?this.removeAttribute(b.Attributes.INITIAL_BANDWIDTH_ESTIMATE_KBPS):this.setAttribute(b.Attributes.INITIAL_BANDWIDTH_ESTIMATE_KBPS,`${i}`)}get initialEstimateSegments(){return de(Qe(this,b.Attributes.INITIAL_ESTIMATE_SEGMENTS))}set initialEstimateSegments(i){i==null?this.removeAttribute(b.Attributes.INITIAL_ESTIMATE_SEGMENTS):this.setAttribute(b.Attributes.INITIAL_ESTIMATE_SEGMENTS,`${i}`)}get minPreloadSegments(){return de(Qe(this,b.Attributes.MIN_PRELOAD_SEGMENTS))}set minPreloadSegments(i){i==null?this.removeAttribute(b.Attributes.MIN_PRELOAD_SEGMENTS):this.setAttribute(b.Attributes.MIN_PRELOAD_SEGMENTS,`${i}`)}get preferPlayback(){let i=this.getAttribute(b.Attributes.PREFER_PLAYBACK);if(i===O.PlaybackTypes.MSE||i===O.PlaybackTypes.NATIVE)return i}set preferPlayback(i){i!==this.preferPlayback&&(i===O.PlaybackTypes.MSE||i===O.PlaybackTypes.NATIVE?this.setAttribute(b.Attributes.PREFER_PLAYBACK,i):this.removeAttribute(b.Attributes.PREFER_PLAYBACK))}get metadata(){var i;return(i=this.media)==null?void 0:i.metadata}set metadata(i){if(J(this,W,Pt).call(this),!this.media){Ee("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...kh(this),...i}}get _hlsConfig(){var i;return(i=this.media)==null?void 0:i._hlsConfig}set _hlsConfig(i){if(J(this,W,Pt).call(this),!this.media){Ee("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.");return}this.media._hlsConfig=i}async addCuePoints(i){var a;if(J(this,W,Pt).call(this),!this.media){Ee("underlying media element missing when trying to addCuePoints. cuePoints will not be added.");return}return(a=this.media)==null?void 0:a.addCuePoints(i)}get activeCuePoint(){var i;return(i=this.media)==null?void 0:i.activeCuePoint}get cuePoints(){var i,a;return(a=(i=this.media)==null?void 0:i.cuePoints)!=null?a:[]}addChapters(i){var a;if(J(this,W,Pt).call(this),!this.media){Ee("underlying media element missing when trying to addChapters. chapters will not be added.");return}return(a=this.media)==null?void 0:a.addChapters(i)}get activeChapter(){var i;return(i=this.media)==null?void 0:i.activeChapter}get chapters(){var i,a;return(a=(i=this.media)==null?void 0:i.chapters)!=null?a:[]}getStartDate(){var i;return(i=this.media)==null?void 0:i.getStartDate()}get currentPdt(){var i;return(i=this.media)==null?void 0:i.currentPdt}get tokens(){let i=this.getAttribute(m.PLAYBACK_TOKEN),a=this.getAttribute(m.DRM_TOKEN),r=this.getAttribute(m.THUMBNAIL_TOKEN),n=this.getAttribute(m.STORYBOARD_TOKEN);return{...R(this,_n),...i!=null?{playback:i}:{},...a!=null?{drm:a}:{},...r!=null?{thumbnail:r}:{},...n!=null?{storyboard:n}:{}}}set tokens(i){ue(this,_n,i!=null?i:{})}get playbackToken(){var i;return(i=this.getAttribute(m.PLAYBACK_TOKEN))!=null?i:void 0}set playbackToken(i){this.setAttribute(m.PLAYBACK_TOKEN,`${i}`)}get drmToken(){var i;return(i=this.getAttribute(m.DRM_TOKEN))!=null?i:void 0}set drmToken(i){this.setAttribute(m.DRM_TOKEN,`${i}`)}get thumbnailToken(){var i;return(i=this.getAttribute(m.THUMBNAIL_TOKEN))!=null?i:void 0}set thumbnailToken(i){this.setAttribute(m.THUMBNAIL_TOKEN,`${i}`)}get storyboardToken(){var i;return(i=this.getAttribute(m.STORYBOARD_TOKEN))!=null?i:void 0}set storyboardToken(i){this.setAttribute(m.STORYBOARD_TOKEN,`${i}`)}addTextTrack(i,a,r,n){var d;let s=(d=this.media)==null?void 0:d.nativeEl;if(s)return(0,O.addTextTrack)(s,i,a,r,n)}removeTextTrack(i){var r;let a=(r=this.media)==null?void 0:r.nativeEl;if(a)return(0,O.removeTextTrack)(a,i)}get textTracks(){var i;return(i=this.media)==null?void 0:i.textTracks}get castReceiver(){var i;return(i=this.getAttribute(m.CAST_RECEIVER))!=null?i:void 0}set castReceiver(i){i!==this.castReceiver&&(i?this.setAttribute(m.CAST_RECEIVER,i):this.removeAttribute(m.CAST_RECEIVER))}get castCustomData(){var i;return(i=this.media)==null?void 0:i.castCustomData}set castCustomData(i){if(!this.media){Ee("underlying media element missing when trying to set castCustomData. castCustomData will not be set.");return}this.media.castCustomData=i}get noTooltips(){return this.hasAttribute(m.NO_TOOLTIPS)}set noTooltips(i){if(!i){this.removeAttribute(m.NO_TOOLTIPS);return}this.setAttribute(m.NO_TOOLTIPS,"")}get proudlyDisplayMuxBadge(){return this.hasAttribute(m.PROUDLY_DISPLAY_MUX_BADGE)}set proudlyDisplayMuxBadge(i){i?this.setAttribute(m.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(m.PROUDLY_DISPLAY_MUX_BADGE)}get capRenditionToPlayerSize(){var i;return(i=this.media)==null?void 0:i.capRenditionToPlayerSize}set capRenditionToPlayerSize(i){if(!this.media){Ee("underlying media element missing when trying to set capRenditionToPlayerSize");return}this.media.capRenditionToPlayerSize=i}};gn=new WeakMap,Ba=new WeakMap,_n=new WeakMap,ni=new WeakMap,An=new WeakMap,$a=new WeakMap,Tn=new WeakMap,yn=new WeakMap,Pi=new WeakMap,Wa=new WeakMap,Ui=new WeakMap,kn=new WeakMap,W=new WeakSet,Pt=function(){var i,a,r,n;if(!R(this,Ba)){ue(this,Ba,!0),J(this,W,Ni).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof Se.HTMLElement))throw""}catch{Ee("<media-theme> failed to upgrade!")}try{customElements.upgrade(this.media)}catch{Ee("underlying media element failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof Al))throw""}catch{Ee("<media-controller> failed to upgrade!")}J(this,W,Mh).call(this),J(this,W,Lh).call(this),J(this,W,Ch).call(this),ue(this,ni,(a=(i=this.mediaController)==null?void 0:i.hasAttribute(I.USER_INACTIVE))!=null?a:!0),J(this,W,wh).call(this),(r=this.media)==null||r.addEventListener("streamtypechange",R(this,Tn)),(n=this.media)==null||n.addEventListener("loadstart",R(this,yn))}},Ih=function(){var i,a;try{(i=window==null?void 0:window.CSS)==null||i.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),(a=window==null?void 0:window.CSS)==null||a.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch{}},fu=function(i){Object.assign(R(this,Ui),i),J(this,W,Ni).call(this)},Ni=function(i={}){Vm(Km(PE(this,{...R(this,Ui),...i})),this.shadowRoot)},Mh=function(){let i=a=>{var s,d;if(!(a!=null&&a.startsWith("theme-")))return;let r=a.replace(/^theme-/,"");if(cu.includes(r))return;let n=this.getAttribute(a);n!=null?(s=this.mediaTheme)==null||s.setAttribute(r,n):(d=this.mediaTheme)==null||d.removeAttribute(r)};ue(this,$a,new MutationObserver(a=>{for(let{attributeName:r}of a)i(r)})),R(this,$a).observe(this,{attributes:!0}),this.getAttributeNames().forEach(i)},Lh=function(){this.addEventListener("error",R(this,kn)),this.media&&(this.media.errorTranslator=(i={})=>{var r,n,s;if(!(((r=this.media)==null?void 0:r.error)instanceof b.MediaError))return i;let a=Td((n=this.media)==null?void 0:n.error,!1);return{player_error_code:(s=this.media)==null?void 0:s.error.code,player_error_message:a.message?String(a.message):i.player_error_message,player_error_context:a.context?String(a.context):i.player_error_context}})},Ch=function(){var i,a,r,n;(a=(i=this.media)==null?void 0:i.textTracks)==null||a.addEventListener("addtrack",R(this,Pi)),(n=(r=this.media)==null?void 0:r.textTracks)==null||n.addEventListener("removetrack",R(this,Pi))},wh=function(){var y,A;if(!/Firefox/i.test(navigator.userAgent))return;let a,r=new WeakMap,n=()=>this.streamType===O.StreamTypes.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,s=(E,p,k=!1)=>{if(n())return;Array.from(E&&E.activeCues||[]).forEach(S=>{if(!(!S.snapToLines||S.line<-5||S.line>=0&&S.line<10))if(!p||this.paused){let C=S.text.split(`
3260
+ `).length,j=-3;this.streamType===O.StreamTypes.LIVE&&(j=-2);let Ue=j-C;if(S.line===Ue&&!k)return;r.has(S)||r.set(S,S.line),S.line=Ue}else setTimeout(()=>{S.line=r.get(S)||"auto"},500)})},d=()=>{var E,p;s(a,(p=(E=this.mediaController)==null?void 0:E.hasAttribute(I.USER_INACTIVE))!=null?p:!1)},u=()=>{var k,g;let p=Array.from(((g=(k=this.mediaController)==null?void 0:k.media)==null?void 0:g.textTracks)||[]).filter(S=>["subtitles","captions"].includes(S.kind)&&S.mode==="showing")[0];p!==a&&(a==null||a.removeEventListener("cuechange",d)),a=p,a==null||a.addEventListener("cuechange",d),s(a,R(this,ni))};u(),(y=this.textTracks)==null||y.addEventListener("change",u),(A=this.textTracks)==null||A.addEventListener("addtrack",u);let f=()=>{var p,k;let E=(k=(p=this.mediaController)==null?void 0:p.hasAttribute(I.USER_INACTIVE))!=null?k:!0;R(this,ni)!==E&&(ue(this,ni,E),s(a,R(this,ni)))};this.addEventListener("userinactivechange",f),ue(this,Wa,()=>{var E,p;a==null||a.removeEventListener("cuechange",d),(E=this.textTracks)==null||E.removeEventListener("change",u),(p=this.textTracks)==null||p.removeEventListener("addtrack",u),this.removeEventListener("userinactivechange",f)})};function Qe(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var KE=pu;