@mux/mux-player 3.11.8-canary.1 → 3.11.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/base.cjs.js CHANGED
@@ -1408,7 +1408,7 @@
1408
1408
  <path d="m10 15.17 9.193-9.191 1.414 1.414-10.606 10.606-6.364-6.364 1.414-1.414 4.95 4.95Z"/>
1409
1409
  </svg>
1410
1410
  </div>
1411
- `}function Tv(){return c("Loop")}var Kr=class extends B{constructor(){super(...arguments),this.container=null}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_LOOP]}connectedCallback(){var e;super.connectedCallback(),this.container=((e=this.shadowRoot)==null?void 0:e.querySelector("#icon"))||null,this.container&&(this.container.textContent=c("Loop"))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_LOOP&&this.container&&this.setAttribute("aria-checked",this.mediaLoop?"true":"false")}get mediaLoop(){return M(this,n.MEDIA_LOOP)}set mediaLoop(e){L(this,n.MEDIA_LOOP,e)}handleClick(){let e=!this.mediaLoop,i=new l.CustomEvent(h.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}};Kr.getSlotTemplateHTML=Av;Kr.getTooltipContentHTML=Tv;l.customElements.get("media-loop-button")||l.customElements.define("media-loop-button",Kr);var b=require("@mux/mux-video/base"),O=require("@mux/playback-core");var km=require("@mux/playback-core");var Ti=require("@mux/playback-core");function gm(t){let e="";return Object.entries(t).forEach(([i,a])=>{a!=null&&(e+=`${is(i)}: ${a}; `)}),e?e.trim():void 0}function is(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function as(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function fe(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function ld(t){let e=yv(t).toString();return e?"?"+e:""}function yv(t){let e={};for(let i in t)t[i]!=null&&(e[i]=t[i]);return new URLSearchParams(e)}var dd=(t,e)=>!t||!e?!1:t.contains(e)?!0:dd(t,e.getRootNode().host);var _m="mux.com",kv=()=>{try{return"3.11.7"}catch{}return"UNKNOWN"},Sv=kv(),os=()=>Sv,Am=(t,{token:e,customDomain:i=_m,thumbnailTime:a,programTime:r}={})=>{var d;let o=e==null?a:void 0,{aud:s}=(d=(0,Ti.parseJwt)(e))!=null?d:{};if(!(e&&s!=="t"))return`https://image.${i}/${t}/thumbnail.webp${ld({token:e,time:o,program_time:r})}`},Tm=(t,{token:e,customDomain:i=_m,programStartTime:a,programEndTime:r}={})=>{var s;let{aud:o}=(s=(0,Ti.parseJwt)(e))!=null?s:{};if(!(e&&o!=="s"))return`https://image.${i}/${t}/storyboard.vtt${ld({token:e,format:"webp",program_start_time:a,program_end_time:r})}`},Gr=t=>{if(t){if([Ti.StreamTypes.LIVE,Ti.StreamTypes.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return Ti.StreamTypes.LIVE}};var Iv={crossorigin:"crossOrigin",playsinline:"playsInline"};function ym(t){var e;return(e=Iv[t])!=null?e:as(t)}var _i,Ai,ve,rs=class{constructor(e,i){ae(this,_i);ae(this,Ai);ae(this,ve,[]);de(this,_i,e),de(this,Ai,i)}[Symbol.iterator](){return R(this,ve).values()}get length(){return R(this,ve).length}get value(){var e;return(e=R(this,ve).join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(de(this,ve,[]),this.add(...(i=e==null?void 0:e.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return R(this,ve)[e]}values(){return R(this,ve).values()}keys(){return R(this,ve).keys()}forEach(e){R(this,ve).forEach(e)}add(...e){var i,a;e.forEach(r=>{this.contains(r)||R(this,ve).push(r)}),!(this.value===""&&!((i=R(this,_i))!=null&&i.hasAttribute(`${R(this,Ai)}`)))&&((a=R(this,_i))==null||a.setAttribute(`${R(this,Ai)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>{R(this,ve).splice(R(this,ve).indexOf(a),1)}),(i=R(this,_i))==null||i.setAttribute(`${R(this,Ai)}`,`${this.value}`)}contains(e){return R(this,ve).includes(e)}toggle(e,i){return typeof i!="undefined"?i?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,i){this.remove(e),this.add(i)}};_i=new WeakMap,Ai=new WeakMap,ve=new WeakMap;var Sm=`[mux-player ${os()}]`;function ct(...t){console.warn(Sm,...t)}function Ee(...t){console.error(Sm,...t)}function ud(t){var i;let e=(i=t.message)!=null?i:"";t.context&&(e+=` ${t.context}`),t.file&&(e+=` ${(0,km.i18n)("Read more: ")}
1411
+ `}function Tv(){return c("Loop")}var Kr=class extends B{constructor(){super(...arguments),this.container=null}static get observedAttributes(){return[...super.observedAttributes,n.MEDIA_LOOP]}connectedCallback(){var e;super.connectedCallback(),this.container=((e=this.shadowRoot)==null?void 0:e.querySelector("#icon"))||null,this.container&&(this.container.textContent=c("Loop"))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===n.MEDIA_LOOP&&this.container&&this.setAttribute("aria-checked",this.mediaLoop?"true":"false")}get mediaLoop(){return M(this,n.MEDIA_LOOP)}set mediaLoop(e){L(this,n.MEDIA_LOOP,e)}handleClick(){let e=!this.mediaLoop,i=new l.CustomEvent(h.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}};Kr.getSlotTemplateHTML=Av;Kr.getTooltipContentHTML=Tv;l.customElements.get("media-loop-button")||l.customElements.define("media-loop-button",Kr);var b=require("@mux/mux-video/base"),O=require("@mux/playback-core");var km=require("@mux/playback-core");var Ti=require("@mux/playback-core");function gm(t){let e="";return Object.entries(t).forEach(([i,a])=>{a!=null&&(e+=`${is(i)}: ${a}; `)}),e?e.trim():void 0}function is(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function as(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function fe(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function ld(t){let e=yv(t).toString();return e?"?"+e:""}function yv(t){let e={};for(let i in t)t[i]!=null&&(e[i]=t[i]);return new URLSearchParams(e)}var dd=(t,e)=>!t||!e?!1:t.contains(e)?!0:dd(t,e.getRootNode().host);var _m="mux.com",kv=()=>{try{return"3.11.8"}catch{}return"UNKNOWN"},Sv=kv(),os=()=>Sv,Am=(t,{token:e,customDomain:i=_m,thumbnailTime:a,programTime:r}={})=>{var d;let o=e==null?a:void 0,{aud:s}=(d=(0,Ti.parseJwt)(e))!=null?d:{};if(!(e&&s!=="t"))return`https://image.${i}/${t}/thumbnail.webp${ld({token:e,time:o,program_time:r})}`},Tm=(t,{token:e,customDomain:i=_m,programStartTime:a,programEndTime:r}={})=>{var s;let{aud:o}=(s=(0,Ti.parseJwt)(e))!=null?s:{};if(!(e&&o!=="s"))return`https://image.${i}/${t}/storyboard.vtt${ld({token:e,format:"webp",program_start_time:a,program_end_time:r})}`},Gr=t=>{if(t){if([Ti.StreamTypes.LIVE,Ti.StreamTypes.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return Ti.StreamTypes.LIVE}};var Iv={crossorigin:"crossOrigin",playsinline:"playsInline"};function ym(t){var e;return(e=Iv[t])!=null?e:as(t)}var _i,Ai,ve,rs=class{constructor(e,i){ae(this,_i);ae(this,Ai);ae(this,ve,[]);de(this,_i,e),de(this,Ai,i)}[Symbol.iterator](){return R(this,ve).values()}get length(){return R(this,ve).length}get value(){var e;return(e=R(this,ve).join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(de(this,ve,[]),this.add(...(i=e==null?void 0:e.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return R(this,ve)[e]}values(){return R(this,ve).values()}keys(){return R(this,ve).keys()}forEach(e){R(this,ve).forEach(e)}add(...e){var i,a;e.forEach(r=>{this.contains(r)||R(this,ve).push(r)}),!(this.value===""&&!((i=R(this,_i))!=null&&i.hasAttribute(`${R(this,Ai)}`)))&&((a=R(this,_i))==null||a.setAttribute(`${R(this,Ai)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>{R(this,ve).splice(R(this,ve).indexOf(a),1)}),(i=R(this,_i))==null||i.setAttribute(`${R(this,Ai)}`,`${this.value}`)}contains(e){return R(this,ve).includes(e)}toggle(e,i){return typeof i!="undefined"?i?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,i){this.remove(e),this.add(i)}};_i=new WeakMap,Ai=new WeakMap,ve=new WeakMap;var Sm=`[mux-player ${os()}]`;function ct(...t){console.warn(Sm,...t)}function Ee(...t){console.error(Sm,...t)}function ud(t){var i;let e=(i=t.message)!=null?i:"";t.context&&(e+=` ${t.context}`),t.file&&(e+=` ${(0,km.i18n)("Read more: ")}
1412
1412
  https://github.com/muxinc/elements/blob/main/errors/${t.file}`),ct(e)}var me={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},Zt={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},RA={...me,...Zt},Mm=Object.freeze({length:0,start(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),Mv=Object.values(me).filter(t=>me.PLAYSINLINE!==t),Lv=Object.values(Zt),Cv=[...Mv,...Lv],cd=class extends Se.HTMLElement{static get observedAttributes(){return Cv}constructor(){super()}attributeChangedCallback(e,i,a){var r,o;switch(e){case Zt.MUTED:{this.media&&(this.media.muted=a!=null,this.media.defaultMuted=a!=null);return}case Zt.VOLUME:{let s=(r=fe(a))!=null?r:1;this.media&&(this.media.volume=s);return}case Zt.PLAYBACKRATE:{let s=(o=fe(a))!=null?o:1;this.media&&(this.media.playbackRate=s,this.media.defaultPlaybackRate=s);return}}}play(){var e,i;return(i=(e=this.media)==null?void 0:e.play())!=null?i:Promise.reject()}pause(){var e;(e=this.media)==null||e.pause()}load(){var e;(e=this.media)==null||e.load()}get media(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("mux-video")}get audioTracks(){return this.media.audioTracks}get videoTracks(){return this.media.videoTracks}get audioRenditions(){return this.media.audioRenditions}get videoRenditions(){return this.media.videoRenditions}get paused(){var e,i;return(i=(e=this.media)==null?void 0:e.paused)!=null?i:!0}get duration(){var e,i;return(i=(e=this.media)==null?void 0:e.duration)!=null?i:NaN}get ended(){var e,i;return(i=(e=this.media)==null?void 0:e.ended)!=null?i:!1}get buffered(){var e,i;return(i=(e=this.media)==null?void 0:e.buffered)!=null?i:Mm}get seekable(){var e,i;return(i=(e=this.media)==null?void 0:e.seekable)!=null?i:Mm}get readyState(){var e,i;return(i=(e=this.media)==null?void 0:e.readyState)!=null?i:0}get videoWidth(){var e,i;return(i=(e=this.media)==null?void 0:e.videoWidth)!=null?i:0}get videoHeight(){var e,i;return(i=(e=this.media)==null?void 0:e.videoHeight)!=null?i:0}get currentSrc(){var e,i;return(i=(e=this.media)==null?void 0:e.currentSrc)!=null?i:""}get currentTime(){var e,i;return(i=(e=this.media)==null?void 0:e.currentTime)!=null?i:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,i;return(i=(e=this.media)==null?void 0:e.volume)!=null?i:1}set volume(e){this.media&&(this.media.volume=Number(e))}get playbackRate(){var e,i;return(i=(e=this.media)==null?void 0:e.playbackRate)!=null?i:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get defaultPlaybackRate(){var e;return(e=fe(this.getAttribute(Zt.PLAYBACKRATE)))!=null?e:1}set defaultPlaybackRate(e){e!=null?this.setAttribute(Zt.PLAYBACKRATE,`${e}`):this.removeAttribute(Zt.PLAYBACKRATE)}get crossOrigin(){return Yr(this,me.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(me.CROSSORIGIN,`${e}`)}get autoplay(){return Yr(this,me.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(me.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(me.AUTOPLAY)}get loop(){return Yr(this,me.LOOP)!=null}set loop(e){e?this.setAttribute(me.LOOP,""):this.removeAttribute(me.LOOP)}get muted(){var e,i;return(i=(e=this.media)==null?void 0:e.muted)!=null?i:!1}set muted(e){this.media&&(this.media.muted=!!e)}get defaultMuted(){return Yr(this,me.MUTED)!=null}set defaultMuted(e){e?this.setAttribute(me.MUTED,""):this.removeAttribute(me.MUTED)}get playsInline(){return Yr(this,me.PLAYSINLINE)!=null}set playsInline(e){Ee("playsInline is set to true by default and is not currently supported as a setter.")}get preload(){return this.media?this.media.preload:this.getAttribute("preload")}set preload(e){["","none","metadata","auto"].includes(e)?this.setAttribute(me.PRELOAD,e):this.removeAttribute(me.PRELOAD)}};function Yr(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var md=cd;var xm=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},N=(t,e,i)=>(xm(t,e,"read from private field"),i?i.call(t):e.get(t)),mt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},It=(t,e,i,a)=>(xm(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),pa,ns,yi,qr,zt,Qt,Xt,ki,fa,ss,Ze,Lm=1,Cm=0,wv=1,Rv={processCallback(t,e,i){if(i){for(let[a,r]of e)if(a in i){let o=i[a];typeof o=="boolean"&&r instanceof be&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=o:typeof o=="function"&&r instanceof be?r.element[r.attributeName]=o:r.value=o}}}},Mt=class extends l.DocumentFragment{constructor(e,i,a=Rv){var r;super(),mt(this,pa,void 0),mt(this,ns,void 0),this.append(e.content.cloneNode(!0)),It(this,pa,Dm(this)),It(this,ns,a),(r=a.createCallback)==null||r.call(a,this,N(this,pa),i),a.processCallback(this,N(this,pa),i)}update(e){N(this,ns).processCallback(this,N(this,pa),e)}};pa=new WeakMap;ns=new WeakMap;var Dm=(t,e=[])=>{let i,a;for(let r of t.attributes||[])if(r.value.includes("{{")){let o=new hd;for([i,a]of Rm(r.value))if(!i)o.append(a);else{let s=new be(t,r.name,r.namespaceURI);o.append(s),e.push([a,s])}r.value=o.toString()}for(let r of t.childNodes)if(r.nodeType===Lm&&!(r instanceof HTMLTemplateElement))Dm(r,e);else{let o=r.data;if(r.nodeType===Lm||o.includes("{{")){let s=[];if(o)for([i,a]of Rm(o))if(!i)s.push(new Text(a));else{let d=new Lt(t);s.push(d),e.push([a,d])}else if(r instanceof HTMLTemplateElement){let d=new Zr(t,r);s.push(d),e.push([d.expression,d])}r.replaceWith(...s.flatMap(d=>d.replacementNodes||[d]))}}return e},wm={},Rm=t=>{let e="",i=0,a=wm[t],r=0,o;if(a)return a;for(a=[];o=t[r];r++)o==="{"&&t[r+1]==="{"&&t[r-1]!=="\\"&&t[r+2]&&++i==1?(e&&a.push([Cm,e]),e="",r++):o==="}"&&t[r+1]==="}"&&t[r-1]!=="\\"&&!--i?(a.push([wv,e.trim()]),e="",r++):e+=o||"";return e&&a.push([Cm,(i>0?"{{":"")+e]),wm[t]=a},xv=11,ls=class{get value(){return""}set value(e){}toString(){return this.value}},Om=new WeakMap,hd=class{constructor(){mt(this,yi,[])}[Symbol.iterator](){return N(this,yi).values()}get length(){return N(this,yi).length}item(e){return N(this,yi)[e]}append(...e){for(let i of e)i instanceof be&&Om.set(i,this),N(this,yi).push(i)}toString(){return N(this,yi).join("")}};yi=new WeakMap;var be=class extends ls{constructor(e,i,a){super(),mt(this,ki),mt(this,qr,""),mt(this,zt,void 0),mt(this,Qt,void 0),mt(this,Xt,void 0),It(this,zt,e),It(this,Qt,i),It(this,Xt,a)}get attributeName(){return N(this,Qt)}get attributeNamespace(){return N(this,Xt)}get element(){return N(this,zt)}get value(){return N(this,qr)}set value(e){N(this,qr)!==e&&(It(this,qr,e),!N(this,ki,fa)||N(this,ki,fa).length===1?e==null?N(this,zt).removeAttributeNS(N(this,Xt),N(this,Qt)):N(this,zt).setAttributeNS(N(this,Xt),N(this,Qt),e):N(this,zt).setAttributeNS(N(this,Xt),N(this,Qt),N(this,ki,fa).toString()))}get booleanValue(){return N(this,zt).hasAttributeNS(N(this,Xt),N(this,Qt))}set booleanValue(e){if(!N(this,ki,fa)||N(this,ki,fa).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}};qr=new WeakMap;zt=new WeakMap;Qt=new WeakMap;Xt=new WeakMap;ki=new WeakSet;fa=function(){return Om.get(this)};var Lt=class extends ls{constructor(e,i){super(),mt(this,ss,void 0),mt(this,Ze,void 0),It(this,ss,e),It(this,Ze,i?[...i]:[new Text])}get replacementNodes(){return N(this,Ze)}get parentNode(){return N(this,ss)}get nextSibling(){return N(this,Ze)[N(this,Ze).length-1].nextSibling}get previousSibling(){return N(this,Ze)[0].previousSibling}get value(){return N(this,Ze).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){let i=e.flat().flatMap(a=>a==null?[new Text]:a.forEach?[...a]:a.nodeType===xv?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);i.length||i.push(new Text),It(this,Ze,Dv(N(this,Ze)[0].parentNode,N(this,Ze),i,this.nextSibling))}};ss=new WeakMap;Ze=new WeakMap;var Zr=class extends Lt{constructor(e,i){let a=i.getAttribute("directive")||i.getAttribute("type"),r=i.getAttribute("expression")||i.getAttribute(a)||"";r.startsWith("{{")&&(r=r.trim().slice(2,-2).trim()),super(e),this.expression=r,this.template=i,this.directive=a}};function Dv(t,e,i,a=null){let r=0,o,s,d,u=i.length,f=e.length;for(;r<u&&r<f&&e[r]==i[r];)r++;for(;r<u&&r<f&&i[u-1]==e[f-1];)a=i[--f,--u];if(r==f)for(;r<u;)t.insertBefore(i[r++],a);if(r==u)for(;r<f;)t.removeChild(e[r++]);else{for(o=e[r];r<u;)d=i[r++],s=o?o.nextSibling:a,o==d?o=s:r<u&&i[r]==s?(t.replaceChild(d,o),o=s):t.insertBefore(d,o);for(;o!=a;)s=o.nextSibling,t.removeChild(o),o=s}return i}var Pm={string:t=>String(t)},us=class{constructor(e){this.template=e,this.state=void 0}},Si=new WeakMap,Ii=new WeakMap,pd={partial:(t,e)=>{e[t.expression]=new us(t.template)},if:(t,e)=>{var i;if(Um(t.expression,e))if(Si.get(t)!==t.template){Si.set(t,t.template);let a=new Mt(t.template,e,cs);t.replace(a),Ii.set(t,a)}else(i=Ii.get(t))==null||i.update(e);else t.replace(""),Si.delete(t),Ii.delete(t)}},Ov=Object.keys(pd),cs={processCallback(t,e,i){var a,r;if(i)for(let[o,s]of e){if(s instanceof Zr){if(!s.directive){let u=Ov.find(f=>s.template.hasAttribute(f));u&&(s.directive=u,s.expression=s.template.getAttribute(u))}(a=pd[s.directive])==null||a.call(pd,s,i);continue}let d=Um(o,i);if(d instanceof us){Si.get(s)!==d.template?(Si.set(s,d.template),d=new Mt(d.template,d.state,cs),s.value=d,Ii.set(s,d)):(r=Ii.get(s))==null||r.update(d.state);continue}d?(s instanceof be&&s.attributeName.startsWith("aria-")&&(d=String(d)),s instanceof be?typeof d=="boolean"?s.booleanValue=d:typeof d=="function"?s.element[s.attributeName]=d:s.value=d:(s.value=d,Si.delete(s),Ii.delete(s))):s instanceof be?s.value=void 0:(s.value=void 0,Si.delete(s),Ii.delete(s))}}},Nm={"!":t=>!t,"!!":t=>!!t,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,">":(t,e)=>t>e,">=":(t,e)=>t>=e,"<":(t,e)=>t<e,"<=":(t,e)=>t<=e,"??":(t,e)=>t!=null?t:e,"|":(t,e)=>{var i;return(i=Pm[e])==null?void 0:i.call(Pm,t)}};function Pv(t){return Nv(t,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function Um(t,e={}){var i,a,r,o,s,d,u;let f=Pv(t);if(f.length===0||f.some(({type:y})=>!y))return zr(t);if(((i=f[0])==null?void 0:i.token)===">"){let y=e[(a=f[1])==null?void 0:a.token];if(!y)return zr(t);let A={...e};y.state=A;let E=f.slice(2);for(let p=0;p<E.length;p+=3){let k=(r=E[p])==null?void 0:r.token,g=(o=E[p+1])==null?void 0:o.token,S=(s=E[p+2])==null?void 0:s.token;k&&g==="="&&(A[k]=Qr(S,e))}return y}if(f.length===1)return ds(f[0])?Qr(f[0].token,e):zr(t);if(f.length===2){let y=(d=f[0])==null?void 0:d.token,A=Nm[y];if(!A||!ds(f[1]))return zr(t);let E=Qr(f[1].token,e);return A(E)}if(f.length===3){let y=(u=f[1])==null?void 0:u.token,A=Nm[y];if(!A||!ds(f[0])||!ds(f[2]))return zr(t);let E=Qr(f[0].token,e);if(y==="|")return A(E,f[2].token);let p=Qr(f[2].token,e);return A(E,p)}}function zr(t){return console.warn(`Warning: invalid expression \`${t}\``),!1}function ds({type:t}){return["number","boolean","string","param"].includes(t)}function Qr(t,e){let i=t[0],a=t.slice(-1);return t==="true"||t==="false"?t==="true":i===a&&["'",'"'].includes(i)?t.slice(1,-1):Lo(t)?parseFloat(t):e[t]}function Nv(t,e){let i,a,r,o=[];for(;t;){r=null,i=t.length;for(let s in e)a=e[s].exec(t),a&&a.index<i&&(r={token:a[0],type:s,matches:a.slice(1)},i=a.index);i&&o.push({token:t.substr(0,i),type:void 0}),r&&o.push(r),t=t.substr(i+(r?r.token.length:0))}return o}var gd=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Jt=(t,e,i)=>(gd(t,e,"read from private field"),i?i.call(t):e.get(t)),Mi=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ct=(t,e,i,a)=>(gd(t,e,"write to private field"),a?a.call(t,i):e.set(t,i),i),fd=(t,e,i)=>(gd(t,e,"access private method"),i),Ea,ms,ba,va,Ed,Hm,hs,bd,Xr,vd={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},Bm=V.createElement("template");Bm.innerHTML=`
