PageSourceSearch

https://lapalabradelbeni.com.bo/wp-content/themes/theme1/assets/js/scripts.js?13545

js lapalabradelbeni.com.bo collected 2026-10-02 19:48:56 UTC 47,653 bytes, 1,184 lines download raw bytes

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}
480//function 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//}
515//csco_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
786    function safeClassListAction(element, action, classes) {
787        if (element) {
788            element.classList[action](...classes);
789        } else {
790            console.warn('Element not found for action:', action, 'with classes:', classes);
791        }
792    }
793
794    document.addEventListener("sticky-nav-visible", function(event) {
795        safeClassListAction(_this3.headerParams.headerSmart, 'add', ['cs-header-smart-visible']);
796    });
797
798    document.addEventListener("sticky-nav-hide", function(event) {
799        safeClassListAction(_this3.headerParams.headerSmart, 'remove', ['cs-header-smart-visible']);
800    });
801
802    document.addEventListener("nav-stick", function(event) {
803        safeClassListAction(_this3.headerParams.headerSmart, 'add', ['cs-scroll-sticky']);
804    });
805
806    document.addEventListener("nav-unstick", function(event) {
807        safeClassListAction(_this3.headerParams.headerSmart, 'remove', ['cs-scroll-sticky', 'cs-header-smart-visible']);
808    });
809
810    document.addEventListener("adminbar-mobile-scrolled", function(event) {
811        safeClassListAction(document.body, 'add', ['cs-adminbar-mobile-scrolled']);
812    });
813
814    document.addEventListener("adminbar-mobile-no-scrolled", function(event) {
815        safeClassListAction(document.body, 'remove', ['cs-adminbar-mobile-scrolled']);
816    });
817}
818
819  }]);
820  return CscoNavigation;
821}();
822new CscoNavigation();
823})();
824
825// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
826(() => {
827var __webpack_exports__ = {};
828__webpack_require__.r(__webpack_exports__);
829/** ----------------------------------------------------------------------------
830 * Offcanvas */
831
832(function () {
833  var toggles = document.querySelectorAll('.cs-header__offcanvas-toggle, .cs-site-overlay, .cs-offcanvas__toggle');
834  toggles.forEach(function (toggle) {
835    toggle.addEventListener('click', function (e) {
836      e.preventDefault();
837      var body = document.body;
838      if (!body.classList.contains('cs-offcanvas-active')) {
839        body.classList.add('cs-offcanvas-transition');
840      } else {
841        setTimeout(function () {
842          body.classList.remove('cs-offcanvas-transition');
843        }, 400);
844      }
845      body.classList.toggle('cs-offcanvas-active');
846    });
847  });
848})();
849})();
850
851// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
852(() => {
853var __webpack_exports__ = {};
854__webpack_require__.r(__webpack_exports__);
855/** ----------------------------------------------------------------------------
856 * Responsive Embeds */
857
858(function () {
859  /**
860   * Add max-width & max-height to <iframe> elements, depending on their width & height props.
861   */
862  function initResponsiveEmbeds() {
863    var proportion, parentWidth;
864    var iframes = document.querySelectorAll('.entry-content iframe');
865
866    // Loop through iframe elements.
867    iframes.forEach(function (iframe) {
868      // Don't handle if the parent automatically resizes itself.
869      if (iframe.closest('div[data-video-start], div[data-video-end]')) {
870        return;
871      }
872      // Only continue if the iframe has a width & height defined.
873      if (iframe.width && iframe.height) {
874        // Calculate the proportion/ratio based on the width & height.
875        proportion = parseFloat(iframe.width) / parseFloat(iframe.height);
876        // Get the parent element's width.
877        parentWidth = parseFloat(window.getComputedStyle(iframe.parentElement).width);
878        // Set the max-width & height.
879        iframe.style.maxWidth = '100%';
880        iframe.style.maxHeight = Math.round(parentWidth / proportion) + 'px';
881      }
882    });
883  }
884
885  // Document ready.
886  document.addEventListener('DOMContentLoaded', function () {
887    initResponsiveEmbeds();
888  });
889
890  // Post load. This assumes you have an event "post-load" being dispatched on the body element.
891  document.body.addEventListener('post-load', function () {
892    initResponsiveEmbeds();
893  });
894
895  // Window resize.
896  window.addEventListener('resize', function () {
897    initResponsiveEmbeds();
898  });
899
900  // Run on initial load.
901  initResponsiveEmbeds();
902})();
903})();
904
905// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
906(() => {
907var __webpack_exports__ = {};
908__webpack_require__.r(__webpack_exports__);
909/* harmony import */ var _utility_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
910/** ----------------------------------------------------------------------------
911 * Color Scheme Toogle */
912
913
914var cscoDarkMode = {
915  init: function init() {
916    var _this = this;
917    this.initMode();
918    window.matchMedia('(prefers-color-scheme: dark)').addListener(function (e) {
919      _this.initMode();
920    });
921    document.querySelectorAll('.cs-site-scheme-toggle').forEach(function (toggle) {
922      toggle.onclick = function () {
923        if ('dark' === document.body.getAttribute('data-scheme')) {
924          _this.changeScheme('light', true);
925        } else {
926          _this.changeScheme('dark', true);
927        }
928      };
929    });
930  },
931  initMode: function initMode() {
932    var siteScheme = false;
933    switch (csLocalize.siteSchemeMode) {
934      case 'dark':
935        siteScheme = 'dark';
936        break;
937      case 'light':
938        siteScheme = 'light';
939        break;
940      case 'system':
941        siteScheme = 'auto';
942        break;
943    }
944    if (csLocalize.siteSchemeToogle) {
945      if ('light' === (0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.csGetCookie)('_color_schema')) {
946        siteScheme = 'light';
947      }
948      if ('dark' === (0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.csGetCookie)('_color_schema')) {
949        siteScheme = 'dark';
950      }
951    }
952    if (siteScheme && siteScheme !== document.body.getAttribute('data-scheme')) {
953      this.changeScheme(siteScheme, false);
954    }
955  },
956  changeScheme: function changeScheme(siteScheme, cookie) {
957    document.body.classList.add('cs-scheme-toggled');
958    document.body.setAttribute('data-scheme', siteScheme);
959    if (cookie) {
960      (0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.csSetCookie)('_color_schema', siteScheme, {
961        expires: 2592000
962      });
963    }
964    setTimeout(function () {
965      document.body.classList.remove('cs-scheme-toggled');
966    }, 100);
967  }
968};
969cscoDarkMode.init();
970})();
971
972// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
973(() => {
974var __webpack_exports__ = {};
975__webpack_require__.r(__webpack_exports__);
976/** ----------------------------------------------------------------------------
977 * Scroll to top */
978
979(function () {
980  var section = 'cs-scroll-top';
981  var scrollToTopButton = document.querySelector(".".concat(section));
982  if (scrollToTopButton) {
983    var activeClass = 'is-active';
984    var offset = 200;
985    var scrollToTop = function scrollToTop() {
986      window.scrollTo({
987        top: 0,
988        behavior: 'smooth'
989      });
990    };
991    var progressPath = scrollToTopButton.querySelector(".".concat(section, "-progress path"));
992    var pathLength = progressPath.getTotalLength();
993    progressPath.style.transition = progressPath.style.WebkitTransition = '
993none';
994    progressPath.style.strokeDasharray = "".concat(pathLength, " ").concat(pathLength);
995    progressPath.style.strokeDashoffset = pathLength;
996    progressPath.getBoundingClientRect();
997    progressPath.style.transition = progressPath.style.WebkitTransition = 'stroke-dashoffset 10ms linear';
998    var updateProgress = function updateProgress() {
999      var scroll = window.scrollY || window.scrollTop || document.documentElement.scrollTop;
1000      var docHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight);
1001      var windowHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
1002      var height = docHeight - windowHeight;
1003      var progress = pathLength - scroll * pathLength / height;
1004      progressPath.style.strokeDashoffset = progress;
1005    };
1006    updateProgress();
1007    if (scrollToTopButton) {
1008      scrollToTopButton.addEventListener('click', scrollToTop);
1009    }
1010    window.addEventListener('scroll', function () {
1011      updateProgress();
1012      var scrollPos = window.scrollY || window.scrollTop || document.getElementsByTagName('html')[0].scrollTop;
1013      if (scrollPos > offset) {
1014        scrollToTopButton.classList.add(activeClass);
1015      } else {
1016        scrollToTopButton.classList.remove(activeClass);
1017      }
1018    });
1019  }
1020})();
1021})();
1022
1023// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
1024(() => {
1025var __webpack_exports__ = {};
1026__webpack_require__.r(__webpack_exports__);
1027/** ----------------------------------------------------------------------------
1028 * Search Dropdown */
1029
1030(function () {
1031  var toggles = document.querySelectorAll('.cs-header__search-toggle, .cs-search-overlay, .cs-search__close');
1032  toggles.forEach(function (toggle) {
1033    toggle.addEventListener('click', function (e) {
1034      e.preventDefault();
1035      var body = document.body;
1036      var headerElement = document.querySelector('.cs-header');
1037      if (!body.classList.contains('cs-search-active')) {
1038        body.classList.add('cs-search-transition');
1039      } else {
1040        setTimeout(function () {
1041          body.classList.remove('cs-search-transition');
1042        }, 400);
1043      }
1044      body.classList.toggle('cs-search-active');
1045      headerElement.classList.toggle('cs-search-visible');
1046    });
1047  });
1048})();
1049})();
1050
1051// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
1052(() => {
1053var __webpack_exports__ = {};
1054__webpack_require__.r(__webpack_exports__);
1055/** ----------------------------------------------------------------------------
1056 * Sticky Sidebar */
1057
1058(function () {
1059  var stickyElementsSmart = [],
1060    stickyElements = [];
1061  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');
1062  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');
1063  document.addEventListener("DOMContentLoaded", function () {
1064    var headerStick = document.querySelector('.cs-header'),
1065      wpAdminBar = document.querySelector('#wpadminbar'),
1066      headerStickHeight = headerStick ? headerStick.offsetHeight : 0,
1067      wpAdminBarHeight = wpAdminBar ? wpAdminBar.offsetHeight : 0,
1068      headerStretch = document.querySelector('.cs-header-stretch'),
1069      headerStretchHeight = headerStretch ? headerStretch.offsetHeight : 0,
1070      allHeight = headerStickHeight + wpAdminBarHeight + 20,
1071      windowWidth = window.innerWidth;
1072    if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
1073      stickyElementsSmart.push('.cs-sticky-sidebar-enabled.cs-stick-to-bottom .cs-sidebar__inner');
1074      stickyElements.push('.cs-sticky-sidebar-enabled.cs-stick-to-bottom .cs-sidebar__inner');
1075    }
1076    stickyElementsSmart = stickyElementsSmart.join(',');
1077    stickyElements = stickyElements.join(',');
1078    document.addEventListener('sticky-nav-visible', function () {
1079      headerStickHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-height'));
1080      allHeight = (headerStretchHeight || 0) + (wpAdminBarHeight || 0) + 20;
1081      document.querySelectorAll(stickyElementsSmart).forEach(function (el) {
1082        el.style.top = allHeight + 'px';
1083      });
1084    });
1085    document.addEventListener('sticky-nav-hide', function () {
1086      headerStickHeight = 0;
1087      allHeight = (headerStickHeight || 0) + (wpAdminBarHeight || 0) + 20;
1088      document.querySelectorAll(stickyElementsSmart).forEach(function (el) {
1089        el.style.top = allHeight + 'px';
1090      });
1091    });
1092    document.addEventListener('stretch-nav-to-small', function () {
1093      headerStretchHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-height'));
1094      allHeight = (headerStretchHeight || 0) + (wpAdminBarHeight || 0) + 20;
1095      if (headerStretch && headerStretch.classList.contains("cs-scroll-sticky") && !headerStretch.classList.contains("cs-scroll-active")) {
1096        document.querySelectorAll(stickyElementsSmart).forEach(function (el) {
1097          el.style.top = allHeight + 'px';
1098        });
1099      }
1100    });
1101    document.addEventListener('stretch-nav-to-big', function () {
1102      headerStretchHeight = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--cs-header-initial-height'));
1103    });
1104    if (document.body.classList.contains('cs-navbar-smart-enabled') && windowWidth >= 1020) {
1105      allHeight = (headerStretchHeight || 0) + (wpAdminBarHeight || 0) + 20;
1106      document.querySelectorAll(stickyElementsSmart).forEach(function (el) {
1107        el.style.top = allHeight + 'px';
1108      });
1109    } else if (document.body.classList.contains('cs-navbar-sticky-enabled') && windowWidth >= 1020) {
1110      allHeight = (headerStretchHeight || 0) + (wpAdminBarHeight || 0) + 20;
1111      document.querySelectorAll(stickyElements).forEach(function (el) {
1112        el.style.top = allHeight + 'px';
1113      });
1114    }
1115    window.addEventListener('resize', function () {
1116      var windowWidthResize = window.innerWidth;
1117      if (windowWidthResize < 1020) {
1118        document.querySelectorAll(stickyElements).forEach(function (el) {
1119          el.removeAttribute('style');
1120        });
1121        document.querySelectorAll(stickyElementsSmart).forEach(function (el) {
1122          el.removeAttribute('style');
1123        });
1124      }
1125    });
1126  });
1127})();
1128})();
1129
1130// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
1131(() => {
1132__webpack_require__.r(__webpack_exports__);
1133/* harmony import */ var _utility_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
1134/** ----------------------------------------------------------------------------
1135 * Widget Nav Menu */
1136
1137
1138(function () {
1139  HTMLElement.prototype.responsiveNav = function () {
1140    this.classList.remove('menu-item-expanded');
1141    var previousElement = this.previousElementSibling;
1142    if (previousElement && previousElement.classList.contains('submenu-visible')) {
1143      previousElement.classList.remove('submenu-visible');
1144      (0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.slideUp)(previousElement);
1145      this.parentElement.classList.remove('menu-item-expanded');
1146    } else {
1147      var parentOfParent = this.parentElement.parentElement;
1148      parentOfParent.querySelectorAll('.menu-item .sub-menu').forEach(function (subMenu) {
1149        subMenu.classList.remove('submenu-visible');
1150        (0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.slideUp)(subMenu);
1151      });
1152      parentOfParent.querySelectorAll('.menu-item-expanded').forEach(function (item) {
1153        item.classList.remove('menu-item-expanded');
1154      });
1155      if (previousElement) {
1156        previousElement.classList.toggle('submenu-visible');
1157        (0,_utility_js__WEBPACK_IMPORTED_MODULE_0__.slideToggle)(previousElement);
1158      }
1159      this.parentElement.classList.toggle('menu-item-expanded');
1160    }
1161  };
1162  document.addEventListener('DOMContentLoaded', function () {
1163    var menuItems = document.querySelectorAll('.widget_nav_menu .menu-item-has-children');
1164    menuItems.forEach(function (menuItem) {
1165      var span = document.createElement('span');
1166      menuItem.appendChild(span);
1167      span.addEventListener('click', function (e) {
1168        e.preventDefault();
1169        this.responsiveNav();
1170      });
1171      var anchor = menuItem.children[0];
1172      if (anchor && anchor.tagName === 'A' && anchor.getAttribute('href') === '#') {
1173        anchor.addEventListener('click', function (e) {
1174          e.preventDefault();
1175          this.nextElementSibling.nextElementSibling.responsiveNav();
1176        });
1177      }
1178    });
1179  });
1180})();
1181})();
1182
1183/******/ })()
1184;

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.