(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,952985,e=>{"use strict";var t,i,a,n,r,s,o,l,d,u,c,h,m,p,v,f,g,b,y,E,w,k,A,x,T,L,S,C,M,I,_,R,D,N,H,W,O,P,B,U,V,$,q,j,z,Z,G,K,F,Y,J,X,Q,ee,et,ei,ea,en,er,es,eo,el,ed,eu,ec,eh,em,ep,ev,ef,eg,eb,ey,eE,ew,ek,eA,ex,eT,eL,eS,eC,eM,eI,e_,eR,eD,eN,eH,eW,eO,eP,eB,eU,eV,e$,eq,ej,ez,eZ,eG,eK,eF,eY,eJ,eX,eQ,e0,e1,e2,e5,e3,e4,e7,e8,e9,e6,te,tt,ti,ta,tn,tr,ts,to,tl,td,tu,tc,th,tm,tp,tv,tf,tg,tb,ty=e.i(843476),tE=e.i(271645),tw=e.i(343794),tk=e.i(384644),tA=e=>{throw TypeError(e)},tx=(e,t,i)=>t.has(e)||tA("Cannot "+i),tT=`
Continue
Advertisement Ad `,tL=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};"u"null,upgrade(e){},whenDefined:e=>Promise.resolve(tS)},CustomEvent:tC,EventTarget:tL,HTMLElement:tS,HTMLVideoElement:class extends tL{}},tI="u"(e[t]=i.toLowerCase(),e),{}),tO=tH.reduce((e,[t,i])=>(e[t]=i.toLowerCase(),e),{USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"});Object.entries(tO).reduce((e,[t,i])=>{let a=tW[t];return a&&(e[i]=a),e},{userinactivechange:"userinactive"}),Object.entries(tW).reduce((e,[t,i])=>{let a=tO[t];return a&&(e[i]=a),e},{userinactive:"userinactivechange"});var tP=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}},tB=class extends tP{},tU=class extends tB{constructor(){super(...arguments),this.role=null}},tV={createElement:function(){return new t$.HTMLElement},createElementNS:function(){return new t$.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent:e=>!1},t$={ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},document:tV,Node:tB,Element:tU,HTMLElement:class extends tU{constructor(){super(...arguments),this.innerHTML=""}get content(){return new t$.DocumentFragment}},DocumentFragment:class extends tP{},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}}}}},tq="global"in globalThis&&(null==globalThis?void 0:globalThis.global)===globalThis||"u"e in globalThis),tz=tq&&!tj?t$:globalThis,tZ=tq&&!tj?tV:globalThis.document,tG=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},tK=(e,t,i)=>(tG(e,t,"read from private field"),i?i.call(e):t.get(e)),tF=(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)},tY=(e,t,i,a)=>(tG(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),tJ={processCallback(e,t,i){if(i){for(let[e,a]of t)if(e in i){let t=i[e];"boolean"==typeof t&&a instanceof t4&&"boolean"==typeof a.element[a.attributeName]?a.booleanValue=t:"function"==typeof t&&a instanceof t4?a.element[a.attributeName]=t:a.value=t}}}},tX=class extends tz.DocumentFragment{constructor(e,t,n=tJ){var r;super(),tF(this,i,void 0),tF(this,a,void 0),this.append(e.content.cloneNode(!0)),tY(this,i,tQ(this)),tY(this,a,n),null==(r=n.createCallback)||r.call(n,this,tK(this,i),t),n.processCallback(this,tK(this,i),t)}update(e){tK(this,a).processCallback(this,tK(this,i),e)}};i=new WeakMap,a=new WeakMap;var tQ=(e,t=[])=>{let i,a;for(let n of e.attributes||[])if(n.value.includes("{{")){let r=new t3;for([i,a]of t1(n.value))if(i){let i=new t4(e,n.name,n.namespaceURI);r.append(i),t.push([a,i])}else r.append(a);n.value=r.toString()}for(let n of e.childNodes)if(1!==n.nodeType||n instanceof HTMLTemplateElement){let r=n.data;if(1===n.nodeType||r.includes("{{")){let s=[];if(r)for([i,a]of t1(r))if(i){let i=new t7(e);s.push(i),t.push([a,i])}else s.push(new Text(a));else if(n instanceof HTMLTemplateElement){let i=new t8(e,n);s.push(i),t.push([i.expression,i])}n.replaceWith(...s.flatMap(e=>e.replacementNodes||[e]))}}else tQ(n,t);return t},t0={},t1=e=>{let t="",i=0,a=t0[e],n=0,r;if(a)return a;for(a=[];r=e[n];n++)"{"===r&&"{"===e[n+1]&&"\\"!==e[n-1]&&e[n+2]&&1==++i?(t&&a.push([0,t]),t="",n++):"}"!==r||"}"!==e[n+1]||"\\"===e[n-1]||--i?t+=r||"":(a.push([1,t.trim()]),t="",n++);return t&&a.push([0,(i>0?"{{":"")+t]),t0[e]=a},t2=class{get value(){return""}set value(e){}toString(){return this.value}},t5=new WeakMap,t3=class{constructor(){tF(this,n,[])}[Symbol.iterator](){return tK(this,n).values()}get length(){return tK(this,n).length}item(e){return tK(this,n)[e]}append(...e){for(let t of e)t instanceof t4&&t5.set(t,this),tK(this,n).push(t)}toString(){return tK(this,n).join("")}};n=new WeakMap;var t4=class extends t2{constructor(e,t,i){super(),tF(this,d),tF(this,r,""),tF(this,s,void 0),tF(this,o,void 0),tF(this,l,void 0),tY(this,s,e),tY(this,o,t),tY(this,l,i)}get attributeName(){return tK(this,o)}get attributeNamespace(){return tK(this,l)}get element(){return tK(this,s)}get value(){return tK(this,r)}set value(e){tK(this,r)!==e&&(tY(this,r,e),tK(this,d,u)&&1!==tK(this,d,u).length?tK(this,s).setAttributeNS(tK(this,l),tK(this,o),tK(this,d,u).toString()):null==e?tK(this,s).removeAttributeNS(tK(this,l),tK(this,o)):tK(this,s).setAttributeNS(tK(this,l),tK(this,o),e))}get booleanValue(){return tK(this,s).hasAttributeNS(tK(this,l),tK(this,o))}set booleanValue(e){if(tK(this,d,u)&&1!==tK(this,d,u).length)throw new DOMException("Value is not fully templatized");this.value=e?"":null}};r=new WeakMap,s=new WeakMap,o=new WeakMap,l=new WeakMap,d=new WeakSet,u=function(){return t5.get(this)};var t7=class extends t2{constructor(e,t){super(),tF(this,c,void 0),tF(this,h,void 0),tY(this,c,e),tY(this,h,t?[...t]:[new Text])}get replacementNodes(){return tK(this,h)}get parentNode(){return tK(this,c)}get nextSibling(){return tK(this,h)[tK(this,h).length-1].nextSibling}get previousSibling(){return tK(this,h)[0].previousSibling}get value(){return tK(this,h).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){let t=e.flat().flatMap(e=>null==e?[new Text]:e.forEach?[...e]:11===e.nodeType?[...e.childNodes]:e.nodeType?[e]:[new Text(e)]);t.length||t.push(new Text),tY(this,h,function(e,t,i,a=null){let n=0,r,s,o,l=i.length,d=t.length;for(;nString(e)},ii=class{constructor(e){this.template=e,this.state=void 0}},ia=new WeakMap,ir=new WeakMap,is={partial:(e,t)=>{t[e.expression]=new ii(e.template)},if:(e,t)=>{var i;if(iu(e.expression,t))if(ia.get(e)!==e.template){ia.set(e,e.template);let i=new tX(e.template,t,il);e.replace(i),ir.set(e,i)}else null==(i=ir.get(e))||i.update(t);else e.replace(""),ia.delete(e),ir.delete(e)}},io=Object.keys(is),il={processCallback(e,t,i){var a,n;if(i)for(let[e,r]of t){if(r instanceof t8){if(!r.directive){let e=io.find(e=>r.template.hasAttribute(e));e&&(r.directive=e,r.expression=r.template.getAttribute(e))}null==(a=is[r.directive])||a.call(is,r,i);continue}let t=iu(e,i);if(t instanceof ii){ia.get(r)!==t.template?(ia.set(r,t.template),r.value=t=new tX(t.template,t.state,il),ir.set(r,t)):null==(n=ir.get(r))||n.update(t.state);continue}t?(r instanceof t4&&r.attributeName.startsWith("aria-")&&(t=String(t)),r instanceof t4?"boolean"==typeof t?r.booleanValue=t:"function"==typeof t?r.element[r.attributeName]=t:r.value=t:(r.value=t,ia.delete(r),ir.delete(r))):r instanceof t4?r.value=void 0:(r.value=void 0,ia.delete(r),ir.delete(r))}}},id={"!":e=>!e,"!!":e=>!!e,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,"<":(e,t)=>ee<=t,"??":(e,t)=>null!=e?e:t,"|":(e,t)=>{var i;return null==(i=it[t])?void 0:i.call(it,e)}};function iu(e,t={}){var i,a,n,r,s,o,l;let d=(function(e,t){let i,a,n,r=[];for(;e;){for(let r in n=null,i=e.length,t)(a=t[r].exec(e))&&a.index<][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>"ws"!==e);if(0===d.length||d.some(({type:e})=>!e))return ic(e);if((null==(i=d[0])?void 0:i.token)===">"){let i=t[null==(a=d[1])?void 0:a.token];if(!i)return ic(e);let o={...t};i.state=o;let l=d.slice(2);for(let e=0;e{if(!t.has(e))throw TypeError("Cannot "+i)},iv=(e,t,i)=>(ip(e,t,"read from private field"),i?i.call(e):t.get(e)),ig=(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)},ib=(e,t,i,a)=>(ip(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),iy=(e,t,i)=>(ip(e,t,"access private method"),i),iE={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},iw=tZ.createElement("template");iw.innerHTML=` `;var ik=class extends tz.HTMLElement{constructor(){super(),ig(this,g),ig(this,y),ig(this,m,void 0),ig(this,p,void 0),ig(this,v,void 0),ig(this,f,void 0),ig(this,w,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer()),ib(this,f,new MutationObserver(e=>{var t;(!this.mediaController||(null==(t=this.mediaController)?void 0:t.breakpointsComputed))&&e.some(e=>{let t=e.target;return t===this||"media-controller"===t.localName&&!!(iE[e.attributeName]||e.attributeName.startsWith("breakpoint"))})&&this.render()})),ib(this,w,this.render.bind(this)),iy(this,g,b).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return null!=(e=iv(this,m))?e:this.constructor.template}set template(e){null===e?this.removeAttribute("template"):"string"==typeof e?this.setAttribute("template",e):e instanceof HTMLTemplateElement&&(ib(this,m,e),ib(this,v,null),this.createRenderer())}get props(){var e,t,i;let a=[...Array.from(null!=(t=null==(e=this.mediaController)?void 0:e.attributes)?t:[]).filter(({name:e})=>iE[e]||e.startsWith("breakpoint")),...Array.from(this.attributes)],n={};for(let e of a){let t=null!=(i=iE[e.name])?i:e.name.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase()),{value:a}=e;null!=a?(ie(a)&&(a=parseFloat(a)),n[t]=""===a||a):n[t]=!1}return n}attributeChangedCallback(e,t,i){"template"===e&&t!=i&&iy(this,y,E).call(this)}connectedCallback(){this.addEventListener(tO.BREAKPOINTS_COMPUTED,iv(this,w)),iv(this,f).observe(this,{attributes:!0}),iv(this,f).observe(this.renderRoot,{attributes:!0,subtree:!0}),iy(this,y,E).call(this)}disconnectedCallback(){this.removeEventListener(tO.BREAKPOINTS_COMPUTED,iv(this,w)),iv(this,f).disconnect()}createRenderer(){this.template instanceof HTMLTemplateElement&&this.template!==iv(this,p)&&(ib(this,p,this.template),this.renderer=new tX(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(iw.content.cloneNode(!0),this.renderer))}render(){var e;null==(e=this.renderer)||e.update(this.props)}};async function iA(e){let t=await fetch(e);if(200!==t.status)throw Error(`Failed to load resource: the server responded with a status of ${t.status}`);return t.text()}function ix(e){return e.split("-")[0]}m=new WeakMap,p=new WeakMap,v=new WeakMap,f=new WeakMap,g=new WeakSet,b=function(e){if(Object.prototype.hasOwnProperty.call(this,e)){let t=this[e];delete this[e],this[e]=t}},y=new WeakSet,E=function(){var e;let t=this.getAttribute("template");if(!t||t===iv(this,v))return;let i=this.getRootNode(),a=null==(e=null==i?void 0:i.getElementById)?void 0:e.call(i,t);if(a){ib(this,v,t),ib(this,m,a),this.createRenderer();return}(function(e){if(!/^(\/|\.\/|https?:\/\/)/.test(e))return!1;let t=/^https?:\/\//.test(e)?void 0:location.origin;try{new URL(e,t)}catch(e){return!1}return!0})(t)&&(ib(this,v,t),iA(t).then(e=>{let t=tZ.createElement("template");t.innerHTML=e,ib(this,m,t),this.createRenderer()}).catch(console.error))},w=new WeakMap,ik.observedAttributes=["template"],ik.processor=il,tz.customElements.get("media-theme")||tz.customElements.define("media-theme",ik);var iT=new WeakMap,iL=e=>{let t=iT.get(e);return t||iT.set(e,t=new Set),t},iS=new tz.ResizeObserver(e=>{for(let t of e)for(let e of iL(t.target))e(t)});function iC(e,t){iL(e).add(t),iS.observe(e)}function iM(e,t){let i=iL(e);i.delete(t),i.size||iS.unobserve(e)}var iI=class extends Event{constructor({action:e="auto",relatedTarget:t,...i}){super("invoke",i),this.action=e,this.relatedTarget=t}},i_=class extends Event{constructor({newState:e,oldState:t,...i}){super("toggle",i),this.newState=e,this.oldState=t}};function iR(e){let t={};for(let i of e)t[i.name]=i.value;return t}function iD(e){var t;return null!=(t=iN(e))?t:iW(e,"media-controller")}function iN(e){var t;let{MEDIA_CONTROLLER:i}=tN,a=e.getAttribute(i);if(a)return null==(t=iO(e))?void 0:t.getElementById(a)}var iH=(e,t)=>!!e&&!!t&&(null!=e&&!!e.contains(t)||iH(e,t.getRootNode().host)),iW=(e,t)=>{if(!e)return null;let i=e.closest(t);return i||iW(e.getRootNode().host,t)};function iO(e){var t;let i=null==(t=null==e?void 0:e.getRootNode)?void 0:t.call(e);return i instanceof ShadowRoot||i instanceof Document?i:null}function iP(e,t){var i,a;let n=null!=(i=e.querySelectorAll("style:not([media])"))?i:[],r=null==n?void 0:n[n.length-1];if(!(null==r?void 0:r.sheet))return console.warn("Media Chrome: No style sheet found on style tag of",e),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}};let s=null==r?void 0:r.sheet.insertRule(`${t}{}`,r.sheet.cssRules.length);return null==(a=r.sheet.cssRules)?void 0:a[s]}function iB(e,t,i=0/0){let a=e.getAttribute(t);return null!=a?+a:i}function iU(e,t,i){let a=+i;if(null==i||Number.isNaN(a)){e.hasAttribute(t)&&e.removeAttribute(t);return}iB(e,t,void 0)!==a&&e.setAttribute(t,`${a}`)}function iV(e,t){return e.hasAttribute(t)}function i$(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}iV(e,t)!=i&&e.toggleAttribute(t,i)}function iq(e,t,i=null){var a;return null!=(a=e.getAttribute(t))?a:i}function ij(e,t,i){if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}let a=`${i}`;iq(e,t,void 0)!==a&&e.setAttribute(t,a)}var iz=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},iZ=(e,t,i)=>(iz(e,t,"read from private field"),i?i.call(e):t.get(e)),iG=(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)},iK=(e,t,i,a)=>(iz(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),iF=(e,t,i)=>(iz(e,t,"access private method"),i);function iY({type:e,text:t,value:i,checked:a}){let n=tZ.createElement("media-chrome-menu-item");n.type=null!=e?e:"",n.part.add("menu-item"),e&&n.part.add(e),n.value=i,n.checked=a;let r=tZ.createElement("span");return r.textContent=t,n.append(r),n}function iJ(e,t){let i=e.querySelector(`:scope > [slot="${t}"]`);if((null==i?void 0:i.nodeName)=="SLOT"&&(i=i.assignedElements({flatten:!0})[0]),i)return i.cloneNode(!0);let a=e.shadowRoot.querySelector(`[name="${t}"] > svg`);return a?a.cloneNode(!0):""}var iX="style",iQ="hidden",i0="disabled",i1=class extends tz.HTMLElement{constructor(){if(super(),iG(this,M),iG(this,_),iG(this,N),iG(this,W),iG(this,P),iG(this,U),iG(this,j),iG(this,Z),iG(this,K),iG(this,Y),iG(this,X),iG(this,ee),iG(this,ei),iG(this,en),iG(this,es),iG(this,el),iG(this,eu),iG(this,eh),iG(this,k,null),iG(this,A,null),iG(this,x,null),iG(this,T,new Set),iG(this,L,void 0),iG(this,S,!1),iG(this,C,null),iG(this,D,()=>{let e=iZ(this,T),t=new Set(this.items);for(let i of e)t.has(i)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:i}));for(let i of t)e.has(i)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:i}));iK(this,T,t)}),iG(this,$,()=>{iF(this,j,z).call(this),iF(this,Z,G).call(this,!1)}),iG(this,q,()=>{iF(this,j,z).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=iR(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),iK(this,L,new MutationObserver(iZ(this,D)))}static get observedAttributes(){return[i0,iQ,iX,"anchor",tN.MEDIA_CONTROLLER]}static formatMenuItemText(e,t){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this)}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this)}handleEvent(e){switch(e.type){case"slotchange":iF(this,M,I).call(this,e);break;case"invoke":iF(this,W,O).call(this,e);break;case"click":iF(this,K,F).call(this,e);break;case"toggle":iF(this,X,Q).call(this,e);break;case"focusout":iF(this,ei,ea).call(this,e);break;case"keydown":iF(this,en,er).call(this,e)}}connectedCallback(){var e,t;iZ(this,L).observe(this.defaultSlot,{childList:!0}),iK(this,C,iP(this.shadowRoot,":host")),iF(this,N,H).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),iK(this,k,iN(this)),null==(t=null==(e=iZ(this,k))?void 0:e.associateElement)||t.call(e,this),this.hidden||(iC(i5(this),iZ(this,$)),iC(this,iZ(this,q))),iF(this,_,R).call(this),this.shadowRoot.addEventListener("slotchange",this)}disconnectedCallback(){var e,t;iZ(this,L).disconnect(),iM(i5(this),iZ(this,$)),iM(this,iZ(this,q)),this.disable(),null==(t=null==(e=iZ(this,k))?void 0:e.unassociateElement)||t.call(e,this),iK(this,k,null),iK(this,A,null),iK(this,x,null),this.shadowRoot.removeEventListener("slotchange",this)}attributeChangedCallback(e,t,i){var a,n,r,s;e===iQ&&i!==t?(iZ(this,S)||iK(this,S,!0),this.hidden?iF(this,U,V).call(this):iF(this,P,B).call(this),this.dispatchEvent(new i_({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===tN.MEDIA_CONTROLLER?(t&&(null==(n=null==(a=iZ(this,k))?void 0:a.unassociateElement)||n.call(a,this),iK(this,k,null)),i&&this.isConnected&&(iK(this,k,iN(this)),null==(s=null==(r=iZ(this,k))?void 0:r.associateElement)||s.call(r,this))):e===i0&&i!==t?null==i?this.enable():this.disable():e===iX&&i!==t&&iF(this,N,H).call(this)}formatMenuItemText(e,t){return this.constructor.formatMenuItemText(e,t)}get anchor(){return this.getAttribute("anchor")}set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?null==(e=iO(this))?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(i2)}get radioGroupItems(){return this.items.filter(e=>"menuitemradio"===e.role)}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,t;return null!=(t=null==(e=this.checkedItems[0])?void 0:e.value)?t:""}set value(e){let t=this.items.find(t=>t.value===e);t&&iF(this,eh,em).call(this,t)}focus(){if(iK(this,A,function e(t=document){var i;let a=null==t?void 0:t.activeElement;return a?null!=(i=e(a.shadowRoot))?i:a:null}()),this.items.length){iF(this,eu,ec).call(this,this.items[0]),this.items[0].focus();return}let e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');null==e||e.focus()}handleSelect(e){var t;let i=iF(this,es,eo).call(this,e);i&&(iF(this,eh,em).call(this,i,"checkbox"===i.type),iZ(this,x)&&!this.hidden&&(null==(t=iZ(this,A))||t.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var t,i;let{key:a}=e,n=this.items,r=null!=(i=null!=(t=iF(this,es,eo).call(this,e))?t:iF(this,el,ed).call(this))?i:n[0],s=Math.max(0,n.indexOf(r));"ArrowDown"===a?s++:"ArrowUp"===a?s--:"Home"===e.key?s=0:"End"===e.key&&(s=n.length-1),s<0&&(s=n.length-1),s>n.length-1&&(s=0),iF(this,eu,ec).call(this,n[s]),n[s].focus()}};function i2(e){return["menuitem","menuitemradio","menuitemcheckbox"].includes(null==e?void 0:e.role)}function i5(e){var t;return null!=(t=e.getAttribute("bounds")?iW(e,`#${e.getAttribute("bounds")}`):iD(e)||e.parentElement)?t:e}k=new WeakMap,A=new WeakMap,x=new WeakMap,T=new WeakMap,L=new WeakMap,S=new WeakMap,C=new WeakMap,M=new WeakSet,I=function(e){let t=e.target;for(let e of t.assignedNodes({flatten:!0}))3===e.nodeType&&""===e.textContent.trim()&&e.remove();["header","title"].includes(t.name)&&iF(this,_,R).call(this),t.name||iZ(this,D).call(this)},_=new WeakSet,R=function(){let e=this.shadowRoot.querySelector('slot[name="header"]');e.hidden=0===this.shadowRoot.querySelector('slot[name="title"]').assignedNodes().length&&0===e.assignedNodes().length},D=new WeakMap,N=new WeakSet,H=function(){var e;let t=this.shadowRoot.querySelector("#layout-row"),i=null==(e=getComputedStyle(this).getPropertyValue("--media-menu-layout"))?void 0:e.trim();t.setAttribute("media","row"===i?"":"width:0")},W=new WeakSet,O=function(e){iK(this,x,e.relatedTarget),iH(this,e.relatedTarget)||(this.hidden=!this.hidden)},P=new WeakSet,B=function(){var e;null==(e=iZ(this,x))||e.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),iC(i5(this),iZ(this,$)),iC(this,iZ(this,q))},U=new WeakSet,V=function(){var e;null==(e=iZ(this,x))||e.setAttribute("aria-expanded","false"),iM(i5(this),iZ(this,$)),iM(this,iZ(this,q))},$=new WeakMap,q=new WeakMap,j=new WeakSet,z=function(e){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;let{x:t,y:i}=function({anchor:e,floating:t,placement:i}){let{x:a,y:n}=function({anchor:e,floating:t},i){let a,n="x"==(["top","bottom"].includes(ix(i))?"y":"x")?"y":"x",r="y"===n?"height":"width",s=ix(i),o=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,d=e[r]/2-t[r]/2;switch(s){case"top":a={x:o,y:e.y-t.height};break;case"bottom":a={x:o,y:e.y+e.height};break;case"right":a={x:e.x+e.width,y:l};break;case"left":a={x:e.x-t.width,y:l};break;default:a={x:e.x,y:e.y}}switch(i.split("-")[1]){case"start":a[n]-=d;break;case"end":a[n]+=d}return a}(function({anchor:e,floating:t}){var i,a,n;let r,s;return{anchor:(i=e,a=t.offsetParent,r=i.getBoundingClientRect(),s=null!=(n=null==a?void 0:a.getBoundingClientRect())?n:{x:0,y:0},{x:r.x-s.x,y:r.y-s.y,width:r.width,height:r.height}),floating:{x:0,y:0,width:t.offsetWidth,height:t.offsetHeight}}}({anchor:e,floating:t}),i);return{x:a,y:n}}({anchor:this.anchorElement,floating:this,placement:"top-start"});null!=e||(e=this.offsetWidth);let a=i5(this).getBoundingClientRect(),n=a.width-t-e,r=a.height-i-this.offsetHeight,{style:s}=iZ(this,C);s.setProperty("position","absolute"),s.setProperty("right",`${Math.max(0,n)}px`),s.setProperty("--_menu-bottom",`${r}px`);let o=getComputedStyle(this),l=s.getPropertyValue("--_menu-bottom")===o.bottom?r:parseFloat(o.bottom),d=a.height-l-parseFloat(o.marginBottom);this.style.setProperty("--_menu-max-height",`${d}px`)},Z=new WeakSet,G=function(e){let t=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=null==t?void 0:t.querySelector('[role="menu"]'),{style:a}=iZ(this,C);if(e||a.setProperty("--media-menu-transition-in","none"),i){let e=i.offsetHeight,a=Math.max(i.offsetWidth,t.offsetWidth);this.style.setProperty("min-width",`${a}px`),this.style.setProperty("min-height",`${e}px`),iF(this,j,z).call(this,a)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),iF(this,j,z).call(this);a.removeProperty("--media-menu-transition-in")},K=new WeakSet,F=function(e){var t;if(e.stopPropagation(),e.composedPath().includes(iZ(this,Y,J))){null==(t=iZ(this,A))||t.focus(),this.hidden=!0;return}let i=iF(this,es,eo).call(this,e);!i||i.hasAttribute("disabled")||(iF(this,eu,ec).call(this,i),this.handleSelect(e))},Y=new WeakSet,J=function(){var e;return null==(e=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))?void 0:e.find(e=>e.matches('button[part~="back"]'))},X=new WeakSet,Q=function(e){if(e.target===this)return;iF(this,ee,et).call(this);let t=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(let i of t)i.invokeTargetElement!=e.target&&("open"!=e.newState||"true"!=i.getAttribute("aria-expanded")||i.invokeTargetElement.hidden||i.invokeTargetElement.dispatchEvent(new iI({relatedTarget:i})));for(let e of t)e.setAttribute("aria-expanded",`${!e.submenuElement.hidden}`);iF(this,Z,G).call(this,!0)},ee=new WeakSet,et=function(){let e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)},ei=new WeakSet,ea=function(e){var t;iH(this,e.relatedTarget)||(iZ(this,S)&&(null==(t=iZ(this,A))||t.focus()),iZ(this,x)&&iZ(this,x)!==e.relatedTarget&&!this.hidden&&(this.hidden=!0))},en=new WeakSet,er=function(e){var t,i,a,n,r;let{key:s,ctrlKey:o,altKey:l,metaKey:d}=e;if(!o&&!l&&!d&&this.keysUsed.includes(s))if(e.preventDefault(),e.stopPropagation(),"Tab"===s){if(iZ(this,S)){this.hidden=!0;return}e.shiftKey?null==(i=null==(t=this.previousElementSibling)?void 0:t.focus)||i.call(t):null==(n=null==(a=this.nextElementSibling)?void 0:a.focus)||n.call(a),this.blur()}else"Escape"===s?(null==(r=iZ(this,A))||r.focus(),iZ(this,S)&&(this.hidden=!0)):"Enter"===s||" "===s?this.handleSelect(e):this.handleMove(e)},es=new WeakSet,eo=function(e){return e.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))},el=new WeakSet,ed=function(){return this.items.find(e=>0===e.tabIndex)},eu=new WeakSet,ec=function(e){for(let t of this.items)t.tabIndex=t===e?0:-1},eh=new WeakSet,em=function(e,t){let i=[...this.checkedItems];"radio"===e.type&&this.radioGroupItems.forEach(e=>e.checked=!1),t?e.checked=!e.checked:e.checked=!0,this.checkedItems.some((e,t)=>e!=i[t])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},i1.shadowRootOptions={mode:"open"},i1.getTemplateHTML=function(e){return`
`},tz.customElements.get("media-chrome-menu")||tz.customElements.define("media-chrome-menu",i1);var i3=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},i4=(e,t,i)=>(i3(e,t,"read from private field"),i?i.call(e):t.get(e)),i7=(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)},i8=(e,t,i,a)=>(i3(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),i9=(e,t,i)=>(i3(e,t,"access private method"),i),i6="type",ae="value",at="checked",ai="disabled",aa=class extends tz.HTMLElement{constructor(){if(super(),i7(this,ef),i7(this,eb),i7(this,eE),i7(this,eT),i7(this,ep,!1),i7(this,ev,void 0),i7(this,ek,()=>{var e,t;this.submenuElement.items&&this.setAttribute("submenusize",`${this.submenuElement.items.length}`);let i=this.shadowRoot.querySelector('slot[name="description"]'),a=null==(e=this.submenuElement.checkedItems)?void 0:e[0],n=null!=(t=null==a?void 0:a.dataset.description)?t:null==a?void 0:a.text,r=tZ.createElement("span");r.textContent=null!=n?n:"",i.replaceChildren(r)}),i7(this,eA,e=>{let{key:t}=e;this.keysUsed.includes(t)?this.handleClick(e):this.removeEventListener("keyup",i4(this,eA))}),i7(this,ex,e=>{let{metaKey:t,altKey:i,key:a}=e;t||i||!this.keysUsed.includes(a)?this.removeEventListener("keyup",i4(this,eA)):this.addEventListener("keyup",i4(this,eA),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=iR(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[i6,ai,at,ae]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),an(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","false"),this.addEventListener("click",this),this.addEventListener("keydown",this)}disable(){this.removeAttribute("tabindex"),this.removeEventListener("click",this),this.removeEventListener("keydown",this),this.removeEventListener("keyup",this)}handleEvent(e){switch(e.type){case"slotchange":i9(this,ef,eg).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":i4(this,ex).call(this,e);break;case"keyup":i4(this,eA).call(this,e)}}attributeChangedCallback(e,t,i){e===at&&an(this)&&!i4(this,ep)?this.setAttribute("aria-checked",null!=i?"true":"false"):e===i6&&i!==t?this.role="menuitem"+i:e===ai&&i!==t&&(null==i?this.enable():this.disable())}connectedCallback(){this.hasAttribute(ai)||this.enable(),this.role="menuitem"+this.type,i8(this,ev,function e(t,i){if(!t)return null;let{host:a}=t.getRootNode();return!i&&a?e(t,a):(null==i?void 0:i.items)?i:e(i,null==i?void 0:i.parentNode)}(this,this.parentNode)),i9(this,eT,eL).call(this),this.submenuElement&&i9(this,eb,ey).call(this),this.shadowRoot.addEventListener("slotchange",this)}disconnectedCallback(){this.disable(),i9(this,eT,eL).call(this),i8(this,ev,null),this.shadowRoot.removeEventListener("slotchange",this)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?null==(e=iO(this))?void 0:e.querySelector(`#${this.invokeTarget}`):this.submenuElement}get submenuElement(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}get type(){var e;return null!=(e=this.getAttribute(i6))?e:""}set type(e){this.setAttribute(i6,`${e}`)}get value(){var e;return null!=(e=this.getAttribute(ae))?e:this.text}set value(e){this.setAttribute(ae,e)}get text(){var e;return(null!=(e=this.textContent)?e:"").trim()}get checked(){if(an(this))return"true"===this.getAttribute("aria-checked")}set checked(e){an(this)&&(i8(this,ep,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){!an(this)&&this.invokeTargetElement&&iH(this,e.target)&&this.invokeTargetElement.dispatchEvent(new iI({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}};function an(e){return"radio"===e.type||"checkbox"===e.type}ep=new WeakMap,ev=new WeakMap,ef=new WeakSet,eg=function(e){let t=e.target;if(!(null==t?void 0:t.name))for(let e of t.assignedNodes({flatten:!0}))e instanceof Text&&""===e.textContent.trim()&&e.remove();"submenu"===t.name&&(this.submenuElement?i9(this,eb,ey).call(this):i9(this,eE,ew).call(this))},eb=new WeakSet,ey=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",i4(this,ek)),this.submenuElement.addEventListener("addmenuitem",i4(this,ek)),this.submenuElement.addEventListener("removemenuitem",i4(this,ek)),i4(this,ek).call(this)},eE=new WeakSet,ew=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",i4(this,ek)),this.submenuElement.removeEventListener("addmenuitem",i4(this,ek)),this.submenuElement.removeEventListener("removemenuitem",i4(this,ek)),i4(this,ek).call(this)},ek=new WeakMap,eA=new WeakMap,ex=new WeakMap,eT=new WeakSet,eL=function(){var e;let t=null==(e=i4(this,ev))?void 0:e.radioGroupItems;if(!t)return;let i=t.filter(e=>"true"===e.getAttribute("aria-checked")).pop();for(let e of(i||(i=t[0]),t))e.setAttribute("aria-checked","false");null==i||i.setAttribute("aria-checked","true")},aa.shadowRootOptions={mode:"open"},aa.getTemplateHTML=function(e){return` ${this.getSuffixSlotInnerHTML(e)} `},aa.getSuffixSlotInnerHTML=function(e){return""},tz.customElements.get("media-chrome-menu-item")||tz.customElements.define("media-chrome-menu-item",aa);var ar=class extends i1{get anchorElement(){return"auto"!==this.anchor?super.anchorElement:iD(this).querySelector("media-settings-menu-button")}};ar.getTemplateHTML=function(e){return` ${i1.getTemplateHTML(e)} `},tz.customElements.get("media-settings-menu")||tz.customElements.define("media-settings-menu",ar);var as=class extends aa{};as.shadowRootOptions={mode:"open"},as.getTemplateHTML=function(e){return` ${aa.getTemplateHTML.call(this,e)} `},as.getSuffixSlotInnerHTML=function(e){return` `},tz.customElements.get("media-settings-menu-item")||tz.customElements.define("media-settings-menu-item",as);var ao="placement",al="bounds",ad=class extends tz.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!function(e,{depth:t=3,checkOpacity:i=!0,checkVisibilityCSS:a=!0}={}){if(e.checkVisibility)return e.checkVisibility({checkOpacity:i,checkVisibilityCSS:a});let n=e;for(;n&&t>0;){let e=getComputedStyle(n);if(i&&"0"===e.opacity||a&&"hidden"===e.visibility||"none"===e.display)return!1;n=n.parentElement,t--}return!0}(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=iW(this,"#"+this.bounds))?e:iD(this);if(!a)return;let{x:n,width:r}=a.getBoundingClientRect(),{x:s,width:o}=this.getBoundingClientRect(),l=i.getPropertyValue("--media-tooltip-offset-x"),d=l?parseFloat(l.replace("px","")):0,u=i.getPropertyValue("--media-tooltip-container-margin"),c=u?parseFloat(u.replace("px","")):0,h=s-n+d-c,m=s+o-(n+r)+d+c;h<0?this.style.setProperty("--media-tooltip-offset-x",`${h}px`):m>0?this.style.setProperty("--media-tooltip-offset-x",`${m}px`):this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=iR(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[ao,al]}get placement(){return iq(this,ao)}set placement(e){ij(this,ao,e)}get bounds(){return iq(this,al)}set bounds(e){ij(this,al,e)}};ad.shadowRootOptions={mode:"open"},ad.getTemplateHTML=function(e){return`
`},tz.customElements.get("media-tooltip")||tz.customElements.define("media-tooltip",ad);var au=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},ac=(e,t,i)=>(au(e,t,"read from private field"),i?i.call(e):t.get(e)),ah=(e,t,i)=>{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)},am=(e,t,i,a)=>(au(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),ap=(e,t,i)=>(au(e,t,"access private method"),i),av="tooltipplacement",af="disabled",ag="notooltip",ab=class extends tz.HTMLElement{constructor(){if(super(),ah(this,eM),ah(this,eN),ah(this,eS,void 0),this.preventClick=!1,this.tooltipEl=null,ah(this,eC,e=>{this.preventClick||this.handleClick(e),setTimeout(ac(this,e_),0)}),ah(this,e_,()=>{var e,t;null==(t=null==(e=this.tooltipEl)?void 0:e.updateXOffset)||t.call(e)}),ah(this,eR,e=>{let{key:t}=e;this.keysUsed.includes(t)?this.preventClick||this.handleClick(e):this.removeEventListener("keyup",ac(this,eR))}),ah(this,eD,e=>{let{metaKey:t,altKey:i,key:a}=e;t||i||!this.keysUsed.includes(a)?this.removeEventListener("keyup",ac(this,eR)):this.addEventListener("keyup",ac(this,eR),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);let e=iR(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",av,tN.MEDIA_CONTROLLER,tW.MEDIA_LANG]}enable(){this.addEventListener("click",ac(this,eC)),this.addEventListener("keydown",ac(this,eD)),this.tabIndex=0}disable(){this.removeEventListener("click",ac(this,eC)),this.removeEventListener("keydown",ac(this,eD)),this.removeEventListener("keyup",ac(this,eR)),this.tabIndex=-1}attributeChangedCallback(e,t,i){var a,n,r,s,o;e===tN.MEDIA_CONTROLLER?(t&&(null==(n=null==(a=ac(this,eS))?void 0:a.unassociateElement)||n.call(a,this),am(this,eS,null)),i&&this.isConnected&&(am(this,eS,null==(r=this.getRootNode())?void 0:r.getElementById(i)),null==(o=null==(s=ac(this,eS))?void 0:s.associateElement)||o.call(s,this))):"disabled"===e&&i!==t?null==i?this.enable():this.disable():e===av&&this.tooltipEl&&i!==t?this.tooltipEl.placement=i:e===tW.MEDIA_LANG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),ap(this,eM,eI).call(this)&&ac(this,e_).call(this)}connectedCallback(){var e,t,i,a,n;let r,{style:s}=(a=this.shadowRoot,n=":host",(r=function(e,t){var i,a;let n;for(n of null!=(i=e.querySelectorAll("style:not([media])"))?i:[]){let e;try{e=null==(a=n.sheet)?void 0:a.cssRules}catch{continue}for(let i of null!=e?e:[])if(t(i.selectorText))return i}}(a,e=>e===n))||iP(a,n));s.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");let o=this.getAttribute(tN.MEDIA_CONTROLLER);o&&(am(this,eS,null==(e=this.getRootNode())?void 0:e.getElementById(o)),null==(i=null==(t=ac(this,eS))?void 0:t.associateElement)||i.call(t,this)),tz.customElements.whenDefined("media-tooltip").then(()=>ap(this,eN,eH).call(this))}disconnectedCallback(){var e,t;this.disable(),null==(t=null==(e=ac(this,eS))?void 0:e.unassociateElement)||t.call(e,this),am(this,eS,null),this.removeEventListener("mouseenter",ac(this,e_)),this.removeEventListener("focus",ac(this,e_)),this.removeEventListener("click",ac(this,eC))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return iq(this,av)}set tooltipPlacement(e){ij(this,av,e)}get mediaController(){return iq(this,tN.MEDIA_CONTROLLER)}set mediaController(e){ij(this,tN.MEDIA_CONTROLLER,e)}get disabled(){return iV(this,af)}set disabled(e){i$(this,af,e)}get noTooltip(){return iV(this,ag)}set noTooltip(e){i$(this,ag,e)}handleClick(e){}};eS=new WeakMap,eC=new WeakMap,eM=new WeakSet,eI=function(){try{return this.matches(":hover, :focus-visible")}catch{return this.matches(":hover, :focus")}},e_=new WeakMap,eR=new WeakMap,eD=new WeakMap,eN=new WeakSet,eH=function(){this.addEventListener("mouseenter",ac(this,e_)),this.addEventListener("focus",ac(this,e_)),this.addEventListener("click",ac(this,eC));let e=this.tooltipPlacement;e&&this.tooltipEl&&(this.tooltipEl.placement=e)},ab.shadowRootOptions={mode:"open"},ab.getTemplateHTML=function(e,t={}){return` ${this.getSlotTemplateHTML(e,t)} ${ad.getTemplateHTML({})} ${this.getTooltipContentHTML(e)} `},ab.getSlotTemplateHTML=function(e,t){return` `},ab.getTooltipContentHTML=function(){return""},tz.customElements.get("media-chrome-button")||tz.customElements.define("media-chrome-button",ab);var ay=class extends ab{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?null==(e=iO(this))?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;null==(e=this.invokeTargetElement)||e.dispatchEvent(new iI({relatedTarget:this}))}};tz.customElements.get("media-chrome-menu-button")||tz.customElements.define("media-chrome-menu-button",ay);var aE={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 Error","A network error caused the media download to fail.":"A network error caused the media download to fail.","A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.":"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.","An unsupported error occurred. The server or network failed, or your browser does not support this format.":"An unsupported error occurred. The server or network failed, or your browser does not support this format.","The media is encrypted and there are no keys to decrypt it.":"The media is encrypted and there are no keys to decrypt it.",hour:"hour",hours:"hours",minute:"minute",minutes:"minutes",second:"second",seconds:"seconds","{time} remaining":"{time} remaining","{currentTime} of {totalTime}":"{currentTime} of {totalTime}","video not loaded, unknown time.":"video not loaded, unknown time."}},aw=(null==(eW=globalThis.navigator)?void 0:eW.language)||"en",ak=(e,t={})=>(e=>{var t,i,a;let[n]=aw.split("-");return(null==(t=aE[aw])?void 0:t[e])||(null==(i=aE[n])?void 0:i[e])||(null==(a=aE.en)?void 0:a[e])||e})(e).replace(/\{(\w+)\}/g,(e,i)=>i in t?String(t[i]):`{${i}}`),aA=class extends ay{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",ak("settings"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:iD(this).querySelector("media-settings-menu")}};aA.getSlotTemplateHTML=function(){return` `},aA.getTooltipContentHTML=function(){return ak("Settings")},tz.customElements.get("media-settings-menu-button")||tz.customElements.define("media-settings-menu-button",aA);var ax=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},aT=(e,t,i)=>(ax(e,t,"read from private field"),i?i.call(e):t.get(e)),aL=(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)},aS=(e,t,i,a)=>(ax(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),aC=(e,t,i)=>(ax(e,t,"access private method"),i),aM=class extends i1{constructor(){super(...arguments),aL(this,eB),aL(this,eV),aL(this,eO,[]),aL(this,eP,void 0)}static get observedAttributes(){return[...super.observedAttributes,tW.MEDIA_AUDIO_TRACK_LIST,tW.MEDIA_AUDIO_TRACK_ENABLED,tW.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===tW.MEDIA_AUDIO_TRACK_ENABLED&&t!==i)this.value=i;else if(e===tW.MEDIA_AUDIO_TRACK_LIST&&t!==i){var a;aS(this,eO,null==(a=null!=i?i:"")?void 0:a.split(/\s+/).map(t6)),aC(this,eB,eU).call(this)}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",aC(this,eV,e$))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",aC(this,eV,e$))}get anchorElement(){var e;return"auto"!==this.anchor?super.anchorElement:null==(e=iD(this))?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return aT(this,eO)}set mediaAudioTrackList(e){aS(this,eO,e),aC(this,eB,eU).call(this)}get mediaAudioTrackEnabled(){var e;return null!=(e=iq(this,tW.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){ij(this,tW.MEDIA_AUDIO_TRACK_ENABLED,e)}};eO=new WeakMap,eP=new WeakMap,eB=new WeakSet,eU=function(){if(aT(this,eP)===JSON.stringify(this.mediaAudioTrackList))return;aS(this,eP,JSON.stringify(this.mediaAudioTrackList));let e=this.mediaAudioTrackList;for(let t of(this.defaultSlot.textContent="",e.sort((e,t)=>e.id.localeCompare(t.id,void 0,{numeric:!0})),e)){let e=iY({type:"radio",text:this.formatMenuItemText(t.label,t),value:`${t.id}`,checked:t.enabled});e.prepend(iJ(this,"checked-indicator")),this.defaultSlot.append(e)}},eV=new WeakSet,e$=function(){if(null==this.value)return;let e=new tz.CustomEvent("mediaaudiotrackrequest",{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},tz.customElements.get("media-audio-track-menu")||tz.customElements.define("media-audio-track-menu",aM);var aI=` `,a_=e=>{let t=ak("Audio");e.setAttribute("aria-label",t)},aR=class extends ay{static get observedAttributes(){return[...super.observedAttributes,tW.MEDIA_AUDIO_TRACK_ENABLED,tW.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),a_(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===tW.MEDIA_LANG&&a_(this)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=iD(this))?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return null!=(e=iq(this,tW.MEDIA_AUDIO_TRACK_ENABLED))?e:""}set mediaAudioTrackEnabled(e){ij(this,tW.MEDIA_AUDIO_TRACK_ENABLED,e)}};aR.getSlotTemplateHTML=function(){return` ${aI} `},aR.getTooltipContentHTML=function(){return ak("Audio")},tz.customElements.get("media-audio-track-menu-button")||tz.customElements.define("media-audio-track-menu-button",aR);var aD=(e="",t={})=>((e="")=>e.split(/\s+/))(e).map(e=>{let i=((e="")=>{let[t,i,a]=e.split(":");return{kind:"cc"===t?"captions":"subtitles",language:i,label:a?decodeURIComponent(a):void 0}})(e);return{...t,...i}}),aN=({kind:e,label:t,language:i}={kind:"subtitles"})=>t?`${"captions"===e?"cc":"sb"}:${i}:${encodeURIComponent(t)}`:i,aH=(e=[])=>Array.prototype.map.call(e,aN).join(" "),aW=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},aO=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},aP=(e,t,i)=>(aW(e,t,"access private method"),i),aB=` `,aU=class extends i1{constructor(){super(...arguments),aO(this,ej),aO(this,eZ),aO(this,eq,void 0)}static get observedAttributes(){return[...super.observedAttributes,tW.MEDIA_SUBTITLES_LIST,tW.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===tW.MEDIA_SUBTITLES_LIST&&t!==i?aP(this,ej,ez).call(this):e===tW.MEDIA_SUBTITLES_SHOWING&&t!==i&&(this.value=i||"",aP(this,ej,ez).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",aP(this,eZ,eG))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",aP(this,eZ,eG))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:iD(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return aV(this,tW.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){a$(this,tW.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return aV(this,tW.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){a$(this,tW.MEDIA_SUBTITLES_SHOWING,e)}};eq=new WeakMap,ej=new WeakSet,ez=function(){var e,t,i,a;let n=(aW(this,t=eq,"read from private field"),t.get(this)!==JSON.stringify(this.mediaSubtitlesList)),r=this.value!==this.getAttribute(tW.MEDIA_SUBTITLES_SHOWING);if(!n&&!r)return;i=eq,a=JSON.stringify(this.mediaSubtitlesList),aW(this,i,"write to private field"),i.set(this,a),this.defaultSlot.textContent="";let s=!this.value,o=iY({type:"radio",text:this.formatMenuItemText(ak("Off")),value:"off",checked:s});for(let t of(o.prepend(iJ(this,"checked-indicator")),this.defaultSlot.append(o),this.mediaSubtitlesList)){let i=iY({type:"radio",text:this.formatMenuItemText(t.label,t),value:aN(t),checked:this.value==aN(t)});i.prepend(iJ(this,"checked-indicator")),"captions"===(null!=(e=t.kind)?e:"subs")&&i.append(iJ(this,"captions-indicator")),this.defaultSlot.append(i)}},eZ=new WeakSet,eG=function(){let e=this.mediaSubtitlesShowing,t=this.getAttribute(tW.MEDIA_SUBTITLES_SHOWING),i=this.value!==t;if((null==e?void 0:e.length)&&i&&this.dispatchEvent(new tz.CustomEvent("mediadisablesubtitlesrequest",{composed:!0,bubbles:!0,detail:e})),!this.value||!i)return;let a=new tz.CustomEvent("mediashowsubtitlesrequest",{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)},aU.getTemplateHTML=function(e){return` ${i1.getTemplateHTML(e)} ${aB} `};var aV=(e,t)=>{let i=e.getAttribute(t);return i?aD(i):[]},a$=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=aH(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};tz.customElements.get("media-captions-menu")||tz.customElements.define("media-captions-menu",aU);var aq=` `,aj=` `,az=e=>{var t;e.setAttribute("data-captions-enabled",(!!(null==(t=e.mediaSubtitlesShowing)?void 0:t.length)||e.hasAttribute(tW.MEDIA_SUBTITLES_SHOWING)).toString())},aZ=e=>{e.setAttribute("aria-label",ak("closed captions"))},aG=class extends ay{static get observedAttributes(){return[...super.observedAttributes,tW.MEDIA_SUBTITLES_LIST,tW.MEDIA_SUBTITLES_SHOWING,tW.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),aZ(this),az(this)}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===tW.MEDIA_SUBTITLES_SHOWING?az(this):e===tW.MEDIA_LANG&&aZ(this)}get invokeTargetElement(){var e;return void 0!=this.invokeTarget?super.invokeTargetElement:null==(e=iD(this))?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return aK(this,tW.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){aF(this,tW.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return aK(this,tW.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){aF(this,tW.MEDIA_SUBTITLES_SHOWING,e)}};aG.getSlotTemplateHTML=function(){return` ${aq} ${aj} `},aG.getTooltipContentHTML=function(){return ak("Captions")};var aK=(e,t)=>{let i=e.getAttribute(t);return i?aD(i):[]},aF=(e,t,i)=>{if(!(null==i?void 0:i.length))return void e.removeAttribute(t);let a=aH(i);e.getAttribute(t)!==a&&e.setAttribute(t,a)};tz.customElements.get("media-captions-menu-button")||tz.customElements.define("media-captions-menu-button",aG);var aY=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},aJ=(e,t,i)=>(aY(e,t,"read from private field"),i?i.call(e):t.get(e)),aX=(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)},aQ=(e,t,i,a)=>(aY(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),a0=class{constructor(e,t,{defaultValue:i}={defaultValue:void 0}){aX(this,eX),aX(this,eK,void 0),aX(this,eF,void 0),aX(this,eY,void 0),aX(this,eJ,new Set),aQ(this,eK,e),aQ(this,eF,t),aQ(this,eY,new Set(i))}[Symbol.iterator](){return aJ(this,eX,eQ).values()}get length(){return aJ(this,eX,eQ).size}get value(){var e;return null!=(e=[...aJ(this,eX,eQ)].join(" "))?e:""}set value(e){var t;e!==this.value&&(aQ(this,eJ,new Set),this.add(...null!=(t=null==e?void 0:e.split(" "))?t:[]))}toString(){return this.value}item(e){return[...aJ(this,eX,eQ)][e]}values(){return aJ(this,eX,eQ).values()}forEach(e,t){aJ(this,eX,eQ).forEach(e,t)}add(...e){var t,i;e.forEach(e=>aJ(this,eJ).add(e)),(""!==this.value||(null==(t=aJ(this,eK))?void 0:t.hasAttribute(`${aJ(this,eF)}`)))&&(null==(i=aJ(this,eK))||i.setAttribute(`${aJ(this,eF)}`,`${this.value}`))}remove(...e){var t;e.forEach(e=>aJ(this,eJ).delete(e)),null==(t=aJ(this,eK))||t.setAttribute(`${aJ(this,eF)}`,`${this.value}`)}contains(e){return aJ(this,eX,eQ).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}};eK=new WeakMap,eF=new WeakMap,eY=new WeakMap,eJ=new WeakMap,eX=new WeakSet,eQ=function(){return aJ(this,eJ).size?aJ(this,eJ):aJ(this,eY)};var a1=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot read from private field");return i?i.call(e):t.get(e)},a2="rates",a5=[1,1.2,1.5,1.7,2];function a3(e){return Math.round(100*e)/100}var a4=class extends ab{constructor(){super();var e,t=e0,i=new a0(this,a2,{defaultValue:a5});if(t.has(this))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(this):t.set(this,i),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${a3(null!=(e=this.mediaPlaybackRate)?e:1)}x`}static get observedAttributes(){return[...super.observedAttributes,tW.MEDIA_PLAYBACK_RATE,a2]}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===a2&&(a1(this,e0).value=i),e===tW.MEDIA_PLAYBACK_RATE){let e=i?+i:0/0,t=a3(Number.isNaN(e)?1:e);this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",ak("Playback rate {playbackRate}",{playbackRate:t}))}}get rates(){return a1(this,e0)}set rates(e){e?Array.isArray(e)?a1(this,e0).value=e.join(" "):"string"==typeof e&&(a1(this,e0).value=e):a1(this,e0).value=""}get mediaPlaybackRate(){return iB(this,tW.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){iU(this,tW.MEDIA_PLAYBACK_RATE,e)}handleClick(){var e,t;let i=Array.from(a1(this,e0).values(),e=>+e).sort((e,t)=>e-t),a=null!=(t=null!=(e=i.find(e=>e>this.mediaPlaybackRate))?e:i[0])?t:1,n=new tz.CustomEvent(tD,{composed:!0,bubbles:!0,detail:a});this.dispatchEvent(n)}};e0=new WeakMap,a4.getSlotTemplateHTML=function(e){let t=e.mediaplaybackrate?a3(+e.mediaplaybackrate):1;return` ${t}x `},a4.getTooltipContentHTML=function(){return ak("Playback rate")},tz.customElements.get("media-playback-rate-button")||tz.customElements.define("media-playback-rate-button",a4);var a7=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},a8=(e,t,i)=>(a7(e,t,"read from private field"),i?i.call(e):t.get(e)),a9=(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)},a6=(e,t,i)=>(a7(e,t,"access private method"),i),ne="rates",nt=class extends i1{constructor(){super(),a9(this,e2),a9(this,e3),a9(this,e1,new a0(this,ne,{defaultValue:a5})),a6(this,e2,e5).call(this)}static get observedAttributes(){return[...super.observedAttributes,tW.MEDIA_PLAYBACK_RATE,ne]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),e===tW.MEDIA_PLAYBACK_RATE&&t!=i?(this.value=i,a6(this,e2,e5).call(this)):e===ne&&t!=i&&(a8(this,e1).value=i,a6(this,e2,e5).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",a6(this,e3,e4))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",a6(this,e3,e4))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:iD(this).querySelector("media-playback-rate-menu-button")}get rates(){return a8(this,e1)}set rates(e){e?Array.isArray(e)?a8(this,e1).value=e.join(" "):"string"==typeof e&&(a8(this,e1).value=e):a8(this,e1).value="",a6(this,e2,e5).call(this)}get mediaPlaybackRate(){return iB(this,tW.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){iU(this,tW.MEDIA_PLAYBACK_RATE,e)}};e1=new WeakMap,e2=new WeakSet,e5=function(){this.defaultSlot.textContent="";let e=a3(this.mediaPlaybackRate),t=new Set(Array.from(a8(this,e1)).map(e=>a3(Number(e))));for(let i of(e>0&&!t.has(e)&&t.add(e),Array.from(t).sort((e,t)=>e-t))){let t=iY({type:"radio",text:this.formatMenuItemText(`${i}x`,i),value:i.toString(),checked:e===i});t.prepend(iJ(this,"checked-indicator")),this.defaultSlot.append(t)}},e3=new WeakSet,e4=function(){if(!this.value)return;let e=new tz.CustomEvent(tD,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},tz.customElements.get("media-playback-rate-menu")||tz.customElements.define("media-playback-rate-menu",nt);var ni=class extends ay{static get observedAttributes(){return[...super.observedAttributes,tW.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${a3(null!=(e=this.mediaPlaybackRate)?e:1)}x`}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),e===tW.MEDIA_PLAYBACK_RATE){let e=i?+i:0/0,t=a3(Number.isNaN(e)?1:e);this.container.innerHTML=`${t}x`,this.setAttribute("aria-label",ak("Playback rate {playbackRate}",{playbackRate:t}))}}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:iD(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return iB(this,tW.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){iU(this,tW.MEDIA_PLAYBACK_RATE,e)}};ni.getSlotTemplateHTML=function(e){let t=e.mediaplaybackrate?a3(+e.mediaplaybackrate):1;return` ${t}x `},ni.getTooltipContentHTML=function(){return ak("Playback rate")},tz.customElements.get("media-playback-rate-menu-button")||tz.customElements.define("media-playback-rate-menu-button",ni);var na=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nn=(e,t,i)=>(na(e,t,"read from private field"),i?i.call(e):t.get(e)),nr=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},ns=(e,t,i,a)=>(na(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),no=(e,t,i)=>(na(e,t,"access private method"),i),nl=class extends i1{constructor(){super(...arguments),nr(this,e9),nr(this,te),nr(this,e7,[]),nr(this,e8,{})}static get observedAttributes(){return[...super.observedAttributes,tW.MEDIA_RENDITION_LIST,tW.MEDIA_RENDITION_SELECTED,tW.MEDIA_RENDITION_UNAVAILABLE,tW.MEDIA_HEIGHT,tW.MEDIA_WIDTH]}static formatMenuItemText(e,t){return super.formatMenuItemText(e,t)}static formatRendition(e,{showBitrate:t=!1}={}){let i=`${Math.min(e.width,e.height)}p`;if(t&&e.bitrate){let t=e.bitrate/1e6,a=`${t.toFixed(+(t<1))} Mbps`;return`${i} (${a})`}return this.formatMenuItemText(i,e)}static compareRendition(e,t){var i,a;return t.height===e.height?(null!=(i=t.bitrate)?i:0)-(null!=(a=e.bitrate)?a:0):t.height-e.height}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),t!==i)switch(e){case tW.MEDIA_RENDITION_SELECTED:this.value=null!=i?i:"auto",no(this,e9,e6).call(this);break;case tW.MEDIA_RENDITION_LIST:ns(this,e7,null==i?void 0:i.split(/\s+/).map(t9)),no(this,e9,e6).call(this);break;case tW.MEDIA_HEIGHT:case tW.MEDIA_WIDTH:no(this,e9,e6).call(this)}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",no(this,te,tt))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",no(this,te,tt))}get anchorElement(){return"auto"!==this.anchor?super.anchorElement:iD(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return nn(this,e7)}set mediaRenditionList(e){ns(this,e7,e),no(this,e9,e6).call(this)}get mediaRenditionSelected(){return iq(this,tW.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){ij(this,tW.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return iB(this,tW.MEDIA_HEIGHT)}set mediaHeight(e){iU(this,tW.MEDIA_HEIGHT,e)}get mediaWidth(){return iB(this,tW.MEDIA_WIDTH)}set mediaWidth(e){iU(this,tW.MEDIA_WIDTH,e)}compareRendition(e,t){return this.constructor.compareRendition(e,t)}formatMenuItemText(e,t){return this.constructor.formatMenuItemText(e,t)}formatRendition(e,t){return this.constructor.formatRendition(e,t)}showRenditionBitrate(e){return this.mediaRenditionList.some(t=>t!==e&&t.height===e.height&&t.bitrate!==e.bitrate)}};e7=new WeakMap,e8=new WeakMap,e9=new WeakSet,e6=function(){let e,t=!this.mediaRenditionSelected;if(nn(this,e8).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&nn(this,e8).mediaHeight===this.mediaHeight&&nn(this,e8).mediaWidth===this.mediaWidth&&nn(this,e8).isAuto===t)return;nn(this,e8).mediaRenditionList=JSON.stringify(this.mediaRenditionList),nn(this,e8).mediaHeight=this.mediaHeight,nn(this,e8).mediaWidth=this.mediaWidth,nn(this,e8).isAuto=t;let i=this.mediaRenditionList.sort(this.compareRendition.bind(this)),a=i.find(e=>e.id===this.mediaRenditionSelected);for(let e of i)e.selected=e===a;for(let e of(this.defaultSlot.textContent="",i)){let i=iY({type:"radio",text:this.formatRendition(e,{showBitrate:this.showRenditionBitrate(e)}),value:`${e.id}`,checked:e.selected&&!t});i.prepend(iJ(this,"checked-indicator")),this.defaultSlot.append(i)}let n=a&&this.showRenditionBitrate(a);t&&(a?e=this.formatMenuItemText(`${ak("Auto")} • ${this.formatRendition(a,{showBitrate:n})}`,a):this.mediaHeight>0&&this.mediaWidth>0&&(e=this.formatMenuItemText(`${ak("Auto")} (${Math.min(this.mediaWidth,this.mediaHeight)}p)`))),e||(e=this.formatMenuItemText(ak("Auto")));let r=iY({type:"radio",text:e,value:"auto",checked:t});r.dataset.description=e,r.prepend(iJ(this,"checked-indicator")),this.defaultSlot.append(r)},te=new WeakSet,tt=function(){if(null==this.value)return;let e=new tz.CustomEvent("mediarenditionrequest",{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(e)},tz.customElements.get("media-rendition-menu")||tz.customElements.define("media-rendition-menu",nl);var nd=` `,nu=class extends ay{static get observedAttributes(){return[...super.observedAttributes,tW.MEDIA_RENDITION_SELECTED,tW.MEDIA_RENDITION_UNAVAILABLE,tW.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",ak("quality"))}get invokeTargetElement(){return void 0!=this.invokeTarget?super.invokeTargetElement:iD(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return iq(this,tW.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){ij(this,tW.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return iB(this,tW.MEDIA_HEIGHT)}set mediaHeight(e){iU(this,tW.MEDIA_HEIGHT,e)}};nu.getSlotTemplateHTML=function(){return` ${nd} `},nu.getTooltipContentHTML=function(){return ak("Quality")},tz.customElements.get("media-rendition-menu-button")||tz.customElements.define("media-rendition-menu-button",nu);var nc=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},nh=(e,t,i)=>(nc(e,t,"read from private field"),i?i.call(e):t.get(e)),nm=(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)},np=(e,t,i,a)=>(nc(e,t,"write to private field"),a?a.call(e,i):t.set(e,i),i),nv=(e,t,i)=>(nc(e,t,"access private method"),i),nf=class extends i1{constructor(){super(),nm(this,ta),nm(this,tr),nm(this,to),nm(this,td),nm(this,th),nm(this,ti,!1),nm(this,tc,e=>{let t=e.target,i=(null==t?void 0:t.nodeName)==="VIDEO",a=nv(this,td,tu).call(this,t);(i||a)&&(nh(this,ti)?nv(this,tr,ts).call(this):nv(this,th,tm).call(this,e))}),nm(this,tp,e=>{let t=e.target,i=this.contains(t),a=2===e.button,n=(null==t?void 0:t.nodeName)==="VIDEO",r=nv(this,td,tu).call(this,t);i||a&&(n||r)||nv(this,tr,ts).call(this)}),nm(this,tv,e=>{"Escape"===e.key&&nv(this,tr,ts).call(this)}),nm(this,tf,e=>{var t,i;let a=e.target;if(null==(t=a.matches)?void 0:t.call(a,'button[invoke="copy"]')){let e=null==(i=a.closest("media-context-menu-item"))?void 0:i.querySelector('input[slot="copy"]');e&&navigator.clipboard.writeText(e.value)}nv(this,tr,ts).call(this)}),this.setAttribute("noautohide",""),nv(this,ta,tn).call(this)}connectedCallback(){super.connectedCallback(),iD(this).addEventListener("contextmenu",nh(this,tc)),this.addEventListener("click",nh(this,tf))}disconnectedCallback(){super.disconnectedCallback(),iD(this).removeEventListener("contextmenu",nh(this,tc)),this.removeEventListener("click",nh(this,tf)),document.removeEventListener("mousedown",nh(this,tp)),document.removeEventListener("keydown",nh(this,tv))}};ti=new WeakMap,ta=new WeakSet,tn=function(){this.hidden=!nh(this,ti)},tr=new WeakSet,ts=function(){np(this,ti,!1),nv(this,ta,tn).call(this)},to=new WeakSet,tl=function(){document.querySelectorAll("media-context-menu").forEach(e=>{e!==this&&nv(e,tr,ts).call(e)})},td=new WeakSet,tu=function(e){return!!e&&(!!e.hasAttribute("slot")&&"media"===e.getAttribute("slot")||!!(e.nodeName.includes("-")&&e.tagName.includes("-"))&&(e.hasAttribute("src")||e.hasAttribute("poster")||e.hasAttribute("preload")||e.hasAttribute("playsinline")))},tc=new WeakMap,th=new WeakSet,tm=function(e){e.preventDefault(),nv(this,to,tl).call(this),np(this,ti,!0),this.style.position="fixed",this.style.left=`${e.clientX}px`,this.style.top=`${e.clientY}px`,nv(this,ta,tn).call(this),document.addEventListener("mousedown",nh(this,tp),{once:!0}),document.addEventListener("keydown",nh(this,tv),{once:!0})},tp=new WeakMap,tv=new WeakMap,tf=new WeakMap,nf.getTemplateHTML=function(e){return` ${i1.getTemplateHTML(e)} `},tz.customElements.get("media-context-menu")||tz.customElements.define("media-context-menu",nf);var ng=class extends aa{};ng.shadowRootOptions={mode:"open"},ng.getTemplateHTML=function(e){return` ${aa.getTemplateHTML.call(this,e)} `},tz.customElements.get("media-context-menu-item")||tz.customElements.define("media-context-menu-item",ng);var nb=tR.createElement("template");"innerHTML"in nb&&(nb.innerHTML=tT);var ny=class extends ik{};ny.template=null==(tb=null==(tg=nb.content)?void 0:tg.children)?void 0:tb[0],t_.customElements.get("media-theme-news")||t_.customElements.define("media-theme-news",ny);let nE=({currentIndex:e=0,relatedVideos:t,visible:i,selectVideoCallback:a})=>{let[n,r]=(0,tE.useState)(3),s=t[e],o=(0,tE.useRef)([...t]),l=(0,tE.useRef)(null),d=(0,tE.useRef)("");return(0,tE.useEffect)(()=>{if(!i){l.current&&(l.current.style.display=d.current,l.current=null);return}let e=!1,t=0,a=()=>{if(e)return;let i=function(){if("u" media-play-button")}catch{return null}}();if(i){l.current||(d.current=i.style.display,i.style.display="none",l.current=i);return}(t+=1)<40&&requestAnimationFrame(a)};return requestAnimationFrame(a),()=>{e=!0,l.current&&(l.current.style.display=d.current,l.current=null)}},[i]),(0,tE.useEffect)(()=>{if(!i)return void r(3);let s=e===t.length-1;if(n<0){if(s)a(0,!0);else{let i=e+1;i{r(e=>Math.max(e-1,-1))},500);return()=>clearInterval(o)},[n,i,e,t.length,a]),(0,tE.useEffect)(()=>{o.current.push(o.current.splice(o.current.findIndex(e=>e.playbackId===s.playbackId),1)[0])},[s.playbackId]),(0,ty.jsx)(ty.Fragment,{children:(0,ty.jsxs)("div",{className:"playlist",style:{display:i?"grid":"none"},children:[(0,ty.jsx)("div",{className:"overlay",style:{display:i?"grid":"none"}}),(0,ty.jsxs)("div",{className:"post-video-section",style:{display:i?"grid":"none",zIndex:99},children:[(0,ty.jsx)("div",{className:"video-section",children:(0,ty.jsxs)("div",{className:"video-container",children:[(0,ty.jsx)("h2",{className:"title",children:"Video"}),(0,ty.jsx)("div",{className:"video-wrapper",children:(0,ty.jsxs)("div",{className:"countdown-overlay",children:[(0,ty.jsxs)("svg",{className:"countdown-ring",width:"50",height:"50",children:[(0,ty.jsx)("circle",{cx:"25",cy:"25",r:"22",className:"circle-background"}),(0,ty.jsx)("circle",{cx:"25",cy:"25",r:"22",className:"circle-progress",style:{strokeDasharray:"138",strokeDashoffset:`${n/3*138}`}})]}),(0,ty.jsx)("span",{className:"count-text",children:n})]})}),(0,ty.jsx)("p",{className:"video-title",children:s.title})]})}),(0,ty.jsx)("hr",{}),(0,ty.jsxs)("div",{className:"related-videos-section",children:[(0,ty.jsx)("h3",{className:"related-title",children:"Related Videos"}),(0,ty.jsx)("ul",{className:"related-list",children:o.current.map((e,i)=>(0,ty.jsx)("li",{children:(0,ty.jsx)("button",{className:"related-item",onClick:()=>{a(t.findIndex(t=>t.playbackId===e.playbackId))},children:(0,ty.jsx)("p",{className:"related-text",children:e.title})})},i))})]})]})]})})};var nw=e.i(424728),nk=e.i(31499),nA=e.i(268083);function nx(){return()=>{}}function nT(){return(0,tE.useSyncExternalStore)(nx,nA.f,()=>!1)}var nL=e.i(377050),nS=e.i(65392),nC=e.i(223578),nM=e.i(194031),nI=e.i(233655);let n_=(0,tE.lazy)(()=>e.A(983487));function nR(){return()=>{}}let nD="imaAdError";function nN(e){if(e)try{let t,i=e.shadowRoot?.querySelector("media-theme");if(!i)return;let a=i.shadowRoot?.querySelector("media-controller");if(!a)return;let n=(e,t)=>e.querySelector(t)||e.shadowRoot?.querySelector(t)||null,r=n(a,"media-control-bar");if(!r)return;let s=n(a,"media-time-range"),o=r.style.zIndex;return r.style.zIndex=String(20),s&&(t=s.style.zIndex,s.style.zIndex=String(20)),()=>{r.style.zIndex=o,s&&void 0!==t&&(s.style.zIndex=t)}}catch{return}}function nH(e){let t=window.__imaLightDomAdContainer;t&&(t.style.pointerEvents=e?"auto":"none",t.style.visibility=e?"visible":"hidden",t.style.zIndex=e?"10":"-1")}let nW=({videoList:e,setCurrentIndex:t,handleVideoRef:i,onPlayStateChange:a,onAdImpression:n,onAdBreakStart:r,onAdPlayingChange:s,customDimensions:o,posterPriority:l=!1,posterSizes:d,...u})=>{let c=(0,tE.useRef)(null),h=(0,tE.useRef)(null),m=(0,tE.useRef)(void 0),[p,v]=(0,tE.useState)(0),[f,g]=(0,tE.useState)(!1),[b,y]=(0,tE.useState)(0),[E,w]=(0,tE.useState)(!1),[k,A]=(0,tE.useState)(!1),{site_ads:x,isCmsAuthenticated:T}=(0,nk.useAuthContext)(),[L,S]=(0,tE.useState)("string"==typeof e[p]?.adTagUrl?e[p]?.adTagUrl:void 0),C=(0,tE.useRef)(new Set),M=(0,tE.useRef)(new Set),I=(0,tE.useRef)(new Map),_=(0,tE.useRef)(p);_.current=p;let R=(0,tE.useRef)(e);R.current=e;let D=(0,tE.useRef)(null),N=(0,tE.useRef)(!1),H=(0,tE.useRef)(null),W=(0,tE.useRef)(null),O=(0,tE.useRef)(!1),P=(0,tE.useRef)(!1),B=(0,tE.useRef)(!1);(0,tE.useEffect)(()=>{t?.(0),v(0)},[e,t]),(0,tE.useEffect)(()=>{O.current=E,s?.(E)},[E,s]),(0,tE.useEffect)(()=>{let t=window;if(!t.dataLayer?.[0])return;let i=e[p];if(!i)return;let a={...t.dataLayer[0]};a.video_title=i.title,null!=i.description&&(a.video_description=i.description),null!=i.duration&&i.duration>0?a.video_duration=i.duration:delete a.video_duration,i.channel&&(a.video_category=i.channel),t.dataLayer[0]=a},[p,e]),(0,tE.useEffect)(()=>{let t=e[p]?.adTagUrl,i=e[p]?.playbackId;if("function"==typeof t){if(M.current.has(i)){let e=I.current.get(i);void 0!==e?S(e):S(void 0);return}if(C.current.has(i))return;C.current.add(i),S(void 0);let e=t();if("string"==typeof e)S(e);else if("function"==typeof e?.then){let t=!1,a=window.setTimeout(()=>{!t&&(t=!0,S(""),C.current.delete(i),c.current?.paused&&c.current?.play?.()?.catch(()=>{}))},nC.E);e.then(e=>{t||(t=!0,window.clearTimeout(a),S(e))}).catch(()=>{!t&&(t=!0,window.clearTimeout(a),S(""),C.current.delete(i),c.current?.paused&&c.current?.play?.()?.catch(()=>{}))})}}else"string"==typeof t&&S(t)},[p,e]);let U=nT(),V=!k&&(0!==p||!!e[p]?.autoplay),$=V&&(0!==p||U),q=e[p]?.adTagUrl,j="string"==typeof q?q:L,z=!T&&(0,nL.m)(x,e[p]?.adsAllowedOverride),[Z,G]=(0,tE.useState)("pending");(0,tE.useEffect)(()=>{if(!z||"pending"!==Z)return;let e=!1,t=()=>{e||(G("failed"),S(e=>void 0===e?"":e))};return(0,nS.f)({timeoutMs:nC.E}).then(()=>{if(!e){if((0,nC.X)())return void G("ready");t()}}).catch(()=>{t()}),()=>{e=!0}},[z,Z]);let K=z&&"ready"===Z,F=e[p]?.adsAllowedOverride!==!1&&!1!==x,Y=K&&F&&!!j&&$;function J(e,i=!1){if(g(!1),e!==p){try{let e=window.__imaAdsManager;e?.destroy&&e.destroy()}catch{}let a=window.__imaLightDomAdContainer;a&&(a.innerHTML=""),v(e),t?.(e),i?A(!0):k&&A(!1)}}(0,tE.useEffect)(()=>{N.current=!1},[p,j]),(0,tE.useEffect)(()=>{if(!Y)return;let e=()=>{if(N.current)return;N.current=!0;let e=c.current;e?.paused&&e.play().catch(()=>{})};return window.addEventListener("imaAdsManagerLoaded",e,{once:!0}),window.addEventListener(nD,e,{once:!0}),()=>{window.removeEventListener("imaAdsManagerLoaded",e),window.removeEventListener(nD,e)}},[Y,p]),(0,tE.useEffect)(()=>()=>{{try{let e=window.__imaAdsManager;e?.destroy&&e.destroy()}catch{}let e=window.__videoAdContext,t=window.__videoElement;e&&!document.contains(e)&&(window.__videoAdContext=null),t&&!document.contains(t)&&(window.__videoElement=null);let i=window.__imaLightDomAdContainer;delete window.__imaLightDomAdContainer,i&&setTimeout(()=>{try{i.parentNode&&i.parentNode.removeChild(i)}catch{}},0)}},[]);let X=!e[0]?.autoplay||!U,Q=(0,tE.useCallback)(()=>{let e=()=>{let e=_.current+1,t=R.current[e],i=!!t&&"function"==typeof t.adTagUrl&&!M.current.has(t.playbackId)&&!C.current.has(t.playbackId);if(i||Promise.all([(0,nM.t)(),(0,nM.K)()]).catch(()=>{}),i&&t){M.current.add(t.playbackId),C.current.add(t.playbackId);let i=t.adTagUrl(),a=i=>{I.current.set(t.playbackId,i),_.current===e&&S(i)};"string"==typeof i?a(i):"function"==typeof i?.then&&i.then(a).catch(()=>a(""))}(0,tE.startTransition)(()=>{g(!0)})};"function"==typeof queueMicrotask?queueMicrotask(e):setTimeout(e,0)},[g]),ee=(0,tE.useCallback)(()=>{let e=c.current;if(e)try{if(H.current&&(e.muted=H.current.muted,e.volume=H.current.volume,H.current=null),!Number.isNaN(e.currentTime)&&e.currentTime>.1&&(e.currentTime=Math.max(0,e.currentTime-.05)),e.paused){let t=e.play();void 0!==t&&t.catch(()=>{})}}catch{}},[]);(0,tE.useEffect)(()=>{let e=()=>{w(!1),g(!1),D.current=null,nH(!1),ee(),c.current&&["adended","adbreakend"].forEach(e=>{try{c.current?.dispatchEvent(new Event(e))}catch{}})};return window.addEventListener("imaAdTimeout",e),()=>{window.removeEventListener("imaAdTimeout",e)}},[ee,$]);let et=0===p&&!k&&K&&!!j&&!$;(0,tE.useEffect)(()=>{if(!et)return;P.current=!1,B.current=!1;let e=()=>{P.current=!0,(()=>{if(!B.current)return;B.current=!1;let e=c.current;e?.paused&&e.play().catch(()=>{})})()};return window.addEventListener("imaAdsManagerLoaded",e,{once:!0}),window.addEventListener(nD,e,{once:!0}),()=>{window.removeEventListener("imaAdsManagerLoaded",e),window.removeEventListener(nD,e)}},[et,p]),(0,tE.useLayoutEffect)(()=>{if(!et)return;let e=!1,t=null,i=null,a=0,n=requestAnimationFrame(()=>{a=requestAnimationFrame(()=>{e||(t=c.current)&&(i=()=>{P.current||(B.current=!0,queueMicrotask(()=>{P.current||c.current?.pause()}))},t.addEventListener("play",i))})});return()=>{e=!0,cancelAnimationFrame(n),cancelAnimationFrame(a),t&&i&&t.removeEventListener("play",i)}},[et,p,j]);let ei=0===p&&K&&void 0===j,ea=z&&"pending"===Z;(0,tE.useEffect)(()=>{if(!ei)return;let e=window.setTimeout(()=>{S(e=>void 0===e?"":e)},nC.E);return()=>clearTimeout(e)},[ei]);let en=$&&(!K||void 0!==j),er=p>=1&&null!==W.current?W.current:!X&&$,es=(0,tE.useMemo)(()=>{let t=e[p];return{video_title:t.title,video_description:t.description,video_duration:t.duration,...t.videoShow&&{custom_1:t.videoShow},...t.channel&&{custom_2:t.channel},...o}},[p,e,o]),eo=(0,tE.useSyncExternalStore)(nR,()=>!0,()=>!1),el=(0,ty.jsxs)(ty.Fragment,{children:[(0,ty.jsx)(nw.f,{video:e[p],autoplay:V,priority:l&&0===p,sizes:d}),(0,ty.jsx)(nE,{currentIndex:p,relatedVideos:e,visible:f,selectVideoCallback:J})]});return ei||ea||!eo?el:(0,ty.jsx)(tE.Suspense,{fallback:el,children:(0,ty.jsx)("div",{style:{position:"relative"},children:(0,ty.jsx)(n_,{id:"nw-video-player",envKey:"9a9tvn6snqnhpn07b9o796an3",theme:"news",style:{aspectRatio:"16/9"},maxResolution:"720p",minResolution:"480p",maxAutoResolution:"720p",initialBandwidthEstimateKbps:1600,initialEstimateSegments:2,preload:en?"none":"metadata",autoPlay:en,muted:er,metadata:es,defaultHiddenCaptions:!e[p].enableCaptions,...u,_hlsConfig:{maxBufferLength:5,maxMaxBufferLength:10},poster:"",ref:e=>{if(c.current!==e){if(c.current=e,e&&1){window.__videoAdContext!==e&&(window.__videoAdContext=e);let t=()=>{let t=e._hls;if(!t?.__interstitialsNeutralized&&t?.interstitialsManager){let e=t.interstitialsManager;Array.isArray(e.schedule)&&e.schedule.length>0&&(e.schedule.length=0),Object.defineProperty(e,"schedule",{get:()=>[],set:()=>{},configurable:!0});let i=()=>{};["play","pause","resume","start","onSeeking","setSchedulePosition","advanceSchedule","resumePrimary","bufferedToItem","setBufferingItem","itemsMatch"].forEach(t=>{t in e&&"function"==typeof e[t]&&(e[t]=i)}),t.__interstitialsNeutralized=!0}};(0,nI.N)(()=>{if(e._hls)t();else{let i=setInterval(()=>{e._hls&&(t(),clearInterval(i))},100);setTimeout(()=>clearInterval(i),3e3)}},{timeout:1e3})}e&&i&&e!==h.current&&(h.current=e,i(e))}},playbackId:"legacy"===e[p].videoSourceType?void 0:e[p].playbackId,src:"legacy"===e[p].videoSourceType&&e[p].legacyVideoUrl&&e[p].legacyVideoUrl.trim()?e[p].legacyVideoUrl:void 0,adTagUrl:K&&j?j:void 0,allowAdBlocker:!0,onVolumeChange:e=>{O.current||(W.current=e.currentTarget.muted)},onPlay:t=>{let i=t.currentTarget;if(a?.(!0),"legacy"===e[p].videoSourceType){try{b>0&&i.readyState>=2&&(i.currentTime=b)}catch{}if(!k){let e=i.play();e&&"function"==typeof e.catch&&e.catch(()=>{})}}},onPause:t=>{if(a?.(!1),"legacy"===e[p].videoSourceType){let e=t.currentTarget;(0,tE.startTransition)(()=>{y(e.currentTime)})}},onEnded:t=>{p{let i=t.currentTarget,a=i.currentTime,n=i.duration,r=e&&p0&&n-a<=3&&D.current!==p&&!E&&r&&(D.current=p,Q())},onAdImpression:n,onAdBreakStart:()=>{r?.(),c.current&&(H.current={muted:c.current.muted,volume:c.current.volume}),w(!0),g(!1),nH(!0),m.current&&(m.current(),m.current=void 0),setTimeout(()=>{m.current=nN(c.current)??void 0},100)},onAdPlaying:()=>{w(!0),g(!1),nH(!0),c.current&&!H.current&&(H.current={muted:c.current.muted,volume:c.current.volume});let e=window.__imaLightDomAdContainer;if(e){let t=e.querySelectorAll('iframe[src*="imasdk.googleapis.com"]');t.forEach((e,i)=>{let a=i===t.length-1;e.style.pointerEvents=a?"auto":"none"})}m.current||(m.current=nN(c.current)??void 0),m.current||setTimeout(()=>{m.current||(m.current=nN(c.current)??void 0)},300)},onAdSkip:()=>{m.current&&(m.current(),m.current=void 0),c.current&&H.current&&(c.current.muted=H.current.muted,c.current.volume=H.current.volume),H.current=null,w(!1),nH(!1)},onAdEnded:()=>{if(m.current&&(m.current(),m.current=void 0),c.current&&H.current&&(c.current.muted=H.current.muted,c.current.volume=H.current.volume),H.current=null,w(!1),nH(!1),c.current&&c.current.paused&&$){let e=c.current.play();void 0!==e&&e.catch(()=>{})}},onAdBreakEnd:()=>{m.current&&(m.current(),m.current=void 0),c.current&&H.current&&(c.current.muted=H.current.muted,c.current.volume=H.current.volume),H.current=null,w(!1),nH(!1)},onAdError:()=>{if(m.current&&(m.current(),m.current=void 0),H.current=null,w(!1),g(!1),nH(!1),window.dispatchEvent(new CustomEvent(nD)),c.current&&c.current.paused&&$){let e=c.current.play();void 0!==e&&e.catch(()=>{})}},children:(0,ty.jsx)(nE,{currentIndex:p,relatedVideos:e,visible:f,selectVideoCallback:J})},`${p}-${k?"reset":"normal"}`)})})};var nO=e.i(794596),nP=e.i(102311),nB=e.i(332065),nU=e.i(990416),nV=e.i(203760),n$=e.i(135517),nq=e.i(118954),nj=e.i(248763),nz=e.i(667864);e.s(["default",0,({videoList:e,stickOnScroll:t=!0,customDimensions:i,maxResolution:a,prefetchedAdTagPromise:n,onPlayStateChange:r,fullBleedOnMobile:s=!0,posterPriority:o=!1,posterSizes:l,onReady:d})=>{let u=nT(),c=!!e?.[0]?.autoplay,h=(0,nj.$)(),m=c&&u&&!h,p=t&&!h;e?.length&&(window.__videoCtpPlaylist=!m);let[v,f]=(0,tE.useState)(!1),[g,b]=(0,tE.useState)(!1),y=(0,tE.useRef)(!1),[E,w]=(0,tE.useState)(!1),[k,A]=(0,tE.useState)(!1),x=(0,tE.useRef)(null),T=(0,tE.useRef)(null),L=(0,tE.useRef)(!1),S=(0,tE.useRef)(!1),C=(0,tE.useRef)(!1),[M,I]=(0,tE.useState)(!1),_=(0,tE.useRef)(!1),R=(0,tE.useRef)(!1),D=(0,tE.useRef)(!1),N=(0,tE.useRef)(!1),H=(0,tE.useRef)(!1),W=(0,tE.useRef)(!1),O=(0,tE.useRef)(!1),P=(0,tE.useRef)(null),B=(0,tE.useRef)([]),{floors:U,mergedAdSlots:V}=(0,nO.useAdsConfig)(),{site_ads:$,paywallShown:q}=(0,nk.useAuthContext)(),j=(0,tE.useRef)(n),z=(0,tE.useRef)($);j.current=n,z.current=$,(0,tE.useEffect)(()=>{d?.()},[d]),(0,tE.useEffect)(()=>{let e=x.current;if(!e)return;let t=new IntersectionObserver(([e])=>{if(e.isIntersecting){let e=B.current[0];if((0,nC.a)()&&e&&(0,nL.m)(z.current,e.adsAllowedOverride)&&(0,nS.f)().catch(()=>{}),!j.current&&((0,nB.X)(),!P.current)){let e=B.current[0]?.adTagUrl;if("function"==typeof e){let t=e();t&&"function"==typeof t.then&&(P.current=t)}}w(!0),t.disconnect()}},{rootMargin:"600px 0px",threshold:0});return t.observe(e),()=>t.disconnect()},[]);let[Z,G]=(0,tE.useState)(0),[K,F]=(0,tE.useState)(null),Y=(0,tE.useRef)(null);(0,tE.useEffect)(()=>{Y.current=K},[K]),(0,tE.useEffect)(()=>()=>{delete window.__videoCtpPlaylist},[]),(0,tE.useEffect)(()=>{R.current="Google"===(0,n$.y)()},[]);let[J,X]=(0,tE.useState)(void 0);(0,tE.useEffect)(()=>{if(!n)return;let e=!1;return n.then(t=>{e||X(t)}).catch(()=>{e||X("")}),()=>{e=!0}},[n]),(0,tE.useEffect)(()=>((0,nq.O)(),n&&(0,nq.x)(),()=>{(0,nq.c)()}),[]);let[Q,ee]=(0,tE.useState)(!1);(0,tE.useEffect)(()=>{_.current=Q},[Q]),(0,tE.useEffect)(()=>{D.current=!1,N.current=!1,H.current=!1,W.current=!1,O.current=!1,L.current=!1,A(!1),S.current=!1,C.current=!1,I(!1)},[Z]);let et=(0,tE.useMemo)(()=>!!(e?.length&&!m),[e,m]);(0,tE.useEffect)(()=>{y.current=g},[g]),(0,tE.useEffect)(()=>{k||b(!1)},[k]),(0,tE.useEffect)(()=>{!M&&k&&p&&y.current&&!g&&b(!0)},[M,k,g,p]);let ei=!v&&g&&p&&k,ea=(0,tE.useMemo)(()=>e[Z],[Z,e]),en="2"===(0,nP.i)(),er=(0,tE.useMemo)(()=>(0,tw.default)(nz.default.container,{[nz.default.fullBleedMobile]:s,[nz.default.miniPlayer]:ei,[nz.default.miniPlayerVariantB]:ei&&en}),[s,ei,en]),es=(0,tE.useCallback)(()=>{if(!S.current&&!C.current)try{Y.current?.pause()}catch{}},[]),eo=(0,tE.useCallback)(()=>{if(S.current||C.current){try{window.__imaAdsManager?.pause?.()}catch{}return}es()},[es]),el=(0,tE.useCallback)(e=>{if(e&&(e.stopPropagation(),"preventDefault"in e&&e.preventDefault()),Y.current)try{Y.current.pause()}catch{}(0,tE.startTransition)(()=>{f(!0)})},[]);(0,tE.useEffect)(()=>{f(!1)},[Z]),(0,tE.useEffect)(()=>(ei?document.body.classList.add("mini-player-active"):document.body.classList.remove("mini-player-active"),()=>{document.body.classList.remove("mini-player-active")}),[ei]),(0,tE.useEffect)(()=>{let e=x.current;if(!e||!p)return;if(!document.contains(e)){let e=setTimeout(()=>{},100);return()=>clearTimeout(e)}let t=0,i=0,a=0,n=window.innerWidth<=768,r=()=>{let t=e.getBoundingClientRect(),r=window.pageYOffset||document.documentElement.scrollTop;i=t.top+r,a=e.offsetHeight,n=window.innerWidth<=768};r();let s=()=>{let r=Date.now();r-t<100||(t=r,e&&(T.current&&cancelAnimationFrame(T.current),T.current=requestAnimationFrame(()=>{let t=window.pageYOffset||document.documentElement.scrollTop,r=e.getBoundingClientRect(),s=window.innerHeight||document.documentElement.clientHeight,o=t+50>(n?i:i+a/2),l=r.bottom<=50,d=r.top>=s,u=l||d,c=D.current,h=R.current,m=!!(Y.current&&!Y.current.paused&&!Y.current.ended),p=o&&L.current;if(N.current=p,!u||c||p||(H.current=!O.current&&(S.current||_.current||m)),D.current=u,!u||p||S.current||C.current||O.current||!_.current&&!m){if(!u&&W.current){let e=H.current;if(W.current=!1,H.current=!1,e&&!S.current&&!O.current)try{Y.current?.play()?.catch(()=>{})}catch{}}}else W.current=!0,es();o&&h&&!L.current&&!S.current&&!C.current&&!O.current&&(_.current||m)&&(W.current=!0,eo());let v=o&&L.current;y.current=v,b(e=>v!==e?v:e)})))},o=()=>{r(),s()};return window.addEventListener("scroll",s,{passive:!0}),window.addEventListener("resize",o,{passive:!0}),s(),()=>{T.current&&cancelAnimationFrame(T.current),window.removeEventListener("scroll",s),window.removeEventListener("resize",o)}},[p,es,eo]);let ed=(0,tE.useMemo)(()=>(e||[]).map((t,i)=>{let a=0!==i||m;return 0===i&&void 0!==J?{...t,autoplay:a,adTagUrl:J}:{...t,autoplay:a,adTagUrl:async()=>{let n;if("true"===new URLSearchParams(window.location.search).get("video_test_vast"))return"https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_preroll_skippable&sz=640x480&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&correlator=";if(0===i&&P.current){let e=await P.current;if(e)return e}if(0===i&&j.current)return j.current;let r=(n=(0,nV.v)())?{willAutoplay:n.willAutoPlay,willPlayMuted:n.willPlayMuted}:null,s=0===i?r?.willAutoplay??a:a,o=!et&&(r?.willPlayMuted??a);if(!(0,nL.m)($,t.adsAllowedOverride)||!V||0===V.length)return"";let l=V.filter(e=>"video"===e.slotName).map(e=>({...e,sizes:[[640,360]],bidders:{prebid:e.bidders.prebid,amazon:e.bidders.amazon}})),d=(0,nU.H)(),u=l.find(e=>e.device===d);return u?.bidders?.prebid?.bids&&0!==u.bidders.prebid.bids.length?(0,nq.m)(t.playbackId,U,l,window.location.href,t.databaseId,void 0,{willAutoplay:s,willPlayMuted:o,isContinuous:e.length>1,...null!=t.duration&&t.duration>0?{contentDurationSec:t.duration}:{}}):""}}}),[e,U,V,$,n,J,et,m]);return(B.current=ed,(0,tE.useEffect)(()=>{P.current=null},[e]),(0,tE.useEffect)(()=>{q&&el()},[q,el]),e&&0!==e.length)?(0,ty.jsx)(ty.Fragment,{children:(0,ty.jsx)("div",{ref:x,children:(0,ty.jsx)("div",{className:er,"data-video-ctp":String(!m),children:E?(0,ty.jsxs)(ty.Fragment,{children:[ei&&(0,ty.jsx)(tk.default,{size:"xsmall",onClick:el,buttonContainerClass:nz.default.closeButton,children:"Close"}),Q&&ea.title&&(0,ty.jsx)("p",{className:nz.default.title,children:ea.title}),(0,ty.jsx)(nW,{videoList:ed,setCurrentIndex:G,handleVideoRef:F,customDimensions:i,posterPriority:o,posterSizes:l,...a?{maxResolution:a}:{},onPlayStateChange:e=>{_.current=e,e?O.current=!1:W.current||S.current||C.current||(O.current=!0,H.current=!1),(0,tE.startTransition)(()=>{ee(e)}),r?.(e)},onAdImpression:()=>{L.current=!0,A(!0)},onAdBreakStart:()=>{C.current=!0},onAdPlayingChange:e=>{S.current=e,I(e),e?C.current=!0:C.current=!1}})]}):(0,ty.jsx)(nw.f,{video:e[0],autoplay:m,priority:o,sizes:l})})})}):null}],952985)}]);