(()=> {
"use strict";
var __webpack_modules__=([
,
((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__)=> {
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
csGetCookie: ()=> ( csGetCookie),
csSetCookie: ()=> ( csSetCookie),
csco: ()=> ( csco),
isInViewport: ()=> ( isInViewport),
slideDown: ()=> ( slideDown),
slideToggle: ()=> ( slideToggle),
slideUp: ()=> ( slideUp)
});
var csco={
addAction: function(x, y, z){
return;
}};
if('undefined'!==typeof wp&&'undefined'!==typeof wp.hooks){
csco.addAction=wp.hooks.addAction;
}
function isInViewport(element){
const rect=element.getBoundingClientRect();
const windowHeight=(window.innerHeight||document.documentElement.clientHeight);
const windowWidth=(window.innerWidth||document.documentElement.clientWidth);
return (rect.top <=windowHeight&&rect.top + rect.height >=0)&&(rect.left <=windowWidth&&rect.left + rect.width >=0);
}
function slideDown(element, duration=350){
element.style.display='block';
element.style.overflow='hidden';
let height=element.scrollHeight;
element.style.height=0;
setTimeout(()=> {
element.style.transition=`height ${duration}ms`;
element.style.height=height + 'px';
element.addEventListener('transitionend', function te(){
element.removeEventListener('transitionend', te);
element.style.removeProperty('height');
element.style.removeProperty('transition');
element.style.removeProperty('overflow');
});
}, 0);
}
function slideUp(element, duration=350){
element.style.height=element.offsetHeight + 'px';
element.style.overflow='hidden';
setTimeout(()=> {
element.style.transition=`height ${duration}ms`;
element.style.height='0';
element.addEventListener('transitionend', function te(){
element.removeEventListener('transitionend', te);
if(element.style.height==='0px'){
element.style.display='none';
}
element.style.removeProperty('height');
element.style.removeProperty('transition');
element.style.removeProperty('overflow');
});
}, 0);
}
function slideToggle(element, duration=350){
if(window.getComputedStyle(element).display==='none'){
return slideDown(element, duration);
}else{
return slideUp(element, duration);
}}
function csGetCookie(name){
let matches=document.cookie.match(new RegExp(
"(?:^|;)" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
));
return matches ? decodeURIComponent(matches[ 1 ]):undefined;
}
function csSetCookie(name, value, props={}){
props={
path: '/'
};
if(props.expires instanceof Date){
props.expires=props.expires.toUTCString();
}
let updatedCookie=encodeURIComponent(name) + "=" + encodeURIComponent(value);
for(let optionKey in props){
updatedCookie +="; " + optionKey;
let optionValue=props[ optionKey ];
if(optionValue!==true){
updatedCookie +="=" + optionValue;
}}
document.cookie=updatedCookie;
}
})
]);
var __webpack_module_cache__={};
function __webpack_require__(moduleId){
var cachedModule=__webpack_module_cache__[moduleId];
if(cachedModule!==undefined){
return cachedModule.exports;
}
var module=__webpack_module_cache__[moduleId]={
exports: {}
};
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
return module.exports;
}
(()=> {
__webpack_require__.d=(exports, definition)=> {
for(var key in definition){
if(__webpack_require__.o(definition, key)&&!__webpack_require__.o(exports, key)){
Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
}
}
};
})();
(()=> {
__webpack_require__.o=(obj, prop)=> (Object.prototype.hasOwnProperty.call(obj, prop))
})();
(()=> {
__webpack_require__.r=(exports)=> {
if(typeof Symbol!=='undefined'&&Symbol.toStringTag){
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
}
Object.defineProperty(exports, '__esModule', { value: true });
};
})();
var __webpack_exports__={};
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
var _utility_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1);
(function (){
const sliders=document.querySelectorAll(`.cs-header-bottombar-carousel .cs-header-bottombar__nav-menu`);
if(sliders.length===0){
return;
}
const initSwiper=function(){
sliders.forEach(slider=> {
const wrapperClass=`cs-header-bottombar__nav`;
const slideClass=`menu-item`;
const prevEl=slider.querySelector(`.cs-header-bottombar__button-prev`);
const nextEl=slider.querySelector(`.cs-header-bottombar__button-next`);
new Swiper(slider, {
scrollbar: false,
wrapperClass: wrapperClass,
slideClass: slideClass,
direction: 'horizontal',
loop: false,
rewind: true,
speed: 250,
parallax: false,
autoplay: false,
slidesPerView: 'auto',
spaceBetween: 0,
navigation: {
nextEl: nextEl,
prevEl: prevEl,
},
});
});
};
document.addEventListener('DOMContentLoaded', ()=> {
initSwiper();
});
})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
var _utility_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1);
(function (){
const section='cs-header-bottombar__marquee';
const sliders=document.querySelectorAll(`.${section}`);
if(sliders.length===0){
return;
}
const initSwiper=function(){
sliders.forEach(slider=> {
const speedValue=slider.getAttribute('data-cs-slide-speed');
const wrapperClass=`${section}-wrapper`;
const slideClass=`${section}-item`;
const speed        = !isNaN(parseInt(speedValue)) ? parseInt(speedValue):8000;
const swiperInstance=new Swiper(slider, {
wrapperClass: wrapperClass,
slideClass: slideClass,
scrollbar: false,
direction: 'horizontal',
slidesPerView: 'auto',
speed: speed,
initialSlide: 0,
loop: true,
parallax: false,
spaceBetween: 0,
allowTouchMove: false,
waitForTransition: false,
watchSlidesProgress: false,
autoplay: {
delay: 0,
disableOnInteraction: false,
},
});
const observer=new IntersectionObserver((entries)=> {
entries.forEach(entry=> {
if(!entry.isIntersecting){
swiperInstance.autoplay.stop();
}else{
swiperInstance.autoplay.start();
}});
}, { threshold: 0 });
observer.observe(slider);
});
};
document.addEventListener('DOMContentLoaded', ()=> {
initSwiper();
});
})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
(function (){
if(! document.body.classList.contains('single')){
return;
}
const container=document.querySelector('.cs-site-primary')||document;
container.addEventListener('click', function (e){
const headToggle=e.target.closest('.cs-meta-comments');
if(headToggle){
const headerContainer=headToggle.closest('.cs-entry__header');
if(headerContainer&&headerContainer.closest('.cs-site-content')){
e.preventDefault();
const siteContent=headToggle.closest('.cs-site-content');
if(!siteContent){
return;
}
const allComments=Array.from(siteContent.querySelectorAll('.cs-entry__comments'));
if(!allComments.length){
return;
}
const headRect=headToggle.getBoundingClientRect();
let candidate=null;
let minDistance=Infinity;
allComments.forEach(cc=> {
const ccRect=cc.getBoundingClientRect();
if(ccRect.top >=headRect.bottom){
const distance=ccRect.top - headRect.bottom;
if(distance < minDistance){
minDistance=distance;
candidate=cc;
}}
});
if(!candidate){
candidate=allComments[0];
}
candidate.classList.add('cs-entry__comments-visible');
candidate.scrollIntoView({ behavior: 'smooth' });
return;
}}
const commentsToggle=e.target.closest('.cs-entry__comments-toggle');
if(commentsToggle){
e.preventDefault();
const siteContent=commentsToggle.closest('.cs-site-content');
if(!siteContent){
return;
}
const allComments=Array.from(siteContent.querySelectorAll('.cs-entry__comments'));
if(!allComments.length){
return;
}
const toggleRect=commentsToggle.getBoundingClientRect();
let candidate=null;
let minDistance=Infinity;
allComments.forEach(cc=> {
const ccRect=cc.getBoundingClientRect();
if(ccRect.top >=toggleRect.bottom){
const distance=ccRect.top - toggleRect.bottom;
if(distance < minDistance){
minDistance=distance;
candidate=cc;
}}
});
if(!candidate){
candidate=allComments[0];
}
candidate.classList.toggle('cs-entry__comments-visible');
return;
}});
window.addEventListener('load', function (){
if(window.location.hash&&window.location.hash!=="#"){
const target=document.querySelector(window.location.hash);
if(target&&target.classList.contains('cs-entry__comments')){
target.classList.add('cs-entry__comments-visible');
}}
});
})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
(function(){
const section='cs-floating-header';
const activeClass='is-active';
const offset=300;
const root=document.documentElement;
const floatingHeader=document.querySelector(`.${section}`);
const progressbar=document.querySelector(`.${section}__progress-bar`);
if(floatingHeader&&progressbar){
const updateProgress=function (){
const scroll=window.scrollY||window.scrollTop||document.documentElement.scrollTop;
const docHeight=Math.max(document.body.scrollHeight,
document.documentElement.scrollHeight,
document.body.offsetHeight,
document.documentElement.offsetHeight,
document.body.clientHeight,
document.documentElement.clientHeight
);
const windowHeight=Math.max(document.documentElement.clientHeight,
window.innerHeight||0
);
const height=docHeight - windowHeight;
const progress=(scroll / height) * 100;
progressbar.style.width=`${progress}%`;
};
updateProgress();
window.addEventListener('scroll', ()=> {
updateProgress();
const scrollPos=window.scrollY||window.scrollTop||document.getElementsByTagName('html')[0].scrollTop;
if(scrollPos > offset){
floatingHeader.classList.add(activeClass);
root.style.setProperty('--cs-floating-header-height', `${floatingHeader.offsetHeight}px`);
}else{
floatingHeader.classList.remove(activeClass);
root.style.setProperty('--cs-floating-header-height', `0px`);
}});
}})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
var _utility_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1);
(function (){
HTMLElement.prototype.responsiveNav=function (){
this.classList.remove('menu-item-expanded');
let previousElement=this.previousElementSibling;
if(previousElement&&previousElement.classList.contains('submenu-visible')){
previousElement.classList.remove('submenu-visible');
(0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.slideUp)(previousElement);
this.parentElement.classList.remove('menu-item-expanded');
}else{
let parentOfParent=this.parentElement.parentElement;
parentOfParent.querySelectorAll('.menu-item .sub-menu').forEach(subMenu=> {
subMenu.classList.remove('submenu-visible');
(0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.slideUp)(subMenu);
});
parentOfParent.querySelectorAll('.menu-item-expanded').forEach(item=> {
item.classList.remove('menu-item-expanded');
});
if(previousElement){
previousElement.classList.toggle('submenu-visible');
(0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.slideToggle)(previousElement);
}
this.parentElement.classList.toggle('menu-item-expanded');
}};
document.addEventListener('DOMContentLoaded', function (){
let menuItems=document.querySelectorAll('.cs-footer-columns__nav .menu-item-has-children');
menuItems.forEach(menuItem=> {
let span=document.createElement('span');
menuItem.appendChild(span);
span.addEventListener('click', function (e){
e.preventDefault();
this.responsiveNav();
});
});
});
})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
(function (){
const body=document.body;
const headerElement=document.querySelector('.cs-header');
const headerOverlay=document.querySelector('.cs-header-overlay');
const searchToggles=document.querySelectorAll('.cs-header__search-toggle, .cs-search__close');
const burgerToggles=document.querySelectorAll('.cs-header__burger-toggle');
const moreToggles=document.querySelectorAll('.cs-header__more-toggle');
searchToggles.forEach(searchToggle=> {
searchToggle.addEventListener('click', function (e){
e.preventDefault();
if(body.classList.contains('cs-offcanvas-active')){
body.classList.remove('cs-offcanvas-active');
}
if(headerElement.classList.contains('cs-burger-visible')){
headerElement.classList.remove('cs-burger-visible');
body.classList.remove('cs-burger-active');
}
if(headerElement.classList.contains('cs-more-visible')){
headerElement.classList.remove('cs-more-visible');
body.classList.remove('cs-more-active');
}
headerElement.classList.toggle('cs-search-visible');
body.classList.toggle('cs-search-active');
});
});
burgerToggles.forEach(burgerToggle=> {
burgerToggle.addEventListener('click', function (e){
e.preventDefault();
if(body.classList.contains('cs-offcanvas-active')){
body.classList.remove('cs-offcanvas-active');
}
if(headerElement.classList.contains('cs-search-visible')){
headerElement.classList.remove('cs-search-visible');
body.classList.remove('cs-search-active');
}
if(headerElement.classList.contains('cs-more-visible')){
headerElement.classList.remove('cs-more-visible');
body.classList.remove('cs-more-active');
}
headerElement.classList.toggle('cs-burger-visible');
body.classList.toggle('cs-burger-active');
});
});
moreToggles.forEach(moreToggle=> {
moreToggle.addEventListener('click', function (e){
e.preventDefault();
if(body.classList.contains('cs-offcanvas-active')){
body.classList.remove('cs-offcanvas-active');
}
if(headerElement.classList.contains('cs-search-visible')){
headerElement.classList.remove('cs-search-visible');
body.classList.remove('cs-search-active');
}
if(headerElement.classList.contains('cs-burger-visible')){
headerElement.classList.remove('cs-burger-visible');
body.classList.remove('cs-burger-active');
}
headerElement.classList.toggle('cs-more-visible');
body.classList.toggle('cs-more-active');
});
});
if(headerOverlay){
headerOverlay.addEventListener('click', function (e){
e.preventDefault();
if(headerElement.classList.contains('cs-search-visible')){
headerElement.classList.remove('cs-search-visible');
body.classList.remove('cs-search-active');
}
if(headerElement.classList.contains('cs-burger-visible')){
headerElement.classList.remove('cs-burger-visible');
body.classList.remove('cs-burger-active');
}
if(headerElement.classList.contains('cs-more-visible')){
headerElement.classList.remove('cs-more-visible');
body.classList.remove('cs-more-active');
}});
}})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
document.addEventListener('DOMContentLoaded', function (){
let transitionTimer;
document.addEventListener('nav-stick', function (event){
if(document.body.classList.contains('cs-display-header-overlay')){
let headerSmart=document.querySelector('.cs-navbar-smart-enabled .cs-header, .cs-navbar-sticky-enabled .cs-header');
let headerAlt=headerSmart.querySelector('.cs-container');
headerAlt.classList.add("cs-header-elements-no-transition");
clearTimeout(transitionTimer);
transitionTimer=setTimeout(function (){
headerAlt.classList.remove("cs-header-elements-no-transition");
}, 300);
}});
document.addEventListener('nav-unstick', function (event){
if(document.body.classList.contains('cs-display-header-overlay')){
let headerSmart=document.querySelector('.cs-navbar-smart-enabled .cs-header, .cs-navbar-sticky-enabled .cs-header');
let headerAlt=headerSmart.querySelector('.cs-container');
headerAlt.classList.add("cs-header-elements-no-transition");
clearTimeout(transitionTimer);
transitionTimer=setTimeout(function (){
headerAlt.classList.remove("cs-header-elements-no-transition");
}, 300);
}});
});
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
document.addEventListener('DOMContentLoaded', function (){
document.addEventListener('header-smart-stretch-scroll-sticky-scroll-init', function (event){
let headerParams=event.detail;
window.addEventListener('scroll', function (){
let scrolled=window.scrollY;
let headerSmart=document.querySelector('.cs-navbar-smart-enabled .cs-header, .cs-navbar-sticky-enabled .cs-header');
headerParams.headerSmartPosition=headerSmart ? headerSmart.offsetTop:0;
if(scrolled > headerParams.smartStart + headerParams.scrollPoint + 10&&scrolled > headerParams.scrollPrev){
if(scrolled > headerParams.smartStart + headerParams.headerLargeHeight + 200){
document.dispatchEvent(new CustomEvent('sticky-nav-hide', { detail: headerParams }));
}}else{
if(headerParams.scrollUpAmount >=headerParams.scrollPoint||scrolled===0){
document.dispatchEvent(new CustomEvent('sticky-nav-visible', { detail: headerParams }));
}}
if(scrolled > headerParams.smartStart + headerParams.headerLargeHeight){
document.dispatchEvent(new CustomEvent('nav-stick', { detail: headerParams }));
}else if(headerParams.headerSmartPosition <=headerParams.smartStart){
document.dispatchEvent(new CustomEvent('nav-unstick', { detail: headerParams }));
}
if(scrolled < headerParams.scrollPrev){
headerParams.scrollUpAmount +=headerParams.scrollPrev - scrolled;
}else{
headerParams.scrollUpAmount=0;
}
let wpAdminBar=document.querySelector('#wpadminbar');
if(wpAdminBar&&window.innerWidth <=600&&scrolled >=headerParams.wpAdminBarHeight){
document.dispatchEvent(new CustomEvent('adminbar-mobile-scrolled', { detail: headerParams }));
}else{
document.dispatchEvent(new CustomEvent('adminbar-mobile-no-scrolled', { detail: headerParams }));
}
headerParams.scrollPrev=scrolled;
});
});
});
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
if(typeof window.load_more_query==='undefined'){
window.load_more_query=[];
}
function csco_ajax_get_posts(object){
let container=object.closest('.cs-posts-area');
let settings=JSON.parse(object.dataset.settings);
let page=parseInt(object.dataset.page);
object.dataset.loading=true;
let innerSpan=object.querySelector('span');
if(innerSpan){
innerSpan.childNodes[0].textContent=settings.translation.loading;
innerSpan.childNodes[1].textContent=settings.translation.loading;
}
let data={
action: 'csco_ajax_load_more',
page: page,
posts_per_page: settings.posts_per_page,
query_data: settings.query_data,
attributes: settings.attributes,
options: settings.options,
_ajax_nonce: settings.nonce,
};
if(settings.hasOwnProperty('current_lang')&&settings.current_lang){
data.current_lang=settings.current_lang;
}
if(settings.hasOwnProperty('current_locale')&&settings.current_locale){
data.current_locale=settings.current_locale;
}
let csco_pagination_url=(settings.type==='ajax_restapi') ? settings.rest_url:settings.url;
function encodeFormData(data){
return Object.keys(data).map(key=> encodeURIComponent(key) + '=' + encodeURIComponent(data[key])).join('&');
}
fetch(csco_pagination_url, {
method: 'POST',
body: encodeFormData(data),
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}})
.then(response=> response.json())
.then(res=> {
if(res.success){
let dataContent=document.createElement('div');
dataContent.innerHTML=res.data.content;
if(dataContent.children.length){
document.body.dispatchEvent(new Event('post-load'));
if(document.querySelector('#fb-root')&&typeof FB!=='undefined'){
FB.XFBML.parse();
}
if(innerSpan){
innerSpan.childNodes[0].textContent=settings.translation.load_more;
innerSpan.childNodes[1].textContent=settings.translation.load_more;
}
page +=1;
object.dataset.page=page.toString();
object.dataset.loading="false";
let mainContainer=container.querySelector('.cs-posts-area__main');
while (dataContent.firstChild){
mainContainer.appendChild(dataContent.firstChild);
}}
if(res.data.posts_end){
object.parentNode.removeChild(object);
}}
})
.catch(error=> {
console.error('Error fetching posts:', error);
});
}
function csco_load_more_init(infinite){
let areas=document.querySelectorAll('.cs-posts-area');
areas.forEach(area=> {
if(area.dataset.init){
return;
}
let csco_ajax_settings;
let archive_data=area.dataset.postsArea;
if(archive_data){
csco_ajax_settings=JSON.parse(window.atob(archive_data));
}else if(typeof csco_ajax_pagination!=='undefined'&&typeof archive_data==='undefined'){
csco_ajax_settings=csco_ajax_pagination;
}
if(csco_ajax_settings){
if(!infinite&&csco_ajax_settings.infinite_load){
return;
}
let pagination=document.createElement('div');
pagination.className='cs-posts-area__pagination';
let btn=document.createElement('button');
btn.className='cs-load-more cs-button-animated';
let innerSpan=document.createElement('span');
let textSpan=document.createElement('span');
textSpan.textContent=csco_ajax_settings.translation.load_more;
innerSpan.appendChild(textSpan);
innerSpan.appendChild(textSpan.cloneNode(true));
btn.appendChild(innerSpan);
pagination.appendChild(btn);
area.appendChild(pagination);
btn.dataset.settings=JSON.stringify(csco_ajax_settings);
btn.dataset.page='2';
btn.dataset.loading="false";
btn.dataset.scrollHandling=JSON.stringify({
allow: JSON.parse(csco_ajax_settings.infinite_load),
delay: 400
});
}
area.dataset.init=true;
});
}
csco_load_more_init(true);
window.addEventListener('elementor/frontend/init', function (){
csco_load_more_init(true);
});
window.addEventListener('scroll', function (){
let buttons=document.querySelectorAll('.cs-posts-area .cs-load-more');
buttons.forEach(btn=> {
let loading=btn.dataset.loading==="true";
let scrollHandling=JSON.parse(btn.dataset.scrollHandling||'{}');
if(loading||!scrollHandling.allow){
return;
}
scrollHandling.allow=false;
btn.dataset.scrollHandling=JSON.stringify(scrollHandling);
setTimeout(function (){
scrollHandling.allow=true;
btn.dataset.scrollHandling=JSON.stringify(scrollHandling);
}, scrollHandling.delay);
let offset=btn.getBoundingClientRect().top - window.innerHeight;
if(offset < 4000){
csco_ajax_get_posts(btn);
}});
});
document.body.addEventListener('click', function (event){
if(event.target.classList.contains('cs-load-more')){
let loading=event.target.dataset.loading==="true";
if(!loading){
csco_ajax_get_posts(event.target);
}}
});
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
if(typeof csco_ajax_nextpost!=='undefined'){
var objNextparent=document.querySelector('.cs-site-primary > .cs-site-content');
var objNextsect='.cs-nextpost-section';
var objNextpost=null;
var currentNTitle=document.title;
var currentNLink=window.location.href;
var loadingNextpost=false;
var scrollNextpost={
allow: true,
reallow: function (){
scrollNextpost.allow=true;
},
delay: 400 //(milliseconds) adjust to the highest acceptable value
};
if(csco_ajax_nextpost.next_post){
objNextparent.insertAdjacentHTML('afterend', '<div class="cs-nextpost-inner"></div>');
objNextpost=document.querySelector('.cs-nextpost-inner');
}
var floatingHeader=document.querySelector('.cs-floating-header__content');
if(floatingHeader){
var nextElement=floatingHeader.querySelector('.cs-floating-header__next');
if(nextElement){
nextElement.remove();
}
var prevElement=floatingHeader.querySelector('.cs-floating-header__prev');
if(prevElement){
prevElement.remove();
}
var currentElement=floatingHeader.querySelector('.cs-floating-header__current');
if(currentElement){
currentElement.classList.add('fullwidth');
}}
}
function updateFloatingHeader(title){
var floatingHeader=document.querySelector('.cs-floating-header__content');
if(floatingHeader&&title){
var currentPostTitle=floatingHeader.querySelector('.cs-floating-header__current span');
if(currentPostTitle){
currentPostTitle.textContent=title||'';
}}
}
function csco_ajax_get_nextpost(){
loadingNextpost=true;
var data={
action: 'csco_ajax_load_nextpost',
not_in: csco_ajax_nextpost.not_in,
current_user: csco_ajax_nextpost.current_user,
nonce: csco_ajax_nextpost.nonce,
next_post: csco_ajax_nextpost.next_post,
};
if(csco_ajax_nextpost.hasOwnProperty('current_lang')&&csco_ajax_nextpost.current_lang){
data.current_lang=csco_ajax_nextpost.current_lang;
}
if(csco_ajax_nextpost.hasOwnProperty('current_locale')&&csco_ajax_nextpost.current_locale){
data.current_locale=csco_ajax_nextpost.current_locale;
}
var csco_ajax_nextpost_url;
if('ajax_restapi'===csco_ajax_nextpost.type){
csco_ajax_nextpost_url=csco_ajax_nextpost.rest_url;
}else{
csco_ajax_nextpost_url=csco_ajax_nextpost.url;
}
function encodeFormData(data){
return Object.keys(data).map(key=> encodeURIComponent(key) + '=' + encodeURIComponent(data[key])).join('&');
}
fetch(csco_ajax_nextpost_url, {
method: 'POST',
body: encodeFormData(data),
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}})
.then(response=> response.json())
.then(res=> {
csco_ajax_nextpost.next_post=false;
if(res.success){
var tempDiv=document.createElement('div');
tempDiv.innerHTML=res.data.content;
var newPosts=Array.from(tempDiv.children);
if(newPosts.length){
loadingNextpost=false;
csco_ajax_nextpost.not_in=res.data.not_in;
csco_ajax_nextpost.next_post=res.data.next_post;
var loadingElement=objNextpost.nextElementSibling;
if(loadingElement&&loadingElement.classList.contains('cs-nextpost-loading')){
loadingElement.remove();
}
newPosts.forEach(post=> objNextpost.appendChild(post.cloneNode(true)));
if(objNextpost.children.length===newPosts.length){
updateFloatingHeader(res.data.title||'');
}
if(document.getElementById('fb-root')&&typeof FB==='object'){
FB.XFBML.parse();
}
document.body.dispatchEvent(new Event('post-load'));
}}else{
}})
.catch(error=> {
});
}
if(typeof csco_ajax_nextpost!=='undefined'){
window.addEventListener('scroll', function (){
var scrollTop=window.scrollY||window.pageYOffset;
if(csco_ajax_nextpost.next_post){
if(objNextpost&&!loadingNextpost&&scrollNextpost.allow){
scrollNextpost.allow=false;
setTimeout(scrollNextpost.reallow, scrollNextpost.delay);
var offset=objNextpost.offsetTop + objNextpost.offsetHeight - scrollTop;
if(4000 > offset){
objNextpost.insertAdjacentHTML('afterend', '<div class="cs-nextpost-loading"></div>');
csco_ajax_get_nextpost();
}}
}
var objFirst=document.querySelector(objNextsect + ':first-child');
if(objFirst){
var firstTop=objFirst.offsetTop;
if(scrollTop < firstTop&&window.location.href!==currentNLink){
document.title=currentNTitle;
history.pushState(null, currentNTitle, currentNLink);
updateFloatingHeader(currentNTitle);
}}
document.querySelectorAll(objNextsect).forEach(function (elem){
var elemTop=elem.offsetTop;
var elemHeight=elem.offsetHeight;
if(scrollTop > elemTop&&scrollTop < elemTop + elemHeight){
if(window.location.href!==elem.dataset.url){
document.title=elem.dataset.title;
history.pushState(null, elem.dataset.title, elem.dataset.url);
updateFloatingHeader(elem.dataset.title);
if(typeof gtag==='function'&&typeof window.gaData==='object'){
var trackingId=Object.keys(window.gaData)[0];
if(trackingId){
gtag('config', trackingId, {
'page_title': elem.dataset.title,
'page_location': elem.dataset.url
});
gtag('event', 'page_view', {
'send_to': trackingId
});
}}
}}
});
});
}})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
document.addEventListener('DOMContentLoaded', function(){
document.querySelectorAll('.cs-subscribe__form').forEach(function(form){
var actionUrl=form.getAttribute('action');
if(actionUrl&&actionUrl.indexOf('assets.mailerlite.com')!==-1){
var notification=document.createElement('div');
notification.className='cs-form-notification';
notification.style.display='none';
form.parentNode.insertBefore(notification, form.nextSibling);
form.addEventListener('submit', function(e){
e.preventDefault();
Array.from(form.elements).forEach(el=> el.disabled=true);
notification.textContent=csLocalize.subscribeProcess;
notification.style.display='block';
notification.className='cs-form-notification cs-form-processing';
var formData=new FormData();
var emailInput=form.querySelector('input[type="email"]');
if(emailInput){
formData.append('fields[email]', emailInput.value);
}
Array.from(form.elements).forEach(el=> {
if(el.name&&el.name!=='email'&&el.name!=='fields[email]'&&el.type!=='submit'){
formData.append(el.name, el.value);
}});
fetch(actionUrl, {
method: 'POST',
body: formData
})
.then(response=> response.json())
.then(data=> {
Array.from(form.elements).forEach(el=> el.disabled=false);
if(data.success){
form.reset();
notification.textContent=csLocalize.subscribeSuccess;
notification.className='cs-form-notification cs-form-success';
setTimeout(()=> {
notification.classList.add('hide');
}, 1500);
setTimeout(()=> {
notification.remove();
}, 2000);
}else{
var errorMsg=csLocalize.subscribeError;
if(data.errors&&data.errors.fields){
var fieldErrors=[];
for (var field in data.errors.fields){
if(data.errors.fields[field]&&data.errors.fields[field].length){
fieldErrors.push(data.errors.fields[field][0]);
}}
if(fieldErrors.length){
errorMsg=fieldErrors.join(', ');
}}
notification.textContent=errorMsg;
notification.className='cs-form-notification cs-form-error';
console.log('Form error:', data);
}})
.catch(error=> {
Array.from(form.elements).forEach(el=> el.disabled=false);
notification.textContent=csLocalize.subscribeError;
notification.className='cs-form-notification cs-form-error';
console.error('Error:', error);
});
});
}});
});
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
document.addEventListener('DOMContentLoaded', function (){
function loadMenuPosts(menuItem){
var dataTerm=menuItem.children[0].dataset.term,
dataPosts=menuItem.children[0].dataset.posts,
dataNumberposts=menuItem.children[0].dataset.numberposts,
menuContainer,
postsContainer;
if(menuItem.classList.contains('cs-mega-menu-term')||menuItem.classList.contains('cs-mega-menu-posts')){
menuContainer=menuItem;
postsContainer=menuContainer.querySelector('.cs-mm__posts');
}
if(menuItem.classList.contains('cs-mega-menu-child-term')){
menuContainer=menuItem.closest('.sub-menu');
postsContainer=menuContainer.querySelector('.cs-mm__posts[data-term="' + dataTerm + '"]');
}
if(!menuContainer||typeof menuContainer==='undefined'){
return false;
}
if(!postsContainer||typeof postsContainer==='undefined'){
return false;
}
menuContainer.querySelectorAll('.menu-item, .cs-mm__posts').forEach(function (el){
el.classList.remove('cs-active-item');
});
menuItem.classList.add('cs-active-item');
if(postsContainer){
postsContainer.classList.add('cs-active-item');
}
if(menuItem.classList.contains('cs-mm-loading')||menuItem.classList.contains('loaded')){
return false;
}
var data={
'term': dataTerm,
'posts': dataPosts,
'per_page': dataNumberposts
};
if(typeof csco_mega_menu==='undefined'){
return;
}
menuItem.classList.add('cs-mm-loading');
postsContainer.classList.add('cs-mm-loading');
function encodeFormData(data){
return Object.keys(data).map(key=> encodeURIComponent(key) + '=' + encodeURIComponent(data[key])).join('&');
}
fetch(csco_mega_menu.rest_url, {
method: 'POST',
body: encodeFormData(data),
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}})
.then(response=> response.json())
.then(res=> {
if(res.status&&'success'===res.status){
menuItem.classList.add('loaded');
postsContainer.classList.add('loaded');
if(res.content&&res.content.length){
postsContainer.innerHTML=res.content;
imagesLoaded(postsContainer, function (){
});
}}
})
.catch(error=> {
})
.finally(()=> {
menuItem.classList.remove('cs-mm-loading');
postsContainer.classList.remove('cs-mm-loading');
});
}
function getFirstTab(container){
var firstTab=false;
container.querySelectorAll('.cs-mega-menu-child').forEach(function (el){
if(! firstTab&&el.classList.contains('cs-mega-menu-child')){
firstTab=el;
}});
return firstTab;
}
function handleMenuHover(event){
var menuItem=event.currentTarget;
if(menuItem.classList.contains('cs-mega-menu-posts') ||
menuItem.classList.contains('cs-mega-menu-term') ||
menuItem.classList.contains('cs-mega-menu-child')){
loadMenuPosts(menuItem);
}}
function handleTermsHover(event){
var menuItem=event.currentTarget;
var tab=getFirstTab(menuItem);
if(tab){
loadMenuPosts(tab);
}}
document.querySelectorAll('.cs-header__nav .menu-item.cs-mega-menu-posts').forEach(function (menuItem){
menuItem.addEventListener('mouseenter', handleMenuHover);
});
document.querySelectorAll('.cs-header__nav .menu-item.cs-mega-menu-term').forEach(function (menuItem){
menuItem.addEventListener('mouseenter', handleMenuHover);
});
document.querySelectorAll('.cs-header__nav .menu-item.cs-mega-menu-child').forEach(function (menuItem){
menuItem.addEventListener('mouseenter', handleMenuHover);
});
document.querySelectorAll('.cs-header__nav .menu-item.cs-mega-menu-terms').forEach(function (menuItem){
menuItem.addEventListener('mouseenter', handleTermsHover);
});
document.querySelectorAll('.cs-header__nav .menu-item.cs-mega-menu-terms').forEach(function (menuItem){
var tab=getFirstTab(menuItem);
if(tab){
loadMenuPosts(tab);
}});
document.querySelectorAll('.cs-header__nav .menu-item.cs-mega-menu-posts').forEach(function (menuItem){
loadMenuPosts(menuItem);
});
document.querySelectorAll('.cs-header__nav .menu-item.cs-mega-menu-term').forEach(function (menuItem){
loadMenuPosts(menuItem);
});
});
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
(function(){
document.addEventListener('DOMContentLoaded', function(){
const accountLinks=document.querySelectorAll('.woocommerce-account-no-logged .woocommerce-MyAccount-navigation a');
const loginForm=document.querySelector('.woocommerce-form-login');
const registerForm=document.querySelector('.woocommerce-form-register');
accountLinks.forEach(link=> {
link.addEventListener('click', function(e){
e.preventDefault();
accountLinks.forEach(l=> l.parentElement.classList.remove('is-active'));
link.parentElement.classList.add('is-active');
if(link.getAttribute('href')==='#register'){
loginForm.style.display='none';
registerForm.style.display='block';
}else{
loginForm.style.display='block';
registerForm.style.display='none';
}});
});
});
})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
class CscoNavigation {
constructor(){
this.headerParams={
headerLargeHeight: parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-initial-height')),
headerCompactHeight: parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-height')),
headerSmart: document.querySelector('.cs-navbar-smart-enabled .cs-header, .cs-navbar-sticky-enabled .cs-header'),
wpAdminBar: document.querySelector('#wpadminbar'),
headerBefore: document.querySelector('.cs-header-before'),
headerStretch: document.querySelector('.cs-navbar-smart-enabled .cs-header-stretch'),
wpAdminBarHeight: null,
smartStart: null,
scrollPoint: 200,
scrollPrev: 200,
scrollUpAmount: 0,
headerSmartPosition: 0
};
this.initialize();
}
initialize(){
if(document.body.classList.contains('wp-admin')){
return;
}
this.bindEvents();
}
bindEvents(){
document.addEventListener('DOMContentLoaded', ()=> {
this.smartLevels();
this.adaptTablet();
this.stickyScroll();
this.headerClassesChange();
});
window.addEventListener('resize', ()=> {
this.smartLevels();
this.adaptTablet();
this.stickyScroll();
});
}
smartLevels(){
let windowWidth=window.innerWidth;
document.querySelectorAll('.cs-header__nav-inner li').forEach(el=> {
el.classList.remove('cs-sm__level', 'cs-sm-position-left', 'cs-sm-position-right');
});
document.querySelectorAll('.cs-header__nav-inner li .sub-menu').forEach(el=> {
el.classList.remove('cs-mm__position-init');
});
document.querySelectorAll('.cs-header__nav-inner > li.menu-item:not(.cs-mm)').forEach(parent=> {
let position='cs-sm-position-right';
let objPrevWidth=0;
parent.querySelectorAll('.sub-menu').forEach(el=> {
if(el.parentElement.nextElementSibling){
el.parentElement.nextElementSibling.classList.add('cs-sm__level');
}
if(el.parentElement.classList.contains('cs-sm__level')){
el.parentElement.classList.remove('cs-mm-level');
position='cs-sm-position-right';
objPrevWidth=0;
}
let offset=el.getBoundingClientRect().left;
if(position==='cs-sm-position-right'&&el.offsetWidth + offset > windowWidth){
position='cs-sm-position-left';
}
if(position==='cs-sm-position-left'&&offset - (el.offsetWidth + objPrevWidth) < 0){
position='cs-sm-position-right';
}
objPrevWidth=el.offsetWidth;
el.classList.add('cs-sm-position-init');
el.parentElement.classList.add(position);
});
});
}
adaptTablet(){
document.addEventListener('touchstart', (e)=> {
if(!e.target.closest('.cs-header__nav-inner')){
document.querySelectorAll('.cs-header__nav-inner .menu-item-has-children').forEach(el=> {
el.classList.remove('submenu-visible');
});
}else{
let parentMenuItem=e.target.closest('.menu-item');
if(parentMenuItem){
if(parentMenuItem.previousElementSibling){
parentMenuItem.previousElementSibling.querySelectorAll('.menu-item').forEach(el=> {
el.classList.remove('submenu-visible');
});
}
if(parentMenuItem.nextElementSibling){
parentMenuItem.nextElementSibling.classList.remove('submenu-visible');
}}
}});
document.querySelectorAll('.cs-header__nav-inner .menu-item-has-children').forEach(el=> {
el.classList.remove('submenu-visible');
let expandedElem=el.querySelector('a > .expanded');
if(expandedElem){
expandedElem.remove();
}
if('ontouchstart' in document.documentElement){
let aTag=el.querySelector('a');
if(aTag){
let span=document.createElement('span');
span.className='expanded';
aTag.appendChild(span);
}}
if('ontouchstart' in document.documentElement){
el.classList.add('touch-device');
}
let expandedElement=el.querySelector('a .expanded');
if(expandedElement){
expandedElement.addEventListener('touchstart', (e)=> {
e.preventDefault();
el.classList.toggle('submenu-visible');
}, { passive: false });
}
let anchor=el.querySelector('a');
if(anchor&&anchor.getAttribute('href')==='#'){
anchor.addEventListener('touchstart', (e)=> {
e.preventDefault();
if(!e.target.classList.contains('expanded')){
el.classList.toggle('submenu-visible');
}}, { passive: false });
}});
}
stickyScroll(){
this.headerParams={
headerLargeHeight: parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-initial-height')),
headerCompactHeight: parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-height')),
headerSmart: document.querySelector('.cs-navbar-smart-enabled .cs-header, .cs-navbar-sticky-enabled .cs-header'),
wpAdminBar: document.querySelector('#wpadminbar'),
headerBefore: document.querySelector('.cs-header-before'),
headerStretch: document.querySelector('.cs-navbar-smart-enabled .cs-header-stretch'),
wpAdminBarHeight: null,
smartStart: null,
scrollPoint: 200,
scrollPrev: 200,
scrollUpAmount: 0,
headerSmartPosition: 0
};
this.headerParams.wpAdminBarHeight=this.headerParams.wpAdminBar ? this.headerParams.wpAdminBar.offsetHeight:0;
if(this.headerParams.headerBefore){
this.headerParams.smartStart=this.headerParams.headerBefore.offsetTop;
}else{
this.headerParams.smartStart=this.headerParams.wpAdminBarHeight + (this.headerParams.headerSmart ? this.headerParams.headerSmart.offsetTop:0);
}
window.addEventListener('scroll', ()=> {
let scrolled=window.scrollY;
this.headerParams.headerSmartPosition=this.headerParams.headerSmart ? this.headerParams.headerSmart.offsetTop:0;
if(scrolled > this.headerParams.smartStart + this.headerParams.scrollPoint + 10&&scrolled > this.headerParams.scrollPrev){
if(scrolled > this.headerParams.smartStart + this.headerParams.headerCompactHeight + 200){
document.dispatchEvent(new Event('sticky-nav-hide'));
}}else{
if(this.headerParams.scrollUpAmount >=this.headerParams.scrollPoint||scrolled===0){
document.dispatchEvent(new Event('sticky-nav-visible'));
}}
if(this.headerParams.headerSmart){
if(scrolled > this.headerParams.smartStart + this.headerParams.headerCompactHeight){
document.dispatchEvent(new Event('nav-stick', { detail: this.headerParams }));
}else if(this.headerParams.headerSmartPosition <=this.headerParams.smartStart){
document.dispatchEvent(new Event('nav-unstick', { detail: this.headerParams }));
}}
if(scrolled < this.headerParams.scrollPrev){
this.headerParams.scrollUpAmount +=this.headerParams.scrollPrev - scrolled;
}else{
this.headerParams.scrollUpAmount=0;
}
if(this.headerParams.wpAdminBar&&window.innerWidth <=600&&scrolled >=this.headerParams.wpAdminBarHeight){
document.dispatchEvent(new Event('adminbar-mobile-scrolled'));
}else{
document.dispatchEvent(new Event('adminbar-mobile-no-scrolled'));
}
this.headerParams.scrollPrev=scrolled;
});
}
headerClassesChange(){
document.addEventListener("sticky-nav-visible", event=> {
this.headerParams.headerSmart.classList.add('cs-header-smart-visible');
});
document.addEventListener("sticky-nav-hide", event=> {
this.headerParams.headerSmart.classList.remove('cs-header-smart-visible');
});
document.addEventListener("nav-stick", event=> {
this.headerParams.headerSmart.classList.add('cs-scroll-sticky');
});
document.addEventListener("nav-unstick", event=> {
this.headerParams.headerSmart.classList.remove('cs-scroll-sticky', 'cs-header-smart-visible');
});
document.addEventListener("adminbar-mobile-scrolled", event=> {
document.body.classList.add('cs-adminbar-mobile-scrolled');
});
document.addEventListener("adminbar-mobile-no-scrolled", event=> {
document.body.classList.remove('cs-adminbar-mobile-scrolled');
});
}}
new CscoNavigation();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
(function (){
const body=document.body;
const headerElement=document.querySelector('.cs-header');
const offcanvasToggles=document.querySelectorAll('.cs-header__offcanvas-toggle, .cs-site-overlay, .cs-offcanvas__close-toggle');
offcanvasToggles.forEach(offcanvasToggle=> {
offcanvasToggle.addEventListener('click', function (e){
e.preventDefault();
if(headerElement.classList.contains('cs-search-visible')){
headerElement.classList.remove('cs-search-visible');
body.classList.remove('cs-search-active');
}
if(headerElement.classList.contains('cs-burger-visible')){
headerElement.classList.remove('cs-burger-visible');
body.classList.remove('cs-burger-active');
}
if(!body.classList.contains('cs-offcanvas-active')){
body.classList.add('cs-offcanvas-transition');
}else{
setTimeout(()=> {
body.classList.remove('cs-offcanvas-transition');
}, 400);
}
body.classList.toggle('cs-offcanvas-active');
});
});
})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
var _utility_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1);
(function (){
const section='cs-post-carousel';
const sliders=document.querySelectorAll(`.${section}`);
if(sliders.length===0){
return;
}
let executed=false;
const isSwiperScriptLoaded=function(){
return typeof Swiper!=='undefined';
};
const initSwiper=function(){
sliders.forEach(slider=> {
const sectionType=slider.getAttribute('data-cs-type');
const slidesPerView='horizontal'===sectionType ? [1, 1, 2, 3, 3, 4]:[1, 2, 3, 3, 4, 4];
const spaceBetween='horizontal'===sectionType ? [0, 0, 24, 24, 24, 24]:[0, 20, 16, 24, 24, 24];
const loopValue=slider.getAttribute('data-cs-loop');
const wrapperClass=`${section}__grid`;
const slideClass=`${section}__item`;
const prevEl=slider.querySelector(`.${section}__button-prev`);
const nextEl=slider.querySelector(`.${section}__button-next`);
let number=0;
let loop=false;
let rewind=false;
const wrapper=slider.querySelector(`.${wrapperClass}`);
if(wrapper){
const slides=wrapper.querySelectorAll(`.${slideClass}`);
number=slides.length;
}
if('true'===loopValue){
if(number > 7){
loop=true;
}else{
rewind=true;
}}
new Swiper(slider, {
scrollbar: false,
wrapperClass: wrapperClass,
slideClass: slideClass,
direction: 'horizontal',
loop: loop,
rewind: rewind,
speed: 250,
parallax: false,
autoplay: false,
navigation: {
nextEl: nextEl,
prevEl: prevEl,
},
breakpoints: {
320: {
slidesPerView: slidesPerView[0],
spaceBetween: spaceBetween[0]
},
576: {
slidesPerView: slidesPerView[1],
spaceBetween: spaceBetween[1]
},
768: {
slidesPerView: slidesPerView[2],
spaceBetween: spaceBetween[2]
},
992: {
slidesPerView: slidesPerView[3],
spaceBetween: spaceBetween[3]
},
1200: {
slidesPerView: slidesPerView[4],
spaceBetween: spaceBetween[4]
},
1448: {
slidesPerView: slidesPerView[5],
spaceBetween: spaceBetween[5]
},
},
});
});
};
const initSection=function (){
if(!executed){
const options={
root: null,
threshold: 0.5
};
const observer=new IntersectionObserver((entries)=> {
entries.forEach(entry=> {
if(entry.isIntersecting){
executed=true;
initSwiper();
observer.disconnect();
}});
}, options);
sliders.forEach(slider=> {
observer.observe(slider);
});
}};
document.addEventListener('DOMContentLoaded', ()=> {
initSection();
});
})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
var _utility_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1);
(function (){
const section='cs-post-slider';
const sliders=document.querySelectorAll(`.${section}__slider`);
if(sliders.length===0){
return;
}
let executed=false;
const initSection=function(){
if(!executed&&(0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.isInViewport)(sliders[0])){
executed=true;
sliders.forEach(slider=> {
const sectionType=slider.getAttribute('data-cs-type');
const autoplayValue=slider.getAttribute('data-cs-autoplay');
const autoplayDelayValue=slider.getAttribute('data-cs-autoplay-delay');
const wrapperClass=`${section}__wrapper`;
const slideClass=`${section}__item`;
const prevEl=slider.querySelector(`.${section}__button-prev span`);
const nextEl=slider.querySelector(`.${section}__button-next span`);
let paginationContainer=slider.querySelector(`.${section}__pagination`);
const bulletClass=`${section}__pagination-bullet`;
const bulletClassActive=`${section}__pagination-bullet-active`;
const slidesPerView='type-1'===sectionType ? 1:1.37;
const gap320='type-1'===sectionType ? 0:0;
const gap576='type-1'===sectionType ? 24:0;
const gap992='type-1'===sectionType ? 24:-2;
const autoplayDelay     = !isNaN(parseInt(autoplayDelayValue)) ? parseInt(autoplayDelayValue):5000;
const autoplay=autoplayValue ? { delay: autoplayDelay, disableOnInteraction: false, pauseOnMouseEnter: true, }:false;
if(window.innerWidth >=992&&paginationContainer){
paginationContainer.remove();
paginationContainer=null;
}
new Swiper(slider, {
scrollbar: false,
wrapperClass: wrapperClass,
slideClass: slideClass,
direction: 'horizontal',
loop: true,
speed: 800,
parallax: false,
autoplay: autoplay,
a11y: {
slideRole: 'article',
slideLabelMessage: 'Slide {{index}} of {{slidesLength}}'
},
navigation: {
nextEl: nextEl,
prevEl: prevEl,
},
breakpoints: {
320: {
slidesPerView: 1,
spaceBetween: gap320,
pagination: {
el: paginationContainer,
clickable: false,
bulletElement: 'span',
bulletClass: bulletClass,
bulletActiveClass: bulletClassActive,
},
},
576: {
slidesPerView: 1,
spaceBetween: gap576,
pagination: {
el: paginationContainer,
clickable: false,
bulletElement: 'span',
bulletClass: bulletClass,
bulletActiveClass: bulletClassActive,
},
},
992: {
slidesPerView: slidesPerView,
spaceBetween: gap992,
pagination: {
el: null,
}},
},
});
});
}};
document.addEventListener('DOMContentLoaded', ()=> {
initSection();
});
window.addEventListener('resize', ()=> {
initSection();
});
window.addEventListener('scroll', ()=> {
initSection();
});
})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
var _utility_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1);
(function (){
const section='cs-product-carousel';
const sliders=document.querySelectorAll(`.${section}`);
if(sliders.length===0){
return;
}
let executed=false;
const isSwiperScriptLoaded=function(){
return typeof Swiper!=='undefined';
};
const initSwiper=function(){
sliders.forEach(slider=> {
const slidesPerView=[1, 2, 3, 3, 4];
const spaceBetween=[0, 20, 16, 24, 24];
const loopValue=slider.getAttribute('data-cs-loop');
const wrapperClass='products';
const slideClass='cs-entry';
const prevEl=slider.querySelector(`.${section}__button-prev`);
const nextEl=slider.querySelector(`.${section}__button-next`);
let number=0;
let loop=false;
let rewind=false;
const wrapper=slider.querySelector(`.${wrapperClass}`);
if(wrapper){
const slides=wrapper.querySelectorAll(`.${slideClass}`);
number=slides.length;
}
if('true'===loopValue){
if(number > 7){
loop=true;
}else{
rewind=true;
}}
new Swiper(slider, {
scrollbar: false,
wrapperClass: wrapperClass,
slideClass: slideClass,
direction: 'horizontal',
loop: loop,
rewind: rewind,
speed: 250,
parallax: false,
autoplay: false,
navigation: {
nextEl: nextEl,
prevEl: prevEl,
},
breakpoints: {
320: {
slidesPerView: slidesPerView[0],
spaceBetween: spaceBetween[0]
},
576: {
slidesPerView: slidesPerView[1],
spaceBetween: spaceBetween[1]
},
768: {
slidesPerView: slidesPerView[2],
spaceBetween: spaceBetween[2]
},
992: {
slidesPerView: slidesPerView[3],
spaceBetween: spaceBetween[3]
},
1200: {
slidesPerView: slidesPerView[4],
spaceBetween: spaceBetween[4]
},
},
});
});
};
const initSection=function (){
if(!executed){
const options={
root: null,
threshold: 0.5
};
const observer=new IntersectionObserver((entries)=> {
entries.forEach(entry=> {
if(entry.isIntersecting){
executed=true;
initSwiper();
observer.disconnect();
}});
}, options);
sliders.forEach(slider=> {
observer.observe(slider);
});
}};
document.addEventListener('DOMContentLoaded', ()=> {
initSection();
});
})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
var _utility_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1);
(function (){
const section='cs-read-next';
const sliders=document.querySelectorAll(`.${section}`);
if(sliders.length===0){
return;
}
let executed=false;
const isSwiperScriptLoaded=function(){
return typeof swiper!=='undefined';
};
const initSwiper=function(){
sliders.forEach(slider=> {
const slidesPerView=[1, 2, 3, 3, 4];
const spaceBetween=[0, 20, 16, 24, 24];
const loopValue=slider.getAttribute('data-cs-loop');
const wrapperClass=`${section}__grid`;
const slideClass=`${section}__item`;
const prevEl=slider.querySelector(`.${section}__button-prev`);
const nextEl=slider.querySelector(`.${section}__button-next`);
const wrapper=slider.querySelector(`.${wrapperClass}`);
let number=0;
let loop=false;
let rewind=false;
if(wrapper){
const slides=wrapper.querySelectorAll(`.${slideClass}`);
number=slides.length;
}
if('true'===loopValue){
if(number > 7){
loop=true;
}else{
rewind=true;
}}
new Swiper(slider, {
scrollbar: false,
wrapperClass: wrapperClass,
slideClass: slideClass,
direction: 'horizontal',
loop: loop,
rewind: rewind,
speed: 250,
parallax: false,
autoplay: false,
navigation: {
nextEl: nextEl,
prevEl: prevEl,
},
breakpoints: {
320: {
slidesPerView: slidesPerView[0],
spaceBetween: spaceBetween[0]
},
576: {
slidesPerView: slidesPerView[1],
spaceBetween: spaceBetween[1]
},
768: {
slidesPerView: slidesPerView[2],
spaceBetween: spaceBetween[2]
},
992: {
slidesPerView: slidesPerView[3],
spaceBetween: spaceBetween[3]
},
1200: {
slidesPerView: slidesPerView[4],
spaceBetween: spaceBetween[4]
},
},
});
});
};
const initSection=function (){
if(!executed){
const options={
root: null,
threshold: 0.5
};
const observer=new IntersectionObserver((entries)=> {
entries.forEach(entry=> {
if(entry.isIntersecting){
executed=true;
initSwiper();
observer.disconnect();
}});
}, options);
sliders.forEach(slider=> {
observer.observe(slider);
});
}};
document.addEventListener('DOMContentLoaded', ()=> {
initSection();
});
})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
(function (){
function initResponsiveEmbeds(){
let proportion, parentWidth;
let iframes=document.querySelectorAll('.entry-content iframe');
iframes.forEach(iframe=> {
if(iframe.closest('div[data-video-start], div[data-video-end]')){
return;
}
if(iframe.width&&iframe.height){
proportion=parseFloat(iframe.width) / parseFloat(iframe.height);
parentWidth=parseFloat(window.getComputedStyle(iframe.parentElement).width);
iframe.style.maxWidth='100%';
iframe.style.maxHeight=Math.round(parentWidth / proportion) + 'px';
}});
}
document.addEventListener('DOMContentLoaded', function (){
initResponsiveEmbeds();
});
document.body.addEventListener('post-load', function (){
initResponsiveEmbeds();
});
window.addEventListener('resize', function (){
initResponsiveEmbeds();
});
initResponsiveEmbeds();
})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
var _utility_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1);
const cscoDarkMode={
init: function (){
this.initMode();
window.matchMedia('(prefers-color-scheme: dark)').addListener((e)=> {
this.initMode();
});
document.querySelectorAll('.cs-site-scheme-toggle').forEach(toggle=> {
toggle.onclick=()=> {
if('dark'===document.body.getAttribute('data-scheme')){
this.changeScheme('light', true);
}else{
this.changeScheme('dark', true);
}};});
},
detectColorScheme: function (color){
var level=190;
var alpha=1;
var rgba=[255, 255, 255];
var color_rgba=false;
color=color.trim();
if(['#0e131a'].includes(color) ){
return 'dark';
}
if('#'===color[0]){
color=color.replace('#', '').trim();
if(3===color.length){
color=color[0] + color[0] + color[1] + color[1] + color[2] + color[2];
}
rgba[0]=parseInt(color.substr(0, 2), 16);
rgba[1]=parseInt(color.substr(2, 2), 16);
rgba[2]=parseInt(color.substr(4, 2), 16);
}else if((color_rgba=color.replace(/\s/g, '').match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i))){
rgba[0]=parseInt(color_rgba[1]);
rgba[1]=parseInt(color_rgba[2]);
rgba[2]=parseInt(color_rgba[3]);
if(color_rgba[4]!==undefined){
alpha=parseFloat(color_rgba[4]);
}}
rgba.forEach(function myFunction(channel, key, stack){
stack[key]=String(channel + Math.ceil((255 - channel) * (1 - alpha))).padStart(2, '0');
});
var scheme='light';
var brightness=((rgba[0] * 299) + (rgba[1] * 587) + (rgba[2] * 114)) / 1000;
if(rgba[0]===rgba[1]&&rgba[1]===rgba[2]){
if(brightness < level){
scheme='dark';
}}else{
if(brightness < level){
scheme='inverse';
}}
return scheme;
},
setIndividualScheme: function (){
var list={
'.cs-header': '--cs-header-background',
'.cs-header__nav-inner .sub-menu': '--cs-header-submenu-background',
'.cs-burger-menu': '--cs-header-submenu-background',
'.cs-floating-header':'--cs-header-submenu-background',
'.cs-header-topbar__top': '--cs-header-topbar-background',
'.cs-offcanvas': '--cs-offcanvas-background',
'.cs-footer': '--cs-footer-background',
};
function createClosure(key){
return function (element){
var color=getComputedStyle(element).getPropertyValue(list[key]);
var scheme=cscoDarkMode.detectColorScheme(color);
element.setAttribute('data-scheme', scheme);
};}
for (var key in list){
if(list.hasOwnProperty(key)){
var elements=document.querySelectorAll(key);
if(elements.length <=0){
continue;
}
elements.forEach(createClosure(key));
}}
},
initMode: function (){
let siteScheme=false;
switch (csLocalize.siteSchemeMode){
case 'dark':
siteScheme='dark';
break;
case 'light':
siteScheme='light';
break;
case 'system':
siteScheme='auto';
break;
}
if(csLocalize.siteSchemeToogle){
if('light'===(0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.csGetCookie)('_color_schema')){
siteScheme='light';
}
if('dark'===(0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.csGetCookie)('_color_schema')){
siteScheme='dark';
}}
this.setIndividualScheme();
if(siteScheme&&siteScheme!==document.body.getAttribute('data-scheme')){
this.changeScheme(siteScheme, false);
}},
changeScheme: function (siteScheme, cookie){
document.body.classList.add('cs-scheme-toggled');
document.body.setAttribute('data-scheme', siteScheme);
this.setIndividualScheme();
if(cookie){
(0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.csSetCookie)('_color_schema', siteScheme, { expires: 2592000 });
}
setTimeout(()=> {
document.body.classList.remove('cs-scheme-toggled');
}, 100);
}};
cscoDarkMode.init();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
(function(){
const section='cs-scroll-top';
const activeClass='is-active';
const offset=300;
const scrollToTop=()=> {
window.scrollTo({ top: 0, behavior: 'smooth' });
};
const scrollToTopButton=document.querySelector(`.${section}`);
if(scrollToTopButton){
const progressPath=scrollToTopButton.querySelector(`.${section}-progress path`);
const pathLength=progressPath.getTotalLength();
progressPath.style.transition=progressPath.style.WebkitTransition='none';
progressPath.style.strokeDasharray=`${pathLength} ${pathLength}`;
progressPath.style.strokeDashoffset=pathLength;
progressPath.getBoundingClientRect();
progressPath.style.transition=progressPath.style.WebkitTransition='stroke-dashoffset 10ms linear';
const updateProgress=function (){
const scroll=window.scrollY||window.scrollTop||document.documentElement.scrollTop;
const docHeight=Math.max(document.body.scrollHeight,
document.documentElement.scrollHeight,
document.body.offsetHeight,
document.documentElement.offsetHeight,
document.body.clientHeight,
document.documentElement.clientHeight
);
const windowHeight=Math.max(document.documentElement.clientHeight,
window.innerHeight||0
);
const height=docHeight - windowHeight;
var progress=pathLength - (scroll * pathLength) / height;
progressPath.style.strokeDashoffset=progress;
};
updateProgress();
scrollToTopButton.addEventListener('click', scrollToTop);
window.addEventListener('scroll', ()=> {
updateProgress();
const scrollPos=window.scrollY||window.scrollTop||document.getElementsByTagName('html')[0].scrollTop;
if(scrollPos > offset){
scrollToTopButton.classList.add(activeClass);
}else{
scrollToTopButton.classList.remove(activeClass);
}});
}})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
var _utility_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1);
(function (){
function copyToClipboard(str){
const area=document.createElement('textarea');
document.body.appendChild(area);
area.value=str;
area.select();
document.execCommand ('copy');
document.body.removeChild(area);
}
function showTooltip(button, message){
const tooltip=document.createElement('div');
tooltip.className='cs-share__copy-link-tooltip';
tooltip.textContent=message;
button.appendChild(tooltip);
setTimeout(()=> {
tooltip.classList.add('hide');
}, 1500);
setTimeout(()=> {
button.removeChild(tooltip);
}, 2000);
}
const copyButtons=document.querySelectorAll('.cs-share__copy-link');
copyButtons.forEach(button=> {
button.addEventListener('click', function(event){
event.preventDefault();
const pageURL=this.getAttribute('href');
copyToClipboard(pageURL);
showTooltip(this, 'URL copied');
});
});
})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
(function (){
const body=document.body;
const cartToggles=document.querySelectorAll('.cs-header__cart-toggle, .cs-shop-minicart__toggle, .cs-shop-minicart-overlay');
cartToggles.forEach(cartToggle=> {
cartToggle.addEventListener('click', function (e){
e.preventDefault();
body.classList.toggle('cs-shop-minicart-active');
});
});
})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
(function (){
const body=document.body;
const filterToggles=document.querySelectorAll('.cs-shop-offcanvas__toggle, .cs-shop-offcanvas__close, .cs-shop-offcanvas-overlay');
filterToggles.forEach(filterToggle=> {
filterToggle.addEventListener('click', function (e){
e.preventDefault();
body.classList.toggle('cs-shop-offcanvas-active');
});
});
})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
(function(){
let stickyElementsSmart=[],
stickyElements=[];
stickyElementsSmart.push('.cs-navbar-smart-enabled.cs-stick-to-top .cs-single-product .entry-summary',
'.cs-sticky-sidebar-enabled.cs-navbar-smart-enabled.cs-stick-to-top .cs-sidebar__inner',
'.cs-sticky-sidebar-enabled.cs-navbar-smart-enabled.cs-stick-last .cs-sidebar__inner .widget:last-child'
);
stickyElements.push('.cs-navbar-sticky-enabled.cs-stick-to-top .cs-single-product .entry-summary',
'.cs-sticky-sidebar-enabled.cs-navbar-sticky-enabled.cs-stick-to-top .cs-sidebar__inner',
'.cs-sticky-sidebar-enabled.cs-navbar-sticky-enabled.cs-stick-last .cs-sidebar__inner .widget:last-child'
);
document.addEventListener("DOMContentLoaded", function(){
let headerStick=document.querySelector('.cs-header'),
wpAdminBar=document.querySelector('#wpadminbar'),
floatingHeader=document.querySelector('.cs-floating-header__content'),
headerStickHeight=headerStick ? headerStick.offsetHeight:0,
wpAdminBarHeight=wpAdminBar ? wpAdminBar.offsetHeight:0,
floatingHeaderHeight=floatingHeader ? floatingHeader.offsetHeight + 2:0,
headerStretch=document.querySelector('.cs-header-stretch'),
headerStretchHeight=headerStretch ? headerStretch.offsetHeight:0,
allHeight=headerStickHeight + wpAdminBarHeight + floatingHeaderHeight + 20,
windowWidth=window.innerWidth;
if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1){
stickyElementsSmart.push('.cs-sticky-sidebar-enabled.cs-stick-to-bottom .cs-sidebar__inner');
stickyElements.push('.cs-sticky-sidebar-enabled.cs-stick-to-bottom .cs-sidebar__inner');
}
stickyElementsSmart=stickyElementsSmart.join(',');
stickyElements=stickyElements.join(',');
document.addEventListener('sticky-nav-visible', function(){
headerStickHeight=parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-height'));
allHeight=(headerStretchHeight||0) + (wpAdminBarHeight||0) + (floatingHeaderHeight||0) + 20;
document.querySelectorAll(stickyElementsSmart).forEach(el=> {
el.style.top=allHeight + 'px';
});
});
document.addEventListener('sticky-nav-hide', function(){
headerStickHeight=0;
allHeight=(headerStickHeight||0) + (wpAdminBarHeight||0) + (floatingHeaderHeight||0) + 20;
document.querySelectorAll(stickyElementsSmart).forEach(el=> {
el.style.top=allHeight + 'px';
});
});
document.addEventListener('stretch-nav-to-small', function(){
headerStretchHeight=parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-height'));
allHeight=(headerStretchHeight||0) + (wpAdminBarHeight||0) + (floatingHeaderHeight||0) + 20;
if(headerStretch&&headerStretch.classList.contains("cs-scroll-sticky")&&!headerStretch.classList.contains("cs-scroll-active")){
document.querySelectorAll(stickyElementsSmart).forEach(el=> {
el.style.top=allHeight + 'px';
});
}});
document.addEventListener('stretch-nav-to-big', function(){
headerStretchHeight=parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-initial-height'));
});
if(document.body.classList.contains('cs-navbar-smart-enabled')&&windowWidth >=1020){
allHeight=(headerStretchHeight||0) + (wpAdminBarHeight||0) + (floatingHeaderHeight||0) + 20;
document.querySelectorAll(stickyElementsSmart).forEach(el=> {
el.style.top=allHeight + 'px';
});
}else if(document.body.classList.contains('cs-navbar-sticky-enabled')&&windowWidth >=1020){
allHeight=(headerStretchHeight||0) + (wpAdminBarHeight||0) + (floatingHeaderHeight||0) + 20;
document.querySelectorAll(stickyElements).forEach(el=> {
el.style.top=allHeight + 'px';
});
}
window.addEventListener('resize', function(){
let windowWidthResize=window.innerWidth;
if(windowWidthResize < 1020){
document.querySelectorAll(stickyElements).forEach(el=> {
el.removeAttribute('style');
});
document.querySelectorAll(stickyElementsSmart).forEach(el=> {
el.removeAttribute('style');
});
}});
});
})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
var _utility_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1);
(function (){
var initAPI=false;
var process=false;
var contex=[];
var players=[];
var attrs=[];
var YTdeferred=new Promise(function (resolve){
window.onYouTubePlayerAPIReady=function (){
resolve(window.YT);
};});
function embedYoutubeAPI(){
document.querySelectorAll('.cs-video-inner').forEach(function (el){
if((0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.isInViewport)(el)){
var tag=document.createElement('script');
tag.src='https://www.youtube.com/iframe_api';
var firstScriptTag=document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
initAPI=true;
}});
}
function rescaleVideoBackground(){
document.querySelectorAll('.cs-video-init').forEach(function (el){
var w=el.parentElement.offsetWidth;
var h=el.parentElement.offsetHeight;
var hideControl=400;
var id=el.getAttribute('data-uid');
if(w / h > 16 / 9){
players[id].setSize(w, w / 16 * 9 + hideControl);
}else{
players[id].setSize(h / 9 * 16, h + hideControl);
}});
}
function initVideoBackground(){
if(document.body.classList.contains('wp-admin')){
return;
}
if(process){
return;
}
process=true;
if(!initAPI){
var elements=document.querySelectorAll('.cs-video-wrapper[data-video-id]');
if(elements.length){
embedYoutubeAPI();
}}
if(!initAPI){
process=false;
return;
}
YTdeferred.then(function (YT){
document.querySelectorAll('.cs-video-inner').forEach(function (el){
var isInit=el.classList.contains('cs-video-init');
var id=null;
if(!isInit){
id=Math.random().toString(36).substr(2, 9);
}else{
id=el.getAttribute('data-uid');
}
contex[id]=el;
var isActive=contex[id].classList.contains('active');
var isInView=(0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.isInViewport)(contex[id]);
if(isInView&&!isInit){
contex[id].classList.add('cs-video-init');
contex[id].setAttribute('data-uid', id);
var videoID=contex[id].parentElement.dataset.videoId;
var videoStart=contex[id].parentElement.dataset.videoStart;
var videoEnd=contex[id].parentElement.dataset.videoEnd;
if(typeof videoID==='undefined'||!videoID){
return;
}
attrs[id]={
'videoId': videoID,
'startSeconds': videoStart,
'endSeconds': videoEnd,
'suggestedQuality': 'hd720'
};
players[id]=new YT.Player(contex[id], {
playerVars: {
autoplay: 0,
autohide: 1,
modestbranding: 1,
rel: 0,
showinfo: 0,
controls: 0,
disablekb: 1,
enablejsapi: 0,
iv_load_policy: 3,
playsinline: 1,
loop: 1
},
events: {
'onReady': function (){
players[id].loadVideoById(attrs[id]);
players[id].mute();
},
'onStateChange': function (e){
if(e.data===1){
var parentElement=contex[id].closest('.cs-overlay, .cs-video-wrap');
if(parentElement){
parentElement.classList.add('cs-video-bg-init');
}
contex[id].classList.add('active');
}else if(e.data===0){
players[id].seekTo(attrs[id].startSeconds);
}}
}});
rescaleVideoBackground();
}
var parentElement=contex[id].closest('.cs-overlay, .cs-video-wrap');
if(isActive&&isInit&&!parentElement.querySelector('.cs-player-state').classList.contains('cs-player-upause')){
var control=parentElement.querySelector('.cs-player-state');
if(control){
if(isInView&&control.classList.contains('cs-player-play')){
control.classList.remove('cs-player-play');
control.classList.add('cs-player-pause');
players[id].playVideo();
}
if(!isInView&&control.classList.contains('cs-player-pause')){
control.classList.remove('cs-player-pause');
control.classList.add('cs-player-play');
players[id].pauseVideo();
}}
}});
});
process=false;
}
document.addEventListener('click', function (event){
if(event.target.classList.contains('cs-player-state')){
var container=event.target.closest('.cs-overlay, .cs-video-wrap').querySelector('.cs-video-inner');
var id=container.getAttribute('data-uid');
event.target.classList.toggle('cs-player-pause');
event.target.classList.toggle('cs-player-play');
if(event.target.classList.contains('cs-player-pause')){
event.target.classList.remove('cs-player-upause');
players[id].playVideo();
}else{
event.target.classList.add('cs-player-upause');
players[id].pauseVideo();
}}
});
document.addEventListener('click', function (event){
if(event.target.classList.contains('cs-player-stop')){
var container=event.target.closest('.cs-overlay, .cs-video-wrap').querySelector('.cs-video-inner');
var id=container.getAttribute('data-uid');
var stateControl=event.target.nextElementSibling;
stateControl.classList.remove('cs-player-pause');
stateControl.classList.add('cs-player-play', 'cs-player-upause');
players[id].pauseVideo();
}});
document.addEventListener('click', function (event){
if(event.target.classList.contains('cs-player-volume')){
var container=event.target.closest('.cs-overlay, .cs-video-wrap').querySelector('.cs-video-inner');
var id=container.getAttribute('data-uid');
event.target.classList.toggle('cs-player-mute');
event.target.classList.toggle('cs-player-unmute');
if(event.target.classList.contains('cs-player-unmute')){
players[id].unMute();
}else{
players[id].mute();
}}
});
window.addEventListener('load', initVideoBackground);
window.addEventListener('scroll', initVideoBackground);
window.addEventListener('resize', initVideoBackground);
window.addEventListener('scrollstop', initVideoBackground);
document.addEventListener('DOMContentLoaded', function (){
initVideoBackground();
});
document.body.addEventListener('post-load', function (){
initVideoBackground();
});
window.addEventListener('resize', rescaleVideoBackground);
initVideoBackground();
})();
})();
(()=> {
var __webpack_exports__={};
__webpack_require__.r(__webpack_exports__);
var _utility_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1);
(function (){
HTMLElement.prototype.responsiveNav=function (){
this.classList.remove('menu-item-expanded');
let previousElement=this.previousElementSibling;
if(previousElement&&previousElement.classList.contains('submenu-visible')){
previousElement.classList.remove('submenu-visible');
(0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.slideUp)(previousElement);
this.parentElement.classList.remove('menu-item-expanded');
}else{
let parentOfParent=this.parentElement.parentElement;
parentOfParent.querySelectorAll('.menu-item .sub-menu').forEach(subMenu=> {
subMenu.classList.remove('submenu-visible');
(0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.slideUp)(subMenu);
});
parentOfParent.querySelectorAll('.menu-item-expanded').forEach(item=> {
item.classList.remove('menu-item-expanded');
});
if(previousElement){
previousElement.classList.toggle('submenu-visible');
(0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.slideToggle)(previousElement);
}
this.parentElement.classList.toggle('menu-item-expanded');
}};
document.addEventListener('DOMContentLoaded', function (){
let menuItems=document.querySelectorAll('.widget_nav_menu .menu-item-has-children');
menuItems.forEach(menuItem=> {
let span=document.createElement('span');
menuItem.appendChild(span);
span.addEventListener('click', function (e){
e.preventDefault();
this.responsiveNav();
});
let anchor=menuItem.children[0];
if(anchor&&anchor.tagName==='A'&&anchor.getAttribute('href')==='#'){
anchor.addEventListener('click', function (e){
e.preventDefault();
this.nextElementSibling.nextElementSibling.responsiveNav();
});
}});
});
})();
})();
(()=> {
__webpack_require__.r(__webpack_exports__);
document.addEventListener('click', function(e){
var target=e.target;
if(target&&target.matches('.cs-woocommerce-tabs > ul > li > a')){
target.parentElement.classList.toggle('cs-opened');
var panel=target.parentElement.querySelector('.woocommerce-Tabs-panel');
if(panel){
if(panel.style.display==='none'||panel.style.display===''){
panel.style.display='block';
}else{
panel.style.display='none';
}}
var siblings=target.parentElement.parentElement.children;
for (var i=0; i < siblings.length; i++){
if(siblings[i]!==target.parentElement){
siblings[i].classList.remove('cs-opened');
var siblingPanel=siblings[i].querySelector('.woocommerce-Tabs-panel');
if(siblingPanel){
siblingPanel.style.display='none';
}}
}
e.preventDefault();
}});
})();
})()
;