1function Carousel(domNode){this.isAlreadySwiping=!1,this.currentItem=0,this.sizeOfChildren=0,this.lastSlide=(new Date).getTime(),this.init=function(){var that=this,leftArrow=domNode.querySelector(".home-carousel-btn-left"),rightArrow=domNode.querySelector(".home-carousel-btn-right"),shortcutContainer=domNode.querySelector(".home-carousel-footer"),littleShortcuts=Array.from(domNode.querySelectorAll(".home-carousel-footer-item")),swipeValue=parseInt(domNode.dataset.swipeValue)||1,slideEnabled=void 0!==domNode.dataset.slide?parseInt(domNode.dataset.slide):1,automaticSlide=parseInt(domNode.dataset.autoslide)||!1,swipeArea=domNode,xAxisTouchStart=0,xAxisTouchStop=0;document.querySelectorAll(".home-page #home-head-carousel .home-carousel-images").forEach(carousel=>{carousel.addEventListener("mouseenter",()=>{document.querySelectorAll(".home-page #home-head-carousel .home-carousel-btn").forEach(elem=>{elem.style.display="block"})}),carousel.addEventListener("mouseleave",()=>{document.querySelectorAll(".home-page #home-head-carousel .home-carou
1sel-btn").forEach(elem=>{elem.style.display="none"})}),document.querySelectorAll(".home-page #home-head-carousel .home-carousel-btn").forEach(elem=>{elem.addEventListener("mouseenter",()=>{document.querySelectorAll(".home-page #home-head-carousel .home-carousel-btn").forEach(elem2=>{elem2.style.display="block"})})})}),slideEnabled&&(swipeArea.addEventListener("touchstart",e=>{xAxisTouchStart=e.touches[0].screenX,xAxisTouchStop=xAxisTouchStart}),swipeArea.addEventListener("touchend",e=>{const swipedSize=xAxisTouchStart-xAxisTouchStop;(swipedSize>50||swipedSize<-50)&&(swipedSize>0?rightArrow.click():leftArrow.click())}),swipeArea.addEventListener("touchmove",e=>{xAxisTouchStop=e.touches[0].screenX})),leftArrow&&leftArrow.addEventListener("click",this.swipeLeft(domNode,swipeValue,this)),rightArrow&&rightArrow.addEventListener("click",this.swipeRight(domNode,swipeValue,this)),shortcutContainer&&shortcutContainer.dataset.shortcut&&littleShortcuts.forEach(function(littleShortcut){littleShortcut.addEventListener("click",function(){littleShortcut.dataset.key<that.currentItem?that.swipeLeft(domNode,Math.abs(parseInt(littleShortcut.dataset.key)-that.currentItem),that)():littleShortcut.dataset.key>that.currentItem&&that.swipeRight(domNode,Math.abs(that.currentItem-parseInt(littleShortcut.dataset.key)),that)()})}),this.calculateChildWidth(),window.addEventListener("resize",this.calculateChildWidth.bind(this)),this.manageAutomaticSlide(automaticSlide,domNode,swipeValue)},this.calculateChildWidth=function(){this.sizeOfChildren=domNode.querySelector(".home-carou
1sel-images .home-carousel-image")&&-domNode.querySelector(".home-carousel-images .home-carousel-image").offsetWidth},this.manageAutomaticSlide=function(automaticSlide,carousel,swipeValue){if(automaticSlide){var that=this;setInterval(function(){(new Date).getTime()>that.lastSlide+5e3&&that.swipeRight(carousel,swipeValue,that)()},1e3)}},this.swipeLeft=function(carousel,swipeValue,config){var that=this;return function(e){if(!config.isAlreadySwiping){config.isAlreadySwiping=!0;for(var imageContainer=carousel.querySelector(".home-carousel-images"),images=imageContainer.querySelectorAll(".home-carousel-image"),lastImages=[],newFirstImage=null,i=0;i<swipeValue;++i)lastImages.push(images[images.length-(1+i)]);lastImages.length&&(lastImages.forEach(function(lastImage){imageContainer.removeChild(lastImage),newFirstImage=imageContainer.insertBefore(lastImage,imageContainer.firstElementChild)}),newFirstImage.style.marginLeft=that.sizeOfChildren*swipeValue+"px",imageContainer.classList.add("swipe-enabled"),setTimeout(function(){newFirstImage.style.marginLeft="0px";var timeStr=window.getComputedStyle(newFirstImage,null).getPropertyValue("transition-duration"),time=parseFloat(window.getComputedStyle(newFirstImage,null).getPropertyValue("transition-duration"))||0;
1carousel.querySelector(".home-carousel-footer-item[data-key='"+config.currentItem+"']")&&carousel.querySelector(".home-carousel-footer-item[data-key='"+config.currentItem+"']").classList.remove("active"),config.currentItem=parseInt(imageContainer.firstElementChild.dataset.index),carousel.querySelector(".home-carousel-footer-item[data-key='"+config.currentItem+"']")&&carousel.querySelector(".home-carousel-footer-item[data-key='"+config.currentItem+"']").classList.add("active"),setTimeout(function(){newFirstImage.style.marginLeft=null,imageContainer.classList.remove("swipe-enabled"),config.isAlreadySwiping=!1,that.lastSlide=(new Date).getTime()},-1!==timeStr.indexOf("ms")?time:1e3*time)},0))}}},this.swipeRight=function(carousel,swipeValue,config){var that=this;return function(e){if(!config.isAlreadySwiping){config.isAlreadySwiping=!0;for(var imageContainer=carousel.querySelector(".home-carousel-images"),images=carousel.querySelectorAll(".home-carousel-images .home-carousel-image"),firstImages=[],i=0;i<swipeValue;++i)firstImages.push(images[i]);firstImages.length&&(imageContainer.classList.add("swipe-enabled"),setTimeout(function(){firstImages[0].style.marginLeft=that.sizeOfChildren*swipeValue+"px";var timeStr=window.getComputedStyle(firstImages[0],null).getPropertyValue("transition-duration"),time=parseFloat(window.getComputedStyle(firstImages[0],null).getPropertyValue("transition-duration"))||0;
1carousel.querySelector(".home-carousel-footer-item[data-key='"+config.currentItem+"']")&&carousel.querySelector(".home-carousel-footer-item[data-key='"+config.currentItem+"']").classList.remove("active"),config.currentItem=parseInt(imageContainer.firstElementChild.dataset.index)+swipeValue,carousel.querySelector(".home-carousel-footer-item[data-key='"+config.currentItem+"']")&&carousel.querySelector(".home-carousel-footer-item[data-key='"+config.currentItem+"']").classList.add("active"),setTimeout(function(){firstImages[0].style.marginLeft=null,imageContainer.classList.remove("swipe-enabled"),firstImages.forEach(function(firstImage){imageContainer.removeChild(firstImage),imageContainer.appendChild(firstImage)}),config.isAlreadySwiping=!1,that.lastSlide=(new Date).getTime()},-1!==timeStr.indexOf("ms")?time:1e3*time)},0))}}}}
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.