1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2841],{2841:(e,t,i)=>{let a,r,n,s,o;i.r(t),i.d(t,{VideoPlayer:()=>Iy});var l=i(95155),d=i(19749);let u={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_TOGGLE_SUBTITLES_REQUEST:"mediatogglesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_AUDIO_TRACK_REQUEST:"mediaaudiotrackrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},c={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},h={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_BUFFERED:"mediaBuffered",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_CHAPTERS_CUES:"mediaChaptersCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_P
1LAYED:"mediaHasPlayed",MEDIA_HEIGHT:"mediaHeight",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_IS_PIP:"mediaIsPip",MEDIA_LOADING:"mediaLoading",MEDIA_MUTED:"mediaMuted",MEDIA_PAUSED:"mediaPaused",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_WIDTH:"mediaWidth"},m=Object.entries(h),v=m.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{}),b=m.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"});Object.entries(b).reduce((e,[t,i])=>{let a=v[t];return a&&(e[i]=a),e},{userinactivechange:"userinactive"});let g=Object.entries(v).reduce((e,[t,i])=>{let a=b[t];return a&&(e[i]=a),e},{userinactive:"userinactivechange"}),E="subtitles",f="captions",y="disabled",_="showing",k="unavailable",A="unsupported",w={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"};function T(e){if(e){let{id:t,width:i,height:a}=e;return[t,i,a].filter(e=>null!=e).join(":")}}function I(e){if(e){let[t,i,a]=e.split(":");return{id:t,width:+i,height:+a}}}function S(e){if(e){let{id:t,kind:i,language:a,label:r}=e;return[t,i,a,r].filter(e=>null!=e).join(":")}}function C(e){if(e){let[t,i,a,r]=e.split(":");return{id:t,kind:i,language:a,label:r}}}function M(e){return"number"==typeof e&&!Number.isNaN(e)&&Number.isFinite(e)}function L(e){return"string"==typeof e&&!isNaN(e)&&!isNaN(parseFloat(e))}let R=e=>new Promise(t=>setTimeout(t,e)),x=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],D=e=>{if(!M(e))return"";let t=Math.abs(e),i=t!==e,a=new Date(0,0,0,0,0,t,0),r=[a.getHours(),a.getMinutes(),a.getSeconds()].map((e,t)=>{let i;return e&&(i=1===e?x[t].singular:x[t].plural,`${e} ${i}`)}).filter(e=>e).join(", ");return`${r}${i?" remaining":""}`};function P(e,t){let i=!1;e<0&&(i=!0,e=0-e);let a=Math.floor((e=e<0?0:e)%60),r=Math.floor(e/60%60),n=Math.floor(e/3600),s=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=r=a="0"),r=(((n=n>0||o>0?n+":":"")||s>=10)&&r<10?"0"+r:r)+":",(i?"-":"")+n+r+(a=a<10?"0"+a:a)}Object.freeze({length:0,start(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0}});let N={en:{"Start airplay":"Start airplay","Stop airplay":"Stop airplay",Audio:"Audio",Captions:"Captions","Enable captions":"Enable captions","Disable captions":"Disable captions","Start casting":"Start casting","Stop casting":"Stop casting","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",Mute:"Mute",Unmute:"Unmute","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",live:"live",Off:"Off","start airplay":"start airplay","stop airplay":"stop airplay","start casting":"start casting","stop casting":"stop casting","enter fullscreen mode":"enter fullscreen mode","exit fullscreen mode":"exit fullscreen mode","enter picture in picture mode":"enter picture in picture mode","exit picture in picture mode":"exit picture in picture mode","seek to live":"seek to live","playing live":"playing live","seek back {seekOffset} seconds":"seek back {seekOffset} seconds","seek forward {seekOffset} seconds":"seek forward {seekOffset} seconds","Network Error":"Network Error","Decode Error":"Decode Error","S
1ource 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."}},O=(null==(ow=globalThis.navigator)?void 0:ow.language)||"en",U=(e,t={})=>(e=>{var t,i,a;let[r]=O.split("-");return(null==(t=N[O])?void 0:t[e])||(null==(i=N[r])?void 0:i[e])||(null==(a=N.en)?void 0:a[e])||e})(e).replace(/\{(\w+)\}/g,(e,i)=>i in t?String(t[i]):`{${i}}`);class H{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}}class W extends H{}class B extends W{constructor(){super(...arguments),this.role=null}}class ${observe(){}unobserve(){}disconnect(){}}let V={createElement:function(){return new q.HTMLElement},createElementNS:function(){return new q.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent:e=>!1},q={ResizeObserver:$,document:V,Node:W,Element:B,HTMLElement:class extends B{constructor(){super(...arguments),this.innerHTML=""}get content(){return new q.DocumentFragment}},DocumentFragment:class extends H{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem:e=>null,setItem(e,t){},removeItem(e){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia:e=>({matches:!1,media:e}),DOMParser:class{parseFromString(e,t){return{body:{textContent:e}}}}},F="u"<typeof window||void 0===window.customElements,G=Object.keys(q).every(e=>e in globalThis),K=F&&!G?q:globalThis,j=F&&!G?V:globalThis.document,Y=new WeakMap,Q=e=>{let t=Y.get(e);return t||Y.set(e,t=new Set),t},z=new K.ResizeObserver(e=>{for(let t of e)for(let e of Q(t.target))e(t)});function Z(e,t){Q(e).add(t),z.observe(e)}function X(e,t){let i=Q(e);i.delete(t),i.size||z.unobserve(e)}function J(e){let t={};for(let i of e)t[i.name]=i.value;return t}function ee(e){var t;return null!=(t=et(e))?t:en(e,"media-controller")}function et(e){var t;let{MEDIA_CONTROLLER:i}=c,a=e.getAttribute(i);if(a)return null==(t=eo(e))?void 0:t.getElementById(a)}let ei=(e,t,i=".value")=>{let a=e.querySelector(i);a&&(a.textContent=t)},ea=(e,t)=>{let i,a;return(i=`slot[name="${t}"]`,!(a=e.shadowRoot.querySelector(i))?[]:a.children)[0]},er=(e,t)=>!!e&&!!t&&(null!=e&&!!e.contains(t)||er(e,t.getRootNode().host)),en=(e,t)=>{if(!e)return null;let i=e.closest(t);return i||en(e.getRootNode().host,t)};function es(e=document){var t;let i=null==e?void 0:e.activeElement;return i?null!=(t=es(i.shadowRoot))?t:i:null}function eo(e){var t;let i=null==(t=null==e?void 0:e.getRootNode)?void 0:t.call(e);return i instanceof ShadowRoot||i instanceof Document?i:null}function el(e,{depth:t=3,checkOpacity:i=!0,checkVisibilityCSS:a=!0}={}){if(e.checkVisibility)return e.checkVisibility({checkOpacity:i,checkVisibilityCSS:a});let r=e;for(;r&&t>0;){let e=getComputedStyle(r);if(i&&"0"===e.opacity||a&&"hidden"===e.visibility||"none"===e.display)return!1;r=r.parentElement,t--}return!0}function ed(e,t){let i=function(e,t){var i,a;let r;for(r of null!=(i=e.querySelectorAll("style:not([media])"))?i:[]){let e;try{e=null==(a=r.sheet)?void 0:a.cssRules}catch{continue}for(let i of null!=e?e:[])if(t(i.selectorText))return i}}(e,e=>e===t);return i||eu(e,t)}function eu(e,t){var i,a;let r=null!=(i=e.querySelectorAll("style:not([media])"))?i:[],n=null==r?void 0:r[r.length-1];return(null==n?void 0:n.sheet)?(null==n||n.sheet.insertRule(`${t}{}`,n.sheet.cssRules.length),null==(a=n.sheet.cssRules)?void 0:a[n.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",e),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function ec(e,t,i=NaN){let a=e.getAttribute(t);return null!=a?+a:i}function eh(e,t,i){let a=+i;
1if(null==i||Number.isNaN(a)){e.hasAttribute(t)&&e.removeAttribute(t);return}ec(e,t,void 0)!==a&&e.setAttribute(t,`${a}`)}function em(e,t){return e.hasAttribute(t)}function ep(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}em(e,t)!=i&&e.toggleAttribute(t,i)}function ev(e,t,i=null){var a;return null!=(a=e.getAttribute(t))?a:i}function eb(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}let a=`${i}`;ev(e,t,void 0)!==a&&e.setAttribute(t,a)}var eg=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},eE=(e,t,i)=>(eg(e,t,"read from private field"),i?i.call(e):t.get(e)),ef=(e,t,i,a)=>(eg(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class ey extends K.HTMLElement{constructor(){if(super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,oT,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=J(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[c.MEDIA_CONTROLLER,v.MEDIA_PAUSED]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===c.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=eE(this,oT))?void 0:a.unassociateElement)||r.call(a,this),ef(this,oT,null)),i&&this.isConnected&&(ef(this,oT,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=eE(this,oT))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i,a,r,n;let s;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),ef(this,oT,(r=this,(s=r.getAttribute(c.MEDIA_CONTROLLER))?null==(n=r.getRootNode())?void 0:n.getElementById(s):en(r,"media-controller"))),this.getAttribute(c.MEDIA_CONTROLLER)&&(null==(t=null==(e=eE(this,oT))?void 0:e.associateElement)||t.call(e,this)),null==(i=eE(this,oT))||i.addEventListener("pointerdown",this),null==(a=eE(this,oT))||a.addEventListener("click",this)}disconnectedCallback(){var e,t,i,a;this.getAttribute(c.MEDIA_CONTROLLER)&&(null==(t=null==(e=eE(this,oT))?void 0:e.unassociateElement)||t.call(e,this)),null==(i=eE(this,oT))||i.removeEventListener("pointerdown",this),null==(a=eE(this,oT))||a.removeEventListener("click",this),ef(this,oT,null)}handleEvent(e){var t;let i=null==(t=e.composedPath())?void 0:t[0];if(["video","media-controller"].includes(null==i?void 0:i.localName)){if("pointerdown"===e.type)this._pointerType=e.pointerType;else if("click"===e.type){let{clientX:t,clientY:i}=e,{left:a,top:r,width:n,height:s}=this.getBoundingClientRect(),o=t-a,l=i-r;if(o<0||l<0||o>n||l>s||0===n&&0===s)return;let{pointerType:d=this._pointerType}=e;if(this._pointerType=void 0,"touch"===d)return void this.handleTap(e);if("mouse"===d)return void this.handleMouseClick(e)}}}get mediaPaused(){return em(this,v.MEDIA_PAUSED)}set mediaPaused(e){ep(this,v.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let t=this.mediaPaused?u.MEDIA_PLAY_REQUEST:u.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new K.CustomEvent(t,{composed:!0,bubbles:!0}))}}oT=new WeakMap,ey.shadowRootOptions={mode:"open"},ey.getTemplateHTML=function(e){return` 2 <style> 3 :host { 4 display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block)); 5 box-sizing: border-box; 6 } 7 </style> 8 `},K.customElements.get("media-gesture-receiver")||K.customElements.define("media-gesture-receiver",ey);var e_=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ek=(e,t,i)=>(e_(e,t,"read from private field"),i?i.call(e):t.get(e)),eA=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},ew=(e,t,i,a)=>(e_(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),eT=(e,t,i)=>(e_(e,t,"access private method"),i);let eI="audio",eS="autohide",eC="breakpoints",eM="gesturesdisabled",eL="keyboardcontrol",eR="noautohide",ex="userinactive",eD="autohideovercontrols",eP=Object.values(v);function eN(e,t){var i,a,r;if(!e.isConnected)return;let n=Object.fromEntries((null!=(i=e.getAttribute(eC))?i:"sm:384 md:576 lg:768 xl:960").split(/\s+/).map(e=>e.split(":"))),s=(a=n,r=t,Object.keys(a).filter(e=>r>=parseInt(a[e]))),o=!1;
8if(Object.keys(n).forEach(t=>{if(s.includes(t)){e.hasAttribute(`breakpoint${t}`)||(e.setAttribute(`breakpoint${t}`,""),o=!0);return}e.hasAttribute(`breakpoint${t}`)&&(e.removeAttribute(`breakpoint${t}`),o=!0)}),o){let t=new CustomEvent(b.BREAKPOINTS_CHANGE,{detail:s});e.dispatchEvent(t)}e.breakpointsComputed||(e.breakpointsComputed=!0,e.dispatchEvent(new CustomEvent(b.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}class eO extends K.HTMLElement{constructor(){if(super(),eA(this,oR),eA(this,oN),eA(this,oU),eA(this,oW),eA(this,o$),eA(this,oq),eA(this,oI,0),eA(this,oS,null),eA(this,oC,null),eA(this,oM,void 0),this.breakpointsComputed=!1,eA(this,oL,new MutationObserver(eT(this,oR,ox).bind(this))),eA(this,oD,!1),eA(this,oP,e=>{ek(this,oD)||(setTimeout(()=>{eN(e.target,e.contentRect.width),ew(this,oD,!1)},0),ew(this,oD,!0))}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=J(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}const e=this.querySelector(":scope > slot[slot=media]");e&&e.addEventListener("slotchange",()=>{if(!e.assignedElements({flatten:!0}).length){ek(this,oS)&&this.mediaUnsetCallback(ek(this,oS));return}this.handleMediaUpdated(this.media)})}static get observedAttributes(){return[eS,eM].concat(eP).filter(e=>![v.MEDIA_RENDITION_LIST,v.MEDIA_AUDIO_TRACK_LIST,v.MEDIA_CHAPTERS_CUES,v.MEDIA_WIDTH,v.MEDIA_HEIGHT,v.MEDIA_ERROR,v.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,t,i){e.toLowerCase()==eS&&(this.autohide=i)}get media(){let e=this.querySelector(":scope > [slot=media]");return(null==e?void 0:e.nodeName)=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(ew(this,oS,e),e.localName.includes("-")&&await K.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;ek(this,oL).observe(this,{childList:!0,subtree:!0}),Z(this,ek(this,oP));let t=null!=this.getAttribute(eI)?U("audio player"):U("video player");this.setAttribute("role","region"),this.setAttribute("aria-label",t),this.handleMediaUpdated(this.media),this.setAttribute(ex,""),eN(this,this.getBoundingClientRect().width),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),null==(e=K.window)||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;ek(this,oL).disconnect(),X(this,ek(this,oP)),this.media&&this.mediaUnsetCallback(this.media),null==(e=K.window)||e.removeEventListener("mouseup",this)}mediaSetCallback(e){}mediaUnsetCallback(e){ew(this,oS,null)}handleEvent(e){switch(e.type){case"pointerdown":ew(this,oI,e.timeStamp);break;case"pointermove":eT(this,oN,oO).call(this,e);break;case"pointerup":eT(this,oU,oH).call(this,e);break;case"mouseleave":eT(this,oW,oB).call(this);break;case"mouseup":this.removeAttribute(eL);break;case"keyup":eT(this,oq,oF).call(this),this.setAttribute(eL,"")}}set autohide(e){let t=Number(e);ew(this,oM,isNaN(t)?0:t)}get autohide(){return(void 0===ek(this,oM)?2:ek(this,oM)).toString()}get breakpoints(){return ev(this,eC)}set breakpoints(e){eb(this,eC,e)}get audio(){return em(this,eI)}set audio(e){ep(this,eI,e)}get gesturesDisabled(){return em(this,eM)}set gesturesDisabled(e){ep(this,eM,e)}get keyboardControl(){return em(this,eL)}set keyboardControl(e){ep(this,eL,e)}get noAutohide(){return em(this,eR)}set noAutohide(e){ep(this,eR,e)}get autohideOverControls(){return em(this,eD)}set autohideOverControls(e){ep(this,eD,e)}get userInteractive(){return em(this,ex)}set userInteractive(e){ep(this,ex,e)}}oI=new WeakMap,oS=new WeakMap,oC=new WeakMap,oM=new WeakMap,oL=new WeakMap,oR=new WeakSet,ox=function(e){let t=this.media;for(let i of e)if("childList"===i.type){for(let e of i.removedNodes){if("media"!=e.slot||i.target!=this)continue;let a=i.previousSibling&&i.previousSibling.previousElementSibling;if(a&&t){let t="media"!==a.slot;for(;null!==(a=a.previousSibling);)"media"==a.slot&&(t=!1);t&&this.mediaUnsetCallback(e)}else this.mediaUnsetCallback(e)}if(t)for(let e of i.addedNodes)e===t&&this.handleMediaUpdated(t)}},oD=new WeakMap,oP=new WeakMap,oN=new WeakSet,oO=function(e){if("mouse"!==e.pointerType&&e.timeStamp-ek(this,oI)<250)return;eT(this,o$,oV).call(this),clearTimeout(ek(this,oC));let t=this.hasAttribute(eD);([this,this.media].includes(e.target)||t)&&eT(this,oq,oF).call(this)},oU=new WeakSet,oH=function(e){if("touch"===e.pointerType){let t=!this.hasAttribute(ex);[this,this.media].includes(e.target)&&t?eT(this,oW,oB).call(this):eT(this,oq,oF).call(this)}else e.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(null==e?void 0:e.localName))&&eT(this,oq,oF).call(this)},oW=new WeakSet,oB=function(){if(0>ek(this,oM)||this.hasAttribute(ex))return;this.setAttribute(ex,"");let e=new K.CustomEvent(b.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(e)},o$=new WeakSet,oV=function(){if(!this.hasAttribute(ex))return;this.removeAttribute(ex);let e=new K.CustomEvent(b.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(e)},oq=new WeakSet,oF=function(){eT(this,o$,oV).call(this),clearTimeout(ek(this,oC));let e=parseInt(this.autohide);e<0||ew(this,oC,setTimeout(()=>{eT(this,oW,oB).call(this)},1e3*e))},eO.shadowRootOptions={mode:"open"},eO.getTemplateHTML=function(e){return` 9 <style> 10 11 :host([${v.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) { 12 outline: none; 13 } 14 15 :host { 16 box-sizing: border-box; 17 position: relative; 18 display: inline-block; 19 line-height: 0; 20 background-color: var(--media-background-color, #000); 21 } 22 23 :host(:not([${eI}])) [part~=layer]:not([part~=media-layer]) { 24 position: absolute; 25 top: 0; 26 left: 0; 27 bottom: 0; 28 right: 0; 29 display: flex; 30 flex-flow: column nowrap; 31 align-items: start; 32 pointer-events: none; 33 background: none; 34 } 35 36 slot[name=media] { 37 display: var(--media-slot-display, contents); 38 } 39 40 41 :host([${eI}]) slot[name=media] { 42 display: var(--media-slot-display, none); 43 } 44 45 46 :host([${eI}]) [part~=layer][part~=gesture-layer] { 47 height: 0; 48 display: block; 49 } 50 51 52 :host(:not([${eI}])[${eM}]) ::slotted([slot=gestures-chrome]), 53 :host(:not([${eI}])[${eM}]) media-gesture-receiver[slot=gestures-chrome] { 54 display: none; 55 } 56 57 58 ::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([role=dialog]):not([hidden])) { 59 pointer-events: auto; 60 } 61 62 :host(:not([${eI}])) *[part~=layer][part~=centered-layer] { 63 align-items: center; 64 justify-content: center; 65 } 66 67 :host(:not([${eI}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]), 68 :host(:not([${eI}])) media-gesture-receiver[slot=gestures-chrome] { 69 align-self: stretch; 70 flex-grow: 1; 71 } 72 73 slot[name=middle-chrome] { 74 display: inline; 75 flex-grow: 1; 76 pointer-events: none; 77 background: none; 78 } 79 80 81 ::slotted([slot=media]), 82 ::slotted([slot=poster]) { 83 width: 100%; 84 height: 100%; 85 } 86 87 88 :host(:not([${eI}])) .spacer { 89 flex-grow: 1; 90 } 91 92 93 :host(:-webkit-full-screen) { 94 95 width: 100% !important; 96 height: 100% !important; 97 } 98 99 100 ::slotted(:not([slot=media]):not([slot=poster]):not([${eR}]):not([hidden]):not([role=dialog])) { 101 opacity: 1; 102 transition: var(--media-control-transition-in, opacity 0.25s); 103 } 104 105 106 :host([${ex}]:not([${v.MEDIA_PAUSED}]):not([${v.MEDIA_IS_AIRPLAYING}
106]):not([${v.MEDIA_IS_CASTING}]):not([${eI}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${eR}]):not([role=dialog])) { 107 opacity: 0; 108 transition: var(--media-control-transition-out, opacity 1s); 109 } 110 111 :host([${ex}]:not([${eR}]):not([${v.MEDIA_PAUSED}]):not([${v.MEDIA_IS_CASTING}]):not([${eI}])) ::slotted([slot=media]) { 112 cursor: none; 113 } 114 115 :host([${ex}][${eD}]:not([${eR}]):not([${v.MEDIA_PAUSED}]):not([${v.MEDIA_IS_CASTING}]):not([${eI}])) * { 116 --media-cursor: none; 117 cursor: none; 118 } 119 120 121 ::slotted(media-control-bar) { 122 align-self: stretch; 123 } 124 125 126 :host(:not([${eI}])[${v.MEDIA_HAS_PLAYED}]) slot[name=poster] { 127 display: none; 128 } 129 130 ::slotted([role=dialog]) { 131 width: 100%; 132 height: 100%; 133 align-self: center; 134 } 135 136 ::slotted([role=menu]) { 137 align-self: end; 138 } 139 </style> 140 141 <slot name="media" part="layer media-layer"></slot> 142 <slot name="poster" part="layer poster-layer"></slot> 143 <slot name="gestures-chrome" part="layer gesture-layer"> 144 <media-gesture-receiver slot="gestures-chrome"> 145 <template shadowrootmode="${ey.shadowRootOptions.mode}"> 146 ${ey.getTemplateHTML({})} 147 </template> 148 </media-gesture-receiver> 149 </slot> 150 <span part="layer vertical-layer"> 151 <slot name="top-chrome" part="top chrome"></slot> 152 <slot name="middle-chrome" part="middle chrome"></slot> 153 <slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot> 154 155 <slot part="bottom chrome"></slot> 156 </span> 157 <slot name="dialog" part="layer dialog-layer"></slot> 158 `},K.customElements.get("media-container")||K.customElements.define("media-container",eO);var eU=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},eH=(e,t,i)=>(eU(e,t,"read from private field"),i?i.call(e):t.get(e)),eW=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},eB=(e,t,i,a)=>(eU(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class e${constructor(e,t,{defaultValue:i}={defaultValue:void 0}){eW(this,oQ),eW(this,oG,void 0),eW(this,oK,void 0),eW(this,oj,void 0),eW(this,oY,new Set),eB(this,oG,e),eB(this,oK,t),eB(this,oj,new Set(i))}[Symbol.iterator](){return eH(this,oQ,oz).values()}get length(){return eH(this,oQ,oz).size}get value(){var e;return null!=(e=[...eH(this,oQ,oz)].join(" "))?e:""}set value(e){var t;e!==this.value&&(eB(this,oY,new Set),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return[...eH(this,oQ,oz)][e]}values(){return eH(this,oQ,oz).values()}forEach(e,t){eH(this,oQ,oz).forEach(e,t)}add(...e){var t,i;e.forEach(e=>eH(this,oY).add(e)),(""!==this.value||(null==(t=eH(this,oG))?void 0:t.hasAttribute(`${eH(this,oK)}`)))&&(null==(i=eH(this,oG))||i.setAttribute(`${eH(this,oK)}`,`${this.value}`))}remove(...e){var t;e.forEach(e=>eH(this,oY).delete(e)),null==(t=eH(this,oG))||t.setAttribute(`${eH(this,oK)}`,`${this.value}`)}contains(e){return eH(this,oQ,oz).has(e)}toggle(e,t){if(void 0!==t)if(t)return this.add(e),!0;else return this.remove(e),!1;return this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){return this.remove(e),this.add(t),e===t}}oG=new WeakMap,oK=new WeakMap,oj=new WeakMap,oY=new WeakMap,oQ=new WeakSet,oz=function(){return eH(this,oY).size?eH(this,oY):eH(this,oj)};let eV=(e="")=>{let[t,i,a]=e.split(":");return{kind:"cc"===t?f:E,language:i,label:a?decodeURIComponent(a):void 0}},eq=(e="",t={})=>((e="")=>e.split(/\s+/))(e).map(e=>{let i=eV(e);return{...t,...i}}),eF=e=>e?Array.isArray(e)?e.map(e=>"string"==typeof e?eV(e):e):"string"==typeof e?eq(e):[e]:[],eG=({kind:e,label:t,language:i}={kind:"subtitles"})=>t?`${"captions"===e?"cc":"sb"}:${i}:${encodeURIComponent(t)}`:i,eK=(e=[])=>Array.prototype.map.call(e,eG).join(" "),ej=e=>{let t=Object.entries(e).map(([e,t])=>i=>i[e]===t);return e=>t.every(t=>t(e))},eY=(e,t=[],i=[])=>{let a=eF(i).map(ej);Array.from(t).filter(e=>a.some(t=>
158t(e))).forEach(t=>{t.mode=e})},eQ=(e,t=()=>!0)=>{if(!(null==e?void 0:e.textTracks))return[];let i="function"==typeof t?t:ej(t);return Array.from(e.textTracks).filter(i)},ez=e=>{var t;return!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)||e.hasAttribute(v.MEDIA_SUBTITLES_SHOWING)},eZ="exitFullscreen"in j?"exitFullscreen":"webkitExitFullscreen"in j?"webkitExitFullscreen":"webkitCancelFullScreen"in j?"webkitCancelFullScreen":void 0,eX="fullscreenElement"in j?"fullscreenElement":"webkitFullscreenElement"in j?"webkitFullscreenElement":void 0,eJ="fullscreenEnabled"in j?"fullscreenEnabled":"webkitFullscreenEnabled"in j?"webkitFullscreenEnabled":void 0,e0=()=>{var e;return a||(a=null==(e=null==j?void 0:j.createElement)?void 0:e.call(j,"video"))},e1=async(e=e0())=>{if(!e)return!1;let t=e.volume;e.volume=t/2+.1;let i=new AbortController,a=await Promise.race([e2(e,i.signal),e3(e,t)]);return i.abort(),a},e2=(e,t)=>new Promise(i=>{e.addEventListener("volumechange",()=>i(!0),{signal:t})}),e3=async(e,t)=>{for(let i=0;i<10;i++){if(e.volume===t)return!1;await R(10)}return e.volume!==t},e4=/.*Version\/.*Safari\/.*/.test(K.navigator.userAgent),e5=(e=e0())=>(!K.matchMedia("(display-mode: standalone)").matches||!e4)&&"function"==typeof(null==e?void 0:e.requestPictureInPicture),e9=(e=e0())=>(e=>{let{documentElement:t,media:i}=e;return!!(null==t?void 0:t[eJ])||i&&"webkitSupportsFullscreen"in i})({documentElement:j,media:e}),e8=e9(),e7=e5(),e6=!!K.WebKitPlaybackTargetAvailabilityEvent,te=!!K.chrome,tt=e=>eQ(e.media,e=>[E,f].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),ti=e=>eQ(e.media,e=>e.mode===_&&[E,f].includes(e.kind)),ta=(e,t)=>{let i=tt(e),a=ti(e),r=!!a.length;if(i.length){if(!1===t||r&&!0!==t)eY(y,i,a);else if(!0===t||!r&&!1!==t){let t=i[0],{options:r}=e;if(!(null==r?void 0:r.noSubtitlesLangPref)){let e=globalThis.localStorage.getItem("media-chrome-pref-subtitles-lang"),a=e?[e,...globalThis.navigator.languages]:globalThis.navigator.languages,r=i.filter(e=>a.some(t=>e.language.toLowerCase().startsWith(t.split("-")[0]))).sort((e,t)=>a.findIndex(t=>e.language.toLowerCase().startsWith(t.split("-")[0]))-a.findIndex(e=>t.language.toLowerCase().startsWith(e.split("-")[0])));r[0]&&(t=r[0])}let{language:n,label:s,kind:o}=t;eY(y,i,a),eY(_,i,[{language:n,label:s,kind:o}])}}},tr=(e,t)=>e===t||null!=e&&null!=t&&typeof e==typeof t&&(!!("number"==typeof e&&Number.isNaN(e)&&Number.isNaN(t))||"object"==typeof e&&(Array.isArray(e)?tn(e,t):Object.entries(e).every(([e,i])=>e in t&&tr(i,t[e])))),tn=(e,t)=>{let i=Array.isArray(e),a=Array.isArray(t);return i===a&&(!i&&!a||e.length===t.length&&e.every((e,i)=>tr(e,t[i])))},ts=Object.values(w),to=e1().then(e=>r=e),tl=async(...e)=>{await Promise.all(e.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof K.HTMLElement))return;let t=e.localName;if(!t.includes("-"))return;let i=K.customElements.get(t);i&&e instanceof i||(await K.customElements.whenDefined(t),K.customElements.upgrade(e))}))},td=new K.DOMParser,tu={mediaError:{get(e,t){let{media:i}=e;if((null==t?void 0:t.type)!=="playing")return null==i?void 0:i.error},mediaEvents:["emptied","error","playing"]},mediaErrorCode:{get(e,t){var i;let{media:a}=e;if((null==t?void 0:t.type)!=="playing")return null==(i=null==a?void 0:a.error)?void 0:i.code},mediaEvents:["emptied","error","playing"]},mediaErrorMessage:{get(e,t){var i,a;let{media:r}=e;if((null==t?void 0:t.type)!=="playing")return null!=(a=null==(i=null==r?void 0:r.error)?void 0:i.message)?a:""},mediaEvents:["emptied","error","playing"]},mediaWidth:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.videoWidth)?t:0},mediaEvents:["resize"]},mediaHeight:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.videoHeight)?t:0},mediaEvents:["resize"]},mediaPaused:{get(e){var t;let{media:i}=e;return null==(t=null==i?void 0:i.paused)||t},set(e,t){var i;let{media:a}=t;a&&(e?a.pause():null==(i=a.play())||i.catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(e,t){let{media:i}=e;return!!i&&(t?"playing"===t.type:!i.paused)},mediaEvents:["playing","emptied"]},mediaEnded:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.ended)&&t},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.playbackRate)?t:1},set(e,t){let{media:i}=t;!i||Number.isFinite(+e)&&(i.playbackRate=+e)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.muted)&&t},set(e,t){let{media:i}=t;if(i){try{K.localStorage.setItem("media-chrome-pref-muted",e?"true":"false")}catch(e){console.debug("Error setting muted pref",e)}i.muted=e}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(e,t)=>{let{options:{noMutedPref:i}}=t,{media:a}=t;if(a&&!a.muted&&!i)try{let i="true"===K.localStorage.getItem("media-chrome-pref-muted");tu.mediaMuted.set(i,t),e(i)}catch(e){console.debug("Error getting muted pref",e)}}]},mediaVolume:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.volume)?t:1},set(e,t){let{media:i}=t;if(i){try{null==e?K.localStorage.removeItem("media-chrome-pref-volume"):K.localStorage.setItem("media-chrome-pref-volume",e.toString())}catch(e){console.debug("Error setting volume pref",e)}Number.isFinite(+e)&&(i.volume=+e)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(e,t)=>{let{options:{noVolumePref:i}}=t;if(!i)try{let{media:i}=t;if(!i)return;let a=K.localStorage.getItem("media-chrome-pref-volume");if(null==a)return;tu.mediaVolume.set(+a,t),e(+a)}catch(e){console.debug("Error getting volume pref",e)}}]},mediaVolumeLevel:{get(e){let{media:t}=e;return void 0===(null==t?void 0:t.volume)?"high":t.muted||0===t.volume?"off":t.volume<.5?"low":t.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.currentTime)?t:0},set(e,t){let{media:i}=t;i&&M(e)&&(i.currentTime=e)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(e){let{media:t,options:{defaultDuration:i}={}}=e;return i&&(!t||!t.duration||Number.isNaN(t.duration)||!Number.isFinite(t.duration))?i:Number.isFinite(null==t?void 0:t.duration)?t.duration:NaN},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(e){let{media:t}=e;return(null==t?void 0:t.readyState)<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(e){var t;let{media:i}=e;if(!(null==(t=null==i?void 0:i.seekable)?void 0:t.length))return;let a=i.seekable.start(0),r=i.seekable.end(i.seekable.length-1);if(a||r)return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get(e){var t;let{media:i}=e,a=null!=(t=null==i?void 0:i.buffered)?t:[];return Array.from(a).map((e,t)=>[Number(a.start(t).toFixed(3)),Number(a.end(t).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(e){let{media:t,options:{defaultStreamType:i}={}}=e,a=[w.LIVE,w.ON_DEMAND].includes(i)?i:void 0;if(!t)return a;let{streamType:r}=t;if(ts.includes(r))return r===w.UNKNOWN?a:r;let n=t.duration;return n===1/0?w.LIVE:Number.isFinite(n)?w.ON_DEMAND:a}
158,mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(e){let{media:t}=e;if(!t)return NaN;let{targetLiveWindow:i}=t,a=tu.mediaStreamType.get(e);return(null==i||Number.isNaN(i))&&a===w.LIVE?0:i},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(e){let{media:t,options:{liveEdgeOffset:i=10}={}}=e;if(!t)return!1;if("number"==typeof t.liveEdgeStart)return!Number.isNaN(t.liveEdgeStart)&&t.currentTime>=t.liveEdgeStart;if(tu.mediaStreamType.get(e)!==w.LIVE)return!1;let a=t.seekable;if(!a)return!0;if(!a.length)return!1;let r=a.end(a.length-1)-i;return t.currentTime>=r},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get:e=>tt(e).map(({kind:e,label:t,language:i})=>({kind:e,label:t,language:i})),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get:e=>ti(e).map(({kind:e,label:t,language:i})=>({kind:e,label:t,language:i})),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(e,t)=>{var i,a;let{media:r,options:n}=t;if(!r)return;let s=e=>{var i;n.defaultSubtitles&&(e&&![f,E].includes(null==(i=null==e?void 0:e.track)?void 0:i.kind)||ta(t,!0))};return r.addEventListener("loadstart",s),null==(i=r.textTracks)||i.addEventListener("addtrack",s),null==(a=r.textTracks)||a.addEventListener("removetrack",s),()=>{var e,t;r.removeEventListener("loadstart",s),null==(e=r.textTracks)||e.removeEventListener("addtrack",s),null==(t=r.textTracks)||t.removeEventListener("removetrack",s)}}]},mediaChaptersCues:{get(e){var t;let{media:i}=e;if(!i)return[];let[a]=eQ(i,{kind:"chapters"});return Array.from(null!=(t=null==a?void 0:a.cues)?t:[]).map(({text:e,startTime:t,endTime:i})=>({text:e&&td.parseFromString(e,"text/html").body.textContent||e,startTime:t,endTime:i}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(e,t)=>{var i;let{media:a}=t;if(!a)return;let r=a.querySelector('track[kind="chapters"][default][src]'),n=null==(i=a.shadowRoot)?void 0:i.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return null==r||r.addEventListener("load",e),null==n||n.addEventListener("load",e),()=>{null==r||r.removeEventListener("load",e),null==n||n.removeEventListener("load",e)}}]},mediaIsPip:{get(e){var t,i;let{media:a,documentElement:r}=e;if(!a||!r||!r.pictureInPictureElement)return!1;if(r.pictureInPictureElement===a)return!0;if(r.pictureInPictureElement instanceof HTMLMediaElement)return!!(null==(t=a.localName)?void 0:t.includes("-"))&&er(a,r.pictureInPictureElement);if(r.pictureInPictureElement.localName.includes("-")){let e=r.pictureInPictureElement.shadowRoot;for(;null==e?void 0:e.pictureInPictureElement;){if(e.pictureInPictureElement===a)return!0;e=null==(i=e.pictureInPictureElement)?void 0:i.shadowRoot}}return!1},set(e,t){let{media:i}=t;if(i)if(e){if(!j.pictureInPictureEnabled)return void console.warn("MediaChrome: Picture-in-picture is not enabled");if(!i.requestPictureInPicture)return void console.warn("MediaChrome: The current media does not support picture-in-picture");let e=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(t=>{if(11===t.code){if(!i.src)return void console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.");if(0===i.readyState&&"none"===i.preload){let t=()=>{i.removeEventListener("loadedmetadata",a),i.preload="none"},a=()=>{i.requestPictureInPicture().catch(e),t()};i.addEventListener("loadedmetadata",a),i.preload="metadata",setTimeout(()=>{0===i.readyState&&e(),t()},1e3)}else throw t}else throw t})}else j.pictureInPictureElement&&j.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(e){var t;let{media:i}=e;return[...null!=(t=null==i?void 0:i.videoRenditions)?t:[]].map(e=>({...e}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(e){var t,i,a;let{media:r}=e;return null==(a=null==(i=null==r?void 0:r.videoRenditions)?void 0:i[null==(t=r.videoRenditions)?void 0:t.selectedIndex])?void 0:a.id},set(e,t){let{media:i}=t;if(!(null==i?void 0:i.videoRenditions))return void console.warn("MediaController: Rendition selection not supported by this media.");let a=Array.prototype.findIndex.call(i.videoRenditions,t=>t.id==e);i.videoRenditions.selectedIndex!=a&&(i.videoRenditions.selectedIndex=a)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(e){var t;let{media:i}=e;return[...null!=(t=null==i?void 0:i.audioTracks)?t:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(e){var t,i;let{media:a}=e;return null==(i=[...null!=(t=null==a?void 0:a.audioTracks)?t:[]].find(e=>e.enabled))?void 0:i.id},set(e,t){let{media:i}=t;if(!(null==i?void 0:i.audioTracks))return void console.warn("MediaChrome: Audio track selection not supported by this media.");
158for(let t of i.audioTracks)t.enabled=e==t.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get:e=>(e=>{var t;let{media:i,documentElement:a,fullscreenElement:r=i}=e;if(!i||!a)return!1;let n=(e=>{let{documentElement:t,media:i}=e,a=null==t?void 0:t[eX];return!a&&"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&i.webkitDisplayingFullscreen&&"fullscreen"===i.webkitPresentationMode?i:a})(e);if(!n)return!1;if(n===r||n===i)return!0;if(n.localName.includes("-")){let e=n.shadowRoot;if(!(eX in e))return er(n,r);for(;null==e?void 0:e[eX];){if(e[eX]===r)return!0;e=null==(t=e[eX])?void 0:t.shadowRoot}}return!1})(e),set(e,t){e?(e=>{var t;let{media:i,fullscreenElement:a}=e;try{let e=a&&"requestFullscreen"in a?"requestFullscreen":a&&"webkitRequestFullScreen"in a?"webkitRequestFullScreen":void 0;if(e){let i=null==(t=a[e])?void 0:t.call(a);if(i instanceof Promise)return i.catch(()=>{})}else(null==i?void 0:i.webkitEnterFullscreen)?i.webkitEnterFullscreen():(null==i?void 0:i.requestFullscreen)&&i.requestFullscreen()}catch(e){console.error(e)}})(t):(e=>{var t;let{documentElement:i}=e;if(eZ){let e=null==(t=null==i?void 0:i[eZ])?void 0:t.call(i);if(e instanceof Promise)return e.catch(()=>{})}})(t)},rootEvents:["fullscreenchange","webkitfullscreenchange"],mediaEvents:["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"]},mediaIsCasting:{get(e){var t;let{media:i}=e;return!!(null==i?void 0:i.remote)&&(null==(t=i.remote)?void 0:t.state)!=="disconnected"&&!!i.remote.state},set(e,t){var i,a;let{media:r}=t;if(r&&(!e||(null==(i=r.remote)?void 0:i.state)==="disconnected")&&(e||(null==(a=r.remote)?void 0:a.state)==="connected")){if("function"!=typeof r.remote.prompt)return void console.warn("MediaChrome: Casting is not supported in this environment");r.remote.prompt().catch(()=>{})}},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get:()=>!1,set(e,t){let{media:i}=t;if(i){if(!(i.webkitShowPlaybackTargetPicker&&K.WebKitPlaybackTargetAvailabilityEvent))return void console.error("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment");i.webkitShowPlaybackTargetPicker()}},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(e){let{media:t}=e;if(!e8||!e9(t))return A}},mediaPipUnavailable:{get(e){let{media:t}=e;if(!e7||!e5(t))return A}},mediaVolumeUnavailable:{get(e){let{media:t}=e;if(!1===r||(null==t?void 0:t.volume)==void 0)return A},stateOwnersUpdateHandlers:[e=>{null==r&&to.then(t=>e(t?void 0:A))}]},mediaCastUnavailable:{get(e,{availability:t="not-available"}={}){var i;let{media:a}=e;return te&&(null==(i=null==a?void 0:a.remote)?void 0:i.state)?null!=t&&"available"!==t?k:void 0:A},stateOwnersUpdateHandlers:[(e,t)=>{var i;let{media:a}=t;if(a)return a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||null==(i=null==a?void 0:a.remote)||i.watchAvailability(t=>{e({availability:t?"available":"not-available"})}).catch(t=>{"NotSupportedError"===t.name?e({availability:null}):e({availability:"not-available"})}),()=>{var e;null==(e=null==a?void 0:a.remote)||e.cancelWatchAvailability().catch(()=>{})}}]},mediaAirplayUnavailable:{get:(e,t)=>e6?(null==t?void 0:t.availability)==="not-available"?k:void 0:A,mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(e,t)=>{var i;let{media:a}=t;if(a)return a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||null==(i=null==a?void 0:a.remote)||i.watchAvailability(t=>{e({availability:t?"available":"not-available"})}).catch(t=>{"NotSupportedError"===t.name?e({availability:null}):e({availability:"not-available"})}),()=>{var e;null==(e=null==a?void 0:a.remote)||e.cancelWatchAvailability().catch(()=>{})}}]},mediaRenditionUnavailable:{get(e){var t;let{media:i}=e;return(null==i?void 0:i.videoRenditions)?(null==(t=i.videoRenditions)?void 0:t.length)?void 0:k:A},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(e){var t,i;let{media:a}=e;return(null==a?void 0:a.audioTracks)?(null!=(i=null==(t=a.audioTracks)?void 0:t.length)?i:0)<=1?k:void 0:A},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]}},tc={[u.MEDIA_PREVIEW_REQUEST](e,t,{detail:i}){var a,r,n;let s,o,{media:l}=t,d=null!=i?i:void 0;if(l&&null!=d){let[e]=eQ(l,{kind:"metadata",label:"thumbnails"}),t=Array.prototype.find.call(null!=(a=null==e?void 0:e.cues)?a:[],(e,t,i)=>0===t?e.endTime>
158d:t===i.length-1?e.startTime<=d:e.startTime<=d&&e.endTime>d);if(t){let e=/'^(?:[a-z]+:)?\/\//i.test(t.text)||null==(r=null==l?void 0:l.querySelector('track[label="thumbnails"]'))?void 0:r.src,i=new URL(t.text,e);o=new URLSearchParams(i.hash).get("#xywh").split(",").map(e=>+e),s=i.href}}let u=e.mediaDuration.get(t),c=null==(n=e.mediaChaptersCues.get(t).find((e,t,i)=>t===i.length-1&&u===e.endTime?e.startTime<=d&&e.endTime>=d:e.startTime<=d&&e.endTime>d))?void 0:n.text;return null!=i&&null==c&&(c=""),{mediaPreviewTime:d,mediaPreviewImage:s,mediaPreviewCoords:o,mediaPreviewChapter:c}},[u.MEDIA_PAUSE_REQUEST](e,t){e.mediaPaused.set(!0,t)},[u.MEDIA_PLAY_REQUEST](e,t){var i,a,r,n;let s=e.mediaStreamType.get(t)===w.LIVE,o=!(null==(i=t.options)?void 0:i.noAutoSeekToLive),l=e.mediaTargetLiveWindow.get(t)>0;if(s&&o&&!l){let i=null==(a=e.mediaSeekable.get(t))?void 0:a[1];if(i){let a=null!=(n=null==(r=t.options)?void 0:r.seekToLiveOffset)?n:0;e.mediaCurrentTime.set(i-a,t)}}e.mediaPaused.set(!1,t)},[u.MEDIA_PLAYBACK_RATE_REQUEST](e,t,{detail:i}){e.mediaPlaybackRate.set(i,t)},[u.MEDIA_MUTE_REQUEST](e,t){e.mediaMuted.set(!0,t)},[u.MEDIA_UNMUTE_REQUEST](e,t){e.mediaVolume.get(t)||e.mediaVolume.set(.25,t),e.mediaMuted.set(!1,t)},[u.MEDIA_VOLUME_REQUEST](e,t,{detail:i}){i&&e.mediaMuted.get(t)&&e.mediaMuted.set(!1,t),e.mediaVolume.set(i,t)},[u.MEDIA_SEEK_REQUEST](e,t,{detail:i}){e.mediaCurrentTime.set(i,t)},[u.MEDIA_SEEK_TO_LIVE_REQUEST](e,t){var i,a,r;let n=null==(i=e.mediaSeekable.get(t))?void 0:i[1];if(Number.isNaN(Number(n)))return;let s=null!=(r=null==(a=t.options)?void 0:a.seekToLiveOffset)?r:0;e.mediaCurrentTime.set(n-s,t)},[u.MEDIA_SHOW_SUBTITLES_REQUEST](e,t,{detail:i}){var a;let{options:r}=t,n=tt(t),s=eF(i),o=null==(a=s[0])?void 0:a.language;o&&!r.noSubtitlesLangPref&&K.localStorage.setItem("media-chrome-pref-subtitles-lang",o),eY(_,n,s)},[u.MEDIA_DISABLE_SUBTITLES_REQUEST](e,t,{detail:i}){eY(y,tt(t),null!=i?i:[])},[u.MEDIA_TOGGLE_SUBTITLES_REQUEST](e,t,{detail:i}){ta(t,i)},[u.MEDIA_RENDITION_REQUEST](e,t,{detail:i}){e.mediaRenditionSelected.set(i,t)},[u.MEDIA_AUDIO_TRACK_REQUEST](e,t,{detail:i}){e.mediaAudioTrackEnabled.set(i,t)},[u.MEDIA_ENTER_PIP_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsPip.set(!0,t)},[u.MEDIA_EXIT_PIP_REQUEST](e,t){e.mediaIsPip.set(!1,t)},[u.MEDIA_ENTER_FULLSCREEN_REQUEST](e,t){e.mediaIsPip.get(t)&&e.mediaIsPip.set(!1,t),e.mediaIsFullscreen.set(!0,t)},[u.MEDIA_EXIT_FULLSCREEN_REQUEST](e,t){e.mediaIsFullscreen.set(!1,t)},[u.MEDIA_ENTER_CAST_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsCasting.set(!0,t)},[u.MEDIA_EXIT_CAST_REQUEST](e,t){e.mediaIsCasting.set(!1,t)},[u.MEDIA_AIRPLAY_REQUEST](e,t){e.mediaIsAirplaying.set(!0,t)}};var th=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},tm=(e,t,i)=>(th(e,t,"read from private field"),i?i.call(e):t.get(e)),tp=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},tv=(e,t,i,a)=>(th(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),tb=(e,t,i)=>(th(e,t,"access private method"),i);let tg=["ArrowLeft","ArrowRight","Enter"," ","f","m","k","c"],tE="defaultsubtitles",tf="defaultstreamtype",ty="defaultduration",t_="fullscreenelement",tk="hotkeys",tA="keysused",tw="liveedgeoffset",tT="seektoliveoffset",tI="noautoseektolive",tS="nohotkeys",tC="novolumepref",tM="nosubtitleslangpref",tL="nodefaultstore",tR="keyboardforwardseekoffset",tx="keyboardbackwardseekoffset",tD="lang";class tP extends eO{constructor(){super(),tp(this,o3),tp(this,o5),tp(this,o8),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,tp(this,oZ,new e$(this,tk)),tp(this,oX,void 0),tp(this,oJ,void 0),tp(this,o0,void 0),tp(this,o1,void 0),tp(this,o2,e=>{var t;null==(t=tm(this,oJ))||t.dispatch(e)}),this.associateElement(this);let e={};tv(this,o0,t=>{Object.entries(t).forEach(([t,i])=>{if(t in e&&e[t]===i)return;this.propagateMediaState(t,i);let a=t.toLowerCase(),r=new K.CustomEvent(g[a],{composed:!0,detail:i});this.dispatchEvent(r)}),e=t}),this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(tS,tk,tf,tE,ty,tD)}get mediaStore(){return tm(this,oJ)}set mediaStore(e){var t,i;(tm(this,oJ)&&(null==(t=tm(this,o1))||t.call(this),tv(this,o1,void 0)),tv(this,oJ,e),tm(this,oJ)||this.hasAttribute(tL))?tv(this,o1,null==(i=tm(this,oJ))?void 0:i.subscribe(tm(this,o0))):tb(this,o3,o4).call(this)}get fullscreenElement(){var e;return null!=(e=tm(this,oX))?e:this}set fullscreenElement(e){var t;this.hasAttribute(t_)&&this.removeAttribute(t_),tv(this,oX,e),null==(t=tm(this,oJ))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return em(this,tE)}set defaultSubtitles(e){ep(this,tE,e)}get defaultStreamType(){return ev(this,tf)}set defaultStreamType(e){eb(this,tf,e)}get defaultDuration(){return ec(this,ty)}set defaultDuration(e){eh(this,ty,e)}get noHotkeys(){return em(this,tS)}set noHotkeys(e){ep(this,tS,e)}get keysUsed(){return ev(this,tA)}set keysUsed(e){eb(this,tA,e)}get liveEdgeOffset(){return ec(this,tw)}set liveEdgeOffset(e){eh(this,tw,e)}get noAutoSeekToLive(){return em(this,tI)}set noAutoSeekToLive(e){ep(this,tI,e)}get noVolumePref(){return em(this,tC)}set noVolumePref(e){ep(this,tC,e)}get noSubtitlesLangPref(){return em(this,tM)}set noSubtitlesLangPref(e){ep(this,tM,e)}get noDefaultStore(){return em(this,tL)}set noDefaultStore(e){ep(this,tL,e)}attributeChangedCallback(e,t,i){var a,r,n,s,o,l,d,u;if(super.attributeChangedCallback(e,t,i),e===tS)i!==t&&""===i?(this.hasAttribute(tk)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):i!==t&&null===i&&this.enableHotkeys();else if(e===tk)tm(this,oZ).value=i;else if(e===tE&&i!==t)null==(a=tm(this,oJ))||a.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(tE)}});else if(e===tf)null==(n=tm(this,oJ))||n.dispatch({type:"optionschangerequest",detail:{defaultStreamType:null!=(r=this.getAttribute(tf))?r:void 0}});else if(e===tw)null==(s=tm(this,oJ))||s.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(tw)?+this.getAttribute(tw):void 0,seekToLiveOffset:this.hasAttribute(tT)?void 0:+this.getAttribute(tw)}});else if(e===tT)null==(o=tm(this,oJ))||o.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(tT)?+this.getAttribute(tT):void 0}});else if(e===tI)null==(l=tm(this,oJ))||l.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(tI)}});else if(e===t_){let e=i?null==(d=this.getRootNode())?void 0:d.getElementById(i):void 0;tv(this,oX,e),null==(u=tm(this,oJ))||u.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===tD&&i!==t&&(O=i)}connectedCallback(){var e,t;tm(this,oJ)||this.hasAttribute(tL)||tb(this,o3,o4).call(this),null==(e=tm(this,oJ))||e.dispatch({type:"documentelementchangerequest",detail:j}),super.connectedCallback(),tm(this,oJ)&&!tm(this,o1)&&tv(this,o1,null==(t=tm(this,oJ))?void 0:t.subscribe(tm(this,o0))),this.enableHotkeys()}disconnectedCallback(){var e,t,i,a;null==(e=super.disconnectedCallback)||e.call(this),tm(this,oJ)&&(null==(t=tm(this,oJ))||t.dispatch({type:"documentelementchangerequest",detail:void 0}),null==(i=tm(this,oJ))||i.dispatch({type:u.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})),tm(this,o1)&&(null==(a=tm(this,o1))||a.call(this),tv(this,o1,void 0))}mediaSetCallback(e){var t;super.mediaSetCallback(e),null==(t=tm(this,oJ))||t.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var t;super.mediaUnsetCallback(e),null==(t=tm(this,oJ))||t.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,t){tq(this.mediaStateReceivers,e,t)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(t.has(e))return;let i=tF(e,this.registerMediaStateReceiver.bind(this),this.unregisterMediaStateReceiver.bind(this));Object.values(u).forEach(t=>{e.addEventListener(t,tm(this,o2))}),t.set(e,i)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;t.has(e)&&(t.get(e)(),t.delete(e),Object.values(u).forEach(t=>{e.removeEventListener(t,tm(this,o2))}))}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;!(t.indexOf(e)>
158-1)&&(t.push(e),tm(this,oJ)&&Object.entries(tm(this,oJ).getState()).forEach(([t,i])=>{tq([e],t,i)}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,i=t.indexOf(e);i<0||t.splice(i,1)}enableHotkeys(){this.addEventListener("keydown",tb(this,o8,o7))}disableHotkeys(){this.removeEventListener("keydown",tb(this,o8,o7)),this.removeEventListener("keyup",tb(this,o5,o9))}get hotkeys(){return ev(this,tk)}set hotkeys(e){eb(this,tk,e)}keyboardShortcutHandler(e){var t,i,a,r,n;let s,o,l,d=e.target;if(!((null!=(a=null!=(i=null==(t=d.getAttribute(tA))?void 0:t.split(" "))?i:null==d?void 0:d.keysUsed)?a:[]).map(e=>"Space"===e?" ":e).filter(Boolean).includes(e.key)||tm(this,oZ).contains(`no${e.key.toLowerCase()}`))&&!(" "===e.key&&tm(this,oZ).contains("nospace")))switch(e.key){case" ":case"k":s=tm(this,oJ).getState().mediaPaused?u.MEDIA_PLAY_REQUEST:u.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new K.CustomEvent(s,{composed:!0,bubbles:!0}));break;case"m":s="off"===this.mediaStore.getState().mediaVolumeLevel?u.MEDIA_UNMUTE_REQUEST:u.MEDIA_MUTE_REQUEST,this.dispatchEvent(new K.CustomEvent(s,{composed:!0,bubbles:!0}));break;case"f":s=this.mediaStore.getState().mediaIsFullscreen?u.MEDIA_EXIT_FULLSCREEN_REQUEST:u.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new K.CustomEvent(s,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new K.CustomEvent(u.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":{let e=this.hasAttribute(tx)?+this.getAttribute(tx):10;o=Math.max((null!=(r=this.mediaStore.getState().mediaCurrentTime)?r:0)-e,0),l=new K.CustomEvent(u.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:o}),this.dispatchEvent(l);break}case"ArrowRight":{let e=this.hasAttribute(tR)?+this.getAttribute(tR):10;o=Math.max((null!=(n=this.mediaStore.getState().mediaCurrentTime)?n:0)+e,0),l=new K.CustomEvent(u.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:o}),this.dispatchEvent(l)}}}}oZ=new WeakMap,oX=new WeakMap,oJ=new WeakMap,o0=new WeakMap,o1=new WeakMap,o2=new WeakMap,o3=new WeakSet,o4=function(){var e;this.mediaStore=(({media:e,fullscreenElement:t,documentElement:i,stateMediator:a=tu,requestMap:r=tc,options:n={},monitorStateOwnersOnlyWithSubscriptions:s=!0})=>{let o,l=[],d={options:{...n}},u=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0}),c=e=>{void 0==e||tr(e,u)||(u=Object.freeze({...u,...e}),l.forEach(e=>e(u)))},h=()=>{c(Object.entries(a).reduce((e,[t,{get:i}])=>(e[t]=i(d),e),{}))},m={},v=async(e,t)=>{var i,r,n,u,v,b,g,E,f,y,_,k,A,w,T,I;let S=!!o;if(o={...d,...null!=o?o:{},...e},S)return;await tl(...Object.values(e));let C=l.length>0&&0===t&&s,M=d.media!==o.media,L=(null==(i=d.media)?void 0:i.textTracks)!==(null==(r=o.media)?void 0:r.textTracks),R=(null==(n=d.media)?void 0:n.videoRenditions)!==(null==(u=o.media)?void 0:u.videoRenditions),x=(null==(v=d.media)?void 0:v.audioTracks)!==(null==(b=o.media)?void 0:b.audioTracks),D=(null==(g=d.media)?void 0:g.remote)!==(null==(E=o.media)?void 0:E.remote),P=d.documentElement!==o.documentElement,N=!!d.media&&(M||C),O=!!(null==(f=d.media)?void 0:f.textTracks)&&(L||C),U=!!(null==(y=d.media)?void 0:y.videoRenditions)&&(R||C),H=!!(null==(_=d.media)?void 0:_.audioTracks)&&(x||C),W=!!(null==(k=d.media)?void 0:k.remote)&&(D||C),B=!!d.documentElement&&(P||C),$=N||O||U||H||W||B,V=0===l.length&&1===t&&s,q=!!o.media&&(M||V),F=!!(null==(A=o.media)?void 0:A.textTracks)&&(L||V),G=!!(null==(w=o.media)?void 0:w.videoRenditions)&&(R||V),K=!!(null==(T=o.media)?void 0:T.audioTracks)&&(x||V),j=!!(null==(I=o.media)?void 0:I.remote)&&(D||V),Y=!!o.documentElement&&(P||V),Q=q||F||G||K||j||Y;if(!($||Q)){Object.entries(o).forEach(([e,t])=>{d[e]=t}),h(),o=void 0;return}Object.entries(a).forEach(([e,{get:t,mediaEvents:i=[],textTracksEvents:a=[],videoRenditionsEvents:r=[],audioTracksEvents:n=[],remoteEvents:s=[],rootEvents:l=[],stateOwnersUpdateHandlers:u=[]}])=>{let h;m[e]||(m[e]={});let v=i=>{c({[e]:t(d,i)})};h=m[e].mediaEvents,i.forEach(t=>{h&&N&&(d.media.removeEventListener(t,h),m[e].mediaEvents=void 0),q&&(o.media.addEventListener(t,v),m[e].mediaEvents=v)}),h=m[e].textTracksEvents,a.forEach(t=>{var i,a;h&&O&&(null==(i=d.media.textTracks)||i.removeEventListener(t,h),m[e].textTracksEvents=void 0),F&&(null==(a=o.media.textTracks)||a.addEventListener(t,v),m[e].textTracksEvents=v)}),h=m[e].videoRenditionsEvents,r.forEach(t=>{var i,a;h&&U&&(null==(i=d.media.videoRenditions)||i.removeEventListener(t,h),m[e].videoRenditionsEvents=void 0),G&&(null==(a=o.media.videoRenditions)||a.addEventListener(t,v),m[e].videoRenditionsEvents=v)}
158),h=m[e].audioTracksEvents,n.forEach(t=>{var i,a;h&&H&&(null==(i=d.media.audioTracks)||i.removeEventListener(t,h),m[e].audioTracksEvents=void 0),K&&(null==(a=o.media.audioTracks)||a.addEventListener(t,v),m[e].audioTracksEvents=v)}),h=m[e].remoteEvents,s.forEach(t=>{var i,a;h&&W&&(null==(i=d.media.remote)||i.removeEventListener(t,h),m[e].remoteEvents=void 0),j&&(null==(a=o.media.remote)||a.addEventListener(t,v),m[e].remoteEvents=v)}),h=m[e].rootEvents,l.forEach(t=>{h&&B&&(d.documentElement.removeEventListener(t,h),m[e].rootEvents=void 0),Y&&(o.documentElement.addEventListener(t,v),m[e].rootEvents=v)});let b=m[e].stateOwnersUpdateHandlers;u.forEach(t=>{b&&$&&b(),Q&&(m[e].stateOwnersUpdateHandlers=t(v,o))})}),Object.entries(o).forEach(([e,t])=>{d[e]=t}),h(),o=void 0};return v({media:e,fullscreenElement:t,documentElement:i,options:n}),{dispatch(e){let{type:t,detail:i}=e;r[t]&&null==u.mediaErrorCode?c(r[t](a,d,e)):"mediaelementchangerequest"===t?v({media:i}):"fullscreenelementchangerequest"===t?v({fullscreenElement:i}):"documentelementchangerequest"===t?v({documentElement:i}):"optionschangerequest"===t&&Object.entries(null!=i?i:{}).forEach(([e,t])=>{d.options[e]=t})},getState:()=>u,subscribe:e=>(v({},l.length+1),l.push(e),e(u),()=>{let t=l.indexOf(e);t>=0&&(v({},l.length-1),l.splice(t,1))})}})({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(tE),defaultDuration:this.hasAttribute(ty)?+this.getAttribute(ty):void 0,defaultStreamType:null!=(e=this.getAttribute(tf))?e:void 0,liveEdgeOffset:this.hasAttribute(tw)?+this.getAttribute(tw):void 0,seekToLiveOffset:this.hasAttribute(tT)?+this.getAttribute(tT):this.hasAttribute(tw)?+this.getAttribute(tw):void 0,noAutoSeekToLive:this.hasAttribute(tI),noVolumePref:this.hasAttribute(tC),noSubtitlesLangPref:this.hasAttribute(tM)}})},o5=new WeakSet,o9=function(e){let{key:t}=e;tg.includes(t)?this.keyboardShortcutHandler(e):this.removeEventListener("keyup",tb(this,o5,o9))},o8=new WeakSet,o7=function(e){let{metaKey:t,altKey:i,key:a}=e;t||i||!tg.includes(a)?this.removeEventListener("keyup",tb(this,o5,o9)):([" ","ArrowLeft","ArrowRight"].includes(a)&&!(tm(this,oZ).contains(`no${a.toLowerCase()}`)||" "===a&&tm(this,oZ).contains("nospace"))&&e.preventDefault(),this.addEventListener("keyup",tb(this,o5,o9),{once:!0}))};let tN=Object.values(v),tO=Object.values(h),tU=e=>{var t,i,a,r;let{observedAttributes:n}=e.constructor;!n&&(null==(t=e.nodeName)?void 0:t.includes("-"))&&(K.customElements.upgrade(e),{observedAttributes:n}=e.constructor);let s=null==(r=null==(a=null==(i=null==e?void 0:e.getAttribute)?void 0:i.call(e,c.MEDIA_CHROME_ATTRIBUTES))?void 0:a.split)?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(e=>tN.includes(e)):[]},tH=e=>{var t,i;return(null==(t=e.nodeName)?void 0:t.includes("-"))&&K.customElements.get(null==(i=e.nodeName)?void 0:i.toLowerCase())&&!(e instanceof K.customElements.get(e.nodeName.toLowerCase()))&&K.customElements.upgrade(e),tO.some(t=>t in e)||!!tU(e).length},tW=e=>{var t;return null==(t=null==e?void 0:e.join)?void 0:t.call(e,":")},tB={[v.MEDIA_SUBTITLES_LIST]:eK,[v.MEDIA_SUBTITLES_SHOWING]:eK,[v.MEDIA_SEEKABLE]:tW,[v.MEDIA_BUFFERED]:e=>null==e?void 0:e.map(tW).join(" "),[v.MEDIA_PREVIEW_COORDS]:e=>null==e?void 0:e.join(" "),[v.MEDIA_RENDITION_LIST]:function(e){return null==e?void 0:e.map(T).join(" ")},[v.MEDIA_AUDIO_TRACK_LIST]:function(e){return null==e?void 0:e.map(S).join(" ")}},t$=async(e,t,i)=>{var a,r;if(e.isConnected||await R(0),"boolean"==typeof i||null==i)return ep(e,t,i);if("number"==typeof i)return eh(e,t,i);if("string"==typeof i)return eb(e,t,i);if(Array.isArray(i)&&!i.length)return e.removeAttribute(t);let n=null!=(r=null==(a=tB[t])?void 0:a.call(tB,i))?r:i;return e.setAttribute(t,n)},tV=(e,t)=>{var i;if(null==(i=e.closest)?void 0:i.call(e,'*[slot="media"]'))return;let a=(e,t)=>{var i,a;tH(e)&&t(e);let{children:r=[]}=null!=e?e:{};[...r,...null!=(a=null==(i=null==e?void 0:e.shadowRoot)?void 0:i.children)?a:[]].forEach(e=>tV(e,t))},r=null==e?void 0:e.nodeName.toLowerCase();r.includes("-")&&!tH(e)?K.customElements.whenDefined(r).then(()=>{a(e,t)}):a(e,t)},tq=(e,t,i)=>
158{e.forEach(e=>{if(t in e){e[t]=i;return}let a=tU(e),r=t.toLowerCase();a.includes(r)&&t$(e,r,i)})},tF=(e,t,i)=>{tV(e,t);let a=e=>{var i;t(null!=(i=null==e?void 0:e.composedPath()[0])?i:e.target)},r=e=>{var t;i(null!=(t=null==e?void 0:e.composedPath()[0])?t:e.target)};e.addEventListener(u.REGISTER_MEDIA_STATE_RECEIVER,a),e.addEventListener(u.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=[],s=e=>{let a=e.target;"media"!==a.name&&(n.forEach(e=>tV(e,i)),(n=[...a.assignedElements({flatten:!0})]).forEach(e=>tV(e,t)))};e.addEventListener("slotchange",s);let o=new MutationObserver(e=>{e.forEach(e=>{let{addedNodes:a=[],removedNodes:r=[],type:n,target:s,attributeName:o}=e;"childList"===n?(Array.prototype.forEach.call(a,e=>tV(e,t)),Array.prototype.forEach.call(r,e=>tV(e,i))):"attributes"===n&&o===c.MEDIA_CHROME_ATTRIBUTES&&(tH(s)?t(s):i(s))})});return o.observe(e,{childList:!0,attributes:!0,subtree:!0}),()=>{tV(e,i),e.removeEventListener("slotchange",s),o.disconnect(),e.removeEventListener(u.REGISTER_MEDIA_STATE_RECEIVER,a),e.removeEventListener(u.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};K.customElements.get("media-controller")||K.customElements.define("media-controller",tP);let tG="placement",tK="bounds";class tj extends K.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!el(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;let t=this.placement;if("left"===t||"right"===t)return void this.style.removeProperty("--media-tooltip-offset-x");let i=getComputedStyle(this),a=null!=(e=en(this,"#"+this.bounds))?e:ee(this);if(!a)return;let{x:r,width:n}=a.getBoundingClientRect(),{x:s,width:o}=this.getBoundingClientRect(),l=i.getPropertyValue("--media-tooltip-offset-x"),d=l?parseFloat(l.replace("px","")):0,u=i.getPropertyValue("--media-tooltip-container-margin"),c=u?parseFloat(u.replace("px","")):0,h=s-r+d-c,m=s+o-(r+n)+d+c;h<0?this.style.setProperty("--media-tooltip-offset-x",`${h}px`):m>0?this.style.setProperty("--media-tooltip-offset-x",`${m}px`):this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=J(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){const e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[tG,tK]}get placement(){return ev(this,tG)}set placement(e){eb(this,tG,e)}get bounds(){return ev(this,tK)}set bounds(e){eb(this,tK,e)}}tj.shadowRootOptions={mode:"open"},tj.getTemplateHTML=function(e){return` 159 <style> 160 :host { 161 --_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7))); 162 --_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color)); 163 --_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2); 164 --_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px); 165 --_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color)); 166 position: relative; 167 pointer-events: none; 168 display: var(--media-tooltip-display, inline-flex); 169 justify-content: center; 170 align-items: center; 171 box-sizing: border-box; 172 z-index: var(--media-tooltip-z-index, 1); 173 background: var(--_tooltip-background); 174 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 175 font: var(--media-font, 176 var(--media-font-weight, 400) 177 var(--media-font-size, 13px) / 178 var(--media-text-content-height, var(--media-control-height, 18px)) 179 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 180 padding: var(--media-tooltip-padding, .35em .7em); 181 border: var(--media-tooltip-border, none); 182 border-radius: var(--media-tooltip-border-radius, 5px); 183 filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2))); 184 white-space: var(--media-tooltip-white-space, nowrap); 185 } 186 187 :host([hidden]) { 188 display: none; 189 } 190 191 img, svg { 192 display: inline-block; 193 } 194 195 #arrow { 196 position: absolute; 197 width: 0px; 198 height: 0px; 199 border-style: solid; 200 display: var(--media-tooltip-arrow-display, block); 201 } 202 203 :host(:not([placement])), 204 :host([placement="top"]) { 205 position: absolute; 206 bottom: calc(100% + var(--media-tooltip-distance, 12px)); 207 left: 50%; 208 transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0
208); 209 } 210 :host(:not([placement])) #arrow, 211 :host([placement="top"]) #arrow { 212 top: 100%; 213 left: 50%; 214 border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width); 215 border-color: var(--_tooltip-arrow-background) transparent transparent transparent; 216 transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0); 217 } 218 219 :host([placement="right"]) { 220 position: absolute; 221 left: calc(100% + var(--media-tooltip-distance, 12px)); 222 top: 50%; 223 transform: translate(0, -50%); 224 } 225 :host([placement="right"]) #arrow { 226 top: 50%; 227 right: 100%; 228 border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0; 229 border-color: transparent var(--_tooltip-arrow-background) transparent transparent; 230 transform: translate(0, -50%); 231 } 232 233 :host([placement="bottom"]) { 234 position: absolute; 235 top: calc(100% + var(--media-tooltip-distance, 12px)); 236 left: 50%; 237 transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0); 238 } 239 :host([placement="bottom"]) #arrow { 240 bottom: 100%; 241 left: 50%; 242 border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width); 243 border-color: transparent transparent var(--_tooltip-arrow-background) transparent; 244 transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0); 245 } 246 247 :host([placement="left"]) { 248 position: absolute; 249 right: calc(100% + var(--media-tooltip-distance, 12px)); 250 top: 50%; 251 transform: translate(0, -50%); 252 } 253 :host([placement="left"]) #arrow { 254 top: 50%; 255 left: 100%; 256 border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height); 257 border-color: transparent transparent transparent var(--_tooltip-arrow-background); 258 transform: translate(0, -50%); 259 } 260 261 :host([placement="none"]) #arrow { 262 display: none; 263 } 264 </style> 265 <slot></slot> 266 <div id="arrow"></div> 267 `},K.customElements.get("media-tooltip")||K.customElements.define("media-tooltip",tj);var tY=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},tQ=(e,t,i)=>(tY(e,t,"read from private field"),i?i.call(e):t.get(e)),tz=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},tZ=(e,t,i,a)=>(tY(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let tX="tooltipplacement",tJ="disabled",t0="notooltip";class t1 extends K.HTMLElement{constructor(){if(super(),tz(this,lr),tz(this,o6,void 0),this.preventClick=!1,this.tooltipEl=null,tz(this,le,e=>{this.preventClick||this.handleClick(e),setTimeout(tQ(this,lt),0)}),tz(this,lt,()=>{var e,t;null==(t=null==(e=this.tooltipEl)?void 0:e.updateXOffset)||t.call(e)}),tz(this,li,e=>{let{key:t}=e;this.keysUsed.includes(t)?this.preventClick||this.handleClick(e):this.removeEventListener("keyup",tQ(this,li))}),tz(this,la,e=>{let{metaKey:t,altKey:i,key:a}=e;t||i||!this.keysUsed.includes(a)?this.removeEventListener("keyup",tQ(this,li)):this.addEventListener("keyup",tQ(this,li),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=J(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip")}static get observedAttributes(){return["disabled",tX,c.MEDIA_CONTROLLER]}enable(){this.addEventListener("click",tQ(this,le)),this.addEventListener("keydown",tQ(this,la)),this.tabIndex=0}disable(){this.removeEventListener("click",tQ(this,le)),this.removeEventListener("keydown",tQ(this,la)),this.removeEventListener("keyup",tQ(this,li)),this.tabIndex=-1}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===c.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=tQ(this,o6))?void 0:a.unassociateElement)||r.call(a,this),tZ(this,o6,null)),i&&this.isConnected&&(tZ(this,o6,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=tQ(this,o6))?void 0:s.associateElement)||o.call(s,this))):"disabled"===e&&i!==t?null==i?this.enable():this.disable():e===tX&&this.tooltipEl&&i!==t&&(this.tooltipEl.placement=i),tQ(this,lt).call(this)}connectedCallback(){var e,t,i;let{style:a}=ed(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");let r=this.getAttribute(c.MEDIA_CONTROLLER);r&&(tZ(this,o6,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=tQ(this,o6))?void 0:t.associateElement)||i.call(t,this)),K.customElements.whenDefined("media-tooltip").then(()=>{var e,t;return(e=lr,t=ln,tY(this,e,"access private method"),t).call(this)})}disconnectedCallback(){var e,t;this.disable(),null==(t=null==(e=tQ(this,o6))?void 0:e.unassociateElement)||t.call(e,this),tZ(this,o6,null),this.removeEventListener("mouseenter",tQ(this,lt)),this.removeEventListener("focus",tQ(this,lt)),this.removeEventListener("click",tQ(this,le))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return ev(this,tX)}set tooltipPlacement(e){eb(this,tX,e)}get mediaController(){return ev(this,c.MEDIA_CONTROLLER)}set mediaController(e){eb(this,c.MEDIA_CONTROLLER,e)}get disabled(){return em(this,tJ)}set disabled(e){ep(this,tJ,e)}get noTooltip(){return em(this,t0)}set noTooltip(e){ep(this,t0,e)}handleClick(e){}}o6=new WeakMap,le=new WeakMap,lt=new WeakMap,li=new WeakMap,la=new WeakMap,lr=new WeakSet,ln=function(){this.addEventListener("mouseenter",tQ(this,lt)),this.addEventListener("focus",tQ(this,lt)),this.addEventListener("click",tQ(this,le));let e=this.tooltipPlacement;e&&this.tooltipEl&&(this.tooltipEl.placement=e)},t1.shadowRootOptions={mode:"open"},t1.getTemplateHTML=function(e,t={}){return` 268 <style> 269 :host { 270 position: relative; 271 font: var(--media-font, 272 var(--media-font-weight, bold) 273 var(--media-font-size, 14px) / 274 var(--media-text-content-height, var(--media-control-height, 24px)) 275 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 276 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 277 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 278 padding: var(--media-button-padding, var(--media-control-padding, 10px)); 279 justify-content: var(--media-button-justify-content, center); 280 display: inline-flex; 281 align-items: center; 282 vertical-align: middle; 283 box-sizing: border-box; 284 transition: background .15s linear; 285 pointer-events: auto; 286 cursor: var(--media-cursor, pointer); 287 -webkit-tap-highlight-color: transparent; 288 } 289 290 291 :host(:focus-visible) { 292 box-shadow: inset 0 0 0 2px rgb(27 127 204 / .9); 293 outline: 0; 294 } 295 296 :host(:where(:focus)) { 297 box-shadow: none; 298 outline: 0; 299 } 300 301 :host(:hover) { 302 background: var(--media-control-hover-background, rgba(50 50 70 / .7)); 303 } 304 305 svg, img, ::slotted(svg), ::slotted(img) { 306 width: var(--media-button-icon-width); 307 height: var(--media-button-icon-height, var(--media-control-height, 24px)); 308 transform: var(--media-button-icon-transform); 309 transition: var(--media-button-icon-transition); 310 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 311 vertical-align: middle; 312 max-width: 100%; 313 max-height: 100%; 314 min-width: 100%; 315 } 316 317 media-tooltip { 318 319 max-width: 0; 320 overflow-x: clip; 321 opacity: 0; 322 transition: opacity .3s, max-width 0s 9s; 323 } 324 325 :host(:hover) media-tooltip, 326 :host(:focus-visible) media-tooltip { 327 max-width: 100vw; 328 opacity: 1; 329 transition: opacity .3s; 330 } 331 332 :host([notooltip]) slot[name="tooltip"] { 333 display: none; 334 } 335 </style> 336
337 ${this.getSlotTemplateHTML(e,t)} 338 339 <slot name="tooltip"> 340 <media-tooltip part="tooltip" aria-hidden="true"> 341 <template shadowrootmode="${tj.shadowRootOptions.mode}"> 342 ${tj.getTemplateHTML({})} 343 </template> 344 <slot name="tooltip-content"> 345 ${this.getTooltipContentHTML(e)} 346 </slot> 347 </media-tooltip> 348 </slot> 349 `},t1.getSlotTemplateHTML=function(e,t){return` 350 <slot></slot> 351 `},t1.getTooltipContentHTML=function(){return""},K.customElements.get("media-chrome-button")||K.customElements.define("media-chrome-button",t1);let t2=`<svg aria-hidden="true" viewBox="0 0 26 24"> 352 <path d="M22.13 3H3.87a.87.87 0 0 0-.87.87v13.26a.87.87 0 0 0 .87.87h3.4L9 16H5V5h16v11h-4l1.72 2h3.4a.87.87 0 0 0 .87-.87V3.87a.87.87 0 0 0-.86-.87Zm-8.75 11.44a.5.5 0 0 0-.76 0l-4.91 5.73a.5.5 0 0 0 .38.83h9.82a.501.501 0 0 0 .38-.83l-4.91-5.73Z"/> 353</svg> 354`,t3=e=>{let t=e.mediaIsAirplaying?U("stop airplay"):U("start airplay");e.setAttribute("aria-label",t)};class t4 extends t1{static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_IS_AIRPLAYING,v.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),t3(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===v.MEDIA_IS_AIRPLAYING&&t3(this)}get mediaIsAirplaying(){return em(this,v.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){ep(this,v.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return ev(this,v.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){eb(this,v.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new K.CustomEvent(u.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}}t4.getSlotTemplateHTML=function(e){return` 355 <style> 356 :host([${v.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) { 357 display: none !important; 358 } 359 360 361 :host(:not([${v.MEDIA_IS_AIRPLAYING}])) slot[name=icon] slot:not([name=enter]) { 362 display: none !important; 363 } 364 365 :host([${v.MEDIA_IS_AIRPLAYING}]) slot[name=tooltip-enter], 366 :host(:not([${v.MEDIA_IS_AIRPLAYING}])) slot[name=tooltip-exit] { 367 display: none; 368 } 369 </style> 370 371 <slot name="icon"> 372 <slot name="enter">${t2}</slot> 373 <slot name="exit">${t2}</slot> 374 </slot> 375 `},t4.getTooltipContentHTML=function(){return` 376 <slot name="tooltip-enter">${U("start airplay")}</slot> 377 <slot name="tooltip-exit">${U("stop airplay")}</slot> 378 `},K.customElements.get("media-airplay-button")||K.customElements.define("media-airplay-button",t4);let t5=`<svg aria-hidden="true" viewBox="0 0 26 24"> 379 <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/> 380</svg>`,t9=`<svg aria-hidden="true" viewBox="0 0 26 24"> 381 <path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.8
3811 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/> 382</svg>`,t8=e=>{e.setAttribute("aria-checked",ez(e).toString())};class t7 extends t1{static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_SUBTITLES_LIST,v.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",U("closed captions")),t8(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===v.MEDIA_SUBTITLES_SHOWING&&t8(this)}get mediaSubtitlesList(){return t6(this,v.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){ie(this,v.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return t6(this,v.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){ie(this,v.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new K.CustomEvent(u.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}t7.getSlotTemplateHTML=function(e){return` 383 <style> 384 :host([aria-checked="true"]) slot[name=off] { 385 display: none !important; 386 } 387 388 389 :host(:not([aria-checked="true"])) slot[name=on] { 390 display: none !important; 391 } 392 393 :host([aria-checked="true"]) slot[name=tooltip-enable], 394 :host(:not([aria-checked="true"])) slot[name=tooltip-disable] { 395 display: none; 396 } 397 </style> 398 399 <slot name="icon"> 400 <slot name="on">${t5}</slot> 401 <slot name="off">${t9}</slot> 402 </slot> 403 `},t7.getTooltipContentHTML=function(){return` 404 <slot name="tooltip-enable">${U("Enable captions")}</slot> 405 <slot name="tooltip-disable">${U("Disable captions")}</slot> 406 `};let t6=(e,t)=>{let i=e.getAttribute(t);return i?eq(i):[]},ie=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=eK(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};K.customElements.get("media-captions-button")||K.customElements.define("media-captions-button",t7);let it=e=>{let t=e.mediaIsCasting?U("stop casting"):U("start casting");e.setAttribute("aria-label",t)};class ii extends t1{static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_IS_CASTING,v.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),it(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===v.MEDIA_IS_CASTING&&it(this)}get mediaIsCasting(){return em(this,v.MEDIA_IS_CASTING)}set mediaIsCasting(e){ep(this,v.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return ev(this,v.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){eb(this,v.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?u.MEDIA_EXIT_CAST_REQUEST:u.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new K.CustomEvent(e,{composed:!0,bubbles:!0}))}}ii.getSlotTemplateHTML=function(e){return` 407 <style> 408 :host([${v.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) { 409 display: none !important; 410 } 411 412 413 :host(:not([${v.MEDIA_IS_CASTING}])) slot[name=icon] slot:not([name=enter]) { 414 display: none !important; 415 } 416 417 :host([${v.MEDIA_IS_CASTING}]) slot[name=tooltip-enter], 418 :host(:not([${v.MEDIA_IS_CASTING}])) slot[name=tooltip-exit] { 419 display: none; 420 } 421 </style> 422 423 <slot name="icon"> 424 <slot name="enter"><svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/></g></svg></slot> 425 <slot name="exit"><svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg></slot> 426 </slot> 427 `},ii.getTooltipContentHTML=function(){return` 428 <slot name="tooltip-enter">${U("Start casting")}</slot> 429 <slot name="tooltip-exit">${U("Stop casting")}</slot> 430 `},K.customElements.get("media-cast-button")||K.customElements.define("media-cast-button",ii);var ia=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ir=(e,t,i)=>(ia(e,t,"read from private field"),i?i.call(e):t.get(e)),is=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},io=(e,t,i,a)=>(ia(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),il=(e,t,i)=>(ia(e,t,"access private method"),i);let id="open";class iu extends K.HTMLElement{constructor(){super(),is(this,ld),is(this,lc),is(this,lm),is(this,lv),is(this,lg),is(this,lf),is(this,ls,!1),is(this,lo,null),is(this,ll,null),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}static get observedAttributes(){return[id,"anchor"]}get open(){return em(this,id)}set open(e){ep(this,id,e)}handleEvent(e){switch(e.type){case"invoke":il(this,lv,lb).call(this,e);break;case"focusout":il(this,lg,lE).call(this,e);break;case"keydown":il(this,lf,ly).call(this,e)}}connectedCallback(){il(this,ld,lu).call(this),this.role||(this.role="dialog")}attributeChangedCallback(e,t,i){il(this,ld,lu).call(this),e===id&&i!==t&&(this.open?il(this,lc,lh).call(this):il(this,lm,lp).call(this))}focus(){io(this,lo,es());let e=!this.dispatchEvent(new Event("focus",{composed:!0,cancelable:!0})),t=!this.dispatchEvent(new Event("focusin",{composed:!0,bubbles:!0,cancelable:!0}));if(e||t)return;
430let i=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==i||i.focus()}get keysUsed(){return["Escape","Tab"]}}ls=new WeakMap,lo=new WeakMap,ll=new WeakMap,ld=new WeakSet,lu=function(){if(!ir(this,ls)&&(io(this,ls,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);let e=J(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e),queueMicrotask(()=>{let{style:e}=ed(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}},lc=new WeakSet,lh=function(){var e;null==(e=ir(this,ll))||e.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})},lm=new WeakSet,lp=function(){var e;null==(e=ir(this,ll))||e.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))},lv=new WeakSet,lb=function(e){io(this,ll,e.relatedTarget),er(this,e.relatedTarget)||(this.open=!this.open)},lg=new WeakSet,lE=function(e){var t;!er(this,e.relatedTarget)&&(null==(t=ir(this,lo))||t.focus(),ir(this,ll)&&ir(this,ll)!==e.relatedTarget&&this.open&&(this.open=!1))},lf=new WeakSet,ly=function(e){var t,i,a,r,n;let{key:s,ctrlKey:o,altKey:l,metaKey:d}=e;o||l||d||this.keysUsed.includes(s)&&(e.preventDefault(),e.stopPropagation(),"Tab"===s?(e.shiftKey?null==(i=null==(t=this.previousElementSibling)?void 0:t.focus)||i.call(t):null==(r=null==(a=this.nextElementSibling)?void 0:a.focus)||r.call(a),this.blur()):"Escape"===s&&(null==(n=ir(this,lo))||n.focus(),this.open=!1))},iu.shadowRootOptions={mode:"open"},iu.getTemplateHTML=function(e){return` 431 <style> 432 :host { 433 font: var(--media-font, 434 var(--media-font-weight, normal) 435 var(--media-font-size, 14px) / 436 var(--media-text-content-height, var(--media-control-height, 24px)) 437 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 438 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 439 display: var(--media-dialog-display, inline-flex); 440 justify-content: center; 441 align-items: center; 442 443 transition-behavior: allow-discrete; 444 visibility: hidden; 445 opacity: 0; 446 transform: translateY(2px) scale(.99); 447 pointer-events: none; 448 } 449 450 :host([open]) { 451 transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out; 452 visibility: visible; 453 opacity: 1; 454 transform: translateY(0) scale(1); 455 pointer-events: auto; 456 } 457 458 #content { 459 display: flex; 460 position: relative; 461 box-sizing: border-box; 462 width: min(320px, 100%); 463 word-wrap: break-word; 464 max-height: 100%; 465 overflow: auto; 466 text-align: center; 467 line-height: 1.4; 468 } 469 </style> 470 ${this.getSlotTemplateHTML(e)} 471 `},iu.getSlotTemplateHTML=function(e){return` 472 <slot id="content"></slot> 473 `},K.customElements.get("media-chrome-dialog")||K.customElements.define("media-chrome-dialog",iu);var ic=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ih=(e,t,i)=>(ic(e,t,"read from private field"),i?i.call(e):t.get(e)),im=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},ip=(e,t,i,a)=>(ic(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),iv=(e,t,i)=>(ic(e,t,"access private method"),i);class ib extends K.HTMLElement{constructor(){if(super(),im(this,lL),im(this,lx),im(this,lP),im(this,lO),im(this,lH),im(this,lB),im(this,lV),im(this,lF),im(this,l_,void 0),im(this,lk,void 0),im(this,lA,void 0),im(this,lw,void 0),im(this,lT,{}),im(this,lI,[]),im(this,lS,()=>{if(this.range.matches(":focus-visible")){let{style:e}=ed(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),im(this,lC,()=>{let{style:e}=ed(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),im(this,lM,()=>{let e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=J(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}this.container=this.shadowRoot.querySelector("#container"),ip(this,lA,this.shadowRoot.querySelector("#startpoint")),ip(this,lw,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",c.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===c.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=ih(this,l_))?void 0:a.unassociateElement)||r.call(a,this),ip(this,l_,null)),i&&this.isConnected&&(ip(this,l_,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=ih(this,l_))?void 0:s.associateElement)||o.call(s,this))):("disabled"===e||"aria-disabled"===e&&t!==i)&&(null==i?(this.range.removeAttribute(e),iv(this,lx,lD).call(this)):(this.range.setAttribute(e,i),iv(this,lP,lN).call(this)))}connectedCallback(){var e,t,i;let{style:a}=ed(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),ih(this,lT).pointer=ed(this.shadowRoot,"#pointer"),ih(this,lT).progress=ed(this.shadowRoot,"#progress"),ih(this,lT).thumb=ed(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),ih(this,lT).activeSegment=ed(this.shadowRoot,"#segments-clipping rect:nth-child(0)");let r=this.getAttribute(c.MEDIA_CONTROLLER);r&&(ip(this,l_,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=ih(this,l_))?void 0:t.associateElement)||i.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",ih(this,lS)),this.shadowRoot.addEventListener("focusout",ih(this,lC)),iv(this,lx,lD).call(this),Z(this.container,ih(this,lM))}disconnectedCallback(){var e,t;iv(this,lP,lN).call(this),null==(t=null==(e=ih(this,l_))?void 0:e.unassociateElement)||t.call(e,this),ip(this,l_,null),this.shadowRoot.removeEventListener("focusin",ih(this,lS)),this.shadowRoot.removeEventListener("focusout",ih(this,lC)),X(this.container,ih(this,lM))}updatePointerBar(e){var t;null==(t=ih(this,lT).pointer)||t.style.setProperty("width",`${100*this.getPointerRatio(e)}%`)}updateBar(){var e,t;let i=100*this.range.valueAsNumber;null==(e=ih(this,lT).progress)||e.style.setProperty("width",`${i}%`),null==(t=ih(this,lT).thumb)||t.style.setProperty("left",`${i}%`)}updateSegments(e){let t=this.shadowRoot.querySelector("#segments-clipping");if(t.textContent="",this.container.classList.toggle("segments",!!(null==e?void 0:e.length)),!(null==e?void 0:e.length))return;let i=[...new Set([+this.range.min,...e.flatMap(e=>[e.start,e.end]),+this.range.max])];ip(this,lI,[...i]);let a=i.pop();for(let[e,r]of i.entries()){let[n,s]=[0===e,e===i.length-1],o=n?"calc(var(--segments-gap) / -1)":`${100*r}%`,l=s?a:i[e+1],d=`calc(${(l-r)*100}%${n||s?"":" - var(--segments-gap)"})`,u=j.createElementNS("http://www.w3.org/2000/svg","rect"),c=ed(this.shadowRoot,`#segments-clipping rect:nth-child(${e+1})`);c.style.setProperty("x",o),c.style.setProperty("width",d),t.append(u)}}getPointerRatio(e){var t,i,a,r;let n,s,o;return t=e.clientX,i=e.clientY,a=ih(this,lA).getBoundingClientRect(),n=(r=ih(this,lw).getBoundingClientRect()).x-a.x,0==(o=n*n+(s=r.y-a.y)*s)?0:Math.max(0,Math.min(1,((t-a.x)*n+(i-a.y)*s)/o))}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":iv(this,lF,lG).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":iv(this,lH,lW).call(this,e);break;case"pointerdown":iv(this,lO,lU).call(this,e);break;case"pointerup":iv(this,lB,l$).call(this);break;case"pointerleave":iv(this,lV,lq).call(this)}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}l_=new WeakMap,lk=new WeakMap,lA=new WeakMap,lw=new WeakMap,lT=new WeakMap,lI=new WeakMap,lS=new WeakMap,lC=new WeakMap,lM=new WeakMap,lL=new WeakSet,lR=function(e){let t=ih(this,lT).activeSegment;if(!t)return;
473let i=this.getPointerRatio(e),a=ih(this,lI).findIndex((e,t,a)=>{let r=a[t+1];return null!=r&&i>=e&&i<=r}),r=`#segments-clipping rect:nth-child(${a+1})`;t.selectorText==r&&t.style.transform||(t.selectorText=r,t.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))},lx=new WeakSet,lD=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))},lP=new WeakSet,lN=function(){var e,t;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),null==(e=K.window)||e.removeEventListener("pointerup",this),null==(t=K.window)||t.removeEventListener("pointermove",this)},lO=new WeakSet,lU=function(e){var t;ip(this,lk,e.composedPath().includes(this.range)),null==(t=K.window)||t.addEventListener("pointerup",this)},lH=new WeakSet,lW=function(e){var t;"mouse"!==e.pointerType&&iv(this,lO,lU).call(this,e),this.addEventListener("pointerleave",this),null==(t=K.window)||t.addEventListener("pointermove",this)},lB=new WeakSet,l$=function(){var e;null==(e=K.window)||e.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")},lV=new WeakSet,lq=function(){var e,t;this.removeEventListener("pointerleave",this),null==(e=K.window)||e.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),null==(t=ih(this,lT).activeSegment)||t.style.removeProperty("transform")},lF=new WeakSet,lG=function(e){this.toggleAttribute("dragging",1===e.buttons||"mouse"!==e.pointerType),this.updatePointerBar(e),iv(this,lL,lR).call(this,e),this.dragging&&("mouse"!==e.pointerType||!ih(this,lk))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(e),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))},ib.shadowRootOptions={mode:"open"},ib.getTemplateHTML=function(e){return` 474 <style> 475 :host { 476 --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 477 --_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px)); 478 479 box-shadow: var(--_focus-visible-box-shadow, none); 480 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 481 height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding)); 482 display: inline-flex; 483 align-items: center; 484 485 vertical-align: middle; 486 box-sizing: border-box; 487 position: relative; 488 width: 100px; 489 transition: background .15s linear; 490 cursor: var(--media-cursor, pointer); 491 pointer-events: auto; 492 touch-action: none; 493 } 494 495 496 input[type=range]:focus { 497 outline: 0; 498 } 499 input[type=range]:focus::-webkit-slider-runnable-track { 500 outline: 0; 501 } 502 503 :host(:hover) { 504 background: var(--media-control-hover-background, rgb(50 50 70 / .7)); 505 } 506 507 #leftgap { 508 padding-left: var(--media-range-padding-left, var(--_media-range-padding)); 509 } 510 511 #rightgap { 512 padding-right: var(--media-range-padding-right, var(--_media-range-padding)); 513 } 514 515 #startpoint, 516 #endpoint { 517 position: absolute; 518 } 519 520 #endpoint { 521 right: 0; 522 } 523 524 #container { 525 526 width: var(--media-range-track-width, 100%); 527 transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px)); 528 position: relative; 529 height: 100%; 530 display: flex; 531 align-items: center; 532 min-width: 40px; 533 } 534 535 #range { 536 537 display: var(--media-time-range-hover-display, block); 538 bottom: var(--media-time-range-hover-bottom, -7px); 539 height: var(--media-time-range-hover-height, max(100% + 7px, 25px)); 540 width: 100%; 541 position: absolute; 542 cursor: var(--media-cursor, pointer); 543 544 -webkit-appearance: none; 545 -webkit-tap-highlight-color: transparent; 546 background: transparent; 547 margin: 0; 548 z-index: 1; 549 } 550 551 @media (hover: hover) { 552 #range { 553 bottom: var(--media-time-range-hover-bottom, -5px); 554 height: var(--media-time-range-hover-height, max(100% + 5px, 20px)); 555 } 556 } 557 558 559 560 #range::-webkit-slider-thumb { 561 -webkit-appearance: none; 562 background: transparent; 563 width: .1px; 564 height: .1px; 565 } 566 567 568 #range::-moz-range-thumb { 569 background: transparent; 570 border: transparent; 571 width: .1px; 572 height: .1px; 573 } 574 575 #appearance { 576 height: var(--media-range-track-height, 4px); 577 display: flex; 578 flex-direction: column; 579 justify-content: center; 580 width: 100%; 581 position: absolute; 582 583 will-change: transform; 584 } 585 586 #track { 587 background: var(--media-range-track-background, rgb(255 255 255 / .2)); 588 border-radius: var(--media-range-track-border-radius, 1px); 589 border: var(--media-range-track-border, none); 590 outline: var(--media-range-track-outline); 591 outline-offset: var(--media-range-track-outline-offset); 592 backdrop-filter: var(--media-range-track-backdrop-filter); 593 -webkit-backdrop-filter: var(--media-range-track-backdrop-filter);
594 box-shadow: var(--media-range-track-box-shadow, none); 595 position: absolute; 596 width: 100%; 597 height: 100%; 598 overflow: hidden; 599 } 600 601 #progress, 602 #pointer { 603 position: absolute; 604 height: 100%; 605 will-change: width; 606 } 607 608 #progress { 609 background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238))); 610 transition: var(--media-range-track-transition); 611 } 612 613 #pointer { 614 background: var(--media-range-track-pointer-background); 615 border-right: var(--media-range-track-pointer-border-right); 616 transition: visibility .25s, opacity .25s; 617 visibility: hidden; 618 opacity: 0; 619 } 620 621 @media (hover: hover) { 622 :host(:hover) #pointer { 623 transition: visibility .5s, opacity .5s; 624 visibility: visible; 625 opacity: 1; 626 } 627 } 628 629 #thumb, 630 ::slotted([slot=thumb]) { 631 width: var(--media-range-thumb-width, 10px); 632 height: var(--media-range-thumb-height, 10px); 633 transition: var(--media-range-thumb-transition); 634 transform: var(--media-range-thumb-transform, none); 635 opacity: var(--media-range-thumb-opacity, 1); 636 translate: -50%; 637 position: absolute; 638 left: 0; 639 cursor: var(--media-cursor, pointer); 640 } 641 642 #thumb { 643 border-radius: var(--media-range-thumb-border-radius, 10px); 644 background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238))); 645 box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent); 646 border: var(--media-range-thumb-border, none); 647 } 648 649 :host([disabled]) #thumb { 650 background-color: #777; 651 } 652 653 .segments #appearance { 654 height: var(--media-range-segment-hover-height, 7px); 655 } 656 657 #track { 658 clip-path: url(#segments-clipping); 659 } 660 661 #segments { 662 --segments-gap: var(--media-range-segments-gap, 2px); 663 position: absolute; 664 width: 100%; 665 height: 100%; 666 } 667 668 #segments-clipping { 669 transform: translateX(calc(var(--segments-gap) / 2)); 670 } 671 672 #segments-clipping:empty { 673 display: none; 674 } 675 676 #segments-clipping rect { 677 height: var(--media-range-track-height, 4px); 678 y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2); 679 transition: var(--media-range-segment-transition, transform .1s ease-in-out); 680 transform: var(--media-range-segment-transform, scaleY(1)); 681 transform-origin: center; 682 } 683 </style> 684 <div id="leftgap"></div> 685 <div id="container"> 686 <div id="startpoint"></div> 687 <div id="endpoint"></div> 688 <div id="appearance"> 689 <div id="track" part="track"> 690 <div id="pointer"></div> 691 <div id="progress" part="progress"></div> 692 </div> 693 <slot name="thumb"> 694 <div id="thumb" part="thumb"></div> 695 </slot> 696 <svg id="segments"><clipPath id="segments-clipping"></clipPath></svg> 697 </div>
698 <input id="range" type="range" min="0" max="1" step="any" value="0"> 699 </div> 700 <div id="rightgap"></div> 701 `},K.customElements.get("media-chrome-range")||K.customElements.define("media-chrome-range",ib);var ig=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},iE=(e,t,i)=>(ig(e,t,"read from private field"),i?i.call(e):t.get(e)),iy=(e,t,i,a)=>(ig(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class i_ extends K.HTMLElement{constructor(){if(super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,lK,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=J(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[c.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===c.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=iE(this,lK))?void 0:a.unassociateElement)||r.call(a,this),iy(this,lK,null)),i&&this.isConnected&&(iy(this,lK,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=iE(this,lK))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let a=this.getAttribute(c.MEDIA_CONTROLLER);a&&(iy(this,lK,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=iE(this,lK))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=iE(this,lK))?void 0:e.unassociateElement)||t.call(e,this),iy(this,lK,null)}}lK=new WeakMap,i_.shadowRootOptions={mode:"open"},i_.getTemplateHTML=function(e){return` 702 <style> 703 :host { 704 705 box-sizing: border-box; 706 display: var(--media-control-display, var(--media-control-bar-display, inline-flex)); 707 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 708 --media-loading-indicator-icon-height: 44px; 709 } 710 711 ::slotted(media-time-range), 712 ::slotted(media-volume-range) { 713 min-height: 100%; 714 } 715 716 ::slotted(media-time-range), 717 ::slotted(media-clip-selector) { 718 flex-grow: 1; 719 } 720 721 ::slotted([role="menu"]) { 722 position: absolute; 723 } 724 </style> 725 726 <slot></slot> 727 `},K.customElements.get("media-control-bar")||K.customElements.define("media-control-bar",i_);var ik=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},iA=(e,t,i)=>(ik(e,t,"read from private field"),i?i.call(e):t.get(e)),iw=(e,t,i,a)=>(ik(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class iT extends K.HTMLElement{constructor(){if(super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,lj,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=J(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[c.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===c.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=iA(this,lj))?void 0:a.unassociateElement)||r.call(a,this),iw(this,lj,null)),i&&this.isConnected&&(iw(this,lj,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=iA(this,lj))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let{style:a}=ed(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);let r=this.getAttribute(c.MEDIA_CONTROLLER);r&&(iw(this,lj,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=iA(this,lj))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=iA(this,lj))?void 0:e.unassociateElement)||t.call(e,this),iw(this,lj,null)}}lj=new WeakMap,iT.shadowRootOptions={mode:"open"},iT.getTemplateHTML=function(e,t={}){return` 728 <style> 729 :host { 730 font: var(--media-font, 731 var(--media-font-weight, normal) 732 var(--media-font-size, 14px) / 733 var(--media-text-content-height, var(--media-control-height, 24px)) 734 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 735 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 736 background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)))); 737 padding: var(--media-control-padding, 10px); 738 display: inline-flex; 739 justify-content: center; 740 align-items: center; 741 vertical-align: middle; 742 box-sizing: border-box; 743 text-align: center; 744 pointer-events: auto; 745 } 746 747 748 :host(:focus-visible) { 749 box-shadow: inset 0 0 0 2px rgb(27 127 204 / .9); 750 outline: 0; 751 } 752 753 754 :host(:where(:focus)) { 755 box-shadow: none; 756 outline: 0; 757 } 758 </style> 759
760 ${this.getSlotTemplateHTML(e,t)} 761 `},iT.getSlotTemplateHTML=function(e,t){return` 762 <slot></slot> 763 `},K.customElements.get("media-text-display")||K.customElements.define("media-text-display",iT);var iI=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},iS=(e,t,i)=>(iI(e,t,"read from private field"),i?i.call(e):t.get(e));class iC extends iT{constructor(){var e;super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,lY,void 0),((e,t,i,a)=>(iI(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,lY,this.shadowRoot.querySelector("slot")),iS(this,lY).textContent=P(null!=(e=this.mediaDuration)?e:0)}static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_DURATION]}attributeChangedCallback(e,t,i){e===v.MEDIA_DURATION&&(iS(this,lY).textContent=P(+i)),super.attributeChangedCallback(e,t,i)}get mediaDuration(){return ec(this,v.MEDIA_DURATION)}set mediaDuration(e){eh(this,v.MEDIA_DURATION,e)}}lY=new WeakMap,iC.getSlotTemplateHTML=function(e,t){return` 764 <slot>${P(t.mediaDuration)}</slot> 765 `},K.customElements.get("media-duration-display")||K.customElements.define("media-duration-display",iC);let iM={2:U("Network Error"),3:U("Decode Error"),4:U("Source Not Supported"),5:U("Encryption
765Error")},iL={2:U("A network error caused the media download to fail."),3:U("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:U("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:U("The media is encrypted and there are no keys to decrypt it.")},iR=e=>{var t,i;return 1===e.code?null:{title:null!=(t=iM[e.code])?t:`Error ${e.code}`,message:null!=(i=iL[e.code])?i:e.message}};var ix=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};function iD(e){var t;let{title:i,message:a}=null!=(t=iR(e))?t:{},r="";return i&&(r+=`<slot name="error-${e.code}-title"><h3>${i}</h3></slot>`),a&&(r+=`<slot name="error-${e.code}-message"><p>${a}</p></slot>`),r}let iP=[v.MEDIA_ERROR_CODE,v.MEDIA_ERROR_MESSAGE];class iN extends iu{constructor(){super(...arguments),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,lQ,null)}static get observedAttributes(){return[...super.observedAttributes,...iP]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,t,i){var a;if(super.attributeChangedCallback(e,t,i),!iP.includes(e))return;let r=null!=(a=this.mediaError)?a:{code:this.mediaErrorCode,message:this.mediaErrorMessage};this.open=r.code&&null!==iR(r),this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(r))}get mediaError(){var e,t;return ix(this,e=lQ,"read from private field"),t?t.call(this):e.get(this)}set mediaError(e){var t,i;ix(this,t=lQ,"write to private field"),i?i.call(this,e):t.set(this,e)}get mediaErrorCode(){return ec(this,"mediaerrorcode")}set mediaErrorCode(e){eh(this,"mediaerrorcode",e)}get mediaErrorMessage(){return ev(this,"mediaerrormessage")}set mediaErrorMessage(e){eb(this,"mediaerrormessage",e)}}lQ=new WeakMap,iN.getSlotTemplateHTML=function(e){return` 766 <style> 767 :host { 768 background: rgb(20 20 30 / .8); 769 } 770 771 #content { 772 display: block; 773 padding: 1.2em 1.5em; 774 } 775 776 h3, 777 p { 778 margin-block: 0 .3em; 779 } 780 </style> 781 <slot name="error-${e.mediaerrorcode}" id="content"> 782 ${iD({code:+e.mediaerrorcode,message:e.mediaerrormessage})} 783 </slot> 784 `},iN.formatErrorMessage=iD,K.customElements.get("media-error-dialog")||K.customElements.define("media-error-dialog",iN);let iO=`<svg aria-hidden="true" viewBox="0 0 26 24"> 785 <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/> 786</svg>`,iU=`<svg aria-hidden="true" viewBox="0 0 26 24"> 787 <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/> 788</svg>`,iH=e=>{let t=e.mediaIsFullscreen?U("exit fullscreen mode"):U("enter fullscreen mode");e.setAttribute("aria-label",t)};class iW extends t1{static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_IS_FULLSCREEN,v.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),iH(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===v.MEDIA_IS_FULLSCREEN&&iH(this)}get mediaFullscreenUnavailable(){return ev(this,v.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){eb(this,v.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return em(this,v.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){ep(this,v.MEDIA_IS_FULLSCREEN,e)}handleClick(){let e=this.mediaIsFullscreen?u.MEDIA_EXIT_FULLSCREEN_REQUEST:u.MEDIA_ENTER_FULLSCREEN_REQUEST;this.dispatchEvent(new K.CustomEvent(e,{composed:!0,bubbles:!0}))}}iW.getSlotTemplateHTML=function(e){return` 789 <style> 790 :host([${v.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) { 791 display: none !important; 792 } 793 794 795 :host(:not([${v.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) { 796 display: none !important; 797 } 798 799 :host([${v.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter], 800 :host(:not([${v.MEDIA_IS_FULLSCREEN}])) slot[name=tooltip-exit] { 801 display: none; 802 } 803 </style> 804 805 <slot name="icon"> 806 <slot name="enter">${iO}</slot> 807 <slot name="exit">${iU}</slot> 808 </slot> 809 `},iW.getTooltipContentHTML=function(){return` 810 <slot name="tooltip-enter">${U("Enter fullscreen mode")}</slot> 811 <slot name="tooltip-exit">${U("Exit fullscreen mode")}</slot> 812 `},K.customElements.get("media-fullscreen-button")||K.customElements.define("media-fullscreen-button",iW);let{MEDIA_TIME_IS_LIVE:iB,MEDIA_PAUSED:i$}=v,{MEDIA_SEEK_TO_LIVE_REQUEST:iV,MEDIA_PLAY_REQUEST:iq}=u,iF=e=>{let t=e.mediaPaused||!e.mediaTimeIsLive,i=t?U("seek to live"):U("playing live");e.setAttribute("aria-label",i),t?e.removeAttribute("aria-disabled"):e.setAttribute("aria-disabled","true")};class iG extends t1{static get observedAttributes(){return[...super.observedAttributes,iB,i$]}connectedCallback(){super.connectedCallback(),iF(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),iF(this)}get mediaPaused(){return em(this,v.MEDIA_PAUSED)}set mediaPaused(e){ep(this,v.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return em(this,v.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){ep(this,v.MEDIA_TIME_IS_LIVE,e)}handleClick(){(this.mediaPaused||!this.mediaTimeIsLive)&&(this.dispatchEvent(new K.CustomEvent(iV,{composed:!0,bubbles:!0})),this.hasAttribute(i$)&&this.dispatchEvent(new K.CustomEvent(iq,{composed:!0,bubbles:!0})))}}iG.getSlotTemplateHTML=function(e){return` 813 <style> 814 :host { --media-tooltip-display: none; } 815 816 slot[name=indicator] > *, 817 :host ::slotted([slot=indicator]) { 818 819 min-width: auto; 820 fill: var(--media-live-button-icon-color, rgb(140, 140, 140)); 821 color: var(--media-live-button-icon-color, rgb(140, 140, 140)); 822 } 823 824 :host([${iB}]:not([${i$}])) slot[name=indicator] > *, 825 :host([${iB}]:not([${i$}])) ::slotted([slot=indicator]) { 826 fill: var(--media-live-button-indicator-color, rgb(255, 0, 0)); 827 color: var(--media-live-button-indicator-color, rgb(255, 0, 0)); 828 } 829 830 :host([${iB}]:not([${i$}])) { 831 cursor: var(--media-cursor, not-allowed); 832 } 833 834 slot[name=text]{ 835 text-transform: uppercase; 836 } 837 838 </style> 839 840 <slot name="indicator"><svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg></slot> 841 842 <slot name="spacer"> </slot><slot name="text">${U("live")}</slot> 843 `},K.customElements.get("media-live-button")||K.customElements.define("media-live-button",iG);var iK=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ij=(e,t,i)=>(iK(e,t,"read from private field"),i?i.call(e):t.get(e)),iY=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},iQ=(e,t,i,a)=>(iK(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let iz="loadingdelay",iZ="noautohide",iX=` 844<svg aria-hidden="true" viewBox="0 0 100 100"> 845 <path d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"> 846 <animateTransform 847 attributeName="transform" 848 attributeType="XML" 849 type="rotate" 850 dur="1s" 851 from="0 50 50" 852 to="360 50 50"
853 repeatCount="indefinite" /> 854 </path> 855</svg> 856`;class iJ extends K.HTMLElement{constructor(){if(super(),iY(this,lz,void 0),iY(this,lZ,500),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=J(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[c.MEDIA_CONTROLLER,v.MEDIA_PAUSED,v.MEDIA_LOADING,iz]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===iz&&t!==i?this.loadingDelay=Number(i):e===c.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=ij(this,lz))?void 0:a.unassociateElement)||r.call(a,this),iQ(this,lz,null)),i&&this.isConnected&&(iQ(this,lz,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=ij(this,lz))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let a=this.getAttribute(c.MEDIA_CONTROLLER);a&&(iQ(this,lz,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=ij(this,lz))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=ij(this,lz))?void 0:e.unassociateElement)||t.call(e,this),iQ(this,lz,null)}get loadingDelay(){return ij(this,lZ)}set loadingDelay(e){iQ(this,lZ,e);let{style:t}=ed(this.shadowRoot,":host");t.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return em(this,v.MEDIA_PAUSED)}set mediaPaused(e){ep(this,v.MEDIA_PAUSED,e)}get mediaLoading(){return em(this,v.MEDIA_LOADING)}set mediaLoading(e){ep(this,v.MEDIA_LOADING,e)}get mediaController(){return ev(this,c.MEDIA_CONTROLLER)}set mediaController(e){eb(this,c.MEDIA_CONTROLLER,e)}get noAutohide(){return em(this,iZ)}set noAutohide(e){ep(this,iZ,e)}}lz=new WeakMap,lZ=new WeakMap,iJ.shadowRootOptions={mode:"open"},iJ.getTemplateHTML=function(e){return` 857 <style> 858 :host { 859 display: var(--media-control-display, var(--media-loading-indicator-display, inline-block)); 860 vertical-align: middle; 861 box-sizing: border-box; 862 --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, 500ms); 863 } 864 865 #status { 866 color: rgba(0,0,0,0); 867 width: 0px; 868 height: 0px; 869 } 870 871 :host slot[name=icon] > *, 872 :host ::slotted([slot=icon]) { 873 opacity: var(--media-loading-indicator-opacity, 0); 874 transition: opacity 0.15s; 875 } 876 877 :host([${v.MEDIA_LOADING}]:not([${v.MEDIA_PAUSED}])) slot[name=icon] > *, 878 :host([${v.MEDIA_LOADING}]:not([${v.MEDIA_PAUSED}])) ::slotted([slot=icon]) { 879 opacity: var(--media-loading-indicator-opacity, 1); 880 transition: opacity 0.15s var(--_loading-indicator-delay); 881 } 882 883 :host #status { 884 visibility: var(--media-loading-indicator-opacity, hidden); 885 transition: visibility 0.15s; 886 } 887 888 :host([${v.MEDIA_LOADING}]:not([${v.MEDIA_PAUSED}])) #status { 889 visibility: var(--media-loading-indicator-opacity, visible); 890 transition: visibility 0.15s var(--_loading-indicator-delay); 891 } 892 893 svg, img, ::slotted(svg), ::slotted(img) { 894 width: var(--media-loading-indicator-icon-width); 895 height: var(--media-loading-indicator-icon-height, 100px); 896 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 897 vertical-align: middle; 898 } 899 </style> 900 901 <slot name="icon">${iX}</slot> 902 <div id="status" role="status" aria-live="polite">${U("media loading")}</div> 903 `},K.customElements.get("media-loading-indicator")||K.customElements.define("media-loading-indicator",iJ);let i0=`<svg aria-hidden="true" viewBox="0 0 24 24"> 904 <path d="M16.5 12A4.5 4.5 0 0 0 14 8v2.18l2.45 2.45a4.22 4.22 0 0 0 .05-.63Zm2.5 0a6.84 6.84 0 0 1-.54 2.64L20 16.15A8.8 8.8 0 0 0 21 12a9 9 0 0 0-7-8.77v2.06A7 7 0 0 1 19 12ZM4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25A6.92 6.92 0 0 1 14 18.7v2.06A9 9 0 0 0 17.69 19l2 2.05L21 19.73l-9-9L4.27 3ZM12 4 9.91 6.09 12 8.18V4Z"/> 905</svg>`,i1=`<svg aria-hidden="true" viewBox="0 0 24 24"> 906 <path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4Z"/> 907</svg>`,i2=`<svg aria-hidden="true" viewBox="0 0 24 24"> 908 <path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4ZM14 3.23v2.06a7 7 0 0 1 0 13.42v2.06a9 9 0 0 0 0-17.54Z"/> 909</svg>`,i3=e=>{let t="off"===e.mediaVolumeLevel?U("unmute"):U("mute");e.setAttribute("aria-label",t)};class i4 extends t1{static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),i3(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===v.MEDIA_VOLUME_LEVEL&&i3(this)}get mediaVolumeLevel(){return ev(this,v.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){eb(this,v.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e="off"===this.mediaVolumeLevel?u.MEDIA_UNMUTE_REQUEST:u.MEDIA_MUTE_REQUEST;this.dispatchEvent(new K.CustomEvent(e,{composed:!0,bubbles:!0}))}}i4.getSlotTemplateHTML=function(e){return` 910 <style> 911 :host(:not([${v.MEDIA_VOLUME_LEVEL}])) slot[name=icon] slot:not([name=high]), 912 :host([${v.MEDIA_VOLUME_LEVEL}=high]) slot[name=icon] slot:not([name=high]) { 913 display: none !important; 914 } 915 916 :host([${v.MEDIA_VOLUME_LEVEL}=off]) slot[name=icon] slot:not([name=off]) { 917 display: none !important; 918 } 919 920 :host([${v.MEDIA_VOLUME_LEVEL}=low]) slot[name=icon] slot:not([name=low]) { 921 display: none !important; 922 } 923 924 :host([${v.MEDIA_VOLUME_LEVEL}=medium]) slot[name=icon] slot:not([name=medium]) { 925 display: none !important; 926 } 927 928 :host(:not([${v.MEDIA_VOLUME_LEVEL}=off])) slot[name=tooltip-unmute], 929 :host([${v.MEDIA_VOLUME_LEVEL}=off]) slot[name=tooltip-mute] { 930 display: none; 931 } 932 </style> 933 934 <slot name="icon"> 935 <slot name="off">${i0}</slot> 936 <slot name="low">${i1}</slot> 937 <slot name="medium">${i1}</slot> 938 <slot name="high">${i2}</slot> 939 </slot> 940 `},i4.getTooltipContentHTML=function(){return` 941 <slot name="tooltip-mute">${U("Mute")}</slot> 942 <slot name="tooltip-unmute">${U("Unmute")}</slot> 943 `},K.customElements.get("media-mute-button")||K.customElements.define("media-mute-button",i4);let i5=`<svg aria-hidden="true" viewBox="0 0 28 24"> 944 <path d="M24 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h20a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Zm-1 16H5V5h18v14Zm-3-8h-7v5h7v-5Z"/> 945</svg>`,i9=e=>{let t=e.mediaIsPip?U("exit picture in picture mode"):U("enter picture in picture mode");e.setAttribute("aria-label",t)};class i8 extends t1{static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_IS_PIP,v.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),i9(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===v.MEDIA_IS_PIP&&i9(this)}get mediaPipUnavailable(){return ev(this,v.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){eb(this,v.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return em(this,v.MEDIA_IS_PIP)}set mediaIsPip(e){ep(this,v.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?u.MEDIA_EXIT_PIP_REQUEST:u.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new K.CustomEvent(e,{composed:!0,bubbles:!0}))}}i8.getSlotTemplateHTML=function(e){return` 946 <style> 947 :host([${v.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) { 948 display: none !important; 949 } 950 951 :host(:not([${v.MEDIA_IS_PIP}])) slot[name=icon] slot:not([name=enter]) { 952 display: none !important; 953 } 954 955 :host([${v.MEDIA_IS_PIP}]) slot[name=tooltip-enter], 956 :host(:not([${v.MEDIA_IS_PIP}])) slot[name=tooltip-exit] { 957 display: none; 958 } 959 </style> 960 961 <slot name="icon"> 962 <slot name="enter">${i5}</slot> 963 <slot name="exit">${i5}</slot> 964 </slot> 965 `},i8.getTooltipContentHTML=function(){return` 966 <slot name="tooltip-enter">${U("Enter picture in picture mode")}</slot> 967 <slot name="tooltip-exit">${U("Exit picture in picture mode")}</slot> 968 `},K.customElements.get("media-pip-button")||K.customElements.define("media-pip-button",i8);var i7=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)};
968let i6="rates",ae=[1,1.2,1.5,1.7,2];class at extends t1{constructor(){var e;super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,lX,new e$(this,i6,{defaultValue:ae})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${null!=(e=this.mediaPlaybackRate)?e:1}x`}static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_PLAYBACK_RATE,i6]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===i6&&(i7(this,lX).value=i),e===v.MEDIA_PLAYBACK_RATE){let e=i?+i:NaN,t=Number.isNaN(e)?1:e;this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",U("Playback rate {playbackRate}",{playbackRate:t}))}}get rates(){return i7(this,lX)}set rates(e){e?Array.isArray(e)?i7(this,lX).value=e.join(" "):"string"==typeof e&&(i7(this,lX).value=e):i7(this,lX).value=""}get mediaPlaybackRate(){return ec(this,v.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){eh(this,v.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;let i=Array.from(i7(this,lX).values(),e=>+e).sort((e,t)=>e-t),a=null!=(t=null!=(e=i.find(e=>e>this.mediaPlaybackRate))?e:i[0])?t:1,r=new K.CustomEvent(u.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(r)}}lX=new WeakMap,at.getSlotTemplateHTML=function(e){return` 969 <style> 970 :host { 971 min-width: 5ch; 972 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 973 } 974 </style> 975 <slot name="icon">${e.mediaplaybackrate||1}x</slot> 976 `},at.getTooltipContentHTML=function(){return U("Playback rate")},K.customElements.get("media-playback-rate-button")||K.customElements.define("media-playback-rate-button",at);let ai=`<svg aria-hidden="true" viewBox="0 0 24 24"> 977 <path d="m6 21 15-9L6 3v18Z"/> 978</svg>`,aa=`<svg aria-hidden="true" viewBox="0 0 24 24"> 979 <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/> 980</svg>`,ar=e=>{let t=e.mediaPaused?U("play"):U("pause");e.setAttribute("aria-label",t)};class an extends t1{static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_PAUSED,v.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),ar(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===v.MEDIA_PAUSED&&ar(this)}get mediaPaused(){return em(this,v.MEDIA_PAUSED)}set mediaPaused(e){ep(this,v.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?u.MEDIA_PLAY_REQUEST:u.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new K.CustomEvent(e,{composed:!0,bubbles:!0}))}}an.getSlotTemplateHTML=function(e){return` 981 <style> 982 :host([${v.MEDIA_PAUSED}]) slot[name=pause], 983 :host(:not([${v.MEDIA_PAUSED}])) slot[name=play] { 984 display: none !important; 985 } 986 987 :host([${v.MEDIA_PAUSED}]) slot[name=tooltip-pause], 988 :host(:not([${v.MEDIA_PAUSED}])) slot[name=tooltip-play] { 989 display: none; 990 } 991 </style> 992 993 <slot name="icon"> 994 <slot name="play">${ai}</slot> 995 <slot name="pause">${aa}</slot> 996 </slot> 997 `},an.getTooltipContentHTML=function(){return` 998 <slot name="tooltip-play">${U("Play")}</slot> 999 <slot name="tooltip-pause">${U("Pause")}</slot> 1000 `},K.customElements.get("media-play-button")||K.customElements.define("media-play-button",an);let as="placeholdersrc";class ao extends K.HTMLElement{static get observedAttributes(){return[as,"src"]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=J(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,i){if("src"===e&&(null==i?this.image.removeAttribute("src"):this.image.setAttribute("src",i)),e===as)if(null==i)this.image.style.removeProperty("background-image");else{var a;a=this.image,a.style["background-image"]=`url('${i}')`}}get placeholderSrc(){return ev(this,as)}set placeholderSrc(e){eb(this,"src",e)}get src(){return ev(this,"src")}set src(e){eb(this,"src",e)}}ao.shadowRootOptions={mode:"open"},ao.getTemplateHTML=function(e){return` 1001 <style> 1002 :host { 1003 pointer-events: none; 1004 display: var(--media-poster-image-display, inline-block); 1005 box-sizing: border-box; 1006 } 1007 1008 img { 1009 max-width: 100%; 1010 max-height: 100%; 1011 min-width: 100%; 1012 min-height: 100%; 1013 background-repeat: no-repeat; 1014 background-position: var(--media-poster-image-background-position, var(--media-object-position, center)); 1015 background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain)); 1016 object-fit: var(--media-object-fit, contain); 1017 object-position: var(--media-object-position, center); 1018 } 1019 </style> 1020 1021 <img part="poster img" aria-hidden="true" id="image"/> 1022 `},K.customElements.get("media-poster-image")||K.customElements.define("media-poster-image",ao);var al=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};class ad extends iT{constructor(){super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,lJ,void 0),((e,t,i,a)=>(al(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,lJ,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_PREVIEW_CHAPTER]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===v.MEDIA_PREVIEW_CHAPTER&&i!==t&&null!=i){var a,r;(al(this,a=lJ,"read from private field"),r?r.call(this):a.get(this)).textContent=i,""!==i?this.setAttribute("aria-valuetext",`chapter: ${i}`):this.removeAttribute("aria-valuetext")}}get mediaPreviewChapter(){return ev(this,v.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){eb(this,v.MEDIA_PREVIEW_CHAPTER,e)}}lJ=new WeakMap,K.customElements.get("media-preview-chapter-display")||K.customElements.define("media-preview-chapter-display",ad);var au=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ac=(e,t,i)=>(au(e,t,"read from private field"),i?i.call(e):t.get(e)),ah=(e,t,i,a)=>(au(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class am extends K.HTMLElement{constructor(){if(super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,l0,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=J(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[c.MEDIA_CONTROLLER,v.MEDIA_PREVIEW_IMAGE,v.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t,i;let a=this.getAttribute(c.MEDIA_CONTROLLER);a&&(ah(this,l0,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=ac(this,l0))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=ac(this,l0))?void 0:e.unassociateElement)||t.call(e,this),ah(this,l0,null)}attributeChangedCallback(e,t,i){var a,r,n,s,o;[v.MEDIA_PREVIEW_IMAGE,v.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===c.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=ac(this,l0))?void 0:a.unassociateElement)||r.call(a,this),ah(this,l0,null)),i&&this.isConnected&&(ah(this,l0,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=ac(this,l0))?void 0:s.associateElement)||o.call(s,this)))}get mediaPreviewImage(){return ev(this,v.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){eb(this,v.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(v.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(e=>+e)}set mediaPreviewCoords(e){e?this.setAttribute(v.MEDIA_PREVIEW_COORDS,e.join(" ")):this.removeAttribute(v.MEDIA_PREVIEW_COORDS)}update(){let e=this.mediaPreviewCoords,t=this.mediaPreviewImage;if(!(e&&t))return;let[i,a,r,n]=e,s=t.split("#")[0],{maxWidth:o,maxHeight:l,minWidth:d,minHeight:u}=getComputedStyle(this),c=Math.min(parseInt(o)/r,parseInt(l)/n),h=Math.max(parseInt(d)/r,parseInt(u)/n),m=c<1,v=m?c:h>1?h:1,{style:b}=ed(this.shadowRoot,":host"),g=ed(this.shadowRoot,"img").style,E=this.shadowRoot.querySelector("img"),f=m?"min":"max";b.setProperty(`${f}-width`,"initial","important"),b.setProperty(`${f}-height`,"initial","important"),b.width=`${r*v}
1022px`,b.height=`${n*v}px`;let y=()=>{g.width=`${this.imgWidth*v}px`,g.height=`${this.imgHeight*v}px`,g.display="block"};E.src!==s&&(E.onload=()=>{this.imgWidth=E.naturalWidth,this.imgHeight=E.naturalHeight,y()},E.src=s,y()),y(),g.transform=`translate(-${i*v}px, -${a*v}px)`}}l0=new WeakMap,am.shadowRootOptions={mode:"open"},am.getTemplateHTML=function(e){return` 1023 <style> 1024 :host { 1025 box-sizing: border-box; 1026 display: var(--media-control-display, var(--media-preview-thumbnail-display, inline-block)); 1027 overflow: hidden; 1028 } 1029 1030 img { 1031 display: none; 1032 position: relative; 1033 } 1034 </style> 1035 <img crossorigin loading="eager" decoding="async"> 1036 `},K.customElements.get("media-preview-thumbnail")||K.customElements.define("media-preview-thumbnail",am);var ap=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},av=(e,t,i)=>(ap(e,t,"read from private field"),i?i.call(e):t.get(e));class ab extends iT{constructor(){super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,l1,void 0),((e,t,i,a)=>(ap(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,l1,this.shadowRoot.querySelector("slot")),av(this,l1).textContent=P(0)}static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===v.MEDIA_PREVIEW_TIME&&null!=i&&(av(this,l1).textContent=P(parseFloat(i)))}get mediaPreviewTime(){return ec(this,v.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){eh(this,v.MEDIA_PREVIEW_TIME,e)}}l1=new WeakMap,K.customElements.get("media-preview-time-display")||K.customElements.define("media-preview-time-display",ab);let ag="seekoffset";class aE extends t1{static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_CURRENT_TIME,ag]}connectedCallback(){super.connectedCallback(),this.seekOffset=ec(this,ag,30)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===ag&&(this.seekOffset=ec(this,ag,30))}get seekOffset(){return ec(this,ag,30)}set seekOffset(e){eh(this,ag,e),this.setAttribute("aria-label",U("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),ei(ea(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return ec(this,v.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){eh(this,v.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new K.CustomEvent(u.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}aE.getSlotTemplateHTML=function(e,t){let i;return` 1037 <slot name="icon">${i=t.seekOffset,` 1038 <svg aria-hidden="true" viewBox="0 0 20 24"> 1039 <defs> 1040 <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style> 1041 </defs> 1042 <text class="text value" transform="translate(2.18 19.87)">${i}</text> 1043 <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"/> 1044 </svg>`}</slot> 1045 `},aE.getTooltipContentHTML=function(){return U("Seek backward")},K.customElements.get("media-seek-backward-button")||K.customElements.define("media-seek-backward-button",aE);let af="seekoffset";class ay extends t1{static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_CURRENT_TIME,af]}connectedCallback(){super.connectedCallback(),this.seekOffset=ec(this,af,30)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===af&&(this.seekOffset=ec(this,af,30))}get seekOffset(){return ec(this,af,30)}set seekOffset(e){eh(this,af,e),this.setAttribute("aria-label",U("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),ei(ea(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return ec(this,v.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){eh(this,v.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,t=new K.CustomEvent(u.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}ay.getSlotTemplateHTML=function(e,t){let i;return` 1046 <slot name="icon">${i=t.seekOffset,` 1047 <svg aria-hidden="true" viewBox="0 0 20 24"> 1048 <defs> 1049 <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style> 1050 </defs> 1051 <text class="text value" transform="translate(8.9 19.87)">${i}</text> 1052 <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"/> 1053 </svg>`}</slot> 1054 `},ay.getTooltipContentHTML=function(){return U("Seek forward")},K.customElements.get("media-seek-forward-button")||K.customElements.define("media-seek-forward-button",ay);var a_=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ak=(e,t,i)=>(a_(e,t,"read from private field"),i?i.call(e):t.get(e));let aA={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},aw=[...Object.values(aA),v.MEDIA_CURRENT_TIME,v.MEDIA_DURATION,v.MEDIA_SEEKABLE],aT=["Enter"," "],aI=" / ",aS=(e,{timesSep:t=aI}={})=>{var i,a;let r=null!=(i=e.mediaCurrentTime)?i:0,[,n]=null!=(a=e.mediaSeekable)?a:[],s=0;Number.isFinite(e.mediaDuration)?s=e.mediaDuration:Number.isFinite(n)&&(s=n);let o=e.remaining?P(0-(s-r)):P(r);return e.showDuration?`${o}${t}${P(s)}`:o};class aC extends iT{constructor(){super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,l2,void 0),((e,t,i,a)=>(a_(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,l2,this.shadowRoot.querySelector("slot")),ak(this,l2).innerHTML=`${aS(this)}`}static get observedAttributes(){return[...super.observedAttributes,...aw,"disabled"]}connectedCallback(){let{style:e}=ed(this.shadowRoot,":host(:hover:not([notoggle]))");e.setProperty("cursor","var(--media-cursor, pointer)"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))"),this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",U("playback time"));let t=e=>{let{key:i}=e;aT.includes(i)?this.toggleTimeDisplay():this.removeEventListener("keyup",t)};this.addEventListener("keydown",e=>{let{metaKey:i,altKey:a,key:r}=e;i||a||!aT.includes(r)?this.removeEventListener("keyup",t):this.addEventListener("keyup",t)}),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,t,i){aw.includes(e)?this.update():"disabled"===e&&i!==t&&(null==i?this.enable():this.disable()),super.attributeChangedCallback(e,t,i)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return em(this,aA.REMAINING)}set remaining(e){ep(this,aA.REMAINING,e)}get showDuration(){return em(this,aA.SHOW_DURATION)}set showDuration(e){ep(this,aA.SHOW_DURATION,e)}get noToggle(){return em(this,aA.NO_TOGGLE)}set noToggle(e){ep(this,aA.NO_TOGGLE,e)}get mediaDuration(){return ec(this,v.MEDIA_DURATION)}set mediaDuration(e){eh(this,v.MEDIA_DURATION,e)}get mediaCurrentTime(){return ec(this,v.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){eh(this,v.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(v.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){null==e?this.removeAttribute(v.MEDIA_SEEKABLE):this.setAttribute(v.MEDIA_SEEKABLE,e.join(":"))}update(){let e=aS(this);(e=>{var t;
1054let i=e.mediaCurrentTime,[,a]=null!=(t=e.mediaSeekable)?t:[],r=null;if(Number.isFinite(e.mediaDuration)?r=e.mediaDuration:Number.isFinite(a)&&(r=a),null==i||null===r)return e.setAttribute("aria-valuetext","video not loaded, unknown time.");let n=e.remaining?D(0-(r-i)):D(i);if(!e.showDuration)return e.setAttribute("aria-valuetext",n);let s=D(r),o=`${n} of ${s}`;e.setAttribute("aria-valuetext",o)})(this),e!==ak(this,l2).innerHTML&&(ak(this,l2).innerHTML=e)}}l2=new WeakMap,aC.getSlotTemplateHTML=function(e,t){return` 1055 <slot>${aS(t)}</slot> 1056 `},K.customElements.get("media-time-display")||K.customElements.define("media-time-display",aC);var aM=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},aL=(e,t,i)=>(aM(e,t,"read from private field"),i?i.call(e):t.get(e)),aR=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},ax=(e,t,i,a)=>(aM(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class aD{constructor(e,t,i){aR(this,l3,void 0),aR(this,l4,void 0),aR(this,l5,void 0),aR(this,l9,void 0),aR(this,l8,void 0),aR(this,l7,void 0),aR(this,l6,void 0),aR(this,de,void 0),aR(this,dt,0),aR(this,di,(e=performance.now())=>{ax(this,dt,requestAnimationFrame(aL(this,di))),ax(this,l9,performance.now()-aL(this,l5));let t=1e3/this.fps;if(aL(this,l9)>t){let i,a,r,n;ax(this,l5,e-aL(this,l9)%t);let s=1e3/((e-aL(this,l4))/++(i=this,a=l8,{set _(value){ax(i,a,value,r)},get _(){return aL(i,a,n)}})._),o=(e-aL(this,l7))/1e3/this.duration,l=aL(this,l6)+o*this.playbackRate;l-aL(this,l3).valueAsNumber>0?ax(this,de,this.playbackRate/this.duration/s):(ax(this,de,.995*aL(this,de)),l=aL(this,l3).valueAsNumber+aL(this,de)),this.callback(l)}}),ax(this,l3,e),this.callback=t,this.fps=i}start(){0===aL(this,dt)&&(ax(this,l5,performance.now()),ax(this,l4,aL(this,l5)),ax(this,l8,0),aL(this,di).call(this))}stop(){0!==aL(this,dt)&&(cancelAnimationFrame(aL(this,dt)),ax(this,dt,0))}update({start:e,duration:t,playbackRate:i}){let a=e-aL(this,l3).valueAsNumber,r=Math.abs(t-this.duration);(a>0||a<-.03||r>=.5)&&this.callback(e),ax(this,l6,e),ax(this,l7,performance.now()),this.duration=t,this.playbackRate=i}}l3=new WeakMap,l4=new WeakMap,l5=new WeakMap,l9=new WeakMap,l8=new WeakMap,l7=new WeakMap,l6=new WeakMap,de=new WeakMap,dt=new WeakMap,di=new WeakMap;var aP=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},aN=(e,t,i)=>(aP(e,t,"read from private field"),i?i.call(e):t.get(e)),aO=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},aU=(e,t,i,a)=>(aP(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),aH=(e,t,i)=>(aP(e,t,"access private method"),i);let aW=(e,t=e.mediaCurrentTime)=>{let i=Number.isFinite(e.mediaSeekableStart)?e.mediaSeekableStart:0,a=Number.isFinite(e.mediaDuration)?e.mediaDuration:e.mediaSeekableEnd;return Number.isNaN(a)?0:Math.max(0,Math.min((t-i)/(a-i),1))},aB=(e,t=e.range.valueAsNumber)=>{let i=Number.isFinite(e.mediaSeekableStart)?e.mediaSeekableStart:0,a=Number.isFinite(e.mediaDuration)?e.mediaDuration:e.mediaSeekableEnd;return Number.isNaN(a)?0:t*(a-i)+i};class a$ extends ib{constructor(){super(),aO(this,dm),aO(this,dv),aO(this,dE),aO(this,dy),aO(this,dk),aO(this,dw),aO(this,dI),aO(this,dC),aO(this,da,void 0),aO(this,dr,void 0),aO(this,dn,void 0),aO(this,ds,void 0),aO(this,dl,void 0),aO(this,dd,void 0),aO(this,du,void 0),aO(this,dc,void 0),aO(this,dh,void 0),aO(this,dg,e=>{this.dragging||(M(e)&&(this.range.valueAsNumber=e),this.updateBar())}),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),aU(this,dn,this.shadowRoot.querySelectorAll('[part~="box"]')),aU(this,dl,this.shadowRoot.querySelector('[part~="preview-box"]')),aU(this,dd,this.shadowRoot.querySelector('[part~="current-box"]'));const e=getComputedStyle(this);aU(this,du,parseInt(e.getPropertyValue("--media-box-padding-left"))),aU(this,dc,parseInt(e.getPropertyValue("--media-box-padding-right"))),aU(this,dr,new aD(this.range,aN(this,dg),60))}static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_PAUSED,v.MEDIA_DURATION,v.MEDIA_SEEKABLE,v.MEDIA_CURRENT_TIME,v.MEDIA_PREVIEW_IMAGE,v.MEDIA_PREVIEW_TIME,v.MEDIA_PREVIEW_CHAPTER,v.MEDIA_BUFFERED,v.MEDIA_PLAYBACK_RATE,v.MEDIA_LOADING,v.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",U("seek")),aH(this,dm,dp).call(this),aU(this,da,this.getRootNode()),null==(e=aN(this,da))||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),aH(this,dm,dp).call(this),null==(e=aN(this,da))||e.removeEventListener("transitionstart",this),aU(this,da,null)}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),t!=i){if(e===v.MEDIA_CURRENT_TIME||e===v.MEDIA_PAUSED||e===v.MEDIA_ENDED||e===v.MEDIA_LOADING||e===v.MEDIA_DURATION||e===v.MEDIA_SEEKABLE){let e,t,i,a;aN(this,dr).update({start:aW(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),aH(this,dm,dp).call(this),e=this.range,t=D(+aB(this)),i=D(+this.mediaSeekableEnd),a=t&&i?`${t} of ${i}`:"video not loaded, unknown time.",e.setAttribute("aria-valuetext",a)}else e===v.MEDIA_BUFFERED&&this.updateBufferedBar();(e===v.MEDIA_DURATION||e===v.MEDIA_SEEKABLE)&&(this.mediaChapter
1056sCues=aN(this,dh),this.updateBar())}}get mediaChaptersCues(){return aN(this,dh)}set mediaChaptersCues(e){var t;aU(this,dh,e),this.updateSegments(null==(t=aN(this,dh))?void 0:t.map(e=>({start:aW(this,e.startTime),end:aW(this,e.endTime)})))}get mediaPaused(){return em(this,v.MEDIA_PAUSED)}set mediaPaused(e){ep(this,v.MEDIA_PAUSED,e)}get mediaLoading(){return em(this,v.MEDIA_LOADING)}set mediaLoading(e){ep(this,v.MEDIA_LOADING,e)}get mediaDuration(){return ec(this,v.MEDIA_DURATION)}set mediaDuration(e){eh(this,v.MEDIA_DURATION,e)}get mediaCurrentTime(){return ec(this,v.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){eh(this,v.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return ec(this,v.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){eh(this,v.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(v.MEDIA_BUFFERED);return e?e.split(" ").map(e=>e.split(":").map(e=>+e)):[]}set mediaBuffered(e){if(!e)return void this.removeAttribute(v.MEDIA_BUFFERED);let t=e.map(e=>e.join(":")).join(" ");this.setAttribute(v.MEDIA_BUFFERED,t)}get mediaSeekable(){let e=this.getAttribute(v.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){null==e?this.removeAttribute(v.MEDIA_SEEKABLE):this.setAttribute(v.MEDIA_SEEKABLE,e.join(":"))}get mediaSeekableEnd(){var e;let[,t=this.mediaDuration]=null!=(e=this.mediaSeekable)?e:[];return t}get mediaSeekableStart(){var e;let[t=0]=null!=(e=this.mediaSeekable)?e:[];return t}get mediaPreviewImage(){return ev(this,v.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){eb(this,v.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return ec(this,v.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){eh(this,v.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return em(this,v.MEDIA_ENDED)}set mediaEnded(e){ep(this,v.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;let t,i=this.mediaBuffered;if(!i.length)return;if(this.mediaEnded)t=1;else{let a=this.mediaCurrentTime,[,r=this.mediaSeekableStart]=null!=(e=i.find(([e,t])=>e<=a&&a<=t))?e:[];t=aW(this,r)}let{style:a}=ed(this.shadowRoot,"#buffered");a.setProperty("width",`${100*t}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;let e=ed(this.shadowRoot,"#current-rail"),t=ed(this.shadowRoot,'[part~="current-box"]'),i=aH(this,dE,df).call(this,aN(this,dd)),a=aH(this,dy,d_).call(this,i,this.range.valueAsNumber),r=aH(this,dk,dA).call(this,i,this.range.valueAsNumber);e.style.transform=`translateX(${a})`,e.style.setProperty("--_range-width",`${i.range.width}`),t.style.setProperty("--_box-shift",`${r}`),t.style.setProperty("--_box-width",`${i.box.width}px`),t.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":aH(this,dC,dM).call(this);break;case"pointermove":aH(this,dw,dT).call(this,e);break;case"pointerup":case"pointerleave":aH(this,dI,dS).call(this,null);break;case"transitionstart":er(e.target,this)&&setTimeout(()=>aH(this,dm,dp).call(this),0)}}}da=new WeakMap,dr=new WeakMap,dn=new WeakMap,ds=new WeakMap,dl=new WeakMap,dd=new WeakMap,du=new WeakMap,dc=new WeakMap,dh=new WeakMap,dm=new WeakSet,dp=function(){aH(this,dv,db).call(this)?aN(this,dr).start():aN(this,dr).stop()},dv=new WeakSet,db=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&el(this)},dg=new WeakMap,dE=new WeakSet,df=function(e){var t;let i=(null!=(t=this.getAttribute("bounds")?en(this,`#${this.getAttribute("bounds")}`):this.parentElement)?t:this).getBoundingClientRect(),a=this.range.getBoundingClientRect(),r=e.offsetWidth,n=-(a.left-i.left-r/2),s=i.right-a.left-r/2;return{box:{width:r,min:n,max:s},bounds:i,range:a}},dy=new WeakSet,d_=function(e,t){let i=`${100*t}%`,{width:a,min:r,max:n}=e.box;if(!a)return i;if(!Number.isNaN(r)){let e=`calc(1 / var(--_range-width) * 100 * ${r}% + var(--media-box-padding-left))`;i=`max(${e}, ${i})`}if(!Number.isNaN(n)){let e=`calc(1 / var(--_range-width) * 100 * ${n}% - var(--media-box-padding-right))`;i=`min(${i}, ${e})`}return i},dk=new WeakSet,dA=function(e,t){let{width:i,min:a,max:r}
1056=e.box,n=t*e.range.width;if(n<a+aN(this,du)){let t=e.range.left-e.bounds.left-aN(this,du);return`${n-i/2+t}px`}if(n>r-aN(this,dc)){let t=e.bounds.right-e.range.right-aN(this,dc);return`${n+i/2-t-e.range.width}px`}return 0},dw=new WeakSet,dT=function(e){let t=[...aN(this,dn)].some(t=>e.composedPath().includes(t));if(!this.dragging&&(t||!e.composedPath().includes(this)))return void aH(this,dI,dS).call(this,null);let i=this.mediaSeekableEnd;if(!i)return;let a=ed(this.shadowRoot,"#preview-rail"),r=ed(this.shadowRoot,'[part~="preview-box"]'),n=aH(this,dE,df).call(this,aN(this,dl)),s=(e.clientX-n.range.left)/n.range.width;s=Math.max(0,Math.min(1,s));let o=aH(this,dy,d_).call(this,n,s),l=aH(this,dk,dA).call(this,n,s);a.style.transform=`translateX(${o})`,a.style.setProperty("--_range-width",`${n.range.width}`),r.style.setProperty("--_box-shift",`${l}`),r.style.setProperty("--_box-width",`${n.box.width}px`),1>Math.abs(Math.round(aN(this,ds))-Math.round(s*i))&&s>.01&&s<.99||(aU(this,ds,s*i),aH(this,dI,dS).call(this,aN(this,ds)))},dI=new WeakSet,dS=function(e){this.dispatchEvent(new K.CustomEvent(u.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:e}))},dC=new WeakSet,dM=function(){aN(this,dr).stop();let e=aB(this);this.dispatchEvent(new K.CustomEvent(u.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e}))},a$.shadowRootOptions={mode:"open"},a$.getTemplateHTML=function(e){return` 1057 ${ib.getTemplateHTML(e)} 1058 <style> 1059 :host { 1060 --media-box-border-radius: 4px; 1061 --media-box-padding-left: 10px; 1062 --media-box-padding-right: 10px; 1063 --media-preview-border-radius: var(--media-box-border-radius); 1064 --media-box-arrow-offset: var(--media-box-border-radius); 1065 --_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 1066 --_preview-background: var(--media-preview-background, var(--_control-background)); 1067 1068 1069 contain: layout; 1070 } 1071 1072 #buffered { 1073 background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4)); 1074 position: absolute; 1075 height: 100%; 1076 will-change: width; 1077 } 1078 1079 #preview-rail, 1080 #current-rail { 1081 width: 100%; 1082 position: absolute; 1083 left: 0; 1084 bottom: 100%; 1085 pointer-events: none; 1086 will-change: transform; 1087 } 1088 1089 [part~="box"] { 1090 width: min-content; 1091 1092 position: absolute; 1093 bottom: 100%; 1094 flex-direction: column; 1095 align-items: center; 1096 transform: translateX(-50%); 1097 } 1098 1099 [part~="current-box"] { 1100 display: var(--media-current-box-display, var(--media-box-display, flex)); 1101 margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px)); 1102 visibility: hidden; 1103 } 1104 1105 [part~="preview-box"] { 1106 display: var(--media-preview-box-display, var(--media-box-display, flex)); 1107 margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px)); 1108 transition-property: var(--media-preview-transition-property, visibility, opacity); 1109 transition-duration: var(--media-preview-transition-duration-out, .25s); 1110 transition-delay: var(--media-preview-transition-delay-out, 0s); 1111 visibility: hidden; 1112 opacity: 0; 1113 } 1114 1115 :host(:is([${v.MEDIA_PREVIEW_IMAGE}], [${v.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] { 1116 transition-duration: var(--media-preview-transition-duration-in, .5s); 1117 transition-delay: var(--media-preview-transition-delay-in, .25s); 1118 visibility: visible; 1119 opacity: 1; 1120 } 1121 1122 @media (hover: hover) { 1123 :host(:is([${v.MEDIA_PREVIEW_IMAGE}], [${v.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] { 1124 transition-duration: var(--media-preview-transition-duration-in, .5s); 1125 transition-delay: var(--media-preview-transition-delay-in, .25s); 1126 visibility: visible; 1127 opacity: 1; 1128 } 1129 } 1130 1131 media-preview-thumbnail, 1132 ::slotted(media-preview-thumbnail) { 1133 visibility: hidden; 1134 1135 transition: visibility 0s .25s; 1136 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
1137 background: var(--media-preview-thumbnail-background, var(--_preview-background)); 1138 box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2)); 1139 max-width: var(--media-preview-thumbnail-max-width, 180px); 1140 max-height: var(--media-preview-thumbnail-max-height, 160px); 1141 min-width: var(--media-preview-thumbnail-min-width, 120px); 1142 min-height: var(--media-preview-thumbnail-min-height, 80px); 1143 border: var(--media-preview-thumbnail-border); 1144 border-radius: var(--media-preview-thumbnail-border-radius, 1145 var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0); 1146 } 1147 1148 :host([${v.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail, 1149 :host([${v.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) { 1150 transition-delay: var(--media-preview-transition-delay-in, .25s); 1151 visibility: visible; 1152 } 1153 1154 @media (hover: hover) { 1155 :host([${v.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail, 1156 :host([${v.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) { 1157 transition-delay: var(--media-preview-transition-delay-in, .25s); 1158 visibility: visible; 1159 } 1160 1161 :host([${v.MEDIA_PREVIEW_TIME}]:hover) { 1162 --media-time-range-hover-display: block; 1163 } 1164 } 1165 1166 media-preview-chapter-display, 1167 ::slotted(media-preview-chapter-display) { 1168 font-size: var(--media-font-size, 13px); 1169 line-height: 17px; 1170 min-width: 0; 1171 visibility: hidden; 1172 1173 transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s; 1174 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 1175 background: var(--media-preview-chapter-background, var(--_preview-background)); 1176 border-radius: var(--media-preview-chapter-border-radius, 1177 var(--media-preview-border-radius) var(--media-preview-border-radius) 1178 var(--media-preview-border-radius) var(--media-preview-border-radius)); 1179 padding: var(--media-preview-chapter-padding, 3.5px 9px); 1180 margin: var(--media-preview-chapter-margin, 0 0 5px); 1181 text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75)); 1182 } 1183 1184 :host([${v.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display, 1185 :host([${v.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) { 1186 transition-delay: var(--media-preview-transition-delay-in, .25s); 1187 border-radius: var(--media-preview-chapter-border-radius, 0); 1188 padding: var(--media-preview-chapter-padding, 3.5px 9px 0); 1189 margin: var(--media-preview-chapter-margin, 0); 1190 min-width: 100%; 1191 } 1192 1193 media-preview-chapter-display[${v.MEDIA_PREVIEW_CHAPTER}], 1194 ::slotted(media-preview-chapter-display[${v.MEDIA_PREVIEW_CHAPTER}]) { 1195 visibility: visible; 1196 } 1197 1198 media-preview-chapter-display:not([aria-valuetext]), 1199 ::slotted(media-preview-chapter-display:not([aria-valuetext])) { 1200 display: none; 1201 } 1202 1203 media-preview-time-display, 1204 ::slotted(media-preview-time-display), 1205 media-time-display, 1206 ::slotted(media-time-display) { 1207 font-size: var(--media-font-size, 13px); 1208 line-height: 17px; 1209 min-width: 0; 1210 1211 transition: min-width 0s, border-radius 0s; 1212 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 1213 background: var(--media-preview-time-background, var(--_preview-background)); 1214 border-radius: var(--media-preview-time-border-radius, 1215 var(--media-preview-border-radius) var(--media-preview-border-radius) 1216 var(--media-preview-border-radius) var(--media-preview-border-radius)); 1217 padding: var(--media-preview-time-padding, 3.5px 9px); 1218 margin: var(--media-preview-time-margin, 0); 1219 text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75)); 1220 transform: translateX(min( 1221 max(calc(50% - var(--_box-width) / 2), 1222 calc(var(--_box-shift, 0))), 1223 calc(var(--_box-width) / 2 - 50%) 1224 )); 1225 } 1226 1227 :host([${v.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display, 1228 :host([${v.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) { 1229 transition-delay: var(--media-preview-transition-delay-in, .25s); 1230 border-radius: var(--media-preview-time-border-radius, 1231 0 0 var(--media-preview-border-radius) var(--media-preview-border-radius)); 1232 min-width: 100%; 1233 } 1234 1235 :host([${v.MEDIA_PREVIEW_TIME}]:hover) { 1236 --media-time-range-hover-display: block; 1237 } 1238 1239 [part~="arrow"], 1240 ::slotted([part~="arrow"]) { 1241 display: var(--media-box-arrow-display, inline-block); 1242 transform: translateX(min( 1243 max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)), 1244 calc(var(--_box-shift, 0))), 1245 calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset)) 1246 )); 1247 1248 border-color: transparent; 1249 border-top-color: var(--media-box-arrow-background, var(--_control-background)); 1250 border-width: var(--media-box-arrow-border-width, 1251 var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0); 1252 border-style: solid; 1253 justify-content: center; 1254 height: 0; 1255 } 1256 </style> 1257 <div id="preview-rail"> 1258 <slot name="preview" part="box preview-box">
1259 <media-preview-thumbnail> 1260 <template shadowrootmode="${am.shadowRootOptions.mode}"> 1261 ${am.getTemplateHTML({})} 1262 </template> 1263 </media-preview-thumbnail> 1264 <media-preview-chapter-display></media-preview-chapter-display> 1265 <media-preview-time-display></media-preview-time-display> 1266 <slot name="preview-arrow"><div part="arrow"></div></slot> 1267 </slot> 1268 </div> 1269 <div id="current-rail"> 1270 <slot name="current" part="box current-box"> 1271 1272 </slot> 1273 </div> 1274 `},K.customElements.get("media-time-range")||K.customElements.define("media-time-range",a$);class aV extends ib{static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_VOLUME,v.MEDIA_MUTED,v.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",()=>{let e=this.range.value,t=new K.CustomEvent(u.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",U("volume"))}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===v.MEDIA_VOLUME||e===v.MEDIA_MUTED){let e;this.range.valueAsNumber=this.mediaMuted?0:this.mediaVolume,this.range.setAttribute("aria-valuetext",(e=this.range.valueAsNumber,`${Math.round(100*e)}%`)),this.updateBar()}}
1274get mediaVolume(){return ec(this,v.MEDIA_VOLUME,1)}set mediaVolume(e){eh(this,v.MEDIA_VOLUME,e)}get mediaMuted(){return em(this,v.MEDIA_MUTED)}set mediaMuted(e){ep(this,v.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return ev(this,v.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){eb(this,v.MEDIA_VOLUME_UNAVAILABLE,e)}}K.customElements.get("media-volume-range")||K.customElements.define("media-volume-range",aV);var aq=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},aF=(e,t,i)=>(aq(e,t,"read from private field"),i?i.call(e):t.get(e)),aG=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},aK=(e,t,i,a)=>(aq(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let aj={processCallback(e,t,i){if(i){for(let[e,a]of t)if(e in i){let t=i[e];"boolean"==typeof t&&a instanceof a1&&"boolean"==typeof a.element[a.attributeName]?a.booleanValue=t:"function"==typeof t&&a instanceof a1?a.element[a.attributeName]=t:a.value=t}}}};class aY extends K.DocumentFragment{constructor(e,t,i=aj){var a;super(),aG(this,dL,void 0),aG(this,dR,void 0),this.append(e.content.cloneNode(!0)),aK(this,dL,aQ(this)),aK(this,dR,i),null==(a=i.createCallback)||a.call(i,this,aF(this,dL),t),i.processCallback(this,aF(this,dL),t)}update(e){aF(this,dR).processCallback(this,aF(this,dL),e)}}dL=new WeakMap,dR=new WeakMap;let aQ=(e,t=[])=>{let i,a;for(let r of e.attributes||[])if(r.value.includes("{{")){let n=new a0;for([i,a]of aZ(r.value))if(i){let i=new a1(e,r.name,r.namespaceURI);n.append(i),t.push([a,i])}else n.append(a);r.value=n.toString()}for(let r of e.childNodes)if(1!==r.nodeType||r instanceof HTMLTemplateElement){let n=r.data;if(1===r.nodeType||n.includes("{{")){let s=[];if(n)for([i,a]of aZ(n))if(i){let i=new a2(e);s.push(i),t.push([a,i])}else s.push(new Text(a));else if(r instanceof HTMLTemplateElement){let i=new a3(e,r);s.push(i),t.push([i.expression,i])}r.replaceWith(...s.flatMap(e=>e.replacementNodes||[e]))}}else aQ(r,t);return t},az={},aZ=e=>{let t="",i=0,a=az[e],r=0,n;if(a)return a;for(a=[];n=e[r];r++)"{"===n&&"{"===e[r+1]&&"\\"!==e[r-1]&&e[r+2]&&1==++i?(t&&a.push([0,t]),t="",r++):"}"!==n||"}"!==e[r+1]||"\\"===e[r-1]||--i?t+=n||"":(a.push([1,t.trim()]),t="",r++);return t&&a.push([0,(i>0?"{{":"")+t]),az[e]=a};class aX{get value(){return""}set value(e){}toString(){return this.value}}let aJ=new WeakMap;class a0{constructor(){aG(this,dx,[])}[Symbol.iterator](){return aF(this,dx).values()}get length(){return aF(this,dx).length}item(e){return aF(this,dx)[e]}append(...e){for(let t of e)t instanceof a1&&aJ.set(t,this),aF(this,dx).push(t)}toString(){return aF(this,dx).join("")}}dx=new WeakMap;class a1 extends aX{constructor(e,t,i){super(),aG(this,dU),aG(this,dD,""),aG(this,dP,void 0),aG(this,dN,void 0),aG(this,dO,void 0),aK(this,dP,e),aK(this,dN,t),aK(this,dO,i)}get attributeName(){return aF(this,dN)}get attributeNamespace(){return aF(this,dO)}get element(){return aF(this,dP)}get value(){return aF(this,dD)}set value(e){aF(this,dD)!==e&&(aK(this,dD,e),aF(this,dU,dH)&&1!==aF(this,dU,dH).length?aF(this,dP).setAttributeNS(aF(this,dO),aF(this,dN),aF(this,dU,dH).toString()):null==e?aF(this,dP).removeAttributeNS(aF(this,dO),aF(this,dN)):aF(this,dP).setAttributeNS(aF(this,dO),aF(this,dN),e))}get booleanValue(){return aF(this,dP).hasAttributeNS(aF(this,dO),aF(this,dN))}set booleanValue(e){if(aF(this,dU,dH)&&1!==aF(this,dU,dH).length)throw new DOMException("Value is not fully templatized");this.value=e?"":null}}dD=new WeakMap,dP=new WeakMap,dN=new WeakMap,dO=new WeakMap,dU=new WeakSet,dH=function(){return aJ.get(this)};class a2 extends aX{constructor(e,t){super(),aG(this,dW,void 0),aG(this,dB,void 0),aK(this,dW,e),aK(this,dB,t?[...t]:[new Text])}get replacementNodes(){return aF(this,dB)}get parentNode(){return aF(this,dW)}get nextSibling(){return aF(this,dB)[aF(this,dB).length-1].nextSibling}get previousSibling(){return aF(this,dB)[0].previousSibling}get value(){return aF(this,dB).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){let t=e.flat().flatMap(e=>null==e?[new Text]:e.forEach?[...e]:11===e.nodeType?[...e.childNodes]:e.nodeType?[e]:[new Text(e)]);t.length||t.push(new Text),aK(this,dB,function(e,t,i,a=null){let r=0,n,s,o,l=i.length,d=t.length;for(;r<l&&r<d&&t[r]==i[r];)r++;for(;r<l&&r<d&&i[l-1]==t[d-1];)a=i[--d,--l];if(r==d)for(;r<l;)e.insertBefore(i[r++],a);if(r==l)for(;r<d;)e.removeChild(t[r++]);else{for(n=t[r];r<l;)o=i[r++],s=n?n.nextSibling:a,n==o?n=s:r<l&&i[r]==s?(e.replaceChild(o,n),n=s):e.insertBefore(o,n);for(;n!=a;)s=n.nextSibling,e.removeChild(n),n=s}return i}(aF(this,dB)[0].parentNode,aF(this,dB),t,this.nextSibling))}}
1274dW=new WeakMap,dB=new WeakMap;class a3 extends a2{constructor(e,t){const i=t.getAttribute("directive")||t.getAttribute("type");let a=t.getAttribute("expression")||t.getAttribute(i)||"";a.startsWith("{{")&&(a=a.trim().slice(2,-2).trim()),super(e),this.expression=a,this.template=t,this.directive=i}}let a4={string:e=>String(e)};class a5{constructor(e){this.template=e,this.state=void 0}}let a9=new WeakMap,a8=new WeakMap,a7={partial:(e,t)=>{t[e.expression]=new a5(e.template)},if:(e,t)=>{var i;if(ri(e.expression,t))if(a9.get(e)!==e.template){a9.set(e,e.template);let i=new aY(e.template,t,re);e.replace(i),a8.set(e,i)}else null==(i=a8.get(e))||i.update(t);else e.replace(""),a9.delete(e),a8.delete(e)}},a6=Object.keys(a7),re={processCallback(e,t,i){var a,r;if(i)for(let[e,n]of t){if(n instanceof a3){if(!n.directive){let e=a6.find(e=>n.template.hasAttribute(e));e&&(n.directive=e,n.expression=n.template.getAttribute(e))}null==(a=a7[n.directive])||a.call(a7,n,i);continue}let t=ri(e,i);if(t instanceof a5){a9.get(n)!==t.template?(a9.set(n,t.template),n.value=t=new aY(t.template,t.state,re),a8.set(n,t)):null==(r=a8.get(n))||r.update(t.state);continue}t?(n instanceof a1&&n.attributeName.startsWith("aria-")&&(t=String(t)),n instanceof a1?"boolean"==typeof t?n.booleanValue=t:"function"==typeof t?n.element[n.attributeName]=t:n.value=t:(n.value=t,a9.delete(n),a8.delete(n))):n instanceof a1?n.value=void 0:(n.value=void 0,a9.delete(n),a8.delete(n))}}},rt={"!":e=>!e,"!!":e=>!!e,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,">":(e,t)=>e>t,">=":(e,t)=>
1274e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"??":(e,t)=>null!=e?e:t,"|":(e,t)=>{var i;return null==(i=a4[t])?void 0:i.call(a4,e)}};function ri(e,t={}){var i,a,r,n,s,o,l;let d=(function(e,t){let i,a,r,n=[];for(;e;){for(let n in r=null,i=e.length,t)(a=t[n].exec(e))&&a.index<i&&(r={token:a[0],type:n,matches:a.slice(1)},i=a.index);i&&n.push({token:e.substr(0,i),type:void 0}),r&&n.push(r),e=e.substr(i+(r?r.token.length:0))}return n})(e,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>"ws"!==e);if(0===d.length||d.some(({type:e})=>!e))return ra(e);if((null==(i=d[0])?void 0:i.token)===">"){let i=t[null==(a=d[1])?void 0:a.token];if(!i)return ra(e);let o={...t};i.state=o;let l=d.slice(2);for(let e=0;e<l.length;e+=3){let i=null==(r=l[e])?void 0:r.token,a=null==(n=l[e+1])?void 0:n.token,d=null==(s=l[e+2])?void 0:s.token;i&&"="===a&&(o[i]=rn(d,t))}return i}if(1===d.length)return rr(d[0])?rn(d[0].token,t):ra(e);if(2===d.length){let i=rt[null==(o=d[0])?void 0:o.token];return i&&rr(d[1])?i(rn(d[1].token,t)):ra(e)}if(3===d.length){let i=null==(l=d[1])?void 0:l.token,a=rt[i];if(!a||!rr(d[0])||!rr(d[2]))return ra(e);let r=rn(d[0].token,t);return a(r,"|"===i?d[2].token:rn(d[2].token,t))}}function ra(e){return console.warn(`Warning: invalid expression \`${e}\``),!1}function rr({type:e}){return["number","boolean","string","param"].includes(e)}function rn(e,t){let i=e[0],a=e.slice(-1);return"true"===e||"false"===e?"true"===e:i===a&&["'",'"'].includes(i)?e.slice(1,-1):L(e)?parseFloat(e):t[e]}var rs=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ro=(e,t,i)=>(rs(e,t,"read from private field"),i?i.call(e):t.get(e)),rl=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},rd=(e,t,i,a)=>(rs(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),ru=(e,t,i)=>(rs(e,t,"access private method"),i);let rc={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},rh=j.createElement("template");rh.innerHTML=` 1275 <style> 1276 :host { 1277 display: inline-block; 1278 line-height: 0; 1279 } 1280 1281 media-controller { 1282 width: 100%; 1283 height: 100%; 1284 } 1285 1286 media-captions-button:not([mediasubtitleslist]), 1287 media-captions-menu:not([mediasubtitleslist]), 1288 media-captions-menu-button:not([mediasubtitleslist]), 1289 media-audio-track-menu[mediaaudiotrackunavailable], 1290 media-audio-track-menu-button[mediaaudiotrackunavailable], 1291 media-rendition-menu[mediarenditionunavailable], 1292 media-rendition-menu-button[mediarenditionunavailable], 1293 media-volume-range[mediavolumeunavailable], 1294 media-airplay-button[mediaairplayunavailable], 1295 media-fullscreen-button[mediafullscreenunavailable], 1296 media-cast-button[mediacastunavailable], 1297 media-pip-button[mediapipunavailable] { 1298 display: none; 1299 } 1300 </style> 1301`;class rm extends K.HTMLElement{constructor(){super(),rl(this,dF),rl(this,dK),rl(this,d$,void 0),rl(this,dV,void 0),rl(this,dq,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());const e=new MutationObserver(e=>{var t;(!this.mediaController||(null==(t=this.mediaController)?void 0:t.breakpointsComputed))&&e.some(e=>{let t=e.target;return t===this||"media-controller"===t.localName&&!!(rc[e.attributeName]||e.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(b.BREAKPOINTS_COMPUTED,this.render),ru(this,dF,dG).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return null!=(e=ro(this,d$))?e:this.constructor.template}set template(e){rd(this,dq,null),rd(this,d$,e),this.createRenderer()}get props(){var e,t,i;let a=[...Array.from(null!=(t=null==(e=this.mediaController)?void 0:e.attributes)?t:[]).filter(({name:e})=>rc[e]||e.startsWith("breakpoint")),...Array.from(this.attributes)],r={};for(let e of a){let t=null!=(i=rc[e.name])?i:e.name.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase()),{value:a}=e;null!=a?(L(a)&&(a=parseFloat(a)),r[t]=""===a||a):r[t]=!1}return r}attributeChangedCallback(e,t,i){"template"===e&&t!=i&&ru(this,dK,dj).call(this)}connectedCallback(){ru(this,dK,dj).call(this)}createRenderer(){this.template&&this.template!==ro(this,dV)&&(rd(this,dV,this.template),this.renderer=new aY(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(rh.content.cloneNode(!0),this.renderer))}render(){var e;null==(e=this.renderer)||e.update(this.props)}}async function rp(e){let t=await fetch(e);if(200!==t.status)throw Error(`Failed to load resource: the server responded with a status of ${t.status}`);return t.text()}function rv(e){return e.split("-")[0]}d$=new WeakMap,dV=new WeakMap,dq=new WeakMap,dF=new WeakSet,dG=function(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}},dK=new WeakSet,dj=function(){var e;let t=this.getAttribute("template");if(!t||t===ro(this,dq))return;let i=this.getRootNode(),a=null==(e=null==i?void 0:i.getElementById)?void 0:e.call(i,t);if(a){rd(this,dq,t),rd(this,d$,a),this.createRenderer();return}(function(e){if(!/^(\/|\.\/|https?:\/\/)/.test(e))return!1;let t=/^https?:\/\//.test(e)?void 0:location.origin;try{new URL(e,t)}catch(e){return!1}return!0})(t)&&(rd(this,dq,t),rp(t).then(e=>{let t=j.createElement("template");t.innerHTML=e,rd(this,d$,t),this.createRenderer()}).catch(console.error))},rm.observedAttributes=["template"],rm.processor=re,K.customElements.get("media-theme")||K.customElements.define("media-theme",rm);
1301class rb extends Event{constructor({action:e="auto",relatedTarget:t,...i}){super("invoke",i),this.action=e,this.relatedTarget=t}}class rg extends Event{constructor({newState:e,oldState:t,...i}){super("toggle",i),this.newState=e,this.oldState=t}}var rE=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},rf=(e,t,i)=>(rE(e,t,"read from private field"),i?i.call(e):t.get(e)),ry=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},r_=(e,t,i,a)=>(rE(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),rk=(e,t,i)=>(rE(e,t,"access private method"),i);function rA({type:e,text:t,value:i,checked:a}){let r=j.createElement("media-chrome-menu-item");r.type=null!=e?e:"",r.part.add("menu-item"),e&&r.part.add(e),r.value=i,r.checked=a;let n=j.createElement("span");return n.textContent=t,r.append(n),r}function rw(e,t){let i=e.querySelector(`:scope > [slot="${t}"]`);if((null==i?void 0:i.nodeName)=="SLOT"&&(i=i.assignedElements({flatten:!0})[0]),i)return i.cloneNode(!0);let a=e.shadowRoot.querySelector(`[name="${t}"] > svg`);return a?a.cloneNode(!0):""}let rT="style",rI="hidden",rS="disabled";class rC extends K.HTMLElement{constructor(){if(super(),ry(this,d1),ry(this,d4),ry(this,d9),ry(this,d7),ry(this,ue),ry(this,ur),ry(this,us),ry(this,ul),ry(this,uu),ry(this,uh),ry(this,up),ry(this,ub),ry(this,uE),ry(this,uy),ry(this,uk),ry(this,uw),ry(this,uI),ry(this,dY,null),ry(this,dQ,null),ry(this,dz,null),ry(this,dZ,new Set),ry(this,dX,void 0),ry(this,dJ,!1),ry(this,d0,null),ry(this,d3,()=>{let e=rf(this,dZ),t=new Set(this.items);for(let i of e)t.has(i)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:i}));for(let i of t)e.has(i)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:i}));r_(this,dZ,t)}),ry(this,ui,()=>{rk(this,ur,un).call(this),rk(this,us,uo).call(this,!1)}),ry(this,ua,()=>{rk(this,ur,un).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=J(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.shadowRoot.addEventListener("slotchange",this),r_(this,dX,new MutationObserver(rf(this,d3))),rf(this,dX).observe(this.defaultSlot,{childList:!0})}static get observedAttributes(){return[rS,rI,rT,"anchor",c.MEDIA_CONTROLLER]}static formatMenuItemText(e,t){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this)}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this)}handleEvent(e){switch(e.type){case"slotchange":rk(this,d1,d2).call(this,e);break;case"invoke":rk(this,d9,d8).call(this,e);break;case"click":rk(this,ul,ud).call(this,e);break;case"toggle":rk(this,uh,um).call(this,e);break;case"focusout":rk(this,ub,ug).call(this,e);break;case"keydown":rk(this,uE,uf).call(this,e)}}connectedCallback(){var e,t;r_(this,d0,eu(this.shadowRoot,":host")),rk(this,d4,d5).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),r_(this,dY,et(this)),null==(t=null==(e=rf(this,dY))?void 0:e.associateElement)||t.call(e,this),this.hidden||(Z(rL(this),rf(this,ui)),Z(this,rf(this,ua)))}disconnectedCallback(){var e,t;X(rL(this),rf(this,ui)),X(this,rf(this,ua)),this.disable(),null==(t=null==(e=rf(this,dY))?void 0:e.unassociateElement)||t.call(e,this),r_(this,dY,null)}attributeChangedCallback(e,t,i){var a,r,n,s;e===rI&&i!==t?(rf(this,dJ)||r_(this,dJ,!0),this.hidden?rk(this,ue,ut).call(this):rk(this,d7,d6).call(this),this.dispatchEvent(new rg({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===c.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=rf(this,dY))?void 0:a.unassociateElement)||r.call(a,this),r_(this,dY,null)),i&&this.isConnected&&(r_(this,dY,et(this)),null==(s=null==(n=rf(this,dY))?void 0:n.associateElement)||s.call(n,this))):e===rS&&i!==t?null==i?this.enable():this.disable():e===rT&&i!==t&&rk(this,d4,d5).call(this)}formatMenuItemText(e,t){return this.constructor.formatMenuItemText(e,t)}get anchor(){return this.getAttribute("anchor")}
1301set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?null==(e=eo(this))?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(rM)}get radioGroupItems(){return this.items.filter(e=>"menuitemradio"===e.role)}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,t;return null!=(t=null==(e=this.checkedItems[0])?void 0:e.value)?t:""}set value(e){let t=this.items.find(t=>t.value===e);t&&rk(this,uI,uS).call(this,t)}focus(){if(r_(this,dQ,es()),this.items.length){rk(this,uw,uT).call(this,this.items[0]),this.items[0].focus();return}let e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==e||e.focus()}handleSelect(e){var t;let i=rk(this,uy,u_).call(this,e);i&&(rk(this,uI,uS).call(this,i,"checkbox"===i.type),rf(this,dz)&&!this.hidden&&(null==(t=rf(this,dQ))||t.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var t,i;let{key:a}=e,r=this.items,n=null!=(i=null!=(t=rk(this,uy,u_).call(this,e))?t:rk(this,uk,uA).call(this))?i:r[0],s=Math.max(0,r.indexOf(n));"ArrowDown"===a?s++:"ArrowUp"===a?s--:"Home"===e.key?s=0:"End"===e.key&&(s=r.length-1),s<0&&(s=r.length-1),s>r.length-1&&(s=0),rk(this,uw,uT).call(this,r[s]),r[s].focus()}}function rM(e){return["menuitem","menuitemradio","menuitemcheckbox"].includes(null==e?void 0:e.role)}function rL(e){var t;return null!=(t=e.getAttribute("bounds")?en(e,`#${e.getAttribute("bounds")}`):ee(e)||e.parentElement)?t:e}dY=new WeakMap,dQ=new WeakMap,dz=new WeakMap,dZ=new WeakMap,dX=new WeakMap,dJ=new WeakMap,d0=new WeakMap,d1=new WeakSet,d2=function(e){let t=e.target;for(let e of t.assignedNodes({flatten:!0}))3===e.nodeType&&""===e.textContent.trim()&&e.remove();["header","title"].includes(t.name)&&(this.shadowRoot.querySelector('slot[name="header"]').hidden=0===t.assignedNodes().length),t.name||rf(this,d3).call(this)},d3=new WeakMap,d4=new WeakSet,d5=function(){var e;let t=this.shadowRoot.querySelector("#layout-row"),i=null==(e=getComputedStyle(this).getPropertyValue("--media-menu-layout"))?void 0:e.trim();t.setAttribute("media","row"===i?"":"width:0")},d9=new WeakSet,d8=function(e){r_(this,dz,e.relatedTarget),er(this,e.relatedTarget)||(this.hidden=!this.hidden)},d7=new WeakSet,d6=function(){var e;null==(e=rf(this,dz))||e.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),Z(rL(this),rf(this,ui)),Z(this,rf(this,ua))},ue=new WeakSet,ut=function(){var e;null==(e=rf(this,dz))||e.setAttribute("aria-expanded","false"),X(rL(this),rf(this,ui)),X(this,rf(this,ua))},ui=new WeakMap,ua=new WeakMap,ur=new WeakSet,un=function(e){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;let{x:t,y:i}=function({anchor:e,floating:t,placement:i}){let{x:a,y:r}=function({anchor:e,floating:t},i){let a,r="x"==(["top","bottom"].includes(rv(i))?"y":"x")?"y":"x",n="y"===r?"height":"width",s=rv(i),o=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,d=e[n]/2-t[n]/2;switch(s){case"top":a={x:o,y:e.y-t.height};break;case"bottom":a={x:o,y:e.y+e.height};break;case"right":a={x:e.x+e.width,y:l};break;case"left":a={x:e.x-t.width,y:l};break;default:a={x:e.x,y:e.y}}switch(i.split("-")[1]){case"start":a[r]-=d;break;case"end":a[r]+=d}return a}(function({anchor:e,floating:t}){var i,a,r;let n,s;return{anchor:(i=e,a=t.offsetParent,n=i.getBoundingClientRect(),s=null!=(r=null==a?void 0:a.getBoundingClientRect())?r:{x:0,y:0},{x:n.x-s.x,y:n.y-s.y,width:n.width,height:n.height}),floating:{x:0,y:0,width:t.offsetWidth,height:t.offsetHeight}}}({anchor:e,floating:t}),i);return{x:a,y:r}}({anchor:this.anchorElement,floating:this,placement:"top-start"});null!=e||(e=this.offsetWidth);let a=rL(this).getBoundingClientRect(),r=a.width-t-e,n=a.height-i-this.offsetHeight,{style:s}=rf(this,d0);s.setProperty("position","absolute"),s.setProperty("right",`${Math.max(0,r)}px`),s.setProperty("--_menu-bottom",`${n}px`);let o=getComputedStyle(this),l=s.getPropertyValue("--_menu-bottom")===o.bottom?n:parseFloat(o.bottom),d=a.height-l-parseFloat(o.marginBottom);this.style.setProperty("--_menu-max-height",`${d}px`)},us=new WeakSet,uo=function(e){let t=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=null==t?void 0:t.querySelector('[role="menu"]'),{style:a}=rf(this,d0);if(e||a.setProperty("--media-menu-transition-in","none"),i){let e=i.offsetHeight,a=Math.max(i.offsetWidth,t.offsetWidth);this.style.setProperty("min-width",`${a}px`),this.style.setProperty("min-height",`${e}px`),rk(this,ur,un).call(this,a)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),rk(this,ur,un).call(this);a.removeProperty("--media-menu-transition-in")},ul=new WeakSet,ud=function(e){var t;if(e.stopPropagation(),e.composedPath().includes(rf(this,uu,uc))){null==(t=rf(this,dQ))||t.focu
1301s(),this.hidden=!0;return}let i=rk(this,uy,u_).call(this,e);!i||i.hasAttribute("disabled")||(rk(this,uw,uT).call(this,i),this.handleSelect(e))},uu=new WeakSet,uc=function(){var e;return null==(e=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))?void 0:e.find(e=>e.matches('button[part~="back"]'))},uh=new WeakSet,um=function(e){if(e.target===this)return;rk(this,up,uv).call(this);let t=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(let i of t)i.invokeTargetElement!=e.target&&("open"!=e.newState||"true"!=i.getAttribute("aria-expanded")||i.invokeTargetElement.hidden||i.invokeTargetElement.dispatchEvent(new rb({relatedTarget:i})));for(let e of t)e.setAttribute("aria-expanded",`${!e.submenuElement.hidden}`);rk(this,us,uo).call(this,!0)},up=new WeakSet,uv=function(){let e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)},ub=new WeakSet,ug=function(e){var t;er(this,e.relatedTarget)||(rf(this,dJ)&&(null==(t=rf(this,dQ))||t.focus()),rf(this,dz)&&rf(this,dz)!==e.relatedTarget&&!this.hidden&&(this.hidden=!0))},uE=new WeakSet,uf=function(e){var t,i,a,r,n;let{key:s,ctrlKey:o,altKey:l,metaKey:d}=e;if(!o&&!l&&!d&&this.keysUsed.includes(s))if(e.preventDefault(),e.stopPropagation(),"Tab"===s){if(rf(this,dJ)){this.hidden=!0;return}e.shiftKey?null==(i=null==(t=this.previousElementSibling)?void 0:t.focus)||i.call(t):null==(r=null==(a=this.nextElementSibling)?void 0:a.focus)||r.call(a),this.blur()}else"Escape"===s?(null==(n=rf(this,dQ))||n.focus(),rf(this,dJ)&&(this.hidden=!0)):"Enter"===s||" "===s?this.handleSelect(e):this.handleMove(e)},uy=new WeakSet,u_=function(e){return e.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))},uk=new WeakSet,uA=function(){return this.items.find(e=>0===e.tabIndex)},uw=new WeakSet,uT=function(e){for(let t of this.items)t.tabIndex=t===e?0:-1},uI=new WeakSet,uS=function(e,t){let i=[...this.checkedItems];"radio"===e.type&&this.radioGroupItems.forEach(e=>e.checked=!1),t?e.checked=!e.checked:e.checked=!0,this.checkedItems.some((e,t)=>e!=i[t])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},rC.shadowRootOptions={mode:"open"},rC.getTemplateHTML=function(e){return` 1302 <style> 1303 :host { 1304 font: var(--media-font, 1305 var(--media-font-weight, normal) 1306 var(--media-font-size, 14px) / 1307 var(--media-text-content-height, var(--media-control-height, 24px)) 1308 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 1309 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 1310 --_menu-bg: rgb(20 20 30 / .8); 1311 background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, var(--_menu-bg)))); 1312 border-radius: var(--media-menu-border-radius); 1313 border: var(--media-menu-border, none); 1314 display: var(--media-menu-display, inline-flex); 1315 transition: var(--media-menu-transition-in, 1316 visibility 0s, 1317 opacity .2s ease-out, 1318 transform .15s ease-out, 1319 left .2s ease-in-out, 1320 min-width .2s ease-in-out, 1321 min-height .2s ease-in-out 1322 ) !important; 1323 1324 visibility: var(--media-menu-visibility, visible); 1325 opacity: var(--media-menu-opacity, 1); 1326 max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px)); 1327 transform: var(--media-menu-transform-in, translateY(0) scale(1)); 1328 flex-direction: column; 1329 1330 min-height: 0; 1331 position: relative; 1332 bottom: var(--_menu-bottom); 1333 box-sizing: border-box; 1334 } 1335 1336 @-moz-document url-prefix() { 1337 :host{ 1338 --_menu-bg: rgb(20 20 30); 1339 } 1340 } 1341 1342 :host([hidden]) { 1343 transition: var(--media-menu-transition-out, 1344 visibility .15s ease-in, 1345 opacity .15s ease-in, 1346 transform .15s ease-in 1347 ) !important; 1348 visibility: var(--media-menu-hidden-visibility, hidden); 1349 opacity: var(--media-menu-hidden-opacity, 0); 1350 max-height: var(--media-menu-hidden-max-height, 1351 var(--media-menu-max-height, var(--_menu-max-height, 300px))); 1352 transform: var(--media-menu-transform-out, translateY(2px) scale(.99)); 1353 pointer-events: none; 1354 } 1355 1356 :host([slot="submenu"]) { 1357 background: none; 1358 width: 100%; 1359 min-height: 100%; 1360 position: absolute; 1361 bottom: 0; 1362 right: -100%; 1363 } 1364 1365 #container { 1366 display: flex; 1367 flex-direction: column; 1368 min-height: 0; 1369 transition: transform .2s ease-out; 1370 transform: translate(0, 0); 1371 } 1372 1373 #container.has-expanded { 1374 transition: transform .2s ease-in; 1375 transform: translate(-100%, 0); 1376 } 1377 1378 button { 1379 background: none; 1380 color: inherit; 1381 border: none; 1382 padding: 0; 1383 font: inherit; 1384 outline: inherit; 1385 display: inline-flex; 1386 align-items: center; 1387 } 1388 1389 slot[name="header"][hidden] { 1390 display: none; 1391 } 1392 1393 slot[name="header"] > *, 1394 slot[name="header"]::slotted(*) { 1395 padding: .4em .7em; 1396 border-bottom: 1px solid rgb(255 255 255 / .25); 1397 cursor: var(--media-cursor, default); 1398 } 1399 1400 slot[name="header"] > button[part~="back"], 1401 slot[name="header"]::slotted(button[part~="back"]) { 1402 cursor: var(--media-cursor, pointer); 1403 } 1404 1405 svg[part~="back"] { 1406 height: var(--media-menu-icon-height, var(--media-control-height, 24px)); 1407 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 1408 display: block; 1409 margin-right: .5ch; 1410 } 1411 1412 slot:not([name]) { 1413 gap: var(--media-menu-gap); 1414 flex-direction: var(--media-menu-flex-direction, column); 1415 overflow: var(--media-menu-overflow, hidden auto); 1416 display: flex; 1417 min-height: 0; 1418 } 1419 1420 :host([role="menu"]) slot:not([name]) { 1421 padding-block: .4em; 1422 } 1423 1424 slot:not([name])::slotted([role="menu"]) { 1425 background: none; 1426 } 1427 1428 media-chrome-menu-item > span { 1429 margin-right: .5ch; 1430 max-width: var(--media-menu-item-max-width); 1431 text-overflow: ellipsis; 1432 overflow: hidden; 1433 } 1434 </style> 1435 <style id="layout-row" media="width:0"> 1436 1437 slot[name="header"] > *, 1438 slot[name="header"]::slotted(*) { 1439 padding: .4em .5em; 1440 } 1441 1442 slot:not([name]) { 1443 gap: var(--media-menu-gap, .25em); 1444 flex-direction: var(--media-menu-flex-direction, row); 1445 padding-inline: .5em; 1446 } 1447 1448 media-chrome-menu-item { 1449 padding: .3em .5em; 1450 } 1451 1452 media-chrome-menu-item[aria-checked="true"] { 1453 background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2)); 1454 } 1455 1456 1457 media-chrome-menu-item::part(checked-indicator) { 1458 display: var(--media-menu-item-checked-indicator-display, none); 1459 } 1460 </style> 1461 <div id="container"> 1462 <slot name="header" hidden> 1463 <button part="back button" aria-label="Back to previous menu"> 1464 <slot name="back-icon"> 1465 <svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator"> 1466 <path d="m11.88 17.585.742-.669-4.2-4.665 4.2-4.666-.743-.669-4.803 5.335 4.803 5.334Z"/> 1467 </svg> 1468 </slot> 1469 <slot name="title"></slot> 1470 </button> 1471 </slot> 1472 <slot></slot> 1473 </div> 1474 <slot name="checked-indicator" hidden></slot> 1475 `},K.customElements.get("media-chrome-menu")||K.customElements.define("media-chrome-menu",rC);var rR=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},rx=(e,t,i)=>(rR(e,t,"read from private field"),i?i.call(e):t.get(e)),rD=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},rP=(e,t,i,a)=>(rR(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),rN=(e,t,i)=>(rR(e,t,"access private method"),i);let rO="type",rU="value",rH="checked",rW="disabled";class rB extends K.HTMLElement{constructor(){if(super(),rD(this,uL),rD(this,ux),rD(this,uP),rD(this,uU),rD(this,uW),rD(this,u$),rD(this,uC,!1),rD(this,uM,void 0),rD(this,uO,()=>{var e,t;this.setAttribute("submenusize",`${this.submenuElement.items.length}`);let i=this.shadowRoot.querySelector('slot[name="description"]'),a=null==(e=this.submenuElement.checkedItems)?void 0:e[0],r=null!=(t=null==a?void 0:a.dataset.description)?t:null==a?void 0:a.text,n=j.createElement("span");n.textContent=null!=r?r:"",i.replaceChildren(n)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=J(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.shadowRoot.addEventListener("slotchange",this)}static get observedAttributes(){return[rO,rW,rH,rU]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),r$(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","fal
1475se"),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":rN(this,uL,uR).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":rN(this,uW,uB).call(this,e);break;case"keyup":rN(this,uU,uH).call(this,e)}}attributeChangedCallback(e,t,i){e===rH&&r$(this)&&!rx(this,uC)?this.setAttribute("aria-checked",null!=i?"true":"false"):e===rO&&i!==t?this.role="menuitem"+i:e===rW&&i!==t&&(null==i?this.enable():this.disable())}connectedCallback(){this.hasAttribute(rW)||this.enable(),this.role="menuitem"+this.type,rP(this,uM,function e(t,i){if(!t)return null;let{host:a}=t.getRootNode();return!i&&a?e(t,a):(null==i?void 0:i.items)?i:e(i,null==i?void 0:i.parentNode)}(this,this.parentNode)),rN(this,u$,uV).call(this)}disconnectedCallback(){this.disable(),rN(this,u$,uV).call(this),rP(this,uM,null)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?null==(e=eo(this))?void 0:e.querySelector(`#${this.invokeTarget}`):this.submenuElement}get submenuElement(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}get type(){var e;return null!=(e=this.getAttribute(rO))?e:""}set type(e){this.setAttribute(rO,`${e}`)}get value(){var e;return null!=(e=this.getAttribute(rU))?e:this.text}set value(e){this.setAttribute(rU,e)}get text(){var e;return(null!=(e=this.textContent)?e:"").trim()}get checked(){if(r$(this))return"true"===this.getAttribute("aria-checked")}set checked(e){r$(this)&&(rP(this,uC,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){!r$(this)&&this.invokeTargetElement&&er(this,e.target)&&this.invokeTargetElement.dispatchEvent(new rb({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}function r$(e){return"radio"===e.type||"checkbox"===e.type}uC=new WeakMap,uM=new WeakMap,uL=new WeakSet,uR=function(e){let t=e.target;if(!(null==t?void 0:t.name))for(let e of t.assignedNodes({flatten:!0}))e instanceof Text&&""===e.textContent.trim()&&e.remove();"submenu"===t.name&&(this.submenuElement?rN(this,ux,uD).call(this):rN(this,uP,uN).call(this))},ux=new WeakSet,uD=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",rx(this,uO)),this.submenuElement.addEventListener("addmenuitem",rx(this,uO)),this.submenuElement.addEventListener("removemenuitem",rx(this,uO)),rx(this,uO).call(this)},uP=new WeakSet,uN=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",rx(this,uO)),this.submenuElement.removeEventListener("addmenuitem",rx(this,uO)),this.submenuElement.removeEventListener("removemenuitem",rx(this,uO)),rx(this,uO).call(this)},uO=new WeakMap,uU=new WeakSet,uH=function(e){let{key:t}=e;this.keysUsed.includes(t)?this.handleClick(e):this.removeEventListener("keyup",rN(this,uU,uH))},uW=new WeakSet,uB=function(e){let{metaKey:t,altKey:i,key:a}=e;t||i||!this.keysUsed.includes(a)?this.removeEventListener("keyup",rN(this,uU,uH)):this.addEventListener("keyup",rN(this,uU,uH),{once:!0})},u$=new WeakSet,uV=function(){var e;let t=null==(e=rx(this,uM))?void 0:e.radioGroupItems;if(!t)return;let i=t.filter(e=>"true"===e.getAttribute("aria-checked")).pop();for(let e of(i||(i=t[0]),t))e.setAttribute("aria-checked","false");null==i||i.setAttribute("aria-checked","true")},rB.shadowRootOptions={mode:"open"},rB.getTemplateHTML=function(e){return` 1476 <style> 1477 :host { 1478 transition: var(--media-menu-item-transition, 1479 background .15s linear, 1480 opacity .2s ease-in-out 1481 ); 1482 outline: var(--media-menu-item-outline, 0); 1483 outline-offset: var(--media-menu-item-outline-offset, -1px); 1484 cursor: var(--media-cursor, pointer); 1485 display: flex; 1486 align-items: center; 1487 align-self: stretch; 1488 justify-self: stretch; 1489 white-space: nowrap; 1490 white-space-collapse: collapse; 1491 text-wrap: nowrap; 1492 padding: .4em .8em .4em 1em; 1493 } 1494 1495 :host(:focus-visible) { 1496 box-shadow: var(--media-menu-item-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 1497 outline: var(--media-menu-item-hover-outline, 0); 1498 outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px)); 1499 } 1500 1501 :host(:hover) { 1502 cursor: var(--media-cursor, pointer); 1503 background: var(--media-menu-item-hover-background, rgb(92 92 102 / .5)); 1504 outline: var(--media-menu-item-hover-outline); 1505 outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px)); 1506 } 1507 1508 :host([aria-checked="true"]) { 1509 background: var(--media-menu-item-checked-background); 1510 } 1511 1512 :host([hidden]) { 1513 display: none; 1514 } 1515 1516 :host([disabled]) { 1517 pointer-events: none; 1518 color: rgba(255, 255, 255, .3); 1519 } 1520 1521 slot:not([name]) { 1522 width: 100%; 1523 } 1524 1525 slot:not([name="submenu"]) { 1526 display: inline-flex; 1527 align-items: center; 1528 transition: inherit; 1529 opacity: var(--media-menu-item-opacity, 1); 1530 } 1531 1532 slot[name="description"] { 1533 justify-content: end; 1534 } 1535 1536 slot[name="description"] > span { 1537 display: inline-block; 1538 margin-inline: 1em .2em; 1539 max-width: var(--media-menu-item-description-max-width, 100px); 1540 text-overflow: ellipsis; 1541 overflow: hidden; 1542 font-size: .8em; 1543 font-weight: 400; 1544 text-align: right; 1545 position: relative; 1546 top: .04em; 1547 } 1548 1549 slot[name="checked-indicator"] { 1550 display: none; 1551 } 1552 1553 :host(:is([role="menuitemradio"],[role="menuitemcheckbox"])) slot[name="checked-indicator"] { 1554 display: var(--media-menu-item-checked-indicator-display, inline-block); 1555 } 1556 1557 1558 svg, img, ::slotted(svg), ::slotted(img) { 1559 height: var(--media-menu-item-icon-height, var(--media-control-height, 24px)); 1560 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 1561 display: block; 1562 } 1563 1564 1565 [part~="indicator"], 1566 ::slotted([part~="indicator"]) { 1567 fill: var(--media-menu-item-indicator-fill, 1568 var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)))); 1569 height: var(--media-menu-item-indicator-height, 1.25em); 1570 margin-right: .5ch; 1571 } 1572 1573 [part~="checked-indicator"] { 1574 visibility: hidden; 1575 } 1576 1577 :host([aria-checked="true"]) [part~="checked-indicator"] { 1578 visibility: visible; 1579 } 1580 </style> 1581 <slot name="checked-indicator"> 1582 <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator"> 1583 <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"/> 1584 </svg> 1585 </slot> 1586 <slot name="prefix"></slot> 1587 <slot></slot> 1588 <slot name="description"></slot> 1589 <slot name="suffix">
1590 ${this.getSuffixSlotInnerHTML(e)} 1591 </slot> 1592 <slot name="submenu"></slot> 1593 `},rB.getSuffixSlotInnerHTML=function(e){return""},K.customElements.get("media-chrome-menu-item")||K.customElements.define("media-chrome-menu-item",rB);class rV extends rC{get anchorElement(){return"auto"!==this.anchor?super.anchorElement:ee(this).querySelector("media-settings-menu-button")}}rV.getTemplateHTML=function(e){return` 1594 ${rC.getTemplateHTML(e)} 1595 <style> 1596 :host { 1597 --_menu-bg: rgb(20 20 30 / .8); 1598 background: var(--media-settings-menu-background, 1599 var(--media-menu-background, 1600 var(--media-control-background, 1601 var(--media-secondary-color, var(--_menu-bg))))); 1602 min-width: var(--media-settings-menu-min-width, 170px); 1603 border-radius: 2px 2px 0 0; 1604 overflow: hidden; 1605 } 1606 1607 @-moz-document url-prefix() { 1608 :host{ 1609 --_menu-bg: rgb(20 20 30); 1610 } 1611 } 1612 1613 :host([role="menu"]) { 1614 1615 justify-content: end; 1616 } 1617 1618 slot:not([name]) { 1619 justify-content: var(--media-settings-menu-justify-content); 1620 flex-direction: var(--media-settings-menu-flex-direction, column); 1621 overflow: visible; 1622 } 1623 1624 #container.has-expanded { 1625 --media-settings-menu-item-opacity: 0; 1626 } 1627 </style> 1628 `},K.customElements.get("media-settings-menu")||K.customElements.define("media-settings-menu",rV);class rq extends rB{}rq.shadowRootOptions={mode:"open"},rq.getTemplateHTML=function(e){return` 1629 ${rB.getTemplateHTML.call(this,e)} 1630 <style> 1631 slot:not([name="submenu"]) { 1632 opacity: var(--media-settings-menu-item-opacity, var(--media-menu-item-opacity)); 1633 } 1634 1635 :host([aria-expanded="true"]:hover) { 1636 background: transparent; 1637 } 1638 </style> 1639 `},rq.getSuffixSlotInnerHTML=function(e){return` 1640 <svg aria-hidden="true" viewBox="0 0 20 24"> 1641 <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"/> 1642 </svg> 1643 `},K.customElements.get("media-settings-menu-item")||K.customElements.define("media-settings-menu-item",rq);class rF extends t1{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?null==(e=eo(this))?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;null==(e=this.invokeTargetElement)||e.dispatchEvent(new rb({relatedTarget:this}))}}K.customElements.get("media-chrome-menu-button")||K.customElements.define("media-chrome-menu-button",rF);class rG extends rF{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",U("settings"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:ee(this).querySelector("media-settings-menu")}}rG.getSlotTemplateHTML=function(){return` 1644 <style> 1645 :host([aria-expanded="true"]) slot[name=tooltip] { 1646 display: none; 1647 } 1648 </style> 1649 <slot name="icon"> 1650 <svg aria-hidden="true" viewBox="0 0 24 24"> 1651 <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"/> 1652 </svg> 1653 </slot> 1654 `},rG.getTooltipContentHTML=function(){return U("Settings")},K.customElements.get("media-settings-menu-button")||K.customElements.define("media-settings-menu-button",rG);var rK=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},rj=(e,t,i)=>(rK(e,t,"read from private field"),i?i.call(e):t.get(e)),rY=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},rQ=(e,t,i,a)=>(rK(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),rz=(e,t,i)=>(rK(e,t,"access private method"),i);class rZ extends rC{constructor(){super(...arguments),rY(this,uG),rY(this,uj),rY(this,uq,[]),rY(this,uF,void 0)}static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_AUDIO_TRACK_LIST,v.MEDIA_AUDIO_TRACK_ENABLED,v.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===v.MEDIA_AUDIO_TRACK_ENABLED&&t!==i)this.value=i;else if(e===v.MEDIA_AUDIO_TRACK_LIST&&t!==i){var a;rQ(this,uq,null==(a=null!=i?i:"")?void 0:a.split(/\s+/).map(C)),rz(this,uG,uK).call(this)}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",rz(this,uj,uY))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",rz(this,uj,uY))}get anchorElement(){var e;return"auto"!==this.anchor?super.anchorElement:null==(e=ee(this))?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return rj(this,uq)}set mediaAudioTrackList(e){rQ(this,uq,e),rz(this,uG,uK).call(this)}get mediaAudioTrackEnabled(){var e;return null!=(e=ev(this,v.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){eb(this,v.MEDIA_AUDIO_TRACK_ENABLED,e)}}uq=new WeakMap,uF=new WeakMap,uG=new WeakSet,uK=function(){if(rj(this,uF)===JSON.stringify(this.mediaAudioTrackList))return;rQ(this,uF,JSON.stringify(this.mediaAudioTrackList));let e=this.mediaAudioTrackList;for(let t of(this.defaultSlot.textContent="",e)){let e=rA({type:"radio",text:this.formatMenuItemText(t.label,t),value:`${t.id}`,checked:t.enabled});
1654e.prepend(rw(this,"checked-indicator")),this.defaultSlot.append(e)}},uj=new WeakSet,uY=function(){if(null==this.value)return;let e=new K.CustomEvent(u.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},K.customElements.get("media-audio-track-menu")||K.customElements.define("media-audio-track-menu",rZ);let rX=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1655 <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/> 1656 <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"/> 1657</svg>`;class rJ extends rF{static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_AUDIO_TRACK_ENABLED,v.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",U("Audio"))}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=ee(this))?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return null!=(e=ev(this,v.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){eb(this,v.MEDIA_AUDIO_TRACK_ENABLED,e)}}rJ.getSlotTemplateHTML=function(){return` 1658 <style> 1659 :host([aria-expanded="true"]) slot[name=tooltip] { 1660 display: none; 1661 } 1662 </style> 1663 <slot name="icon">${rX}</slot> 1664 `},rJ.getTooltipContentHTML=function(){return U("Audio")},K.customElements.get("media-audio-track-menu-button")||K.customElements.define("media-audio-track-menu-button",rJ);var r0=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},r1=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},r2=(e,t,i)=>(r0(e,t,"access private method"),i);let r3=` 1665 <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator"> 1666 <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"/> 1667 </svg>`;class r4 extends rC{constructor(){super(...arguments),r1(this,uz),r1(this,uX),r1(this,uQ,void 0)}static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_SUBTITLES_LIST,v.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===v.MEDIA_SUBTITLES_LIST&&t!==i?r2(this,uz,uZ).call(this):e===v.MEDIA_SUBTITLES_SHOWING&&t!==i&&(this.value=i)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",r2(this,uX,uJ))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",r2(this,uX,uJ))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:ee(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return r5(this,v.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){r9(this,v.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return r5(this,v.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){r9(this,v.MEDIA_SUBTITLES_SHOWING,e)}}uQ=new WeakMap,uz=new WeakSet,uZ=function(){var e,t,i,a,r,n;if(r0(this,t=uQ,"read from private field"),(i?i.call(this):t.get(this))===JSON.stringify(this.mediaSubtitlesList))return;a=uQ,r=JSON.stringify(this.mediaSubtitlesList),r0(this,a,"write to private field"),n?n.call(this,r):a.set(this,r),this.defaultSlot.textContent="";let s=!this.value,o=rA({type:"radio",text:this.formatMenuItemText(U("Off")),value:"off",checked:s});for(let t of(o.prepend(rw(this,"checked-indicator")),this.defaultSlot.append(o),this.mediaSubtitlesList)){let i=rA({type:"radio",text:this.formatMenuItemText(t.label,t),value:eG(t),checked:this.value==eG(t)});i.prepend(rw(this,"checked-indicator")),"captions"===(null!=(e=t.kind)?e:"subs")&&i.append(rw(this,"captions-indicator")),this.defaultSlot.append(i)}},uX=new WeakSet,uJ=function(){let e=this.mediaSubtitlesShowing,t=this.getAttribute(v.MEDIA_SUBTITLES_SHOWING),i=this.value!==t;if((null==e?void 0:e.length)&&i&&this.dispatchEvent(new K.CustomEvent(u.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:e})),!this.value||!i)return;let a=new K.CustomEvent(u.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)},r4.getTemplateHTML=function(e){return` 1668 ${rC.getTemplateHTML(e)} 1669 <slot name="captions-indicator" hidden>${r3}</slot> 1670 `};let r5=(e,t)=>{let i=e.getAttribute(t);return i?eq(i):[]},r9=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=eK(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};K.customElements.get("media-captions-menu")||K.customElements.define("media-captions-menu",r4);let r8=`<svg aria-hidden="true" viewBox="0 0 26 24"> 1671 <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
16710 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"/> 1672</svg>`,r7=`<svg aria-hidden="true" viewBox="0 0 26 24"> 1673 <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"/> 1674</svg>`,r6=e=>{e.setAttribute("aria-checked",ez(e).toString())};class ne extends rF{static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_SUBTITLES_LIST,v.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",U("closed captions")),r6(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===v.MEDIA_SUBTITLES_SHOWING&&r6(this)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=ee(this))?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return nt(this,v.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){ni(this,v.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return nt(this,v.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){ni(this,v.MEDIA_SUBTITLES_SHOWING,e)}}ne.getSlotTemplateHTML=function(){return` 1675 <style> 1676 :host([aria-checked="true"]) slot[name=off] { 1677 display: none !important; 1678 } 1679 1680 1681 :host(:not([aria-checked="true"])) slot[name=on] { 1682 display: none !important; 1683 } 1684 1685 :host([aria-expanded="true"]) slot[name=tooltip] { 1686 display: none; 1687 } 1688 </style> 1689 1690 <slot name="icon"> 1691 <slot name="on">${r8}</slot> 1692 <slot name="off">${r7}</slot> 1693 </slot> 1694 `},ne.getTooltipContentHTML=function(){return U("Captions")};let nt=(e,t)=>{let i=e.getAttribute(t);return i?eq(i):[]},ni=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=eK(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};K.customElements.get("media-captions-menu-button")||K.customElements.define("media-captions-menu-button",ne);var na=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nr=(e,t,i)=>(na(e,t,"read from private field"),i?i.call(e):t.get(e)),nn=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},ns=(e,t,i)=>(na(e,t,"access private method"),i);let no="rates";class nl extends rC{constructor(){super(),nn(this,u1),nn(this,u3),nn(this,u0,new e$(this,no,{defaultValue:ae})),ns(this,u1,u2).call(this)}static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_PLAYBACK_RATE,no]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===v.MEDIA_PLAYBACK_RATE&&t!=i?this.value=i:e===no&&t!=i&&(nr(this,u0).value=i,ns(this,u1,u2).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",ns(this,u3,u4))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",ns(this,u3,u4))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:ee(this).querySelector("media-playback-rate-menu-button")}get rates(){return nr(this,u0)}set rates(e){e?Array.isArray(e)?nr(this,u0).value=e.join(" "):"str
1694ing"==typeof e&&(nr(this,u0).value=e):nr(this,u0).value="",ns(this,u1,u2).call(this)}get mediaPlaybackRate(){return ec(this,v.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){eh(this,v.MEDIA_PLAYBACK_RATE,e)}}u0=new WeakMap,u1=new WeakSet,u2=function(){for(let e of(this.defaultSlot.textContent="",nr(this,u0))){let t=rA({type:"radio",text:this.formatMenuItemText(`${e}x`,e),value:e,checked:this.mediaPlaybackRate===Number(e)});t.prepend(rw(this,"checked-indicator")),this.defaultSlot.append(t)}},u3=new WeakSet,u4=function(){if(!this.value)return;let e=new K.CustomEvent(u.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},K.customElements.get("media-playback-rate-menu")||K.customElements.define("media-playback-rate-menu",nl);class nd extends rF{static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${null!=(e=this.mediaPlaybackRate)?e:1}x`}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===v.MEDIA_PLAYBACK_RATE){let e=i?+i:NaN,t=Number.isNaN(e)?1:e;this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",U("Playback rate {playbackRate}",{playbackRate:t}))}}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:ee(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return ec(this,v.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){eh(this,v.MEDIA_PLAYBACK_RATE,e)}}nd.getSlotTemplateHTML=function(e){return` 1695 <style> 1696 :host { 1697 min-width: 5ch; 1698 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 1699 } 1700 1701 :host([aria-expanded="true"]) slot[name=tooltip] { 1702 display: none; 1703 } 1704 </style> 1705 <slot name="icon">${e.mediaplaybackrate||1}x</slot> 1706 `},nd.getTooltipContentHTML=function(){return U("Playback rate")},K.customElements.get("media-playback-rate-menu-button")||K.customElements.define("media-playback-rate-menu-button",nd);var nu=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nc=(e,t,i)=>(nu(e,t,"read from private field"),i?i.call(e):t.get(e)),nh=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},nm=(e,t,i,a)=>(nu(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),np=(e,t,i)=>(nu(e,t,"access private method"),i);class nv extends rC{constructor(){super(...arguments),nh(this,u8),nh(this,u6),nh(this,u5,[]),nh(this,u9,{})}static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_RENDITION_LIST,v.MEDIA_RENDITION_SELECTED,v.MEDIA_RENDITION_UNAVAILABLE,v.MEDIA_HEIGHT]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===v.MEDIA_RENDITION_SELECTED&&t!==i)this.value=null!=i?i:"auto",np(this,u8,u7).call(this);else if(e===v.MEDIA_RENDITION_LIST&&t!==i)nm(this,u5,null==i?void 0:i.split(/\s+/).map(I)),np(this,u8,u7).call(this);else e===v.MEDIA_HEIGHT&&t!==i&&np(this,u8,u7).call(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",np(this,u6,ce))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",np(this,u6,ce))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:ee(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return nc(this,u5)}set mediaRenditionList(e){nm(this,u5,e),np(this,u8,u7).call(this)}get mediaRenditionSelected(){return ev(this,v.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){eb(this,v.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return ec(this,v.MEDIA_HEIGHT)}set mediaHeight(e){eh(this,v.MEDIA_HEIGHT,e)}}u5=new WeakMap,u9=new WeakMap,u8=new WeakSet,u7=function(){if(nc(this,u9).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&nc(this,u9).mediaHeight===this.mediaHeight)return;nc(this,u9).mediaRenditionList=JSON.stringify(this.mediaRenditionList),nc(this,u9).mediaHeight=this.mediaHeight;let e=this.mediaRenditionList.sort((e,t)=>
1706t.height-e.height);for(let t of e)t.selected=t.id===this.mediaRenditionSelected;this.defaultSlot.textContent="";let t=!this.mediaRenditionSelected;for(let i of e){let e=rA({type:"radio",text:this.formatMenuItemText(`${Math.min(i.width,i.height)}p`,i),value:`${i.id}`,checked:i.selected&&!t});e.prepend(rw(this,"checked-indicator")),this.defaultSlot.append(e)}let i=rA({type:"radio",text:t?this.formatMenuItemText(`${U("Auto")} (${this.mediaHeight}p)`):this.formatMenuItemText(U("Auto")),value:"auto",checked:t}),a=this.mediaHeight>0?`${U("Auto")} (${this.mediaHeight}p)`:U("Auto");i.dataset.description=a,i.prepend(rw(this,"checked-indicator")),this.defaultSlot.append(i)},u6=new WeakSet,ce=function(){if(null==this.value)return;let e=new K.CustomEvent(u.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},K.customElements.get("media-rendition-menu")||K.customElements.define("media-rendition-menu",nv);let nb=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1707 <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" /> 1708</svg>`;class ng extends rF{static get observedAttributes(){return[...super.observedAttributes,v.MEDIA_RENDITION_SELECTED,v.MEDIA_RENDITION_UNAVAILABLE,v.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",U("quality"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:ee(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return ev(this,v.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){eb(this,v.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return ec(this,v.MEDIA_HEIGHT)}set mediaHeight(e){eh(this,v.MEDIA_HEIGHT,e)}}ng.getSlotTemplateHTML=function(){return` 1709 <style> 1710 :host([aria-expanded="true"]) slot[name=tooltip] { 1711 display: none; 1712 } 1713 </style> 1714 <slot name="icon">${nb}</slot> 1715 `},ng.getTooltipContentHTML=function(){return U("Quality")},K.customElements.get("media-rendition-menu-button")||K.customElements.define("media-rendition-menu-button",ng);let nE=K.document?.createElement?.("template");nE&&(nE.innerHTML=` 1716 <!-- Sutro --> 1717 <style> 1718 :host { 1719 --_primary-color: var(--media-primary-color, #fff); 1720 --_secondary-color: var(--media-secondary-color, transparent); 1721 --_accent-color: var(--media-accent-color, #fff); 1722 } 1723 1724 media-controller { 1725 --base: 18px; 1726 1727 font-size: calc(0.75 * var(--base)); 1728 font-family: Roboto, Arial, sans-serif; 1729 --media-font-family: Roboto, helvetica neue, segoe ui, arial, sans-serif; 1730 -webkit-font-smoothing: antialiased; 1731 1732 --media-primary-color: #fff; 1733 --media-secondary-color: transparent; 1734 --media-menu-background: rgba(28, 28, 28, 0.6); 1735 --media-text-color: var(--_primary-color); 1736 --media-control-hover-background: var(--media-secondary-color); 1737 1738 --media-range-track-height: calc(0.125 * var(--base)); 1739 --media-range-thumb-height: var(--base); 1740 --media-range-thumb-width: var(--base); 1741 --media-range-thumb-border-radius: var(--base); 1742 1743 --media-control-height: calc(2 * var(--base)); 1744 } 1745 1746 media-controller[breakpointmd] { 1747 --base: 20px; 1748 } 1749 1750 /* The biggest size controller is tied to going fullscreen 1751 instead of a player width */ 1752 media-controller[mediaisfullscreen] { 1753 --base: 24px; 1754 } 1755 1756 .media-button { 1757 --media-control-hover-background: var(--_secondary-color); 1758 --media-tooltip-background: rgb(28 28 28 / .24); 1759 --media-text-content-height: 1.2; 1760 --media-tooltip-padding: .7em 1em; 1761 --media-tooltip-distance: 8px; 1762 --media-tooltip-container-margin: 18px; 1763 position: relative; 1764 padding: 0; 1765 opacity: 0.9; 1766 transition: opacity 0.1s cubic-bezier(0.4, 0, 1, 1); 1767 } 1768 1769 .media-button svg { 1770 fill: none; 1771 stroke: var(--_primary-color); 1772 stroke-width: 1; 1773 stroke-linecap: 'round'; 1774 stroke-linejoin: 'round'; 1775 } 1776 1777 svg .svg-shadow { 1778 stroke: #000; 1779 stroke-opacity: 0.15; 1780 stroke-width: 2px; 1781 fill: none; 1782 } 1783 </style> 1784 1785 <media-controller 1786 breakpoints="md:480"
1787 defaultsubtitles="{{defaultsubtitles}}" 1788 defaultduration="{{defaultduration}}" 1789 gesturesdisabled="{{disabled}}" 1790 hotkeys="{{hotkeys}}" 1791 nohotkeys="{{nohotkeys}}" 1792 defaultstreamtype="on-demand" 1793 > 1794 <slot name="media" slot="media"></slot> 1795 <slot name="poster" slot="poster"></slot> 1796 <slot name="centered-chrome" slot="centered-chrome"></slot> 1797 <media-error-dialog slot="dialog"></media-error-dialog> 1798 1799 <!-- Controls Gradient --> 1800 <style> 1801 .media-gradient-bottom { 1802 position: absolute; 1803 bottom: 0; 1804 width: 100%; 1805 height: calc(8 * var(--base)); 1806 pointer-events: none; 1807 } 1808 1809 .media-gradient-bottom::before { 1810 content: ''; 1811 --gradient-steps: hsl(0 0% 0% / 0) 0%, hsl(0 0% 0% / 0.013) 8.1%, hsl(0 0% 0% / 0.049) 15.5%, 1812 hsl(0 0% 0% / 0.104) 22.5%, hsl(0 0% 0% / 0.175) 29%, hsl(0 0% 0% / 0.259) 35.3%, hsl(0 0% 0% / 0.352) 41.2%, 1813 hsl(0 0% 0% / 0.45) 47.1%, hsl(0 0% 0% / 0.55) 52.9%, hsl(0 0% 0% / 0.648) 58.8%, hsl(0 0% 0% / 0.741) 64.7%, 1814 hsl(0 0% 0% / 0.825) 71%, hsl(0 0% 0% / 0.896) 77.5%, hsl(0 0% 0% / 0.951) 84.5%, hsl(0 0% 0% / 0.987) 91.9%, 1815 hsl(0 0% 0%) 100%; 1816 1817 position: absolute; 1818 inset: 0; 1819 opacity: 0.7; 1820 background: linear-gradient(to bottom, var(--gradient-steps)); 1821 } 1822 </style> 1823 <div class="media-gradient-bottom"></div> 1824 1825 <!-- Settings Menu --> 1826 <style> 1827 media-settings-menu { 1828 --media-menu-icon-height: 20px; 1829 --media-menu-item-icon-height: 20px; 1830 --media-settings-menu-min-width: calc(10 * var(--base)); 1831 --media-menu-transform-in: translateY(0) scale(1); 1832 --media-menu-transform-out: translateY(20px) rotate(3deg) scale(1); 1833 padding-block: calc(0.15 * var(--base)); 1834 margin-right: 10px; 1835 margin-bottom: 17px; 1836 border-radius: 8px; 1837 z-index: 2; 1838 user-select: none; 1839 } 1840 1841 media-settings-menu-item, 1842 [role='menu']::part(menu-item) { 1843 --media-icon-color: var(--_primary-color); 1844 margin-inline: calc(0.45 * var(--base)); 1845 height: calc(1.6 * var(--base)); 1846 font-size: calc(0.7 * var(--base)); 1847 font-weight: 400; 1848 padding: 0; 1849 padding-left: calc(0.4 * var(--base)); 1850 padding-right: calc(0.1 * var(--base)); 1851 border-radius: 6px; 1852 text-shadow: none; 1853 } 1854 1855 [slot='submenu']::part(back button) { 1856 font-size: calc(0.7 * var(--base)); 1857 } 1858 1859 media-settings-menu-item:hover { 1860 --media-icon-color: #000; 1861 color: #000; 1862 background-color: #fff; 1863 } 1864 1865 media-settings-menu-item:hover [slot='submenu']::part(menu-item), 1866 [slot='submenu']::part(back indicator) { 1867 --media-icon-color: var(--_primary-color); 1868 } 1869 1870 media-settings-menu-item:hover [slot='submenu']::part(menu-item):hover { 1871 --media-icon-color: #000; 1872 color: #000; 1873 background-color: #fff; 1874 } 1875 1876 media-settings-menu-item[submenusize='0'] { 1877 display: none; 1878 } 1879 1880 /* Also hide if only 'Auto' is added. */ 1881 .quality-settings[submenusize='1'] { 1882 display: none; 1883 } 1884 </style> 1885 <media-settings-menu hidden anchor="auto"> 1886 <media-settings-menu-item> 1887 Playback Speed 1888 <media-playback-rate-menu slot="submenu" hidden> 1889 <div slot="title">Playback Speed</div> 1890 </media-playback-rate-menu> 1891 </media-settings-menu-item> 1892 <media-settings-menu-item class="quality-settings"> 1893 Quality 1894 <media-rendition-menu slot="submenu" hidden> 1895 <div slot="title">Quality</div> 1896 </media-rendition-menu> 1897 </media-settings-menu-item> 1898 <media-settings-menu-item> 1899 Subtitles/CC 1900 <media-captions-menu slot="submenu" hidden> 1901 <div slot="title">Subtitles/CC</div> 1902 </media-captions-menu> 1903 </media-settings-menu-item> 1904 </media-settings-menu> 1905 1906 <!-- Control Bar --> 1907 <style> 1908 media-control-bar { 1909 position: absolute; 1910 height: calc(2 * var(--base)); 1911 line-height: calc(2 * var(--base)); 1912 bottom: var(--base); 1913 left: var(--base); 1914 right: var(--base); 1915 } 1916 </style> 1917 <media-control-bar> 1918 <!-- Play/Pause --> 1919 <style> 1920 @keyframes bounce-scale-play { 1921 0% { 1922 transform: scale(0.75, 0.75); 1923 } 1924 50% { 1925 transform: scale(115%, 115%); 1926 } 1927 100% { 1928 transform: scale(1, 1); 1929 } 1930 } 1931 1932 .media-button { 1933 border-radius: 25%; 1934 backdrop-filter: blur(10px) invert(15%) brightness(80%) opacity(0); 1935 -webkit-backdrop-filter: blur(10px) invert(15%) brightness(80%) opacity(0); 1936 transition: backdrop-filter 0.3s, -webkit-backdrop-filter 0.3s, box-shadow 0.3s; 1937 } 1938 1939 .media-button:hover { 1940 /* background-color: rgba(0, 0, 0, 0.05); */ 1941 box-shadow: rgba(0, 0, 0, 0.3) 0px 0px 5px; 1942 /* hue-rotate(120deg) */ 1943 backdrop-filter: blur(10px) invert(15%) brightness(80%) opacity(1); 1944 -webkit-backdrop-filter: blur(10px) invert(15%) brightness(80%) opacity(1); 1945 transition: backdrop-filter 0.3s, -webkit-backdrop-filter 0.3s; 1946 } 1947 1948 media-play-button #icon-play { 1949 opacity: 0; 1950 transform-box: view-box; 1951 transform-origin: center center; 1952 transform: scale(0.5, 0.5); 1953 transition: all 0.5s; 1954 } 1955 1956 media-play-button[mediapaused] #icon-play { 1957 opacity: 1; 1958 transform: scale(1, 1); 1959 animation: 0.35s bounce-scale-play ease-in-out; 1960 } 1961 1962 @keyframes bounce-pause-left { 1963 0% { 1964 font-size: 10px; 1965 } 1966 50% { 1967 font-size: 3px; 1968 } 1969 100% { 1970 font-size: 4px; 1971 } 1972 } 1973 1974 @keyframes bounce-pause-right { 1975 0% { 1976 font-size: 10px; 1977 transform: translateX(-8px); 1978 } 1979 50% { 1980 font-size: 3px; 1981 transform: translateX(1px); 1982 } 1983 100% { 1984 font-size: 4px; 1985 transform: translateX(0); 1986 } 1987 } 1988 1989 media-play-button #pause-left, 1990 media-play-button #pause-right { 1991 /* Using font-size to animate height because using scale was resulting in unexpected positioning */ 1992 font-size: 4px; 1993 opacity: 1; 1994 transform: translateX(0); 1995 transform-box: view-box; 1996 } 1997 1998 media-play-button:not([mediapaused]) #pause-left { 1999 animation: 0.3s bounce-pause-left ease-out; 2000 } 2001 2002 media-play-button:not([mediapaused]) #pause-right {
2003 animation: 0.3s bounce-pause-right ease-out; 2004 } 2005 2006 media-play-button[mediapaused] #pause-left, 2007 media-play-button[mediapaused] #pause-right { 2008 opacity: 0; 2009 font-size: 10px; 2010 } 2011 2012 media-play-button[mediapaused] #pause-right { 2013 transform-origin: right center; 2014 transform: translateX(-8px); 2015 } 2016 </style> 2017 <media-play-button mediapaused class="media-button"> 2018 <svg slot="icon" viewBox="0 0 32 32"> 2019 <!-- <use class="svg-shadow" xlink:href="#icon-play"></use> --> 2020 <g> 2021 <path 2022 id="icon-play" 2023 d="M20.7131 14.6976C21.7208 15.2735 21.7208 16.7265 20.7131 17.3024L12.7442 21.856C11.7442 22.4274 10.5 21.7054 10.5 20.5536L10.5 11.4464C10.5 10.2946 11.7442 9.57257 12.7442 10.144L20.7131 14.6976Z" 2024 /> 2025 </g> 2026 <!-- <use class="svg-shadow" xlink:href="#icon-pause"></use> --> 2027 <g id="icon-pause"> 2028 <rect id="pause-left" x="10.5" width="1em" y="10.5" height="11" rx="0.5" /> 2029 <rect id="pause-right" x="17.5" width="1em" y="10.5" height="11" rx="0.5" /> 2030 </g> 2031 </svg> 2032 </media-play-button> 2033 2034 <!-- Volume/Mute --> 2035 <style> 2036 media-mute-button { 2037 position: relative; 2038 } 2039 2040 media-mute-button .muted-path { 2041 transition: clip-path 0.2s ease-out; 2042 } 2043 2044 media-mute-button #muted-path-2 { 2045 transition-delay: 0.2s; 2046 } 2047 2048 media-mute-button .muted-path { 2049 clip-path: inset(0); 2050 } 2051 2052 media-mute-button:not([mediavolumelevel='off']) #muted-path-1 { 2053 clip-path: inset(0 0 100% 0); 2054 } 2055 2056 media-mute-button:not([mediavolumelevel='off']) #muted-path-2 { 2057 clip-path: inset(0 0 100% 0); 2058 } 2059 2060 media-mute-button .muted-path { 2061 opacity: 0; 2062 } 2063 2064 media-mute-button[mediavolumelevel='off'] .muted-path { 2065 opacity: 1; 2066 } 2067 2068 media-mute-button .vol-path { 2069 opacity: 1; 2070 transition: opacity 0.4s; 2071 } 2072 2073 media-mute-button[mediavolumelevel='off'] .vol-path { 2074 opacity: 0; 2075 } 2076 2077 media-mute-button[mediavolumelevel='low'] #vol-high-path, 2078 media-mute-button[mediavolumelevel='medium'] #vol-high-path { 2079 opacity: 0; 2080 } 2081 2082 media-volume-range { 2083 --media-range-track-background: rgba(255, 255, 255, 0.2); 2084 --media-range-thumb-opacity: 0; 2085 } 2086 2087 @keyframes volume-in { 2088 0% { 2089 visibility: hidden; 2090 opacity: 0; 2091 transform: translateY(50%) rotate(1deg); 2092 } 2093 50% { 2094 visibility: visible; 2095 opacity: 1; 2096 transform: rotate(-2deg); 2097 } 2098 100% { 2099 visibility: visible; 2100 opacity: 1; 2101 transform: translateY(0) rotate(0deg); 2102 } 2103 } 2104 2105 @keyframes volume-out { 2106 0% { 2107 visibility: visible; 2108 opacity: 1; 2109 transform: translateY(0) rotate(0deg); 2110 } 2111 50% { 2112 opacity: 1; 2113 transform: rotate(0deg); 2114 } 2115 100% { 2116 visibility: hidden; 2117 opacity: 0; 2118 transform: translateY(50%) rotate(1deg); 2119 } 2120 } 2121 2122 .media-volume-range-wrapper { 2123 opacity: 0; 2124 visibility: hidden; 2125 2126 position: absolute; 2127 top: -100%; 2128 left: calc(2 * var(--base)); 2129 2130 width: calc(10 * var(--base)); 2131 height: calc(2.5 * var(--base)); 2132 transform-origin: center left; 2133 } 2134 2135 media-volume-range { 2136 /* 2137 Hide range and animation until mediavolume attribute is set. 2138 'visibility' didn't work, hovering over media-volume-range-wrapper 2139 caused it to show. Should require mute-button:hover. 2140 */ 2141 opacity: 0; 2142 transition: opacity 0s 1s; 2143 2144 width: calc(10 * var(--base)); 2145 height: var(--base); 2146 padding: 0; 2147 border-radius: calc(0.25 * var(--base)); 2148 overflow: hidden; 2149 background: rgba(0, 0, 0, 0.2); 2150 2151 --media-range-bar-color: var(--media-accent-color); 2152 2153 --media-range-padding-left: 0; 2154 --media-range-padding-right: 0; 2155 2156 --media-range-track-width: calc(10 * var(--base)); 2157 --media-range-track-height: var(--base); 2158 --media-range-track-border-radius: calc(0.25 * var(--base)); 2159 --media-range-track-backdrop-filter: blur(10px) brightness(80%); 2160 2161 /* This makes zero volume still show some of the bar. 2162 I can't make the bar have curved corners otherwise though. */ 2163 --media-range-thumb-width: var(--base); 2164 --media-range-thumb-border-radius: calc(0.25 * var(--base)); 2165 2166 /* The Sutro design has a gradient like this, but not sure I like it */ 2167 /* --media-range-thumb-box-shadow: 10px 0px 20px rgba(255, 255, 255, 0.5); */ 2168 } 2169 2170 media-volume-range[mediavolume] { 2171 opacity: 1; 2172 } 2173 2174 [keyboardcontrol] media-volume-range:focus { 2175 /* TODO: This appears to be creating a think outline */ 2176 outline: 1px solid rgba(27, 127, 204, 0.9); 2177 } 2178 2179 media-mute-button:hover + .media-volume-range-wrapper, 2180 media-mute-button:focus + .media-volume-range-wrapper, 2181 media-mute-button:focus-within + .media-volume-range-wrapper, 2182 .media-volume-range-wrapper:hover, 2183 .media-volume-range-wrapper:focus, 2184 .media-volume-range-wrapper:focus-within { 2185 animation: 0.3s volume-in forwards ease-out; 2186 } 2187 2188 .media-volume-range-wrapper:not(:hover, :focus-within) { 2189 animation: 0.3s volume-out ease-out; 2190 } 2191 2192 /* When keyboard navigating the volume range and wrapper need to always be visible 2193 otherwise focus state can't land on it. This is ok when keyboard navigating because 2194 the hovering issues aren't a concern, unless you happen to be keyboard AND mouse navigating. 2195 */ 2196 [keyboardcontrol] .media-volume-range-wrapper, 2197 [keyboardcontrol] .media-volume-range-wrapper:focus-within, 2198 [keyboardcontrol] .media-volume-range-wrapper:focus-within media-volume-range { 2199 visibility: visible; 2200 } 2201 </style> 2202 <media-mute-button class="media-button" notooltip> 2203 <use class="svg-shadow" xlink:href="#vol-paths"></use>
2204 <svg slot="icon" viewBox="0 0 32 32"> 2205 <g id="vol-paths"> 2206 <path 2207 id="speaker-path" 2208 d="M16.5 20.486v-8.972c0-1.537-2.037-2.08-2.802-.745l-1.026 1.79a2.5 2.5 0 0 1-.8.85l-1.194.78A1.5 1.5 0 0 0 10 15.446v1.11c0 .506.255.978.678 1.255l1.194.782a2.5 2.5 0 0 1 .8.849l1.026 1.79c.765 1.334 2.802.792 2.802-.745Z" 2209 /> 2210 <path 2211 id="vol-low-path" 2212 class="vol-path" 2213 d="M18.5 18C19.6046 18 20.5 17.1046 20.5 16C20.5 14.8954 19.6046 14 18.5 14" 2214 /> 2215 <path 2216 id="vol-high-path" 2217 class="vol-path" 2218 d="M18 21C20.7614 21 23 18.7614 23 16C23 13.2386 20.7614 11 18 11" 2219 /> 2220 <path id="muted-path-1" class="muted-path" d="M23 18L19 14" /> 2221 <path id="muted-path-2" class="muted-path" d="M23 14L19 18" /> 2222 </g> 2223 </svg> 2224 </media-mute-button> 2225 <div class="media-volume-range-wrapper"> 2226 <media-volume-range></media-volume-range> 2227 </div> 2228 2229 <!-- Time Display --> 2230 <style> 2231 media-time-display { 2232 position: relative; 2233 padding: calc(0.5 * var(--base)); 2234 font-size: calc(0.7 * var(--base)); 2235 border-radius: calc(0.5 * var(--base)); 2236 } 2237 2238 media-controller[breakpointmd] media-time-display:not([showduration]) { 2239 display: none; 2240 } 2241 2242 media-controller:not([breakpointmd]) media-time-display[showduration] { 2243 display: none; 2244 } 2245 </style> 2246 <media-time-display></media-time-display> 2247 <media-time-display showduration></media-time-display> 2248 2249 <!-- Time Range / Progress Bar --> 2250 <style> 2251 media-time-range { 2252 height: calc(2 * var(--base)); 2253 border-radius: calc(0.25 * var(--base)); 2254 2255 --media-range-track-backdrop-filter: invert(10%) blur(5px) brightness(110%); 2256 --media-range-track-background: rgba(255, 255, 255, 0.2); 2257 --media-range-track-pointer-background: rgba(255, 255, 255, 0.5); 2258 --media-range-track-border-radius: calc(0.25 * var(--base)); 2259 2260 --media-time-range-buffered-color: rgba(255, 255, 255, 0.4); 2261 --media-range-bar-color: var(--media-accent-color); 2262 2263 --media-range-thumb-background: var(--media-accent-color); 2264 --media-range-thumb-transition: opacity 0.1s linear; 2265 --media-range-thumb-opacity: 0; 2266 2267 --media-preview-thumbnail-border: calc(0.125 * var(--base)) solid #fff; 2268 --media-preview-thumbnail-border-radius: calc(0.5 * var(--base)); 2269 --media-preview-thumbnail-min-width: calc(8 * var(--base)); 2270 --media-preview-thumbnail-max-width: calc(10 * var(--base)); 2271 --media-preview-thumbnail-min-height: calc(5 * var(--base)); 2272 --media-preview-thumbnail-max-height: calc(7 * var(--base)); 2273 --media-preview-box-margin: 0 0 -10px; 2274 } 2275 media-time-range:hover { 2276 --media-range-thumb-opacity: 1; 2277 --media-range-track-height: calc(0.25 * var(--base)); 2278 } 2279 2280 media-preview-thumbnail { 2281 margin-bottom: 5px; 2282 } 2283 2284 media-preview-chapter-display { 2285 font-size: calc(0.6 * var(--base)); 2286 padding-block: 0; 2287 } 2288 2289 media-preview-time-display { 2290 font-size: calc(0.65 * var(--base)); 2291 padding-top: 0; 2292 } 2293 </style> 2294 <media-time-range> 2295 <media-preview-thumbnail slot="preview"></media-preview-thumbnail> 2296 <media-preview-chapter-display slot="preview"></media-preview-chapter-display> 2297 <media-preview-time-display slot="preview"></media-preview-time-display> 2298 </media-time-range> 2299 2300 <!-- Subtitles/CC Button --> 2301 <style> 2302 media-captions-button { 2303 position: relative; 2304 } 2305 2306 media-controller:not([breakpointmd]) media-captions-button { 2307 display: none; 2308 } 2309 2310 media-captions-button svg :is(path, rect) { 2311 stroke: none; 2312 fill: var(--_primary-color); 2313 } 2314 2315 /* Disble the captions button when no subtitles are available */ 2316 media-captions-button:not([mediasubtitleslist]) svg { 2317 opacity: 0.3; 2318 } 2319 2320 media-captions-button #cc-underline { 2321 opacity: 1; 2322 } 2323 2324 media-captions-button[mediasubtitleslist][aria-checked='true'] #cc-underline { 2325 opacity: 1; 2326 } 2327 2328 media-captions-button #cc-underline { 2329 transition: clip-path 0.15s ease-out; 2330 } 2331 2332 media-captions-button #cc-underline { 2333 clip-path: inset(0 100% 0 0); 2334 } 2335 2336 media-captions-button[aria-checked='true'] #cc-underline { 2337 clip-path: inset(0 0 0 0); 2338 } 2339 </style> 2340 <media-captions-button class="media-button">
2341 <svg slot="icon" viewBox="0 0 32 32"> 2342 <use class="svg-shadow" xlink:href="#cc-icon"></use> 2343 <g id="cc-icon"> 2344 <path 2345 class="cc-c" 2346 d="M15.6634 14.3574H14.5636C14.4985 14.0523 14.3847 13.7842 14.2221 13.5532C14.0624 13.3222 13.8673 13.1283 13.6367 12.9715C13.409 12.8118 13.1562 12.692 12.8783 12.6122C12.6004 12.5323 12.3107 12.4924 12.0091 12.4924C11.4592 12.4924 10.961 12.6264 10.5146 12.8945C10.0711 13.1625 9.71776 13.5575 9.45463 14.0794C9.19445 14.6012 9.06436 15.2414 9.06436 16C9.06436 16.7586 9.19445 17.3988 9.45463 17.9206C9.71776 18.4425 10.0711 18.8375 10.5146 19.1055C10.961 19.3736 11.4592 19.5076 12.0091 19.5076C12.3107 19.5076 12.6004 19.4677 12.8783 19.3878C13.1562 19.308 13.409 19.1896 13.6367 19.0328C13.8673 18.8731 14.0624 18.6778 14.2221 18.4468C14.3847 18.2129 14.4985 17.9449 14.5636 17.6426H15.6634C15.5806 18.0903 15.4298 18.491 15.2111 18.8446C14.9923 19.1982 14.7203 19.499 14.3951 19.7471C14.0698 19.9924 13.7047 20.1792 13.2996 20.3075C12.8976 20.4358 12.4674 20.5 12.0091 20.5C11.2345 20.5 10.5456 20.3175 9.94246 19.9525C9.33932 19.5875 8.8648 19.0684 8.51888 18.3954C8.17296 17.7224 8 16.924 8 16C8 15.076 8.17296 14.2776 8.51888 13.6046C8.8648 12.9316 9.33932 12.4125 9.94246 12.0475C10.5456 11.6825 11.2345 11.5 12.0091 11.5C12.4674 11.5 12.8976 11.5642 13.2996 11.6925C13.7047 11.8208 14.0698 12.009 14.3951 12.2571C14.7203 12.5024 14.9923 12.8018 15.2111 13.1554C15.4298 13.5062 15.5806 13.9068 15.6634 14.3574Z" 2347 /> 2348 <path 2349 class="cc-c" 2350 d="M24 14.3574H22.9002C22.8351 14.0523 22.7213 13.7842 22.5587 13.5532C22.399 13.3222 22.2039 13.1283 21.9733 12.9715C21.7456 12.8118 21.4928 12.692 21.2149 12.6122C20.937 12.5323 20.6473 12.4924 20.3457 12.4924C19.7958 12.4924 19.2976 12.6264 18.8511 12.8945C18.4077 13.1625 18.0543 13.5575 17.7912 14.0794C17.531 14.6012 17.4009 15.2414 17.4009 16C17.4009 16.7586 17.531 17.3988 17.7912 17.9206C18.0543 18.4425 18.4077 18.8375 18.8511 19.1055C19.2976 19.3736 19.7958 19.5076 20.3457 19.5076C20.6473 19.5076 20.937 19.4677 21.2149 19.3878C21.4928 19.308 21.7456 19.1896 21.9733 19.0328C22.2039 18.8731 22.399 18.6778 22.5587 18.4468C22.7213 18.2129 22.8351 17.9449 22.9002 17.6426H24C23.9172 18.0903 23.7664 18.491 23.5476 18.8446C23.3289 19.1982 23.0569 19.499 22.7316 19.7471C22.4064 19.9924 22.0413 20.1792 21.6362 20.3075C21.2341 20.4358 20.804 20.5 20.3457 20.5C19.5711 20.5 18.8822 20.3175 18.279 19.9525C17.6759 19.5875 17.2014 19.0684 16.8555 18.3954C16.5095 17.7224 16.3366 16.924 16.3366 16C16.3366 15.076 16.5095 14.2776 16.8555 13.6046C17.2014 12.9316 17.6759 12.4125 18.279 12.0475C18.8822 11.6825 19.5711 11.5 20.3457 11.5C20.804 11.5 21.2341 11.5642 21.6362 11.6925C22.0413 11.8208 22.4064 12.009 22.7316 12.2571C23.0569 12.5024 23.3289 12.8018 23.5476 13.1554C23.7664 13.5062 23.9172 13.9068 24 14.3574Z" 2351 /> 2352 <rect id="cc-underline" x="8" y="23" width="16" height="1" rx="0.5" /> 2353 </g> 2354 </svg> 2355 </media-captions-button> 2356 2357 <!-- Settings Menu Button --> 2358 <style> 2359 media-settings-menu-button svg { 2360 transition: transform 0.1s cubic-bezier(0.4, 0, 1, 1); 2361 transform: rotateZ(0deg); 2362 } 2363 media-settings-menu-button[aria-expanded='true'] svg { 2364 transform: rotateZ(30deg); 2365 } 2366 </style> 2367 <media-settings-menu-button class="media-button"> 2368 <svg slot="icon" viewBox="0 0 32 32"> 2369 <use class="svg-shadow" xlink:href="#settings-icon"></use> 2370 <g id="settings-icon"> 2371 <path 2372 d="M16 18C17.1046 18 18 17.1046 18 16C18 14.8954 17.1046 14 16 14C14.8954 14 14 14.8954 14 16C14 17.1046 14.8954 18 16 18Z" 2373 /> 2374 <path 2375 d="M21.0176 13.0362L20.9715 12.9531C20.8445 12.7239 20.7797 12.4629 20.784 12.1982L20.8049 10.8997C20.8092 10.6343 20.675 10.3874 20.4545 10.2549L18.5385 9.10362C18.3186 8.97143 18.0472 8.9738 17.8293 9.10981L16.7658 9.77382C16.5485 9.90953 16.2999 9.98121 16.0465 9.98121H15.9543C15.7004 9.98121 15.4513 9.90922 15.2336 9.77295L14.1652 9.10413C13.9467 8.96728 13.674 8.96518 13.4535 9.09864L11.5436 10.2545C11.3242 10.3873 11.1908 10.6336 11.1951 10.8981L11.216 12.1982C11.2203 12.4629 11.1555 12.7239 11.0285 12.9531L10.9831 13.0351C10.856 13.2645 10.6715 13.4535 10.4493 13.5819L9.36075 14.2109C9.13763 14.3398 8.99942 14.5851 9 14.8511L9.00501 17.152C9.00559 17.4163 9.1432 17.6597 9.36476 17.7883L10.4481 18.4167C10.671 18.546 10.8559 18.7364 10.9826 18.9673L11.0313 19.0559C11.1565 19.284 11.2203 19.5431 11.2161 19.8059L11.1951 21.1003C11.1908 21.3657 11.325 21.6126 11.5456 21.7452L13.4615 22.8964C13.6814 23.0286 13.9528 23.0262 14.1707 22.8902L15.2342 22.2262C15.4515 22.0905 15.7001 22.0188 15.9535 22.0188H16.0457C16.2996 22.0188 16.5487 22.0908 16.7664 22.227L17.8348 22.8959C18.0534 23.0327 18.326 23.0348 18.5465 22.9014L20.4564 21.7455C20.6758 21.6127 20.8092 21.3664 20.8049 21.1019L20.784 19.8018C20.7797 19.5371 20.8445 19.2761 20.9715 19.0469L21.0169 18.9649C21.144 18.7355 21.3285 18.5465 21.5507 18.4181L22.6393 17.7891C22.8624 17.6602 23.0006 17.4149 23 17.1489L22.995 14.848C22.9944 14.5837 22.8568 14.3403 22.6352 14.2117L21.5493 13.5818C21.328 13.4534 21.1442 13.2649 21.0176 13.0362Z" 2376 /> 2377 </g> 2378 </svg> 2379 </media-settings-menu-button> 2380 2381 <!-- PIP/Mini Player Button --> 2382 <style> 2383 media-controller:not([breakpointmd]) media-pip-button { 2384 display: none; 2385 } 2386 </style> 2387 <media-pip-button class="media-button">
2388 <svg slot="icon" viewBox="0 0 32 32"> 2389 <use class="svg-shadow" xlink:href="#pip-icon"></use> 2390 <g id="pip-icon"> 2391 <path 2392 d="M12 22H9.77778C9.34822 22 9 21.6162 9 21.1429V10.8571C9 10.3838 9.34822 10 9.77778 10L22.2222 10C22.6518 10 23 10.3838 23 10.8571V12.5714" 2393 /> 2394 <path 2395 d="M15 21.5714V16.4286C15 16.1919 15.199 16 15.4444 16H22.5556C22.801 16 23 16.1919 23 16.4286V17V21.5714C23 21.8081 22.801 22 22.5556 22H20.3333H17.6667H15.4444C15.199 22 15 21.8081 15 21.5714Z" 2396 /> 2397 </g> 2398 </svg> 2399 </media-pip-button> 2400 2401 <!-- Airplay Button --> 2402 <media-airplay-button class="media-button"> 2403 <svg viewBox="0 0 32 32" aria-hidden="true" slot="icon"> 2404 <path stroke-linecap="round" stroke-linejoin="round" d="M20.5 20h1.722c.43 0 .778-.32.778-.714v-8.572c0-.394-.348-.714-.778-.714H9.778c-.43 0-.778.32-.778.714v1.429"/> 2405 <path stroke-linecap="round" stroke-linejoin="round" d="M11.5 20H9.778c-.43 0-.778-.32-.778-.714v-8.572c0-.394.348-.714.778-.714h12.444c.43 0 .778.32.778.714v1.429"/> 2406 <path stroke-linejoin="round" d="m16 19 3.464 3.75h-6.928L16 19Z"/> 2407 </svg> 2408 </media-airplay-button> 2409 2410 <!-- Cast Button --> 2411 <media-cast-button class="media-button"> 2412 <svg slot="icon" viewBox="0 0 32 32"> 2413 <use class="svg-shadow" xlink:href="#cast-icon"></use> 2414 <g id="cast-icon"> 2415 <path 2416 d="M18.5 21.833h4.167c.46 0 .833-.373.833-.833V11a.833.833 0 0 0-.833-.833H9.333A.833.833 0 0 0 8.5 11v1.111m0 8.056c.92 0 1.667.746 1.667 1.666M8.5 17.667a4.167 4.167 0 0 1 4.167 4.166" 2417 /> 2418 <path d="M8.5 15.167a6.667 6.667 0 0 1 6.667 6.666" /> 2419 </g> 2420 </svg> 2421 </media-cast-button> 2422 2423 <!-- Fullscreen Button --> 2424 <style> 2425 /* Having trouble getting @property to work in the shadow dom 2426 to clean this up. Like https://codepen.io/luwes/pen/oNRyZyx */ 2427 2428 media-fullscreen-button .fs-arrow { 2429 translate: 0% 0%; 2430 } 2431 media-fullscreen-button:hover .fs-arrow { 2432 animation: 0.35s up-left-bounce cubic-bezier(0.34, 1.56, 0.64, 1); 2433 } 2434 media-fullscreen-button:hover #fs-enter-top, 2435 media-fullscreen-button:hover #fs-exit-bottom { 2436 animation-name: up-right-bounce; 2437 } 2438 2439 media-fullscreen-button:hover #fs-enter-bottom, 2440 media-fullscreen-button:hover #fs-exit-top { 2441 animation-name: down-left-bounce; 2442 } 2443 2444 @keyframes up-left-bounce { 2445 0% { 2446 translate: 0 0; 2447 } 2448 50% { 2449 translate: -4% -4%; 2450 } 2451 } 2452 @keyframes up-right-bounce { 2453 0% { 2454 translate: 0 0; 2455 } 2456 50% { 2457 translate: 4% -4%; 2458 } 2459 } 2460 @keyframes down-left-bounce { 2461 0% { 2462 translate: 0 0; 2463 } 2464 50% { 2465 translate: -4% 4%; 2466 } 2467 } 2468 @keyframes down-right-bounce { 2469 0% { 2470 translate: 0 0; 2471 } 2472 50% { 2473 translate: 4% 4%; 2474 } 2475 } 2476 </style> 2477 <media-fullscreen-button class="media-button"> 2478 <svg slot="enter" viewBox="0 0 32 32"> 2479 <use class="svg-shadow" xlink:href="#fs-enter-paths"></use> 2480 <g id="fs-enter-paths"> 2481 <g id="fs-enter-top" class="fs-arrow"> 2482 <path d="M18 10H22V14" /> 2483 <path d="M22 10L18 14" /> 2484 </g> 2485 <g id="fs-enter-bottom" class="fs-arrow"> 2486 <path d="M14 22L10 22V18" /> 2487 <path d="M10 22L14 18" /> 2488 </g> 2489 </g> 2490 </svg> 2491 <svg slot="exit" viewBox="0 0 32 32"> 2492 <use class="svg-shadow" xlink:href="#fs-exit-paths"></use> 2493 <g id="fs-exit-paths"> 2494 <g id="fs-exit-top" class="fs-arrow"> 2495 <path d="M22 14H18V10" /> 2496 <path d="M22 10L18 14" /> 2497 </g> 2498 <g id="fs-exit-bottom" class="fs-arrow"> 2499 <path d="M10 18L14 18V22" /> 2500 <path d="M14 18L10 22" /> 2501 </g> 2502 </g> 2503 </svg> 2504 </media-fullscreen-button>
2504 2505 </media-control-bar> 2506 </media-controller> 2507 2508 `);class nf extends rm{static template=nE}K.customElements&&!K.customElements.get("media-theme-sutro")&&K.customElements.define("media-theme-sutro",nf);var ny=i(12115),n_=Object.create,nk=Object.defineProperty,nA=Object.getOwnPropertyDescriptor,nw=Object.getOwnPropertyNames,nT=Object.getPrototypeOf,nI=Object.prototype.hasOwnProperty,nS=function(e,t){return function(){return e&&(t=e(e=0)),t}},nC=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},nM=function(e,t,i,a){if(t&&"object"==typeof t||"function"==typeof t)for(var r,n=nw(t),s=0,o=n.length;s<o;s++)r=n[s],nI.call(e,r)||r===i||nk(e,r,{get:(function(e){return t[e]}).bind(null,r),enumerable:!(a=nA(t,r))||a.enumerable});return e},nL=function(e,t,i){return i=null!=e?n_(nT(e)):{},nM(!t&&e&&e.__esModule?i:nk(i,"default",{value:e,enumerable:!0}),e)},nR=nC(function(e,t){t.exports="u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}});function nx(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):nx(e,t)}var nD=nS(function(){nD()});function nP(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var nN=nS(function(){}),nO=nC(function(e,t){var i=Array.prototype.slice;t.exports=function(e,t){for(("length"in e)||(e=[e]),e=i.call(e);e.length;){var a=e.shift(),r=t(a);if(r)return r;a.childNodes&&a.childNodes.length&&(e=i.call(a.childNodes).concat(e))}}}),nU=nC(function(e,t){function i(e,t){if(!nx(this,i))return new i(e,t);this.data=e,this.nodeValue=e,this.length=e.length,this.ownerDocument=t||null}nD(),t.exports=i,i.prototype.nodeType=8,i.prototype.nodeName="#comment",i.prototype.toString=function(){return"[object Comment]"}}),nH=nC(function(e,t){function i(e,t){if(!nx(this,i))return new i(e);this.data=e||"",this.length=this.data.length,this.ownerDocument=t||null}nD(),t.exports=i,i.prototype.type="DOMTextNode",i.prototype.nodeType=3,i.prototype.nodeName="#text",i.prototype.toString=function(){return this.data},i.prototype.replaceData=function(e,t,i){var a=this.data,r=a.substring(0,e),n=a.substring(e+t,a.length);this.data=r+i+n,this.length=this.data.length}}),nW=nC(function(e,t){t.exports=function(e){var t=this,i=e.type;e.target||(e.target=t),t.listeners||(t.listeners={});var a=t.listeners[i];if(a)return a.forEach(function(i){e.currentTarget=t,"function"==typeof i?i(e):i.handleEvent(e)});t.parentNode&&t.parentNode.dispatchEvent(e)}}),nB=nC(function(e,t){t.exports=function(e,t){this.listeners||(this.listeners={}),this.listeners[e]||(this.listeners[e]=[]),-1===this.listeners[e].indexOf(t)&&this.listeners[e].push(t)}}),n$=nC(function(e,t){t.exports=function(e,t){if(this.listeners&&this.listeners[e]){var i=this.listeners[e],a=i.indexOf(t);-1!==a&&i.splice(a,1)}}}),nV=nC(function(e,t){nN(),t.exports=function e(t){switch(t.nodeType){case 3:return r(t.data);case 8:return"\x3c!--"+t.data+"--\x3e";default:var n,s,o;return s=[],o=(n=t).tagName,"http://www.w3.org/1999/xhtml"===n.namespaceURI&&(o=o.toLowerCase()),s.push("<"+o+function(e){var t=[];for(var i in e)(function(e,t){var i=nP(e[t]);return"style"===t&&Object.keys(e.style).length>0||e.hasOwnProperty(t)&&("string"===i||"boolean"===i||"number"===i)&&"nodeName"!==t&&"className"!==t&&"tagName"!==t&&"textContent"!==t&&"innerText"!==t&&"namespaceURI"!==t&&"innerHTML"!==t})(e,i)&&t.push({name:i,value:e[i]});for(var r in e._attributes)for(var n in e._attributes[r]){var s=e._attributes[r][n],o=(s.prefix?s.prefix+":":"")+n;t.push({name:o,value:s.value})}return e.className&&t.push({name:"class",value:e.className}),t.length?a(t):""}(n)+function(e){var t=e.dataset,i=[];for(var r in t)i.push({name:"data-"+r,value:t[r]});return i.length?a(i):""}(n)),i.indexOf(o)>-1?s.push(" />"):(s.push(">"),n.childNodes.length?s.push.apply(s,n.childNodes.map(e)):n.textContent||n.innerText?s.push(r(n.textContent||n.innerText)):n.innerHTML&&s.push(n.innerHTML),s.push("</"+o+">")),s.join("")}};var i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function a(e){var t=[];return e.forEach(function(e){var i=e.name,a=e.value;"style"===i&&(a=function(e){if("string"==typeof e)return e;var t="";return Object.keys(e).forEach(function(i){var a=e[i];i=i.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}),t+=i+":"+a+";"}),t}(a)),t.push(i+'="'+r(a).replace(/"/g,""")+'"')}),t.length?" "+t.join(" "):""}function r(e){var t="";return"string"==typeof e?t=e:e&&(t=e.toString()),t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}}),nq=nC(function(e,t){nD();var i=nO(),a=nW(),r=nB(),n=n$(),s=nV(),o="http://www.w3.org/1999/xhtml";function l(e,t,i){if(!nx(this,l))return new l(e);var a=void 0===i?o:i||null;this.tagName=a===o?String(e).toUpperCase():e,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=t||null,this.namespaceURI=a,this._attributes={}
2508,"INPUT"===this.tagName&&(this.type="text")}t.exports=l,l.prototype.type="DOMElement",l.prototype.nodeType=1,l.prototype.appendChild=function(e){return e.parentNode&&e.parentNode.removeChild(e),this.childNodes.push(e),e.parentNode=this,e},l.prototype.replaceChild=function(e,t){e.parentNode&&e.parentNode.removeChild(e);var i=this.childNodes.indexOf(t);return t.parentNode=null,this.childNodes[i]=e,e.parentNode=this,t},l.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);return this.childNodes.splice(t,1),e.parentNode=null,e},l.prototype.insertBefore=function(e,t){e.parentNode&&e.parentNode.removeChild(e);var i=null==t?-1:this.childNodes.indexOf(t);return i>-1?this.childNodes.splice(i,0,e):this.childNodes.push(e),e.parentNode=this,e},l.prototype.setAttributeNS=function(e,t,i){var a=null,r=t,n=t.indexOf(":");(n>-1&&(a=t.substr(0,n),r=t.substr(n+1)),"INPUT"===this.tagName&&"type"===t)?this.type=i:(this._attributes[e]||(this._attributes[e]={}))[r]={value:i,prefix:a}},l.prototype.getAttributeNS=function(e,t){var i=this._attributes[e],a=i&&i[t]&&i[t].value;return"INPUT"===this.tagName&&"type"===t?this.type:"string"!=typeof a?null:a},l.prototype.removeAttributeNS=function(e,t){var i=this._attributes[e];i&&delete i[t]},l.prototype.hasAttributeNS=function(e,t){var i=this._attributes[e];return!!i&&t in i},l.prototype.setAttribute=function(e,t){return this.setAttributeNS(null,e,t)},l.prototype.getAttribute=function(e){return this.getAttributeNS(null,e)},l.prototype.removeAttribute=function(e){return this.removeAttributeNS(null,e)},l.prototype.hasAttribute=function(e){return this.hasAttributeNS(null,e)},l.prototype.removeEventListener=n,l.prototype.addEventListener=r,l.prototype.dispatchEvent=a,l.prototype.focus=function(){},l.prototype.toString=function(){return s(this)},l.prototype.getElementsByClassName=function(e){var t=e.split(" "),a=[];return i(this,function(e){if(1===e.nodeType){var i=(e.className||"").split(" ");t.every(function(e){return -1!==i.indexOf(e)})&&a.push(e)}}),a},l.prototype.getElementsByTagName=function(e){e=e.toLowerCase();var t=[];return i(this.childNodes,function(i){1===i.nodeType&&("*"===e||i.tagName.toLowerCase()===e)&&t.push(i)}),t},l.prototype.contains=function(e){return i(this,function(t){return e===t})||!1}}),nF=nC(function(e,t){nD();var i=nq();function a(e){if(!nx(this,a))return new a;this.childNodes=[],this.parentNode=null,this.ownerDocument=e||null}t.exports=a,a.prototype.type="DocumentFragment",a.prototype.nodeType=11,a.prototype.nodeName="#document-fragment",a.prototype.appendChild=i.prototype.appendChild,a.prototype.replaceChild=i.prototype.replaceChild,a.prototype.removeChild=i.prototype.removeChild,a.prototype.toString=function(){return this.childNodes.map(function(e){return String(e)}).join("")}}),nG=nC(function(e,t){function i(e){}t.exports=i,i.prototype.initEvent=function(e,t,i){this.type=e,this.bubbles=t,this.cancelable=i},i.prototype.preventDefault=function(){}}),nK=nC(function(e,t){nD();var i=nO(),a=nU(),r=nH(),n=nq(),s=nF(),o=nG(),l=nW(),d=nB(),u=n$();function c(){if(!nx(this,c))return new c;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}t.exports=c;var h=c.prototype;h.createTextNode=function(e){return new r(e,this)},h.createElementNS=function(e,t){return new n(t,this,null===e?null:String(e))},h.createElement=function(e){return new n(e,this)},h.createDocumentFragment=function(){return new s(this)},h.createEvent=function(e){return new o(e)},h.createComment=function(e){return new a(e,this)},h.getElementById=function(e){return e=String(e),i(this.childNodes,function(t){if(String(t.id)===e)return t})||null},h.getElementsByClassName=n.prototype.getElementsByClassName,h.getElementsByTagName=n.prototype.getElementsByTagName,h.contains=n.prototype.contains,h.removeEventListener=u,h.addEventListener=d,h.dispatchEvent=l}),nj=nC(function(e,t){t.exports=new(nK())}),nY=nC(function(e,t){var i,a="u">typeof global?global:"u">typeof window?window:{},r=nj();"u">typeof document?i=document:(i=a["__GLOBAL_DOCUMENT_CACHE@4"])||(i=a["__GLOBAL_DOCUMENT_CACHE@4"]=r),t.exp
2508orts=i});function nQ(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,a=Array(t);i<t;i++)a[i]=e[i];return a}function nz(e,t){if(e){if("string"==typeof e)return nQ(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if("Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return nQ(e,t)}}function nZ(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a,r,n=[],s=!0,o=!1;try{for(i=i.call(e);!(s=(a=i.next()).done)&&(n.push(a.value),!(t&&n.length===t));s=!0);}catch(e){o=!0,r=e}finally{try{s||null==i.return||i.return()}finally{if(o)throw r}}return n}}(e,t)||nz(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var nX=nL(nR()),nJ=nL(nR()),n0=nL(nR()),n1=function(){var e=n0.default.performance,t=e&&e.timing,i=t&&t.navigationStart;return Math.round("number"==typeof i&&"function"==typeof e.now?i+e.now():Date.now())},n2=function(){if("function"==typeof(null==(e=nJ.default.crypto)?void 0:e.getRandomValues)){i=new Uint8Array(32),nJ.default.crypto.getRandomValues(i);for(var e,t,i,a=0;a<32;a++)i[a]=i[a]%16}else{i=[];for(var r=0;r<32;r++)i[r]=16*Math.random()|0}var n=0;t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t="x"===e?i[n]:3&i[n]|8;return n++,t.toString(16)});var s=n1(),o=null==s?void 0:s.toString(16).substring(3);return o?t.substring(0,28)+o:t},n3=function(){return("000000"+(0x81bf1000*Math.random()|0).toString(36)).slice(-6)},n4=function(e){var t;if(e&&void 0!==e.nodeName)return e.muxId||(e.muxId=n3()),e.muxId;try{t=document.querySelector(e)}catch(e){}return t&&!t.muxId&&(t.muxId=e),(null==t?void 0:t.muxId)||e},n5=function(e){e&&void 0!==e.nodeName?e=n4(t=e):t=document.querySelector(e);var t,i=t&&t.nodeName?t.nodeName.toLowerCase():"";return[t,e,i]};function n9(e){return function(e){if(Array.isArray(e))return nQ(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||nz(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var n8=function(e){var t,i,a,r,n,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,o=e?[console,e]:[console],l=(t=console.trace).bind.apply(t,n9(o)),d=(i=console.info).bind.apply(i,n9(o)),u=(a=console.debug).bind.apply(a,n9(o)),c=(r=console.warn).bind.apply(r,n9(o)),h=(n=console.error).bind.apply(n,n9(o)),m=s;return{trace:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>0))return l.apply(void 0,n9(t))},debug:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>1))return u.apply(void 0,n9(t))},info:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>2))return d.apply(void 0,n9(t))},warn:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>3))return c.apply(void 0,n9(t))},error:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(m>4))return h.apply(void 0,n9(t))},get level(){return m},set level(p){p!==this.level&&(m=null!=p?p:s)}}}("[mux]"),n7=nL(nR());function n6(){return"1"===(n7.default.doNotTrack||n7.default.navigator&&n7.default.navigator.doNotTrack)}function se(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function st(e,t){if(!nx(e,t))throw TypeError("Cannot call a class as a function")}function si(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function sa(e,t,i){return t&&si(e.prototype,t),i&&si(e,i),e}function sr(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}
2508function sn(e){return(sn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ss(e,t,i){return(ss="u">typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var a=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=sn(e)););return e}(e,t);if(a){var r=Object.getOwnPropertyDescriptor(a,t);return r.get?r.get.call(i||e):r.value}})(e,t,i||e)}function so(e,t){return(so=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}nD(),nN();var sl=function(e){return sd(e)[0]},sd=function(e){if("string"!=typeof e||""===e)return["localhost"];var t,i=(e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/)||[])[4];return i&&(t=(i.match(/[^\.]+\.[^\.]+$/)||[])[0]),[i,t]},su=nL(nR()),sc=function(){var e=su.default.performance;return void 0!==(e&&e.timing)},sh=function(){var e=su.default.performance,t=e&&e.timing;return t&&t.domContentLoadedEventEnd},sm=function(){var e=su.default.performance,t=e&&e.timing;return t&&t.navigationStart};function sp(e,t,i){i=void 0===i?1:i,e[t]=e[t]||0,e[t]+=i}function sv(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},a=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),a.forEach(function(t){sr(e,t,i[t])})}return e}function sb(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t.push.apply(t,i)}return t})(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))}),e}var sg=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],sE=["x-cdn","content-type"].concat(sg);function sf(e){var t={};return(e=e||"").trim().split(/[\r\n]+/).forEach(function(e){if(e){var i=e.split(": "),a=i.shift();a&&(sE.indexOf(a.toLowerCase())>=0||0===a.toLowerCase().indexOf("x-litix-"))&&(t[a]=i.join(": "))}}),t}function sy(e){if(e){var t=sg.find(function(t){return void 0!==e[t]});return t?e[t]:void 0}}var s_=function(e){var t={};for(var i in e){var a=e[i];-1!==a["DATA-ID"].search("io.litix.data.")&&(t[a["DATA-ID"].replace("io.litix.data.","")]=a.VALUE)}return t},sk=function(e){if(!e)return{};var t=sm(),i=e.loading,a=i?i.start:e.trequest,r=i?i.first:e.tfirst,n=i?i.end:e.tload;return{bytesLoaded:e.total,requestStart:Math.round(t+a),responseStart:Math.round(t+r),responseEnd:Math.round(t+n)}},sA=function(e){if(!(!e||"function"!=typeof e.getAllResponseHeaders))return sf(e.getAllResponseHeaders())},sw=function(e,t,i){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var a=arguments.length>4?arguments[4]:void 0,r=e.log,n=e.utils.secondsToMs,s=function(e){var t,i=parseInt(a.version);return 1===i&&null!==e.programDateTime&&(t=e.programDateTime),0===i&&null!==e.pdt&&(t=e.pdt),t};if(!sc())return void r.warn("performance timing not supported. Not tracking HLS.js.");var o=function(i,a){return e.emit(t,i,a)},l=function(e,t){var i=t.levels,a=t.audioTracks,r=t.url,n=t.stats,s=t.networkDetails,l=t.sessionData,d={},u={};i.forEach(function(e,t){d[t]={width:e.width,height:e.height,bitrate:e.bitrate,attrs:e.attrs}}),a.forEach(function(e,t){u[t]={name:e.name,language:e.lang,bitrate:e.bitrate}});var c=sk(n),h=c.bytesLoaded,m=c.requestStart,v=c.responseStart,b=c.responseEnd;o("requestcompleted",sb(sv({},s_(l)),{request_event_type:e,request_bytes_loaded:h,request_start:m,request_response_start:v,request_response_end:b,request_type:"manifest",request_hostname:sl(r),request_response_headers:sA(s),request_rendition_lists:{media:d,audio:u,video:{}}}))};i.on(a.Events.MANIFEST_LOADED,l);var d=function(e,t){var i=t.details,a=t.level,r=t.networkDetails,l=sk(t.stats),d=l.bytesLoaded,u=l.requestStart,c=l.responseStart,h=l.responseEnd,m=i.fragments[i.fragments.length-1],v=s(m)+n(m.duration);o("requestcompleted",{request_event_type:e,request_bytes_loaded:d,request_start:u,request_response_start:c,request_response_end:h,request_current_level:a,request_type:"manifest",request_hostname:sl(i.url),request_response_headers:sA(r),video_holdback:i.holdBack&&n(i.holdBack),video_part_holdback:i.partHoldBack&&n(i.partHoldBack),video_part_target_duration:i.partTarget&&n(i.partTarget),video_target_duration:i.targetduration&&n(i.targetduration),video_source_is_live:i.live,player_manifest_newest_program_time:isNaN(v)?void 0:v})};i.on(a.Events.LEVEL_LOADED,d);var u=function(e,t){var i=t.details,a=t.networkDetails,r=sk(t.stats);o("requestcompleted",{request_event_type:e,request_bytes_loaded:r.bytesLoaded,request_start:r.requestStart,request_response_start:r.responseStart,request_response_end:r.responseEnd,request_type:"manifest",request_hostname:sl(i.url),request_response_headers:sA(a)})};i.on(a.Events.AUDIO_TRACK_LOADED,u);var c=function(e,t){var a=t.stats,r=t.networkDetails,n=t.frag,s=sk(a=a||n.stats),l=s.bytesLoaded,d=s.requestStart,u=s.responseStart,c=s.responseEnd,h=r?sA(r):void 0,m={request_event_type:e,request_bytes_loaded:l,request_start:d,request_response_start:u,request_response_end:c,request_hostname:r?sl(r.responseURL):void 0,request_id:h?sy(h):void 0,request_response_headers:h,request_media_duration:n.duration,request_url:null==r?void 0:r.responseURL};"main"===n.type?(m.request_type="media",m.request_current_level=n.level,m.request_video_width=(i.levels[n.level]||{}).width,m.request_video_height=(i.levels[n.level]||{}).height,m.request_labeled_bitrate=(i.levels[n.level]||{}).bitrate):m.request_type=n.type,o("requestcompleted",m)};i.on(a.Events.FRAG_LOADED,c);var h=function(e,t){var i=t.frag,a=i.start;o("fragmentchange",{currentFragmentPDT:s(i),currentFragmentStart:n(a)})};i.on(a.Events.FRAG_CHANGED,h);var m=function(e,t){var i,r=t.type,n=t.details,s=t.response,l=t.fatal,d=t.frag,u=t.networkDetails,c=(null==d?void 0:d.url)||t.url||"",h=u?sA(u):void 0;(n===a.ErrorDetails.MANIFEST_LOAD_ERROR||n===a.ErrorDetails.MANIFEST_LOAD_TIMEOUT||n===a.ErrorDetails.FRAG_LOAD_ERROR||n===a.ErrorDetails.FRAG_LOAD_TIMEOUT||n===a.ErrorDetails.LEVEL_LOAD_ERROR||n===a.ErrorDetails.LEVEL_LOAD_TIMEOUT||n===a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||n===a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT||n===a.ErrorDetails.SUBTITLE_LOAD_ERROR||n===a.ErrorDetails.SUBTITLE_LOAD_TIMEOUT||n===a.ErrorDetails.KEY_LOAD_ERROR||n===a.ErrorDetails.KEY_LOAD_TIMEOUT)&&o("requestfailed",{request_error:n,request_url:c,request_hostname:sl(c),request_id:h?sy(h):void 0,request_type:n===a.ErrorDetails.FRAG_LOAD_ERROR||n===a.ErrorDetails.FRAG_LOAD_TIMEOUT?"media":n===a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||n===a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT?"audio":n===a.ErrorDetails.SUBTITLE_LOAD_ERROR||n===a.ErrorDetails.SUBTITLE_LOAD_TIMEOUT?"subtitle":n===a.ErrorDetails.KEY_LOAD_ERROR||n===a.ErrorDetails.KEY_LOAD_TIMEOUT?"encryption":"manifest",request_error_code:null==s?void 0:s.code,request_error_text:null==s?void 0:s.text}),l&&o("error",{player_error_code:r,player_error_message:n,player_error_context:"".concat(c?"url: ".concat(c,"\n"):"")+"".concat(s&&(s.code||s.text)?"response: ".concat(s.code,", ").concat(s.text,"\n"):"")+"".concat(t.reason?"failure reason: ".concat(t.reason,"\n"):"")+"".concat(t.level?"level: ".concat(t.level,"\n"):"")+"".concat(t.parent?"parent stream controller: ".concat(t.parent,"\n"):"")+"".concat(t.buffer?"buffer length: ".concat(t.buffer,"\n"):"")+"".concat(t.error?"error: ".concat(t.error,"\n"):"")+"".concat(t.event?"event: ".concat(t.event,"\n"):"")+"".concat(t.err?"error message: ".concat(null==(i=t.err)?void 0:i.message,"\n"):"")})};i.on(a.Events.ERROR,m);var v=function(e,t){var i=t.frag,a=i&&i._url||"";o("requestcanceled",{request_event_type:e,request_url:a,request_type:"media",request_hostname:sl(a)})};i.on(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,v);var b=function(e,t){var a=t.level,n=i.levels[a];if(n&&n.attrs&&n.attrs.BANDWIDTH){var s,l=n.attrs.BANDWIDTH,d=parseFloat(n.attrs["FRAME-RATE"]);isNaN(d)||(s=d),l?o("renditionchange",{video_source_fps:s,video_source_bitrate:l,video_source_width:n.width,video_source_height:n.height,video_source_rendition_name:n.name,video_source_codec:null==n?void 0:n.videoCodec}):r.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js")}};i.on(a.Events.LEVEL_SWITCHED,b),i._stopMuxMonitor=function(){i.off(a.Events.MANIFEST_LOADED,l),i.off(a.Events.LEVEL_LOADED,d),i.off(a.Events.AUDIO_TRACK_LOADED,u),i.off(a.Events.FRAG_LOADED,c),i.off(a.Events.FRAG_CHANGED,h),i.off(a.Events.ERROR,m),i.off(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,v),i.off(a.Events.LEVEL_SWITCHED,b),i.off(a.Events.DESTROYING,i._stopMuxMonitor),delete i._stopMuxMonitor},i.on(a.Events.DESTROYING,i._stopMuxMonitor)},sT=function(e){e&&"function"==typeof e._stopMuxMonitor&&e._stopMuxMonitor()},sI=function(e,t){if(!e||!e.requestEndDate)return{};var i,a=sl(e.url),r=e.url,n=e.bytesLoaded,s=new Date(e.requestStartDate).getTime(),o=new Date(e.firstByteDate).getTime(),l=new Date(e.requestEndDate).getTime(),d=isNaN(e.duration)?0:e.duration,u="function"==typeof t.getMetricsFor?t.getMetricsFor(e.mediaType).HttpList:t.getDashMetrics().getHttpRequests(e.mediaType);u.length>0&&(i=sf(u[u.length-1]._responseHeaders||""));var c=i?sy(i):void 0;return{requestStart:s,requestResponseStart:o,requestResponseEnd:l,requestBytesLoaded:n,requestResponseHeaders:i,requestMediaDuration:d,requestHostname:a,requestUrl:r,requestId:c}},sS=function(e,t){if("function"==typeof t.getCurrentRepresentationForType){var i=t.getCurrentRepresentationForType(e);return i?{currentLevel:i.absoluteIndex,renditionWidth:i.width||null,renditionHeight:i.height||null,renditionBitrate:i.bandwidth}:{}}var a=t.getQualityFor(e),r=t.getCurrentTrackFor(e).bitrateList;return r?{currentLevel:a,renditionWidth:r[a].width||null,renditionHeight:r[a].height||null,renditionBitrate:r[a].bandwidth}:{}},sC=function(e){var t;return null==(t=e.match(/.*codecs\*?="(.*)"/))?void 0:t[1]},sM=function(e){try{var t,i;return null==(i=e.getVersion)||null==(t=i.call(e))?void 0:t.split(".").map(function(e){return parseInt(e)})[0]}catch(e){return!1}},sL=function(e,t,i){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var a=e.log;if(!i||!i.on)return void a.warn("Invalid dash.js player reference. Monitoring blocked.");var r=sM(i),n=function(i,a){return e.emit(t,i,a)},s=function(e){var t=e.type,i=(e.data||{}).url;n("requestcompleted",{request_event_type:t,request_start:0,request_response_start:0,request_response_end:0,request_bytes_loaded:-1,request_type:"manifest",request_hostname:sl(i),request_url:i})};i.on("manifestLoaded",s);var o={},l=function(e){if("function"!=typeof e.getRequests)return null;var t=e.getRequests({state:"executed"});return 0===t.length?null:t[t.length-1]},d=function(e){var t=e.type,a=e.chunk,r=e.request,s=(a||{}).mediaInfo||{},l=s.type,d=s.bitrateList,u={};
2508(d=d||[]).forEach(function(e,t){u[t]={},u[t].width=e.width,u[t].height=e.height,u[t].bitrate=e.bandwidth,u[t].attrs={}}),"video"===l?o.video=u:"audio"===l?o.audio=u:o.media=u;var c=sI(r,i),h=c.requestStart,m=c.requestResponseStart,v=c.requestResponseEnd,b=c.requestResponseHeaders,g=c.requestMediaDuration,E=c.requestHostname,f=c.requestUrl;n("requestcompleted",{request_event_type:t,request_start:h,request_response_start:m,request_response_end:v,request_bytes_loaded:-1,request_type:l+"_init",request_response_headers:b,request_hostname:E,request_id:c.requestId,request_url:f,request_media_duration:g,request_rendition_lists:o})};r>=4?i.on("initFragmentLoaded",d):i.on("initFragmentLoaded",function(e){var t=e.type,i=e.fragmentModel,a=e.chunk;d({type:t,request:l(i),chunk:a})});var u=function(e){var t=e.type,a=e.chunk,r=e.request,s=a||{},o=s.mediaInfo,l=s.start,d=(o||{}).type,u=sI(r,i),c=u.requestStart,h=u.requestResponseStart,m=u.requestResponseEnd,v=u.requestBytesLoaded,b=u.requestResponseHeaders,g=u.requestMediaDuration,E=u.requestHostname,f=u.requestUrl,y=u.requestId,_=sS(d,i),k=_.currentLevel,A=_.renditionWidth,w=_.renditionHeight;n("requestcompleted",{request_event_type:t,request_start:c,request_response_start:h,request_response_end:m,request_bytes_loaded:v,request_type:d,request_response_headers:b,request_hostname:E,request_id:y,request_url:f,request_media_start_time:l,request_media_duration:g,request_current_level:k,request_labeled_bitrate:_.renditionBitrate,request_video_width:A,request_video_height:w})};r>=4?i.on("mediaFragmentLoaded",u):i.on("mediaFragmentLoaded",function(e){var t=e.type,i=e.fragmentModel,a=e.chunk;u({type:t,request:l(i),chunk:a})});var c={video:void 0,audio:void 0,totalBitrate:void 0},h=function(){if(c.video&&"number"==typeof c.video.bitrate){if(!(c.video.width&&c.video.height))return void a.warn("have bitrate info for video but missing width/height");var e=c.video.bitrate;if(c.audio&&"number"==typeof c.audio.bitrate&&(e+=c.audio.bitrate),e!==c.totalBitrate)return c.totalBitrate=e,{video_source_bitrate:e,video_source_height:c.video.height,video_source_width:c.video.width,video_source_codec:sC(c.video.codec)}}},m=function(e,t,r){var s=e.mediaType;if("audio"===s||"video"===s){if("function"==typeof i.getRepresentationsByType)if(e.newRepresentation)o={bitrate:e.newRepresentation.bandwidth,width:e.newRepresentation.width,height:e.newRepresentation.height,qualityIndex:e.newRepresentation.absoluteIndex};else{var o,l=i.getRepresentationsByType(s);if(l&&"number"==typeof e.newQuality){var d=l.find(function(t){return t.absoluteIndex===e.newQuality||t.index===e.newQuality});d&&(o={bitrate:d.bandwidth,width:d.width,height:d.height,qualityIndex:e.newQuality})}}else{if("number"!=typeof e.newQuality)return void a.warn("missing evt.newQuality in qualityChangeRendered event",e);o=i.getBitrateInfoListFor(s).find(function(t){return t.qualityIndex===e.newQuality})}if(!(o&&"number"==typeof o.bitrate))return void a.warn("missing bitrate info for ".concat(s));c[s]=sb(sv({},o),{codec:i.getCurrentTrackFor(s).codec});var u=h();u&&n("renditionchange",u)}};i.on("qualityChangeRendered",m);var v=function(e){var t=e.request,i=e.mediaType;n("requestcanceled",{request_event_type:(t=t||{}).type+"_"+t.action,request_url:t.url,request_type:i,request_hostname:sl(t.url)})};i.on("fragmentLoadingAbandoned",v);var b=function(e){var t,i,a=e.error,r=(null==a||null==(t=a.data)?void 0:t.request)||{},s=(null==a||null==(i=a.data)?void 0:i.response)||{};(null==a?void 0:a.code)===27&&n("requestfailed",{request_error:r.type+"_"+r.action,request_url:r.url,request_hostname:sl(r.url),request_type:r.mediaType,request_error_code:s.status,request_error_text:s.statusText});var o="".concat(null!=r&&r.url?"url: ".concat(r.url,"\n"):"")+"".concat(null!=s&&s.status||null!=s&&s.statusText?"response: ".concat(null==s?void 0:s.status,", ").concat(null==s?void 0:s.statusText,"\n"):"");n("error",{player_error_code:null==a?void 0:a.code,player_error_message:null==a?void 0:a.message,player_error_context:o})};i.on("error",b),i._stopMuxMonitor=function(){i.off("manifestLoaded",s),i.off("initFragmentLoaded",d),i.off("mediaFragmentLoaded",u),i.off("qualityChangeRendered",m),i.off("error",b),i.off("fragmentLoadingAbandoned",v),delete i._stopMuxMonitor}},sR=function(e){e&&"function"==typeof e._stopMuxMonitor&&e._stopMuxMonitor()},sx=0,sD=function(){function e(){st(this,e),sr(this,"_listeners",void 0)}return sa(e,[{key:"on",value:function(e,t,i){return t._eventEmitterGuid=t._eventEmitterGuid||++sx,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],i&&(t=t.bind(i)),this._listeners[e].push(t),t}},{key:"off",value:function(e,t){var i=this._listeners&&this._listeners[e];
2508i&&i.forEach(function(e,a){e._eventEmitterGuid===t._eventEmitterGuid&&i.splice(a,1)})}},{key:"one",value:function(e,t,i){var a=this;t._eventEmitterGuid=t._eventEmitterGuid||++sx;var r=function(){a.off(e,r),t.apply(i||this,arguments)};r._eventEmitterGuid=t._eventEmitterGuid,this.on(e,r)}},{key:"emit",value:function(e,t){var i=this;if(this._listeners){t=t||{};var a=this._listeners["before"+e]||[],r=this._listeners["before*"]||[],n=this._listeners[e]||[],s=this._listeners["after"+e]||[],o=function(t,a){(t=t.slice()).forEach(function(t){t.call(i,{type:e},a)})};o(a,t),o(r,t),o(n,t),o(s,t)}}}]),e}(),sP=nL(nR()),sN=function(){function e(t){var i=this;st(this,e),sr(this,"_playbackHeartbeatInterval",void 0),sr(this,"_playheadShouldBeProgressing",void 0),sr(this,"pm",void 0),this.pm=t,this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,t.on("playing",function(){i._playheadShouldBeProgressing=!0}),t.on("play",this._startPlaybackHeartbeatInterval.bind(this)),t.on("playing",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adbreakstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adplay",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adplaying",this._startPlaybackHeartbeatInterval.bind(this)),t.on("devicewake",this._startPlaybackHeartbeatInterval.bind(this)),t.on("viewstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("rebufferstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("pause",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("ended",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("viewend",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("error",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("aderror",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adpause",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adended",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adbreakend",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("seeked",function(){t.data.player_is_paused?i._stopPlaybackHeartbeatInterval():i._startPlaybackHeartbeatInterval()}),t.on("timeupdate",function(){null!==i._playbackHeartbeatInterval&&t.emit("playbackheartbeat")}),t.on("devicesleep",function(e,a){null!==i._playbackHeartbeatInterval&&(sP.default.clearInterval(i._playbackHeartbeatInterval),t.emit("playbackheartbeatend",{viewer_time:a.viewer_time}),i._playbackHeartbeatInterval=null)})}return sa(e,[{key:"_startPlaybackHeartbeatInterval",value:function(){var e=this;null===this._playbackHeartbeatInterval&&(this.pm.emit("playbackheartbeat"),this._playbackHeartbeatInterval=sP.default.setInterval(function(){e.pm.emit("playbackheartbeat")},this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,null!==this._playbackHeartbeatInterval&&(sP.default.clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}]),e}(),sO=function e(t){var i=this;st(this,e),sr(this,"viewErrored",void 0),t.on("viewinit",function(){i.viewErrored=!1}),t.on("error",function(e,a){try{var r=t.errorTranslator({player_error_code:a.player_error_code,player_error_message:a.player_error_message,player_error_context:a.player_error_context,player_error_severity:a.player_error_severity,player_error_business_exception:a.player_error_business_exception});r&&(t.data.player_error_code=r.player_error_code||a.player_error_code,t.data.player_error_message=r.player_error_message||a.player_error_message,t.data.player_error_context=r.player_error_context||a.player_error_context,t.data.player_error_severity=r.player_error_severity||a.player_error_severity,t.data.player_error_business_exception=r.player_error_business_exception||a.player_error_business_exception,i.viewErrored=!0)}catch(e){t.mux.log.warn("Exception in error translator callback.",e),i.viewErrored=!0}}),t.on("aftererror",function(){var e,i,a,r,n;null==(e=t.data)||delete e.player_error_code,null==(i=t.data)||delete i.player_error_message,null==(a=t.data)||delete a.player_error_context,null==(r=t.data)||delete r.player_error_severity,null==(n=t.data)||delete n.player_error_business_exception})},sU=function(){function e(t){st(this,e),sr(this,"_watchTimeTrackerLastCheckedTime",void 0),sr(this,"pm",void 0),this.pm=t,this._watchTimeTrackerLastCheckedTime=null,t.on("playbackheartbeat",this._updateWatchTime.bind(this)),t.on("playbackheartbeatend",this._clearWatchTimeState.bind(this))}return sa(e,[{key:"_updateWatchTime",value:function(e,t){var i=t.viewer_time;null===this._watchTimeTrackerLastCheckedTime&&(this._watchTimeTrackerLastCheckedTime=i),sp(this.pm.data,"view_watch_time",i-this._watchTimeTrackerLastCheckedTime),this._watchTimeTrackerLastCheckedTime=i}},{key:"_clearWatchTimeState",value:function(e,t){this._updateWatchTime(e,t),this._watchTimeTrackerLastCheckedTime=null}}]),e}(),sH=function(){function e(t){var i=this;st(this,e),sr(this,"_playbackTimeTrackerLastPlayheadPosition",void 0),sr(this,"_lastTime",void 0),sr(this,"_isAdPlaying",void 0),sr(this,"_callbackUpdatePlaybackTime",void 0),sr(this,"pm",void 0),this.pm=t,this._playbackTimeTrackerLastPlayheadPosition=-1,this._lastTime=n1(),this._isAdPlaying=!1,this._callbackUpdatePlaybackTime=null,t.on("viewinit",function(){i.pm.data.view_playing_time_ms_cumulative=0});var a=this._startPlaybackTimeTracking.bind(this);t.on("playing",a),t.on("adplaying",a);var r=function(){i.pm.data.player_is_paused||a()};t.on("seeked",r),t.on("rebufferend",r);var n=this._stopPlaybackTimeTracking.bind(this);t.on("playbackheartbeatend",n),t.on("seeking",n),t.on("rebufferstart",n),t.on("adplaying",function(){i._isAdPlaying=!0}),t.on("adended",function(){i._isAdPlaying=!1}),t.on("adpause",function(){i._isAdPlaying=!1}),t.on("adbreakstart",function(){i._isAdPlaying=!1}),t.on("adbreakend",function(){i._isAdPlaying=!1}),t.on("adplay",function(){i._isAdPlaying=!1}),t.on("viewinit",function(){i._playbackTimeTrackerLastPlayheadPosition=-1,i._lastTime=n1(),i._isAdPlaying=!1,i._callbackUpdatePlaybackTime=null})}return sa(e,[{key:"_startPlaybackTimeTracking",value:function(){null===this._callbackUpdatePlaybackTime&&(this._callbackUpdatePlaybackTime=this._updatePlaybackTime.bind(this),this._playbackTimeTrackerLastPlayheadPosition=this.pm.data.player_playhead_time,this._lastTime=n1(),this.pm.on("playbackheartbeat",this._callbackUpdatePlaybackTime))}},{key:"_stopPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime&&(this._updatePlaybackTime(),this.pm.off("playbackheartbeat",this._callbackUpdatePlaybackTime),this._callbackUpdatePlaybackTime=null,this._playbackTimeTrackerLastPlayheadPosition=-1)}},{key:"_updatePlaybackTime",value:function(){var e=this.pm.data.player_playhead_time||0,t=n1(),i=t-this._lastTime,a=-1;this._playbackTimeTrackerLastPlayheadPosition>=0&&e>this._playbackTimeTrackerLastPlayheadPosition?a=e-this._playbackTimeTrackerLastPlayheadPosition:this._isAdPlaying&&(a=i),a>0&&a<=1e3&&sp(this.pm.data,"view_content_playback_time",a),null!==this._callbackUpdatePlaybackTime&&i>0&&i<=1e3&&(this._isAdPlaying&&sp(this.pm.data,"ad_playing_time_ms_cumulative",i),sp(this.pm.data,"view_playing_time_ms_cumulative",i)),this._playbackTimeTrackerLastPlayheadPosition=e,this._lastTime=t}}]),e}(),sW=function(){function e(t){st(this,e),sr(this,"pm",void 0),this.pm=t;var i=this._updatePlayheadTime.bind(this);t.on("playbackheartbeat",i),t.on("playbackheartbeatend",i),t.on("timeupdate",i),t.on("destroy",function(){t.off("timeupdate",i)})}return sa(e,[{key:"_updateMaxPlayheadPosition",value:function(){this.pm.data.view_max_playhead_position=void 0===this.pm.data.view_max_playhead_position?this.pm.data.player_playhead_time:Math.max(this.pm.data.view_max_playhead_position,this.pm.data.player_playhead_time)}},{key:"_updatePlayheadTime",value:function(e,t){var i=this,a=function(){i.pm.currentFragmentPDT&&i.pm.currentFragmentStart&&(i.pm.data.player_program_time=i.pm.currentFragmentPDT+i.pm.data.player_playhead_time-i.pm.currentFragmentStart)};if(t&&t.player_playhead_time)this.pm.data.player_playhead_time=t.player_playhead_time,a(),this._updateMaxPlayheadPosition();else if(this.pm.getPlayheadTime){var r=this.pm.getPlayheadTime();void 0!==r&&(this.pm.data.player_playhead_time=r,a(),this._updateMaxPlayheadPosition())}}}]),e}(),sB=function e(t){if(st(this,e),!t.disableRebufferTracking){var i,a=function(e,t){r(t),i=void 0},r=function(e){if(i){var a=e.viewer_time-i;sp(t.data,"view_rebuffer_duration",a),i=e.viewer_time,t.data.view_rebuffer_duration>3e5&&(t.emit("viewend"),t.send("viewend"),t.mux.log.warn("Ending view after rebuffering for longer than ".concat(3e5,"ms, future events will be ignored unless a programchange or videochange occurs.")))}t.data.view_watch_time>=0&&t.data.view_rebuffer_count>0&&(t.data.view_rebuffer_frequency=t.data.view_rebuffer_count/t.data.view_watch_time,t.data.view_rebuffer_percentage=t.data.view_rebuffer_duration/t.data.view_watch_time)};t.on("playbackheartbeat",function(e,t){return r(t)}),t.on("rebufferstart",function(e,r){i||(sp(t.data,"view_rebuffer_count",1),i=r.viewer_time,t.one("rebufferend",a))}),t.on("viewinit",function(){i=void 0,t.off("rebufferend",a)})}},s$=function(){function e(t){var i=this;st(this,e),sr(this,"_lastCheckedTime",void 0),sr(this,"_lastPlayheadTime",void 0),sr(this,"_lastPlayheadTimeUpdatedTime",void 0),sr(this,"_rebuffering",void 0),sr(this,"pm",void 0),this.pm=t,t.disableRebufferTracking||t.disablePlayheadRebufferTracking||(this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null,t.on("playbackheartbeat",this._checkIfRebuffering.bind(this)),t.on("playbackheartbeatend",this._cleanupRebufferTracker.bind(this)),t.on("seeking",function(){i._cleanupRebufferTracker(null,{viewer_time:n1()})}))}return sa(e,[{key:"_checkIfRebuffering",value:function(e,t){if(this.pm.seekingTracker.isSeeking||this.pm.adTracker.isAdBreak||!this.pm.playbackHeartbeat._playheadShouldBeProgressing)return void this._cleanupRebufferTracker(e,t);if(null===this._lastCheckedTime)return void this._prepareRebufferTrackerState(t.viewer_time);if(this._lastPlayheadTime!==this.pm.data.player_playhead_time)return void this._cleanupRebufferTracker(e,t,!0);var i=t.viewer_time-this._lastPlayheadTimeUpdatedTime;"number"==typeof this.pm.sustainedRebufferThreshold&&i>=this.pm.sustainedRebufferThreshold&&(this._rebuffering||(this._rebuffering=!0,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}))),this._lastCheckedTime=t.viewer_time}},{key:"_clearRebufferTrackerState",value:function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null}},{key:"_prepareRebufferTrackerState",value:function(e){this._lastCheckedTime=e,this._lastPlayheadTime=this.pm.data.player_playhead_time,this._lastPlayheadTimeUpdatedTime=e}},{key:"_cleanupRebufferTracker",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this._rebuffering)this._rebuffering=!1,this.pm.emit("rebufferend",{viewer_time:t.viewer_time});else{if(null===this._lastCheckedTime)return;var a=this.pm.data.player_playhead_time-this._lastPlayheadTime,r=t.viewer_time-this._lastPlayheadTimeUpdatedTime;"number"==typeof this.pm.minimumRebufferDuration&&a>0&&r-a>this.pm.minimumRebufferDuration&&(this._lastCheckedTime=null,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}),this.pm.emit("rebufferend",{viewer_time:this._lastPlayheadTimeUpdatedTime+r-a}))}i?this._prepareRebufferTrackerState(t.viewer_time):this._clearRebufferTrackerState()}}]),e}(),sV=function(){function e(t){var i=this;st(this,e),sr(this,"pm",void 0),this.pm=t,t.on("viewinit",function(){var e=t.data,a=e.view_id;if(!e.view_program_changed){var r=function(e,r){var n=r.viewer_time;"playing"===e.type&&void 0===t.data.view_time_to_first_frame?i.calculateTimeToFirstFrame(n||n1(),a):"adplaying"===e.type&&(void 0===t.data.view_time_to_first_frame||i._inPrerollPosition())&&i.calculateTimeToFirstFrame(n||n1(),a)};t.one("playing",r),t.one("adplaying",r),t.one("viewend",function(){t.off("playing",r),t.off("adplaying",r)})}})}return sa(e,[{key:"_inPrerollPosition",value:function(){return void 0===this.pm.data.view_content_playback_time||this.pm.data.view_content_playback_time<=1e3}},{key:"calculateTimeToFirstFrame",value:function(e,t){t===this.pm.data.view_id&&(this.pm.watchTimeTracker._updateWatchTime(null,{viewer_time:e}),this.pm.data.view_time_to_first_frame=this.pm.data.view_watch_time,(this.pm.data.player_autoplay_on||this.pm.data.video_is_autoplay)&&this.pm.pageLoadInitTime&&(this.pm.data.view_aggregate_startup_time=this.pm.data.view_start+this.pm.data.view_watch_time-this.pm.pageLoadInitTime))}}]),e}(),sq=function e(t){var i=this;st(this,e),sr(this,"_lastPlayerHeight",void 0),sr(this,"_lastPlayerWidth",void 0),sr(this,"_lastPlayheadPosition",void 0),sr(this,"_lastSourceHeight",void 0),sr(this,"_lastSourceWidth",void 0),t.on("viewinit",function(){i._lastPlayheadPosition=-1}),["pause","rebufferstart","seeking","error","adbreakstart","hb","renditionchange","orientationchange","viewend","playbackmodechange"].forEach(function(e){t.on(e,function(){if(i._lastPlayheadPosition>=0&&t.data.player_playhead_time>=0&&i._lastPlayerWidth>=0&&i._lastSourceWidth>0&&i._lastPlayerHeight>=0&&i._lastSourceHeight>0){var e=t.data.player_playhead_time-i._lastPlayheadPosition;if(e<0){i._lastPlayheadPosition=-1;return}var a=Math.min(i._lastPlayerWidth/i._lastSourceWidth,i._lastPlayerHeight/i._lastSourceHeight),r=Math.max(0,a-1),n=Math.max(0,1-a);t.data.view_max_upscale_percentage=Math.max(t.data.view_max_upscale_percentage||0,r),t.data.view_max_downscale_percentage=Math.max(t.data.view_max_downscale_percentage||0,n),sp(t.data,"view_total_content_playback_time",e),sp(t.data,"view_total_upscaling",r*e),sp(t.data,"view_total_downscaling",n*e)}i._lastPlayheadPosition=-1})}),["playing","hb","renditionchange","orientationchange","playbackmodechange"].forEach(function(e){t.on(e,function(){i._lastPlayheadPosition=t.data.player_playhead_time,i._lastPlayerWidth=t.data.player_width,i._lastPlayerHeight=t.data.player_height,i._lastSourceWidth=t.data.video_source_width,i._lastSourceHeight=t.data.video_source_height})})},sF=function e(t){var i=this;st(this,e),sr(this,"isSeeking",void 0),this.isSeeking=!1;var a=-1,r=function(){var e=n1(),r=(t.data.viewer_time||e)-(a||e);sp(t.data,"view_seek_duration",r),t.data.view_max_seek_time=Math.max(t.data.view_max_seek_time||0,r),i.isSeeking=!1,a=-1};t.on("seeking",function(e,n){if(Object.assign(t.data,n),i.isSeeking&&n.viewer_time-a<=2e3){a=n.viewer_time;return}i.isSeeking&&r(),i.isSeeking=!0,a=n.viewer_time,sp(t.data,"view_seek_count",1),t.send("seeking")}),t.on("seeked",function(){r()}),t.on("viewend",function(){i.isSeeking&&(r(),t.send("seeked")),i.isSeeking=!1,a=-1})},sG=function(e,t){e.push(t),e.sort(function(e,t){return e.viewer_time-t.viewer_time})},sK=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],sj=function(){function e(t){var i=this;st(this,e),sr(this,"_adHasPlayed",void 0),sr(this,"_adRequests",void 0),sr(this,"_adResponses",void 0),sr(this,"_currentAdRequestNumber",void 0),sr(this,"_currentAdResponseNumber",void 0),sr(this,"_prerollPlayTime",void 0),sr(this,"_wouldBeNewAdPlay",void 0),sr(this,"isAdBreak",void 0),sr(this,"pm",void 0),this.pm=t,t.on("viewinit",function(){i.isAdBreak=!1,i._currentAdRequestNumber=0,i._currentAdResponseNumber=0,i._adRequests=[],i._adResponses=[],i._adHasPlayed=!1,i._wouldBeNewAdPlay=!0,i._prerollPlayTime=void 0}),sK.forEach(function(e){return t.on(e,i._updateAdData.bind(i))});var a=function(){i.isAdBreak=!1};t.on("adbreakstart",function(){i.isAdBreak=!0}),t.on("play",a),t.on("playing",a),t.on("viewend",a),t.on("adrequest",function(e,a){a=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdRequestNumber++},a),sG(i._adRequests,a),sp(t.data,"view_ad_request_count"),i.inPrerollPosition()&&(t.data.view_preroll_requested=!0,i._adHasPlayed||sp(t.data,"view_preroll_request_count"))}),t.on("adresponse",function(e,a){a=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdResponseNumber++},a),sG(i._adResponses,a);var r=i.findAdRequest(a.ad_request_id);r&&sp(t.data,"view_ad_request_time",Math.max(0,a.viewer_time-r.viewer_time))}),t.on("adplay",function(e,a){i._adHasPlaye
2508d=!0,i._wouldBeNewAdPlay&&(i._wouldBeNewAdPlay=!1,sp(t.data,"view_ad_played_count")),i.inPrerollPosition()&&!t.data.view_preroll_played&&(t.data.view_preroll_played=!0,i._adRequests.length>0&&(t.data.view_preroll_request_time=Math.max(0,a.viewer_time-i._adRequests[0].viewer_time)),t.data.view_start&&(t.data.view_startup_preroll_request_time=Math.max(0,a.viewer_time-t.data.view_start)),i._prerollPlayTime=a.viewer_time)}),t.on("adplaying",function(e,a){i.inPrerollPosition()&&void 0===t.data.view_preroll_load_time&&void 0!==i._prerollPlayTime&&(t.data.view_preroll_load_time=a.viewer_time-i._prerollPlayTime,t.data.view_startup_preroll_load_time=a.viewer_time-i._prerollPlayTime)}),t.on("adclicked",function(e,a){i._wouldBeNewAdPlay||sp(t.data,"view_ad_clicked_count")}),t.on("adskipped",function(e,a){i._wouldBeNewAdPlay||sp(t.data,"view_ad_skipped_count")}),t.on("adended",function(){i._wouldBeNewAdPlay=!0}),t.on("aderror",function(){i._wouldBeNewAdPlay=!0})}return sa(e,[{key:"inPrerollPosition",value:function(){return void 0===this.pm.data.view_content_playback_time||this.pm.data.view_content_playback_time<=1e3}},{key:"findAdRequest",value:function(e){for(var t=0;t<this._adRequests.length;t++)if(this._adRequests[t].ad_request_id===e)return this._adRequests[t]}},{key:"_updateAdData",value:function(e,t){if(this.inPrerollPosition()){if(!this.pm.data.view_preroll_ad_tag_hostname&&t.ad_tag_url){var i=nZ(sd(t.ad_tag_url),2),a=i[0],r=i[1];this.pm.data.view_preroll_ad_tag_domain=r,this.pm.data.view_preroll_ad_tag_hostname=a}if(!this.pm.data.view_preroll_ad_asset_hostname&&t.ad_asset_url){var n=nZ(sd(t.ad_asset_url),2),s=n[0],o=n[1];this.pm.data.view_preroll_ad_asset_domain=o,this.pm.data.view_preroll_ad_asset_hostname=s}this.pm.data.ad_type="preroll"}this.pm.data.ad_asset_url=null==t?void 0:t.ad_asset_url,this.pm.data.ad_tag_url=null==t?void 0:t.ad_tag_url,this.pm.data.ad_creative_id=null==t?void 0:t.ad_creative_id,this.pm.data.ad_id=null==t?void 0:t.ad_id,this.pm.data.ad_universal_id=null==t?void 0:t.ad_universal_id,null!=t&&t.ad_type&&(this.pm.data.ad_type=null==t?void 0:t.ad_type)}}]),e}(),sY=function e(t){var i=this;st(this,e),sr(this,"lastWallClockTime",void 0);var a=function(){i.lastWallClockTime=n1(),t.on("before*",r)},r=function(e){var a=n1(),r=i.lastWallClockTime;i.lastWallClockTime=a,a-r>3e4&&(t.emit("devicesleep",{viewer_time:r}),Object.assign(t.data,{viewer_time:r}),t.send("devicesleep"),t.emit("devicewake",{viewer_time:a}),Object.assign(t.data,{viewer_time:a}),t.send("devicewake"))};t.one("playbackheartbeat",a),t.on("playbackheartbeatend",function(){t.off("before*",r),t.one("playbackheartbeat",a)})},sQ=nL(nR()),sz=(oA=function(){for(var e=0,t={};e<arguments.length;e++){var i=arguments[e];for(var a in i)t[a]=i[a]}return t},function e(t){function i(e,a,r){var n;if("u">typeof document){if(arguments.length>1){if("number"==typeof(r=oA({path:"/"},i.defaults,r)).expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*r.expires),r.expires=s}try{n=JSON.stringify(a),/^[\{\[]/.test(n)&&(a=n)}catch(e){}return a=t.write?t.write(a,e):encodeURIComponent(String(a)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=e+"="+a+(r.expires?"; expires="+r.expires.toUTCString():"")+(r.path?"; path="+r.path:"")+(r.domain?"; domain="+r.domain:"")+(r.secure?"; secure":"")}e||(n={});for(var o=document.cookie?document.cookie.split("; "):[],l=/(%[0-9A-Z]{2})+/g,d=0;d<o.length;d++){var u=o[d].split("="),c=u.slice(1).join("=");'"'===c.charAt(0)&&(c=c.slice(1,-1));try{var h=u[0].replace(l,decodeURIComponent);if(c=t.read?t.read(c,h):t(c,h)||c.replace(l,decodeURIComponent),this.json)try{c=JSON.parse(c)}catch(e){}if(e===h){n=c;break}e||(n[h]=c)}catch(e){}}return n}}return i.set=i,i.get=function(e){return i.call(i,e)},i.getJSON=function(){return i.apply({json:!0},[].slice.call(arguments))},i.defaults={},i.remove=function(e,t){i(e,"",oA(t,{expires:-1}))},i.withConverter=e,i}(function(){})),sZ="muxData",sX=function(){var e;try{e=(sz.get(sZ)||"").split("&").reduce(function(e,t){var i=nZ(t.split("="),2),a=i[0],r=i[1],n=+r;return e[a]=r&&n==r?n:r,e},{})}catch(t){e={}}return e},sJ=function(e){try{sz.set(sZ,Object.entries(e).map(function(e){var t=nZ(e,2),i=t[0],a=t[1];return"".concat(i,"=").concat(a)}).join("&"),{expires:365})}catch(e){}},s0=function(){var e=sX();return e.mux_viewer_id=e.mux_viewer_id||n2(),e.msn=e.msn||Math.random(),sJ(e),{mux_viewer_id:e.mux_viewer_id,mux_sample_number:e.msn}},s1=function(){var e=sX(),t=n1();return e.session_start&&(e.sst=e.session_start,delete e.session_start),e.session_id&&(e.sid=e.session_id,delete e.session_id),e.session_expires&&(e.sex=e.session_expires,delete e.session_expires),(!e.sex||e.sex<t)&&(e.sid=n2(),e.sst=t),e.sex=t+15e5,sJ(e),{session_id:e.sid,session_start:e.sst,session_expires:e.sex}},s2=nL(nR()),s3=function(){var e;switch(s4()){case"cellular":e="cellular";break;case"ethernet":e="wired";break;case"wifi":e="wifi";break;case void 0:break;default:e="other"}return e},s4=function(){var e=s2.default.navigator,t=e&&(e.connection||e.mozConnection||e.webkitConnection);return t&&t.type};s3.getConnectionFromAPI=s4;var s5=s8({a:"env",b:"beacon",c:"custom",d:"ad",e:"event",f:"experiment",i:"internal",m:"mux",n:"response",p:"player",q:"request",r:"retry",s:"session",t:"timestamp",u:"viewer",v:"video",w:"page",x:"view",y:"sub"}),s9=s8({ad:"ad",af:"affiliate",ag:"aggregate",ap:"api",al:"application",ao:"audio",ar:"architecture",as:"asset",au:"autoplay",av:"average",bi:"bitrate",bn:"brand",br:"break",bw:"browser",by:"bytes",bz:"business",ca:"cached",cb:"cancel",cc:"codec",cd:"code",cg:"category",ch:"changed",ci:"client",ck:"clicked",cl:"canceled",cm:"cmcd",cn:"config",co:"count",ce:"counter",cp:"complete",cq:"creator",cr:"creative",cs:"captions",ct:"content",cu:"current",cv:"cumulative",cx:"c
2508onnection",cz:"context",da:"data",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",dr:"drm",dp:"dropped",du:"duration",dv:"device",dy:"dynamic",eb:"enabled",ec:"encoding",ed:"edge",en:"end",eg:"engine",em:"embed",er:"error",ep:"experiments",es:"errorcode",et:"errortext",ee:"event",ev:"events",ex:"expires",ez:"exception",fa:"failed",fi:"first",fm:"family",ft:"format",fp:"fps",fq:"frequency",fr:"frame",fs:"fullscreen",ha:"has",hb:"holdback",he:"headers",ho:"host",hn:"hostname",ht:"height",id:"id",ii:"init",in:"instance",ip:"ip",is:"is",ke:"key",la:"language",lb:"labeled",le:"level",li:"live",ld:"loaded",lo:"load",ls:"lists",lt:"latency",ma:"max",md:"media",me:"message",mf:"manifest",mi:"mime",ml:"midroll",mm:"min",mn:"manufacturer",mo:"model",mp:"mode",ms:"ms",mx:"mux",ne:"newest",nm:"name",no:"number",on:"on",or:"origin",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",pf:"played",pg:"program",ph:"playhead",pi:"plugin",pl:"preroll",pn:"playing",po:"poster",pp:"pip",pr:"preload",ps:"position",pt:"part",pv:"previous",py:"property",px:"pop",pz:"plan",ra:"rate",rd:"requested",re:"rebuffer",rf:"rendition",rg:"range",rm:"remote",ro:"ratio",rp:"response",rq:"request",rs:"requests",sa:"sample",sd:"skipped",se:"session",sh:"shift",sk:"seek",sm:"stream",so:"source",sq:"sequence",sr:"series",ss:"status",st:"start",su:"startup",sv:"server",sw:"software",sy:"severity",ta:"tag",tc:"tech",te:"text",tg:"target",th:"throughput",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",un:"universal",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch",wt:"waiting"});function s8(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[e[i]]=i);return t}function s7(e){var t={},i={};return Object.keys(e).forEach(function(a){var r=!1;if(e.hasOwnProperty(a)&&void 0!==e[a]){var n=a.split("_"),s=n[0],o=s5[s];o||(n8.info("Data key word `"+n[0]+"` not expected in "+a),o=s+"_"),n.splice(1).forEach(function(e){"url"===e&&(r=!0),s9[e]?o+=s9[e]:Number.isInteger(Number(e))?o+=e:(n8.info("Data key word `"+e+"` not expected in "+a),o+="_"+e+"_")}),r?i[o]=e[a]:t[o]=e[a]}}),Object.assign(t,i)}var s6=nL(nR()),oe=nL(nY()),ot={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},oi=["hb","requestcompleted","requestfailed","requestcanceled"],oa=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._beaconUrl=e||"https://img.litix.io",this._eventQueue=[],this._postInFlight=!1,this._resendAfterPost=!1,this._failureCount=0,this._sendTimeout=!1,this._options=Object.assign({},ot,t)};oa.prototype.queueEvent=function(e,t){var i=Object.assign({},t);return(this._eventQueue.length<=this._options.maxQueueLength||"eventrateexceeded"===e)&&(this._eventQueue.push(i),this._sendTimeout||this._startBeaconSending(),this._eventQueue.length<=this._options.maxQueueLength)},oa.prototype.flushEvents=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&1===this._eventQueue.length?this._eventQueue.pop():(this._eventQueue.length&&this._sendBeaconQueue(),this._startBeaconSending())},oa.prototype.destroy=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.destroyed=!0,e?this._clearBeaconQueue():this.flushEvents(),s6.default.clearTimeout(this._sendTimeout)},oa.prototype._clearBeaconQueue=function(){var e=this._eventQueue.length>this._options.maxBeaconSize?this._eventQueue.length-this._options.maxBeaconSize:0,t=this._eventQueue.slice(e);e>0&&Object.assign(t[t.length-1],s7({mux_view_message:"event queue truncated"}));var i=this._createPayload(t);on(this._beaconUrl,i,!0,function(){})},oa.prototype._sendBeaconQueue=function(){var e=this;if(this._postInFlight){this._resendAfterPost=!0;return}var t=this._eventQueue.slice(0,this._options.maxBeaconSize);this._eventQueue=this._eventQueue.slice(this._options.maxBeaconSize),this._postInFlight=!0;var i=this._createPayload(t),a=n1();on(this._beaconUrl,i,!1,function(i,r){r?(e._eventQueue=t.concat(e._eventQueue),e._failureCount+=1,n8.info("Error sending beacon: "+r)):e._failureCount=0,e._roundTripTime=n1()-a,e._postInFlight=!1,e._resendAfterPost&&(e._resendAfterPost=!1,e._eventQueue.length>0&&e._sendBeaconQueue())})},oa.prototype._getNextBeaconTime=function(){if(!this._failureCount)return this._options.baseTimeBetweenBeacons;var e=Math.pow(2,this._failureCount-1);return(1+(e*=Math.random()))*this._options.baseTimeBetweenBeacons},oa.prototype._startBeaconSending=function(){var e=this;s6.default.clearTimeout(this._sendTimeout),this.destroyed||(this._sendTimeout=s6.default.setTimeout(function(){e._eventQueue.length&&e._sendBeaconQueue(),e._startBeaconSending()},this._getNextBeaconTime()))},oa.prototype._createPayload=function(e){var t=this,i={transmission_timestamp:Math.round(n1())};this._roundTripTime&&(i.rtt_ms=Math.round(this._roundTripTime));var a,r,n,s=function(){n=(a=JSON.stringify({metadata:i,events:r||e})).length/1024},o=function(){return n<=t._options.maxPayloadKBSize};return s(),o()||(n8.info("Payload size is too big ("+n+" kb). Removing unnecessary events."),r=e.filter(function(e){return -1===oi.indexOf(e.e)}),s()),o()||(n8.info("Payload size still too big ("+n+" kb). Cropping fields.."),r.forEach(function(e){for(var t in e){var i=e[t];"string"==typeof i&&i.length>51200&&(e[t]=i.substring(0,51200))}}),s()),a};var or="function"==typeof oe.default.exitPictureInPicture?function(e){return e.length<=57344}:function(e){return!1},on=function(e,t,i,a){if(i&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(e,t))return void a();if(s6.default.fetch)return void s6.default.fetch(e,{method:"POST",body:t,headers:{"Content-Type":"text/plain"},keepalive:or(t)}).then(function(e){return a(null,e.ok?null:"Error")}).catch(function(e){return a(null,e)});if(s6.default.XMLHttpRequest){var r=new s6.default.XMLHttpRequest;r.onreadystatechange=function(){if(4===r.readyState)return a(null,200!==r.status?"error":void 0)},r.open("POST",e),r.setRequestHeader("Content-Type","text/plain"),r.send(t);return}a()},os=["env_key","view_id","view_sequence_number","player_sequence_number","beacon_domain","player_playhead_time","viewer_time","mux_api_version","event","video_id","player_instance_id","player_error_code","player_error_message","player_error_context","player_error_severity","player_error_business_exception","view_playing_time_ms_cumulative","ad_playing_time_ms_cumulative"],oo=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],ol=["ad_id","ad_creative_id","ad_universal_id"],od=["viewstart","error","ended","viewend"],ou=function(){function e(t,i){var a,r,n,s,o,l,d,u,c,h,m,v,b,g,E,f,y,_,k,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};st(this,e),sr(this,"mux",void 0),sr(this,"envKey",void 0),sr(this,"options",void 0),sr(this,"eventQueue",void 0),sr(this,"sampleRate",void 0),sr(this,"disableCookies",void 0),sr(this,"respectDoNotTrack",void 0),sr(this,"previousBeaconData",void 0),sr(this,"lastEventTime",void 0),sr(this,"rateLimited",void 0),sr(this,"pageLevelData",void 0),sr(this,"viewerData",void 0),this.mux=t,this.envKey=i,this.options=A,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.eventQueue=new oa((a=this.envKey,n=(r=this.options).beaconCollectionDomain,s=r.beaconDomain,n?"https://"+n:(a=a||"inferred").match(/^[a-z0-9]+$/)?"https://"+a+"."+(s||"litix.io"):"https://img.litix.io/a.gif")),this.sampleRate=null!=(y=this.options.sampleRate)?y:1,this.disableCookies=null!=(_=this.options.disableCookies)&&_,this.respectDoNotTrack=null!=(k=this.options.respectDoNotTrack)&&k,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.pageLevelData={mux_api_version:this.mux.API_VERSION,mux_embed:this.mux.NAME,mux_embed_version:this.mux.VERSION,viewer_application_name:null==(o=this.options.platform)?void 0:o.name,viewer_application_version:null==(l=this.options.platform)?void 0:l.version,viewer_application_engine:null==(d=this.options.platform)?void 0:d.layout,viewer_device_name:null==(u=this.options.platform)?void 0:u.product,viewer_device_category:"",viewer_device_manufacturer:null==(c=this.options.platform)?void 0:c.manufacturer,viewer_os_family:null==(m=this.options.platform)||null==(h=m.os)?void 0:h.family,viewer_os_architecture:null==(b=this.options.platform)||null==(v=b.os)?void 0:v.architecture,viewer_os_version:null==(E=this.options.platform)||null==(g=E.os)?void 0:g.version,viewer_connection_type:s3(),page_url:null===sQ.default||void 0===sQ.default||null==(f=sQ.default.location)?void 0:f.href},this.viewerData=this.disableCookies?{}:s0()}return sa(e,[{key:"send",value:function(e,t){if(!(!e||!(null!=t&&t.view_id))){if(this.respectDoNotTrack&&n6())return n8.info("Not sending `"+e+"` because Do Not Track is enabled");if(!t||"object"!=typeof t)return n8.error("A data object was expected in send() but was not provided");var i=this.disableCookies?{}:s1(),a=sb(sv({},this.pageLevelData,t,i,this.viewerData),{event:e,env_key:this.envKey});
2508a.user_id&&(a.viewer_user_id=a.user_id,delete a.user_id);var r,n=(null!=(r=a.mux_sample_number)?r:0)>=this.sampleRate,s=s7(this._deduplicateBeaconData(e,a));if(this.lastEventTime=this.mux.utils.now(),n)return n8.info("Not sending event due to sample rate restriction",e,a,s);if(this.envKey||n8.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL",e,a,s),!this.rateLimited)if(n8.info("Sending event",e,a,s),this.rateLimited=!this.eventQueue.queueEvent(e,s),this.mux.WINDOW_UNLOADING&&"viewend"===e)this.eventQueue.destroy(!0);else{if(this.mux.WINDOW_HIDDEN&&"hb"===e)this.eventQueue.flushEvents(!0);else if(od.indexOf(e)>=0){if("error"===e&&"warning"===t.player_error_severity)return;this.eventQueue.flushEvents()}if(this.rateLimited)return a.event="eventrateexceeded",s=s7(a),this.eventQueue.queueEvent(a.event,s),n8.error("Beaconing disabled due to rate limit.")}}}},{key:"destroy",value:function(){this.eventQueue.destroy(!1)}},{key:"_deduplicateBeaconData",value:function(e,t){var i=this,a={},r=t.view_id;if("-1"===r||"viewstart"===e||"viewend"===e||!this.previousBeaconData||this.mux.utils.now()-this.lastEventTime>=6e5)a=sv({},t),r&&(this.previousBeaconData=a),r&&"viewend"===e&&(this.previousBeaconData=null);else{var n=0===e.indexOf("request");Object.entries(t).forEach(function(t){var r=nZ(t,2),s=r[0],o=r[1];i.previousBeaconData&&(o!==i.previousBeaconData[s]||os.indexOf(s)>-1||i.objectHasChanged(n,s,o,i.previousBeaconData[s])||i.eventRequiresKey(e,s))&&(a[s]=o,i.previousBeaconData[s]=o)})}return a}},{key:"objectHasChanged",value:function(e,t,i,a){return!!e&&0===t.indexOf("request_")&&("request_response_headers"===t||"object"!=typeof i||"object"!=typeof a||Object.keys(i||{}).length!==Object.keys(a||{}).length)}},{key:"eventRequiresKey",value:function(e,t){return!!("renditionchange"===e&&0===t.indexOf("video_source_")||ol.includes(t)&&oo.includes(e)||"playbackmodechange"===e&&0===t.indexOf("player_playback_mode"))}}]),e}(),oc=function e(t){st(this,e);var i=0,a=0,r=0,n=0,s=0,o=0,l=0;t.on("requestcompleted",function(e,o){var l,d,u=o.request_start,c=o.request_response_start,h=o.request_response_end,m=o.request_bytes_loaded;if(n++,c?(l=c-(null!=u?u:0),d=(null!=h?h:0)-c):d=(null!=h?h:0)-(null!=u?u:0),d>0&&m&&m>0){var v=m/d*8e3;s++,a+=m,r+=d,t.data.view_min_request_throughput=Math.min(t.data.view_min_request_throughput||1/0,v),t.data.view_average_request_throughput=a/r*8e3,t.data.view_request_count=n,l>0&&(i+=l,t.data.view_max_request_latency=Math.max(t.data.view_max_request_latency||0,l),t.data.view_average_request_latency=i/s)}}),t.on("requestfailed",function(e,i){n++,o++,t.data.view_request_count=n,t.data.view_request_failed_count=o}),t.on("requestcanceled",function(e,i){n++,l++,t.data.view_request_count=n,t.data.view_request_canceled_count=l})},oh=function e(t){var i=this;st(this,e),sr(this,"_lastEventTime",void 0),t.on("before*",function(e,a){var r=a.viewer_time,n=n1(),s=i._lastEventTime;if(i._lastEventTime=n,s&&n-s>36e5){var o=Object.keys(t.data).reduce(function(e,i){return 0===i.indexOf("video_")?Object.assign(e,sr({},i,t.data[i])):e},{});t.mux.log.info("Received event after at least an hour inactivity, creating a new view");var l=t.playbackHeartbeat._playheadShouldBeProgressing;t._resetView(Object.assign({viewer_time:r},o)),t.playbackHeartbeat._playheadShouldBeProgressing=l,t.playbackHeartbeat._playheadShouldBeProgressing&&"play"!==e.type&&"adbreakstart"!==e.type&&(t.emit("play",{viewer_time:r}),"playing"!==e.type&&t.emit("playing",{viewer_time:r}))}})};function om(e,t){return(null==e?void 0:e.toLowerCase())===(null==t?void 0:t.toLowerCase())}var op=function e(t){st(this,e);var i=function(e){var i,a,r,o=null!=(i=e)&&i.request_type&&("media"===i.request_type||"video"===i.request_type)&&null!=(a=i.request_response_headers)&&a["x-cdn"]?i.request_response_headers["x-cdn"]:null!=i&&i.video_cdn?i.video_cdn:null,l=null!=(r=e)&&r.request_start?r.request_start:null!=r&&r.viewer_time?r.viewer_time:Date.now();null!=o&&!om(o,n)&&s<=l&&(n=o,s=l,t.emit("cdnchange",{video_cdn:o}))}
2508,a=null,r=null,n=null,s=0;t.on("viewinit",function(){a=null,r=null,n=null,s=0}),t.on("beforecdnchange",function(e,t){var i=null==t?void 0:t.video_cdn;i&&(void 0===t.video_previous_cdn||null===t.video_previous_cdn)&&(om(i,r)?t.video_previous_cdn=null!=a?a:void 0:(t.video_previous_cdn=null!=r?r:void 0,a=r,r=i))}),t.on("requestcompleted",function(e,t){i(t)})},ov=function(e){try{return JSON.parse(e),!0}catch(e){return!1}},ob=function e(t){var i=this;st(this,e),sr(this,"_emittingAutomaticEvent",!1),sr(this,"_hasInitialized",!1),sr(this,"_currentMode","standard"),t.on("viewstart",function(){i._hasInitialized||(i._hasInitialized=!0,i._currentMode=t.data.player_playback_mode||"standard",i._emittingAutomaticEvent=!0,t.emit("playbackmodechange",{player_playback_mode:i._currentMode,player_playback_mode_data:"{}"}),i._emittingAutomaticEvent=!1)}),t.on("viewend",function(){i._hasInitialized=!1}),t.on("playbackmodechange",function(e,a){i._emittingAutomaticEvent||(a.player_playback_mode_data?ov(a.player_playback_mode_data)||(t.mux.log.warn("Invalid JSON string for player_playback_mode_data"),a.player_playback_mode_data="{}"):a.player_playback_mode_data="{}",t.data.player_playback_mode_data=a.player_playback_mode_data,t.data.player_playback_mode=a.player_playback_mode,i._currentMode=a.player_playback_mode)})},og=function(){function e(t){st(this,e),sr(this,"pm",void 0),sr(this,"_currentRangeStart",void 0),sr(this,"_lastPlayheadTime",void 0),this.pm=t,this._currentRangeStart=null,this._lastPlayheadTime=null,t.on("playbackheartbeat",this._updatePlaybackRange.bind(this)),t.on("playbackheartbeatend",this._endPlaybackRange.bind(this))}return sa(e,[{key:"_updateLastRangeEnd",value:function(){var e=this.pm.data.video_playback_ranges;if(e&&e.length>0){var t=this.pm.data.player_playhead_time||0;e[e.length-1][1]=t}}},{key:"_updatePlaybackRange",value:function(){var e,t=this.pm.data.player_playhead_time||0;if(!(!this.pm.disableAdPlaybackRangeFiltering&&null!=(e=this.pm.adTracker)&&e.isAdBreak&&null!==this._lastPlayheadTime&&t<this._lastPlayheadTime)){if(null!==this._lastPlayheadTime&&null!==this._currentRangeStart&&Math.abs(t-this._lastPlayheadTime)>1e3){var i=this.pm.data.video_playback_ranges;i&&i.length>0&&(i[i.length-1][1]=this._lastPlayheadTime),this._currentRangeStart=null}if(null===this._currentRangeStart){var a=this.pm.data.video_playback_ranges||[];a.length>0&&a[a.length-1][1]===t?this._currentRangeStart=a[a.length-1][0]:(this._currentRangeStart=t,a.push([t,t])),this.pm.data.video_playback_ranges=a}else this._updateLastRangeEnd();this._lastPlayheadTime=t}}},{key:"_endPlaybackRange",value:function(){null!==this._currentRangeStart&&(this._updateLastRangeEnd(),this._currentRangeStart=null,this._lastPlayheadTime=null)}}]),e}(),oE=["viewstart","ended","loadstart","pause","play","playing","ratechange","waiting","adplay","adpause","adended","aderror","adplaying","adrequest","adresponse","adbreakstart","adbreakend","adfirstquartile","admidpoint","adthirdquartile","rebufferstart","rebufferend","seeked","error","hb","requestcompleted","requestfailed","requestcanceled","renditionchange","cdnchange","playbackmodechange"],of=new Set(["requestcompleted","requestfailed","requestcanceled"]),oy=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");a.prototype=Object.create(e&&e.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),e&&so(a,e);var t,i=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,i=sn(a);return e=t?Reflect.construct(i,arguments,sn(this).constructor):i.apply(this,arguments),e&&("object"===nP(e)||"function"==typeof e)?e:se(this)});function a(e,t,r){st(this,a),sr(se(n=i.call(this)),"pageLoadEndTime",void 0),sr(se(n),"pageLoadInitTime",void 0),sr(se(n),"_destroyed",void 0),sr(se(n),"_heartBeatTimeout",void 0),sr(se(n),"adTracker",void 0),sr(se(n),"dashjs",void 0),sr(se(n),"data",void 0),sr(se(n),"disablePlayheadRebufferTracking",void 0),sr(se(n),"disableRebufferTracking",void 0),sr(se(n),"disableAdPlaybackRangeFiltering",void 0),sr(se(n),"errorTracker",void 0),sr(se(n),"errorTranslator",void 0),sr(se(n),"emitTranslator",void 0),sr(se(n),"getAdData",void 0),sr(se(n),"getPlayheadTime",void 0),sr(se(n),"getStateData",void 0),sr(se(n),"stateDataTranslator",void 0),sr(se(n),"hlsjs",void 0),sr(se(n),"id",void 0),sr(se(n),"longResumeTracker",void 0),sr(se(n),"minimumRebufferDuration",void 0),sr(se(n),"mux",void 0),sr(se(n),"playbackEventDispatcher",void 0),sr(se(n),"playbackHeartbeat",void 0),sr(se(n),"playbackHeartbeatTime",void 0),sr(se(n),"playheadTime",void 0),sr(se(n),"seekingTracker",void 0),sr(se(n),"sustainedRebufferThreshold",void 0),sr(se(n),"watchTimeTracker",void 0),sr(se(n),"currentFragmentPDT",void 0),sr(se(n),"currentFragmentStart",void 0),n.pageLoadInitTime=sm(),n.pageLoadEndTime=sh(),n.mux=e,n.id=t,null!=r&&r.beaconDomain&&n.mux.log.warn("The `beaconDomain` setting has been deprecated
2508in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."),(r=Object.assign({debug:!1,minimumRebufferDuration:250,sustainedRebufferThreshold:1e3,playbackHeartbeatTime:25,beaconDomain:"litix.io",sampleRate:1,disableCookies:!1,respectDoNotTrack:!1,disableRebufferTracking:!1,disablePlayheadRebufferTracking:!1,disableAdPlaybackRangeFiltering:!1,errorTranslator:function(e){return e},emitTranslator:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return t},stateDataTranslator:function(e){return e}},r)).data=r.data||{},r.data.property_key&&(r.data.env_key=r.data.property_key,delete r.data.property_key),n8.level=r.debug?1:3,n.getPlayheadTime=r.getPlayheadTime,n.getStateData=r.getStateData||function(){return{}},n.getAdData=r.getAdData||function(){},n.minimumRebufferDuration=r.minimumRebufferDuration,n.sustainedRebufferThreshold=r.sustainedRebufferThreshold,n.playbackHeartbeatTime=r.playbackHeartbeatTime,n.disableRebufferTracking=r.disableRebufferTracking,n.disableRebufferTracking&&n.mux.log.warn("Disabling rebuffer tracking. This should only be used in specific circumstances as a last resort when your player is known to unreliably track rebuffering."),n.disablePlayheadRebufferTracking=r.disablePlayheadRebufferTracking,n.disableAdPlaybackRangeFiltering=r.disableAdPlaybackRangeFiltering,n.errorTranslator=r.errorTranslator,n.emitTranslator=r.emitTranslator,n.stateDataTranslator=r.stateDataTranslator,n.playbackEventDispatcher=new ou(e,r.data.env_key,r),n.data={player_instance_id:n2(),mux_sample_rate:r.sampleRate,beacon_domain:r.beaconCollectionDomain||r.beaconDomain},n.data.view_sequence_number=1,n.data.player_sequence_number=1;var n,s=(function(){void 0===this.data.view_start&&(this.data.view_start=this.mux.utils.now(),this.emit("viewstart"),this.emit("renditionchange"))}).bind(se(n));if(n.on("viewinit",function(e,t){this._resetVideoData(),this._resetViewData(),this._resetErrorData(),this._updateStateData(),Object.assign(this.data,t),this._initializeViewData(),this.one("play",s),this.one("adbreakstart",s)}),n.on("videochange",function(e,t){this._resetView(t)}),n.on("programchange",function(e,t){this.data.player_is_paused&&this.mux.log.warn("The `programchange` event is intended to be used when the content changes mid playback without the video source changing, however the video is not currently playing. If the video source is changing please use the videochange event otherwise you will lose startup time information."),this._resetView(Object.assign(t,{view_program_changed:!0})),s(),this.emit("play"),this.emit("playing")}),n.on("fragmentchange",function(e,t){this.currentFragmentPDT=t.currentFragmentPDT,this.currentFragmentStart=t.currentFragmentStart}),n.on("destroy",n.destroy),"u">typeof window&&"function"==typeof window.addEventListener&&"function"==typeof window.removeEventListener){var o=function(){var e=void 0!==n.data.view_start;n.mux.WINDOW_HIDDEN="hidden"===document.visibilityState,e&&n.mux.WINDOW_HIDDEN&&(n.data.player_is_paused||n.emit("hb"))};window.addEventListener("visibilitychange",o,!1);var l=function(e){e.persisted||n.destroy()};window.addEventListener("pagehide",l,!1),n.on("destroy",function(){window.removeEventListener("visibilitychange",o),window.removeEventListener("pagehide",l)})}return n.on("playerready",function(e,t){Object.assign(this.data,t)}),oE.forEach(function(e){n.on(e,function(t,i){0!==e.indexOf("ad")&&this._updateStateData(),Object.assign(this.data,i),this._sanitizeData()}),n.on("after"+e,function(){("error"!==e||this.errorTracker.viewErrored)&&this.send(e)})}),n.on("viewend",function(e,t){Object.assign(n.data,t)}),n.one("playerready",function(e){var t=this.mux.utils.now();this.data.player_init_time&&(this.data.player_startup_time=t-this.data.player_init_time),this.pageLoadInitTime=this.data.page_load_init_time||this.pageLoadInitTime,this.pageLoadEndTime=this.data.page_load_end_time||this.pageLoadEndTime,!this.mux.PLAYER_TRACKED&&this.pageLoadInitTime&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.pageLoadEndTime)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.pageLoadEndTime||1/0)-this.pageLoadInitTime)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time}),n.longResumeTracker=new oh(se(n)),n.errorTracker=new sO(se(n)),new sY(se(n)),n.seekingTracker=new sF(se(n)),n.playheadTime=new sW(se(n)),n.playbackHeartbeat=new sN(se(n)),new sq(se(n)),n.watchTimeTracker=new sU(se(n)),new sH(se(n)),new og(se(n)),n.adTracker=new sj(se(n)),new s$(se(n)),new sB(se(n)),new sV(se(n)),new oc(se(n)),new op(se(n)),new ob(se(n)),r.hlsjs&&n.addHLSJS(r),r.dashjs&&n.addDashJS(r),n.emit("viewinit",r.data),n}return sa(a,[{key:"emit",value:function(e,t){var i,r=Object.assign({viewer_time:this.mux.utils.now()},t),n=[e,r];if(this.emitTranslator)try{n=this.emitTranslator(e,r)}catch(e){this.mux.log.warn("Exception in emit translator callback.",e)}null!=n&&n.length&&(i=ss(sn(a.prototype),"emit",this)).call.apply(i,[this].concat(n9(n)))}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,void 0!==this.data.view_start&&(this.emit
2508("viewend"),this.send("viewend")),this.playbackEventDispatcher.destroy(),this.removeHLSJS(),this.removeDashJS(),window.clearTimeout(this._heartBeatTimeout))}},{key:"send",value:function(e){if(this.data.view_id){var t=Object.assign({},this.data);if(void 0===t.video_source_is_live&&(t.player_source_duration===1/0||t.video_source_duration===1/0?t.video_source_is_live=!0:(t.player_source_duration>0||t.video_source_duration>0)&&(t.video_source_is_live=!1)),t.video_source_is_live||["player_program_time","player_manifest_newest_program_time","player_live_edge_program_time","player_program_time","video_holdback","video_part_holdback","video_target_duration","video_part_target_duration"].forEach(function(e){t[e]=void 0}),t.video_source_url=t.video_source_url||t.player_source_url,t.video_source_url){var i=nZ(sd(t.video_source_url),2),a=i[0];t.video_source_domain=i[1],t.video_source_hostname=a}delete t.ad_request_id,t.video_playback_ranges&&(t.video_playback_range=JSON.stringify(t.video_playback_ranges.filter(function(e){return e[0]!==e[1]}).map(function(e){return"".concat(e[0],":").concat(e[1])})),delete t.video_playback_ranges),this.playbackEventDispatcher.send(e,t),this.data.view_sequence_number++,this.data.player_sequence_number++,of.has(e)||this._restartHeartBeat(),"viewend"===e&&delete this.data.view_id}}},{key:"_resetView",value:function(e){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",e)}},{key:"_updateStateData",value:function(){var e,t=this.getStateData();if("function"==typeof this.stateDataTranslator)try{t=this.stateDataTranslator(t)}catch(e){this.mux.log.warn("Exception in stateDataTranslator translator callback.",e)}null!=(e=this.data)&&e.video_cdn&&null!=t&&t.video_cdn&&(t.video_cdn,t=function(e,t){if(null==e)return{};var i,a,r=function(e,t){if(null==e)return{};var i,a,r={},n=Object.keys(e);for(a=0;a<n.length;a++)i=n[a],t.indexOf(i)>=0||(r[i]=e[i]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}(t,["video_cdn"])),Object.assign(this.data,t),this.playheadTime._updatePlayheadTime(),this._sanitizeData()}},{key:"_sanitizeData",value:function(){var e=this;["player_width","player_height","video_source_width","video_source_height","player_playhead_time","video_source_bitrate"].forEach(function(t){var i=parseInt(e.data[t],10);e.data[t]=isNaN(i)?void 0:i}),["player_source_url","video_source_url"].forEach(function(t){if(e.data[t]){var i=e.data[t].toLowerCase();(0===i.indexOf("data:")||0===i.indexOf("blob:"))&&(e.data[t]="MSE style URL")}})}},{key:"_resetVideoData",value:function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("video_")&&delete e.data[t]})}},{key:"_resetViewData",value:function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("view_")&&delete e.data[t]}),this.data.view_sequence_number=1}},{key:"_resetErrorData",value:function(){delete this.data.player_error_code,delete this.data.player_error_message,delete this.data.player_error_context,delete this.data.player_error_severity,delete this.data.player_error_business_exception}},{key:"_initializeViewData",value:function(){var e=this,t=this.data.view_id=n2(),i=function(){t===e.data.view_id&&sp(e.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",i):i()}},{key:"_restartHeartBeat",value:function(){var e=this;window.clearTimeout(this._heartBeatTimeout),this._heartBeatTimeout=window.setTimeout(function(){e.data.player_is_paused||e.emit("hb")},1e4)}},{key:"addHLSJS",value:function(e){e.hlsjs?this.hlsjs?this.mux.log.warn("An instance of HLS.js is already being monitored for this player."):(this.hlsjs=e.hlsjs,sw(this.mux,this.id,e.hlsjs,{},e.Hls||window.Hls)):this.mux.log.warn("You must pass a valid hlsjs instance in order to track it.")}},{key:"removeHLSJS",value:function(){this.hlsjs&&(sT(this.hlsjs),this.hlsjs=void 0)}},{key:"addDashJS",value:function(e){e.dashjs?this.dashjs?this.mux.log.warn("An instance of Dash.js is already being monitored for this player."):(this.dashjs=e.dashjs,sL(this.mux,this.id,e.dashjs)):this.mux.log.warn("You must pass a valid dashjs instance in order to track it.")}},{key:"removeDashJS",value:function(){this.dashjs&&(sR(this.dashjs),this.dashjs=void 0)}}]),a}(sD),o_=nL(nY());function ok(){return o_.default&&!!(o_.default.fullscreenElement||o_.default.webkitFullscreenElement||o_.default.mozFullScreenElement||o_.default.msFullscreenElement)}var oA,ow,oT,oI,oS,oC,oM,oL,oR,ox,oD,oP,oN,oO,oU,oH,oW,oB,o$,oV,oq,oF,oG,oK,oj,oY,oQ,oz,oZ,oX,oJ,o0,o1,o2,o3,o4,o5,o9,o8,o7,o6,le,lt,li,la,lr,ln,ls,lo,ll,ld,lu,lc,lh,lm,lp,lv,lb,lg,lE,lf,ly,l_,lk,lA,lw,lT,lI,lS,lC,lM,lL,lR,lx,lD,lP,lN,lO,lU,lH,lW,lB,l$,lV,lq,lF,lG,lK,lj,lY,lQ,lz,lZ,lX,lJ,l0,l1,l2,l3,l4,l5,l9,l8,l7,l6,de,dt,di,da,dr,dn,ds,dl,dd,du,dc,dh,dm,dp,dv,db,dg,dE,df,dy,d_,dk,dA,dw,dT,dI,dS,dC,dM,dL,dR,dx,dD,dP,dN,dO,dU,dH,dW,dB,d$,dV,dq,dF,dG,dK,dj,dY,dQ,dz,dZ,dX,dJ,d0,d1,d2,d3,d4,d5,d9,d8,d7,d6,ue,ut,ui,ua,ur,un,us,uo,ul,ud,uu,u
2508c,uh,um,up,uv,ub,ug,uE,uf,uy,u_,uk,uA,uw,uT,uI,uS,uC,uM,uL,uR,ux,uD,uP,uN,uO,uU,uH,uW,uB,u$,uV,uq,uF,uG,uK,uj,uY,uQ,uz,uZ,uX,uJ,u0,u1,u2,u3,u4,u5,u9,u8,u7,u6,ce,ct,ci=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],ca={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},cr=nL(nR());cr.default&&cr.default.WeakMap&&(ct=new WeakMap);var cn=function(e){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(e),this.manifest};cn.prototype.process=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.processLine(this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},cn.prototype.processLine=function(e){var t=e.indexOf(":"),i=ch(e,t),a=i[0],r=2===i.length?cl(i[1]):void 0;if("#"!==a[0])this.currentUri.uri=a,this.manifest.segments.push(this.currentUri),!this.manifest.targetDuration||"duration"in this.currentUri||(this.currentUri.duration=this.manifest.targetDuration),this.currentUri={};else switch(a){case"#EXT-X-TARGETDURATION":if(!isFinite(r)||r<0)return;this.manifest.targetDuration=r,this.setHoldBack();break;case"#EXT-X-PART-INF":cs(this.manifest,i),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break;case"#EXT-X-SERVER-CONTROL":cs(this.manifest,i),this.setHoldBack();break;case"#EXTINF":0===r?this.currentUri.duration=.01:r>0&&(this.currentUri.duration=r);break;case"#EXT-X-PROGRAM-DATE-TIME":var n=new Date(r);this.manifest.dateTimeString||(this.manifest.dateTimeString=r,this.manifest.dateTimeObject=n),this.currentUri.dateTimeString=r,this.currentUri.dateTimeObject=n;break;case"#EXT-X-VERSION":cs(this.manifest,i);break;case"#EXT-X-SESSION-DATA":var s=s_(cm(i[1]));Object.assign(this.manifest.sessionData,s)}},cn.prototype.setHoldBack=function(){var e=this.manifest,t=e.serverControl,i=e.targetDuration,a=e.partTargetDuration;if(t){var r="holdBack",n="partHoldBack",s=i&&3*i,o=a&&2*a;i&&!t.hasOwnProperty(r)&&(t[r]=s),s&&t[r]<s&&(t[r]=s),a&&!t.hasOwnProperty(n)&&(t[n]=3*a),a&&t[n]<o&&(t[n]=o)}};var cs=function(e,t){var i,a=co(t[0].replace("#EXT-X-",""));cc(t[1])?(i={},i=Object.assign(cu(t[1]),i)):i=cl(t[1]),e[a]=i},co=function(e){return e.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},cl=function(e){if("yes"===e.toLowerCase()||"no"===e.toLowerCase())return"yes"===e.toLowerCase();var t=-1!==e.indexOf(":")?e:parseFloat(e);return isNaN(t)?e:t},cd=function(e){var t={},i=e.split("=");return i.length>1&&(t[co(i[0])]=cl(i[1])),t},cu=function(e){for(var t=e.split(","),i={},a=0;t.length>a;a++)i=Object.assign(cd(t[a]),i);return i},cc=function(e){return e.indexOf("=")>-1},ch=function(e,t){return -1===t?[e]:[e.substring(0,t),e.substring(t+1)]},cm=function(e){var t={};if(e){var i=e.search(",");return[e.slice(0,i),e.slice(i+1)].forEach(function(e,i){for(var a=e.replace(/['"]+/g,"").split("="),r=0;r<a.length;r++)"DATA-ID"===a[r]&&(t["DATA-ID"]=a[1-r]),"VALUE"===a[r]&&(t.VALUE=a[1-r])}),{data:t}}},cp={safeCall:function(e,t,i,a){var r=a;if(e&&"function"==typeof e[t])try{r=e[t].apply(e,i)}catch(e){n8.info("safeCall error",e)}return r},safeIncrement:sp,getComputedStyle:function(e,t){var i;return e&&t&&cr.default&&"function"==typeof cr.default.getComputedStyle?(ct&&ct.has(e)&&(i=ct.get(e)),i||(i=cr.default.getComputedStyle(e,null),ct&&ct.set(e,i)),i.getPropertyValue(t)):""},secondsToMs:function(e){return Math.floor(1e3*e)},assign:Object.assign,headersStringToObject:sf,cdnHeadersToRequestId:sy,extractHostnameAndDomain:sd,extractHostname:sl,manifestParser:cn,generateShortID:n3,generateUUID:n2,now:n1,findMediaElement:n5},cv={},cb=function(e){var t=arguments;"string"==typeof e?cb.hasOwnProperty(e)?nX.default.setTimeout(function(){t=Array.prototype.splice.call(t,1),cb[e].apply(null,t)},0):n8.warn("`"+e+"` is an unknown task"):"function"==typeof e?nX.default.setTimeout(function(){e(cb)},0):n8.warn("`"+e+"` is invalid.")},cg={loaded:n1(),NAME:"mux-embed",VERSION:"5.17.10",API_VERSION:"2.1",PLAYER_TRACKED:!1,monitor:function(e,t){return function(e,t,i){var a=nZ(n5(t),3),r=a[0],n=a[1],s=a[2],o=e.log,l=e.utils.getComputedStyle,d=e.utils.secondsToMs;if(!r)return o.error("No element was found with the `"+n+"` query selector.");if("video"!==s&&"audio"!==s)return o.error("The element of `"+n+"` was not a media element.");r.mux&&(r.mux.destroy(),delete r.mux,o.warn("Already monitoring this video element, replacing existing event listeners")),(i=Object.assign({automaticErrorTracking:!0},i,{getPlayheadTime:function(){return d(r.currentTime)},getStateData:function(){var e,t,i=(null==(e=this.getPlayheadTime)?void 0:e.call(this))||d(r.currentTime),a=this.hlsjs&&this.hlsjs.url,n=this.dashjs&&"function"==typeof this.dashjs.getSource&&this.dashjs.getSource(),s={player_is_paused:r.paused,player_width:parseInt(l(r,"width")),player_height:parseInt(l(r,"height")),player_autoplay_on:r.autoplay,player_preload_on:r.preload,player_language_code:r.lang,player_is_fullscreen:ok(),video_poster_url:r.poster,video_source_url:a||n||r.currentSrc,video_source_duration:d(r.duration),video_source_height:r.videoHeight,video_source_width:r.videoWidth,view_dropped_frame_count:null==r||null==(t=r.getVideoPlaybackQuality)?void 0:t.call(r).droppedVideoFrames};if(r.getStartDate&&i>0){var o=r.getStartDate();if(o&&"function"==typeof o.getTime&&o.getTime()){var u=o.getTime();s.player_program_time=u+i,r.seekable.length>0&&(s.player_live_edge_program_time=u+r.seekable.end(r.seekable.length-1))}}return s}})).data=Object.assign({player_software:"HTML5 Video Element",player_mux_plugin_name:"VideoElementMonitor",player_mux_plugin_version:e.VERSION},i.data),r.mux=r.mux||{},r.mux.deleted=!1,r.mux.emit=function(t,i){e.emit(n,t,i)},r.mux.updateData=function(e){r.mux.emit("hb",e)};var u=function(){o.error("The monitor for this video element has already been destroyed.")};
2508r.mux.destroy=function(){Object.keys(r.mux.listeners).forEach(function(e){r.removeEventListener(e,r.mux.listeners[e],!1)}),delete r.mux.listeners,r.mux.fullscreenChangeListener&&(document.removeEventListener("fullscreenchange",r.mux.fullscreenChangeListener,!1),delete r.mux.fullscreenChangeListener),r.mux.destroy=u,r.mux.swapElement=u,r.mux.emit=u,r.mux.addHLSJS=u,r.mux.addDashJS=u,r.mux.removeHLSJS=u,r.mux.removeDashJS=u,r.mux.updateData=u,r.mux.setEmitTranslator=u,r.mux.setStateDataTranslator=u,r.mux.setGetPlayheadTime=u,r.mux.deleted=!0,e.emit(n,"destroy")},r.mux.swapElement=function(t){var i=nZ(n5(t),3),a=i[0],n=i[1],s=i[2];return a?"video"!==s&&"audio"!==s?e.log.error("The element of `"+n+"` was not a media element."):void(a.muxId=r.muxId,delete r.muxId,a.mux=a.mux||{},a.mux.listeners=Object.assign({},r.mux.listeners),delete r.mux.listeners,Object.keys(a.mux.listeners).forEach(function(e){r.removeEventListener(e,a.mux.listeners[e],!1),a.addEventListener(e,a.mux.listeners[e],!1)}),a.mux.fullscreenChangeListener=r.mux.fullscreenChangeListener,delete r.mux.fullscreenChangeListener,a.mux.swapElement=r.mux.swapElement,a.mux.destroy=r.mux.destroy,delete r.mux,r=a):e.log.error("No element was found with the `"+n+"` query selector.")},r.mux.addHLSJS=function(t){e.addHLSJS(n,t)},r.mux.addDashJS=function(t){e.addDashJS(n,t)},r.mux.removeHLSJS=function(){e.removeHLSJS(n)},r.mux.removeDashJS=function(){e.removeDashJS(n)},r.mux.setEmitTranslator=function(t){e.setEmitTranslator(n,t)},r.mux.setStateDataTranslator=function(t){e.setStateDataTranslator(n,t)},r.mux.setGetPlayheadTime=function(t){t||(t=i.getPlayheadTime),e.setGetPlayheadTime(n,t)},e.init(n,i),e.emit(n,"playerready"),r.paused||(e.emit(n,"play"),r.readyState>2&&e.emit(n,"playing")),r.mux.listeners={},ci.forEach(function(t){("error"!==t||i.automaticErrorTracking)&&(r.mux.listeners[t]=function(){var i={};if("error"===t){if(!r.error||1===r.error.code)return;i.player_error_code=r.error.code,i.player_error_message=ca[r.error.code]||r.error.message}e.emit(n,t,i)},r.addEventListener(t,r.mux.listeners[t],!1))}),r.mux.listeners.enterpictureinpicture=function(){e.emit(n,"playbackmodechange",{player_playback_mode:"pip",player_playback_mode_data:"{}"})},r.mux.listeners.leavepictureinpicture=function(){var t=ok()?"fullscreen":"standard";e.emit(n,"playbackmodechange",{player_playback_mode:t,player_playback_mode_data:"{}"})},r.addEventListener("enterpictureinpicture",r.mux.listeners.enterpictureinpicture,!1),r.addEventListener("leavepictureinpicture",r.mux.listeners.leavepictureinpicture,!1),r.mux.fullscreenChangeListener=function(){var t=ok(),i=document.fullscreenElement;if(t&&(i===r||null!=i&&i.contains(r)))e.emit(n,"playbackmodechange",{player_playback_mode:"fullscreen",player_playback_mode_data:"{}"});else if(!t){var a=document.pictureInPictureElement===r;e.emit(n,"playbackmodechange",{player_playback_mode:a?"pip":"standard",player_playback_mode_data:"{}"})}},document.addEventListener("fullscreenchange",r.mux.fullscreenChangeListener,!1)}(cb,e,t)},destroyMonitor:function(e){var t=nZ(n5(e),1)[0];t&&t.mux&&"function"==typeof t.mux.destroy?t.mux.destroy():n8.error("A video element monitor for `"+e+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(e,t){var i=n4(e);cv[i]?cv[i].addHLSJS(t):n8.error("A monitor for `"+i+"` has not been initialized.")},addDashJS:function(e,t){var i=n4(e);cv[i]?cv[i].addDashJS(t):n8.error("A monitor for `"+i+"` has not been initialized.")},removeHLSJS:function(e){var t=n4(e);cv[t]?cv[t].removeHLSJS():n8.error("A monitor for `"+t+"` has not been initialized.")},removeDashJS:function(e){var t=n4(e);cv[t]?cv[t].removeDashJS():n8.error("A monitor for `"+t+"` has not been initialized.")},init:function(e,t){n6()&&t&&t.respectDoNotTrack&&n8.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var i=n4(e);cv[i]=new oy(cb,i,t)},emit:function(e,t,i){var a=n4(e);cv[a]?(cv[a].emit(t,i),"destroy"===t&&delete cv[a]):n8.error("A monitor for `"+a+"` has not been initialized.")},updateData:function(e,t){var i=n4(e);cv[i]?cv[i].emit("hb",t):n8.error("A monitor for `"+i+"` has not been initialized.")},setEmitTranslator:function(e,t){var i=n4(e);cv[i]?cv[i].emitTranslator=t:n8.error("A monitor for `"+i+"` has not been initialized.")},setStateDataTranslator:function(e,t){var i=n4(e);cv[i]?cv[i].stateDataTranslator=t:n8.error("A monitor for `"+i+"` has not been initialized.")},setGetPlayheadTime:function(e,t){var i=n4(e);cv[i]?cv[i].getPlayheadTime=t:n8.error("A monitor for `"+i+"` has not been initialized.")},checkDoNotTrack:n6,log:n8,utils:cp,events:{PLAYER_READY:"playerready",VIEW_INIT:"viewinit",VIDEO_CHANGE:"videochange",PLAY:"play",PAUSE:"pause",PLAYING:"playing",TIME_UPDATE:"timeupdate",SEEKING:"seeking",SEEKED:"seeked",REBUFFER_START:"rebufferstart",REBUFFER_END:"rebufferend",ERROR:"error",ENDED:"ended",RENDITION_CHANGE:"renditionchange",ORIENTATION_CHANGE:"orientationchange",PLAYBACK_MODE_CHANGE:"playbackmodechange",AD_REQUEST:"adrequest",AD_RESPONSE:"adresponse",AD_BREAK_START:"adbreakstart",AD_PLAY:"adplay",AD_PLAYING:"adplaying",AD_PAUSE:"adpause",AD_FIRST_QUARTILE:"adfirstquartile",AD_MID_POINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",AD_ENDED:"adended",AD_BREAK_END:"adbreakend",AD_ERROR:"aderror",REQUEST_COMPLETED:"requestcompleted",REQUEST_FAILED:"requestfailed",REQUEST_CANCELLED:"requestcanceled",HEARTBEAT:"hb",DESTROY:"destroy"},WINDOW_HIDDEN:!1,WINDOW_UNLOADING:!1};Object.assign(cb,cg),void 0!==nX.default&&"function"==typeof nX.default.addEventListener&&nX.default.addEventListener("pagehide",function(e){e.persisted||(cb.WINDOW_UNLOADING=!0)},!1);var cE=i(38309),cf=cE.Ay,cy="video",c_=e=>
2508e===cy?"playback":e,ck=class e extends Error{constructor(t,i=e.MEDIA_ERR_CUSTOM,a,r){var n;super(t),this.name="MediaError",this.code=i,this.context=r,this.fatal=null!=a?a:i>=e.MEDIA_ERR_NETWORK&&i<=e.MEDIA_ERR_ENCRYPTED,this.message||(this.message=null!=(n=e.defaultMessages[this.code])?n:"")}};ck.MEDIA_ERR_ABORTED=1,ck.MEDIA_ERR_NETWORK=2,ck.MEDIA_ERR_DECODE=3,ck.MEDIA_ERR_SRC_NOT_SUPPORTED=4,ck.MEDIA_ERR_ENCRYPTED=5,ck.MEDIA_ERR_CUSTOM=100,ck.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail.",3:"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.",4:"An unsupported error occurred. The server or network failed, or your browser does not support this format.",5:"The media is encrypted and there are no keys to decrypt it."};var cA=(e,t)=>null!=t&&e in t,cw={ANY:"any",MUTED:"muted"},cT="on-demand",cI="live",cS="unknown",cC="native",cM={HEADER:"header",QUERY:"query",NONE:"none"},cL=Object.values(cM),cR={M3U8:"application/vnd.apple.mpegurl",MP4:"video/mp4"},cx={HLS:cR.M3U8};Object.keys(cx),[...Object.values(cR)];var cD={code:"en"},cP=(e,t,i,a,r=e)=>{r.addEventListener(t,i,a),e.addEventListener("teardown",()=>{r.removeEventListener(t,i)},{once:!0})},cN=e=>{let t=e.indexOf("?");return t<0?[e]:[e.slice(0,t),e.slice(t)]},cO=e=>{let{type:t}=e;if(t){let e=t.toUpperCase();return cA(e,cx)?cx[e]:t}return cW(e)},cU=e=>"VOD"===e?cT:cI,cH=e=>"EVENT"===e?1/0:"VOD"===e?NaN:0,cW=e=>{let{src:t}=e;if(!t)return"";let i="";try{i=new URL(t).pathname}catch{console.error("invalid url")}let a=i.lastIndexOf(".");if(a<0)return c$(e)?cR.M3U8:"";let r=i.slice(a+1).toUpperCase();return cA(r,cR)?cR[r]:""},cB="mux.com",c$=({src:e,customDomain:t=cB})=>{let i;try{i=new URL(`${e}`)}catch{return!1}let a="https:"===i.protocol,r=i.hostname===`stream.${t}`.toLowerCase(),n=i.pathname.split("/"),s=2===n.length,o=!(null!=n&&n[1].includes("."));return a&&r&&s&&o},cV=e=>{let t=(null!=e?e:"").split(".")[1];if(t)try{let e=t.replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(e).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)}catch{return}};function cq(e,t=!0){var i;return new cF(t&&null!=(i=null==cD?void 0:cD[e])?i:e,t?cD.code:"en")}var cF=class{constructor(e,t=(e=>null!=(e=cD)?e:"en")()){this.message=e,this.locale=t}format(e){return this.message.replace(/\{(\w+)\}/g,(t,i)=>{var a;return null!=(a=e[i])?a:""})}toString(){return this.message}},cG=Object.values(cw),cK=e=>"boolean"==typeof e||"string"==typeof e&&cG.includes(e),cj=(e,t)=>{if(!t)return;let i=e.muted,a=()=>e.muted=i;switch(t){case cw.ANY:e.play().catch(()=>{e.muted=!0,e.play().catch(a)});break;case cw.MUTED:e.muted=!0,e.play().catch(a);break;default:e.play().catch(()=>{})}},cY=e=>"time"in e?e.time:e.startTime;function cQ(e,t,i,a,r,n){let s=document.createElement("track");return s.kind=t,s.label=i,a&&(s.srclang=a),r&&(s.id=r),n&&(s.default=!0),s.track.mode=["subtitles","captions"].includes(t)?"disabled":"hidden",s.setAttribute("data-removeondestroy",""),e.append(s),s.track}function cz(e,t,i){var a;return null==(a=Array.from(e.querySelectorAll("track")).find(e=>e.track.label===t&&e.track.kind===i))?void 0:a.track}async function cZ(e,t,i,a){let r=cz(e,i,a);return r||((r=cQ(e,a,i)).mode="hidden",await new Promise(e=>setTimeout(()=>e(void 0),0))),"hidden"!==r.mode&&(r.mode="hidden"),[...t].sort((e,t)=>cY(t)-cY(e)).forEach(t=>{var i,n;let s=t.value,o=cY(t);if("endTime"in t&&null!=t.endTime)null==r||r.addCue(new VTTCue(o,t.endTime,"chapters"===a?s:JSON.stringify(null!=s?s:null)));else{let t=Array.prototype.findIndex.call(null==r?void 0:r.cues,e=>e.startTime>=o),l=null==(i=null==r?void 0:r.cues)?void 0:i[t],d=l?l.startTime:Number.isFinite(e.duration)?e.duration:Number.MAX_SAFE_INTEGER,u=null==(n=null==r?void 0:r.cues)?void 0:n[t-1];u&&(u.endTime=o),null==r||r.addCue(new VTTCue(o,d,"chapters"===a?s:JSON.stringify(null!=s?s:null)))}}),e.textTracks.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),r}var cX="cuepoints",cJ=Object.freeze({label:cX});async function c0(e,t,i=cJ){return cZ(e,t,i.label,"metadata")}var c1=e=>({time:e.startTime,value:JSON.parse(e.text)});function c2(e,t={label:cX}){var i,a;let r=cz(e,t.label,"metadata");if(!(null!=(i=null==r?void 0:r.activeCues)&&i.length))return;if(1===r.activeCues.length)return c1(r.activeCues[0]);let{currentTime:n}=e;return c1(Array.prototype.find.call(null!=(a=r.activeCues)?a:[],({startTime:e,endTime:t})=>e<=n&&t>n)||r.activeCues[0])}async function c3(e,t=cJ){return new Promise(i=>{cP(e,"loadstart",async()=>{let a=await c0(e,[],t);cP(e,"cuechange",()=>{let t=c2(e);if(t){let i=new CustomEvent("cuepointchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(i)}},{},a),i(a)})})}var c4="chapters",c5=Object.freeze({label:c4}),c9=e=>({startTime:e.startTime,endTime:e.endTime,value:e.text});async function c8(e,t,i=c5){return cZ(e,t,i.label,"chapters")}function c7(e,t={label:c4}){var i,a;let r=cz(e,t.label,"chapters");if(!(null!=(i=null==r?void 0:r.activeCues)&&i.length))return;if(1===r.activeCues.length)return c9(r.activeCues[0]);let{currentTime:n}=e;return c9(Array.prototype.find.call(null!=(a=r.activeCues)?a:[],({startTime:e,endTime:t})=>e<=n&&t>n)||r.activeCues[0])}
2508async function c6(e,t=c5){return new Promise(i=>{cP(e,"loadstart",async()=>{let a=await c8(e,[],t);cP(e,"cuechange",()=>{let t=c7(e);if(t){let i=new CustomEvent("chapterchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(i)}},{},a),i(a)})})}var he=(e,t,i,a,r=!1,n=!(e=>null==(e=globalThis.navigator)?void 0:e.onLine)())=>{var s,o,l,d;let u,c;if(n){let i=cq("Your device appears to be offline",r),a=ck.MEDIA_ERR_NETWORK,n=new ck(i,a,!1,void 0);return n.errorCategory=t,n.muxCode=2000002,n.data=e,n}let h="status"in e?e.status:e.code,m=Date.now(),v=ck.MEDIA_ERR_NETWORK;if(200===h)return;let b=c_(t),g=(u=c_(t),c=`${u}Token`,null!=(l=i.tokens)&&l[u]?null==(d=i.tokens)?void 0:d[u]:cA(c,i)?i[c]:void 0),E=t===cy?"v":"drm"===t?"d":void 0,[f]=cN(null!=(s=i.playbackId)?s:"");if(!h||!f)return;let y=cV(g);if(g&&!y){let i=new ck(cq("The {tokenNamePrefix}-token provided is invalid or malformed.",r).format({tokenNamePrefix:b}),v,!0,cq("Compact JWT string: {token}",r).format({token:g}));return i.errorCategory=t,i.muxCode=2412202,i.data=e,i}if(h>=500){let e=new ck("",v,null==a||a);return e.errorCategory=t,e.muxCode=2e6,e}if(403===h)if(y){if((({exp:e},t=Date.now())=>!e||1e3*e<t)(y,m)){let i={timeStyle:"medium",dateStyle:"medium"},a=new ck(cq("The videoâs secured {tokenNamePrefix}-token has expired.",r).format({tokenNamePrefix:b}),v,!0,cq("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat("en",i).format(null!=(o=y.exp)?o:0),currentDate:new Intl.DateTimeFormat("en",i).format(m)}));return a.errorCategory=t,a.muxCode=2403210,a.data=e,a}if((({sub:e},t)=>e!==t)(y,f)){let i=new ck(cq("The videoâs playback ID does not match the one encoded in the {tokenNamePrefix}-token.",r).format({tokenNamePrefix:b}),v,!0,cq("Specified playback ID: {playbackId} and the playback ID encoded in the {tokenNamePrefix}-token: {tokenPlaybackId}",r).format({tokenNamePrefix:b,playbackId:f,tokenPlaybackId:y.sub}));return i.errorCategory=t,i.muxCode=2403232,i.data=e,i}if((({aud:e},t)=>!e)(y,0)){let i=new ck(cq("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:b}),v,!0,cq("The {tokenNamePrefix}-token has no aud value. aud value should be {expectedAud}.",r).format({tokenNamePrefix:b,expectedAud:E}));return i.errorCategory=t,i.muxCode=2403221,i.data=e,i}if((({aud:e},t)=>e!==t)(y,E)){let i=new ck(cq("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:b}),v,!0,cq("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.",r).format({tokenNamePrefix:b,expectedAud:E,aud:y.aud}));return i.errorCategory=t,i.muxCode=2403222,i.data=e,i}}else{let i=new ck(cq("Authorization error trying to access this {category} URL. If this is a signed URL, you might need to provide a {tokenNamePrefix}-token.",r).format({tokenNamePrefix:b,category:t}),v,null==a||a,cq("Specified playback ID: {playbackId}",r).format({playbackId:f}));return i.errorCategory=t,i.muxCode=2403201,i.data=e,i}if(412===h){let n=new ck(cq("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),v,null==a||a,cq("Specified playback ID: {playbackId}",r).format({playbackId:f}));return n.errorCategory=t,n.muxCode=2412e3,n.streamType=i.streamType===cI?"live":i.streamType===cT?"on-demand":"unknown",n.data=e,n}if(404===h){let i=new ck(cq("This URL or playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),v,null==a||a,cq("Specified playback ID: {playbackId}",r).format({playbackId:f}));return i.errorCategory=t,i.muxCode=2404e3,i.data=e,i}if(400===h){let i=new ck(cq("The URL or playback-id was invalid. You may have used an invalid value as a playback-id."),v,null==a||a,cq("Specified playback ID: {playbackId}",r).format({playbackId:f}));return i.errorCategory=t,i.muxCode=24e5,i.data=e,i}let _=new ck("",v,null==a||a);return _.errorCategory=t,_.muxCode=2e6,_.data=e,_},ht=cf.DefaultConfig.capLevelController,hi={"720p":921600,"1080p":2073600,"1440p":4194304,"2160p":8294400},ha=class e extends ht{constructor(e){super(e)}static setMaxAutoResolution(t,i){i?e.maxAutoResolution.set(t,i):e.maxAutoResolution.delete(t)}getMaxAutoResolution(){var t;let i=this.hls;return null!=(t=e.maxAutoResolution.get(i))?t:void 0}get levels(){var e;return null!=(e=this.hls.levels)?e:[]}getValidLevels(e){return this.levels.filter((t,i)=>this.isLevelAllowed(t)&&i<=e)}getMaxLevelCapped(e){let t=this.getValidLevels(e),i=this.getMaxAutoResolution();if(!i)return super.getMaxLevel(e);let a=hi[i.toLowerCase().trim()];if(!a)return super.getMaxLevel(e);let r=t.filter(e=>e.width*e.height<=a),n=r.findIndex(e=>e.width*e.height===a);if(-1!==n){let e=r[n];return t.findIndex(t=>t===e)}if(0===r.length)return 0;let s=r[r.length-1];return t.findIndex(e=>e===s)}getMaxLevel(t){if(void 0!==this.getMaxAutoResolution())return this.getMaxLevelCapped(t);let i=super.getMaxLevel(t),a=this.getValidLevels(t);if(!a[i])return i;let r=Math.min(a[i].width,a[i].height),n=e.minMaxResolution;return r>=n?i:ht.getMaxLevelByMediaSize(a,16/9*n,n)}};ha.minMaxResolution=720,ha.maxAutoResolution=new WeakMap;var hr,hn,hs,ho,hl,hd,hu=e=>new TextDecoder("utf-16le").decode(e).replace("skd://","").slice(1),hc="fairplay",hh=/([A-Z0-9-]+)="?(.*?)"?(?:,|$)/g,hm=async(e,t)=>{if(t===cR.MP4)return{streamType:cT,targetLiveWindow:NaN,liveEdgeStartOffset:void 0,sessionData:void 0};if(t===cR.M3U8){let t=await fetch(e);if(!t.ok)return Promise.reject(t);let i=await t.text(),a=await fetch(i.split(` 2509`).find((e,t,i)=>t&&i[t-1].startsWith("#EXT-X-STREAM-INF"))).then(e=>200!==e.status?Promise.reject(e):e.text());return{...(e=>{let t=e.split(` 2510`).filter(e=>e.startsWith("#EXT-X-SESSION-DATA"));if(!t.length)return{};let i={};for(let e of t){let t=Object.fromEntries([...e.matchAll(hh)].map(([,e,t])=>[e,t])),a=t["DATA-ID"];a&&(i[a]={...t})}return{sessionData:i}})(i),...(e=>{var t,i,a;let r=e.split(` 2511`),n=null==(i=(null!=(t=r.find(e=>e.startsWith("#EXT-X-PLAYLIST-TYPE")))?t:"").split(":")[1])?void 0:i.trim(),s=cU(n),o=cH(n),l;if(s===cI){let e=r.find(e=>e.startsWith("#EXT-X-PART-INF"));if(e)l=2*e.split(":")[1].split("=")[1];else{let e=r.find(e=>e.startsWith("#EXT-X-TARGETDURATION")),t=null==(a=null==e?void 0:e.split(":"))?void 0:a[1];l=(null!=t?t:6)*3}}return{streamType:s,targetLiveWindow:o,liveEdgeStartOffset:l}})(a)}}return console.error(`Media type ${t} is an unrecognized or unsupported type for src ${e}.`),{streamType:void 0,targetLiveWindow:void 0,liveEdgeStartOffset:void 0,sessionData:void 0}}
2511,hp=async(e,t,i=cO({src:e}))=>{var a,r,n,s;let{streamType:o,targetLiveWindow:l,liveEdgeStartOffset:d,sessionData:u}=await hm(e,i),c=null==u?void 0:u["com.apple.hls.chapters"];(null!=c&&c.URI||null!=c&&c.VALUE.toLocaleLowerCase().startsWith("http"))&&hv(null!=(a=c.URI)?a:c.VALUE,t),(null!=(r=hf.get(t))?r:{}).liveEdgeStartOffset=d,(null!=(n=hf.get(t))?n:{}).targetLiveWindow=l,t.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),(null!=(s=hf.get(t))?s:{}).streamType=o,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},hv=async(e,t)=>{var i,a;try{let r=await fetch(e);if(!r.ok)throw Error(`Failed to fetch Mux metadata: ${r.status} ${r.statusText}`);let n=await r.json(),s={};if(!(null!=(i=null==n?void 0:n[0])&&i.metadata))return;for(let e of n[0].metadata)e.key&&e.value&&(s[e.key]=e.value);(null!=(a=hf.get(t))?a:{}).metadata=s;let o=new CustomEvent("muxmetadata");t.dispatchEvent(o)}catch(e){console.error(e)}},hb=null!=(hn=null==(hr=null==globalThis?void 0:globalThis.navigator)?void 0:hr.userAgent)?hn:"",hg=null!=(hl=null==(ho=null==(hs=null==globalThis?void 0:globalThis.navigator)?void 0:hs.userAgentData)?void 0:ho.platform)?hl:"",hE=hb.toLowerCase().includes("android")||["x11","android"].some(e=>hg.toLowerCase().includes(e)),hf=new WeakMap,hy="mux.com",h_=null==(hd=cf.isSupported)?void 0:hd.call(cf),hk=()=>{if("u">typeof window)return cb.utils.now()},hA=cb.utils.generateUUID,hw=({playbackId:e,customDomain:t=hy,maxResolution:i,minResolution:a,renditionOrder:r,programStartTime:n,programEndTime:s,assetStartTime:o,assetEndTime:l,playbackToken:d,tokens:{playback:u=d}={},extraSourceParams:c={}}={})=>{if(!e)return;let[h,m=""]=cN(e),v=new URL(`https://stream.${t}/${h}.m3u8${m}`);return u||v.searchParams.has("token")?(v.searchParams.forEach((e,t)=>{"token"!=t&&v.searchParams.delete(t)}),u&&v.searchParams.set("token",u)):(i&&v.searchParams.set("max_resolution",i),a&&(v.searchParams.set("min_resolution",a),i&&+i.slice(0,-1)<+a.slice(0,-1)&&console.error("minResolution must be <= maxResolution","minResolution",a,"maxResolution",i)),r&&v.searchParams.set("rendition_order",r),n&&v.searchParams.set("program_start_time",`${n}`),s&&v.searchParams.set("program_end_time",`${s}`),o&&v.searchParams.set("asset_start_time",`${o}`),l&&v.searchParams.set("asset_end_time",`${l}`),Object.entries(c).forEach(([e,t])=>{null!=t&&v.searchParams.set(e,t)})),v.toString()},hT=e=>{if(!e)return;let[t]=e.split("?");return t||void 0},hI=e=>{if(!e||!e.startsWith("https://stream."))return;let[t]=new URL(e).pathname.slice(1).split(/\.m3u8|\//);return t||void 0},hS=e=>{var t;return null==(t=hf.get(e))?void 0:t.error},hC=e=>{var t,i;return null!=(i=null==(t=hf.get(e))?void 0:t.streamType)?i:cS},hM=e=>{var t,i;return null!=(i=null==(t=hf.get(e))?void 0:t.seekable)?i:e.seekable},hL=.034,hR=(e,t,i=hL)=>e>t||((e,t,i=hL)=>Math.abs(e-t)<=i)(e,t,i),hx=(e,t)=>{var i,a,r;if(!t||!e.buffered.length)return;if(e.readyState>2)return!1;let n=t.currentLevel>=0?null==(a=null==(i=t.levels)?void 0:i[t.currentLevel])?void 0:a.details:null==(r=t.levels.find(e=>!!e.details))?void 0:r.details;if(!n||n.live)return;let{fragments:s}=n;if(!(null!=s&&s.length))return;if(e.currentTime<e.duration-(n.targetduration+.5))return!1;let o=s[s.length-1];if(e.currentTime<=o.start)return!1;let l=o.start+o.duration/2,d=e.buffered.start(e.buffered.length-1),u=e.buffered.end(e.buffered.length-1);return l>d&&l<u},hD=(e,t)=>e.ended||e.loop?e.ended:!!(t&&hx(e,t))||((e,t=hL)=>e.paused&&hR(e.currentTime,e.duration,t))(e),hP=(e,t,i)=>{var a,r,n;hN(t,i,e);let{metadata:s={}}=e,{view_session_id:o=hA()}=s,l=null!=(a=null==e?void 0:e.metadata)&&a.video_id?e.metadata.video_id:hF(e)&&null!=(n=null!=(r=hT(e.playbackId))?r:hI(e.src))?n:e.src;s.view_session_id=o,s.video_id=l,e.metadata=s,e.drmTypeCb=e=>{var i;null==(i=t.mux)||i.emit("hb",{view_drm_type:e})},e.fallbackToWebkitFairplay=async()=>{var i;let a=!t.paused,r=t.currentTime;e.useWebkitFairplay=!0;let n=e.muxDataKeepSession;e.muxDataKeepSession=!0;let s=null==(i=hf.get(t))?void 0:i.coreReference;hP(e,t,s),e.muxDataKeepSession=n,e.useWebkitFairplay=!1,a&&await t.play().then(()=>{t.currentTime=r}).catch(()=>{}),t.currentTime=r},hf.set(t,{retryCount:0});let d=hU(e,t),u=(({preload:e,src:t},i,a)=>{let r=e=>{null!=e&&["","none","metadata","auto"].includes(e)?i.setAttribute("preload",e):i.removeAttribute("preload")};if(!a)return r(e),r;let n=!1,s=!1,o=a.config.maxBufferLength,l=a.config.maxBufferSize,d=e=>{r(e);let t=null!=e?e:i.preload;s||"none"===t||("metadata"===t?(a.config.maxBufferLength=1,a.config.maxBufferSize=1):(a.config.maxBufferLength=o,a.config.maxBufferSize=l),u())},u=()=>{!n&&t&&(n=!0,a.loadSource(t))};return cP(i,"play",()=>{s=!0,a.config.maxBufferLength=o,a.config.maxBufferSize=l,u()},{once:!0}),d(e),d})(e,t,d);null!=e&&e.muxDataKeepSession&&null!=t&&t.mux&&!t.mux.deleted?d&&t.mux.addHLSJS({hlsjs:d,Hls:d?cf:void 0}):hK(e,t,d),hj(e,t,d),c3(t),c6(t);let c=((e,t,i)=>{let{autoplay:a}=e,r=!1,n=!1,s=cK(a)?a:!!a,o=()=>{r||cP(t,"playing",()=>{r=!0},{once:!0})};if(o(),cP(t,"loadstart",()=>{r=!1,o(),cj(t,s)},{once:!0}),cP(t,"loadstart",()=>{i||(n=e.streamType&&e.streamType!==cS?e.streamType===cI:!Number.isFinite(t.duration)),cj(t,s)},{once:!0}),i&&i.once(cf.Events.LEVEL_LOADED,(t,i)=>{var a;n=e.streamType&&e.streamType!==cS?e.streamType===cI:null!=(a=i.details.live)&&a}),!s){let a=()=>{!n||Number.isFinite(e.startTime)||(null!=i&&i.liveSyncPosition?t.currentTime=i.liveSyncPosition:Number.isFinite(t.seekable.end(0))&&(t.currentTime=t.
2511seekable.end(0)))};i&&cP(t,"play",()=>{"metadata"===t.preload?i.once(cf.Events.LEVEL_UPDATED,a):a()},{once:!0})}return e=>{r||cj(t,s=cK(e)?e:!!e)}})(e,t,d),h={engine:d,setAutoplay:c,setPreload:u},m=hf.get(t);return m&&(m.coreReference=h),h},hN=(e,t,i)=>{let a=null==t?void 0:t.engine;null!=e&&e.mux&&!e.mux.deleted&&(null!=i&&i.muxDataKeepSession?a&&e.mux.removeHLSJS():(e.mux.destroy(),delete e.mux)),a&&(a.detachMedia(),a.destroy()),e&&(e.hasAttribute("src")&&(e.removeAttribute("src"),e.load()),e.removeEventListener("error",hQ),e.removeEventListener("error",hZ),e.removeEventListener("durationchange",hY),hf.delete(e),e.dispatchEvent(new Event("teardown")))};function hO(e,t){var i;let a=cO(e);if(a!==cR.M3U8)return!0;let r=!a||null==(i=t.canPlayType(a))||i,{preferPlayback:n}=e,s=h_&&("mse"===n||hE||!(/^((?!chrome|android).)*safari/i.test(hb)&&t.canPlayType("application/vnd.apple.mpegurl")));return r&&(n===cC||!s)}var hU=(e,t)=>{let{debug:i,streamType:a,startTime:r=-1,metadata:n,preferCmcd:s,_hlsConfig:o={},maxAutoResolution:l}=e,d=cO(e)===cR.M3U8,u=hO(e,t);if(d&&!u&&h_){let d=hH(a),u=hW(e),c=[cM.QUERY,cM.HEADER].includes(s)?{useHeaders:s===cM.HEADER,sessionId:null==n?void 0:n.view_session_id,contentId:null==n?void 0:n.video_id}:void 0,h=hG(e,o),m=new cf({debug:i,startPosition:r,cmcd:c,xhrSetup:(e,t)=>{var i,a;if(s&&s!==cM.QUERY)return;let r=new URL(t);if(!r.searchParams.has("CMCD"))return;let n=(null!=(a=null==(i=r.searchParams.get("CMCD"))?void 0:i.split(","))?a:[]).filter(e=>e.startsWith("sid")||e.startsWith("cid")).join(",");r.searchParams.set("CMCD",n),e.open("GET",r)},backBufferLength:30,renderTextTracksNatively:!1,liveDurationInfinity:!0,capLevelOnFPSDrop:!0,...h,...d,...u,...o});return h.capLevelController===ha&&void 0!==l&&ha.setMaxAutoResolution(m,l),m.on(cf.Events.MANIFEST_PARSED,async function(e,i){var a,r;let n=null==(a=i.sessionData)?void 0:a["com.apple.hls.chapters"];(null!=n&&n.URI||null!=n&&n.VALUE.toLocaleLowerCase().startsWith("http"))&&hv(null!=(r=null==n?void 0:n.URI)?r:null==n?void 0:n.VALUE,t)}),m}},hH=e=>e===cI?{backBufferLength:8}:{},hW=e=>{let{tokens:{drm:t}={},playbackId:i,drmTypeCb:a}=e,r=hT(i);return t&&r?{emeEnabled:!0,drmSystems:{"com.apple.fps":{licenseUrl:hV(e,"fairplay"),serverCertificateUrl:hq(e,"fairplay")},"com.widevine.alpha":{licenseUrl:hV(e,"widevine")},"com.microsoft.playready":{licenseUrl:hV(e,"playready")}},requestMediaKeySystemAccessFunc:(e,t)=>("com.widevine.alpha"===e&&(t=[...t.map(e=>{var t;let i=null==(t=e.videoCapabilities)?void 0:t.map(e=>({...e,robustness:"HW_SECURE_ALL"}));return{...e,videoCapabilities:i}}),...t]),navigator.requestMediaKeySystemAccess(e,t).then(t=>{let i=e.includes("fps")?hc:e.includes("playready")?"playready":e.includes("widevine")?"widevine":void 0;return null==a||a(i),t}))}:{}},hB=async e=>{let t=await fetch(e);return 200!==t.status?Promise.reject(t):await t.arrayBuffer()},h$=async(e,t)=>{let i=await fetch(t,{method:"POST",headers:{"Content-type":"application/octet-stream"},body:e});return 200!==i.status?Promise.reject(i):new Uint8Array(await i.arrayBuffer())},hV=({playbackId:e,tokens:{drm:t}={},customDomain:i=hy},a)=>{let r=hT(e);return`https://license.${i.toLocaleLowerCase().endsWith(hy)?i:hy}/license/${a}/${r}?token=${t}`},hq=({playbackId:e,tokens:{drm:t}={},customDomain:i=hy},a)=>{let r=hT(e);return`https://license.${i.toLocaleLowerCase().endsWith(hy)?i:hy}/appcert/${a}/${r}?token=${t}`},hF=({playbackId:e,src:t,customDomain:i})=>{if(e)return!0;if("string"!=typeof t)return!1;let a=new URL(t,null==window?void 0:window.location.href).hostname.toLocaleLowerCase();return a.includes(hy)||!!i&&a.includes(i.toLocaleLowerCase())},hG=(e,t)=>{let i={};return i.capLevelToPlayerSize=e.capRenditionToPlayerSize,null==i.capLevelToPlayerSize?(i.capLevelController=ha,i.capLevelToPlayerSize=!0):i.capLevelController=cE.Rx,i},hK=(e,t,i)=>{var a;let{envKey:r,disableTracking:n,muxDataSDK:s=cb,muxDataSDKOptions:o={}}=e,l=hF(e);if(!n&&(r||l)){let{playerInitTime:n,playerSoftwareName:l,playerSoftwareVersion:d,beaconCollectionDomain:u,debug:c,disableCookies:h}=e,m={...e.metadata,video_title:(null==(a=null==e?void 0:e.metadata)?void 0:a.video_title)||void 0};s.monitor(t,{debug:c,beaconCollectionDomain:u,hlsjs:i,Hls:i?cf:void 0,automaticErrorTracking:!1,errorTranslator:t=>"string"!=typeof t.player_error_code&&("function"==typeof e.errorTranslator?e.errorTranslator(t):t),disableCookies:h,...o,data:{...r?{env_key:r}:{},player_software_name:l,player_software:l,player_software_version:d,player_init_time:n,...m}})}},hj=(e,t,i)=>{var a,r;let n=hO(e,t),{src:s,customDomain:o=hy}=e,l=()=>{t.ended||e.disablePseudoEnded||!hD(t,i)||(hx(t,i)?t.currentTime=t.buffered.end(t.buffered.length-1):t.dispatchEvent(new Event("ended")))},d,u,c=()=>{let e=hM(t),i,a;e.length>0&&(i=e.start(0),a=e.end(0)),(u!==a||d!==i)&&t.dispatchEvent(new CustomEvent("seekablechange",{composed:!0})),d=i,u=a};if(cP(t,"durationchange",c),t&&n){let i=cO(e);
2511if("string"==typeof s){if(s.endsWith(".mp4")&&s.includes(o)){let e=hI(s);hv(new URL(`https://stream.${o}/${e}/metadata.json`).toString(),t)}let n=()=>{if(hC(t)!==cI||Number.isFinite(t.duration))return;let e=setInterval(c,1e3);t.addEventListener("teardown",()=>{clearInterval(e)},{once:!0}),cP(t,"durationchange",()=>{Number.isFinite(t.duration)&&clearInterval(e)})},l=async()=>hp(s,t,i).then(n).catch(i=>{if(i instanceof Response){let a=he(i,cy,e);if(a)return void hz(t,a)}});if("none"===t.preload){let e=()=>{l(),t.removeEventListener("loadedmetadata",i)},i=()=>{l(),t.removeEventListener("play",e)};cP(t,"play",e,{once:!0}),cP(t,"loadedmetadata",i,{once:!0})}else l();null!=(a=e.tokens)&&a.drm?((e,t)=>{let i={mediaEl:t,getAppCertificate:()=>hB(hq(e,"fairplay")).catch(t=>{if(t instanceof Response){let i=he(t,"drm",e);return console.error("mediaError",null==i?void 0:i.message,null==i?void 0:i.context),i?Promise.reject(i):Promise.reject(Error("Unexpected error in app cert request"))}return Promise.reject(t)}),getLicenseKey:t=>h$(t,hV(e,"fairplay")).catch(t=>{if(t instanceof Response){let i=he(t,"drm",e);return console.error("mediaError",null==i?void 0:i.message,null==i?void 0:i.context),i?Promise.reject(i):Promise.reject(Error("Unexpected error in license key request"))}return Promise.reject(t)}),saveAndDispatchError:hz,drmTypeCb:()=>{var t;null==(t=e.drmTypeCb)||t.call(e,hc)}};if(e.useWebkitFairplay)(({mediaEl:e,getAppCertificate:t,getLicenseKey:i,saveAndDispatchError:a,drmTypeCb:r})=>{if(!window.WebKitMediaKeys||!("onwebkitneedkey"in e)){console.error("No WebKitMediaKeys. FairPlay may not be supported");let t=new ck(cq("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),ck.MEDIA_ERR_ENCRYPTED,!0);return t.errorCategory="drm",t.muxCode=5000005,a(e,t),()=>{}}let n=t(),s=null,o=t=>{(async()=>{try{var i,r;let a,s,o,u,c,h,m,v;e.webkitKeys||l();let b=await n;if(null===t.initData||null==b)return;let g=(i=t.initData,r=b,a=function(e){let t=new ArrayBuffer(2*e.length),i=new DataView(t);for(let t=0;t<e.length;t++)i.setUint16(2*t,e.charCodeAt(t),!0);return t}(hu(i)),s=new Uint8Array(i),o=new Uint8Array(a),u=new Uint8Array(r),c=new Uint8Array(s.byteLength+4+u.byteLength+4+o.byteLength),h=0,m=e=>{c.set(e,h),h+=e.byteLength},v=e=>{let t=new DataView(c.buffer),i=e.byteLength;t.setUint32(h,i,!0),h+=4,m(e)},m(s),v(o),v(u),c);d(g)}catch(t){console.error("Could not start encrypted playback due to exception",t),a(e,t)}})()},l=()=>{try{let t=new WebKitMediaKeys("com.apple.fps.1_0");e.webkitSetMediaKeys(t),r()}catch{let e=new ck("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser.",ck.MEDIA_ERR_ENCRYPTED,!0);throw e.errorCategory="drm",e.muxCode=5000001,e}},d=t=>{let r=e.webkitKeys.createSession("application/vnd.apple.mpegurl",t),n=async t=>{try{let e=t.message,a=await i(e);r.update(a)}catch(t){console.error("Error on FairPlay session message",t),a(e,t)}},o=t=>{let i=t.target.error;if(!i)return;console.error(`Internal Webkit Key Session Error - sysCode: ${i.systemCode} code: ${i.code}`);let r=new ck(cq("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser."),ck.MEDIA_ERR_ENCRYPTED,!0);r.errorCategory="drm",r.muxCode=5000005,a(e,r)},l=()=>{r.removeEventListener("webkitkeymessage",n),r.removeEventListener("webkitkeyerror",o),e.removeEventListener("teardown",l),"webkitCurrentPlaybackTargetIsWireless"in e&&e.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",l),s=null;try{r.close()}catch{}};"webkitCurrentPlaybackTargetIsWireless"in e&&e.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",l,{once:!0}),r.addEventListener("webkitkeymessage",n),r.addEventListener("webkitkeyerror",o),e.addEventListener("teardown",l),s=l},u=()=>{e.removeEventListener("webkitneedkey",o),e.removeEventListener("teardown",u),null==s||s();try{e.webkitSetMediaKeys(null)}catch{}};return e.addEventListener("webkitneedkey",o),e.addEventListener("teardown",u,{once:!0})})(i);else{let t=(({mediaEl:e,getAppCertificate:t,getLicenseKey:i,saveAndDispatchError:a,drmTypeCb:r,fallbackToWebkitFairplay:n})=>{let s=null,o=async t=>{try{let i=t.initDataType;if("skd"!==i)return void console.error(`Received unexpected initialization data type "${i}"`);e.mediaKeys||await l(i);let a=t.initData;if(null==a)return void console.error(`Could not start encrypted playback due to missing initData in ${t.type} event`);await d(i,a)}catch(t){a(e,t);return}},l=async i=>{let n=await navigator.requestMediaKeySystemAccess("com.apple.fps",[{initDataTypes:[i],videoCapabilities:[{contentType:"application/vnd.apple.mpegurl",robustness:""}],distinctiveIdentifier:"not-allowed",persistentState:"not-allowed",sessionTypes:["temporary"]}]).then(e=>(r(),e)).catch(()=>{let t=new ck(cq("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),ck.MEDIA_ERR_ENCRYPTED,!0);t.errorCategory="drm",t.muxCode=5000001,a(e,t)});if(!n)return;let s=await n.createMediaKeys();try{let e=await t();await s.setServerCertificate(e).catch(()=>{let e=cq("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),t=new ck(e,ck.MEDIA_ERR_ENCRYPTED,!0);return t.errorCategory="drm",t.muxCode=5000004,Promise.reject(t)})}catch(t){a(e,t);return}await e.setMediaKeys(s)},d=async(t,r)=>{let o=e.mediaKeys.createSession(),l=async t=>{let r=t.message,n=await i(r);try{await o.update(n)}catch{let t=new ck(cq("Failed to update DRM license. This may be an issue with the player or your protected content."),ck.MEDIA_ERR_ENCRYPTED,!0);t.errorCategory="drm",t.muxCode=5000003,a(e,t)}},d=()=>
2511{o.keyStatuses.forEach(t=>{let i;"internal-error"===t?((i=new ck(cq("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser."),ck.MEDIA_ERR_ENCRYPTED,!0)).errorCategory="drm",i.muxCode=5000005):("output-restricted"===t||"output-downscaled"===t)&&((i=new ck(cq("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen."),ck.MEDIA_ERR_ENCRYPTED,!1)).errorCategory="drm",i.muxCode=5000006),i&&a(e,i)})};o.addEventListener("keystatuseschange",d),o.addEventListener("message",l);let u=async()=>{o.removeEventListener("keystatuseschange",d),o.removeEventListener("message",l),"webkitCurrentPlaybackTargetIsWireless"in e&&e.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",u),e.removeEventListener("teardown",u),await o.close().catch(e=>{console.warn("There was an error when closing EME session",e)}),s=null};"webkitCurrentPlaybackTargetIsWireless"in e&&e.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",u,{once:!0}),e.addEventListener("teardown",u,{once:!0}),s=u,await o.generateRequest(t,r).catch(async t=>{if("NotSupportedError"===t.name&&"webkitCurrentPlaybackTargetIsWireless"in e&&e.webkitCurrentPlaybackTargetIsWireless)console.warn("Failed to generate a DRM license request. Attempting to fallback to Webkit DRM"),null==n||n();else{let e=new ck(cq("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),ck.MEDIA_ERR_ENCRYPTED,!0);return e.errorCategory="drm",e.muxCode=5000002,console.error("Failed to generate license request",t),Promise.reject(e)}})},u=async()=>{e.removeEventListener("encrypted",o),e.removeEventListener("teardown",u),s&&await s(),await e.setMediaKeys(null).catch(()=>{})};return e.addEventListener("encrypted",o),e.addEventListener("teardown",u,{once:!0}),u})({fallbackToWebkitFairplay:async()=>{var i;await t(),null==(i=e.fallbackToWebkitFairplay)||i.call(e)},...i})}})(e,t):cP(t,"encrypted",()=>{let e=new ck(cq("Attempting to play DRM-protected content without providing a DRM token."),ck.MEDIA_ERR_ENCRYPTED,!0);e.errorCategory="drm",e.muxCode=5000002,hz(t,e)},{once:!0}),t.setAttribute("src",s),e.startTime&&((null!=(r=hf.get(t))?r:{}).startTime=e.startTime,t.addEventListener("durationchange",hY,{once:!0}))}else t.removeAttribute("src");t.addEventListener("error",hQ),t.addEventListener("error",hZ),t.addEventListener("emptied",()=>{t.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})},{once:!0}),cP(t,"pause",l),cP(t,"seeked",l),cP(t,"play",()=>{t.ended||hR(t.currentTime,t.duration)&&(t.currentTime=t.seekable.length?t.seekable.start(0):0)})}else{let a,r;i&&s?(i.once(cf.Events.LEVEL_LOADED,(e,a)=>{((e,t,i)=>{var a,r,n,s,o,l,d,u,c;let h,m,v,b,g,{streamType:E,targetLiveWindow:f,liveEdgeStartOffset:y,lowLatency:_}=(m=cU(h=e.type),v=cH(h),g=!!(null!=(c=e.partList)&&c.length),m===cI&&(b=g?2*e.partTarget:3*e.targetduration),{streamType:m,targetLiveWindow:v,liveEdgeStartOffset:b,lowLatency:g});if(E===cI){_?(i.config.backBufferLength=null!=(a=i.userConfig.backBufferLength)?a:4,i.config.maxFragLookUpTolerance=null!=(r=i.userConfig.maxFragLookUpTolerance)?r:.001,i.config.abrBandWidthUpFactor=null!=(n=i.userConfig.abrBandWidthUpFactor)?n:i.config.abrBandWidthFactor):i.config.backBufferLength=null!=(s=i.userConfig.backBufferLength)?s:8;let e=Object.freeze({get length(){return t.seekable.length},start:e=>t.seekable.start(e),end(e){var a;return e>this.length||e<0||Number.isFinite(t.duration)?t.seekable.end(e):null!=(a=i.liveSyncPosition)?a:t.seekable.end(e)}});(null!=(o=hf.get(t))?o:{}).seekable=e}(null!=(l=hf.get(t))?l:{}).liveEdgeStartOffset=y,(null!=(d=hf.get(t))?d:{}).targetLiveWindow=f,t.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),(null!=(u=hf.get(t))?u:{}).streamType=E,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))})(a.details,t,i),c(),hC(t)!==cI||Number.isFinite(t.duration)||(i.on(cf.Events.LEVEL_UPDATED,c),cP(t,"durationchange",()=>{Number.isFinite(t.duration)&&i.off(cf.Events.LEVELS_UPDATED,c)}))}),i.on(cf.Events.ERROR,(a,r)=>{var n,s;let o=hX(r,e);if(2412e3===o.muxCode){let e=null!=(n=hf.get(t))?n:{},a=null!=(s=e.retryCount)?s:0;if(a<6){let n=0===a?5e3:6e4,s=new ck(`Retrying in ${n/1e3} seconds...`,o.code,o.fatal);Object.assign(s,o),hz(t,s);let l=setTimeout(()=>{e.retryCount=a+1,"manifestLoadError"===r.details&&r.url&&i.loadSource(r.url)},n);t.addEventListener("teardown",()=>clearTimeout(l),{once:!0});return}{e.retryCount=0;let i=new ck('Try again later or <a href="#" onclick="window.location.reload(); return false;" style="color: #4a90e2;">click here to retry</a>',o.code,o.fatal);Object.assign(i,o),hz(t,i);return}}hz(t,o)}),i.on(cf.Events.MANIFEST_LOADED,()=>{let e=hf.get(t);e&&e.error&&(e.error=null,e.retryCount=0,t.dispatchEvent(new Event("emptied")),t.dispatchEvent(new Event("loadstart")))}),t.addEventListener("error",hZ),cP(t,"waiting",l),function(e,t){var i;if(!("videoTracks"in e))return;let a=new WeakMap;t.on(cf.Events.MANIFEST_PARSED,function(t,i){o();let r=e.addVideoTrack("main");for(let[e,t]of(r.selected=!0,i.levels.entries())){let i=r.addRendition(t.url[0],t.width,t.height,t.videoCodec,t.bitrate);a.set(t,`${e}`),i.id=`${e}`}}),t.on(cf.Events.AUDIO_TRACKS_UPDATED,function(t,i){for(let t of(s(),i.audioTracks)){let i=t.default?"main":"alternative",a=e.addAudioTrack(i,t.name,t.lang);a.id=`${t.id}`,t.default&&(a.enabled=!0)}});let r=()=>{var i;let a=+(null==(i=[...e.audioTracks].find(e=>e.enabled))?void 0:i.id),r=t.audioTracks.map(e=>e.id);a!=t.audioTrack&&r.includes(a)&&(t.audioTrack=a)};e.audioTracks.addEventListener("change",r),t.on(cf.Events.LEVELS_UPDATED,function(t,i){var r;let n=e.videoTracks[null!=(r=e.videoTracks.selectedIndex)?r:0];if(!n)return;let s=i.levels.map(e=>a.get(e));for(let t of e.videoRenditions)t.id&&!s.includes(t.id)&&n.removeRendition(t)});let n=e=>{let i=e.target.selectedIndex;i!=t.nextLevel&&(t.nextLevel=i)};null==(i=e.videoRenditions)||i.addEventListener("change",n);let s=()=>{for(let t of e.audioTracks)e.removeAudioTrack(t)},o=()=>{(()=>{for(let t of e.videoTracks)e.removeVideoTrack(t)})(),s()};t.once(cf.Events.DESTROYING,()=>{var t,i;o(),null==(t=e.audioTracks)||t.removeEventListener("change",r),null==(i=e.videoRenditions)||i.removeEventListener("change",n)})}(e,i),i.on(cf.Events.NON_NATIVE_TEXT_TRACKS_FOUND,(e,{tracks:a})=>
2511{a.forEach(e=>{var a,r;let n=null!=(a=e.subtitleTrack)?a:e.closedCaptions,s=i.subtitleTracks.findIndex(({lang:t,name:i,type:a})=>t==(null==n?void 0:n.lang)&&i===e.label&&a.toLowerCase()===e.kind),o=(null!=(r=e._id)?r:e.default)?"default":`${e.kind}${s}`;cQ(t,e.kind,e.label,null==n?void 0:n.lang,o,e.default)})}),a=()=>{if(!i.subtitleTracks.length)return;let e=Array.from(t.textTracks).find(e=>e.id&&"showing"===e.mode&&["subtitles","captions"].includes(e.kind));if(!e)return;let a=i.subtitleTracks[i.subtitleTrack],r=a?a.default?"default":`${i.subtitleTracks[i.subtitleTrack].type.toLowerCase()}${i.subtitleTrack}`:void 0;if(i.subtitleTrack<0||(null==e?void 0:e.id)!==r){let t=i.subtitleTracks.findIndex(({lang:t,name:i,type:a,default:r})=>"default"===e.id&&r||t==e.language&&i===e.label&&a.toLowerCase()===e.kind);i.subtitleTrack=t}(null==e?void 0:e.id)===r&&e.cues&&Array.from(e.cues).forEach(t=>{e.addCue(t)})},t.textTracks.addEventListener("change",a),i.on(cf.Events.CUES_PARSED,(e,{track:i,cues:a})=>{let r=t.textTracks.getTrackById(i);if(!r)return;let n="disabled"===r.mode;n&&(r.mode="hidden"),a.forEach(e=>{var t;null!=(t=r.cues)&&t.getCueById(e.id)||r.addCue(e)}),n&&(r.mode="disabled")}),i.once(cf.Events.DESTROYING,()=>{t.textTracks.removeEventListener("change",a),t.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})}),r=()=>
2511{Array.from(t.textTracks).forEach(e=>{var i,a;if(!["subtitles","caption"].includes(e.kind)&&("thumbnails"===e.label||"chapters"===e.kind)){if(!(null!=(i=e.cues)&&i.length)){let i="track";e.kind&&(i+=`[kind="${e.kind}"]`),e.label&&(i+=`[label="${e.label}"]`);let r=t.querySelector(i),n=null!=(a=null==r?void 0:r.getAttribute("src"))?a:"";null==r||r.removeAttribute("src"),setTimeout(()=>{null==r||r.setAttribute("src",n)},0)}"hidden"!==e.mode&&(e.mode="hidden")}})},i.once(cf.Events.MANIFEST_LOADED,r),i.once(cf.Events.MEDIA_ATTACHED,r),i.attachMedia(t)):console.error("It looks like the video you're trying to play will not work on this system! If possible, try upgrading to the newest versions of your browser or software.")}};function hY(e){var t;let i=e.target,a=null==(t=hf.get(i))?void 0:t.startTime;if(a&&function(e,t,i){t&&i>t&&(i=t);for(let t=0;t<e.length;t++)if(e.start(t)<=i&&e.end(t)>=i)return!0;return!1}(i.seekable,i.duration,a)){let e="auto"===i.preload;e&&(i.preload="none"),i.currentTime=a,e&&(i.preload="auto")}}async function hQ(e){if(!e.isTrusted)return;e.stopImmediatePropagation();let t=e.target;if(!(null!=t&&t.error))return;let{message:i,code:a}=t.error,r=new ck(i,a);if(t.src&&a===ck.MEDIA_ERR_SRC_NOT_SUPPORTED&&t.readyState===HTMLMediaElement.HAVE_NOTHING)return void setTimeout(()=>{var e;let i=null!=(e=hS(t))?e:t.error;(null==i?void 0:i.code)===ck.MEDIA_ERR_SRC_NOT_SUPPORTED&&hz(t,r)},500);if(t.src&&(a!==ck.MEDIA_ERR_DECODE||void 0!==a))try{let{status:e}=await fetch(t.src);r.data={response:{code:e}}}catch{}hz(t,r)}function hz(e,t){var i;t.fatal&&((null!=(i=hf.get(e))?i:{}).error=t,e.dispatchEvent(new CustomEvent("error",{detail:t})))}function hZ(e){var t,i;if(!(e instanceof CustomEvent)||!(e.detail instanceof ck))return;let a=e.target,r=e.detail;r&&r.fatal&&((null!=(t=hf.get(a))?t:{}).error=r,null==(i=a.mux)||i.emit("error",{player_error_code:r.code,player_error_message:r.message,player_error_context:r.context}))}var hX=(e,t)=>{var i,a,r;e.fatal?console.error("getErrorFromHlsErrorData()",e):t.debug&&console.warn("getErrorFromHlsErrorData() (non-fatal)",e);let n={[cf.ErrorTypes.NETWORK_ERROR]:ck.MEDIA_ERR_NETWORK,[cf.ErrorTypes.MEDIA_ERROR]:ck.MEDIA_ERR_DECODE,[cf.ErrorTypes.KEY_SYSTEM_ERROR]:ck.MEDIA_ERR_ENCRYPTED},s,o=[cf.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,cf.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED].includes(e.details)?ck.MEDIA_ERR_NETWORK:n[e.type];if(o===ck.MEDIA_ERR_NETWORK&&e.response){let r=null!=(i=e.type===cf.ErrorTypes.KEY_SYSTEM_ERROR?"drm":e.type===cf.ErrorTypes.NETWORK_ERROR?cy:void 0)?i:cy;s=null!=(a=he(e.response,r,t,e.fatal))?a:new ck("",o,e.fatal)}else o===ck.MEDIA_ERR_ENCRYPTED?e.details===cf.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE?((s=new ck(cq("Attempting to play DRM-protected content without providing a DRM token."),ck.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory="drm",s.muxCode=5000002):e.details===cf.ErrorDetails.KEY_SYSTEM_NO_ACCESS?((s=new ck(cq("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),ck.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory="drm",s.muxCode=5000001):e.details===cf.ErrorDetails.KEY_SYSTEM_NO_SESSION?((s=new ck(cq("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),ck.MEDIA_ERR_ENCRYPTED,!0)).errorCategory="drm",s.muxCode=5000002):e.details===cf.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED?((s=new ck(cq("Failed to update DRM license. This may be an issue with the player or your protected content."),ck.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory="drm",s.muxCode=5000003):e.details===cf.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED?((s=new ck(cq("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),ck.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory="drm",s.muxCode=5000004):e.details===cf.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR?((s=new ck(cq("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser."),ck.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory="drm",s.muxCode=5000005):e.details===cf.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED?((s=new ck(cq("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen."),ck.MEDIA_ERR_ENCRYPTED,!1)).errorCategory="drm",s.muxCode=5000006):((s=new ck(e.error.message,ck.MEDIA_ERR_ENCRYPTED,e.fatal)).errorCategory="drm",s.muxCode=5e6):s=new ck("",o,e.fatal);return s.context||(s.context=`${e.url?`url: ${e.url} 2512`:""}${e.response&&(e.response.code||e.response.text)?`response: ${e.response.code}, ${e.response.text} 2513`:""}${e.reason?`failure reason: ${e.reason} 2514`:""}${e.level?`level: ${e.level} 2515`:""}${e.parent?`parent stream controller: ${e.parent} 2516`:""}${e.buffer?`buffer length: ${e.buffer} 2517`:""}${e.error?`error: ${e.error} 2518`:""}${e.event?`event: ${e.event} 2519`:""}${e.err?`error message: ${null==(r=e.err)?void 0:r.message} 2520`:""}`),s.data=e,s};let hJ=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"],h0=["autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"];function h1(e){return` 2521 <style> 2522 :host { 2523 display: inline-flex; 2524 line-height: 0; 2525 flex-direction: column; 2526 justify-content: end; 2527 } 2528 2529 audio { 2530 width: 100%; 2531 } 2532 </style> 2533 <slot name="media"> 2534 <audio${h4(e)}></audio> 2535 </slot> 2536 <slot></slot> 2537 `}function h2(e){return` 2538 <style> 2539 :host { 2540 display: inline-block; 2541 line-height: 0; 2542 } 2543 2544 video { 2545 max-width: 100%; 2546 max-height: 100%; 2547 min-width: 100%; 2548 min-height: 100%; 2549 object-fit: var(--media-object-fit, contain); 2550 object-position: var(--media-object-position, 50% 50%); 2551 } 2552 2553 video::-webkit-media-text-track-container { 2554 transform: var(--media-webkit-text-track-transform); 2555 transition: var(--media-webkit-text-track-transition); 2556 } 2557 </style> 2558 <slot name="media"> 2559 <video${h4(e)}></video> 2560 </slot> 2561 <slot></slot> 2562 `}function h3(e,{tag:t,is:i}){let a=globalThis.document?.createElement?.(t,{is:i}),r=a?function(e){let t=[];for(let i=Object.getPrototypeOf(e);i&&i!==HTMLElement.prototype;i=Object.getPrototypeOf(i)){let e=Object.getOwnPropertyNames(i);t.push(...e)}return t}(a):[];
2562return class n extends e{static getTemplateHTML=t.endsWith("audio")?h1:h2;static shadowRootOptions={mode:"open"};static Events=hJ;static #e=!1;static get observedAttributes(){return n.#t(),[...a?.constructor?.observedAttributes??[],...h0]}static #t(){if(this.#e)return;this.#e=!0;let e=new Set(this.observedAttributes);for(let t of(e.delete("muted"),r))if(!(t in this.prototype))if("function"==typeof a[t])this.prototype[t]=function(...e){return this.#i(),(()=>{if(this.call)return this.call(t,...e);let i=this.nativeEl?.[t];return i?.apply(this.nativeEl,e)})()};else{let i={get(){this.#i();let i=t.toLowerCase();if(e.has(i)){let e=this.getAttribute(i);return null!==e&&(""===e||e)}return this.get?.(t)??this.nativeEl?.[t]}};t!==t.toUpperCase()&&(i.set=function(i){this.#i();let a=t.toLowerCase();e.has(a)?!0===i||!1===i||null==i?this.toggleAttribute(a,!!i):this.setAttribute(a,i):this.set?this.set(t,i):this.nativeEl&&(this.nativeEl[t]=i)}),Object.defineProperty(this.prototype,t,i)}}#a=!1;#r=null;#n=new Map;#s;#o;get;set;call;get nativeEl(){return this.#i(),this.#r??this.querySelector(":scope > [slot=media]")??this.querySelector(t)??this.shadowRoot?.querySelector(t)??null}set nativeEl(e){this.#r=e}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(e){this.toggleAttribute("muted",e)}get src(){return this.getAttribute("src")}set src(e){this.setAttribute("src",`${e}`)}get preload(){return this.getAttribute("preload")??this.nativeEl?.preload}set preload(e){this.setAttribute("preload",`${e}`)}#i(){this.#a||(this.#a=!0,this.init())}init(){if(!this.shadowRoot){this.attachShadow({mode:"open"});let e=function(e){let t={};for(let i of e)t[i.name]=i.value;return t}(this.attributes);i&&(e.is=i),t&&(e.part=t),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}for(let e of(this.nativeEl.muted=this.hasAttribute("muted"),r))this.#l(e);this.#d()}#d(){for(let e of(this.#s=new MutationObserver(this.#u.bind(this)),this.#o=()=>this.#c(),this.shadowRoot?.addEventListener("slotchange",this.#o),this.#c(),this.constructor.Events))this.shadowRoot?.addEventListener(e,this,!0)}handleEvent(e){e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{detail:e.detail}))}#c(){let e=new Map(this.#n),t=this.shadowRoot?.querySelector("slot:not([name])");(t?.assignedElements({flatten:!0}).filter(e=>["track","source"].includes(e.localName))).forEach(t=>{e.delete(t);let i=this.#n.get(t);i||(i=t.cloneNode(),this.#n.set(t,i),this.#s?.observe(t,{attributes:!0})),this.nativeEl?.append(i),this.#h(i)}),e.forEach((e,t)=>{e.remove(),this.#n.delete(t)})}#u(e){for(let t of e)if("attributes"===t.type){let{target:e,attributeName:i}=t,a=this.#n.get(e);a&&i&&(a.setAttribute(i,e.getAttribute(i)??""),this.#h(a))}}#h(e){e&&"track"===e.localName&&e.default&&("chapters"===e.kind||"metadata"===e.kind)&&"disabled"===e.track.mode&&(e.track.mode="hidden")}#l(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}}attributeChangedCallback(e,t,i){this.#i(),this.#m(e,t,i)}#m(e,t,i){["id","class"].includes(e)||!n.observedAttributes.includes(e)&&this.constructor.observedAttributes.includes(e)||(null===i?this.nativeEl?.removeAttribute(e):this.nativeEl?.getAttribute(e)!==i&&this.nativeEl?.setAttribute(e,i))}connectedCallback(){this.#i(),this.#o||this.#d()}disconnectedCallback(){for(let e of(this.#s?.disconnect(),this.#s=void 0,this.#o&&(this.shadowRoot?.removeEventListener("slotchange",this.#o),this.#o=void 0),this.constructor.Events))this.shadowRoot?.removeEventListener(e,this,!0);this.#n.forEach(e=>e.remove()),this.#n.clear(),this.#r=null}}}function h4(e){let t="";for(let i in e){if(!h0.includes(i))continue;let a=e[i];""===a?t+=` ${i}`:t+=` ${i}="${a}"`}return t}let h5=h3(globalThis.HTMLElement??class{},{tag:"video"});h3(globalThis.HTMLElement??class{},{tag:"audio"});var h9,h8,h7,h6,me,mt,mi,ma,mr,mn,ms,mo,ml,md,mu=e=>{throw TypeError(e)},mc=(e,t,i)=>t.has(e)||mu("Cannot "+i),mh=(e,t,i)=>(mc(e,t,"read from private field"),i?i.call(e):t.get(e)),mm=(e,t,i)=>t.has(e)?mu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),mp=(e,t,i,a)=>(mc(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),mv=(e,t,i)=>(mc(e,t,"access private method"),i),mb=(()=>{try{return"0.30.5"}catch{}return"UNKNOWN"})(),mg=` 2563<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" part="logo" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 1600 500"><g fill="#fff"><path d="M994.287 93.486c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.12
25631 0 31 13.879 31 31 0 17.121-13.879 31-31 31m0-93.486c-34.509 0-62.484 27.976-62.484 62.486v187.511c0 68.943-56.09 125.033-125.032 125.033s-125.03-56.09-125.03-125.033V62.486C681.741 27.976 653.765 0 619.256 0s-62.484 27.976-62.484 62.486v187.511C556.772 387.85 668.921 500 806.771 500c137.851 0 250.001-112.15 250.001-250.003V62.486c0-34.51-27.976-62.486-62.485-62.486M1537.51 468.511c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m-275.883-218.509-143.33 143.329c-24.402 24.402-24.402 63.966 0 88.368 24.402 24.402 63.967 24.402 88.369 0l143.33-143.329 143.328 143.329c24.402 24.4 63.967 24.402 88.369 0 24.403-24.402 24.403-63.966.001-88.368l-143.33-143.329.001-.004 143.329-143.329c24.402-24.402 24.402-63.965 0-88.367s-63.967-24.402-88.369 0L1349.996 161.63 1206.667 18.302c-24.402-24.401-63.967-24.402-88.369 0s-24.402 63.965 0 88.367l143.329 143.329v.004ZM437.511 468.521c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31M461.426 4.759C438.078-4.913 411.2.432 393.33 18.303L249.999 161.632 106.669 18.303C88.798.432 61.922-4.913 38.573 4.759 15.224 14.43-.001 37.214-.001 62.488v375.026c0 34.51 27.977 62.486 62.487 62.486 34.51 0 62.486-27.976 62.486-62.486V213.341l80.843 80.844c24.404 24.402 63.965 24.402 88.369 0l80.843-80.844v224.173c0 34.51 27.976 62.486 62.486 62.486s62.486-27.976 62.486-62.486V62.488c0-25.274-15.224-48.058-38.573-57.729" style="fill-rule:nonzero"/></g></svg>`,mE={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",MAX_AUTO_RESOLUTION:"max-auto-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type",LOGO:"logo",CAP_RENDITION_TO_PLAYER_SIZE:"cap-rendition-to-player-size"},mf=Object.values(mE),my="mux-video",m_=class extends h5{constructor(){super(),mm(this,ms),mm(this,h9),mm(this,h8),mm(this,h7,{}),mm(this,h6,{}),mm(this,me),mm(this,mt),mm(this,mi),mm(this,ma),mm(this,mr,""),mm(this,mn,e=>{var t,i,a;let r=(i=this.nativeEl,null==(a=hf.get(i))?void 0:a.metadata),n=null!=(t=this.metadata)?t:{};this.metadata={...r,...n},(null==r?void 0:r["com.mux.video.branding"])==="mux-free-plan"&&(mp(this,mr,"default"),this.updateLogo())}),mm(this,ml),mp(this,h8,hk())}static get NAME(){return my}static get VERSION(){return mb}static get observedAttributes(){var e;return[...mf,...null!=(e=h5.observedAttributes)?e:[]]}static getLogoHTML(e){return e&&"false"!==e?"default"===e?mg:`<img part="logo" src="${e}" />`:""}static getTemplateHTML(e={}){var t;return` 2564 ${h5.getTemplateHTML(e)} 2565 <style> 2566 :host { 2567 position: relative; 2568 } 2569 slot[name="logo"] { 2570 display: flex; 2571 justify-content: end; 2572 position: absolute; 2573 top: 1rem; 2574 right: 1rem; 2575 opacity: 0; 2576 transition: opacity 0.25s ease-in-out; 2577 z-index: 1; 2578 } 2579 slot[name="logo"]:has([part="logo"]) { 2580 opacity: 1; 2581 } 2582 slot[name="logo"] [part="logo"] { 2583 width: 5rem; 2584 pointer-events: none; 2585 user-select: none; 2586 } 2587 </style> 2588 <slot name="logo"> 2589 ${this.getLogoHTML(null!=(t=e[mE.LOGO])?t:"")} 2590 </slot> 2591 `}get preferCmcd(){var e;return null!=(e=this.getAttribute(mE.PREFER_CMCD))?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?cL.includes(e)?this.setAttribute(mE.PREFER_CMCD,e):console.warn(`Invalid value for preferCmcd. Must be one of ${cL.join()}`):this.removeAttribute(mE.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(mE.PLAYER_INIT_TIME)?+this.getAttribute(mE.PLAYER_INIT_TIME):mh(this,h8)}set playerInitTime(e){e!=this.playerInitTime&&(null==e?this.removeAttribute(mE.PLAYER_INIT_TIME):this.setAttribute(mE.PLAYER_INIT_TIME,`${+e}`))}get playerSoftwareName(){var e;return null!=(e=mh(this,mi))?e:my}set playerSoftwareName(e){mp(this,mi,e)}get playerSoftwareVersion(){var e;return null!=(e=mh(this,mt))?e:mb}set playerSoftwareVersion(e){mp(this,mt,e)}
2591get _hls(){var e;return null==(e=mh(this,ms,mo))?void 0:e.engine}get mux(){var e;return null==(e=this.nativeEl)?void 0:e.mux}get error(){var e;return null!=(e=hS(this.nativeEl))?e:null}get errorTranslator(){return mh(this,ma)}set errorTranslator(e){mp(this,ma,e)}get src(){return this.getAttribute("src")}set src(e){e!==this.src&&(null==e?this.removeAttribute("src"):this.setAttribute("src",e))}get type(){var e;return null!=(e=this.getAttribute(mE.TYPE))?e:void 0}set type(e){e!==this.type&&(e?this.setAttribute(mE.TYPE,e):this.removeAttribute(mE.TYPE))}get preload(){let e=this.getAttribute("preload");return""===e?"auto":["none","metadata","auto"].includes(e)?e:super.preload}set preload(e){e!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(e)?this.setAttribute("preload",e):this.removeAttribute("preload"))}get debug(){return null!=this.getAttribute(mE.DEBUG)}set debug(e){e!==this.debug&&(e?this.setAttribute(mE.DEBUG,""):this.removeAttribute(mE.DEBUG))}get disableTracking(){return this.hasAttribute(mE.DISABLE_TRACKING)}set disableTracking(e){e!==this.disableTracking&&this.toggleAttribute(mE.DISABLE_TRACKING,!!e)}get disableCookies(){return this.hasAttribute(mE.DISABLE_COOKIES)}set disableCookies(e){e!==this.disableCookies&&(e?this.setAttribute(mE.DISABLE_COOKIES,""):this.removeAttribute(mE.DISABLE_COOKIES))}get disablePseudoEnded(){return this.hasAttribute(mE.DISABLE_PSEUDO_ENDED)}set disablePseudoEnded(e){e!==this.disablePseudoEnded&&(e?this.setAttribute(mE.DISABLE_PSEUDO_ENDED,""):this.removeAttribute(mE.DISABLE_PSEUDO_ENDED))}get startTime(){let e=this.getAttribute(mE.START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set startTime(e){e!==this.startTime&&(null==e?this.removeAttribute(mE.START_TIME):this.setAttribute(mE.START_TIME,`${e}`))}get playbackId(){var e;return this.hasAttribute(mE.PLAYBACK_ID)?this.getAttribute(mE.PLAYBACK_ID):null!=(e=hI(this.src))?e:void 0}set playbackId(e){e!==this.playbackId&&(e?this.setAttribute(mE.PLAYBACK_ID,e):this.removeAttribute(mE.PLAYBACK_ID))}get maxResolution(){var e;return null!=(e=this.getAttribute(mE.MAX_RESOLUTION))?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(mE.MAX_RESOLUTION,e):this.removeAttribute(mE.MAX_RESOLUTION))}get minResolution(){var e;return null!=(e=this.getAttribute(mE.MIN_RESOLUTION))?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(mE.MIN_RESOLUTION,e):this.removeAttribute(mE.MIN_RESOLUTION))}get maxAutoResolution(){var e;return null!=(e=this.getAttribute(mE.MAX_AUTO_RESOLUTION))?e:void 0}set maxAutoResolution(e){null==e?this.removeAttribute(mE.MAX_AUTO_RESOLUTION):this.setAttribute(mE.MAX_AUTO_RESOLUTION,e)}get renditionOrder(){var e;return null!=(e=this.getAttribute(mE.RENDITION_ORDER))?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(mE.RENDITION_ORDER,e):this.removeAttribute(mE.RENDITION_ORDER))}get programStartTime(){let e=this.getAttribute(mE.PROGRAM_START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set programStartTime(e){null==e?this.removeAttribute(mE.PROGRAM_START_TIME):this.setAttribute(mE.PROGRAM_START_TIME,`${e}`)}get programEndTime(){let e=this.getAttribute(mE.PROGRAM_END_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set programEndTime(e){null==e?this.removeAttribute(mE.PROGRAM_END_TIME):this.setAttribute(mE.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){let e=this.getAttribute(mE.ASSET_START_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set assetStartTime(e){null==e?this.removeAttribute(mE.ASSET_START_TIME):this.setAttribute(mE.ASSET_START_TIME,`${e}`)}get assetEndTime(){let e=this.getAttribute(mE.ASSET_END_TIME);if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}set assetEndTime(e){null==e?this.removeAttribute(mE.ASSET_END_TIME):this.setAttribute(mE.ASSET_END_TIME,`${e}`)}get customDomain(){var e;return null!=(e=this.getAttribute(mE.CUSTOM_DOMAIN))?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(mE.CUSTOM_DOMAIN,e):this.removeAttribute(mE.CUSTOM_DOMAIN))}get capRenditionToPlayerSize(){var e;return(null==(e=this._hlsConfig)?void 0:e.capLevelToPlayerSize)!=null?this._hlsConfig.capLevelToPlayerSize:mh(this,ml)}set capRenditionToPlayerSize(e){mp(this,ml,e)}get drmToken(){var e;return null!=(e=this.getAttribute(mE.DRM_TOKEN))?e:void 0}
2591set drmToken(e){e!==this.drmToken&&(e?this.setAttribute(mE.DRM_TOKEN,e):this.removeAttribute(mE.DRM_TOKEN))}get playbackToken(){var e,t,i,a;if(this.hasAttribute(mE.PLAYBACK_TOKEN))return null!=(e=this.getAttribute(mE.PLAYBACK_TOKEN))?e:void 0;if(this.hasAttribute(mE.PLAYBACK_ID)){let[,e]=cN(null!=(t=this.playbackId)?t:"");return null!=(i=new URLSearchParams(e).get("token"))?i:void 0}if(this.src)return null!=(a=new URLSearchParams(this.src).get("token"))?a:void 0}set playbackToken(e){e!==this.playbackToken&&(e?this.setAttribute(mE.PLAYBACK_TOKEN,e):this.removeAttribute(mE.PLAYBACK_TOKEN))}get tokens(){let e=this.getAttribute(mE.PLAYBACK_TOKEN),t=this.getAttribute(mE.DRM_TOKEN);return{...mh(this,h6),...null!=e?{playback:e}:{},...null!=t?{drm:t}:{}}}set tokens(e){mp(this,h6,null!=e?e:{})}get ended(){return hD(this.nativeEl,this._hls)}get envKey(){var e;return null!=(e=this.getAttribute(mE.ENV_KEY))?e:void 0}set envKey(e){e!==this.envKey&&(e?this.setAttribute(mE.ENV_KEY,e):this.removeAttribute(mE.ENV_KEY))}get beaconCollectionDomain(){var e;return null!=(e=this.getAttribute(mE.BEACON_COLLECTION_DOMAIN))?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(mE.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(mE.BEACON_COLLECTION_DOMAIN))}get streamType(){var e;return null!=(e=this.getAttribute(mE.STREAM_TYPE))?e:hC(this.nativeEl)}set streamType(e){e!==this.streamType&&(e?this.setAttribute(mE.STREAM_TYPE,e):this.removeAttribute(mE.STREAM_TYPE))}get targetLiveWindow(){var e,t,i;return this.hasAttribute(mE.TARGET_LIVE_WINDOW)?+this.getAttribute(mE.TARGET_LIVE_WINDOW):(e=this.nativeEl,null!=(i=null==(t=hf.get(e))?void 0:t.targetLiveWindow)?i:NaN)}set targetLiveWindow(e){e!=this.targetLiveWindow&&(null==e?this.removeAttribute(mE.TARGET_LIVE_WINDOW):this.setAttribute(mE.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e,t;if(this.hasAttribute(mE.LIVE_EDGE_OFFSET)){let{liveEdgeOffset:i}=this,a=null!=(e=this.nativeEl.seekable.end(0))?e:0;return Math.max(null!=(t=this.nativeEl.seekable.start(0))?t:0,a-i)}return(e=>{var t;let i=null==(t=hf.get(e))?void 0:t.liveEdgeStartOffset;if("number"!=typeof i)return NaN;let a=hM(e);return a.length?a.end(a.length-1)-i:NaN})(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(mE.LIVE_EDGE_OFFSET))return+this.getAttribute(mE.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){e!=this.liveEdgeOffset&&(null==e?this.removeAttribute(mE.LIVE_EDGE_OFFSET):this.setAttribute(mE.LIVE_EDGE_OFFSET,`${+e}`))}get seekable(){return hM(this.nativeEl)}async addCuePoints(e){return c0(this.nativeEl,e)}get activeCuePoint(){return c2(this.nativeEl)}get cuePoints(){return function(e,t={label:cX}){let i=cz(e,t.label,"metadata");return null!=i&&i.cues?Array.from(i.cues,e=>c1(e)):[]}(this.nativeEl)}async addChapters(e){return c8(this.nativeEl,e)}get activeChapter(){return c7(this.nativeEl)}get chapters(){return function(e,t={label:c4}){var i;let a=cz(e,t.label,"chapters");return null!=(i=null==a?void 0:a.cues)&&i.length?Array.from(a.cues,e=>c9(e)):[]}(this.nativeEl)}getStartDate(){return function(e,t){if(t){let i=t.playingDate;if(null!=i)return new Date(i.getTime()-1e3*e.currentTime)}return"function"==typeof e.getStartDate?e.getStartDate():new Date(NaN)}(this.nativeEl,this._hls)}get currentPdt(){var e,t;return e=this.nativeEl,(t=this._hls)&&t.playingDate?t.playingDate:new Date("function"==typeof e.getStartDate?e.getStartDate().getTime()+1e3*e.currentTime:NaN)}get preferPlayback(){let e=this.getAttribute(mE.PREFER_PLAYBACK);if("mse"===e||e===cC)return e}set preferPlayback(e){e!==this.preferPlayback&&("mse"===e||e===cC?this.setAttribute(mE.PREFER_PLAYBACK,e):this.removeAttribute(mE.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(e=>e.startsWith("metadata-")&&![mE.METADATA_URL].includes(e)).reduce((e,t)=>{let i=this.getAttribute(t);return null!=i&&(e[t.replace(/^metadata-/,"").replace(/-/g,"_")]=i),e},{}),...mh(this,h7)}}set metadata(e){mp(this,h7,null!=e?e:{}),this.mux&&this.mux.emit("hb",mh(this,h7))}get _hlsConfig(){return mh(this,me)}set _hlsConfig(e){mp(this,me,e)}get logo(){var e;return null!=(e=this.getAttribute(mE.LOGO))?e:mh(this,mr)}set logo(e){e?this.setAttribute(mE.LOGO,e):this.removeAttribute(mE.LOGO)}load(){hP(this,this.nativeEl,mh(this,ms,mo))}unload(){hN(this.nativeEl,mh(this,ms,mo),this)}attributeChangedCallback(e,t,i){var a,r;
2591switch(h5.observedAttributes.includes(e)&&!["src","autoplay","preload"].includes(e)&&super.attributeChangedCallback(e,t,i),e){case mE.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=null!=i?i:void 0;break;case mE.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=null!=i?i:void 0;break;case"src":{let e=!!t,a=!!i;!e&&a?mv(this,ms,md).call(this):e&&!a?this.unload():e&&a&&(this.unload(),mv(this,ms,md).call(this));break}case"autoplay":if(i===t)break;null==(a=mh(this,ms,mo))||a.setAutoplay(this.autoplay);break;case"preload":if(i===t)break;null==(r=mh(this,ms,mo))||r.setPreload(i);break;case mE.PLAYBACK_ID:case mE.CUSTOM_DOMAIN:case mE.MAX_RESOLUTION:case mE.MIN_RESOLUTION:case mE.RENDITION_ORDER:case mE.PROGRAM_START_TIME:case mE.PROGRAM_END_TIME:case mE.ASSET_START_TIME:case mE.ASSET_END_TIME:case mE.PLAYBACK_TOKEN:this.src=hw(this);break;case mE.DEBUG:{let e=this.debug;this.mux&&console.info("Cannot toggle debug mode of mux data after initialization. Make sure you set all metadata to override before setting the src."),this._hls&&(this._hls.config.debug=e);break}case mE.METADATA_URL:i&&fetch(i).then(e=>e.json()).then(e=>this.metadata=e).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${i}!`));break;case mE.STREAM_TYPE:(null==i||i!==t)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case mE.TARGET_LIVE_WINDOW:(null==i||i!==t)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;case mE.LOGO:(null==i||i!==t)&&this.updateLogo();break;case mE.DISABLE_TRACKING:if(null==i||i!==t){let e=this.currentTime,t=this.paused;this.unload(),mv(this,ms,md).call(this).then(()=>{this.currentTime=e,t||this.play()})}break;case mE.DISABLE_COOKIES:(null==i||i!==t)&&this.disableCookies&&document.cookie.split(";").forEach(e=>{e.trim().startsWith("muxData")&&(document.cookie=e.replace(/^ +/,"").replace(/=.*/,"=;expires="+new Date().toUTCString()+";path=/"))});break;case mE.CAP_RENDITION_TO_PLAYER_SIZE:(null==i||i!==t)&&(this.capRenditionToPlayerSize=null!=i||void 0)}}updateLogo(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector('slot[name="logo"]');e&&(e.innerHTML=this.constructor.getLogoHTML(mh(this,mr)||this.logo))}connectedCallback(){var e,t;null==(e=super.connectedCallback)||e.call(this),null==(t=this.nativeEl)||t.addEventListener("muxmetadata",mh(this,mn)),this.nativeEl&&this.src&&!mh(this,ms,mo)&&mv(this,ms,md).call(this)}disconnectedCallback(){var e,t;null==(e=this.nativeEl)||e.removeEventListener("muxmetadata",mh(this,mn)),this.unload(),null==(t=super.disconnectedCallback)||t.call(this)}handleEvent(e){e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{composed:!0,detail:e.detail}))}};h9=new WeakMap,h8=new WeakMap,h7=new WeakMap,h6=new WeakMap,me=new WeakMap,mt=new WeakMap,mi=new WeakMap,ma=new WeakMap,mr=new WeakMap,mn=new WeakMap,ms=new WeakSet,mo=function(){var e,t;return e=this.nativeEl,null==(t=hf.get(e))?void 0:t.coreReference},ml=new WeakMap,md=async function(){mh(this,h9)||(await mp(this,h9,Promise.resolve()),mp(this,h9,null),this.load())};let mk=new WeakMap;class mA extends Error{}class mw extends Error{}let mT=["application/x-mpegURL","application/vnd.apple.mpegurl","audio/mpegurl"];function mI(){return globalThis.cast?.framework?.CastContext.getInstance()}function mS(){return mI()?.getCurrentSession()}function mC(){return mS()?.getSessionObj().media[0]}function mM(e){return mI().setOptions({...mL(),...e})}function mL(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}async function mR(e){try{let t=(await fetch(e,{method:"HEAD"})).headers.get("Content-Type");return mT.some(e=>t===e)}catch(e){return console.error("Error while trying to get the Content-Type of the manifest",e),!1}}async function mx(e){try{let i=await (await fetch(e)).text(),a=i,r=function(e){let t=e.split("\n"),i=[];for(let e=0;e<t.length;e++)if(t[e].trim().startsWith("#EXT-X-STREAM-INF")){let a=t[e+1]?t[e+1].trim():"";a&&!a.startsWith("#")&&i.push(a)}return i}(i);if(r.length>0){let t=new URL(r[0],e).toString();a=await (await fetch(t)).text()}var t=a.split("\n").find(e=>!e.trim().startsWith("#")&&""!==e.trim());if(!t)return;let n=t.match(/\.([a-zA-Z0-9]+)(?:\?.*)?$/);
2591return n?n[1]:null}catch(e){console.error("Error while trying to parse the manifest playlist",e);return}}let mD=new(globalThis.WeakRef?class extends Set{add(e){super.add(new WeakRef(e))}forEach(e){super.forEach(t=>{let i=t.deref();i&&e(i)})}}:Set),mP=new WeakSet;pi=()=>{globalThis.chrome?.cast?.isAvailable?n||(n=cast.framework,mI().addEventListener(n.CastContextEventType.CAST_STATE_CHANGED,e=>{mD.forEach(t=>mk.get(t).onCastStateChanged?.(e))}),mI().addEventListener(n.CastContextEventType.SESSION_STATE_CHANGED,e=>{mD.forEach(t=>mk.get(t).onSessionStateChanged?.(e))}),mD.forEach(e=>mk.get(e).init?.())):console.debug("chrome.cast.isAvailable",globalThis.chrome?.cast?.isAvailable)},globalThis.chrome?.cast?.isAvailable?globalThis.cast?.framework?pi():customElements.whenDefined("google-cast-button").then(pi):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(pi)};let mN=0;class mO extends EventTarget{#p;#a;#v;#b;#g="disconnected";#E=!1;#f=new Set;#y=new WeakMap;#_=()=>this.#k();constructor(e){super(),this.#p=e,mD.add(this),mk.set(this,{init:()=>this.#i(),onCastStateChanged:()=>this.#A(),onSessionStateChanged:()=>this.#w(),getCastPlayer:()=>this.#T}),this.#i()}destroy(){this.#p?.textTracks?.removeEventListener("change",this.#_),this.#b&&this.#v?.controller&&Object.entries(this.#b).forEach(([e,t])=>{this.#v.controller.removeEventListener(e,t)}),this.#p&&mP.delete(this.#p),this.#a=!1}get #T(){if(mP.has(this.#p))return this.#v}get state(){return this.#g}async watchAvailability(e){if(this.#p.disableRemotePlayback)throw new mA("disableRemotePlayback attribute is present.");return this.#y.set(e,++mN),this.#f.add(e),queueMicrotask(()=>e(this.#I())),mN}async cancelWatchAvailability(e){if(this.#p.disableRemotePlayback)throw new mA("disableRemotePlayback attribute is present.");e?this.#f.delete(e):this.#f.clear()}async prompt(){if(this.#p.disableRemotePlayback)throw new mA("disableRemotePlayback attribute is present.");if(!globalThis.chrome?.cast?.isAvailable)throw new mw("The RemotePlayback API is disabled on this platform.");let e=mP.has(this.#p);mP.add(this.#p),mM(this.#p.castOptions),Object.entries(this.#b).forEach(([e,t])=>{this.#v.controller.addEventListener(e,t)});try{await mI().requestSession()}catch(t){if(e||mP.delete(this.#p),"cancel"===t)return;throw Error(t)}mk.get(this.#p)?.loadOnPrompt?.()}#S(){mP.has(this.#p)&&(Object.entries(this.#b).forEach(([e,t])=>{this.#v.controller.removeEventListener(e,t)}),mP.delete(this.#p),this.#p.muted=this.#v.isMuted,this.#p.currentTime=this.#v.savedPlayerState.currentTime,!1===this.#v.savedPlayerState.isPau
2591sed&&this.#p.play())}#I(){let e=mI()?.getCastState();return e&&"NO_DEVICES_AVAILABLE"!==e}#A(){let e=mI().getCastState();if(mP.has(this.#p)&&"CONNECTING"===e&&(this.#g="connecting",this.dispatchEvent(new Event("connecting"))),!this.#E&&e?.includes("CONNECT"))for(let e of(this.#E=!0,this.#f))e(!0);else if(this.#E&&(!e||"NO_DEVICES_AVAILABLE"===e))for(let e of(this.#E=!1,this.#f))e(!1)}async #w(){let{SESSION_RESUMED:e}=n.SessionState;if(mI().getSessionState()===e&&this.#p.castSrc===mC()?.media.contentId){mP.add(this.#p),Object.entries(this.#b).forEach(([e,t])=>{this.#v.controller.addEventListener(e,t)});try{var t;await (t=new chrome.cast.media.GetStatusRequest,new Promise((e,i)=>{mC().getStatus(t,e,i)}))}catch(e){console.error(e)}this.#b[n.RemotePlayerEventType.IS_PAUSED_CHANGED](),this.#b[n.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}}#i(){n&&!this.#a&&(this.#a=!0,mM(this.#p.castOptions),this.#p.textTracks.addEventListener("change",this.#_),this.#A(),this.#v=new n.RemotePlayer,new n.RemotePlayerController(this.#v),this.#b={[n.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:e})=>{!0===e?(this.#g="connected",this.dispatchEvent(new Event("connect"))):(this.#S(),this.#g="disconnected",this.dispatchEvent(new Event("disconnect")))},[n.RemotePlayerEventType.DURATION_CHANGED]:()=>{this.#p.dispatchEvent(new Event("durationchange"))},[n.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{this.#p.dispatchEvent(new Event("volumechange"))},[n.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{this.#p.dispatchEvent(new Event("volumechange"))},[n.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{this.#T?.isMediaLoaded&&this.#p.dispatchEvent(new Event("timeupdate"))},[n.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{this.#p.dispatchEvent(new Event("resize"))},[n.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{this.#p.dispatchEvent(new Event(this.paused?"pause":"play"))},[n.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{this.#T?.playerState!==chrome.cast.media.PlayerState.PAUSED&&this.#p.dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[this.#T?.playerState]))},[n.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{this.#T?.isMediaLoaded&&(await Promise.resolve(),this.#C())}})}#C(){this.#k()}async #k(){let e;if(!this.#T)return;let t=(this.#v.mediaInfo?.tracks??[]).filter(({type:e})=>e===chrome.cast.media.TrackType.TEXT),i=[...this.#p.textTracks].filter(({kind:e})=>"subtitles"===e||"captions"===e),a=t.map(({language:e,name:t,trackId:a})=>{let{mode:r}=i.find(i=>i.language===e&&i.label===t)??{};return!!r&&{mode:r,trackId:a}}).filter(Boolean),r=a.filter(({mode:e})=>"showing"!==e).map(({trackId:e})=>e),n=a.find(({mode:e})=>"showing"===e),s=mS()?.getSessionObj().media[0]?.activeTrackIds??[],o=s;if(s.length&&(o=o.filter(e=>!r.includes(e))),n?.trackId&&(o=[...o,n.trackId]),e=o=[...new Set(o)],!(s.length===e.length&&s.every(t=>e.includes(t))))try{let e=new chrome.cast.media.EditTracksInfoRequest(o);await new Promise((t,i)=>{mC().editTracksInfo(e,t,i)})}catch(e){console.error(e)}}}let mU=e=>class extends e{static observedAttributes=[...e.observedAttributes??[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"];#M={paused:!1};#L=mL();#R;#x;get remote(){if(this.#x)return this.#x;if(globalThis.chrome){if(!this.isConnected)return;return this.disableRemotePlayback||function(){let e="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if(globalThis.chrome?.cast||document.querySelector(`script[src="${e}"]`))return;let t=document.createElement("script");t.src=e,document.head.append(t)}(),mk.set(this,{loadOnPrompt:()=>this.#D()}),this.#x=new mO(this)}return super.remote}get #T(){return mk.get(this.remote)?.getCastPlayer?.()}disconnectedCallback(){this.#x?.destroy(),this.#x=null,mk.delete(this),super.disconnectedCallback?.()}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),"cast-receiver"===e&&i){this.#L.receiverApplicationId=i;return}if(this.#T)switch(e){case"cast-stream-type":case"cast-src":this.load()}}async #D(){this.#M.paused=super.paused,super.pause(),this.muted=super.muted;try{await this.load()}catch(e){console.error(e)}}async load(){if(!this.#T)return super.load();let e=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType);e.customData=this.castCustomData;let t=[...this.querySelectorAll("track")].filter(({kind:e,src:t})=>t&&("subtitles"===e||"captions"===e)),i=[],a=0;if(t.length&&(e.tracks=t.map(e=>{let t=++a;0===i.length&&"showing"===e.track.mode&&i.push(t);let r=new chrome.cast.media.Track(t,chrome.cast.media.TrackType.TEXT);return r.trackContentId=e.src,r.trackContentType="text/vtt",r.subtype="captions"===e.kind?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,r.name=e.label,r.language=e.srclang,r})),"live"===this.castStreamType?e.streamType=chrome.cast.media.StreamType.LIVE:e.streamType=chrome.cast.media.StreamType.BUFFERED,e.metadata=new chrome.cast.media.GenericMediaMetadata,e.metadata.title=this.title,e.metadata.images=[{url:this.poster}],mR(this.castSrc)){let t=await mx(this.castSrc);t?.includes("m4s")||t?.includes("mp4")?(e.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.FMP4,e.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.FMP4):t?.includes("ts")&&(e.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.TS,e.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.TS)}let r=new chrome.cast.media.LoadRequest(e);r.currentTime=super.currentTime??0,r.autoplay=!this.#M.paused,r.activeTrackIds=i,await mS()?.loadMedia(r),this.dispatchEvent(new Event("volumechange"))}play(){if(this.#T){this.#T.isPaused&&this.#T.controller?.playOrPause();return}return super.play()}pause(){if(this.#T){this.#T.isPaused||this.#T.controller?.playOrPause();return}super.pause()}get castOptions(){return this.#L}get castReceiver(){return this.getAttribute("cast-receiver")??void 0}set castReceiver(e){this.castReceiver!=e&&this.setAttribute("cast-receiver",`${e}`)}get castSrc(){return this.getAttribute("cast-src")??this.querySelector("source")?.src??this.currentSrc}set castSrc(e){this.castSrc!=e&&this.setAttribute("cast-src",`${e}`)}get castContentType(){return this.getAttribute("cast-content-type")??void 0}set castContentType(e){this.setAttribute("cast-content-type",`${e}`)}get castStreamType(){return this.getAttribute("cast-stream-type")??this.streamType??void 0}set castStreamType(e){this.setAttribute("cast-stream-type",`${e}`)}get castCustomData(){return this.#R}set castCustomData(e){let t=typeof e;["object","undefined"].includes(t)?this.#R=e:console.error(`castCustomData must be nullish or an object but value was of type ${t}`)}get readyState(){if(this.#T)switch(this.#T.playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return this.#T?this.#T.isPaused:super.paused}get muted(){return this.#T?this.#T?.isMuted:super.muted}set muted(e){if(this.#T){(e&&!this.#T.isMuted||!e&&this.#T.isMuted)&&this.#T.controller?.muteOr
2591Unmute();return}super.muted=e}get volume(){return this.#T?this.#T?.volumeLevel??1:super.volume}set volume(e){if(this.#T){this.#T.volumeLevel=+e,this.#T.controller?.setVolumeLevel();return}super.volume=e}get duration(){return this.#T&&this.#T?.isMediaLoaded?this.#T?.duration??NaN:super.duration}get currentTime(){return this.#T&&this.#T?.isMediaLoaded?this.#T?.currentTime??0:super.currentTime}set currentTime(e){if(this.#T){this.#T.currentTime=e,this.#T.controller?.seek();return}super.currentTime=e}};class mH extends Event{track;constructor(e,t){super(e),this.track=t.track}}let mW=new WeakMap;function mB(e){var t,i;let a;return mW.get(e)??(t=e,i={},(a=mW.get(t))||mW.set(t,a={}),Object.assign(a,i))}function m$(e,t){let i=e.videoTracks;mB(t).media=new WeakRef(e),mB(t).renditionSet||(mB(t).renditionSet=new Set);let a=mB(i).trackSet;a.add(t);let r=a.size-1;r in mq.prototype||Object.defineProperty(mq.prototype,r,{get(){return[...mB(this).trackSet][r]}}),queueMicrotask(()=>{i.dispatchEvent(new mH("addtrack",{track:t}))})}function mV(e){let t=mB(e).media?.deref()?.videoTracks;t&&(mB(t).trackSet.delete(e),queueMicrotask(()=>{t.dispatchEvent(new mH("removetrack",{track:e}))}))}class mq extends EventTarget{#P;#N;#O;constructor(){super(),mB(this).trackSet=new Set}get #U(){return mB(this).trackSet}[Symbol.iterator](){return this.#U.values()}get length(){return this.#U.size}getTrackById(e){return[...this.#U].find(t=>t.id===e)??null}get selectedIndex(){return[...this.#U].findIndex(e=>e.selected)}get onaddtrack(){return this.#P}set onaddtrack(e){this.#P&&(this.removeEventListener("addtrack",this.#P),this.#P=void 0),"function"==typeof e&&(this.#P=e,this.addEventListener("addtrack",e))}get onremovetrack(){return this.#N}set onremovetrack(e){this.#N&&(this.removeEventListener("removetrack",this.#N),this.#N=void 0),"function"==typeof e&&(this.#N=e,this.addEventListener("removetrack",e))}get onchange(){return this.#O}set onchange(e){this.#O&&(this.removeEventListener("change",this.#O),this.#O=void 0),"function"==typeof e&&(this.#O=e,this.addEventListener("change",e))}}class mF extends Event{rendition;constructor(e,t){super(e),this.rendition=t.rendition}}function mG(e){let t=mB(e).media?.deref();return t?[...t.videoTracks].filter(e=>e.selected).flatMap(e=>[...mB(e).renditionSet]):[]}class mK extends EventTarget{#H;#W;#O;[Symbol.iterator](){return mG(this).values()}get length(){return mG(this).length}getRenditionById(e){return mG(this).find(t=>`${t.id}`==`${e}`)??null}get selectedIndex(){return mG(this).findIndex(e=>e.selected)}set selectedIndex(e){for(let[t,i]of mG(this).entries())i.selected=t===e}get onaddrendition(){return this.#H}set onaddrendition(e){this.#H&&(this.removeEventListener("addrendition",this.#H),this.#H=void 0),"function"==typeof e&&(this.#H=e,this.addEventListener("addrendition",e))}get onremoverendition(){return this.#W}set onremoverendition(e){this.#W&&(this.removeEventListener("removerendition",this.#W),this.#W=void 0),"function"==typeof e&&(this.#W=e,this.addEventListener("removerendition",e))}get onchange(){return this.#O}set onchange(e){this.#O&&(this.removeEventListener("change",this.#O),this.#O=void 0),"function"==typeof e&&(this.#O=e,this.addEventListener("change",e))}}class mj{src;id;width;height;bitrate;frameRate;codec;#B=!1;get selected(){return this.#B}set selected(e){if(this.#B!==e){var t;let i;this.#B=e,t=this,(i=mB(t).media?.deref()?.videoRenditions)&&!mB(i).changeRequested&&(mB(i).changeRequested=!0,queueMicrotask(()=>{delete mB(i).changeRequested,mB(t).track.selected&&i.dispatchEvent(new Event("change"))}))}}}class mY{id;kind;label="";language="";sourceBuffer;#B=!1;addRendition(e,t,i,a,r,n){var s;let o,l,d,u=new mj;return u.src=e,u.width=t,u.height=i,u.frameRate=n,u.bitrate=r,u.codec=a,s=this,o=mB(s).media?.deref()?.videoRenditions,mB(u).media=mB(s).media,mB(u).track=s,(l=mB(s).renditionSet).add(u),(d=l.size-1)in mK.prototype||Object.defineProperty(mK.prototype,d,{get(){return mG(this)[d]}}),queueMicrotask(()=>{o&&s.selected&&o.dispatchEvent(new mF("addrendition",{rendition:u}))}),u}removeRendition(e){let t,i;t=mB(e).media?.deref()?.videoRenditions,i=mB(e).track,mB(i).renditionSet.delete(e),queueMicrotask(()=>{let i=mB(e).track;t&&i.selected&&t.dispatchEvent(new mF("removerendition",{rendition:e}))})}get selected(){return this.#B}set selected(e){this.#B===e||(this.#B=e,!0===e&&function(e){let t=mB(e).media?.deref()?.videoTracks??[],i=!1;for(let a of t)a!==e&&(a.selected=!1,i=!0);if(i){if(mB(t).changeRequested)return;mB(t).changeRequested=!0,queueMicrotask(()=>{delete mB(t).changeRequested,t.dispatchEvent(new Event("change"))})}}(this))}}function mQ(e){let t=mB(e).media?.deref();return t?[...t.audioTracks].filter(e=>e.enabled).flatMap(e=>[...mB(e).renditionSet]):[]}
2591class mz extends EventTarget{#H;#W;#O;[Symbol.iterator](){return mQ(this).values()}get length(){return mQ(this).length}getRenditionById(e){return mQ(this).find(t=>`${t.id}`==`${e}`)??null}get selectedIndex(){return mQ(this).findIndex(e=>e.selected)}set selectedIndex(e){for(let[t,i]of mQ(this).entries())i.selected=t===e}get onaddrendition(){return this.#H}set onaddrendition(e){this.#H&&(this.removeEventListener("addrendition",this.#H),this.#H=void 0),"function"==typeof e&&(this.#H=e,this.addEventListener("addrendition",e))}get onremoverendition(){return this.#W}set onremoverendition(e){this.#W&&(this.removeEventListener("removerendition",this.#W),this.#W=void 0),"function"==typeof e&&(this.#W=e,this.addEventListener("removerendition",e))}get onchange(){return this.#O}set onchange(e){this.#O&&(this.removeEventListener("change",this.#O),this.#O=void 0),"function"==typeof e&&(this.#O=e,this.addEventListener("change",e))}}class mZ{src;id;bitrate;codec;#B=!1;get selected(){return this.#B}set selected(e){if(this.#B!==e){var t;let i;this.#B=e,t=this,(i=mB(t).media?.deref()?.audioRenditions)&&!mB(i).changeRequested&&(mB(i).changeRequested=!0,queueMicrotask(()=>{delete mB(i).changeRequested,mB(t).track.enabled&&i.dispatchEvent(new Event("change"))}))}}}function mX(e,t){let i=e.audioTracks;mB(t).media=new WeakRef(e),mB(t).renditionSet||(mB(t).renditionSet=new Set);let a=mB(i).trackSet;a.add(t);let r=a.size-1;r in m0.prototype||Object.defineProperty(m0.prototype,r,{get(){return[...mB(this).trackSet][r]}}),queueMicrotask(()=>{i.dispatchEvent(new mH("addtrack",{track:t}))})}function mJ(e){let t=mB(e).media?.deref()?.audioTracks;t&&(mB(t).trackSet.delete(e),queueMicrotask(()=>{t.dispatchEvent(new mH("removetrack",{track:e}))}))}class m0 extends EventTarget{#P;#N;#O;constructor(){super(),mB(this).trackSet=new Set}get #U(){return mB(this).trackSet}[Symbol.iterator](){return this.#U.values()}get length(){return this.#U.size}getTrackById(e){return[...this.#U].find(t=>t.id===e)??null}get onaddtrack(){return this.#P}set onaddtrack(e){this.#P&&(this.removeEventListener("addtrack",this.#P),this.#P=void 0),"function"==typeof e&&(this.#P=e,this.addEventListener("addtrack",e))}get onremovetrack(){return this.#N}set onremovetrack(e){this.#N&&(this.removeEventListener("removetrack",this.#N),this.#N=void 0),"function"==typeof e&&(this.#N=e,this.addEventListener("removetrack",e))}get onchange(){return this.#O}set onchange(e){this.#O&&(this.removeEventListener("change",this.#O),this.#O=void 0),"function"==typeof e&&(this.#O=e,this.addEventListener("change",e))}}class m1{id;kind;label="";language="";sourceBuffer;#$=!1;addRendition(e,t,i){var a;let r,n,s,o=new mZ;return o.src=e,o.codec=t,o.bitrate=i,a=this,r=mB(a).media?.deref()?.audioRenditions,mB(o).media=mB(a).media,mB(o).track=a,(n=mB(a).renditionSet).add(o),(s=n.size-1)in mz.prototype||Object.defineProperty(mz.prototype,s,{get(){return mQ(this)[s]}}),queueMicrotask(()=>{r&&a.enabled&&r.dispatchEvent(new mF("addrendition",{rendition:o}))}),o}removeRendition(e){let t,i;t=mB(e).media?.deref()?.audioRenditions,i=mB(e).track,mB(i).renditionSet.delete(e),queueMicrotask(()=>{let i=mB(e).track;t&&i.enabled&&t.dispatchEvent(new mF("removerendition",{rendition:e}))})}get enabled(){return this.#$}set enabled(e){if(this.#$!==e){let t;this.#$=e,(t=mB(this).media?.deref()?.audioTracks)&&!mB(t).changeRequested&&(mB(t).changeRequested=!0,queueMicrotask(()=>{delete mB(t).changeRequested,t.dispatchEvent(new Event("change"))}))}}}let m2=m5(globalThis.HTMLMediaElement,"video"),m3=m5(globalThis.HTMLMediaElement,"audio");function m4(e){if(!e?.prototype)return e;let t=m5(e,"video");(!t||`${t}`.includes("[native code]"))&&Object.defineProperty(e.prototype,"videoTracks",{get(){var e=this;let t=mB(e).videoTracks;if(!t&&(t=new mq,mB(e).videoTracks=t,m2)){let i=m2.call(e.nativeEl??e);for(let t of i)m$(e,t);i.addEventListener("change",()=>{t.dispatchEvent(new Event("change"))}),i.addEventListener("addtrack",a=>{if([...t].some(e=>e instanceof mY)){for(let e of i)mV(e);return}m$(e,a.track)}),i.addEventListener("removetrack",e=>{mV(e.track)})}return t}});let i=m5(e,"audio");(!i||`${i}`.includes("[native code]"))&&Object.defineProperty(e.prototype,"audioTracks",{get(){var e=this;let t=mB(e).audioTracks;
2591if(!t&&(t=new m0,mB(e).audioTracks=t,m3)){let i=m3.call(e.nativeEl??e);for(let t of i)mX(e,t);i.addEventListener("change",()=>{t.dispatchEvent(new Event("change"))}),i.addEventListener("addtrack",a=>{if([...t].some(e=>e instanceof m1)){for(let e of i)mJ(e);return}mX(e,a.track)}),i.addEventListener("removetrack",e=>{mJ(e.track)})}return t}}),"addVideoTrack"in e.prototype||(e.prototype.addVideoTrack=function(e,t="",i=""){let a=new mY;return a.kind=e,a.label=t,a.language=i,m$(this,a),a}),"removeVideoTrack"in e.prototype||(e.prototype.removeVideoTrack=mV),"addAudioTrack"in e.prototype||(e.prototype.addAudioTrack=function(e,t="",i=""){let a=new m1;return a.kind=e,a.label=t,a.language=i,mX(this,a),a}),"removeAudioTrack"in e.prototype||(e.prototype.removeAudioTrack=mJ),"videoRenditions"in e.prototype||Object.defineProperty(e.prototype,"videoRenditions",{get(){return a(this)}});let a=e=>{let t=mB(e).videoRenditions;return t||(mB(t=new mK).media=new WeakRef(e),mB(e).videoRenditions=t),t};"audioRenditions"in e.prototype||Object.defineProperty(e.prototype,"audioRenditions",{get(){return r(this)}});let r=e=>{let t=mB(e).audioRenditions;return t||(mB(t=new mz).media=new WeakRef(e),mB(e).audioRenditions=t),t};return e}function m5(e,t){if(e?.prototype)return Object.getOwnPropertyDescriptor(e.prototype,`${t}Tracks`)?.get}var m9=e=>{throw TypeError(e)},m8=(e,t,i)=>t.has(e)||m9("Cannot "+i),m7=(e,t,i)=>(m8(e,t,"read from private field"),i?i.call(e):t.get(e)),m6=(e,t,i)=>t.has(e)?m9("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),pe=(e,t,i,a)=>(m8(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),pt=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("u"<typeof DocumentFragment){class e extends pt{}globalThis.DocumentFragment=e}var pi,pa,pr=class extends pt{},pn=class{constructor(e,t={}){m6(this,pa),pe(this,pa,null==t?void 0:t.detail)}get detail(){return m7(this,pa)}initCustomEvent(){}};pa=new WeakMap;var ps={document:{createElement:function(e,t){return new pr}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(pr)},CustomEvent:pn,EventTarget:pt,HTMLElement:pr,HTMLVideoElement:class extends pt{}},po="u"<typeof window||void 0===globalThis.customElements,pl=po?ps:globalThis;po&&ps.document;var pd,pu=class extends mU(m4(m_)){constructor(){super(...arguments),m6(this,pd)}get autoplay(){let e=this.getAttribute("autoplay");return null!==e&&(""===e||e)}set autoplay(e){e!==this.autoplay&&(e?this.setAttribute("autoplay","string"==typeof e?e:""):this.removeAttribute("autoplay"))}get muxCastCustomData(){return{mux:{playbackId:this.playbackId,minResolution:this.minResolution,maxResolution:this.maxResolution,renditionOrder:this.renditionOrder,customDomain:this.customDomain,tokens:{drm:this.drmToken},envKey:this.envKey,metadata:this.metadata,disableCookies:this.disableCookies,disableTracking:this.disableTracking,beaconCollectionDomain:this.beaconCollectionDomain,startTime:this.startTime,preferCmcd:this.preferCmcd}}}get castCustomData(){var e;return null!=(e=m7(this,pd))?e:this.muxCastCustomData}set castCustomData(e){pe(this,pd,e)}};pd=new WeakMap,pl.customElements.get("mux-video")||(pl.customElements.define("mux-video",pu),pl.MuxVideoElement=pu);let pc={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_LOOP_REQUEST:"medialooprequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediash
2591owsubtitlesrequest",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"},ph={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},pm={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_BUFFERED:"mediaBuffered",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_CHAPTERS_CUES:"mediaChaptersCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_P
2591LAYED:"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"},pp=Object.entries(pm),pv=pp.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{}),pb=pp.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"});Object.entries(pb).reduce((e,[t,i])=>{let a=pv[t];return a&&(e[i]=a),e},{userinactivechange:"userinactive"});let pg=Object.entries(pv).reduce((e,[t,i])=>{let a=pb[t];return a&&(e[i]=a),e},{userinactive:"userinactivechange"}),pE="subtitles",pf="captions",py="disabled",p_="showing",pk="unavailable",pA="unsupported",pw={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"};function pT(e){if(e){let{id:t,width:i,height:a}=e;return[t,i,a].filter(e=>null!=e).join(":")}}function pI(e){if(e){let[t,i,a]=e.split(":");return{id:t,width:+i,height:+a}}}function pS(e){if(e){let{id:t,kind:i,language:a,label:r}=e;return[t,i,a,r].filter(e=>null!=e).join(":")}}function pC(e){if(e){let[t,i,a,r]=e.split(":");return{id:t,kind:i,language:a,label:r}}}function pM(e){return"number"==typeof e&&!Number.isNaN(e)&&Number.isFinite(e)}function pL(e){return"string"==typeof e&&!isNaN(e)&&!isNaN(parseFloat(e))}let pR=e=>new Promise(t=>setTimeout(t,e)),px={en:{"Start airplay":"Start airplay","Stop airplay":"Stop airplay",Audio:"Audio",Captions:"Captions","Enable captions":"Enable captions","Disable captions":"Disable captions","Start casting":"Start casting","Stop casting":"Stop casting","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",Mute:"Mute",Unmute:"Unmute",Loop:"Loop","Enter picture in picture mode":"Enter picture in picture mode","Exit picture in picture mode":"Exit picture in picture mode",Play:"Play",Pause:"Pause","Playback rate":"Playback rate","Playback rate {playbackRate}":"Playback rate {playbackRate}",Quality:"Quality","Seek backward":"Seek backward","Seek forward":"Seek forward",Settings:"Settings",Auto:"Auto","audio player":"audio player","video player":"video player",volume:"volume",seek:"seek","closed captions":"closed captions","current playback rate":"current playback rate","playback time":"playback time","media loading":"media loading",settings:"settings","audio tracks":"audio tracks",quality:"quality",play:"play",pause:"pause",mute:"mute",unmute:"unmute","chapter: {chapterName}":"chapter: {chapterName}",live:"live",Off:"Off","start airplay":"start airplay","stop airplay":"stop airplay","start casting":"start casting","stop casting":"stop casting","enter fullscreen mode":"enter fullscreen mode","exit fullscreen mode":"exit fullscreen mode","enter picture in picture mode":"enter picture in picture mode","exit picture in picture mode":"exit picture in picture mode","seek to live":"seek to live","playing live":"playing live","seek back {seekOffset} seconds":"seek back {seekOffset} seconds","seek forward {seekOffset} seconds":"seek forward {seekOffset} seconds","Network Error":"Network Error","Decode Error":"Decode Error","Source Not Supported":"Source Not Supported","Encryption
2591Error":"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."}},pD=(null==(yN=globalThis.navigator)?void 0:yN.language)||"en",pP=(e,t={})=>(e=>{var t,i,a;let[r]=pD.split("-");return(null==(t=px[pD])?void 0:t[e])||(null==(i=px[r])?void 0:i[e])||(null==(a=px.en)?void 0:a[e])||e})(e).replace(/\{(\w+)\}/g,(e,i)=>i in t?String(t[i]):`{${i}}`),pN=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],pO=e=>{if(!pM(e))return"";let t=Math.abs(e),i=t!==e,a=new Date(0,0,0,0,0,t,0),r=[a.getHours(),a.getMinutes(),a.getSeconds()].map((e,t)=>{let i;return e&&(i=1===e?pP(pN[t].singular):pP(pN[t].plural),`${e} ${i}`)}).filter(e=>e).join(", ");return i?pP("{time} remaining",{time:r}):r};function pU(e,t){let i=!1;e<0&&(i=!0,e=0-e);let a=Math.floor((e=e<0?0:e)%60),r=Math.floor(e/60%60),n=Math.floor(e/3600),s=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=r=a="0"),r=(((n=n>0||o>0?n+":":"")||s>=10)&&r<10?"0"+r:r)+":",(i?"-":"")+n+r+(a=a<10?"0"+a:a)}Object.freeze({length:0,start(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0}});class pH{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}}class pW extends pH{}class pB extends pW{constructor(){super(...arguments),this.role=null}}class p${observe(){}unobserve(){}disconnect(){}}let pV={createElement:function(){return new pq.HTMLElement},createElementNS:function(){return new pq.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent:e=>!1},pq={ResizeObserver:p$,document:pV,Node:pW,Element:pB,HTMLElement:class extends pB{constructor(){super(...arguments),this.innerHTML=""}get content(){return new pq.DocumentFragment}},DocumentFragment:class extends pH{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem:e=>null,setItem(e,t){},removeItem(e){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia:e=>({matches:!1,media:e}),DOMParser:class{parseFromString(e,t){return{body:{textContent:e}}}}},pF="global"in globalThis&&(null==globalThis?void 0:globalThis.global)===globalThis||"u"<typeof window||void 0===window.customElements,pG=Object.keys(pq).every(e=>e in globalThis),pK=pF&&!pG?pq:globalThis,pj=pF&&!pG?pV:globalThis.document,pY=new WeakMap,pQ=e=>{let t=pY.get(e);return t||pY.set(e,t=new Set),t},pz=new pK.ResizeObserver(e=>{for(let t of e)for(let e of pQ(t.target))e(t)});function pZ(e,t){pQ(e).add(t),pz.observe(e)}function pX(e,t){let i=pQ(e);i.delete(t),i.size||pz.unobserve(e)}function pJ(e){let t={};for(let i of e)t[i.name]=i.value;return t}function p0(e){var t;return null!=(t=p1(e))?t:p5(e,"media-controller")}function p1(e){var t;let{MEDIA_CONTROLLER:i}=ph,a=e.getAttribute(i);if(a)return null==(t=p8(e))?void 0:t.getElementById(a)}let p2=(e,t,i=".value")=>{let a=e.querySelector(i);a&&(a.textContent=t)},p3=(e,t)=>{let i,a;return(i=`slot[name="${t}"]`,!(a=e.shadowRoot.querySelector(i))?[]:a.children)[0]},p4=(e,t)=>
2591!!e&&!!t&&(null!=e&&!!e.contains(t)||p4(e,t.getRootNode().host)),p5=(e,t)=>{if(!e)return null;let i=e.closest(t);return i||p5(e.getRootNode().host,t)};function p9(e=document){var t;let i=null==e?void 0:e.activeElement;return i?null!=(t=p9(i.shadowRoot))?t:i:null}function p8(e){var t;let i=null==(t=null==e?void 0:e.getRootNode)?void 0:t.call(e);return i instanceof ShadowRoot||i instanceof Document?i:null}function p7(e,{depth:t=3,checkOpacity:i=!0,checkVisibilityCSS:a=!0}={}){if(e.checkVisibility)return e.checkVisibility({checkOpacity:i,checkVisibilityCSS:a});let r=e;for(;r&&t>0;){let e=getComputedStyle(r);if(i&&"0"===e.opacity||a&&"hidden"===e.visibility||"none"===e.display)return!1;r=r.parentElement,t--}return!0}function p6(e,t){let i=function(e,t){var i,a;let r;for(r of null!=(i=e.querySelectorAll("style:not([media])"))?i:[]){let e;try{e=null==(a=r.sheet)?void 0:a.cssRules}catch{continue}for(let i of null!=e?e:[])if(t(i.selectorText))return i}}(e,e=>e===t);return i||ve(e,t)}function ve(e,t){var i,a;let r=null!=(i=e.querySelectorAll("style:not([media])"))?i:[],n=null==r?void 0:r[r.length-1];if(!(null==n?void 0:n.sheet))return console.warn("Media Chrome: No style sheet found on style tag of",e),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}};let s=null==n?void 0:n.sheet.insertRule(`${t}{}`,n.sheet.cssRules.length);return null==(a=n.sheet.cssRules)?void 0:a[s]}function vt(e,t,i=NaN){let a=e.getAttribute(t);return null!=a?+a:i}function vi(e,t,i){let a=+i;if(null==i||Number.isNaN(a)){e.hasAttribute(t)&&e.removeAttribute(t);return}vt(e,t,void 0)!==a&&e.setAttribute(t,`${a}`)}function va(e,t){return e.hasAttribute(t)}function vr(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}va(e,t)!=i&&e.toggleAttribute(t,i)}function vn(e,t,i=null){var a;return null!=(a=e.getAttribute(t))?a:i}function vs(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}let a=`${i}`;vn(e,t,void 0)!==a&&e.setAttribute(t,a)}var vo=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},vl=(e,t,i)=>(vo(e,t,"read from private field"),i?i.call(e):t.get(e)),vd=(e,t,i,a)=>(vo(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class vu extends pK.HTMLElement{constructor(){if(super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,yO,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=pJ(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[ph.MEDIA_CONTROLLER,pv.MEDIA_PAUSED]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===ph.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=vl(this,yO))?void 0:a.unassociateElement)||r.call(a,this),vd(this,yO,null)),i&&this.isConnected&&(vd(this,yO,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=vl(this,yO))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i,a;let r;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),vd(this,yO,(i=this,(r=i.getAttribute(ph.MEDIA_CONTROLLER))?null==(a=i.getRootNode())?void 0:a.getElementById(r):p5(i,"media-controller"))),this.getAttribute(ph.MEDIA_CONTROLLER)&&(null==(t=null==(e=vl(this,yO))?void 0:e.associateElement)||t.call(e,this)),vl(this,yO)&&(vl(this,yO).addEventListener("pointerdown",this),vl(this,yO).addEventListener("click",this),vl(this,yO).hasAttribute("tabindex")||(vl(this,yO).tabIndex=0))}disconnectedCallback(){var e,t,i,a;this.getAttribute(ph.MEDIA_CONTROLLER)&&(null==(t=null==(e=vl(this,yO))?void 0:e.unassociateElement)||t.call(e,this)),null==(i=vl(this,yO))||i.removeEventListener("pointerdown",this),null==(a=vl(this,yO))||a.removeEventListener("click",this),vd(this,yO,null)}handleEvent(e){var t;let i=null==(t=e.composedPath())?void 0:t[0];if(["video","media-controller"].includes(null==i?void 0:i.localName)){if("pointerdown"===e.type)this._pointerType=e.pointerType;else if("click"===e.type){let{clientX:t,clientY:i}=e,{left:a,top:r,width:n,height:s}=this.getBoundingClientRect(),o=t-a,l=i-r;if(o<0||l<0||o>n||l>s||0===n&&0===s)return;let d=this._pointerType||"mouse";if(this._pointerType=void 0,"touch"===d)return void this.handleTap(e);if("mouse"===d||"pen"===d)return void this.handleMouseClick(e)}}}get mediaPaused(){return va(this,pv.MEDIA_PAUSED)}set mediaPaused(e){vr(this,pv.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let t=this.mediaPaused?pc.MEDIA_PLAY_REQUEST:pc.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new pK.CustomEvent(t,{composed:!0,bubbles:!0}))}}yO=new WeakMap,vu.shadowRootOptions={mode:"open"},vu.getTemplateHTML=function(e){return` 2592 <style> 2593 :host { 2594 display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block)); 2595 box-sizing: border-box; 2596 } 2597 </style> 2598 `},pK.customElements.get("media-gesture-receiver")||pK.customElements.define("media-gesture-receiver",vu);var vc=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},vh=(e,t,i)=>(vc(e,t,"read from private field"),i?i.call(e):t.get(e)),vm=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},vp=(e,t,i,a)=>(vc(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),vv=(e,t,i)=>(vc(e,t,"access private method"),i);let vb="audio",vg="autohide",vE="breakpoints",vf="gesturesdisabled",vy="keyboardcontrol",v_="noautohide",vk="userinactive",vA="autohideovercontrols",vw=Object.values(pv);function vT(e,t){var i,a,r;if(!e.isConnected)return;let n=Object.fromEntries((null!=(i=e.getAttribute(vE))?i:"sm:384 md:576 lg:768 xl:960").split(/\s+/).map(e=>e.split(":"))),s=(a=n,r=t,Object.keys(a).filter(e=>r>=parseInt(a[e]))),o=!1;
2598if(Object.keys(n).forEach(t=>{if(s.includes(t)){e.hasAttribute(`breakpoint${t}`)||(e.setAttribute(`breakpoint${t}`,""),o=!0);return}e.hasAttribute(`breakpoint${t}`)&&(e.removeAttribute(`breakpoint${t}`),o=!0)}),o){let t=new CustomEvent(pb.BREAKPOINTS_CHANGE,{detail:s});e.dispatchEvent(t)}e.breakpointsComputed||(e.breakpointsComputed=!0,e.dispatchEvent(new CustomEvent(pb.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}class vI extends pK.HTMLElement{constructor(){if(super(),vm(this,yG),vm(this,yj),vm(this,yQ),vm(this,yZ),vm(this,yJ),vm(this,yU,void 0),vm(this,yH,0),vm(this,yW,null),vm(this,yB,null),vm(this,y$,void 0),this.breakpointsComputed=!1,vm(this,yV,e=>{let t=this.media;for(let i of e)if("childList"===i.type){for(let e of i.removedNodes){if("media"!=e.slot||i.target!=this)continue;let a=i.previousSibling&&i.previousSibling.previousElementSibling;if(a&&t){let t="media"!==a.slot;for(;null!==(a=a.previousSibling);)"media"==a.slot&&(t=!1);t&&this.mediaUnsetCallback(e)}else this.mediaUnsetCallback(e)}if(t)for(let e of i.addedNodes)e===t&&this.handleMediaUpdated(t)}}),vm(this,yq,!1),vm(this,yF,e=>{vh(this,yq)||(setTimeout(()=>{vT(e.target,e.contentRect.width),vp(this,yq,!1)},0),vp(this,yq,!0))}),vm(this,y1,void 0),vm(this,y2,()=>{if(!vh(this,y1).assignedElements({flatten:!0}).length){vh(this,yW)&&this.mediaUnsetCallback(vh(this,yW));return}this.handleMediaUpdated(this.media)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=pJ(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}vp(this,yU,new MutationObserver(vh(this,yV)))}static get observedAttributes(){return[vg,vf].concat(vw).filter(e=>![pv.MEDIA_RENDITION_LIST,pv.MEDIA_AUDIO_TRACK_LIST,pv.MEDIA_CHAPTERS_CUES,pv.MEDIA_WIDTH,pv.MEDIA_HEIGHT,pv.MEDIA_ERROR,pv.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,t,i){e.toLowerCase()==vg&&(this.autohide=i)}get media(){let e=this.querySelector(":scope > [slot=media]");return(null==e?void 0:e.nodeName)=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(vp(this,yW,e),e.localName.includes("-")&&await pK.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;vh(this,yU).observe(this,{childList:!0,subtree:!0}),pZ(this,vh(this,yF));let t=null!=this.getAttribute(vb)?pP("audio player"):pP("video player");this.setAttribute("role","region"),this.setAttribute("aria-label",t),this.handleMediaUpdated(this.media),this.setAttribute(vk,""),vT(this,this.getBoundingClientRect().width);let i=this.querySelector(":scope > slot[slot=media]");i&&(vp(this,y1,i),vh(this,y1).addEventListener("slotchange",vh(this,y2))),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),null==(e=pK.window)||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;pX(this,vh(this,yF)),clearTimeout(vh(this,yB)),vh(this,yU).disconnect(),this.media&&this.mediaUnsetCallback(this.media),null==(e=pK.window)||e.removeEventListener("mouseup",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointermove",this),this.removeEventListener("pointerup",this),this.removeEventListener("mouseleave",this),this.removeEventListener("keyup",this),vh(this,y1)&&(vh(this,y1).removeEventListener("slotchange",vh(this,y2)),vp(this,y1,null)),vp(this,yq,!1)}mediaSetCallback(e){}mediaUnsetCallback(e){vp(this,yW,null)}handleEvent(e){switch(e.type){case"pointerdown":vp(this,yH,e.timeStamp);break;case"pointermove":vv(this,yG,yK).call(this,e);break;case"pointerup":vv(this,yj,yY).call(this,e);break;case"mouseleave":vv(this,yQ,yz).call(this);break;case"mouseup":this.removeAttribute(vy);break;case"keyup":vv(this,yJ,y0).call(this),this.setAttribute(vy,"")}}set autohide(e){let t=Number(e);vp(this,y$,isNaN(t)?0:t)}get autohide(){return(void 0===vh(this,y$)?2:vh(this,y$)).toString()}get breakpoints(){return vn(this,vE)}set breakpoints(e){vs(this,vE,e)}get audio(){return va(this,vb)}set audio(e){vr(this,vb,e)}get gesturesDisabled(){return va(this,vf)}set gesturesDisabled(e){vr(this,vf,e)}get keyboardControl(){return va(this,vy)}set keyboardControl(e){vr(this,vy,e)}get noAutohide(){return va(this,v_)}set noAutohide(e){vr(this,v_,e)}get autohideOverControls(){return va(this,vA)}set autohideOverControls(e){vr(this,vA,e)}get userInteractive(){return va(this,vk)}set userInteractive(e){vr(this,vk,e)}}yU=new WeakMap,yH=new WeakMap,yW=new WeakMap,yB=new WeakMap,y$=new WeakMap,yV=new WeakMap,yq=new WeakMap,yF=new WeakMap,yG=new WeakSet,yK=function(e){if("mouse"!==e.pointerType&&e.timeStamp-vh(this,yH)<250)return;vv(this,yZ,yX).call(this),clearTimeout(vh(this,yB));let t=this.hasAttribute(vA);([this,this.media].includes(e.target)||t)&&vv(this,yJ,y0).call(this)},yj=new WeakSet,yY=function(e){if("touch"===e.pointerType){let t=!this.hasAttribute(vk);[this,this.media].includes(e.target)&&t?vv(this,yQ,yz).call(this):vv(this,yJ,y0).call(this)}else e.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(null==e?void 0:e.localName))&&vv(this,yJ,y0).call(this)},yQ=new WeakSet,yz=function(){if(0>vh(this,y$)||this.hasAttribute(vk))return;this.setAttribute(vk,"");let e=new pK.CustomEvent(pb.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(e)},yZ=new WeakSet,yX=function(){if(!this.hasAttribute(vk))return;this.removeAttribute(vk);let e=new pK.CustomEvent(pb.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(e)},yJ=new WeakSet,y0=function(){vv(this,yZ,yX).call(this),clearTimeout(vh(this,yB));let e=parseInt(this.autohide);e<0||vp(this,yB,setTimeout(()=>{vv(this,yQ,yz).call(this)},1e3*e))},y1=new WeakMap,y2=new WeakMap,vI.shadowRootOptions={mode:"open"},vI.getTemplateHTML=function(e){return` 2599 <style> 2600 2601 :host([${pv.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) { 2602 outline: none; 2603 } 2604 2605 :host { 2606 box-sizing: border-box; 2607 position: relative; 2608 display: inline-block; 2609 line-height: 0; 2610 background-color: var(--media-background-color, #000); 2611 overflow: hidden; 2612 } 2613 2614 :host(:not([${vb}])) [part~=layer]:not([part~=media-layer]) { 2615 position: absolute; 2616 top: 0; 2617 left: 0; 2618 bottom: 0; 2619 right: 0; 2620 display: flex; 2621 flex-flow: column nowrap; 2622 align-items: start; 2623 pointer-events: none; 2624 background: none; 2625 } 2626 2627 slot[name=media] { 2628 display: var(--media-slot-display, contents); 2629 } 2630 2631 2632 :host([${vb}]) slot[name=media] { 2633 display: var(--media-slot-display, none); 2634 } 2635 2636 2637 :host([${vb}]) [part~=layer][part~=gesture-layer] { 2638 height: 0; 2639 display: block; 2640 } 2641 2642 2643 :host(:not([${vb}])[${vf}]) ::slotted([slot=gestures-chrome]), 2644 :host(:not([${vb}])[${vf}]) media-gesture-receiver[slot=gestures-chrome] { 2645 display: none; 2646 } 2647 2648 2649 ::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([role=dialog]):not([hidden])) { 2650 pointer-events: auto; 2651 } 2652 2653 :host(:not([${vb}])) *[part~=layer][part~=centered-layer] { 2654 align-items: center; 2655 justify-content: center; 2656 } 2657 2658 :host(:not([${vb}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]), 2659 :host(:not([${vb}])) media-gesture-receiver[slot=gestures-chrome] { 2660 align-self: stretch; 2661 flex-grow: 1; 2662 } 2663 2664 slot[name=middle-chrome] { 2665 display: inline; 2666 flex-grow: 1; 2667 pointer-events: none; 2668 background: none; 2669 } 2670 2671 2672 ::slotted([slot=media]), 2673 ::slotted([slot=poster]) { 2674 width: 100%; 2675 height: 100%; 2676 } 2677 2678 2679 :host(:not([${vb}])) .spacer { 2680 flex-grow: 1; 2681 } 2682 2683 2684 :host(:-webkit-full-screen) { 2685 2686 width: 100% !important; 2687 height: 100% !important; 2688 } 2689 2690 2691 ::slotted(:not([slot=media]):not([slot=poster]):not([${v_}
2691]):not([hidden]):not([role=dialog])) { 2692 opacity: 1; 2693 transition: var(--media-control-transition-in, opacity 0.25s); 2694 } 2695 2696 2697 :host([${vk}]:not([${pv.MEDIA_PAUSED}]):not([${pv.MEDIA_IS_AIRPLAYING}]):not([${pv.MEDIA_IS_CASTING}]):not([${vb}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${v_}]):not([role=dialog])) { 2698 opacity: 0; 2699 transition: var(--media-control-transition-out, opacity 1s); 2700 } 2701 2702 :host([${vk}]:not([${v_}]):not([${pv.MEDIA_PAUSED}]):not([${pv.MEDIA_IS_CASTING}]):not([${vb}])) ::slotted([slot=media]) { 2703 cursor: none; 2704 } 2705 2706 :host([${vk}][${vA}]:not([${v_}]):not([${pv.MEDIA_PAUSED}]):not([${pv.MEDIA_IS_CASTING}]):not([${vb}])) * { 2707 --media-cursor: none; 2708 cursor: none; 2709 } 2710 2711 2712 ::slotted(media-control-bar) { 2713 align-self: stretch; 2714 } 2715 2716 2717 :host(:not([${vb}])[${pv.MEDIA_HAS_PLAYED}]) slot[name=poster] { 2718 display: none; 2719 } 2720 2721 ::slotted([role=dialog]) { 2722 width: 100%; 2723 height: 100%; 2724 align-self: center; 2725 } 2726 2727 ::slotted([role=menu]) { 2728 align-self: end; 2729 } 2730 </style> 2731 2732 <slot name="media" part="layer media-layer"></slot> 2733 <slot name="poster" part="layer poster-layer"></slot> 2734 <slot name="gestures-chrome" part="layer gesture-layer"> 2735 <media-gesture-receiver slot="gestures-chrome"> 2736 <template shadowrootmode="${vu.shadowRootOptions.mode}"> 2737 ${vu.getTemplateHTML({})} 2738 </template> 2739 </media-gesture-receiver> 2740 </slot> 2741 <span part="layer vertical-layer"> 2742 <slot name="top-chrome" part="top chrome"></slot> 2743 <slot name="middle-chrome" part="middle chrome"></slot> 2744 <slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot> 2745 2746 <slot part="bottom chrome"></slot> 2747 </span> 2748 <slot name="dialog" part="layer dialog-layer"></slot> 2749 `},pK.customElements.get("media-container")||pK.customElements.define("media-container",vI);var vS=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},vC=(e,t,i)=>(vS(e,t,"read from private field"),i?i.call(e):t.get(e)),vM=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},vL=(e,t,i,a)=>(vS(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class vR{constructor(e,t,{defaultValue:i}={defaultValue:void 0}){vM(this,y8),vM(this,y3,void 0),vM(this,y4,void 0),vM(this,y5,void 0),vM(this,y9,new Set),vL(this,y3,e),vL(this,y4,t),vL(this,y5,new Set(i))}[Symbol.iterator](){return vC(this,y8,y7).values()}get length(){return vC(this,y8,y7).size}get value(){var e;return null!=(e=[...vC(this,y8,y7)].join(" "))?e:""}set value(e){var t;e!==this.value&&(vL(this,y9,new Set),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return[...vC(this,y8,y7)][e]}values(){return vC(this,y8,y7).values()}forEach(e,t){vC(this,y8,y7).forEach(e,t)}add(...e){var t,i;e.forEach(e=>vC(this,y9).add(e)),(""!==this.value||(null==(t=vC(this,y3))?void 0:t.hasAttribute(`${vC(this,y4)}`)))&&(null==(i=vC(this,y3))||i.setAttribute(`${vC(this,y4)}`,`${this.value}`))}remove(...e){var t;e.forEach(e=>vC(this,y9).delete(e)),null==(t=vC(this,y3))||t.setAttribute(`${vC(this,y4)}`,`${this.value}`)}contains(e){return vC(this,y8,y7).has(e)}toggle(e,t){if(void 0!==t)if(t)return this.add(e),!0;else return this.remove(e),!1;return this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){return this.remove(e),this.add(t),e===t}}y3=new WeakMap,y4=new WeakMap,y5=new WeakMap,y9=new WeakMap,y8=new WeakSet,y7=function(){return vC(this,y9).size?vC(this,y9):vC(this,y5)};let vx=(e="")=>{let[t,i,a]=e.split(":");return{kind:"cc"===t?pf:pE,language:i,label:a?decodeURIComponent(a):void 0}},vD=(e="",t={})=>((e="")=>e.split(/\s+/))(e).map(e=>{let i=vx(e);return{...t,...i}}),vP=e=>e?Array.isArray(e)?e.map(e=>"string"==typeof e?vx(e):e):"string"==typeof e?vD(e):[e]:[],vN=({kind:e,label:t,language:i}={kind:"subtitles"})=>t?`${"captions"===e?"cc":"sb"}:${i}:${encodeURIComponent(t)}`:i,vO=(e=[])=>Array.prototype.map.call(e,vN).join(" "),vU=e=>{let t=Object.entries(e).map(([e,t])=>i=>i[e]===t);return e=>t.every(t=>t(e))},vH=(e,t=[],i=[])=>{let a=vP(i).map(vU);Array.from(t).filter(e=>a.some(t=>
2749t(e))).forEach(t=>{t.mode=e})},vW=(e,t=()=>!0)=>{if(!(null==e?void 0:e.textTracks))return[];let i="function"==typeof t?t:vU(t);return Array.from(e.textTracks).filter(i)},vB=e=>{var t;return!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)||e.hasAttribute(pv.MEDIA_SUBTITLES_SHOWING)},v$="exitFullscreen"in pj?"exitFullscreen":"webkitExitFullscreen"in pj?"webkitExitFullscreen":"webkitCancelFullScreen"in pj?"webkitCancelFullScreen":void 0,vV="fullscreenElement"in pj?"fullscreenElement":"webkitFullscreenElement"in pj?"webkitFullscreenElement":void 0,vq="fullscreenEnabled"in pj?"fullscreenEnabled":"webkitFullscreenEnabled"in pj?"webkitFullscreenEnabled":void 0,vF=()=>{var e;return s||(s=null==(e=null==pj?void 0:pj.createElement)?void 0:e.call(pj,"video"))},vG=async(e=vF())=>{if(!e)return!1;let t=e.volume;e.volume=t/2+.1;let i=new AbortController,a=await Promise.race([vK(e,i.signal),vj(e,t)]);return i.abort(),a},vK=(e,t)=>new Promise(i=>{e.addEventListener("volumechange",()=>i(!0),{signal:t})}),vj=async(e,t)=>{for(let i=0;i<10;i++){if(e.volume===t)return!1;await pR(10)}return e.volume!==t},vY=/.*Version\/.*Safari\/.*/.test(pK.navigator.userAgent),vQ=(e=vF())=>(!pK.matchMedia("(display-mode: standalone)").matches||!vY)&&"function"==typeof(null==e?void 0:e.requestPictureInPicture),vz=(e=vF())=>(e=>{let{documentElement:t,media:i}=e;return!!(null==t?void 0:t[vq])||i&&"webkitSupportsFullscreen"in i})({documentElement:pj,media:e}),vZ=vz(),vX=vQ(),vJ=!!pK.WebKitPlaybackTargetAvailabilityEvent,v0=!!pK.chrome,v1=e=>vW(e.media,e=>[pE,pf].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),v2=e=>vW(e.media,e=>e.mode===p_&&[pE,pf].includes(e.kind)),v3=(e,t)=>{let i=v1(e),a=v2(e),r=!!a.length;if(i.length){if(!1===t||r&&!0!==t)vH(py,i,a);else if(!0===t||!r&&!1!==t){let t=i[0],{options:r}=e;if(!(null==r?void 0:r.noSubtitlesLangPref)){let e=pK.localStorage.getItem("media-chrome-pref-subtitles-lang"),a=e?[e,...pK.navigator.languages]:pK.navigator.languages,r=i.filter(e=>a.some(t=>e.language.toLowerCase().startsWith(t.split("-")[0]))).sort((e,t)=>a.findIndex(t=>e.language.toLowerCase().startsWith(t.split("-")[0]))-a.findIndex(e=>t.language.toLowerCase().startsWith(e.split("-")[0])));r[0]&&(t=r[0])}let{language:n,label:s,kind:o}=t;vH(py,i,a),vH(p_,i,[{language:n,label:s,kind:o}])}}},v4=(e,t)=>e===t||null!=e&&null!=t&&typeof e==typeof t&&(!!("number"==typeof e&&Number.isNaN(e)&&Number.isNaN(t))||"object"==typeof e&&(Array.isArray(e)?v5(e,t):Object.entries(e).every(([e,i])=>e in t&&v4(i,t[e])))),v5=(e,t)=>{let i=Array.isArray(e),a=Array.isArray(t);return i===a&&(!i&&!a||e.length===t.length&&e.every((e,i)=>v4(e,t[i])))},v9=Object.values(pw),v8=vG().then(e=>o=e),v7=async(...e)=>{await Promise.all(e.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof pK.HTMLElement))return;let t=e.localName;if(!t.includes("-"))return;let i=pK.customElements.get(t);i&&e instanceof i||(await pK.customElements.whenDefined(t),pK.customElements.upgrade(e))}))},v6=new pK.DOMParser,be={mediaError:{get(e,t){let{media:i}=e;if((null==t?void 0:t.type)!=="playing")return null==i?void 0:i.error},mediaEvents:["emptied","error","playing"]},mediaErrorCode:{get(e,t){var i;let{media:a}=e;if((null==t?void 0:t.type)!=="playing")return null==(i=null==a?void 0:a.error)?void 0:i.code},mediaEvents:["emptied","error","playing"]},mediaErrorMessage:{get(e,t){var i,a;let{media:r}=e;if((null==t?void 0:t.type)!=="playing")return null!=(a=null==(i=null==r?void 0:r.error)?void 0:i.message)?a:""},mediaEvents:["emptied","error","playing"]},mediaWidth:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.videoWidth)?t:0},mediaEvents:["resize"]},mediaHeight:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.videoHeight)?t:0},mediaEvents:["resize"]},mediaPaused:{get(e){var t;let{media:i}=e;return null==(t=null==i?void 0:i.paused)||t},set(e,t){var i;let{media:a}=t;a&&(e?a.pause():null==(i=a.play())||i.catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(e,t){let{media:i}=e;return!!i&&(t?"playing"===t.type:!i.paused)},mediaEvents:["playing","emptied"]},mediaEnded:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.ended)&&t},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.playbackRate)?t:1},set(e,t){let{media:i}=t;!i||Number.isFinite(+e)&&(i.playbackRate=+e)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.muted)&&t},set(e,t){let{media:i,options:{noMutedPref:a}={}}=t;if(i){i.muted=e;try{let t=null!==pK.localStorage.getItem("media-chrome-pref-muted"),r=i.hasAttribute("muted");if(a){t&&pK.localStorage.removeItem("media-chrome-pref-muted");return}if(r&&!t)return;pK.localStorage.setItem("media-chrome-pref-muted",e?"true":"false")}catch(e){console.debug("Error setting muted pref",e)}}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(e,t)=>{let{options:{noMutedPref:i}}=t,{media:a}=t;if(a&&!a.muted&&!i)try{let i="true"===pK.localStorage.getItem("media-chrome-pref-muted");be.mediaMuted.set(i,t),e(i)}catch(e){console.debug("Error getting muted pref",e)}}]},mediaLoop:{get(e){let{media:t}=e;return null==t?void 0:t.loop},set(e,t){let{media:i}=t;i&&(i.loop=e)},mediaEvents:["medialooprequest"]},mediaVolume:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.volume)?t:1}
2749,set(e,t){let{media:i,options:{noVolumePref:a}={}}=t;if(i){try{null==e?pK.localStorage.removeItem("media-chrome-pref-volume"):i.hasAttribute("muted")||a||pK.localStorage.setItem("media-chrome-pref-volume",e.toString())}catch(e){console.debug("Error setting volume pref",e)}Number.isFinite(+e)&&(i.volume=+e)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(e,t)=>{let{options:{noVolumePref:i}}=t;if(!i)try{let{media:i}=t;if(!i)return;let a=pK.localStorage.getItem("media-chrome-pref-volume");if(null==a)return;be.mediaVolume.set(+a,t),e(+a)}catch(e){console.debug("Error getting volume pref",e)}}]},mediaVolumeLevel:{get(e){let{media:t}=e;return void 0===(null==t?void 0:t.volume)?"high":t.muted||0===t.volume?"off":t.volume<.5?"low":t.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get(e){var t;let{media:i}=e;return null!=(t=null==i?void 0:i.currentTime)?t:0},set(e,t){let{media:i}=t;i&&pM(e)&&(i.currentTime=e)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(e){let{media:t,options:{defaultDuration:i}={}}=e;return i&&(!t||!t.duration||Number.isNaN(t.duration)||!Number.isFinite(t.duration))?i:Number.isFinite(null==t?void 0:t.duration)?t.duration:NaN},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(e){let{media:t}=e;return(null==t?void 0:t.readyState)<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(e){var t;let{media:i}=e;if(!(null==(t=null==i?void 0:i.seekable)?void 0:t.length))return;let a=i.seekable.start(0),r=i.seekable.end(i.seekable.length-1);if(a||r)return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get(e){var t;let{media:i}=e,a=null!=(t=null==i?void 0:i.buffered)?t:[];return Array.from(a).map((e,t)=>[Number(a.start(t).toFixed(3)),Number(a.end(t).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(e){let{media:t,options:{defaultStreamType:i}={}}=e,a=[pw.LIVE,pw.ON_DEMAND].includes(i)?i:void 0;if(!t)return a;let{streamType:r}=t;if(v9.includes(r))return r===pw.UNKNOWN?a:r;let n=t.duration;return n===1/0?pw.LIVE:Number.isFinite(n)?pw.ON_DEMAND:a},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(e){let{media:t}=e;if(!t)return NaN;let{targetLiveWindow:i}=t,a=be.mediaStreamType.get(e);return(null==i||Number.isNaN(i))&&a===pw.LIVE?0:i},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(e){let{media:t,options:{liveEdgeOffset:i=10}={}}=e;if(!t)return!1;if("number"==typeof t.liveEdgeStart)return!Number.isNaN(t.liveEdgeStart)&&t.currentTime>=t.liveEdgeStart;if(be.mediaStreamType.get(e)!==pw.LIVE)return!1;let a=t.seekable;if(!a)return!0;if(!a.length)return!1;let r=a.end(a.length-1)-i;return t.currentTime>=r},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get:e=>v1(e).map(({kind:e,label:t,language:i})=>({kind:e,label:t,language:i})),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get:e=>v2(e).map(({kind:e,label:t,language:i})=>({kind:e,label:t,language:i})),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(e,t)=>{var i,a;let{media:r,options:n}=t;if(!r)return;let s=e=>{var i;n.defaultSubtitles&&(e&&![pf,pE].includes(null==(i=null==e?void 0:e.track)?void 0:i.kind)||v3(t,!0))};return r.addEventListener("loadstart",s),null==(i=r.textTracks)||i.addEventListener("addtrack",s),null==(a=r.textTracks)||a.addEventListener("removetrack",s),()=>{var e,t;r.removeEventListener("loadstart",s),null==(e=r.textTracks)||e.removeEventListener("addtrack",s),null==(t=r.textTracks)||t.removeEventListener("removetrack",s)}}]},mediaChaptersCues:{get(e){var t;let{media:i}=e;if(!i)return[];let[a]=vW(i,{kind:"chapters"});return Array.from(null!=(t=null==a?void 0:a.cues)?t:[]).map(({text:e,startTime:t,endTime:i})=>({text:e&&v6.parseFromString(e,"text/html").body.textContent||e,startTime:t,endTime:i}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(e,t)=>{var i;let{media:a}=t;if(!a)return;let r=a.querySelector('track[kind="chapters"][default][src]'),n=null==(i=a.shadowRoot)?void 0:i.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return null==r||r.addEventListener("load",e),null==n||n.addEventListener("load",e),()=>{null==r||r.removeEventListener("load",e),null==n||n.removeEventListener("load",e)}}]},mediaIsPip:{get(e){var t,i;let{media:a,documentElement:r}=e;if(!a||!r||!r.pictureInPictureElement)return!1;if(r.pictureInPictureElement===a)return!0;
2749if(r.pictureInPictureElement instanceof HTMLMediaElement)return!!(null==(t=a.localName)?void 0:t.includes("-"))&&p4(a,r.pictureInPictureElement);if(r.pictureInPictureElement.localName.includes("-")){let e=r.pictureInPictureElement.shadowRoot;for(;null==e?void 0:e.pictureInPictureElement;){if(e.pictureInPictureElement===a)return!0;e=null==(i=e.pictureInPictureElement)?void 0:i.shadowRoot}}return!1},set(e,t){let{media:i}=t;if(i)if(e){if(!pj.pictureInPictureEnabled)return void console.warn("MediaChrome: Picture-in-picture is not enabled");if(!i.requestPictureInPicture)return void console.warn("MediaChrome: The current media does not support picture-in-picture");let e=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(t=>{if(11===t.code){if(!i.src)return void console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.");if(0===i.readyState&&"none"===i.preload){let t=()=>{i.removeEventListener("loadedmetadata",a),i.preload="none"},a=()=>{i.requestPictureInPicture().catch(e),t()};i.addEventListener("loadedmetadata",a),i.preload="metadata",setTimeout(()=>{0===i.readyState&&e(),t()},1e3)}else throw t}else throw t})}else pj.pictureInPictureElement&&pj.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(e){var t;let{media:i}=e;return[...null!=(t=null==i?void 0:i.videoRenditions)?t:[]].map(e=>({...e}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(e){var t,i,a;let{media:r}=e;return null==(a=null==(i=null==r?void 0:r.videoRenditions)?void 0:i[null==(t=r.videoRenditions)?void 0:t.selectedIndex])?void 0:a.id},set(e,t){let{media:i}=t;if(!(null==i?void 0:i.videoRenditions))return void console.warn("MediaController: Rendition selection not supported by this media.");let a=Array.prototype.findIndex.call(i.videoRenditions,t=>t.id==e);i.videoRenditions.selectedIndex!=a&&(i.videoRenditions.selectedIndex=a)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(e){var t;let{media:i}=e;return[...null!=(t=null==i?void 0:i.audioTracks)?t:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(e){var t,i;let{media:a}=e;return null==(i=[...null!=(t=null==a?void 0:a.audioTracks)?t:[]].find(e=>e.enabled))?void 0:i.id},set(e,t){let{media:i}=t;if(!(null==i?void 0:i.audioTracks))return void console.warn("MediaChrome: Audio track selection not supported by this media.");for(let t of i.audioTracks)t.enabled=e==t.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get:e=>(e=>{var t;let{media:i,documentElement:a,fullscreenElement:r=i}=e;if(!i||!a)return!1;let n=(e=>{let{documentElement:t,media:i}=e,a=null==t?void 0:t[vV];return!a&&"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&i.webkitDisplayingFullscreen&&"fullscreen"===i.webkitPresentationMode?i:a})(e);if(!n)return!1;if(n===r||n===i)return!0;if(n.localName.includes("-")){let e=n.shadowRoot;if(!(vV in e))return p4(n,r);for(;null==e?void 0:e[vV];){if(e[vV]===r)return!0;e=null==(t=e[vV])?void 0:t.shadowRoot}}return!1})(e),set(e,t,i){var a,r;e?((e=>{var t;let{media:i,fullscreenElement:a}=e;try{let e=a&&"requestFullscreen"in a?"requestFullscreen":a&&"webkitRequestFullScreen"in a?"webkitRequestFullScreen":void 0;if(e){let i=null==(t=a[e])?void 0:t.call(a);if(i instanceof Promise)return i.catch(()=>{})}else(null==i?void 0:i.webkitEnterFullscreen)?i.webkitEnterFullscreen():(null==i?void 0:i.requestFullscreen)&&i.requestFullscreen()}catch(e){console.error(e)}})(t),!i.detail||(null==(a=t.media)?void 0:a.inert)||null==(r=t.media)||r.focus()):(e=>{var t;let{documentElement:i}=e;if(v$){let e=null==(t=null==i?void 0:i[v$])?void 0:t.call(i);if(e instanceof Promise)return e.catch(()=>{})}})(t)},rootEvents:["fullscreenchange","webkitfullscreenchange"],mediaEvents:["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"]},mediaIsCasting:{get(e){var t;let{media:i}=e;return!!(null==i?void 0:i.remote)&&(null==(t=i.remote)?void 0:t.state)!=="disconnected"&&!!i.remote.state},set(e,t){var i,a;let{media:r}=t;if(r&&(!e||(null==(i=r.remote)?void 0:i.state)==="disconnected")&&(e||(null==(a=r.remote)?void 0:a.state)==="connected")){if("function"!=typeof r.remote.prompt)return void console.warn("MediaChrome: Casting is not supported in this environment");r.remote.prompt().catch(()=>{})}},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get:()=>!1,set(e,t){let{media:i}=t;if(i){if(!(i.webkitShowPlaybackTargetPicker&&pK.WebKitPlaybackTargetAvailabilityEvent))return void console.error("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment");i.webkitShowPlaybackTargetPicker()}},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(e){let{media:t}=e;if(!vZ||!vz(t))return pA}},mediaPipUnavailable:{get(e){let{media:t}=e;return vX&&vQ(t)?(null==t?void 0:t.disablePictureInPicture)?pk:void 0:pA}},mediaVolumeUnavailable:{get(e){let{media:t}=e;if(!1===o||(null==t?void 0:t.volume)==void 0)return pA},stateOwnersUpdateHandlers:[e=>{null==o&&v8.then(t=>e(t?void 0:pA))}]},mediaCastUnavailable:{get(e,{availability:t="not-available"}={}){var i;let{media:a}=e;return v0&&(null==(i=null==a?void 0:a.remote)?void 0:i.state)?null!=t&&"available"!==t?pk:void 0:pA},stateOwnersUpdateHandlers:[(e,t)=>{var i;let{media:a}=t;if(a)return a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||null==(i=null==a?void 0:a.remote)||i.watchAvailability(t=>{e({availability:t?"available":"not-available"})}).catch(t=>{"NotSupportedError"===t.name?e({availability:null}):e({availability:"not-available"})}),()=>{var e;null==(e=null==a?void 0:a.remote)||e.cancelWatchAvailability().catch(()=>{})}}]},mediaAirplayUnavailable:{get:(e,t)=>vJ?(null==t?void 0:t.availability)==="not-available"?pk:void 0:pA,mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(e,t)=>{var i;let{media:a}=t;if(a)return a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||null==(i=null==a?void 0:a.remote)||i.watchAvailability(t=>{e({availability:t?"available":"not-available"})}).catch(t=>{"NotSupportedError"===t.name?e({availability:null}):e({availability:"not-available"})}),()=>{var e;null==(e=null==a?void 0:a.remote)||e.cancelWatchAvailability().catch(()=>{})}}]},mediaRenditionUnavailable:{get(e){var t;let{media:i}=e;return(null==i?void 0:i.videoRenditions)?(null==(t=i.videoRenditions)?void 0:t.length)?void 0:pk:pA},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(e){var t,i;let{media:a}=e;return(null==a?void 0:a.audioTracks)?(null!=(i=null==(t=a.audioTracks)?void 0:t.length)?i:0)<=1?pk:void 0:pA},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(e){let{options:{mediaLang:t}={}}=e;return null!=t?t:"en"}}},bt={[pc.MEDIA_PREVIEW_REQUEST](e,t,{detail:i}){var a,r,n;let s,o,{media:l}=t,d=null!=i?i:void 0;if(l&&null!=d){let[e]=vW(l,{kind:"metadata",label:"thumbnails"}),t=Array.prototype.find.call(null!=(a=null==e?void 0:e.cues)?a:[],(e,t,i)=>0===t?e.endTime>
2749d:t===i.length-1?e.startTime<=d:e.startTime<=d&&e.endTime>d);if(t){let e=/'^(?:[a-z]+:)?\/\//i.test(t.text)||null==(r=null==l?void 0:l.querySelector('track[label="thumbnails"]'))?void 0:r.src,i=new URL(t.text,e);o=new URLSearchParams(i.hash).get("#xywh").split(",").map(e=>+e),s=i.href}}let u=e.mediaDuration.get(t),c=null==(n=e.mediaChaptersCues.get(t).find((e,t,i)=>t===i.length-1&&u===e.endTime?e.startTime<=d&&e.endTime>=d:e.startTime<=d&&e.endTime>d))?void 0:n.text;return null!=i&&null==c&&(c=""),{mediaPreviewTime:d,mediaPreviewImage:s,mediaPreviewCoords:o,mediaPreviewChapter:c}},[pc.MEDIA_PAUSE_REQUEST](e,t){e.mediaPaused.set(!0,t)},[pc.MEDIA_PLAY_REQUEST](e,t){var i,a,r,n;let s=e.mediaStreamType.get(t)===pw.LIVE,o=!(null==(i=t.options)?void 0:i.noAutoSeekToLive),l=e.mediaTargetLiveWindow.get(t)>0;if(s&&o&&!l){let i=null==(a=e.mediaSeekable.get(t))?void 0:a[1];if(i){let a=null!=(n=null==(r=t.options)?void 0:r.seekToLiveOffset)?n:0;e.mediaCurrentTime.set(i-a,t)}}e.mediaPaused.set(!1,t)},[pc.MEDIA_PLAYBACK_RATE_REQUEST](e,t,{detail:i}){e.mediaPlaybackRate.set(i,t)},[pc.MEDIA_MUTE_REQUEST](e,t){e.mediaMuted.set(!0,t)},[pc.MEDIA_UNMUTE_REQUEST](e,t){e.mediaVolume.get(t)||e.mediaVolume.set(.25,t),e.mediaMuted.set(!1,t)},[pc.MEDIA_LOOP_REQUEST](e,t,{detail:i}){let a=!!i;return e.mediaLoop.set(a,t),{mediaLoop:a}},[pc.MEDIA_VOLUME_REQUEST](e,t,{detail:i}){i&&e.mediaMuted.get(t)&&e.mediaMuted.set(!1,t),e.mediaVolume.set(i,t)},[pc.MEDIA_SEEK_REQUEST](e,t,{detail:i}){e.mediaCurrentTime.set(i,t)},[pc.MEDIA_SEEK_TO_LIVE_REQUEST](e,t){var i,a,r;let n=null==(i=e.mediaSeekable.get(t))?void 0:i[1];if(Number.isNaN(Number(n)))return;let s=null!=(r=null==(a=t.options)?void 0:a.seekToLiveOffset)?r:0;e.mediaCurrentTime.set(n-s,t)},[pc.MEDIA_SHOW_SUBTITLES_REQUEST](e,t,{detail:i}){var a;let{options:r}=t,n=v1(t),s=vP(i),o=null==(a=s[0])?void 0:a.language;o&&!r.noSubtitlesLangPref&&pK.localStorage.setItem("media-chrome-pref-subtitles-lang",o),vH(p_,n,s)},[pc.MEDIA_DISABLE_SUBTITLES_REQUEST](e,t,{detail:i}){vH(py,v1(t),null!=i?i:[])},[pc.MEDIA_TOGGLE_SUBTITLES_REQUEST](e,t,{detail:i}){v3(t,i)},[pc.MEDIA_RENDITION_REQUEST](e,t,{detail:i}){e.mediaRenditionSelected.set(i,t)},[pc.MEDIA_AUDIO_TRACK_REQUEST](e,t,{detail:i}){e.mediaAudioTrackEnabled.set(i,t)},[pc.MEDIA_ENTER_PIP_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsPip.set(!0,t)},[pc.MEDIA_EXIT_PIP_REQUEST](e,t){e.mediaIsPip.set(!1,t)},[pc.MEDIA_ENTER_FULLSCREEN_REQUEST](e,t,i){e.mediaIsPip.get(t)&&e.mediaIsPip.set(!1,t),e.mediaIsFullscreen.set(!0,t,i)},[pc.MEDIA_EXIT_FULLSCREEN_REQUEST](e,t){e.mediaIsFullscreen.set(!1,t)},[pc.MEDIA_ENTER_CAST_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsCasting.set(!0,t)},[pc.MEDIA_EXIT_CAST_REQUEST](e,t){e.mediaIsCasting.set(!1,t)},[pc.MEDIA_AIRPLAY_REQUEST](e,t){e.mediaIsAirplaying.set(!0,t)}};var bi=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ba=(e,t,i)=>(bi(e,t,"read from private field"),i?i.call(e):t.get(e)),br=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},bn=(e,t,i,a)=>(bi(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),bs=(e,t,i)=>(bi(e,t,"access private method"),i);let bo=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," ","f","m","k","c","l","j",">","<","p"],bl="defaultsubtitles",bd="defaultstreamtype",bu="defaultduration",bc="fullscreenelement",bh="hotkeys",bm="keyboardbackwardseekoffset",bp="keyboardforwardseekoffset",bv="keyboarddownvolumestep",bb="keyboardupvolumestep",bg="keysused",bE="lang",bf="loop",by="liveedgeoffset",b_="noautoseektolive",bk="nodefaultstore",bA="nohotkeys",bw="nomutedpref",bT="nosubtitleslangpref",bI="novolumepref",bS="seektoliveoffset";class bC extends vI{constructor(){super(),br(this,_o),br(this,_u),br(this,_h),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,br(this,y6,new vR(this,bh)),br(this,_e,void 0),br(this,_t,void 0),br(this,_i,null),br(this,_a,void 0),br(this,_r,void 0),br(this,_n,e=>{var t;null==(t=ba(this,_t))||t.dispatch(e)}),br(this,_s,void 0),br(this,_d,e=>{let{key:t,shiftKey:i}=e;i&&("/"===t||"?"===t)||bo.includes(t)?this.keyboardShortcutHandler(e):this.removeEventListener("keyup",ba(this,_d))}),this.associateElement(this);let e={};bn(this,_a,t=>{Object.entries(t).forEach(([t,i])=>{if(t in e&&e[t]===i)return;
2749this.propagateMediaState(t,i);let a=t.toLowerCase(),r=new pK.CustomEvent(pg[a],{composed:!0,detail:i});this.dispatchEvent(r)}),e=t})}static get observedAttributes(){return super.observedAttributes.concat(bA,bh,bd,bl,bu,bw,bI,bE,bf,by,bS,b_)}get mediaStore(){return ba(this,_t)}set mediaStore(e){var t,i;(ba(this,_t)&&(null==(t=ba(this,_r))||t.call(this),bn(this,_r,void 0)),bn(this,_t,e),ba(this,_t)||this.hasAttribute(bk))?bn(this,_r,null==(i=ba(this,_t))?void 0:i.subscribe(ba(this,_a))):bs(this,_o,_l).call(this)}get fullscreenElement(){var e;return null!=(e=ba(this,_e))?e:this}set fullscreenElement(e){var t;this.hasAttribute(bc)&&this.removeAttribute(bc),bn(this,_e,e),null==(t=ba(this,_t))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return va(this,bl)}set defaultSubtitles(e){vr(this,bl,e)}get defaultStreamType(){return vn(this,bd)}set defaultStreamType(e){vs(this,bd,e)}get defaultDuration(){return vt(this,bu)}set defaultDuration(e){vi(this,bu,e)}get noHotkeys(){return va(this,bA)}set noHotkeys(e){vr(this,bA,e)}get keysUsed(){return vn(this,bg)}set keysUsed(e){vs(this,bg,e)}get liveEdgeOffset(){return vt(this,by)}set liveEdgeOffset(e){vi(this,by,e)}get noAutoSeekToLive(){return va(this,b_)}set noAutoSeekToLive(e){vr(this,b_,e)}get noVolumePref(){return va(this,bI)}set noVolumePref(e){vr(this,bI,e)}get noMutedPref(){return va(this,bw)}set noMutedPref(e){vr(this,bw,e)}get noSubtitlesLangPref(){return va(this,bT)}set noSubtitlesLangPref(e){vr(this,bT,e)}get noDefaultStore(){return va(this,bk)}set noDefaultStore(e){vr(this,bk,e)}attributeChangedCallback(e,t,i){var a,r,n,s,o,l,d,u,c,h,m,v;if(super.attributeChangedCallback(e,t,i),e===bA)i!==t&&""===i?(this.hasAttribute(bh)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):i!==t&&null===i&&this.enableHotkeys();else if(e===bh)ba(this,y6).value=i;else if(e===bl&&i!==t)null==(a=ba(this,_t))||a.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(bl)}});else if(e===bd)null==(n=ba(this,_t))||n.dispatch({type:"optionschangerequest",detail:{defaultStreamType:null!=(r=this.getAttribute(bd))?r:void 0}});else if(e===by&&i!==t)null==(s=ba(this,_t))||s.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(by)?+this.getAttribute(by):void 0,seekToLiveOffset:this.hasAttribute(bS)?+this.getAttribute(bS):this.hasAttribute(by)?+this.getAttribute(by):void 0}});else if(e===bS&&i!==t)null==(o=ba(this,_t))||o.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(bS)?+this.getAttribute(bS):this.hasAttribute(by)?+this.getAttribute(by):void 0}});else if(e===b_)null==(l=ba(this,_t))||l.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(b_)}});else if(e===bc){let e=i?null==(d=this.getRootNode())?void 0:d.getElementById(i):void 0;bn(this,_e,e),null==(u=ba(this,_t))||u.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===bE&&i!==t?(pD=i,null==(c=ba(this,_t))||c.dispatch({type:"optionschangerequest",detail:{mediaLang:i}})):e===bf&&i!==t?null==(h=ba(this,_t))||h.dispatch({type:pc.MEDIA_LOOP_REQUEST,detail:null!=i}):e===bI&&i!==t?null==(m=ba(this,_t))||m.dispatch({type:"optionschangerequest",detail:{noVolumePref:this.hasAttribute(bI)}}):e===bw&&i!==t&&(null==(v=ba(this,_t))||v.dispatch({type:"optionschangerequest",detail:{noMutedPref:this.hasAttribute(bw)}}))}connectedCallback(){var e,t,i;this.associateElement(this),ba(this,_t)||this.hasAttribute(bk)||bs(this,_o,_l).call(this),null==(e=ba(this,_t))||e.dispatch({type:"documentelementchangerequest",detail:pj}),null==(t=ba(this,_t))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement}),super.connectedCallback(),ba(this,_t)&&!ba(this,_r)&&bn(this,_r,null==(i=ba(this,_t))?void 0:i.subscribe(ba(this,_a))),void 0!==ba(this,_s)&&ba(this,_t)&&this.media&&setTimeout(()=>{var e,t,i;(null==(t=null==(e=this.media)?void 0:e.textTracks)?void 0:t.length)&&(null==(i=ba(this,_t))||i.dispatch({type:pc.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:ba(this,_s)}))},0),this.hasAttribute(bA)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var e,t,i,a,r,n;if(null==(e=super.disconnectedCallback)||e.call(this),this.disableHotkeys(),ba(this,_t)){let e=ba(this,_t).getState();bn(this,_s,!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)),null==(i=ba(this,_t))||i.dispatch({type:"fullscreenelementchangerequest",detail:void 0}),null==(a=ba(this,_t))||a.dispatch({type:"documentelementchangerequest",detail:void 0}),null==(r=ba(this,_t))||r.dispatch({type:pc.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})}ba(this,_r)&&(null==(n=ba(this,_r))||n.call(this),bn(this,_r,void 0)),this.unassociateElement(this),ba(this,_i)&&(ba(this,_i).remove(),bn(this,_i,null))}mediaSetCallback(e){var t;super.mediaSetCallback(e),null==(t=ba(this,_t))||t.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var t;super.mediaUnsetCallback(e),null==(t=ba(this,_t))||t.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,t){bU(this.mediaStateReceivers,e,t)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(t.has(e))return;let i=bH(e,this.registerMediaStateReceiver.bind(this),this.unregisterMediaStateReceiver.bind(this));
2749Object.values(pc).forEach(t=>{e.addEventListener(t,ba(this,_n))}),t.set(e,i)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;t.has(e)&&(t.get(e)(),t.delete(e),Object.values(pc).forEach(t=>{e.removeEventListener(t,ba(this,_n))}))}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;!(t.indexOf(e)>-1)&&(t.push(e),ba(this,_t)&&Object.entries(ba(this,_t).getState()).forEach(([t,i])=>{bU([e],t,i)}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,i=t.indexOf(e);i<0||t.splice(i,1)}enableHotkeys(){this.addEventListener("keydown",bs(this,_u,_c))}disableHotkeys(){this.removeEventListener("keydown",bs(this,_u,_c)),this.removeEventListener("keyup",ba(this,_d))}get hotkeys(){return ba(this,y6)}set hotkeys(e){vs(this,bh,e)}keyboardShortcutHandler(e){var t,i,a,r,n,s,o,l,d;let u,c,h,m=e.target;if(!((null!=(a=null!=(i=null==(t=m.getAttribute(bg))?void 0:t.split(" "))?i:null==m?void 0:m.keysUsed)?a:[]).map(e=>"Space"===e?" ":e).filter(Boolean).includes(e.key)||ba(this,y6).contains(`no${e.key.toLowerCase()}`)||" "===e.key&&ba(this,y6).contains("nospace"))&&!(e.shiftKey&&("/"===e.key||"?"===e.key)&&ba(this,y6).contains("noshift+/")))switch(e.key){case" ":case"k":u=ba(this,_t).getState().mediaPaused?pc.MEDIA_PLAY_REQUEST:pc.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new pK.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"m":u="off"===this.mediaStore.getState().mediaVolumeLevel?pc.MEDIA_UNMUTE_REQUEST:pc.MEDIA_MUTE_REQUEST,this.dispatchEvent(new pK.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"f":u=this.mediaStore.getState().mediaIsFullscreen?pc.MEDIA_EXIT_FULLSCREEN_REQUEST:pc.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new pK.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new pK.CustomEvent(pc.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":case"j":{let e=this.hasAttribute(bm)?+this.getAttribute(bm):10;c=Math.max((null!=(r=this.mediaStore.getState().mediaCurrentTime)?r:0)-e,0),h=new pK.CustomEvent(pc.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break}case"ArrowRight":case"l":{let e=this.hasAttribute(bp)?+this.getAttribute(bp):10;c=Math.max((null!=(n=this.mediaStore.getState().mediaCurrentTime)?n:0)+e,0),h=new pK.CustomEvent(pc.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break}case"ArrowUp":{let e=this.hasAttribute(bb)?+this.getAttribute(bb):.025;c=Math.min((null!=(s=this.mediaStore.getState().mediaVolume)?s:1)+e,1),h=new pK.CustomEvent(pc.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break}case"ArrowDown":{let e=this.hasAttribute(bv)?+this.getAttribute(bv):.025;c=Math.max((null!=(o=this.mediaStore.getState().mediaVolume)?o:1)-e,0),h=new pK.CustomEvent(pc.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break}case"<":c=Math.max((null!=(l=this.mediaStore.getState().mediaPlaybackRate)?l:1)-.25,.25).toFixed(2),h=new pK.CustomEvent(pc.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break;case">":c=Math.min((null!=(d=this.mediaStore.getState().mediaPlaybackRate)?d:1)+.25,2).toFixed(2),h=new pK.CustomEvent(pc.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:c}),this.dispatchEvent(h);break;case"/":case"?":e.shiftKey&&bs(this,_h,_m).call(this);break;case"p":u=this.mediaStore.getState().mediaIsPip?pc.MEDIA_EXIT_PIP_REQUEST:pc.MEDIA_ENTER_PIP_REQUEST,h=new pK.CustomEvent(u,{composed:!0,bubbles:!0}),this.dispatchEvent(h)}}}y6=new WeakMap,_e=new WeakMap,_t=new WeakMap,_i=new WeakMap,_a=new WeakMap,_r=new WeakMap,_n=new WeakMap,_s=new WeakMap,_o=new WeakSet,_l=function(){var e;this.mediaStore=(({media:e,fullscreenElement:t,documentElement:i,stateMediator:a=be,requestMap:r=bt,options:n={},monitorStateOwnersOnlyWithSubscriptions:s=!0})=>{let o,l=[],d={options:{...n}},u=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0}),c=e=>{void 0==e||v4(e,u)||(u=Object.freeze({...u,...e}),l.forEach(e=>e(u)))},h=()=>{c(Object.entries(a).reduce((e,[t,{get:i}])=>(e[t]=i(d),e),{}))},m={},v=async(e,t)=>{var i,r,n,u,v,b,g,E,f,y,_,k,A,w,T,I;let S=!!o;if(o={...d,...null!=o?o:{},...e},S)return;await v7(...Object.values(e));let C=l.length>0&&0===t&&s,M=d.media!==o.media,L=(null==(i=d.media)?void 0:i.textTracks)!==(null==(r=o.media)?void 0:r.textTracks),R=(null==(n=d.media)?void 0:n.videoRenditions)!==(null==(u=o.media)?void 0:u.videoRenditions),x=(null==(v=d.media)?void 0:v.audioTracks)!==(null==(b=o.media)?void 0:b.audioTracks),D=(null==(g=d.media)?void 0:g.remote)!==(null==(E=o.media)?void 0:E.remote),P=d.documentElement!==o.documentElement,N=!!d.media&&(M||C),O=!!(null==(f=d.media)?void 0:f.textTracks)&&(L||C),U=!!(null==(y=d.media)?void 0:y.videoRenditions)&&(R||C),H=!!(null==(_=d.media)?void 0:_.audioTracks)&&(x||C),W=!!(null==(k=d.media)?void 0:k.remote)&&(D||C),B=!!d.documentElement&&(P||C),$=N||O||U||H||W||B,V=0===l.length&&1===t&&s,q=!!o.media&&(M||V),F=!!(null==(A=o.media)?void 0:A.textTracks)&&(L||V),G=!!(null==(w=o.media)?void 0:w.videoRenditions)&&(R||V),K=!!(null==(T=o.media)?void 0:T.audioTracks)&&(x||V),j=!!(null==(I=o.media)?void 0:I.remote)&&(D||V),Y=!!o.documentElement&&(P||V),Q=q||F||G||K||j||Y;
2749if(!($||Q)){Object.entries(o).forEach(([e,t])=>{d[e]=t}),h(),o=void 0;return}Object.entries(a).forEach(([e,{get:t,mediaEvents:i=[],textTracksEvents:a=[],videoRenditionsEvents:r=[],audioTracksEvents:n=[],remoteEvents:s=[],rootEvents:l=[],stateOwnersUpdateHandlers:u=[]}])=>{let h;m[e]||(m[e]={});let v=i=>{c({[e]:t(d,i)})};h=m[e].mediaEvents,i.forEach(t=>{h&&N&&(d.media.removeEventListener(t,h),m[e].mediaEvents=void 0),q&&(o.media.addEventListener(t,v),m[e].mediaEvents=v)}),h=m[e].textTracksEvents,a.forEach(t=>{var i,a;h&&O&&(null==(i=d.media.textTracks)||i.removeEventListener(t,h),m[e].textTracksEvents=void 0),F&&(null==(a=o.media.textTracks)||a.addEventListener(t,v),m[e].textTracksEvents=v)}),h=m[e].videoRenditionsEvents,r.forEach(t=>{var i,a;h&&U&&(null==(i=d.media.videoRenditions)||i.removeEventListener(t,h),m[e].videoRenditionsEvents=void 0),G&&(null==(a=o.media.videoRenditions)||a.addEventListener(t,v),m[e].videoRenditionsEvents=v)}),h=m[e].audioTracksEvents,n.forEach(t=>{var i,a;h&&H&&(null==(i=d.media.audioTracks)||i.removeEventListener(t,h),m[e].audioTracksEvents=void 0),K&&(null==(a=o.media.audioTracks)||a.addEventListener(t,v),m[e].audioTracksEvents=v)}),h=m[e].remoteEvents,s.forEach(t=>{var i,a;h&&W&&(null==(i=d.media.remote)||i.removeEventListener(t,h),m[e].remoteEvents=void 0),j&&(null==(a=o.media.remote)||a.addEventListener(t,v),m[e].remoteEvents=v)}),h=m[e].rootEvents,l.forEach(t=>{h&&B&&(d.documentElement.removeEventListener(t,h),m[e].rootEvents=void 0),Y&&(o.documentElement.addEventListener(t,v),m[e].rootEvents=v)});let b=m[e].stateOwnersUpdateHandlers;if(b&&$&&(Array.isArray(b)?b:[b]).forEach(e=>{"function"==typeof e&&e()}),Q){let t=u.map(e=>e(v,o)).filter(e=>"function"==typeof e);m[e].stateOwnersUpdateHandlers=1===t.length?t[0]:t}else $&&(m[e].stateOwnersUpdateHandlers=void 0)}),Object.entries(o).forEach(([e,t])=>{d[e]=t}),h(),o=void 0};return v({media:e,fullscreenElement:t,documentElement:i,options:n}),{dispatch(e){let{type:t,detail:i}=e;r[t]&&null==u.mediaErrorCode?c(r[t](a,d,e)):"mediaelementchangerequest"===t?v({media:i}):"fullscreenelementchangerequest"===t?v({fullscreenElement:i}):"documentelementchangerequest"===t?v({documentElement:i}):"optionschangerequest"===t&&(Object.entries(null!=i?i:{}).forEach(([e,t])=>{d.options[e]=t}),h())},getState:()=>u,subscribe:e=>(v({},l.length+1),l.push(e),e(u),()=>{let t=l.indexOf(e);t>=0&&(v({},l.length-1),l.splice(t,1))})}})({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(bl),defaultDuration:this.hasAttribute(bu)?+this.getAttribute(bu):void 0,defaultStreamType:null!=(e=this.getAttribute(bd))?e:void 0,liveEdgeOffset:this.hasAttribute(by)?+this.getAttribute(by):void 0,seekToLiveOffset:this.hasAttribute(bS)?+this.getAttribute(bS):this.hasAttribute(by)?+this.getAttribute(by):void 0,noAutoSeekToLive:this.hasAttribute(b_),noVolumePref:this.hasAttribute(bI),noMutedPref:this.hasAttribute(bw),noSubtitlesLangPref:this.hasAttribute(bT)}})},_d=new WeakMap,_u=new WeakSet,_c=function(e){var t;let{metaKey:i,altKey:a,key:r,shiftKey:n}=e,s=n&&("/"===r||"?"===r);if(s&&(null==(t=ba(this,_i))?void 0:t.open)||i||a||!s&&!bo.includes(r))return void this.removeEventListener("keyup",ba(this,_d));let o=e.target,l=o instanceof HTMLElement&&("media-volume-range"===o.tagName.toLowerCase()||"media-time-range"===o.tagName.toLowerCase());![" ","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)||ba(this,y6).contains(`no${r.toLowerCase()}`)||" "===r&&ba(this,y6).contains("nospace")||l||e.preventDefault(),this.addEventListener("keyup",ba(this,_d),{once:!0})},_h=new WeakSet,_m=function(){ba(this,_i)||(bn(this,_i,pj.createElement("media-keyboard-shortcuts-dialog")),this.appendChild(ba(this,_i))),ba(this,_i).open=!0};let bM=Object.values(pv),bL=Object.values(pm),bR=e=>{var t,i,a,r;let{observedAttributes:n}=e.constructor;!n&&(null==(t=e.nodeName)?void 0:t.includes("-"))&&(pK.customElements.upgrade(e),{observedAttributes:n}=e.constructor);let s=null==(r=null==(a=null==(i=null==e?void 0:e.getAttribute)?void 0:i.call(e,ph.MEDIA_CHROME_ATTRIBUTES))?void 0:a.split)?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(e=>bM.includes(e)):[]},bx=e=>{var t,i;return(null==(t=e.nodeName)?void 0:t.includes("-"))&&pK.customElements.get(null==(i=e.nodeName)?void 0:i.toLowerCase())&&!(e instanceof pK.customElements.get(e.nodeName.toLowerCase()))&&pK.customElements.upgrade(e),bL.some(t=>t in e)||!!bR(e).length},bD=e=>{var t;return null==(t=null==e?void 0:e.join)?void 0:t.call(e,":")},bP={[pv.MEDIA_SUBTITLES_LIST]:vO,[pv.MEDIA_SUBTITLES_SHOWING]:vO,[pv.MEDIA_SEEKABLE]:bD,[pv.MEDIA_BUFFERED]:e=>null==e?void 0:e.map(bD).join(" "),[pv.MEDIA_PREVIEW_COORDS]:e=>null==e?void 0:e.join(" "),[pv.MEDIA_RENDITION_LIST]:function(e){return null==e?void 0:e.map(pT).join(" ")},[pv.MEDIA_AUDIO_TRACK_LIST]:function(e){return null==e?void 0:e.map(pS).join(" ")}},bN=async(e,t,i)=>{var a,r;if(e.isConnected||await pR(0),"boolean"==typeof i||null==i)return vr(e,t,i);if("number"==typeof i)return vi(e,t,i);if("string"==typeof i)return vs(e,t,i);if(Array.isArray(i)&&!i.length)return e.removeAttribute(t);
2749let n=null!=(r=null==(a=bP[t])?void 0:a.call(bP,i))?r:i;return e.setAttribute(t,n)},bO=(e,t)=>{var i;if(null==(i=e.closest)?void 0:i.call(e,'*[slot="media"]'))return;let a=(e,t)=>{var i,a;bx(e)&&t(e);let{children:r=[]}=null!=e?e:{};[...r,...null!=(a=null==(i=null==e?void 0:e.shadowRoot)?void 0:i.children)?a:[]].forEach(e=>bO(e,t))},r=null==e?void 0:e.nodeName.toLowerCase();r.includes("-")&&!bx(e)?pK.customElements.whenDefined(r).then(()=>{a(e,t)}):a(e,t)},bU=(e,t,i)=>{e.forEach(e=>{if(t in e){e[t]=i;return}let a=bR(e),r=t.toLowerCase();a.includes(r)&&bN(e,r,i)})},bH=(e,t,i)=>{bO(e,t);let a=e=>{var i;t(null!=(i=null==e?void 0:e.composedPath()[0])?i:e.target)},r=e=>{var t;i(null!=(t=null==e?void 0:e.composedPath()[0])?t:e.target)};e.addEventListener(pc.REGISTER_MEDIA_STATE_RECEIVER,a),e.addEventListener(pc.UNREGISTER_MEDIA_STATE_RECEIVER,r);let n=[],s=e=>{let a=e.target;"media"!==a.name&&(n.forEach(e=>bO(e,i)),(n=[...a.assignedElements({flatten:!0})]).forEach(e=>bO(e,t)))};e.addEventListener("slotchange",s);let o=new MutationObserver(e=>{e.forEach(e=>{let{addedNodes:a=[],removedNodes:r=[],type:n,target:s,attributeName:o}=e;"childList"===n?(Array.prototype.forEach.call(a,e=>bO(e,t)),Array.prototype.forEach.call(r,e=>bO(e,i))):"attributes"===n&&o===ph.MEDIA_CHROME_ATTRIBUTES&&(bx(s)?t(s):i(s))})});return o.observe(e,{childList:!0,attributes:!0,subtree:!0}),()=>{bO(e,i),e.removeEventListener("slotchange",s),o.disconnect(),e.removeEventListener(pc.REGISTER_MEDIA_STATE_RECEIVER,a),e.removeEventListener(pc.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};pK.customElements.get("media-controller")||pK.customElements.define("media-controller",bC);let bW="placement",bB="bounds";class b$ extends pK.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!p7(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;let t=this.placement;if("left"===t||"right"===t)return void this.style.removeProperty("--media-tooltip-offset-x");let i=getComputedStyle(this),a=null!=(e=p5(this,"#"+this.bounds))?e:p0(this);if(!a)return;let{x:r,width:n}=a.getBoundingClientRect(),{x:s,width:o}=this.getBoundingClientRect(),l=i.getPropertyValue("--media-tooltip-offset-x"),d=l?parseFloat(l.replace("px","")):0,u=i.getPropertyValue("--media-tooltip-container-margin"),c=u?parseFloat(u.replace("px","")):0,h=s-r+d-c,m=s+o-(r+n)+d+c;h<0?this.style.setProperty("--media-tooltip-offset-x",`${h}px`):m>0?this.style.setProperty("--media-tooltip-offset-x",`${m}px`):this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=pJ(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){const e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[bW,bB]}get placement(){return vn(this,bW)}set placement(e){vs(this,bW,e)}get bounds(){return vn(this,bB)}set bounds(e){vs(this,bB,e)}}b$.shadowRootOptions={mode:"open"},b$.getTemplateHTML=function(e){return` 2750 <style> 2751 :host { 2752 --_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7))); 2753 --_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color)); 2754 --_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2); 2755 --_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px); 2756 --_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color)); 2757 position: relative; 2758 pointer-events: none; 2759 display: var(--media-tooltip-display, inline-flex); 2760 justify-content: center; 2761 align-items: center; 2762 box-sizing: border-box; 2763 z-index: var(--media-tooltip-z-index, 1); 2764 background: var(--_tooltip-background); 2765 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 2766 font: var(--media-font, 2767 var(--media-font-weight, 400) 2768 var(--media-font-size, 13px) / 2769 var(--media-text-content-height, var(--media-control-height, 18px)) 2770 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 2771 padding: var(--media-tooltip-padding, .35em .7em); 2772 border: var(--media-tooltip-border, none); 2773 border-radius: var(--media-tooltip-border-radius, 5px); 2774 filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2))); 2775 white-space: var(--media-tooltip-white-space, nowrap); 2776 } 2777 2778 :host([hidden]) { 2779 display: none; 2780 } 2781 2782 img, svg { 2783 display: inline-block; 2784 } 2785 2786 #arrow { 2787 position: absolute; 2788 width: 0px; 2789 height: 0px; 2790 border-style: solid; 2791 display: var(--media-tooltip-arrow-display, block); 2792 } 2793 2794 :host(:not([placement])), 2795 :host([placement="top"]) { 2796 position: absolute; 2797 bottom: calc(100% + var(--media-tooltip-distance, 12px)); 2798 left: 50%; 2799 transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0
2799); 2800 } 2801 :host(:not([placement])) #arrow, 2802 :host([placement="top"]) #arrow { 2803 top: 100%; 2804 left: 50%; 2805 border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width); 2806 border-color: var(--_tooltip-arrow-background) transparent transparent transparent; 2807 transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0); 2808 } 2809 2810 :host([placement="right"]) { 2811 position: absolute; 2812 left: calc(100% + var(--media-tooltip-distance, 12px)); 2813 top: 50%; 2814 transform: translate(0, -50%); 2815 } 2816 :host([placement="right"]) #arrow { 2817 top: 50%; 2818 right: 100%; 2819 border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0; 2820 border-color: transparent var(--_tooltip-arrow-background) transparent transparent; 2821 transform: translate(0, -50%); 2822 } 2823 2824 :host([placement="bottom"]) { 2825 position: absolute; 2826 top: calc(100% + var(--media-tooltip-distance, 12px)); 2827 left: 50%; 2828 transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0); 2829 } 2830 :host([placement="bottom"]) #arrow { 2831 bottom: 100%; 2832 left: 50%; 2833 border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width); 2834 border-color: transparent transparent var(--_tooltip-arrow-background) transparent; 2835 transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0); 2836 } 2837 2838 :host([placement="left"]) { 2839 position: absolute; 2840 right: calc(100% + var(--media-tooltip-distance, 12px)); 2841 top: 50%; 2842 transform: translate(0, -50%); 2843 } 2844 :host([placement="left"]) #arrow { 2845 top: 50%; 2846 left: 100%; 2847 border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height); 2848 border-color: transparent transparent transparent var(--_tooltip-arrow-background); 2849 transform: translate(0, -50%); 2850 } 2851 2852 :host([placement="none"]) #arrow { 2853 display: none; 2854 } 2855 </style> 2856 <slot></slot> 2857 <div id="arrow"></div> 2858 `},pK.customElements.get("media-tooltip")||pK.customElements.define("media-tooltip",b$);var bV=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},bq=(e,t,i)=>(bV(e,t,"read from private field"),i?i.call(e):t.get(e)),bF=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},bG=(e,t,i,a)=>(bV(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let bK="tooltipplacement",bj="disabled",bY="notooltip";class bQ extends pK.HTMLElement{constructor(){if(super(),bF(this,_f),bF(this,_p,void 0),this.preventClick=!1,this.tooltipEl=null,bF(this,_v,e=>{this.preventClick||this.handleClick(e),setTimeout(bq(this,_b),0)}),bF(this,_b,()=>{var e,t;null==(t=null==(e=this.tooltipEl)?void 0:e.updateXOffset)||t.call(e)}),bF(this,_g,e=>{let{key:t}=e;this.keysUsed.includes(t)?this.preventClick||this.handleClick(e):this.removeEventListener("keyup",bq(this,_g))}),bF(this,_E,e=>{let{metaKey:t,altKey:i,key:a}=e;t||i||!this.keysUsed.includes(a)?this.removeEventListener("keyup",bq(this,_g)):this.addEventListener("keyup",bq(this,_g),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=pJ(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip")}static get observedAttributes(){return["disabled",bK,ph.MEDIA_CONTROLLER,pv.MEDIA_LANG]}enable(){this.addEventListener("click",bq(this,_v)),this.addEventListener("keydown",bq(this,_E)),this.tabIndex=0}disable(){this.removeEventListener("click",bq(this,_v)),this.removeEventListener("keydown",bq(this,_E)),this.removeEventListener("keyup",bq(this,_g)),this.tabIndex=-1}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===ph.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=bq(this,_p))?void 0:a.unassociateElement)||r.call(a,this),bG(this,_p,null)),i&&this.isConnected&&(bG(this,_p,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=bq(this,_p))?void 0:s.associateElement)||o.call(s,this))):"disabled"===e&&i!==t?null==i?this.enable():this.disable():e===bK&&this.tooltipEl&&i!==t?this.tooltipEl.placement=i:e===pv.MEDIA_LA
2858NG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),bq(this,_b).call(this)}connectedCallback(){var e,t,i;let{style:a}=p6(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");let r=this.getAttribute(ph.MEDIA_CONTROLLER);r&&(bG(this,_p,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=bq(this,_p))?void 0:t.associateElement)||i.call(t,this)),pK.customElements.whenDefined("media-tooltip").then(()=>{var e,t;return(e=_f,t=_y,bV(this,e,"access private method"),t).call(this)})}disconnectedCallback(){var e,t;this.disable(),null==(t=null==(e=bq(this,_p))?void 0:e.unassociateElement)||t.call(e,this),bG(this,_p,null),this.removeEventListener("mouseenter",bq(this,_b)),this.removeEventListener("focus",bq(this,_b)),this.removeEventListener("click",bq(this,_v))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return vn(this,bK)}set tooltipPlacement(e){vs(this,bK,e)}get mediaController(){return vn(this,ph.MEDIA_CONTROLLER)}set mediaController(e){vs(this,ph.MEDIA_CONTROLLER,e)}get disabled(){return va(this,bj)}set disabled(e){vr(this,bj,e)}get noTooltip(){return va(this,bY)}set noTooltip(e){vr(this,bY,e)}handleClick(e){}}_p=new WeakMap,_v=new WeakMap,_b=new WeakMap,_g=new WeakMap,_E=new WeakMap,_f=new WeakSet,_y=function(){this.addEventListener("mouseenter",bq(this,_b)),this.addEventListener("focus",bq(this,_b)),this.addEventListener("click",bq(this,_v));let e=this.tooltipPlacement;e&&this.tooltipEl&&(this.tooltipEl.placement=e)},bQ.shadowRootOptions={mode:"open"},bQ.getTemplateHTML=function(e,t={}){return` 2859 <style> 2860 :host { 2861 position: relative; 2862 font: var(--media-font, 2863 var(--media-font-weight, bold) 2864 var(--media-font-size, 14px) / 2865 var(--media-text-content-height, var(--media-control-height, 24px)) 2866 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 2867 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 2868 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 2869 padding: var(--media-button-padding, var(--media-control-padding, 10px)); 2870 justify-content: var(--media-button-justify-content, center); 2871 display: inline-flex; 2872 align-items: center; 2873 vertical-align: middle; 2874 box-sizing: border-box; 2875 transition: background .15s linear; 2876 pointer-events: auto; 2877 cursor: var(--media-cursor, pointer); 2878 -webkit-tap-highlight-color: transparent; 2879 } 2880 2881 2882 :host(:focus-visible) { 2883 box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 2884 outline: 0; 2885 } 2886 2887 :host(:where(:focus)) { 2888 box-shadow: none; 2889 outline: 0; 2890 } 2891 2892 :host(:hover) { 2893 background: var(--media-control-hover-background, rgba(50 50 70 / .7)); 2894 } 2895 2896 svg, img, ::slotted(svg), ::slotted(img) { 2897 width: var(--media-button-icon-width); 2898 height: var(--media-button-icon-height, var(--media-control-height, 24px)); 2899 transform: var(--media-button-icon-transform); 2900 transition: var(--media-button-icon-transition); 2901 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 2902 vertical-align: middle; 2903 max-width: 100%; 2904 max-height: 100%; 2905 min-width: 100%; 2906 } 2907 2908 media-tooltip { 2909 2910 max-width: 0; 2911 overflow-x: clip; 2912 opacity: 0; 2913 transition: opacity .3s, max-width 0s 9s; 2914 } 2915 2916 :host(:hover) media-tooltip, 2917 :host(:focus-visible) media-tooltip { 2918 max-width: 100vw; 2919 opacity: 1; 2920 transition: opacity .3s; 2921 } 2922 2923 :host([notooltip]) slot[name="tooltip"] { 2924 display: none; 2925 } 2926 </style> 2927 2928 ${this.getSlotTemplateHTML(e,t)} 2929 2930 <slot name="tooltip"> 2931 <media-tooltip part="tooltip" aria-hidden="true"> 2932 <template shadowrootmode="${b$.shadowRootOptions.mode}"> 2933 ${b$.getTemplateHTML({})} 2934 </template> 2935 <slot name="tooltip-content"> 2936 ${this.getTooltipContentHTML(e)} 2937 </slot> 2938 </media-tooltip> 2939 </slot> 2940 `},bQ.getSlotTemplateHTML=function(e,t){return` 2941 <slot></slot> 2942 `},bQ.getTooltipContentHTML=function(){return""}
2942,pK.customElements.get("media-chrome-button")||pK.customElements.define("media-chrome-button",bQ);let bz=`<svg aria-hidden="true" viewBox="0 0 26 24"> 2943 <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"/> 2944</svg> 2945`,bZ=e=>{let t=e.mediaIsAirplaying?pP("stop airplay"):pP("start airplay");e.setAttribute("aria-label",t)};class bX extends bQ{static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_IS_AIRPLAYING,pv.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),bZ(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===pv.MEDIA_IS_AIRPLAYING&&bZ(this)}get mediaIsAirplaying(){return va(this,pv.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){vr(this,pv.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return vn(this,pv.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){vs(this,pv.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new pK.CustomEvent(pc.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}}bX.getSlotTemplateHTML=function(e){return` 2946 <style> 2947 :host([${pv.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) { 2948 display: none !important; 2949 } 2950 2951 2952 :host(:not([${pv.MEDIA_IS_AIRPLAYING}])) slot[name=icon] slot:not([name=enter]) { 2953 display: none !important; 2954 } 2955 2956 :host([${pv.MEDIA_IS_AIRPLAYING}]) slot[name=tooltip-enter], 2957 :host(:not([${pv.MEDIA_IS_AIRPLAYING}])) slot[name=tooltip-exit] { 2958 display: none; 2959 } 2960 </style> 2961 2962 <slot name="icon"> 2963 <slot name="enter">${bz}</slot> 2964 <slot name="exit">${bz}</slot> 2965 </slot> 2966 `},bX.getTooltipContentHTML=function(){return` 2967 <slot name="tooltip-enter">${pP("start airplay")}</slot> 2968 <slot name="tooltip-exit">${pP("stop airplay")}</slot> 2969 `},pK.customElements.get("media-airplay-button")||pK.customElements.define("media-airplay-button",bX);let bJ=`<svg aria-hidden="true" viewBox="0 0 26 24"> 2970 <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"/> 2971</svg>`,b0=`<svg aria-hidden="true" viewBox="0 0 26 24"> 2972 <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"/> 2973</svg>`,b1=e=>{e.setAttribute("aria-checked",vB(e).toString())};class b2 extends bQ{static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_SUBTITLES_LIST,pv.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.setAttribute("aria-label",pP("closed captions")),b1(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===pv.MEDIA_SUBTITLES_SHOWING&&b1(this)}get mediaSubtitlesList(){return b3(this,pv.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){b4(this,pv.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return b3(this,pv.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){b4(this,pv.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new pK.CustomEvent(pc.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}b2.getSlotTemplateHTML=function(e){return` 2974 <style> 2975 :host([aria-checked="true"]) slot[name=off] { 2976 display: none !important; 2977 } 2978 2979 2980 :host(:not([aria-checked="true"])) slot[name=on] { 2981 display: none !important; 2982 } 2983 2984 :host([aria-checked="true"]) slot[name=tooltip-enable], 2985 :host(:not([aria-checked="true"])) slot[name=tooltip-disable] { 2986 display: none; 2987 } 2988 </style> 2989 2990 <slot name="icon"> 2991 <slot name="on">${bJ}</slot> 2992 <slot name="off">${b0}</slot> 2993 </slot> 2994 `},b2.getTooltipContentHTML=function(){return` 2995 <slot name="tooltip-enable">${pP("Enable captions")}</slot> 2996 <slot name="tooltip-disable">${pP("Disable captions")}</slot> 2997 `};let b3=(e,t)=>
2997{let i=e.getAttribute(t);return i?vD(i):[]},b4=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=vO(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};pK.customElements.get("media-captions-button")||pK.customElements.define("media-captions-button",b2);let b5=e=>{let t=e.mediaIsCasting?pP("stop casting"):pP("start casting");e.setAttribute("aria-label",t)};class b9 extends bQ{static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_IS_CASTING,pv.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),b5(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===pv.MEDIA_IS_CASTING&&b5(this)}get mediaIsCasting(){return va(this,pv.MEDIA_IS_CASTING)}set mediaIsCasting(e){vr(this,pv.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return vn(this,pv.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){vs(this,pv.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?pc.MEDIA_EXIT_CAST_REQUEST:pc.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new pK.CustomEvent(e,{composed:!0,bubbles:!0}))}}b9.getSlotTemplateHTML=function(e){return` 2998 <style> 2999 :host([${pv.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) { 3000 display: none !important; 3001 } 3002 3003 3004 :host(:not([${pv.MEDIA_IS_CASTING}])) slot[name=icon] slot:not([name=enter]) { 3005 display: none !important; 3006 } 3007 3008 :host([${pv.MEDIA_IS_CASTING}]) slot[name=tooltip-enter], 3009 :host(:not([${pv.MEDIA_IS_CASTING}])) slot[name=tooltip-exit] { 3010 display: none; 3011 } 3012 </style> 3013 3014 <slot name="icon"> 3015 <slot name="enter"><svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/></g></svg></slot> 3016 <slot name="exit"><svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg></slot> 3017 </slot> 3018 `},b9.getTooltipContentHTML=function(){return` 3019 <slot name="tooltip-enter">${pP("Start casting")}</slot> 3020 <slot name="tooltip-exit">${pP("Stop casting")}</slot> 3021 `},pK.customElements.get("media-cast-button")||pK.customElements.define("media-cast-button",b9);var b8=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},b7=(e,t,i)=>(b8(e,t,"read from private field"),i?i.call(e):t.get(e)),b6=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},ge=(e,t,i,a)=>(b8(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),gt=(e,t,i)=>(b8(e,t,"access private method"),i);let gi="open";class ga extends pK.HTMLElement{constructor(){super(),b6(this,_w),b6(this,_I),b6(this,_C),b6(this,_L),b6(this,_x),b6(this,_P),b6(this,__,!1),b6(this,_k,null),b6(this,_A,null)}static get observedAttributes(){return[gi,"anchor"]}get open(){return va(this,gi)}set open(e){vr(this,gi,e)}handleEvent(e){switch(e.type){case"invoke":gt(this,_L,_R).call(this,e);break;case"focusout":gt(this,_x,_D).call(this,e);break;case"keydown":gt(this,_P,_N).call(this,e)}}connectedCallback(){gt(this,_w,_T).call(this),this.role||(this.role="dialog"),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}disconnectedCallback(){this.removeEventListener("invoke",this),this.removeEventListener("focusout",this),this.removeEventListener("keydown",this)}attributeChangedCallback(e,t,i){gt(this,_w,_T).call(this),e===gi&&i!==t&&(this.open?gt(this,_I,_S).call(this):gt(this,_C,_M).call(this))}focus(){ge(this,_k,p9());let e=!this.dispatchEvent(new Event("focus",{composed:!0,cancelable:!0})),t=!this.dispatchEvent(new Event("focusin",{composed:!0,bubbles:!0,cancelable:!0}));if(e||t)return;
3021let i=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==i||i.focus()}get keysUsed(){return["Escape","Tab"]}}__=new WeakMap,_k=new WeakMap,_A=new WeakMap,_w=new WeakSet,_T=function(){if(!b7(this,__)&&(ge(this,__,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);let e=pJ(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e),queueMicrotask(()=>{let{style:e}=p6(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}},_I=new WeakSet,_S=function(){var e;null==(e=b7(this,_A))||e.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})},_C=new WeakSet,_M=function(){var e;null==(e=b7(this,_A))||e.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))},_L=new WeakSet,_R=function(e){ge(this,_A,e.relatedTarget),p4(this,e.relatedTarget)||(this.open=!this.open)},_x=new WeakSet,_D=function(e){var t;!p4(this,e.relatedTarget)&&(null==(t=b7(this,_k))||t.focus(),b7(this,_A)&&b7(this,_A)!==e.relatedTarget&&this.open&&(this.open=!1))},_P=new WeakSet,_N=function(e){var t,i,a,r,n;let{key:s,ctrlKey:o,altKey:l,metaKey:d}=e;o||l||d||this.keysUsed.includes(s)&&(e.preventDefault(),e.stopPropagation(),"Tab"===s?(e.shiftKey?null==(i=null==(t=this.previousElementSibling)?void 0:t.focus)||i.call(t):null==(r=null==(a=this.nextElementSibling)?void 0:a.focus)||r.call(a),this.blur()):"Escape"===s&&(null==(n=b7(this,_k))||n.focus(),this.open=!1))},ga.shadowRootOptions={mode:"open"},ga.getTemplateHTML=function(e){return` 3022 <style> 3023 :host { 3024 font: var(--media-font, 3025 var(--media-font-weight, normal) 3026 var(--media-font-size, 14px) / 3027 var(--media-text-content-height, var(--media-control-height, 24px)) 3028 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 3029 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 3030 display: var(--media-dialog-display, inline-flex); 3031 justify-content: center; 3032 align-items: center; 3033 3034 transition-behavior: allow-discrete; 3035 visibility: hidden; 3036 opacity: 0; 3037 transform: translateY(2px) scale(.99); 3038 pointer-events: none; 3039 } 3040 3041 :host([open]) { 3042 transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out; 3043 visibility: visible; 3044 opacity: 1; 3045 transform: translateY(0) scale(1); 3046 pointer-events: auto; 3047 } 3048 3049 #content { 3050 display: flex; 3051 position: relative; 3052 box-sizing: border-box; 3053 width: min(320px, 100%); 3054 word-wrap: break-word; 3055 max-height: 100%; 3056 overflow: auto; 3057 text-align: center; 3058 line-height: 1.4; 3059 } 3060 </style> 3061 ${this.getSlotTemplateHTML(e)} 3062 `},ga.getSlotTemplateHTML=function(e){return` 3063 <slot id="content"></slot> 3064 `},pK.customElements.get("media-chrome-dialog")||pK.customElements.define("media-chrome-dialog",ga);var gr=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},gn=(e,t,i)=>(gr(e,t,"read from private field"),i?i.call(e):t.get(e)),gs=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},go=(e,t,i,a)=>(gr(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),gl=(e,t,i)=>(gr(e,t,"access private method"),i);class gd extends pK.HTMLElement{constructor(){if(super(),gs(this,_G),gs(this,_j),gs(this,_Q),gs(this,_Z),gs(this,_J),gs(this,_1),gs(this,_3),gs(this,_5),gs(this,_O,void 0),gs(this,_U,void 0),gs(this,_H,void 0),gs(this,_W,void 0),gs(this,_B,{}),gs(this,_$,[]),gs(this,_V,()=>{if(this.range.matches(":focus-visible")){let{style:e}=p6(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),gs(this,_q,()=>{let{style:e}=p6(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),gs(this,_F,()=>{let e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=pJ(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}this.container=this.shadowRoot.querySelector("#container"),go(this,_H,this.shadowRoot.querySelector("#startpoint")),go(this,_W,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",ph.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===ph.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=gn(this,_O))?void 0:a.unassociateElement)||r.call(a,this),go(this,_O,null)),i&&this.isConnected&&(go(this,_O,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=gn(this,_O))?void 0:s.associateElement)||o.call(s,this))):("disabled"===e||"aria-disabled"===e&&t!==i)&&(null==i?(this.range.removeAttribute(e),gl(this,_j,_Y).call(this)):(this.range.setAttribute(e,i),gl(this,_Q,_z).
3064call(this)))}connectedCallback(){var e,t,i;let{style:a}=p6(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),gn(this,_B).pointer=p6(this.shadowRoot,"#pointer"),gn(this,_B).progress=p6(this.shadowRoot,"#progress"),gn(this,_B).thumb=p6(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),gn(this,_B).activeSegment=p6(this.shadowRoot,"#segments-clipping rect:nth-child(0)");let r=this.getAttribute(ph.MEDIA_CONTROLLER);r&&(go(this,_O,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=gn(this,_O))?void 0:t.associateElement)||i.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",gn(this,_V)),this.shadowRoot.addEventListener("focusout",gn(this,_q)),gl(this,_j,_Y).call(this),pZ(this.container,gn(this,_F))}disconnectedCallback(){var e,t;gl(this,_Q,_z).call(this),null==(t=null==(e=gn(this,_O))?void 0:e.unassociateElement)||t.call(e,this),go(this,_O,null),this.shadowRoot.removeEventListener("focusin",gn(this,_V)),this.shadowRoot.removeEventListener("focusout",gn(this,_q)),pX(this.container,gn(this,_F))}updatePointerBar(e){var t;null==(t=gn(this,_B).pointer)||t.style.setProperty("width",`${100*this.getPointerRatio(e)}%`)}updateBar(){var e,t;let i=100*this.range.valueAsNumber;null==(e=gn(this,_B).progress)||e.style.setProperty("width",`${i}%`),null==(t=gn(this,_B).thumb)||t.style.setProperty("left",`${i}%`)}updateSegments(e){let t=this.shadowRoot.querySelector("#segments-clipping");if(t.textContent="",this.container.classList.toggle("segments",!!(null==e?void 0:e.length)),!(null==e?void 0:e.length))return;let i=[...new Set([+this.range.min,...e.flatMap(e=>[e.start,e.end]),+this.range.max])];go(this,_$,[...i]);let a=i.pop();for(let[e,r]of i.entries()){let[n,s]=[0===e,e===i.length-1],o=n?"calc(var(--segments-gap) / -1)":`${100*r}%`,l=s?a:i[e+1],d=`calc(${(l-r)*100}%${n||s?"":" - var(--segments-gap)"})`,u=pj.createElementNS("http://www.w3.org/2000/svg","rect"),c=ve(this.shadowRoot,`#segments-clipping rect:nth-child(${e+1})`);c.style.setProperty("x",o),c.style.setProperty("width",d),t.append(u)}}getPointerRatio(e){var t,i,a,r;let n,s,o;return t=e.clientX,i=e.clientY,a=gn(this,_H).getBoundingClientRect(),n=(r=gn(this,_W).getBoundingClientRect()).x-a.x,0==(o=n*n+(s=r.y-a.y)*s)?0:Math.max(0,Math.min(1,((t-a.x)*n+(i-a.y)*s)/o))}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":gl(this,_5,_9).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":gl(this,_J,_0).call(this,e);break;case"pointerdown":gl(this,_Z,_X).call(this,e);break;case"pointerup":gl(this,_1,_2).call(this);break;case"pointerleave":gl(this,_3,_4).call(this)}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}_O=new WeakMap,_U=new WeakMap,_H=new WeakMap,_W=new WeakMap,_B=new WeakMap,_$=new WeakMap,_V=new WeakMap,_q=new WeakMap,_F=new WeakMap,_G=new WeakSet,_K=function(e){let t=gn(this,_B).activeSegment;if(!t)return;let i=this.getPointerRatio(e),a=gn(this,_$).findIndex((e,t,a)=>{let r=a[t+1];return null!=r&&i>=e&&i<=r}),r=`#segments-clipping rect:nth-child(${a+1})`;t.selectorText==r&&t.style.transform||(t.selectorText=r,t.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))},_j=new WeakSet,_Y=function(){!this.hasAttribute("disabled")&&this.isConnected&&(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))},_Q=new WeakSet,_z=function(){var e,t;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),this.removeEventListener("pointerleave",this),null==(e=pK.window)||e.removeEventListener("pointerup",this),null==(t=pK.window)||t.removeEventListener("pointermove",this)},_Z=new WeakSet,_X=function(e){var t;go(this,_U,e.composedPath().includes(this.range)),null==(t=pK.window)||t.addEventListener("pointerup",this,{once:!0})},_J=new WeakSet,_0=function(e){var t;"mouse"!==e.pointerType&&gl(this,_Z,_X).call(this,e),this.addEventListener("pointerleave",this,{once:!0}),null==(t=pK.window)||t.addEventListener("pointermove",this)},_1=new WeakSet,_2=function(){var e;null==(e=pK.window)||e.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")},_3=new WeakSet,_4=function(){var e,t;this.removeEventListener("pointerleave",this),null==(e=pK.window)||e.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),null==(t=gn(this,_B).activeSegment)||t.style.removeProperty("transform")},_5=new WeakSet,_9=function(e){("pen"!==e.pointerType||0!==e.buttons)&&(this.toggleAttribute("dragging",1===e.buttons||"mouse"!==e.pointerType),this.updatePointerBar(e),gl(this,_G,_K).call(this,e),this.dragging&&("mouse"!==e.pointerType||!gn(this,_U))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(e),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))))},gd.shadowRootOptions={mode:"open"},gd.getTemplateHTML=function(e){return` 3065 <style> 3066 :host {
3067 --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 3068 --_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px)); 3069 3070 box-shadow: var(--_focus-visible-box-shadow, none); 3071 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 3072 height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding)); 3073 display: inline-flex; 3074 align-items: center; 3075 3076 vertical-align: middle; 3077 box-sizing: border-box; 3078 position: relative; 3079 width: 100px; 3080 transition: background .15s linear; 3081 cursor: var(--media-cursor, pointer); 3082 pointer-events: auto; 3083 touch-action: none; 3084 } 3085 3086 3087 input[type=range]:focus { 3088 outline: 0; 3089 } 3090 input[type=range]:focus::-webkit-slider-runnable-track { 3091 outline: 0; 3092 } 3093 3094 :host(:hover) { 3095 background: var(--media-control-hover-background, rgb(50 50 70 / .7)); 3096 } 3097 3098 #leftgap { 3099 padding-left: var(--media-range-padding-left, var(--_media-range-padding)); 3100 } 3101 3102 #rightgap { 3103 padding-right: var(--media-range-padding-right, var(--_media-range-padding)); 3104 } 3105 3106 #startpoint, 3107 #endpoint { 3108 position: absolute; 3109 } 3110 3111 #endpoint { 3112 right: 0; 3113 } 3114 3115 #container { 3116 3117 width: var(--media-range-track-width, 100%); 3118 transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px)); 3119 position: relative; 3120 height: 100%; 3121 display: flex; 3122 align-items: center; 3123 min-width: 40px; 3124 } 3125 3126 #range { 3127 3128 display: var(--media-time-range-hover-display, block); 3129 bottom: var(--media-time-range-hover-bottom, -7px); 3130 height: var(--media-time-range-hover-height, max(100% + 7px, 25px)); 3131 width: 100%; 3132 position: absolute; 3133 cursor: var(--media-cursor, pointer); 3134 3135 -webkit-appearance: none; 3136 -webkit-tap-highlight-color: transparent; 3137 background: transparent; 3138 margin: 0; 3139 z-index: 1; 3140 } 3141 3142 @media (hover: hover) { 3143 #range { 3144 bottom: var(--media-time-range-hover-bottom, -5px); 3145 height: var(--media-time-range-hover-height, max(100% + 5px
vendor: 4,756 bytes, lines 3145-3300
3145, 20px)); 3146 } 3147 } 3148 3149 3150 3151 #range::-webkit-slider-thumb { 3152 -webkit-appearance: none; 3153 background: transparent; 3154 width: .1px; 3155 height: .1px; 3156 } 3157 3158 3159 #range::-moz-range-thumb { 3160 background: transparent; 3161 border: transparent; 3162 width: .1px; 3163 height: .1px; 3164 } 3165 3166 #appearance { 3167 height: var(--media-range-track-height, 4px); 3168 display: flex; 3169 flex-direction: column; 3170 justify-content: center; 3171 width: 100%; 3172 position: absolute; 3173 3174 will-change: transform; 3175 } 3176 3177 #track { 3178 background: var(--media-range-track-background, rgb(255 255 255 / .2)); 3179 border-radius: var(--media-range-track-border-radius, 1px); 3180 border: var(--media-range-track-border, none); 3181 outline: var(--media-range-track-outline); 3182 outline-offset: var(--media-range-track-outline-offset); 3183 backdrop-filter: var(--media-range-track-backdrop-filter); 3184 -webkit-backdrop-filter: var(--media-range-track-backdrop-filter); 3185 box-shadow: var(--media-range-track-box-shadow, none); 3186 position: absolute; 3187 width: 100%; 3188 height: 100%; 3189 overflow: hidden; 3190 } 3191 3192 #progress, 3193 #pointer { 3194 position: absolute; 3195 height: 100%; 3196 will-change: width; 3197 } 3198 3199 #progress { 3200 background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238))); 3201 transition: var(--media-range-track-transition); 3202 } 3203 3204 #pointer { 3205 background: var(--media-range-track-pointer-background); 3206 border-right: var(--media-range-track-pointer-border-right); 3207 transition: visibility .25s, opacity .25s; 3208 visibility: hidden; 3209 opacity: 0; 3210 } 3211 3212 @media (hover: hover) { 3213 :host(:hover) #pointer { 3214 transition: visibility .5s, opacity .5s; 3215 visibility: visible; 3216 opacity: 1; 3217 } 3218 } 3219 3220 #thumb, 3221 ::slotted([slot=thumb]) { 3222 width: var(--media-range-thumb-width, 10px); 3223 height: var(--media-range-thumb-height, 10px); 3224 transition: var(--media-range-thumb-transition); 3225 transform: var(--media-range-thumb-transform, none); 3226 opacity: var(--media-range-thumb-opacity, 1); 3227 translate: -50%; 3228 position: absolute; 3229 left: 0; 3230 cursor: var(--media-cursor, pointer); 3231 } 3232 3233 #thumb { 3234 border-radius: var(--media-range-thumb-border-radius, 10px); 3235 background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238))); 3236 box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent); 3237 border: var(--media-range-thumb-border, none); 3238 } 3239 3240 :host([disabled]) #thumb { 3241 background-color: #777; 3242 } 3243 3244 .segments #appearance { 3245 height: var(--media-range-segment-hover-height, 7px); 3246 } 3247 3248 #track { 3249 clip-path: url(#segments-clipping); 3250 } 3251 3252 #segments { 3253 --segments-gap: var(--media-range-segments-gap, 2px); 3254 position: absolute; 3255 width: 100%; 3256 height: 100%; 3257 } 3258 3259 #segments-clipping { 3260 transform: translateX(calc(var(--segments-gap) / 2)); 3261 } 3262 3263 #segments-clipping:empty { 3264 display: none; 3265 } 3266 3267 #segments-clipping rect { 3268 height: var(--media-range-track-height, 4px); 3269 y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2); 3270 transition: var(--media-range-segment-transition, transform .1s ease-in-out); 3271 transform: var(--media-range-segment-transform, scaleY(1)); 3272 transform-origin: center; 3273 } 3274 3275 /* Visible label for accessibility - positioned off-screen but technically visible (Firefox requires visible labels) */ 3276 #range-label { 3277 position: absolute; 3278 left: -10000px; 3279 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 3280 pointer-events: none; 3281 } 3282 </style> 3283 <div id="leftgap"></div> 3284 <div id="container"> 3285 <div id="startpoint"></div> 3286 <div id="endpoint"></div> 3287 <div id="appearance"> 3288 <div id="track" part="track"> 3289 <div id="pointer"></div> 3290 <div id="progress" part="progress"></div> 3291 </div> 3292 <slot name="thumb"> 3293 <div id="thumb" part="thumb"></div> 3294 </slot> 3295 <svg id="segments" aria-hidden="true"><clipPath id="segments-clipping"></clipPath></svg> 3296 </div> 3297 <input id="range" type="range" min="0" max="1" step="any" value="0"> 3298 <label for="range" id="range-label"></label> 3299 3300 ${this.getContainerTemplateHTML(
3300e)} 3301 </div> 3302 <div id="rightgap"></div> 3303 `},gd.getContainerTemplateHTML=function(e){return""},pK.customElements.get("media-chrome-range")||pK.customElements.define("media-chrome-range",gd);var gu=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},gc=(e,t,i)=>(gu(e,t,"read from private field"),i?i.call(e):t.get(e)),gh=(e,t,i,a)=>(gu(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class gm extends pK.HTMLElement{constructor(){if(super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,_8,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=pJ(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[ph.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===ph.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=gc(this,_8))?void 0:a.unassociateElement)||r.call(a,this),gh(this,_8,null)),i&&this.isConnected&&(gh(this,_8,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=gc(this,_8))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let a=this.getAttribute(ph.MEDIA_CONTROLLER);a&&(gh(this,_8,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=gc(this,_8))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=gc(this,_8))?void 0:e.unassociateElement)||t.call(e,this),gh(this,_8,null)}}_8=new WeakMap,gm.shadowRootOptions={mode:"open"},gm.getTemplateHTML=function(e){return` 3304 <style> 3305 :host { 3306 3307 box-sizing: border-box; 3308 display: var(--media-control-display, var(--media-control-bar-display, inline-flex)); 3309 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 3310 --media-loading-indicator-icon-height: 44px; 3311 } 3312 3313 ::slotted(media-time-range), 3314 ::slotted(media-volume-range) { 3315 min-height: 100%; 3316 } 3317 3318 ::slotted(media-time-range), 3319 ::slotted(media-clip-selector) { 3320 flex-grow: 1; 3321 } 3322 3323 ::slotted([role="menu"]) { 3324 position: absolute; 3325 } 3326 </style> 3327 3328 <slot></slot> 3329 `},pK.customElements.get("media-control-bar")||pK.customElements.define("media-control-bar",gm);var gp=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},gv=(e,t,i)=>(gp(e,t,"read from private field"),i?i.call(e):t.get(e)),gb=(e,t,i,a)=>(gp(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class gg extends pK.HTMLElement{constructor(){if(super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,_7,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=pJ(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[ph.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===ph.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=gv(this,_7))?void 0:a.unassociateElement)||r.call(a,this),gb(this,_7,null)),i&&this.isConnected&&(gb(this,_7,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=gv(this,_7))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let{style:a}=p6(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);let r=this.getAttribute(ph.MEDIA_CONTROLLER);r&&(gb(this,_7,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=gv(this,_7))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=gv(this,_7))?void 0:e.unassociateElement)||t.call(e,this),gb(this,_7,null)}}_7=new WeakMap,gg.shadowRootOptions={mode:"open"},gg.getTemplateHTML=function(e,t={}){return` 3330 <style> 3331 :host { 3332 font: var(--media-font, 3333 var(--media-font-weight, normal) 3334 var(--media-font-size, 14px) / 3335 var(--media-text-content-height, var(--media-control-height, 24px)) 3336 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 3337 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 3338 background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)))); 3339 padding: var(--media-control-padding, 10px); 3340 display: inline-flex; 3341 justify-content: center; 3342 align-items: center; 3343 vertical-align: middle; 3344 box-sizing: border-box; 3345 text-align: center; 3346 pointer-events: auto; 3347 } 3348 3349 3350 :host(:focus-visible) { 3351 box-shadow: inset 0 0 0 2px rgb(27 127 204 / .9); 3352 outline: 0; 3353 } 3354 3355 3356 :host(:where(:focus)) { 3357 box-shadow: none; 3358 outline: 0; 3359 } 3360 </style> 3361
3362 ${this.getSlotTemplateHTML(e,t)} 3363 `},gg.getSlotTemplateHTML=function(e,t){return` 3364 <slot></slot> 3365 `},pK.customElements.get("media-text-display")||pK.customElements.define("media-text-display",gg);var gE=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},gf=(e,t,i)=>(gE(e,t,"read from private field"),i?i.call(e):t.get(e));class gy extends gg{constructor(){var e;super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,_6,void 0),((e,t,i,a)=>(gE(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,_6,this.shadowRoot.querySelector("slot")),gf(this,_6).textContent=pU(null!=(e=this.mediaDuration)?e:0)}static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_DURATION]}attributeChangedCallback(e,t,i){e===pv.MEDIA_DURATION&&(gf(this,_6).textContent=pU(+i)),super.attributeChangedCallback(e,t,i)}get mediaDuration(){return vt(this,pv.MEDIA_DURATION)}set mediaDuration(e){vi(this,pv.MEDIA_DURATION,e)}}_6=new WeakMap,gy.getSlotTemplateHTML=function(e,t){return` 3366 <slot>${pU(t.mediaDuration)}</slot> 3367 `},pK.customElements.get("media-duration-display")||pK.customElements.define("media-duration-display",gy);let g_={2:pP("Network Error"),3:pP("Decode Error"),4:pP("Source Not Supported"),5:pP("Encryption
3367Error")},gk={2:pP("A network error caused the media download to fail."),3:pP("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:pP("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:pP("The media is encrypted and there are no keys to decrypt it.")},gA=e=>{var t,i;return 1===e.code?null:{title:null!=(t=g_[e.code])?t:`Error ${e.code}`,message:null!=(i=gk[e.code])?i:e.message}};var gw=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};function gT(e){var t;let{title:i,message:a}=null!=(t=gA(e))?t:{},r="";return i&&(r+=`<slot name="error-${e.code}-title"><h3>${i}</h3></slot>`),a&&(r+=`<slot name="error-${e.code}-message"><p>${a}</p></slot>`),r}let gI=[pv.MEDIA_ERROR_CODE,pv.MEDIA_ERROR_MESSAGE];class gS extends ga{constructor(){super(...arguments),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,ke,null)}static get observedAttributes(){return[...super.observedAttributes,...gI]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,t,i){var a;if(super.attributeChangedCallback(e,t,i),!gI.includes(e))return;let r=null!=(a=this.mediaError)?a:{code:this.mediaErrorCode,message:this.mediaErrorMessage};if(this.open=r.code&&null!==gA(r),this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(r),!this.hasAttribute("aria-label"))){let{title:e}=gA(r);e&&this.setAttribute("aria-label",e)}}get mediaError(){var e,t;return gw(this,e=ke,"read from private field"),t?t.call(this):e.get(this)}set mediaError(e){var t,i;gw(this,t=ke,"write to private field"),i?i.call(this,e):t.set(this,e)}get mediaErrorCode(){return vt(this,"mediaerrorcode")}set mediaErrorCode(e){vi(this,"mediaerrorcode",e)}get mediaErrorMessage(){return vn(this,"mediaerrormessage")}set mediaErrorMessage(e){vs(this,"mediaerrormessage",e)}}ke=new WeakMap,gS.getSlotTemplateHTML=function(e){return` 3368 <style> 3369 :host { 3370 background: rgb(20 20 30 / .8); 3371 } 3372 3373 #content { 3374 display: block; 3375 padding: 1.2em 1.5em; 3376 } 3377 3378 h3, 3379 p { 3380 margin-block: 0 .3em; 3381 } 3382 </style> 3383 <slot name="error-${e.mediaerrorcode}" id="content"> 3384 ${gT({code:+e.mediaerrorcode,message:e.mediaerrormessage})} 3385 </slot> 3386 `},gS.formatErrorMessage=gT,pK.customElements.get("media-error-dialog")||pK.customElements.define("media-error-dialog",gS);var gC=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)},gM=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)};class gL extends ga{constructor(){super(...arguments),gM(this,kt,e=>{var t;if(!this.open)return;let i=null==(t=this.shadowRoot)?void 0:t.querySelector("#content");if(!i)return;let a=e.composedPath(),r=a[0]===this||a.includes(this),n=a.includes(i);r&&!n&&(this.open=!1)}),gM(this,ki,e=>{if(!this.open)return;let t=e.shiftKey&&("/"===e.key||"?"===e.key);"Escape"!==e.key&&!t||e.ctrlKey||e.altKey||e.metaKey||(this.open=!1,e.preventDefault(),e.stopPropagation())})}connectedCallback(){super.connectedCallback(),this.open&&(this.addEventListener("click",gC(this,kt)),document.addEventListener("keydown",gC(this,ki)))}disconnectedCallback(){this.removeEventListener("click",gC(this,kt)),document.removeEventListener("keydown",gC(this,ki))}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),"open"===e&&(this.open?(this.addEventListener("click",gC(this,kt)),document.addEventListener("keydown",gC(this,ki))):(this.removeEventListener("click",gC(this,kt)),document.removeEventListener("keydown",gC(this,ki))))}}kt=new WeakMap,ki=new WeakMap,gL.getSlotTemplateHTML=function(e){let t;return` 3387 <style> 3388 :host { 3389 position: fixed; 3390 top: 0; 3391 left: 0; 3392 z-index: 9999; 3393 background: rgb(20 20 30 / .8); 3394 backdrop-filter: blur(10px); 3395 } 3396 3397 #content { 3398 display: block; 3399 width: clamp(400px, 40vw, 700px); 3400 max-width: 90vw; 3401 text-align: left; 3402 } 3403 3404 h2 { 3405 margin: 0 0 1.5rem 0; 3406 font-size: 1.5rem; 3407 font-weight: 500; 3408 text-align: center; 3409 } 3410 3411 .shortcuts-table { 3412 width: 100%; 3413 border-collapse: collapse; 3414 } 3415 3416 .shortcuts-table tr { 3417 border-bottom: 1px solid rgba(255, 255, 255, 0.1); 3418 } 3419 3420 .shortcuts-table tr:last-child { 3421 border-bottom: none; 3422 } 3423 3424 .shortcuts-table td { 3425 padding: 0.75rem 0.5rem; 3426 } 3427 3428 .shortcuts-table td:first-child { 3429 text-align: right; 3430 padding-right: 1rem; 3431 width: 40%; 3432 min-width: 120px; 3433 } 3434 3435 .shortcuts-table td:last-child { 3436 padding-left: 1rem; 3437 } 3438 3439 .key { 3440 display: inline-block; 3441 background: rgba(255, 255, 255, 0.15); 3442 border: 1px solid rgba(255, 255, 255, 0.2); 3443 border-radius: 4px; 3444 padding: 0.25rem 0.5rem; 3445 font-family: 'Courier New', monospace; 3446 font-size: 0.9rem; 3447 font-weight: 500; 3448 min-width: 1.5rem; 3449 text-align: center; 3450 margin: 0 0.2rem; 3451 } 3452 3453 .description { 3454 color: rgba(255, 255, 255, 0.9); 3455 font-size: 0.95rem; 3456 } 3457 3458 .key-combo { 3459 display: flex; 3460 align-items: center; 3461 justify-content: flex-end; 3462 gap: 0.3rem; 3463 } 3464 3465 .key-separator { 3466 color: rgba(255, 255, 255, 0.5); 3467 font-size: 0.9rem; 3468 } 3469 </style> 3470 <slot id="content"> 3471 ${t=[{keys:["Space","k"],description:"Toggle Playback"},{keys:["m"],description:"Toggle mute"},{keys:["f"],description:"Toggle fullscreen"},{keys:["c"],description:"Toggle captions or subtitles, if available"},{keys:["p"],description:"Toggle Picture in Picture"},{keys:["â","j"],description:"Seek back 10s"},{keys:["â","l"],description:"Seek forward 10s"},{keys:["â"],description:"Turn volume up"},{keys:["â"],description:"Turn volume down"},{keys:["< (SHIFT+,)"],description:"Decrease playback rate"},{keys:["> (SHIFT+.)"],description:"Increase playback rate"}].map(({keys:e,description:t})=>{let i=e.map((e,t)=>t>0?`<span class="key-separator">or</span><span class="key">${e}</span>`:`<span class="key">${e}</span>`).join("");return` 3472 <tr> 3473 <td> 3474 <div class="key-combo">${i}</div> 3475 </td> 3476 <td class="description">${t}</td> 3477 </tr> 3478 `}).join(""),` 3479 <h2>Keyboard Shortcuts</h2> 3480 <table class="shortcuts-table">${t}</table> 3481 `} 3482 </slot> 3483 `}
3483,pK.customElements.get("media-keyboard-shortcuts-dialog")||pK.customElements.define("media-keyboard-shortcuts-dialog",gL);var gR=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};let gx=`<svg aria-hidden="true" viewBox="0 0 26 24"> 3484 <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/> 3485</svg>`,gD=`<svg aria-hidden="true" viewBox="0 0 26 24"> 3486 <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/> 3487</svg>`,gP=e=>{let t=e.mediaIsFullscreen?pP("exit fullscreen mode"):pP("enter fullscreen mode");e.setAttribute("aria-label",t)};class gN extends bQ{constructor(){super(...arguments),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,ka,null)}static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_IS_FULLSCREEN,pv.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),gP(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===pv.MEDIA_IS_FULLSCREEN&&gP(this)}get mediaFullscreenUnavailable(){return vn(this,pv.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){vs(this,pv.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return va(this,pv.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){vr(this,pv.MEDIA_IS_FULLSCREEN,e)}handleClick(e){var t,i,a,r;gR(this,t=ka,"write to private field"),i?i.call(this,e):t.set(this,e);let n=(gR(this,a=ka,"read from private field"),(r?r.call(this):a.get(this))instanceof PointerEvent),s=this.mediaIsFullscreen?new pK.CustomEvent(pc.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new pK.CustomEvent(pc.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:n});this.dispatchEvent(s)}}ka=new WeakMap,gN.getSlotTemplateHTML=function(e){return` 3488 <style> 3489 :host([${pv.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) { 3490 display: none !important; 3491 } 3492 3493 3494 :host(:not([${pv.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) { 3495 display: none !important; 3496 } 3497 3498 :host([${pv.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter], 3499 :host(:not([${pv.MEDIA_IS_FULLSCREEN}])) slot[name=tooltip-exit] { 3500 display: none; 3501 } 3502 </style> 3503 3504 <slot name="icon"> 3505 <slot name="enter">${gx}</slot> 3506 <slot name="exit">${gD}</slot> 3507 </slot> 3508 `},gN.getTooltipContentHTML=function(){return` 3509 <slot name="tooltip-enter">${pP("Enter fullscreen mode")}</slot> 3510 <slot name="tooltip-exit">${pP("Exit fullscreen mode")}</slot> 3511 `},pK.customElements.get("media-fullscreen-button")||pK.customElements.define("media-fullscreen-button",gN);let{MEDIA_TIME_IS_LIVE:gO,MEDIA_PAUSED:gU}=pv,{MEDIA_SEEK_TO_LIVE_REQUEST:gH,MEDIA_PLAY_REQUEST:gW}=pc,gB=e=>{var t;let i=e.mediaPaused||!e.mediaTimeIsLive,a=i?pP("seek to live"):pP("playing live");e.setAttribute("aria-label",a);let r=null==(t=e.shadowRoot)?void 0:t.querySelector('slot[name="text"]');r&&(r.textContent=pP("live")),i?e.removeAttribute("aria-disabled"):e.setAttribute("aria-disabled","true")};class g$ extends bQ{static get observedAttributes(){return[...super.observedAttributes,gO,gU]}connectedCallback(){super.connectedCallback(),gB(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),gB(this)}get mediaPaused(){return va(this,pv.MEDIA_PAUSED)}set mediaPaused(e){vr(this,pv.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return va(this,pv.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){vr(this,pv.MEDIA_TIME_IS_LIVE,e)}handleClick(){(this.mediaPaused||!this.mediaTimeIsLive)&&(this.dispatchEvent(new pK.CustomEvent(gH,{composed:!0,bubbles:!0})),this.hasAttribute(gU)&&this.dispatchEvent(new pK.CustomEvent(gW,{composed:!0,bubbles:!0})))}}g$.getSlotTemplateHTML=function(e){return` 3512 <style> 3513 :host { --media-tooltip-display: none; } 3514 3515 slot[name=indicator] > *, 3516 :host ::slotted([slot=indicator]) { 3517 3518 min-width: auto; 3519 fill: var(--media-live-button-icon-color, rgb(140, 140, 140)); 3520 color: var(--media-live-button-icon-color, rgb(140, 140, 140)); 3521 } 3522 3523 :host([${gO}]:not([${gU}])) slot[name=indicator] > *, 3524 :host([${gO}]:not([${gU}])) ::slotted([slot=indicator]) { 3525 fill: var(--media-live-button-indicator-color, rgb(255, 0, 0)); 3526 color: var(--media-live-button-indicator-color, rgb(255, 0, 0)); 3527 } 3528 3529 :host([${gO}]:not([${gU}])) { 3530 cursor: var(--media-cursor, not-allowed); 3531 } 3532 3533 slot[name=text]{ 3534 text-transform: uppercase; 3535 } 3536 3537 </style> 3538 3539 <slot name="indicator"><svg viewBox="0 0 6 12" aria-hidden="true"><circle cx="3" cy="6" r="2"></circle></svg></slot> 3540 3541 <slot name="spacer"> </slot><slot name="text">${pP("live")}</slot> 3542 `},pK.customElements.get("media-live-button")||pK.customElements.define("media-live-button",g$);var gV=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},gq=(e,t,i)=>(gV(e,t,"read from private field"),i?i.call(e):t.get(e)),gF=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},gG=(e,t,i,a)=>(gV(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);
3542let gK="loadingdelay",gj="noautohide",gY=` 3543<svg aria-hidden="true" viewBox="0 0 100 100"> 3544 <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"> 3545 <animateTransform 3546 attributeName="transform" 3547 attributeType="XML" 3548 type="rotate" 3549 dur="1s" 3550 from="0 50 50" 3551 to="360 50 50" 3552 repeatCount="indefinite" /> 3553 </path> 3554</svg> 3555`;class gQ extends pK.HTMLElement{constructor(){if(super(),gF(this,kr,void 0),gF(this,kn,500),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=pJ(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[ph.MEDIA_CONTROLLER,pv.MEDIA_PAUSED,pv.MEDIA_LOADING,gK]}attributeChangedCallback(e,t,i){var a,r,n,s,o;e===gK&&t!==i?this.loadingDelay=Number(i):e===ph.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=gq(this,kr))?void 0:a.unassociateElement)||r.call(a,this),gG(this,kr,null)),i&&this.isConnected&&(gG(this,kr,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=gq(this,kr))?void 0:s.associateElement)||o.call(s,this)))}connectedCallback(){var e,t,i;let a=this.getAttribute(ph.MEDIA_CONTROLLER);a&&(gG(this,kr,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=gq(this,kr))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=gq(this,kr))?void 0:e.unassociateElement)||t.call(e,this),gG(this,kr,null)}get loadingDelay(){return gq(this,kn)}set loadingDelay(e){gG(this,kn,e);let{style:t}=p6(this.shadowRoot,":host");t.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return va(this,pv.MEDIA_PAUSED)}set mediaPaused(e){vr(this,pv.MEDIA_PAUSED,e)}get mediaLoading(){return va(this,pv.MEDIA_LOADING)}set mediaLoading(e){vr(this,pv.MEDIA_LOADING,e)}get mediaController(){return vn(this,ph.MEDIA_CONTROLLER)}set mediaController(e){vs(this,ph.MEDIA_CONTROLLER,e)}get noAutohide(){return va(this,gj)}set noAutohide(e){vr(this,gj,e)}}kr=new WeakMap,kn=new WeakMap,gQ.shadowRootOptions={mode:"open"},gQ.getTemplateHTML=function(e){return` 3556 <style> 3557 :host { 3558 display: var(--media-control-display, var(--media-loading-indicator-display, inline-block)); 3559 vertical-align: middle; 3560 box-sizing: border-box; 3561 --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, 500ms); 3562 } 3563 3564 #status { 3565 color: rgba(0,0,0,0); 3566 width: 0px; 3567 height: 0px; 3568 } 3569 3570 :host slot[name=icon] > *, 3571 :host ::slotted([slot=icon]) { 3572 opacity: var(--media-loading-indicator-opacity, 0); 3573 transition: opacity 0.15s; 3574 } 3575 3576 :host([${pv.MEDIA_LOADING}]:not([${pv.MEDIA_PAUSED}])) slot[name=icon] > *, 3577 :host([${pv.MEDIA_LOADING}]:not([${pv.MEDIA_PAUSED}])) ::slotted([slot=icon]) { 3578 opacity: var(--media-loading-indicator-opacity, 1); 3579 transition: opacity 0.15s var(--_loading-indicator-delay); 3580 } 3581 3582 :host #status { 3583 visibility: var(--media-loading-indicator-opacity, hidden); 3584 transition: visibility 0.15s; 3585 } 3586 3587 :host([${pv.MEDIA_LOADING}]:not([${pv.MEDIA_PAUSED}])) #status { 3588 visibility: var(--media-loading-indicator-opacity, visible); 3589 transition: visibility 0.15s var(--_loading-indicator-delay); 3590 } 3591 3592 svg, img, ::slotted(svg), ::slotted(img) { 3593 width: var(--media-loading-indicator-icon-width); 3594 height: var(--media-loading-indicator-icon-height, 100px); 3595 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 3596 vertical-align: middle; 3597 } 3598 </style> 3599 3600 <slot name="icon">${gY}</slot> 3601 <div id="status" role="status" aria-live="polite">${pP("media loading")}</div> 3602 `},pK.customElements.get("media-loading-indicator")||pK.customElements.define("media-loading-indicator",gQ);let gz=`<svg aria-hidden="true" viewBox="0 0 24 24"> 3603 <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"/> 3604</svg>`,gZ=`<svg aria-hidden="true" viewBox="0 0 24 24"> 3605 <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"/> 3606</svg>`,gX=`<svg aria-hidden="true" viewBox="0 0 24 24"> 3607 <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"/> 3608</svg>`,gJ=e=>{let t="off"===e.mediaVolumeLevel?pP("unmute"):pP("mute");e.setAttribute("aria-label",t)};class g0 extends bQ{static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),gJ(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===pv.MEDIA_VOLUME_LEVEL&&gJ(this)}get mediaVolumeLevel(){return vn(this,pv.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){vs(this,pv.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e="off"===this.mediaVolumeLevel?pc.MEDIA_UNMUTE_REQUEST:pc.MEDIA_MUTE_REQUEST;this.dispatchEvent(new pK.CustomEvent(e,{composed:!0,bubbles:!0}))}}g0.getSlotTemplateHTML=function(e){return` 3609 <style> 3610 :host(:not([${pv.MEDIA_VOLUME_LEVEL}])) slot[name=icon] slot:not([name=high]), 3611 :host([${pv.MEDIA_VOLUME_LEVEL}=high]) slot[name=icon] slot:not([name=high]) { 3612 display: none !important; 3613 } 3614 3615 :host([${pv.MEDIA_VOLUME_LEVEL}=off]) slot[name=icon] slot:not([name=off]) { 3616 display: none !important; 3617 } 3618 3619 :host([${pv.MEDIA_VOLUME_LEVEL}=low]) slot[name=icon] slot:not([name=low]) { 3620 display: none !important; 3621 } 3622 3623 :host([${pv.MEDIA_VOLUME_LEVEL}=medium]) slot[name=icon] slot:not([name=medium]) { 3624 display: none !important; 3625 } 3626 3627 :host(:not([${pv.MEDIA_VOLUME_LEVEL}=off])) slot[name=tooltip-unmute], 3628 :host([${pv.MEDIA_VOLUME_LEVEL}=off]) slot[name=tooltip-mute] { 3629 display: none; 3630 } 3631 </style> 3632 3633 <slot name="icon"> 3634 <slot name="off">${gz}</slot> 3635 <slot name="low">${gZ}</slot> 3636 <slot name="medium">${gZ}</slot> 3637 <slot name="high">${gX}</slot> 3638 </slot> 3639 `},g0.getTooltipContentHTML=function(){return` 3640 <slot name="tooltip-mute">${pP("Mute")}</slot> 3641 <slot name="tooltip-unmute">${pP("Unmute")}</slot> 3642 `},pK.customElements.get("media-mute-button")||pK.customElements.define("media-mute-button",g0);let g1=`<svg aria-hidden="true" viewBox="0 0 28 24"> 3643 <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"/> 3644</svg>`,g2=e=>{let t=e.mediaIsPip?pP("exit picture in picture mode"):pP("enter picture in picture mode");e.setAttribute("aria-label",t)};class g3 extends bQ{static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_IS_PIP,pv.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),g2(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===pv.MEDIA_IS_PIP&&g2(this)}get mediaPipUnavailable(){return vn(this,pv.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){vs(this,pv.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return va(this,pv.MEDIA_IS_PIP)}set mediaIsPip(e){vr(this,pv.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?pc.MEDIA_EXIT_PIP_REQUEST:pc.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new pK.CustomEvent(e,{composed:!0,bubbles:!0}))}}g3.getSlotTemplateHTML=function(e){return` 3645 <style> 3646 :host([${pv.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) { 3647 display: none !important; 3648 } 3649 3650 :host(:not([${pv.MEDIA_IS_PIP}])) slot[name=icon] slot:not([name=enter]) { 3651 display: none !important; 3652 } 3653 3654 :host([${pv.MEDIA_IS_PIP}]) slot[name=tooltip-enter], 3655 :host(:not([${pv.MEDIA_IS_PIP}])) slot[name=tooltip-exit] { 3656 display: none; 3657 } 3658 </style> 3659 3660 <slot name="icon"> 3661 <slot name="enter">${g1}</slot> 3662 <slot name="exit">${g1}</slot> 3663 </slot> 3664 `},g3.getTooltipContentHTML=function(){return` 3665 <slot name="tooltip-enter">${pP("Enter picture in picture mode")}</slot> 3666 <slot name="tooltip-exit">${pP("Exit picture in picture mode")}</slot> 3667 `},pK.customElements.get("media-pip-button")||pK.customElements.define("media-pip-button",g3);var g4=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)};let g5="rates",g9=[1,1.2,1.5,1.7,2];class g8 extends bQ{constructor(){var e;super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,ks,new vR(this,g5,{defaultValue:g9})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${null!=(e=this.mediaPlaybackRate)?e:1}x`}static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_PLAYBACK_RATE,g5]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===g5&&(g4(this,ks).value=i),e===pv.MEDIA_PLAYBACK_RATE){let e=i?+i:NaN,t=Number.isNaN(e)?1:e;this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",pP("Playback rate {playbackRate}",{playbackRate:t}))}}get rates(){return g4(this,ks)}set rates(e){e?Array.isArray(e)?g4(this,ks).value=e.join(" "):"str
3667ing"==typeof e&&(g4(this,ks).value=e):g4(this,ks).value=""}get mediaPlaybackRate(){return vt(this,pv.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){vi(this,pv.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;let i=Array.from(g4(this,ks).values(),e=>+e).sort((e,t)=>e-t),a=null!=(t=null!=(e=i.find(e=>e>this.mediaPlaybackRate))?e:i[0])?t:1,r=new pK.CustomEvent(pc.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(r)}}ks=new WeakMap,g8.getSlotTemplateHTML=function(e){return` 3668 <style> 3669 :host { 3670 min-width: 5ch; 3671 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 3672 } 3673 </style> 3674 <slot name="icon">${e.mediaplaybackrate||1}x</slot> 3675 `},g8.getTooltipContentHTML=function(){return pP("Playback rate")},pK.customElements.get("media-playback-rate-button")||pK.customElements.define("media-playback-rate-button",g8);let g7=`<svg aria-hidden="true" viewBox="0 0 24 24"> 3676 <path d="m6 21 15-9L6 3v18Z"/> 3677</svg>`,g6=`<svg aria-hidden="true" viewBox="0 0 24 24"> 3678 <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/> 3679</svg>`,Ee=e=>{let t=e.mediaPaused?pP("play"):pP("pause");e.setAttribute("aria-label",t)};class Et extends bQ{static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_PAUSED,pv.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),Ee(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),(e===pv.MEDIA_PAUSED||e===pv.MEDIA_LANG)&&Ee(this)}get mediaPaused(){return va(this,pv.MEDIA_PAUSED)}set mediaPaused(e){vr(this,pv.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?pc.MEDIA_PLAY_REQUEST:pc.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new pK.CustomEvent(e,{composed:!0,bubbles:!0}))}}Et.getSlotTemplateHTML=function(e){return` 3680 <style> 3681 :host([${pv.MEDIA_PAUSED}]) slot[name=pause], 3682 :host(:not([${pv.MEDIA_PAUSED}])) slot[name=play] { 3683 display: none !important; 3684 } 3685 3686 :host([${pv.MEDIA_PAUSED}]) slot[name=tooltip-pause], 3687 :host(:not([${pv.MEDIA_PAUSED}])) slot[name=tooltip-play] { 3688 display: none; 3689 } 3690 </style> 3691 3692 <slot name="icon"> 3693 <slot name="play">${g7}</slot> 3694 <slot name="pause">${g6}</slot> 3695 </slot> 3696 `},Et.getTooltipContentHTML=function(){return` 3697 <slot name="tooltip-play">${pP("Play")}</slot> 3698 <slot name="tooltip-pause">${pP("Pause")}</slot> 3699 `},pK.customElements.get("media-play-button")||pK.customElements.define("media-play-button",Et);let Ei="placeholdersrc";class Ea extends pK.HTMLElement{static get observedAttributes(){return[Ei,"src"]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=pJ(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,i){if("src"===e&&(null==i?this.image.removeAttribute("src"):this.image.setAttribute("src",i)),e===Ei)if(null==i)this.image.style.removeProperty("background-image");else{var a;a=this.image,a.style["background-image"]=`url('${i}')`}}get placeholderSrc(){return vn(this,Ei)}set placeholderSrc(e){vs(this,"src",e)}get src(){return vn(this,"src")}set src(e){vs(this,"src",e)}}Ea.shadowRootOptions={mode:"open"},Ea.getTemplateHTML=function(e){return` 3700 <style> 3701 :host { 3702 pointer-events: none; 3703 display: var(--media-poster-image-display, inline-block); 3704 box-sizing: border-box; 3705 } 3706 3707 img { 3708 max-width: 100%; 3709 max-height: 100%; 3710 min-width: 100%; 3711 min-height: 100%; 3712 background-repeat: no-repeat; 3713 background-position: var(--media-poster-image-background-position, var(--media-object-position, center)); 3714 background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain)); 3715 object-fit: var(--media-object-fit, contain); 3716 object-position: var(--media-object-position, center); 3717 } 3718 </style> 3719 3720 <img part="poster img" aria-hidden="true" id="image"/> 3721 `},pK.customElements.get("media-poster-image")||pK.customElements.define("media-poster-image",Ea);var Er=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};class En extends gg{constructor(){super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,ko,void 0),((e,t,i,a)=>(Er(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,ko,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_PREVIEW_CHAPTER,pv.MEDIA_LA
3721NG]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),(e===pv.MEDIA_PREVIEW_CHAPTER||e===pv.MEDIA_LANG)&&i!==t&&null!=i){var a,r;if((Er(this,a=ko,"read from private field"),r?r.call(this):a.get(this)).textContent=i,""!==i){let e=pP("chapter: {chapterName}",{chapterName:i});this.setAttribute("aria-valuetext",e)}else this.removeAttribute("aria-valuetext")}}get mediaPreviewChapter(){return vn(this,pv.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){vs(this,pv.MEDIA_PREVIEW_CHAPTER,e)}}ko=new WeakMap,pK.customElements.get("media-preview-chapter-display")||pK.customElements.define("media-preview-chapter-display",En);var Es=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},Eo=(e,t,i)=>(Es(e,t,"read from private field"),i?i.call(e):t.get(e)),El=(e,t,i,a)=>(Es(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class Ed extends pK.HTMLElement{constructor(){if(super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,kl,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=pJ(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[ph.MEDIA_CONTROLLER,pv.MEDIA_PREVIEW_IMAGE,pv.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t,i;let a=this.getAttribute(ph.MEDIA_CONTROLLER);a&&(El(this,kl,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=Eo(this,kl))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=Eo(this,kl))?void 0:e.unassociateElement)||t.call(e,this),El(this,kl,null)}attributeChangedCallback(e,t,i){var a,r,n,s,o;[pv.MEDIA_PREVIEW_IMAGE,pv.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===ph.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=Eo(this,kl))?void 0:a.unassociateElement)||r.call(a,this),El(this,kl,null)),i&&this.isConnected&&(El(this,kl,null==(n=this.getRootNode())?void 0:n.getElementById(i)),null==(o=null==(s=Eo(this,kl))?void 0:s.associateElement)||o.call(s,this)))}get mediaPreviewImage(){return vn(this,pv.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){vs(this,pv.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(pv.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(e=>+e)}set mediaPreviewCoords(e){e?this.setAttribute(pv.MEDIA_PREVIEW_COORDS,e.join(" ")):this.removeAttribute(pv.MEDIA_PREVIEW_COORDS)}update(){let e,t,i=this.mediaPreviewCoords,a=this.mediaPreviewImage;if(!(i&&a))return;let[r,n,s,o]=i,l=a.split("#")[0],d=getComputedStyle(this),{maxWidth:u,maxHeight:c,minWidth:h,minHeight:m}=d;if("fill"===(d.getPropertyValue("--media-preview-thumbnail-object-fit").trim()||"contain")){let i=parseInt(u)/s,a=parseInt(c)/o,r=parseInt(h)/s,n=parseInt(m)/o;e=i<1?i:Math.max(i,r),t=a<1?a:Math.max(a,n)}else{let i=Math.min(parseInt(u)/s,parseInt(c)/o),a=Math.max(parseInt(h)/s,parseInt(m)/o),r=i<1?i:a>1?a:1;e=r,t=r}let{style:v}=p6(this.shadowRoot,":host"),b=p6(this.shadowRoot,"img").style,g=this.shadowRoot.querySelector("img"),E=1>Math.min(e,t)?"min":"max";v.setProperty(`${E}-width`,"initial","important"),v.setProperty(`${E}-height`,"initial","important"),v.width=`${s*e}px`,v.height=`${o*t}px`;let f=()=>{b.width=`${this.imgWidth*e}px`,b.height=`${this.imgHeight*t}px`,b.display="block"};g.src!==l&&(g.onload=()=>{this.imgWidth=g.naturalWidth,this.imgHeight=g.naturalHeight,f(),g.onload=null},g.src=l,f()),f(),b.transform=`translate(-${r*e}px, -${n*t}px)`}}kl=new WeakMap,Ed.shadowRootOptions={mode:"open"},Ed.getTemplateHTML=function(e){return` 3722 <style> 3723 :host { 3724 box-sizing: border-box; 3725 display: var(--media-control-display, var(--media-preview-thumbnail-display, inline-block)); 3726 overflow: hidden; 3727 } 3728 3729 img { 3730 display: none; 3731 position: relative; 3732 } 3733 </style> 3734 <img crossorigin loading="eager" decoding="async"> 3735 `},pK.customElements.get("media-preview-thumbnail")||pK.customElements.define("media-preview-thumbnail",Ed);var Eu=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},Ec=(e,t,i)=>(Eu(e,t,"read from private field"),i?i.call(e):t.get(e));class Eh extends gg{constructor(){super(),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,kd,void 0),((e,t,i,a)=>(Eu(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,kd,this.shadowRoot.querySelector("slot")),Ec(this,kd).textContent=pU(0)}static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===pv.MEDIA_PREVIEW_TIME&&null!=i&&(Ec(this,kd).textContent=pU(parseFloat(i)))}get mediaPreviewTime(){return vt(this,pv.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){vi(this,pv.MEDIA_PREVIEW_TIME,e)}}kd=new WeakMap,pK.customElements.get("media-preview-time-display")||pK.customElements.define("media-preview-time-display",Eh);let Em="seekoffset";class Ep extends bQ{static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_CURRENT_TIME,Em]}connectedCallback(){super.connectedCallback(),this.seekOffset=vt(this,Em,30)}attributeChangedCallback(e,t,i){var a;super.attributeChangedCallback(e,t,i),a=this.seekOffset,this.setAttribute("aria-label",pP("seek back {seekOffset} seconds",{seekOffset:a})),e===Em&&(this.seekOffset=vt(this,Em,30))}get seekOffset(){return vt(this,Em,30)}set seekOffset(e){vi(this,Em,e),this.setAttribute("aria-label",pP("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),p2(p3(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return vt(this,pv.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){vi(this,pv.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new pK.CustomEvent(pc.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}Ep.getSlotTemplateHTML=function(e,t){let i;return` 3736 <slot name="icon">${i=t.seekOffset,` 3737 <svg aria-hidden="true" viewBox="0 0 20 24"> 3738 <defs> 3739 <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style> 3740 </defs> 3741 <text class="text value" transform="translate(2.18 19.87)">${i}</text> 3742 <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"/> 3743 </svg>`}</slot> 3744 `},Ep.getTooltipContentHTML=function(){return pP("Seek backward")},pK.customElements.get("media-seek-backward-button")||pK.customElements.define("media-seek-backward-button",Ep);let Ev="seekoffset";class Eb extends bQ{static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_CURRENT_TIME,Ev]}connectedCallback(){super.connectedCallback(),this.seekOffset=vt(this,Ev,30)}attributeChangedCallback(e,t,i){var a;super.attributeChangedCallback(e,t,i),a=this.seekOffset,this.setAttribute("aria-label",pP("seek forward {seekOffset} seconds",{seekOffset:a})),e===Ev&&(this.seekOffset=vt(this,Ev,30))}get seekOffset(){return vt(this,Ev,30)}set seekOffset(e){vi(this,Ev,e),this.setAttribute("aria-label",pP("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),p2(p3(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return vt(this,pv.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){vi(this,pv.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,t=new pK.CustomEvent(pc.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}Eb.getSlotTemplateHTML=function(e,t){let i;return` 3745 <slot name="icon">${i=t.seekOffset,` 3746 <svg aria-hidden="true" viewBox="0 0 20 24"> 3747 <defs> 3748 <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style> 3749 </defs> 3750 <text class="text value" transform="translate(8.9 19.87)">${i}</text> 3751 <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"/> 3752 </svg>`}</slot> 3753 `},Eb.getTooltipContentHTML=function(){return pP("Seek forward")},pK.customElements.get("media-seek-forward-button")||pK.customElements.define("media-seek-forward-button",Eb);var Eg=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},EE=(e,t,i)=>(Eg(e,t,"read from private field"),i?i.call(e):t.get(e)),Ef=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},Ey=(e,t,i,a)=>(Eg(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),E_=(e,t,i)=>(Eg(e,t,"access private method"),i);let Ek={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},EA=[...Object.values(Ek),pv.MEDIA_CURRENT_TIME,pv.MEDIA_DURATION,pv.MEDIA_SEEKABLE],Ew=["Enter"," "],ET=" / ",EI=(e,{timesSep:t=ET}={})=>{var i,a;let r=null!=(i=e.mediaCurrentTime)?i:0,[,n]=null!=(a=e.mediaSeekable)?a:[],s=0;Number.isFinite(e.mediaDuration)?s=e.mediaDuration:Number.isFinite(n)&&(s=n);let o=e.remaining?pU(0-(s-r)):pU(r);return e.showDuration?`${o}${t}${pU(s)}
3753`:o};class ES extends gg{constructor(){super(),Ef(this,km),Ef(this,kv),Ef(this,kg),Ef(this,kf),Ef(this,ku,void 0),Ef(this,kc,null),Ef(this,kh,e=>{let{metaKey:t,altKey:i,key:a}=e;t||i||!Ew.includes(a)?this.removeEventListener("keyup",EE(this,kc)):this.addEventListener("keyup",EE(this,kc))}),Ey(this,ku,this.shadowRoot.querySelector("slot")),EE(this,ku).innerHTML=`${EI(this)}`}static get observedAttributes(){return[...super.observedAttributes,...EA,"disabled"]}connectedCallback(){let{style:e}=p6(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",pP("playback time")),E_(this,kg,kE).call(this),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),E_(this,kv,kb).call(this),super.disconnectedCallback()}attributeChangedCallback(e,t,i){this.setAttribute("aria-label",pP("playback time")),EA.includes(e)?this.update():"disabled"===e&&i!==t?null==i?E_(this,kg,kE).call(this):E_(this,kf,ky).call(this):e===Ek.NO_TOGGLE&&i!==t&&(this.noToggle?E_(this,kf,ky).call(this):E_(this,kg,kE).call(this)),super.attributeChangedCallback(e,t,i)}enable(){this.noToggle||(this.tabIndex=0)}disable(){this.tabIndex=-1}get remaining(){return va(this,Ek.REMAINING)}set remaining(e){vr(this,Ek.REMAINING,e)}get showDuration(){return va(this,Ek.SHOW_DURATION)}set showDuration(e){vr(this,Ek.SHOW_DURATION,e)}get noToggle(){return va(this,Ek.NO_TOGGLE)}set noToggle(e){vr(this,Ek.NO_TOGGLE,e)}get mediaDuration(){return vt(this,pv.MEDIA_DURATION)}set mediaDuration(e){vi(this,pv.MEDIA_DURATION,e)}get mediaCurrentTime(){return vt(this,pv.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){vi(this,pv.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(pv.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){null==e?this.removeAttribute(pv.MEDIA_SEEKABLE):this.setAttribute(pv.MEDIA_SEEKABLE,e.join(":"))}update(){let e=EI(this);(e=>{var t;let i=e.mediaCurrentTime,[,a]=null!=(t=e.mediaSeekable)?t:[],r=null;if(Number.isFinite(e.mediaDuration)?r=e.mediaDuration:Number.isFinite(a)&&(r=a),null==i||null===r)return e.setAttribute("aria-valuetext",pP("video not loaded, unknown time."));let n=e.remaining?pO(0-(r-i)):pO(i);if(!e.showDuration)return e.setAttribute("aria-valuetext",n);let s=pP("{currentTime} of {totalTime}",{currentTime:n,totalTime:pO(r)});e.setAttribute("aria-valuetext",s)})(this),e!==EE(this,ku).innerHTML&&(EE(this,ku).innerHTML=e)}}ku=new WeakMap,kc=new WeakMap,kh=new WeakMap,km=new WeakSet,kp=function(){EE(this,kc)||(Ey(this,kc,e=>{let{key:t}=e;Ew.includes(t)?this.toggleTimeDisplay():this.removeEventListener("keyup",EE(this,kc))}),this.addEventListener("keydown",EE(this,kh)),this.addEventListener("click",this.toggleTimeDisplay))},kv=new WeakSet,kb=function(){EE(this,kc)&&(this.removeEventListener("keyup",EE(this,kc)),this.removeEventListener("keydown",EE(this,kh)),this.removeEventListener("click",this.toggleTimeDisplay),Ey(this,kc,null))},kg=new WeakSet,kE=function(){this.noToggle||this.hasAttribute("disabled")||(this.setAttribute("role","button"),this.enable(),E_(this,km,kp).call(this))},kf=new WeakSet,ky=function(){this.removeAttribute("role"),this.disable(),E_(this,kv,kb).call(this)},ES.getSlotTemplateHTML=function(e,t){return` 3754 <slot>${EI(t)}</slot> 3755 `},pK.customElements.get("media-time-display")||pK.customElements.define("media-time-display",ES);var EC=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},EM=(e,t,i)=>(EC(e,t,"read from private field"),i?i.call(e):t.get(e)),EL=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},ER=(e,t,i,a)=>(EC(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class Ex{constructor(e,t,i){EL(this,k_,void 0),EL(this,kk,void 0),EL(this,kA,void 0),EL(this,kw,void 0),EL(this,kT,void 0),EL(this,kI,void 0),EL(this,kS,void 0),EL(this,kC,void 0),EL(this,kM,0),EL(this,kL,(e=performance.now())=>{ER(this,kM,requestAnimationFrame(EM(this,kL))),ER(this,kw,performance.now()-EM(this,kA));let t=1e3/this.fps;if(EM(this,kw)>t){let i,a,r,n;ER(this,kA,e-EM(this,kw)%t);let s=1e3/((e-EM(this,kk))/++(i=this,a=kT,{set _(value){ER(i,a,value,r)},get _(){return EM(i,a,n)}})._),o=(e-EM(this,kI))/1e3/this.duration,l=EM(this,kS)+o*this.playbackRate;l-EM(this,k_).valueAsNumber>0?ER(this,kC,this.playbackRate/this.duration/s):(ER(this,kC,.995*EM(this,kC)),l=EM(this,k_).valueAsNumber+EM(this,kC)),this.callback(l)}}),ER(this,k_,e),this.callback=t,this.fps=i}start(){0===EM(this,kM)&&(ER(this,kA,performance.now()),ER(this,kk,EM(this,kA)),ER(this,kT,0),EM(this,kL).call(this))}stop(){0!==EM(this,kM)&&(cancelAnimationFrame(EM(this,kM)),ER(this,kM,0))}update({start:e,duration:t,playbackRate:i}){let a=e-EM(this,k_).valueAsNumber,r=Math.abs(t-this.duration);(a>0||a<-.03||r>=.5)&&this.callback(e),ER(this,kS,e),ER(this,kI,performance.now()),this.duration=t,this.playbackRate=i}}
3755k_=new WeakMap,kk=new WeakMap,kA=new WeakMap,kw=new WeakMap,kT=new WeakMap,kI=new WeakMap,kS=new WeakMap,kC=new WeakMap,kM=new WeakMap,kL=new WeakMap;var ED=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},EP=(e,t,i)=>(ED(e,t,"read from private field"),i?i.call(e):t.get(e)),EN=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},EO=(e,t,i,a)=>(ED(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),EU=(e,t,i)=>(ED(e,t,"access private method"),i);let EH=(e,t=e.mediaCurrentTime)=>{let i=Number.isFinite(e.mediaSeekableStart)?e.mediaSeekableStart:0,a=Number.isFinite(e.mediaDuration)?e.mediaDuration:e.mediaSeekableEnd;return Number.isNaN(a)?0:Math.max(0,Math.min((t-i)/(a-i),1))},EW=(e,t=e.range.valueAsNumber)=>{let i=Number.isFinite(e.mediaSeekableStart)?e.mediaSeekableStart:0,a=Number.isFinite(e.mediaDuration)?e.mediaDuration:e.mediaSeekableEnd;return Number.isNaN(a)?0:t*(a-i)+i};class EB extends gd{constructor(){super(),EN(this,kV),EN(this,kG),EN(this,kj),EN(this,kQ),EN(this,kZ),EN(this,kJ),EN(this,k1),EN(this,kR,null),EN(this,kx,void 0),EN(this,kD,void 0),EN(this,kP,void 0),EN(this,kN,void 0),EN(this,kO,void 0),EN(this,kU,void 0),EN(this,kH,void 0),EN(this,kW,void 0),EN(this,kB,void 0),EN(this,k$,()=>{EU(this,kV,kq).call(this)?EP(this,kx).start():EP(this,kx).stop()}),EN(this,kF,e=>{!this.dragging&&(pM(e)&&(this.range.valueAsNumber=e),EP(this,kB)||this.updateBar())}),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),EO(this,kD,this.shadowRoot.querySelectorAll('[part~="box"]')),EO(this,kN,this.shadowRoot.querySelector('[part~="preview-box"]')),EO(this,kO,this.shadowRoot.querySelector('[part~="current-box"]'));const e=getComputedStyle(this);EO(this,kU,parseInt(e.getPropertyValue("--media-box-padding-left"))),EO(this,kH,parseInt(e.getPropertyValue("--media-box-padding-right"))),EO(this,kx,new Ex(this.range,EP(this,kF),60))}static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_PAUSED,pv.MEDIA_DURATION,pv.MEDIA_SEEKABLE,pv.MEDIA_CURRENT_TIME,pv.MEDIA_PREVIEW_IMAGE,pv.MEDIA_PREVIEW_TIME,pv.MEDIA_PREVIEW_CHAPTER,pv.MEDIA_BUFFERED,pv.MEDIA_PLAYBACK_RATE,pv.MEDIA_LOADING,pv.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",pP("seek")),EP(this,k$).call(this),EO(this,kR,this.getRootNode()),null==(e=EP(this,kR))||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),EP(this,kx).stop(),null==(e=EP(this,kR))||e.removeEventListener("transitionstart",this),EO(this,kR,null)}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),t!=i){if(e===pv.MEDIA_CURRENT_TIME||e===pv.MEDIA_PAUSED||e===pv.MEDIA_ENDED||e===pv.MEDIA_LOADING||e===pv.MEDIA_DURATION||e===pv.MEDIA_SEEKABLE){let e,t,i,a;EP(this,kx).update({start:EH(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),EP(this,k$).call(this),e=this.range,t=pO(+EW(this)),i=pO(+this.mediaSeekableEnd),a=t&&i?pP("{currentTime} of {totalTime}",{currentTime:t,totalTime:i}):pP("video not loaded, unknown time."),e.setAttribute("aria-valuetext",a)}else e===pv.MEDIA_BUFFERED&&this.updateBufferedBar();(e===pv.MEDIA_DURATION||e===pv.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=EP(this,kW),this.updateBar())}}get mediaChaptersCues(){return EP(this,kW)}set mediaChaptersCues(e){var t;EO(this,kW,e),this.updateSegments(null==(t=EP(this,kW))?void 0:t.map(e=>({start:EH(this,e.startTime),end:EH(this,e.endTime)})))}get mediaPaused(){return va(this,pv.MEDIA_PAUSED)}set mediaPaused(e){vr(this,pv.MEDIA_PAUSED,e)}get mediaLoading(){return va(this,pv.MEDIA_LOADING)}set mediaLoading(e){vr(this,pv.MEDIA_LOADING,e)}get mediaDuration(){return vt(this,pv.MEDIA_DURATION)}set mediaDuration(e){vi(this,pv.MEDIA_DURATION,e)}get mediaCurrentTime(){return vt(this,pv.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){vi(this,pv.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return vt(this,pv.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){vi(this,pv.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(pv.MEDIA_BUFFERED);return e?e.split(" ").map(e=>e.split(":").map(e=>+e)):[]}set mediaBuffered(e){if(!e)return void this.removeAttribute(pv.MEDIA_BUFFERED);let t=e.map(e=>e.join(":")).join(" ");this.setAttribute(pv.MEDIA_BUFFERED,t)}get mediaSeekable(){let e=this.getAttribute(pv.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){null==e?this.removeAttribute(pv.MEDIA_SEEKABLE):this.setAttribute(pv.MEDIA_SEEKABLE,e.join(":"))}get mediaSeekableEnd(){var e;let[,t=this.mediaDuration]=null!=(e=this.mediaSeekable)?e:[];return t}get mediaSeekableStart(){var e;let[t=0]=null!=(e=this.mediaSeekable)?e:[];return t}get mediaPreviewImage(){return vn(this,pv.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){vs(this,pv.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return vt(this,pv.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){vi(this,pv.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return va(this,pv.MEDIA_ENDED)}set mediaEnded(e){vr(this,pv.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;let t,i=this.mediaBuffered;if(!i.length)return;if(this.mediaEnded)t=1;else{let a=this.mediaCurrentTime,[,r=this.mediaSeekableStart]=null!=(e=i.find(([e,t])=>e<=a&&a<=t))?e:[];t=EH(this,r)}let{style:a}=p6(this.shadowRoot,"#buffered");a.setProperty("width",`${100*t}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;let e=p6(this.shadowRoot,"#current-rail"),t=p6(this.shadowRoot,'[part~="current-box"]'),i=EU(this,kG,kK).call(this,EP(this,kO)),a=EU(this,kj,kY).call(this,i,this.range.valueAsNumber),r=EU(this,kQ,kz).call(this,i,this.range.valueAsNumber);e.style.transform=`translateX(${a})`,e.style.setProperty("--_range-width",`${i.range.width}`),t.style.setProperty("--_box-shift",`${r}`),t.style.setProperty("--_box-width",`${i.box.width}px`),t.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":EU(this,k1,k2).call(this);break;case"pointermove":EU(this,kZ,kX).call(this,e);break;case"pointerup":EP(this,kB)&&EO(this,kB,!1);break;case"pointerdown":EO(this,kB,!0);break;case"pointerleave":EU(this,kJ,k0).call(this,null);break;case"transitionstart":p4(e.target,this)&&setTimeout(()=>
3755EP(this,k$).call(this),0)}}}kR=new WeakMap,kx=new WeakMap,kD=new WeakMap,kP=new WeakMap,kN=new WeakMap,kO=new WeakMap,kU=new WeakMap,kH=new WeakMap,kW=new WeakMap,kB=new WeakMap,k$=new WeakMap,kV=new WeakSet,kq=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&p7(this)},kF=new WeakMap,kG=new WeakSet,kK=function(e){var t;let i=(null!=(t=this.getAttribute("bounds")?p5(this,`#${this.getAttribute("bounds")}`):this.parentElement)?t:this).getBoundingClientRect(),a=this.range.getBoundingClientRect(),r=e.offsetWidth,n=-(a.left-i.left-r/2),s=i.right-a.left-r/2;return{box:{width:r,min:n,max:s},bounds:i,range:a}},kj=new WeakSet,kY=function(e,t){let i=`${100*t}%`,{width:a,min:r,max:n}=e.box;if(!a)return i;if(!Number.isNaN(r)){let e=`calc(1 / var(--_range-width) * 100 * ${r}% + var(--media-box-padding-left))`;i=`max(${e}, ${i})`}if(!Number.isNaN(n)){let e=`calc(1 / var(--_range-width) * 100 * ${n}% - var(--media-box-padding-right))`;i=`min(${i}, ${e})`}return i},kQ=new WeakSet,kz=function(e,t){let{width:i,min:a,max:r}=e.box,n=t*e.range.width;if(n<a+EP(this,kU)){let t=e.range.left-e.bounds.left-EP(this,kU);return`${n-i/2+t}px`}if(n>r-EP(this,kH)){let t=e.bounds.right-e.range.right-EP(this,kH);return`${n+i/2-t-e.range.width}px`}return 0},kZ=new WeakSet,kX=function(e){let t=[...EP(this,kD)].some(t=>e.composedPath().includes(t));if(!this.dragging&&(t||!e.composedPath().includes(this)))return void EU(this,kJ,k0).call(this,null);let i=this.mediaSeekableEnd;if(!i)return;let a=p6(this.shadowRoot,"#preview-rail"),r=p6(this.shadowRoot,'[part~="preview-box"]'),n=EU(this,kG,kK).call(this,EP(this,kN)),s=(e.clientX-n.range.left)/n.range.width;s=Math.max(0,Math.min(1,s));let o=EU(this,kj,kY).call(this,n,s),l=EU(this,kQ,kz).call(this,n,s);a.style.transform=`translateX(${o})`,a.style.setProperty("--_range-width",`${n.range.width}`),r.style.setProperty("--_box-shift",`${l}`),r.style.setProperty("--_box-width",`${n.box.width}px`),1>Math.abs(Math.round(EP(this,kP))-Math.round(s*i))&&s>.01&&s<.99||(EO(this,kP,s*i),EU(this,kJ,k0).call(this,EP(this,kP)))},kJ=new WeakSet,k0=function(e){this.dispatchEvent(new pK.CustomEvent(pc.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:e}))},k1=new WeakSet,k2=function(){EP(this,kx).stop();let e=EW(this);this.dispatchEvent(new pK.CustomEvent(pc.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e}))},EB.shadowRootOptions={mode:"open"},EB.getContainerTemplateHTML=function(e){return` 3756 <style> 3757 :host { 3758 --media-box-border-radius: 4px; 3759 --media-box-padding-left: 10px; 3760 --media-box-padding-right: 10px; 3761 --media-preview-border-radius: var(--media-box-border-radius); 3762 --media-box-arrow-offset: var(--media-box-border-radius); 3763 --_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 3764 --_preview-background: var(--media-preview-background, var(--_control-background)); 3765 3766 3767 contain: layout; 3768 } 3769 3770 #buffered { 3771 background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4)); 3772 position: absolute; 3773 height: 100%; 3774 will-change: width; 3775 } 3776 3777 #preview-rail, 3778 #current-rail { 3779 width: 100%; 3780 position: absolute; 3781 left: 0; 3782 bottom: 100%; 3783 pointer-events: none; 3784 will-change: transform; 3785 } 3786 3787 [part~="box"] { 3788 width: min-content; 3789 3790 position: absolute; 3791 bottom: 100%; 3792 flex-direction: column; 3793 align-items: center; 3794 transform: translateX(-50%); 3795 } 3796 3797 [part~="current-box"] { 3798 display: var(--media-current-box-display, var(--media-box-display, flex)); 3799 margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px)); 3800 visibility: hidden; 3801 } 3802 3803 [part~="preview-box"] { 3804 display: var(--media-preview-box-display, var(--media-box-display, flex)); 3805 margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px)); 3806 transition-property: var(--media-preview-transition-property, visibility, opacity); 3807 transition-duration: var(--media-preview-transition-duration-out, .25s); 3808 transition-delay: var(--media-preview-transition-delay-out, 0s); 3809 visibility: hidden; 3810 opacity: 0; 3811 } 3812 3813 :host(:is([${pv.MEDIA_PREVIEW_IMAGE}], [${pv.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] { 3814 transition-duration: var(--media-preview-transition-duration-in, .5s); 3815 transition-delay: var(--media-preview-transition-delay-in, .25s); 3816 visibility: visible; 3817 opacity: 1; 3818 } 3819 3820 @media (hover: hover) { 3821 :host(:is([${pv.MEDIA_PREVIEW_IMAGE}], [${pv.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] { 3822 transition-duration: var(--media-preview-transition-duration-in, .5s); 3823 transition-delay: var(--media-preview-transition-delay-in, .25s); 3824 visibility: visible; 3825 opacity: 1; 3826 } 3827 } 3828
3829 media-preview-thumbnail, 3830 ::slotted(media-preview-thumbnail) { 3831 visibility: hidden; 3832 3833 transition: visibility 0s .25s; 3834 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 3835 background: var(--media-preview-thumbnail-background, var(--_preview-background)); 3836 box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2)); 3837 max-width: var(--media-preview-thumbnail-max-width, 180px); 3838 max-height: var(--media-preview-thumbnail-max-height, 160px); 3839 min-width: var(--media-preview-thumbnail-min-width, 120px); 3840 min-height: var(--media-preview-thumbnail-min-height, 80px); 3841 border: var(--media-preview-thumbnail-border); 3842 border-radius: var(--media-preview-thumbnail-border-radius, 3843 var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0); 3844 } 3845 3846 :host([${pv.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail, 3847 :host([${pv.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) { 3848 transition-delay: var(--media-preview-transition-delay-in, .25s); 3849 visibility: visible; 3850 } 3851 3852 @media (hover: hover) { 3853 :host([${pv.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail, 3854 :host([${pv.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) { 3855 transition-delay: var(--media-preview-transition-delay-in, .25s); 3856 visibility: visible; 3857 } 3858 3859 :host([${pv.MEDIA_PREVIEW_TIME}]:hover) { 3860 --media-time-range-hover-display: block; 3861 } 3862 } 3863 3864 media-preview-chapter-display, 3865 ::slotted(media-preview-chapter-display) { 3866 font-size: var(--media-font-size, 13px); 3867 line-height: 17px; 3868 min-width: 0; 3869 visibility: hidden; 3870 3871 transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s; 3872 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 3873 background: var(--media-preview-chapter-background, var(--_preview-background)); 3874 border-radius: var(--media-preview-chapter-border-radius, 3875 var(--media-preview-border-radius) var(--media-preview-border-radius) 3876 var(--media-preview-border-radius) var(--media-preview-border-radius)); 3877 padding: var(--media-preview-chapter-padding, 3.5px 9px); 3878 margin: var(--media-preview-chapter-margin, 0 0 5px); 3879 text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75)); 3880 } 3881 3882 :host([${pv.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display, 3883 :host([${pv.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) { 3884 transition-delay: var(--media-preview-transition-delay-in, .25s); 3885 border-radius: var(--media-preview-chapter-border-radius, 0); 3886 padding: var(--media-preview-chapter-padding, 3.5px 9px 0); 3887 margin: var(--media-preview-chapter-margin, 0); 3888 min-width: 100%; 3889 } 3890 3891 media-preview-chapter-display[${pv.MEDIA_PREVIEW_CHAPTER}], 3892 ::slotted(media-preview-chapter-display[${pv.MEDIA_PREVIEW_CHAPTER}]) { 3893 visibility: visible; 3894 } 3895 3896 media-preview-chapter-display:not([aria-valuetext]), 3897 ::slotted(media-preview-chapter-display:not([aria-valuetext])) { 3898 display: none; 3899 } 3900 3901 media-preview-time-display, 3902 ::slotted(media-preview-time-display), 3903 media-time-display, 3904 ::slotted(media-time-display) { 3905 font-size: var(--media-font-size, 13px); 3906 line-height: 17px; 3907 min-width: 0; 3908 3909 transition: min-width 0s, border-radius 0s; 3910 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 3911 background: var(--media-preview-time-background, var(--_preview-background)); 3912 border-radius: var(--media-preview-time-border-radius, 3913 var(--media-preview-border-radius) var(--media-preview-border-radius) 3914 var(--media-preview-border-radius) var(--media-preview-border-radius)); 3915 padding: var(--media-preview-time-padding, 3.5px 9px); 3916 margin: var(--media-preview-time-margin, 0); 3917 text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75)); 3918 transform: translateX(min( 3919 max(calc(50% - var(--_box-width) / 2), 3920 calc(var(--_box-shift, 0))), 3921 calc(var(--_box-width) / 2 - 50%) 3922 )); 3923 } 3924 3925 :host([${pv.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display, 3926 :host([${pv.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) { 3927 transition-delay: var(--media-preview-transition-delay-in, .25s); 3928 border-radius: var(--media-preview-time-border-radius, 3929 0 0 var(--media-preview-border-radius) var(--media-preview-border-radius)); 3930 min-width: 100%; 3931 } 3932 3933 :host([${pv.MEDIA_PREVIEW_TIME}]:hover) { 3934 --media-time-range-hover-display: block; 3935 } 3936 3937 [part~="arrow"], 3938 ::slotted([part~="arrow"]) { 3939 display: var(--media-box-arrow-display, inline-block); 3940 transform: translateX(min( 3941 max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)), 3942 calc(var(--_box-shift, 0))), 3943 calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset)) 3944 )); 3945 3946 border-color: transparent; 3947 border-top-color: var(--media-box-arrow-background, var(--_control-background)); 3948 border-width: var(--media-box-arrow-border-width, 3949 var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0); 3950 border-style: solid; 3951 justify-content: center; 3952 height: 0; 3953 } 3954 </style> 3955 <div id="preview-rail"> 3956 <slot name="preview" part="box preview-box">
3957 <media-preview-thumbnail> 3958 <template shadowrootmode="${Ed.shadowRootOptions.mode}"> 3959 ${Ed.getTemplateHTML({})} 3960 </template> 3961 </media-preview-thumbnail> 3962 <media-preview-chapter-display></media-preview-chapter-display> 3963 <media-preview-time-display></media-preview-time-display> 3964 <slot name="preview-arrow"><div part="arrow"></div></slot> 3965 </slot> 3966 </div> 3967 <div id="current-rail"> 3968 <slot name="current" part="box current-box"> 3969 3970 </slot> 3971 </div> 3972 `},pK.customElements.get("media-time-range")||pK.customElements.define("media-time-range",EB);var E$=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)};class EV extends gd{constructor(){super(...arguments),((e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)})(this,k3,()=>{let e=this.range.value,t=new pK.CustomEvent(pc.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)})}static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_VOLUME,pv.MEDIA_MUTED,pv.MEDIA_VOLUME_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",pP("volume")),this.range.addEventListener("input",E$(this,k3))}disconnectedCallback(){this.range.removeEventListener("input",E$(this,k3)),super.disconnectedCallback()}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===pv.MEDIA_VOLUME||e===pv.MEDIA_MUTED){let e;this.range.valueAsNumber=this.mediaMuted?0:this.mediaVolume,this.range.setAttribute("aria-valuetext",(e=this.range.valueAsNumber,`${Math.round(100*e)}%`)),this.updateBar()}}
3972get mediaVolume(){return vt(this,pv.MEDIA_VOLUME,1)}set mediaVolume(e){vi(this,pv.MEDIA_VOLUME,e)}get mediaMuted(){return va(this,pv.MEDIA_MUTED)}set mediaMuted(e){vr(this,pv.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return vn(this,pv.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){vs(this,pv.MEDIA_VOLUME_UNAVAILABLE,e)}}k3=new WeakMap,pK.customElements.get("media-volume-range")||pK.customElements.define("media-volume-range",EV);class Eq extends bQ{constructor(){super(...arguments),this.container=null}static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_LOOP]}connectedCallback(){var e;super.connectedCallback(),this.container=(null==(e=this.shadowRoot)?void 0:e.querySelector("#icon"))||null,this.container&&(this.container.textContent=pP("Loop"))}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===pv.MEDIA_LOOP&&this.container&&this.setAttribute("aria-checked",this.mediaLoop?"true":"false")}get mediaLoop(){return va(this,pv.MEDIA_LOOP)}set mediaLoop(e){vr(this,pv.MEDIA_LOOP,e)}handleClick(){let e=!this.mediaLoop,t=new pK.CustomEvent(pc.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}Eq.getSlotTemplateHTML=function(e){return` 3973 <style> 3974 :host { 3975 min-width: 4ch; 3976 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 3977 width: 100%; 3978 display: grid; 3979 grid-template-columns: 1fr auto; 3980 gap: 1rem; 3981 font-weight: var(--media-button-font-weight, normal); 3982 } 3983 3984 #checked-indicator { 3985 display: none; 3986 } 3987 3988 :host([${pv.MEDIA_LOOP}]) #checked-indicator { 3989 display: block; 3990 } 3991 </style> 3992 3993 <span id="icon"> 3994 </span> 3995 3996 <div id="checked-indicator"> 3997 <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator"> 3998 <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"/> 3999 </svg> 4000 </div> 4001 `},Eq.getTooltipContentHTML=function(){return pP("Loop")},pK.customElements.get("media-loop-button")||pK.customElements.define("media-loop-button",Eq);var EF=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},EG=(e,t,i)=>(EF(e,t,"read from private field"),i?i.call(e):t.get(e)),EK=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},Ej=(e,t,i,a)=>(EF(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let EY={processCallback(e,t,i){if(i){for(let[e,a]of t)if(e in i){let t=i[e];"boolean"==typeof t&&a instanceof E2&&"boolean"==typeof a.element[a.attributeName]?a.booleanValue=t:"function"==typeof t&&a instanceof E2?a.element[a.attributeName]=t:a.value=t}}}};class EQ extends pK.DocumentFragment{constructor(e,t,i=EY){var a;super(),EK(this,k4,void 0),EK(this,k5,void 0),this.append(e.content.cloneNode(!0)),Ej(this,k4,Ez(this)),Ej(this,k5,i),null==(a=i.createCallback)||a.call(i,this,EG(this,k4),t),i.processCallback(this,EG(this,k4),t)}update(e){EG(this,k5).processCallback(this,EG(this,k4),e)}}k4=new WeakMap,k5=new WeakMap;let Ez=(e,t=[])=>{let i,a;for(let r of e.attributes||[])if(r.value.includes("{{")){let n=new E1;for([i,a]of EX(r.value))if(i){let i=new E2(e,r.name,r.namespaceURI);n.append(i),t.push([a,i])}else n.append(a);r.value=n.toString()}for(let r of e.childNodes)if(1!==r.nodeType||r instanceof HTMLTemplateElement){let n=r.data;if(1===r.nodeType||n.includes("{{")){let s=[];if(n)for([i,a]of EX(n))if(i){let i=new E3(e);s.push(i),t.push([a,i])}else s.push(new Text(a));else if(r instanceof HTMLTemplateElement){let i=new E4(e,r);s.push(i),t.push([i.expression,i])}r.replaceWith(...s.flatMap(e=>e.replacementNodes||[e]))}}else Ez(r,t);return t},EZ={},EX=e=>{let t="",i=0,a=EZ[e],r=0,n;if(a)return a;for(a=[];n=e[r];r++)"{"===n&&"{"===e[r+1]&&"\\"!==e[r-1]&&e[r+2]&&1==++i?(t&&a.push([0,t]),t="",r++):"}"!==n||"}"!==e[r+1]||"\\"===e[r-1]||--i?t+=n||"":(a.push([1,t.trim()]),t="",r++);return t&&a.push([0,(i>0?"{{":"")+t]),EZ[e]=a};class EJ{get value(){return""}set value(e){}toString(){return this.value}}let E0=new WeakMap;class E1{constructor(){EK(this,k9,[])}[Symbol.iterator](){return EG(this,k9).values()}get length(){return EG(this,k9).length}item(e){return EG(this,k9)[e]}append(...e){for(let t of e)t instanceof E2&&E0.set(t,this),EG(this,k9).push(t)}toString(){return EG(this,k9).join("")}}k9=new WeakMap;
4001class E2 extends EJ{constructor(e,t,i){super(),EK(this,At),EK(this,k8,""),EK(this,k7,void 0),EK(this,k6,void 0),EK(this,Ae,void 0),Ej(this,k7,e),Ej(this,k6,t),Ej(this,Ae,i)}get attributeName(){return EG(this,k6)}get attributeNamespace(){return EG(this,Ae)}get element(){return EG(this,k7)}get value(){return EG(this,k8)}set value(e){EG(this,k8)!==e&&(Ej(this,k8,e),EG(this,At,Ai)&&1!==EG(this,At,Ai).length?EG(this,k7).setAttributeNS(EG(this,Ae),EG(this,k6),EG(this,At,Ai).toString()):null==e?EG(this,k7).removeAttributeNS(EG(this,Ae),EG(this,k6)):EG(this,k7).setAttributeNS(EG(this,Ae),EG(this,k6),e))}get booleanValue(){return EG(this,k7).hasAttributeNS(EG(this,Ae),EG(this,k6))}set booleanValue(e){if(EG(this,At,Ai)&&1!==EG(this,At,Ai).length)throw new DOMException("Value is not fully templatized");this.value=e?"":null}}k8=new WeakMap,k7=new WeakMap,k6=new WeakMap,Ae=new WeakMap,At=new WeakSet,Ai=function(){return E0.get(this)};class E3 extends EJ{constructor(e,t){super(),EK(this,Aa,void 0),EK(this,Ar,void 0),Ej(this,Aa,e),Ej(this,Ar,t?[...t]:[new Text])}get replacementNodes(){return EG(this,Ar)}get parentNode(){return EG(this,Aa)}get nextSibling(){return EG(this,Ar)[EG(this,Ar).length-1].nextSibling}get previousSibling(){return EG(this,Ar)[0].previousSibling}get value(){return EG(this,Ar).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){let t=e.flat().flatMap(e=>null==e?[new Text]:e.forEach?[...e]:11===e.nodeType?[...e.childNodes]:e.nodeType?[e]:[new Text(e)]);t.length||t.push(new Text),Ej(this,Ar,function(e,t,i,a=null){let r=0,n,s,o,l=i.length,d=t.length;for(;r<l&&r<d&&t[r]==i[r];)r++;for(;r<l&&r<d&&i[l-1]==t[d-1];)a=i[--d,--l];if(r==d)for(;r<l;)e.insertBefore(i[r++],a);if(r==l)for(;r<d;)e.removeChild(t[r++]);else{for(n=t[r];r<l;)o=i[r++],s=n?n.nextSibling:a,n==o?n=s:r<l&&i[r]==s?(e.replaceChild(o,n),n=s):e.insertBefore(o,n);for(;n!=a;)s=n.nextSibling,e.removeChild(n),n=s}return i}(EG(this,Ar)[0].parentNode,EG(this,Ar),t,this.nextSibling))}}Aa=new WeakMap,Ar=new WeakMap;class E4 extends E3{constructor(e,t){const i=t.getAttribute("directive")||t.getAttribute("type");let a=t.getAttribute("expression")||t.getAttribute(i)||"";a.startsWith("{{")&&(a=a.trim().slice(2,-2).trim()),super(e),this.expression=a,this.template=t,this.directive=i}}let E5={string:e=>String(e)};class E9{constructor(e){this.template=e,this.state=void 0}}let E8=new WeakMap,E7=new WeakMap,E6={partial:(e,t)=>{t[e.expression]=new E9(e.template)},if:(e,t)=>{var i;if(fa(e.expression,t))if(E8.get(e)!==e.template){E8.set(e,e.template);let i=new EQ(e.template,t,ft);e.replace(i),E7.set(e,i)}else null==(i=E7.get(e))||i.update(t);else e.replace(""),E8.delete(e),E7.delete(e)}},fe=Object.keys(E6),ft={processCallback(e,t,i){var a,r;if(i)for(let[e,n]of t){if(n instanceof E4){if(!n.directive){let e=fe.find(e=>n.template.hasAttribute(e));e&&(n.directive=e,n.expression=n.template.getAttribute(e))}null==(a=E6[n.directive])||a.call(E6,n,i);continue}let t=fa(e,i);if(t instanceof E9){E8.get(n)!==t.template?(E8.set(n,t.template),n.value=t=new EQ(t.template,t.state,ft),E7.set(n,t)):null==(r=E7.get(n))||r.update(t.state);continue}t?(n instanceof E2&&n.attributeName.startsWith("aria-")&&(t=String(t)),n instanceof E2?"boolean"==typeof t?n.booleanValue=t:"function"==typeof t?n.element[n.attributeName]=t:n.value=t:(n.value=t,E8.delete(n),E7.delete(n))):n instanceof E2?n.value=void 0:(n.value=void 0,E8.delete(n),E7.delete(n))}}},fi={"!":e=>!e,"!!":e=>!!e,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,">":(e,t)=>e>t,">=":(e,t)=>
4001e>=t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"??":(e,t)=>null!=e?e:t,"|":(e,t)=>{var i;return null==(i=E5[t])?void 0:i.call(E5,e)}};function fa(e,t={}){var i,a,r,n,s,o,l;let d=(function(e,t){let i,a,r,n=[];for(;e;){for(let n in r=null,i=e.length,t)(a=t[n].exec(e))&&a.index<i&&(r={token:a[0],type:n,matches:a.slice(1)},i=a.index);i&&n.push({token:e.substr(0,i),type:void 0}),r&&n.push(r),e=e.substr(i+(r?r.token.length:0))}return n})(e,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>"ws"!==e);if(0===d.length||d.some(({type:e})=>!e))return fr(e);if((null==(i=d[0])?void 0:i.token)===">"){let i=t[null==(a=d[1])?void 0:a.token];if(!i)return fr(e);let o={...t};i.state=o;let l=d.slice(2);for(let e=0;e<l.length;e+=3){let i=null==(r=l[e])?void 0:r.token,a=null==(n=l[e+1])?void 0:n.token,d=null==(s=l[e+2])?void 0:s.token;i&&"="===a&&(o[i]=fs(d,t))}return i}if(1===d.length)return fn(d[0])?fs(d[0].token,t):fr(e);if(2===d.length){let i=fi[null==(o=d[0])?void 0:o.token];return i&&fn(d[1])?i(fs(d[1].token,t)):fr(e)}if(3===d.length){let i=null==(l=d[1])?void 0:l.token,a=fi[i];if(!a||!fn(d[0])||!fn(d[2]))return fr(e);let r=fs(d[0].token,t);return a(r,"|"===i?d[2].token:fs(d[2].token,t))}}function fr(e){return console.warn(`Warning: invalid expression \`${e}\``),!1}function fn({type:e}){return["number","boolean","string","param"].includes(e)}function fs(e,t){let i=e[0],a=e.slice(-1);return"true"===e||"false"===e?"true"===e:i===a&&["'",'"'].includes(i)?e.slice(1,-1):pL(e)?parseFloat(e):t[e]}var fo=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},fl=(e,t,i)=>(fo(e,t,"read from private field"),i?i.call(e):t.get(e)),fd=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},fu=(e,t,i,a)=>(fo(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),fc=(e,t,i)=>(fo(e,t,"access private method"),i);let fh={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},fm=pj.createElement("template");fm.innerHTML=` 4002 <style> 4003 :host { 4004 display: inline-block; 4005 line-height: 0; 4006 } 4007 4008 media-controller { 4009 width: 100%; 4010 height: 100%; 4011 } 4012 4013 media-captions-button:not([mediasubtitleslist]), 4014 media-captions-menu:not([mediasubtitleslist]), 4015 media-captions-menu-button:not([mediasubtitleslist]), 4016 media-audio-track-menu[mediaaudiotrackunavailable], 4017 media-audio-track-menu-button[mediaaudiotrackunavailable], 4018 media-rendition-menu[mediarenditionunavailable], 4019 media-rendition-menu-button[mediarenditionunavailable], 4020 media-volume-range[mediavolumeunavailable], 4021 media-airplay-button[mediaairplayunavailable], 4022 media-fullscreen-button[mediafullscreenunavailable], 4023 media-cast-button[mediacastunavailable], 4024 media-pip-button[mediapipunavailable] { 4025 display: none; 4026 } 4027 </style> 4028`;class fp extends pK.HTMLElement{constructor(){super(),fd(this,Ad),fd(this,Ac),fd(this,An,void 0),fd(this,As,void 0),fd(this,Ao,void 0),fd(this,Al,void 0),fd(this,Am,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer()),fu(this,Al,new MutationObserver(e=>{var t;(!this.mediaController||(null==(t=this.mediaController)?void 0:t.breakpointsComputed))&&e.some(e=>{let t=e.target;return t===this||"media-controller"===t.localName&&!!(fh[e.attributeName]||e.attributeName.startsWith("breakpoint"))})&&this.render()})),fu(this,Am,this.render.bind(this)),fc(this,Ad,Au).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return null!=(e=fl(this,An))?e:this.constructor.template}set template(e){null===e?this.removeAttribute("template"):"string"==typeof e?this.setAttribute("template",e):e instanceof HTMLTemplateElement&&(fu(this,An,e),fu(this,Ao,null),this.createRenderer())}get props(){var e,t,i;let a=[...Array.from(null!=(t=null==(e=this.mediaController)?void 0:e.attributes)?t:[]).filter(({name:e})=>fh[e]||e.startsWith("breakpoint")),...Array.from(this.attributes)],r={};for(let e of a){let t=null!=(i=fh[e.name])?i:e.name.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase()),{value:a}=e;null!=a?(pL(a)&&(a=parseFloat(a)),r[t]=""===a||a):r[t]=!1}return r}attributeChangedCallback(e,t,i){"template"===e&&t!=i&&fc(this,Ac,Ah).call(this)}connectedCallback(){this.addEventListener(pb.BREAKPOINTS_COMPUTED,fl(this,Am)),fl(this,Al).observe(this,{attributes:!0}),fl(this,Al).observe(this.renderRoot,{attributes:!0,subtree:!0}),fc(this,Ac,Ah).call(this)}disconnectedCallback(){this.removeEventListener(pb.BREAKPOINTS_COMPUTED,fl(this,Am)),fl(this,Al).disconnect()}createRenderer(){this.template instanceof HTMLTemplateElement&&this.template!==fl(this,As)&&(fu(this,As,this.template),this.renderer=new EQ(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(fm.content.cloneNode(!0),this.renderer))}render(){var e;null==(e=this.renderer)||e.update(this.props)}}async function fv(e){let t=await fetch(e);if(200!==t.status)throw Error(`Failed to load resource: the server responded with a status of ${t.status}`);return t.text()}function fb(e){return e.split("-")[0]}An=new WeakMap,As=new WeakMap,Ao=new WeakMap,Al=new WeakMap,Ad=new WeakSet,Au=function(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}},Ac=new WeakSet,Ah=function(){var e;let t=this.getAttribute("template");if(!t||t===fl(this,Ao))return;let i=this.getRootNode(),a=null==(e=null==i?void 0:i.getElementById)?void 0:e.call(i,t);if(a){fu(this,Ao,t),fu(this,An,a),this.createRenderer();return}(function(e){if(!/^(\/|\.\/|https?:\/\/)/.test(e))return!1;let t=/^https?:\/\//.test(e)?void 0:location.origin;try{new URL(e,t)}catch(e){return!1}return!0})(t)&&(fu(this,Ao,t),fv(t).then(e=>{let t=pj.createElement("template");t.innerHTML=e,fu(this,An,t),this.createRenderer()}).catch(console.error))},Am=new WeakMap,fp.observedAttributes=["template"],fp.processor=ft,pK.customElements.get("media-theme")||pK.
4028customElements.define("media-theme",fp);class fg extends Event{constructor({action:e="auto",relatedTarget:t,...i}){super("invoke",i),this.action=e,this.relatedTarget=t}}class fE extends Event{constructor({newState:e,oldState:t,...i}){super("toggle",i),this.newState=e,this.oldState=t}}var ff=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},fy=(e,t,i)=>(ff(e,t,"read from private field"),i?i.call(e):t.get(e)),f_=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},fk=(e,t,i,a)=>(ff(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),fA=(e,t,i)=>(ff(e,t,"access private method"),i);function fw({type:e,text:t,value:i,checked:a}){let r=pj.createElement("media-chrome-menu-item");r.type=null!=e?e:"",r.part.add("menu-item"),e&&r.part.add(e),r.value=i,r.checked=a;let n=pj.createElement("span");return n.textContent=t,r.append(n),r}function fT(e,t){let i=e.querySelector(`:scope > [slot="${t}"]`);if((null==i?void 0:i.nodeName)=="SLOT"&&(i=i.assignedElements({flatten:!0})[0]),i)return i.cloneNode(!0);let a=e.shadowRoot.querySelector(`[name="${t}"] > svg`);return a?a.cloneNode(!0):""}let fI="style",fS="hidden",fC="disabled";class fM extends pK.HTMLElement{constructor(){if(super(),f_(this,A_),f_(this,AA),f_(this,AI),f_(this,AC),f_(this,AL),f_(this,Ax),f_(this,AO),f_(this,AH),f_(this,AB),f_(this,AV),f_(this,AF),f_(this,AK),f_(this,AY),f_(this,Az),f_(this,AX),f_(this,A0),f_(this,A2),f_(this,A4),f_(this,Ap,null),f_(this,Av,null),f_(this,Ab,null),f_(this,Ag,new Set),f_(this,AE,void 0),f_(this,Af,!1),f_(this,Ay,null),f_(this,AT,()=>{let e=fy(this,Ag),t=new Set(this.items);for(let i of e)t.has(i)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:i}));for(let i of t)e.has(i)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:i}));fk(this,Ag,t)}),f_(this,AP,()=>{fA(this,AO,AU).call(this),fA(this,AH,AW).call(this,!1)}),f_(this,AN,()=>{fA(this,AO,AU).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=pJ(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),fk(this,AE,new MutationObserver(fy(this,AT)))}static get observedAttributes(){return[fC,fS,fI,"anchor",ph.MEDIA_CONTROLLER]}static formatMenuItemText(e,t){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this)}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this)}handleEvent(e){switch(e.type){case"slotchange":fA(this,A_,Ak).call(this,e);break;case"invoke":fA(this,AC,AM).call(this,e);break;case"click":fA(this,AB,A$).call(this,e);break;case"toggle":fA(this,AF,AG).call(this,e);break;case"focusout":fA(this,AY,AQ).call(this,e);break;case"keydown":fA(this,Az,AZ).call(this,e)}}connectedCallback(){var e,t;fy(this,AE).observe(this.defaultSlot,{childList:!0}),fk(this,Ay,ve(this.shadowRoot,":host")),fA(this,AI,AS).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),fk(this,Ap,p1(this)),null==(t=null==(e=fy(this,Ap))?void 0:e.associateElement)||t.call(e,this),this.hidden||(pZ(fR(this),fy(this,AP)),pZ(this,fy(this,AN))),fA(this,AA,Aw).call(this),this.shadowRoot.addEventListener("slotchange",this)}disconnectedCallback(){var e,t;fy(this,AE).disconnect(),pX(fR(this),fy(this,AP)),pX(this,fy(this,AN)),this.disable(),null==(t=null==(e=fy(this,Ap))?void 0:e.unassociateElement)||t.call(e,this),fk(this,Ap,null),fk(this,Av,null),fk(this,Ab,null),this.shadowRoot.removeEventListener("slotchange",this)}attributeChangedCallback(e,t,i){var a,r,n,s;e===fS&&i!==t?(fy(this,Af)||fk(this,Af,!0),this.hidden?fA(this,Ax,AD).call(this):fA(this,AL,AR).call(this),this.dispatchEvent(new fE({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===ph.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=fy(this,Ap))?void 0:a.unassociateElement)||r.call(a,this),fk(this,Ap,null)),i&&this.isConnected&&(fk(this,Ap,p1(this)),null==(s=null==(n=fy(this,Ap))?void 0:n.associateElement)||s.call(n,this))):e===fC&&i!==t?null==i?this.enable():this.disable():e===fI&&i!==t&&fA(this,AI,AS).call(this)}formatMenuItemText(e,t){return this.constructor.formatMenuItemText(e,t)}get anchor(){return this.getAttribute("anchor")}
4028set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?null==(e=p8(this))?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(fL)}get radioGroupItems(){return this.items.filter(e=>"menuitemradio"===e.role)}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,t;return null!=(t=null==(e=this.checkedItems[0])?void 0:e.value)?t:""}set value(e){let t=this.items.find(t=>t.value===e);t&&fA(this,A4,A5).call(this,t)}focus(){if(fk(this,Av,p9()),this.items.length){fA(this,A2,A3).call(this,this.items[0]),this.items[0].focus();return}let e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==e||e.focus()}handleSelect(e){var t;let i=fA(this,AX,AJ).call(this,e);i&&(fA(this,A4,A5).call(this,i,"checkbox"===i.type),fy(this,Ab)&&!this.hidden&&(null==(t=fy(this,Av))||t.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var t,i;let{key:a}=e,r=this.items,n=null!=(i=null!=(t=fA(this,AX,AJ).call(this,e))?t:fA(this,A0,A1).call(this))?i:r[0],s=Math.max(0,r.indexOf(n));"ArrowDown"===a?s++:"ArrowUp"===a?s--:"Home"===e.key?s=0:"End"===e.key&&(s=r.length-1),s<0&&(s=r.length-1),s>r.length-1&&(s=0),fA(this,A2,A3).call(this,r[s]),r[s].focus()}}function fL(e){return["menuitem","menuitemradio","menuitemcheckbox"].includes(null==e?void 0:e.role)}function fR(e){var t;return null!=(t=e.getAttribute("bounds")?p5(e,`#${e.getAttribute("bounds")}`):p0(e)||e.parentElement)?t:e}Ap=new WeakMap,Av=new WeakMap,Ab=new WeakMap,Ag=new WeakMap,AE=new WeakMap,Af=new WeakMap,Ay=new WeakMap,A_=new WeakSet,Ak=function(e){let t=e.target;for(let e of t.assignedNodes({flatten:!0}))3===e.nodeType&&""===e.textContent.trim()&&e.remove();["header","title"].includes(t.name)&&fA(this,AA,Aw).call(this),t.name||fy(this,AT).call(this)},AA=new WeakSet,Aw=function(){let e=this.shadowRoot.querySelector('slot[name="header"]');e.hidden=0===this.shadowRoot.querySelector('slot[name="title"]').assignedNodes().length&&0===e.assignedNodes().length},AT=new WeakMap,AI=new WeakSet,AS=function(){var e;let t=this.shadowRoot.querySelector("#layout-row"),i=null==(e=getComputedStyle(this).getPropertyValue("--media-menu-layout"))?void 0:e.trim();t.setAttribute("media","row"===i?"":"width:0")},AC=new WeakSet,AM=function(e){fk(this,Ab,e.relatedTarget),p4(this,e.relatedTarget)||(this.hidden=!this.hidden)},AL=new WeakSet,AR=function(){var e;null==(e=fy(this,Ab))||e.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),pZ(fR(this),fy(this,AP)),pZ(this,fy(this,AN))},Ax=new WeakSet,AD=function(){var e;null==(e=fy(this,Ab))||e.setAttribute("aria-expanded","false"),pX(fR(this),fy(this,AP)),pX(this,fy(this,AN))},AP=new WeakMap,AN=new WeakMap,AO=new WeakSet,AU=function(e){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;let{x:t,y:i}=function({anchor:e,floating:t,placement:i}){let{x:a,y:r}=function({anchor:e,floating:t},i){let a,r="x"==(["top","bottom"].includes(fb(i))?"y":"x")?"y":"x",n="y"===r?"height":"width",s=fb(i),o=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,d=e[n]/2-t[n]/2;switch(s){case"top":a={x:o,y:e.y-t.height};break;case"bottom":a={x:o,y:e.y+e.height};break;case"right":a={x:e.x+e.width,y:l};break;case"left":a={x:e.x-t.width,y:l};break;default:a={x:e.x,y:e.y}}switch(i.split("-")[1]){case"start":a[r]-=d;break;case"end":a[r]+=d}return a}(function({anchor:e,floating:t}){var i,a,r;let n,s;return{anchor:(i=e,a=t.offsetParent,n=i.getBoundingClientRect(),s=null!=(r=null==a?void 0:a.getBoundingClientRect())?r:{x:0,y:0},{x:n.x-s.x,y:n.y-s.y,width:n.width,height:n.height}),floating:{x:0,y:0,width:t.offsetWidth,height:t.offsetHeight}}}({anchor:e,floating:t}),i);return{x:a,y:r}}({anchor:this.anchorElement,floating:this,placement:"top-start"});null!=e||(e=this.offsetWidth);let a=fR(this).getBoundingClientRect(),r=a.width-t-e,n=a.height-i-this.offsetHeight,{style:s}=fy(this,Ay);s.setProperty("position","absolute"),s.setProperty("right",`${Math.max(0,r)}px`),s.setProperty("--_menu-bottom",`${n}px`);let o=getComputedStyle(this),l=s.getPropertyValue("--_menu-bottom")===o.bottom?n:parseFloat(o.bottom),d=a.height-l-parseFloat(o.marginBottom);this.style.setProperty("--_menu-max-height",`${d}px`)},AH=new WeakSet,AW=function(e){let t=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=null==t?void 0:t.querySelector('[role="menu"]'),{style:a}=fy(this,Ay);if(e||a.setProperty("--media-menu-transition-in","none"),i){let e=i.offsetHeight,a=Math.max(i.offsetWidth,t.offsetWidth);this.style.setProperty("min-width",`${a}px`),this.style.setProperty("min-height",`${e}px`),fA(this,AO,AU).call(this,a)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),fA(this,AO,AU).call(this);a.removeProperty("--media-menu-transition-in")},AB=new WeakSet,A$=function(e){var t;if(e.stopPropagation(),e.composedPath().includes(fy(this,AV,Aq))){null==(t=fy(this,Av))||t.focu
4028s(),this.hidden=!0;return}let i=fA(this,AX,AJ).call(this,e);!i||i.hasAttribute("disabled")||(fA(this,A2,A3).call(this,i),this.handleSelect(e))},AV=new WeakSet,Aq=function(){var e;return null==(e=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))?void 0:e.find(e=>e.matches('button[part~="back"]'))},AF=new WeakSet,AG=function(e){if(e.target===this)return;fA(this,AK,Aj).call(this);let t=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(let i of t)i.invokeTargetElement!=e.target&&("open"!=e.newState||"true"!=i.getAttribute("aria-expanded")||i.invokeTargetElement.hidden||i.invokeTargetElement.dispatchEvent(new fg({relatedTarget:i})));for(let e of t)e.setAttribute("aria-expanded",`${!e.submenuElement.hidden}`);fA(this,AH,AW).call(this,!0)},AK=new WeakSet,Aj=function(){let e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)},AY=new WeakSet,AQ=function(e){var t;p4(this,e.relatedTarget)||(fy(this,Af)&&(null==(t=fy(this,Av))||t.focus()),fy(this,Ab)&&fy(this,Ab)!==e.relatedTarget&&!this.hidden&&(this.hidden=!0))},Az=new WeakSet,AZ=function(e){var t,i,a,r,n;let{key:s,ctrlKey:o,altKey:l,metaKey:d}=e;if(!o&&!l&&!d&&this.keysUsed.includes(s))if(e.preventDefault(),e.stopPropagation(),"Tab"===s){if(fy(this,Af)){this.hidden=!0;return}e.shiftKey?null==(i=null==(t=this.previousElementSibling)?void 0:t.focus)||i.call(t):null==(r=null==(a=this.nextElementSibling)?void 0:a.focus)||r.call(a),this.blur()}else"Escape"===s?(null==(n=fy(this,Av))||n.focus(),fy(this,Af)&&(this.hidden=!0)):"Enter"===s||" "===s?this.handleSelect(e):this.handleMove(e)},AX=new WeakSet,AJ=function(e){return e.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))},A0=new WeakSet,A1=function(){return this.items.find(e=>0===e.tabIndex)},A2=new WeakSet,A3=function(e){for(let t of this.items)t.tabIndex=t===e?0:-1},A4=new WeakSet,A5=function(e,t){let i=[...this.checkedItems];"radio"===e.type&&this.radioGroupItems.forEach(e=>e.checked=!1),t?e.checked=!e.checked:e.checked=!0,this.checkedItems.some((e,t)=>e!=i[t])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},fM.shadowRootOptions={mode:"open"},fM.getTemplateHTML=function(e){return` 4029 <style> 4030 :host { 4031 font: var(--media-font, 4032 var(--media-font-weight, normal) 4033 var(--media-font-size, 14px) / 4034 var(--media-text-content-height, var(--media-control-height, 24px)) 4035 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 4036 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 4037 --_menu-bg: rgb(20 20 30 / .8); 4038 background: var(--media-menu-background, var(--media-control-background, var(--media-secondary-color, var(--_menu-bg)))); 4039 border-radius: var(--media-menu-border-radius); 4040 border: var(--media-menu-border, none); 4041 display: var(--media-menu-display, inline-flex) !important; 4042 4043 transition: var(--media-menu-transition-in, 4044 visibility 0s, 4045 opacity .2s ease-out, 4046 transform .15s ease-out, 4047 left .2s ease-in-out, 4048 min-width .2s ease-in-out, 4049 min-height .2s ease-in-out 4050 ) !important; 4051 4052 visibility: var(--media-menu-visibility, visible); 4053 opacity: var(--media-menu-opacity, 1); 4054 max-height: var(--media-menu-max-height, var(--_menu-max-height, 300px)); 4055 transform: var(--media-menu-transform-in, translateY(0) scale(1)); 4056 flex-direction: column; 4057 4058 min-height: 0; 4059 position: relative; 4060 bottom: var(--_menu-bottom); 4061 box-sizing: border-box; 4062 } 4063 4064 @-moz-document url-prefix() { 4065 :host{ 4066 --_menu-bg: rgb(20 20 30); 4067 } 4068 } 4069 4070 :host([hidden]) { 4071 transition: var(--media-menu-transition-out, 4072 visibility .15s ease-in, 4073 opacity .15s ease-in, 4074 transform .15s ease-in 4075 ) !important; 4076 visibility: var(--media-menu-hidden-visibility, hidden); 4077 opacity: var(--media-menu-hidden-opacity, 0); 4078 max-height: var(--media-menu-hidden-max-height, 4079 var(--media-menu-max-height, var(--_menu-max-height, 300px))); 4080 transform: var(--media-menu-transform-out, translateY(2px) scale(.99)); 4081 pointer-events: none; 4082 } 4083 4084 :host([slot="submenu"]) { 4085 background: none; 4086 width: 100%; 4087 min-height: 100%; 4088 position: absolute; 4089 bottom: 0; 4090 right: -100%; 4091 } 4092 4093 #container { 4094 display: flex; 4095 flex-direction: column; 4096 min-height: 0; 4097 transition: transform .2s ease-out; 4098 transform: translate(0, 0); 4099 } 4100 4101 #container.has-expanded { 4102 transition: transform .2s ease-in; 4103 transform: translate(-100%, 0); 4104 } 4105 4106 button { 4107 background: none; 4108 color: inherit; 4109 border: none; 4110 padding: 0; 4111 font: inherit; 4112 outline: inherit; 4113 display: inline-flex; 4114 align-items: center; 4115 } 4116 4117 slot[name="header"][hidden] { 4118 display: none; 4119 } 4120 4121 slot[name="header"] > *, 4122 slot[name="header"]::slotted(*) { 4123 padding: .4em .7em; 4124 border-bottom: 1px solid rgb(255 255 255 / .25); 4125 cursor: var(--media-cursor, default); 4126 } 4127 4128 slot[name="header"] > button[part~="back"], 4129 slot[name="header"]::slotted(button[part~="back"]) { 4130 cursor: var(--media-cursor, pointer); 4131 } 4132 4133 svg[part~="back"] { 4134 height: var(--media-menu-icon-height, var(--media-control-height, 24px)); 4135 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 4136 display: block; 4137 margin-right: .5ch; 4138 } 4139 4140 slot:not([name]) { 4141 gap: var(--media-menu-gap); 4142 flex-direction: var(--media-menu-flex-direction, column); 4143 overflow: var(--media-menu-overflow, hidden auto); 4144 display: flex; 4145 min-height: 0; 4146 } 4147 4148 :host([role="menu"]) slot:not([name]) { 4149 padding-block: .4em; 4150 } 4151 4152 slot:not([name])::slotted([role="menu"]) { 4153 background: none; 4154 } 4155 4156 media-chrome-menu-item > span { 4157 margin-right: .5ch; 4158 max-width: var(--media-menu-item-max-width); 4159 text-overflow: ellipsis; 4160 overflow: hidden; 4161 } 4162 </style> 4163 <style id="layout-row" media="width:0"> 4164 4165 slot[name="header"] > *, 4166 slot[name="header"]::slotted(*) { 4167 padding: .4em .5em; 4168 } 4169 4170 slot:not([name]) { 4171 gap: var(--media-menu-gap, .25em); 4172 flex-direction: var(--media-menu-flex-direction, row); 4173 padding-inline: .5em; 4174 } 4175 4176 media-chrome-menu-item { 4177 padding: .3em .5em; 4178 } 4179 4180 media-chrome-menu-item[aria-checked="true"] { 4181 background: var(--media-menu-item-checked-background, rgb(255 255 255 / .2)); 4182 } 4183 4184 4185 media-chrome-menu-item::part(checked-indicator) { 4186 display: var(--media-menu-item-checked-indicator-display, none); 4187 } 4188 </style> 4189 <div id="container" part="container"> 4190 <slot name="header" hidden> 4191 <button part="back button" aria-label="Back to previous menu"> 4192 <slot name="back-icon"> 4193 <svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator"> 4194 <path d="m11.88 17.585.742-.669-4.2-4.665 4.2-4.666-.743-.669-4.803 5.335 4.803 5.334Z"/> 4195 </svg> 4196 </slot> 4197 <slot name="title"></slot> 4198 </button> 4199 </slot> 4200 <slot></slot> 4201 </div> 4202 <slot name="checked-indicator" hidden></slot> 4203 `},pK.customElements.get("media-chrome-menu")||pK.customElements.define("media-chrome-menu",fM);var fx=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},fD=(e,t,i)=>(fx(e,t,"read from private field"),i?i.call(e):t.get(e)),fP=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},fN=(e,t,i,a)=>(fx(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),fO=(e,t,i)=>(fx(e,t,"access private method"),i);let fU="type",fH="value",fW="checked",fB="disabled";class f$ extends pK.HTMLElement{constructor(){if(super(),fP(this,A7),fP(this,we),fP(this,wi),fP(this,wo),fP(this,A9,!1),fP(this,A8,void 0),fP(this,wr,()=>{var e,t;this.submenuElement.items&&this.setAttribute("submenusize",`${this.submenuElement.items.length}`);let i=this.shadowRoot.querySelector('slot[name="description"]'),a=null==(e=this.submenuElement.checkedItems)?void 0:e[0],r=null!=(t=null==a?void 0:a.dataset.description)?t:null==a?void 0:a.text,n=pj.createElement("span");n.textContent=null!=r?r:"",i.replaceChildren(n)}),fP(this,wn,e=>{let{key:t}=e;this.keysUsed.includes(t)?this.handleClick(e):this.removeEventListener("keyup",fD(this,wn))}),fP(this,ws,e=>{let{metaKey:t,altKey:i,key:a}=e;t||i||!this.keysUsed.includes(a)?this.removeEventListener("keyup",fD(this,wn)):this.addEventListener("keyup",fD(this,wn),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=pJ(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[fU,fB,fW,fH]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),fV(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","fal
4203se"),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":fO(this,A7,A6).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":fD(this,ws).call(this,e);break;case"keyup":fD(this,wn).call(this,e)}}attributeChangedCallback(e,t,i){e===fW&&fV(this)&&!fD(this,A9)?this.setAttribute("aria-checked",null!=i?"true":"false"):e===fU&&i!==t?this.role="menuitem"+i:e===fB&&i!==t&&(null==i?this.enable():this.disable())}connectedCallback(){this.hasAttribute(fB)||this.enable(),this.role="menuitem"+this.type,fN(this,A8,function e(t,i){if(!t)return null;let{host:a}=t.getRootNode();return!i&&a?e(t,a):(null==i?void 0:i.items)?i:e(i,null==i?void 0:i.parentNode)}(this,this.parentNode)),fO(this,wo,wl).call(this),this.submenuElement&&fO(this,we,wt).call(this),this.shadowRoot.addEventListener("slotchange",this)}disconnectedCallback(){this.disable(),fO(this,wo,wl).call(this),fN(this,A8,null),this.shadowRoot.removeEventListener("slotchange",this)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?null==(e=p8(this))?void 0:e.querySelector(`#${this.invokeTarget}`):this.submenuElement}get submenuElement(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}get type(){var e;return null!=(e=this.getAttribute(fU))?e:""}set type(e){this.setAttribute(fU,`${e}`)}get value(){var e;return null!=(e=this.getAttribute(fH))?e:this.text}set value(e){this.setAttribute(fH,e)}get text(){var e;return(null!=(e=this.textContent)?e:"").trim()}get checked(){if(fV(this))return"true"===this.getAttribute("aria-checked")}set checked(e){fV(this)&&(fN(this,A9,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){!fV(this)&&this.invokeTargetElement&&p4(this,e.target)&&this.invokeTargetElement.dispatchEvent(new fg({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}function fV(e){return"radio"===e.type||"checkbox"===e.type}A9=new WeakMap,A8=new WeakMap,A7=new WeakSet,A6=function(e){let t=e.target;if(!(null==t?void 0:t.name))for(let e of t.assignedNodes({flatten:!0}))e instanceof Text&&""===e.textContent.trim()&&e.remove();"submenu"===t.name&&(this.submenuElement?fO(this,we,wt).call(this):fO(this,wi,wa).call(this))},we=new WeakSet,wt=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",fD(this,wr)),this.submenuElement.addEventListener("addmenuitem",fD(this,wr)),this.submenuElement.addEventListener("removemenuitem",fD(this,wr)),fD(this,wr).call(this)},wi=new WeakSet,wa=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",fD(this,wr)),this.submenuElement.removeEventListener("addmenuitem",fD(this,wr)),this.submenuElement.removeEventListener("removemenuitem",fD(this,wr)),fD(this,wr).call(this)},wr=new WeakMap,wn=new WeakMap,ws=new WeakMap,wo=new WeakSet,wl=function(){var e;let t=null==(e=fD(this,A8))?void 0:e.radioGroupItems;if(!t)return;let i=t.filter(e=>"true"===e.getAttribute("aria-checked")).pop();for(let e of(i||(i=t[0]),t))e.setAttribute("aria-checked","false");null==i||i.setAttribute("aria-checked","true")},f$.shadowRootOptions={mode:"open"},f$.getTemplateHTML=function(e){return` 4204 <style> 4205 :host { 4206 transition: var(--media-menu-item-transition, 4207 background .15s linear, 4208 opacity .2s ease-in-out 4209 ); 4210 outline: var(--media-menu-item-outline, 0); 4211 outline-offset: var(--media-menu-item-outline-offset, -1px); 4212 cursor: var(--media-cursor, pointer); 4213 display: flex; 4214 align-items: center; 4215 align-self: stretch; 4216 justify-self: stretch; 4217 white-space: nowrap; 4218 white-space-collapse: collapse; 4219 text-wrap: nowrap; 4220 padding: .4em .8em .4em 1em; 4221 } 4222 4223 :host(:focus-visible) { 4224 box-shadow: var(--media-menu-item-focus-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 4225 outline: var(--media-menu-item-hover-outline, 0); 4226 outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px)); 4227 } 4228 4229 :host(:hover) { 4230 cursor: var(--media-cursor, pointer); 4231 background: var(--media-menu-item-hover-background, rgb(92 92 102 / .5)); 4232 outline: var(--media-menu-item-hover-outline); 4233 outline-offset: var(--media-menu-item-hover-outline-offset, var(--media-menu-item-outline-offset, -1px)); 4234 } 4235 4236 :host([aria-checked="true"]) { 4237 background: var(--media-menu-item-checked-background); 4238 } 4239 4240 :host([hidden]) { 4241 display: none; 4242 } 4243 4244 :host([disabled]) { 4245 pointer-events: none; 4246 color: rgba(255, 255, 255, .3); 4247 } 4248 4249 slot:not([name]) { 4250 width: 100%; 4251 } 4252 4253 slot:not([name="submenu"]) { 4254 display: inline-flex; 4255 align-items: center; 4256 transition: inherit; 4257 opacity: var(--media-menu-item-opacity, 1); 4258 } 4259 4260 slot[name="description"] { 4261 justify-content: end; 4262 } 4263 4264 slot[name="description"] > span { 4265 display: inline-block; 4266 margin-inline: 1em .2em; 4267 max-width: var(--media-menu-item-description-max-width, 100px); 4268 text-overflow: ellipsis; 4269 overflow: hidden; 4270 font-size: .8em; 4271 font-weight: 400; 4272 text-align: right; 4273 position: relative; 4274 top: .04em; 4275 } 4276 4277 slot[name="checked-indicator"] { 4278 display: none; 4279 } 4280 4281 :host(:is([role="menuitemradio"],[role="menuitemcheckbox"])) slot[name="checked-indicator"] { 4282 display: var(--media-menu-item-checked-indicator-display, inline-block); 4283 } 4284 4285 4286 svg, img, ::slotted(svg), ::slotted(img) { 4287 height: var(--media-menu-item-icon-height, var(--media-control-height, 24px)); 4288 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 4289 display: block; 4290 } 4291 4292 4293 [part~="indicator"], 4294 ::slotted([part~="indicator"]) { 4295 fill: var(--media-menu-item-indicator-fill, 4296 var(--media-icon-color, var(--media-primary-color, rgb(238 238 238)))); 4297 height: var(--media-menu-item-indicator-height, 1.25em); 4298 margin-right: .5ch; 4299 } 4300 4301 [part~="checked-indicator"] { 4302 visibility: hidden; 4303 } 4304 4305 :host([aria-checked="true"]) [part~="checked-indicator"] { 4306 visibility: visible; 4307 } 4308 </style> 4309 <slot name="checked-indicator"> 4310 <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator"> 4311 <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"/> 4312 </svg> 4313 </slot> 4314 <slot name="prefix"></slot> 4315 <slot></slot> 4316 <slot name="description"></slot> 4317 <slot name="suffix">
4318 ${this.getSuffixSlotInnerHTML(e)} 4319 </slot> 4320 <slot name="submenu"></slot> 4321 `},f$.getSuffixSlotInnerHTML=function(e){return""},pK.customElements.get("media-chrome-menu-item")||pK.customElements.define("media-chrome-menu-item",f$);class fq extends fM{get anchorElement(){return"auto"!==this.anchor?super.anchorElement:p0(this).querySelector("media-settings-menu-button")}}fq.getTemplateHTML=function(e){return` 4322 ${fM.getTemplateHTML(e)} 4323 <style> 4324 :host { 4325 --_menu-bg: rgb(20 20 30 / .8); 4326 background: var(--media-settings-menu-background, 4327 var(--media-menu-background, 4328 var(--media-control-background, 4329 var(--media-secondary-color, var(--_menu-bg))))); 4330 min-width: var(--media-settings-menu-min-width, 170px); 4331 border-radius: 2px 2px 0 0; 4332 overflow: hidden; 4333 } 4334 4335 @-moz-document url-prefix() { 4336 :host{ 4337 --_menu-bg: rgb(20 20 30); 4338 } 4339 } 4340 4341 :host([role="menu"]) { 4342 4343 justify-content: end; 4344 } 4345 4346 slot:not([name]) { 4347 justify-content: var(--media-settings-menu-justify-content); 4348 flex-direction: var(--media-settings-menu-flex-direction, column); 4349 overflow: visible; 4350 } 4351 4352 #container.has-expanded { 4353 --media-settings-menu-item-opacity: 0; 4354 } 4355 </style> 4356 `},pK.customElements.get("media-settings-menu")||pK.customElements.define("media-settings-menu",fq);class fF extends f${}fF.shadowRootOptions={mode:"open"},fF.getTemplateHTML=function(e){return` 4357 ${f$.getTemplateHTML.call(this,e)} 4358 <style> 4359 slot:not([name="submenu"]) { 4360 opacity: var(--media-settings-menu-item-opacity, var(--media-menu-item-opacity)); 4361 } 4362 4363 :host([aria-expanded="true"]:hover) { 4364 background: transparent; 4365 } 4366 </style> 4367 `},fF.getSuffixSlotInnerHTML=function(e){return` 4368 <svg aria-hidden="true" viewBox="0 0 20 24"> 4369 <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"/> 4370 </svg> 4371 `},pK.customElements.get("media-settings-menu-item")||pK.customElements.define("media-settings-menu-item",fF);class fG extends bQ{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?null==(e=p8(this))?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;null==(e=this.invokeTargetElement)||e.dispatchEvent(new fg({relatedTarget:this}))}}pK.customElements.get("media-chrome-menu-button")||pK.customElements.define("media-chrome-menu-button",fG);class fK extends fG{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",pP("settings"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:p0(this).querySelector("media-settings-menu")}}fK.getSlotTemplateHTML=function(){return` 4372 <style> 4373 :host([aria-expanded="true"]) slot[name=tooltip] { 4374 display: none; 4375 } 4376 </style> 4377 <slot name="icon"> 4378 <svg aria-hidden="true" viewBox="0 0 24 24"> 4379 <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"/> 4380 </svg> 4381 </slot> 4382 `},fK.getTooltipContentHTML=function(){return pP("Settings")},pK.customElements.get("media-settings-menu-button")||pK.customElements.define("media-settings-menu-button",fK);var fj=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},fY=(e,t,i)=>(fj(e,t,"read from private field"),i?i.call(e):t.get(e)),fQ=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},fz=(e,t,i,a)=>(fj(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),fZ=(e,t,i)=>(fj(e,t,"access private method"),i);class fX extends fM{constructor(){super(...arguments),fQ(this,wc),fQ(this,wm),fQ(this,wd,[]),fQ(this,wu,void 0)}static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_AUDIO_TRACK_LIST,pv.MEDIA_AUDIO_TRACK_ENABLED,pv.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===pv.MEDIA_AUDIO_TRACK_ENABLED&&t!==i)this.value=i;else if(e===pv.MEDIA_AUDIO_TRACK_LIST&&t!==i){var a;fz(this,wd,null==(a=null!=i?i:"")?void 0:a.split(/\s+/).map(pC)),fZ(this,wc,wh).call(this)}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",fZ(this,wm,wp))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",fZ(this,wm,wp))}get anchorElement(){var e;return"auto"!==this.anchor?super.anchorElement:null==(e=p0(this))?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return fY(this,wd)}set mediaAudioTrackList(e){fz(this,wd,e),fZ(this,wc,wh).call(this)}get mediaAudioTrackEnabled(){var e;return null!=(e=vn(this,pv.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){vs(this,pv.MEDIA_AUDIO_TRACK_ENABLED,e)}}wd=new WeakMap,wu=new WeakMap,wc=new WeakSet,wh=function(){if(fY(this,wu)===JSON.stringify(this.mediaAudioTrackList))return;fz(this,wu,JSON.stringify(this.mediaAudioTrackList));let e=this.mediaAudioTrackList;for(let t of(this.defaultSlot.textContent="",e.sort((e,t)=>
4382e.id.localeCompare(t.id,void 0,{numeric:!0})),e)){let e=fw({type:"radio",text:this.formatMenuItemText(t.label,t),value:`${t.id}`,checked:t.enabled});e.prepend(fT(this,"checked-indicator")),this.defaultSlot.append(e)}},wm=new WeakSet,wp=function(){if(null==this.value)return;let e=new pK.CustomEvent(pc.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},pK.customElements.get("media-audio-track-menu")||pK.customElements.define("media-audio-track-menu",fX);let fJ=`<svg aria-hidden="true" viewBox="0 0 24 24"> 4383 <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/> 4384 <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"/> 4385</svg>`,f0=e=>{let t=pP("Audio");e.setAttribute("aria-label",t)};class f1 extends fG{static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_AUDIO_TRACK_ENABLED,pv.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),f0(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===pv.MEDIA_LANG&&f0(this)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=p0(this))?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return null!=(e=vn(this,pv.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){vs(this,pv.MEDIA_AUDIO_TRACK_ENABLED,e)}}f1.getSlotTemplateHTML=function(){return` 4386 <style> 4387 :host([aria-expanded="true"]) slot[name=tooltip] { 4388 display: none; 4389 } 4390 </style> 4391 <slot name="icon">${fJ}</slot> 4392 `},f1.getTooltipContentHTML=function(){return pP("Audio")},pK.customElements.get("media-audio-track-menu-button")||pK.customElements.define("media-audio-track-menu-button",f1);var f2=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},f3=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},f4=(e,t,i)=>(f2(e,t,"access private method"),i);let f5=` 4393 <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator"> 4394 <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"/> 4395 </svg>`;class f9 extends fM{constructor(){super(...arguments),f3(this,wb),f3(this,wE),f3(this,wv,void 0)}static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_SUBTITLES_LIST,pv.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===pv.MEDIA_SUBTITLES_LIST&&t!==i?f4(this,wb,wg).call(this):e===pv.MEDIA_SUBTITLES_SHOWING&&t!==i&&(this.value=i||"",f4(this,wb,wg).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",f4(this,wE,wf))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",f4(this,wE,wf))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:p0(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return f8(this,pv.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){f7(this,pv.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return f8(this,pv.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){f7(this,pv.MEDIA_SUBTITLES_SHOWING,e)}}wv=new WeakMap,wb=new WeakSet,wg=function(){var e,t,i,a,r,n;let s=(f2(this,t=wv,"read from private field"),(i?i.call(this):t.get(this))!==JSON.stringify(this.mediaSubtitlesList)),o=this.value!==this.getAttribute(pv.MEDIA_SUBTITLES_SHOWING);if(!s&&!o)return;a=wv,r=JSON.stringify(this.mediaSubtitlesList),f2(this,a,"write to private field"),n?n.call(this,r):a.set(this,r),this.defaultSlot.textContent="";let l=!this.value,d=fw({type:"radio",text:this.formatMenuItemText(pP("Off")),value:"off",checked:l});for(let t of(d.prepend(fT(this,"checked-indicator")),this.defaultSlot.append(d),this.mediaSubtitlesList)){let i=fw({type:"radio",text:this.formatMenuItemText(t.label,t),value:vN(t),checked:this.value==vN(t)});i.prepend(fT(this,"checked-indicator")),"captions"===(null!=(e=t.kind)?e:"subs")&&i.append(fT(this,"captions-indicator")),this.defaultSlot.append(i)}},wE=new WeakSet,wf=function(){let e=this.mediaSubtitlesShowing,t=this.getAttribute(pv.MEDIA_SUBTITLES_SHOWING),i=this.value!==t;if((null==e?void 0:e.length)&&i&&this.dispatchEvent(new pK.CustomEvent(pc.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:e})),!this.value||!i)return;let a=new pK.CustomEvent(pc.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)},f9.getTemplateHTML=function(e){return` 4396 ${fM.getTemplateHTML(e)} 4397 <slot name="captions-indicator" hidden>${f5}</slot> 4398 `};let f8=(e,t)=>
4398{let i=e.getAttribute(t);return i?vD(i):[]},f7=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=vO(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};pK.customElements.get("media-captions-menu")||pK.customElements.define("media-captions-menu",f9);let f6=`<svg aria-hidden="true" viewBox="0 0 26 24"> 4399 <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"/> 4400</svg>`,ye=`<svg aria-hidden="true" viewBox="0 0 26 24"> 4401 <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"/> 4402</svg>`,yt=e=>{e.setAttribute("data-captions-enabled",vB(e).toString())},yi=e=>{e.setAttribute("aria-label",pP("closed captions"))};class ya extends fG{static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_SUBTITLES_LIST,pv.MEDIA_SUBTITLES_SHOWING,pv.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),yi(this),yt(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===pv.MEDIA_SUBTITLES_SHOWING?yt(this):e===pv.MEDIA_LANG&&yi(this)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=p0(this))?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return yr(this,pv.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){yn(this,pv.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return yr(this,pv.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){yn(this,pv.MEDIA_SUBTITLES_SHOWING,e)}}ya.getSlotTemplateHTML=function(){return` 4403 <style> 4404 :host([data-captions-enabled="true"]) slot[name=off] { 4405 display: none !important; 4406 } 4407 4408 4409 :host(:not([data-captions-enabled="true"])) slot[name=on] { 4410 display: none !important; 4411 } 4412 4413 :host([aria-expanded="true"]) slot[name=tooltip] { 4414 display: none; 4415 } 4416 </style> 4417 4418 <slot name="icon"> 4419 <slot name="on">${f6}</slot> 4420 <slot name="off">${ye}</slot> 4421 </slot> 4422 `},ya.getTooltipContentHTML=function(){return pP("Captions")};let yr=(e,t)=>
4422{let i=e.getAttribute(t);return i?vD(i):[]},yn=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=vO(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};pK.customElements.get("media-captions-menu-button")||pK.customElements.define("media-captions-menu-button",ya);var ys=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},yo=(e,t,i)=>(ys(e,t,"read from private field"),i?i.call(e):t.get(e)),yl=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},yd=(e,t,i)=>(ys(e,t,"access private method"),i);let yu="rates";class yc extends fM{constructor(){super(),yl(this,w_),yl(this,wA),yl(this,wy,new vR(this,yu,{defaultValue:g9})),yd(this,w_,wk).call(this)}static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_PLAYBACK_RATE,yu]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===pv.MEDIA_PLAYBACK_RATE&&t!=i?(this.value=i,yd(this,w_,wk).call(this)):e===yu&&t!=i&&(yo(this,wy).value=i,yd(this,w_,wk).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",yd(this,wA,ww))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",yd(this,wA,ww))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:p0(this).querySelector("media-playback-rate-menu-button")}get rates(){return yo(this,wy)}set rates(e){e?Array.isArray(e)?yo(this,wy).value=e.join(" "):"string"==typeof e&&(yo(this,wy).value=e):yo(this,wy).value="",yd(this,w_,wk).call(this)}get mediaPlaybackRate(){return vt(this,pv.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){vi(this,pv.MEDIA_PLAYBACK_RATE,e)}}wy=new WeakMap,w_=new WeakSet,wk=function(){this.defaultSlot.textContent="";let e=this.mediaPlaybackRate,t=new Set(Array.from(yo(this,wy)).map(e=>Number(e)));for(let i of(e>0&&!t.has(e)&&t.add(e),Array.from(t).sort((e,t)=>e-t))){let t=fw({type:"radio",text:this.formatMenuItemText(`${i}x`,i),value:i.toString(),checked:e===i});t.prepend(fT(this,"checked-indicator")),this.defaultSlot.append(t)}},wA=new WeakSet,ww=function(){if(!this.value)return;let e=new pK.CustomEvent(pc.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},pK.customElements.get("media-playback-rate-menu")||pK.customElements.define("media-playback-rate-menu",yc);class yh extends fG{static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${null!=(e=this.mediaPlaybackRate)?e:1}x`}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===pv.MEDIA_PLAYBACK_RATE){let e=i?+i:NaN,t=Number.isNaN(e)?1:e;this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",pP("Playback rate {playbackRate}",{playbackRate:t}))}}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:p0(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return vt(this,pv.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){vi(this,pv.MEDIA_PLAYBACK_RATE,e)}}yh.getSlotTemplateHTML=function(e){return` 4423 <style> 4424 :host { 4425 min-width: 5ch; 4426 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 4427 } 4428 4429 :host([aria-expanded="true"]) slot { 4430 display: block; 4431 } 4432 4433 :host([aria-expanded="true"]) slot[name=tooltip] { 4434 display: none; 4435 } 4436 </style> 4437 <slot name="icon">${e.mediaplaybackrate||1}x</slot> 4438 `},yh.getTooltipContentHTML=function(){return pP("Playback rate")},pK.customElements.get("media-playback-rate-menu-button")||pK.customElements.define("media-playback-rate-menu-button",yh);var ym=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},yp=(e,t,i)=>(ym(e,t,"read from private field"),i?i.call(e):t.get(e)),yv=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},yb=(e,t,i,a)=>(ym(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),yg=(e,t,i)=>(ym(e,t,"access private method"),i);class yE extends fM{constructor(){super(...arguments),yv(this,wS),yv(this,wM),yv(this,wT,[]),yv(this,wI,{})}static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_RENDITION_LIST,pv.MEDIA_RENDITION_SELECTED,pv.MEDIA_RENDITION_UNAVAILABLE,pv.MEDIA_HEIGHT]}static formatMenuItemText(e,t){return super.formatMenuItemText(e,t)}static formatRendition(e,{showBitrate:t=!1}={}){let i=`${Math.min(e.width,e.height)}p`;if(t&&e.bitrate){let t=e.bitrate/1e6,a=`${t.toFixed(+(t<1))} Mbps`;return`${i} (${a})`}return this.formatMenuItemText(i,e)}static compareRendition(e,t){var i,a;return t.height===e.height?(null!=(i=t.bitrate)?i:0)-(null!=(a=e.bitrate)?a:0):t.height-e.height}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===pv.MEDIA_RENDITION_SELECTED&&t!==i)this.value=null!=i?i:"auto",yg(this,wS,wC).call(this);else if(e===pv.MEDIA_RENDITION_LIST&&t!==i)yb(this,wT,null==i?void 0:i.split(/\s+/).map(pI)),yg(this,wS,wC).call(this);else e===pv.MEDIA_HEIGHT&&t!==i&&yg(this,wS,wC).call(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",yg(this,wM,wL))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",yg(this,wM,wL))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:p0(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return yp(this,wT)}set mediaRenditionList(e){yb(this,wT,e),yg(this,wS,wC).call(this)}get mediaRenditionSelected(){return vn(this,pv.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){vs(this,pv.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return vt(this,pv.MEDIA_HEIGHT)}set mediaHeight(e){vi(this,pv.MEDIA_HEIGHT,e)}compareRendition(e,t){return this.constructor.compareRendition(e,t)}formatMenuItemText(e,t){return this.constructor.formatMenuItemText(e,t)}formatRendition(e,t){return this.constructor.formatRendition(e,t)}showRenditionBitrate(e){return this.mediaRenditionList.some(t=>t!==e&&t.height===e.height&&t.bitrate!==e.bitrate)}}wT=new WeakMap,wI=new WeakMap,wS=new WeakSet,wC=function(){if(yp(this,wI).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&yp(this,wI).mediaHeight===this.mediaHeight)return;yp(this,wI).mediaRenditionList=JSON.stringify(this.mediaRenditionList),yp(this,wI).mediaHeight=this.mediaHeight;let e=this.mediaRenditionList.sort(this.compareRendition.bind(this)),t=e.find(e=>e.id===this.mediaRenditionSelected);for(let i of e)i.selected=i===t;this.defaultSlot.textContent="";let i=!this.mediaRenditionSelected;for(let t of e){let e=fw({type:"radio",text:this.formatRendition(t,{showBitrate:this.showRenditionBitrate(t)}
4438),value:`${t.id}`,checked:t.selected&&!i});e.prepend(fT(this,"checked-indicator")),this.defaultSlot.append(e)}let a=t&&this.showRenditionBitrate(t),r=i?t?this.formatMenuItemText(`${pP("Auto")} \u2022 ${this.formatRendition(t,{showBitrate:a})}`,t):this.formatMenuItemText(`${pP("Auto")} (${this.mediaHeight}p)`):this.formatMenuItemText(pP("Auto")),n=fw({type:"radio",text:r,value:"auto",checked:i});n.dataset.description=r,n.prepend(fT(this,"checked-indicator")),this.defaultSlot.append(n)},wM=new WeakSet,wL=function(){if(null==this.value)return;let e=new pK.CustomEvent(pc.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},pK.customElements.get("media-rendition-menu")||pK.customElements.define("media-rendition-menu",yE);let yf=`<svg aria-hidden="true" viewBox="0 0 24 24"> 4439 <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" /> 4440</svg>`;class yy extends fG{static get observedAttributes(){return[...super.observedAttributes,pv.MEDIA_RENDITION_SELECTED,pv.MEDIA_RENDITION_UNAVAILABLE,pv.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",pP("quality"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:p0(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return vn(this,pv.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){vs(this,pv.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return vt(this,pv.MEDIA_HEIGHT)}set mediaHeight(e){vi(this,pv.MEDIA_HEIGHT,e)}}yy.getSlotTemplateHTML=function(){return` 4441 <style> 4442 :host([aria-expanded="true"]) slot[name=tooltip] { 4443 display: none; 4444 } 4445 </style> 4446 <slot name="icon">${yf}</slot> 4447 `},yy.getTooltipContentHTML=function(){return pP("Quality")},pK.customElements.get("media-rendition-menu-button")||pK.customElements.define("media-rendition-menu-button",yy);var y_=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},yk=(e,t,i)=>(y_(e,t,"read from private field"),i?i.call(e):t.get(e)),yA=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},yw=(e,t,i,a)=>(y_(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),yT=(e,t,i)=>(y_(e,t,"access private method"),i);class yI extends fM{constructor(){super(),yA(this,wx),yA(this,wP),yA(this,wO),yA(this,wH),yA(this,w$),yA(this,wR,!1),yA(this,wB,e=>{let t=e.target,i=(null==t?void 0:t.nodeName)==="VIDEO",a=yT(this,wH,wW).call(this,t);(i||a)&&(yk(this,wR)?yT(this,wP,wN).call(this):yT(this,w$,wV).call(this,e))}),yA(this,wq,e=>{let t=e.target,i=this.contains(t),a=2===e.button,r=(null==t?void 0:t.nodeName)==="VIDEO",n=yT(this,wH,wW).call(this,t);i||a&&(r||n)||yT(this,wP,wN).call(this)}),yA(this,wF,e=>{"Escape"===e.key&&yT(this,wP,wN).call(this)}),yA(this,wG,e=>{var t,i;let a=e.target;if(null==(t=a.matches)?void 0:t.call(a,'button[invoke="copy"]')){let e=null==(i=a.closest("media-context-menu-item"))?void 0:i.querySelector('input[slot="copy"]');e&&navigator.clipboard.writeText(e.value)}yT(this,wP,wN).call(this)}),this.setAttribute("noautohide",""),yT(this,wx,wD).call(this)}connectedCallback(){super.connectedCallback(),p0(this).addEventListener("contextmenu",yk(this,wB)),this.addEventListener("click",yk(this,wG))}disconnectedCallback(){super.disconnectedCallback(),p0(this).removeEventListener("contextmenu",yk(this,wB)),this.removeEventListener("click",yk(this,wG)),document.removeEventListener("mousedown",yk(this,wq)),document.removeEventListener("keydown",yk(this,wF))}}wR=new WeakMap,wx=new WeakSet,wD=function(){this.hidden=!yk(this,wR)},wP=new WeakSet,wN=function(){yw(this,wR,!1),yT(this,wx,wD).call(this)},wO=new WeakSet,wU=function(){document.querySelectorAll("media-context-menu").forEach(e=>{e!==this&&yT(e,wP,wN).call(e)})},wH=new WeakSet,wW=function(e){return!!e&&(!!e.hasAttribute("slot")&&"media"===e.getAttribute("slot")||!!(e.nodeName.includes("-")&&e.tagName.includes("-"))&&(e.hasAttribute("src")||e.hasAttribute("poster")||e.hasAttribute("preload")||e.hasAttribute("playsinline")))},wB=new WeakMap,w$=new WeakSet,wV=function(e){e.preventDefault(),yT(this,wO,wU).call(this),yw(this,wR,!0),this.style.position="fixed",this.style.left=`${e.clientX}px`,this.style.top=`${e.clientY}px`,yT(this,wx,wD).call(this),document.addEventListener("mousedown",yk(this,wq),{once:!0}),document.addEventListener("keydown",yk(this,wF),{once:!0})},wq=new WeakMap,wF=new WeakMap,wG=new WeakMap,yI.getTemplateHTML=function(e){return` 4448 ${fM.getTemplateHTML(e)} 4449 <style> 4450 :host { 4451 --_menu-bg: rgb(20 20 30 / .8); 4452 background: var(--media-settings-menu-background, 4453 var(--media-menu-background, 4454 var(--media-control-background, 4455 var(--media-secondary-color, var(--_menu-bg))))); 4456 min-width: var(--media-settings-menu-min-width, 170px); 4457 border-radius: 2px; 4458 overflow: hidden; 4459 } 4460 </style> 4461 `},pK.customElements.get("media-context-menu")||pK.customElements.define("media-context-menu",yI);class yS extends f${}yS.shadowRootOptions={mode:"open"},yS.getTemplateHTML=function(e){return` 4462 ${f$.getTemplateHTML.call(this,e)} 4463 <style> 4464 ::slotted(*) { 4465 color: var(--media-text-color, white); 4466 text-decoration: none; 4467 border: none; 4468 background: none; 4469 cursor: pointer; 4470 padding: 0; 4471 min-height: var(--media-control-height, 24px); 4472 } 4473 </style> 4474 `}
4474,pK.customElements.get("media-context-menu-item")||pK.customElements.define("media-context-menu-item",yS);var yC=e=>{throw TypeError(e)},yM=(e,t,i)=>t.has(e)||yC("Cannot "+i),yL=(e,t,i)=>(yM(e,t,"read from private field"),i?i.call(e):t.get(e)),yR=(e,t,i)=>t.has(e)?yC("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),yx=(e,t,i,a)=>(yM(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),yD=(e,t,i)=>(yM(e,t,"access private method"),i),yP=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("u"<typeof DocumentFragment){class e extends yP{}globalThis.DocumentFragment=e}var yN,yO,yU,yH,yW,yB,y$,yV,yq,yF,yG,yK,yj,yY,yQ,yz,yZ,yX,yJ,y0,y1,y2,y3,y4,y5,y9,y8,y7,y6,_e,_t,_i,_a,_r,_n,_s,_o,_l,_d,_u,_c,_h,_m,_p,_v,_b,_g,_E,_f,_y,__,_k,_A,_w,_T,_I,_S,_C,_M,_L,_R,_x,_D,_P,_N,_O,_U,_H,_W,_B,_$,_V,_q,_F,_G,_K,_j,_Y,_Q,_z,_Z,_X,_J,_0,_1,_2,_3,_4,_5,_9,_8,_7,_6,ke,kt,ki,ka,kr,kn,ks,ko,kl,kd,ku,kc,kh,km,kp,kv,kb,kg,kE,kf,ky,k_,kk,kA,kw,kT,kI,kS,kC,kM,kL,kR,kx,kD,kP,kN,kO,kU,kH,kW,kB,k$,kV,kq,kF,kG,kK,kj,kY,kQ,kz,kZ,kX,kJ,k0,k1,k2,k3,k4,k5,k9,k8,k7,k6,Ae,At,Ai,Aa,Ar,An,As,Ao,Al,Ad,Au,Ac,Ah,Am,Ap,Av,Ab,Ag,AE,Af,Ay,A_,Ak,AA,Aw,AT,AI,AS,AC,AM,AL,AR,Ax,AD,AP,AN,AO,AU,AH,AW,AB,A$,AV,Aq,AF,AG,AK,Aj,AY,AQ,Az,AZ,AX,AJ,A0,A1,A2,A3,A4,A5,A9,A8,A7,A6,we,wt,wi,wa,wr,wn,ws,wo,wl,wd,wu,wc,wh,wm,wp,wv,wb,wg,wE,wf,wy,w_,wk,wA,ww,wT,wI,wS,wC,wM,wL,wR,wx,wD,wP,wN,wO,wU,wH,wW,wB,w$,wV,wq,wF,wG,wK,wj=class extends yP{},wY=class{constructor(e,t={}){yR(this,wK),yx(this,wK,null==t?void 0:t.detail)}get detail(){return yL(this,wK)}initCustomEvent(){}};wK=new WeakMap;var wQ={document:{createElement:function(e,t){return new wj}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(wj)},CustomEvent:wY,EventTarget:yP,HTMLElement:wj,HTMLVideoElement:class extends yP{}},wz="u"<typeof window||void 0===globalThis.customElements,wZ=wz?wQ:globalThis,wX=wz?wQ.document:globalThis.document;function wJ(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function w0(e){return e.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function w1(e){if(null==e)return;let t=+e;return Number.isNaN(t)?void 0:t}function w2(e){let t=(function(e){let t={};for(let i in e)null!=e[i]&&(t[i]=e[i]);return new URLSearchParams(t)})(e).toString();return t?"?"+t:""}var w3,w4,w5,w9=(e,t)=>!!e&&!!t&&(!!e.contains(t)||w9(e,t.getRootNode().host)),w8="mux.com",w7=(()=>{try{return"3.11.7"}catch{}return"UNKNOWN"})(),w6=e=>{if(e){if([cI,cT].includes(e))return e;if(null!=e&&e.includes("live"))return cI}},Te={crossorigin:"crossOrigin",playsinline:"playsInline"},Tt=class{constructor(e,t){yR(this,w3),yR(this,w4),yR(this,w5,[]),yx(this,w3,e),yx(this,w4,t)}[Symbol.iterator](){return yL(this,w5).values()}get length(){return yL(this,w5).length}get value(){var e;return null!=(e=yL(this,w5).join(" "))?e:""}set value(e){var t;e!==this.value&&(yx(this,w5,[]),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return yL(this,w5)[e]}values(){return yL(this,w5).values()}keys(){return yL(this,w5).keys()}forEach(e){yL(this,w5).forEach(e)}add(...e){var t,i;e.forEach(e=>{this.contains(e)||yL(this,w5).push(e)}),(""!==this.value||null!=(t=yL(this,w3))&&t.hasAttribute(`${yL(this,w4)}`))&&null!=(i=yL(this,w3))&&i.setAttribute(`${yL(this,w4)}`,`${this.value}`)}remove(...e){var t;e.forEach(e=>{yL(this,w5).splice(yL(this,w5).indexOf(e),1)}),null==(t=yL(this,w3))||t.setAttribute(`${yL(this,w4)}`,`${this.value}`)}contains(e){return yL(this,w5).includes(e)}toggle(e,t){return void 0!==t?t?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,t){this.remove(e),this.add(t)}};w3=new WeakMap,w4=new WeakMap,w5=new WeakMap;var Ti=`[mux-player ${w7}]`;function Ta(...e){console.warn(Ti,...e)}function Tr(...e){console.error(Ti,...e)}function Tn(e){var t;let i=null!=(t=e.message)?t:"";e.context&&(i+=` ${e.context}`),e.file&&(i+=` ${cq("Read more: ")} 4475https://github.com/muxinc/elements/blob/main/errors/${e.file}`),Ta(i)}var Ts={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},To={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},Tl=Object.freeze({length:0,start(e){let t=e>>>0;
4475if(t>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(e){let t=e>>>0;if(t>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${t}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),Td=[...Object.values(Ts).filter(e=>Ts.PLAYSINLINE!==e),...Object.values(To)];function Tu(e,t){return e.media?e.media.getAttribute(t):e.getAttribute(t)}var Tc=class extends wZ.HTMLElement{static get observedAttributes(){return Td}constructor(){super()}attributeChangedCallback(e,t,i){var a,r;switch(e){case To.MUTED:this.media&&(this.media.muted=null!=i,this.media.defaultMuted=null!=i);return;case To.VOLUME:{let e=null!=(a=w1(i))?a:1;this.media&&(this.media.volume=e);return}case To.PLAYBACKRATE:{let e=null!=(r=w1(i))?r:1;this.media&&(this.media.playbackRate=e,this.media.defaultPlaybackRate=e);return}}}play(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.play())?t:Promise.reject()}pause(){var e;null==(e=this.media)||e.pause()}load(){var e;null==(e=this.media)||e.load()}get media(){var e;return null==(e=this.shadowRoot)?void 0:e.querySelector("mux-video")}get audioTracks(){return this.media.audioTracks}get videoTracks(){return this.media.videoTracks}get audioRenditions(){return this.media.audioRenditions}get videoRenditions(){return this.media.videoRenditions}get paused(){var e,t;return null==(t=null==(e=this.media)?void 0:e.paused)||t}get duration(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.duration)?t:NaN}get ended(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.ended)&&t}get buffered(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.buffered)?t:Tl}get seekable(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.seekable)?t:Tl}get readyState(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.readyState)?t:0}get videoWidth(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.videoWidth)?t:0}get videoHeight(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.videoHeight)?t:0}get currentSrc(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.currentSrc)?t:""}get currentTime(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.currentTime)?t:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.volume)?t:1}set volume(e){this.media&&(this.media.volume=Number(e))}get playbackRate(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.playbackRate)?t:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get defaultPlaybackRate(){var e;return null!=(e=w1(this.getAttribute(To.PLAYBACKRATE)))?e:1}set defaultPlaybackRate(e){null!=e?this.setAttribute(To.PLAYBACKRATE,`${e}`):this.removeAttribute(To.PLAYBACKRATE)}get crossOrigin(){return Tu(this,Ts.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(Ts.CROSSORIGIN,`${e}`)}get autoplay(){return null!=Tu(this,Ts.AUTOPLAY)}set autoplay(e){e?this.setAttribute(Ts.AUTOPLAY,"string"==typeof e?e:""):this.removeAttribute(Ts.AUTOPLAY)}get loop(){return null!=Tu(this,Ts.LOOP)}set loop(e){e?this.setAttribute(Ts.LOOP,""):this.removeAttribute(Ts.LOOP)}get muted(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.muted)&&t}set muted(e){this.media&&(this.media.muted=!!e)}get defaultMuted(){return null!=Tu(this,Ts.MUTED)}set defaultMuted(e){e?this.setAttribute(Ts.MUTED,""):this.removeAttribute(Ts.MUTED)}get playsInline(){return null!=Tu(this,Ts.PLAYSINLINE)}set playsInline(e){Tr("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(Ts.PRELOAD,e):this.removeAttribute(Ts.PRELOAD)}},Th=`:host { 4476 --media-control-display: var(--controls); 4477 --media-loading-indicator-display: var(--loading-indicator); 4478 --media-dialog-display: var(--dialog); 4479 --media-play-button-display: var(--play-button); 4480 --media-live-button-display: var(--live-button); 4481 --media-seek-backward-button-display: var(--seek-backward-button); 4482 --media-seek-forward-button-display: var(--seek-forward-button); 4483 --media-mute-button-display: var(--mute-button); 4484 --media-captions-button-display: var(--captions-button); 4485 --media-captions-menu-button-display: var(--captions-menu-button, var(--media-captions-button-display)); 4486 --media-rendition-menu-button-display: var(--rendition-menu-button); 4487 --media-audio-track-menu-button-display: var(--audio-track-menu-button); 4488 --media-airplay-button-display: var(--airplay-button); 4489 --media-pip-button-display: var(--pip-button); 4490 --media-fullscreen-button-display: var(--fullscreen-button); 4491 --media-cast-button-display: var(--cast-button, var(--_cast-button-drm-display)); 4492 --media-playback-rate-button-display: var(--playback-rate-button); 4493 --media-playback-rate-menu-button-display: var(--playback-rate-menu-button); 4494 --media-volume-range-display: var(--volume-range); 4495 --media-time-range-display: var(--time-range); 4496 --media-time-display-display: var(--time-display); 4497 --media-duration-display-display: var(--duration-display); 4498 --media-title-display-display: var(--title-display); 4499 4500 display: inline-block; 4501 line-height: 0; 4502 width: 100%; 4503} 4504 4505a { 4506 color: #fff; 4507 font-size: 0.9em; 4508 text-decoration: underline; 4509} 4510 4511media-theme { 4512 display: inline-block; 4513 line-height: 0; 4514 width: 100%; 4515 height: 100%; 4516 direction: ltr; 4517} 4518 4519media-poster-image { 4520 display: inline-block; 4521 line-height: 0; 4522 width: 100%; 4523 height: 100%; 4524} 4525 4526media-poster-image:not([src]):not([placeholdersrc]) { 4527 display: none; 4528} 4529 4530::part(top), 4531[part~='top'] { 4532 --media-control-display: var(--controls, var(--top-controls)); 4533 --media-play-button-display: var(--play-button, var(--top-play-button)); 4534 --media-live-button-display: var(--live-button, var(--top-live-button)); 4535 --media-seek-backward-button-display: var(--seek-backward-button, var(--top-seek-backward-button)); 4536 --media-seek-forward-button-display: var(--seek-forward-button, var(--top-seek-forward-button)); 4537 --media-mute-button-display: var(--mute-button, var(--top-mute-button)); 4538 --media-captions-button-display: var(--captions-button, var(--top-captions-button)); 4539 --media-captions-menu-button-display: var( 4540 --captions-menu-button, 4541 var(--media-captions-button-display, var(--top-captions-menu-button)) 4542 ); 4543 --media-rendition-menu-button-display: var(--rendition-menu-button, var(--top-rendition-menu-button)); 4544 --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--top-audio-track-menu-button)); 4545 --media-airplay-button-display: var(--airplay-button, var(--top-airplay-button)); 4546 --media-pip-button-display: var(--pip-button, var(--top-pip-button)); 4547 --media-fullscreen-button-display: var(--fullscreen-button, var(--top-fullscreen-button)); 4548 --media-cast-button-display: var(--cast-button, var(--top-cast-button, var(--_cast-button-drm-display))); 4549 --media-playback-rate-button-display: var(--playback-rate-button, var(--top-playback-rate-button)); 4550 --media-playback-rate-menu-button-display: var( 4551 --captions-menu-button, 4552 var(--media-playback-rate-button-display, var(--top-playback-rate-menu-button)) 4553 ); 4554 --media-volume-range-display: var(--volume-range, var(--top-volume-range)); 4555 --media-time-range-display: var(--time-range, var(--top-time-range)); 4556 --media-time-display-display: var(--time-display, var(--top-time-display)); 4557 --media-duration-display-display: var(--duration-display, var(--top-duration-display)); 4558 --media-title-display-display: var(--title-display, var(--top-title-display)); 4559} 4560 4561::part(center), 4562[part~='center'] {
4563 --media-control-display: var(--controls, var(--center-controls)); 4564 --media-play-button-display: var(--play-button, var(--center-play-button)); 4565 --media-live-button-display: var(--live-button, var(--center-live-button)); 4566 --media-seek-backward-button-display: var(--seek-backward-button, var(--center-seek-backward-button)); 4567 --media-seek-forward-button-display: var(--seek-forward-button, var(--center-seek-forward-button)); 4568 --media-mute-button-display: var(--mute-button, var(--center-mute-button)); 4569 --media-captions-button-display: var(--captions-button, var(--center-captions-button)); 4570 --media-captions-menu-button-display: var( 4571 --captions-menu-button, 4572 var(--media-captions-button-display, var(--center-captions-menu-button)) 4573 ); 4574 --media-rendition-menu-button-display: var(--rendition-menu-button, var(--center-rendition-menu-button)); 4575 --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--center-audio-track-menu-button)); 4576 --media-airplay-button-display: var(--airplay-button, var(--center-airplay-button)); 4577 --media-pip-button-display: var(--pip-button, var(--center-pip-button)); 4578 --media-fullscreen-button-display: var(--fullscreen-button, var(--center-fullscreen-button)); 4579 --media-cast-button-display: var(--cast-button, var(--center-cast-button, var(--_cast-button-drm-display))); 4580 --media-playback-rate-button-display: var(--playback-rate-button, var(--center-playback-rate-button)); 4581 --media-playback-rate-menu-button-display: var( 4582 --playback-rate-menu-button, 4583 var(--media-playback-rate-button-display, var(--center-playback-rate-menu-button)) 4584 ); 4585 --media-volume-range-display: var(--volume-range, var(--center-volume-range)); 4586 --media-time-range-display: var(--time-range, var(--center-time-range)); 4587 --media-time-display-display: var(--time-display, var(--center-time-display)); 4588 --media-duration-display-display: var(--duration-display, var(--center-duration-display)); 4589} 4590 4591::part(bottom), 4592[part~='bottom'] { 4593 --media-control-display: var(--controls, var(--bottom-controls)); 4594 --media-play-button-display: var(--play-button, var(--bottom-play-button)); 4595 --media-live-button-display: var(--live-button, var(--bottom-live-button)); 4596 --media-seek-backward-button-display: var(--seek-backward-button, var(--bottom-seek-backward-button)); 4597 --media-seek-forward-button-display: var(--seek-forward-button, var(--bottom-seek-forward-button)); 4598 --media-mute-button-display: var(--mute-button, var(--bottom-mute-button)); 4599 --media-captions-button-display: var(--captions-button, var(--bottom-captions-button)); 4600 --media-captions-menu-button-display: var( 4601 --captions-menu-button, 4602 var(--media-captions-button-display, var(--bottom-captions-menu-button)) 4603 ); 4604 --media-rendition-menu-button-display: var(--rendition-menu-button, var(--bottom-rendition-menu-button)); 4605 --media-audio-track-menu-button-display: var(--audio-track-menu-button, var(--bottom-audio-track-menu-button)); 4606 --media-airplay-button-display: var(--airplay-button, var(--bottom-airplay-button)); 4607 --media-pip-button-display: var(--pip-button, var(--bottom-pip-button)); 4608 --media-fullscreen-button-display: var(--fullscreen-button, var(--bottom-fullscreen-button)); 4609 --media-cast-button-display: var(--cast-button, var(--bottom-cast-button, var(--_cast-button-drm-display))); 4610 --media-playback-rate-button-display: var(--playback-rate-button, var(--bottom-playback-rate-button)); 4611 --media-playback-rate-menu-button-display: var( 4612 --playback-rate-menu-button, 4613 var(--media-playback-rate-button-display, var(--bottom-playback-rate-menu-button)) 4614 ); 4615 --media-volume-range-display: var(--volume-range, var(--bottom-volume-range)); 4616 --media-time-range-display: var(--time-range, var(--bottom-time-range)); 4617 --media-time-display-display: var(--time-display, var(--bottom-time-display)); 4618 --media-duration-display-display: var(--duration-display, var(--bottom-duration-display)); 4619 --media-title-display-display: var(--title-display, var(--bottom-title-display)); 4620} 4621 4622:host([no-tooltips]) { 4623 --media-tooltip-display: none; 4624} 4625`,Tm=new WeakMap,Tp=class e{constructor(e,t){this.element=e,this.type=t,this.element.addEventListener(this.type,this);let i=Tm.get(this.element);i&&i.set(this.type,this)}set(e){if("function"==typeof e)this.handleEvent=e.bind(this.element);else if("object"==typeof e&&"function"==typeof e.handleEvent)this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let e=Tm.get(this.element);
4625e&&e.delete(this.type)}}static for(t){Tm.has(t.element)||Tm.set(t.element,new Map);let i=t.attributeName.slice(2),a=Tm.get(t.element);return a&&a.has(i)?a.get(i):new e(t.element,i)}},Tv=new Map,Tb=new WeakMap,Tg=new WeakMap,TE=class{constructor(e,t,i){this.strings=e,this.values=t,this.processor=i,this.stringsKey=this.strings.join("\x01")}get template(){if(Tv.has(this.stringsKey))return Tv.get(this.stringsKey);{let e=wX.createElement("template"),t=this.strings.length-1;return e.innerHTML=this.strings.reduce((e,i,a)=>e+i+(a<t?`{{ ${a} }}`:""),""),Tv.set(this.stringsKey,e),e}}renderInto(e){var t;let i=this.template;if(Tb.get(e)!==i){Tb.set(e,i);let t=new EQ(i,this.values,this.processor);Tg.set(e,t),e instanceof E3?e.replace(...t.children):e.appendChild(t);return}let a=Tg.get(e);null==(t=null==a?void 0:a.update)||t.call(a,this.values)}},Tf={processCallback(e,t,i){var a;if(i)for(let[e,r]of t)e in i&&function(e,t){(function(e,t){if(e instanceof E2&&t instanceof Element){let i=e.element;return i[e.attributeName]!==t&&(e.element.removeAttributeNS(e.attributeNamespace,e.attributeName),i[e.attributeName]=t),!0}return!1})(e,t)||function(e,t){if("boolean"==typeof t&&e instanceof E2){let i=e.attributeNamespace;return t!==e.element.hasAttributeNS(i,e.attributeName)&&(e.booleanValue=t),!0}return!1}(e,t)||e instanceof E2&&e.attributeName.startsWith("on")&&(Tp.for(e).set(t),e.element.removeAttributeNS(e.attributeNamespace,e.attributeName),1)||!1===t&&e instanceof E3&&(e.replace(""),1)||t instanceof TE&&e instanceof E3&&(t.renderInto(e),1)||t instanceof DocumentFragment&&e instanceof E3&&(t.childNodes.length&&e.replace(...t.childNodes),1)||function(e,t){if(e instanceof E2){let i=e.attributeNamespace,a=e.element.getAttributeNS(i,e.attributeName);return String(t)!==a&&(e.value=String(t))}e.value=String(t)}(e,t)}(r,null!=(a=i[e])?a:"")}};function Ty(e,...t){return new TE(e,t,Tf)}var T_=Object.values({TOP:"top",CENTER:"center",BOTTOM:"bottom",LAYER:"layer",MEDIA_LAYER:"media-layer",POSTER_LAYER:"poster-layer",VERTICAL_LAYER:"vertical-layer",CENTERED_LAYER:"centered-layer",GESTURE_LAYER:"gesture-layer",CONTROLLER_LAYER:"controller",BUTTON:"button",RANGE:"range",THUMB:"thumb",DISPLAY:"display",CONTROL_BAR:"control-bar",MENU_BUTTON:"menu-button",MENU:"menu",MENU_ITEM:"menu-item",OPTION:"option",POSTER:"poster",LIVE:"live",PLAY:"play",PRE_PLAY:"pre-play",SEEK_BACKWARD:"seek-backward",SEEK_FORWARD:"seek-forward",MUTE:"mute",CAPTIONS:"captions",AIRPLAY:"airplay",PIP:"pip",FULLSCREEN:"fullscreen",CAST:"cast",PLAYBACK_RATE:"playback-rate",VOLUME:"volume",TIME:"time",TITLE:"title",AUDIO_TRACK:"audio-track",RENDITION:"rendition"}).join(", "),Tk=e=>e.charAt(0).toUpperCase()+e.slice(1),TA=(e,t)=>{let i=(e=>{if(e.muxCode){if(2403210===e.muxCode)return"403-expired-token.md";if(2412202===e.muxCode)return"403-malformatted-token.md";if([2403222,2403221].includes(e.muxCode))return"403-incorrect-aud-value.md";if(2403232===e.muxCode)return"403-playback-id-mismatch.md";if(2403201===e.muxCode)return"missing-signed-tokens.md";if(2404e3===e.muxCode)return"404-not-found.md";if(2412e3===e.muxCode)return"412-not-playable.md"}if(e.code){if(e.code===ck.MEDIA_ERR_NETWORK)return"";if(e.code===ck.MEDIA_ERR_DECODE)return"media-decode-error.md";if(e.code===ck.MEDIA_ERR_SRC_NOT_SUPPORTED)return"media-src-not-supported.md"}return""})(e);return{message:e.message,context:e.context,file:i}},Tw
vendor: 8,830 bytes, lines 4625-4925
4625=`<template id="media-theme-gerwig"> 4626 <style> 4627 @keyframes pre-play-hide { 4628 0% { 4629 transform: scale(1); 4630 opacity: 1; 4631 } 4632 4633 30% { 4634 transform: scale(0.7); 4635 } 4636 4637 100% { 4638 transform: scale(1.5); 4639 opacity: 0; 4640 } 4641 } 4642 4643 :host { 4644 --_primary-color: var(--media-primary-color, #fff); 4645 --_secondary-color: var(--media-secondary-color, transparent); 4646 --_accent-color: var(--media-accent-color, #fa50b5); 4647 --_text-color: var(--media-text-color, #000); 4648 4649 --media-icon-color: var(--_primary-color); 4650 --media-control-background: var(--_secondary-color); 4651 --media-control-hover-background: var(--_accent-color); 4652 --media-time-buffered-color: rgba(255, 255, 255, 0.4); 4653 --media-preview-time-text-shadow: none; 4654 --media-control-height: 14px; 4655 --media-control-padding: 6px; 4656 --media-tooltip-container-margin: 6px; 4657 --media-tooltip-distance: 18px; 4658 4659 color: var(--_primary-color); 4660 display: inline-block; 4661 width: 100%; 4662 height: 100%; 4663 } 4664 4665 :host([audio]) { 4666 --_secondary-color: var(--media-secondary-color, black); 4667 --media-preview-time-text-shadow: none; 4668 } 4669 4670 :host([audio]) ::slotted([slot='media']) { 4671 height: 0px; 4672 } 4673 4674 :host([audio]) media-loading-indicator { 4675 display: none; 4676 } 4677 4678 :host([audio]) media-controller { 4679 background: transparent; 4680 } 4681 4682 :host([audio]) media-controller::part(vertical-layer) { 4683 background: transparent; 4684 } 4685 4686 :host([audio]) media-control-bar { 4687 width: 100%; 4688 background-color: var(--media-control-background); 4689 } 4690 4691 /* 4692 * 0.433s is the transition duration for VTT Regions. 4693 * Borrowed here, so the captions don't move too fast. 4694 */ 4695 media-controller { 4696 --media-webkit-text-track-transform: translateY(0) scale(0.98); 4697 --media-webkit-text-track-transition: transform 0.433s ease-out 0.3s; 4698 } 4699 media-controller:is([mediapaused], :not([userinactive])) { 4700 --media-webkit-text-track-transform: translateY(-50px) scale(0.98); 4701 --media-webkit-text-track-transition: transform 0.15s ease; 4702 } 4703 4704 /* 4705 * CSS specific to iOS devices. 4706 * See: https://stackoverflow.com/questions/30102792/css-media-query-to-target-only-ios-devices/60220757#60220757 4707 */ 4708 @supports (-webkit-touch-callout: none) { 4709 /* Disable subtitle adjusting for iOS Safari */ 4710 media-controller[mediaisfullscreen] { 4711 --media-webkit-text-track-transform: unset; 4712 --media-webkit-text-track-transition: unset; 4713 } 4714 } 4715 4716 media-time-range { 4717 --media-box-padding-left: 6px; 4718 --media-box-padding-right: 6px; 4719 --media-range-bar-color: var(--_accent-color); 4720 --media-time-range-buffered-color: var(--_primary-color); 4721 --media-range-track-color: transparent; 4722 --media-range-track-background: rgba(255, 255, 255, 0.4); 4723 --media-range-thumb-background: radial-gradient( 4724 circle, 4725 #000 0%, 4726 #000 25%, 4727 var(--_accent-color) 25%, 4728 var(--_accent-color) 4729 ); 4730 --media-range-thumb-width: 12px; 4731 --media-range-thumb-height: 12px; 4732 --media-range-thumb-transform: scale(0); 4733 --media-range-thumb-transition: transform 0.3s; 4734 --media-range-thumb-opacity: 1; 4735 --media-preview-background: var(--_primary-color); 4736 --media-box-arrow-background: var(--_primary-color); 4737 --media-preview-thumbnail-border: 5px solid var(--_primary-color); 4738 --media-preview-border-radius: 5px; 4739 --media-text-color: var(--_text-color); 4740 --media-control-hover-background: transparent; 4741 --media-preview-chapter-text-shadow: none; 4742 color: var(--_accent-color); 4743 padding: 0 6px; 4744 } 4745 4746 :host([audio]) media-time-range { 4747 --media-preview-time-padding: 1.5px 6px; 4748 --media-preview-box-margin: 0 0 -5px; 4749 } 4750 4751 media-time-range:hover { 4752 --media-range-thumb-transform: scale(1); 4753 } 4754 4755 media-preview-thumbnail { 4756 border-bottom-width: 0; 4757 } 4758 4759 [part~='menu'] { 4760 border-radius: 2px; 4761 border: 1px solid rgba(0, 0, 0, 0.1); 4762 bottom: 50px; 4763 padding: 2.5px 10px; 4764 } 4765 4766 [part~='menu']::part(indicator) { 4767 fill: var(--_accent-color); 4768 } 4769 4770 [part~='menu']::part(menu-item) { 4771 box-sizing: border-box; 4772 display: flex; 4773 align-items: center; 4774 padding: 6px 10px; 4775 min-height: 34px; 4776 } 4777 4778 [part~='menu']::part(checked) { 4779 font-weight: 700; 4780 } 4781 4782 media-captions-menu, 4783 media-rendition-menu, 4784 media-audio-track-menu, 4785 media-playback-rate-menu { 4786 position: absolute; /* ensure they don't take up space in DOM on load */ 4787 --media-menu-background: var(--_primary-color); 4788 --media-menu-item-checked-background: transparent; 4789 --media-text-color: var(--_text-color); 4790 --media-menu-item-hover-background: transparent; 4791 --media-menu-item-hover-outline: var(--_accent-color) solid 1px; 4792 } 4793 4794 media-rendition-menu { 4795 min-width: 140px; 4796 } 4797 4798 /* The icon is a circle so make it 16px high instead of 14px for more balance. */ 4799 media-audio-track-menu-button { 4800 --media-control-padding: 5px; 4801 --media-control-height: 16px; 4802 } 4803 4804 media-playback-rate-menu-button { 4805 --media-control-padding: 6px 3px; 4806 min-width: 4.4ch; 4807 } 4808 4809 media-playback-rate-menu { 4810 --media-menu-flex-direction: row; 4811 --media-menu-item-checked-background: var(--_accent-color); 4812 --media-menu-item-checked-indicator-display: none; 4813 margin-right: 6px; 4814 padding: 0; 4815 --media-menu-gap: 0.25em; 4816 } 4817 4818 media-playback-rate-menu[part~='menu']::part(menu-item) { 4819 padding: 6px 6px 6px 8px; 4820 } 4821 4822 media-playback-rate-menu[part~='menu']::part(checked) { 4823 color: #fff; 4824 } 4825 4826 :host(:not([audio])) media-time-range { 4827 /* Adding px is required here for calc() */ 4828 --media-range-padding: 0px; 4829 background: transparent; 4830 z-index: 10; 4831 height: 10px; 4832 bottom: -3px; 4833 width: 100%; 4834 } 4835 4836 media-control-bar :is([role='button'], [role='switch'], button) { 4837 line-height: 0; 4838 } 4839 4840 media-control-bar :is([part*='button'], [part*='range'], [part*='display']) { 4841 border-radius: 3px; 4842 } 4843 4844 .spacer { 4845 flex-grow: 1; 4846 background-color: var(--media-control-background, rgba(20, 20, 30, 0.7)); 4847 } 4848 4849 media-control-bar[slot~='top-chrome'] { 4850 min-height: 42px; 4851 pointer-events: none; 4852 } 4853 4854 media-control-bar { 4855 --gradient-steps: 4856 hsl(0 0% 0% / 0) 0%, hsl(0 0% 0% / 0.013) 8.1%, hsl(0 0% 0% / 0.049) 15.5%, hsl(0 0% 0% / 0.104) 22.5%, 4857 hsl(0 0% 0% / 0.175) 29%, hsl(0 0% 0% / 0.259) 35.3%, hsl(0 0% 0% / 0.352) 41.2%, hsl(0 0% 0% / 0.45) 47.1%, 4858 hsl(0 0% 0% / 0.55) 52.9%, hsl(0 0% 0% / 0.648) 58.8%, hsl(0 0% 0% / 0.741) 64.7%, hsl(0 0% 0% / 0.825) 71%, 4859 hsl(0 0% 0% / 0.896) 77.5%, hsl(0 0% 0% / 0.951) 84.5%, hsl(0 0% 0% / 0.987) 91.9%, hsl(0 0% 0%) 100%; 4860 } 4861 4862 :host([title]) media-control-bar[slot='top-chrome']::before, 4863 :host([videotitle]) media-control-bar[slot='top-chrome']::before { 4864 content: ''; 4865 position: absolute; 4866 width: 100%; 4867 padding-bottom: min(100px, 25%); 4868 background: linear-gradient(to top, var(--gradient-steps)); 4869 opacity: 0.8; 4870 pointer-events: none; 4871 } 4872 4873 :host(:not([audio])) media-control-bar[part~='bottom']::before { 4874 content: ''; 4875 position: absolute; 4876 width: 100%; 4877 bottom: 0; 4878 left: 0; 4879 padding-bottom: min(100px, 25%); 4880 background: linear-gradient(to bottom, var(--gradient-steps)); 4881 opacity: 0.8; 4882 z-index: 1; 4883 pointer-events: none; 4884 } 4885 4886 media-control-bar[part~='bottom'] > * { 4887 z-index: 20; 4888 } 4889 4890 media-control-bar[part~='bottom'] { 4891 padding: 6px 6px; 4892 } 4893 4894 media-control-bar[slot~='top-chrome'] > * { 4895 --media-control-background: transparent; 4896 --media-control-hover-background: transparent; 4897 position: relative; 4898 } 4899 4900 media-controller::part(vertical-layer) { 4901 transition: background-color 1s; 4902 } 4903 4904 media-controller:is([mediapaused], :not([userinactive]))::part(vertical-layer) { 4905 background-color: var(--controls-backdrop-color, var(--controls, transparent)); 4906 transition: background-color 0.25s; 4907 } 4908 4909 .center-controls { 4910 --media-button-icon-width: 100%; 4911 --media-button-icon-height: auto; 4912 --media-tooltip-display: none; 4913 pointer-events: none; 4914 width: 100%; 4915 display: flex; 4916 flex-flow: row; 4917 align-items: center; 4918 justify-content: center; 4919 paint-order: stroke; 4920 stroke: rgba(102, 102, 102, 1); 4921 stroke-width: 0.3px; 4922 text-shadow: 4923 0 0 2px rgb(0 0 0 / 0.25), 4924 0 0 6px rgb(0 0 0 / 0.25); 4925
4925} 4926 4927 .center-controls media-play-button { 4928 --media-control-background: transparent; 4929 --media-control-hover-background: transparent; 4930 --media-control-padding: 0; 4931 width: 40px; 4932 filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25))
vendor: 38,939 bytes, lines 4932-5757
4932; 4933 } 4934 4935 [breakpointsm] .center-controls media-play-button { 4936 width: 90px; 4937 height: 90px; 4938 border-radius: 50%; 4939 transition: background 0.4s; 4940 padding: 24px; 4941 --media-control-background: #000; 4942 --media-control-hover-background: var(--_accent-color); 4943 } 4944 4945 .center-controls media-seek-backward-button, 4946 .center-controls media-seek-forward-button { 4947 --media-control-background: transparent; 4948 --media-control-hover-background: transparent; 4949 padding: 0; 4950 margin: 0 20px; 4951 width: max(33px, min(8%, 40px)); 4952 text-shadow: 4953 0 0 2px rgb(0 0 0 / 0.25), 4954 0 0 6px rgb(0 0 0 / 0.25); 4955 } 4956 4957 [breakpointsm]:not([audio]) .center-controls.pre-playback { 4958 display: grid; 4959 align-items: initial; 4960 justify-content: initial; 4961 height: 100%; 4962 overflow: hidden; 4963 } 4964 4965 [breakpointsm]:not([audio]) .center-controls.pre-playback media-play-button { 4966 place-self: var(--_pre-playback-place, center); 4967 grid-area: 1 / 1; 4968 margin: 16px; 4969 } 4970 4971 /* Show and hide controls or pre-playback state */ 4972 4973 [breakpointsm]:is([mediahasplayed], :not([mediapaused])):not([audio]) 4974 .center-controls.pre-playback 4975 media-play-button { 4976 /* Using \`forwards\` would lead to a laggy UI after the animation got in the end state */ 4977 animation: 0.3s linear pre-play-hide; 4978 opacity: 0; 4979 pointer-events: none; 4980 } 4981 4982 .autoplay-unmute { 4983 --media-control-hover-background: transparent; 4984 width: 100%; 4985 display: flex; 4986 align-items: center; 4987 justify-content: center; 4988 filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25)); 4989 } 4990 4991 .autoplay-unmute-btn { 4992 --media-control-height: 16px; 4993 border-radius: 8px; 4994 background: #000; 4995 color: var(--_primary-color); 4996 display: flex; 4997 align-items: center; 4998 padding: 8px 16px; 4999 font-size: 18px; 5000 font-weight: 500; 5001 cursor: pointer; 5002 } 5003 5004 .autoplay-unmute-btn:hover { 5005 background: var(--_accent-color); 5006 } 5007 5008 [breakpointsm] .autoplay-unmute-btn { 5009 --media-control-height: 30px; 5010 padding: 14px 24px; 5011 font-size: 26px; 5012 } 5013 5014 .autoplay-unmute-btn svg { 5015 margin: 0 6px 0 0; 5016 } 5017 5018 [breakpointsm] .autoplay-unmute-btn svg { 5019 margin: 0 10px 0 0; 5020 } 5021 5022 media-controller:not([audio]):not([mediahasplayed]) *:is(media-control-bar, media-time-range) { 5023 display: none; 5024 } 5025 5026 media-error-dialog:not([mediaerrorcode]) { 5027 opacity: 0; 5028 } 5029 5030 media-loading-indicator { 5031 --media-loading-icon-width: 100%; 5032 --media-button-icon-height: auto; 5033 display: var(--media-control-display, var(--media-loading-indicator-display, flex)); 5034 pointer-events: none; 5035 position: absolute; 5036 width: min(15%, 150px); 5037 flex-flow: row; 5038 align-items: center; 5039 justify-content: center; 5040 } 5041 5042 /* Intentionally don't target the div for transition but the children 5043 of the div. Prevents messing with media-chrome's autohide feature. */ 5044 media-loading-indicator + div * { 5045 transition: opacity 0.15s; 5046 opacity: 1; 5047 } 5048 5049 media-loading-indicator[medialoading]:not([mediapaused]) ~ div > * { 5050 opacity: 0; 5051 transition-delay: 400ms; 5052 } 5053 5054 media-volume-range { 5055 width: min(100%, 100px); 5056 --media-range-padding-left: 10px; 5057 --media-range-padding-right: 10px; 5058 --media-range-thumb-width: 12px; 5059 --media-range-thumb-height: 12px; 5060 --media-range-thumb-background: radial-gradient( 5061 circle, 5062 #000 0%, 5063 #000 25%, 5064 var(--_primary-color) 25%, 5065 var(--_primary-color) 5066 ); 5067 --media-control-hover-background: none; 5068 } 5069 5070 media-time-display { 5071 white-space: nowrap; 5072 } 5073 5074 /* Generic style for explicitly disabled controls */ 5075 media-control-bar[part~='bottom'] [disabled], 5076 media-control-bar[part~='bottom'] [aria-disabled='true'] { 5077 opacity: 60%; 5078 cursor: not-allowed; 5079 } 5080 5081 media-text-display { 5082 --media-font-size: 16px; 5083 --media-control-padding: 14px; 5084 font-weight: 500; 5085 } 5086 5087 media-play-button.animated *:is(g, path) { 5088 transition: all 0.3s; 5089 } 5090 5091 media-play-button.animated[mediapaused] .pause-icon-pt1 { 5092 opacity: 0; 5093 } 5094 5095 media-play-button.animated[mediapaused] .pause-icon-pt2 { 5096 transform-origin: center center; 5097 transform: scaleY(0); 5098 } 5099 5100 media-play-button.animated[mediapaused] .play-icon { 5101 clip-path: inset(0 0 0 0); 5102 } 5103 5104 media-play-button.animated:not([mediapaused]) .play-icon { 5105 clip-path: inset(0 0 0 100%); 5106 } 5107 5108 media-seek-forward-button, 5109 media-seek-backward-button { 5110 --media-font-weight: 400; 5111 } 5112 5113 .mute-icon { 5114 display: inline-block; 5115 } 5116 5117 .mute-icon :is(path, g) { 5118 transition: opacity 0.5s; 5119 } 5120 5121 .muted { 5122 opacity: 0; 5123 } 5124 5125 media-mute-button[mediavolumelevel='low'] :is(.volume-medium, .volume-high), 5126 media-mute-button[mediavolumelevel='medium'] :is(.volume-high) { 5127 opacity: 0; 5128 } 5129 5130 media-mute-button[mediavolumelevel='off'] .unmuted { 5131 opacity: 0; 5132 } 5133 5134 media-mute-button[mediavolumelevel='off'] .muted { 5135 opacity: 1; 5136 } 5137 5138 /** 5139 * Our defaults for these buttons are to hide them at small sizes 5140 * users can override this with CSS 5141 */ 5142 media-controller:not([breakpointsm]):not([audio]) { 5143 --bottom-play-button: none; 5144 --bottom-seek-backward-button: none; 5145 --bottom-seek-forward-button: none; 5146 --bottom-time-display: none; 5147 --bottom-playback-rate-menu-button: none; 5148 --bottom-pip-button: none; 5149 } 5150 5151 [part='mux-badge'] { 5152 position: absolute; 5153 bottom: 10px; 5154 right: 10px; 5155 z-index: 2; 5156 opacity: 0.6; 5157 transition: 5158 opacity 0.2s ease-in-out, 5159 bottom 0.2s ease-in-out; 5160 } 5161 5162 [part='mux-badge']:hover { 5163 opacity: 1; 5164 } 5165 5166 [part='mux-badge'] a { 5167 font-size: 14px; 5168 font-family: var(--_font-family); 5169 color: var(--_primary-color); 5170 text-decoration: none; 5171 display: flex; 5172 align-items: center; 5173 gap: 5px; 5174 } 5175 5176 [part='mux-badge'] .mux-badge-text { 5177 transition: opacity 0.5s ease-in-out; 5178 opacity: 0; 5179 } 5180 5181 [part='mux-badge'] .mux-badge-logo { 5182 width: 40px; 5183 height: auto; 5184 display: inline-block; 5185 } 5186 5187 [part='mux-badge'] .mux-badge-logo svg { 5188 width: 100%; 5189 height: 100%; 5190 fill: white; 5191 } 5192 5193 media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'], 5194 media-controller:not([userinactive]) [part='mux-badge'], 5195 media-controller[mediahasplayed][mediapaused] [part='mux-badge'] { 5196 transition: bottom 0.1s ease-in-out; 5197 } 5198 5199 media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] { 5200 transition: bottom 0.2s ease-in-out 0.62s; 5201 } 5202 5203 media-controller:not([userinactive]) [part='mux-badge'] .mux-badge-text, 5204 media-controller[mediahasplayed][mediapaused] [part='mux-badge'] .mux-badge-text { 5205 opacity: 1; 5206 } 5207 5208 media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] .mux-badge-text { 5209 opacity: 0; 5210 } 5211 5212 media-controller[userinactive]:not([mediapaused]) [part='mux-badge'] { 5213 bottom: 10px; 5214 } 5215 5216 media-controller:not([userinactive]):not([mediahasplayed]) [part='mux-badge'] { 5217 bottom: 10px; 5218 } 5219 5220 media-controller:not([userinactive])[mediahasplayed] [part='mux-badge'], 5221 media-controller[mediahasplayed][mediapaused] [part='mux-badge'] { 5222 bottom: calc(28px + var(--media-control-height, 0px) + var(--media-control-padding, 0px) * 2); 5223 } 5224 </style> 5225 5226 <template partial="TitleDisplay"> 5227 <template if="videotitle"> 5228 <template if="videotitle != true"> 5229 <media-text-display part="top title display" class="title-display">{{videotitle}}</media-text-display> 5230 </template> 5231 </template> 5232 <template if="!videotitle"> 5233 <template if="title"> 5234 <media-text-display part="top title display" class="title-display">{{title}}</media-text-display> 5235 </template> 5236 </template> 5237 </template> 5238 5239 <template partial="PlayButton"> 5240 <media-play-button 5241 part="{{section ?? 'bottom'}} play button" 5242 disabled="{{disabled}}" 5243 aria-disabled="{{disabled}}" 5244 class="animated" 5245 > 5246 <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon"> 5247 <g class="play-icon"> 5248 <path 5249 d="M15.5987 6.2911L3.45577 0.110898C2.83667 -0.204202 2.06287 0.189698 2.06287 0.819798V13.1802C2.06287 13.8103 2.83667 14.2042 3.45577 13.8891L15.5987 7.7089C16.2178 7.3938 16.2178 6.6061 15.5987 6.2911Z" 5250 /> 5251 </g> 5252 <g class="pause-icon"> 5253 <path 5254 class="pause-icon-pt1" 5255 d="M5.90709 0H2.96889C2.46857 0 2.06299 0.405585 2.06299 0.9059V13.0941C2.06299 13.5944 2.46857 14 2.96889 14H5.90709C6.4074 14 6.81299 13.5944 6.81299 13.0941V0.9059C6.81299 0.405585 6.4074 0 5.90709 0Z" 5256 /> 5257 <path 5258 class="pause-icon-pt2" 5259 d="M15.1571 0H12.2189C11.7186 0 11.313 0.405585 11.313 0.9059V13.0941C11.313 13.5944 11.7186 14 12.2189 14H15.1571C15.6574 14 16.063 13.5944 16.063 13.0941V0.9059C16.063 0.405585 15.6574 0 15.1571 0Z" 5260 /> 5261 </g> 5262 </svg> 5263 </media-play-button> 5264 </template> 5265 5266 <template partial="PrePlayButton"> 5267 <media-play-button 5268 part="{{section ?? 'center'}} play button pre-play" 5269 disabled="{{disabled}}" 5270 aria-disabled="{{disabled}}" 5271 > 5272 <svg aria-hidden="true" viewBox="0 0 18 14" slot="icon" style="transform: translate(3px, 0)"> 5273 <path 5274 d="M15.5987 6.2911L3.45577 0.110898C2.83667 -0.204202 2.06287 0.189698 2.06287 0.819798V13.1802C2.06287 13.8103 2.83667 14.2042 3.45577 13.8891L15.5987 7.7089C16.2178 7.3938 16.2178 6.6061 15.5987 6.2911Z" 5275 /> 5276 </svg> 5277 </media-play-button> 5278 </template> 5279 5280 <template partial="SeekBackwardButton"> 5281 <media-seek-backward-button 5282 seekoffset="{{backwardseekoffset}}" 5283 part="{{section ?? 'bottom'}} seek-backward button" 5284 disabled="{{disabled}}" 5285 aria-disabled="{{disabled}}" 5286 > 5287 <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon"> 5288 <path 5289 d="M3.65 2.07888L0.0864 6.7279C-0.0288 6.87812 -0.0288 7.12188 0.0864 7.2721L3.65 11.9211C3.7792 12.0896 4 11.9703 4 11.7321V2.26787C4 2.02968 3.7792 1.9104 3.65 2.07888Z" 5290 /> 5291 <text transform="translate(6 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'"> 5292 {{backwardseekoffset}} 5293 </text> 5294 </svg> 5295 </media-seek-backward-button> 5296 </template> 5297 5298 <template partial="SeekForwardButton"> 5299 <media-seek-forward-button 5300 seekoffset="{{forwardseekoffset}}" 5301 part="{{section ?? 'bottom'}} seek-forward button" 5302 disabled="{{disabled}}" 5303 aria-disabled="{{disabled}}" 5304 > 5305 <svg viewBox="0 0 22 14" aria-hidden="true" slot="icon"> 5306 <g> 5307 <text transform="translate(-1 12)" style="font-size: 14px; font-family: 'ArialMT', 'Arial'"> 5308 {{forwardseekoffset}} 5309 </text> 5310 <path 5311 d="M18.35 11.9211L21.9136 7.2721C22.0288 7.12188 22.0288 6.87812 21.9136 6.7279L18.35 2.07888C18.2208 1.91041 18 2.02968 18 2.26787V11.7321C18 11.9703 18.2208 12.0896 18.35 11.9211Z" 5312 /> 5313 </g> 5314 </svg> 5315 </media-seek-forward-button> 5316 </template> 5317 5318 <template partial="MuteButton"> 5319 <media-mute-button part="bottom mute button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 5320 <svg viewBox="0 0 18 14" slot="icon" class="mute-icon" aria-hidden="true"> 5321 <g class="unmuted"> 5322 <path 5323 d="M6.76786 1.21233L3.98606 3.98924H1.19937C0.593146 3.98924 0.101743 4.51375 0.101743 5.1607V6.96412L0 6.99998L0.101743 7.03583V8.83926C0.101743 9.48633 0.593146 10.0108 1.19937 10.0108H3.98606L6.76773 12.7877C7.23561 13.2547 8 12.9007 8 12.2171V1.78301C8 1.09925 7.23574 0.745258 6.76786 1.21233Z" 5324 /> 5325 <path 5326 class="volume-low" 5327 d="M10 3.54781C10.7452 4.55141 11.1393 5.74511 11.1393 6.99991C11.1393 8.25471 10.7453 9.44791 10 10.4515L10.7988 11.0496C11.6734 9.87201 12.1356 8.47161 12.1356 6.99991C12.1356 5.52821 11.6735 4.12731 10.7988 2.94971L10 3.54781Z" 5328 /> 5329 <path 5330 class="volume-medium" 5331 d="M12.3778 2.40086C13.2709 3.76756 13.7428 5.35806 13.7428 7.00026C13.7428 8.64246 13.2709 10.233 12.3778 11.5992L13.2106 12.1484C14.2107 10.6185 14.739 8.83796 14.739 7.00016C14.739 5.16236 14.2107 3.38236 13.2106 1.85156L12.3778 2.40086Z" 5332 /> 5333 <path 5334 class="volume-high" 5335 d="M15.5981 0.75L14.7478 1.2719C15.7937 2.9919 16.3468 4.9723 16.3468 7C16.3468 9.0277 15.7937 11.0082 14.7478 12.7281L15.5981 13.25C16.7398 11.3722 17.343 9.211 17.343 7C17.343 4.789 16.7398 2.6268 15.5981 0.75Z" 5336 /> 5337 </g> 5338 <g class="muted"> 5339 <path 5340 fill-rule="evenodd" 5341 clip-rule="evenodd" 5342 d="M4.39976 4.98924H1.19937C1.19429 4.98924 1.17777 4.98961 1.15296 5.01609C1.1271 5.04369 1.10174 5.09245 1.10174 5.1607V8.83926C1.10174 8.90761 1.12714 8.95641 1.15299 8.984C1.17779 9.01047 1.1943 9.01084 1.19937 9.01084H4.39977L7 11.6066V2.39357L4.39976 4.98924ZM7.47434 1.92006C7.4743 1.9201 7.47439 1.92002 7.47434 1.92006V1.92006ZM6.76773 12.7877L3.98606 10.0108H1.19937C0.593146 10.0108 0.101743 9.48633 0.101743 8.83926V7.03583L0 6.99998L0.101743 6.96412V5.1607C0.101743 4.51375 0.593146 3.98924 1.19937 3.98924H3.98606L6.76786 1.21233C7.23574 0.745258 8 1.09925 8 1.78301V12.2171C8 12.9007 7.23561 13.2547 6.76773 12.7877Z" 5343 /> 5344 <path 5345 fill-rule="evenodd" 5346 clip-rule="evenodd" 5347 d="M15.2677 9.30323C15.463 9.49849 15.7796 9.49849 15.9749 9.30323C16.1701 9.10796 16.1701 8.79138 15.9749 8.59612L14.2071 6.82841L15.9749 5.06066C16.1702 4.8654 16.1702 4.54882 15.9749 4.35355C15.7796 4.15829 15.4631 4.15829 15.2678 4.35355L13.5 6.1213L11.7322 4.35348C11.537 4.15822 11.2204 4.15822 11.0251 4.35348C10.8298 4.54874 10.8298 4.86532 11.0251 5.06058L12.7929 6.82841L11.0251 8.59619C10.8299 8.79146 10.8299 9.10804 11.0251 9.3033C11.2204 9.49856 11.537 9.49856 11.7323 9.3033L13.5 7.53552L15.2677 9.30323Z" 5348 /> 5349 </g> 5350 </svg> 5351 </media-mute-button> 5352 </template> 5353 5354 <template partial="PipButton"> 5355 <media-pip-button part="bottom pip button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 5356 <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon"> 5357 <path 5358 d="M15.9891 0H2.011C0.9004 0 0 0.9003 0 2.0109V11.989C0 13.0996 0.9004 14 2.011 14H15.9891C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.9891 0ZM17 11.9891C17 12.5465 16.5465 13 15.9891 13H2.011C1.4536 13 1.0001 12.5465 1.0001 11.9891V2.0109C1.0001 1.4535 1.4536 0.9999 2.011 0.9999H15.9891C16.5465 0.9999 17 1.4535 17 2.0109V11.9891Z" 5359 /> 5360 <path 5361 d="M15.356 5.67822H8.19523C8.03253 5.67822 7.90063 5.81012 7.90063 5.97282V11.3836C7.90063 11.5463 8.03253 11.6782 8.19523 11.6782H15.356C15.5187 11.6782 15.6506 11.5463 15.6506 11.3836V5.97282C15.6506 5.81012 15.5187 5.67822 15.356 5.67822Z" 5362 /> 5363 </svg> 5364 </media-pip-button> 5365 </template> 5366 5367 <template partial="CaptionsMenu"> 5368 <media-captions-menu-button part="bottom captions button"> 5369 <svg aria-hidden="true" viewBox="0 0 18 14" slot="on"> 5370 <path 5371 d="M15.989 0H2.011C0.9004 0 0 0.9003 0 2.0109V11.9891C0 13.0997 0.9004 14 2.011 14H15.989C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.989 0ZM4.2292 8.7639C4.5954 9.1902 5.0935 9.4031 5.7233 9.4031C6.1852 9.4031 6.5544 9.301 6.8302 9.0969C7.1061 8.8933 7.2863 8.614 7.3702 8.26H8.4322C8.3062 8.884 8.0093 9.3733 7.5411 9.7273C7.0733 10.0813 6.4703 10.2581 5.732 10.2581C5.108 10.2581 4.5699 10.1219 4.1168 9.8489C3.6637 9.5759 3.3141 9.1946 3.0685 8.7058C2.8224 8.2165 2.6994 7.6511 2.6994 7.009C2.6994 6.3611 2.8224 5.7927 3.0685 5.3034C3.3141 4.8146 3.6637 4.4323 4.1168 4.1559C4.5699 3.88 5.108 3.7418 5.732 3.7418C6.4703 3.7418 7.0733 3.922 7.5411 4.2818C8.0094 4.6422 8.3062 5.1461 8.4322 5.794H7.3702C7.2862 5.4283 7.106 5.1368 6.8302 4.921C6.5544 4.7052 6.1852 4.5968 5.7233 4.5968C5.0934 4.5968 4.5954 4.8116 4.2292 5.2404C3.8635 5.6696 3.6804 6.259 3.6804 7.009C3.6804 7.7531 3.8635 8.3381 4.2292 8.7639ZM11.0974 8.7639C11.4636 9.1902 11.9617 9.4031 12.5915 9.4031C13.0534 9.4031 13.4226 9.301 13.6984 9.0969C13.9743 8.8933 14.1545 8.614 14.2384 8.26H15.3004C15.1744 8.884 14.8775 9.3733 14.4093 9.7273C13.9415 10.0813 13.3385 10.2581 12.6002 10.2581C11.9762 10.2581 11.4381 10.1219 10.985 9.8489C10.5319 9.5759 10.1823 9.1946 9.9367 8.7058C9.6906 8.2165 9.5676 7.6511 9.5676 7.009C9.5676 6.3611 9.6906 5.7927 9.9367 5.3034C10.1823 4.8146 10.5319 4.4323 10.985 4.1559C11.4381 3.88 11.9762 3.7418 12.6002 3.7418C13.3385 3.7418 13.9415 3.922 14.4093 4.2818C14.8776 4.6422 15.1744 5.1461 15.3004 5.794H14.2384C14.1544 5.4283 13.9742 5.1368 13.6984 4.921C13.4226 4.7052 13.0534 4.5968 12.5915 4.5968C11.9616 4.5968 11.4636 4.8116 11.0974 5.2404C10.7317 5.6696 10.5486 6.259 10.5486 7.009C10.5486 7.7531 10.7317 8.3381 11.0974 8.7639Z" 5372 /> 5373 </svg> 5374 <svg aria-hidden="true" viewBox="0 0 18 14" slot="off"> 5375 <path 5376 d="M5.73219 10.258C5.10819 10.258 4.57009 10.1218 4.11699 9.8488C3.66389 9.5758 3.31429 9.1945 3.06869 8.7057C2.82259 8.2164 2.69958 7.651 2.69958 7.0089C2.69958 6.361 2.82259 5.7926 3.06869 5.3033C3.31429 4.8145 3.66389 4.4322 4.11699 4.1558C4.57009 3.8799 5.10819 3.7417 5.73219 3.7417C6.47049 3.7417 7.07348 3.9219 7.54128 4.2817C8.00958 4.6421 8.30638 5.146 8.43238 5.7939H7.37039C7.28639 5.4282 7.10618 5.1367 6.83039 4.9209C6.55459 4.7051 6.18538 4.5967 5.72348 4.5967C5.09358 4.5967 4.59559 4.8115 4.22939 5.2403C3.86369 5.6695 3.68058 6.2589 3.68058 7.0089C3.68058 7.753 3.86369 8.338 4.22939 8.7638C4.59559 9.1901 5.09368 9.403 5.72348 9.403C6.18538 9.403 6.55459 9.3009 6.83039 9.0968C7.10629 8.8932 7.28649 8.6139 7.37039 8.2599H8.43238C8.30638 8.8839 8.00948 9.3732 7.54128 9.7272C7.07348 10.0812 6.47049 10.258 5.73219 10.258Z" 5377 /> 5378 <path 5379 d="M12.6003 10.258C11.9763 10.258 11.4382 10.1218 10.9851 9.8488C10.532 9.5758 10.1824 9.1945 9.93685 8.7057C9.69075 8.2164 9.56775 7.651 9.56775 7.0089C9.56775 6.361 9.69075 5.7926 9.93685 5.3033C10.1824 4.8145 10.532 4.4322 10.9851 4.1558C11.4382 3.8799 11.9763 3.7417 12.6003 3.7417C13.3386 3.7417 13.9416 3.9219 14.4094 4.2817C14.8777 4.6421 15.1745 5.146 15.3005 5.7939H14.2385C14.1545 5.4282 13.9743 5.1367 13.6985 4.9209C13.4227 4.7051 13.0535 4.5967 12.5916 4.5967C11.9617 4.5967 11.4637 4.8115 11.0975 5.2403C10.7318 5.6695 10.5487 6.2589 10.5487 7.0089C10.5487 7.753 10.7318 8.338 11.0975 8.7638C11.4637 9.1901 11.9618 9.403 12.5916 9.403C13.0535 9.403 13.4227 9.3009 13.6985 9.0968C13.9744 8.8932 14.1546 8.6139 14.2385 8.2599H15.3005C15.1745 8.8839 14.8776 9.3732 14.4094 9.7272C13.9416 10.0812 13.3386 10.258 12.6003 10.258Z" 5380 /> 5381 <path 5382 d="M15.9891 1C16.5465 1 17 1.4535 17 2.011V11.9891C17 12.5465 16.5465 13 15.9891 13H2.0109C1.4535 13 1 12.5465 1 11.9891V2.0109C1 1.4535 1.4535 0.9999 2.0109 0.9999L15.9891 1ZM15.9891 0H2.0109C0.9003 0 0 0.9003 0 2.0109V11.9891C0 13.0997 0.9003 14 2.0109 14H15.9891C17.0997 14 18 13.0997 18 11.9891V2.0109C18 0.9003 17.0997 0 15.9891 0Z" 5383 /> 5384 </svg> 5385 </media-captions-menu-button> 5386 <media-captions-menu 5387 hidden 5388 anchor="auto" 5389 part="bottom captions menu" 5390 disabled="{{disabled}}" 5391 aria-disabled="{{disabled}}" 5392 exportparts="menu-item" 5393 > 5394 <div slot="checked-indicator"> 5395 <style> 5396 .indicator { 5397 position: relative; 5398 top: 1px; 5399 width: 0.9em; 5400 height: auto; 5401 fill: var(--_accent-color); 5402 margin-right: 5px; 5403 } 5404 5405 [aria-checked='false'] .indicator { 5406 display: none; 5407 } 5408 </style> 5409 <svg viewBox="0 0 14 18" class="indicator"> 5410 <path 5411 d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027" 5412 fill-rule="evenodd" 5413 /> 5414 </svg></div 5415 ></media-captions-menu> 5416 </template> 5417 5418 <template partial="AirplayButton"> 5419 <media-airplay-button part="bottom airplay button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 5420 <svg viewBox="0 0 18 14" aria-hidden="true" slot="icon"> 5421 <path 5422 d="M16.1383 0H1.8618C0.8335 0 0 0.8335 0 1.8617V10.1382C0 11.1664 0.8335 12 1.8618 12H3.076C3.1204 11.9433 3.1503 11.8785 3.2012 11.826L4.004 11H1.8618C1.3866 11 1 10.6134 1 10.1382V1.8617C1 1.3865 1.3866 0.9999 1.8618 0.9999H16.1383C16.6135 0.9999 17.0001 1.3865 17.0001 1.8617V10.1382C17.0001 10.6134 16.6135 11 16.1383 11H13.9961L14.7989 11.826C14.8499 11.8785 14.8798 11.9432 14.9241 12H16.1383C17.1665 12 18.0001 11.1664 18.0001 10.1382V1.8617C18 0.8335 17.1665 0 16.1383 0Z" 5423 /> 5424 <path 5425 d="M9.55061 8.21903C9.39981 8.06383 9.20001 7.98633 9.00011 7.98633C8.80021 7.98633 8.60031 8.06383 8.44951 8.21903L4.09771 12.697C3.62471 13.1838 3.96961 13.9998 4.64831 13.9998H13.3518C14.0304 13.9998 14.3754 13.1838 13.9023 12.697L9.55061 8.21903Z" 5426 /> 5427 </svg> 5428 </media-airplay-button> 5429 </template> 5430 5431 <template partial="FullscreenButton"> 5432 <media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 5433 <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter"> 5434 <path 5435 d="M1.00745 4.39539L1.01445 1.98789C1.01605 1.43049 1.47085 0.978289 2.02835 0.979989L6.39375 0.992589L6.39665 -0.007411L2.03125 -0.020011C0.920646 -0.023211 0.0176463 0.874489 0.0144463 1.98509L0.00744629 4.39539H1.00745Z" 5436 /> 5437 <path 5438 d="M17.0144 2.03431L17.0076 4.39541H18.0076L18.0144 2.03721C18.0176 0.926712 17.1199 0.0237125 16.0093 0.0205125L11.6439 0.0078125L11.641 1.00781L16.0064 1.02041C16.5638 1.02201 17.016 1.47681 17.0144 2.03431Z" 5439 /> 5440 <path 5441 d="M16.9925 9.60498L16.9855 12.0124C16.9839 12.5698 16.5291 13.022 15.9717 13.0204L11.6063 13.0078L11.6034 14.0078L15.9688 14.0204C17.0794 14.0236 17.9823 13.1259 17.9855 12.0153L17.9925 9.60498H16.9925Z" 5442 /> 5443 <path 5444 d="M0.985626 11.9661L0.992426 9.60498H-0.0074737L-0.0142737 11.9632C-0.0174737 13.0738 0.880226 13.9767 1.99083 13.98L6.35623 13.9926L6.35913 12.9926L1.99373 12.98C1.43633 12.9784 0.983926 12.5236 0.985626 11.9661Z" 5445 /> 5446 </svg> 5447 <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit"> 5448 <path 5449 d="M5.39655 -0.0200195L5.38955 2.38748C5.38795 2.94488 4.93315 3.39708 4.37565 3.39538L0.0103463 3.38278L0.00744629 4.38278L4.37285 4.39538C5.48345 4.39858 6.38635 3.50088 6.38965 2.39028L6.39665 -0.0200195H5.39655Z" 5450 /> 5451 <path 5452 d="M12.6411 2.36891L12.6479 0.0078125H11.6479L11.6411 2.36601C11.6379 3.47651 12.5356 4.37951 13.6462 4.38271L18.0116 4.39531L18.0145 3.39531L13.6491 3.38271C13.0917 3.38111 12.6395 2.92641 12.6411 2.36891Z" 5453 /> 5454 <path 5455 d="M12.6034 14.0204L12.6104 11.613C12.612 11.0556 13.0668 10.6034 13.6242 10.605L17.9896 10.6176L17.9925 9.61759L13.6271 9.60499C12.5165 9.60179 11.6136 10.4995 11.6104 11.6101L11.6034 14.0204H12.6034Z" 5456 /> 5457 <path 5458 d="M5.359 11.6315L5.3522 13.9926H6.3522L6.359 11.6344C6.3622 10.5238 5.4645 9.62088 4.3539 9.61758L-0.0115043 9.60498L-0.0144043 10.605L4.351 10.6176C4.9084 10.6192 5.3607 11.074 5.359 11.6315Z" 5459 /> 5460 </svg> 5461 </media-fullscreen-button> 5462 </template> 5463 5464 <template partial="CastButton"> 5465 <media-cast-button part="bottom cast button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 5466 <svg viewBox="0 0 18 14" aria-hidden="true" slot="enter"> 5467 <path 5468 d="M16.0072 0H2.0291C0.9185 0 0.0181 0.9003 0.0181 2.011V5.5009C0.357 5.5016 0.6895 5.5275 1.0181 5.5669V2.011C1.0181 1.4536 1.4716 1 2.029 1H16.0072C16.5646 1 17.0181 1.4536 17.0181 2.011V11.9891C17.0181 12.5465 16.5646 13 16.0072 13H8.4358C8.4746 13.3286 8.4999 13.6611 8.4999 13.9999H16.0071C17.1177 13.9999 18.018 13.0996 18.018 11.989V2.011C18.0181 0.9003 17.1178 0 16.0072 0ZM0 6.4999V7.4999C3.584 7.4999 6.5 10.4159 6.5 13.9999H7.5C7.5 9.8642 4.1357 6.4999 0 6.4999ZM0 8.7499V9.7499C2.3433 9.7499 4.25 11.6566 4.25 13.9999H5.25C5.25 11.1049 2.895 8.7499 0 8.7499ZM0.0181 11V14H3.0181C3.0181 12.3431 1.675 11 0.0181 11Z" 5469 /> 5470 </svg> 5471 <svg viewBox="0 0 18 14" aria-hidden="true" slot="exit"> 5472 <path 5473 d="M15.9891 0H2.01103C0.900434 0 3.35947e-05 0.9003 3.35947e-05 2.011V5.5009C0.338934 5.5016 0.671434 5.5275 1.00003 5.5669V2.011C1.00003 1.4536 1.45353 1 2.01093 1H15.9891C16.5465 1 17 1.4536 17 2.011V11.9891C17 12.5465 16.5465 13 15.9891 13H8.41773C8.45653 13.3286 8.48183 13.6611 8.48183 13.9999H15.989C17.0996 13.9999 17.9999 13.0996 17.9999 11.989V2.011C18 0.9003 17.0997 0 15.9891 0ZM-0.0180664 6.4999V7.4999C3.56593 7.4999 6.48193 10.4159 6.48193 13.9999H7.48193C7.48193 9.8642 4.11763 6.4999 -0.0180664 6.4999ZM-0.0180664 8.7499V9.7499C2.32523 9.7499 4.23193 11.6566 4.23193 13.9999H5.23193C5.23193 11.1049 2.87693 8.7499 -0.0180664 8.7499ZM3.35947e-05 11V14H3.00003C3.00003 12.3431 1.65693 11 3.35947e-05 11Z" 5474 /> 5475 <path d="M2.15002 5.634C5.18352 6.4207 7.57252 8.8151 8.35282 11.8499H15.8501V2.1499H2.15002V5.634Z" /> 5476 </svg> 5477 </media-cast-button> 5478 </template> 5479 5480 <template partial="LiveButton"> 5481 <media-live-button part="{{section ?? 'top'}} live button" disabled="{{disabled}}" aria-disabled="{{disabled}}"> 5482 <span slot="text">Live</span> 5483 </media-live-button> 5484 </template> 5485 5486 <template partial="PlaybackRateMenu"> 5487 <media-playback-rate-menu-button part="bottom playback-rate button"></media-playback-rate-menu-button> 5488 <media-playback-rate-menu 5489 hidden 5490 anchor="auto" 5491 rates="{{playbackrates}}" 5492 exportparts="menu-item" 5493 part="bottom playback-rate menu" 5494 disabled="{{disabled}}" 5495 aria-disabled="{{disabled}}" 5496 ></media-playback-rate-menu> 5497 </template> 5498 5499 <template partial="VolumeRange"> 5500 <media-volume-range 5501 part="bottom volume range" 5502 disabled="{{disabled}}" 5503 aria-disabled="{{disabled}}" 5504 ></media-volume-range> 5505 </template> 5506 5507 <template partial="TimeDisplay"> 5508 <media-time-display 5509 remaining="{{defaultshowremainingtime}}" 5510 showduration="{{!hideduration}}" 5511 part="bottom time display" 5512 disabled="{{disabled}}" 5513 aria-disabled="{{disabled}}" 5514 ></media-time-display> 5515 </template> 5516 5517 <template partial="TimeRange"> 5518 <media-time-range part="bottom time range" disabled="{{disabled}}" aria-disabled="{{disabled}}" exportparts="thumb"> 5519 <media-preview-thumbnail slot="preview"></media-preview-thumbnail> 5520 <media-preview-chapter-display slot="preview"></media-preview-chapter-display> 5521 <media-preview-time-display slot="preview"></media-preview-time-display> 5522 <div slot="preview" part="arrow"></div> 5523 </media-time-range> 5524 </template> 5525 5526 <template partial="AudioTrackMenu"> 5527 <media-audio-track-menu-button part="bottom audio-track button"> 5528 <svg aria-hidden="true" slot="icon" viewBox="0 0 18 16"> 5529 <path d="M9 15A7 7 0 1 1 9 1a7 7 0 0 1 0 14Zm0 1A8 8 0 1 0 9 0a8 8 0 0 0 0 16Z" /> 5530 <path 5531 d="M5.2 6.3a.5.5 0 0 1 .5.5v2.4a.5.5 0 1 1-1 0V6.8a.5.5 0 0 1 .5-.5Zm2.4-2.4a.5.5 0 0 1 .5.5v7.2a.5.5 0 0 1-1 0V4.4a.5.5 0 0 1 .5-.5ZM10 5.5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm2.4-.8a.5.5 0 0 1 .5.5v5.6a.5.5 0 0 1-1 0V5.2a.5.5 0 0 1 .5-.5Z" 5532 /> 5533 </svg> 5534 </media-audio-track-menu-button> 5535 <media-audio-track-menu 5536 hidden 5537 anchor="auto" 5538 part="bottom audio-track menu" 5539 disabled="{{disabled}}" 5540 aria-disabled="{{disabled}}" 5541 exportparts="menu-item" 5542 > 5543 <div slot="checked-indicator"> 5544 <style> 5545 .indicator { 5546 position: relative; 5547 top: 1px; 5548 width: 0.9em; 5549 height: auto; 5550 fill: var(--_accent-color); 5551 margin-right: 5px; 5552 } 5553 5554 [aria-checked='false'] .indicator { 5555 display: none; 5556 } 5557 </style> 5558 <svg viewBox="0 0 14 18" class="indicator"> 5559 <path 5560 d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027" 5561 fill-rule="evenodd" 5562 /> 5563 </svg> 5564 </div> 5565 </media-audio-track-menu> 5566 </template> 5567 5568 <template partial="RenditionMenu"> 5569 <media-rendition-menu-button part="bottom rendition button"> 5570 <svg aria-hidden="true" slot="icon" viewBox="0 0 18 14"> 5571 <path 5572 d="M2.25 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM9 9a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm6.75 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z" 5573 /> 5574 </svg> 5575 </media-rendition-menu-button> 5576 <media-rendition-menu 5577 hidden 5578 anchor="auto" 5579 part="bottom rendition menu" 5580 disabled="{{disabled}}" 5581 aria-disabled="{{disabled}}" 5582 > 5583 <div slot="checked-indicator"> 5584 <style> 5585 .indicator { 5586 position: relative; 5587 top: 1px; 5588 width: 0.9em; 5589 height: auto; 5590 fill: var(--_accent-color); 5591 margin-right: 5px; 5592 } 5593 5594 [aria-checked='false'] .indicator { 5595 opacity: 0; 5596 } 5597 </style> 5598 <svg viewBox="0 0 14 18" class="indicator"> 5599 <path 5600 d="M12.252 3.48c-.115.033-.301.161-.425.291-.059.063-1.407 1.815-2.995 3.894s-2.897 3.79-2.908 3.802c-.013.014-.661-.616-1.672-1.624-.908-.905-1.702-1.681-1.765-1.723-.401-.27-.783-.211-1.176.183a1.285 1.285 0 0 0-.261.342.582.582 0 0 0-.082.35c0 .165.01.205.08.35.075.153.213.296 2.182 2.271 1.156 1.159 2.17 2.159 2.253 2.222.189.143.338.196.539.194.203-.003.412-.104.618-.299.205-.193 6.7-8.693 6.804-8.903a.716.716 0 0 0 .085-.345c.01-.179.005-.203-.062-.339-.124-.252-.45-.531-.746-.639a.784.784 0 0 0-.469-.027" 5601 fill-rule="evenodd" 5602 /> 5603 </svg> 5604 </div> 5605 </media-rendition-menu> 5606 </template> 5607 5608 <template partial="MuxBadge"> 5609 <div part="mux-badge"> 5610 <a href="https://www.mux.com/player" target="_blank"> 5611 <span class="mux-badge-text">Powered by</span> 5612 <div class="mux-badge-logo"> 5613 <svg 5614 viewBox="0 0 1600 500" 5615 style="fill-rule: evenodd; clip-rule: evenodd; stroke-linejoin: round; stroke-miterlimit: 2" 5616 > 5617 <g> 5618 <path 5619 d="M994.287,93.486c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m0,-93.486c-34.509,-0 -62.484,27.976 -62.484,62.486l0,187.511c0,68.943 -56.09,125.033 -125.032,125.033c-68.942,-0 -125.03,-56.09 -125.03,-125.033l0,-187.511c0,-34.51 -27.976,-62.486 -62.485,-62.486c-34.509,-0 -62.484,27.976 -62.484,62.486l0,187.511c0,137.853 112.149,250.003 249.999,250.003c137.851,-0 250.001,-112.15 250.001,-250.003l0,-187.511c0,-34.51 -27.976,-62.486 -62.485,-62.486" 5620 style="fill-rule: nonzero" 5621 ></path> 5622 <path 5623 d="M1537.51,468.511c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m-275.883,-218.509l-143.33,143.329c-24.402,24.402 -24.402,63.966 0,88.368c24.402,24.402 63.967,24.402 88.369,-0l143.33,-143.329l143.328,143.329c24.402,24.4 63.967,24.402 88.369,-0c24.403,-24.402 24.403,-63.966 0.001,-88.368l-143.33,-143.329l0.001,-0.004l143.329,-143.329c24.402,-24.402 24.402,-63.965 0,-88.367c-24.402,-24.402 -63.967,-24.402 -88.369,-0l-143.329,143.328l-143.329,-143.328c-24.402,-24.401 -63.967,-24.402 -88.369,-0c-24.402,24.402 -24.402,63.965 0,88.367l143.329,143.329l0,0.004Z" 5624 style="fill-rule: nonzero" 5625 ></path> 5626 <path 5627 d="M437.511,468.521c-17.121,-0 -31,-13.879 -31,-31c0,-17.121 13.879,-31 31,-31c17.121,-0 31,13.879 31,31c0,17.121 -13.879,31 -31,31m23.915,-463.762c-23.348,-9.672 -50.226,-4.327 -68.096,13.544l-143.331,143.329l-143.33,-143.329c-17.871,-17.871 -44.747,-23.216 -68.096,-13.544c-23.349,9.671 -38.574,32.455 -38.574,57.729l0,375.026c0,34.51 27.977,62.486 62.487,62.486c34.51,-0 62.486,-27.976 62.486,-62.486l0,-224.173l80.843,80.844c24.404,24.402 63.965,24.402 88.369,-0l80.843,-80.844l0,224.173c0,34.51 27.976,62.486 62.486,62.486c34.51,-0 62.486,-27.976 62.486,-62.486l0,-375.026c0,-25.274 -15.224,-48.058 -38.573,-57.729" 5628 style="fill-rule: nonzero" 5629 ></path> 5630 </g> 5631 </svg> 5632 </div> 5633 </a> 5634 </div> 5635 </template> 5636 5637 <media-controller 5638 part="controller" 5639 defaultstreamtype="{{defaultstreamtype ?? 'on-demand'}}" 5640 breakpoints="sm:470" 5641 gesturesdisabled="{{disabled}}" 5642 hotkeys="{{hotkeys}}" 5643 nohotkeys="{{nohotkeys}}" 5644 novolumepref="{{novolumepref}}" 5645 audio="{{audio}}" 5646 noautoseektolive="{{noautoseektolive}}" 5647 defaultsubtitles="{{defaultsubtitles}}" 5648 defaultduration="{{defaultduration ?? false}}" 5649 keyboardforwardseekoffset="{{forwardseekoffset}}" 5650 keyboardbackwardseekoffset="{{backwardseekoffset}}" 5651 exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer" 5652 style="--_pre-playback-place:{{preplaybackplace ?? 'center'}}" 5653 > 5654 <slot name="media" slot="media"></slot> 5655 <slot name="poster" slot="poster"></slot> 5656 5657 <media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator> 5658 5659 <template if="!audio"> 5660 <media-error-dialog slot="dialog" noautohide></media-error-dialog> 5661 <!-- Pre-playback UI --> 5662 <!-- same for both on-demand and live --> 5663 <div slot="centered-chrome" class="center-controls pre-playback"> 5664 <template if="!breakpointsm">{{>PlayButton section="center"}}</template> 5665 <template if="breakpointsm">{{>PrePlayButton section="center"}}</template> 5666 </div> 5667 5668 <!-- Mux Badge --> 5669 <template if="proudlydisplaymuxbadge"> {{>MuxBadge}} </template> 5670 5671 <!-- Autoplay centered unmute button --> 5672 <!-- 5673 todo: figure out how show this with available state variables 5674 needs to show when: 5675 - autoplay is enabled 5676 - playback has been successful 5677 - audio is muted 5678 - in place / instead of the pre-plaback play button 5679 - not to show again after user has interacted with this button 5680 - OR user has interacted with the mute button in the control bar 5681 --> 5682 <!-- 5683 There should be a >MuteButton to the left of the "Unmute" text, but a templating bug 5684 makes it appear even if commented out in the markup, add it back when code is un-commented 5685 --> 5686 <!-- <div slot="centered-chrome" class="autoplay-unmute"> 5687 <div role="button" class="autoplay-unmute-btn">Unmute</div> 5688 </div> --> 5689 5690 <template if="streamtype == 'on-demand'"> 5691 <template if="breakpointsm"> 5692 <media-control-bar part="control-bar top" slot="top-chrome">{{>TitleDisplay}} </media-control-bar> 5693 </template> 5694 {{>TimeRange}} 5695 <media-control-bar part="control-bar bottom"> 5696 {{>PlayButton}} {{>SeekBackwardButton}} {{>SeekForwardButton}} {{>TimeDisplay}} {{>MuteButton}} 5697 {{>VolumeRange}} 5698 <div class="spacer"></div> 5699 {{>RenditionMenu}} {{>PlaybackRateMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}} 5700 {{>CastButton}} {{>PipButton}} {{>FullscreenButton}} 5701 </media-control-bar> 5702 </template> 5703 5704 <template if="streamtype == 'live'"> 5705 <media-control-bar part="control-bar top" slot="top-chrome"> 5706 {{>LiveButton}} 5707 <template if="breakpointsm"> {{>TitleDisplay}} </template> 5708 </media-control-bar> 5709 <template if="targetlivewindow > 0">{{>TimeRange}}</template> 5710 <media-control-bar part="control-bar bottom"> 5711 {{>PlayButton}} 5712 <template if="targetlivewindow > 0">{{>SeekBackwardButton}} {{>SeekForwardButton}}</template> 5713 {{>MuteButton}} {{>VolumeRange}} 5714 <div class="spacer"></div> 5715 {{>RenditionMenu}} {{>AudioTrackMenu}} {{>CaptionsMenu}} {{>AirplayButton}} {{>CastButton}} {{>PipButton}} 5716 {{>FullscreenButton}} 5717 </media-control-bar> 5718 </template> 5719 </template> 5720 5721 <template if="audio"> 5722 <template if="streamtype == 'on-demand'"> 5723 <template if="title"> 5724 <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar> 5725 </template> 5726 <media-control-bar part="control-bar bottom"> 5727 {{>PlayButton}} 5728 <template if="breakpointsm"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template> 5729 {{>MuteButton}} 5730 <template if="breakpointsm">{{>VolumeRange}}</template> 5731 {{>TimeDisplay}} {{>TimeRange}} 5732 <template if="breakpointsm">{{>PlaybackRateMenu}}</template> 5733 {{>AirplayButton}} {{>CastButton}} 5734 </media-control-bar> 5735 </template> 5736 5737 <template if="streamtype == 'live'"> 5738 <template if="title"> 5739 <media-control-bar part="control-bar top">{{>TitleDisplay}}</media-control-bar> 5740 </template> 5741 <media-control-bar part="control-bar bottom"> 5742 {{>PlayButton}} {{>LiveButton section="bottom"}} {{>MuteButton}} 5743 <template if="breakpointsm"> 5744 {{>VolumeRange}} 5745 <template if="targetlivewindow > 0"> {{>SeekBackwardButton}} {{>SeekForwardButton}} </template> 5746 </template> 5747 <template if="targetlivewindow > 0"> {{>TimeDisplay}} {{>TimeRange}} </template> 5748 <template if="!targetlivewindow"><div class="spacer"></div></template> 5749 {{>AirplayButton}} {{>CastButton}} 5750 </media-control-bar> 5751 </template> 5752 </template> 5753 5754 <slot></slot> 5755 </media-controller> 5756</template> 5757`
5757,TT=wX.createElement("template");"innerHTML"in TT&&(TT.innerHTML=Tw);var TI,TS,TC=class extends fp{};TC.template=null==(TS=null==(TI=TT.content)?void 0:TI.children)?void 0:TS[0],wZ.customElements.get("media-theme-gerwig")||wZ.customElements.define("media-theme-gerwig",TC);var TM={SRC:"src",POSTER:"poster"},TL={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"},TR=["audio","backwardseekoffset","defaultduration","defaultshowremainingtime","defaultsubtitles","noautoseektolive","disabled","exportparts","forwardseekoffset","hideduration","hotkeys","nohotkeys","playbackrates","defaultstreamtype","streamtype","style","targetlivewindow","template","title","videotitle","novolumepref","nomutedpref","proudlydisplaymuxbadge"],Tx=gS.formatErrorMessage;function TD(e){let t=e.videoTitle?{video_title:e.videoTitle}:{};return e.getAttributeNames().filter(e=>e.startsWith("metadata-")).reduce((t,i)=>{let a=e.getAttribute(i);return null!==a&&(t[i.replace(/^metadata-/,"").replace(/-/g,"_")]=a),t},t)}gS.formatErrorMessage=e=>{var t,i;if(e instanceof ck){let a=((e,t=!1)=>({title:((e,t=!1)=>{var i,a;if(e.muxCode){let r=Tk(null!=(i=e.errorCategory)?i:"video"),n=c_(null!=(a=e.errorCategory)?a:cy);if(2000002===e.muxCode)return cq("Your device appears to be offline",t);if(2403210===e.muxCode)return cq("{category} URL has expired",t).format({category:r});if([2403232,2403222,2403221,2412202].includes(e.muxCode))return cq("{category} URL is formatted incorrectly",t).format({category:r});if(2403201===e.muxCode)return cq("Invalid {categoryName} URL",t).format({categoryName:n});if(2404e3===e.muxCode)return cq("{category} does not exist",t).format({category:r});if(2412e3===e.muxCode){let i="live"===e.streamType?"Live stream":"Video";return cq("{mediaType} is not currently available",t).format({mediaType:i})}}if(e.code){if(e.code===ck.MEDIA_ERR_NETWORK)return cq("Network Error",t);if(e.code===ck.MEDIA_ERR_DECODE)return cq("Media Error",t);if(e.code===ck.MEDIA_ERR_SRC_NOT_SUPPORTED)return cq("Source Not Supported",t)}return cq("Error",t)})(e,t).toString(),message:((e,t=!1)=>{var i,a;if(e.muxCode){let r=Tk(null!=(i=e.errorCategory)?i:"video"),n=c_(null!=(a=e.errorCategory)?a:cy);return 2000002===e.muxCode?cq("Check your internet connection and try reloading this video.",t):2403210===e.muxCode?cq("The videoâs secured {tokenNamePrefix}-token has expired.",t).format({tokenNamePrefix:n}):2403232===e.muxCode?cq("The videoâs playback ID does not match the one encoded in the {tokenNamePrefix}-token.",t).format({tokenNamePrefix:n}):2412202===e.muxCode?cq("{category} URL is formatted incorrectly",t).format({category:r}):[2403222,2403221].includes(e.muxCode)?cq("The {tokenNamePrefix}-token is formatted with incorrect information.",t).format({tokenNamePrefix:n}):[2403201,24e5].includes(e.muxCode)?cq("The video URL or {tokenNamePrefix}-token are formatted with incorrect or incomplete information.",t).format({tokenNamePrefix:n}):2404e3===e.muxCode?"":e.message}return e.code&&(e.code===ck.MEDIA_ERR_NETWORK||e.code===ck.MEDIA_ERR_DECODE||e.code===ck.MEDIA_ERR_SRC_NOT_SUPPORTED),e.message})(e,t).toString()}))(e,!1);return` 5758 ${null!=a&&a.title?`<h3>${a.title}</h3>`:""} 5759 ${null!=a&&a.message||null!=a&&a.linkUrl?`<p> 5760 ${null==a?void 0:a.message} 5761 ${null!=a&&a.linkUrl?`<a 5762 href="${a.linkUrl}" 5763 target="_blank" 5764 rel="external noopener" 5765 aria-label="${null!=(t=a.linkText)?t:""} ${cq("(opens in a new window)")}" 5766 >${null!=(i=a.linkText)?i:a.linkUrl}</a 5767 >`:""} 5768 </p>`:""} 5769 `}return Tx(e)};
5769var TP,TN,TO,TU,TH,TW,TB,T$,TV,Tq,TF,TG,TK,Tj,TY,TQ,Tz,TZ,TX,TJ,T0,T1=Object.values(mE),T2=Object.values(TM),T3=Object.values(TL),T4="mux-player",T5={isDialogOpen:!1},T9={redundant_streams:!0},T8=class extends Tc{constructor(){super(),yR(this,TK),yR(this,TP),yR(this,TN,!1),yR(this,TO,{}),yR(this,TU,!0),yR(this,TH,new Tt(this,"hotkeys")),yR(this,TW),yR(this,TB,()=>yD(this,TK,Tz).call(this)),yR(this,T$,()=>yD(this,TK,Tz).call(this)),yR(this,TV,()=>yD(this,TK,Tz).call(this)),yR(this,Tq),yR(this,TF,{...T5,onCloseErrorDialog:e=>{var t;(null==(t=e.composedPath()[0])?void 0:t.localName)==="media-error-dialog"&&yD(this,TK,TQ).call(this,{isDialogOpen:!1})},onFocusInErrorDialog:e=>{var t;(null==(t=e.composedPath()[0])?void 0:t.localName)==="media-error-dialog"&&(w9(this,wX.activeElement)||e.preventDefault())}}),yR(this,TG,e=>{var t;let i=null==(t=this.media)?void 0:t.error;if(!(i instanceof ck)){let{message:e,code:t}=null!=i?i:{};i=new ck(e,t)}if(!(null!=i&&i.fatal)){Ta(i),i.data&&Ta(`${i.name} data:`,i.data);return}let a=TA(i,!1);a.message&&Tn(a),Tr(i),i.data&&Tr(`${i.name} data:`,i.data),yD(this,TK,TQ).call(this,{isDialogOpen:!0})}),yx(this,TP,hk()),this.attachShadow({mode:"open"}),yD(this,TK,TY).call(this),this.isConnected&&yD(this,TK,Tj).call(this)}static get NAME(){return T4}static get VERSION(){return w7}static get observedAttributes(){var e;return[...null!=(e=Tc.observedAttributes)?e:[],...T2,...T1,...T3]}get mediaTheme(){var e;return null==(e=this.shadowRoot)?void 0:e.querySelector("media-theme")}get mediaController(){var e,t;return null==(t=null==(e=this.mediaTheme)?void 0:e.shadowRoot)?void 0:t.querySelector("media-controller")}connectedCallback(){yD(this,TK,Tj).call(this);let e=this.media;e&&(e.metadata=TD(this))}disconnectedCallback(){var e,t,i,a,r,n,s,o;null==(e=yL(this,TW))||e.disconnect(),null==(t=this.media)||t.removeEventListener("streamtypechange",yL(this,TB)),null==(i=this.media)||i.removeEventListener("loadstart",yL(this,T$)),this.removeEventListener("error",yL(this,TG)),this.media&&(this.media.errorTranslator=void 0),null==(r=null==(a=this.media)?void 0:a.textTracks)||r.removeEventListener("addtrack",yL(this,TV)),null==(s=null==(n=this.media)?void 0:n.textTracks)||s.removeEventListener("removetrack",yL(this,TV)),null==(o=yL(this,Tq))||o.call(this),yx(this,Tq,void 0),yx(this,TN,!1)}attributeChangedCallback(e,t,i){var a;switch(yD(this,TK,Tj).call(this),super.attributeChangedCallback(e,t,i),e){case TL.HOTKEYS:yL(this,TH).value=i;break;case TL.THUMBNAIL_TIME:null!=i&&this.tokens.thumbnail&&Ta(cq("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break;case TL.THUMBNAIL_TOKEN:if(i){let e=cV(i);if(e){let{aud:t}=e;"t"!==t&&Ta(cq("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:"t",tokenNamePrefix:"thumbnail"}))}}break;case TL.STORYBOARD_TOKEN:if(i){let e=cV(i);if(e){let{aud:t}=e;"s"!==t&&Ta(cq("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:"s",tokenNamePrefix:"storyboard"}))}}break;case TL.DRM_TOKEN:if(i){let e=cV(i);if(e){let{aud:t}=e;"d"!==t&&Ta(cq("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:t,expectedAud:"d",tokenNamePrefix:"drm"}))}}break;case mE.PLAYBACK_ID:null!=i&&i.includes("?token")&&Tr(cq("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:i}));break;case mE.STREAM_TYPE:i&&![cI,cT,cS].includes(i)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=i.includes("dvr")?1/0:0:Tn({file:"invalid-stream-type.md",message:cq("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):i===cI?null==this.getAttribute(TL.TARGET_LIVE_WINDOW)&&(this.targetLiveWindow=0):this.targetLiveWindow=NaN;break;case TL.FULLSCREEN_ELEMENT:if(null!=i||i!==t){let e=wX.getElementById(i),t=null==e?void 0:e.querySelector("mux-player");this.mediaController&&e&&t&&(this.mediaController.fullscreenElement=e)}break;case mE.CAP_RENDITION_TO_PLAYER_SIZE:(null==i||i!==t)&&(this.capRenditionToPlayerSize=null!=i||void 0)}
5769[mE.PLAYBACK_ID,TM.SRC,TL.PLAYBACK_TOKEN].includes(e)&&t!==i&&yx(this,TF,{...yL(this,TF),...T5}),yD(this,TK,Tz).call(this,{[null!=(a=Te[e])?a:w0(e)]:i})}async requestFullscreen(e){var t;if(!(!this.mediaController||this.mediaController.hasAttribute(pv.MEDIA_IS_FULLSCREEN)))return null==(t=this.mediaController)||t.dispatchEvent(new wZ.CustomEvent(pc.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,t)=>{var i;null==(i=this.mediaController)||i.addEventListener(pb.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}async exitFullscreen(){var e;if(!(!this.mediaController||!this.mediaController.hasAttribute(pv.MEDIA_IS_FULLSCREEN)))return null==(e=this.mediaController)||e.dispatchEvent(new wZ.CustomEvent(pc.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,t)=>{var i;null==(i=this.mediaController)||i.addEventListener(pb.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}get preferCmcd(){var e;return null!=(e=this.getAttribute(mE.PREFER_CMCD))?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?cL.includes(e)?this.setAttribute(mE.PREFER_CMCD,e):Ta(`Invalid value for preferCmcd. Must be one of ${cL.join()}`):this.removeAttribute(mE.PREFER_CMCD))}get hasPlayed(){var e,t;return null!=(t=null==(e=this.mediaController)?void 0:e.hasAttribute(pv.MEDIA_HAS_P
5769LAYED))&&t}get inLiveWindow(){var e;return null==(e=this.mediaController)?void 0:e.hasAttribute(pv.MEDIA_TIME_IS_LIVE)}get _hls(){var e;return null==(e=this.media)?void 0:e._hls}get mux(){var e;return null==(e=this.media)?void 0:e.mux}get theme(){var e;return null!=(e=this.getAttribute(TL.THEME))?e:"gerwig"}set theme(e){this.setAttribute(TL.THEME,`${e}`)}get themeProps(){let e=this.mediaTheme;if(!e)return;let t={};for(let i of e.getAttributeNames()){if(TR.includes(i))continue;let a=e.getAttribute(i);t[w0(i)]=""===a||a}return t}set themeProps(e){var t,i;yD(this,TK,Tj).call(this);let a={...this.themeProps,...e};for(let r in a){if(TR.includes(r))continue;let a=null==e?void 0:e[r];"boolean"==typeof a||null==a?null==(t=this.mediaTheme)||t.toggleAttribute(wJ(r),!!a):null==(i=this.mediaTheme)||i.setAttribute(wJ(r),a)}}get playbackId(){var e;return null!=(e=this.getAttribute(mE.PLAYBACK_ID))?e:void 0}set playbackId(e){e?this.setAttribute(mE.PLAYBACK_ID,e):this.removeAttribute(mE.PLAYBACK_ID)}get src(){var e,t;return this.playbackId?null!=(e=T7(this,TM.SRC))?e:void 0:null!=(t=this.getAttribute(TM.SRC))?t:void 0}set src(e){e?this.setAttribute(TM.SRC,e):this.removeAttribute(TM.SRC)}get poster(){var e;let t=this.getAttribute(TM.POSTER);if(null!=t)return t;let{tokens:i}=this;return i.playback&&!i.thumbnail?void Ta("Missing expected thumbnail token. No poster image will be shown"):this.playbackId&&!this.audio?((e,{token:t,customDomain:i=w8,thumbnailTime:a,programTime:r}={})=>{var n;let s=null==t?a:void 0,{aud:o}=null!=(n=cV(t))?n:{};if(!(t&&"t"!==o))return`https://image.${i}/${e}/thumbnail.webp${w2({token:t,time:s,program_time:r})}`})(this.playbackId,{customDomain:this.customDomain,thumbnailTime:null!=(e=this.thumbnailTime)?e:this.startTime,programTime:this.programStartTime,token:i.thumbnail}):void 0}set poster(e){e||""===e?this.setAttribute(TM.POSTER,e):this.removeAttribute(TM.POSTER)}get storyboardSrc(){var e;return null!=(e=this.getAttribute(TL.STORYBOARD_SRC))?e:void 0}set storyboardSrc(e){e?this.setAttribute(TL.STORYBOARD_SRC,e):this.removeAttribute(TL.STORYBOARD_SRC)}get storyboard(){let{tokens:e}=this;return this.storyboardSrc&&!e.storyboard?this.storyboardSrc:this.audio||!this.playbackId||!this.streamType||[cI,cS].includes(this.streamType)||e.playback&&!e.storyboard?void 0:((e,{token:t,customDomain:i=w8,programStartTime:a,programEndTime:r}={})=>{var n;let{aud:s}=null!=(n=cV(t))?n:{};if(!(t&&"s"!==s))return`https://image.${i}/${e}/storyboard.vtt${w2({token:t,format:"webp",program_start_time:a,program_end_time:r})}`})(this.playbackId,{customDomain:this.customDomain,token:e.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}get audio(){return this.hasAttribute(TL.AUDIO)}set audio(e){e?this.setAttribute(TL.AUDIO,""):this.removeAttribute(TL.AUDIO)}get hotkeys(){return yL(this,TH)}get nohotkeys(){return this.hasAttribute(TL.NOHOTKEYS)}set nohotkeys(e){e?this.setAttribute(TL.NOHOTKEYS,""):this.removeAttribute(TL.NOHOTKEYS)}get thumbnailTime(){return w1(this.getAttribute(TL.THUMBNAIL_TIME))}set thumbnailTime(e){this.setAttribute(TL.THUMBNAIL_TIME,`${e}`)}get videoTitle(){var e,t;return null!=(t=null!=(e=this.getAttribute(TL.VIDEO_TITLE))?e:this.getAttribute(TL.TITLE))?t:""}set videoTitle(e){e!==this.videoTitle&&(e?this.setAttribute(TL.VIDEO_TITLE,e):this.removeAttribute(TL.VIDEO_TITLE))}get placeholder(){var e;return null!=(e=T7(this,TL.PLACEHOLDER))?e:""}set placeholder(e){this.setAttribute(TL.PLACEHOLDER,`${e}`)}get primaryColor(){var e,t;let i=this.getAttribute(TL.PRIMARY_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=wZ.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_primary-color"))?void 0:t.trim()))return i}set primaryColor(e){this.setAttribute(TL.PRIMARY_COLOR,`${e}`)}get secondaryColor(){var e,t;let i=this.getAttribute(TL.SECONDARY_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=wZ.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_secondary-color"))?void 0:t.trim()))return i}set secondaryColor(e){this.setAttribute(TL.SECONDARY_COLOR,`${e}`)}get accentColor(){var e,t;let i=this.getAttribute(TL.ACCENT_COLOR);if(null!=i||this.mediaTheme&&(i=null==(t=null==(e=wZ.getComputedStyle(this.mediaTheme))?void 0:e.getPropertyValue("--_accent-color"))?void 0:t.trim()))return i}set accentColor(e){this.setAttribute(TL.ACCENT_COLOR,`${e}`)}get defaultShowRemainingTime(){return this.hasAttribute(TL.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(e){e?this.setAttribute(TL.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(TL.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(TL.PLAYBACK_RATES))return this.getAttribute(TL.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(e=>Number(e)).filter(e=>!Number.isNaN(e)).sort((e,t)=>
5769e-t)}set playbackRates(e){e?this.setAttribute(TL.PLAYBACK_RATES,e.join(" ")):this.removeAttribute(TL.PLAYBACK_RATES)}get forwardSeekOffset(){var e;return null!=(e=w1(this.getAttribute(TL.FORWARD_SEEK_OFFSET)))?e:10}set forwardSeekOffset(e){this.setAttribute(TL.FORWARD_SEEK_OFFSET,`${e}`)}get backwardSeekOffset(){var e;return null!=(e=w1(this.getAttribute(TL.BACKWARD_SEEK_OFFSET)))?e:10}set backwardSeekOffset(e){this.setAttribute(TL.BACKWARD_SEEK_OFFSET,`${e}`)}get defaultHiddenCaptions(){return this.hasAttribute(TL.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(e){e?this.setAttribute(TL.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(TL.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return w1(this.getAttribute(TL.DEFAULT_DURATION))}set defaultDuration(e){null==e?this.removeAttribute(TL.DEFAULT_DURATION):this.setAttribute(TL.DEFAULT_DURATION,`${e}`)}get playerInitTime(){return this.hasAttribute(mE.PLAYER_INIT_TIME)?w1(this.getAttribute(mE.PLAYER_INIT_TIME)):yL(this,TP)}set playerInitTime(e){e!=this.playerInitTime&&(null==e?this.removeAttribute(mE.PLAYER_INIT_TIME):this.setAttribute(mE.PLAYER_INIT_TIME,`${+e}`))}get playerSoftwareName(){var e;return null!=(e=this.getAttribute(mE.PLAYER_SOFTWARE_NAME))?e:T4}get playerSoftwareVersion(){var e;return null!=(e=this.getAttribute(mE.PLAYER_SOFTWARE_VERSION))?e:w7}get beaconCollectionDomain(){var e;return null!=(e=this.getAttribute(mE.BEACON_COLLECTION_DOMAIN))?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(mE.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(mE.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var e;return null!=(e=this.getAttribute(mE.MAX_RESOLUTION))?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(mE.MAX_RESOLUTION,e):this.removeAttribute(mE.MAX_RESOLUTION))}get minResolution(){var e;return null!=(e=this.getAttribute(mE.MIN_RESOLUTION))?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(mE.MIN_RESOLUTION,e):this.removeAttribute(mE.MIN_RESOLUTION))}get maxAutoResolution(){var e;return null!=(e=this.getAttribute(mE.MAX_AUTO_RESOLUTION))?e:void 0}set maxAutoResolution(e){null==e?this.removeAttribute(mE.MAX_AUTO_RESOLUTION):this.setAttribute(mE.MAX_AUTO_RESOLUTION,e)}get renditionOrder(){var e;return null!=(e=this.getAttribute(mE.RENDITION_ORDER))?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(mE.RENDITION_ORDER,e):this.removeAttribute(mE.RENDITION_ORDER))}get programStartTime(){return w1(this.getAttribute(mE.PROGRAM_START_TIME))}set programStartTime(e){null==e?this.removeAttribute(mE.PROGRAM_START_TIME):this.setAttribute(mE.PROGRAM_START_TIME,`${e}`)}get programEndTime(){return w1(this.getAttribute(mE.PROGRAM_END_TIME))}set programEndTime(e){null==e?this.removeAttribute(mE.PROGRAM_END_TIME):this.setAttribute(mE.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){return w1(this.getAttribute(mE.ASSET_START_TIME))}set assetStartTime(e){null==e?this.removeAttribute(mE.ASSET_START_TIME):this.setAttribute(mE.ASSET_START_TIME,`${e}`)}get assetEndTime(){return w1(this.getAttribute(mE.ASSET_END_TIME))}set assetEndTime(e){null==e?this.removeAttribute(mE.ASSET_END_TIME):this.setAttribute(mE.ASSET_END_TIME,`${e}`)}get extraSourceParams(){return this.hasAttribute(TL.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(TL.EXTRA_SOURCE_PARAMS)).entries()].reduce((e,[t,i])=>(e[t]=i,e),{}):T9}set extraSourceParams(e){null==e?this.removeAttribute(TL.EXTRA_SOURCE_PARAMS):this.setAttribute(TL.EXTRA_SOURCE_PARAMS,new URLSearchParams(e).toString())}get customDomain(){var e;return null!=(e=this.getAttribute(mE.CUSTOM_DOMAIN))?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(mE.CUSTOM_DOMAIN,e):this.removeAttribute(mE.CUSTOM_DOMAIN))}get envKey(){var e;return null!=(e=T7(this,mE.ENV_KEY))?e:void 0}set envKey(e){this.setAttribute(mE.ENV_KEY,`${e}`)}get noVolumePref(){return this.hasAttribute(TL.NO_VOLUME_PREF)}set noVolumePref(e){e?this.setAttribute(TL.NO_VOLUME_PREF,""):this.removeAttribute(TL.NO_VOLUME_PREF)}get noMutedPref(){return this.hasAttribute(TL.NO_MUTED_PREF)}set noMutedPref(e){e?this.setAttribute(TL.NO_MUTED_PREF,""):this.removeAttribute(TL.NO_MUTED_PREF)}get debug(){return null!=T7(this,mE.DEBUG)}set debug(e){e?this.setAttribute(mE.DEBUG,""):this.removeAttribute(mE.DEBUG)}get disableTracking(){return null!=T7(this,mE.DISABLE_TRACKING)}set disableTracking(e){this.toggleAttribute(mE.DISABLE_TRACKING,!!e)}get disableCookies(){return null!=T7(this,mE.DISABLE_COOKIES)}set disableCookies(e){e?this.setAttribute(mE.DISABLE_COOKIES,""):this.removeAttribute(mE.DISABLE_COOKIES)}get streamType(){var e,t,i;return null!=(i=null!=(t=this.getAttribute(mE.STREAM_TYPE))?t:null==(e=this.media)?void 0:e.streamType)?i:cS}set streamType(e){this.setAttribute(mE.STREAM_TYPE,`${e}`)}get defaultStreamType(){var e,t,i;return null!=(i=null!=(t=this.getAttribute(TL.DEFAULT_STREAM_TYPE))?t:null==(e=this.mediaController)?void 0:e.getAttribute(TL.DEFAULT_STREAM_TYPE))?i:cT}set defaultStreamType(e){e?this.setAttribute(TL.DEFAULT_STREAM_TYPE,e):this.removeAttribute(TL.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var e,t;return this.hasAttribute(TL.TARGET_LIVE_WINDOW)?+this.getAttribute(TL.TARGET_LIVE_WINDOW):null!=(t=null==(e=this.media)?void 0:e.targetLiveWindow)?t:NaN}
5769set targetLiveWindow(e){e==this.targetLiveWindow||Number.isNaN(e)&&Number.isNaN(this.targetLiveWindow)||(null==e?this.removeAttribute(TL.TARGET_LIVE_WINDOW):this.setAttribute(TL.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e;return null==(e=this.media)?void 0:e.liveEdgeStart}get startTime(){return w1(T7(this,mE.START_TIME))}set startTime(e){this.setAttribute(mE.START_TIME,`${e}`)}get preferPlayback(){let e=this.getAttribute(mE.PREFER_PLAYBACK);if("mse"===e||e===cC)return e}set preferPlayback(e){e!==this.preferPlayback&&("mse"===e||e===cC?this.setAttribute(mE.PREFER_PLAYBACK,e):this.removeAttribute(mE.PREFER_PLAYBACK))}get metadata(){var e;return null==(e=this.media)?void 0:e.metadata}set metadata(e){(yD(this,TK,Tj).call(this),this.media)?this.media.metadata={...TD(this),...e}:Tr("underlying media element missing when trying to set metadata. metadata will not be set.")}get _hlsConfig(){var e;return null==(e=this.media)?void 0:e._hlsConfig}set _hlsConfig(e){(yD(this,TK,Tj).call(this),this.media)?this.media._hlsConfig=e:Tr("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.")}async addCuePoints(e){var t;return(yD(this,TK,Tj).call(this),this.media)?null==(t=this.media)?void 0:t.addCuePoints(e):void Tr("underlying media element missing when trying to addCuePoints. cuePoints will not be added.")}get activeCuePoint(){var e;return null==(e=this.media)?void 0:e.activeCuePoint}get cuePoints(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.cuePoints)?t:[]}addChapters(e){var t;return(yD(this,TK,Tj).call(this),this.media)?null==(t=this.media)?void 0:t.addChapters(e):void Tr("underlying media element missing when trying to addChapters. chapters will not be added.")}get activeChapter(){var e;return null==(e=this.media)?void 0:e.activeChapter}get chapters(){var e,t;return null!=(t=null==(e=this.media)?void 0:e.chapters)?t:[]}getStartDate(){var e;return null==(e=this.media)?void 0:e.getStartDate()}get currentPdt(){var e;return null==(e=this.media)?void 0:e.currentPdt}get tokens(){let e=this.getAttribute(TL.PLAYBACK_TOKEN),t=this.getAttribute(TL.DRM_TOKEN),i=this.getAttribute(TL.THUMBNAIL_TOKEN),a=this.getAttribute(TL.STORYBOARD_TOKEN);return{...yL(this,TO),...null!=e?{playback:e}:{},...null!=t?{drm:t}:{},...null!=i?{thumbnail:i}:{},...null!=a?{storyboard:a}:{}}}set tokens(e){yx(this,TO,null!=e?e:{})}get playbackToken(){var e;return null!=(e=this.getAttribute(TL.PLAYBACK_TOKEN))?e:void 0}set playbackToken(e){this.setAttribute(TL.PLAYBACK_TOKEN,`${e}`)}get drmToken(){var e;return null!=(e=this.getAttribute(TL.DRM_TOKEN))?e:void 0}set drmToken(e){this.setAttribute(TL.DRM_TOKEN,`${e}`)}get thumbnailToken(){var e;return null!=(e=this.getAttribute(TL.THUMBNAIL_TOKEN))?e:void 0}set thumbnailToken(e){this.setAttribute(TL.THUMBNAIL_TOKEN,`${e}`)}get storyboardToken(){var e;return null!=(e=this.getAttribute(TL.STORYBOARD_TOKEN))?e:void 0}set storyboardToken(e){this.setAttribute(TL.STORYBOARD_TOKEN,`${e}`)}addTextTrack(e,t,i,a){var r;let n=null==(r=this.media)?void 0:r.nativeEl;if(n)return cQ(n,e,t,i,a)}removeTextTrack(e){var t;let i=null==(t=this.media)?void 0:t.nativeEl;if(i){let t;return void(null==(t=Array.prototype.find.call(i.querySelectorAll("track"),t=>t.track===e))||t.remove())}}get textTracks(){var e;return null==(e=this.media)?void 0:e.textTracks}get castReceiver(){var e;return null!=(e=this.getAttribute(TL.CAST_RECEIVER))?e:void 0}set castReceiver(e){e!==this.castReceiver&&(e?this.setAttribute(TL.CAST_RECEIVER,e):this.removeAttribute(TL.CAST_RECEIVER))}get castCustomData(){var e;return null==(e=this.media)?void 0:e.castCustomData}set castCustomData(e){this.media?this.media.castCustomData=e:Tr("underlying media element missing when trying to set castCustomData. castCustomData will not be set.")}get noTooltips(){return this.hasAttribute(TL.NO_TOOLTIPS)}set noTooltips(e){e?this.setAttribute(TL.NO_TOOLTIPS,""):this.removeAttribute(TL.NO_TOOLTIPS)}get proudlyDisplayMuxBadge(){return this.hasAttribute(TL.PROUDLY_DISPLAY_MUX_BADGE)}set proudlyDisplayMuxBadge(e){e?this.setAttribute(TL.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(TL.PROUDLY_DISPLAY_MUX_BADGE)}get capRenditionToPlayerSize(){var e;return null==(e=this.media)?void 0:e.capRenditionToPlayerSize}set capRenditionToPlayerSize(e){this.media?this.media.capRenditionToPlayerSize=e:Tr("underlying media element missing when trying to set capRenditionToPlayerSize")}};function T7(e,t){return e.media?e.media.getAttribute(t):e.getAttribute(t)}TP=new WeakMap,TN=new WeakMap,TO=new WeakMap,TU=new WeakMap,TH=new WeakMap,TW=new WeakMap,TB=new WeakMap,T$=new WeakMap,TV=new WeakMap,Tq=new WeakMap,TF=new WeakMap,TG=new WeakMap,TK=new WeakSet,Tj=function(){var e,t,i,a;if(!yL(this,TN)){yx(this,TN,!0),yD(this,TK,Tz).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof wZ.HTMLElement))throw""}catch{Tr("<media-theme> failed to upgrade!")}try{customElements.upgrade(this.media)}catch{Tr("underlying media element failed to upgrade!")}
5769try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof bC))throw""}catch{Tr("<media-controller> failed to upgrade!")}yD(this,TK,TZ).call(this),yD(this,TK,TX).call(this),yD(this,TK,TJ).call(this),yx(this,TU,null==(t=null==(e=this.mediaController)?void 0:e.hasAttribute(vk))||t),yD(this,TK,T0).call(this),null==(i=this.media)||i.addEventListener("streamtypechange",yL(this,TB)),null==(a=this.media)||a.addEventListener("loadstart",yL(this,T$))}},TY=function(){var e,t;try{null==(e=null==window?void 0:window.CSS)||e.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),null==(t=null==window?void 0:window.CSS)||t.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch{}},TQ=function(e){Object.assign(yL(this,TF),e),yD(this,TK,Tz).call(this)},Tz=function(e={}){var t,i,a,r,n,s,o,l,d,u,c,h,m,v,b,g,E,f,y,_,k,A,w,T,I,S,C,M,L,R,x,D,P,N,O,U,H,W,B,$,V,q,F,G,K,j,Y,Q;let z,Z,X,J;t={...yL(this,TF),...e},z={src:!this.playbackId&&this.src,playbackId:this.playbackId,hasSrc:!!this.playbackId||!!this.src||!!this.currentSrc,poster:this.poster,storyboard:(null==(i=this.media)?void 0:i.currentSrc)&&this.storyboard,storyboardSrc:this.getAttribute(TL.STORYBOARD_SRC),fullscreenElement:this.getAttribute(TL.FULLSCREEN_ELEMENT),placeholder:this.getAttribute("placeholder"),themeTemplate:function(e){var t,i;let a=e.theme;if(a){let r=null==(i=null==(t=e.getRootNode())?void 0:t.getElementById)?void 0:i.call(t,a);if(r&&r instanceof HTMLTemplateElement)return r;a.startsWith("media-theme-")||(a=`media-theme-${a}`);let n=wZ.customElements.get(a);if(null!=n&&n.template)return n.template}}(this),thumbnailTime:!this.tokens.thumbnail&&this.thumbnailTime,autoplay:this.autoplay,crossOrigin:this.crossOrigin,loop:this.loop,noHotKeys:this.hasAttribute(TL.NOHOTKEYS),hotKeys:this.getAttribute(TL.HOTKEYS),muted:this.muted,paused:this.paused,preload:this.preload,envKey:this.envKey,preferCmcd:this.preferCmcd,debug:this.debug,disableTracking:this.disableTracking,disableCookies:this.disableCookies,tokens:this.tokens,beaconCollectionDomain:this.beaconCollectionDomain,maxResolution:this.maxResolution,minResolution:this.minResolution,maxAutoResolution:this.maxAutoResolution,programStartTime:this.programStartTime,programEndTime:this.programEndTime,assetStartTime:this.assetStartTime,assetEndTime:this.assetEndTime,renditionOrder:this.renditionOrder,metadata:this.metadata,playerInitTime:this.playerInitTime,playerSoftwareName:this.playerSoftwareName,playerSoftwareVersion:this.playerSoftwareVersion,startTime:this.startTime,preferPlayback:this.preferPlayback,audio:this.audio,defaultStreamType:this.defaultStreamType,targetLiveWindow:this.getAttribute(mE.TARGET_LIVE_WINDOW),streamType:w6(this.getAttribute(mE.STREAM_TYPE)),primaryColor:this.getAttribute(TL.PRIMARY_COLOR),secondaryColor:this.getAttribute(TL.SECONDARY_COLOR),accentColor:this.getAttribute(TL.ACCENT_COLOR),forwardSeekOffset:this.forwardSeekOffset,backwardSeekOffset:this.backwardSeekOffset,defaultHiddenCaptions:this.defaultHiddenCaptions,defaultDuration:this.defaultDuration,defaultShowRemainingTime:this.defaultShowRemainingTime,hideDuration:(Z=null==(n=this.mediaController)?void 0:n.querySelector("media-time-display"))&&"none"===getComputedStyle(Z).getPropertyValue("--media-duration-display-display").trim(),playbackRates:this.getAttribute(TL.PLAYBACK_RATES),customDomain:null!=(a=this.getAttribute(mE.CUSTOM_DOMAIN))?a:void 0,title:this.getAttribute(TL.TITLE),videoTitle:null!=(r=this.getAttribute(TL.VIDEO_TITLE))?r:this.getAttribute(TL.TITLE),novolumepref:this.hasAttribute(TL.NO_VOLUME_PREF),nomutedpref:this.hasAttribute(TL.NO_MUTED_PREF),proudlyDisplayMuxBadge:this.hasAttribute(TL.PROUDLY_DISPLAY_MUX_BADGE),castReceiver:this.castReceiver,disablePseudoEnded:this.hasAttribute(TL.DISABLE_PSEUDO_ENDED),capRenditionToPlayerSize:this.capRenditionToPlayerSize,...t,extraSourceParams:this.extraSourceParams},s=Ty` 5770 <style> 5771 ${(e=>{let{tokens:t}=e;return t.drm?":host(:not([cast-receiver])) { --_cast-button-drm-display: none; }":""})(z)} 5772 ${Th} 5773 </style> 5774 ${l=z,Ty` 5775 <media-theme 5776 template="${l.themeTemplate||!1}" 5777 defaultstreamtype="${null!=(d=l.defaultStreamType)&&d}" 5778 hotkeys="${X=l.hotKeys?`${l.hotKeys}`:"","live"===w6(l.streamType)&&(X+=" noarrowleft noarrowright"),X||!1}" 5779 nohotkeys="${l.noHotKeys||!l.hasSrc||!1}" 5780 noautoseektolive="${!!(null!=(u=l.streamType)&&u.includes(cI))&&0!==l.targetLiveWindow}" 5781 novolumepref="${l.novolumepref||!1}" 5782 nomutedpref="${l.nomutedpref||!1}" 5783 disabled="${!l.hasSrc||l.isDialogOpen}" 5784 audio="${null!=(c=l.audio)&&c}" 5785 style="${null!=(Q={"--media-primary-color":l.primaryColor,"--media-secondary-color":l.secondaryColor,"--media-accent-color":l.accentColor}
5785,J="",Object.entries(Q).forEach(([e,t])=>{null!=t&&(J+=`${wJ(e)}: ${t}; `)}),h=J?J.trim():void 0)&&h}" 5786 defaultsubtitles="${!l.defaultHiddenCaptions}" 5787 forwardseekoffset="${null!=(m=l.forwardSeekOffset)&&m}" 5788 backwardseekoffset="${null!=(v=l.backwardSeekOffset)&&v}" 5789 playbackrates="${null!=(b=l.playbackRates)&&b}" 5790 defaultshowremainingtime="${null!=(g=l.defaultShowRemainingTime)&&g}" 5791 defaultduration="${null!=(E=l.defaultDuration)&&E}" 5792 hideduration="${null!=(f=l.hideDuration)&&f}" 5793 title="${null!=(y=l.title)&&y}" 5794 videotitle="${null!=(_=l.videoTitle)&&_}" 5795 proudlydisplaymuxbadge="${null!=(k=l.proudlyDisplayMuxBadge)&&k}" 5796 exportparts="${T_}" 5797 onclose="${l.onCloseErrorDialog}" 5798 onfocusin="${l.onFocusInErrorDialog}" 5799 > 5800 <mux-video 5801 slot="media" 5802 inert="${null!=(A=l.noHotKeys)&&A}" 5803 target-live-window="${null!=(w=l.targetLiveWindow)&&w}" 5804 stream-type="${null!=(T=w6(l.streamType))&&T}" 5805 crossorigin="${null!=(I=l.crossOrigin)?I:""}" 5806 playsinline 5807 autoplay="${null!=(S=l.autoplay)&&S}" 5808 muted="${null!=(C=l.muted)&&C}" 5809 loop="${null!=(M=l.loop)&&M}" 5810 preload="${null!=(L=l.preload)&&L}" 5811 debug="${null!=(R=l.debug)&&R}" 5812 prefer-cmcd="${null!=(x=l.preferCmcd)&&x}" 5813 disable-tracking="${null!=(D=l.disableTracking)&&D}" 5814 disable-cookies="${null!=(P=l.disableCookies)&&P}" 5815 prefer-playback="${null!=(N=l.preferPlayback)&&N}" 5816 start-time="${null!=l.startTime&&l.startTime}" 5817 beacon-collection-domain="${null!=(O=l.beaconCollectionDomain)&&O}" 5818 player-init-time="${null!=(U=l.playerInitTime)&&U}" 5819 player-software-name="${null!=(H=l.playerSoftwareName)&&H}" 5820 player-software-version="${null!=(W=l.playerSoftwareVersion)&&W}" 5821 env-key="${null!=(B=l.envKey)&&B}" 5822 custom-domain="${null!=($=l.customDomain)&&$}" 5823 src="${l.src?l.src:!!l.playbackId&&hw(l)}" 5824 cast-src="${l.src?l.src:!!l.playbackId&&hw(l)}" 5825 cast-receiver="${null!=(V=l.castReceiver)&&V}" 5826 drm-token="${null!=(F=null==(q=l.tokens)?void 0:q.drm)&&F}" 5827 exportparts="video" 5828 disable-pseudo-ended="${null!=(G=l.disablePseudoEnded)&&G}" 5829 max-auto-resolution="${null!=(K=l.maxAutoResolution)&&K}" 5830 cap-rendition-to-player-size="${null!=(j=l.capRenditionToPlayerSize)&&j}" 5831 > 5832 ${l.storyboard?Ty`<track label="thumbnails" default kind="metadata" src="${l.storyboard}" />
5832`:Ty``} 5833 <slot></slot> 5834 </mux-video> 5835 <slot name="poster" slot="poster"> 5836 <media-poster-image 5837 part="poster" 5838 exportparts="poster, img" 5839 src="${!!l.poster&&l.poster}" 5840 placeholdersrc="${null!=(Y=l.placeholder)&&Y}" 5841 ></media-poster-image> 5842 </slot> 5843 </media-theme> 5844`} 5845`,o=this.shadowRoot,s.renderInto(o)},TZ=function(){let e=e=>{var t,i;if(!(null!=e&&e.startsWith("theme-")))return;let a=e.replace(/^theme-/,"");if(TR.includes(a))return;let r=this.getAttribute(e);null!=r?null==(t=this.mediaTheme)||t.setAttribute(a,r):null==(i=this.mediaTheme)||i.removeAttribute(a)};yx(this,TW,new MutationObserver(t=>{for(let{attributeName:i}of t)e(i)})),yL(this,TW).observe(this,{attributes:!0}),this.getAttributeNames().forEach(e)},TX=function(){this.addEventListener("error",yL(this,TG)),this.media&&(this.media.errorTranslator=(e={})=>{var t,i,a;if(!((null==(t=this.media)?void 0:t.error)instanceof ck))return e;let r=TA(null==(i=this.media)?void 0:i.error,!1);return{player_error_code:null==(a=this.media)?void 0:a.error.code,player_error_message:r.message?String(r.message):e.player_error_message,player_error_context:r.context?String(r.context):e.player_error_context}})},TJ=function(){var e,t,i,a;null==(t=null==(e=this.media)?void 0:e.textTracks)||t.addEventListener("addtrack",yL(this,TV)),null==(a=null==(i=this.media)?void 0:i.textTracks)||a.addEventListener("removetrack",yL(this,TV))},T0=function(){var e,t;if(!/Firefox/i.test(navigator.userAgent))return;let i,a=new WeakMap,r=()=>this.streamType===cI&&!this.secondaryColor&&this.offsetWidth>=800,n=(e,t,i=!1)=>{r()||Array.from(e&&e.activeCues||[]).forEach(e=>{if(!(!e.snapToLines||e.line<-5||e.line>=0&&e.line<10))if(!t||this.paused){let t=e.text.split(` 5846`).length,r=-3;this.streamType===cI&&(r=-2);let n=r-t;if(e.line===n&&!i)return;a.has(e)||a.set(e,e.line),e.line=n}else setTimeout(()=>{e.line=a.get(e)||"auto"},500)})},s=()=>{var e,t;n(i,null!=(t=null==(e=this.mediaController)?void 0:e.hasAttribute(vk))&&t)},o=()=>{var e,t;let a=Array.from((null==(t=null==(e=this.mediaController)?void 0:e.media)?void 0:t.textTracks)||[]).filter(e=>["subtitles","captions"].includes(e.kind)&&"showing"===e.mode)[0];a!==i&&(null==i||i.removeEventListener("cuechange",s)),null==(i=a)||i.addEventListener("cuechange",s),n(i,yL(this,TU))};o(),null==(e=this.textTracks)||e.addEventListener("change",o),null==(t=this.textTracks)||t.addEventListener("addtrack",o);let l=()=>{var e,t;let a=null==(t=null==(e=this.mediaController)?void 0:e.hasAttribute(vk))||t;yL(this,TU)!==a&&(yx(this,TU,a),n(i,yL(this,TU)))};this.addEventListener("userinactivechange",l),yx(this,Tq,()=>{var e,t;null==i||i.removeEventListener("cuechange",s),null==(e=this.textTracks)||e.removeEventListener("change",o),null==(t=this.textTracks)||t.removeEventListener("addtrack",o),this.removeEventListener("userinactivechange",l)})};var T6=e=>{throw TypeError(e)},Ie=(e,t,i)=>t.has(e)||T6("Cannot "+i),It=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if("u"<typeof DocumentFragment){class e extends It{}globalThis.DocumentFragment=e}var Ii,Ia=class extends It{},Ir=class{constructor(e,t={}){((e,t,i)=>t.has(e)?T6("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i))(this,Ii),((e,t,i,a)=>(Ie(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,Ii,null==t?void 0:t.detail)}get detail(){let e,t;return Ie(this,e=Ii,"read from private field"),t?t.call(this):e.get(this)}initCustomEvent(){}};Ii=new WeakMap;var In={document:{createElement:function(e,t){return new Ia}},DocumentFragment,customElements:{get(e){},define(e,t,i){},getName:e=>null,upgrade(e){},whenDefined:e=>Promise.resolve(Ia)},CustomEvent:Ir,EventTarget:It,HTMLElement:Ia,HTMLVideoElement:class extends It{}},Is="u"<typeof window||void 0===globalThis.customElements,Io=Is?In:globalThis;Is&&In.document,Io.customElements.get("mux-player")||(Io.customElements.define("mux-player",T8),Io.MuxPlayerElement=T8);var Il=parseInt(ny.version)>=19,Id={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInl
5846ine:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},Iu=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{ref:t,...i}=e;return Object.entries(i).reduce((e,t)=>{let[i,a]=t,r=((e,t)=>{if(!(!Il&&"boolean"==typeof t&&!t)){let i,a;if(i=e,null!=(a=Id)&&i in a)return Id[e];if(void 0!==t)return/[A-Z]/.test(e)?e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`):e}})(i,a);if(!r)return e;let n=Il||"boolean"!=typeof a?a:"";return e[r]=n,e},{})};function Ic(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}var Ih=Object.prototype.hasOwnProperty,Im=(e,t,i)=>!((e,t)=>{if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(Array.isArray(e))return!!Array.isArray(t)&&e.length===t.length&&e.some((e,i)=>t[i]===e);let i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(let a=0;a<i.length;a++)if(!Ih.call(t,i[a])||!Object.is(e[i[a]],t[i[a]]))return!1;return!0})(t,e[i]),Ip=(e,t,i)=>{e[i]=t},Iv=function(e,t,i){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ip,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Im;return(0,ny.useEffect)(()=>{let n=null==i?void 0:i.current;n&&r(n,t,e)&&a(n,t,e)},[null==i?void 0:i.current,t])},Ib=(()=>{try{return"3.11.7"}catch{}return"UNKNOWN"})(),Ig=(e,t,i)=>(0,ny.useEffect)(()=>{let a=null==t?void 0:t.current;if(a&&i)return a.addEventListener(e,i),()=>{a.removeEventListener(e,i)}},[null==t?void 0:t.current,i,e]),IE=ny.forwardRef((e,t)=>{let{children:i,...a}=e;return ny.createElement("mux-player",{suppressHydrationWarning:!0,...Iu(a),ref:t},i)}),If=ny.forwardRef((e,t)=>{var i;let a=(0,ny.useRef)(null),r=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return ny.useCallback(function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return e=>{let i=!1,a=t.map(t=>{let a=Ic(t,e);return i||"function"!=typeof a||(i=!0),a});if(i)return()=>{for(let e=0;e<a.length;e++){let i=a[e];"function"==typeof i?i():Ic(t[e],null)}}}}(...t),t)}(a,t),[n]=((e,t)=>{let{onAbort:i,onCanPlay:a,onCanPlayThrough:r,onEmptied:n,onLoadStart:s,onLoadedData:o,onLoadedMetadata:l,onProgress:d,onDurationChange:u,onVolumeChange:c,onRateChange:h,onResize:m,onWaiting:v,onPlay:b,onPlaying:g,onTimeUpdate:E,onPause:f,onSeeking:y,onSeeked:_,onStalled:k,onSuspend:A,onEnded:w,onError:T,onCuePointChange:I,onChapterChange:S,metadata:C,tokens:M,paused:L,playbackId:R,playbackRates:x,currentTime:D,themeProps:P,extraSourceParams:N,castCustomData:O,_hlsConfig:U,...H}=t;return Iv("tokens",M,e),Iv("playbackId",R,e),Iv("playbackRates",x,e),Iv("metadata",C,e),Iv("extraSourceParams",N,e),Iv("_hlsConfig",U,e),Iv("themeProps",P,e),Iv("castCustomData",O,e),Iv("paused",L,e,(e,t)=>{null!=t&&(t?e.pause():e.play())},(e,t,i)=>(!e.hasAttribute("autoplay")||!!e.hasPlayed)&&Im(e,t,i)),Iv("currentTime",D,e,(e,t)=>{null!=t&&(e.currentTime=t)}),Ig("abort",e,i),Ig("canplay",e,a),Ig("canplaythrough",e,r),Ig("emptied",e,n),Ig("loadstart",e,s),Ig("loadeddata",e,o),Ig("loadedmetadata",e,l),Ig("progress",e,d),Ig("durationchange",e,u),Ig("volumechange",e,c),Ig("ratechange",e,h),Ig("resize",e,m),Ig("waiting",e,v),Ig("play",e,b),Ig("playing",e,g),Ig("timeupdate",e,E),Ig("pause",e,f),Ig("seeking",e,y),Ig("seeked",e,_),Ig("stalled",e,k),Ig("suspend",e,A),Ig("ended",e,w),Ig("error",e,T),Ig("cuepointchange",e,I),Ig("chapterchange",e,S),[H]})(a,e),[s]=(0,ny.useState)(null!=(i=e.playerInitTime)?i:hk());return ny.createElement(IE,{ref:r,defaultHiddenCaptions:e.defaultHiddenCaptions,playerSoftwareName:"mux-player-react",playerSoftwareVersion:Ib,playerInitTime:s,...n})});function Iy(e){let t,i,a=(0,d.c)(5),{customDomain:r,playbackId:n,tokens:s}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t={position:"absolute",inset:0},a[0]=t):t=a[0],a[1]!==r||a[2]!==n||a[3]!==s?(i=(0,l.jsx)(If,{customDomain:r,theme:"sutro",playbackId:n,tokens:s,autoPlay:!1,loop:!1,style:t}),a[1]=r,a[2]=n,a[3]=s,a[4]=i):i=a[4],i}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.