{"version":3,"sources":["webpack:///./app/javascript/src/landing_page_slider.js"],"names":["Swiper","use","Autoplay","Navigation","Pagination","Lazy","swiper","loop","autoplay","delay","lazy","preloadImages","images","document","querySelectorAll","i","length","img","setAttribute","getAttribute","setMainSliderMargin","header","querySelector","headerHeight","height","style","marginTop","window","innerWidth","documentElement","clientWidth","body","$","css","addEventListener","event","console","log","onresize","BurgerIcon","e","target","previousElementSibling","classList","toggle"],"mappings":"2FAAA,oEAEAA,IAAOC,IAAI,CAACC,IAAUC,IAAYC,IAAYC,MA4C9C,IA1CA,IAAMC,EAAS,IAAIN,IAAO,UAAW,CACnCO,MAAM,EAENC,SAAU,CACRC,MAAO,KAGTC,MAAM,EAENC,eAAe,IAgCXC,EAASC,SAASC,iBAAiB,gBAChCC,EAAI,EAAGA,EAAIH,EAAOI,OAAQD,IAAK,CACtC,IAAME,EAAML,EAAOG,GACnBE,EAAIC,aAAa,UAAW,QAC5BD,EAAIC,aAAa,WAAY,SAC7BD,EAAIC,aAAa,SAAUD,EAAIE,aAAa,gBAC5CF,EAAIC,aAAa,QAASD,EAAIE,aAAa,cAC7C,CAGA,SAASC,IACP,IAAIC,EAASR,SAASS,cAAc,UAChCC,EAAeF,EAAOG,OACtBH,GACEf,IACFA,EAAOmB,MAAMC,UAAYH,EAAe,OAIhCI,OAAOC,YAAcf,SAASgB,gBAAgBC,aAAejB,SAASkB,KAAKD,aAE3E,MAAsD,OAA9CjB,SAASS,cAAc,oBACzCU,EAAE,mBAAmBC,IAAI,UAAW,SACpCD,EAAE,cAAcC,IAAI,UAAW,SAC/BD,EAAE,mBAAmBC,IAAI,UAAW,SACpCD,EAAE,mBAAmBC,IAAI,UAAW,gBAEpCD,EAAE,mBAAmBC,IAAI,UAAW,OAExC,CAEAN,OAAOO,iBAAiB,cAAc,SAAAC,GACpCC,QAAQC,IAAI,WACZjB,IACAO,OAAOW,SAAWlB,CACpB,IAGA,IAAImB,EAAa1B,SAASS,cAAc,gBAEpCiB,GACFA,EAAWL,iBAAiB,SAAS,SAAAM,GACbA,EAAEC,OAAOC,uBACfC,UAAUC,OAAO,SACnC,G","file":"js/10-6b6369bbfd811868f431.chunk.js","sourcesContent":["import Swiper, { Autoplay, Navigation, Pagination, Lazy } from 'swiper';\n\nSwiper.use([Autoplay, Navigation, Pagination, Lazy]);\n\nconst swiper = new Swiper('.swiper', {\n loop: true,\n \n autoplay: {\n delay: 4000\n },\n \n lazy: true, // enable lazy loading of images\n \n preloadImages: true, // preload all images before the slider is initialized\n \n // set appropriate breakpoints for responsive images\n // breakpoints: {\n // 640: {\n // width: 640,\n // height: 360,\n // },\n // 768: {\n // width: 768,\n // height: 432,\n // },\n // 1024: {\n // width: 1024,\n // height: 576,\n // },\n // 1280: {\n // width: 1280,\n // height: 720,\n // },\n // 1440: {\n // width: 1440,\n // height: 810,\n // },\n // 1600: {\n // width: 1600,\n // height: 900,\n // }\n // }\n});\n\n// ensure that the images are cached by setting appropriate Cache-Control headers\nconst images = document.querySelectorAll('.swiper-lazy');\nfor (let i = 0; i < images.length; i++) {\n const img = images[i];\n img.setAttribute('loading', 'lazy'); // set loading attribute to lazy\n img.setAttribute('decoding', 'async'); // set decoding attribute to async\n img.setAttribute('srcset', img.getAttribute('data-srcset')); // set the srcset attribute to the data-srcset attribute\n img.setAttribute('sizes', img.getAttribute('data-sizes')); // set the sizes attribute to the data-sizes attribute\n}\n\n\nfunction setMainSliderMargin() {\n let header = document.querySelector(\"header\");\n let headerHeight = header.height;\n if (header) {\n if (swiper) {\n swiper.style.marginTop = headerHeight + \"px\";\n }\n }\n \n let width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\n\n if (width > 1080 && document.querySelector(\".dashboard-link\") !== null) {\n $(\".dashboard-link\").css(\"display\", \"block\");\n $(\"#menu-list\").css(\"display\", \"block\");\n $(\"#user-menu-list\").css(\"display\", \"block\");\n $(\"#menu-icon-list\").css(\"display\", \"inline-flex\");\n } else {\n $(\".dashboard-link\").css(\"display\", \"none\");\n }\n}\n\nwindow.addEventListener(\"turbo:load\", event => {\n console.log(\"we here\")\n setMainSliderMargin();\n window.onresize = setMainSliderMargin;\n});\n\n\nlet BurgerIcon = document.querySelector(\".burger-icon\");\n\nif (BurgerIcon) {\n BurgerIcon.addEventListener(\"click\", e => {\n let PreviousSibling = e.target.previousElementSibling;\n PreviousSibling.classList.toggle(\"active\");\n });\n}\n"],"sourceRoot":""}