1/******/ (() => { // webpackBootstrap 2/******/ "use strict"; 3/******/ var __webpack_modules__ = ({ 4 5/***/ 3: 6/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 7 8__webpack_require__.r(__webpack_exports__); 9/* harmony export */ __webpack_require__.d(__webpack_exports__, { 10/* harmony export */ csGetCookie: () => (/* binding */ csGetCookie), 11/* harmony export */ csSetCookie: () => (/* binding */ csSetCookie), 12/* harmony export */ csco: () => (/* binding */ csco), 13/* harmony export */ isInViewport: () => (/* binding */ isInViewport), 14/* harmony export */ slideDown: () => (/* binding */ slideDown), 15/* harmony export */ slideToggle: () => (/* binding */ slideToggle), 16/* harmony export */ slideUp: () => (/* binding */ slideUp) 17/* harmony export */ }); 18// Create csco object. 19var csco = { 20 addAction: function addAction(x, y, z) { 21 return; 22 } 23}; 24if ('undefined' !== typeof wp && 'undefined' !== typeof wp.hooks) { 25 csco.addAction = wp.hooks.addAction; 26} 27 28/** 29 * isInViewport 30 */ 31 32function isInViewport(element) { 33 var rect = element.getBoundingClientRect(); 34 var windowHeight = window.innerHeight || document.documentElement.clientHeight; 35 var windowWidth = window.innerWidth || document.documentElement.clientWidth; 36 return rect.top <= windowHeight && rect.top + rect.height >= 0 && rect.left <= windowWidth && rect.left + rect.width >= 0; 37} 38 39/** 40 * slideDown \ slideUp \ slideToggle 41 */ 42 43function slideDown(element) { 44 var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350; 45 element.style.display = 'block'; 46 element.style.overflow = 'hidden'; 47 var height = element.scrollHeight; 48 element.style.height = 0; 49 setTimeout(function () { 50 element.style.transition = "height ".concat(duration, "ms"); 51 element.style.height = height + 'px'; 52 element.addEventListener('transitionend', function te() { 53 element.removeEventListener('transitionend', te); 54 element.style.removeProperty('height'); 55 element.style.removeProperty('transition'); 56 element.style.removeProperty('overflow'); 57 }); 58 }, 0); 59} 60function slideUp(element) { 61 var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350; 62 element.style.height = element.offsetHeight + 'px'; 63 element.style.overflow = 'hidden'; 64 setTimeout(function () { 65 element.style.transition = "height ".concat(duration, "ms"); 66 element.style.height = '0'; 67 element.addEventListener('transitionend', function te() { 68 element.removeEventListener('transitionend', te); 69 if (element.style.height === '0px') { 70 element.style.display = 'none'; 71 } 72 element.style.removeProperty('height'); 73 element.style.removeProperty('transition'); 74 element.style.removeProperty('overflow'); 75 }); 76 }, 0); 77} 78function slideToggle(element) { 79 var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350; 80 if (window.getComputedStyle(element).display === 'none') { 81 return slideDown(element, duration); 82 } else { 83 return slideUp(element, duration); 84 } 85} 86 87/** 88 * Cookies 89 */ 90function csGetCookie(name) { 91 var matches = document.cookie.match(new RegExp("(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)")); 92 return matches ? decodeURIComponent(matches[1]) : undefined; 93} 94function csSetCookie(name, value) { 95 var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; 96 props = { 97 path: '/' 98 }; 99 if (props.expires instanceof Date) { 100 props.expires = props.expires.toUTCString(); 101 } 102 var updatedCookie = encodeURIComponent(name) + "=" + encodeURIComponent(value); 103 for (var optionKey in props) { 104 updatedCookie += "; " + optionKey; 105 var optionValue = props[optionKey]; 106 if (optionValue !== true) { 107 updatedCookie += "=" + optionValue; 108 } 109 } 110 document.cookie = updatedCookie; 111} 112 113 114/***/ }) 115 116/******/ }); 117/************************************************************************/ 118/******/ // The module cache 119/******/ var __webpack_module_cache__ = {}; 120/******/ 121/******/ // The require function 122/******/ function __webpack_require__(moduleId) { 123/******/ // Check if module is in cache 124/******/ var cachedModule = __webpack_module_cache__[moduleId]; 125/******/ if (cachedModule !== undefined) { 126/******/ return cachedModule.exports; 127/******/ } 128/******/ // Create a new module (and put it into the cache) 129/******/ var module = __webpack_module_cache__[moduleId] = { 130/******/ // no module.id needed 131/******/ // no module.loaded needed 132/******/ exports: {} 133/******/ }; 134/******/ 135/******/ // Execute the module function 136/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 137/******/ 138/******/ // Return the exports of the module 139/******/ return module.exports; 140/******/ } 141/******/ 142/************************************************************************/ 143/******/ /* webpack/runtime/define property getters */ 144/******/ (() => { 145/******/ // define getter functions for harmony exports 146/******/ __webpack_require__.d = (exports, definition) => { 147/******/ for(var key in definition) { 148/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 149/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 150/******/ } 151/******/ } 152/******/ }; 153/******/ })(); 154/******/ 155/******/ /* webpack/runtime/hasOwnProperty shorthand */ 156/******/ (() => { 157/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 158/******/ })(); 159/******/ 160/******/ /* webpack/runtime/make namespace object */ 161/******/ (() => { 162/******/ // define __esModule on exports 163/******/ __webpack_require__.r = (exports) => { 164/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 165/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 166/******/ } 167/******/ Object.defineProperty(exports, '__esModule', { value: true }); 168/******/ }; 169/******/ })(); 170/******/ 171/************************************************************************/ 172var __webpack_exports__ = {}; 173// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 174(() => { 175var __webpack_exports__ = {}; 176__webpack_require__.r(__webpack_exports__); 177/** ---------------------------------------------------------------------------- 178 * Header Scroll Scheme */ 179 180document.addEventListener('DOMContentLoaded', function () { 181 var transitionTimer; 182 document.addEventListener('nav-stick', function (event) { 183 if (document.body.classList.contains('cs-display-header-overlay')) { 184 var headerSmart = document.querySelector('.cs-navbar-smart-enabled .cs-header, .cs-navbar-sticky-enabled .cs-header'); 185 var headerAlt = headerSmart.querySelector('.cs-container'); 186 headerAlt.classList.add("cs-header-elements-no-transition"); 187 clearTimeout(transitionTimer); 188 transitionTimer = setTimeout(function () { 189 headerAlt.classList.remove("cs-header-elements-no-transition"); 190 }, 300); 191 } 192 }); 193 document.addEventListener('nav-unstick', function (event) { 194 if (document.body.classList.contains('cs-display-header-overlay')) { 195 var headerSmart = document.querySelector('.cs-navbar-smart-enabled .cs-header, .cs-navbar-sticky-enabled .cs-header'); 196 var headerAlt = headerSmart.querySelector('.cs-container'); 197 headerAlt.classList.add("cs-header-elements-no-transition"); 198 clearTimeout(transitionTimer); 199 transitionTimer = setTimeout(function () { 200 headerAlt.classList.remove("cs-header-elements-no-transition"); 201 }, 300); 202 } 203 }); 204}); 205})(); 206 207// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 208(() => { 209var __webpack_exports__ = {}; 210__webpack_require__.r(__webpack_exports__); 211/** ---------------------------------------------------------------------------- 212 * Header Smart Streatch */ 213 214document.addEventListener('DOMContentLoaded', function () { 215 document.addEventListener('header-smart-stretch-scroll-sticky-scroll-init', function (event) { 216 var headerParams = event.detail; 217 window.addEventListener('scroll', function () { 218 var scrolled = window.scrollY; 219 var headerSmart = document.querySelector('.cs-navbar-smart-enabled .cs-header, .cs-navbar-sticky-enabled .cs-header'); 220 headerParams.headerSmartPosition = headerSmart ? headerSmart.offsetTop : 0; 221 if (scrolled > headerParams.smartStart + headerParams.scrollPoint + 10 && scrolled > headerParams.scrollPrev) { 222 if (scrolled > headerParams.smartStart + headerParams.headerLargeHeight + 200) { 223 document.dispatchEvent(new CustomEvent('sticky-nav-hide', { 224 detail: headerParams 225 })); 226 } 227 } else { 228 if (headerParams.scrollUpAmount >= headerParams.scrollPoint || scrolled === 0) { 229 document.dispatchEvent(new CustomEvent('sticky-nav-visible', { 230 detail: headerParams 231 })); 232 } 233 } 234 if (scrolled > headerParams.smartStart + headerParams.headerLargeHeight) { 235 document.dispatchEvent(new CustomEvent('nav-stick', { 236 detail: headerParams 237 })); 238 } else if (headerParams.headerSmartPosition <= headerParams.smartStart) { 239 document.dispatchEvent(new CustomEvent('nav-unstick', { 240 detail: headerParams 241 })); 242 } 243 if (scrolled < headerParams.scrollPrev) { 244 headerParams.scrollUpAmount += headerParams.scrollPrev - scrolled; 245 } else { 246 headerParams.scrollUpAmount = 0; 247 } 248 var wpAdminBar = document.querySelector('#wpadminbar'); 249 if (wpAdminBar && window.innerWidth <= 600 && scrolled >= headerParams.wpAdminBarHeight) { 250 document.dispatchEvent(new CustomEvent('adminbar-mobile-scrolled', { 251 detail: headerParams 252 })); 253 } else { 254 document.dispatchEvent(new CustomEvent('adminbar-mobile-no-scrolled', { 255 detail: headerParams 256 })); 257 } 258 headerParams.scrollPrev = scrolled; 259 }); 260 }); 261}); 262})(); 263 264// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 265(() => { 266var __webpack_exports__ = {}; 267__webpack_require__.r(__webpack_exports__); 268/* harmony import */ var _utility_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); 269/** ---------------------------------------------------------------------------- 270 * Hero */ 271 272 273(function () { 274 var section = 'cs-hero-type-1'; 275 var sliders = document.querySelectorAll(".".concat(section, "__slider")); 276 if (sliders.length === 0) { 277 return; 278 } 279 var executed = false;
280 var initHero = function initHero() { 281 if (!executed && (0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.isInViewport)(sliders[0])) { 282 executed = true; 283 var head = document.getElementsByTagName('head')[0]; 284 var script = document.createElement('script'); 285 script.type = 'text/javascript'; 286 script.src = 'https://cdn.jsdelivr.net/npm/swiper@10/swiper-bundle.min.js'; 287 script.onload = function () { 288 function setParallaxAttributes(element, duration) { 289 element.setAttribute('data-swiper-parallax-x', '-400'); 290 element.setAttribute('data-swiper-parallax-duration', duration); 291 } 292 sliders.forEach(function (slider) { 293 // Section data 294 var autoplayValue = slider.getAttribute('data-cs-autoplay'); 295 var autoplayDelayValue = slider.getAttribute('data-cs-autoplay-delay'); 296 var parallaxValue = slider.getAttribute('data-cs-parallax'); 297 var gapValue = slider.getAttribute('data-cs-gap'); 298 var postContentContainer = '.cs-e
298ntry__content'; 299 300 // Data manipulation 301 var autoplayDelay = !isNaN(parseInt(autoplayDelayValue)) ? parseInt(autoplayDelayValue) : 5000; 302 var autoplay = autoplayValue ? { 303 delay: autoplayDelay, 304 disableOnInteraction: false, 305 pauseOnMouseEnter: true 306 } : false; 307 var parallax = !!parallaxValue ? true : false; 308 var gap = !isNaN(parseInt(gapValue)) ? parseInt(gapValue) : 0; 309 var postContents = slider.querySelectorAll(postContentContainer); 310 if (parallax) { 311 if (postContents.length > 0) { 312 postContents.forEach(function (postContent) { 313 setParallaxAttributes(postContent, '800'); 314 }); 315 } 316 } 317 318 // Swiper settings 319 var wrapperClass = "".concat(section, "__wrapper"); 320 var slideClass = "".concat(section, "__item"); 321 var prevEl = slider.querySelector(".".concat(section, "__button-prev")); 322 var nextEl = slider.querySelector(".".concat(section, "__button-next")); 323 var paginationContainer = slider.querySelector(".".concat(section, "__pagination")); 324 var bulletClass = "".concat(section, "__pagination-bullet"); 325 var bulletClassActive = "".concat(section, "__pagination-bullet-active"); 326 new Swiper(slider, { 327 scrollbar: false, 328 wrapperClass: wrapperClass, 329 slideClass: slideClass, 330 direction: 'horizontal', 331 loop: true, 332 speed: 800, 333 parallax: parallax, 334 autoplay: autoplay, 335 slidesPerView: 1, 336 spaceBetween: gap, 337 a11y: { 338 slideRole: 'article', 339 slideLabelMessage: 'Slide {{index}} of {{slidesLength}}' 340 }, 341 pagination: { 342 el: paginationContainer, 343 clickable: true, 344 bulletElement: 'span', 345 bulletClass: bulletClass, 346 bulletActiveClass: bulletClassActive 347 }, 348 navigation: { 349 nextEl: nextEl, 350 prevEl: prevEl 351 }, 352 on: { 353 init: function init() { 354 var _this = this; 355 setTimeout(function () { 356 var initialSlide = _this.slides[_this.activeIndex]; 357 if (initialSlide) { 358 var initialContent = initialSlide.querySelector(postContentContainer); 359 if (initialContent) { 360 initialContent.style.transform = 'none'; 361 } 362 } 363 }, 100); 364 }, 365 slideChange: function slideChange() { 366 var currentSlide = this.slides[this.activeIndex]; 367 postContents.forEach(function (postContent) { 368 if (postContent === currentSlide.querySelector(postContentContainer)) { 369 postContent.style.transform = 'none'; 370 } 371 }); 372 } 373 } 374 }); 375 }); 376 }; 377 head.appendChild(script); 378 } 379 }; 380 document.addEventListener('DOMContentLoaded', function () { 381 initHero(); 382 }); 383 window.addEventListener('resize', function () { 384 initHero(); 385 }); 386 window.addEventListener('scroll', function () { 387 initHero(); 388 }); 389})(); 390})(); 391 392// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 393(() => { 394var __webpack_exports__ = {}; 395__webpack_require__.r(__webpack_exports__); 396/** 397 * AJAX Load More. 398 * 399 * Contains functions for AJAX Load More. 400 */ 401 402if (typeof window.load_more_query === 'undefined') { 403 window.load_more_query = []; 404} 405 406// Get next posts 407function csco_ajax_get_posts(object) { 408 var container = object.closest('.cs-posts-area'); 409 var settings = JSON.parse(object.dataset.settings); 410 var page = parseInt(object.dataset.page); 411 object.dataset.loading = true; 412 413 // Set button text to Load More. 414 object.textContent = settings.translation.loading; 415 var data = { 416 action: 'csco_ajax_load_more', 417 page: page, 418 posts_per_page: settings.posts_per_page, 419 query_data: settings.query_data, 420 attributes: settings.attributes, 421 options: settings.options, 422 _ajax_nonce: settings.nonce 423 }; 424 425 // Request Url. 426 var csco_pagination_url = settings.type === 'ajax_restapi' ? settings.rest_url : settings.url; 427 function encodeFormData(data) { 428 return Object.keys(data).map(function (key) { 429 return encodeURIComponent(key) + '=' + encodeURIComponent(data[key]); 430 }).join('&'); 431 } 432 fetch(csco_pagination_url, { 433 method: 'POST', 434 body: encodeFormData(data), 435 headers: { 436 'Content-Type': 'application/x-www-form-urlencoded' 437 } 438 }).then(function (response) { 439 return response.json(); 440 }).then(function (res) { 441 if (res.success) { 442 var dataContent = document.createElement('div'); 443 dataContent.innerHTML = res.data.content; 444 if (dataContent.children.length) { 445 // WP Post Load trigger. This might need more logic for your specific use-case. 446 document.body.dispatchEvent(new Event('post-load')); 447 448 // Reinit Facebook widgets. 449 if (document.querySelector('#fb-root') && typeof FB !== 'undefined') { 450 FB.XFBML.parse(); 451 } 452 453 // Set button text to Load More. 454 object.textContent = settings.translation.load_more; 455 456 // Increment a page. 457 page += 1; 458 object.dataset.page = page.toString(); 459 460 // Reset the loading state. 461 object.dataset.loading = "false"; 462 463 // Append new content to the container 464 var mainContainer = container.querySelector('.cs-posts-area__main'); 465 while (dataContent.firstChild) { 466 mainContainer.appendChild(dataContent.firstChild); 467 } 468 } 469 470 // Remove Button on Posts End. 471 if (res.data.posts_end) { 472 // Remove Load More button. 473 object.parentNode.removeChild(object); 474 } 475 } 476 })["catch"](function (error) { 477 console.error('Error fetching posts:', error); 478 }); 479} 480function csco_load_more_init(infinite) { 481 var areas = document.querySelectorAll('.cs-posts-area'); 482 areas.forEach(function (area) { 483 if (area.dataset.init) { 484 return; 485 } 486 var csco_ajax_settings; 487 var archive_data = area.dataset.postsArea; 488 if (archive_data) { 489 csco_ajax_settings = JSON.parse(window.atob(archive_data)); 490 } else if (typeof csco_ajax_pagination !== 'undefined' && typeof archive_data === 'undefined') { 491 csco_ajax_settings = csco_ajax_pagination; 492 } 493 if (csco_ajax_settings) { 494 if (!infinite && csco_ajax_settings.infinite_load) { 495 return; 496 } 497 var pagination = document.createElement('div'); 498 pagination.className = 'cs-posts-area__pagination'; 499 var btn = document.createElement('button'); 500 btn.className = 'cs-load-more'; 501 btn.textContent = csco_ajax_settings.translation.load_more; 502 pagination.appendChild(btn); 503 area.appendChild(pagination); 504 btn.dataset.settings = JSON.stringify(csco_ajax_settings); 505 btn.dataset.page = '2'; 506 btn.dataset.loading = "false"; 507 btn.dataset.scrollHandling = JSON.stringify({ 508 allow: JSON.parse(csco_ajax_settings.infinite_load), 509 delay: 400 510 }); 511 } 512 area.dataset.init = true; 513 }); 514} 515csco_load_more_init(true); 516 517// Elementor Init 518window.addEventListener('elementor/frontend/init', function () { 519 csco_load_more_init(true); 520}); 521 522// On Scroll Event. 523window.addEventListener('scroll', function () { 524 var buttons = document.querySelectorAll('.cs-posts-area .cs-load-more'); 525 buttons.forEach(function (btn) { 526 var loading = btn.dataset.loading === "true"; 527 var scrollHandling = JSON.parse(btn.dataset.scrollHandling || '{}'); 528 if (loading || !scrollHandling.allow) { 529 return; 530 } 531 scrollHandling.allow = false;
532 btn.dataset.scrollHandling = JSON.stringify(scrollHandling); 533 setTimeout(function () { 534 scrollHandling.allow = true; 535 btn.dataset.scrollHandling = JSON.stringify(scrollHandling); 536 }, scrollHandling.delay); 537 var offset = btn.getBoundingClientRect().top - window.innerHeight; 538 if (offset < 4000) { 539 csco_ajax_get_posts(btn); 540 } 541 }); 542}); 543 544// On Click Event. 545document.body.addEventListener('click', function (event) { 546 if (event.target.classList.contains('cs-load-more')) { 547 var loading = event.target.dataset.loading === "true"; 548 if (!loading) { 549 csco_ajax_get_posts(event.target); 550 } 551 } 552}); 553})(); 554 555// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 556(() => { 557var __webpack_exports__ = {}; 558__webpack_require__.r(__webpack_exports__); 559function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 560function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 561function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } 562function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 563function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } 564function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } 565/** ---------------------------------------------------------------------------- 566 * Navigation */ 567var CscoNavigation = /*#__PURE__*/function () { 568 function CscoNavigation() { 569 _classCallCheck(this, CscoNavigation); 570 this.headerParams = { 571 headerLargeHeight: parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-initial-height')), 572 headerCompactHeight: parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-height')), 573 headerSmart: document.querySelector('.cs-navbar-smart-enabled .cs-header, .cs-navbar-sticky-enabled .cs-header'), 574 wpAdminBar: document.querySelector('#wpadminbar'), 575 headerBefore: document.querySelector('.cs-header-before'), 576 headerStretch: document.querySelector('.cs-navbar-smart-enabled .cs-header-stretch'), 577 wpAdminBarHeight: null, 578 smartStart: null, 579 scrollPoint: 200, 580 scrollPrev: 200, 581 scrollUpAmount: 0, 582 headerSmartPosition: 0 583 }; 584 this.initialize(); 585 } 586 _createClass(CscoNavigation, [{ 587 key: "initialize", 588 value: function initialize() { 589 if (document.body.classList.contains('wp-admin')) { 590 return; 591 } 592 this.bindEvents(); 593 } 594 }, { 595 key: "bindEvents", 596 value: function bindEvents() { 597 var _this = this; 598 document.addEventListener('DOMContentLoaded', function () { 599 _this.smartLevels(); 600 _this.adaptTablet(); 601 _this.stickyScroll(); 602 _this.headerClassesChange(); 603 }); 604 window.addEventListener('resize', function () { 605 _this.smartLevels(); 606 _this.adaptTablet(); 607 _this.stickyScroll(); 608 }); 609 } 610 }, { 611 key: "smartLevels", 612 value: function smartLevels() { 613 var windowWidth = window.innerWidth; 614 615 // Reset Calc. 616 document.querySelectorAll('.cs-header__nav-inner li').forEach(function (el) { 617 el.classList.remove('cs-sm__level', 'cs-sm-position-left', 'cs-sm-position-right'); 618 }); 619 document.querySelectorAll('.cs-header__nav-inner li .sub-menu').forEach(function (el) { 620 el.classList.remove('cs-mm__position-init'); 621 }); 622 623 // Set Settings. 624 document.querySelectorAll('.cs-header__nav-inner > li.menu-item:not(.cs-mm)').forEach(function (parent) { 625 var position = 'cs-sm-position-right'; //default 626 var objPrevWidth = 0; 627 parent.querySelectorAll('.sub-menu').forEach(function (el) { 628 // Reset child levels. 629 if (el.parentElement.nextElementSibling) { 630 el.parentElement.nextElementSibling.classList.add('cs-sm__level'); 631 } 632 if (el.parentElement.classList.contains('cs-sm__level')) { 633 el.parentElement.classList.remove('cs-mm-level'); 634 position = 'cs-sm-position-right'; //reset 635 objPrevWidth = 0; 636 } 637 638 // Find out position items. 639 var offset = el.getBoundingClientRect().left; 640 if (position === 'cs-sm-position-right' && el.offsetWidth + offset > windowWidth) { 641 position = 'cs-sm-position-left'; 642 } 643 if (position === 'cs-sm-position-left' && offset - (el.offsetWidth + objPrevWidth) < 0) { 644 position = 'cs-sm-position-right'; 645 } 646 objPrevWidth = el.offsetWidth; 647 el.classList.add('cs-sm-position-init'); 648 el.parentElement.classList.add(position); 649 }); 650 }); 651 } 652 }, { 653 key: "adaptTablet", 654 value: function adaptTablet() { 655 // Click outside. 656 document.addEventListener('touchstart', function (e) { 657 if (!e.target.closest('.cs-header__nav-inner')) { 658 document.querySelectorAll('.cs-header__nav-inner .menu-item-has-children').forEach(function (el) { 659 el.classList.remove('submenu-visible'); 660 }); 661 } else { 662 var parentMenuItem = e.target.closest('.menu-item'); 663 if (parentMenuItem) { 664 if (parentMenuItem.previousElementSibling) { 665 parentMenuItem.previousElementSibling.querySelectorAll('.menu-item').forEach(function (el) { 666 el.classList.remove('submenu-visible'); 667 }); 668 } 669 if (parentMenuItem.nextElementSibling) { 670 parentMenuItem.nextElementSibling.classList.remove('submenu-visible'); 671 } 672 } 673 } 674 }); 675 document.querySelectorAll('.cs-header__nav-inner .menu-item-has-children').forEach(function (el) { 676 // Reset class. 677 el.classList.remove('submenu-visible'); 678 679 // Remove expanded if exists. 680 var expandedElem = el.querySelector('a > .expanded'); 681 if (expandedElem) { 682 expandedElem.remove(); 683 } 684 685 // Add a caret. 686 if ('ontouchstart' in document.documentElement) { 687 var aTag = el.querySelector('a'); 688 if (aTag) { 689 var span = document.createElement('span'); 690 span.className = 'expanded'; 691 aTag.appendChild(span); 692 } 693 } 694 695 // Check touch device. 696 if ('ontouchstart' in document.documentElement) { 697 el.classList.add('touch-device'); 698 } 699 var expandedElement = el.querySelector('a .expanded'); 700 if (expandedElement) { 701 expandedElement.addEventListener('touchstart', function (e) { 702 e.preventDefault(); 703 el.classList.toggle('submenu-visible'); 704 }, { 705 passive: true 706 }); 707 } 708 var anchor = el.querySelector('a'); 709 if (anchor && anchor.getAttribute('href') === '#') { 710 anchor.addEventListener('touchstart', function (e) { 711 e.preventDefault(); 712 if (!e.target.classList.contains('expanded')) { 713 el.classList.toggle('submenu-visible'); 714 } 715 }, { 716 passive: true 717 }); 718 } 719 }); 720 } 721 }, { 722 key: "stickyScroll", 723 value: function stickyScroll() { 724 var _this2 = this; 725 this.headerParams = { 726 headerLargeHeight: parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-initial-height')), 727 headerCompactHeight: parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-height')), 728 headerSmart: document.querySelector('.cs-navbar-smart-enabled .cs-header, .cs-navbar-sticky-enabled .cs-header'), 729 wpAdminBar: document.querySelector('#wpadminbar'), 730 headerBefore: document.querySelector('.cs-header-before'), 731 headerStretch: document.querySelector('.cs-navbar-smart-enabled .cs-header-stretch'), 732 wpAdminBarHeight: null, 733 smartStart: null, 734 scrollPoint: 200, 735 scrollPrev: 200, 736 scrollUpAmount: 0, 737 headerSmartPosition: 0 738 }; 739 this.headerParams.wpAdminBarHeight = this.headerParams.wpAdminBar ? this.headerParams.wpAdminBar.offsetHeight : 0; 740 if (this.headerParams.headerBefore) { 741 this.headerParams.smartStart = this.headerParams.headerBefore.offsetTop; 742 } else { 743 this.headerParams.smartStart = this.headerParams.wpAdminBarHeight + (this.headerParams.headerSmart ? this.headerParams.headerSmart.offsetTop : 0); 744 } 745 window.addEventListener('scroll', function () { 746 var scrolled = window.scrollY; 747 _this2.headerParams.headerSmartPosition = _this2.headerParams.headerSmart ? _this2.headerParams.headerSmart.offsetTop : 0; 748 if (scrolled > _this2.headerParams.smartStart + _this2.headerParams.scrollPoint + 10 && scrolled > _this2.headerParams.scrollPrev) { 749 if (scrolled > _this2.headerParams.smartStart + _this2.headerParams.headerCompactHeight + 200) { 750 document.dispatchEvent(new Event('sticky-nav-hide')); 751 } 752 } else { 753 if (_this2.headerParams.scrollUpAmount >= _this2.headerParams.scrollPoint || scrolled === 0) { 754 document.dispatchEvent(new Event('sticky-nav-visible')); 755 } 756 } 757 if (_this2.headerParams.headerSmart) { 758 if (scrolled > _this2.headerParams.smartStart + _this2.headerParams.headerCompactHeight) { 759 document.dispatchEvent(new Event('nav-stick', { 760 detail: _this2.headerParams 761 })); 762 } else if (_this2.headerParams.headerSmartPosition <= _this2.headerParams.smartStart) { 763 document.dispatchEvent(new Event('nav-unstick', { 764 detail: _this2.headerParams 765 })); 766 } 767 } 768 if (scrolled < _this2.headerParams.scrollPrev) { 769 _this2.headerParams.scrollUpAmount += _this2.headerParams.scrollPrev - scrolled; 770 } else { 771 _this2.headerParams.scrollUpAmount = 0; 772 } 773 if (_this2.headerParams.wpAdminBar && window.innerWidth <= 600 && scrolled >= _this2.headerParams.wpAdminBarHeight) { 774 document.dispatchEvent(new Event('adminbar-mobile-scrolled')); 775 } else { 776 document.dispatchEvent(new Event('adminbar-mobile-no-scrolled')); 777 } 778 _this2.headerParams.scrollPrev = scrolled; 779 }); 780 } 781 }, { 782 key: "headerClassesChange", 783 value: function headerClassesChange() { 784 var _this3 = this; 785 document.addEventListener("sticky-nav-visible", function (event) { 786 _this3.headerParams.headerSmart.classList.add('cs-header-smart-visible'); 787 }); 788 document.addEventListener("sticky-nav-hide", function (event) { 789 _this3.headerParams.headerSmart.classList.remove('cs-header-smart-visible'); 790 }); 791 document.addEventListener("nav-stick", function (event) { 792 _this3.headerParams.headerSmart.classList.add('cs-scroll-sticky'); 793 }); 794 document.addEventListener("nav-unstick", function (event) { 795 _this3.headerParams.headerSmart.classList.remove('cs-scroll-sticky', 'cs-header-smart-visible'); 796 }); 797 document.addEventListener("adminbar-mobile-scrolled", function (event) { 798 document.body.classList.add('cs-adminbar-mobile-scrolled'); 799 }); 800 document.addEventListener("adminbar-mobile-no-scrolled", function (event) { 801 document.body.classList.remove('cs-adminbar-mobile-scrolled'); 802 }); 803 } 804 }]); 805 return CscoNavigation; 806}();
807new CscoNavigation(); 808})(); 809 810// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 811(() => { 812var __webpack_exports__ = {}; 813__webpack_require__.r(__webpack_exports__); 814/** ---------------------------------------------------------------------------- 815 * Offcanvas */ 816 817(function () { 818 var toggles = document.querySelectorAll('.cs-header__offcanvas-toggle, .cs-site-overlay, .cs-offcanvas__toggle'); 819 toggles.forEach(function (toggle) { 820 toggle.addEventListener('click', function (e) { 821 e.preventDefault(); 822 var body = document.body; 823 if (!body.classList.contains('cs-offcanvas-active')) { 824 body.classList.add('cs-offcanvas-transition'); 825 } else { 826 setTimeout(function () { 827 body.classList.remove('cs-offcanvas-transition'); 828 }, 400); 829 } 830 body.classList.toggle('cs-offcanvas-active'); 831 }); 832 }); 833})(); 834})(); 835 836// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 837(() => { 838var __webpack_exports__ = {}; 839__webpack_require__.r(__webpack_exports__); 840/** ---------------------------------------------------------------------------- 841 * Responsive Embeds */ 842 843(function () { 844 /** 845 * Add max-width & max-height to <iframe> elements, depending on their width & height props. 846 */ 847 function initResponsiveEmbeds() { 848 var proportion, parentWidth; 849 var iframes = document.querySelectorAll('.entry-content iframe'); 850 851 // Loop through iframe elements. 852 iframes.forEach(function (iframe) { 853 // Don't handle if the parent automatically resizes itself. 854 if (iframe.closest('div[data-video-start], div[data-video-end]')) { 855 return; 856 } 857 // Only continue if the iframe has a width & height defined. 858 if (iframe.width && iframe.height) { 859 // Calculate the proportion/ratio based on the width & height. 860 proportion = parseFloat(iframe.width) / parseFloat(iframe.height); 861 // Get the parent element's width. 862 parentWidth = parseFloat(window.getComputedStyle(iframe.parentElement).width); 863 // Set the max-width & height. 864 iframe.style.maxWidth = '100%'; 865 iframe.style.maxHeight = Math.round(parentWidth / proportion) + 'px'; 866 } 867 }); 868 } 869 870 // Document ready. 871 document.addEventListener('DOMContentLoaded', function () { 872 initResponsiveEmbeds(); 873 }); 874 875 // Post load. This assumes you have an event "post-load" being dispatched on the body element. 876 document.body.addEventListener('post-load', function () { 877 initResponsiveEmbeds(); 878 }); 879 880 // Window resize. 881 window.addEventListener('resize', function () { 882 initResponsiveEmbeds(); 883 }); 884 885 // Run on initial load. 886 initResponsiveEmbeds(); 887})(); 888})(); 889 890// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 891(() => { 892var __webpack_exports__ = {}; 893__webpack_require__.r(__webpack_exports__); 894/* harmony import */ var _utility_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); 895/** ---------------------------------------------------------------------------- 896 * Color Scheme Toogle */ 897 898 899var cscoDarkMode = { 900 init: function init() { 901 var _this = this; 902 this.initMode(); 903 window.matchMedia('(prefers-color-scheme: dark)').addListener(function (e) { 904 _this.initMode(); 905 }); 906 document.querySelectorAll('.cs-site-scheme-toggle').forEach(function (toggle) { 907 toggle.onclick = function () { 908 if ('dark' === document.body.getAttribute('data-scheme')) { 909 _this.changeScheme('light', true); 910 } else { 911 _this.changeScheme('dark', true); 912 } 913 }; 914 }); 915 }, 916 initMode: function initMode() { 917 var siteScheme = false; 918 switch (csLocalize.siteSchemeMode) { 919 case 'dark': 920 siteScheme = 'dark'; 921 break; 922 case 'light': 923 siteScheme = 'light'; 924 break; 925 case 'system': 926 siteScheme = 'auto'; 927 break; 928 } 929 if (csLocalize.siteSchemeToogle) { 930 if ('light' === (0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.csGetCookie)('_color_schema')) { 931 siteScheme = 'light'; 932 } 933 if ('dark' === (0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.csGetCookie)('_color_schema')) { 934 siteScheme = 'dark'; 935 } 936 } 937 if (siteScheme && siteScheme !== document.body.getAttribute('data-scheme')) { 938 this.changeScheme(siteScheme, false); 939 } 940 }, 941 changeScheme: function changeScheme(siteScheme, cookie) { 942 document.body.classList.add('cs-scheme-toggled'); 943 document.body.setAttribute('data-scheme', siteScheme); 944 if (cookie) { 945 (0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.csSetCookie)('_color_schema', siteScheme, { 946 expires: 2592000 947 }); 948 } 949 setTimeout(function () { 950 document.body.classList.remove('cs-scheme-toggled'); 951 }, 100); 952 } 953}; 954cscoDarkMode.init(); 955})(); 956 957// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 958(() => { 959var __webpack_exports__ = {}; 960__webpack_require__.r(__webpack_exports__); 961/** ---------------------------------------------------------------------------- 962 * Scroll to top */ 963 964(function () { 965 var section = 'cs-scroll-top'; 966 var scrollToTopButton = document.querySelector(".".concat(section)); 967 if (scrollToTopButton) { 968 var activeClass = 'is-active'; 969 var offset = 200; 970 var scrollToTop = function scrollToTop() { 971 window.scrollTo({ 972 top: 0, 973 behavior: 'smooth' 974 }); 975 }; 976 var progressPath = scrollToTopButton.querySelector(".".concat(section, "-progress path")); 977 var pathLength = progressPath.getTotalLength(); 978 progressPath.style.transition = progressPath.style.WebkitTransition = '
978none'; 979 progressPath.style.strokeDasharray = "".concat(pathLength, " ").concat(pathLength); 980 progressPath.style.strokeDashoffset = pathLength; 981 progressPath.getBoundingClientRect(); 982 progressPath.style.transition = progressPath.style.WebkitTransition = 'stroke-dashoffset 10ms linear'; 983 var updateProgress = function updateProgress() { 984 var scroll = window.scrollY || window.scrollTop || document.documentElement.scrollTop; 985 var docHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight); 986 var windowHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); 987 var height = docHeight - windowHeight; 988 var progress = pathLength - scroll * pathLength / height; 989 progressPath.style.strokeDashoffset = progress; 990 }; 991 updateProgress(); 992 if (scrollToTopButton) { 993 scrollToTopButton.addEventListener('click', scrollToTop); 994 } 995 window.addEventListener('scroll', function () { 996 updateProgress(); 997 var scrollPos = window.scrollY || window.scrollTop || document.getElementsByTagName('html')[0].scrollTop; 998 if (scrollPos > offset) { 999 scrollToTopButton.classList.add(activeClass); 1000 } else { 1001 scrollToTopButton.classList.remove(activeClass); 1002 } 1003 }); 1004 } 1005})(); 1006})(); 1007 1008// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 1009(() => { 1010var __webpack_exports__ = {}; 1011__webpack_require__.r(__webpack_exports__); 1012/** ---------------------------------------------------------------------------- 1013 * Search Dropdown */ 1014 1015(function () { 1016 var toggles = document.querySelectorAll('.cs-header__search-toggle, .cs-search-overlay, .cs-search__close'); 1017 toggles.forEach(function (toggle) { 1018 toggle.addEventListener('click', function (e) { 1019 e.preventDefault(); 1020 var body = document.body; 1021 var headerElement = document.querySelector('.cs-header'); 1022 if (!body.classList.contains('cs-search-active')) { 1023 body.classList.add('cs-search-transition'); 1024 } else { 1025 setTimeout(function () { 1026 body.classList.remove('cs-search-transition'); 1027 }, 400); 1028 } 1029 body.classList.toggle('cs-search-active'); 1030 headerElement.classList.toggle('cs-search-visible'); 1031 }); 1032 }); 1033})(); 1034})(); 1035 1036// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 1037(() => { 1038var __webpack_exports__ = {}; 1039__webpack_require__.r(__webpack_exports__); 1040/** ---------------------------------------------------------------------------- 1041 * Sticky Sidebar */ 1042 1043(function () { 1044 var stickyElementsSmart = [], 1045 stickyElements = []; 1046 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'); 1047 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'); 1048 document.addEventListener("DOMContentLoaded", function () { 1049 var headerStick = document.querySelector('.cs-header'), 1050 wpAdminBar = document.querySelector('#wpadminbar'), 1051 headerStickHeight = headerStick ? headerStick.offsetHeight : 0, 1052 wpAdminBarHeight = wpAdminBar ? wpAdminBar.offsetHeight : 0, 1053 headerStretch = document.querySelector('.cs-header-stretch'), 1054 headerStretchHeight = headerStretch ? headerStretch.offsetHeight : 0, 1055 allHeight = headerStickHeight + wpAdminBarHeight + 20, 1056 windowWidth = window.innerWidth; 1057 if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { 1058 stickyElementsSmart.push('.cs-sticky-sidebar-enabled.cs-stick-to-bottom .cs-sidebar__inner'); 1059 stickyElements.push('.cs-sticky-sidebar-enabled.cs-stick-to-bottom .cs-sidebar__inner'); 1060 } 1061 stickyElementsSmart = stickyElementsSmart.join(','); 1062 stickyElements = stickyElements.join(','); 1063 document.addEventListener('sticky-nav-visible', function () { 1064 headerStickHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-height'));
1065 allHeight = (headerStretchHeight || 0) + (wpAdminBarHeight || 0) + 20; 1066 document.querySelectorAll(stickyElementsSmart).forEach(function (el) { 1067 el.style.top = allHeight + 'px'; 1068 }); 1069 }); 1070 document.addEventListener('sticky-nav-hide', function () { 1071 headerStickHeight = 0; 1072 allHeight = (headerStickHeight || 0) + (wpAdminBarHeight || 0) + 20; 1073 document.querySelectorAll(stickyElementsSmart).forEach(function (el) { 1074 el.style.top = allHeight + 'px'; 1075 }); 1076 }); 1077 document.addEventListener('stretch-nav-to-small', function () { 1078 headerStretchHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-height')); 1079 allHeight = (headerStretchHeight || 0) + (wpAdminBarHeight || 0) + 20; 1080 if (headerStretch && headerStretch.classList.contains("cs-scroll-sticky") && !headerStretch.classList.contains("cs-scroll-active")) { 1081 document.querySelectorAll(stickyElementsSmart).forEach(function (el) { 1082 el.style.top = allHeight + 'px'; 1083 }); 1084 } 1085 }); 1086 document.addEventListener('stretch-nav-to-big', function () { 1087 headerStretchHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-initial-height')); 1088 }); 1089 if (document.body.classList.contains('cs-navbar-smart-enabled') && windowWidth >= 1020) { 1090 allHeight = (headerStretchHeight || 0) + (wpAdminBarHeight || 0) + 20; 1091 document.querySelectorAll(stickyElementsSmart).forEach(function (el) { 1092 el.style.top = allHeight + 'px'; 1093 }); 1094 } else if (document.body.classList.contains('cs-navbar-sticky-enabled') && windowWidth >= 1020) { 1095 allHeight = (headerStretchHeight || 0) + (wpAdminBarHeight || 0) + 20; 1096 document.querySelectorAll(stickyElements).forEach(function (el) { 1097 el.style.top = allHeight + 'px'; 1098 }); 1099 } 1100 window.addEventListener('resize', function () { 1101 var windowWidthResize = window.innerWidth; 1102 if (windowWidthResize < 1020) { 1103 document.querySelectorAll(stickyElements).forEach(function (el) { 1104 el.removeAttribute('style'); 1105 }); 1106 document.querySelectorAll(stickyElementsSmart).forEach(function (el) { 1107 el.removeAttribute('style'); 1108 }); 1109 } 1110 }); 1111 }); 1112})(); 1113})(); 1114 1115// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 1116(() => { 1117__webpack_require__.r(__webpack_exports__); 1118/* harmony import */ var _utility_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3); 1119/** ---------------------------------------------------------------------------- 1120 * Widget Nav Menu */ 1121 1122 1123(function () { 1124 HTMLElement.prototype.responsiveNav = function () { 1125 this.classList.remove('menu-item-expanded'); 1126 var previousElement = this.previousElementSibling; 1127 if (previousElement && previousElement.classList.contains('submenu-visible')) { 1128 previousElement.classList.remove('submenu-visible'); 1129 (0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.slideUp)(previousElement); 1130 this.parentElement.classList.remove('menu-item-expanded'); 1131 } else { 1132 var parentOfParent = this.parentElement.parentElement; 1133 parentOfParent.querySelectorAll('.menu-item .sub-menu').forEach(function (subMenu) { 1134 subMenu.classList.remove('submenu-visible'); 1135 (0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.slideUp)(subMenu); 1136 }); 1137 parentOfParent.querySelectorAll('.menu-item-expanded').forEach(function (item) { 1138 item.classList.remove('menu-item-expanded'); 1139 }); 1140 if (previousElement) { 1141 previousElement.classList.toggle('submenu-visible'); 1142 (0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.slideToggle)(previousElement); 1143 } 1144 this.parentElement.classList.toggle('menu-item-expanded'); 1145 } 1146 }; 1147 document.addEventListener('DOMContentLoaded', function () { 1148 var menuItems = document.querySelectorAll('.widget_nav_menu .menu-item-has-children'); 1149 menuItems.forEach(function (menuItem) { 1150 var span = document.createElement('span'); 1151 menuItem.appendChild(span); 1152 span.addEventListener('click', function (e) { 1153 e.preventDefault(); 1154 this.responsiveNav(); 1155 }); 1156 var anchor = menuItem.children[0]; 1157 if (anchor && anchor.tagName === 'A' && anchor.getAttribute('href') === '#') { 1158 anchor.addEventListener('click', function (e) { 1159 e.preventDefault(); 1160 this.nextElementSibling.nextElementSibling.responsiveNav(); 1161 }); 1162 } 1163 }); 1164 }); 1165})(); 1166})(); 1167 1168/******/ })() 1169;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.