{"version":3,"file":"home.js","mappings":";AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU,IAAI,gBAAgB;AAC9B;;AAEA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC","sources":["webpack://build/../vincishoes2/assets/javascripts/pages/home.js"],"sourcesContent":[" const Home = {\n setFullbanner: function () {\n $(\".fullbanner\").each(function (index, el) {\n var $el = $(el);\n //var qtdItems = $el.find('[data-item]').length;\n\n var swiper = new Swiper($(el), {\n slidesPerView: 1,\n spaceBetween: 0,\n watchOverflow: true,\n //autoHeight: true,\n pagination: {\n el: $(el).find(\".swiper-pagination\"),\n clickable: true,\n },\n autoplay: {\n delay: 3000,\n },\n });\n });\n },\n\n setCarrosselProdutos: function () {\n $(\".produtos\").each(function (index, el) {\n var swiper = new Swiper($(el).find(\"[data-produtos]\"), {\n slidesPerView: 2,\n spaceBetween: 5,\n slidesPerGroup: 2,\n breakpoints: {\n 640: {\n slidesPerView: 2,\n spaceBetween: 5,\n slidesPerGroup: 2,\n },\n 768: {\n slidesPerView: 3,\n spaceBetween: 20,\n slidesPerGroup: 3,\n },\n 1024: {\n slidesPerView: 4,\n spaceBetween: 20,\n slidesPerGroup: 4,\n },\n },\n navigation: {\n nextEl: $(el).find(\".swiper-button-next\"),\n prevEl: $(el).find(\".swiper-button-prev\"),\n disabledClass: \"-disabled\",\n },\n });\n });\n },\n\n setExtras: function () {\n window._extras = [];\n const swiperEls = document.querySelectorAll('.section-extra [data-swiper-extra]');\n if (swiperEls.length > 0) swiperEls.forEach((swiperEl, i) => {\n swiperEl.setAttribute('data-swiper-index', i);\n\n let newSwiper = new Swiper(swiperEl, {\n slidesPerView: 'auto',\n spaceBetween: 16,\n breakpoints: {\n 768: {\n spaceBetween: 24\n }\n },\n watchOverflow: true,\n simulateTouch: true,\n scrollbar: {\n el: swiperEl.querySelector('.swiper-scrollbar'),\n hide: false,\n draggable: true\n }\n });\n\n // let observer = new IntersectionObserver(entries => {\n // if (entries[0].isIntersecting) {\n // console.log('categories!');\n // window.dispatchEvent(new Event('resize'));\n // newSwiper.on('slideChange', () => {\n // window.dispatchEvent(new Event('resize')); \n // });\n // observer.disconnect()\n // }\n // }, { threshold: 0.1 });\n // observer.observe(swiperEl.closest('.section-extra'));\n\n window._extras.push(newSwiper);\n });\n },\n\n setScroll: function () {\n var header = document.querySelector('header'); \n window.addEventListener('scroll', () => {\n let currentScroll = window.pageYOffset;\n if (currentScroll > 0) header.classList.add('-scroll');\n if (currentScroll <= 0) header.classList.remove('-scroll');\n });\n },\n\n init: function() {\n console.log('Home init called');\n\n this.setExtras();\n this.setScroll();\n this.setFullbanner();\n this.setCarrosselProdutos();\n }\n}\n\nwindow.addEventListener('DOMContentLoaded', () => {\n Home.init()\n})\n"],"names":[],"sourceRoot":""}