{"version":3,"file":"Home_MainSlider.min.js","names":["constructor","this","elWrapper","document","getElementById","elSwiper","SetupSwiper","elPagination","style","visibility","opacity","fnPagination","swiper","querySelectorAll","forEach","elBullet","bulletIndex","realIndex","Swiper","direction","loop","autoplay","disableOnInteraction","delay","pagination","el","bulletClass","bulletActiveClass","clickable","navigation","nextEl","prevEl","on","afterInit","window","setTimeout","activeIndexChange"],"sources":["V2/Home_MainSlider.js"],"mappings":"AAsFI,IArFA,MACI,WAAAA,GACIC,KAAKC,UAAYC,SAASC,eAAe,8BACzCH,KAAKI,SAAWF,SAASC,eAAe,6BAEnCH,KAAKC,WAAcD,KAAKI,UAK7BJ,KAAKK,aACT,CACA,WAAAA,GAEI,MAAMC,EAAeJ,SAASC,eAAe,wCAEzCG,IAEAA,EAAaC,MAAMC,WAAa,oBAChCF,EAAaC,MAAME,QAAU,KAGjC,MAAMC,EAAgBC,IAEdL,IAEAA,EAAaM,iBAAiB,QAAQC,SAAQ,CAACC,EAAUC,KAMlCJ,EAAOK,SAK1B,IAQiC,WAAjCV,EAAaC,MAAMC,aAEnBF,EAAaC,MAAMC,WAAa,UAChCF,EAAaC,MAAME,QAAU,KAErC,EAGW,IAAIQ,OAAOjB,KAAKI,SAAU,CAErCc,UAAW,aACXC,MAAM,EACNC,SAAU,CACNC,sBAAsB,EACtBC,MAAO,KAEXC,WAAY,CACRC,GAAItB,SAASC,eAAe,wCAC5BsB,YAAa,oDACbC,kBAAmB,2DACnBC,WAAW,GAEfC,WAAY,CACRC,OAAQ3B,SAASC,eAAe,yCAChC2B,OAAQ5B,SAASC,eAAe,0CAEpC4B,GAAI,CACAC,UAAW,SAAUrB,GACjBD,EAAaC,GACbsB,OAAOC,YAAW,KACdxB,EAAaC,EAAO,GACrB,IACP,EACAwB,kBAAmB,SAAUxB,GACzBD,EAAaC,EACjB,IAGZ","ignoreList":[],"sourcesContent":["(function () {\r\n class Zepter_V2_Home_MainSlider {\r\n constructor() {\r\n this.elWrapper = document.getElementById(\"V2_Home_MainSlider_Wrapper\");\r\n this.elSwiper = document.getElementById(\"V2_Home_MainSlider_Swiper\");\r\n // Jeśli wymagane kontenery nie zostały odnalezione w DOM\r\n if (!this.elWrapper || !this.elSwiper) {\r\n // Zakończ działanie tej klasy\r\n return;\r\n }\r\n // Uruchom slider\r\n this.SetupSwiper();\r\n }\r\n SetupSwiper() {\r\n // Ustal element z paginatorem\r\n const elPagination = document.getElementById(\"V2_Home_MainSlider_Swiper_Pagination\");\r\n // Jeśli element z paginatorem istnieje\r\n if (elPagination) {\r\n // Ukryh element z paginatorem na starcie\r\n elPagination.style.visibility = \"hidden !important\";\r\n elPagination.style.opacity = \"0\";\r\n }\r\n // Funkcja ustawiająca paginator\r\n const fnPagination = (swiper) => {\r\n // Jeśli paginator istnieje\r\n if (elPagination) {\r\n // Przetwarzaj elementy paginatora\r\n elPagination.querySelectorAll(\"span\").forEach((elBullet, bulletIndex) => {\r\n // Wygaś element paginatora\r\n //elBullet.classList.remove(\"swiper-pagination-bullet-active\")\r\n //elBullet.classList.remove(\"swiper-pagination-current\")\r\n //elBullet.removeAttribute(\"aria-current\")\r\n // Jeśli ten element paginatora odpowiada aktualnie widocznemu slajdowi\r\n if (bulletIndex == swiper.realIndex) {\r\n // Podświetl element paginatora\r\n //elBullet.classList.add(\"swiper-pagination-bullet-active\")\r\n //elBullet.classList.add(\"swiper-pagination-current\")\r\n //elBullet.setAttribute(\"aria-current\", \"true\")\r\n }\r\n // Jeśli element jest nadmiarowy (oznacza zduplikowane slajdy do opcji 'loop' slidera)\r\n //if (bulletIndex >= swiper.slides.length - 2) {\r\n // // Ukryj element nadmiarowy\r\n // //elBullet.style.display = \"none\"\r\n //}\r\n });\r\n // Jeśli paginator jest ukryty (stan startowy)\r\n if (elPagination.style.visibility != \"visible\") {\r\n // Uczyń paginator widocznym\r\n elPagination.style.visibility = \"visible\";\r\n elPagination.style.opacity = \"1\";\r\n }\r\n }\r\n };\r\n // Uruchom swiper slider\r\n const swiper = new Swiper(this.elSwiper, {\r\n // Optional parameters\r\n direction: 'horizontal',\r\n loop: true,\r\n autoplay: {\r\n disableOnInteraction: true,\r\n delay: 4000,\r\n },\r\n pagination: {\r\n el: document.getElementById(\"V2_Home_MainSlider_Swiper_Pagination\"),\r\n bulletClass: 'V2_Home_MainSlider_Swiper_Pagination_Item_Wrapper',\r\n bulletActiveClass: 'V2_Home_MainSlider_Swiper_Pagination_Item_Wrapper_Active',\r\n clickable: true,\r\n },\r\n navigation: {\r\n nextEl: document.getElementById(\"V2_Home_MainSlider_Swiper_Button_Next\"),\r\n prevEl: document.getElementById(\"V2_Home_MainSlider_Swiper_Button_Prev\"),\r\n },\r\n on: {\r\n afterInit: function (swiper) {\r\n fnPagination(swiper);\r\n window.setTimeout(() => {\r\n fnPagination(swiper);\r\n }, 1000);\r\n },\r\n activeIndexChange: function (swiper) {\r\n fnPagination(swiper);\r\n },\r\n },\r\n });\r\n }\r\n }\r\n new Zepter_V2_Home_MainSlider();\r\n})();\r\n//# sourceMappingURL=Home_MainSlider.js.map"]}