1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5bd85f18-3cec-4830-ad2c-ba8276caeb0f",e._sentryDebugIdIdentifier="sentry-dbid-5bd85f18-3cec-4830-ad2c-ba8276caeb0f")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8092],{52047:(e,t,i)=>{let a=["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"],r=["autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"];function s(e){return` 2 <style> 3 :host { 4 display: inline-flex; 5 line-height: 0; 6 flex-direction: column; 7 justify-content: end; 8 } 9 10 audio { 11 width: 100%; 12 } 13 </style> 14 <slot name="media"> 15 <audio${l(e)}></audio> 16 </slot> 17 <slot></slot> 18 `}function n(e){return` 19 <style> 20 :host { 21 display: inline-block; 22 line-height: 0; 23 } 24 25 video { 26 max-width: 100%; 27 max-height: 100%; 28 min-width: 100%; 29 min-height: 100%; 30 object-fit: var(--media-object-fit, contain); 31 object-position: var(--media-object-position, 50% 50%); 32 } 33 34 video::-webkit-media-text-track-container { 35 transform: var(--media-webkit-text-track-transform); 36 transition: var(--media-webkit-text-track-transition); 37 } 38 </style> 39 <slot name="media"> 40 <video${l(e)}></video> 41 </slot> 42 <slot></slot> 43 `}function o(e,{tag:t,is:i}){let o=globalThis.document?.createElement?.(t,{is:i}),l=o?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}(o):[];return class d extends e{static getTemplateHTML=t.endsWith("audio")?s:n;static shadowRootOptions={mode:"open"};static Events=a;static #e=!1;static get observedAttributes(){return d.#t(),[...o?.constructor?.observedAttributes??[],...r]}static #t(){if(this.#e)return;this.#e=!0;let e=new Set(this.observedAttributes);for(let t of(e.delete("muted"),l))if(!(t in this.prototype))if("function"==typeof o[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();return e.has(a)?void(!0===i||!1===i||null==i?this.toggleAttribute(a,!!i):this.setAttribute(a,i)):this.set?void this.set(t,i):void(this.nativeEl&&(this.nativeEl[t]=i))}),Object.defineProperty(this.prototype,t,i)}}#a=!1;#r=null;#s=new Map;#n;#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"),l))this.#l(e);this.#d()}#d(){for(let e of(this.#n=new MutationObserver(this.#u.bind(this)),this.#o=()=>this.#h(),this.shadowRoot?.addEventListener("slotchange",this.#o),this.#h(),this.constructor.Events))this.shadowRoot?.addEventListener(e,this,!0)}handleEvent(e){e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{detail:e.detail}))}#h(){let e=new Map(this.#s),t=this.shadowRoot?.querySelector("slot:not([name])");(t?.assignedElements({flatten:!0}).filter(e=>
43["track","source"].includes(e.localName))).forEach(t=>{e.delete(t);let i=this.#s.get(t);i||(i=t.cloneNode(),this.#s.set(t,i),this.#n?.observe(t,{attributes:!0})),this.nativeEl?.append(i),this.#c(i)}),e.forEach((e,t)=>{e.remove(),this.#s.delete(t)})}#u(e){for(let t of e)if("attributes"===t.type){let{target:e,attributeName:i}=t,a=this.#s.get(e);a&&i&&(a.setAttribute(i,e.getAttribute(i)??""),this.#c(a))}}#c(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)&&(!d.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.#n?.disconnect(),this.#n=void 0,this.#o&&(this.shadowRoot?.removeEventListener("slotchange",this.#o),this.#o=void 0),this.constructor.Events))this.shadowRoot?.removeEventListener(e,this,!0);this.#s.forEach(e=>e.remove()),this.#s.clear(),this.#r=null}}}function l(e){let t="";for(let i in e){if(!r.includes(i))continue;let a=e[i];""===a?t+=` ${i}`:t+=` ${i}="${a}"`}return t}let d=o(globalThis.HTMLElement??class{},{tag:"video"});o(globalThis.HTMLElement??class{},{tag:"audio"});class u extends Event{track;constructor(e,t){super(e),this.track=t.track}}let h=new WeakMap;function c(e){var t,i;let a;return h.get(e)??(t=e,i={},(a=h.get(t))||h.set(t,a={}),Object.assign(a,i))}function m(e,t){let i=e.videoTracks;c(t).media=new WeakRef(e),c(t).renditionSet||(c(t).renditionSet=new Set);let a=c(i).trackSet;a.add(t);let r=a.size-1;r in E.prototype||Object.defineProperty(E.prototype,r,{get(){return[...c(this).trackSet][r]}}),queueMicrotask(()=>{i.dispatchEvent(new u("addtrack",{track:t}))})}function p(e){let t=c(e).media?.deref()?.videoTracks;t&&(c(t).trackSet.delete(e),queueMicrotask(()=>{t.dispatchEvent(new u("removetrack",{track:e}))}))}class E extends EventTarget{#p;#E;#v;constructor(){super(),c(this).trackSet=new Set}get #b(){return c(this).trackSet}[Symbol.iterator](){return this.#b.values()}get length(){return this.#b.size}getTrackById(e){return[...this.#b].find(t=>t.id===e)??null}get selectedIndex(){return[...this.#b].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.#E}set onremovetrack(e){this.#E&&(this.removeEventListener("removetrack",this.#E),this.#E=void 0),"function"==typeof e&&(this.#E=e,this.addEventListener("removetrack",e))}get onchange(){return this.#v}set onchange(e){this.#v&&(this.removeEventListener("change",this.#v),this.#v=void 0),"function"==typeof e&&(this.#v=e,this.addEventListener("change",e))}}class v extends Event{rendition;constructor(e,t){super(e),this.rendition=t.rendition}}function b(e){let t=c(e).media?.deref();return t?[...t.videoTracks].filter(e=>e.selected).flatMap(e=>[...c(e).renditionSet]):[]}class g extends EventTarget{#g;#f;#v;[Symbol.iterator](){return b(this).values()}get length(){return b(this).length}getRenditionById(e){return b(this).find(t=>`${t.id}`==`${e}`)??null}get selectedIndex(){return b(this).findIndex(e=>e.selected)}set selectedIndex(e){for(let[t,i]of b(this).entries())i.selected=t===e}get onaddrendition(){return this.#g}set onaddrendition(e){this.#g&&(this.removeEventListener("addrendition",this.#g),this.#g=void 0),"function"==typeof e&&(this.#g=e,this.addEventListener("addrendition",e))}get onremoverendition(){return this.#f}set onremoverendition(e){this.#f&&(this.removeEventListener("removerendition",this.#f),this.#f=void 0),"function"==typeof e&&(this.#f=e,this.addEventListener("removerendition",e))}get onchange(){return this.#v}set onchange(e){this.#v&&(this.removeEventListener("change",this.#v),this.#v=void 0),"function"==typeof e&&(this.#v=e,this.addEventListener("change",e))}}class f{src;id;width;height;bitrate;frameRate;codec;#A=!1;get selected(){return this.#A}set selected(e){if(this.#A!==e){this.#A=e;var t=this;let i=c(t).media?.deref()?.videoRenditions;i&&!c(i).changeRequested&&(c(i).changeRequested=!0,queueMicrotask(()=>{delete c(i).changeRequested,c(t).track.selected&&i.dispatchEvent(new Event("change"))}))}}}class A{id;kind;label="";language="";sourceBuffer;#A=!1;addRendition(e,t,i,a,r,s){let n=new f;return n.src=e,n.width=t,n.height=i,n.frameRate=s,n.bitrate=r,n.codec=a,!function(e,t){let i=c(e).media?.deref()?.videoRenditions;c(t).media=c(e).media,c(t).track=e;let a=c(e).renditionSet;a.add(t);let r=a.size-1;
43r in g.prototype||Object.defineProperty(g.prototype,r,{get(){return b(this)[r]}}),queueMicrotask(()=>{i&&e.selected&&i.dispatchEvent(new v("addrendition",{rendition:t}))})}(this,n),n}removeRendition(e){let t=c(e).media?.deref()?.videoRenditions,i=c(e).track;c(i).renditionSet.delete(e),queueMicrotask(()=>{let i=c(e).track;t&&i.selected&&t.dispatchEvent(new v("removerendition",{rendition:e}))})}get selected(){return this.#A}set selected(e){this.#A!==e&&(this.#A=e,!0===e&&function(e){let t=c(e).media?.deref()?.videoTracks??[],i=!1;for(let a of t)a!==e&&(a.selected=!1,i=!0);if(i){if(c(t).changeRequested)return;c(t).changeRequested=!0,queueMicrotask(()=>{delete c(t).changeRequested,t.dispatchEvent(new Event("change"))})}}(this))}}function T(e){let t=c(e).media?.deref();return t?[...t.audioTracks].filter(e=>e.enabled).flatMap(e=>[...c(e).renditionSet]):[]}class _ extends EventTarget{#g;#f;#v;[Symbol.iterator](){return T(this).values()}get length(){return T(this).length}getRenditionById(e){return T(this).find(t=>`${t.id}`==`${e}`)??null}get selectedIndex(){return T(this).findIndex(e=>e.selected)}set selectedIndex(e){for(let[t,i]of T(this).entries())i.selected=t===e}get onaddrendition(){return this.#g}set onaddrendition(e){this.#g&&(this.removeEventListener("addrendition",this.#g),this.#g=void 0),"function"==typeof e&&(this.#g=e,this.addEventListener("addrendition",e))}get onremoverendition(){return this.#f}set onremoverendition(e){this.#f&&(this.removeEventListener("removerendition",this.#f),this.#f=void 0),"function"==typeof e&&(this.#f=e,this.addEventListener("removerendition",e))}get onchange(){return this.#v}set onchange(e){this.#v&&(this.removeEventListener("change",this.#v),this.#v=void 0),"function"==typeof e&&(this.#v=e,this.addEventListener("change",e))}}class k{src;id;bitrate;codec;#A=!1;get selected(){return this.#A}set selected(e){if(this.#A!==e){this.#A=e;var t=this;let i=c(t).media?.deref()?.audioRenditions;i&&!c(i).changeRequested&&(c(i).changeRequested=!0,queueMicrotask(()=>{delete c(i).changeRequested,c(t).track.enabled&&i.dispatchEvent(new Event("change"))}))}}}function y(e,t){let i=e.audioTracks;c(t).media=new WeakRef(e),c(t).renditionSet||(c(t).renditionSet=new Set);let a=c(i).trackSet;a.add(t);let r=a.size-1;r in w.prototype||Object.defineProperty(w.prototype,r,{get(){return[...c(this).trackSet][r]}}),queueMicrotask(()=>{i.dispatchEvent(new u("addtrack",{track:t}))})}function I(e){let t=c(e).media?.deref()?.audioTracks;t&&(c(t).trackSet.delete(e),queueMicrotask(()=>{t.dispatchEvent(new u("removetrack",{track:e}))}))}class w extends EventTarget{#p;#E;#v;constructor(){super(),c(this).trackSet=new Set}get #b(){return c(this).trackSet}[Symbol.iterator](){return this.#b.values()}get length(){return this.#b.size}getTrackById(e){return[...this.#b].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.#E}set onremovetrack(e){this.#E&&(this.removeEventListener("removetrack",this.#E),this.#E=void 0),"function"==typeof e&&(this.#E=e,this.addEventListener("removetrack",e))}get onchange(){return this.#v}set onchange(e){this.#v&&(this.removeEventListener("change",this.#v),this.#v=void 0),"function"==typeof e&&(this.#v=e,this.addEventListener("change",e))}}class S{id;kind;label="";language="";sourceBuffer;#T=!1;addRendition(e,t,i){let a=new k;return a.src=e,a.codec=t,a.bitrate=i,!function(e,t){let i=c(e).media?.deref()?.audioRenditions;c(t).media=c(e).media,c(t).track=e;let a=c(e).renditionSet;a.add(t);let r=a.size-1;r in _.prototype||Object.defineProperty(_.prototype,r,{get(){return T(this)[r]}}),queueMicrotask(()=>{i&&e.enabled&&i.dispatchEvent(new v("addrendition",{rendition:t}))})}(this,a),a}removeRendition(e){let t=c(e).media?.deref()?.audioRenditions,i=c(e).track;c(i).renditionSet.delete(e),queueMicrotask(()=>{let i=c(e).track;t&&i.enabled&&t.dispatchEvent(new v("removerendition",{rendition:e}))})}get enabled(){return this.#T}set enabled(e){if(this.#T!==e){this.#T=e;let t=c(this).media?.deref()?.audioTracks;t&&!c(t).changeRequested&&(c(t).changeRequested=!0,queueMicrotask(()=>{delete c(t).changeRequested,t.dispatchEvent(new Event("change"))}))}}}let L=R(globalThis.HTMLMediaElement,"video"),M=R(globalThis.HTMLMediaElement,"audio");function R(e,t){if(e?.prototype)return Object.getOwnPropertyDescriptor(e.prototype,`${t}Tracks`)?.get}var C=i(50664);let D=(e=>class extends e{static shadowRootOptions={...e.shadowRootOptions};static getTemplateHTML=(t,i={})=>{let{src:a,...r}=t;return` 44 <script type="application/json" id="config"> 45 ${JSON.stringify(i.config||{})} 46 </script> 47 ${e.getTemplateHTML(r)} 48 `};#_=null;#k=null;constructor(){super(),this.#l("config")}get config(){return this.#k}set config(e){this.#k=e}attributeChangedCallback(e,t,i){"src"!==e&&super.attributeChangedCallback(e,t,i),"src"===e&&t!=i&&this.load()}#y(){var e,t;null==(e=this.#_)||e.remove(),null==(t=this.nativeEl)||t.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged",this.#I),this.api&&(this.api.detachMedia(),this.api.destroy(),this.api=null)}async load(){var e,t;let i=!this.api;
48if(this.#y(),this.src){if(i&&!this.#k&&(this.#k=JSON.parse((null==(e=this.shadowRoot.getElementById("config"))?void 0:e.textContent)||"{}")),C.Ay.isSupported()){switch(await Promise.resolve(),this.api=new C.Ay({liveDurationInfinity:!0,autoStartLoad:!1,...this.config}),this.api.loadSource(this.src),this.api.attachMedia(this.nativeEl),this.nativeEl.preload){case"none":{let e=()=>this.api.startLoad();this.nativeEl.addEventListener("play",e,{once:!0}),this.api.on(C.Ay.Events.DESTROYING,()=>{this.nativeEl.removeEventListener("play",e)});break}case"metadata":{let e=this.api.config.maxBufferLength,t=this.api.config.maxBufferSize;this.api.config.maxBufferLength=1,this.api.config.maxBufferSize=1;let i=()=>{this.api.config.maxBufferLength=e,this.api.config.maxBufferSize=t};this.nativeEl.addEventListener("play",i,{once:!0}),this.api.on(C.Ay.Events.DESTROYING,()=>{this.nativeEl.removeEventListener("play",i)}),this.api.startLoad();break}default:this.api.startLoad()}this.nativeEl.webkitCurrentPlaybackTargetIsWireless&&this.api.stopLoad(),this.nativeEl.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",this.#I),this.#_=document.createElement("source"),this.#_.setAttribute("type","application/x-mpegURL"),this.#_.setAttribute("src",this.src),this.nativeEl.disableRemotePlayback=!1,this.nativeEl.append(this.#_);let e=new WeakMap;this.api.on(C.Ay.Events.MANIFEST_PARSED,(t,i)=>{this.nativeEl.autoplay&&this.nativeEl.paused&&this.nativeEl.play().catch(e=>{console.warn("Autoplay failed:",e)}),r();let a=this.videoTracks.getTrackById("main");for(let[t,r]of(a||((a=this.addVideoTrack("main")).id="main",a.selected=!0),i.levels.entries())){let i=a.addRendition(r.url[0],r.width,r.height,r.videoCodec,r.bitrate);e.set(r,`${t}`),i.id=`${t}`}for(let[e,t]of i.audioTracks.entries()){let i=t.default?"main":"alternative",a=this.addAudioTrack(i,t.name,t.lang);a.id=`${e}`,t.default&&(a.enabled=!0)}}),this.audioTracks.addEventListener("change",()=>{var e;let t=+(null==(e=[...this.audioTracks].find(e=>e.enabled))?void 0:e.id),i=this.api.audioTracks.map(e=>e.id);t!=this.api.audioTrack&&i.includes(t)&&(this.api.audioTrack=t)}),this.api.on(C.Ay.Events.LEVELS_UPDATED,(t,i)=>{let a=this.videoTracks[this.videoTracks.selectedIndex??0];if(!a)return;let r=i.levels.map(t=>e.get(t));for(let e of this.videoRenditions)e.id&&!r.includes(e.id)&&a.removeRendition(e)});let i=null;this.api.on(C.Ay.Events.ERROR,(e,t)=>{t.type===C.Ay.ErrorTypes.NETWORK_ERROR&&t.details===C.Ay.ErrorDetails.FRAG_LOAD_ERROR&&(i=t.frag.level)}),this.api.on(C.Ay.Events.LEVEL_SWITCHED,(e,t)=>{let a=t.level;null!==i&&a<i&&(console.warn(`\u26A0\uFE0F hls.js downgraded quality from level ${i} to ${a} due to fragment load failure.`),this.videoRenditions.selectedIndex=a,i=null)});let a=e=>{let t=e.target.selectedIndex;t!=this.api.nextLevel&&(this.api.nextLevel=t)};null==(t=this.videoRenditions)||t.addEventListener("change",a);let r=()=>{for(let e of this.videoTracks)this.removeVideoTrack(e);for(let e of this.audioTracks)this.removeAudioTrack(e)};this.api.once(C.Ay.Events.DESTROYING,r);return}await Promise.resolve(),this.nativeEl.canPlayType("application/vnd.apple.mpegurl")&&(this.nativeEl.src=this.src)}}#I=()=>{var e,t,i;(null==(e=this.nativeEl)?void 0:e.webkitCurrentPlaybackTargetIsWireless)?null==(t=this.api)||t.stopLoad():null==(i=this.api)||i.startLoad()};#l(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}}})(function(e){if(!e?.prototype)return e;let t=R(e,"video");(!t||`${t}`.includes("[native code]"))&&Object.defineProperty(e.prototype,"videoTracks",{get(){var e=this;let t=c(e).videoTracks;if(!t&&(t=new E,c(e).videoTracks=t,L)){let i=L.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 A)){for(let e of i)p(e);return}m(e,a.track)}),i.addEventListener("removetrack",e=>{p(e.track)})}return t}});let i=R(e,"audio");(!i||`${i}`.includes("[native code]"))&&Object.defineProperty(e.prototype,"audioTracks",{get(){var e=this;let t=c(e).audioTracks;
48if(!t&&(t=new w,c(e).audioTracks=t,M)){let i=M.call(e.nativeEl??e);for(let t of i)y(e,t);i.addEventListener("change",()=>{t.dispatchEvent(new Event("change"))}),i.addEventListener("addtrack",a=>{if([...t].some(e=>e instanceof S)){for(let e of i)I(e);return}y(e,a.track)}),i.addEventListener("removetrack",e=>{I(e.track)})}return t}}),"addVideoTrack"in e.prototype||(e.prototype.addVideoTrack=function(e,t="",i=""){let a=new A;return a.kind=e,a.label=t,a.language=i,m(this,a),a}),"removeVideoTrack"in e.prototype||(e.prototype.removeVideoTrack=p),"addAudioTrack"in e.prototype||(e.prototype.addAudioTrack=function(e,t="",i=""){let a=new S;return a.kind=e,a.label=t,a.language=i,y(this,a),a}),"removeAudioTrack"in e.prototype||(e.prototype.removeAudioTrack=I),"videoRenditions"in e.prototype||Object.defineProperty(e.prototype,"videoRenditions",{get(){return a(this)}});let a=e=>{let t=c(e).videoRenditions;return t||(c(t=new g).media=new WeakRef(e),c(e).videoRenditions=t),t};"audioRenditions"in e.prototype||Object.defineProperty(e.prototype,"audioRenditions",{get(){return r(this)}});let r=e=>{let t=c(e).audioRenditions;return t||(c(t=new _).media=new WeakRef(e),c(e).audioRenditions=t),t};return e}(d));globalThis.customElements&&!globalThis.customElements.get("hls-video")&&globalThis.customElements.define("hls-video",D)},96354:(e,t,i)=>{let a,r;i.d(t,{Ph:()=>sG,xX:()=>sB,Ic:()=>sK,aH:()=>sq,WY:()=>sj,nN:()=>sQ,A5:()=>sY,ex:()=>sz,AD:()=>sZ,WW:()=>sX,td:()=>sJ,qD:()=>s0});var s,n,o,l,d,u,h,c,m,p,E,v,b,g,f,A,T,_,k,y,I,w,S,L,M,R,C,D,O,N,P,x,U,H,V,W,F,$,B,G,K,q,j,Y,Q,z,Z,X,J,ee,et,ei,ea,er,es,en,eo,el,ed,eu,eh,ec,em,ep,eE,ev,eb,eg,ef,eA,eT,e_,ek,ey,eI,ew,eS,eL,eM,eR,eC,eD,eO,eN,eP,ex,eU,eH,eV,eW,eF,e$,eB,eG,eK,eq,ej,eY,eQ,ez,eZ,eX,eJ,e0,e1,e2,e5,e3,e4,e7,e8,e9,e6,te,tt,ti,ta,tr,ts,tn,to,tl,td,tu,th,tc,tm,tp,tE,tv,tb,tg,tf,tA,tT,t_,tk,ty,tI,tw,tS,tL,tM,tR,tC,tD,tO,tN,tP,tx,tU,tH=i(14232);let tV=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),tW={className:"class",htmlFor:"for"};function tF(e){return e.toLowerCase()}function t$(e){return"boolean"==typeof e?e?"":void 0:"function"==typeof e?void 0:"object"!=typeof e||null===e?e:void 0}function tB({react:e,tagName:t,elementClass:i,events:a,displayName:r,defaultProps:s,toAttributeName:n=tF,toAttributeValue:o=t$}){let l=Number.parseInt(e.version)>=19,d=e.forwardRef((r,d)=>{let u=e.useRef(null),h=e.useRef(new Map),c={},m={},p={},E={};for(let[e,t]of Object.entries(r)){if(tV.has(e)){p[e]=t;continue}let a=n(tW[e]??e);if(i.prototype&&e in i.prototype&&!(e in(globalThis.HTMLElement?.prototype??{}))&&!i.observedAttributes?.some(e=>e===a)){E[e]=t;continue}if(e.startsWith("on")){c[e]=t;continue}let r=o(t);a&&null!=r&&(m[a]=String(r),l||(p[a]=r)),a&&l&&(r!==t$(t)?p[a]=r:p[a]=t)}if("undefined"!=typeof window){for(let t in c){let i=c[t],r=t.endsWith("Capture"),s=(a?.[t]??t.slice(2).toLowerCase()).slice(0,r?-7:void 0);e.useLayoutEffect(()=>{let e=u?.current;if(e&&"function"==typeof i)return e.addEventListener(s,i,r),()=>{e.removeEventListener(s,i,r)}},[u?.current,i])}e.useLayoutEffect(()=>{if(null===u.current)return;let e=new Map;for(let t in E)tG(u.current,t,E[t]),h.current.delete(t),e.set(t,E[t]);for(let[e,t]of h.current)tG(u.current,e,void 0);h.current=e})}if("undefined"==typeof window&&i?.getTemplateHTML&&i?.shadowRootOptions){let{mode:t,delegatesFocus:a}=i.shadowRootOptions;p.children=[e.createElement("template",{shadowrootmode:t,shadowrootdelegatesfocus:a,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(m,r)},key:"ce-la-react-ssr-template-shadow-root"}),p.children]}return e.createElement(t,{...s,...p,ref:e.useCallback(e=>{u.current=e,"function"==typeof d?d(e):null!==d&&(d.current=e)},[d])},p.children)});return d.displayName=r??i.name,d}function tG(e,t,i){e[t]=i,null==i&&t in(globalThis.HTMLElement?.prototype??{})&&e.removeAttribute(t)}let tK={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:"mediash
48owtexttracksrequest",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"},tq={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},tj={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
48LAYED:"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"},tY=Object.entries(tj),tQ=tY.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{}),tz=tY.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"});Object.entries(tz).reduce((e,[t,i])=>{let a=tQ[t];return a&&(e[i]=a),e},{userinactivechange:"userinactive"});let tZ=Object.entries(tQ).reduce((e,[t,i])=>{let a=tz[t];return a&&(e[i]=a),e},{userinactive:"userinactivechange"}),tX={SUBTITLES:"subtitles",CAPTIONS:"captions",CHAPTERS:"chapters",METADATA:"metadata"},tJ={DISABLED:"disabled",SHOWING:"showing"},t0={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},t1={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},t2={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},t5={FULLSCREEN:"fullscreen"};function t3(e){if(e){let{id:t,width:i,height:a}=e;return[t,i,a].filter(e=>null!=e).join(":")}}function t4(e){if(e){let{id:t,kind:i,language:a,label:r}=e;return[t,i,a,r].filter(e=>null!=e).join(":")}}function t7(e){return"number"==typeof e&&!Number.isNaN(e)&&Number.isFinite(e)}let t8=e=>new Promise(t=>setTimeout(t,e)),t9={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 Error":"Encryption
48Error","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."}},t6=(null==(s=globalThis.navigator)?void 0:s.language)||"en",ie=(e,t={})=>(e=>{var t,i,a;let[r]=t6.split("-");return(null==(t=t9[t6])?void 0:t[e])||(null==(i=t9[r])?void 0:i[e])||(null==(a=t9.en)?void 0:a[e])||e})(e).replace(/\{(\w+)\}/g,(e,i)=>i in t?String(t[i]):`{${i}}`),it=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],ii=e=>{if(!t7(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)=>e&&((e,t)=>{let i=1===e?ie(it[t].singular):ie(it[t].plural);return`${e} ${i}`})(e,t)).filter(e=>e).join(", ");return i?ie("{time} remaining",{time:r}):r};function ia(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),s=Math.floor(e/3600),n=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(s=r=a="0"),r=(((s=s>0||o>0?s+":":"")||n>=10)&&r<10?"0"+r:r)+":",(i?"-":"")+s+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 ir{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}}class is extends ir{}class io extends is{constructor(){super(...arguments),this.role=null}}class il{observe(){}unobserve(){}disconnect(){}}let id={createElement:function(){return new iu.HTMLElement},createElementNS:function(){return new iu.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent:e=>!1},iu={ResizeObserver:il,document:id,Node:is,Element:io,HTMLElement:class extends io{constructor(){super(...arguments),this.innerHTML=""}get content(){return new iu.DocumentFragment}},DocumentFragment:class extends ir{},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}}}}},ih="global"in globalThis&&(null==globalThis?void 0:globalThis.global)===globalThis||"undefined"==typeof window||void 0===window.customElements,ic=Object.keys(iu).every(e=>e in globalThis),im=ih&&!ic?iu:globalThis,ip=ih&&!ic?id:globalThis.document,iE=new WeakMap,iv=e=>{let t=iE.get(e);return t||iE.set(e,t=new Set),t},ib=new im.ResizeObserver(e=>{for(let t of e)for(let e of iv(t.target))e(t)});function ig(e,t){iv(e).add(t),ib.observe(e)}function iA(e,t){let i=iv(e);i.delete(t),i.size||ib.unobserve(e)}function iT(e){let t={};for(let i of e)t[i.name]=i.value;return t}let i_=(e,t,i=".value")=>{let a=e.querySelector(i);a&&(a.textContent=t)},ik=(e,t)=>((e,t)=>{let i=`slot[name="${t}"]`,a=e.shadowRoot.querySelector(i);return a?a.children:[]})(e,t)[0],iy=(e,t)=>!!e&&!!t&&(null!=e&&!!e.contains(t)||iy(e,t.getRootNode().host)),iI=(e,t)=>{if(!e)return null;let i=e.closest(t);return i||iI(e.getRootNode().host,t)};function iw(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 iS(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||iL(e,t)}function iL(e,t){var i,a;let r=null!=(i=e.querySelectorAll("style:not([media])"))?i:[],s=null==r?void 0:r[r.length-1];if(!(null==s?void 0:s.sheet))return console.warn("Media Chrome: No style sheet found on style tag of",e),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}};let n=null==s?void 0:s.sheet.insertRule(`${t}{}`,s.sheet.cssRules.length);return null==(a=s.sheet.cssRules)?void 0:a[n]}function iM(e,t,i=NaN){let a=e.getAttribute(t);return null!=a?+a:i}function iR(e,t,i){let a=+i;
48if(null==i||Number.isNaN(a)){e.hasAttribute(t)&&e.removeAttribute(t);return}iM(e,t,void 0)!==a&&e.setAttribute(t,`${a}`)}function iC(e,t){return e.hasAttribute(t)}function iD(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}iC(e,t)!=i&&e.toggleAttribute(t,i)}function iO(e,t,i=null){var a;return null!=(a=e.getAttribute(t))?a:i}function iN(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}let a=`${i}`;iO(e,t,void 0)!==a&&e.setAttribute(t,a)}var iP=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ix=(e,t,i)=>(iP(e,t,"read from private field"),i?i.call(e):t.get(e)),iU=(e,t,i,a)=>(iP(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class iH extends im.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,n,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=iT(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[tq.MEDIA_CONTROLLER,tQ.MEDIA_PAUSED]}attributeChangedCallback(e,t,i){var a,r,s,o,l;e===tq.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=ix(this,n))?void 0:a.unassociateElement)||r.call(a,this),iU(this,n,null)),i&&this.isConnected&&(iU(this,n,null==(s=this.getRootNode())?void 0:s.getElementById(i)),null==(l=null==(o=ix(this,n))?void 0:o.associateElement)||l.call(o,this)))}connectedCallback(){var e,t;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),iU(this,n,function(e){var t;let i=e.getAttribute(tq.MEDIA_CONTROLLER);return i?null==(t=e.getRootNode())?void 0:t.getElementById(i):iI(e,"media-controller")}(this)),this.getAttribute(tq.MEDIA_CONTROLLER)&&(null==(t=null==(e=ix(this,n))?void 0:e.associateElement)||t.call(e,this)),ix(this,n)&&(ix(this,n).addEventListener("pointerdown",this),ix(this,n).addEventListener("click",this),ix(this,n).hasAttribute("tabindex")||(ix(this,n).tabIndex=0))}disconnectedCallback(){var e,t,i,a;this.getAttribute(tq.MEDIA_CONTROLLER)&&(null==(t=null==(e=ix(this,n))?void 0:e.unassociateElement)||t.call(e,this)),null==(i=ix(this,n))||i.removeEventListener("pointerdown",this),null==(a=ix(this,n))||a.removeEventListener("click",this),iU(this,n,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:s,height:n}=this.getBoundingClientRect(),o=t-a,l=i-r;if(o<0||l<0||o>s||l>n||0===s&&0===n)return;let d=this._pointerType||"mouse";if(this._pointerType=void 0,d===t0.TOUCH)return void this.handleTap(e);if(d===t0.MOUSE||d===t0.PEN)return void this.handleMouseClick(e)}}}get mediaPaused(){return iC(this,tQ.MEDIA_PAUSED)}set mediaPaused(e){iD(this,tQ.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){let t=this.mediaPaused?tK.MEDIA_PLAY_REQUEST:tK.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new im.CustomEvent(t,{composed:!0,bubbles:!0}))}}n=new WeakMap,iH.shadowRootOptions={mode:"open"},iH.getTemplateHTML=function(e){return` 49 <style> 50 :host { 51 display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block)); 52 box-sizing: border-box; 53 } 54 </style> 55 `},im.customElements.get("media-gesture-receiver")||im.customElements.define("media-gesture-receiver",iH);var iV=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},iW=(e,t,i)=>(iV(e,t,"read from private field"),i?i.call(e):t.get(e)),iF=(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)},i$=(e,t,i,a)=>(iV(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),iB=(e,t,i)=>(iV(e,t,"access private method"),i);let iG={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"},iK=Object.values(tQ);function iq(e,t){var i,a,r;if(!e.isConnected)return;let s=Object.fromEntries((null!=(i=e.getAttribute(iG.BREAKPOINTS))?i:"sm:384 md:576 lg:768 xl:960").split(/\s+/).map(e=>e.split(":"))),n=(a=s,r=t,Object.keys(a).filter(e=>r>=parseInt(a[e]))),o=!1;
55if(Object.keys(s).forEach(t=>{if(n.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(tz.BREAKPOINTS_CHANGE,{detail:n});e.dispatchEvent(t)}e.breakpointsComputed||(e.breakpointsComputed=!0,e.dispatchEvent(new CustomEvent(tz.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}class ij extends im.HTMLElement{constructor(){if(super(),iF(this,E),iF(this,b),iF(this,f),iF(this,T),iF(this,k),iF(this,o,void 0),iF(this,l,0),iF(this,d,null),iF(this,u,null),iF(this,h,void 0),this.breakpointsComputed=!1,iF(this,c,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)}}),iF(this,m,!1),iF(this,p,e=>{iW(this,m)||(setTimeout(()=>{!function(e){iq(e.target,e.contentRect.width)}(e),i$(this,m,!1)},0),i$(this,m,!0))}),iF(this,I,void 0),iF(this,w,()=>{if(!iW(this,I).assignedElements({flatten:!0}).length){iW(this,d)&&this.mediaUnsetCallback(iW(this,d));return}this.handleMediaUpdated(this.media)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=iT(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}i$(this,o,new MutationObserver(iW(this,c)))}static get observedAttributes(){return[iG.AUTOHIDE,iG.GESTURES_DISABLED].concat(iK).filter(e=>![tQ.MEDIA_RENDITION_LIST,tQ.MEDIA_AUDIO_TRACK_LIST,tQ.MEDIA_CHAPTERS_CUES,tQ.MEDIA_WIDTH,tQ.MEDIA_HEIGHT,tQ.MEDIA_ERROR,tQ.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,t,i){e.toLowerCase()==iG.AUTOHIDE&&(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&&(i$(this,d,e),e.localName.includes("-")&&await im.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;iW(this,o).observe(this,{childList:!0,subtree:!0}),ig(this,iW(this,p));let t=null!=this.getAttribute(iG.AUDIO)?ie("audio player"):ie("video player");this.setAttribute("role","region"),this.setAttribute("aria-label",t),this.handleMediaUpdated(this.media),this.setAttribute(iG.USER_INACTIVE,""),iq(this,this.getBoundingClientRect().width);let i=this.querySelector(":scope > slot[slot=media]");i&&(i$(this,I,i),iW(this,I).addEventListener("slotchange",iW(this,w))),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),null==(e=im.window)||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;iA(this,iW(this,p)),clearTimeout(iW(this,u)),iW(this,o).disconnect(),this.media&&this.mediaUnsetCallback(this.media),null==(e=im.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),iW(this,I)&&(iW(this,I).removeEventListener("slotchange",iW(this,w)),i$(this,I,null)),i$(this,m,!1)}mediaSetCallback(e){}mediaUnsetCallback(e){i$(this,d,null)}handleEvent(e){switch(e.type){case"pointerdown":i$(this,l,e.timeStamp);break;case"pointermove":iB(this,E,v).call(this,e);break;case"pointerup":iB(this,b,g).call(this,e);break;case"mouseleave":iB(this,f,A).call(this);break;case"mouseup":this.removeAttribute(iG.KEYBOARD_CONTROL);break;case"keyup":iB(this,k,y).call(this),this.setAttribute(iG.KEYBOARD_CONTROL,"")}}set autohide(e){let t=Number(e);i$(this,h,isNaN(t)?0:t)}get autohide(){return(void 0===iW(this,h)?2:iW(this,h)).toString()}get breakpoints(){return iO(this,iG.BREAKPOINTS)}set breakpoints(e){iN(this,iG.BREAKPOINTS,e)}get audio(){return iC(this,iG.AUDIO)}set audio(e){iD(this,iG.AUDIO,e)}get gesturesDisabled(){return iC(this,iG.GESTURES_DISABLED)}set gesturesDisabled(e){iD(this,iG.GESTURES_DISABLED,e)}get keyboardControl(){return iC(this,iG.KEYBOARD_CONTROL)}set keyboardControl(e){iD(this,iG.KEYBOARD_CONTROL,e)}get noAutohide(){return iC(this,iG.NO_AUTOHIDE)}set noAutohide(e){iD(this,iG.NO_AUTOHIDE,e)}get autohideOverControls(){return iC(this,iG.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){iD(this,iG.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return iC(this,iG.USER_INACTIVE)}set userInteractive(e){iD(this,iG.USER_INACTIVE,e)}}o=new WeakMap,l=new WeakMap,d=new WeakMap,u=new WeakMap,h=new WeakMap,c=new WeakMap,m=new WeakMap,p=new WeakMap,E=new WeakSet,v=function(e){if("mouse"!==e.pointerType&&e.timeStamp-iW(this,l)<250)return;iB(this,T,_).call(this),clearTimeout(iW(this,u));let t=this.hasAttribute(iG.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(e.target)||t)&&iB(this,k,y).call(this)},b=new WeakSet,g=function(e){if("touch"===e.pointerType){let t=!this.hasAttribute(iG.USER_INACTIVE);[this,this.media].includes(e.target)&&t?iB(this,f,A).call(this):iB(this,k,y).call(this)}else e.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(null==e?void 0:e.localName))&&iB(this,k,y).call(this)},f=new WeakSet,A=function(){if(0>iW(this,h)||this.hasAttribute(iG.USER_INACTIVE))return;this.setAttribute(iG.USER_INACTIVE,"");let e=new im.CustomEvent(tz.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(e)},T=new WeakSet,_=function(){if(!this.hasAttribute(iG.USER_INACTIVE))return;this.removeAttribute(iG.USER_INACTIVE);let e=new im.CustomEvent(tz.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(e)},k=new WeakSet,y=function(){iB(this,T,_).call(this),clearTimeout(iW(this,u));let e=parseInt(this.autohide);e<0||i$(this,u,setTimeout(()=>{iB(this,f,A).call(this)},1e3*e))},I=new WeakMap,w=new WeakMap,ij.shadowRootOptions={mode:"open"},ij.getTemplateHTML=function(e){return` 56 <style> 57 58 :host([${tQ.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) { 59 outline: none; 60 } 61 62 :host { 63 box-sizing: border-box; 64 position: relative; 65 display: inline-block; 66 line-height: 0; 67 background-color: var(--media-background-color, #000); 68 overflow: hidden; 69 } 70 71 :host(:not([${iG.AUDIO}])) [part~=layer]:not([part~=media-layer]) { 72 position: absolute; 73 top: 0; 74 left: 0; 75 bottom: 0; 76 right: 0; 77 display: flex; 78 flex-flow: column nowrap; 79 align-items: start; 80 pointer-events: none; 81 background: none; 82 } 83 84 slot[name=media] { 85 display: var(--media-slot-display, contents); 86 } 87 88 89 :host([${iG.AUDIO}]) slot[name=media] { 90 display: var(--media-slot-display, none); 91 } 92 93 94 :host([${iG.AUDIO}]) [part~=layer][part~=gesture-layer] { 95 height: 0; 96 display: block; 97 } 98 99 100 :host(:not([${iG.AUDIO}])[${iG.GESTURES_DISABLED}]) ::slotted([slot=gestures-chrome]), 101 :host(:not([${iG.AUDIO}])[${iG.GESTURES_DISABLED}]) media-gesture-receiver[slot=gestures-chrome] { 102 display: none; 103 } 104 105 106 ::slotted(:not([slot=media]):not([slot=poster]):not(media-loading-indicator):not([role=dialog]):not([hidden])) { 107 pointer-events: auto; 108 } 109 110 :host(:not([${iG.AUDIO}])) *[part~=layer][part~=centered-layer] { 111 align-items: center; 112 justify-content: center; 113 } 114 115 :host(:not([${iG.AUDIO}])) ::slotted(media-gesture-receiver[slot=gestures-chrome]), 116 :host(:not([${iG.AUDIO}])) media-gesture-receiver[slot=gestures-chrome] { 117 align-self: stretch; 118 flex-grow: 1; 119 } 120 121 slot[name=middle-chrome] { 122 display: inline; 123 flex-grow: 1; 124 pointer-events: none; 125 background: none; 126 } 127 128 129 ::slotted([slot=media]), 130 ::slotted([slot=poster]) { 131 width: 100%; 132 height: 100%; 133 } 134 135 136 :host(:not([${iG.AUDIO}])) .spacer { 137 flex-grow: 1; 138 } 139 140 141 :host(:-webkit-full-screen) { 142 143 width: 100% !important; 144 height: 100% !important; 145 } 146 147 148 ::slotted(:not([slot=media]):not([slot=poster]):not([${iG.NO_AUTOHIDE}]):not([hidden]):not([role=dialog])) { 149 opacity: 1; 150 transition: var(--media-control-transition-in, opacity 0.25s); 151 } 152 153 154 :host([${iG.USER_INACTIVE}]:not([${tQ.MEDIA_PAUSED}]):not([${tQ.MEDIA_IS_AIRPLAYING}
154]):not([${tQ.MEDIA_IS_CASTING}]):not([${iG.AUDIO}])) ::slotted(:not([slot=media]):not([slot=poster]):not([${iG.NO_AUTOHIDE}]):not([role=dialog])) { 155 opacity: 0; 156 transition: var(--media-control-transition-out, opacity 1s); 157 } 158 159 :host([${iG.USER_INACTIVE}]:not([${iG.NO_AUTOHIDE}]):not([${tQ.MEDIA_PAUSED}]):not([${tQ.MEDIA_IS_CASTING}]):not([${iG.AUDIO}])) ::slotted([slot=media]) { 160 cursor: none; 161 } 162 163 :host([${iG.USER_INACTIVE}][${iG.AUTOHIDE_OVER_CONTROLS}]:not([${iG.NO_AUTOHIDE}]):not([${tQ.MEDIA_PAUSED}]):not([${tQ.MEDIA_IS_CASTING}]):not([${iG.AUDIO}])) * { 164 --media-cursor: none; 165 cursor: none; 166 } 167 168 169 ::slotted(media-control-bar) { 170 align-self: stretch; 171 } 172 173 174 :host(:not([${iG.AUDIO}])[${tQ.MEDIA_HAS_PLAYED}]) slot[name=poster] { 175 display: none; 176 } 177 178 ::slotted([role=dialog]) { 179 width: 100%; 180 height: 100%; 181 align-self: center; 182 } 183 184 ::slotted([role=menu]) { 185 align-self: end; 186 } 187 </style> 188 189 <slot name="media" part="layer media-layer"></slot> 190 <slot name="poster" part="layer poster-layer"></slot> 191 <slot name="gestures-chrome" part="layer gesture-layer"> 192 <media-gesture-receiver slot="gestures-chrome"> 193 <template shadowrootmode="${iH.shadowRootOptions.mode}"> 194 ${iH.getTemplateHTML({})} 195 </template> 196 </media-gesture-receiver> 197 </slot> 198 <span part="layer vertical-layer"> 199 <slot name="top-chrome" part="top chrome"></slot> 200 <slot name="middle-chrome" part="middle chrome"></slot> 201 <slot name="centered-chrome" part="layer centered-layer center centered chrome"></slot> 202 203 <slot part="bottom chrome"></slot> 204 </span> 205 <slot name="dialog" part="layer dialog-layer"></slot> 206 `},im.customElements.get("media-container")||im.customElements.define("media-container",ij);var iY=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},iQ=(e,t,i)=>(iY(e,t,"read from private field"),i?i.call(e):t.get(e)),iz=(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)},iZ=(e,t,i,a)=>(iY(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class iX{constructor(e,t,{defaultValue:i}={defaultValue:void 0}){iz(this,C),iz(this,S,void 0),iz(this,L,void 0),iz(this,M,void 0),iz(this,R,new Set),iZ(this,S,e),iZ(this,L,t),iZ(this,M,new Set(i))}[Symbol.iterator](){return iQ(this,C,D).values()}get length(){return iQ(this,C,D).size}get value(){var e;return null!=(e=[...iQ(this,C,D)].join(" "))?e:""}set value(e){var t;e!==this.value&&(iZ(this,R,new Set),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return[...iQ(this,C,D)][e]}values(){return iQ(this,C,D).values()}forEach(e,t){iQ(this,C,D).forEach(e,t)}add(...e){var t,i;e.forEach(e=>iQ(this,R).add(e)),(""!==this.value||(null==(t=iQ(this,S))?void 0:t.hasAttribute(`${iQ(this,L)}`)))&&(null==(i=iQ(this,S))||i.setAttribute(`${iQ(this,L)}`,`${this.value}`))}remove(...e){var t;e.forEach(e=>iQ(this,R).delete(e)),null==(t=iQ(this,S))||t.setAttribute(`${iQ(this,L)}`,`${this.value}`)}contains(e){return iQ(this,C,D).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}}S=new WeakMap,L=new WeakMap,M=new WeakMap,R=new WeakMap,C=new WeakSet,D=function(){return iQ(this,R).size?iQ(this,R):iQ(this,M)};let iJ=(e="")=>{let[t,i,a]=e.split(":"),r=a?decodeURIComponent(a):void 0;return{kind:"cc"===t?tX.CAPTIONS:tX.SUBTITLES,language:i,label:r}},i0=(e="",t={})=>((e="")=>e.split(/\s+/))(e).map(e=>{let i=iJ(e);return{...t,...i}}),i1=e=>e?Array.isArray(e)?e.map(e=>"string"==typeof e?iJ(e):e):"string"==typeof e?i0(e):[e]:[],i2=({kind:e,label:t,language:i}={kind:"subtitles"})=>t?`${"captions"===e?"cc":"sb"}:${i}:${encodeURIComponent(t)}`:i,i5=(e=[])=>Array.prototype.map.call(e,i2).join(" "),i3=e=>{let t=Object.entries(e).map(([e,t])=>i=>i[e]===t);return e=>t.every(t=>t(e))},i4=(e,t=[],i=[])=>{let a=i1(i).map(i3);Array.from(t).filter(e=>a.some(t=>
206t(e))).forEach(t=>{t.mode=e})},i7=(e,t=()=>!0)=>{if(!(null==e?void 0:e.textTracks))return[];let i="function"==typeof t?t:i3(t);return Array.from(e.textTracks).filter(i)},i8="exitFullscreen"in ip?"exitFullscreen":"webkitExitFullscreen"in ip?"webkitExitFullscreen":"webkitCancelFullScreen"in ip?"webkitCancelFullScreen":void 0,i9="fullscreenElement"in ip?"fullscreenElement":"webkitFullscreenElement"in ip?"webkitFullscreenElement":void 0,i6="fullscreenEnabled"in ip?"fullscreenEnabled":"webkitFullscreenEnabled"in ip?"webkitFullscreenEnabled":void 0,ae=()=>{var e;return a||(a=null==(e=null==ip?void 0:ip.createElement)?void 0:e.call(ip,"video"))},at=async(e=ae())=>{if(!e)return!1;let t=e.volume;e.volume=t/2+.1;let i=new AbortController,a=await Promise.race([ai(e,i.signal),aa(e,t)]);return i.abort(),a},ai=(e,t)=>new Promise(i=>{e.addEventListener("volumechange",()=>i(!0),{signal:t})}),aa=async(e,t)=>{for(let i=0;i<10;i++){if(e.volume===t)return!1;await t8(10)}return e.volume!==t},ar=/.*Version\/.*Safari\/.*/.test(im.navigator.userAgent),as=(e=ae())=>(!im.matchMedia("(display-mode: standalone)").matches||!ar)&&"function"==typeof(null==e?void 0:e.requestPictureInPicture),an=(e=ae())=>(e=>{let{documentElement:t,media:i}=e;return!!(null==t?void 0:t[i6])||i&&"webkitSupportsFullscreen"in i})({documentElement:ip,media:e}),ao=an(),al=as(),ad=!!im.WebKitPlaybackTargetAvailabilityEvent,au=!!im.chrome,ah=e=>i7(e.media,e=>[tX.SUBTITLES,tX.CAPTIONS].includes(e.kind)).sort((e,t)=>e.kind>=t.kind?1:-1),ac=e=>i7(e.media,e=>e.mode===tJ.SHOWING&&[tX.SUBTITLES,tX.CAPTIONS].includes(e.kind)),am=(e,t)=>{let i=ah(e),a=ac(e),r=!!a.length;if(i.length){if(!1===t||r&&!0!==t)i4(tJ.DISABLED,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=im.localStorage.getItem("media-chrome-pref-subtitles-lang"),a=e?[e,...im.navigator.languages]:im.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:s,label:n,kind:o}=t;i4(tJ.DISABLED,i,a),i4(tJ.SHOWING,i,[{language:s,label:n,kind:o}])}}},ap=(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)?aE(e,t):Object.entries(e).every(([e,i])=>e in t&&ap(i,t[e])))),aE=(e,t)=>{let i=Array.isArray(e),a=Array.isArray(t);return i===a&&(!i&&!a||e.length===t.length&&e.every((e,i)=>ap(e,t[i])))},av=Object.values(t2),ab=at().then(e=>r=e),ag=async(...e)=>{await Promise.all(e.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof im.HTMLElement))return;let t=e.localName;if(!t.includes("-"))return;let i=im.customElements.get(t);i&&e instanceof i||(await im.customElements.whenDefined(t),im.customElements.upgrade(e))}))},af=new im.DOMParser,aA={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!==im.localStorage.getItem("media-chrome-pref-muted"),r=i.hasAttribute("muted");if(a){t&&im.localStorage.removeItem("media-chrome-pref-muted");return}if(r&&!t)return;im.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"===im.localStorage.getItem("media-chrome-pref-muted");aA.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}
206,set(e,t){let{media:i,options:{noVolumePref:a}={}}=t;if(i){try{null==e?im.localStorage.removeItem("media-chrome-pref-volume"):i.hasAttribute("muted")||a||im.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=im.localStorage.getItem("media-chrome-pref-volume");if(null==a)return;aA.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&&t7(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=[t2.LIVE,t2.ON_DEMAND].includes(i)?i:void 0;if(!t)return a;let{streamType:r}=t;if(av.includes(r))return r===t2.UNKNOWN?a:r;let s=t.duration;return s===1/0?t2.LIVE:Number.isFinite(s)?t2.ON_DEMAND:a},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(e){let{media:t}=e;if(!t)return NaN;let{targetLiveWindow:i}=t,a=aA.mediaStreamType.get(e);return(null==i||Number.isNaN(i))&&a===t2.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(aA.mediaStreamType.get(e)!==t2.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=>ah(e).map(({kind:e,label:t,language:i})=>({kind:e,label:t,language:i})),mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get:e=>ac(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:s}=t;if(!r)return;let n=e=>{var i;s.defaultSubtitles&&(e&&![tX.CAPTIONS,tX.SUBTITLES].includes(null==(i=null==e?void 0:e.track)?void 0:i.kind)||am(t,!0))};return r.addEventListener("loadstart",n),null==(i=r.textTracks)||i.addEventListener("addtrack",n),null==(a=r.textTracks)||a.addEventListener("removetrack",n),()=>{var e,t;r.removeEventListener("loadstart",n),null==(e=r.textTracks)||e.removeEventListener("addtrack",n),null==(t=r.textTracks)||t.removeEventListener("removetrack",n)}}]},mediaChaptersCues:{get(e){var t;let{media:i}=e;if(!i)return[];let[a]=i7(i,{kind:tX.CHAPTERS});return Array.from(null!=(t=null==a?void 0:a.cues)?t:[]).map(({text:e,startTime:t,endTime:i})=>({text:e&&af.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]'),s=null==(i=a.shadowRoot)?void 0:i.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return null==r||r.addEventListener("load",e),null==s||s.addEventListener("load",e),()=>{null==r||r.removeEventListener("load",e),null==s||s.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;
206if(r.pictureInPictureElement instanceof HTMLMediaElement)return!!(null==(t=a.localName)?void 0:t.includes("-"))&&iy(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(!ip.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 ip.pictureInPictureElement&&ip.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 s=(e=>{let{documentElement:t,media:i}=e,a=null==t?void 0:t[i9];return!a&&"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&i.webkitDisplayingFullscreen&&i.webkitPresentationMode===t5.FULLSCREEN?i:a})(e);if(!s)return!1;if(s===r||s===i)return!0;if(s.localName.includes("-")){let e=s.shadowRoot;if(!(i9 in e))return iy(s,r);for(;null==e?void 0:e[i9];){if(e[i9]===r)return!0;e=null==(t=e[i9])?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(i8){let e=null==(t=null==i?void 0:i[i8])?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"&&"connected"===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&&im.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(!ao||!an(t))return t1.UNSUPPORTED}},mediaPipUnavailable:{get(e){let{media:t}=e;return al&&as(t)?(null==t?void 0:t.disablePictureInPicture)?t1.UNAVAILABLE:void 0:t1.UNSUPPORTED}},mediaVolumeUnavailable:{get(e){let{media:t}=e;if(!1===r||(null==t?void 0:t.volume)==void 0)return t1.UNSUPPORTED},stateOwnersUpdateHandlers:[e=>{null==r&&ab.then(t=>e(t?void 0:t1.UNSUPPORTED))}]},mediaCastUnavailable:{get(e,{availability:t="not-available"}={}){var i;let{media:a}=e;return au&&(null==(i=null==a?void 0:a.remote)?void 0:i.state)?null!=t&&"available"!==t?t1.UNAVAILABLE:void 0:t1.UNSUPPORTED},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)=>ad?(null==t?void 0:t.availability)==="not-available"?t1.UNAVAILABLE:void 0:t1.UNSUPPORTED,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:t1.UNAVAILABLE:t1.UNSUPPORTED},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?t1.UNAVAILABLE:void 0:t1.UNSUPPORTED},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(e){let{options:{mediaLang:t}={}}=e;return null!=t?t:"en"}}},aT={[tK.MEDIA_PREVIEW_REQUEST](e,t,{detail:i}){var a,r,s;let n,o,{media:l}=t,d=null!=i?i:void 0;if(l&&null!=d){let[e]=i7(l,{kind:tX.METADATA,label:"thumbnails"}),t=Array.prototype.find.call(null!=(a=null==e?void 0:e.cues)?a:[],(e,t,i)=>0===t?e.endTime>
206d: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),n=i.href}}let u=e.mediaDuration.get(t),h=null==(s=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:s.text;return null!=i&&null==h&&(h=""),{mediaPreviewTime:d,mediaPreviewImage:n,mediaPreviewCoords:o,mediaPreviewChapter:h}},[tK.MEDIA_PAUSE_REQUEST](e,t){e.mediaPaused.set(!0,t)},[tK.MEDIA_PLAY_REQUEST](e,t){var i,a,r,s;let n=e.mediaStreamType.get(t)===t2.LIVE,o=!(null==(i=t.options)?void 0:i.noAutoSeekToLive),l=e.mediaTargetLiveWindow.get(t)>0;if(n&&o&&!l){let i=null==(a=e.mediaSeekable.get(t))?void 0:a[1];if(i){let a=null!=(s=null==(r=t.options)?void 0:r.seekToLiveOffset)?s:0;e.mediaCurrentTime.set(i-a,t)}}e.mediaPaused.set(!1,t)},[tK.MEDIA_PLAYBACK_RATE_REQUEST](e,t,{detail:i}){e.mediaPlaybackRate.set(i,t)},[tK.MEDIA_MUTE_REQUEST](e,t){e.mediaMuted.set(!0,t)},[tK.MEDIA_UNMUTE_REQUEST](e,t){e.mediaVolume.get(t)||e.mediaVolume.set(.25,t),e.mediaMuted.set(!1,t)},[tK.MEDIA_LOOP_REQUEST](e,t,{detail:i}){let a=!!i;return e.mediaLoop.set(a,t),{mediaLoop:a}},[tK.MEDIA_VOLUME_REQUEST](e,t,{detail:i}){i&&e.mediaMuted.get(t)&&e.mediaMuted.set(!1,t),e.mediaVolume.set(i,t)},[tK.MEDIA_SEEK_REQUEST](e,t,{detail:i}){e.mediaCurrentTime.set(i,t)},[tK.MEDIA_SEEK_TO_LIVE_REQUEST](e,t){var i,a,r;let s=null==(i=e.mediaSeekable.get(t))?void 0:i[1];if(Number.isNaN(Number(s)))return;let n=null!=(r=null==(a=t.options)?void 0:a.seekToLiveOffset)?r:0;e.mediaCurrentTime.set(s-n,t)},[tK.MEDIA_SHOW_SUBTITLES_REQUEST](e,t,{detail:i}){var a;let{options:r}=t,s=ah(t),n=i1(i),o=null==(a=n[0])?void 0:a.language;o&&!r.noSubtitlesLangPref&&im.localStorage.setItem("media-chrome-pref-subtitles-lang",o),i4(tJ.SHOWING,s,n)},[tK.MEDIA_DISABLE_SUBTITLES_REQUEST](e,t,{detail:i}){let a=ah(t);i4(tJ.DISABLED,a,null!=i?i:[])},[tK.MEDIA_TOGGLE_SUBTITLES_REQUEST](e,t,{detail:i}){am(t,i)},[tK.MEDIA_RENDITION_REQUEST](e,t,{detail:i}){e.mediaRenditionSelected.set(i,t)},[tK.MEDIA_AUDIO_TRACK_REQUEST](e,t,{detail:i}){e.mediaAudioTrackEnabled.set(i,t)},[tK.MEDIA_ENTER_PIP_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsPip.set(!0,t)},[tK.MEDIA_EXIT_PIP_REQUEST](e,t){e.mediaIsPip.set(!1,t)},[tK.MEDIA_ENTER_FULLSCREEN_REQUEST](e,t,i){e.mediaIsPip.get(t)&&e.mediaIsPip.set(!1,t),e.mediaIsFullscreen.set(!0,t,i)},[tK.MEDIA_EXIT_FULLSCREEN_REQUEST](e,t){e.mediaIsFullscreen.set(!1,t)},[tK.MEDIA_ENTER_CAST_REQUEST](e,t){e.mediaIsFullscreen.get(t)&&e.mediaIsFullscreen.set(!1,t),e.mediaIsCasting.set(!0,t)},[tK.MEDIA_EXIT_CAST_REQUEST](e,t){e.mediaIsCasting.set(!1,t)},[tK.MEDIA_AIRPLAY_REQUEST](e,t){e.mediaIsAirplaying.set(!0,t)}};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)),ay=(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)},aI=(e,t,i,a)=>(a_(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),aw=(e,t,i)=>(a_(e,t,"access private method"),i);let aS=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," ","f","m","k","c","l","j",">","<","p"],aL={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",DEFAULT_DURATION:"defaultduration",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYBOARD_BACKWARD_SEEK_OFFSET:"keyboardbackwardseekoffset",KEYBOARD_FORWARD_SEEK_OFFSET:"keyboardforwardseekoffset",KEYBOARD_DOWN_VOLUME_STEP:"keyboarddownvolumestep",KEYBOARD_UP_VOLUME_STEP:"keyboardupvolumestep",KEYS_USED:"keysused",LANG:"lang",LOOP:"loop",LIVE_EDGE_OFFSET:"liveedgeoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_DEFAULT_STORE:"nodefaultstore",NO_HOTKEYS:"nohotkeys",NO_MUTED_PREF:"nomutedpref",NO_SUBTITLES_LANG_PREF:"nosubtitleslangpref",NO_VOLUME_PREF:"novolumepref",SEEK_TO_LIVE_OFFSET:"seektoliveoffset"};class aM extends ij{constructor(){super(),ay(this,F),ay(this,G),ay(this,q),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,ay(this,O,new iX(this,aL.HOTKEYS)),ay(this,N,void 0),ay(this,P,void 0),ay(this,x,null),ay(this,U,void 0),ay(this,H,void 0),ay(this,V,e=>{var t;null==(t=ak(this,P))||t.dispatch(e)}),ay(this,W,void 0),ay(this,B,e=>{let{key:t,shiftKey:i}=e;if(!(i&&("/"===t||"?"===t)||aS.includes(t)))return void this.removeEventListener("keyup",ak(this,B));this.keyboardShortcutHandler(e)}),this.associateElement(this);let e={};aI(this,U,t=>{Object.entries(t).forEach(([t,i])=>{if(t in e&&e[t]===i)return;
206this.propagateMediaState(t,i);let a=t.toLowerCase(),r=new im.CustomEvent(tZ[a],{composed:!0,detail:i});this.dispatchEvent(r)}),e=t})}static get observedAttributes(){return super.observedAttributes.concat(aL.NO_HOTKEYS,aL.HOTKEYS,aL.DEFAULT_STREAM_TYPE,aL.DEFAULT_SUBTITLES,aL.DEFAULT_DURATION,aL.NO_MUTED_PREF,aL.NO_VOLUME_PREF,aL.LANG,aL.LOOP,aL.LIVE_EDGE_OFFSET,aL.SEEK_TO_LIVE_OFFSET,aL.NO_AUTO_SEEK_TO_LIVE)}get mediaStore(){return ak(this,P)}set mediaStore(e){var t,i;if(ak(this,P)&&(null==(t=ak(this,H))||t.call(this),aI(this,H,void 0)),aI(this,P,e),!ak(this,P)&&!this.hasAttribute(aL.NO_DEFAULT_STORE))return void aw(this,F,$).call(this);aI(this,H,null==(i=ak(this,P))?void 0:i.subscribe(ak(this,U)))}get fullscreenElement(){var e;return null!=(e=ak(this,N))?e:this}set fullscreenElement(e){var t;this.hasAttribute(aL.FULLSCREEN_ELEMENT)&&this.removeAttribute(aL.FULLSCREEN_ELEMENT),aI(this,N,e),null==(t=ak(this,P))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return iC(this,aL.DEFAULT_SUBTITLES)}set defaultSubtitles(e){iD(this,aL.DEFAULT_SUBTITLES,e)}get defaultStreamType(){return iO(this,aL.DEFAULT_STREAM_TYPE)}set defaultStreamType(e){iN(this,aL.DEFAULT_STREAM_TYPE,e)}get defaultDuration(){return iM(this,aL.DEFAULT_DURATION)}set defaultDuration(e){iR(this,aL.DEFAULT_DURATION,e)}get noHotkeys(){return iC(this,aL.NO_HOTKEYS)}set noHotkeys(e){iD(this,aL.NO_HOTKEYS,e)}get keysUsed(){return iO(this,aL.KEYS_USED)}set keysUsed(e){iN(this,aL.KEYS_USED,e)}get liveEdgeOffset(){return iM(this,aL.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){iR(this,aL.LIVE_EDGE_OFFSET,e)}get noAutoSeekToLive(){return iC(this,aL.NO_AUTO_SEEK_TO_LIVE)}set noAutoSeekToLive(e){iD(this,aL.NO_AUTO_SEEK_TO_LIVE,e)}get noVolumePref(){return iC(this,aL.NO_VOLUME_PREF)}set noVolumePref(e){iD(this,aL.NO_VOLUME_PREF,e)}get noMutedPref(){return iC(this,aL.NO_MUTED_PREF)}set noMutedPref(e){iD(this,aL.NO_MUTED_PREF,e)}get noSubtitlesLangPref(){return iC(this,aL.NO_SUBTITLES_LANG_PREF)}set noSubtitlesLangPref(e){iD(this,aL.NO_SUBTITLES_LANG_PREF,e)}get noDefaultStore(){return iC(this,aL.NO_DEFAULT_STORE)}set noDefaultStore(e){iD(this,aL.NO_DEFAULT_STORE,e)}get resolvedLang(){let[e]=t6.split("-");return t9[t6]?t6:t9[e]?e:"en"}attributeChangedCallback(e,t,i){var a,r,s,n,o,l,d,u,h,c,m,p;if(super.attributeChangedCallback(e,t,i),e===aL.NO_HOTKEYS)i!==t&&""===i?(this.hasAttribute(aL.HOTKEYS)&&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===aL.HOTKEYS)ak(this,O).value=i;else if(e===aL.DEFAULT_SUBTITLES&&i!==t)null==(a=ak(this,P))||a.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(aL.DEFAULT_SUBTITLES)}});else if(e===aL.DEFAULT_STREAM_TYPE)null==(s=ak(this,P))||s.dispatch({type:"optionschangerequest",detail:{defaultStreamType:null!=(r=this.getAttribute(aL.DEFAULT_STREAM_TYPE))?r:void 0}});else if(e===aL.LIVE_EDGE_OFFSET&&i!==t)null==(n=ak(this,P))||n.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(aL.LIVE_EDGE_OFFSET)?+this.getAttribute(aL.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(aL.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(aL.SEEK_TO_LIVE_OFFSET):this.hasAttribute(aL.LIVE_EDGE_OFFSET)?+this.getAttribute(aL.LIVE_EDGE_OFFSET):void 0}});else if(e===aL.SEEK_TO_LIVE_OFFSET&&i!==t)null==(o=ak(this,P))||o.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(aL.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(aL.SEEK_TO_LIVE_OFFSET):this.hasAttribute(aL.LIVE_EDGE_OFFSET)?+this.getAttribute(aL.LIVE_EDGE_OFFSET):void 0}});else if(e===aL.NO_AUTO_SEEK_TO_LIVE)null==(l=ak(this,P))||l.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(aL.NO_AUTO_SEEK_TO_LIVE)}});else if(e===aL.FULLSCREEN_ELEMENT){let e=i?null==(d=this.getRootNode())?void 0:d.getElementById(i):void 0;aI(this,N,e),null==(u=ak(this,P))||u.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===aL.LANG&&i!==t?(t6=i,null==(h=ak(this,P))||h.dispatch({type:"optionschangerequest",detail:{mediaLang:i}}
206)):e===aL.LOOP&&i!==t?null==(c=ak(this,P))||c.dispatch({type:tK.MEDIA_LOOP_REQUEST,detail:null!=i}):e===aL.NO_VOLUME_PREF&&i!==t?null==(m=ak(this,P))||m.dispatch({type:"optionschangerequest",detail:{noVolumePref:this.hasAttribute(aL.NO_VOLUME_PREF)}}):e===aL.NO_MUTED_PREF&&i!==t&&(null==(p=ak(this,P))||p.dispatch({type:"optionschangerequest",detail:{noMutedPref:this.hasAttribute(aL.NO_MUTED_PREF)}}))}connectedCallback(){var e,t,i;this.associateElement(this),ak(this,P)||this.hasAttribute(aL.NO_DEFAULT_STORE)||aw(this,F,$).call(this),null==(e=ak(this,P))||e.dispatch({type:"documentelementchangerequest",detail:ip}),null==(t=ak(this,P))||t.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement}),super.connectedCallback(),ak(this,P)&&!ak(this,H)&&aI(this,H,null==(i=ak(this,P))?void 0:i.subscribe(ak(this,U))),void 0!==ak(this,W)&&ak(this,P)&&this.media&&setTimeout(()=>{var e,t,i;(null==(t=null==(e=this.media)?void 0:e.textTracks)?void 0:t.length)&&(null==(i=ak(this,P))||i.dispatch({type:tK.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:ak(this,W)}))},0),this.hasAttribute(aL.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var e,t,i,a,r,s;if(null==(e=super.disconnectedCallback)||e.call(this),this.disableHotkeys(),ak(this,P)){let e=ak(this,P).getState();aI(this,W,!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)),null==(i=ak(this,P))||i.dispatch({type:"fullscreenelementchangerequest",detail:void 0}),null==(a=ak(this,P))||a.dispatch({type:"documentelementchangerequest",detail:void 0}),null==(r=ak(this,P))||r.dispatch({type:tK.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})}ak(this,H)&&(null==(s=ak(this,H))||s.call(this),aI(this,H,void 0)),this.unassociateElement(this),ak(this,x)&&(ak(this,x).remove(),aI(this,x,null))}mediaSetCallback(e){var t;super.mediaSetCallback(e),null==(t=ak(this,P))||t.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var t;super.mediaUnsetCallback(e),null==(t=ak(this,P))||t.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,t){aH(this.mediaStateReceivers,e,t)}associateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;if(t.has(e))return;let i=aV(e,this.registerMediaStateReceiver.bind(this),this.unregisterMediaStateReceiver.bind(this));Object.values(tK).forEach(t=>{e.addEventListener(t,ak(this,V))}),t.set(e,i)}unassociateElement(e){if(!e)return;let{associatedElementSubscriptions:t}=this;t.has(e)&&(t.get(e)(),t.delete(e),Object.values(tK).forEach(t=>{e.removeEventListener(t,ak(this,V))}))}registerMediaStateReceiver(e){if(!e)return;let t=this.mediaStateReceivers;!(t.indexOf(e)>-1)&&(t.push(e),ak(this,P)&&Object.entries(ak(this,P).getState()).forEach(([t,i])=>{aH([e],t,i)}))}unregisterMediaStateReceiver(e){let t=this.mediaStateReceivers,i=t.indexOf(e);i<0||t.splice(i,1)}enableHotkeys(){this.addEventListener("keydown",aw(this,G,K))}disableHotkeys(){this.removeEventListener("keydown",aw(this,G,K)),this.removeEventListener("keyup",ak(this,B))}get hotkeys(){return ak(this,O)}set hotkeys(e){iN(this,aL.HOTKEYS,e)}keyboardShortcutHandler(e){var t,i,a,r,s,n,o,l,d;let u,h,c,m=e.target;if(!((null!=(a=null!=(i=null==(t=m.getAttribute(aL.KEYS_USED))?void 0:t.split(" "))?i:null==m?void 0:m.keysUsed)?a:[]).map(e=>
206"Space"===e?" ":e).filter(Boolean).includes(e.key)||ak(this,O).contains(`no${e.key.toLowerCase()}`)||" "===e.key&&ak(this,O).contains("nospace"))&&!(e.shiftKey&&("/"===e.key||"?"===e.key)&&ak(this,O).contains("noshift+/")))switch(e.key){case" ":case"k":u=ak(this,P).getState().mediaPaused?tK.MEDIA_PLAY_REQUEST:tK.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new im.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"m":u="off"===this.mediaStore.getState().mediaVolumeLevel?tK.MEDIA_UNMUTE_REQUEST:tK.MEDIA_MUTE_REQUEST,this.dispatchEvent(new im.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"f":u=this.mediaStore.getState().mediaIsFullscreen?tK.MEDIA_EXIT_FULLSCREEN_REQUEST:tK.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new im.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new im.CustomEvent(tK.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":case"j":{let e=this.hasAttribute(aL.KEYBOARD_BACKWARD_SEEK_OFFSET)?+this.getAttribute(aL.KEYBOARD_BACKWARD_SEEK_OFFSET):10;h=Math.max((null!=(r=this.mediaStore.getState().mediaCurrentTime)?r:0)-e,0),c=new im.CustomEvent(tK.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(c);break}case"ArrowRight":case"l":{let e=this.hasAttribute(aL.KEYBOARD_FORWARD_SEEK_OFFSET)?+this.getAttribute(aL.KEYBOARD_FORWARD_SEEK_OFFSET):10;h=Math.max((null!=(s=this.mediaStore.getState().mediaCurrentTime)?s:0)+e,0),c=new im.CustomEvent(tK.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(c);break}case"ArrowUp":{let e=this.hasAttribute(aL.KEYBOARD_UP_VOLUME_STEP)?+this.getAttribute(aL.KEYBOARD_UP_VOLUME_STEP):.025;h=Math.min((null!=(n=this.mediaStore.getState().mediaVolume)?n:1)+e,1),c=new im.CustomEvent(tK.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(c);break}case"ArrowDown":{let e=this.hasAttribute(aL.KEYBOARD_DOWN_VOLUME_STEP)?+this.getAttribute(aL.KEYBOARD_DOWN_VOLUME_STEP):.025;h=Math.max((null!=(o=this.mediaStore.getState().mediaVolume)?o:1)-e,0),c=new im.CustomEvent(tK.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(c);break}case"<":h=Math.max((null!=(l=this.mediaStore.getState().mediaPlaybackRate)?l:1)-.25,.25).toFixed(2),c=new im.CustomEvent(tK.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(c);break;case">":h=Math.min((null!=(d=this.mediaStore.getState().mediaPlaybackRate)?d:1)+.25,2).toFixed(2),c=new im.CustomEvent(tK.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:h}),this.dispatchEvent(c);break;case"/":case"?":e.shiftKey&&aw(this,q,j).call(this);break;case"p":u=this.mediaStore.getState().mediaIsPip?tK.MEDIA_EXIT_PIP_REQUEST:tK.MEDIA_ENTER_PIP_REQUEST,c=new im.CustomEvent(u,{composed:!0,bubbles:!0}),this.dispatchEvent(c)}}}O=new WeakMap,N=new WeakMap,P=new WeakMap,x=new WeakMap,U=new WeakMap,H=new WeakMap,V=new WeakMap,W=new WeakMap,F=new WeakSet,$=function(){var e;this.mediaStore=(({media:e,fullscreenElement:t,documentElement:i,stateMediator:a=aA,requestMap:r=aT,options:s={},monitorStateOwnersOnlyWithSubscriptions:n=!0})=>{let o,l=[],d={options:{...s}},u=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0}),h=e=>{void 0!=e&&(ap(e,u)||(u=Object.freeze({...u,...e}),l.forEach(e=>e(u))))},c=()=>{h(Object.entries(a).reduce((e,[t,{get:i}])=>(e[t]=i(d),e),{}))},m={},p=async(e,t)=>{var i,r,s,u,p,E,v,b,g,f,A,T,_,k,y,I;let w=!!o;if(o={...d,...null!=o?o:{},...e},w)return;await ag(...Object.values(e));let S=l.length>0&&0===t&&n,L=d.media!==o.media,M=(null==(i=d.media)?void 0:i.textTracks)!==(null==(r=o.media)?void 0:r.textTracks),R=(null==(s=d.media)?void 0:s.videoRenditions)!==(null==(u=o.media)?void 0:u.videoRenditions),C=(null==(p=d.media)?void 0:p.audioTracks)!==(null==(E=o.media)?void 0:E.audioTracks),D=(null==(v=d.media)?void 0:v.remote)!==(null==(b=o.media)?void 0:b.remote),O=d.documentElement!==o.documentElement,N=!!d.media&&(L||S),P=!!(null==(g=d.media)?void 0:g.textTracks)&&(M||S),x=!!(null==(f=d.media)?void 0:f.videoRenditions)&&(R||S),U=!!(null==(A=d.media)?void 0:A.audioTracks)&&(C||S),H=!!(null==(T=d.media)?void 0:T.remote)&&(D||S),V=!!d.documentElement&&(O||S),W=N||P||x||U||H||V,F=0===l.length&&1===t&&n,$=!!o.media&&(L||F),B=!!(null==(_=o.media)?void 0:_.textTracks)&&(M||F),G=!!(null==(k=o.media)?void 0:k.videoRenditions)&&(R||F),K=!!(null==(y=o.media)?void 0:y.audioTracks)&&(C||F),q=!!(null==(I=o.media)?void 0:I.remote)&&(D||F),j=!!o.documentElement&&(O||F),Y=$||B||G||K||q||j;
206if(!(W||Y)){Object.entries(o).forEach(([e,t])=>{d[e]=t}),c(),o=void 0;return}Object.entries(a).forEach(([e,{get:t,mediaEvents:i=[],textTracksEvents:a=[],videoRenditionsEvents:r=[],audioTracksEvents:s=[],remoteEvents:n=[],rootEvents:l=[],stateOwnersUpdateHandlers:u=[]}])=>{let c;m[e]||(m[e]={});let p=i=>{h({[e]:t(d,i)})};c=m[e].mediaEvents,i.forEach(t=>{c&&N&&(d.media.removeEventListener(t,c),m[e].mediaEvents=void 0),$&&(o.media.addEventListener(t,p),m[e].mediaEvents=p)}),c=m[e].textTracksEvents,a.forEach(t=>{var i,a;c&&P&&(null==(i=d.media.textTracks)||i.removeEventListener(t,c),m[e].textTracksEvents=void 0),B&&(null==(a=o.media.textTracks)||a.addEventListener(t,p),m[e].textTracksEvents=p)}),c=m[e].videoRenditionsEvents,r.forEach(t=>{var i,a;c&&x&&(null==(i=d.media.videoRenditions)||i.removeEventListener(t,c),m[e].videoRenditionsEvents=void 0),G&&(null==(a=o.media.videoRenditions)||a.addEventListener(t,p),m[e].videoRenditionsEvents=p)}),c=m[e].audioTracksEvents,s.forEach(t=>{var i,a;c&&U&&(null==(i=d.media.audioTracks)||i.removeEventListener(t,c),m[e].audioTracksEvents=void 0),K&&(null==(a=o.media.audioTracks)||a.addEventListener(t,p),m[e].audioTracksEvents=p)}),c=m[e].remoteEvents,n.forEach(t=>{var i,a;c&&H&&(null==(i=d.media.remote)||i.removeEventListener(t,c),m[e].remoteEvents=void 0),q&&(null==(a=o.media.remote)||a.addEventListener(t,p),m[e].remoteEvents=p)}),c=m[e].rootEvents,l.forEach(t=>{c&&V&&(d.documentElement.removeEventListener(t,c),m[e].rootEvents=void 0),j&&(o.documentElement.addEventListener(t,p),m[e].rootEvents=p)});let E=m[e].stateOwnersUpdateHandlers;if(E&&W&&(Array.isArray(E)?E:[E]).forEach(e=>{"function"==typeof e&&e()}),Y){let t=u.map(e=>e(p,o)).filter(e=>"function"==typeof e);m[e].stateOwnersUpdateHandlers=1===t.length?t[0]:t}else W&&(m[e].stateOwnersUpdateHandlers=void 0)}),Object.entries(o).forEach(([e,t])=>{d[e]=t}),c(),o=void 0};return p({media:e,fullscreenElement:t,documentElement:i,options:s}),{dispatch(e){let{type:t,detail:i}=e;if(r[t]&&null==u.mediaErrorCode)return void h(r[t](a,d,e));"mediaelementchangerequest"===t?p({media:i}):"fullscreenelementchangerequest"===t?p({fullscreenElement:i}):"documentelementchangerequest"===t?p({documentElement:i}):"optionschangerequest"===t&&(Object.entries(null!=i?i:{}).forEach(([e,t])=>{d.options[e]=t}),c())},getState:()=>u,subscribe:e=>(p({},l.length+1),l.push(e),e(u),()=>{let t=l.indexOf(e);t>=0&&(p({},l.length-1),l.splice(t,1))})}})({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(aL.DEFAULT_SUBTITLES),defaultDuration:this.hasAttribute(aL.DEFAULT_DURATION)?+this.getAttribute(aL.DEFAULT_DURATION):void 0,defaultStreamType:null!=(e=this.getAttribute(aL.DEFAULT_STREAM_TYPE))?e:void 0,liveEdgeOffset:this.hasAttribute(aL.LIVE_EDGE_OFFSET)?+this.getAttribute(aL.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(aL.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(aL.SEEK_TO_LIVE_OFFSET):this.hasAttribute(aL.LIVE_EDGE_OFFSET)?+this.getAttribute(aL.LIVE_EDGE_OFFSET):void 0,noAutoSeekToLive:this.hasAttribute(aL.NO_AUTO_SEEK_TO_LIVE),noVolumePref:this.hasAttribute(aL.NO_VOLUME_PREF),noMutedPref:this.hasAttribute(aL.NO_MUTED_PREF),noSubtitlesLangPref:this.hasAttribute(aL.NO_SUBTITLES_LANG_PREF)}})},B=new WeakMap,G=new WeakSet,K=function(e){var t;let{metaKey:i,altKey:a,key:r,shiftKey:s}=e,n=s&&("/"===r||"?"===r);if(n&&(null==(t=ak(this,x))?void 0:t.open)||i||a||!n&&!aS.includes(r))return void this.removeEventListener("keyup",ak(this,B));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)||ak(this,O).contains(`no${r.toLowerCase()}`)||" "===r&&ak(this,O).contains("nospace")||l||e.preventDefault(),this.addEventListener("keyup",ak(this,B),{once:!0})},q=new WeakSet,j=function(){ak(this,x)||(aI(this,x,ip.createElement("media-keyboard-shortcuts-dialog")),this.appendChild(ak(this,x))),ak(this,x).open=!0};let aR=Object.values(tQ),aC=Object.values(tj),aD=e=>{var t,i,a,r;let{observedAttributes:s}=e.constructor;!s&&(null==(t=e.nodeName)?void 0:t.includes("-"))&&(im.customElements.upgrade(e),{observedAttributes:s}=e.constructor);let n=null==(r=null==(a=null==(i=null==e?void 0:e.getAttribute)?void 0:i.call(e,tq.MEDIA_CHROME_ATTRIBUTES))?void 0:a.split)?void 0:r.call(a,/\s+/);return Array.isArray(s||n)?(s||n).filter(e=>aR.includes(e)):[]},aO=e=>(e=>{var t,i;return(null==(t=e.nodeName)?void 0:t.includes("-"))&&im.customElements.get(null==(i=e.nodeName)?void 0:i.toLowerCase())&&!(e instanceof im.customElements.get(e.nodeName.toLowerCase()))&&im.customElements.upgrade(e),aC.some(t=>t in e)})(e)||!!aD(e).length,aN=e=>{var t;return null==(t=null==e?void 0:e.join)?void 0:t.call(e,":")},aP={[tQ.MEDIA_SUBTITLES_LIST]:i5,[tQ.MEDIA_SUBTITLES_SHOWING]:i5,[tQ.MEDIA_SEEKABLE]:aN,[tQ.MEDIA_BUFFERED]:e=>null==e?void 0:e.map(aN).join(" "),[tQ.MEDIA_PREVIEW_COORDS]:e=>null==e?void 0:e.join(" "),[tQ.MEDIA_RENDITION_LIST]:function(e){return null==e?void 0:e.map(t3).join(" ")},[tQ.MEDIA_AUDIO_TRACK_LIST]:function(e){return null==e?void 0:e.map(t4).join(" ")}},ax=async(e,t,i)=>{var a,r;if(e.isConnected||await t8(0),"boolean"==typeof i||null==i)return iD(e,t,i);if("number"==typeof i)return iR(e,t,i);if("string"==typeof i)return iN(e,t,i);if(Array.isArray(i)&&!i.length)return e.removeAttribute(t);let s=null!=(r=null==(a=aP[t])?void 0:a.call(aP,i))?r:i;return e.setAttribute(t,s)},aU=(e,t)=>
206{if((e=>{var t;return!!(null==(t=e.closest)?void 0:t.call(e,'*[slot="media"]'))})(e))return;let i=(e,t)=>{var i,a;aO(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=>aU(e,t))},a=null==e?void 0:e.nodeName.toLowerCase();if(a.includes("-")&&!aO(e))return void im.customElements.whenDefined(a).then(()=>{i(e,t)});i(e,t)},aH=(e,t,i)=>{e.forEach(e=>{if(t in e){e[t]=i;return}let a=aD(e),r=t.toLowerCase();a.includes(r)&&ax(e,r,i)})},aV=(e,t,i)=>{aU(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(tK.REGISTER_MEDIA_STATE_RECEIVER,a),e.addEventListener(tK.UNREGISTER_MEDIA_STATE_RECEIVER,r);let s=[],n=e=>{let a=e.target;"media"!==a.name&&(s.forEach(e=>aU(e,i)),(s=[...a.assignedElements({flatten:!0})]).forEach(e=>aU(e,t)))};e.addEventListener("slotchange",n);let o=new MutationObserver(e=>{e.forEach(e=>{let{addedNodes:a=[],removedNodes:r=[],type:s,target:n,attributeName:o}=e;"childList"===s?(Array.prototype.forEach.call(a,e=>aU(e,t)),Array.prototype.forEach.call(r,e=>aU(e,i))):"attributes"===s&&o===tq.MEDIA_CHROME_ATTRIBUTES&&(aO(n)?t(n):i(n))})});return o.observe(e,{childList:!0,attributes:!0,subtree:!0}),()=>{aU(e,i),e.removeEventListener("slotchange",n),o.disconnect(),e.removeEventListener(tK.REGISTER_MEDIA_STATE_RECEIVER,a),e.removeEventListener(tK.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};im.customElements.get("media-controller")||im.customElements.define("media-controller",aM);let aW={PLACEMENT:"placement",BOUNDS:"bounds"};class aF extends im.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!iw(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=iI(this,"#"+this.bounds))?e:function(e){var t;return null!=(t=function(e){var t;let{MEDIA_CONTROLLER:i}=tq,a=e.getAttribute(i);if(a)return null==(t=function(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}(e))?void 0:t.getElementById(a)}(e))?t:iI(e,"media-controller")}(this);if(!a)return;let{x:r,width:s}=a.getBoundingClientRect(),{x:n,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"),h=u?parseFloat(u.replace("px","")):0,c=n-r+d-h,m=n+o-(r+s)+d+h;return c<0?void this.style.setProperty("--media-tooltip-offset-x",`${c}px`):m>0?void this.style.setProperty("--media-tooltip-offset-x",`${m}px`):void this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=iT(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){let e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[aW.PLACEMENT,aW.BOUNDS]}get placement(){return iO(this,aW.PLACEMENT)}set placement(e){iN(this,aW.PLACEMENT,e)}get bounds(){return iO(this,aW.BOUNDS)}set bounds(e){iN(this,aW.BOUNDS,e)}}aF.shadowRootOptions={mode:"open"},aF.getTemplateHTML=function(e){return` 207 <style> 208 :host { 209 --_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7))); 210 --_tooltip-background: var(--media-tooltip-background, var(--_tooltip-background-color)); 211 --_tooltip-arrow-half-width: calc(var(--media-tooltip-arrow-width, 12px) / 2); 212 --_tooltip-arrow-height: var(--media-tooltip-arrow-height, 5px); 213 --_tooltip-arrow-background: var(--media-tooltip-arrow-color, var(--_tooltip-background-color)); 214 position: relative; 215 pointer-events: none; 216 display: var(--media-tooltip-display, inline-flex); 217 justify-content: center; 218 align-items: center; 219 box-sizing: border-box; 220 z-index: var(--media-tooltip-z-index, 1); 221 background: var(--_tooltip-background); 222 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 223 font: var(--media-font, 224 var(--media-font-weight, 400) 225 var(--media-font-size, 13px) / 226 var(--media-text-content-height, var(--media-control-height, 18px)) 227 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 228 padding: var(--media-tooltip-padding, .35em .7em); 229 border: var(--media-tooltip-border, none); 230 border-radius: var(--media-tooltip-border-radius, 5px); 231 filter: var(--media-tooltip-filter, drop-shadow(0 0 4px rgba(0, 0, 0, .2))); 232 white-space: var(--media-tooltip-white-space, nowrap); 233 } 234 235 :host([hidden]) { 236 display: none; 237 } 238 239 img, svg { 240 display: inline-block; 241 } 242 243 #arrow { 244 position: absolute; 245 width: 0px; 246 height: 0px; 247 border-style: solid; 248 display: var(--media-tooltip-arrow-display, block); 249 } 250 251 :host(:not([placement])), 252 :host([placement="top"]) { 253 position: absolute; 254 bottom: calc(100% + var(--media-tooltip-distance, 12px)); 255 left: 50%; 256 transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0
256); 257 } 258 :host(:not([placement])) #arrow, 259 :host([placement="top"]) #arrow { 260 top: 100%; 261 left: 50%; 262 border-width: var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width); 263 border-color: var(--_tooltip-arrow-background) transparent transparent transparent; 264 transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0); 265 } 266 267 :host([placement="right"]) { 268 position: absolute; 269 left: calc(100% + var(--media-tooltip-distance, 12px)); 270 top: 50%; 271 transform: translate(0, -50%); 272 } 273 :host([placement="right"]) #arrow { 274 top: 50%; 275 right: 100%; 276 border-width: var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width) 0; 277 border-color: transparent var(--_tooltip-arrow-background) transparent transparent; 278 transform: translate(0, -50%); 279 } 280 281 :host([placement="bottom"]) { 282 position: absolute; 283 top: calc(100% + var(--media-tooltip-distance, 12px)); 284 left: 50%; 285 transform: translate(calc(-50% - var(--media-tooltip-offset-x, 0px)), 0); 286 } 287 :host([placement="bottom"]) #arrow { 288 bottom: 100%; 289 left: 50%; 290 border-width: 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height) var(--_tooltip-arrow-half-width); 291 border-color: transparent transparent var(--_tooltip-arrow-background) transparent; 292 transform: translate(calc(-50% + var(--media-tooltip-offset-x, 0px)), 0); 293 } 294 295 :host([placement="left"]) { 296 position: absolute; 297 right: calc(100% + var(--media-tooltip-distance, 12px)); 298 top: 50%; 299 transform: translate(0, -50%); 300 } 301 :host([placement="left"]) #arrow { 302 top: 50%; 303 left: 100%; 304 border-width: var(--_tooltip-arrow-half-width) 0 var(--_tooltip-arrow-half-width) var(--_tooltip-arrow-height); 305 border-color: transparent transparent transparent var(--_tooltip-arrow-background); 306 transform: translate(0, -50%); 307 } 308 309 :host([placement="none"]) #arrow { 310 display: none; 311 } 312 </style> 313 <slot></slot> 314 <div id="arrow"></div> 315 `},im.customElements.get("media-tooltip")||im.customElements.define("media-tooltip",aF);var a$=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},aB=(e,t,i)=>(a$(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)=>(a$(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let aq={TOOLTIP_PLACEMENT:"tooltipplacement",DISABLED:"disabled",NO_TOOLTIP:"notooltip"};class aj extends im.HTMLElement{constructor(){if(super(),aG(this,J),aG(this,Y,void 0),this.preventClick=!1,this.tooltipEl=null,aG(this,Q,e=>{this.preventClick||this.handleClick(e),setTimeout(aB(this,z),0)}),aG(this,z,()=>{var e,t;null==(t=null==(e=this.tooltipEl)?void 0:e.updateXOffset)||t.call(e)}),aG(this,Z,e=>{let{key:t}=e;if(!this.keysUsed.includes(t))return void this.removeEventListener("keyup",aB(this,Z));this.preventClick||this.handleClick(e)}),aG(this,X,e=>{let{metaKey:t,altKey:i,key:a}=e;if(t||i||!this.keysUsed.includes(a))return void this.removeEventListener("keyup",aB(this,Z));this.addEventListener("keyup",aB(this,Z),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=iT(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",aq.TOOLTIP_PLACEMENT,tq.MEDIA_CONTROLLER,tQ.MEDIA_LA
315NG]}enable(){this.addEventListener("click",aB(this,Q)),this.addEventListener("keydown",aB(this,X)),this.tabIndex=0}disable(){this.removeEventListener("click",aB(this,Q)),this.removeEventListener("keydown",aB(this,X)),this.removeEventListener("keyup",aB(this,Z)),this.tabIndex=-1}attributeChangedCallback(e,t,i){var a,r,s,n,o;e===tq.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=aB(this,Y))?void 0:a.unassociateElement)||r.call(a,this),aK(this,Y,null)),i&&this.isConnected&&(aK(this,Y,null==(s=this.getRootNode())?void 0:s.getElementById(i)),null==(o=null==(n=aB(this,Y))?void 0:n.associateElement)||o.call(n,this))):"disabled"===e&&i!==t?null==i?this.enable():this.disable():e===aq.TOOLTIP_PLACEMENT&&this.tooltipEl&&i!==t?this.tooltipEl.placement=i:e===tQ.MEDIA_LANG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),aB(this,z).call(this)}connectedCallback(){var e,t,i;let{style:a}=iS(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(tq.MEDIA_CONTROLLER);r&&(aK(this,Y,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=aB(this,Y))?void 0:t.associateElement)||i.call(t,this)),im.customElements.whenDefined("media-tooltip").then(()=>{var e,t;return(e=J,t=ee,a$(this,e,"access private method"),t).call(this)})}disconnectedCallback(){var e,t;this.disable(),null==(t=null==(e=aB(this,Y))?void 0:e.unassociateElement)||t.call(e,this),aK(this,Y,null),this.removeEventListener("mouseenter",aB(this,z)),this.removeEventListener("focus",aB(this,z)),this.removeEventListener("click",aB(this,Q))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return iO(this,aq.TOOLTIP_PLACEMENT)}set tooltipPlacement(e){iN(this,aq.TOOLTIP_PLACEMENT,e)}get mediaController(){return iO(this,tq.MEDIA_CONTROLLER)}set mediaController(e){iN(this,tq.MEDIA_CONTROLLER,e)}get disabled(){return iC(this,aq.DISABLED)}set disabled(e){iD(this,aq.DISABLED,e)}get noTooltip(){return iC(this,aq.NO_TOOLTIP)}set noTooltip(e){iD(this,aq.NO_TOOLTIP,e)}handleClick(e){}}Y=new WeakMap,Q=new WeakMap,z=new WeakMap,Z=new WeakMap,X=new WeakMap,J=new WeakSet,ee=function(){this.addEventListener("mouseenter",aB(this,z)),this.addEventListener("focus",aB(this,z)),this.addEventListener("click",aB(this,Q));let e=this.tooltipPlacement;e&&this.tooltipEl&&(this.tooltipEl.placement=e)},aj.shadowRootOptions={mode:"open"},aj.getTemplateHTML=function(e,t={}){return` 316 <style> 317 :host { 318 position: relative; 319 font: var(--media-font, 320 var(--media-font-weight, bold) 321 var(--media-font-size, 14px) / 322 var(--media-text-content-height, var(--media-control-height, 24px)) 323 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 324 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 325 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 326 padding: var(--media-button-padding, var(--media-control-padding, 10px)); 327 justify-content: var(--media-button-justify-content, center); 328 display: inline-flex; 329 align-items: center; 330 vertical-align: middle; 331 box-sizing: border-box; 332 transition: background .15s linear; 333 pointer-events: auto; 334 cursor: var(--media-cursor, pointer); 335 -webkit-tap-highlight-color: transparent; 336 } 337 338 339 :host(:focus-visible) { 340 box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 341 outline: 0; 342 } 343 344 :host(:where(:focus)) { 345 box-shadow: none; 346 outline: 0; 347 } 348 349 :host(:hover) { 350 background: var(--media-control-hover-background, rgba(50 50 70 / .7)); 351 } 352 353 slot[name="icon"] { 354 display: inline-flex; 355 align-items: center; 356 } 357 358 svg, img, ::slotted(svg), ::slotted(img) { 359 width: var(--media-button-icon-width); 360 height: var(--media-button-icon-height, var(--media-control-height, 24px)); 361 transform: var(--media-button-icon-transform); 362 transition: var(--media-button-icon-transition); 363 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 364 vertical-align: middle; 365 max-width: 100%; 366 max-height: 100%; 367 min-width: 100%; 368 } 369 370 media-tooltip { 371 372 max-width: 0; 373 overflow-x: clip; 374 opacity: 0; 375 transition: opacity .3s, max-width 0s 9s; 376 } 377 378 :host(:hover) media-tooltip, 379 :host(:focus-visible) media-tooltip { 380 max-width: 100vw; 381 opacity: 1; 382 transition: opacity .3s; 383 } 384 385 :host([notooltip]) slot[name="tooltip"] { 386 display: none; 387 } 388 </style> 389
390 ${this.getSlotTemplateHTML(e,t)} 391 392 <slot name="tooltip"> 393 <media-tooltip part="tooltip" aria-hidden="true"> 394 <template shadowrootmode="${aF.shadowRootOptions.mode}"> 395 ${aF.getTemplateHTML({})} 396 </template> 397 <slot name="tooltip-content"> 398 ${this.getTooltipContentHTML(e)} 399 </slot> 400 </media-tooltip> 401 </slot> 402 `},aj.getSlotTemplateHTML=function(e,t){return` 403 <slot></slot> 404 `},aj.getTooltipContentHTML=function(){return""},im.customElements.get("media-chrome-button")||im.customElements.define("media-chrome-button",aj);let aY=`<svg aria-hidden="true" viewBox="0 0 26 24"> 405 <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"/> 406</svg> 407`,aQ=e=>{let t=e.mediaIsAirplaying?ie("stop airplay"):ie("start airplay");e.setAttribute("aria-label",t)};class az extends aj{static get observedAttributes(){return[...super.observedAttributes,tQ.MEDIA_IS_AIRPLAYING,tQ.MEDIA_AIRPLAY_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),aQ(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===tQ.MEDIA_IS_AIRPLAYING&&aQ(this)}get mediaIsAirplaying(){return iC(this,tQ.MEDIA_IS_AIRPLAYING)}set mediaIsAirplaying(e){iD(this,tQ.MEDIA_IS_AIRPLAYING,e)}get mediaAirplayUnavailable(){return iO(this,tQ.MEDIA_AIRPLAY_UNAVAILABLE)}set mediaAirplayUnavailable(e){iN(this,tQ.MEDIA_AIRPLAY_UNAVAILABLE,e)}handleClick(){let e=new im.CustomEvent(tK.MEDIA_AIRPLAY_REQUEST,{composed:!0,bubbles:!0});this.dispatchEvent(e)}}az.getSlotTemplateHTML=function(e){return` 408 <style> 409 :host([${tQ.MEDIA_IS_AIRPLAYING}]) slot[name=icon] slot:not([name=exit]) { 410 display: none !important; 411 } 412 413 414 :host(:not([${tQ.MEDIA_IS_AIRPLAYING}])) slot[name=icon] slot:not([name=enter]) { 415 display: none !important; 416 } 417 418 :host([${tQ.MEDIA_IS_AIRPLAYING}]) slot[name=tooltip-enter], 419 :host(:not([${tQ.MEDIA_IS_AIRPLAYING}])) slot[name=tooltip-exit] { 420 display: none; 421 } 422 </style> 423 424 <slot name="icon"> 425 <slot name="enter">${aY}</slot> 426 <slot name="exit">${aY}</slot> 427 </slot> 428 `},az.getTooltipContentHTML=function(){return` 429 <slot name="tooltip-enter">${ie("start airplay")}</slot> 430 <slot name="tooltip-exit">${ie("stop airplay")}</slot> 431 `},im.customElements.get("media-airplay-button")||im.customElements.define("media-airplay-button",az);let aZ=`<svg aria-hidden="true" viewBox="0 0 26 24"> 432 <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"/> 433</svg>`,aX=`<svg aria-hidden="true" viewBox="0 0 26 24"> 434 <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
4341 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"/> 435</svg>`,aJ=e=>{e.setAttribute("aria-checked",(e=>{var t;return!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)||e.hasAttribute(tQ.MEDIA_SUBTITLES_SHOWING)})(e).toString())};class a0 extends aj{static get observedAttributes(){return[...super.observedAttributes,tQ.MEDIA_SUBTITLES_LIST,tQ.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.setAttribute("aria-label",ie("closed captions")),aJ(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===tQ.MEDIA_SUBTITLES_SHOWING&&aJ(this)}get mediaSubtitlesList(){return a1(this,tQ.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){a2(this,tQ.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return a1(this,tQ.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){a2(this,tQ.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new im.CustomEvent(tK.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}a0.getSlotTemplateHTML=function(e){return` 436 <style> 437 :host([aria-checked="true"]) slot[name=off] { 438 display: none !important; 439 } 440 441 442 :host(:not([aria-checked="true"])) slot[name=on] { 443 display: none !important; 444 } 445 446 :host([aria-checked="true"]) slot[name=tooltip-enable], 447 :host(:not([aria-checked="true"])) slot[name=tooltip-disable] { 448 display: none; 449 } 450 </style> 451 452 <slot name="icon"> 453 <slot name="on">${aZ}</slot> 454 <slot name="off">${aX}</slot> 455 </slot> 456 `},a0.getTooltipContentHTML=function(){return` 457 <slot name="tooltip-enable">${ie("Enable captions")}</slot> 458 <slot name="tooltip-disable">${ie("Disable captions")}</slot> 459 `};let a1=(e,t)=>{let i=e.getAttribute(t);return i?i0(i):[]},a2=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=i5(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};im.customElements.get("media-captions-button")||im.customElements.define("media-captions-button",a0);let a5=e=>{let t=e.mediaIsCasting?ie("stop casting"):ie("start casting");e.setAttribute("aria-label",t)};class a3 extends aj{static get observedAttributes(){return[...super.observedAttributes,tQ.MEDIA_IS_CASTING,tQ.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),a5(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===tQ.MEDIA_IS_CASTING&&a5(this)}get mediaIsCasting(){return iC(this,tQ.MEDIA_IS_CASTING)}set mediaIsCasting(e){iD(this,tQ.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return iO(this,tQ.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){iN(this,tQ.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){let e=this.mediaIsCasting?tK.MEDIA_EXIT_CAST_REQUEST:tK.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new im.CustomEvent(e,{composed:!0,bubbles:!0}))}}a3.getSlotTemplateHTML=function(e){return` 460 <style> 461 :host([${tQ.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) { 462 display: none !important; 463 } 464 465 466 :host(:not([${tQ.MEDIA_IS_CASTING}])) slot[name=icon] slot:not([name=enter]) { 467 display: none !important; 468 } 469 470 :host([${tQ.MEDIA_IS_CASTING}]) slot[name=tooltip-enter], 471 :host(:not([${tQ.MEDIA_IS_CASTING}])) slot[name=tooltip-exit] { 472 display: none; 473 } 474 </style> 475 476 <slot name="icon"> 477 <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> 478 <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> 479 </slot> 480 `},a3.getTooltipContentHTML=function(){return` 481 <slot name="tooltip-enter">${ie("Start casting")}</slot> 482 <slot name="tooltip-exit">${ie("Stop casting")}</slot> 483 `},im.customElements.get("media-cast-button")||im.customElements.define("media-cast-button",a3);var a4=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},a7=(e,t,i)=>(a4(e,t,"read from private field"),i?i.call(e):t.get(e)),a8=(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)},a9=(e,t,i,a)=>(a4(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),a6=(e,t,i)=>(a4(e,t,"access private method"),i);let re={OPEN:"open",ANCHOR:"anchor"};class rt extends im.HTMLElement{constructor(){super(),a8(this,er),a8(this,en),a8(this,el),a8(this,eu),a8(this,ec),a8(this,ep),a8(this,et,!1),a8(this,ei,null),a8(this,ea,null)}static get observedAttributes(){return[re.OPEN,re.ANCHOR]}get open(){return iC(this,re.OPEN)}set open(e){iD(this,re.OPEN,e)}handleEvent(e){switch(e.type){case"invoke":a6(this,eu,eh).call(this,e);break;case"focusout":a6(this,ec,em).call(this,e);break;case"keydown":a6(this,ep,eE).call(this,e)}}connectedCallback(){a6(this,er,es).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){a6(this,er,es).call(this),e===re.OPEN&&i!==t&&(this.open?a6(this,en,eo).call(this):a6(this,el,ed).call(this))}focus(){a9(this,ei,function e(t=document){var i;let a=null==t?void 0:t.activeElement;return a?null!=(i=e(a.shadowRoot))?i:a:null}());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;
483let i=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==i||i.focus()}get keysUsed(){return["Escape","Tab"]}}et=new WeakMap,ei=new WeakMap,ea=new WeakMap,er=new WeakSet,es=function(){if(!a7(this,et)&&(a9(this,et,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);let e=iT(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e),queueMicrotask(()=>{let{style:e}=iS(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}},en=new WeakSet,eo=function(){var e;null==(e=a7(this,ea))||e.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})},el=new WeakSet,ed=function(){var e;null==(e=a7(this,ea))||e.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))},eu=new WeakSet,eh=function(e){a9(this,ea,e.relatedTarget),iy(this,e.relatedTarget)||(this.open=!this.open)},ec=new WeakSet,em=function(e){var t;!iy(this,e.relatedTarget)&&(null==(t=a7(this,ei))||t.focus(),a7(this,ea)&&a7(this,ea)!==e.relatedTarget&&this.open&&(this.open=!1))},ep=new WeakSet,eE=function(e){var t,i,a,r,s;let{key:n,ctrlKey:o,altKey:l,metaKey:d}=e;o||l||d||this.keysUsed.includes(n)&&(e.preventDefault(),e.stopPropagation(),"Tab"===n?(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"===n&&(null==(s=a7(this,ei))||s.focus(),this.open=!1))},rt.shadowRootOptions={mode:"open"},rt.getTemplateHTML=function(e){return` 484 <style> 485 :host { 486 font: var(--media-font, 487 var(--media-font-weight, normal) 488 var(--media-font-size, 14px) / 489 var(--media-text-content-height, var(--media-control-height, 24px)) 490 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 491 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 492 display: var(--media-dialog-display, inline-flex); 493 justify-content: center; 494 align-items: center; 495 496 transition-behavior: allow-discrete; 497 visibility: hidden; 498 opacity: 0; 499 transform: translateY(2px) scale(.99); 500 pointer-events: none; 501 } 502 503 :host([open]) { 504 transition: display .2s, visibility 0s, opacity .2s ease-out, transform .15s ease-out; 505 visibility: visible; 506 opacity: 1; 507 transform: translateY(0) scale(1); 508 pointer-events: auto; 509 } 510 511 #content { 512 display: flex; 513 position: relative; 514 box-sizing: border-box; 515 width: min(320px, 100%); 516 word-wrap: break-word; 517 max-height: 100%; 518 overflow: auto; 519 text-align: center; 520 line-height: 1.4; 521 } 522 </style> 523 ${this.getSlotTemplateHTML(e)} 524 `},rt.getSlotTemplateHTML=function(e){return` 525 <slot id="content"></slot> 526 `},im.customElements.get("media-chrome-dialog")||im.customElements.define("media-chrome-dialog",rt);var ri=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ra=(e,t,i)=>(ri(e,t,"read from private field"),i?i.call(e):t.get(e)),rr=(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)},rs=(e,t,i,a)=>(ri(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),rn=(e,t,i)=>(ri(e,t,"access private method"),i);class ro extends im.HTMLElement{constructor(){if(super(),rr(this,eI),rr(this,eS),rr(this,eM),rr(this,eC),rr(this,eO),rr(this,eP),rr(this,eU),rr(this,eV),rr(this,ev,void 0),rr(this,eb,void 0),rr(this,eg,void 0),rr(this,ef,void 0),rr(this,eA,{}),rr(this,eT,[]),rr(this,e_,()=>{if(this.range.matches(":focus-visible")){let{style:e}=iS(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),rr(this,ek,()=>{let{style:e}=iS(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),rr(this,ey,()=>{let e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=iT(this.attributes),t=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(t):this.shadowRoot.innerHTML=t}this.container=this.shadowRoot.querySelector("#container"),rs(this,eg,this.shadowRoot.querySelector("#startpoint")),rs(this,ef,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",tq.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,s,n,o;e===tq.MEDIA_CONTROLLER?(t&&(null==(r=null==(a=ra(this,ev))?void 0:a.unassociateElement)||r.call(a,this),rs(this,ev,null)),i&&this.isConnected&&(rs(this,ev,null==(s=this.getRootNode())?void 0:s.getElementById(i)),null==(o=null==(n=ra(this,ev))?void 0:n.associateElement)||o.call(n,this))):("disabled"===e||"aria-disabled"===e&&t!==i)&&(null==i?(this.range.removeAttribute(e),rn(this,eS,eL).call(this)):(this.range.setAttribute(e,i),rn(this,eM,eR).call(this)))}connectedCallback(){var e,t,i;let{style:a}=iS(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),ra(this,eA).pointer=iS(this.shadowRoot,"#pointer"),ra(this,eA).progress=iS(this.shadowRoot,"#progress"),ra(this,eA).thumb=iS(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),ra(this,eA).activeSegment=iS(this.shadowRoot,"#segments-clipping rect:nth-child(0)");let r=this.getAttribute(tq.MEDIA_CONTROLLER);r&&(rs(this,ev,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=ra(this,ev))?void 0:t.associateElement)||i.call(t,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",ra(this,e_)),this.shadowRoot.addEventListener("focusout",ra(this,ek)),r
526n(this,eS,eL).call(this),ig(this.container,ra(this,ey))}disconnectedCallback(){var e,t;rn(this,eM,eR).call(this),null==(t=null==(e=ra(this,ev))?void 0:e.unassociateElement)||t.call(e,this),rs(this,ev,null),this.shadowRoot.removeEventListener("focusin",ra(this,e_)),this.shadowRoot.removeEventListener("focusout",ra(this,ek)),iA(this.container,ra(this,ey))}updatePointerBar(e){var t;null==(t=ra(this,eA).pointer)||t.style.setProperty("width",`${100*this.getPointerRatio(e)}%`)}updateBar(){var e,t;let i=100*this.range.valueAsNumber;null==(e=ra(this,eA).progress)||e.style.setProperty("width",`${i}%`),null==(t=ra(this,eA).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])];rs(this,eT,[...i]);let a=i.pop();for(let[e,r]of i.entries()){let[s,n]=[0===e,e===i.length-1],o=s?"calc(var(--segments-gap) / -1)":`${100*r}%`,l=n?a:i[e+1],d=`calc(${(l-r)*100}%${s||n?"":" - var(--segments-gap)"})`,u=ip.createElementNS("http://www.w3.org/2000/svg","rect"),h=iL(this.shadowRoot,`#segments-clipping rect:nth-child(${e+1})`);h.style.setProperty("x",o),h.style.setProperty("width",d),t.append(u)}}getPointerRatio(e){return function(e,t,i,a){let r=a.x-i.x,s=a.y-i.y,n=r*r+s*s;return 0===n?0:Math.max(0,Math.min(1,((e-i.x)*r+(t-i.y)*s)/n))}(e.clientX,e.clientY,ra(this,eg).getBoundingClientRect(),ra(this,ef).getBoundingClientRect())}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":rn(this,eV,eW).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":rn(this,eO,eN).call(this,e);break;case"pointerdown":rn(this,eC,eD).call(this,e);break;case"pointerup":rn(this,eP,ex).call(this);break;case"pointerleave":rn(this,eU,eH).call(this)}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}ev=new WeakMap,eb=new WeakMap,eg=new WeakMap,ef=new WeakMap,eA=new WeakMap,eT=new WeakMap,e_=new WeakMap,ek=new WeakMap,ey=new WeakMap,eI=new WeakSet,ew=function(e){let t=ra(this,eA).activeSegment;if(!t)return;let i=this.getPointerRatio(e),a=ra(this,eT).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))"))},eS=new WeakSet,eL=function(){!this.hasAttribute("disabled")&&this.isConnected&&(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))},eM=new WeakSet,eR=function(){var e,t;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),this.removeEventListener("pointerleave",this),null==(e=im.window)||e.removeEventListener("pointerup",this),null==(t=im.window)||t.removeEventListener("pointermove",this)},eC=new WeakSet,eD=function(e){var t;rs(this,eb,e.composedPath().includes(this.range)),null==(t=im.window)||t.addEventListener("pointerup",this,{once:!0})},eO=new WeakSet,eN=function(e){var t;"mouse"!==e.pointerType&&rn(this,eC,eD).call(this,e),this.addEventListener("pointerleave",this,{once:!0}),null==(t=im.window)||t.addEventListener("pointermove",this)},eP=new WeakSet,ex=function(){var e;null==(e=im.window)||e.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")},eU=new WeakSet,eH=function(){var e,t;this.removeEventListener("pointerleave",this),null==(e=im.window)||e.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),null==(t=ra(this,eA).activeSegment)||t.style.removeProperty("transform")},eV=new WeakSet,eW=function(e){("pen"!==e.pointerType||0!==e.buttons)&&(this.toggleAttribute("dragging",1===e.buttons||"mouse"!==e.pointerType),this.updatePointerBar(e),rn(this,eI,ew).call(this,e),this.dragging&&("mouse"!==e.pointerType||!ra(this,eb))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(e),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))))},ro.shadowRootOptions={mode:"open"},ro.getTemplateHTML=function(e){return
vendor: 7,165 bytes, lines 526-762
526` 527 <style> 528 :host { 529 --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 530 --_media-range-padding: var(--media-range-padding, var(--media-control-padding, 10px)); 531 532 box-shadow: var(--_focus-visible-box-shadow, none); 533 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 534 height: calc(var(--media-control-height, 24px) + 2 * var(--_media-range-padding)); 535 display: inline-flex; 536 align-items: center; 537 538 vertical-align: middle; 539 box-sizing: border-box; 540 position: relative; 541 width: 100px; 542 transition: background .15s linear; 543 cursor: var(--media-cursor, pointer); 544 pointer-events: auto; 545 touch-action: none; 546 } 547 548 549 input[type=range]:focus { 550 outline: 0; 551 } 552 input[type=range]:focus::-webkit-slider-runnable-track { 553 outline: 0; 554 } 555 556 :host(:hover) { 557 background: var(--media-control-hover-background, rgb(50 50 70 / .7)); 558 } 559 560 #leftgap { 561 padding-left: var(--media-range-padding-left, var(--_media-range-padding)); 562 } 563 564 #rightgap { 565 padding-right: var(--media-range-padding-right, var(--_media-range-padding)); 566 } 567 568 #startpoint, 569 #endpoint { 570 position: absolute; 571 } 572 573 #endpoint { 574 right: 0; 575 } 576 577 #container { 578 579 width: var(--media-range-track-width, 100%); 580 transform: translate(var(--media-range-track-translate-x, 0px), var(--media-range-track-translate-y, 0px)); 581 position: relative; 582 height: 100%; 583 display: flex; 584 align-items: center; 585 min-width: 40px; 586 } 587 588 #range { 589 590 display: var(--media-time-range-hover-display, block); 591 bottom: var(--media-time-range-hover-bottom, 0); 592 height: var(--media-time-range-hover-height, max(100% , 25px)); 593 width: 100%; 594 position: absolute; 595 cursor: var(--media-cursor, pointer); 596 597 -webkit-appearance: none; 598 -webkit-tap-highlight-color: transparent; 599 background: transparent; 600 margin: 0; 601 z-index: 1; 602 } 603 604 @media (hover: hover) { 605 #range { 606 bottom: var(--media-time-range-hover-bottom, 0); 607 height: var(--media-time-range-hover-height, max(100%, 20px)); 608 } 609 } 610 611 612 613 #range::-webkit-slider-thumb { 614 -webkit-appearance: none; 615 background: transparent; 616 width: .1px; 617 height: .1px; 618 } 619 620 621 #range::-moz-range-thumb { 622 background: transparent; 623 border: transparent; 624 width: .1px; 625 height: .1px; 626 } 627 628 #appearance { 629 height: var(--media-range-track-height, 4px); 630 display: flex; 631 flex-direction: column; 632 justify-content: center; 633 width: 100%; 634 position: absolute; 635 636 will-change: transform; 637 } 638 639 #track { 640 background: var(--media-range-track-background, rgb(255 255 255 / .2)); 641 border-radius: var(--media-range-track-border-radius, 1px); 642 border: var(--media-range-track-border, none); 643 outline: var(--media-range-track-outline); 644 outline-offset: var(--media-range-track-outline-offset); 645 backdrop-filter: var(--media-range-track-backdrop-filter); 646 -webkit-backdrop-filter: var(--media-range-track-backdrop-filter); 647 box-shadow: var(--media-range-track-box-shadow, none); 648 position: absolute; 649 width: 100%; 650 height: 100%; 651 overflow: hidden; 652 } 653 654 #progress, 655 #pointer { 656 position: absolute; 657 height: 100%; 658 will-change: width; 659 } 660 661 #progress { 662 background: var(--media-range-bar-color, var(--media-primary-color, rgb(238 238 238))); 663 transition: var(--media-range-track-transition); 664 } 665 666 #pointer { 667 background: var(--media-range-track-pointer-background); 668 border-right: var(--media-range-track-pointer-border-right); 669 transition: visibility .25s, opacity .25s; 670 visibility: hidden; 671 opacity: 0; 672 } 673 674 @media (hover: hover) { 675 :host(:hover) #pointer { 676 transition: visibility .5s, opacity .5s; 677 visibility: visible; 678 opacity: 1; 679 } 680 } 681 682 #thumb, 683 ::slotted([slot=thumb]) { 684 width: var(--media-range-thumb-width, 10px); 685 height: var(--media-range-thumb-height, 10px); 686 transition: var(--media-range-thumb-transition); 687 transform: var(--media-range-thumb-transform, none); 688 opacity: var(--media-range-thumb-opacity, 1); 689 translate: -50%; 690 position: absolute; 691 left: 0; 692 cursor: var(--media-cursor, pointer); 693 } 694 695 #thumb { 696 border-radius: var(--media-range-thumb-border-radius, 10px); 697 background: var(--media-range-thumb-background, var(--media-primary-color, rgb(238 238 238))); 698 box-shadow: var(--media-range-thumb-box-shadow, 1px 1px 1px transparent); 699 border: var(--media-range-thumb-border, none); 700 } 701 702 :host([disabled]) #thumb { 703 background-color: #777; 704 } 705 706 .segments #appearance { 707 height: var(--media-range-segment-hover-height, 7px); 708 } 709 710 #track { 711 clip-path: url(#segments-clipping); 712 } 713 714 #segments { 715 --segments-gap: var(--media-range-segments-gap, 2px); 716 position: absolute; 717 width: 100%; 718 height: 100%; 719 } 720 721 #segments-clipping { 722 transform: translateX(calc(var(--segments-gap) / 2)); 723 } 724 725 #segments-clipping:empty { 726 display: none; 727 } 728 729 #segments-clipping rect { 730 height: var(--media-range-track-height, 4px); 731 y: calc((var(--media-range-segment-hover-height, 7px) - var(--media-range-track-height, 4px)) / 2); 732 transition: var(--media-range-segment-transition, transform .1s ease-in-out); 733 transform: var(--media-range-segment-transform, scaleY(1)); 734 transform-origin: center; 735 } 736 737 /* Visible label for accessibility - positioned off-screen but technically visible (Firefox requires visible labels) */ 738 #range-label { 739 position: absolute; 740 left: -10000px; 741 background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 742 pointer-events: none; 743 } 744 </style> 745 <div id="leftgap"></div> 746 <div id="container"> 747 <div id="startpoint"></div> 748 <div id="endpoint"></div> 749 <div id="appearance"> 750 <div id="track" part="track"> 751 <div id="pointer"></div> 752 <div id="progress" part="progress"></div> 753 </div> 754 <slot name="thumb"> 755 <div id="thumb" part="thumb"></div> 756 </slot> 757 <svg id="segments" aria-hidden="true"><clipPath id="segments-clipping"></clipPath></svg> 758 </div> 759 <input id="range" type="range" min="0" max="1" step="any" value="0"> 760 <label for="range" id="range-label"></label> 761 762 ${this.getContainerTemplateHTML(
762e)} 763 </div> 764 <div id="rightgap"></div> 765 `},ro.getContainerTemplateHTML=function(e){return""},im.customElements.get("media-chrome-range")||im.customElements.define("media-chrome-range",ro);var rl=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},rd=(e,t,i)=>(rl(e,t,"read from private field"),i?i.call(e):t.get(e)),ru=(e,t,i,a)=>(rl(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class rh extends im.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,eF,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=iT(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[tq.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,s,n,o;e===tq.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=rd(this,eF))?void 0:a.unassociateElement)||r.call(a,this),ru(this,eF,null)),i&&this.isConnected&&(ru(this,eF,null==(s=this.getRootNode())?void 0:s.getElementById(i)),null==(o=null==(n=rd(this,eF))?void 0:n.associateElement)||o.call(n,this)))}connectedCallback(){var e,t,i;let a=this.getAttribute(tq.MEDIA_CONTROLLER);a&&(ru(this,eF,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=rd(this,eF))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=rd(this,eF))?void 0:e.unassociateElement)||t.call(e,this),ru(this,eF,null)}}eF=new WeakMap,rh.shadowRootOptions={mode:"open"},rh.getTemplateHTML=function(e){return` 766 <style> 767 :host { 768 769 box-sizing: border-box; 770 display: var(--media-control-display, var(--media-control-bar-display, inline-flex)); 771 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 772 --media-loading-indicator-icon-height: 44px; 773 } 774 775 ::slotted(media-time-range), 776 ::slotted(media-volume-range) { 777 min-height: 100%; 778 } 779 780 ::slotted(media-time-range), 781 ::slotted(media-clip-selector) { 782 flex-grow: 1; 783 } 784 785 ::slotted([role="menu"]) { 786 position: absolute; 787 } 788 </style> 789 790 <slot></slot> 791 `},im.customElements.get("media-control-bar")||im.customElements.define("media-control-bar",rh);var rc=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},rm=(e,t,i)=>(rc(e,t,"read from private field"),i?i.call(e):t.get(e)),rp=(e,t,i,a)=>(rc(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class rE extends im.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,e$,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=iT(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[tq.MEDIA_CONTROLLER]}attributeChangedCallback(e,t,i){var a,r,s,n,o;e===tq.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=rm(this,e$))?void 0:a.unassociateElement)||r.call(a,this),rp(this,e$,null)),i&&this.isConnected&&(rp(this,e$,null==(s=this.getRootNode())?void 0:s.getElementById(i)),null==(o=null==(n=rm(this,e$))?void 0:n.associateElement)||o.call(n,this)))}connectedCallback(){var e,t,i;let{style:a}=iS(this.shadowRoot,":host");a.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);let r=this.getAttribute(tq.MEDIA_CONTROLLER);r&&(rp(this,e$,null==(e=this.getRootNode())?void 0:e.getElementById(r)),null==(i=null==(t=rm(this,e$))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=rm(this,e$))?void 0:e.unassociateElement)||t.call(e,this),rp(this,e$,null)}}
791e$=new WeakMap,rE.shadowRootOptions={mode:"open"},rE.getTemplateHTML=function(e,t={}){return` 792 <style> 793 :host { 794 font: var(--media-font, 795 var(--media-font-weight, normal) 796 var(--media-font-size, 14px) / 797 var(--media-text-content-height, var(--media-control-height, 24px)) 798 var(--media-font-family, helvetica neue, segoe ui, roboto, arial, sans-serif)); 799 color: var(--media-text-color, var(--media-primary-color, rgb(238 238 238))); 800 background: var(--media-text-background, var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7)))); 801 padding: var(--media-control-padding, 10px); 802 display: inline-flex; 803 justify-content: center; 804 align-items: center; 805 vertical-align: middle; 806 box-sizing: border-box; 807 text-align: center; 808 pointer-events: auto; 809 } 810 811 812 :host(:focus-visible) { 813 box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9)); 814 outline: 0; 815 } 816 817 818 :host(:where(:focus)) { 819 box-shadow: none; 820 outline: 0; 821 } 822 </style> 823 824 ${this.getSlotTemplateHTML(e,t)} 825 `},rE.getSlotTemplateHTML=function(e,t){return` 826 <slot></slot> 827 `},im.customElements.get("media-text-display")||im.customElements.define("media-text-display",rE);var rv=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},rb=(e,t,i)=>(rv(e,t,"read from private field"),i?i.call(e):t.get(e));class rg extends rE{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,eB,void 0),((e,t,i,a)=>(rv(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,eB,this.shadowRoot.querySelector("slot")),rb(this,eB).textContent=ia(null!=(e=this.mediaDuration)?e:0)}static get observedAttributes(){return[...super.observedAttributes,tQ.MEDIA_DURATION]}attributeChangedCallback(e,t,i){e===tQ.MEDIA_DURATION&&(rb(this,eB).textContent=ia(+i)),super.attributeChangedCallback(e,t,i)}get mediaDuration(){return iM(this,tQ.MEDIA_DURATION)}set mediaDuration(e){iR(this,tQ.MEDIA_DURATION,e)}}eB=new WeakMap,rg.getSlotTemplateHTML=function(e,t){return` 828 <slot>${ia(t.mediaDuration)}</slot> 829 `},im.customElements.get("media-duration-display")||im.customElements.define("media-duration-display",rg);let rf={2:ie("Network Error"),3:ie("Decode Error"),4:ie("Source Not Supported"),5:ie("Encryption
829Error")},rA={2:ie("A network error caused the media download to fail."),3:ie("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:ie("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:ie("The media is encrypted and there are no keys to decrypt it.")},rT=e=>{var t,i;return 1===e.code?null:{title:null!=(t=rf[e.code])?t:`Error ${e.code}`,message:null!=(i=rA[e.code])?i:e.message}};var r_=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};function rk(e){var t;let{title:i,message:a}=null!=(t=rT(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 ry=[tQ.MEDIA_ERROR_CODE,tQ.MEDIA_ERROR_MESSAGE];class rI extends rt{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,eG,null)}static get observedAttributes(){return[...super.observedAttributes,...ry]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,t,i){var a;if(super.attributeChangedCallback(e,t,i),!ry.includes(e))return;let r=null!=(a=this.mediaError)?a:{code:this.mediaErrorCode,message:this.mediaErrorMessage};if(this.open=r.code&&null!==rT(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}=rT(r);e&&this.setAttribute("aria-label",e)}}get mediaError(){var e,t;return r_(this,e=eG,"read from private field"),t?t.call(this):e.get(this)}set mediaError(e){var t,i;r_(this,t=eG,"write to private field"),i?i.call(this,e):t.set(this,e)}get mediaErrorCode(){return iM(this,"mediaerrorcode")}set mediaErrorCode(e){iR(this,"mediaerrorcode",e)}get mediaErrorMessage(){return iO(this,"mediaerrormessage")}set mediaErrorMessage(e){iN(this,"mediaerrormessage",e)}}eG=new WeakMap,rI.getSlotTemplateHTML=function(e){return` 830 <style> 831 :host { 832 background: rgb(20 20 30 / .8); 833 } 834 835 #content { 836 display: block; 837 padding: 1.2em 1.5em; 838 } 839 840 h3, 841 p { 842 margin-block: 0 .3em; 843 } 844 </style> 845 <slot name="error-${e.mediaerrorcode}" id="content"> 846 ${rk({code:+e.mediaerrorcode,message:e.mediaerrormessage})} 847 </slot> 848 `},rI.formatErrorMessage=rk,im.customElements.get("media-error-dialog")||im.customElements.define("media-error-dialog",rI);var rw=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)},rS=(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 rL extends rt{constructor(){super(...arguments),rS(this,eK,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),s=a.includes(i);r&&!s&&(this.open=!1)}),rS(this,eq,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",rw(this,eK)),document.addEventListener("keydown",rw(this,eq)))}disconnectedCallback(){this.removeEventListener("click",rw(this,eK)),document.removeEventListener("keydown",rw(this,eq))}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),"open"===e&&(this.open?(this.addEventListener("click",rw(this,eK)),document.addEventListener("keydown",rw(this,eq))):(this.removeEventListener("click",rw(this,eK)),document.removeEventListener("keydown",rw(this,eq))))}}eK=new WeakMap,eq=new WeakMap,rL.getSlotTemplateHTML=function(e){return` 849 <style> 850 :host { 851 position: fixed; 852 top: 0; 853 left: 0; 854 z-index: 9999; 855 background: rgb(20 20 30 / .8); 856 backdrop-filter: blur(10px); 857 } 858 859 #content { 860 display: block; 861 width: clamp(400px, 40vw, 700px); 862 max-width: 90vw; 863 text-align: left; 864 } 865 866 h2 { 867 margin: 0 0 1.5rem 0; 868 font-size: 1.5rem; 869 font-weight: 500; 870 text-align: center; 871 } 872 873 .shortcuts-table { 874 width: 100%; 875 border-collapse: collapse; 876 } 877 878 .shortcuts-table tr { 879 border-bottom: 1px solid rgba(255, 255, 255, 0.1); 880 } 881 882 .shortcuts-table tr:last-child { 883 border-bottom: none; 884 } 885 886 .shortcuts-table td { 887 padding: 0.75rem 0.5rem; 888 } 889 890 .shortcuts-table td:first-child { 891 text-align: right; 892 padding-right: 1rem; 893 width: 40%; 894 min-width: 120px; 895 } 896 897 .shortcuts-table td:last-child { 898 padding-left: 1rem; 899 } 900 901 .key { 902 display: inline-block; 903 background: rgba(255, 255, 255, 0.15); 904 border: 1px solid rgba(255, 255, 255, 0.2); 905 border-radius: 4px; 906 padding: 0.25rem 0.5rem; 907 font-family: 'Courier New', monospace; 908 font-size: 0.9rem; 909 font-weight: 500; 910 min-width: 1.5rem; 911 text-align: center; 912 margin: 0 0.2rem; 913 } 914 915 .description { 916 color: rgba(255, 255, 255, 0.9); 917 font-size: 0.95rem; 918 } 919 920 .key-combo { 921 display: flex; 922 align-items: center; 923 justify-content: flex-end; 924 gap: 0.3rem; 925 } 926 927 .key-separator { 928 color: rgba(255, 255, 255, 0.5); 929 font-size: 0.9rem; 930 } 931 </style> 932 <slot id="content"> 933 ${function(){let e=[{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` 934 <tr> 935 <td> 936 <div class="key-combo">${i}</div> 937 </td> 938 <td class="description">${t}</td> 939 </tr> 940 `}).join("");return` 941 <h2>Keyboard Shortcuts</h2> 942 <table class="shortcuts-table">${e}</table> 943 `}()} 944 </slot> 945 `},im.customElements.get("media-keyboard-shortcuts-dialog")||im.customElements.define("media-keyboard-shortcuts-dialog",rL);var rM=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};let rR=`<svg aria-hidden="true" viewBox="0 0 26 24"> 946 <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/> 947</svg>`,rC=`<svg aria-hidden="true" viewBox="0 0 26 24"> 948 <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/> 949</svg>`,rD=e=>{let t=e.mediaIsFullscreen?ie("exit fullscreen mode"):ie("enter fullscreen mode");e.setAttribute("aria-label",t)};class rO extends aj{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,ej,null)}static get observedAttributes(){return[...super.observedAttributes,tQ.MEDIA_IS_FULLSCREEN,tQ.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),rD(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===tQ.MEDIA_IS_FULLSCREEN&&rD(this)}get mediaFullscreenUnavailable(){return iO(this,tQ.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){iN(this,tQ.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return iC(this,tQ.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){iD(this,tQ.MEDIA_IS_FULLSCREEN,e)}handleClick(e){var t,i,a,r;rM(this,t=ej,"write to private field"),i?i.call(this,e):t.set(this,e);let s=(rM(this,a=ej,"read from private field"),(r?r.call(this):a.get(this))instanceof PointerEvent),n=this.mediaIsFullscreen?new im.CustomEvent(tK.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new im.CustomEvent(tK.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:s});this.dispatchEvent(n)}}ej=new WeakMap,rO.getSlotTemplateHTML=function(e){return` 950 <style> 951 :host([${tQ.MEDIA_IS_FULLSCREEN}]) slot[name=icon] slot:not([name=exit]) { 952 display: none !important; 953 } 954 955 956 :host(:not([${tQ.MEDIA_IS_FULLSCREEN}])) slot[name=icon] slot:not([name=enter]) { 957 display: none !important; 958 } 959 960 :host([${tQ.MEDIA_IS_FULLSCREEN}]) slot[name=tooltip-enter], 961 :host(:not([${tQ.MEDIA_IS_FULLSCREEN}])) slot[name=tooltip-exit] { 962 display: none; 963 } 964 </style> 965 966 <slot name="icon"> 967 <slot name="enter">${rR}</slot> 968 <slot name="exit">${rC}</slot> 969 </slot> 970 `},rO.getTooltipContentHTML=function(){return` 971 <slot name="tooltip-enter">${ie("Enter fullscreen mode")}</slot> 972 <slot name="tooltip-exit">${ie("Exit fullscreen mode")}</slot> 973 `},im.customElements.get("media-fullscreen-button")||im.customElements.define("media-fullscreen-button",rO);let{MEDIA_TIME_IS_LIVE:rN,MEDIA_PAUSED:rP}=tQ,{MEDIA_SEEK_TO_LIVE_REQUEST:rx,MEDIA_PLAY_REQUEST:rU}=tK,rH=e=>{var t;let i=e.mediaPaused||!e.mediaTimeIsLive,a=i?ie("seek to live"):ie("playing live");e.setAttribute("aria-label",a);let r=null==(t=e.shadowRoot)?void 0:t.querySelector('slot[name="text"]');r&&(r.textContent=ie("live")),i?e.removeAttribute("aria-disabled"):e.setAttribute("aria-disabled","true")};class rV extends aj{static get observedAttributes(){return[...super.observedAttributes,rN,rP]}connectedCallback(){super.connectedCallback(),rH(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),rH(this)}get mediaPaused(){return iC(this,tQ.MEDIA_PAUSED)}set mediaPaused(e){iD(this,tQ.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return iC(this,tQ.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){iD(this,tQ.MEDIA_TIME_IS_LIVE,e)}handleClick(){(this.mediaPaused||!this.mediaTimeIsLive)&&(this.dispatchEvent(new im.CustomEvent(rx,{composed:!0,bubbles:!0})),this.hasAttribute(rP)&&this.dispatchEvent(new im.CustomEvent(rU,{composed:!0,bubbles:!0})))}}rV.getSlotTemplateHTML=function(e){return` 974 <style> 975 :host { --media-tooltip-display: none; } 976 977 slot[name=indicator] > *, 978 :host ::slotted([slot=indicator]) { 979 980 min-width: auto; 981 fill: var(--media-live-button-icon-color, rgb(140, 140, 140)); 982 color: var(--media-live-button-icon-color, rgb(140, 140, 140)); 983 } 984 985 :host([${rN}]:not([${rP}])) slot[name=indicator] > *, 986 :host([${rN}]:not([${rP}])) ::slotted([slot=indicator]) { 987 fill: var(--media-live-button-indicator-color, rgb(255, 0, 0)); 988 color: var(--media-live-button-indicator-color, rgb(255, 0, 0)); 989 } 990 991 :host([${rN}]:not([${rP}])) { 992 cursor: var(--media-cursor, not-allowed); 993 } 994 995 slot[name=text]{ 996 text-transform: uppercase; 997 } 998 999 </style> 1000 1001 <slot name="indicator"><svg viewBox="0 0 6 12" aria-hidden="true"><circle cx="3" cy="6" r="2"></circle></svg></slot> 1002 1003 <slot name="spacer"> </slot><slot name="text">${ie("live")}</slot> 1004 `},im.customElements.get("media-live-button")||im.customElements.define("media-live-button",rV);var rW=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},rF=(e,t,i)=>(rW(e,t,"read from private field"),i?i.call(e):t.get(e)),r$=(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)},rB=(e,t,i,a)=>(rW(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);let rG={LOADING_DELAY:"loadingdelay",NO_AUTOHIDE:"noautohide"},rK=` 1005<svg aria-hidden="true" viewBox="0 0 100 100"> 1006 <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"> 1007 <animateTransform 1008 attributeName="transform" 1009 attributeType="XML" 1010 type="rotate" 1011 dur="1s" 1012 from="0 50 50" 1013 to="360 50 50"
1014 repeatCount="indefinite" /> 1015 </path> 1016</svg> 1017`;class rq extends im.HTMLElement{constructor(){if(super(),r$(this,eY,void 0),r$(this,eQ,500),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=iT(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[tq.MEDIA_CONTROLLER,tQ.MEDIA_PAUSED,tQ.MEDIA_LOADING,rG.LOADING_DELAY]}attributeChangedCallback(e,t,i){var a,r,s,n,o;e===rG.LOADING_DELAY&&t!==i?this.loadingDelay=Number(i):e===tq.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=rF(this,eY))?void 0:a.unassociateElement)||r.call(a,this),rB(this,eY,null)),i&&this.isConnected&&(rB(this,eY,null==(s=this.getRootNode())?void 0:s.getElementById(i)),null==(o=null==(n=rF(this,eY))?void 0:n.associateElement)||o.call(n,this)))}connectedCallback(){var e,t,i;let a=this.getAttribute(tq.MEDIA_CONTROLLER);a&&(rB(this,eY,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=rF(this,eY))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=rF(this,eY))?void 0:e.unassociateElement)||t.call(e,this),rB(this,eY,null)}get loadingDelay(){return rF(this,eQ)}set loadingDelay(e){rB(this,eQ,e);let{style:t}=iS(this.shadowRoot,":host");t.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return iC(this,tQ.MEDIA_PAUSED)}set mediaPaused(e){iD(this,tQ.MEDIA_PAUSED,e)}get mediaLoading(){return iC(this,tQ.MEDIA_LOADING)}set mediaLoading(e){iD(this,tQ.MEDIA_LOADING,e)}get mediaController(){return iO(this,tq.MEDIA_CONTROLLER)}set mediaController(e){iN(this,tq.MEDIA_CONTROLLER,e)}get noAutohide(){return iC(this,rG.NO_AUTOHIDE)}set noAutohide(e){iD(this,rG.NO_AUTOHIDE,e)}}eY=new WeakMap,eQ=new WeakMap,rq.shadowRootOptions={mode:"open"},rq.getTemplateHTML=function(e){return` 1018 <style> 1019 :host { 1020 display: var(--media-control-display, var(--media-loading-indicator-display, inline-block)); 1021 vertical-align: middle; 1022 box-sizing: border-box; 1023 --_loading-indicator-delay: var(--media-loading-indicator-transition-delay, 500ms); 1024 } 1025 1026 #status { 1027 color: rgba(0,0,0,0); 1028 width: 0px; 1029 height: 0px; 1030 } 1031 1032 :host slot[name=icon] > *, 1033 :host ::slotted([slot=icon]) { 1034 opacity: var(--media-loading-indicator-opacity, 0); 1035 transition: opacity 0.15s; 1036 } 1037 1038 :host([${tQ.MEDIA_LOADING}]:not([${tQ.MEDIA_PAUSED}])) slot[name=icon] > *, 1039 :host([${tQ.MEDIA_LOADING}]:not([${tQ.MEDIA_PAUSED}])) ::slotted([slot=icon]) { 1040 opacity: var(--media-loading-indicator-opacity, 1); 1041 transition: opacity 0.15s var(--_loading-indicator-delay); 1042 } 1043 1044 :host #status { 1045 visibility: var(--media-loading-indicator-opacity, hidden); 1046 transition: visibility 0.15s; 1047 } 1048 1049 :host([${tQ.MEDIA_LOADING}]:not([${tQ.MEDIA_PAUSED}])) #status { 1050 visibility: var(--media-loading-indicator-opacity, visible); 1051 transition: visibility 0.15s var(--_loading-indicator-delay); 1052 } 1053 1054 svg, img, ::slotted(svg), ::slotted(img) { 1055 width: var(--media-loading-indicator-icon-width); 1056 height: var(--media-loading-indicator-icon-height, 100px); 1057 fill: var(--media-icon-color, var(--media-primary-color, rgb(238 238 238))); 1058 vertical-align: middle; 1059 } 1060 </style> 1061 1062 <slot name="icon">${rK}</slot> 1063 <div id="status" role="status" aria-live="polite">${ie("media loading")}</div> 1064 `},im.customElements.get("media-loading-indicator")||im.customElements.define("media-loading-indicator",rq);let rj=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1065 <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"/> 1066</svg>`,rY=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1067 <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"/> 1068</svg>`,rQ=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1069 <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"/> 1070</svg>`,rz=e=>{let t="off"===e.mediaVolumeLevel?ie("unmute"):ie("mute");e.setAttribute("aria-label",t)};class rZ extends aj{static get observedAttributes(){return[...super.observedAttributes,tQ.MEDIA_VOLUME_LEVEL]}connectedCallback(){super.connectedCallback(),rz(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===tQ.MEDIA_VOLUME_LEVEL&&rz(this)}get mediaVolumeLevel(){return iO(this,tQ.MEDIA_VOLUME_LEVEL)}set mediaVolumeLevel(e){iN(this,tQ.MEDIA_VOLUME_LEVEL,e)}handleClick(){let e="off"===this.mediaVolumeLevel?tK.MEDIA_UNMUTE_REQUEST:tK.MEDIA_MUTE_REQUEST;this.dispatchEvent(new im.CustomEvent(e,{composed:!0,bubbles:!0}))}}rZ.getSlotTemplateHTML=function(e){return` 1071 <style> 1072 :host(:not([${tQ.MEDIA_VOLUME_LEVEL}])) slot[name=icon] slot:not([name=high]), 1073 :host([${tQ.MEDIA_VOLUME_LEVEL}=high]) slot[name=icon] slot:not([name=high]) { 1074 display: none !important; 1075 } 1076 1077 :host([${tQ.MEDIA_VOLUME_LEVEL}=off]) slot[name=icon] slot:not([name=off]) { 1078 display: none !important; 1079 } 1080 1081 :host([${tQ.MEDIA_VOLUME_LEVEL}=low]) slot[name=icon] slot:not([name=low]) { 1082 display: none !important; 1083 } 1084 1085 :host([${tQ.MEDIA_VOLUME_LEVEL}=medium]) slot[name=icon] slot:not([name=medium]) { 1086 display: none !important; 1087 } 1088 1089 :host(:not([${tQ.MEDIA_VOLUME_LEVEL}=off])) slot[name=tooltip-unmute], 1090 :host([${tQ.MEDIA_VOLUME_LEVEL}=off]) slot[name=tooltip-mute] { 1091 display: none; 1092 } 1093 </style> 1094 1095 <slot name="icon"> 1096 <slot name="off">${rj}</slot> 1097 <slot name="low">${rY}</slot> 1098 <slot name="medium">${rY}</slot> 1099 <slot name="high">${rQ}</slot> 1100 </slot> 1101 `},rZ.getTooltipContentHTML=function(){return` 1102 <slot name="tooltip-mute">${ie("Mute")}</slot> 1103 <slot name="tooltip-unmute">${ie("Unmute")}</slot> 1104 `},im.customElements.get("media-mute-button")||im.customElements.define("media-mute-button",rZ);let rX=`<svg aria-hidden="true" viewBox="0 0 28 24"> 1105 <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"/> 1106</svg>`,rJ=e=>{let t=e.mediaIsPip?ie("exit picture in picture mode"):ie("enter picture in picture mode");e.setAttribute("aria-label",t)};class r0 extends aj{static get observedAttributes(){return[...super.observedAttributes,tQ.MEDIA_IS_PIP,tQ.MEDIA_PIP_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),rJ(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===tQ.MEDIA_IS_PIP&&rJ(this)}get mediaPipUnavailable(){return iO(this,tQ.MEDIA_PIP_UNAVAILABLE)}set mediaPipUnavailable(e){iN(this,tQ.MEDIA_PIP_UNAVAILABLE,e)}get mediaIsPip(){return iC(this,tQ.MEDIA_IS_PIP)}set mediaIsPip(e){iD(this,tQ.MEDIA_IS_PIP,e)}handleClick(){let e=this.mediaIsPip?tK.MEDIA_EXIT_PIP_REQUEST:tK.MEDIA_ENTER_PIP_REQUEST;this.dispatchEvent(new im.CustomEvent(e,{composed:!0,bubbles:!0}))}}r0.getSlotTemplateHTML=function(e){return` 1107 <style> 1108 :host([${tQ.MEDIA_IS_PIP}]) slot[name=icon] slot:not([name=exit]) { 1109 display: none !important; 1110 } 1111 1112 :host(:not([${tQ.MEDIA_IS_PIP}])) slot[name=icon] slot:not([name=enter]) { 1113 display: none !important; 1114 } 1115 1116 :host([${tQ.MEDIA_IS_PIP}]) slot[name=tooltip-enter], 1117 :host(:not([${tQ.MEDIA_IS_PIP}])) slot[name=tooltip-exit] { 1118 display: none; 1119 } 1120 </style> 1121 1122 <slot name="icon"> 1123 <slot name="enter">${rX}</slot> 1124 <slot name="exit">${rX}</slot> 1125 </slot> 1126 `},r0.getTooltipContentHTML=function(){return` 1127 <slot name="tooltip-enter">${ie("Enter picture in picture mode")}</slot> 1128 <slot name="tooltip-exit">${ie("Exit picture in picture mode")}</slot> 1129 `},im.customElements.get("media-pip-button")||im.customElements.define("media-pip-button",r0);var r1=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)};let r2={RATES:"rates"},r5=[1,1.2,1.5,1.7,2];function r3(e){return Math.round(100*e)/100}class r4 extends aj{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,ez,new iX(this,r2.RATES,{defaultValue:r5})),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${r3(null!=(e=this.mediaPlaybackRate)?e:1)}x`}static get observedAttributes(){return[...super.observedAttributes,tQ.MEDIA_PLAYBACK_RATE,r2.RATES]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===r2.RATES&&(r1(this,ez).value=i),e===tQ.MEDIA_PLAYBACK_RATE){let e=i?+i:NaN,t=r3(Number.isNaN(e)?1:e);this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",ie("Playback rate {playbackRate}",{playbackRate:t}))}}get rates(){return r1(this,ez)}set rates(e){e?Array.isArray(e)?r1(this,ez).value=e.join(" "):"str
1129ing"==typeof e&&(r1(this,ez).value=e):r1(this,ez).value=""}get mediaPlaybackRate(){return iM(this,tQ.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){iR(this,tQ.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;let i=Array.from(r1(this,ez).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 im.CustomEvent(tK.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(r)}}ez=new WeakMap,r4.getSlotTemplateHTML=function(e){let t=e.mediaplaybackrate?r3(+e.mediaplaybackrate):1;return` 1130 <style> 1131 :host { 1132 min-width: 5ch; 1133 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 1134 } 1135 </style> 1136 <slot name="icon">${t}x</slot> 1137 `},r4.getTooltipContentHTML=function(){return ie("Playback rate")},im.customElements.get("media-playback-rate-button")||im.customElements.define("media-playback-rate-button",r4);let r7=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1138 <path d="m6 21 15-9L6 3v18Z"/> 1139</svg>`,r8=`<svg aria-hidden="true" viewBox="0 0 24 24"> 1140 <path d="M6 20h4V4H6v16Zm8-16v16h4V4h-4Z"/> 1141</svg>`,r9=e=>{let t=e.mediaPaused?ie("play"):ie("pause");e.setAttribute("aria-label",t)};class r6 extends aj{static get observedAttributes(){return[...super.observedAttributes,tQ.MEDIA_PAUSED,tQ.MEDIA_ENDED]}connectedCallback(){super.connectedCallback(),r9(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),(e===tQ.MEDIA_PAUSED||e===tQ.MEDIA_LANG)&&r9(this)}get mediaPaused(){return iC(this,tQ.MEDIA_PAUSED)}set mediaPaused(e){iD(this,tQ.MEDIA_PAUSED,e)}handleClick(){let e=this.mediaPaused?tK.MEDIA_PLAY_REQUEST:tK.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new im.CustomEvent(e,{composed:!0,bubbles:!0}))}}r6.getSlotTemplateHTML=function(e){return` 1142 <style> 1143 :host([${tQ.MEDIA_PAUSED}]) slot[name=pause], 1144 :host(:not([${tQ.MEDIA_PAUSED}])) slot[name=play] { 1145 display: none !important; 1146 } 1147 1148 :host([${tQ.MEDIA_PAUSED}]) slot[name=tooltip-pause], 1149 :host(:not([${tQ.MEDIA_PAUSED}])) slot[name=tooltip-play] { 1150 display: none; 1151 } 1152 </style> 1153 1154 <slot name="icon"> 1155 <slot name="play">${r7}</slot> 1156 <slot name="pause">${r8}</slot> 1157 </slot> 1158 `},r6.getTooltipContentHTML=function(){return` 1159 <slot name="tooltip-play">${ie("Play")}</slot> 1160 <slot name="tooltip-pause">${ie("Pause")}</slot> 1161 `},im.customElements.get("media-play-button")||im.customElements.define("media-play-button",r6);let se={PLACEHOLDER_SRC:"placeholdersrc",SRC:"src"};class st extends im.HTMLElement{static get observedAttributes(){return[se.PLACEHOLDER_SRC,se.SRC]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=iT(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,t,i){if(e===se.SRC&&(null==i?this.image.removeAttribute(se.SRC):this.image.setAttribute(se.SRC,i)),e===se.PLACEHOLDER_SRC)if(null==i)this.image.style.removeProperty("background-image");else{var a;a=this.image,a.style["background-image"]=`url('${i}')`}}get placeholderSrc(){return iO(this,se.PLACEHOLDER_SRC)}set placeholderSrc(e){iN(this,se.SRC,e)}get src(){return iO(this,se.SRC)}set src(e){iN(this,se.SRC,e)}}st.shadowRootOptions={mode:"open"},st.getTemplateHTML=function(e){return` 1162 <style> 1163 :host { 1164 pointer-events: none; 1165 display: var(--media-poster-image-display, inline-block); 1166 box-sizing: border-box; 1167 } 1168 1169 img { 1170 max-width: 100%; 1171 max-height: 100%; 1172 min-width: 100%; 1173 min-height: 100%; 1174 background-repeat: no-repeat; 1175 background-position: var(--media-poster-image-background-position, var(--media-object-position, center)); 1176 background-size: var(--media-poster-image-background-size, var(--media-object-fit, contain)); 1177 object-fit: var(--media-object-fit, contain); 1178 object-position: var(--media-object-position, center); 1179 } 1180 </style> 1181 1182 <img part="poster img" aria-hidden="true" id="image"/> 1183 `},im.customElements.get("media-poster-image")||im.customElements.define("media-poster-image",st);var si=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};class sa extends rE{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,eZ,void 0),((e,t,i,a)=>(si(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,eZ,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,tQ.MEDIA_PREVIEW_CHAPTER,tQ.MEDIA_LA
1183NG]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),(e===tQ.MEDIA_PREVIEW_CHAPTER||e===tQ.MEDIA_LANG)&&i!==t&&null!=i){var a,r;if((si(this,a=eZ,"read from private field"),r?r.call(this):a.get(this)).textContent=i,""!==i){let e=ie("chapter: {chapterName}",{chapterName:i});this.setAttribute("aria-valuetext",e)}else this.removeAttribute("aria-valuetext")}}get mediaPreviewChapter(){return iO(this,tQ.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){iN(this,tQ.MEDIA_PREVIEW_CHAPTER,e)}}eZ=new WeakMap,im.customElements.get("media-preview-chapter-display")||im.customElements.define("media-preview-chapter-display",sa);var sr=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ss=(e,t,i)=>(sr(e,t,"read from private field"),i?i.call(e):t.get(e)),sn=(e,t,i,a)=>(sr(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class so extends im.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,eX,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=iT(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[tq.MEDIA_CONTROLLER,tQ.MEDIA_PREVIEW_IMAGE,tQ.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,t,i;let a=this.getAttribute(tq.MEDIA_CONTROLLER);a&&(sn(this,eX,null==(e=this.getRootNode())?void 0:e.getElementById(a)),null==(i=null==(t=ss(this,eX))?void 0:t.associateElement)||i.call(t,this))}disconnectedCallback(){var e,t;null==(t=null==(e=ss(this,eX))?void 0:e.unassociateElement)||t.call(e,this),sn(this,eX,null)}attributeChangedCallback(e,t,i){var a,r,s,n,o;[tQ.MEDIA_PREVIEW_IMAGE,tQ.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===tq.MEDIA_CONTROLLER&&(t&&(null==(r=null==(a=ss(this,eX))?void 0:a.unassociateElement)||r.call(a,this),sn(this,eX,null)),i&&this.isConnected&&(sn(this,eX,null==(s=this.getRootNode())?void 0:s.getElementById(i)),null==(o=null==(n=ss(this,eX))?void 0:n.associateElement)||o.call(n,this)))}get mediaPreviewImage(){return iO(this,tQ.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){iN(this,tQ.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){let e=this.getAttribute(tQ.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(e=>+e)}set mediaPreviewCoords(e){if(!e)return void this.removeAttribute(tQ.MEDIA_PREVIEW_COORDS);this.setAttribute(tQ.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){let e,t,i=this.mediaPreviewCoords,a=this.mediaPreviewImage;if(!(i&&a))return;let[r,s,n,o]=i,l=a.split("#")[0],d=getComputedStyle(this),{maxWidth:u,maxHeight:h,minWidth:c,minHeight:m}=d;if("fill"===(d.getPropertyValue("--media-preview-thumbnail-object-fit").trim()||"contain")){let i=parseInt(u)/n,a=parseInt(h)/o,r=parseInt(c)/n,s=parseInt(m)/o;e=i<1?i:Math.max(i,r),t=a<1?a:Math.max(a,s)}else{let i=Math.min(parseInt(u)/n,parseInt(h)/o),a=Math.max(parseInt(c)/n,parseInt(m)/o),r=i<1?i:a>1?a:1;e=r,t=r}let{style:p}=iS(this.shadowRoot,":host"),E=iS(this.shadowRoot,"img").style,v=this.shadowRoot.querySelector("img"),b=1>Math.min(e,t)?"min":"max";p.setProperty(`${b}-width`,"initial","important"),p.setProperty(`${b}-height`,"initial","important"),p.width=`${n*e}px`,p.height=`${o*t}px`;let g=()=>{E.width=`${this.imgWidth*e}px`,E.height=`${this.imgHeight*t}px`,E.display="block"};v.src!==l&&(v.onload=()=>{this.imgWidth=v.naturalWidth,this.imgHeight=v.naturalHeight,g(),v.onload=null},v.src=l,g()),g(),E.transform=`translate(-${r*e}px, -${s*t}px)`}}eX=new WeakMap,so.shadowRootOptions={mode:"open"},so.getTemplateHTML=function(e){return` 1184 <style> 1185 :host { 1186 box-sizing: border-box; 1187 display: var(--media-control-display, var(--media-preview-thumbnail-display, inline-block)); 1188 overflow: hidden; 1189 } 1190 1191 img { 1192 display: none; 1193 position: relative; 1194 } 1195 </style> 1196 <img crossorigin loading="eager" decoding="async"> 1197 `},im.customElements.get("media-preview-thumbnail")||im.customElements.define("media-preview-thumbnail",so);var sl=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sd=(e,t,i)=>(sl(e,t,"read from private field"),i?i.call(e):t.get(e));class su extends rE{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,eJ,void 0),((e,t,i,a)=>(sl(e,t,"write to private field"),a?a.call(e,i):t.set(e,i)))(this,eJ,this.shadowRoot.querySelector("slot")),sd(this,eJ).textContent=ia(0)}static get observedAttributes(){return[...super.observedAttributes,tQ.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===tQ.MEDIA_PREVIEW_TIME&&null!=i&&(sd(this,eJ).textContent=ia(parseFloat(i)))}get mediaPreviewTime(){return iM(this,tQ.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){iR(this,tQ.MEDIA_PREVIEW_TIME,e)}}eJ=new WeakMap,im.customElements.get("media-preview-time-display")||im.customElements.define("media-preview-time-display",su);let sh={SEEK_OFFSET:"seekoffset"};class sc extends aj{static get observedAttributes(){return[...super.observedAttributes,tQ.MEDIA_CURRENT_TIME,sh.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=iM(this,sh.SEEK_OFFSET,30)}attributeChangedCallback(e,t,i){var a;super.attributeChangedCallback(e,t,i),a=this.seekOffset,this.setAttribute("aria-label",ie("seek back {seekOffset} seconds",{seekOffset:a})),e===sh.SEEK_OFFSET&&(this.seekOffset=iM(this,sh.SEEK_OFFSET,30))}get seekOffset(){return iM(this,sh.SEEK_OFFSET,30)}set seekOffset(e){iR(this,sh.SEEK_OFFSET,e),this.setAttribute("aria-label",ie("seek back {seekOffset} seconds",{seekOffset:this.seekOffset})),i_(ik(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return iM(this,tQ.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){iR(this,tQ.MEDIA_CURRENT_TIME,e)}handleClick(){let e=Math.max(this.mediaCurrentTime-this.seekOffset,0),t=new im.CustomEvent(tK.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}sc.getSlotTemplateHTML=function(e,t){let i;return` 1198 <slot name="icon">${i=t.seekOffset,` 1199 <svg aria-hidden="true" viewBox="0 0 20 24"> 1200 <defs> 1201 <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style> 1202 </defs> 1203 <text class="text value" transform="translate(2.18 19.87)">${i}</text> 1204 <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"/> 1205 </svg>`}</slot> 1206 `},sc.getTooltipContentHTML=function(){return ie("Seek backward")},im.customElements.get("media-seek-backward-button")||im.customElements.define("media-seek-backward-button",sc);let sm={SEEK_OFFSET:"seekoffset"};class sp extends aj{static get observedAttributes(){return[...super.observedAttributes,tQ.MEDIA_CURRENT_TIME,sm.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=iM(this,sm.SEEK_OFFSET,30)}attributeChangedCallback(e,t,i){var a;super.attributeChangedCallback(e,t,i),a=this.seekOffset,this.setAttribute("aria-label",ie("seek forward {seekOffset} seconds",{seekOffset:a})),e===sm.SEEK_OFFSET&&(this.seekOffset=iM(this,sm.SEEK_OFFSET,30))}get seekOffset(){return iM(this,sm.SEEK_OFFSET,30)}set seekOffset(e){iR(this,sm.SEEK_OFFSET,e),this.setAttribute("aria-label",ie("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),i_(ik(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return iM(this,tQ.MEDIA_CURRENT_TIME,0)}set mediaCurrentTime(e){iR(this,tQ.MEDIA_CURRENT_TIME,e)}handleClick(){let e=this.mediaCurrentTime+this.seekOffset,t=new im.CustomEvent(tK.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}sp.getSlotTemplateHTML=function(e,t){let i;return` 1207 <slot name="icon">${i=t.seekOffset,` 1208 <svg aria-hidden="true" viewBox="0 0 20 24"> 1209 <defs> 1210 <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style> 1211 </defs> 1212 <text class="text value" transform="translate(8.9 19.87)">${i}</text> 1213 <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"/> 1214 </svg>`}</slot> 1215 `},sp.getTooltipContentHTML=function(){return ie("Seek forward")},im.customElements.get("media-seek-forward-button")||im.customElements.define("media-seek-forward-button",sp);var sE=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sv=(e,t,i)=>(sE(e,t,"read from private field"),i?i.call(e):t.get(e)),sb=(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)},sg=(e,t,i,a)=>(sE(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),sf=(e,t,i)=>(sE(e,t,"access private method"),i);let sA={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},sT=[...Object.values(sA),tQ.MEDIA_CURRENT_TIME,tQ.MEDIA_DURATION,tQ.MEDIA_SEEKABLE],s_=["Enter"," "],sk=" / ",sy=(e,{timesSep:t=sk}={})=>{var i,a;let r=null!=(i=e.mediaCurrentTime)?i:0,[,s]=null!=(a=e.mediaSeekable)?a:[],n=0;Number.isFinite(e.mediaDuration)?n=e.mediaDuration:Number.isFinite(s)&&(n=s);let o=e.remaining?ia(0-(n-r)):ia(r);return e.showDuration?`${o}${t}${ia(n)}`:o};class sI extends rE{constructor(){super(),sb(this,e5),sb(this,e4),sb(this,e8),sb(this,e6),sb(this,e0,void 0),sb(this,e1,null),sb(this,e2,e=>{let{metaKey:t,altKey:i,key:a}=e;if(t||i||!s_.includes(a))return void this.removeEventListener("keyup",sv(this,e1));this.addEventListener("keyup",sv(this,e1))}),sg(this,e0,this.shadowRoot.querySelector("slot")),sv(this,e0).innerHTML=`${sy(this)}`}static get observedAttributes(){return[...super.observedAttributes,...sT,"disabled"]}connectedCallback(){let{style:e}=iS(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",ie("playback time")),sf(this,e8,e9).call(this),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),sf(this,e4,e7).call(this),super.disconnectedCallback()}attributeChangedCallback(e,t,i){this.setAttribute("aria-label",ie("playback time")),sT.includes(e)?this.update():"disabled"===e&&i!==t?null==i?sf(this,e8,e9).call(this):sf(this,e6,te).call(this):e===sA.NO_TOGGLE&&i!==t&&(this.noToggle?sf(this,e6,te).call(this):sf(this,e8,e9).call(this)),super.attributeChangedCallback(e,t,i)}enable(){this.noToggle||(this.tabIndex=0)}disable(){this.tabIndex=-1}get remaining(){return iC(this,sA.REMAINING)}set remaining(e){iD(this,sA.REMAINING,e)}get showDuration(){return iC(this,sA.SHOW_DURATION)}set showDuration(e){iD(this,sA.SHOW_DURATION,e)}get noToggle(){return iC(this,sA.NO_TOGGLE)}set noToggle(e){iD(this,sA.NO_TOGGLE,e)}get mediaDuration(){return iM(this,tQ.MEDIA_DURATION)}set mediaDuration(e){iR(this,tQ.MEDIA_DURATION,e)}get mediaCurrentTime(){return iM(this,tQ.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){iR(this,tQ.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){let e=this.getAttribute(tQ.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){if(null==e)return void this.removeAttribute(tQ.MEDIA_SEEKABLE);this.setAttribute(tQ.MEDIA_SEEKABLE,e.join(":"))}update(){let e=sy(this);(e=>{var t;
1215let 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-description",ie("video not loaded, unknown time."));let s=e.remaining?ii(0-(r-i)):ii(i);if(!e.showDuration)return e.setAttribute("aria-description",s);let n=ie("{currentTime} of {totalTime}",{currentTime:s,totalTime:ii(r)});e.setAttribute("aria-description",n)})(this),e!==sv(this,e0).innerHTML&&(sv(this,e0).innerHTML=e)}}e0=new WeakMap,e1=new WeakMap,e2=new WeakMap,e5=new WeakSet,e3=function(){sv(this,e1)||(sg(this,e1,e=>{let{key:t}=e;if(!s_.includes(t))return void this.removeEventListener("keyup",sv(this,e1));this.toggleTimeDisplay()}),this.addEventListener("keydown",sv(this,e2)),this.addEventListener("click",this.toggleTimeDisplay))},e4=new WeakSet,e7=function(){sv(this,e1)&&(this.removeEventListener("keyup",sv(this,e1)),this.removeEventListener("keydown",sv(this,e2)),this.removeEventListener("click",this.toggleTimeDisplay),sg(this,e1,null))},e8=new WeakSet,e9=function(){this.noToggle||this.hasAttribute("disabled")||(this.setAttribute("role","button"),this.enable(),sf(this,e5,e3).call(this))},e6=new WeakSet,te=function(){this.removeAttribute("role"),this.disable(),sf(this,e4,e7).call(this)},sI.getSlotTemplateHTML=function(e,t){return` 1216 <slot>${sy(t)}</slot> 1217 `},im.customElements.get("media-time-display")||im.customElements.define("media-time-display",sI);var sw=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sS=(e,t,i)=>(sw(e,t,"read from private field"),i?i.call(e):t.get(e)),sL=(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)},sM=(e,t,i,a)=>(sw(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i);class sR{constructor(e,t,i){sL(this,tt,void 0),sL(this,ti,void 0),sL(this,ta,void 0),sL(this,tr,void 0),sL(this,ts,void 0),sL(this,tn,void 0),sL(this,to,void 0),sL(this,tl,void 0),sL(this,td,0),sL(this,tu,(e=performance.now())=>{sM(this,td,requestAnimationFrame(sS(this,tu))),sM(this,tr,performance.now()-sS(this,ta));let t=1e3/this.fps;if(sS(this,tr)>t){sM(this,ta,e-sS(this,tr)%t);let i=1e3/((e-sS(this,ti))/++((e,t,i,a)=>({set _(value){sM(e,t,value,i)},get _(){return sS(e,t,a)}}))(this,ts)._),a=(e-sS(this,tn))/1e3/this.duration,r=sS(this,to)+a*this.playbackRate;r-sS(this,tt).valueAsNumber>0?sM(this,tl,this.playbackRate/this.duration/i):(sM(this,tl,.995*sS(this,tl)),r=sS(this,tt).valueAsNumber+sS(this,tl)),this.callback(r)}}),sM(this,tt,e),this.callback=t,this.fps=i}start(){0===sS(this,td)&&(sM(this,ta,performance.now()),sM(this,ti,sS(this,ta)),sM(this,ts,0),sS(this,tu).call(this))}stop(){0!==sS(this,td)&&(cancelAnimationFrame(sS(this,td)),sM(this,td,0))}update({start:e,duration:t,playbackRate:i}){let a=e-sS(this,tt).valueAsNumber,r=Math.abs(t-this.duration);(a>0||a<-.03||r>=.5)&&this.callback(e),sM(this,to,e),sM(this,tn,performance.now()),this.duration=t,this.playbackRate=i}}tt=new WeakMap,ti=new WeakMap,ta=new WeakMap,tr=new WeakMap,ts=new WeakMap,tn=new WeakMap,to=new WeakMap,tl=new WeakMap,td=new WeakMap,tu=new WeakMap;var sC=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},sD=(e,t,i)=>(sC(e,t,"read from private field"),i?i.call(e):t.get(e)),sO=(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)},sN=(e,t,i,a)=>(sC(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),sP=(e,t,i)=>(sC(e,t,"access private method"),i);let sx=(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))},sU=(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 sH extends ro{constructor(){super(),sO(this,t_),sO(this,tI),sO(this,tS),sO(this,tM),sO(this,tC),sO(this,tO),sO(this,tP),sO(this,th,null),sO(this,tc,void 0),sO(this,tm,void 0),sO(this,tp,void 0),sO(this,tE,void 0),sO(this,tv,void 0),sO(this,tb,void 0),sO(this,tg,void 0),sO(this,tf,void 0),sO(this,tA,void 0),sO(this,tT,()=>{sP(this,t_,tk).call(this)?sD(this,tc).start():sD(this,tc).stop()}),sO(this,ty,e=>{!this.dragging&&(t7(e)&&(this.range.valueAsNumber=e),sD(this,tA)||this.updateBar())}),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),sN(this,tm,this.shadowRoot.querySelectorAll('[part~="box"]')),sN(this,tE,this.shadowRoot.querySelector('[part~="preview-box"]')),sN(this,tv,this.shadowRoot.querySelector('[part~="current-box"]'));let e=getComputedStyle(this);sN(this,tb,parseInt(e.getPropertyValue("--media-box-padding-left"))),sN(this,tg,parseInt(e.getPropertyValue("--media-box-padding-right"))),sN(this,tc,new sR(this.range,sD(this,ty),60))}static get observedAttributes(){return[...super.observedAttributes,tQ.MEDIA_PAUSED,tQ.MEDIA_DURATION,tQ.MEDIA_SEEKABLE,tQ.MEDIA_CURRENT_TIME,tQ.MEDIA_PREVIEW_IMAGE,tQ.MEDIA_PREVIEW_TIME,tQ.MEDIA_PREVIEW_CHAPTER,tQ.MEDIA_BUFFERED,tQ.MEDIA_PLAYBACK_RATE,tQ.MEDIA_LOADING,tQ.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",ie("seek")),sD(this,tT).call(this),sN(this,th,this.getRootNode()),null==(e=sD(this,th))||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),sD(this,tc).stop(),null==(e=sD(this,th))||e.removeEventListener("transitionstart",this),sN(this,th,null)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),t!=i&&(e===tQ.MEDIA_CURRENT_TIME||e===tQ.MEDIA_PAUSED||e===tQ.MEDIA_ENDED||e===tQ.MEDIA_LOADING||e===tQ.MEDIA_DURATION||e===tQ.MEDIA_SEEKABLE?(sD(this,tc).update({start:sx(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),sD(this,tT).call(this),(e=>
1217{let t=e.range,i=ii(+sU(e)),a=ii(+e.mediaSeekableEnd),r=i&&a?ie("{currentTime} of {totalTime}",{currentTime:i,totalTime:a}):ie("video not loaded, unknown time.");t.setAttribute("aria-valuetext",r)})(this)):e===tQ.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===tQ.MEDIA_DURATION||e===tQ.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=sD(this,tf),this.updateBar()))}get mediaChaptersCues(){return sD(this,tf)}set mediaChaptersCues(e){var t;sN(this,tf,e),this.updateSegments(null==(t=sD(this,tf))?void 0:t.map(e=>({start:sx(this,e.startTime),end:sx(this,e.endTime)})))}get mediaPaused(){return iC(this,tQ.MEDIA_PAUSED)}set mediaPaused(e){iD(this,tQ.MEDIA_PAUSED,e)}get mediaLoading(){return iC(this,tQ.MEDIA_LOADING)}set mediaLoading(e){iD(this,tQ.MEDIA_LOADING,e)}get mediaDuration(){return iM(this,tQ.MEDIA_DURATION)}set mediaDuration(e){iR(this,tQ.MEDIA_DURATION,e)}get mediaCurrentTime(){return iM(this,tQ.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){iR(this,tQ.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return iM(this,tQ.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){iR(this,tQ.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){let e=this.getAttribute(tQ.MEDIA_BUFFERED);return e?e.split(" ").map(e=>e.split(":").map(e=>+e)):[]}set mediaBuffered(e){if(!e)return void this.removeAttribute(tQ.MEDIA_BUFFERED);let t=e.map(e=>e.join(":")).join(" ");this.setAttribute(tQ.MEDIA_BUFFERED,t)}get mediaSeekable(){let e=this.getAttribute(tQ.MEDIA_SEEKABLE);if(e)return e.split(":").map(e=>+e)}set mediaSeekable(e){if(null==e)return void this.removeAttribute(tQ.MEDIA_SEEKABLE);this.setAttribute(tQ.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 iO(this,tQ.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){iN(this,tQ.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return iM(this,tQ.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){iR(this,tQ.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return iC(this,tQ.MEDIA_ENDED)}set mediaEnded(e){iD(this,tQ.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=sx(this,r)}let{style:a}=iS(this.shadowRoot,"#buffered");a.setProperty("width",`${100*t}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;let e=iS(this.shadowRoot,"#current-rail"),t=iS(this.shadowRoot,'[part~="current-box"]'),i=sP(this,tI,tw).call(this,sD(this,tv)),a=sP(this,tS,tL).call(this,i,this.range.valueAsNumber),r=sP(this,tM,tR).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":sP(this,tP,tx).call(this);break;case"pointermove":sP(this,tC,tD).call(this,e);break;case"pointerup":sD(this,tA)&&sN(this,tA,!1);break;case"pointerdown":sN(this,tA,!0);break;case"pointerleave":sP(this,tO,tN).call(this,null);break;case"transitionstart":iy(e.target,this)&&setTimeout(()=>sD(this,tT).call(this),0)}}}th=new WeakMap,tc=new WeakMap,tm=new WeakMap,tp=new WeakMap,tE=new WeakMap,tv=new WeakMap,tb=new WeakMap,tg=new WeakMap,tf=new WeakMap,tA=new WeakMap,tT=new WeakMap,t_=new WeakSet,tk=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&iw(this)},ty=new WeakMap,tI=new WeakSet,tw=function(e){var t;let i=(null!=(t=this.getAttribute("bounds")?iI(this,`#${this.getAttribute("bounds")}`):this.parentElement)?t:this).getBoundingClientRect(),a=this.range.getBoundingClientRect(),r=e.offsetWidth,s=-(a.left-i.left-r/2),n=i.right-a.left-r/2;return{box:{width:r,min:s,max:n},bounds:i,range:a}},tS=new WeakSet,tL=function(e,t){let i=`${100*t}%`,{width:a,min:r,max:s}=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(s)){let e=`calc(1 / var(--_range-width) * 100 * ${s}% - var(--media-box-padding-right))`;i=`min(${i}, ${e})`}return i},tM=new WeakSet,tR=function(e,t){let{width:i,min:a,max:r}
1217=e.box,s=t*e.range.width;if(s<a+sD(this,tb)){let t=e.range.left-e.bounds.left-sD(this,tb);return`${s-i/2+t}px`}if(s>r-sD(this,tg)){let t=e.bounds.right-e.range.right-sD(this,tg);return`${s+i/2-t-e.range.width}px`}return 0},tC=new WeakSet,tD=function(e){let t=[...sD(this,tm)].some(t=>e.composedPath().includes(t));if(!this.dragging&&(t||!e.composedPath().includes(this)))return void sP(this,tO,tN).call(this,null);let i=this.mediaSeekableEnd;if(!i)return;let a=iS(this.shadowRoot,"#preview-rail"),r=iS(this.shadowRoot,'[part~="preview-box"]'),s=sP(this,tI,tw).call(this,sD(this,tE)),n=(e.clientX-s.range.left)/s.range.width;n=Math.max(0,Math.min(1,n));let o=sP(this,tS,tL).call(this,s,n),l=sP(this,tM,tR).call(this,s,n);a.style.transform=`translateX(${o})`,a.style.setProperty("--_range-width",`${s.range.width}`),r.style.setProperty("--_box-shift",`${l}`),r.style.setProperty("--_box-width",`${s.box.width}px`),1>Math.abs(Math.round(sD(this,tp))-Math.round(n*i))&&n>.01&&n<.99||(sN(this,tp,n*i),sP(this,tO,tN).call(this,sD(this,tp)))},tO=new WeakSet,tN=function(e){this.dispatchEvent(new im.CustomEvent(tK.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:e}))},tP=new WeakSet,tx=function(){sD(this,tc).stop();let e=sU(this);this.dispatchEvent(new im.CustomEvent(tK.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e}))},sH.shadowRootOptions={mode:"open"},sH.getContainerTemplateHTML=function(e){return` 1218 <style> 1219 :host { 1220 --media-box-border-radius: 4px; 1221 --media-box-padding-left: 10px; 1222 --media-box-padding-right: 10px; 1223 --media-preview-border-radius: var(--media-box-border-radius); 1224 --media-box-arrow-offset: var(--media-box-border-radius); 1225 --_control-background: var(--media-control-background, var(--media-secondary-color, rgb(20 20 30 / .7))); 1226 --_preview-background: var(--media-preview-background, var(--_control-background)); 1227 1228 1229 contain: layout; 1230 } 1231 1232 #buffered { 1233 background: var(--media-time-range-buffered-color, rgb(255 255 255 / .4)); 1234 position: absolute; 1235 height: 100%; 1236 will-change: width; 1237 } 1238 1239 #preview-rail, 1240 #current-rail { 1241 width: 100%; 1242 position: absolute; 1243 left: 0; 1244 bottom: 100%; 1245 pointer-events: none; 1246 will-change: transform; 1247 } 1248 1249 [part~="box"] { 1250 width: min-content; 1251 1252 position: absolute; 1253 bottom: 100%; 1254 flex-direction: column; 1255 align-items: center; 1256 transform: translateX(-50%); 1257 } 1258 1259 [part~="current-box"] { 1260 display: var(--media-current-box-display, var(--media-box-display, flex)); 1261 margin: var(--media-current-box-margin, var(--media-box-margin, 0 0 5px)); 1262 visibility: hidden; 1263 } 1264 1265 [part~="preview-box"] { 1266 display: var(--media-preview-box-display, var(--media-box-display, flex)); 1267 margin: var(--media-preview-box-margin, var(--media-box-margin, 0 0 5px)); 1268 transition-property: var(--media-preview-transition-property, visibility, opacity); 1269 transition-duration: var(--media-preview-transition-duration-out, .25s); 1270 transition-delay: var(--media-preview-transition-delay-out, 0s); 1271 visibility: hidden; 1272 opacity: 0; 1273 } 1274 1275 :host(:is([${tQ.MEDIA_PREVIEW_IMAGE}], [${tQ.MEDIA_PREVIEW_TIME}])[dragging]) [part~="preview-box"] { 1276 transition-duration: var(--media-preview-transition-duration-in, .5s); 1277 transition-delay: var(--media-preview-transition-delay-in, .25s); 1278 visibility: visible; 1279 opacity: 1; 1280 } 1281 1282 @media (hover: hover) { 1283 :host(:is([${tQ.MEDIA_PREVIEW_IMAGE}], [${tQ.MEDIA_PREVIEW_TIME}]):hover) [part~="preview-box"] { 1284 transition-duration: var(--media-preview-transition-duration-in, .5s); 1285 transition-delay: var(--media-preview-transition-delay-in, .25s); 1286 visibility: visible; 1287 opacity: 1; 1288 } 1289 } 1290 1291 media-preview-thumbnail, 1292 ::slotted(media-preview-thumbnail) { 1293 visibility: hidden; 1294 1295 transition: visibility 0s .25s; 1296 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s));
1297 background: var(--media-preview-thumbnail-background, var(--_preview-background)); 1298 box-shadow: var(--media-preview-thumbnail-box-shadow, 0 0 4px rgb(0 0 0 / .2)); 1299 max-width: var(--media-preview-thumbnail-max-width, 180px); 1300 max-height: var(--media-preview-thumbnail-max-height, 160px); 1301 min-width: var(--media-preview-thumbnail-min-width, 120px); 1302 min-height: var(--media-preview-thumbnail-min-height, 80px); 1303 border: var(--media-preview-thumbnail-border); 1304 border-radius: var(--media-preview-thumbnail-border-radius, 1305 var(--media-preview-border-radius) var(--media-preview-border-radius) 0 0); 1306 } 1307 1308 :host([${tQ.MEDIA_PREVIEW_IMAGE}][dragging]) media-preview-thumbnail, 1309 :host([${tQ.MEDIA_PREVIEW_IMAGE}][dragging]) ::slotted(media-preview-thumbnail) { 1310 transition-delay: var(--media-preview-transition-delay-in, .25s); 1311 visibility: visible; 1312 } 1313 1314 @media (hover: hover) { 1315 :host([${tQ.MEDIA_PREVIEW_IMAGE}]:hover) media-preview-thumbnail, 1316 :host([${tQ.MEDIA_PREVIEW_IMAGE}]:hover) ::slotted(media-preview-thumbnail) { 1317 transition-delay: var(--media-preview-transition-delay-in, .25s); 1318 visibility: visible; 1319 } 1320 1321 :host([${tQ.MEDIA_PREVIEW_TIME}]:hover) { 1322 --media-time-range-hover-display: block; 1323 } 1324 } 1325 1326 media-preview-chapter-display, 1327 ::slotted(media-preview-chapter-display) { 1328 font-size: var(--media-font-size, 13px); 1329 line-height: 17px; 1330 min-width: 0; 1331 visibility: hidden; 1332 1333 transition: min-width 0s, border-radius 0s, margin 0s, padding 0s, visibility 0s; 1334 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 1335 background: var(--media-preview-chapter-background, var(--_preview-background)); 1336 border-radius: var(--media-preview-chapter-border-radius, 1337 var(--media-preview-border-radius) var(--media-preview-border-radius) 1338 var(--media-preview-border-radius) var(--media-preview-border-radius)); 1339 padding: var(--media-preview-chapter-padding, 3.5px 9px); 1340 margin: var(--media-preview-chapter-margin, 0 0 5px); 1341 text-shadow: var(--media-preview-chapter-text-shadow, 0 0 4px rgb(0 0 0 / .75)); 1342 } 1343 1344 :host([${tQ.MEDIA_PREVIEW_IMAGE}]) media-preview-chapter-display, 1345 :host([${tQ.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-chapter-display) { 1346 transition-delay: var(--media-preview-transition-delay-in, .25s); 1347 border-radius: var(--media-preview-chapter-border-radius, 0); 1348 padding: var(--media-preview-chapter-padding, 3.5px 9px 0); 1349 margin: var(--media-preview-chapter-margin, 0); 1350 min-width: 100%; 1351 } 1352 1353 media-preview-chapter-display[${tQ.MEDIA_PREVIEW_CHAPTER}], 1354 ::slotted(media-preview-chapter-display[${tQ.MEDIA_PREVIEW_CHAPTER}]) { 1355 visibility: visible; 1356 } 1357 1358 media-preview-chapter-display:not([aria-valuetext]), 1359 ::slotted(media-preview-chapter-display:not([aria-valuetext])) { 1360 display: none; 1361 } 1362 1363 media-preview-time-display, 1364 ::slotted(media-preview-time-display), 1365 media-time-display, 1366 ::slotted(media-time-display) { 1367 font-size: var(--media-font-size, 13px); 1368 line-height: 17px; 1369 min-width: 0; 1370 1371 transition: min-width 0s, border-radius 0s; 1372 transition-delay: calc(var(--media-preview-transition-delay-out, 0s) + var(--media-preview-transition-duration-out, .25s)); 1373 background: var(--media-preview-time-background, var(--_preview-background)); 1374 border-radius: var(--media-preview-time-border-radius, 1375 var(--media-preview-border-radius) var(--media-preview-border-radius) 1376 var(--media-preview-border-radius) var(--media-preview-border-radius)); 1377 padding: var(--media-preview-time-padding, 3.5px 9px); 1378 margin: var(--media-preview-time-margin, 0); 1379 text-shadow: var(--media-preview-time-text-shadow, 0 0 4px rgb(0 0 0 / .75)); 1380 transform: translateX(min( 1381 max(calc(50% - var(--_box-width) / 2), 1382 calc(var(--_box-shift, 0))), 1383 calc(var(--_box-width) / 2 - 50%) 1384 )); 1385 } 1386 1387 :host([${tQ.MEDIA_PREVIEW_IMAGE}]) media-preview-time-display, 1388 :host([${tQ.MEDIA_PREVIEW_IMAGE}]) ::slotted(media-preview-time-display) { 1389 transition-delay: var(--media-preview-transition-delay-in, .25s); 1390 border-radius: var(--media-preview-time-border-radius, 1391 0 0 var(--media-preview-border-radius) var(--media-preview-border-radius)); 1392 min-width: 100%; 1393 } 1394 1395 :host([${tQ.MEDIA_PREVIEW_TIME}]:hover) { 1396 --media-time-range-hover-display: block; 1397 } 1398 1399 [part~="arrow"], 1400 ::slotted([part~="arrow"]) { 1401 display: var(--media-box-arrow-display, inline-block); 1402 transform: translateX(min( 1403 max(calc(50% - var(--_box-width) / 2 + var(--media-box-arrow-offset)), 1404 calc(var(--_box-shift, 0))), 1405 calc(var(--_box-width) / 2 - 50% - var(--media-box-arrow-offset)) 1406 )); 1407 1408 border-color: transparent; 1409 border-top-color: var(--media-box-arrow-background, var(--_control-background)); 1410 border-width: var(--media-box-arrow-border-width, 1411 var(--media-box-arrow-height, 5px) var(--media-box-arrow-width, 6px) 0); 1412 border-style: solid; 1413 justify-content: center; 1414 height: 0; 1415 } 1416 </style> 1417 <div id="preview-rail"> 1418 <slot name="preview" part="box preview-box">
1419 <media-preview-thumbnail> 1420 <template shadowrootmode="${so.shadowRootOptions.mode}"> 1421 ${so.getTemplateHTML({})} 1422 </template> 1423 </media-preview-thumbnail> 1424 <media-preview-chapter-display></media-preview-chapter-display> 1425 <media-preview-time-display></media-preview-time-display> 1426 <slot name="preview-arrow"><div part="arrow"></div></slot> 1427 </slot> 1428 </div> 1429 <div id="current-rail"> 1430 <slot name="current" part="box current-box"> 1431 1432 </slot> 1433 </div> 1434 `},im.customElements.get("media-time-range")||im.customElements.define("media-time-range",sH);var sV=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)};class sW extends ro{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,tU,()=>{let e=this.range.value,t=new im.CustomEvent(tK.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)})}static get observedAttributes(){return[...super.observedAttributes,tQ.MEDIA_VOLUME,tQ.MEDIA_MUTED,tQ.MEDIA_VOLUME_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",ie("volume")),this.range.addEventListener("input",sV(this,tU))}disconnectedCallback(){this.range.removeEventListener("input",sV(this,tU)),super.disconnectedCallback()}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===tQ.MEDIA_VOLUME||e===tQ.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()}}
1434get mediaVolume(){return iM(this,tQ.MEDIA_VOLUME,1)}set mediaVolume(e){iR(this,tQ.MEDIA_VOLUME,e)}get mediaMuted(){return iC(this,tQ.MEDIA_MUTED)}set mediaMuted(e){iD(this,tQ.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return iO(this,tQ.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){iN(this,tQ.MEDIA_VOLUME_UNAVAILABLE,e)}}tU=new WeakMap,im.customElements.get("media-volume-range")||im.customElements.define("media-volume-range",sW);class sF extends aj{constructor(){super(...arguments),this.container=null}static get observedAttributes(){return[...super.observedAttributes,tQ.MEDIA_LOOP]}connectedCallback(){var e;super.connectedCallback(),this.container=(null==(e=this.shadowRoot)?void 0:e.querySelector("#icon"))||null,this.container&&(this.container.textContent=ie("Loop"))}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===tQ.MEDIA_LOOP&&this.container&&this.setAttribute("aria-checked",this.mediaLoop?"true":"false")}get mediaLoop(){return iC(this,tQ.MEDIA_LOOP)}set mediaLoop(e){iD(this,tQ.MEDIA_LOOP,e)}handleClick(){let e=!this.mediaLoop,t=new im.CustomEvent(tK.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(t)}}function s$(e){return"boolean"==typeof e?e?"":void 0:"function"==typeof e?void 0:Array.isArray(e)&&e.every(e=>"string"==typeof e||"number"==typeof e||"boolean"==typeof e)?e.join(" "):"object"!=typeof e||null===e?e:void 0}sF.getSlotTemplateHTML=function(e){return` 1435 <style> 1436 :host { 1437 min-width: 4ch; 1438 padding: var(--media-button-padding, var(--media-control-padding, 10px 5px)); 1439 width: 100%; 1440 display: grid; 1441 grid-template-columns: 1fr auto; 1442 gap: 1rem; 1443 font-weight: var(--media-button-font-weight, normal); 1444 } 1445 1446 #checked-indicator { 1447 display: none; 1448 } 1449 1450 :host([${tQ.MEDIA_LOOP}]) #checked-indicator { 1451 display: block; 1452 } 1453 </style> 1454 1455 <span id="icon"> 1456 </span> 1457 1458 <div id="checked-indicator"> 1459 <svg aria-hidden="true" viewBox="0 1 24 24" part="checked-indicator indicator"> 1460 <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"/> 1461 </svg> 1462 </div> 1463 `},sF.getTooltipContentHTML=function(){return ie("Loop")},im.customElements.get("media-loop-button")||im.customElements.define("media-loop-button",sF),tB({tagName:"media-gesture-receiver",elementClass:iH,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),tB({tagName:"media-container",elementClass:ij,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}});let sB=tB({tagName:"media-controller",elementClass:aM,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}});tB({tagName:"media-tooltip",elementClass:aF,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),tB({tagName:"media-chrome-button",elementClass:aj,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),tB({tagName:"media-airplay-button",elementClass:az,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),tB({tagName:"media-captions-button",elementClass:a0,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),tB({tagName:"media-cast-button",elementClass:a3,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),tB({tagName:"media-chrome-dialog",elementClass:rt,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),tB({tagName:"media-chrome-range",elementClass:ro,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}});let sG=tB({tagName:"media-control-bar",elementClass:rh,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}});tB({tagName:"media-text-display",elementClass:rE,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),tB({tagName:"media-duration-display",elementClass:rg,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),tB({tagName:"media-error-dialog",elementClass:rI,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),tB({tagName:"media-keyboard-shortcuts-dialog",elementClass:rL,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}});let sK=tB({tagName:"media-fullscreen-button",elementClass:rO,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}});tB({tagName:"media-live-button",elementClass:rV,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),tB({tagName:"media-loading-indicator",elementClass:rq,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}});let sq=tB({tagName:"media-mute-button",elementClass:rZ,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),sj=tB({tagName:"media-pip-button",elementClass:r0,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),sY=tB({tagName:"media-playback-rate-button",elementClass:r4,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),sQ=tB({tagName:"media-play-button",elementClass:r6,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}});tB({tagName:"media-poster-image",elementClass:st,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),tB({tagName:"media-preview-chapter-display",elementClass:sa,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}
1463),tB({tagName:"media-preview-thumbnail",elementClass:so,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),tB({tagName:"media-preview-time-display",elementClass:su,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}});let sz=tB({tagName:"media-seek-backward-button",elementClass:sc,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),sZ=tB({tagName:"media-seek-forward-button",elementClass:sp,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),sX=tB({tagName:"media-time-display",elementClass:sI,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),sJ=tB({tagName:"media-time-range",elementClass:sH,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}}),s0=tB({tagName:"media-volume-range",elementClass:sW,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}});tB({tagName:"media-loop-button",elementClass:sF,react:tH,toAttributeValue:s$,defaultProps:{suppressHydrationWarning:!0}})}}]);
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.