(()=>{const{GHOSTKIT:{events:t},Motion:{inView:e,scroll:o}}=window;t.on(document,"click",'.ghostkit-lottie[data-trigger="click"] > lottie-player',(t=>{t.delegateTarget?.play&&t.delegateTarget.play()})),e('.ghostkit-lottie[data-trigger="viewport"] > lottie-player',(t=>(t?.target?.play&&t.target.play(),t=>{t?.target?.pause&&t.target.pause()}))),t.on(document,"init.blocks.gkt",(()=>{document.querySelectorAll('.ghostkit-lottie[data-trigger="scroll"]:not(.ghostkit-lottie-ready)').forEach((t=>{const e=t.querySelector("lottie-player"),l="-1"===e.getAttribute("direction");t.classList.add("ghostkit-lottie-ready"),o((t=>{if(e?._lottie){const{totalFrames:o,goToAndStop:a}=e._lottie;let i=Math.round(t*o);l&&(i=o-i),i<o&&a.call(e._lottie,i,!0)}}),{target:e,offset:["start end","end start"]})}))}))})();