var greenshiftcarousel=document.getElementsByClassName("gspb_smartscroll");for(let i=0;i<greenshiftcarousel.length;i++){let e=greenshiftcarousel[i],t=e.getAttribute("data-carouselWrapper");if(!t){let r=e.querySelector(".gspb_smartscroll_btns");r&&(t=r.getAttribute("data-carouselWrapper"))}if(e.getAttribute("data-dragenable")){let s=t?e.querySelector("."+t):e,a=!1,l,o;s.addEventListener("mousedown",e=>{a=!0,s.classList.add("activedrag"),l=e.pageX-s.offsetLeft,o=s.scrollLeft,u()}),s.addEventListener("mouseleave",()=>{a=!1,s.classList.remove("activedrag")}),s.addEventListener("mouseup",()=>{a=!1,s.classList.remove("activedrag"),f()}),s.addEventListener("mousemove",e=>{if(!a)return;e.preventDefault();e.stopPropagation();let t=e.pageX-s.offsetLeft,r=t-l;var n=s.scrollLeft;s.scrollLeft=o-r,c=s.scrollLeft-n});var n,c=0;function f(){u(),n=requestAnimationFrame(d)}function u(){cancelAnimationFrame(n)}function d(){s.scrollLeft+=.5*c,Math.abs(c*=.96)>.1&&(n=requestAnimationFrame(d))}s.addEventListener("wheel",e=>{u()}),s.addEventListener("wheel",e=>{e.preventDefault(),window.requestAnimationFrame(()=>{s.scrollTo({top:0,left:s.scrollLeft+e.deltaY+e.deltaX})})})}}