1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./C4EUixI0.js","./CScJ0oPt.js","./Cg3lYZ5M.js"])))=>i.map(i=>d[i]); 2import{_ as S}from"./BnQSOZpI.js";import{A as C,bv as U,m as k,u as w,bw as D,bx as I,b as O,e as $}from"./BbljWYOn.js";import{_ as R}from"./C4EUixI0.js";import{d as x,s as q,r as z,c as f,o as A,J as M,D as P,Y as h,a5 as B,u as c,a6 as T,X as F,ak as V,O as v,R as L,ai as N,j,G,Z as b,ah as H,n as Y}from"./Cg3lYZ5M.js";import"./Ds8YeUAI.js";import"./P2ahHQ9t.js";import"./CScJ0oPt.js";const J=C(` 3 fragment VideoPlayerFragment on VideoFileField { 4 video { 5 # required: this field identifies the video to be played 6 muxPlaybackId 7 8 # all the other fields are not required but: 9 10 # if provided, title is displayed in the upper left corner of the video 11 title 12 13 # if provided, width and height are used to define the aspect ratio of the 14 # player, so to avoid layout jumps during the rendering. 15 width 16 height 17 18 # if provided, it shows a blurred placeholder for the video 19 blurUpThumb 20 } 21 } 22`),K={key:0,class:"loading-placeholder"},W=["src"],X={class:"loading-spinner"},Z=x({__name:"DeferredMuxPlayer",props:{data:{},accentColor:{default:"var(--color-accent)"},title:{}},emits:["play","timeUpdate","ended"],setup(u,{emit:m}){const s=u,r=m,n=q(null),p=z(!1),l=f(()=>U(J,s.data)),y=f(()=>{var e,t;return(t=(e=l.value)==null?void 0:e.video)==null?void 0:t.blurUpThumb}),_=f(()=>{var t;const e=(t=l.value)==null?void 0:t.video;return e!=null&&e.width&&(e!=null&&e.height)?{aspectRatio:`${e.width} / ${e.height}`}:{aspectRatio:"16 / 9"}}),o=f(()=>{var e;return{data:(e=l.value)==null?void 0:e.video,accentColor:s.accentColor,title:s.title}});A(async()=>{try{const e=await R(()=>import("./C4EUixI0.js").then(t=>t.i),__vite__mapDeps([0,1,2]),import.meta.url);n.value=e.VideoPlayer}catch(e){console.error("Failed to load Mux Video Player:",e)}});const a=()=>{p.value=!0};return(e,t)=>{const i=M("UIcon");return h(),P("div",{class:"lazy-mux-player-container",style:B(c(_))},[c(p)?T("",!0):(h(),P("div",K,[c(y)?(h(),P("img",{key:0,src:c(y),alt:"",class:"placeholder-image"},null,8,W)):T("",!0),V("div",X,[v(i,{name:"i-tabler-loader-2",class:"animate-spin text-white text-4xl"})])])),c(n)?(h(),F(N(c(n)),L({key:1},c(o),{onLoadeddata:a,onPlay:t[0]||(t[0]=d=>r("play",d)),onTimeUpdate:t[1]||(t[1]=d=>r("timeUpdate",d)),onEnded:t[2]||(t[2]=d=>r("ended",d))}),null,16)):T("",!0)],4)}}}),Q=k(Z,[["__scopeId","data-v-0558eb24"]]);function ee(){const{$matomo:u}=w();return{trackEvent:(s,r,n,p)=>{if(!D(I))return;const l=["trackEvent",s,r];n!==void 0&&l.push(n),n!==void 0&&p!==void 0&&l.push(p),u==null||u.push(l)}}}const E=[25,50,75],te=1;function oe(u){const{trackEvent:m}=ee(),s=new Set;let r=!1;const n=(o,a)=>{m("Video",o,j(u),a)};return{onOpen:()=>{n("Open")},onPlay:o=>{const a=o.target;a&&a.currentTime<te&&(s.clear(),r=!1),r||(r=!0,n("Play"))},onTimeUpdate:o=>{if(s.size===E.length)return;const a=o.target;if(!a)return;const e=a.duration;if(!Number.isFinite(e)||e<=0)return;const t=a.currentTime/e*100;for(const i of E)t>=i&&!s.has(i)&&(s.add(i),n(`Progress ${i}%`,i))},onEnded:()=>{n("Complete",100)}}}const ae={class:"relative"},ne={class:"absolute inset-0 flex items-center justify-center"},ie=x({__name:"VideoElement",props:{media:{},parallaxActive:{type:Boolean},sizes:{}},setup(u){const m=u,s=f(()=>{var o,a,e;return((a=(o=m.media.video)==null?void 0:o.video)==null?void 0:a.title)||m.media.mediaDescription||((e=m.media.videoPreview)==null?void 0:e.alt)||`video-${m.media.id}`}),{onOpen:r,onPlay:n,onTimeUpdate:p,onEnded:l}=oe(s),y=[],_=async()=>{r(),await Y();const o=setTimeout(()=>{const a=document.querySelector('[role="dialog"]')||document.querySelector(".modal");if(a){const e=a.querySelector("mux-player");if(e){const t=e.play();t!==void 0&&t.catch(i=>{console.debug("Video auto-play prevented:",i)})}else{const t=setTimeout(()=>{const i=a.querySelector("mux-player");if(i){const d=i.play();d!==void 0&&d.catch(g=>{console.debug("Video auto-play prevented:",g)})}},200);y.push(t)}}},100);y.push(o)};return G(()=>
22{y.forEach(o=>clearTimeout(o)),y.length=0}),(o,a)=>{const e=S,t=O,i=Q,d=$;return h(),P("div",ae,[v(e,{image:o.media.videoPreview,sizes:o.sizes},null,8,["image","sizes"]),V("div",ne,[v(d,{close:{color:"primary",variant:"light"}},{body:b(()=>{var g;return[v(i,{data:(g=o.media)==null?void 0:g.video,"accent-color":"var(--color-primary-60)",onPlay:c(n),onTimeUpdate:c(p),onEnded:c(l)},null,8,["data","onPlay","onTimeUpdate","onEnded"])]}),default:b(()=>[v(t,{type:"cta",theme:"light",square:"",class:H(o.parallaxActive?"mt-64":""),icon:"i-tabler-play","aria-label":o.$t("video.play_button"),onClick:_},null,8,["class","aria-label"])]),_:1})])])}}}),pe=k(ie,[["__scopeId","data-v-41c44a11"]]);export{pe as default};
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.