{"version":3,"sources":["wwwroot/scripts/main.js"],"names":["toggleScrolled","selectBody","document","querySelector","selectHeader","classList","contains","window","scrollY","add","remove","addEventListener","mobileNavToggleBtn","mobileNavToogle","toggle","querySelectorAll","forEach","navmenu","e","preventDefault","this","parentNode","nextElementSibling","stopImmediatePropagation","preloader","let","scrollTop","toggleScrollTop","aosInit","AOS","init","duration","easing","once","mirror","scrollTo","top","behavior","GLightbox","selector","PureCounter","isotopeItem","layout","getAttribute","filter","sort","initIsotope","imagesLoaded","Isotope","itemSelector","layoutMode","sortBy","filters","arrange","swiperElement","config","JSON","parse","innerHTML","trim","initSwiperWithCustomPagination","Swiper","location","hash","setTimeout","section","scrollMarginTop","getComputedStyle","offsetTop","parseInt","navmenulinks","navmenuScrollspy","navmenulink","position","offsetHeight","link"],"mappings":"CAQA,wBAMA,SAAAA,IACA,MAAAC,EAAAC,SAAAC,cAAA,QACAC,EAAAF,SAAAC,cAAA,YACAC,EAAAC,UAAAC,SAAA,qBAAAF,EAAAC,UAAAC,SAAA,eAAAF,EAAAC,UAAAC,SAAA,gBACA,IAAAC,OAAAC,QAAAP,EAAAI,UAAAI,IAAA,YAAAR,EAAAI,UAAAK,OAAA,aAGAR,SAAAS,iBAAA,SAAAX,GACAO,OAAAI,iBAAA,OAAAX,GAKA,MAAAY,EAAAV,SAAAC,cAAA,sBAEA,SAAAU,IACAX,SAAAC,cAAA,QAAAE,UAAAS,OAAA,qBACAF,EAAAP,UAAAS,OAAA,WACAF,EAAAP,UAAAS,OAAA,QAEAF,EAAAD,iBAAA,QAAAE,GAKAX,SAAAa,iBAAA,cAAAC,QAAAC,IACAA,EAAAN,iBAAA,QAAA,KACAT,SAAAC,cAAA,uBACAU,QASAX,SAAAa,iBAAA,6BAAAC,QAAAC,IACAA,EAAAN,iBAAA,QAAA,SAAAO,GACAA,EAAAC,iBACAC,KAAAC,WAAAhB,UAAAS,OAAA,UACAM,KAAAC,WAAAC,mBAAAjB,UAAAS,OAAA,mBACAI,EAAAK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GAEA,IAAAM,OAAAP,EAAAC,OAUAhD,OAAAI,iBAAA,OAAA,SAAAO,GACAX,OAAAuD,SAAAC,MACA7D,SAAAC,cAAAI,OAAAuD,SAAAC,OACAC,WAAA,KACAvC,IAAAwC,EAAA/D,SAAAC,cAAAI,OAAAuD,SAAAC,MACAG,EAAAC,iBAAAF,GAAAC,gBACA3D,OAAA4B,SAAA,CACAC,IAAA6B,EAAAG,UAAAC,SAAAH,GACA7B,SAAA,YAEA,OAQAZ,IAAA6C,EAAApE,SAAAa,iBAAA,cAEA,SAAAwD,IACAD,EAAAtD,QAAAwD,IACA,IACAP,EAEAQ,GAHAD,EAAAT,OACAE,EAAA/D,SAAAC,cAAAqE,EAAAT,UAEAU,EAAAlE,OAAAC,QAAA,MACAyD,EAAAG,WAAAK,GAAAR,EAAAG,UAAAH,EAAAS,cACAxE,SAAAa,iBAAA,qBAAAC,QAAA2D,GAAAA,EAAAtE,UAAAK,OAAA,WACA8D,EAAAnE,UAAAI,IAAA,WAEA+D,EAAAnE,UAAAK,OAAA,aAIAH,OAAAI,iBAAA,OAAA4D,GACArE,SAAAS,iBAAA,SAAA4D,GAzMA","file":"main.min.js","sourcesContent":["/**\n* Template Name: Bethany\n* Template URL: https://bootstrapmade.com/bethany-free-onepage-bootstrap-theme/\n* Updated: Aug 07 2024 with Bootstrap v5.3.3\n* Author: BootstrapMade.com\n* License: https://bootstrapmade.com/license/\n*/\n\n(function() {\n \"use strict\";\n\n /**\n * Apply .scrolled class to the body as the page is scrolled down\n */\n function toggleScrolled() {\n const selectBody = document.querySelector('body');\n const selectHeader = document.querySelector('#header');\n if (!selectHeader.classList.contains('scroll-up-sticky') && !selectHeader.classList.contains('sticky-top') && !selectHeader.classList.contains('fixed-top')) return;\n window.scrollY > 100 ? selectBody.classList.add('scrolled') : selectBody.classList.remove('scrolled');\n }\n\n document.addEventListener('scroll', toggleScrolled);\n window.addEventListener('load', toggleScrolled);\n\n /**\n * Mobile nav toggle\n */\n const mobileNavToggleBtn = document.querySelector('.mobile-nav-toggle');\n\n function mobileNavToogle() {\n document.querySelector('body').classList.toggle('mobile-nav-active');\n mobileNavToggleBtn.classList.toggle('bi-list');\n mobileNavToggleBtn.classList.toggle('bi-x');\n }\n mobileNavToggleBtn.addEventListener('click', mobileNavToogle);\n\n /**\n * Hide mobile nav on same-page/hash links\n */\n document.querySelectorAll('#navmenu a').forEach(navmenu => {\n navmenu.addEventListener('click', () => {\n if (document.querySelector('.mobile-nav-active')) {\n mobileNavToogle();\n }\n });\n\n });\n\n /**\n * Toggle mobile nav dropdowns\n */\n document.querySelectorAll('.navmenu .toggle-dropdown').forEach(navmenu => {\n navmenu.addEventListener('click', function(e) {\n e.preventDefault();\n this.parentNode.classList.toggle('active');\n this.parentNode.nextElementSibling.classList.toggle('dropdown-active');\n e.stopImmediatePropagation();\n });\n });\n\n /**\n * Preloader\n */\n const preloader = document.querySelector('#preloader');\n if (preloader) {\n window.addEventListener('load', () => {\n preloader.remove();\n });\n }\n\n /**\n * Scroll top button\n */\n let scrollTop = document.querySelector('.scroll-top');\n\n function toggleScrollTop() {\n if (scrollTop) {\n window.scrollY > 100 ? scrollTop.classList.add('active') : scrollTop.classList.remove('active');\n }\n }\n\n if (scrollTop) {\n scrollTop.addEventListener('click', (e) => {\n e.preventDefault();\n window.scrollTo({\n top: 0,\n behavior: 'smooth'\n });\n });\n }\n\n window.addEventListener('load', toggleScrollTop);\n document.addEventListener('scroll', toggleScrollTop);\n\n /**\n * Animation on scroll function and init\n */\n function aosInit() {\n AOS.init({\n duration: 600,\n easing: 'ease-in-out',\n once: true,\n mirror: false\n });\n }\n window.addEventListener('load', aosInit);\n\n /**\n * Initiate glightbox\n */\n const glightbox = GLightbox({\n selector: '.glightbox'\n });\n\n /**\n * Initiate Pure Counter\n */\n new PureCounter();\n\n /**\n * Init isotope layout and filters\n */\n document.querySelectorAll('.isotope-layout').forEach(function(isotopeItem) {\n let layout = isotopeItem.getAttribute('data-layout') ?? 'masonry';\n let filter = isotopeItem.getAttribute('data-default-filter') ?? '*';\n let sort = isotopeItem.getAttribute('data-sort') ?? 'original-order';\n\n let initIsotope;\n imagesLoaded(isotopeItem.querySelector('.isotope-container'), function() {\n initIsotope = new Isotope(isotopeItem.querySelector('.isotope-container'), {\n itemSelector: '.isotope-item',\n layoutMode: layout,\n filter: filter,\n sortBy: sort\n });\n });\n\n isotopeItem.querySelectorAll('.isotope-filters li').forEach(function(filters) {\n filters.addEventListener('click', function() {\n isotopeItem.querySelector('.isotope-filters .filter-active').classList.remove('filter-active');\n this.classList.add('filter-active');\n initIsotope.arrange({\n filter: this.getAttribute('data-filter')\n });\n if (typeof aosInit === 'function') {\n aosInit();\n }\n }, false);\n });\n\n });\n\n /**\n * Init swiper sliders\n */\n function initSwiper() {\n document.querySelectorAll(\".init-swiper\").forEach(function(swiperElement) {\n let config = JSON.parse(\n swiperElement.querySelector(\".swiper-config\").innerHTML.trim()\n );\n\n if (swiperElement.classList.contains(\"swiper-tab\")) {\n initSwiperWithCustomPagination(swiperElement, config);\n } else {\n new Swiper(swiperElement, config);\n }\n });\n }\n\n window.addEventListener(\"load\", initSwiper);\n\n /**\n * Correct scrolling position upon page load for URLs containing hash links.\n */\n window.addEventListener('load', function(e) {\n if (window.location.hash) {\n if (document.querySelector(window.location.hash)) {\n setTimeout(() => {\n let section = document.querySelector(window.location.hash);\n let scrollMarginTop = getComputedStyle(section).scrollMarginTop;\n window.scrollTo({\n top: section.offsetTop - parseInt(scrollMarginTop),\n behavior: 'smooth'\n });\n }, 100);\n }\n }\n });\n\n /**\n * Navmenu Scrollspy\n */\n let navmenulinks = document.querySelectorAll('.navmenu a');\n\n function navmenuScrollspy() {\n navmenulinks.forEach(navmenulink => {\n if (!navmenulink.hash) return;\n let section = document.querySelector(navmenulink.hash);\n if (!section) return;\n let position = window.scrollY + 200;\n if (position >= section.offsetTop && position <= (section.offsetTop + section.offsetHeight)) {\n document.querySelectorAll('.navmenu a.active').forEach(link => link.classList.remove('active'));\n navmenulink.classList.add('active');\n } else {\n navmenulink.classList.remove('active');\n }\n })\n }\n window.addEventListener('load', navmenuScrollspy);\n document.addEventListener('scroll', navmenuScrollspy);\n\n})();"]}