1import{y as v,k as p,H as h,ai as m,A as l,ag as w,j as r,aq as b,_ as s}from"./D0rPpKiU.js";const k=["src","width","height"],g=v({__name:"LoopingVideo",props:{blok:{}},setup(o){const u=o,i=r(null),e=r(null),t=r(!1);let n=null;const d=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;p(()=>{if(u.blok?.video_url&&!d()){if(typeof IntersectionObserver>"u"||!i.value){t.value=!0;return}n=new IntersectionObserver(([a])=>{a.isIntersecting?t.value?e.value?.paused&&e.value.play().catch(()=>{}):t.value=!0:e.value&&!e.value.paused&&e.value.pause()},{rootMargin:"200px"}),n.observe(i.value)}}),h(()=>{n?.disconnect(),n=null});function c(){}return(a,y)=>{const f=b("editable");return m((s(),l("div",{ref_key:"wrapperRef",ref:i,class:"looping-video w-full h-full"},[t.value?(s(),l("video",{key:0,ref_key:"videoRef",ref:e,src:o.blok.video_url,width:o.blok.width||void 0,height:o.blok.height||void 0,autoplay:"",muted:"",loop:"",playsinline:"",preload:"metadata","aria-hidden":"true",class:"w-full h-full object-cover",onError:c},null,40,k)):w("",!0)])),[[f,o.blok]])}}}),M=Object.assign(g,{__name:"LoopingVideo"});export{M 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.