1import{a as D}from"./typography-C5LMSFAT.js";import{_ as N}from"./preload-helper-q99iadPR.js";import{M as A,C as S}from"./mixin-DQgBe0Xc.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"bb7bd624a8a3321ff6d1587f421551039a69f342"}}catch{}})();try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="8cf57466-cd2c-484b-8290-ebe7d8c4f30e",t._sentryDebugIdIdentifier="sentry-dbid-8cf57466-cd2c-484b-8290-ebe7d8c4f30e")})()}catch{}class I extends A(S){static shadowRootOptions={...S.shadowRootOptions};static getTemplateHTML=e=>{const{src:n,...o}=e;return S.getTemplateHTML(o)};#t;attributeChangedCallback(e,n,o){e!=="src"&&super.attributeChangedCallback(e,n,o),e==="src"&&n!=o&&this.load()}async _initThumbnails(e){const n=async(u,h)=>{const b=[],g=e.timescale||1,f=e.startNumber||1,E=e.presentationTimeOffset?e.presentationTimeOffset/g:0,_=e.segmentDuration;for(let l=0;l<u;l++){const T=C({thIndex:l,thduration:h,ttiles:u,tduration:_,startNumber:f,pto:E}),w=T+h,M=new Promise((p,y)=>{this.api.provideThumbnail(T,({url:a,width:s,height:c,x:m,y:v})=>{try{const R=new VTTCue(T,w,`${a}#xywh=${m},${v},${s},${c}`);p(R)}catch(R){y(R)}})});b.push(M)}return await Promise.all(b).catch(l=>console.error("Error processing thumbnails",l))},{totalThumbnails:o,thumbnailDuration:i}=$(e),d=await n(o,i);let r=this.nativeEl.querySelector('track[label="thumbnails"]');if(!r){r=O(),this.nativeEl.appendChild(r);const u=x(d);r.src=u,r.dispatchEvent(new Event("change"))}}async load(){if(this.#t){this.api.attachSource(this.src);return}this.#t=!0;const e=await N(()=>import("./dash.all.min-B8uiSqJ0.js"),[]);this.api=e.MediaPlayer().create(),this.api.initialize(this.nativeEl,this.src,this.autoplay),this.api.on(e.MediaPlayer.events.STREAM_INITIALIZED,()=>{const n=this.api.getRepresentationsByType("video");let o=this.videoTracks.getTrackById("main");o||(o=this.addVideoTrack("main"),o.id="main",o.selected=!0),n.forEach(i=>{const d=i.bandwidth??i.bitrate??(Number.isFinite(i.bitrateInKbit)?i.bitrateInKbit*1e3:void 0),r=o.addRendition(i.id,i.width,i.height,i.mimeType??i.codec,d);r.id=i.id}),this.videoRenditions.addEventListener("change",()=>{const i=this.videoRenditions[this.videoRenditions.selectedIndex];i?.id?(this.api.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),this.api.setRepresentationForTypeById("video",i.id,!0)):this.api.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}})}),this.api.isDynamic()||this.api.getRepresentationsByType("image").forEach(async(d,r)=>{r>0||this._initThumbnails(d)})})}}function $(t){var e,n;const o=t.essentialProperties[0],[i,d]=o.value.split("x").map(Number),r=i*d,u=((n=(e=t.adaptation)==null?void 0:e.period)==null?void 0:n.duration)||null,h=t.segmentDuration,b=t.timescale||1,f=h/b/r;return{totalThumbnails:u!=null?Math.ceil(u/f):Math.ceil(h/f),thumbnailDuration:f}}function C({thIndex:t,tduration:e,thduration:n,ttiles:o,startNumber:i,pto:d}){const r=Math.floor(t/o)+i,u=t%o+1,h=(r-1)*e-d,b=(u-1)*n;return h+b}function O(){const t=document.createElement("track");return t.kind="metadata",t.label="thumbnails",t.srclang="en",t.mode="hidden",t.default=!0,t}function x(t){let e=`WEBVTT 2 3`;for(const i of t)e+=`${o(i.startTime)} --> ${o(i.endTime)} 4`,e+=`${i.text} 5 6`;const n=new Blob([e],{type:"text/vtt"});return URL.createObjectURL(n);function o(i){const d=String(Math.floor(i/3600)).padStart(2,"0"),r=String(Math.floor(i%3600/60)).padStart(2,"0"),u=(i%60).toFixed(3).padStart(6,"0");return`${d}:${r}:${u}`}}globalThis.customElements&&!globalThis.customElements.get("dash-video")&&globalThis.customElements.define("dash-video",I);var B=I,H=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),F={className:"class",htmlFor:"for"};function P(t){return t.toLowerCase()}function L(t){if(typeof t=="boolean")return t?"":void 0;if(typeof t!="function"&&!(typeof t=="object"&&t!==null))return t}function W({react:t,tagName:e,elementClass:n,events:o,displayName:i,defaultProps:d,toAttributeName:r=P,toAttributeValue:u=L}){const h=Number.parseInt(t.version)>=19,b=t.forwardRef((g,f)=>{var E,_;const l=t.useRef(null),T=t.useRef(new Map),w={},M={},p={},y={};for(const[a,s]of Object.entries(g)){if(H.has(a)){p[a]=s;continue}const c=r(F[a]??a);
6if(n.prototype&&a in n.prototype&&!(a in(((E=globalThis.HTMLElement)==null?void 0:E.prototype)??{}))&&!((_=n.observedAttributes)!=null&&_.some(v=>v===c))){y[a]=s;continue}if(a.startsWith("on")){w[a]=s;continue}const m=u(s);if(c&&m!=null&&(M[c]=String(m),h||(p[c]=m)),c&&h){const v=L(s);m!==v?p[c]=m:p[c]=s}}if(typeof window<"u"){for(const a in w){const s=w[a],c=a.endsWith("Capture"),m=(o?.[a]??a.slice(2).toLowerCase()).slice(0,c?-7:void 0);t.useLayoutEffect(()=>{const v=l?.current;if(!(!v||typeof s!="function"))return v.addEventListener(m,s,c),()=>{v.removeEventListener(m,s,c)}},[l?.current,s])}t.useLayoutEffect(()=>{if(l.current===null)return;const a=new Map;for(const s in y)k(l.current,s,y[s]),T.current.delete(s),a.set(s,y[s]);for(const[s,c]of T.current)k(l.current,s,void 0);T.current=a})}if(typeof window>"u"&&n?.getTemplateHTML&&n?.shadowRootOptions){const{mode:a,delegatesFocus:s}=n.shadowRootOptions,c=t.createElement("template",{shadowrootmode:a,shadowrootdelegatesfocus:s,dangerouslySetInnerHTML:{__html:n.getTemplateHTML(M,g)}});p.children=[c,p.children]}return t.createElement(e,{...d,...p,ref:t.useCallback(a=>{l.current=a,typeof f=="function"?f(a):f!==null&&(f.current=a)},[f])})});return b.displayName=i??n.name,b}function k(t,e,n){var o;t[e]=n,n==null&&e in(((o=globalThis.HTMLElement)==null?void 0:o.prototype)??{})&&t.removeAttribute(e)}var K=W({react:D,tagName:"dash-video",elementClass:B,toAttributeName(t){return t==="muted"?"":t==="defaultMuted"?"muted":P(t)}});/*! Bundled license information: 7 8ce-la-react/dist/ce-la-react.js: 9 (** 10 * @license 11 * Copyright 2018 Google LLC 12 * SPDX-License-Identifier: BSD-3-Clause 13 * 14 * Modified version of `@lit/react` for vanilla custom elements with support for SSR. 15 *) 16*/export{K as default}; 17//# sourceMappingURL=react-C69O2Cp1.js.map
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.