1413
1413
  <style>
1414
1414
  :host {
package/dist/base.mjs CHANGED
@@ -1,4 +1,4 @@
1
- var lt=t=>{throw TypeError(t)};var Ae=(t,a,e)=>a.has(t)||lt("Cannot "+e);var l=(t,a,e)=>(Ae(t,a,"read from private field"),e?e.call(t):a.get(t)),h=(t,a,e)=>a.has(t)?lt("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(t):a.set(t,e),f=(t,a,e,i)=>(Ae(t,a,"write to private field"),i?i.call(t,e):a.set(t,e),e),p=(t,a,e)=>(Ae(t,a,"access private method"),e);var Y=class{addEventListener(){}removeEventListener(){}dispatchEvent(a){return!0}};if(typeof DocumentFragment=="undefined"){class t extends Y{}globalThis.DocumentFragment=t}var Q=class extends Y{},Ce=class extends Y{},Gt={get(t){},define(t,a,e){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(Q)}},J,ke=class{constructor(a,e={}){h(this,J);f(this,J,e==null?void 0:e.detail)}get detail(){return l(this,J)}initCustomEvent(){}};J=new WeakMap;function jt(t,a){return new Q}var ut={document:{createElement:jt},DocumentFragment,customElements:Gt,CustomEvent:ke,EventTarget:Y,HTMLElement:Q,HTMLVideoElement:Ce},mt=typeof window=="undefined"||typeof globalThis.customElements=="undefined",_=mt?ut:globalThis,w=mt?ut.document:globalThis.document;import{MediaController as _a,MediaErrorDialog as Kt}from"media-chrome";import{Attributes as we}from"media-chrome/dist/media-container.js";import{MediaStateChangeEvents as Pt,MediaUIAttributes as ve,MediaUIEvents as wt}from"media-chrome/dist/constants.js";import"media-chrome/dist/experimental/index.js";import{MediaError as Ee,Attributes as s}from"@mux/mux-video/base";import{StreamTypes as L,PlaybackTypes as Te,addTextTrack as Ra,removeTextTrack as xa,CmcdTypeValues as Dt,i18n as B,parseJwt as De,MuxJWTAud as Ue,generatePlayerInitTime as Oa}from"@mux/playback-core";import{i18n as Jt}from"@mux/playback-core";import{StreamTypes as xe,parseJwt as pt}from"@mux/playback-core";function ct(t){let a="";return Object.entries(t).forEach(([e,i])=>{i!=null&&(a+=`${me(e)}: ${i}; `)}),a?a.trim():void 0}function me(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ce(t){return t.replace(/[-_]([a-z])/g,(a,e)=>e.toUpperCase())}function A(t){if(t==null)return;let a=+t;return Number.isNaN(a)?void 0:a}function _e(t){let a=zt(t).toString();return a?"?"+a:""}function zt(t){let a={};for(let e in t)t[e]!=null&&(a[e]=t[e]);return new URLSearchParams(a)}var Re=(t,a)=>!t||!a?!1:t.contains(a)?!0:Re(t,a.getRootNode().host);var bt="mux.com",Xt=()=>{try{return"3.11.7"}catch{}return"UNKNOWN"},qt=Xt(),be=()=>qt,ht=(t,{token:a,customDomain:e=bt,thumbnailTime:i,programTime:r}={})=>{var u;let n=a==null?i:void 0,{aud:d}=(u=pt(a))!=null?u:{};if(!(a&&d!=="t"))return`https://image.${e}/${t}/thumbnail.webp${_e({token:a,time:n,program_time:r})}`},gt=(t,{token:a,customDomain:e=bt,programStartTime:i,programEndTime:r}={})=>{var d;let{aud:n}=(d=pt(a))!=null?d:{};if(!(a&&n!=="s"))return`https://image.${e}/${t}/storyboard.vtt${_e({token:a,format:"webp",program_start_time:i,program_end_time:r})}`},ee=t=>{if(t){if([xe.LIVE,xe.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return xe.LIVE}};var Qt={crossorigin:"crossOrigin",playsinline:"playsInline"};function ft(t){var a;return(a=Qt[t])!=null?a:ce(t)}var D,U,C,pe=class{constructor(a,e){h(this,D);h(this,U);h(this,C,[]);f(this,D,a),f(this,U,e)}[Symbol.iterator](){return l(this,C).values()}get length(){return l(this,C).length}get value(){var a;return(a=l(this,C).join(" "))!=null?a:""}set value(a){var e;a!==this.value&&(f(this,C,[]),this.add(...(e=a==null?void 0:a.split(" "))!=null?e:[]))}toString(){return this.value}item(a){return l(this,C)[a]}values(){return l(this,C).values()}keys(){return l(this,C).keys()}forEach(a){l(this,C).forEach(a)}add(...a){var e,i;a.forEach(r=>{this.contains(r)||l(this,C).push(r)}),!(this.value===""&&!((e=l(this,D))!=null&&e.hasAttribute(`${l(this,U)}`)))&&((i=l(this,D))==null||i.setAttribute(`${l(this,U)}`,`${this.value}`))}remove(...a){var e;a.forEach(i=>{l(this,C).splice(l(this,C).indexOf(i),1)}),(e=l(this,D))==null||e.setAttribute(`${l(this,U)}`,`${this.value}`)}contains(a){return l(this,C).includes(a)}toggle(a,e){return typeof e!="undefined"?e?(this.add(a),!0):(this.remove(a),!1):this.contains(a)?(this.remove(a),!1):(this.add(a),!0)}replace(a,e){this.remove(a),this.add(e)}};D=new WeakMap,U=new WeakMap,C=new WeakMap;var yt=`[mux-player ${be()}]`;function O(...t){console.warn(yt,...t)}function k(...t){console.error(yt,...t)}function Oe(t){var e;let a=(e=t.message)!=null?e:"";t.context&&(a+=` ${t.context}`),t.file&&(a+=` ${Jt("Read more: ")}
1
+ var lt=t=>{throw TypeError(t)};var Ae=(t,a,e)=>a.has(t)||lt("Cannot "+e);var l=(t,a,e)=>(Ae(t,a,"read from private field"),e?e.call(t):a.get(t)),h=(t,a,e)=>a.has(t)?lt("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(t):a.set(t,e),f=(t,a,e,i)=>(Ae(t,a,"write to private field"),i?i.call(t,e):a.set(t,e),e),p=(t,a,e)=>(Ae(t,a,"access private method"),e);var Y=class{addEventListener(){}removeEventListener(){}dispatchEvent(a){return!0}};if(typeof DocumentFragment=="undefined"){class t extends Y{}globalThis.DocumentFragment=t}var Q=class extends Y{},Ce=class extends Y{},Gt={get(t){},define(t,a,e){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(Q)}},J,ke=class{constructor(a,e={}){h(this,J);f(this,J,e==null?void 0:e.detail)}get detail(){return l(this,J)}initCustomEvent(){}};J=new WeakMap;function jt(t,a){return new Q}var ut={document:{createElement:jt},DocumentFragment,customElements:Gt,CustomEvent:ke,EventTarget:Y,HTMLElement:Q,HTMLVideoElement:Ce},mt=typeof window=="undefined"||typeof globalThis.customElements=="undefined",_=mt?ut:globalThis,w=mt?ut.document:globalThis.document;import{MediaController as _a,MediaErrorDialog as Kt}from"media-chrome";import{Attributes as we}from"media-chrome/dist/media-container.js";import{MediaStateChangeEvents as Pt,MediaUIAttributes as ve,MediaUIEvents as wt}from"media-chrome/dist/constants.js";import"media-chrome/dist/experimental/index.js";import{MediaError as Ee,Attributes as s}from"@mux/mux-video/base";import{StreamTypes as L,PlaybackTypes as Te,addTextTrack as Ra,removeTextTrack as xa,CmcdTypeValues as Dt,i18n as B,parseJwt as De,MuxJWTAud as Ue,generatePlayerInitTime as Oa}from"@mux/playback-core";import{i18n as Jt}from"@mux/playback-core";import{StreamTypes as xe,parseJwt as pt}from"@mux/playback-core";function ct(t){let a="";return Object.entries(t).forEach(([e,i])=>{i!=null&&(a+=`${me(e)}: ${i}; `)}),a?a.trim():void 0}function me(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ce(t){return t.replace(/[-_]([a-z])/g,(a,e)=>e.toUpperCase())}function A(t){if(t==null)return;let a=+t;return Number.isNaN(a)?void 0:a}function _e(t){let a=zt(t).toString();return a?"?"+a:""}function zt(t){let a={};for(let e in t)t[e]!=null&&(a[e]=t[e]);return new URLSearchParams(a)}var Re=(t,a)=>!t||!a?!1:t.contains(a)?!0:Re(t,a.getRootNode().host);var bt="mux.com",Xt=()=>{try{return"3.11.8"}catch{}return"UNKNOWN"},qt=Xt(),be=()=>qt,ht=(t,{token:a,customDomain:e=bt,thumbnailTime:i,programTime:r}={})=>{var u;let n=a==null?i:void 0,{aud:d}=(u=pt(a))!=null?u:{};if(!(a&&d!=="t"))return`https://image.${e}/${t}/thumbnail.webp${_e({token:a,time:n,program_time:r})}`},gt=(t,{token:a,customDomain:e=bt,programStartTime:i,programEndTime:r}={})=>{var d;let{aud:n}=(d=pt(a))!=null?d:{};if(!(a&&n!=="s"))return`https://image.${e}/${t}/storyboard.vtt${_e({token:a,format:"webp",program_start_time:i,program_end_time:r})}`},ee=t=>{if(t){if([xe.LIVE,xe.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return xe.LIVE}};var Qt={crossorigin:"crossOrigin",playsinline:"playsInline"};function ft(t){var a;return(a=Qt[t])!=null?a:ce(t)}var D,U,C,pe=class{constructor(a,e){h(this,D);h(this,U);h(this,C,[]);f(this,D,a),f(this,U,e)}[Symbol.iterator](){return l(this,C).values()}get length(){return l(this,C).length}get value(){var a;return(a=l(this,C).join(" "))!=null?a:""}set value(a){var e;a!==this.value&&(f(this,C,[]),this.add(...(e=a==null?void 0:a.split(" "))!=null?e:[]))}toString(){return this.value}item(a){return l(this,C)[a]}values(){return l(this,C).values()}keys(){return l(this,C).keys()}forEach(a){l(this,C).forEach(a)}add(...a){var e,i;a.forEach(r=>{this.contains(r)||l(this,C).push(r)}),!(this.value===""&&!((e=l(this,D))!=null&&e.hasAttribute(`${l(this,U)}`)))&&((i=l(this,D))==null||i.setAttribute(`${l(this,U)}`,`${this.value}`))}remove(...a){var e;a.forEach(i=>{l(this,C).splice(l(this,C).indexOf(i),1)}),(e=l(this,D))==null||e.setAttribute(`${l(this,U)}`,`${this.value}`)}contains(a){return l(this,C).includes(a)}toggle(a,e){return typeof e!="undefined"?e?(this.add(a),!0):(this.remove(a),!1):this.contains(a)?(this.remove(a),!1):(this.add(a),!0)}replace(a,e){this.remove(a),this.add(e)}};D=new WeakMap,U=new WeakMap,C=new WeakMap;var yt=`[mux-player ${be()}]`;function O(...t){console.warn(yt,...t)}function k(...t){console.error(yt,...t)}function Oe(t){var e;let a=(e=t.message)!=null?e:"";t.context&&(a+=` ${t.context}`),t.file&&(a+=` ${Jt("Read more: ")}
2
2
  https://github.com/muxinc/elements/blob/main/errors/${t.file}`),O(a)}var y={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},I={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},Xa={...y,...I},Tt=Object.freeze({length:0,start(t){let a=t>>>0;if(a>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${a}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(t){let a=t>>>0;if(a>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${a}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),ea=Object.values(y).filter(t=>y.PLAYSINLINE!==t),ta=Object.values(I),aa=[...ea,...ta],Le=class extends _.HTMLElement{static get observedAttributes(){return aa}constructor(){super()}attributeChangedCallback(a,e,i){var r,n;switch(a){case I.MUTED:{this.media&&(this.media.muted=i!=null,this.media.defaultMuted=i!=null);return}case I.VOLUME:{let d=(r=A(i))!=null?r:1;this.media&&(this.media.volume=d);return}case I.PLAYBACKRATE:{let d=(n=A(i))!=null?n:1;this.media&&(this.media.playbackRate=d,this.media.defaultPlaybackRate=d);return}}}play(){var a,e;return(e=(a=this.media)==null?void 0:a.play())!=null?e:Promise.reject()}pause(){var a;(a=this.media)==null||a.pause()}load(){var a;(a=this.media)==null||a.load()}get media(){var a;return(a=this.shadowRoot)==null?void 0:a.querySelector("mux-video")}get audioTracks(){return this.media.audioTracks}get videoTracks(){return this.media.videoTracks}get audioRenditions(){return this.media.audioRenditions}get videoRenditions(){return this.media.videoRenditions}get paused(){var a,e;return(e=(a=this.media)==null?void 0:a.paused)!=null?e:!0}get duration(){var a,e;return(e=(a=this.media)==null?void 0:a.duration)!=null?e:NaN}get ended(){var a,e;return(e=(a=this.media)==null?void 0:a.ended)!=null?e:!1}get buffered(){var a,e;return(e=(a=this.media)==null?void 0:a.buffered)!=null?e:Tt}get seekable(){var a,e;return(e=(a=this.media)==null?void 0:a.seekable)!=null?e:Tt}get readyState(){var a,e;return(e=(a=this.media)==null?void 0:a.readyState)!=null?e:0}get videoWidth(){var a,e;return(e=(a=this.media)==null?void 0:a.videoWidth)!=null?e:0}get videoHeight(){var a,e;return(e=(a=this.media)==null?void 0:a.videoHeight)!=null?e:0}get currentSrc(){var a,e;return(e=(a=this.media)==null?void 0:a.currentSrc)!=null?e:""}get currentTime(){var a,e;return(e=(a=this.media)==null?void 0:a.currentTime)!=null?e:0}set currentTime(a){this.media&&(this.media.currentTime=Number(a))}get volume(){var a,e;return(e=(a=this.media)==null?void 0:a.volume)!=null?e:1}set volume(a){this.media&&(this.media.volume=Number(a))}get playbackRate(){var a,e;return(e=(a=this.media)==null?void 0:a.playbackRate)!=null?e:1}set playbackRate(a){this.media&&(this.media.playbackRate=Number(a))}get defaultPlaybackRate(){var a;return(a=A(this.getAttribute(I.PLAYBACKRATE)))!=null?a:1}set defaultPlaybackRate(a){a!=null?this.setAttribute(I.PLAYBACKRATE,`${a}`):this.removeAttribute(I.PLAYBACKRATE)}get crossOrigin(){return te(this,y.CROSSORIGIN)}set crossOrigin(a){this.setAttribute(y.CROSSORIGIN,`${a}`)}get autoplay(){return te(this,y.AUTOPLAY)!=null}set autoplay(a){a?this.setAttribute(y.AUTOPLAY,typeof a=="string"?a:""):this.removeAttribute(y.AUTOPLAY)}get loop(){return te(this,y.LOOP)!=null}set loop(a){a?this.setAttribute(y.LOOP,""):this.removeAttribute(y.LOOP)}get muted(){var a,e;return(e=(a=this.media)==null?void 0:a.muted)!=null?e:!1}set muted(a){this.media&&(this.media.muted=!!a)}get defaultMuted(){return te(this,y.MUTED)!=null}set defaultMuted(a){a?this.setAttribute(y.MUTED,""):this.removeAttribute(y.MUTED)}get playsInline(){return te(this,y.PLAYSINLINE)!=null}set playsInline(a){k("playsInline is set to true by default and is not currently supported as a setter.")}get preload(){return this.media?this.media.preload:this.getAttribute("preload")}set preload(a){["","none","metadata","auto"].includes(a)?this.setAttribute(y.PRELOAD,a):this.removeAttribute(y.PRELOAD)}};function te(t,a){return t.media?t.media.getAttribute(a):t.getAttribute(a)}var Me=Le;import"media-chrome/dist/media-theme-element.js";var Et=`:host {
3
3
  --media-control-display: var(--controls);
4
4
  --media-loading-indicator-display: var(--loading-indicator);
@@ -106,7 +106,7 @@ Schedule: ${l.map(p=>Ci(p))} pos: ${this.timelinePos}`),u.length&&this.log(`Remo
106
106
  <video${o_(i)}></video>
107
107
  </slot>
108
108
  <slot></slot>
109
- `}function a_(i,{tag:e,is:t}){var n,a,o,l,d,i_,c,h,f,m,p,g,en,Fg,Bg,s_,$g,r_,n_;let s=(a=(n=globalThis.document)==null?void 0:n.createElement)==null?void 0:a.call(n,e,{is:t}),r=s?Nw(s):[];return o=class extends i{constructor(){super(...arguments);oe(this,g);oe(this,c,!1);oe(this,h,null);oe(this,f,new Map);oe(this,m);oe(this,p);Se(this,"get");Se(this,"set");Se(this,"call")}static get observedAttributes(){var D,P,N;return Ne(D=o,d,i_).call(D),[...(N=(P=s==null?void 0:s.constructor)==null?void 0:P.observedAttributes)!=null?N:[],...t_]}get nativeEl(){var S,D,P,N,$;return Ne(this,g,en).call(this),($=(N=(D=(S=C(this,h))!=null?S:this.querySelector(":scope > [slot=media]"))!=null?D:this.querySelector(e))!=null?N:(P=this.shadowRoot)==null?void 0:P.querySelector(e))!=null?$:null}set nativeEl(S){ee(this,h,S)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(S){this.toggleAttribute("muted",S)}get src(){return this.getAttribute("src")}set src(S){this.setAttribute("src",`${S}`)}get preload(){var S,D;return(D=this.getAttribute("preload"))!=null?D:(S=this.nativeEl)==null?void 0:S.preload}set preload(S){this.setAttribute("preload",`${S}`)}init(){if(!this.shadowRoot){this.attachShadow({mode:"open"});let S=Uw(this.attributes);t&&(S.is=t),e&&(S.part=e),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(S)}this.nativeEl.muted=this.hasAttribute("muted");for(let S of r)Ne(this,g,r_).call(this,S);Ne(this,g,Fg).call(this)}handleEvent(S){S.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(S.type,{detail:S.detail}))}attributeChangedCallback(S,D,P){Ne(this,g,en).call(this),Ne(this,g,n_).call(this,S,D,P)}connectedCallback(){Ne(this,g,en).call(this),C(this,p)||Ne(this,g,Fg).call(this)}disconnectedCallback(){var S,D,P;(S=C(this,m))==null||S.disconnect(),ee(this,m,void 0),C(this,p)&&((D=this.shadowRoot)==null||D.removeEventListener("slotchange",C(this,p)),ee(this,p,void 0));for(let N of this.constructor.Events)(P=this.shadowRoot)==null||P.removeEventListener(N,this,!0);C(this,f).forEach(N=>N.remove()),C(this,f).clear(),ee(this,h,null)}},l=new WeakMap,d=new WeakSet,i_=function(){if(C(this,l))return;ee(this,l,!0);let S=new Set(this.observedAttributes);S.delete("muted");for(let D of r)if(!(D in this.prototype))if(typeof s[D]=="function")this.prototype[D]=function(...P){return Ne(this,g,en).call(this),(()=>{var H;if(this.call)return this.call(D,...P);let $=(H=this.nativeEl)==null?void 0:H[D];return $==null?void 0:$.apply(this.nativeEl,P)})()};else{let P={get(){var $,H,U;Ne(this,g,en).call(this);let N=D.toLowerCase();if(S.has(N)){let j=this.getAttribute(N);return j===null?!1:j===""?!0:j}return(U=($=this.get)==null?void 0:$.call(this,D))!=null?U:(H=this.nativeEl)==null?void 0:H[D]}};D!==D.toUpperCase()&&(P.set=function(N){Ne(this,g,en).call(this);let $=D.toLowerCase();if(S.has($)){N===!0||N===!1||N==null?this.toggleAttribute($,!!N):this.setAttribute($,N);return}if(this.set){this.set(D,N);return}this.nativeEl&&(this.nativeEl[D]=N)}),Object.defineProperty(this.prototype,D,P)}},c=new WeakMap,h=new WeakMap,f=new WeakMap,m=new WeakMap,p=new WeakMap,g=new WeakSet,en=function(){C(this,c)||(ee(this,c,!0),this.init())},Fg=function(){var S,D;ee(this,m,new MutationObserver(Ne(this,g,s_).bind(this))),ee(this,p,()=>Ne(this,g,Bg).call(this)),(S=this.shadowRoot)==null||S.addEventListener("slotchange",C(this,p)),Ne(this,g,Bg).call(this);for(let P of this.constructor.Events)(D=this.shadowRoot)==null||D.addEventListener(P,this,!0)},Bg=function(){var N;let S=new Map(C(this,f)),D=(N=this.shadowRoot)==null?void 0:N.querySelector("slot:not([name])");(D==null?void 0:D.assignedElements({flatten:!0}).filter($=>["track","source"].includes($.localName))).forEach($=>{var U,j;S.delete($);let H=C(this,f).get($);H||(H=$.cloneNode(),C(this,f).set($,H),(U=C(this,m))==null||U.observe($,{attributes:!0})),(j=this.nativeEl)==null||j.append(H),Ne(this,g,$g).call(this,H)}),S.forEach(($,H)=>{$.remove(),C(this,f).delete(H)})},s_=function(S){var D;for(let P of S)if(P.type==="attributes"){let{target:N,attributeName:$}=P,H=C(this,f).get(N);H&&$&&(H.setAttribute($,(D=N.getAttribute($))!=null?D:""),Ne(this,g,$g).call(this,H))}},$g=function(S){S&&S.localName==="track"&&S.default&&(S.kind==="chapters"||S.kind==="metadata")&&S.track.mode==="disabled"&&(S.track.mode="hidden")},r_=function(S){if(Object.prototype.hasOwnProperty.call(this,S)){let D=this[S];delete this[S],this[S]=D}},n_=function(S,D,P){var N,$,H;["id","class"].includes(S)||!o.observedAttributes.includes(S)&&this.constructor.observedAttributes.includes(S)||(P===null?(N=this.nativeEl)==null||N.removeAttribute(S):(($=this.nativeEl)==null?void 0:$.getAttribute(S))!==P&&((H=this.nativeEl)==null||H.setAttribute(S,P)))},oe(o,d),Se(o,"getTemplateHTML",e.endsWith("audio")?Pw:Ow),Se(o,"shadowRootOptions",{mode:"open"}),Se(o,"Events",e_),oe(o,l,!1),o}function Nw(i){let e=[];for(let t=Object.getPrototypeOf(i);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t)){let s=Object.getOwnPropertyNames(t);e.push(...s)}return e}function o_(i){let e="";for(let t in i){if(!t_.includes(t))continue;let s=i[t];s===""?e+=` ${t}`:e+=` ${t}="${s}"`}return e}function Uw(i){let e={};for(let t of i)e[t.name]=t.value;return e}var ZT,sl=a_((ZT=globalThis.HTMLElement)!=null?ZT:class{},{tag:"video"}),JT,xN=a_((JT=globalThis.HTMLElement)!=null?JT:class{},{tag:"audio"});var u_=i=>{throw TypeError(i)},Hg=(i,e,t)=>e.has(i)||u_("Cannot "+t),mt=(i,e,t)=>(Hg(i,e,"read from private field"),t?t.call(i):e.get(i)),vi=(i,e,t)=>e.has(i)?u_("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Pi=(i,e,t,s)=>(Hg(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t),zu=(i,e,t)=>(Hg(i,e,"access private method"),t),Fw=()=>{try{return"0.30.5"}catch{}return"UNKNOWN"},Bw=Fw(),$w=()=>Bw,Hw=`
109
+ `}function a_(i,{tag:e,is:t}){var n,a,o,l,d,i_,c,h,f,m,p,g,en,Fg,Bg,s_,$g,r_,n_;let s=(a=(n=globalThis.document)==null?void 0:n.createElement)==null?void 0:a.call(n,e,{is:t}),r=s?Nw(s):[];return o=class extends i{constructor(){super(...arguments);oe(this,g);oe(this,c,!1);oe(this,h,null);oe(this,f,new Map);oe(this,m);oe(this,p);Se(this,"get");Se(this,"set");Se(this,"call")}static get observedAttributes(){var D,P,N;return Ne(D=o,d,i_).call(D),[...(N=(P=s==null?void 0:s.constructor)==null?void 0:P.observedAttributes)!=null?N:[],...t_]}get nativeEl(){var S,D,P,N,$;return Ne(this,g,en).call(this),($=(N=(D=(S=C(this,h))!=null?S:this.querySelector(":scope > [slot=media]"))!=null?D:this.querySelector(e))!=null?N:(P=this.shadowRoot)==null?void 0:P.querySelector(e))!=null?$:null}set nativeEl(S){ee(this,h,S)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(S){this.toggleAttribute("muted",S)}get src(){return this.getAttribute("src")}set src(S){this.setAttribute("src",`${S}`)}get preload(){var S,D;return(D=this.getAttribute("preload"))!=null?D:(S=this.nativeEl)==null?void 0:S.preload}set preload(S){this.setAttribute("preload",`${S}`)}init(){if(!this.shadowRoot){this.attachShadow({mode:"open"});let S=Uw(this.attributes);t&&(S.is=t),e&&(S.part=e),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(S)}this.nativeEl.muted=this.hasAttribute("muted");for(let S of r)Ne(this,g,r_).call(this,S);Ne(this,g,Fg).call(this)}handleEvent(S){S.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(S.type,{detail:S.detail}))}attributeChangedCallback(S,D,P){Ne(this,g,en).call(this),Ne(this,g,n_).call(this,S,D,P)}connectedCallback(){Ne(this,g,en).call(this),C(this,p)||Ne(this,g,Fg).call(this)}disconnectedCallback(){var S,D,P;(S=C(this,m))==null||S.disconnect(),ee(this,m,void 0),C(this,p)&&((D=this.shadowRoot)==null||D.removeEventListener("slotchange",C(this,p)),ee(this,p,void 0));for(let N of this.constructor.Events)(P=this.shadowRoot)==null||P.removeEventListener(N,this,!0);C(this,f).forEach(N=>N.remove()),C(this,f).clear(),ee(this,h,null)}},l=new WeakMap,d=new WeakSet,i_=function(){if(C(this,l))return;ee(this,l,!0);let S=new Set(this.observedAttributes);S.delete("muted");for(let D of r)if(!(D in this.prototype))if(typeof s[D]=="function")this.prototype[D]=function(...P){return Ne(this,g,en).call(this),(()=>{var H;if(this.call)return this.call(D,...P);let $=(H=this.nativeEl)==null?void 0:H[D];return $==null?void 0:$.apply(this.nativeEl,P)})()};else{let P={get(){var $,H,U;Ne(this,g,en).call(this);let N=D.toLowerCase();if(S.has(N)){let j=this.getAttribute(N);return j===null?!1:j===""?!0:j}return(U=($=this.get)==null?void 0:$.call(this,D))!=null?U:(H=this.nativeEl)==null?void 0:H[D]}};D!==D.toUpperCase()&&(P.set=function(N){Ne(this,g,en).call(this);let $=D.toLowerCase();if(S.has($)){N===!0||N===!1||N==null?this.toggleAttribute($,!!N):this.setAttribute($,N);return}if(this.set){this.set(D,N);return}this.nativeEl&&(this.nativeEl[D]=N)}),Object.defineProperty(this.prototype,D,P)}},c=new WeakMap,h=new WeakMap,f=new WeakMap,m=new WeakMap,p=new WeakMap,g=new WeakSet,en=function(){C(this,c)||(ee(this,c,!0),this.init())},Fg=function(){var S,D;ee(this,m,new MutationObserver(Ne(this,g,s_).bind(this))),ee(this,p,()=>Ne(this,g,Bg).call(this)),(S=this.shadowRoot)==null||S.addEventListener("slotchange",C(this,p)),Ne(this,g,Bg).call(this);for(let P of this.constructor.Events)(D=this.shadowRoot)==null||D.addEventListener(P,this,!0)},Bg=function(){var N;let S=new Map(C(this,f)),D=(N=this.shadowRoot)==null?void 0:N.querySelector("slot:not([name])");(D==null?void 0:D.assignedElements({flatten:!0}).filter($=>["track","source"].includes($.localName))).forEach($=>{var U,j;S.delete($);let H=C(this,f).get($);H||(H=$.cloneNode(),C(this,f).set($,H),(U=C(this,m))==null||U.observe($,{attributes:!0})),(j=this.nativeEl)==null||j.append(H),Ne(this,g,$g).call(this,H)}),S.forEach(($,H)=>{$.remove(),C(this,f).delete(H)})},s_=function(S){var D;for(let P of S)if(P.type==="attributes"){let{target:N,attributeName:$}=P,H=C(this,f).get(N);H&&$&&(H.setAttribute($,(D=N.getAttribute($))!=null?D:""),Ne(this,g,$g).call(this,H))}},$g=function(S){S&&S.localName==="track"&&S.default&&(S.kind==="chapters"||S.kind==="metadata")&&S.track.mode==="disabled"&&(S.track.mode="hidden")},r_=function(S){if(Object.prototype.hasOwnProperty.call(this,S)){let D=this[S];delete this[S],this[S]=D}},n_=function(S,D,P){var N,$,H;["id","class"].includes(S)||!o.observedAttributes.includes(S)&&this.constructor.observedAttributes.includes(S)||(P===null?(N=this.nativeEl)==null||N.removeAttribute(S):(($=this.nativeEl)==null?void 0:$.getAttribute(S))!==P&&((H=this.nativeEl)==null||H.setAttribute(S,P)))},oe(o,d),Se(o,"getTemplateHTML",e.endsWith("audio")?Pw:Ow),Se(o,"shadowRootOptions",{mode:"open"}),Se(o,"Events",e_),oe(o,l,!1),o}function Nw(i){let e=[];for(let t=Object.getPrototypeOf(i);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t)){let s=Object.getOwnPropertyNames(t);e.push(...s)}return e}function o_(i){let e="";for(let t in i){if(!t_.includes(t))continue;let s=i[t];s===""?e+=` ${t}`:e+=` ${t}="${s}"`}return e}function Uw(i){let e={};for(let t of i)e[t.name]=t.value;return e}var ZT,sl=a_((ZT=globalThis.HTMLElement)!=null?ZT:class{},{tag:"video"}),JT,xN=a_((JT=globalThis.HTMLElement)!=null?JT:class{},{tag:"audio"});var u_=i=>{throw TypeError(i)},Hg=(i,e,t)=>e.has(i)||u_("Cannot "+t),mt=(i,e,t)=>(Hg(i,e,"read from private field"),t?t.call(i):e.get(i)),vi=(i,e,t)=>e.has(i)?u_("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Pi=(i,e,t,s)=>(Hg(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t),zu=(i,e,t)=>(Hg(i,e,"access private method"),t),Fw=()=>{try{return"0.30.6"}catch{}return"UNKNOWN"},Bw=Fw(),$w=()=>Bw,Hw=`
110
110
  <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" part="logo" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 1600 500"><g fill="#fff"><path d="M994.287 93.486c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m0-93.486c-34.509 0-62.484 27.976-62.484 62.486v187.511c0 68.943-56.09 125.033-125.032 125.033s-125.03-56.09-125.03-125.033V62.486C681.741 27.976 653.765 0 619.256 0s-62.484 27.976-62.484 62.486v187.511C556.772 387.85 668.921 500 806.771 500c137.851 0 250.001-112.15 250.001-250.003V62.486c0-34.51-27.976-62.486-62.485-62.486M1537.51 468.511c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m-275.883-218.509-143.33 143.329c-24.402 24.402-24.402 63.966 0 88.368 24.402 24.402 63.967 24.402 88.369 0l143.33-143.329 143.328 143.329c24.402 24.4 63.967 24.402 88.369 0 24.403-24.402 24.403-63.966.001-88.368l-143.33-143.329.001-.004 143.329-143.329c24.402-24.402 24.402-63.965 0-88.367s-63.967-24.402-88.369 0L1349.996 161.63 1206.667 18.302c-24.402-24.401-63.967-24.402-88.369 0s-24.402 63.965 0 88.367l143.329 143.329v.004ZM437.511 468.521c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31M461.426 4.759C438.078-4.913 411.2.432 393.33 18.303L249.999 161.632 106.669 18.303C88.798.432 61.922-4.913 38.573 4.759 15.224 14.43-.001 37.214-.001 62.488v375.026c0 34.51 27.977 62.486 62.487 62.486 34.51 0 62.486-27.976 62.486-62.486V213.341l80.843 80.844c24.404 24.402 63.965 24.402 88.369 0l80.843-80.844v224.173c0 34.51 27.976 62.486 62.486 62.486s62.486-27.976 62.486-62.486V62.488c0-25.274-15.224-48.058-38.573-57.729" style="fill-rule:nonzero"/></g></svg>`,w={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",MAX_AUTO_RESOLUTION:"max-auto-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type",LOGO:"logo",CAP_RENDITION_TO_PLAYER_SIZE:"cap-rendition-to-player-size"},Gw=Object.values(w),l_=$w(),d_="mux-video",rl,Qu,nl,Xu,Zu,Ju,ec,tc,al,ic,Ei,tn,sc,ol,c_=class extends sl{constructor(){super(),vi(this,Ei),vi(this,rl),vi(this,Qu),vi(this,nl,{}),vi(this,Xu,{}),vi(this,Zu),vi(this,Ju),vi(this,ec),vi(this,tc),vi(this,al,""),vi(this,ic,i=>{var e;let t=HT(this.nativeEl),s=(e=this.metadata)!=null?e:{};this.metadata={...t,...s},(t==null?void 0:t["com.mux.video.branding"])==="mux-free-plan"&&(Pi(this,al,"default"),this.updateLogo())}),vi(this,sc),Pi(this,Qu,Wu())}static get NAME(){return d_}static get VERSION(){return l_}static get observedAttributes(){var i;return[...Gw,...(i=sl.observedAttributes)!=null?i:[]]}static getLogoHTML(i){return!i||i==="false"?"":i==="default"?Hw:`<img part="logo" src="${i}" />`}static getTemplateHTML(i={}){var e;return`
111
111
  ${sl.getTemplateHTML(i)}
112
112
  <style>
@@ -2020,7 +2020,7 @@ Schedule: ${l.map(p=>Ci(p))} pos: ${this.timelinePos}`),u.length&&this.log(`Remo
2020
2020
  min-height: var(--media-control-height, 24px);
2021
2021
  }
2022
2022
  </style>
2023
- `}var Eo=class extends ui{};Eo.shadowRootOptions={mode:"open"};Eo.getTemplateHTML=p2;L.customElements.get("media-context-menu-item")||L.customElements.define("media-context-menu-item",Eo);var O1=i=>{throw TypeError(i)},iE=(i,e,t)=>e.has(i)||O1("Cannot "+t),ve=(i,e,t)=>(iE(i,e,"read from private field"),t?t.call(i):e.get(i)),Ot=(i,e,t)=>e.has(i)?O1("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ti=(i,e,t,s)=>(iE(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t),dt=(i,e,t)=>(iE(i,e,"access private method"),t),Vf=class{addEventListener(){}removeEventListener(){}dispatchEvent(i){return!0}};if(typeof DocumentFragment=="undefined"){class i extends Vf{}globalThis.DocumentFragment=i}var sE=class extends Vf{},g2=class extends Vf{},v2={get(i){},define(i,e,t){},getName(i){return null},upgrade(i){},whenDefined(i){return Promise.resolve(sE)}},Of,E2=class{constructor(i,e={}){Ot(this,Of),ti(this,Of,e==null?void 0:e.detail)}get detail(){return ve(this,Of)}initCustomEvent(){}};Of=new WeakMap;function y2(i,e){return new sE}var N1={document:{createElement:y2},DocumentFragment,customElements:v2,CustomEvent:E2,EventTarget:Vf,HTMLElement:sE,HTMLVideoElement:g2},U1=typeof window=="undefined"||typeof globalThis.customElements=="undefined",_s=U1?N1:globalThis,$f=U1?N1.document:globalThis.document;function b2(i){let e="";return Object.entries(i).forEach(([t,s])=>{s!=null&&(e+=`${Zv(t)}: ${s}; `)}),e?e.trim():void 0}function Zv(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function F1(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function ci(i){if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}function B1(i){let e=T2(i).toString();return e?"?"+e:""}function T2(i){let e={};for(let t in i)i[t]!=null&&(e[t]=i[t]);return new URLSearchParams(e)}var $1=(i,e)=>!i||!e?!1:i.contains(e)?!0:$1(i,e.getRootNode().host),H1="mux.com",_2=()=>{try{return"3.11.7"}catch{}return"UNKNOWN"},A2=_2(),G1=()=>A2,S2=(i,{token:e,customDomain:t=H1,thumbnailTime:s,programTime:r}={})=>{var n;let a=e==null?s:void 0,{aud:o}=(n=ar(e))!=null?n:{};if(!(e&&o!=="t"))return`https://image.${t}/${i}/thumbnail.webp${B1({token:e,time:a,program_time:r})}`},I2=(i,{token:e,customDomain:t=H1,programStartTime:s,programEndTime:r}={})=>{var n;let{aud:a}=(n=ar(e))!=null?n:{};if(!(e&&a!=="s"))return`https://image.${t}/${i}/storyboard.vtt${B1({token:e,format:"webp",program_start_time:s,program_end_time:r})}`},rE=i=>{if(i){if([we.LIVE,we.ON_DEMAND].includes(i))return i;if(i!=null&&i.includes("live"))return we.LIVE}},L2={crossorigin:"crossOrigin",playsinline:"playsInline"};function x2(i){var e;return(e=L2[i])!=null?e:F1(i)}var yo,bo,ei,R2=class{constructor(i,e){Ot(this,yo),Ot(this,bo),Ot(this,ei,[]),ti(this,yo,i),ti(this,bo,e)}[Symbol.iterator](){return ve(this,ei).values()}get length(){return ve(this,ei).length}get value(){var i;return(i=ve(this,ei).join(" "))!=null?i:""}set value(i){var e;i!==this.value&&(ti(this,ei,[]),this.add(...(e=i==null?void 0:i.split(" "))!=null?e:[]))}toString(){return this.value}item(i){return ve(this,ei)[i]}values(){return ve(this,ei).values()}keys(){return ve(this,ei).keys()}forEach(i){ve(this,ei).forEach(i)}add(...i){var e,t;i.forEach(s=>{this.contains(s)||ve(this,ei).push(s)}),!(this.value===""&&!((e=ve(this,yo))!=null&&e.hasAttribute(`${ve(this,bo)}`)))&&((t=ve(this,yo))==null||t.setAttribute(`${ve(this,bo)}`,`${this.value}`))}remove(...i){var e;i.forEach(t=>{ve(this,ei).splice(ve(this,ei).indexOf(t),1)}),(e=ve(this,yo))==null||e.setAttribute(`${ve(this,bo)}`,`${this.value}`)}contains(i){return ve(this,ei).includes(i)}toggle(i,e){return typeof e!="undefined"?e?(this.add(i),!0):(this.remove(i),!1):this.contains(i)?(this.remove(i),!1):(this.add(i),!0)}replace(i,e){this.remove(i),this.add(e)}};yo=new WeakMap,bo=new WeakMap,ei=new WeakMap;var K1=`[mux-player ${G1()}]`;function Ys(...i){console.warn(K1,...i)}function hi(...i){console.error(K1,...i)}function b1(i){var e;let t=(e=i.message)!=null?e:"";i.context&&(t+=` ${i.context}`),i.file&&(t+=` ${te("Read more: ")}
2023
+ `}var Eo=class extends ui{};Eo.shadowRootOptions={mode:"open"};Eo.getTemplateHTML=p2;L.customElements.get("media-context-menu-item")||L.customElements.define("media-context-menu-item",Eo);var O1=i=>{throw TypeError(i)},iE=(i,e,t)=>e.has(i)||O1("Cannot "+t),ve=(i,e,t)=>(iE(i,e,"read from private field"),t?t.call(i):e.get(i)),Ot=(i,e,t)=>e.has(i)?O1("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ti=(i,e,t,s)=>(iE(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t),dt=(i,e,t)=>(iE(i,e,"access private method"),t),Vf=class{addEventListener(){}removeEventListener(){}dispatchEvent(i){return!0}};if(typeof DocumentFragment=="undefined"){class i extends Vf{}globalThis.DocumentFragment=i}var sE=class extends Vf{},g2=class extends Vf{},v2={get(i){},define(i,e,t){},getName(i){return null},upgrade(i){},whenDefined(i){return Promise.resolve(sE)}},Of,E2=class{constructor(i,e={}){Ot(this,Of),ti(this,Of,e==null?void 0:e.detail)}get detail(){return ve(this,Of)}initCustomEvent(){}};Of=new WeakMap;function y2(i,e){return new sE}var N1={document:{createElement:y2},DocumentFragment,customElements:v2,CustomEvent:E2,EventTarget:Vf,HTMLElement:sE,HTMLVideoElement:g2},U1=typeof window=="undefined"||typeof globalThis.customElements=="undefined",_s=U1?N1:globalThis,$f=U1?N1.document:globalThis.document;function b2(i){let e="";return Object.entries(i).forEach(([t,s])=>{s!=null&&(e+=`${Zv(t)}: ${s}; `)}),e?e.trim():void 0}function Zv(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function F1(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function ci(i){if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}function B1(i){let e=T2(i).toString();return e?"?"+e:""}function T2(i){let e={};for(let t in i)i[t]!=null&&(e[t]=i[t]);return new URLSearchParams(e)}var $1=(i,e)=>!i||!e?!1:i.contains(e)?!0:$1(i,e.getRootNode().host),H1="mux.com",_2=()=>{try{return"3.11.8"}catch{}return"UNKNOWN"},A2=_2(),G1=()=>A2,S2=(i,{token:e,customDomain:t=H1,thumbnailTime:s,programTime:r}={})=>{var n;let a=e==null?s:void 0,{aud:o}=(n=ar(e))!=null?n:{};if(!(e&&o!=="t"))return`https://image.${t}/${i}/thumbnail.webp${B1({token:e,time:a,program_time:r})}`},I2=(i,{token:e,customDomain:t=H1,programStartTime:s,programEndTime:r}={})=>{var n;let{aud:a}=(n=ar(e))!=null?n:{};if(!(e&&a!=="s"))return`https://image.${t}/${i}/storyboard.vtt${B1({token:e,format:"webp",program_start_time:s,program_end_time:r})}`},rE=i=>{if(i){if([we.LIVE,we.ON_DEMAND].includes(i))return i;if(i!=null&&i.includes("live"))return we.LIVE}},L2={crossorigin:"crossOrigin",playsinline:"playsInline"};function x2(i){var e;return(e=L2[i])!=null?e:F1(i)}var yo,bo,ei,R2=class{constructor(i,e){Ot(this,yo),Ot(this,bo),Ot(this,ei,[]),ti(this,yo,i),ti(this,bo,e)}[Symbol.iterator](){return ve(this,ei).values()}get length(){return ve(this,ei).length}get value(){var i;return(i=ve(this,ei).join(" "))!=null?i:""}set value(i){var e;i!==this.value&&(ti(this,ei,[]),this.add(...(e=i==null?void 0:i.split(" "))!=null?e:[]))}toString(){return this.value}item(i){return ve(this,ei)[i]}values(){return ve(this,ei).values()}keys(){return ve(this,ei).keys()}forEach(i){ve(this,ei).forEach(i)}add(...i){var e,t;i.forEach(s=>{this.contains(s)||ve(this,ei).push(s)}),!(this.value===""&&!((e=ve(this,yo))!=null&&e.hasAttribute(`${ve(this,bo)}`)))&&((t=ve(this,yo))==null||t.setAttribute(`${ve(this,bo)}`,`${this.value}`))}remove(...i){var e;i.forEach(t=>{ve(this,ei).splice(ve(this,ei).indexOf(t),1)}),(e=ve(this,yo))==null||e.setAttribute(`${ve(this,bo)}`,`${this.value}`)}contains(i){return ve(this,ei).includes(i)}toggle(i,e){return typeof e!="undefined"?e?(this.add(i),!0):(this.remove(i),!1):this.contains(i)?(this.remove(i),!1):(this.add(i),!0)}replace(i,e){this.remove(i),this.add(e)}};yo=new WeakMap,bo=new WeakMap,ei=new WeakMap;var K1=`[mux-player ${G1()}]`;function Ys(...i){console.warn(K1,...i)}function hi(...i){console.error(K1,...i)}function b1(i){var e;let t=(e=i.message)!=null?e:"";i.context&&(t+=` ${i.context}`),i.file&&(t+=` ${te("Read more: ")}
2024
2024
  https://github.com/muxinc/elements/blob/main/errors/${i.file}`),Ys(t)}var Pt={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},Br={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},Q6={...Pt,...Br},T1=Object.freeze({length:0,start(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),k2=Object.values(Pt).filter(i=>Pt.PLAYSINLINE!==i),D2=Object.values(Br),C2=[...k2,...D2],w2=class extends _s.HTMLElement{static get observedAttributes(){return C2}constructor(){super()}attributeChangedCallback(i,e,t){var s,r;switch(i){case Br.MUTED:{this.media&&(this.media.muted=t!=null,this.media.defaultMuted=t!=null);return}case Br.VOLUME:{let n=(s=ci(t))!=null?s:1;this.media&&(this.media.volume=n);return}case Br.PLAYBACKRATE:{let n=(r=ci(t))!=null?r:1;this.media&&(this.media.playbackRate=n,this.media.defaultPlaybackRate=n);return}}}play(){var i,e;return(e=(i=this.media)==null?void 0:i.play())!=null?e:Promise.reject()}pause(){var i;(i=this.media)==null||i.pause()}load(){var i;(i=this.media)==null||i.load()}get media(){var i;return(i=this.shadowRoot)==null?void 0:i.querySelector("mux-video")}get audioTracks(){return this.media.audioTracks}get videoTracks(){return this.media.videoTracks}get audioRenditions(){return this.media.audioRenditions}get videoRenditions(){return this.media.videoRenditions}get paused(){var i,e;return(e=(i=this.media)==null?void 0:i.paused)!=null?e:!0}get duration(){var i,e;return(e=(i=this.media)==null?void 0:i.duration)!=null?e:NaN}get ended(){var i,e;return(e=(i=this.media)==null?void 0:i.ended)!=null?e:!1}get buffered(){var i,e;return(e=(i=this.media)==null?void 0:i.buffered)!=null?e:T1}get seekable(){var i,e;return(e=(i=this.media)==null?void 0:i.seekable)!=null?e:T1}get readyState(){var i,e;return(e=(i=this.media)==null?void 0:i.readyState)!=null?e:0}get videoWidth(){var i,e;return(e=(i=this.media)==null?void 0:i.videoWidth)!=null?e:0}get videoHeight(){var i,e;return(e=(i=this.media)==null?void 0:i.videoHeight)!=null?e:0}get currentSrc(){var i,e;return(e=(i=this.media)==null?void 0:i.currentSrc)!=null?e:""}get currentTime(){var i,e;return(e=(i=this.media)==null?void 0:i.currentTime)!=null?e:0}set currentTime(i){this.media&&(this.media.currentTime=Number(i))}get volume(){var i,e;return(e=(i=this.media)==null?void 0:i.volume)!=null?e:1}set volume(i){this.media&&(this.media.volume=Number(i))}get playbackRate(){var i,e;return(e=(i=this.media)==null?void 0:i.playbackRate)!=null?e:1}set playbackRate(i){this.media&&(this.media.playbackRate=Number(i))}get defaultPlaybackRate(){var i;return(i=ci(this.getAttribute(Br.PLAYBACKRATE)))!=null?i:1}set defaultPlaybackRate(i){i!=null?this.setAttribute(Br.PLAYBACKRATE,`${i}`):this.removeAttribute(Br.PLAYBACKRATE)}get crossOrigin(){return _d(this,Pt.CROSSORIGIN)}set crossOrigin(i){this.setAttribute(Pt.CROSSORIGIN,`${i}`)}get autoplay(){return _d(this,Pt.AUTOPLAY)!=null}set autoplay(i){i?this.setAttribute(Pt.AUTOPLAY,typeof i=="string"?i:""):this.removeAttribute(Pt.AUTOPLAY)}get loop(){return _d(this,Pt.LOOP)!=null}set loop(i){i?this.setAttribute(Pt.LOOP,""):this.removeAttribute(Pt.LOOP)}get muted(){var i,e;return(e=(i=this.media)==null?void 0:i.muted)!=null?e:!1}set muted(i){this.media&&(this.media.muted=!!i)}get defaultMuted(){return _d(this,Pt.MUTED)!=null}set defaultMuted(i){i?this.setAttribute(Pt.MUTED,""):this.removeAttribute(Pt.MUTED)}get playsInline(){return _d(this,Pt.PLAYSINLINE)!=null}set playsInline(i){hi("playsInline is set to true by default and is not currently supported as a setter.")}get preload(){return this.media?this.media.preload:this.getAttribute("preload")}set preload(i){["","none","metadata","auto"].includes(i)?this.setAttribute(Pt.PRELOAD,i):this.removeAttribute(Pt.PRELOAD)}};function _d(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}var _1=w2,M2=`:host {
2025
2025
  --media-control-display: var(--controls);
2026
2026
  --media-loading-indicator-display: var(--loading-indicator);
@@ -106,7 +106,7 @@ Schedule: ${l.map(p=>Ci(p))} pos: ${this.timelinePos}`),u.length&&this.log(`Remo
106
106
  <video${o_(i)}></video>
107
107
  </slot>
108
108
  <slot></slot>
109
- `}function a_(i,{tag:e,is:t}){var n,a,o,l,d,i_,c,h,f,m,p,g,en,Fg,Bg,s_,$g,r_,n_;let s=(a=(n=globalThis.document)==null?void 0:n.createElement)==null?void 0:a.call(n,e,{is:t}),r=s?Nw(s):[];return o=class extends i{constructor(){super(...arguments);oe(this,g);oe(this,c,!1);oe(this,h,null);oe(this,f,new Map);oe(this,m);oe(this,p);Se(this,"get");Se(this,"set");Se(this,"call")}static get observedAttributes(){var D,P,N;return Ne(D=o,d,i_).call(D),[...(N=(P=s==null?void 0:s.constructor)==null?void 0:P.observedAttributes)!=null?N:[],...t_]}get nativeEl(){var S,D,P,N,$;return Ne(this,g,en).call(this),($=(N=(D=(S=C(this,h))!=null?S:this.querySelector(":scope > [slot=media]"))!=null?D:this.querySelector(e))!=null?N:(P=this.shadowRoot)==null?void 0:P.querySelector(e))!=null?$:null}set nativeEl(S){ee(this,h,S)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(S){this.toggleAttribute("muted",S)}get src(){return this.getAttribute("src")}set src(S){this.setAttribute("src",`${S}`)}get preload(){var S,D;return(D=this.getAttribute("preload"))!=null?D:(S=this.nativeEl)==null?void 0:S.preload}set preload(S){this.setAttribute("preload",`${S}`)}init(){if(!this.shadowRoot){this.attachShadow({mode:"open"});let S=Uw(this.attributes);t&&(S.is=t),e&&(S.part=e),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(S)}this.nativeEl.muted=this.hasAttribute("muted");for(let S of r)Ne(this,g,r_).call(this,S);Ne(this,g,Fg).call(this)}handleEvent(S){S.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(S.type,{detail:S.detail}))}attributeChangedCallback(S,D,P){Ne(this,g,en).call(this),Ne(this,g,n_).call(this,S,D,P)}connectedCallback(){Ne(this,g,en).call(this),C(this,p)||Ne(this,g,Fg).call(this)}disconnectedCallback(){var S,D,P;(S=C(this,m))==null||S.disconnect(),ee(this,m,void 0),C(this,p)&&((D=this.shadowRoot)==null||D.removeEventListener("slotchange",C(this,p)),ee(this,p,void 0));for(let N of this.constructor.Events)(P=this.shadowRoot)==null||P.removeEventListener(N,this,!0);C(this,f).forEach(N=>N.remove()),C(this,f).clear(),ee(this,h,null)}},l=new WeakMap,d=new WeakSet,i_=function(){if(C(this,l))return;ee(this,l,!0);let S=new Set(this.observedAttributes);S.delete("muted");for(let D of r)if(!(D in this.prototype))if(typeof s[D]=="function")this.prototype[D]=function(...P){return Ne(this,g,en).call(this),(()=>{var H;if(this.call)return this.call(D,...P);let $=(H=this.nativeEl)==null?void 0:H[D];return $==null?void 0:$.apply(this.nativeEl,P)})()};else{let P={get(){var $,H,U;Ne(this,g,en).call(this);let N=D.toLowerCase();if(S.has(N)){let j=this.getAttribute(N);return j===null?!1:j===""?!0:j}return(U=($=this.get)==null?void 0:$.call(this,D))!=null?U:(H=this.nativeEl)==null?void 0:H[D]}};D!==D.toUpperCase()&&(P.set=function(N){Ne(this,g,en).call(this);let $=D.toLowerCase();if(S.has($)){N===!0||N===!1||N==null?this.toggleAttribute($,!!N):this.setAttribute($,N);return}if(this.set){this.set(D,N);return}this.nativeEl&&(this.nativeEl[D]=N)}),Object.defineProperty(this.prototype,D,P)}},c=new WeakMap,h=new WeakMap,f=new WeakMap,m=new WeakMap,p=new WeakMap,g=new WeakSet,en=function(){C(this,c)||(ee(this,c,!0),this.init())},Fg=function(){var S,D;ee(this,m,new MutationObserver(Ne(this,g,s_).bind(this))),ee(this,p,()=>Ne(this,g,Bg).call(this)),(S=this.shadowRoot)==null||S.addEventListener("slotchange",C(this,p)),Ne(this,g,Bg).call(this);for(let P of this.constructor.Events)(D=this.shadowRoot)==null||D.addEventListener(P,this,!0)},Bg=function(){var N;let S=new Map(C(this,f)),D=(N=this.shadowRoot)==null?void 0:N.querySelector("slot:not([name])");(D==null?void 0:D.assignedElements({flatten:!0}).filter($=>["track","source"].includes($.localName))).forEach($=>{var U,j;S.delete($);let H=C(this,f).get($);H||(H=$.cloneNode(),C(this,f).set($,H),(U=C(this,m))==null||U.observe($,{attributes:!0})),(j=this.nativeEl)==null||j.append(H),Ne(this,g,$g).call(this,H)}),S.forEach(($,H)=>{$.remove(),C(this,f).delete(H)})},s_=function(S){var D;for(let P of S)if(P.type==="attributes"){let{target:N,attributeName:$}=P,H=C(this,f).get(N);H&&$&&(H.setAttribute($,(D=N.getAttribute($))!=null?D:""),Ne(this,g,$g).call(this,H))}},$g=function(S){S&&S.localName==="track"&&S.default&&(S.kind==="chapters"||S.kind==="metadata")&&S.track.mode==="disabled"&&(S.track.mode="hidden")},r_=function(S){if(Object.prototype.hasOwnProperty.call(this,S)){let D=this[S];delete this[S],this[S]=D}},n_=function(S,D,P){var N,$,H;["id","class"].includes(S)||!o.observedAttributes.includes(S)&&this.constructor.observedAttributes.includes(S)||(P===null?(N=this.nativeEl)==null||N.removeAttribute(S):(($=this.nativeEl)==null?void 0:$.getAttribute(S))!==P&&((H=this.nativeEl)==null||H.setAttribute(S,P)))},oe(o,d),Se(o,"getTemplateHTML",e.endsWith("audio")?Pw:Ow),Se(o,"shadowRootOptions",{mode:"open"}),Se(o,"Events",e_),oe(o,l,!1),o}function Nw(i){let e=[];for(let t=Object.getPrototypeOf(i);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t)){let s=Object.getOwnPropertyNames(t);e.push(...s)}return e}function o_(i){let e="";for(let t in i){if(!t_.includes(t))continue;let s=i[t];s===""?e+=` ${t}`:e+=` ${t}="${s}"`}return e}function Uw(i){let e={};for(let t of i)e[t.name]=t.value;return e}var ZT,sl=a_((ZT=globalThis.HTMLElement)!=null?ZT:class{},{tag:"video"}),JT,xN=a_((JT=globalThis.HTMLElement)!=null?JT:class{},{tag:"audio"});var u_=i=>{throw TypeError(i)},Hg=(i,e,t)=>e.has(i)||u_("Cannot "+t),mt=(i,e,t)=>(Hg(i,e,"read from private field"),t?t.call(i):e.get(i)),vi=(i,e,t)=>e.has(i)?u_("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Pi=(i,e,t,s)=>(Hg(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t),zu=(i,e,t)=>(Hg(i,e,"access private method"),t),Fw=()=>{try{return"0.30.5"}catch{}return"UNKNOWN"},Bw=Fw(),$w=()=>Bw,Hw=`
109
+ `}function a_(i,{tag:e,is:t}){var n,a,o,l,d,i_,c,h,f,m,p,g,en,Fg,Bg,s_,$g,r_,n_;let s=(a=(n=globalThis.document)==null?void 0:n.createElement)==null?void 0:a.call(n,e,{is:t}),r=s?Nw(s):[];return o=class extends i{constructor(){super(...arguments);oe(this,g);oe(this,c,!1);oe(this,h,null);oe(this,f,new Map);oe(this,m);oe(this,p);Se(this,"get");Se(this,"set");Se(this,"call")}static get observedAttributes(){var D,P,N;return Ne(D=o,d,i_).call(D),[...(N=(P=s==null?void 0:s.constructor)==null?void 0:P.observedAttributes)!=null?N:[],...t_]}get nativeEl(){var S,D,P,N,$;return Ne(this,g,en).call(this),($=(N=(D=(S=C(this,h))!=null?S:this.querySelector(":scope > [slot=media]"))!=null?D:this.querySelector(e))!=null?N:(P=this.shadowRoot)==null?void 0:P.querySelector(e))!=null?$:null}set nativeEl(S){ee(this,h,S)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(S){this.toggleAttribute("muted",S)}get src(){return this.getAttribute("src")}set src(S){this.setAttribute("src",`${S}`)}get preload(){var S,D;return(D=this.getAttribute("preload"))!=null?D:(S=this.nativeEl)==null?void 0:S.preload}set preload(S){this.setAttribute("preload",`${S}`)}init(){if(!this.shadowRoot){this.attachShadow({mode:"open"});let S=Uw(this.attributes);t&&(S.is=t),e&&(S.part=e),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(S)}this.nativeEl.muted=this.hasAttribute("muted");for(let S of r)Ne(this,g,r_).call(this,S);Ne(this,g,Fg).call(this)}handleEvent(S){S.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(S.type,{detail:S.detail}))}attributeChangedCallback(S,D,P){Ne(this,g,en).call(this),Ne(this,g,n_).call(this,S,D,P)}connectedCallback(){Ne(this,g,en).call(this),C(this,p)||Ne(this,g,Fg).call(this)}disconnectedCallback(){var S,D,P;(S=C(this,m))==null||S.disconnect(),ee(this,m,void 0),C(this,p)&&((D=this.shadowRoot)==null||D.removeEventListener("slotchange",C(this,p)),ee(this,p,void 0));for(let N of this.constructor.Events)(P=this.shadowRoot)==null||P.removeEventListener(N,this,!0);C(this,f).forEach(N=>N.remove()),C(this,f).clear(),ee(this,h,null)}},l=new WeakMap,d=new WeakSet,i_=function(){if(C(this,l))return;ee(this,l,!0);let S=new Set(this.observedAttributes);S.delete("muted");for(let D of r)if(!(D in this.prototype))if(typeof s[D]=="function")this.prototype[D]=function(...P){return Ne(this,g,en).call(this),(()=>{var H;if(this.call)return this.call(D,...P);let $=(H=this.nativeEl)==null?void 0:H[D];return $==null?void 0:$.apply(this.nativeEl,P)})()};else{let P={get(){var $,H,U;Ne(this,g,en).call(this);let N=D.toLowerCase();if(S.has(N)){let j=this.getAttribute(N);return j===null?!1:j===""?!0:j}return(U=($=this.get)==null?void 0:$.call(this,D))!=null?U:(H=this.nativeEl)==null?void 0:H[D]}};D!==D.toUpperCase()&&(P.set=function(N){Ne(this,g,en).call(this);let $=D.toLowerCase();if(S.has($)){N===!0||N===!1||N==null?this.toggleAttribute($,!!N):this.setAttribute($,N);return}if(this.set){this.set(D,N);return}this.nativeEl&&(this.nativeEl[D]=N)}),Object.defineProperty(this.prototype,D,P)}},c=new WeakMap,h=new WeakMap,f=new WeakMap,m=new WeakMap,p=new WeakMap,g=new WeakSet,en=function(){C(this,c)||(ee(this,c,!0),this.init())},Fg=function(){var S,D;ee(this,m,new MutationObserver(Ne(this,g,s_).bind(this))),ee(this,p,()=>Ne(this,g,Bg).call(this)),(S=this.shadowRoot)==null||S.addEventListener("slotchange",C(this,p)),Ne(this,g,Bg).call(this);for(let P of this.constructor.Events)(D=this.shadowRoot)==null||D.addEventListener(P,this,!0)},Bg=function(){var N;let S=new Map(C(this,f)),D=(N=this.shadowRoot)==null?void 0:N.querySelector("slot:not([name])");(D==null?void 0:D.assignedElements({flatten:!0}).filter($=>["track","source"].includes($.localName))).forEach($=>{var U,j;S.delete($);let H=C(this,f).get($);H||(H=$.cloneNode(),C(this,f).set($,H),(U=C(this,m))==null||U.observe($,{attributes:!0})),(j=this.nativeEl)==null||j.append(H),Ne(this,g,$g).call(this,H)}),S.forEach(($,H)=>{$.remove(),C(this,f).delete(H)})},s_=function(S){var D;for(let P of S)if(P.type==="attributes"){let{target:N,attributeName:$}=P,H=C(this,f).get(N);H&&$&&(H.setAttribute($,(D=N.getAttribute($))!=null?D:""),Ne(this,g,$g).call(this,H))}},$g=function(S){S&&S.localName==="track"&&S.default&&(S.kind==="chapters"||S.kind==="metadata")&&S.track.mode==="disabled"&&(S.track.mode="hidden")},r_=function(S){if(Object.prototype.hasOwnProperty.call(this,S)){let D=this[S];delete this[S],this[S]=D}},n_=function(S,D,P){var N,$,H;["id","class"].includes(S)||!o.observedAttributes.includes(S)&&this.constructor.observedAttributes.includes(S)||(P===null?(N=this.nativeEl)==null||N.removeAttribute(S):(($=this.nativeEl)==null?void 0:$.getAttribute(S))!==P&&((H=this.nativeEl)==null||H.setAttribute(S,P)))},oe(o,d),Se(o,"getTemplateHTML",e.endsWith("audio")?Pw:Ow),Se(o,"shadowRootOptions",{mode:"open"}),Se(o,"Events",e_),oe(o,l,!1),o}function Nw(i){let e=[];for(let t=Object.getPrototypeOf(i);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t)){let s=Object.getOwnPropertyNames(t);e.push(...s)}return e}function o_(i){let e="";for(let t in i){if(!t_.includes(t))continue;let s=i[t];s===""?e+=` ${t}`:e+=` ${t}="${s}"`}return e}function Uw(i){let e={};for(let t of i)e[t.name]=t.value;return e}var ZT,sl=a_((ZT=globalThis.HTMLElement)!=null?ZT:class{},{tag:"video"}),JT,xN=a_((JT=globalThis.HTMLElement)!=null?JT:class{},{tag:"audio"});var u_=i=>{throw TypeError(i)},Hg=(i,e,t)=>e.has(i)||u_("Cannot "+t),mt=(i,e,t)=>(Hg(i,e,"read from private field"),t?t.call(i):e.get(i)),vi=(i,e,t)=>e.has(i)?u_("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),Pi=(i,e,t,s)=>(Hg(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t),zu=(i,e,t)=>(Hg(i,e,"access private method"),t),Fw=()=>{try{return"0.30.6"}catch{}return"UNKNOWN"},Bw=Fw(),$w=()=>Bw,Hw=`
110
110
  <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" part="logo" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 1600 500"><g fill="#fff"><path d="M994.287 93.486c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m0-93.486c-34.509 0-62.484 27.976-62.484 62.486v187.511c0 68.943-56.09 125.033-125.032 125.033s-125.03-56.09-125.03-125.033V62.486C681.741 27.976 653.765 0 619.256 0s-62.484 27.976-62.484 62.486v187.511C556.772 387.85 668.921 500 806.771 500c137.851 0 250.001-112.15 250.001-250.003V62.486c0-34.51-27.976-62.486-62.485-62.486M1537.51 468.511c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m-275.883-218.509-143.33 143.329c-24.402 24.402-24.402 63.966 0 88.368 24.402 24.402 63.967 24.402 88.369 0l143.33-143.329 143.328 143.329c24.402 24.4 63.967 24.402 88.369 0 24.403-24.402 24.403-63.966.001-88.368l-143.33-143.329.001-.004 143.329-143.329c24.402-24.402 24.402-63.965 0-88.367s-63.967-24.402-88.369 0L1349.996 161.63 1206.667 18.302c-24.402-24.401-63.967-24.402-88.369 0s-24.402 63.965 0 88.367l143.329 143.329v.004ZM437.511 468.521c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31M461.426 4.759C438.078-4.913 411.2.432 393.33 18.303L249.999 161.632 106.669 18.303C88.798.432 61.922-4.913 38.573 4.759 15.224 14.43-.001 37.214-.001 62.488v375.026c0 34.51 27.977 62.486 62.487 62.486 34.51 0 62.486-27.976 62.486-62.486V213.341l80.843 80.844c24.404 24.402 63.965 24.402 88.369 0l80.843-80.844v224.173c0 34.51 27.976 62.486 62.486 62.486s62.486-27.976 62.486-62.486V62.488c0-25.274-15.224-48.058-38.573-57.729" style="fill-rule:nonzero"/></g></svg>`,w={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",MAX_AUTO_RESOLUTION:"max-auto-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type",LOGO:"logo",CAP_RENDITION_TO_PLAYER_SIZE:"cap-rendition-to-player-size"},Gw=Object.values(w),l_=$w(),d_="mux-video",rl,Qu,nl,Xu,Zu,Ju,ec,tc,al,ic,Ei,tn,sc,ol,c_=class extends sl{constructor(){super(),vi(this,Ei),vi(this,rl),vi(this,Qu),vi(this,nl,{}),vi(this,Xu,{}),vi(this,Zu),vi(this,Ju),vi(this,ec),vi(this,tc),vi(this,al,""),vi(this,ic,i=>{var e;let t=HT(this.nativeEl),s=(e=this.metadata)!=null?e:{};this.metadata={...t,...s},(t==null?void 0:t["com.mux.video.branding"])==="mux-free-plan"&&(Pi(this,al,"default"),this.updateLogo())}),vi(this,sc),Pi(this,Qu,Wu())}static get NAME(){return d_}static get VERSION(){return l_}static get observedAttributes(){var i;return[...Gw,...(i=sl.observedAttributes)!=null?i:[]]}static getLogoHTML(i){return!i||i==="false"?"":i==="default"?Hw:`<img part="logo" src="${i}" />`}static getTemplateHTML(i={}){var e;return`
111
111
  ${sl.getTemplateHTML(i)}
112
112
  <style>
@@ -2020,7 +2020,7 @@ Schedule: ${l.map(p=>Ci(p))} pos: ${this.timelinePos}`),u.length&&this.log(`Remo
2020
2020
  min-height: var(--media-control-height, 24px);
2021
2021
  }
2022
2022
  </style>
2023
- `}var Eo=class extends ui{};Eo.shadowRootOptions={mode:"open"};Eo.getTemplateHTML=p2;L.customElements.get("media-context-menu-item")||L.customElements.define("media-context-menu-item",Eo);var O1=i=>{throw TypeError(i)},iE=(i,e,t)=>e.has(i)||O1("Cannot "+t),ve=(i,e,t)=>(iE(i,e,"read from private field"),t?t.call(i):e.get(i)),Ot=(i,e,t)=>e.has(i)?O1("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ti=(i,e,t,s)=>(iE(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t),dt=(i,e,t)=>(iE(i,e,"access private method"),t),Vf=class{addEventListener(){}removeEventListener(){}dispatchEvent(i){return!0}};if(typeof DocumentFragment=="undefined"){class i extends Vf{}globalThis.DocumentFragment=i}var sE=class extends Vf{},g2=class extends Vf{},v2={get(i){},define(i,e,t){},getName(i){return null},upgrade(i){},whenDefined(i){return Promise.resolve(sE)}},Of,E2=class{constructor(i,e={}){Ot(this,Of),ti(this,Of,e==null?void 0:e.detail)}get detail(){return ve(this,Of)}initCustomEvent(){}};Of=new WeakMap;function y2(i,e){return new sE}var N1={document:{createElement:y2},DocumentFragment,customElements:v2,CustomEvent:E2,EventTarget:Vf,HTMLElement:sE,HTMLVideoElement:g2},U1=typeof window=="undefined"||typeof globalThis.customElements=="undefined",_s=U1?N1:globalThis,$f=U1?N1.document:globalThis.document;function b2(i){let e="";return Object.entries(i).forEach(([t,s])=>{s!=null&&(e+=`${Zv(t)}: ${s}; `)}),e?e.trim():void 0}function Zv(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function F1(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function ci(i){if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}function B1(i){let e=T2(i).toString();return e?"?"+e:""}function T2(i){let e={};for(let t in i)i[t]!=null&&(e[t]=i[t]);return new URLSearchParams(e)}var $1=(i,e)=>!i||!e?!1:i.contains(e)?!0:$1(i,e.getRootNode().host),H1="mux.com",_2=()=>{try{return"3.11.7"}catch{}return"UNKNOWN"},A2=_2(),G1=()=>A2,S2=(i,{token:e,customDomain:t=H1,thumbnailTime:s,programTime:r}={})=>{var n;let a=e==null?s:void 0,{aud:o}=(n=ar(e))!=null?n:{};if(!(e&&o!=="t"))return`https://image.${t}/${i}/thumbnail.webp${B1({token:e,time:a,program_time:r})}`},I2=(i,{token:e,customDomain:t=H1,programStartTime:s,programEndTime:r}={})=>{var n;let{aud:a}=(n=ar(e))!=null?n:{};if(!(e&&a!=="s"))return`https://image.${t}/${i}/storyboard.vtt${B1({token:e,format:"webp",program_start_time:s,program_end_time:r})}`},rE=i=>{if(i){if([we.LIVE,we.ON_DEMAND].includes(i))return i;if(i!=null&&i.includes("live"))return we.LIVE}},L2={crossorigin:"crossOrigin",playsinline:"playsInline"};function x2(i){var e;return(e=L2[i])!=null?e:F1(i)}var yo,bo,ei,R2=class{constructor(i,e){Ot(this,yo),Ot(this,bo),Ot(this,ei,[]),ti(this,yo,i),ti(this,bo,e)}[Symbol.iterator](){return ve(this,ei).values()}get length(){return ve(this,ei).length}get value(){var i;return(i=ve(this,ei).join(" "))!=null?i:""}set value(i){var e;i!==this.value&&(ti(this,ei,[]),this.add(...(e=i==null?void 0:i.split(" "))!=null?e:[]))}toString(){return this.value}item(i){return ve(this,ei)[i]}values(){return ve(this,ei).values()}keys(){return ve(this,ei).keys()}forEach(i){ve(this,ei).forEach(i)}add(...i){var e,t;i.forEach(s=>{this.contains(s)||ve(this,ei).push(s)}),!(this.value===""&&!((e=ve(this,yo))!=null&&e.hasAttribute(`${ve(this,bo)}`)))&&((t=ve(this,yo))==null||t.setAttribute(`${ve(this,bo)}`,`${this.value}`))}remove(...i){var e;i.forEach(t=>{ve(this,ei).splice(ve(this,ei).indexOf(t),1)}),(e=ve(this,yo))==null||e.setAttribute(`${ve(this,bo)}`,`${this.value}`)}contains(i){return ve(this,ei).includes(i)}toggle(i,e){return typeof e!="undefined"?e?(this.add(i),!0):(this.remove(i),!1):this.contains(i)?(this.remove(i),!1):(this.add(i),!0)}replace(i,e){this.remove(i),this.add(e)}};yo=new WeakMap,bo=new WeakMap,ei=new WeakMap;var K1=`[mux-player ${G1()}]`;function Ys(...i){console.warn(K1,...i)}function hi(...i){console.error(K1,...i)}function b1(i){var e;let t=(e=i.message)!=null?e:"";i.context&&(t+=` ${i.context}`),i.file&&(t+=` ${te("Read more: ")}
2023
+ `}var Eo=class extends ui{};Eo.shadowRootOptions={mode:"open"};Eo.getTemplateHTML=p2;L.customElements.get("media-context-menu-item")||L.customElements.define("media-context-menu-item",Eo);var O1=i=>{throw TypeError(i)},iE=(i,e,t)=>e.has(i)||O1("Cannot "+t),ve=(i,e,t)=>(iE(i,e,"read from private field"),t?t.call(i):e.get(i)),Ot=(i,e,t)=>e.has(i)?O1("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),ti=(i,e,t,s)=>(iE(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t),dt=(i,e,t)=>(iE(i,e,"access private method"),t),Vf=class{addEventListener(){}removeEventListener(){}dispatchEvent(i){return!0}};if(typeof DocumentFragment=="undefined"){class i extends Vf{}globalThis.DocumentFragment=i}var sE=class extends Vf{},g2=class extends Vf{},v2={get(i){},define(i,e,t){},getName(i){return null},upgrade(i){},whenDefined(i){return Promise.resolve(sE)}},Of,E2=class{constructor(i,e={}){Ot(this,Of),ti(this,Of,e==null?void 0:e.detail)}get detail(){return ve(this,Of)}initCustomEvent(){}};Of=new WeakMap;function y2(i,e){return new sE}var N1={document:{createElement:y2},DocumentFragment,customElements:v2,CustomEvent:E2,EventTarget:Vf,HTMLElement:sE,HTMLVideoElement:g2},U1=typeof window=="undefined"||typeof globalThis.customElements=="undefined",_s=U1?N1:globalThis,$f=U1?N1.document:globalThis.document;function b2(i){let e="";return Object.entries(i).forEach(([t,s])=>{s!=null&&(e+=`${Zv(t)}: ${s}; `)}),e?e.trim():void 0}function Zv(i){return i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function F1(i){return i.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function ci(i){if(i==null)return;let e=+i;return Number.isNaN(e)?void 0:e}function B1(i){let e=T2(i).toString();return e?"?"+e:""}function T2(i){let e={};for(let t in i)i[t]!=null&&(e[t]=i[t]);return new URLSearchParams(e)}var $1=(i,e)=>!i||!e?!1:i.contains(e)?!0:$1(i,e.getRootNode().host),H1="mux.com",_2=()=>{try{return"3.11.8"}catch{}return"UNKNOWN"},A2=_2(),G1=()=>A2,S2=(i,{token:e,customDomain:t=H1,thumbnailTime:s,programTime:r}={})=>{var n;let a=e==null?s:void 0,{aud:o}=(n=ar(e))!=null?n:{};if(!(e&&o!=="t"))return`https://image.${t}/${i}/thumbnail.webp${B1({token:e,time:a,program_time:r})}`},I2=(i,{token:e,customDomain:t=H1,programStartTime:s,programEndTime:r}={})=>{var n;let{aud:a}=(n=ar(e))!=null?n:{};if(!(e&&a!=="s"))return`https://image.${t}/${i}/storyboard.vtt${B1({token:e,format:"webp",program_start_time:s,program_end_time:r})}`},rE=i=>{if(i){if([we.LIVE,we.ON_DEMAND].includes(i))return i;if(i!=null&&i.includes("live"))return we.LIVE}},L2={crossorigin:"crossOrigin",playsinline:"playsInline"};function x2(i){var e;return(e=L2[i])!=null?e:F1(i)}var yo,bo,ei,R2=class{constructor(i,e){Ot(this,yo),Ot(this,bo),Ot(this,ei,[]),ti(this,yo,i),ti(this,bo,e)}[Symbol.iterator](){return ve(this,ei).values()}get length(){return ve(this,ei).length}get value(){var i;return(i=ve(this,ei).join(" "))!=null?i:""}set value(i){var e;i!==this.value&&(ti(this,ei,[]),this.add(...(e=i==null?void 0:i.split(" "))!=null?e:[]))}toString(){return this.value}item(i){return ve(this,ei)[i]}values(){return ve(this,ei).values()}keys(){return ve(this,ei).keys()}forEach(i){ve(this,ei).forEach(i)}add(...i){var e,t;i.forEach(s=>{this.contains(s)||ve(this,ei).push(s)}),!(this.value===""&&!((e=ve(this,yo))!=null&&e.hasAttribute(`${ve(this,bo)}`)))&&((t=ve(this,yo))==null||t.setAttribute(`${ve(this,bo)}`,`${this.value}`))}remove(...i){var e;i.forEach(t=>{ve(this,ei).splice(ve(this,ei).indexOf(t),1)}),(e=ve(this,yo))==null||e.setAttribute(`${ve(this,bo)}`,`${this.value}`)}contains(i){return ve(this,ei).includes(i)}toggle(i,e){return typeof e!="undefined"?e?(this.add(i),!0):(this.remove(i),!1):this.contains(i)?(this.remove(i),!1):(this.add(i),!0)}replace(i,e){this.remove(i),this.add(e)}};yo=new WeakMap,bo=new WeakMap,ei=new WeakMap;var K1=`[mux-player ${G1()}]`;function Ys(...i){console.warn(K1,...i)}function hi(...i){console.error(K1,...i)}function b1(i){var e;let t=(e=i.message)!=null?e:"";i.context&&(t+=` ${i.context}`),i.file&&(t+=` ${te("Read more: ")}
2024
2024
  https://github.com/muxinc/elements/blob/main/errors/${i.file}`),Ys(t)}var Pt={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},Br={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},Q6={...Pt,...Br},T1=Object.freeze({length:0,start(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(i){let e=i>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),k2=Object.values(Pt).filter(i=>Pt.PLAYSINLINE!==i),D2=Object.values(Br),C2=[...k2,...D2],w2=class extends _s.HTMLElement{static get observedAttributes(){return C2}constructor(){super()}attributeChangedCallback(i,e,t){var s,r;switch(i){case Br.MUTED:{this.media&&(this.media.muted=t!=null,this.media.defaultMuted=t!=null);return}case Br.VOLUME:{let n=(s=ci(t))!=null?s:1;this.media&&(this.media.volume=n);return}case Br.PLAYBACKRATE:{let n=(r=ci(t))!=null?r:1;this.media&&(this.media.playbackRate=n,this.media.defaultPlaybackRate=n);return}}}play(){var i,e;return(e=(i=this.media)==null?void 0:i.play())!=null?e:Promise.reject()}pause(){var i;(i=this.media)==null||i.pause()}load(){var i;(i=this.media)==null||i.load()}get media(){var i;return(i=this.shadowRoot)==null?void 0:i.querySelector("mux-video")}get audioTracks(){return this.media.audioTracks}get videoTracks(){return this.media.videoTracks}get audioRenditions(){return this.media.audioRenditions}get videoRenditions(){return this.media.videoRenditions}get paused(){var i,e;return(e=(i=this.media)==null?void 0:i.paused)!=null?e:!0}get duration(){var i,e;return(e=(i=this.media)==null?void 0:i.duration)!=null?e:NaN}get ended(){var i,e;return(e=(i=this.media)==null?void 0:i.ended)!=null?e:!1}get buffered(){var i,e;return(e=(i=this.media)==null?void 0:i.buffered)!=null?e:T1}get seekable(){var i,e;return(e=(i=this.media)==null?void 0:i.seekable)!=null?e:T1}get readyState(){var i,e;return(e=(i=this.media)==null?void 0:i.readyState)!=null?e:0}get videoWidth(){var i,e;return(e=(i=this.media)==null?void 0:i.videoWidth)!=null?e:0}get videoHeight(){var i,e;return(e=(i=this.media)==null?void 0:i.videoHeight)!=null?e:0}get currentSrc(){var i,e;return(e=(i=this.media)==null?void 0:i.currentSrc)!=null?e:""}get currentTime(){var i,e;return(e=(i=this.media)==null?void 0:i.currentTime)!=null?e:0}set currentTime(i){this.media&&(this.media.currentTime=Number(i))}get volume(){var i,e;return(e=(i=this.media)==null?void 0:i.volume)!=null?e:1}set volume(i){this.media&&(this.media.volume=Number(i))}get playbackRate(){var i,e;return(e=(i=this.media)==null?void 0:i.playbackRate)!=null?e:1}set playbackRate(i){this.media&&(this.media.playbackRate=Number(i))}get defaultPlaybackRate(){var i;return(i=ci(this.getAttribute(Br.PLAYBACKRATE)))!=null?i:1}set defaultPlaybackRate(i){i!=null?this.setAttribute(Br.PLAYBACKRATE,`${i}`):this.removeAttribute(Br.PLAYBACKRATE)}get crossOrigin(){return _d(this,Pt.CROSSORIGIN)}set crossOrigin(i){this.setAttribute(Pt.CROSSORIGIN,`${i}`)}get autoplay(){return _d(this,Pt.AUTOPLAY)!=null}set autoplay(i){i?this.setAttribute(Pt.AUTOPLAY,typeof i=="string"?i:""):this.removeAttribute(Pt.AUTOPLAY)}get loop(){return _d(this,Pt.LOOP)!=null}set loop(i){i?this.setAttribute(Pt.LOOP,""):this.removeAttribute(Pt.LOOP)}get muted(){var i,e;return(e=(i=this.media)==null?void 0:i.muted)!=null?e:!1}set muted(i){this.media&&(this.media.muted=!!i)}get defaultMuted(){return _d(this,Pt.MUTED)!=null}set defaultMuted(i){i?this.setAttribute(Pt.MUTED,""):this.removeAttribute(Pt.MUTED)}get playsInline(){return _d(this,Pt.PLAYSINLINE)!=null}set playsInline(i){hi("playsInline is set to true by default and is not currently supported as a setter.")}get preload(){return this.media?this.media.preload:this.getAttribute("preload")}set preload(i){["","none","metadata","auto"].includes(i)?this.setAttribute(Pt.PRELOAD,i):this.removeAttribute(Pt.PRELOAD)}};function _d(i,e){return i.media?i.media.getAttribute(e):i.getAttribute(e)}var _1=w2,M2=`:host {
2025
2025
  --media-control-display: var(--controls);
2026
2026
  --media-loading-indicator-display: var(--loading-indicator);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mux/mux-player",
3
- "version": "3.11.8-canary.1",
3
+ "version": "3.11.8",
4
4
  "description": "An open source Mux player web component that Just Works™",
5
5
  "homepage": "https://mux.com/player",
6
6
  "keywords": [
@@ -125,8 +125,8 @@
125
125
  "build": "npm-run-all 'build:esm:base -- --minify' 'build:cjs:base -- --minify' 'build:esm:ads:mixin -- --minify' 'build:cjs:ads:mixin -- --minify' --parallel 'build:esm:** -- --minify' 'build:iife:** -- --minify' 'build:cjs:** -- --minify' 'build:esm-module:** -- --minify' 'build:themes'"
126
126
  },
127
127
  "dependencies": {
128
- "@mux/mux-video": "0.30.5",
129
- "@mux/playback-core": "0.33.3",
128
+ "@mux/mux-video": "0.30.6",
129
+ "@mux/playback-core": "0.34.0",
130
130
  "media-chrome": "~4.18.3",
131
131
  "player.style": "^0.3.0"
132
132
  },