1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[443],{1280:function(e,t,i){i.r(t),i.d(t,{default:function(){return s}});var n=i(7294),a=i(1979),r=i(6907);let DashVideoElement=class DashVideoElement extends(0,r.lK)(a.zM){static shadowRootOptions={...a.zM.shadowRootOptions};static getTemplateHTML=e=>{let{src:t,...i}=e;return a.zM.getTemplateHTML(i)};#e;attributeChangedCallback(e,t,i){"src"!==e&&super.attributeChangedCallback(e,t,i),"src"===e&&t!=i&&this.load()}async _initThumbnails(e){let generateAllCues=async(t,i)=>{let n=[],a=e.timescale||1,r=e.startNumber||1,o=e.presentationTimeOffset?e.presentationTimeOffset/a:0,l=e.segmentDuration;for(let e=0;e<t;e++){let a=function({thIndex:e,tduration:t,thduration:i,ttiles:n,startNumber:a,pto:r}){return(Math.floor(e/n)+a-1)*t-r+(e%n+1-1)*i}({thIndex:e,thduration:i,ttiles:t,tduration:l,startNumber:r,pto:o}),s=a+i,u=new Promise((e,t)=>{this.api.provideThumbnail(a,({url:i,width:n,height:r,x:o,y:l})=>{try{let t=new VTTCue(a,s,`${i}#xywh=${o},${l},${n},${r}`);e(t)}catch(e){t(e)}})});n.push(u)}return await Promise.all(n).catch(e=>console.error("Error processing thumbnails",e))},{totalThumbnails:t,thumbnailDuration:i}=function(e){var t,i;let n=e.essentialProperties[0],[a,r]=n.value.split("x").map(Number),o=(null==(i=null==(t=e.adaptation)?void 0:t.period)?void 0:i.duration)||null,l=e.segmentDuration,s=e.timescale||1,u=l/s/(a*r);return{totalThumbnails:null!=o?Math.ceil(o/u):Math.ceil(l/u),thumbnailDuration:u}}(e),n=await generateAllCues(t,i),a=this.nativeEl.querySelector('track[label="thumbnails"]');if(!a){a=function(){let e=document.createElement("track");return e.kind="metadata",e.label="thumbnails",e.srclang="en",e.mode="hidden",e.default=!0,e}(),this.nativeEl.appendChild(a);let e=function(e){let t="WEBVTT\n\n";for(let i of e)t+=`${formatTime(i.startTime)} --> ${formatTime(i.endTime)} 2${i.text} 3 4`;let i=new Blob([t],{type:"text/vtt"});return URL.createObjectURL(i);function formatTime(e){let t=String(Math.floor(e/3600)).padStart(2,"0"),i=String(Math.floor(e%3600/60)).padStart(2,"0"),n=(e%60).toFixed(3).padStart(6,"0");return`${t}:${i}:${n}`}}(n);a.src=e,a.dispatchEvent(new Event("change"))}}async load(){if(this.#e){this.api.attachSource(this.src);return}this.#e=!0;let e=await Promise.all([i.e(244),i.e(642)]).then(i.bind(i,2809));this.api=e.MediaPlayer().create(),this.api.initialize(this.nativeEl,this.src,this.autoplay),this.api.on(e.MediaPlayer.events.STREAM_INITIALIZED,()=>{let e=this.api.getRepresentationsByType("video"),t=this.videoTracks.getTrackById("main");if(t||((t=this.addVideoTrack("main")).id="main",t.selected=!0),e.forEach(e=>{let i=e.bandwidth??e.bitrate??(Number.isFinite(e.bitrateInKbit)?1e3*e.bitrateInKbit:void 0),n=t.addRendition(e.id,e.width,e.height,e.mimeType??e.codec,i);n.id=e.id}),this.videoRenditions.addEventListener("change",()=>{let e=this.videoRenditions[this.videoRenditions.selectedIndex];(null==e?void 0:e.id)?(this.api.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),this.api.setRepresentationForTypeById("video",e.id,!0)):this.api.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}})}),!this.api.isDynamic()){let e=this.api.getRepresentationsByType("image");e.forEach(async(e,t)=>{t>0||this._initThumbnails(e)})}})}};globalThis.customElements&&!globalThis.customElements.get("dash-video")&&globalThis.customElements.define("dash-video",DashVideoElement);var o=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),l={className:"class",htmlFor:"for"};function defaultToAttributeName(e){return e.toLowerCase()}function defaultToAttributeValue(e){return"boolean"==typeof e?e?"":void 0:"function"==typeof e?void 0:"object"!=typeof e||null===e?e:void 0}function setProperty(e,t,i){var n;e[t]=i,null==i&&t in((null==(n=globalThis.HTMLElement)?void 0:n.prototype)??{})&&e.removeAttribute(t)}var s=function({react:e,tagName:t,elementClass:i,events:n,displayName:a,defaultProps:r,toAttributeName:s=defaultToAttributeName,toAttributeValue:u=defaultToAttributeValue}){let d=Number.parseInt(e.version)>=19,c=e.forwardRef((a,c)=>{var h,p;let f=e.useRef(null),m=e.useRef(new Map),b={},v={},T={},y={};for(let[e,t]of Object.entries(a)){if(o.has(e)){T[e]=t;continue}let n=s(l[e]??e);if(i.prototype&&e in i.prototype&&!(e in((null==(h=globalThis.HTMLElement)?void 0:h.prototype)??{}))&&!(null==(p=i.observedAttributes)?void 0:p.some(e=>e===n))){y[e]=t;continue}if(e.startsWith("on")){b[e]=t;continue}let a=u(t);if(n&&null!=a&&(v[n]=String(a),d||(T[n]=a)),n&&d){let e=defaultToAttributeValue(t);a!==e?T[n]=a:T[n]=t}}if("undefined"!=typeof window){for(let t in b){let i=b[t],a=t.endsWith("Capture"),r=((null==n?void 0:n[t])??t.slice(2).toLowerCase()).slice(0,a?-7:void 0);e.useLayoutEffect(()=>{let e=null==f?void 0:f.current;if(e&&"function"==typeof i)return e.addEventListener(r,i,a),()=>{e.removeEventListener(r,i,a)}},[null==f?void 0:f.current,i])}e.useLayoutEffect(()=>{if(null===f.current)return;let e=new Map;for(let t in y)setProperty(f.current,t,y[t]),m.current.delete(t),e.set(t,y[t]);for(let[e,t]of m.current)setProperty(f.current,e,void 0);m.current=e})}if("undefined"==typeof window&&(null==i?void 0:i.getTemplateHTML)&&(null==i?void 0:i.shadowRootOptions)){let{mode:t,delegatesFocus:n}=i.shadowRootOptions,r=e.createElement("template",{shadowrootmode:t,shadowrootdelegatesfocus:n,dangerouslySetInnerHTML:{__html:i.getTemplateHTML(v,a)},key:"ce-la-react-ssr-template-shadow-root"});T.children=[r,T.children]}return e.createElement(t,{...r,...T,ref:e.useCallback(e=>{f.current=e,"function"==typeof c?c(e):null!==c&&(c.current=e)},[c])},T.children)});return c.displayName=a??i.name,c}({react:n,tagName:"dash-video",elementClass:DashVideoElement,toAttributeName:e=>"muted"===e?"":"defaultMuted"===e?"muted":defaultToAttributeName(e)});/*! Bundled license information: 5 6ce-la-react/dist/ce-la-react.js: 7 (** 8 * @license 9 * Copyright 2018 Google LLC 10 * SPDX-License-Identifier: BSD-3-Clause 11 * 12 * Modified version of `@lit/react` for vanilla custom elements with support for SSR. 13 *) 14*/}}]);
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.