PageSourceSearch

https://www.zerounoweb.it/wp-content/cache/perfmatters/www.zerouno…e89aa072e14.engage-unit-v2.min.js?ver=2.9.4

js zerounoweb.it collected 2026-09-24 18:59:21 UTC 3,120 bytes, 18 lines download raw bytes

1const CAROUSEL_ANIMATION_DELAY=300;(function(window,document,undefined){let tabs;let nextBtn;let prevBtn;let carousels=[];const updateCounter=()=>{const activeTab=document.querySelector('.card-eu .tab-content.active');if(!activeTab){return}
2const counter=activeTab.querySelector('span.counter');const carousel=activeTab.querySelector('.carousel');const allItems=[...carousel.querySelectorAll('.carousel-item')];const currentActiveElement=carousel.querySelector('.carousel-item[style*="z-index: 0"]');if(!currentActiveElement){return}
3const index=allItems.indexOf(currentActiveElement);counter.innerHTML=index+1}
4const initCarousel=(tab)=>{const carouselElement=tab.querySelector('.carousel');const carouselInstance=M.Carousel.init(carouselElement,{fullWidth:!0,noWrap:!0,});carousels[tab.id]=carouselInstance;const counter=tab.querySelector('span.counter');if(counter){counter.innerHTML='1'}
5const carouselItems=carouselElement.querySelectorAll('.carousel-item');carouselItems.forEach((item,idx)=>{item.addEventListener('focus',function(){carouselInstance.set(idx);setTimeout(()=>{updateCounter()},CAROUSEL_ANIMATION_DELAY)})})}
6const nextSlide=(event,force)=>{const self=event.currentTarget;let tabId;let counter;if(force){const activeTab=document.querySelector('.card-eu .tab-content.active');if(!activeTab){return}
7tabId=activeTab.id;counter=activeTab.querySelector('span.counter')}else{const currentTab=self.closest('.tab-content');tabId=currentTab.id;counter=currentTab.querySelector('span.counter')}
8if(!carousels[tabId]){return}
9const numItems=carousels[tabId].el.querySelectorAll('.carousel-item').length
10const currentNum=parseInt(counter.innerHTML,10);if(currentNum==1&&(numItems==currentNum)){return}
11carousels[tabId].next();setTimeout(()=>{updateCounter()},CAROUSEL_ANIMATION_DELAY)}
12const prevSlide=(event)=>{const self=event.currentTarget;const currentTab=self.closest('.tab-content');const tabId=currentTab.id;if(!carousels[tabId]){return}
13carousels[tabId].prev();setTimeout(()=>{updateCounter()},CAROUSEL_ANIMATION_DELAY)}
14const loadEngangeUnit=()=>{tabs=document.querySelectorAll('.card-eu .tabs');if(!tabs.length){return}
15M.Tabs.init(tabs,{onShow:initCarousel});const firstActiveTab=document.querySelector('.card-eu .tab-content.active');if(firstActiveTab){initCarousel(firstActiveTab)}
16indicator=document.querySelector('.card-eu .indicator');indicator.style.backgroundColor=indicator.parentNode.dataset.color;nextBtn=document.querySelectorAll('.card-eu .icon-wrap--next');prevBtn=document.querySelectorAll('.card-eu .icon-wrap--prev');
16nextBtn.forEach((btn)=>{const carouselItems=btn.closest('div.tab-content').querySelectorAll('.carousel-item').length;if(carouselItems>1){btn.addEventListener('click',nextSlide,{passive:!0})}});prevBtn.forEach((btn)=>{const carouselItems=btn.closest('div.tab-content').querySelectorAll('.carousel-item').length;if(carouselItems>1){btn.addEventListener('click',prevSlide,{passive:!0})}})}
17if(document.readyState==='interactive'||document.readyState==='complete'){loadEngangeUnit();return}
18document.addEventListener('DOMContentLoaded',loadEngangeUnit)})(window,document)

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.