const initScrollyVideoAnimation=(e=document)=>{let t=(t=e)=>{t.querySelectorAll("[data-canvas-type='scrollyvideo']").forEach(e=>{let t=e.getAttribute("data-canvas-src");e.getAttribute("data-canvas-project-id");let l=e.getAttribute("data-canvas-extra-filters"),o={};if(l)try{o=JSON.parse(l)}catch(r){console.warn("Invalid extra filters JSON:",l)}null!==e.querySelector("video")&&e.querySelector("video").remove(),null!==e.querySelector("canvas")&&e.querySelector("canvas").remove(),e.style="";let a=new ScrollyVideo({scrollyVideoContainer:e,src:t,cover:o?.cover||!1,useWebCodecs:o?.useWebCodecs||!1,transitionSpeed:parseFloat(o?.transitionSpeed)||8,frameThreshold:parseFloat(o?.frameThreshold)||.1,sticky:o?.sticky||!1,full:o?.full||!1,trackScroll:o?.trackScroll||!0,lockScroll:o?.lockScroll||!0});e.classList.add("loaded"),e._scrollyVideoInstance=a})},l=()=>{let e=document.getElementById("scrollyvideo-js");if(e)e.onload=()=>{t()};else{let l=document.createElement("script");l.src="https://cdn.jsdelivr.net/npm/scrolly-video@latest/dist/scrolly-video.js",l.id="scrollyvideo-js",document.body.appendChild(l),l.onload=()=>{t()}}},o=e.querySelectorAll("[data-canvas-type='scrollyvideo']");if(o&&o.length>0){let r=!1;o.forEach(e=>{e.getAttribute("data-canvas-smart-lazy-load")&&(r=!0)}),r?(document.body.addEventListener("mouseover",l,{once:!0}),document.body.addEventListener("touchmove",l,{once:!0}),window.addEventListener("scroll",l,{once:!0}),document.body.addEventListener("keydown",l,{once:!0})):l()}};initScrollyVideoAnimation();