1var Rt=Object.defineProperty;var ut=i=>{throw TypeError(i)};var wt=(i,e,t)=>e in i?Rt(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var u=(i,e,t)=>wt(i,typeof e!="symbol"?e+"":e,t),Z=(i,e,t)=>e.has(i)||ut("Cannot "+t);var n=(i,e,t)=>(Z(i,e,"read from private field"),t?t.call(i):e.get(i)),f=(i,e,t)=>e.has(i)?ut("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t),a=(i,e,t,s)=>(Z(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t),m=(i,e,t)=>(Z(i,e,"access private method"),t);const Lt=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"],vt=["autopictureinpicture","disablepictureinpicture","disableremoteplayback","autoplay","controls","controlslist","crossorigin","loop","muted","playsinline","poster","preload","src"];function St(i){return` 2 <style> 3 :host { 4 display: inline-flex; 5 line-height: 0; 6 flex-direction: column; 7 justify-content: end; 8 } 9 10 audio { 11 width: 100%; 12 } 13 </style> 14 <slot name="media"> 15 <audio${bt(i)}></audio> 16 </slot> 17 <slot></slot> 18 `}function At(i){return` 19 <style> 20 :host { 21 display: inline-block; 22 line-height: 0; 23 } 24 25 video { 26 max-width: 100%; 27 max-height: 100%; 28 min-width: 100%; 29 min-height: 100%; 30 object-fit: var(--media-object-fit, contain); 31 object-position: var(--media-object-position, 50% 50%); 32 } 33 34 video::-webkit-media-text-track-container { 35 transform: var(--media-webkit-text-track-transform); 36 transition: var(--media-webkit-text-track-transition); 37 } 38 </style> 39 <slot name="media"> 40 <video${bt(i)}></video> 41 </slot> 42 <slot></slot> 43 `}function yt(i,{tag:e,is:t}){var h,c,v,pt,G,H,T,$,E,g,V,_,tt,gt,et,kt,mt;const s=globalThis.document?.createElement?.(e,{is:t}),d=s?xt(s):[];return h=class extends i{constructor(){super(...arguments);f(this,g);f(this,G,!1);f(this,H,null);f(this,T,new Map);f(this,$);f(this,E);u(this,"get");u(this,"set");u(this,"call")}static get observedAttributes(){var l;return m(l=h,v,pt).call(l),[...s?.constructor?.observedAttributes??[],...vt]}get nativeEl(){return m(this,g,V).call(this),n(this,H)??this.querySelector(":scope > [slot=media]")??this.querySelector(e)??this.shadowRoot?.querySelector(e)??null}set nativeEl(o){a(this,H,o)}get defaultMuted(){return this.hasAttribute("muted")}set defaultMuted(o){this.toggleAttribute("muted",o)}get src(){return this.getAttribute("src")}set src(o){this.setAttribute("src",`${o}`)}get preload(){return this.getAttribute("preload")??this.nativeEl?.preload}set preload(o){this.setAttribute("preload",`${o}`)}init(){if(!this.shadowRoot){this.attachShadow({mode:"open"});const o=qt(this.attributes);t&&(o.is=t),e&&(o.part=e),this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(o)}this.nativeEl.muted=this.hasAttribute("muted");for(const o of d)m(this,g,kt).call(this,o);m(this,g,_).call(this)}handleEvent(o){o.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(o.type,{detail:o.detail}))}attributeChangedCallback(o,l,y){m(this,g,V).call(this),m(this,g,mt).call(this,o,l,y)}connectedCallback(){m(this,g,V).call(this),n(this,E)||m(this,g,_).call(this)}disconnectedCallback(){n(this,$)?.disconnect(),a(this,$,void 0),n(this,E)&&(this.shadowRoot?.removeEventListener("slotchange",n(this,E)),a(this,E,void 0));for(const o of this.constructor.Events)this.shadowRoot?.removeEventListener(o,this,!0);n(this,T).forEach(o=>o.remove()),n(this,T).clear(),a(this,H,null)}},c=new WeakMap,v=new WeakSet,pt=function(){if(n(this,c))return;a(this,c,!0);const o=new Set(this.observedAttributes);o.delete("muted");for(const l of d)if(!(l in this.prototype))if(typeof s[l]=="function")this.prototype[l]=function(...y){return m(this,g,V).call(this),this.call?this.call(l,...y):this.nativeEl?.[l]?.apply(this.nativeEl,y)};else{const y={get(){m(this,g,V).call(this);const p=l.toLowerCase();if(o.has(p)){const k=this.getAttribute(p);return k===null?!1:k===""?!0:k}return this.get?.(l)??this.nativeEl?.[l]}};l!==l.toUpperCase()&&(y.set=function(p){m(this,g,V).call(this);const k=l.toLowerCase();if(o.has(k)){p===!0||p===!1||p==null?this.toggleAttribute(k,!!p):this.setAttribute(k,p);return}if(this.set){this.set(l,p);return}this.nativeEl&&(this.nativeEl[l]=p)}),Object.defineProperty(this.prototype,l,y)}},G=new WeakMap,H=new WeakMap,T=new WeakMap,$=new WeakMap,E=new WeakMap,g=new WeakSet,V=function(){n(this,G)||(a(this,G,!0),this.init())},_=function(){a(this,$,new MutationObserver(m(this,g,gt).bind(this))),a(this,E,()=>m(this,g,tt).call(this)),this.shadowRoot?.addEventListener("slotchange",n(this,E)),m(this,g,tt).call(this);for(const o of this.constructor.Events)this.shadowRoot?.addEventListener(o,this,!0)},tt=function(){const o=new Map(n(this,T));(this.shadowRoot?.querySelector("slot:not([name])")?.assignedElements({flatten:!0}).filter(p=>
43["track","source"].includes(p.localName))).forEach(p=>{o.delete(p);let k=n(this,T).get(p);k||(k=p.cloneNode(),n(this,T).set(p,k),n(this,$)?.observe(p,{attributes:!0})),this.nativeEl?.append(k),m(this,g,et).call(this,k)}),o.forEach((p,k)=>{p.remove(),n(this,T).delete(k)})},gt=function(o){for(const l of o)if(l.type==="attributes"){const{target:y,attributeName:p}=l,k=n(this,T).get(y);k&&p&&(k.setAttribute(p,y.getAttribute(p)??""),m(this,g,et).call(this,k))}},et=function(o){o&&o.localName==="track"&&o.default&&(o.kind==="chapters"||o.kind==="metadata")&&o.track.mode==="disabled"&&(o.track.mode="hidden")},kt=function(o){if(Object.prototype.hasOwnProperty.call(this,o)){const l=this[o];delete this[o],this[o]=l}},mt=function(o,l,y){["id","class"].includes(o)||!h.observedAttributes.includes(o)&&this.constructor.observedAttributes.includes(o)||(y===null?this.nativeEl?.removeAttribute(o):this.nativeEl?.getAttribute(o)!==y&&this.nativeEl?.setAttribute(o,y))},f(h,v),u(h,"getTemplateHTML",e.endsWith("audio")?St:At),u(h,"shadowRootOptions",{mode:"open"}),u(h,"Events",Lt),f(h,c,!1),h}function xt(i){const e=[];for(let t=Object.getPrototypeOf(i);t&&t!==HTMLElement.prototype;t=Object.getPrototypeOf(t)){const s=Object.getOwnPropertyNames(t);e.push(...s)}return e}function bt(i){let e="";for(const t in i){if(!vt.includes(t))continue;const s=i[t];s===""?e+=` ${t}`:e+=` ${t}="${s}"`}return e}function qt(i){const e={};for(const t of i)e[t.name]=t.value;return e}const Ut=yt(globalThis.HTMLElement??class{},{tag:"video"});yt(globalThis.HTMLElement??class{},{tag:"audio"});class X extends Event{constructor(t,s){super(t);u(this,"track");this.track=s.track}}const it=new WeakMap;function r(i){return it.get(i)??Mt(i,{})}function Mt(i,e){let t=it.get(i);return t||it.set(i,t={}),Object.assign(t,e)}function nt(i,e){const t=i.videoTracks;r(e).media=new WeakRef(i),r(e).renditionSet||(r(e).renditionSet=new Set);const s=r(t).trackSet;s.add(e);const d=s.size-1;d in st.prototype||Object.defineProperty(st.prototype,d,{get(){return[...r(this).trackSet][d]}}),queueMicrotask(()=>{t.dispatchEvent(new X("addtrack",{track:e}))})}function rt(i){const e=r(i).media?.deref()?.videoTracks;if(!e)return;r(e).trackSet.delete(i),queueMicrotask(()=>{e.dispatchEvent(new X("removetrack",{track:i}))})}function Ot(i){const e=r(i).media?.deref()?.videoTracks??[];let t=!1;for(const s of e)s!==i&&(s.selected=!1,t=!0);if(t){if(r(e).changeRequested)return;r(e).changeRequested=!0,queueMicrotask(()=>{delete r(e).changeRequested,e.dispatchEvent(new Event("change"))})}}var R,w,L,I,J;class st extends EventTarget{constructor(){super();f(this,I);f(this,R);f(this,w);f(this,L);r(this).trackSet=new Set}[Symbol.iterator](){return n(this,I,J).values()}get length(){return n(this,I,J).size}getTrackById(t){return[...n(this,I,J)].find(s=>s.id===t)??null}get selectedIndex(){return[...n(this,I,J)].findIndex(t=>t.selected)}get onaddtrack(){return n(this,R)}set onaddtrack(t){n(this,R)&&(this.removeEventListener("addtrack",n(this,R)),a(this,R,void 0)),typeof t=="function"&&(a(this,R,t),this.addEventListener("addtrack",t))}get onremovetrack(){return n(this,w)}set onremovetrack(t){n(this,w)&&(this.removeEventListener("removetrack",n(this,w)),a(this,w,void 0)),typeof t=="function"&&(a(this,w,t),this.addEventListener("removetrack",t))}get onchange(){return n(this,L)}set onchange(t){n(this,L)&&(this.removeEventListener("change",n(this,L)),a(this,L,void 0)),typeof t=="function"&&(a(this,L,t),this.addEventListener("change",t))}}R=new WeakMap,w=new WeakMap,L=new WeakMap,I=new WeakSet,J=function(){return r(this).trackSet};class Y extends Event{constructor(t,s){super(t);u(this,"rendition");this.rendition=s.rendition}}function jt(i,e){const t=r(i).media?.deref()?.videoRenditions;r(e).media=r(i).media,r(e).track=i;const s=r(i).renditionSet;s.add(e);const d=s.size-1;d in ot.prototype||Object.defineProperty(ot.prototype,d,{get(){return z(this)[d]}}),queueMicrotask(()=>{!t||!i.selected||t.dispatchEvent(new Y("addrendition",{rendition:e}))})}function Pt(i){const e=r(i).media?.deref()?.videoRenditions,t=r(i).track;r(t).renditionSet.delete(i),queueMicrotask(()=>{const d=r(i).track;!e||!d.selected||e.dispatchEvent(new Y("removerendition",{rendition:i}))})}function Ct(i){const e=r(i).media?.deref()?.videoRenditions;!e||r(e).changeRequested||(r(e).changeRequested=!0,queueMicrotask(()=>{delete r(e).changeRequested,r(i).track.selected&&e.dispatchEvent(new Event("change"))}))}function z(i){const e=r(i).media?.deref();return e?[...e.videoTracks].filter(t=>t.selected).flatMap(t=>[...r(t).renditionSet]):[]}var S,A,x;
43class ot extends EventTarget{constructor(){super(...arguments);f(this,S);f(this,A);f(this,x)}[Symbol.iterator](){return z(this).values()}get length(){return z(this).length}getRenditionById(t){return z(this).find(s=>`${s.id}`==`${t}`)??null}get selectedIndex(){return z(this).findIndex(t=>t.selected)}set selectedIndex(t){for(const[s,d]of z(this).entries())d.selected=s===t}get onaddrendition(){return n(this,S)}set onaddrendition(t){n(this,S)&&(this.removeEventListener("addrendition",n(this,S)),a(this,S,void 0)),typeof t=="function"&&(a(this,S,t),this.addEventListener("addrendition",t))}get onremoverendition(){return n(this,A)}set onremoverendition(t){n(this,A)&&(this.removeEventListener("removerendition",n(this,A)),a(this,A,void 0)),typeof t=="function"&&(a(this,A,t),this.addEventListener("removerendition",t))}get onchange(){return n(this,x)}set onchange(t){n(this,x)&&(this.removeEventListener("change",n(this,x)),a(this,x,void 0)),typeof t=="function"&&(a(this,x,t),this.addEventListener("change",t))}}S=new WeakMap,A=new WeakMap,x=new WeakMap;var F;class $t{constructor(){u(this,"src");u(this,"id");u(this,"width");u(this,"height");u(this,"bitrate");u(this,"frameRate");u(this,"codec");f(this,F,!1)}get selected(){return n(this,F)}set selected(e){n(this,F)!==e&&(a(this,F,e),Ct(this))}}F=new WeakMap;var W;class Tt{constructor(){u(this,"id");u(this,"kind");u(this,"label","");u(this,"language","");u(this,"sourceBuffer");f(this,W,!1)}addRendition(e,t,s,d,h,c){const v=new $t;return v.src=e,v.width=t,v.height=s,v.frameRate=c,v.bitrate=h,v.codec=d,jt(this,v),v}removeRendition(e){Pt(e)}get selected(){return n(this,W)}set selected(e){n(this,W)!==e&&(a(this,W,e),e===!0&&Ot(this))}}W=new WeakMap;function Vt(i,e){const t=r(i).media?.deref()?.audioRenditions;r(e).media=r(i).media,r(e).track=i;const s=r(i).renditionSet;s.add(e);const d=s.size-1;d in dt.prototype||Object.defineProperty(dt.prototype,d,{get(){return B(this)[d]}}),queueMicrotask(()=>{!t||!i.enabled||t.dispatchEvent(new Y("addrendition",{rendition:e}))})}function It(i){const e=r(i).media?.deref()?.audioRenditions,t=r(i).track;r(t).renditionSet.delete(i),queueMicrotask(()=>{const d=r(i).track;!e||!d.enabled||e.dispatchEvent(new Y("removerendition",{rendition:i}))})}function Ht(i){const e=r(i).media?.deref()?.audioRenditions;!e||r(e).changeRequested||(r(e).changeRequested=!0,queueMicrotask(()=>{delete r(e).changeRequested,r(i).track.enabled&&e.dispatchEvent(new Event("change"))}))}function B(i){const e=r(i).media?.deref();return e?[...e.audioTracks].filter(t=>t.enabled).flatMap(t=>[...r(t).renditionSet]):[]}var q,M,O;class dt extends EventTarget{constructor(){super(...arguments);f(this,q);f(this,M);f(this,O)}[Symbol.iterator](){return B(this).values()}get length(){return B(this).length}getRenditionById(t){return B(this).find(s=>`${s.id}`==`${t}`)??null}get selectedIndex(){return B(this).findIndex(t=>t.selected)}set selectedIndex(t){for(const[s,d]of B(this).entries())d.selected=s===t}get onaddrendition(){return n(this,q)}set onaddrendition(t){n(this,q)&&(this.removeEventListener("addrendition",n(this,q)),a(this,q,void 0)),typeof t=="function"&&(a(this,q,t),this.addEventListener("addrendition",t))}get onremoverendition(){return n(this,M)}set onremoverendition(t){n(this,M)&&(this.removeEventListener("removerendition",n(this,M)),a(this,M,void 0)),typeof t=="function"&&(a(this,M,t),this.addEventListener("removerendition",t))}get onchange(){return n(this,O)}set onchange(t){n(this,O)&&(this.removeEventListener("change",n(this,O)),a(this,O,void 0)),typeof t=="function"&&(a(this,O,t),this.addEventListener("change",t))}}q=new WeakMap,M=new WeakMap,O=new WeakMap;var D;class zt{constructor(){u(this,"src");u(this,"id");u(this,"bitrate");u(this,"codec");f(this,D,!1)}get selected(){return n(this,D)}set selected(e){n(this,D)!==e&&(a(this,D,e),Ht(this))}}D=new WeakMap;function at(i,e){const t=i.audioTracks;r(e).media=new WeakRef(i),r(e).renditionSet||(r(e).renditionSet=new Set);const s=r(t).trackSet;s.add(e);const d=s.size-1;d in ht.prototype||Object.defineProperty(ht.prototype,d,{get(){return[...r(this).trackSet][d]}}),queueMicrotask(()=>{t.dispatchEvent(new X("addtrack",{track:e}))})}function ct(i){const e=r(i).media?.deref()?.audioTracks;
43if(!e)return;r(e).trackSet.delete(i),queueMicrotask(()=>{e.dispatchEvent(new X("removetrack",{track:i}))})}function Bt(i){const e=r(i).media?.deref()?.audioTracks;!e||r(e).changeRequested||(r(e).changeRequested=!0,queueMicrotask(()=>{delete r(e).changeRequested,e.dispatchEvent(new Event("change"))}))}var j,P,C,N,K;class ht extends EventTarget{constructor(){super();f(this,N);f(this,j);f(this,P);f(this,C);r(this).trackSet=new Set}[Symbol.iterator](){return n(this,N,K).values()}get length(){return n(this,N,K).size}getTrackById(t){return[...n(this,N,K)].find(s=>s.id===t)??null}get onaddtrack(){return n(this,j)}set onaddtrack(t){n(this,j)&&(this.removeEventListener("addtrack",n(this,j)),a(this,j,void 0)),typeof t=="function"&&(a(this,j,t),this.addEventListener("addtrack",t))}get onremovetrack(){return n(this,P)}set onremovetrack(t){n(this,P)&&(this.removeEventListener("removetrack",n(this,P)),a(this,P,void 0)),typeof t=="function"&&(a(this,P,t),this.addEventListener("removetrack",t))}get onchange(){return n(this,C)}set onchange(t){n(this,C)&&(this.removeEventListener("change",n(this,C)),a(this,C,void 0)),typeof t=="function"&&(a(this,C,t),this.addEventListener("change",t))}}j=new WeakMap,P=new WeakMap,C=new WeakMap,N=new WeakSet,K=function(){return r(this).trackSet};var U;class Et{constructor(){u(this,"id");u(this,"kind");u(this,"label","");u(this,"language","");u(this,"sourceBuffer");f(this,U,!1)}addRendition(e,t,s){const d=new zt;return d.src=e,d.codec=t,d.bitrate=s,Vt(this,d),d}removeRendition(e){It(e)}get enabled(){return n(this,U)}set enabled(e){n(this,U)!==e&&(a(this,U,e),Bt(this))}}U=new WeakMap;const ft=Q(globalThis.HTMLMediaElement,"video"),lt=Q(globalThis.HTMLMediaElement,"audio");function Gt(i){if(!i?.prototype)return i;const e=Q(i,"video");(!e||`${e}`.includes("[native code]"))&&Object.defineProperty(i.prototype,"videoTracks",{get(){return Ft(this)}});const t=Q(i,"audio");(!t||`${t}`.includes("[native code]"))&&Object.defineProperty(i.prototype,"audioTracks",{get(){return Wt(this)}}),"addVideoTrack"in i.prototype||(i.prototype.addVideoTrack=function(h,c="",v=""){const b=new Tt;return b.kind=h,b.label=c,b.language=v,nt(this,b),b}),"removeVideoTrack"in i.prototype||(i.prototype.removeVideoTrack=rt),"addAudioTrack"in i.prototype||(i.prototype.addAudioTrack=function(h,c="",v=""){const b=new Et;return b.kind=h,b.label=c,b.language=v,at(this,b),b}),"removeAudioTrack"in i.prototype||(i.prototype.removeAudioTrack=ct),"videoRenditions"in i.prototype||Object.defineProperty(i.prototype,"videoRenditions",{get(){return s(this)}});const s=h=>{let c=r(h).videoRenditions;return c||(c=new ot,r(c).media=new WeakRef(h),r(h).videoRenditions=c),c};"audioRenditions"in i.prototype||Object.defineProperty(i.prototype,"audioRenditions",{get(){return d(this)}});const d=h=>{let c=r(h).audioRenditions;return c||(c=new dt,r(c).media=new WeakRef(h),r(h).audioRenditions=c),c};return i}function Q(i,e){if(i?.prototype)return Object.getOwnPropertyDescriptor(i.prototype,`${e}Tracks`)?.get}function Ft(i){let e=r(i).videoTracks;if(!e&&(e=new st,r(i).videoTracks=e,ft)){const t=ft.call(i.nativeEl??i);for(const c of t)nt(i,c);const s=()=>{e.dispatchEvent(new Event("change"))},d=c=>{if([...e].some(v=>v instanceof Tt)){for(const v of t)rt(v);return}nt(i,c.track)},h=c=>{rt(c.track)};t.addEventListener("change",s),t.addEventListener("addtrack",d),t.addEventListener("removetrack",h)}return e}function Wt(i){let e=r(i).audioTracks;
43if(!e&&(e=new ht,r(i).audioTracks=e,lt)){const t=lt.call(i.nativeEl??i);for(const c of t)at(i,c);const s=()=>{e.dispatchEvent(new Event("change"))},d=c=>{if([...e].some(v=>v instanceof Et)){for(const v of t)ct(v);return}at(i,c.track)},h=c=>{ct(c.track)};t.addEventListener("change",s),t.addEventListener("addtrack",d),t.addEventListener("removetrack",h)}return e}export{Ut as C,Gt as M};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.