"use strict"; window.liquidPageLoaded = false; window.liquidIsElementor = window.liquidIsElementor || document.body.classList.contains('elementor-page'); window.liquidElements = $ => { window.$liquidWindow = $(window); window.$liquidHtml = $('html'); window.$liquidBody = $('body'); window.$liquidSiteWrap = $('#wrap'); window.$liquidContents = $('#lqd-site-content'); window.$liquidContentsWrap = $('#lqd-contents-wrap'); window.$liquidMainHeader = $('.main-header'); window.$liquidMainFooter = $('.main-footer'); window.$liquidSectionsWrapper = $liquidContentsWrap; const isPfSinglePage = $liquidBody.hasClass('single-liquid-portfolio'); const isBlogSinglePage = $liquidBody.hasClass('lqd-blog-post'); if (liquidIsElementor) { const $secWrap = $('.elementor-section-wrap', $liquidContentsWrap).first(); window.$liquidSectionsWrapper = $secWrap.legth ? $secWrap : $('> .elementor', $liquidContentsWrap).first(); } if (isPfSinglePage) { window.$liquidSectionsWrapper = $('.pf-single-contents'); const $elementorWrapper = window.$liquidSectionsWrapper.children('.elementor'); if ($elementorWrapper.length) { window.$liquidSectionsWrapper = $elementorWrapper; } } if (isBlogSinglePage) { window.$liquidSectionsWrapper = $('.lqd-single-post-content > .container'); const $elementorWrapper = window.$liquidSectionsWrapper.children('.elementor'); if ($elementorWrapper.length) { window.$liquidSectionsWrapper = $elementorWrapper; } } const elementorSectionsSelector = ` > .elementor-section-wrap > .elementor-section, > .elementor-section, > .e-con, > .e-con > .e-con, > .e-con > .e-con-inner > .e-con, > .e-container, > .e-container > .e-container, > .elementor-section-wrap > .elementor-top-section > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-inner-section, > .elementor-top-section > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-inner-section`; const $elementorFooterSections = $('> .elementor', $liquidMainFooter).find(elementorSectionsSelector); window.$liquidSections = liquidIsElementor ? $liquidSectionsWrapper.find(elementorSectionsSelector).add($elementorFooterSections) : $liquidSectionsWrapper.add($liquidMainFooter).find('.lqd-section, > .vc_row, > .vc_section, > .vc_section > .vc_row, > .lqd-section-scroll-sections > .vc_row, > .vc_element'); if ((isPfSinglePage || isBlogSinglePage) && liquidIsElementor) { window.$liquidSections = window.$liquidSections.add(window.$liquidSectionsWrapper.find('> .elementor').find(elementorSectionsSelector)); } if (isBlogSinglePage && liquidIsElementor) { window.$liquidSections = $(window.$liquidSections.get()).add('.lqd-post-cover'); if ($('.lqd-single-post-content > .container').length) { window.$liquidSections = $(window.$liquidSections.get()).add(window.$liquidContents); } } if (!window.$liquidSections.length) { window.$liquidSections = $liquidSectionsWrapper.find('> section').add(window.$liquidMainFooter?.find('> section')); } window.liquidBodyBg = window.$liquidBody.css('backgroundColor'); window.liquidContentsBg = window.$liquidContents.css('backgroundColor'); window.liquidMainFooterBg = window.$liquidMainFooter.css('backgroundColor'); }; liquidElements(jQuery); window.liquidHeaderIsElementor = $liquidMainHeader.children('.elementor:not(.lqd-mobile-sec)').length; window.liquidLazyloadEnabled = $liquidBody.hasClass('lazyload-enabled'); window.liquidCheckedFonts = []; window.liquidIsMobile = function () { return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 0 || navigator.platform === 'iPad'; }; if (liquidIsMobile()) { document.documentElement.classList.add('vc_mobile'); document.body.setAttribute('data-elementor-device-mode', 'mobile'); } ; window.liquidMobileNavBreakpoint = function () { if (window.liquidParams && window.liquidParams.mobileNavBreakpoint) { return window.liquidParams.mobileNavBreakpoint; } else { return $liquidBody.data('mobile-nav-breakpoint') || 1199; } }; window.liquidWindowWidth = function () { return window.innerWidth; }; window.liquidWindowHeight = function () { return window.innerHeight; }; window.liquidDocHeight = function () { return document.body.clientHeight; }; window.liquidSlugify = function (str) { return String(str).normalize('NFKD').replace(/[\u0300-\u036f]/g, '').trim().toLowerCase().replace(/[^a-z0-9 -]/g, '').replace(/\s+/g, '-').replace(/-+/g, '-'); }; const restArguments = function (func, startIndex) { startIndex = startIndex == null ? func.length - 1 : +startIndex; return function () { var length = Math.max(arguments.length - startIndex, 0), rest = Array(length), index = 0; for (; index < length; index++) { rest[index] = arguments[index + startIndex]; } switch (startIndex) { case 0: return func.call(this, rest); case 1: return func.call(this, arguments[0], rest); case 2: return func.call(this, arguments[0], arguments[1], rest); } var args = Array(startIndex + 1); for (index = 0; index < startIndex; index++) { args[index] = arguments[index]; } args[startIndex] = rest; return func.apply(this, args); }; }; const liquidDelay = restArguments(function (func, wait, args) { return setTimeout(function () { return func.apply(null, args); }, wait); }); const liquidNow = Date.now || function () { return new Date().getTime(); }; window.liquidThrottle = function (func, wait, options) { var timeout, context, args, result; var previous = 0; if (!options) options = {}; var later = function () { previous = options.leading === false ? 0 : liquidNow(); timeout = null; result = func.apply(context, args); if (!timeout) context = args = null; }; var throttled = function () { var now = liquidNow(); if (!previous && options.leading === false) previous = now; var remaining = wait - (now - previous); context = this; args = arguments; if (remaining <= 0 || remaining > wait) { if (timeout) { clearTimeout(timeout); timeout = null; } previous = now; result = func.apply(context, args); if (!timeout) context = args = null; } else if (!timeout && options.trailing !== false) { timeout = setTimeout(later, remaining); } return result; }; throttled.cancel = function () { clearTimeout(timeout); previous = 0; timeout = context = args = null; }; return throttled; }; window.liquidDebounce = function (func, wait, immediate) { var timeout, result; var later = function (context, args) { timeout = null; if (args) result = func.apply(context, args); }; var debounced = restArguments(function (args) { if (timeout) clearTimeout(timeout); if (immediate) { var callNow = !timeout; timeout = setTimeout(later, wait); if (callNow) result = func.apply(this, args); } else { timeout = liquidDelay(later, wait, this, args); } return result; }); debounced.cancel = function () { clearTimeout(timeout); timeout = null; }; return debounced; }; window.liquidGetMousePos = (ev, basedOnElement) => { let posx = 0; let posy = 0; if (!ev) ev = window.event; if (ev.pageX || ev.pageY) { posx = ev.pageX; posy = ev.pageY; } else if (ev.clientX || ev.clientY) { posx = ev.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; posy = ev.clientY + document.body.scrollTop + document.documentElement.scrollTop; } if (basedOnElement) { const rect = ev.currentTarget.getBoundingClientRect(); posx = posx - rect.left - window.scrollX; posy = posy - rect.top - window.scrollY; } return { x: posx, y: posy }; }; class LiquidIO { constructor(el, callback, opts = {}) { this.el = el; this.opts = opts; this.setupIO(callback); } setupIO(callback) { new IntersectionObserver(([entry], observer) => { if (entry.isIntersecting && callback) { if (this.opts.disconnect) { observer.disconnect(); } callback(); } }, { ...this.opts }).observe(this.el); } } class LiquidSectionsDetails { constructor() { this.sections = []; this.footerBg = tinycolor(liquidMainFooterBg).getAlpha() === 0 ? liquidBodyBg : liquidMainFooterBg; } static getInstance() { if (!this.instance) { this.instance = new LiquidSectionsDetails(); } return this.instance; } static getDetails() { const instance = this.getInstance(); return new Promise(async resolve => { if (instance.sections.length < 1) { instance.sections = []; const liquidContentsRect = await instance.getElementRect({ element: $liquidContents[0] }); await Promise.all(instance.init(liquidContentsRect, instance)); const mainContentSections = instance.sections.filter(section => section.isInMainContent); if (mainContentSections.length < 1) { const DOM = { element: $liquidContents[0], $element: $liquidContents }; await instance.createDetailsObj(liquidContentsRect, liquidContentsRect, DOM, true).then(detailsObj => { instance.sections.unshift(detailsObj); }); } instance.addParentSections(instance); instance.addInnerSections(instance); await instance.addLuminosity(instance); } resolve(instance.sections); }); } init(liquidContentsRect, instance) { const promises = []; $liquidSections.each((i, row) => { const promise = new Promise(resolve => { const DOM = { element: row, $element: jQuery(row), parent: row.parentElement }; this.getElementRect(DOM).then(rowRect => { this.createDetailsObj(liquidContentsRect, rowRect, DOM, false).then(detailsObj => { instance.sections[i] = detailsObj; resolve(detailsObj); }); }); }); promises.push(promise); }); return promises; } getElementRect(DOM) { return new Promise(resolve => { new IntersectionObserver(([entry], observer) => { fastdom.measure(() => { observer.disconnect(); resolve(entry.boundingClientRect); }); }).observe(DOM.element); }); } createDetailsObj(liquidContentsRect, rowRect, DOM, isLiquidContentElement) { return new Promise(resolve => { fastdom.measure(async () => { const { scrollY, scrollX } = window; const styles = getComputedStyle(DOM.element); const obj = {}; obj.el = DOM.element; obj.$el = DOM.$element; obj.rect = { initialOffset: { x: rowRect.x + scrollX, y: rowRect.y + scrollY }, width: rowRect.width, height: rowRect.height, x: rowRect.x, y: rowRect.y }; obj.backgroundColor = styles.backgroundColor; if (isLiquidContentElement) { obj.isMainContentElement = true; return resolve(obj); } const footerParent = DOM.element.closest('.main-footer'); const elementorTopContainer = DOM.$element.parents('.e-container, .e-con'); obj.borderColor = styles.borderColor; obj.isOuterSection = liquidIsElementor ? DOM.element.classList.contains('elementor-top-section') || !!!elementorTopContainer.length : DOM.element.classList.contains('vc_section') || DOM.element.parentElement.closest('.lqd-section') == null; obj.isInnerSection = liquidIsElementor ? DOM.element.classList.contains('elementor-inner-section') || !!elementorTopContainer.length : DOM.parent.classList.contains('vc_section') || DOM.element.parentElement.closest('.lqd-section') != null; obj.isInFooter = footerParent != null; obj.isInMainContent = DOM.element.closest('#lqd-site-content') != null; obj.isHidden = obj.rect.width < 1 && obj.rect.height < 1; obj.predefinedLuminosity = null; obj.parentSection = null; obj.innerSections = []; if (obj.el.hasAttribute('data-section-luminosity')) { obj.predefinedLuminosity = obj.el.getAttribute('data-section-luminosity'); } if (obj.isInFooter) { obj.parentFooter = footerParent; if (footerParent.hasAttribute('data-sticky-footer')) { const footerOffsetTop = liquidContentsRect.height; const footerHeight = document.body.offsetHeight - (liquidContentsRect.y + scrollY) - liquidContentsRect.height; const elPositionTop = Math.abs(window.innerHeight - footerHeight - obj.rect.y); obj.rect.initialOffset.y = footerOffsetTop + elPositionTop; obj.rect.y = footerOffsetTop + elPositionTop; } } resolve(obj); }); }); } addParentSections(instance) { const innerSections = instance.sections.filter(sec => sec.isInnerSection); innerSections.forEach(innerSec => { let parentSec = null; if (liquidIsElementor) { parentSec = innerSec.el.closest('.elementor-top-section') || innerSec.$el.parents('.e-container') || innerSec.$el.parents('.e-con'); } else { parentSec = innerSec.el.closest('.vc_section') || innerSec.el.parentElement.closest('.lqd-section'); } instance.sections.forEach(sec => { if (sec.el === parentSec) { innerSec.parentSection = sec; } }); }); } addInnerSections(instance) { const innerSections = instance.sections.filter(sec => sec.isInnerSection); instance.sections.forEach((outerSec, i) => { if (outerSec.isInnerSection) return; innerSections.forEach(innerSec => { if (innerSec.parentSection && innerSec.parentSection.el === outerSec.el) { instance.sections[i].innerSections.push(innerSec); } }); }); } getLuminosity(obj, instance) { let { backgroundColor } = obj; if (obj.isInnerSection && obj.parentSection && tinycolor(backgroundColor).getAlpha() === 0) { backgroundColor = obj.parentSection.backgroundColor; } if (tinycolor(backgroundColor).getAlpha() === 0) { if (obj.isInFooter) { backgroundColor = instance.footerBg; } else { backgroundColor = window.liquidContentsBg; } } return tinycolor(backgroundColor).isDark() ? 'dark' : 'light'; } async addLuminosity(instance) { instance.sections.forEach(async sec => { sec.isBgTransparent = tinycolor(sec.backgroundColor).getAlpha() === 0; sec.luminosity = sec.predefinedLuminosity ? sec.predefinedLuminosity : instance.getLuminosity(sec, instance); await fastdomPromised.mutate(() => { sec.el.setAttribute('data-section-luminosity', sec.luminosity); }); }); } } ; (function ($) { 'use strict'; const pluginName = 'liquidPreloader'; let defaults = { animationType: 'fade', animationTargets: 'self', dir: 'x', stagger: 0, duration: 1400 }; class Plugin { constructor(element, options) { this._defaults = defaults; this._name = pluginName; this.options = $.extend({}, defaults, options); this.element = element; this.$element = $(element); this.animationTargets = this.getAnimationTargets(); this.onPreloaderHiddenEvent = new CustomEvent('lqd-preloader-anim-done'); this.onPageLoad(); } getAnimationTargets() { const { animationTargets } = this.options; if (animationTargets === 'self') { return this.element; } else { return document.querySelectorAll(animationTargets); } } getAnimationProperties() { const { animationType } = this.options; return this[`${animationType}Properties`](); } fadeProperties() { const animateIn = { opacity: [0, 1] }; const animateOut = { opacity: [1, 0] }; return { animateIn, animateOut }; } slideProperties() { const { dir } = this.options; const animateIn = { [dir]: ['100%', '0%'] }; const animateOut = { [dir]: ['0%', '-100%'] }; return { animateIn, animateOut }; } scaleProperties() { const animateIn = { [`scale${this.options.dir.toUpperCase()}`]: [0, 1] }; const animateOut = { [`scale${this.options.dir.toUpperCase()}`]: [1, 0] }; return { animateIn, animateOut }; } onPageLoad() { $liquidBody.addClass('lqd-page-loaded lqd-preloader-animations-started'); $liquidBody.removeClass('lqd-page-leaving lqd-page-not-loaded'); this.hidePreloader(); } hidePreloader() { const stagger = this.options.stagger / 1000; const duration = this.options.duration / 1000; const timeline = gsap.timeline({ duration, ease: 'expo.out', stagger: stagger, onComplete: () => { this.$element.hide(); $liquidBody.removeClass('lqd-preloader-animations-started'); $liquidBody.addClass('lqd-preloader-animations-done'); $(this.animationTargets).css('transform', ''); document.dispatchEvent(this.onPreloaderHiddenEvent); } }); $(this.animationTargets).each((i, targetElement) => { const $targetElement = $(targetElement); if (targetElement.hasAttribute('data-animations')) { const animations = $targetElement.data('animations'); timeline.to(targetElement, { ...animations }, stagger * i); } else { const animationProperties = this.getAnimationProperties().animateOut; timeline.fromTo(targetElement, { [Object.keys(animationProperties)[0]]: Object.values(animationProperties)[0][0] }, { [Object.keys(animationProperties)[0]]: Object.values(animationProperties)[0][1] }, stagger * i); } }); } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = { ...$(this).data('preloader-options'), ...options }; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); $liquidWindow.on('pageshow load', ev => { if ('elementorFrontend' in window && elementorFrontend.isEditMode()) return; liquidPageLoaded || jQuery('.lqd-preloader-wrap').liquidPreloader(); liquidPageLoaded = true; }); (function ($) { 'use strict'; const pluginName = 'liquidSubmenu'; let defaults = { toggleType: "fade", handler: "mouse-in-out", animationSpeed: 200 }; class Plugin { constructor(element, options) { this.element = element; this.$element = $(element); this.options = { ...defaults, ...options }; this._defaults = defaults; this._name = pluginName; this.rects = []; this.isModernMobileNav = document.body.hasAttribute('data-mobile-nav-style') && document.body.getAttribute('data-mobile-nav-style') === 'modern'; this.windowWidth = fastdom.measure(liquidWindowWidth)(); this.itemsAreFullwidth = this.element.classList.contains('lqd-menu-items-block'); this.init(); } init() { const { handler } = this.options; const $submenuParent = $(this.$element.find('.menu-item-has-children, .page_item_has_children').get().reverse()); $submenuParent.each(async (i, subParent) => { const isMegamenu = subParent.classList.contains('megamenu'); const submenu = subParent.querySelector('.nav-item-children, .children'); if (!submenu) return; if (handler === 'click') { this.element.classList.add('lqd-submenu-toggle-click'); } else if (handler === 'mouse-in-out') { this.element.classList.add('lqd-submenu-toggle-hover'); } if ((!liquidIsMobile() || !$(subParent).is(':hidden')) && !this.itemsAreFullwidth) { if (!isMegamenu) { await this.measure(i, submenu, subParent); } else { this.getMegamenuBackgroundLuminance(subParent); } } else { subParent.classList.add('position-applied'); } this.eventHandlers(i, submenu, subParent); }); return this; } async measure(i, submenu, subParent) { await this.getRects(i, submenu, subParent); await this.positioning(i, submenu, subParent); } eventHandlers(i, submenu, submenuParent) { const { handler } = this.options; const $toggleLink = $(submenuParent);//$(submenuParent).children('a'); const $mobileNavExpander = $('.my-expander', $toggleLink); if ($mobileNavExpander.length) { $mobileNavExpander.off(); $mobileNavExpander.on('click', event => { event.preventDefault(); event.stopPropagation(); this.mobileNav.call(this, $(event.currentTarget).closest('li')); }); } if (handler === 'click') { $toggleLink.off(); $toggleLink.on('click', this.handleToggle.bind(this, 'toggle')); $(document).on('click', this.closeActiveSubmenu.bind(this)); $(document).keyup(event => { if (event.keyCode == 27) { this.closeActiveSubmenu(event); } }); } else { $(submenuParent).off(); $(submenuParent).on('mouseenter', this.handleToggle.bind(this, 'show')); $(submenuParent).on('mouseleave', this.handleToggle.bind(this, 'hide')); } document.addEventListener('lqd-header-sticky-change', async () => { await this.measure(i, submenu, submenuParent); }); return this; } handleToggle(state, event) { const { toggleType, handler } = this.options; const $link = $(event.currentTarget); const submenu = $link.is('a') ? $link.siblings('.nav-item-children, .children') : $link.children('.nav-item-children, .children'); const isMegamenu = $link.is('.megamenu') ? true : false; const megamenuBg = isMegamenu && $link.attr('data-bg-color'); const megamenuScheme = isMegamenu && $link.attr('data-megamenu-bg-scheme'); const $elementorHeaderWidgets = liquidIsElementor && $liquidMainHeader.find('> .elementor:not(.lqd-mobile-sec) > .elementor-section-wrap > .elementor-section, > .elementor:not(.lqd-mobile-sec) > .elementor-section').not('.lqd-stickybar-wrap').find('> .elementor-container > .elementor-column > .elementor-widget-wrap > [data-element_type="widget"]'); if (submenu.length) { event.preventDefault(); submenu.closest('li').toggleClass(`is-active ${handler === 'mouse-in-out' && 'is-hovered'}`, state === 'show').siblings().removeClass(`is-active ${handler === 'mouse-in-out' && 'is-hovered'}`); if (toggleType === 'fade' && state === 'show') { this.fadeIn(submenu, isMegamenu, megamenuScheme, megamenuBg, $elementorHeaderWidgets); } else if (toggleType === 'fade' && state === 'hide') { this.fadeOut(submenu, isMegamenu, megamenuScheme, megamenuBg, $elementorHeaderWidgets); } if (toggleType === 'slide' && state === 'show') { this.slideDown(submenu, isMegamenu, megamenuScheme, megamenuBg, $elementorHeaderWidgets); } else if (toggleType === 'slide' && state === 'hide') { this.slideUp(submenu, isMegamenu, megamenuScheme, megamenuBg, $elementorHeaderWidgets); } if (toggleType === 'fade' && state === 'toggle') { this.fadeToggle(submenu, isMegamenu, megamenuScheme, megamenuBg, $elementorHeaderWidgets); } if (toggleType === 'slide' && state === 'toggle') { this.slideToggle(submenu, isMegamenu, megamenuScheme, megamenuBg, $elementorHeaderWidgets); } } } fadeToggle(submenu, isMegamenu, megamenuScheme, megamenuBg, $elementorHeaderWidgets) { if (isMegamenu) { if ($elementorHeaderWidgets && megamenuScheme !== 'transparent' && !$liquidMainHeader.hasClass('is-stuck')) { $elementorHeaderWidgets.removeClass(`lqd-active-row-dark lqd-active-row-light`); $elementorHeaderWidgets.addClass(`lqd-active-row-${megamenuScheme}`); } $liquidMainHeader[0].style.setProperty('--lqd-megamenu-background-color', megamenuBg); $liquidMainHeader.removeClass('megamenu-scheme-dark megamenu-scheme-light megamenu-scheme-transparent'); $liquidMainHeader.toggleClass(`megamenu-item-active megamenu-scheme-${megamenuScheme}`); } } fadeIn(submenu, isMegamenu, megamenuScheme, megamenuBg, $elementorHeaderWidgets) { if (isMegamenu) { if ($elementorHeaderWidgets && megamenuScheme !== 'transparent' && !$liquidMainHeader.hasClass('is-stuck')) { $elementorHeaderWidgets.removeClass(`lqd-active-row-dark lqd-active-row-light`); $elementorHeaderWidgets.addClass(`lqd-active-row-${megamenuScheme}`); } $liquidMainHeader[0].style.setProperty('--lqd-megamenu-background-color', megamenuBg); $liquidMainHeader.removeClass('megamenu-scheme-dark megamenu-scheme-light megamenu-scheme-transparent'); $liquidMainHeader.addClass(`megamenu-item-active megamenu-scheme-${megamenuScheme}`); } if (submenu.find('[data-lqd-flickity]').length) { submenu.find('[data-lqd-flickity]').flickity('resize'); } } fadeOut(submenu, isMegamenu, megamenuScheme, megamenuBg, $elementorHeaderWidgets) { if (isMegamenu) { if ($elementorHeaderWidgets) { $elementorHeaderWidgets.removeClass(`lqd-active-row-dark lqd-active-row-light`); } $liquidMainHeader.removeClass('megamenu-scheme-dark megamenu-scheme-light megamenu-scheme-transparent'); $liquidMainHeader.removeClass('megamenu-item-active'); } } slideToggle(submenu, isMegamenu, megamenuScheme, megamenuBg, $elementorHeaderWidgets) { submenu.closest('li').siblings().find('.nav-item-children, .children').stop().slideUp(this.options.animationSpeed); submenu.stop().slideToggle(this.options.animationSpeed); if (isMegamenu) { if ($elementorHeaderWidgets && megamenuScheme !== 'transparent' && !$liquidMainHeader.hasClass('is-stuck')) { $elementorHeaderWidgets.removeClass(`lqd-active-row-dark lqd-active-row-light`); $elementorHeaderWidgets.addClass(`lqd-active-row-${megamenuScheme}`); } $liquidMainHeader[0].style.setProperty('--lqd-megamenu-background-color', megamenuBg); $liquidMainHeader.removeClass('megamenu-scheme-dark megamenu-scheme-light megamenu-scheme-transparent'); $liquidMainHeader.toggleClass(`megamenu-item-active megamenu-scheme-${megamenuScheme}`); } } slideDown(submenu, isMegamenu, megamenuScheme, megamenuBg, $elementorHeaderWidgets) { submenu.closest('li').siblings().find('.nav-item-children, .children').stop().slideUp(this.options.animationSpeed); submenu.stop().slideDown(this.options.animationSpeed); if (isMegamenu) { if ($elementorHeaderWidgets && megamenuScheme !== 'transparent' && !$liquidMainHeader.hasClass('is-stuck')) { $elementorHeaderWidgets.removeClass(`lqd-active-row-dark lqd-active-row-light`); $elementorHeaderWidgets.addClass(`lqd-active-row-${megamenuScheme}`); } $liquidMainHeader[0].style.setProperty('--lqd-megamenu-background-color', megamenuBg); $liquidMainHeader.removeClass('megamenu-scheme-dark megamenu-scheme-light megamenu-scheme-transparent'); $liquidMainHeader.addClass(`megamenu-item-active megamenu-scheme-${megamenuScheme}`); } } slideUp(submenu, isMegamenu, megamenuScheme, megamenuBg, $elementorHeaderWidgets) { submenu.stop().slideUp(this.options.animationSpeed); if (isMegamenu) { if ($elementorHeaderWidgets) { $elementorHeaderWidgets.removeClass(`lqd-active-row-dark lqd-active-row-light`); } $liquidMainHeader.removeClass('megamenu-scheme-dark megamenu-scheme-light megamenu-scheme-transparent'); $liquidMainHeader.removeClass('megamenu-item-active'); } } getMegamenuBackgroundLuminance(subParent) { const megamenuRowsWrap = subParent.querySelector('.lqd-megamenu-rows-wrap'); let backgroundColor; fastdom.measure(() => { const styles = getComputedStyle(megamenuRowsWrap); backgroundColor = tinycolor(styles.backgroundColor); }); fastdom.mutate(() => { subParent.setAttribute('data-bg-color', backgroundColor); if (backgroundColor.getAlpha() === 0) { return subParent.setAttribute('data-megamenu-bg-scheme', 'transparent'); } if (backgroundColor.isLight()) { return subParent.setAttribute('data-megamenu-bg-scheme', 'light'); } if (backgroundColor.isDark()) { return subParent.setAttribute('data-megamenu-bg-scheme', 'dark'); } }); } closeActiveSubmenu(event) { const { toggleType, animationSpeed } = this.options; if (event.keyCode) { const mainNav = $(this.element); if (toggleType == 'fade') { mainNav.find('.active').removeClass('active').find('.nav-item-children, .children').stop().fadeOut(animationSpeed); } else { mainNav.find('.active').removeClass('active').find('.nav-item-children, .children').stop().slideUp(animationSpeed); } } else { const submenuParent = $(this); if (!submenuParent.is(event.target) && !submenuParent.has(event.target).length) { submenuParent.removeClass('active'); if (toggleType == 'fade') { submenuParent.find('.nav-item-children, .children').stop().fadeOut(animationSpeed); } else { submenuParent.find('.nav-item-children, .children').stop().slideUp(animationSpeed); } } } } mobileNav(submenuParent) { const $submenuParent = $(submenuParent); const $submenu = $submenuParent.children('.nav-item-children, .children'); const $navbarInner = $submenuParent.closest('.navbar-collapse-inner'); const submenuParentWasActive = $submenuParent.hasClass('is-active'); $submenuParent.toggleClass('is-active'); $submenuParent.siblings().removeClass('is-active').find('.nav-item-children, .children').stop().slideUp(200); $submenu.stop().slideToggle(300, () => { if (this.isModernMobileNav && !submenuParentWasActive && $navbarInner.length) { $navbarInner.animate({ scrollTop: $navbarInner.scrollTop() + ($submenuParent.offset().top - $navbarInner.offset().top) }); } }); } async getRects(i, submenu, submenuParent) { this.rects[i] = { submenuRect: {}, subParentRect: {} }; return fastdomPromised.measure(() => { return new Promise(resolve => { new IntersectionObserver(([entry], observer) => { const { boundingClientRect } = entry; observer.disconnect(); resolve(boundingClientRect); }).observe(submenu); }); }).then(submenuRect => { this.rects[i].submenuRect = submenuRect; return new Promise(resolve => { new IntersectionObserver(([entry], observer) => { const { boundingClientRect } = entry; observer.disconnect(); resolve(boundingClientRect); }).observe(submenuParent); }); }).then(subParentRect => { this.rects[i].subParentRect = subParentRect; }); } positioning(i, submenu, submenuParent) { return fastdomPromised.mutate(() => { const submenuRect = this.rects[i].submenuRect; const subParentRect = this.rects[i].subParentRect; if (submenuRect.left + submenuRect.width >= this.windowWidth) { submenu.classList.add('to-left'); } submenuParent.style.setProperty('--item-height', `${subParentRect.height}px`); submenuParent.classList.add('position-applied'); }); } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = { ...$(this).data('submenu-options'), ...options }; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { $('.main-nav, .lqd-custom-menu').liquidSubmenu(); }); (function ($) { 'use strict'; const pluginName = 'liquidMobileNav'; let defaults = {}; class Plugin { constructor(element, options) { this._defaults = defaults; this._name = pluginName; this.options = { ...defaults, ...options }; this.element = element; this.$element = $(element); this.$mobileSec = $('.lqd-mobile-sec', $liquidMainHeader); this.$mobileSecInner = $('.lqd-mobile-sec-inner', this.$mobileSec); this.$mobileNavCollapse = $('.mobile-navbar-collapse', this.$mobileSec); this.$navItems = []; this.init(); } init() { this.removeStyleTags(); this.addHeightVar(); this.mobileModules(); if ('elementorFrontend' in window && !elementorFrontend.isEditMode()) { this.$mobileSec.addClass('elementor'); } } removeStyleTags() { fastdom.mutate(() => { this.$mobileSec.find('.navbar-collapse style[data-type=vc_shortcodes-custom-css]').remove(); }); } addHeightVar() { fastdom.mutate(() => { if (this.$mobileSecInner.length) { document.documentElement.style.setProperty('--lqd-mobile-sec-height', `${this.$mobileSecInner[0].offsetHeight}px`); } }); } mobileModules() { const $mobileModules = $('.lqd-show-on-mobile', this.element); if (!$mobileModules.length) return; const $mobileModulesContainer = $('.lqd-mobile-modules-container', this.$mobileSec); fastdom.mutate(() => { $mobileModulesContainer.removeClass('empty'); $mobileModules.each((i, mobileModule) => { const $module = $(mobileModule); if (!$module.children().length) return false; const $clonedModule = $module.clone(true); const $triggerElement = $('[data-target]', $clonedModule); if ($triggerElement.length) { const target = $triggerElement.attr('data-target'); const $targetEelement = $(target, $clonedModule); $targetEelement.attr({ 'id': `${target.replace('#', '')}-cloned` }); $triggerElement.attr({ 'data-target': `${target}-cloned`, 'aria-controls': `${target.replace('#', '')}-cloned` }); $targetEelement.on('show.bs.collapse', () => { $targetEelement.add($triggerElement).addClass('is-active'); }); $targetEelement.on('hide.bs.collapse', () => { $targetEelement.add($triggerElement).removeClass('is-active'); }); } $clonedModule.appendTo($mobileModulesContainer); if (!$clonedModule.hasClass('header-module')) { $clonedModule.wrap('
'); } }); }); } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = { ...$(this).data('mobilenav-options'), ...options }; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function () { if (document.body.hasAttribute('data-mobile-header-builder')) return; $liquidMainHeader.liquidMobileNav(); }); (function ($) { 'use strict'; const pluginName = 'liquidButton'; let defaults = {}; class Plugin { constructor(element, options) { this.element = element; this.options = $.extend({}, defaults, options); this._defaults = defaults; this._name = pluginName; this.init(); } init() { this.gradientBorderRoundness(); } gradientBorderRoundness() { const self = this; const element = $(self.element); if (element.find('.btn-gradient-border').length && element.hasClass('circle') && element.is(':visible')) { const svgBorder = element.find('.btn-gradient-border').children('rect'); const buttonHeight = element.height(); svgBorder.attr({ rx: buttonHeight / 2, ry: buttonHeight / 2 }); } } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = $(this).data('plugin-options') || options; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { }); (function ($) { 'use strict'; const pluginName = 'liquidFitText'; let defaults = { compressor: 1, minFontSize: Number.NEGATIVE_INFINITY, maxFontSize: Number.POSITIVE_INFINITY }; function Plugin(element, options) { this.element = element; this.options = $.extend({}, defaults, options); this._defaults = defaults; this._name = pluginName; this.init(); } Plugin.prototype = { init() { this.setMinFontSize(); this.setMaxFontSize(); this.resizer(); this.onWindowResize(); }, setMinFontSize() { const minFontSize = this.options.minFontSize; const elementFontSize = $(this.element).css('fontSize'); if (minFontSize == 'currentFontSize') { this.options.minFontSize = elementFontSize; } }, setMaxFontSize() { const maxFontSize = this.options.maxFontSize; const elementFontSize = $(this.element).css('fontSize'); if (maxFontSize == 'currentFontSize') { this.options.maxFontSize = elementFontSize; } }, resizer() { const options = this.options; const compressor = options.compressor; const maxFontSize = options.maxFontSize; const minFontSize = options.minFontSize; const $element = $(this.element); const elementWidth = $element.parent('.ld-fancy-heading').length ? $element.parent().width() : $element.width(); $element.css('font-size', Math.max(Math.min(elementWidth / (compressor * 10), parseFloat(maxFontSize)), parseFloat(minFontSize))); }, onWindowResize() { $(window).on('resize.fittext orientationchange.fittext', this.resizer.bind(this)); } }; $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = $(this).data('fittext-options') || options; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { $('[data-fittext]').liquidFitText(); }); jQuery(document).ready(function ($) { if (liquidLazyloadEnabled) { const globalLazyLoadOffset = liquidParams?.lazyLoadOffset; const threshold = globalLazyLoadOffset >= 0 ? globalLazyLoadOffset : 500; window.liquidLazyload = new LazyLoad({ elements_selector: '.ld-lazyload', threshold, callback_loaded: el => { const $element = $(el); const $masonryParent = $element.closest('[data-liquid-masonry=true]'); const $flexParent = $element.closest('.flex-viewport'); const $webGLHoverParent = $element.closest('[data-webglhover]'); const $revealParent = $element.closest('[data-reveal]'); $element.parent().not('#wrap, #lqd-site-content').addClass('loaded'); $element.closest('[data-responsive-bg=true]').liquidResponsiveBG(); if ($masonryParent.length && $masonryParent.data('isotope')) { $masonryParent.isotope('layout'); } if ($flexParent.length && $flexParent.parent().data('flexslider')) { $flexParent.height($element.height()); } if ($webGLHoverParent.length && !liquidIsMobile()) { $webGLHoverParent.liquidWebGLHover(); } if ($revealParent.length) { $revealParent.liquidReveal(); } } }); } }); (function ($) { 'use strict'; const pluginName = 'liquidInView'; let defaults = { delayTime: 0, onImagesLoaded: false, toggleBehavior: 'stay' }; class Plugin { constructor(element, options) { this._defaults = defaults; this._name = pluginName; this.options = $.extend({}, defaults, options); this.element = element; this.$element = $(element); this.$sentinel = null; this.isVisible = false; this.imagesAlreadyLoaded = false; this.isFixedPos = fastdom.measure(() => this.$element.css('position') === 'fixed')(); this.windowWidth = fastdom.measure(liquidWindowWidth)(); this.windowHeight = fastdom.measure(liquidWindowHeight)(); this.initIO(); } initIO() { const { toggleBehavior } = this.options; new IntersectionObserver(([entry], observer) => { fastdomPromised.measure(() => { return { boundingClientRect: entry.boundingClientRect, scrollY: window.scrollY }; }).then(({ boundingClientRect, scrollY }) => { fastdom.mutate(() => { if (toggleBehavior === 'toggleInView') { if (scrollY + this.windowHeight >= boundingClientRect.top + scrollY) { this.isVisible = true; this.callFns(); } else if (scrollY <= boundingClientRect.bottom + scrollY) { this.isVisible = false; this.callFns(); } } if (entry.isIntersecting && toggleBehavior === 'stay') { observer.disconnect(); this.isVisible = true; this.callFns(); } else if (!entry.isIntersecting && toggleBehavior === 'toggleOutOfView') { this.onOutOfView(); } }); }); }, { threshold: toggleBehavior === 'toggleInView' ? [0, 0.25, 0.5, 0.75, 1] : [0] }).observe(!this.isFixedPos ? this.element : this.$element.parent()[0]); } callFns() { if (!this.options.onImagesLoaded && !this.imagesAlreadyLoaded) { this.run(); } else { imagesLoaded(this.element, () => { this.imagesAlreadyLoaded = true; this.run(); }); } } run() { const { delayTime } = this.options; delayTime <= 0 ? this.onInView() : this.timeoutId = setTimeout(this.onInView.bind(this), delayTime); } onInView() { this.$element.toggleClass('is-in-view', this.isVisible); clearTimeout(this.timeoutId); } onOutOfView() { const { toggleBehavior } = this.options; if (toggleBehavior === 'toggleOutOfView') { this.isVisible = false; } if (!this.isVisible) { this.$element.removeClass('is-in-view'); } } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = $(this).data('inview-options') || options; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { if (!$liquidContents.length) { return $('[data-inview]').liquidInView(); } ; const init = () => { if ($liquidBody.hasClass('lqd-preloader-activated')) { document.addEventListener('lqd-preloader-anim-done', () => { $('[data-inview]').liquidInView(); }); } else { $('[data-inview]').liquidInView(); } }; if (!$liquidContents[0].hasAttribute('data-liquid-stack')) { init(); } else { const stackOptions = $liquidContents.attr('data-stack-options'); if (stackOptions) { const optionsJson = JSON.parse(stackOptions); const { disableOnMobile } = optionsJson; if (disableOnMobile && (liquidIsMobile() || liquidWindowWidth() <= liquidMobileNavBreakpoint())) { init(); } } } }); (function ($) { 'use strict'; const pluginName = 'liquidFullscreenNav'; let defaults = {}; class Plugin { constructor(element, options) { this._defaults = defaults; this._name = pluginName; this.options = { ...defaults, ...options }; this.DOM = {}; this.DOM.element = element; this.DOM.$element = $(element); this.init(); } init() { this.DOM.$element.children('.header-modules-container').find('.lqd-head-col').removeClass('lqd-head-col'); } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = { ...$(this).data('fullscreen-nav-options'), ...options }; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { $('.navbar-fullscreen').liquidFullscreenNav(); }); (function ($) { 'use strict'; const $body = $('body'); const pluginName = 'liquidToggle'; let defaults = { type: 'click', cloneTriggerInTarget: false, closeOnOutsideClick: true, toggleDelay: 300 }; class Plugin { constructor(element, options) { this.element = element; this.$element = $(element); this.options = { ...defaults, ...options }; this._defaults = defaults; this._name = pluginName; this.$targetElement = $(this.$element.attr('data-target') || this.$element.attr('data-bs-target')); this.$parentElement = this.$element.parent(); this.isInVerticalBar = this.$element.closest('.lqd-stickybar-wrap').length; this.isSearchModule = this.$parentElement.hasClass('ld-module-search'); this.isCartModule = this.$parentElement.hasClass('ld-module-cart'); this.$clonedTrigger = null; this.isOpened = false; this.isInHeader = $liquidMainHeader.has(this.element).length; this.windowWidth = fastdom.measure(liquidWindowWidth)(); this.targetRect = {}; if (this.$element.hasClass('lqd-custom-menu-dropdown-btn') && this.$element.parents('.header-module').length) { this.options.type = 'hoverFade'; } this.init(); } async init() { const $targetToPosition = this.$targetElement.not('.navbar-collapse'); if (!this.isInVerticalBar && $targetToPosition.length && !liquidIsMobile()) { $targetToPosition[0].classList.add('positioning'); await this.measure($targetToPosition[0]); await this.positioning($targetToPosition[0]); } this.addBodyClassnames(); this.eventHandlers(); this.cloneTriggerInTarget(); this.cloneTargetInBody(); } measure(targetElement) { return fastdomPromised.measure(() => { return new Promise(resolve => { new IntersectionObserver(([entry], observer) => { observer.disconnect(); resolve(entry.boundingClientRect); }).observe(targetElement); }); }).then(rect => { this.targetRect = rect; }); } positioning(targetElement) { return fastdomPromised.mutate(() => { if (this.targetRect.width + this.targetRect.left >= this.windowWidth) { targetElement.classList.remove('left'); targetElement.classList.add('right'); } if (this.targetRect.left < 0) { targetElement.classList.remove('right'); targetElement.classList.add('left'); } targetElement.classList.remove('positioning'); }); } addBodyClassnames() { if (this.$parentElement[0].hasAttribute('data-module-style')) { $body.addClass(this.$parentElement.attr('data-module-style')); } } eventHandlers() { const { type } = this.options; if (type === 'hover') { this.$element.on('mouseenter', () => { this.$targetElement.collapse('show'); }); this.$element.add(this.$targetElement).on('mouseleave', () => { this.$targetElement.collapse('hide'); }); } else if (type === 'hoverFade' && !liquidIsMobile()) { fastdom.mutate(() => { let timeout = false; this.$targetElement.addClass('lqd-dropdown-fade-onhover'); this.$element.add(this.$targetElement).on('mouseenter', () => { this.$targetElement.addClass('is-active'); this.$targetElement.trigger('shown.bs.collapse'); timeout && clearTimeout(timeout); }); this.$element.add(this.$targetElement).on('mouseleave', () => { timeout = setTimeout(() => { this.$targetElement.removeClass('is-active'); this.$targetElement.trigger('hidden.bs.collapse'); timeout && clearTimeout(timeout); }, this.options.toggleDelay); }); }); } this.$targetElement.on('show.bs.collapse', this.onShow.bind(this)); this.$targetElement.on('shown.bs.collapse', this.onShown.bind(this)); this.$targetElement.on('hide.bs.collapse', this.onHide.bind(this)); this.$targetElement.on('hidden.bs.collapse', this.onHidden.bind(this)); $(document).on('click', event => { this.closeAll.call(this, event); }); $(document).on('keyup', event => { if (event.key === 'Escape') { this.closeAll.call(this, event); } }); if (this.isInHeader) { document.addEventListener('lqd-header-sticky-visibility-change', e => { if (this.isOpened && e.detail.state === 'hide') { this.$targetElement.collapse('hide'); } }); } } onShow(e) { const targetAttr = this.$element.attr('data-target') || this.$element.attr('data-bs-target'); $('html').addClass('module-expanding'); if (this.isSearchModule) { $('html').addClass('lqd-module-search-expanded'); } else if (this.isCartModule) { $('html').addClass('lqd-module-cart-expanded'); } this.$targetElement.add(this.element).add(this.$clonedTrigger).addClass('is-active'); if (targetAttr.replace('#', '') === $(e.target).attr('id')) { this.toggleClassnames(); this.focusOnSearch(); } this.isOpened = true; } onShown() { $('html').removeClass('module-expanding'); if (window.liquidLazyload) { window.liquidLazyload.update(); } } onHide(e) { const targetAttr = this.$element.attr('data-target') || this.$element.attr('data-bs-target'); $('html').addClass('module-collapsing'); this.$targetElement.add(this.element).add(this.$clonedTrigger).removeClass('is-active'); if (targetAttr.replace('#', '') === $(e.target).attr('id')) { this.toggleClassnames(); } this.isOpened = false; } onHidden() { $('html').removeClass('module-collapsing lqd-module-search-expanded lqd-module-cart-expanded'); } toggleClassnames() { $.each(this.options.changeClassnames, (element, classname) => { $(element).toggleClass(classname, !this.isOpened); }); if (!this.options.changeClassnames && this.$targetElement.hasClass('navbar-fullscreen')) { $liquidHtml.toggleClass('overflow-hidden', !this.isOpened); } } focusOnSearch() { const self = this; if (self.$targetElement.find('input[type=search]').length) { setTimeout(function () { self.$targetElement.find('input[type=search]').focus().select(); }, 150); } } shouldIGetClosed($target) { const { closeOnOutsideClick } = this.options; if (typeof closeOnOutsideClick === 'boolean') { return closeOnOutsideClick; } else { const { ifNotIn } = closeOnOutsideClick; const $ifNotInEl = $(ifNotIn); return !$ifNotInEl.has($target).length ? true : false; } } closeAll(event) { const { closeOnOutsideClick } = this.options; const shouldIGetClosed = this.shouldIGetClosed(this.$targetElement); if (event.keyCode) { if (closeOnOutsideClick && shouldIGetClosed) { this.$targetElement.collapse('hide'); } else if (typeof closeOnOutsideClick === 'boolean' && closeOnOutsideClick) { this.$targetElement.collapse('hide'); } } else if (!this.$targetElement.is(event.target) && !this.$targetElement.has(event.target).length) { if (closeOnOutsideClick && shouldIGetClosed) { this.$targetElement.collapse('hide'); } else if (typeof closeOnOutsideClick === 'boolean' && closeOnOutsideClick) { this.$targetElement.collapse('hide'); } } } cloneTriggerInTarget() { if (this.$targetElement.attr('id') === 'lqd-mobile-sec-nav' && $body.attr('data-mobile-nav-style') === 'modern' || this.options.cloneTriggerInTarget || this.$targetElement.hasClass('navbar-fullscreen')) { this.$clonedTrigger = this.$element.clone(true).prependTo(this.$targetElement); } } cloneTargetInBody() { if (this.$targetElement.attr('id') === 'lqd-mobile-sec-nav' && $body.attr('data-mobile-nav-style') === 'modern') { this.$targetElement.children('.main-nav, .header-module').wrapAll(''); } } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = { ...$(this).data('toggle-options'), ...options }; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { $('[data-ld-toggle]').liquidToggle(); }); (function ($) { 'use strict'; const pluginName = 'liquidResponsiveBG'; let defaults = {}; class Plugin { constructor(element, options) { this.element = element; this.$element = $(element); this.options = $.extend({}, defaults, options); this._defaults = defaults; this._name = pluginName; this.targetImage = null; this.targetImage = this.element.querySelector('img'); this.init(); } init() { if (typeof undefined === typeof this.targetImage || null === this.targetImage) { console.error('There should be an image to get the source from it.'); return false; } this.setBgImage(); imagesLoaded(this.targetImage).on('done', this.onLoad.bind(this)); } getCurrentSrc() { let imageSrc = this.targetImage.currentSrc ? this.targetImage.currentSrc : this.targetImage.src; if (/data:image\/svg\+xml/.test(imageSrc)) { imageSrc = this.targetImage.dataset.src; } return imageSrc; } setBgImage() { this.$element.css({ backgroundImage: `url( ${this.getCurrentSrc()} )` }); } reInitparallaxBG() { const parallaxFigure = this.$element.children('.lqd-parallax-container').find('.lqd-parallax-figure'); if (parallaxFigure.length) { parallaxFigure.css({ backgroundImage: `url( ${this.getCurrentSrc()} )` }); } } onLoad() { this.reInitparallaxBG(); this.$element.addClass('loaded'); } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = { ...$(this).data('responsive-options'), ...options }; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { $('[data-responsive-bg=true]').filter((i, el) => { return !el.querySelector('.ld-lazyload'); }).liquidResponsiveBG(); }); (function ($) { 'use strict'; const contentsIsLiquidBg = $liquidContents.length && $liquidContents[0].getAttribute('data-liquid-bg-options'); const contentsInteractWithHeader = contentsIsLiquidBg && (JSON.parse(contentsIsLiquidBg).interactWithHeader === true || JSON.parse(contentsIsLiquidBg).interactWithHeader === 'true'); const pluginName = 'liquidStickyHeader'; let defaults = { stickyTrigger: 'this', dynamicColors: false, disableOnMobile: false, smartSticky: false }; class Plugin { constructor(element, options) { this._defaults = defaults; this._name = pluginName; this.options = { ...defaults, ...options }; this.DOM = { element: element, $element: $(element), $stickySections: null, sentinel: null, placeholder: null, $stickyElements: null }; this.DOM.$stickySections = liquidIsElementor ? $('> .elementor-section-wrap > .elementor-section, > .elementor-section, > .e-container, > .e-con', this.DOM.$element.children('.elementor:not(.lqd-mobile-sec)')).not('.lqd-hide-onstuck, .lqd-stickybar-wrap') : $('.lqd-head-sec-wrap', element).not('.lqd-hide-onstuck'); this.isInTitlebar = this.DOM.element.parentElement.classList.contains('titlebar'); this.isOverlay = this.DOM.element.classList.contains('main-header-overlay'); this.DOM.sentinel = null; this.DOM.placeholder = this.DOM.$element.prev('.lqd-sticky-placeholder')[0]; this.DOM.$stickyElements = this.getStickyElements(); this.firstRow = document.body.classList.contains('single-post') ? document.querySelector('.lqd-post-cover') : $liquidSections.filter(':visible').first()[0]; this.firstRowIsSticky = this.firstRow ? getComputedStyle(this.firstRow).position === 'sticky' : false; this.stickyElsDetails = null; this.stickySectionsHeight = 0; this.smartStickyStuff = { state: null, prevScrollY: 0, scrolledDistance: 0, tolerance: { up: 25, down: 3 }, toleranceExceeded: false }; this.wasStuck = false; this.isStuck = false; this.init(); } async init() { await this.addSentinel(); !this.DOM.placeholder && (await this.addPlaceholder()); await this.getStickySectionsHeight(); await this.getStickyElsDetails(); this.DOM.element.setAttribute('data-sticky-values-measured', 'true'); this.sentinelIO(); this.headerIO(); this.addStickySectionsHeight(); this.initDynamicColors(); this.handleResizeEvents(); this.eventListeners(); } eventListeners() { document.addEventListener('lqd-header-sticky-change', e => { const isStuck = e.detail.stuck; this.updateStickyStates(isStuck); this.isStuck && this.addStickySectionsHeight(); }); if (this.options.smartSticky) { $liquidWindow.on('scroll.lqdSmartStickyHeader', this.handleSmartSticky.bind(this)); } } updateStickyStates(isStuck) { fastdom.mutate(() => { this.wasStuck = this.isStuck; this.isStuck = isStuck; this.DOM.element.classList.toggle('is-stuck', this.isStuck); this.DOM.element.classList.toggle('is-not-stuck', !this.isStuck); if (!this.isOverlay || this.isInTitlebar) { this.DOM.placeholder.classList.toggle('d-none', !this.isStuck); this.DOM.placeholder.classList.toggle('hidden', !this.isStuck); } ; if (this.options.smartSticky) { if (!this.isStuck) { this.smartStickyStuff.state = null; this.DOM.element.classList.remove('lqd-smart-sticky-show', 'lqd-smart-sticky-hide', 'lqd-just-stuck'); } else { this.DOM.element.classList.add('lqd-smart-sticky-hide'); if (!this.wasStuck) { this.DOM.element.classList.add('lqd-just-stuck'); } } } }); } async getStickySectionsHeight() { const promises = []; this.DOM.$stickySections.each((i, el) => { const promise = new Promise(resolve => { fastdom.measure(() => { new IntersectionObserver(([entry], observer) => { observer.disconnect(); resolve(entry.boundingClientRect); }).observe(el); }); }); promises.push(promise); }); const rects = await Promise.all(promises); rects.forEach(rect => this.stickySectionsHeight += rect.height); } addStickySectionsHeight() { const applyCssTo = liquidIsElementor ? document.body : document.documentElement; fastdomPromised.mutate(() => { applyCssTo.style.setProperty('--lqd-sticky-header-height', `${this.stickySectionsHeight}px`); }); } addPlaceholder() { return fastdomPromised.mutate(() => { const placeholder = document.createElement('div'); placeholder.setAttribute('class', 'lqd-sticky-placeholder d-none'); this.DOM.placeholder = placeholder; this.DOM.element.before(placeholder); }); } addSentinel() { return fastdomPromised.mutate(() => { const sentinelTemplate = document.querySelector('#lqd-temp-sticky-header-sentinel'); const sentinel = sentinelTemplate.content.firstElementChild.cloneNode(true); const { stickyTrigger } = this.options; let trigger = document.body; if (stickyTrigger === 'first-section') { const titlebar = document.querySelector('.titlebar'); if (titlebar) { trigger = titlebar; } else if (this.firstRow && !this.firstRow.closest('.main-footer')) { if (!this.firstRowIsSticky) { trigger = this.firstRow; } } else { this.options.stickyTrigger = 'this'; } } trigger.appendChild(sentinel); this.DOM.sentinel = sentinel; }); } sentinelIO() { new IntersectionObserver(([entry]) => { fastdom.measure(() => { let targetInfo = entry.boundingClientRect; let rootBoundsInfo = entry.rootBounds; if (!rootBoundsInfo) { rootBoundsInfo = { top: 0, bottom: window.innerHeight }; } if (!this.isStuck && rootBoundsInfo && targetInfo.bottom < rootBoundsInfo.top) { this.fireEvent('stickyChange', true); } else if (this.isStuck && rootBoundsInfo && targetInfo.bottom >= rootBoundsInfo.top && targetInfo.bottom < rootBoundsInfo.bottom) { this.fireEvent('stickyChange', false); } }); }).observe(this.DOM.sentinel); } headerIO() { const { stickyTrigger } = this.options; const applyCssTo = liquidIsElementor ? document.body : document.documentElement; fastdomPromised.measure(() => { const targetInfo = { height: this.DOM.element.offsetHeight }; return targetInfo; }).then(({ height }) => { fastdom.mutate(() => { applyCssTo.style.setProperty('--lqd-sticky-header-placeholder-height', `${height}px`); if (stickyTrigger === 'this') { applyCssTo.style.setProperty('--lqd-sticky-header-sentinel-top', `var(--lqd-sticky-header-placeholder-height)`); } else { if (this.firstRowIsSticky) { applyCssTo.style.setProperty('--lqd-sticky-header-sentinel-top', `${$(this.firstRow).outerHeight()}px`); } } }); }); } stickyVisibilityChange(state) { let classnamesToRemove = ['lqd-smart-sticky-hide', 'lqd-just-stuck']; let classnamesToAdd = ['lqd-smart-sticky-show']; if (state === 'hide') { classnamesToRemove = ['lqd-smart-sticky-show']; classnamesToAdd = ['lqd-smart-sticky-hide']; } this.smartStickyStuff.state = state; this.DOM.element.classList.remove(...classnamesToRemove); this.DOM.element.classList.add(...classnamesToAdd); this.fireEvent('stickyVisibility', state); } handleSmartSticky() { fastdomPromised.measure(() => { const { scrollY } = window; const scrollDirection = scrollY > this.smartStickyStuff.prevScrollY ? 'down' : 'up'; return { scrollY, scrollDirection }; }).then(({ scrollY, scrollDirection }) => { this.smartStickyStuff.scrolledDistance = Math.abs(scrollY - this.smartStickyStuff.prevScrollY); fastdom.mutate(() => { if (this.isStuck && this.smartStickyStuff.toleranceExceeded) { if (scrollDirection === 'up' && this.smartStickyStuff.state !== 'show') { this.stickyVisibilityChange('show'); } else if (scrollDirection === 'down' && this.smartStickyStuff.state !== 'hide') { this.stickyVisibilityChange('hide'); } } this.smartStickyStuff.prevScrollY = scrollY; this.smartStickyStuff.toleranceExceeded = this.smartStickyStuff.scrolledDistance > this.smartStickyStuff.tolerance[scrollDirection]; }); }); } fireEvent(type = 'stickyChange', state) { fastdom.mutate(() => { if (type === 'stickyChange') { document.dispatchEvent(new CustomEvent('lqd-header-sticky-change', { bubbles: false, detail: { stuck: state, target: this.DOM.element } })); } if (type === 'stickyVisibility') { document.dispatchEvent(new CustomEvent('lqd-header-sticky-visibility-change', { bubbles: false, detail: { state, target: this.DOM.element } })); } }); } getStickyElements() { const $stickyModules = liquidIsElementor ? this.DOM.$element.find('> .elementor:not(.lqd-mobile-sec)').find('[data-element_type="widget"]').filter((i, el) => { return !el.classList.contains('elementor-widget-ld_modal_window') && !el.closest('.ld-module-sd') && !el.closest('.navbar-fullscreen') && !el.closest('.lqd-modal'); }) : this.DOM.$element.find('.lqd-head-sec-wrap, .lqd-stickybar-wrap').find('.lqd-head-col > .header-module, [data-lqd-interactive-color=true]'); const $elements = this.DOM.element.hasAttribute('data-liquid-bg') ? $stickyModules.add(this.DOM.$element).not('.navbar-brand-solid') : $stickyModules.add(this.DOM.$element); return $elements; } async getStickyElsDetails() { const promises = []; const windowWidth = liquidWindowWidth(); this.DOM.$stickyElements.each((i, stickyEl) => { const promise = new Promise(resolve => { new IntersectionObserver(([entry], observer) => { fastdom.measure(() => { observer.disconnect(); let { boundingClientRect } = entry; let obj = {}; obj.el = entry.target; obj.moduleEl = stickyEl; let { x, y, width, height } = boundingClientRect; if (x < 0) { x = 0; } else if (x >= windowWidth) { x = windowWidth - width - entry.target.parentElement.offsetWidth; } if (y < 0) { y = y + window.scrollY; } obj.rect = { width, height, x, y }; obj.currentColor = 'default'; resolve(obj); }); }).observe(stickyEl === this.DOM.element ? this.DOM.element : stickyEl); }); promises.push(promise); }); const stickyElDetailsArray = await Promise.all(promises); this.stickyElsDetails = stickyElDetailsArray; } getSections(visibleSections) { let sections = []; visibleSections.forEach(sec => { let section = sec; if (sec.isInnerSection) { section = sec.parentSection; if (!section) return; const sectionBgcolor = sec.backgroundColor.replace(/, /g, ',').split(' ')[0]; const parentBgColor = section.backgroundColor.replace(/, /g, ',').split(' ')[0]; const sectionBgAlpha = tinycolor(sectionBgcolor).getAlpha(); const parentBgAlpha = tinycolor(parentBgColor).getAlpha(); if ((sectionBgAlpha !== 0 || sec.predefinedLuminosity) && parentBgAlpha === 0) { section = sec; sections = sections.filter(sect => sect.el !== section.parentSection.el); } } const sectionExists = sections.some(sect => sect.el === section.el); !sectionExists && sections.push(section); }); return sections; } initDynamicColors() { if (!this.options.dynamicColors || contentsInteractWithHeader) return; LiquidSectionsDetails.getDetails().then(lqdSections => { const visibleSections = lqdSections.filter(sec => !sec.isHidden); const sections = this.getSections(visibleSections); const onscroll = liquidThrottle(this.onScroll.bind(this, sections), 150, { leading: true }); this.onScroll(sections); $liquidWindow.off('scroll.lqdStickyHeader'); $liquidWindow.on('scroll.lqdStickyHeader', onscroll); }); } onScroll(sections) { for (let sectionsItterator = 0; sectionsItterator < sections.length; sectionsItterator++) { fastdomPromised.measure(() => { const sec = sections[sectionsItterator]; const rect = { ...sec.rect }; rect.y = rect.initialOffset.y - window.scrollY; rect.x = rect.initialOffset.x - window.scrollX; for (let stickyItterator = 0; stickyItterator < this.stickyElsDetails.length; stickyItterator++) { if (this.isCollide(this.stickyElsDetails[stickyItterator].rect, rect)) { this.changeAttrs(sec, this.stickyElsDetails[stickyItterator]); } } }); } } changeAttrs(rowObj, moduleObj) { const { luminosity } = rowObj; const { moduleEl } = moduleObj; fastdom.mutate(() => { if (luminosity === 'light' && moduleObj.currentColor !== 'dark') { moduleObj.currentColor = 'dark'; moduleEl.classList.add('lqd-active-row-light'); moduleEl.classList.remove('lqd-active-row-dark'); } else if (luminosity === 'dark' && moduleObj.currentColor !== 'light') { moduleObj.currentColor = 'light'; moduleEl.classList.add('lqd-active-row-dark'); moduleEl.classList.remove('lqd-active-row-light'); } }); } isCollide(a, b) { return !(a.y + a.height < b.y || a.y > b.y + b.height || a.x + a.width < b.x || a.x + a.width / 2 > b.x + b.width); } handleResizeEvents() { $liquidWindow.on('resize', this.onResize.bind(this)); $(document).on('lqd-masonry-layout-init', this.onResize.bind(this)); } onResize() { this.headerIO(); this.initDynamicColors(); } drawIndicators(sec) { const $indicator = $(`
${sec.luminosity}
`); $indicator.appendTo($liquidBody); } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = { ...$(this).data('sticky-options'), ...options }; if (pluginOptions.disableOnMobile && liquidIsMobile()) return; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { const $stickyHeader = $('[data-sticky-header]'); if ($liquidContents.length) { const pageStackEnabled = $liquidContents[0].hasAttribute('data-liquid-stack'); const pageStackDisabledOnMobile = pageStackEnabled && $liquidContents[0].hasAttribute('data-stack-options') && JSON.parse($liquidContents[0].getAttribute('data-stack-options')).disableOnMobile === true; if (!$liquidBody.hasClass('header-style-side') && (!pageStackEnabled || pageStackEnabled && liquidIsMobile() && pageStackDisabledOnMobile)) { $stickyHeader.liquidStickyHeader(); } else if (pageStackEnabled) { $stickyHeader.attr('data-sticky-values-measured', 'true'); } } }); (function ($) { 'use strict'; const pluginName = 'liquidStickyFooter'; let defaults = { shadow: 0, parallax: false }; class Plugin { constructor(element, options) { this._defaults = defaults; this._name = pluginName; this.options = { ...defaults, ...options }; this.element = element; this.$element = $(element); this.footerHeight = 0; this.windowWidth = fastdom.measure(() => window.innerWidth)(); this.windowHeight = fastdom.measure(() => window.innerHeight)(); this.init(); } measure() { return fastdomPromised.measure(() => { if (this.windowWidth < 768) { this.footerHeight = 0; } else { this.footerHeight = this.element.offsetHeight - 2; this.windowWidth = window.innerWidth; this.windowHeight = window.innerHeight; } }); } init() { imagesLoaded(this.element, async () => { await this.measure(); this.addMargin(); this._addShadow(); this._handleResize(); }); } addMargin() { fastdomPromised.mutate(() => { if (this.footerHeight >= this.windowHeight) { return this.$element.addClass('lqd-footer-cant-stick'); } }); } _addShadow() { const { shadow } = this.options; if (shadow > 0) { document.body.classList.add(`lqd-sticky-footer-shadow-${shadow}`); } } _handleResize() { const onResize = liquidDebounce(this._onResize.bind(this), 400); $liquidWindow.on('resize', onResize); } async _onResize() { await this.measure(); this.addMargin(); } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = { ...$(this).data('sticky-footer-options'), ...options }; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { if (liquidIsMobile()) return; $('[data-sticky-footer=true]').liquidStickyFooter(); }); (function ($) { 'use strict'; const pluginName = 'liquidCustomCursor'; let defaults = { outerCursorSpeed: 0.2, outerCursorHide: false }; class Plugin { constructor(element, options) { this._defaults = defaults; this._name = pluginName; this.options = { ...defaults, ...options }; this.clientX = -100; this.clientY = -100; this.magneticCords = { x: 0, y: 0 }; this.element = element; this.$element = $(element); this.initiated = false; this.innerCursor = document.querySelector(".lqd-cc--inner"); this.outerCursor = document.querySelector(".lqd-cc--outer"); this.dragCursor = document.querySelector(".lqd-cc-drag"); this.exploreCursor = document.querySelector(".lqd-cc-explore"); this.arrowCursor = document.querySelector(".lqd-cc-arrow"); this.iconCursor = document.querySelector(".lqd-cc-custom-icon"); this.cursorEls = document.querySelectorAll(".lqd-cc--el"); this.extraCursors = document.querySelectorAll(".lqd-extra-cursor"); this.lastMovedOtherEl = null; this.lastMovedOtherInnerEl = null; this.scaleOuterCursor = null; this.scaleOuterCursorX = null; this.scaleOuterCursorY = null; this.activeEl = null; const cssVarEl = liquidIsElementor ? document.body : document.documentElement; const outerSize = window.liquidParams?.ccOuterSize || getComputedStyle(cssVarEl).getPropertyValue('--lqd-cc-size-outer'); this.outerCursorSize = parseInt(outerSize || 0, 10); this.activeCircleBg = window.liquidParams?.ccActiveCircleBg || getComputedStyle(document.body).getPropertyValue('--lqd-cc-active-bg'); this.activeCircleBc = window.liquidParams?.ccActiveCircleBc || getComputedStyle(document.body).getPropertyValue('--lqd-cc-active-bc'); this.innerQuickSetX = gsap.quickSetter(this.innerCursor, 'x', 'px'); this.innerQuickSetY = gsap.quickSetter(this.innerCursor, 'y', 'px'); this.outerQuickToX = gsap.quickTo(this.outerCursor, 'x', { duration: this.options.outerCursorSpeed }); this.outerQuickToY = gsap.quickTo(this.outerCursor, 'y', { duration: this.options.outerCursorSpeed }); this.extrasQuickToX = gsap.quickTo([...this.cursorEls, ...this.extraCursors], 'x', { duration: 0.1 }); this.extrasQuickToY = gsap.quickTo([...this.cursorEls, ...this.extraCursors], 'y', { duration: 0.1 }); this.init(); } init() { if (this.options.outerCursorHide) { $liquidBody.addClass('lqd-cc-outer-hidden'); } this.initCursor(); this.initHovers(); document.body.classList.add('lqd-cc-init'); } initCursor() { const pos = { x: window.innerWidth / 2, y: window.innerHeight / 2 }; document.addEventListener("mousemove", e => { this.clientX = e.clientX; this.clientY = e.clientY; }); gsap.ticker.add(() => { if (!this.initiated) { this.initiated = true; this.fadeOutInnerCursor = false; this.fadeOutInnerCursor = false; } const dt = 1.0 - Math.pow(1.0 - 0.4, gsap.ticker.deltaRatio()); pos.x += (this.clientX - pos.x) * dt; pos.y += (this.clientY - pos.y) * dt; this.innerQuickSetX(pos.x); this.innerQuickSetY(pos.y); this.extrasQuickToX(this.clientX); this.extrasQuickToY(this.clientY); if (!this.isStuck && !this.isMagnetic) { this.outerQuickToX(this.clientX - this.outerCursorSize / 2); this.outerQuickToY(this.clientY - this.outerCursorSize / 2); } if (this.isStuck && this.activeEl) { const rect = this.activeEl.getBoundingClientRect(); let { left, top, width, height } = rect; left += width / 2 - this.outerCursorSize / 2; top += height / 2 - this.outerCursorSize / 2; this.outerQuickToX(left); this.outerQuickToY(top); } if (this.isMagnetic) { this.outerQuickToX(this.magneticCords.x); this.outerQuickToY(this.magneticCords.y); } if (this.scaleOuterCursor) { gsap.to(this.outerCursor, { scaleX: () => this.scaleOuterCursorX || 1, scaleY: () => this.scaleOuterCursorY || 1 }); } if (this.fadeOutInnerCursor) { gsap.to(this.innerCursor, { opacity: 0 }); } else { gsap.to(this.innerCursor, { opacity: 1 }); } if (this.fadeOutOuterCursor) { gsap.to(this.outerCursor, { opacity: 0 }); } else { gsap.to(this.outerCursor, { opacity: 1 }); } }); } initHovers() { document.addEventListener('lqd-carousel-initialized', e => { const { carouselData } = e.detail; const flkty = carouselData.flickityData; if (flkty.nextButton) { this.initCarouselNavCursor([flkty.nextButton.element, flkty.prevButton.element]); } ; if (!flkty.options.draggable) return; flkty.on('dragMove', e => { this.clientX = e.clientX; this.clientY = e.clientY; }); flkty.on('pointerDown', () => { this.cursorEls.forEach(el => el.classList.add('lqd-carousel-pointer-down')); }); flkty.on('pointerUp', () => { this.cursorEls.forEach(el => el.classList.remove('lqd-carousel-pointer-down')); }); this.initSolidCircles(flkty.viewport, this.dragCursor); }); this.initPageLinksCursor(); this.initExtraCursor(); this.initSolidCircles('.lqd-cc-label-trigger', this.exploreCursor); this.initArrowCursor('.lqd-dist-gal-menu a, .lqd-imgtxt-slider-link, .lqd-af-slide__link ~ a'); this.initCustomIconCursor('.lqd-cc-icon-trigger', 'lqd-cc__active-icon'); this.initButtonShapeCursors(); this.initNavTriggerCursor(); this.initMenuItemsCursor(); } initPageLinksCursor() { const linksMouseEnter = () => { gsap.to(this.innerCursor, { scale: 2.25, backgroundColor: this.activeCircleBg, ease: 'power2.out' }); gsap.to(this.outerCursor, { scale: 1.2, borderColor: this.activeCircleBc, ease: 'power2.out' }); }; const linksMouseLeave = () => { gsap.to(this.innerCursor, { scale: 1, backgroundColor: '', ease: 'power2.out' }); gsap.to(this.outerCursor, { scale: 1, borderColor: '', ease: 'power2.out' }); }; const pageLinks = [...document.querySelectorAll("a")].filter(el => { return !el.classList.contains('lqd-cc-icon-trigger') && !el.classList.contains('lqd-cc-label-trigger') && !el.classList.contains('lqd-imgtxt-slider-link') && !el.closest('.carousel-items') && !el.closest('.lqd-slsh-alt') && !el.closest('.lqd-dist-gal-menu') && !$(el).siblings('.lqd-af-slide__link').length; }); pageLinks.forEach(item => { item.addEventListener("mouseenter", linksMouseEnter); item.addEventListener("mouseleave", linksMouseLeave); }); } initCarouselNavCursor(navElementsArray) { const carouselNavEnter = (navEl, navElStyle) => { this.activeEl = navEl; this.isStuck = true; this.scaleOuterCursor = true; this.fadeOutInnerCursor = true; gsap.to(this.outerCursor, { borderColor: navElStyle.borderColor, borderRadius: navElStyle.borderRadius }); this.moveOtherElements(navEl, [...navEl.querySelectorAll('i'), ...navEl.querySelectorAll('svg')], true); }; const carouselNavLeave = () => { this.activeEl = null; this.isStuck = false; this.fadeOutInnerCursor = false; gsap.to(this.outerCursor, { borderColor: '', borderRadius: '' }); this.moveOtherElements(); }; navElementsArray.forEach(item => { fastdomPromised.measure(() => { const navElStyle = getComputedStyle(item); return { navElStyle }; }).then(({ navElStyle }) => { item.addEventListener("mouseenter", carouselNavEnter.bind(this, item, navElStyle)); item.addEventListener("mouseleave", carouselNavLeave.bind(this)); item.addEventListener('click', e => { const timeout = setTimeout(() => { if (item.disabled) { carouselNavLeave(); } clearTimeout(timeout); }, 10); }); }); }); } initExtraCursor() { const extraCursorEnter = extraCursor => { this.fadeOutInnerCursor = true; this.fadeOutOuterCursor = true; extraCursor.classList.add('lqd-is-active'); gsap.to(extraCursor, { scale: 1, opacity: 1, duration: 0.65, ease: 'expo.out' }); }; const extraCursorLeave = extraCursor => { this.fadeOutInnerCursor = false; this.fadeOutOuterCursor = false; extraCursor.classList.remove('lqd-is-active'); gsap.to(extraCursor, { scale: 0.15, opacity: 0, duration: 0.65, ease: 'expo.out' }); }; this.extraCursors.forEach(item => { const itemParent = item.parentElement; itemParent.addEventListener("mousemove", extraCursorEnter.bind(this, item)); itemParent.addEventListener("mouseleave", extraCursorLeave.bind(this, item)); }); } initSolidCircles(selectors, elementSetActiveClassname) { if (!selectors) return; const solidCircleEnter = () => { this.fadeOutInnerCursor = true; this.fadeOutOuterCursor = true; elementSetActiveClassname.classList.add('lqd-is-active'); }; const solidCircleLeavve = () => { this.fadeOutInnerCursor = false; this.fadeOutOuterCursor = false; elementSetActiveClassname.classList.remove('lqd-is-active'); }; const init = item => { item.addEventListener("mouseenter", solidCircleEnter); item.addEventListener("mouseleave", solidCircleLeavve); }; if (typeof selectors === 'string') { document.querySelectorAll(selectors).forEach(item => init(item)); } else { init(selectors); } } initArrowCursor(selectors) { const onEnter = () => { this.fadeOutInnerCursor = true; this.fadeOutOuterCursor = true; this.arrowCursor.classList.add('lqd-is-active'); }; const onLeave = () => { this.fadeOutInnerCursor = false; this.fadeOutOuterCursor = false; this.arrowCursor.classList.remove('lqd-is-active'); }; const init = item => { item.addEventListener("mouseenter", onEnter); item.addEventListener("mouseleave", onLeave); }; if (typeof selectors === 'string') { document.querySelectorAll(selectors).forEach(item => init(item)); } else { init(selectors); } } initCustomIconCursor(selectors) { const onEnter = color => { this.fadeOutInnerCursor = true; this.fadeOutOuterCursor = true; color && this.iconCursor.style.setProperty('--cc-icon-color', color); this.iconCursor.classList.add('lqd-is-active'); }; const onLeave = () => { this.fadeOutInnerCursor = false; this.fadeOutOuterCursor = false; this.iconCursor.style.removeProperty('--cc-icon-color'); this.iconCursor.classList.remove('lqd-is-active'); }; document.querySelectorAll(selectors).forEach(item => { const color = item.getAttribute('data-cc-icon-color'); item.addEventListener("mouseenter", onEnter.bind(this, color)); item.addEventListener("mouseleave", onLeave); }); } initButtonShapeCursors() { const buttonShapeEnter = (icon, iconStyles) => { this.isMagnetic = true; this.scaleOuterCursor = true; this.fadeOutInnerCursor = true; gsap.to(this.outerCursor, { borderColor: iconStyles.borderColor, borderRadius: iconStyles.borderRadius }); this.moveOtherElements(icon, [...icon.querySelectorAll('i'), ...icon.querySelectorAll('svg')]); }; const buttonShapeLeave = () => { this.isMagnetic = false; this.fadeOutInnerCursor = false; gsap.to(this.outerCursor, { borderColor: '', borderRadius: '' }); this.moveOtherElements(); }; const buttonWithIcon = document.querySelectorAll('.btn-icon-bordered, .btn-icon-solid'); buttonWithIcon.forEach(btn => { const icon = btn.querySelector('.btn-icon'); if (!icon) return; fastdomPromised.measure(() => { const iconStyles = getComputedStyle(icon); return { iconStyles }; }).then(({ iconStyles }) => { btn.addEventListener("mouseenter", buttonShapeEnter.bind(this, icon, iconStyles)); btn.addEventListener("mouseleave", buttonShapeLeave.bind(this)); }); }); } initNavTriggerCursor() { const navTriggerEnter = (outerEl, innerEl, scaleOuterCursor) => { this.isMagnetic = true; scaleOuterCursor && (this.scaleOuterCursor = true); this.fadeOutInnerCursor = true; this.fadeOutOuterCursor = true; this.moveOtherElements(outerEl, innerEl); }; const navTriggerLeave = () => { this.isMagnetic = false; this.fadeOutInnerCursor = false; this.fadeOutOuterCursor = false; this.moveOtherElements(); }; const navTriggers = document.querySelectorAll('.nav-trigger'); const moduleTriggers = document.querySelectorAll('.ld-module-trigger'); navTriggers.forEach(navTrigger => { const $navTrigger = $(navTrigger); const bars = navTrigger.querySelector('.bars'); const barsInner = navTrigger.querySelector('.bars-inner'); const toggleData = $navTrigger.data('plugin_liquidToggle'); if (toggleData && toggleData.options.type !== 'hover') { navTrigger.addEventListener("mouseenter", navTriggerEnter.bind(this, bars, barsInner, true)); navTrigger.addEventListener("mouseleave", navTriggerLeave); } }); moduleTriggers.forEach(moduleTrigger => { const $moduleTrigger = $(moduleTrigger); const txt = moduleTrigger.querySelector('.ld-module-trigger-txt'); const icon = moduleTrigger.querySelector('.ld-module-trigger-icon'); const toggleData = $moduleTrigger.data('plugin_liquidToggle'); if (toggleData && toggleData.options.type !== 'hover') { moduleTrigger.addEventListener("mouseenter", () => { const scaleOuterCursor = !moduleTrigger.classList.contains('lqd-module-icon-plain') && !moduleTrigger.parentElement.classList.contains('ld-dropdown-menu'); navTriggerEnter(moduleTrigger, txt, scaleOuterCursor); navTriggerEnter(moduleTrigger, icon, scaleOuterCursor); }); moduleTrigger.addEventListener("mouseleave", navTriggerLeave); } }); } initMenuItemsCursor() { const menuItemEnter = menuItem => { this.moveOtherElements(menuItem); }; const menuItemLeave = () => { this.moveOtherElements(); }; const magneticMenuItems = document.querySelectorAll('.lqd-magnetic-items'); magneticMenuItems.forEach(el => { const ul = el.querySelector('ul'); const menuItems = ul.querySelectorAll(':scope > li > a'); menuItems.forEach(menuItem => { menuItem.addEventListener("mouseenter", menuItemEnter.bind(this, menuItem)); menuItem.addEventListener("mouseleave", menuItemLeave.bind(this)); }); }); } moveOtherElements(movingEl, innerMovingEl, onlyMoveInnerEl) { let movingElRect = null; if (!movingEl) { this.lastMovedOtherEl && gsap.to(this.lastMovedOtherEl, { duration: 0.4, x: 0, y: 0, clearProps: 'all' }); this.lastMovedOtherInnerEl && gsap.to(this.lastMovedOtherInnerEl, { duration: 0.35, x: 0, y: 0, clearProps: 'all' }); this.scaleOuterCursor = null; this.scaleOuterCursorX = null; this.scaleOuterCursorY = null; $liquidWindow.off('mousemove.lqdCCMoveOthers'); return; } ; this.lastMovedOtherEl = movingEl; this.lastMovedOtherInnerEl = innerMovingEl; $liquidWindow.on('mousemove.lqdCCMoveOthers', e => { !movingElRect && (movingElRect = movingEl.getBoundingClientRect()); const dist = { x: movingElRect.left + movingElRect.width / 2 - this.clientX, y: movingElRect.top + movingElRect.height / 2 - this.clientY }; const angle = Math.atan2(dist.x, dist.y); const hypotenuse = Math.sqrt(dist.x * dist.x + dist.y * dist.y); this.magneticCords = { x: movingElRect.left + movingElRect.width / 2 - this.outerCursorSize / 2 - Math.sin(angle) * hypotenuse / 3, y: movingElRect.top + movingElRect.height / 2 - this.outerCursorSize / 2 - Math.cos(angle) * hypotenuse / 3 }; !onlyMoveInnerEl && gsap.to(movingEl, { duration: 0.4, x: -(Math.sin(angle) * hypotenuse) / 8, y: -(Math.cos(angle) * hypotenuse) / 8 }); innerMovingEl && gsap.to(innerMovingEl, { duration: 0.35, x: -(Math.sin(angle) * hypotenuse) / 8, y: -(Math.cos(angle) * hypotenuse) / 8 }); if (this.scaleOuterCursor) { this.scaleOuterCursorX = movingElRect.width / this.outerCursorSize; this.scaleOuterCursorY = movingElRect.height / this.outerCursorSize; } }); } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = { ...$(this).data('cc-options'), ...options }; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { if (liquidIsMobile() || window.vc_iframe || 'elementorFrontend' in window && elementorFrontend.isEditMode()) return; const addCustomCursorMarkup = () => { const $elements = $('[data-lqd-custom-cursor]'); $elements.each((i, el) => { const $ccSpan = $(``); $(el).prepend($ccSpan); }); }; addCustomCursorMarkup(); $('[data-lqd-cc]').liquidCustomCursor(); }); (function ($) { 'use strict'; const pluginName = 'liquidAccordion'; let defaults = {}; function Plugin(element, options) { this.element = element; this.$element = $(element); this.options = $.extend({}, defaults, options); this._defaults = defaults; this._name = pluginName; this.init(); } Plugin.prototype = { init: function () { this.setHashOnLoad(); this.eventHandlers(); }, setHashOnLoad: function () { const element = $(this.element); if (location.hash !== '' && element.find(location.hash).length) { const activeItemParent = element.find(location.hash).closest('.accordion-item'); activeItemParent.find(location.hash).addClass('in'); activeItemParent.find('.accordion-heading').find('a').attr('aria-expanded', 'true').removeClass('collapsed'); activeItemParent.siblings().find('.in').removeClass('in'); activeItemParent.siblings().find('.accordion-heading').find('a').attr('aria-expanded', 'false').addClass('collapsed'); } }, eventHandlers: function () { this.$element.find('.accordion-collapse').on('show.bs.collapse', event => { this.onShow.call(this, event); }); this.$element.find('.accordion-collapse').on('shown.bs.collapse', event => { this.onShown.call(this, event); }); this.$element.find('.accordion-collapse').on('hide.bs.collapse', event => { this.onHide.call(this, event); }); }, onShow: function (event) { this.toggleActiveClass(event, 'show'); this.setHashOnLoad(event); const $collapse = $(event.target); if ($collapse.closest('.vc_vc_accordion_tab').length) { $collapse.closest('.vc_vc_accordion_tab').siblings().find('.accordion-collapse').collapse('hide'); } }, onHide(event) { this.toggleActiveClass(event, 'hide'); }, toggleActiveClass(event, state) { const parent = $(event.target).closest('.accordion-item'); if (state === 'show') { parent.addClass('active').siblings().removeClass('active'); } if (state === 'hide') { parent.removeClass('active'); } }, setHashOnShow(event) { if (history.pushState) { history.pushState(null, null, '#' + $(event.target).attr('id')); } else { location.hash = '#' + $(event.target).attr('id'); } }, onShown: function (event) { const collapse = $(event.target); const $parent = collapse.closest('.accordion-item'); const $window = $(window); const parentOffsetTop = $parent.offset().top; this.initPlugins($parent); if (parentOffsetTop <= $window.scrollTop() - 15) { $('html, body').animate({ scrollTop: parentOffsetTop - 45 }, 800); } }, initPlugins($shownAccordionItem) { $('[data-split-text]', $shownAccordionItem).liquidSplitText(); }, destroy() { this.$element.find('.accordion-collapse').off('show.bs.collapse shown.bs.collapse hide.bs.collapse'); } }; $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = { ...$(this).data('accordion-options'), ...options }; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { $('.accordion').liquidAccordion(); }); (function ($) { 'use strict'; const pluginName = 'liquidAjaxLoadMore'; let defaults = { trigger: "inview" }; class Plugin { constructor(element, options) { this.element = element; this.$element = $(element); this.options = $.extend({}, defaults, options); this._defaults = defaults; this._name = pluginName; this.observer = null; this.init(); } init() { const { trigger } = this.options; trigger == 'inview' && this.setupIntersectionObserver(); trigger == 'click' && this.onClick(); } onClick() { this.$element.on('click', this.loadItems.bind(this)); } setupIntersectionObserver() { this.observer = new IntersectionObserver(enteries => { enteries.forEach(entery => { if (entery.isIntersecting) { this.loadItems(); } }); }, { threshold: [1] }); this.observer.observe(this.element); } loadItems(event) { event && event.preventDefault(); const self = this; const options = self.options; const target = self.$element.attr('href'); self.$element.addClass('items-loading'); $.ajax({ type: 'GET', url: target, error: function (MLHttpRequest, textStatus, errorThrown) { alert(errorThrown); }, success: function (data) { const $data = $(data); const $newItemsWrapper = $data.find(options.wrapper); const $newItems = $newItemsWrapper.find(options.items); const $wrapper = $(options.wrapper); const nextPageUrl = $data.find('[data-ajaxify=true]').attr('href'); imagesLoaded($newItems.get(), function () { if (nextPageUrl && target != nextPageUrl) { self.$element.attr('href', nextPageUrl); } else { self.observer && self.observer.unobserve(self.element); self.$element.removeClass('items-loading').addClass('all-items-loaded'); } $newItems.appendTo($wrapper); if ($wrapper.get(0).hasAttribute('data-liquid-masonry')) { const pluginData = $wrapper.data('plugin_liquidMasonry'); const isoData = pluginData && pluginData.isoData; isoData && isoData.appended($newItems); } self.onSuccess($wrapper); }); } }); } onSuccess($wrapper) { if (!$('body').hasClass('lazyload-enabled')) { $('[data-responsive-bg=true]', $wrapper).liquidResponsiveBG(); } if ($('body').hasClass('lazyload-enabled')) { window.liquidLazyload = new LazyLoad({ elements_selector: '.ld-lazyload', callback_loaded: e => { $(e).closest('[data-responsive-bg=true]').liquidResponsiveBG(); $(e).parent().not('#wrap, #lqd-site-content').addClass('loaded'); } }); } $('[data-split-text]', $wrapper).filter((i, element) => !$(element).parents('[data-custom-animations]').length && !element.hasAttribute('data-custom-animations')).liquidSplitText(); $('[data-fittext]', $wrapper).liquidFitText(); $('[data-custom-animations]', $wrapper).map((i, element) => { const $element = $(element); const $customAnimationParent = $element.parents('.wpb_wrapper[data-custom-animations]'); if ($customAnimationParent.length) { $element.removeAttr('data-custom-animations'); $element.removeAttr('data-ca-options'); } }); $('[data-custom-animations]', $wrapper).filter((i, element) => { const $element = $(element); const $rowBgparent = $element.closest('.vc_row[data-row-bg]'); const $slideshowBgParent = $element.closest('.vc_row[data-slideshow-bg]'); return !$rowBgparent.length && !$slideshowBgParent.length; }).liquidCustomAnimations(); $('[data-lqd-flickity]', $wrapper).liquidCarousel(); $('[data-parallax]', $wrapper).liquidParallax(); $('[data-hover3d=true]', $wrapper).liquidHover3d(); this.$element.removeClass('items-loading'); ScrollTrigger?.refresh(); } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = { ...$(this).data('ajaxify-options'), options }; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { if ($('body').hasClass('compose-mode')) return false; $('[data-ajaxify=true]').liquidAjaxLoadMore(); }); (function ($) { 'use strict'; const pluginName = 'liquidAnimatedFrames'; let defaults = { current: 0, scrollable: false, forceDisablingWindowScroll: false, autoplay: false, autoplayTimeout: 4000 }; class Plugin { constructor(element, options) { this.element = element; this.$element = $(element); this.options = $.extend({}, defaults, options); this._defaults = defaults; this._name = pluginName; this.DOM = {}; this.DOM.el = element; this.DOM.slides = Array.from(this.DOM.el.querySelectorAll('.lqd-af-slides > div')); this.DOM.nav = this.DOM.el.querySelector('.lqd-af-slidenav'); this.DOM.nums = this.DOM.el.querySelector('.lqd-af-slidenum'); this.DOM.numsCurrent = this.DOM.el.querySelector('.lqd-af-slidenum__current'); this.DOM.numsTotal = this.DOM.el.querySelector('.lqd-af-slidenum__total'); this.DOM.nextCtrl = this.DOM.nav.querySelector('.lqd-af-slidenav__item--next'); this.DOM.prevCtrl = this.DOM.nav.querySelector('.lqd-af-slidenav__item--prev'); this.slidesTotal = this.DOM.slides.length; this.current = this.options.current; this.startY = 0; this.currentY = 0; this.dragY = 0; this.userInteracted = false; this.autoplayTimeout = null; this.initNumbers(); this.init(); this.animateNumbers(); this.initEvents(); this.autoplay(); } init() { const currentSlide = this.DOM.slides[this.current]; currentSlide.classList.add('lqd-af-slide--current'); this.DOM.el.classList.add('lqd-af--initial'); this.onSlideLoaded(currentSlide); } initNumbers() { if (liquidIsElementor) return; const $parantSpan = $(''); this.DOM.numsTotal.innerText = this.slidesTotal; for (let i = 1; i <= this.slidesTotal; i++) { const $span = $(`${i}`); $span.appendTo($parantSpan); } $parantSpan.appendTo(this.DOM.numsCurrent); } animateNumbers(i = 0) { const spanEl = this.DOM.numsCurrent.querySelector('span'); if (!spanEl) return; spanEl.style.transform = `translateY(${i * 100 * -1}%)`; } initEvents() { if (this.slidesTotal <= 1) return; $(this.DOM.nextCtrl).off('click.lqdAnimateFrames', this.navigate); $(this.DOM.prevCtrl).off('click.lqdAnimateFrames', this.navigate); $(this.DOM.nextCtrl).on('click.lqdAnimateFrames', this.navigate.bind(this, 'next', true)); $(this.DOM.prevCtrl).on('click.lqdAnimateFrames', this.navigate.bind(this, 'prev', true)); $(document).on('keydown.lqdAnimateFrames', ev => { const keyCode = ev.originalEvent.key; if (keyCode === 'ArrowUp') { this.navigate('prev', true); } else if (keyCode === 'ArrowDown') { this.navigate('next', true); } }); if (!this.options.scrollable) return false; this.initDrag(); if (this.options.forceDisablingWindowScroll && 'elementorFrontend' in window && !elementorFrontend.isEditMode()) { document.documentElement.classList.add('overflow-hidden'); } const onWheel = liquidThrottle(event => { const delta = Math.sign(event.originalEvent.deltaY); if (delta < 0) { this.navigate('prev', true); } else if (delta > 0) { this.navigate('next', true); } }, 800, true); this.$element.on('mouseenter.lqdAnimateFrames', () => { $liquidWindow.on('wheel.lqdAnimateFrames', onWheel); }); this.$element.on('mouseleave.lqdAnimateFrames', () => { $liquidWindow.on('wheel.lqdAnimateFrames', onWheel); }); } initDrag() { this.$element.on('mousedown touchstart', this.pointerStart.bind(this)); this.$element.on('mousemove touchmove', this.pointerMove.bind(this)); this.$element.on('mouseup touchend', this.pointerEnd.bind(this)); } pointerStart(event) { if (this.options.forceDisablingWindowScroll && 'elementorFrontend' in window && !elementorFrontend.isEditMode()) { document.documentElement.classList.add('overflow-hidden'); } this.startY = event.pageY || event.originalEvent.changedTouches[0].pageY; this.currentY = this.startY; this.$element.addClass('pointer-down'); } pointerMove(event) { if (this.options.forceDisablingWindowScroll && 'elementorFrontend' in window && !elementorFrontend.isEditMode()) { document.documentElement.classList.add('overflow-hidden'); } this.currentY = event.pageY || event.originalEvent.changedTouches[0].pageY; this.dragY = parseInt(this.startY - this.currentY, 10); } pointerEnd() { this.dragY = parseInt(this.startY - this.currentY, 10); if (this.dragY >= 20) { this.navigate('next'); } else if (this.dragY <= -20) { this.navigate('prev'); } this.element.classList.remove('pointer-down'); } navigate(dir = 'next', navigatedByUser) { if (this.isAnimating) return false; if (navigatedByUser) { this.userInteracted = true; } this.isAnimating = true; if (this.autoplayTimeout) { clearTimeout(this.autoplayTimeout); } if (this.options.forceDisablingWindowScroll && 'elementorFrontend' in window && !elementorFrontend.isEditMode()) { document.documentElement.classList.add('overflow-hidden'); } this.element.classList.add('lqd-af--navigating', 'lqd-af--navigation-init'); dir === 'next' && this.element.classList.add('lqd-af--moving-up'); dir === 'prev' && this.element.classList.add('lqd-af--moving-down'); const currentSlide = this.DOM.slides[this.current]; const currentSlideImg = currentSlide.querySelector('.lqd-af-slide__img'); const currentSlideImgInner = currentSlideImg.querySelector('.lqd-af-slide__img__inner'); const currentSlideFigureEl = currentSlideImg.querySelector('figure'); const currentSlideTitleSplitInner = currentSlide.querySelectorAll('.lqd-af-slide__title .split-inner'); const currentSlideDescSplitInner = currentSlide.querySelectorAll('.lqd-af-slide__desc .split-inner'); const currentSlideLink = currentSlide.querySelector('.lqd-af-slide__link'); const figureAnimations = gsap.timeline({ duration: 1.2, onComplete: () => { currentSlide.classList.remove('lqd-af-slide--movin-out'); } }); figureAnimations.fromTo(currentSlideFigureEl, { scale: 1 }, { scale: 1.25, ease: CustomEase.create("custom", "M0,0,C0.4,0,0.2,1,1,1") }, 0); figureAnimations.fromTo(currentSlideImgInner, { scale: 1 }, { scale: 0.5, ease: CustomEase.create("custom", "M0,0,C0.4,0,0.2,1,1,1") }, 0.015); figureAnimations.to(currentSlideImg, { duration: 0.85, ease: CustomEase.create("custom", "M0,0,C0.395,0,0.1,1,1,1"), y: dir === 'next' ? '-100%' : '100%' }, 0.35); currentSlide.classList.add('lqd-af-slide--movin-out'); const currentSlideContentTimeline = gsap.timeline({ duration: 1.2, delay: 0.5, ease: CustomEase.create("custom", "M0,0,C0.4,0,0.1,1,1,1"), onComplete: () => { currentSlide.classList.remove('lqd-af-slide--current'); this.DOM.el.classList.add('lqd-af--initial'); } }); currentSlideTitleSplitInner?.length && currentSlideContentTimeline.fromTo(currentSlideTitleSplitInner, { y: '0%' }, { y: dir === 'next' ? '-105%' : '105%' }, dir === 'next' ? 0 : 0.35); currentSlideDescSplitInner?.length && currentSlideContentTimeline.fromTo(currentSlideDescSplitInner, { opacity: 1, y: '0%' }, { opacity: 0, y: dir === 'next' ? '-100%' : '100%' }, 0.25); currentSlideLink && currentSlideContentTimeline.fromTo(currentSlideLink, { opacity: 1, y: '0%' }, { opacity: 0, y: dir === 'next' ? '-75%' : '75%' }, dir === 'next' ? 0.35 : 0); this.current = dir === 'next' ? this.current < this.slidesTotal - 1 ? this.current + 1 : 0 : this.current > 0 ? this.current - 1 : this.slidesTotal - 1; this.animateNumbers(this.current); const newSlide = this.DOM.slides[this.current]; newSlide.classList.add('lqd-af-slide--current', 'lqd-af-slide--movin-in'); this.DOM.el.classList.add('lqd-af--initial'); this.onSlideLoaded(newSlide); const newSlideImg = newSlide.querySelector('.lqd-af-slide__img'); const newSlideTitleSplitInner = newSlide.querySelectorAll('.lqd-af-slide__title .split-inner'); const newSlideDescSplitInner = newSlide.querySelectorAll('.lqd-af-slide__desc .split-inner'); const newSlideLink = newSlide.querySelector('.lqd-af-slide__link'); const newSlideContent = gsap.timeline({ duration: 1.2, delay: 0.35, ease: CustomEase.create("custom", "M0,0,C0.4,0,0.1,1,1,1"), onComplete: () => { newSlide.classList.remove('lqd-af-slide--movin-in'); } }); newSlideContent.fromTo(newSlideImg, { y: dir === 'next' ? '100%' : '-100%' }, { y: 0, duration: 0.85, ease: CustomEase.create("custom", "M0,0,C0.395,0,0.1,1,1,1") }, 0); newSlideTitleSplitInner?.length && newSlideContent.fromTo(newSlideTitleSplitInner, { y: dir === 'next' ? '105%' : '-105%' }, { y: '0%' }, dir === 'next' ? 0.3 : 0.5); newSlideDescSplitInner?.length && newSlideContent.fromTo(newSlideDescSplitInner, { opacity: 0, y: dir === 'next' ? '100%' : '-100%' }, { opacity: 1, y: '0%' }, 0.4); newSlideLink && newSlideContent.fromTo(newSlideLink, { opacity: 0, y: dir === 'next' ? '75%' : '-75%' }, { opacity: 1, y: '0%' }, dir === 'next' ? 0.5 : 0.3); figureAnimations.then(this.animateShapeOut.bind(this, dir)); } animateShapeOut() { const currentSlide = this.DOM.slides[this.current]; const currentSlideImg = currentSlide.querySelector('.lqd-af-slide__img'); const currentSlideImgInner = currentSlideImg.querySelector('.lqd-af-slide__img__inner'); const currentSlideFigureEl = currentSlideImg.querySelector('figure'); gsap.to([currentSlideImgInner, currentSlideFigureEl], { scale: 1, duration: 0.8, ease: CustomEase.create("custom", "M0,0,C0.4,0,0.2,1,1,1"), onComplete: () => { this.isAnimating = false; this.element.classList.remove('lqd-af--navigating', 'lqd-af--moving-up', 'lqd-af--moving-down'); !this.options.forceDisablingWindowScroll && document.documentElement.classList.remove('overflow-hidden'); this.autoplay(); } }); } autoplay() { if (!this.options.autoplay || this.userInteracted || this.slidesTotal <= 1) return; this.autoplayTimeout = setTimeout(() => { this.navigate(); }, this.options.autoplayTimeout); } onSlideLoaded(slide) { const $slide = $(slide); const $vids = $slide.find('video'); $vids.each(function () { const $vid = $(this); $vid.find('source').each(function () { const $source = $(this); $source.attr('src', $source.attr('data-src')); }); $vid[0].load(); $vid[0].play(); }); } destroy() { $(this.DOM.nextCtrl).off('click.lqdAnimateFrames'); $(this.DOM.prevCtrl).off('click.lqdAnimateFrames'); $(document).off('keydown.lqdAnimateFrames'); this.$element.off('mouseenter.lqdAnimateFrames'); $liquidWindow.off('wheel.lqdAnimateFrames'); this.$element.off('mouseleave.lqdAnimateFrames'); } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = { ...$(this).data('af-options'), ...options }; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { $('[data-liquid-animatedframes=true]').liquidAnimatedFrames(); }); (function ($) { 'use strict'; const pluginName = 'liquidAsymmetricSlider'; let defaults = { autoplay: false }; class Plugin { constructor(element, options) { this._defaults = defaults; this._name = pluginName; this.options = { ...defaults, ...options }; this.element = element; this.$element = $(element); this.DOM = { titlesWrap: this.element.querySelector('.lqd-asym-slider-title-wrap'), infosWrap: this.element.querySelector('.lqd-asym-slider-info-wrap'), imagesWrap: this.element.querySelector('.lqd-asym-slider-img-wrap'), titles: [...this.element.querySelectorAll('.lqd-asym-slider-title')], infos: [...this.element.querySelectorAll('.lqd-asym-slider-info')], images: [...this.element.querySelectorAll('.lqd-asym-slider-img')], prevBtn: this.element.querySelector('.lqd-asym-slider-prev'), nextBtn: this.element.querySelector('.lqd-asym-slider-next') }; this.isPlaying = false; this.currentSlide = 0; this.nextSlide = null; this.prevSlide = null; this.totalSlides = this.DOM.images.length - 1; const promises = []; const $firstHeading = $(this.DOM.titlesWrap).find('.lqd-asym-slider-title-element').first(); const elementFontFamily = $firstHeading.css('font-family').replace(/"/g, '').replace(/'/g, '').split(',')[0]; const elementFontWeight = $firstHeading.css('font-weight'); const elementFontStyle = $firstHeading.css('font-style'); const fontFamilySlug = window.liquidSlugify(elementFontFamily); promises.push(new Promise(resolve => imagesLoaded(this.element, resolve))); if (!window.liquidCheckedFonts.find(ff => ff === fontFamilySlug)) { const font = new FontFaceObserver(elementFontFamily, { weight: elementFontWeight, style: elementFontStyle }); promises.push(font.load()); } Promise.all(promises).finally(() => { new IntersectionObserver(([entry], observer) => { if (entry.isIntersecting) { observer.disconnect(); this.init(); } }).observe(this.element); }); } init() { const { autoplay } = this.options; this.updateHeights(); this.events(); this.playInitial(); this.element.classList.add('lqd-asym-slider-ready'); if (autoplay && autoplay > 0) { this.autoplayInitCall = gsap.delayedCall(1.5, this.autoplay.bind(this)); } ; } autoplay() { const { autoplay } = this.options; if (!autoplay || autoplay <= 0) return; this.autoplayInitCall && this.autoplayInitCall.kill(); this.autoplayCall = gsap.delayedCall(autoplay, this.next.bind(this)); } events() { this.DOM.prevBtn.addEventListener('click', this.prev.bind(this)); this.DOM.nextBtn.addEventListener('click', this.next.bind(this)); window.addEventListener('resize', liquidDebounce(this.updateHeights.bind(this), 1000)); } updateHeights() { this.DOM.imagesWrap.style.transition = 'height 0.3s 1s'; this.DOM.titlesWrap.style.transition = 'height 0.3s 1s'; this.DOM.infosWrap.style.transition = 'height 0.3s 1s'; this.DOM.imagesWrap.style.height = `${this.DOM.images[this.currentSlide].offsetHeight}px`; this.DOM.titlesWrap.style.height = `${this.DOM.titles[this.currentSlide].offsetHeight}px`; this.DOM.infosWrap.style.height = `${this.DOM.infos[this.currentSlide].offsetHeight}px`; } beforePlay() { this.element.classList.add('lqd-asym-slider-changing'); this.DOM.titles[this.nextSlide].classList.add('is-next'); this.DOM.titles[this.nextSlide].classList.remove('active'); this.DOM.images[this.nextSlide].classList.add('is-next'); this.DOM.images[this.nextSlide].classList.remove('active'); this.DOM.infos[this.nextSlide].classList.add('is-next'); this.DOM.infos[this.nextSlide].classList.remove('active'); this.isPlaying = true; } afterPlay() { this.element.classList.remove('lqd-asym-slider-changing'); this.DOM.titles[this.nextSlide].classList.remove('is-next'); this.DOM.titles[this.nextSlide].classList.add('active'); this.DOM.titles[this.prevSlide].classList.remove('active'); this.DOM.images[this.nextSlide].classList.remove('is-next'); this.DOM.images[this.nextSlide].classList.add('active'); this.DOM.images[this.prevSlide].classList.remove('active'); this.DOM.infos[this.nextSlide].classList.remove('is-next'); this.DOM.infos[this.nextSlide].classList.add('active'); this.DOM.infos[this.prevSlide].classList.remove('active'); this.isPlaying = false; this.autoplayCall && this.autoplayCall.kill(); this.autoplay(); } playInitial() { this.prevSlide = this.currentSlide; this.nextSlide = this.currentSlide; this.playTitle('init'); this.playInfo('init'); this.playImages('init'); } prev() { if (this.isPlaying) return; this.prevSlide = this.currentSlide; this.nextSlide = this.currentSlide === 0 ? this.totalSlides : this.currentSlide - 1; this.currentSlide = this.nextSlide; this.beforePlay(); this.updateHeights(); this.playTitle('prev'); this.playInfo('prev'); this.playImages('prev').then(() => { this.afterPlay(); }); } next() { if (this.isPlaying) return; this.prevSlide = this.currentSlide; this.nextSlide = this.currentSlide === this.totalSlides ? 0 : this.currentSlide + 1; this.currentSlide = this.nextSlide; this.beforePlay(); this.updateHeights(); this.playTitle('next'); this.playInfo('next'); this.playImages('next').then(() => { this.afterPlay(); }); } playTitle(dir) { const currentTitle = this.DOM.titles[this.prevSlide]; const nextTitle = this.DOM.titles[this.nextSlide]; const currentTitleChars = currentTitle.querySelectorAll('.lqd-chars'); const nextTitleChars = nextTitle.querySelectorAll('.lqd-chars'); const timeline = gsap.timeline({ defaults: { duration: 1 }, delay: dir === 'next' ? 0.15 : 0 }); if (dir === 'prev') { timeline.fromTo([...currentTitleChars].reverse(), { y: '0%', rotation: 0, opacity: 1 }, { y: '100%', rotation: 15, opacity: 0, ease: 'expo.inOut', stagger: 0.025 }).fromTo([...nextTitleChars].reverse(), { y: '-100%', rotation: 15, opacity: 0 }, { y: '0%', rotation: 0, opacity: 1, ease: 'expo.out', stagger: 0.025 }, 0.75); } else if (dir === 'next') { timeline.fromTo(currentTitleChars, { y: '0%', rotation: 0, opacity: 1 }, { y: '-100%', rotation: 15, opacity: 0, ease: 'expo.inOut', stagger: 0.025 }).fromTo(nextTitleChars, { y: '100%', rotation: 15, opacity: 0 }, { y: '0%', rotation: 0, opacity: 1, ease: 'expo.out', stagger: 0.025 }, 0.75); } else { timeline.fromTo(currentTitleChars, { x: 35, opacity: 0 }, { x: 0, opacity: 1, ease: 'expo.inOut', stagger: 0.045 }); } } playInfo(dir) { const currentInfo = this.DOM.infos[this.prevSlide]; const currentInfoTitle = currentInfo.querySelector('.lqd-asym-slider-subtitle-element'); const currentInfoP = currentInfo.querySelector('.lqd-asym-slider-description-element'); const currentInfoHr = currentInfo.querySelector('hr'); const nextInfo = this.DOM.infos[this.nextSlide]; const nextInfoTitle = nextInfo.querySelector('.lqd-asym-slider-subtitle-element'); const nextInfoP = nextInfo.querySelector('.lqd-asym-slider-description-element'); const timeline = gsap.timeline({ defaults: { ease: 'expo.inOut', duration: 1.5 }, delay: dir === 'prev' ? 0.3 : 0.15 }); if (dir === 'prev') { timeline.fromTo(currentInfoTitle, { x: 0, opacity: 1 }, { x: 15, opacity: 0 }, 0).fromTo(currentInfoP, { x: 0, opacity: 1 }, { x: 15, opacity: 0 }, 0.15).fromTo(nextInfoTitle, { x: -15, opacity: 0 }, { x: 0, opacity: 1 }, 0.15).fromTo(nextInfoP, { x: -15, opacity: 0 }, { x: 0, opacity: 1 }, 0.3); } else if (dir === 'next') { timeline.fromTo(currentInfoTitle, { x: 0, opacity: 1 }, { x: -15, opacity: 0 }, 0).fromTo(currentInfoP, { x: 0, opacity: 1 }, { x: -15, opacity: 0 }, 0.15).fromTo(nextInfoTitle, { x: 15, opacity: 0 }, { x: 0, opacity: 1 }, 0.15).fromTo(nextInfoP, { x: 15, opacity: 0 }, { x: 0, opacity: 1 }, 0.3); } else { timeline.fromTo(currentInfoTitle, { x: 30, opacity: 0 }, { x: 0, opacity: 1 }, 0).fromTo(currentInfoHr, { scaleX: 0.6, opacity: 0 }, { scaleX: 1, opacity: 1 }, 0).fromTo(currentInfoP, { x: 30, opacity: 0 }, { x: 0, opacity: 1 }, 0.15); } } playImages(dir) { const currentImage = this.DOM.images[this.prevSlide]; const currentImageInner = currentImage.querySelector('.lqd-asym-slider-img-inner'); const nextImage = this.DOM.images[this.nextSlide]; const nextImageInner = nextImage.querySelector('.lqd-asym-slider-img-inner'); const timeline = gsap.timeline({ defaults: { ease: 'expo.inOut', duration: 1.5 }, delay: dir === 'prev' ? 0.15 : 0 }); if (dir === 'prev') { timeline.fromTo(currentImageInner, { x: '0%', scale: 1 }, { x: '-100%', scale: 1.2 }, 0).fromTo(currentImage, { x: '0%' }, { x: '100%' }, 0).fromTo(nextImage, { x: '-100%' }, { x: '0%' }, 0).fromTo(nextImageInner, { x: '100%', scale: 1.2 }, { x: '0%', scale: 1 }, 0); } else if (dir === 'next') { timeline.fromTo(currentImageInner, { x: '0%', scale: 1 }, { x: '100%', scale: 1.2 }, 0).fromTo(currentImage, { x: '0%' }, { x: '-100%' }, 0).fromTo(nextImage, { x: '100%' }, { x: '0%' }, 0).fromTo(nextImageInner, { x: '-100%', scale: 1.2 }, { x: '0%', scale: 1 }, 0); } else { timeline.fromTo(currentImageInner, { x: '100%', scale: 1.2 }, { x: '0%', scale: 1 }, 0).fromTo(currentImage, { x: '-100%' }, { x: '0%' }, 0); } return timeline; } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = { ...$(this).data('asym-options'), ...options }; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { $('[data-asym-slider]').liquidAsymmetricSlider(); }); (function ($) { 'use strict'; const pluginName = 'liquidBackToTop'; let defaults = {}; class Plugin { constructor(element, options) { this._defaults = defaults; this._name = pluginName; this.options = { ...defaults, ...options }; this.element = element; this.$element = $(element); this.init(); } init() { this.checkforWPBottomMenu(); this.firstSectionIO(); } checkforWPBottomMenu() { const wpbm = document.getElementById('wp-bottom-menu'); if (!wpbm) return; const wpbmHeight = wpbm.clientHeight; this.element.style.bottom = `${wpbmHeight + 30}px`; } firstSectionIO() { let $firstSection = $liquidSectionsWrapper.children().not('style, p').first(); if ($firstSection.hasClass('lqd-contents')) { $firstSection = $firstSection.children().first(); } const firstSectionIsSticky = $firstSection.css('position') === 'sticky'; const firstSectionIsOnlyChild = $firstSection.is(':only-child'); if ($firstSection.is(':hidden') || firstSectionIsSticky) { $firstSection = $firstSection.siblings().not('style, p').first(); } if (!$firstSection.length) return; let threshold = [0, 0.25, 0.5, 0.75, 1]; if (firstSectionIsSticky) { threshold = [0]; } if (firstSectionIsOnlyChild) { threshold = [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]; } new IntersectionObserver(([entry]) => { const { boundingClientRect, rootBounds } = entry; let activate = rootBounds && rootBounds.top >= boundingClientRect.bottom - boundingClientRect.height / 2; if (firstSectionIsSticky) { activate = rootBounds && rootBounds.bottom >= boundingClientRect.top; } if (firstSectionIsOnlyChild) { activate = rootBounds && rootBounds.bottom - rootBounds.height / 2 >= boundingClientRect.top + 250; } if (activate) { this.$element.addClass('is-visible'); } else { this.$element.removeClass('is-visible'); } }, { threshold }).observe($firstSection.get(0)); } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = { ...$(this).data('back-to-top-options'), ...options }; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { if (!$('html').hasClass('pp-enabled')) { $('[data-back-to-top]').liquidBackToTop(); } }); (function ($) { 'use strict'; const pluginName = 'liquidBgColor'; let defaults = { getBgFromSelector: 'backgroundColor', setBgTo: 'self', manipulateColor: null, changeBorderColor: false, interactWithHeader: false, makeGradient: false }; class Plugin { constructor(element, options) { this._defaults = defaults; this._name = pluginName; this.options = { ...defaults, ...options }; this.element = element; this.$element = $(element); this.$stickyModules = this._getStickyModules(); this.setBgToEls = this.options.setBgTo === 'self' ? [this.element] : $(this.options.setBgTo, this.element).get(); this.$bgEl = false; this.rowsRect = []; this.colors = []; this.direction = 0; this.$element.is($liquidContents) && this._addBgElement(); this.liquidBgColorInitPromise = new Promise(resolve => { this.$element.on('lqd-bg-color-init', resolve.bind(this, this)); }); LiquidSectionsDetails.getDetails().then(sections => { $(sections).imagesLoaded(this._init(sections)); }); } _init(liquidSections) { const sections = liquidSections.filter(sec => !sec.isHidden && !sec.isInFooter).filter(sec => !sec.isInnerSection); console.log(sections); sections.forEach(async (sec, i) => { await this._getColors(sec); Promise.all(this._getRects(sec, i)).then(() => { this._setupIO(sec, i); if (this.$bgEl) { this.element.classList.add('bg-transparent'); sec.el.classList.add('bg-transparent'); sec.isInnerSection && sec.parentSection && sec.parentSection.el.classList.add('bg-transparent'); } }); }); this.$element.trigger('lqd-bg-color-init', this.element); } _getStickyModules() { let stickyModules = false; if ($liquidMainHeader.length && $liquidMainHeader[0].hasAttribute('data-sticky-header')) { if (liquidIsElementor) { stickyModules = $liquidMainHeader.find('> .elementor').find('> .elementor-section-wrap > .elementor-section, > .elementor-section, > .elementor-section-wrap > .e-container, > .e-container, > .e-con').not('.lqd-hide-onstuck').find('[data-element_type="widget"]'); } else { stickyModules = $liquidMainHeader.find('.lqd-head-sec-wrap, .lqd-stickybar-wrap').not('.lqd-hide-onstuck').find('.header-module'); } } return stickyModules; } _addBgElement() { if (this.$bgEl) return; const overflowClassname = liquidIsMobile() ? 'overflow-hidden' : ''; const posClassname = liquidIsMobile() ? 'pos-fix fixed' : 'pos-sticky sticky'; const heightClassname = liquidIsMobile() ? 'h-100 h-full' : 'h-vh-100 h-100vh'; this.$bgEl = $(`
`); this.$bgEl.prependTo(this.$element); this.setBgToEls = [this.$bgEl.children()[0]]; if ($liquidMainFooter.length && !$liquidMainFooter[0].hasAttribute('data-sticky-footer') || liquidIsMobile()) { $liquidMainFooter.css({ position: 'relative', zIndex: 2 }); } } _getColors(lqdSection) { return fastdomPromised.measure(() => { const { getBgFromSelector, manipulateColor } = this.options; const obj = {}; let color = lqdSection[getBgFromSelector].replace(/, /g, ',').split(' ')[0]; let dataLuminosityAttr = lqdSection.$el.attr('data-section-luminosity'); if (lqdSection.isInnerSection && lqdSection.parentSection) { if (lqdSection.isBgTransparent && !lqdSection.parentSection.isBgTransparent) { color = lqdSection.parentSection[getBgFromSelector].replace(/, /g, ',').split(' ')[0]; } } if (lqdSection.isBgTransparent) { color = $liquidContents.css('backgroundColor'); } if (manipulateColor && manipulateColor.length > 0) { for (let i = 0; i < manipulateColor.length; i++) { color = tinycolor(color)[Object.keys(manipulateColor[i])[0]](Object.values(manipulateColor[i])[0]).toString(); } } obj.color = color; obj.luminosity = dataLuminosityAttr != null && !manipulateColor ? dataLuminosityAttr : tinycolor(color).getLuminance() <= 0.4 ? 'dark' : 'light'; this.colors.push(obj); }); } _interactWithHeader(colorLuminosity) { const $elements = $liquidMainHeader.add(this.$stickyModules).filter((i, el) => { const $el = $(el); return !$el.children('.navbar-brand-solid').length && !$el.hasClass('navbar-brand-solid') && !$el.find('> .elementor-widget-container > .navbar-brand-solid').length; }); if (colorLuminosity === 'dark') { $elements.addClass('lqd-active-row-dark').removeClass('lqd-active-row-light'); } else { $elements.addClass('lqd-active-row-light').removeClass('lqd-active-row-dark'); } } _interactWithColors(element, targetColorLuminosity) { const $el = $(element); if ($el.hasClass('btn-icon') || $el.hasClass('btn-solid')) { const buttonColor = targetColorLuminosity === 'dark' ? '#fff' : '#000'; $el.css({ transition: 'box-shadow 0.3s, transform 0.3s, color 0.3s', color: buttonColor }); } if ($el.hasClass('navbar-brand-inner')) { const $parentModule = liquidIsElementor ? $el.closest('.elementor-element') : $el.closest('.header-module'); if (targetColorLuminosity === 'dark') { $parentModule.addClass('lqd-active-row-dark').removeClass('lqd-active-row-light'); } else { $parentModule.addClass('lqd-active-row-light').removeClass('lqd-active-row-dark'); } } } _getRects(lqdSection, loopIndex) { const promises = []; let row = lqdSection.el.querySelector('.ld-row'); if (liquidIsElementor) { if (lqdSection.el.classList.contains('e-container') || lqdSection.el.classList.contains('e-con')) { row = lqdSection.el; } else { row = lqdSection.el.querySelector('.elementor-container'); } } const rowPromise = new Promise(resolve => { new IntersectionObserver(([entry], observer) => { observer.disconnect(); this.rowsRect[loopIndex] = entry.boundingClientRect; resolve(); }).observe(row || lqdSection.el); }); promises.push(rowPromise); return promises; } _setupIO(lqdSection, loopIndex) { const timeline = gsap.timeline(); const start = loopIndex === 0 ? 'top bottom' : `top+=${this.rowsRect[loopIndex].y - lqdSection.rect.y} bottom`; this.setBgToEls.forEach(element => { const onUpdate = () => { const i = this.direction < 1 && loopIndex > 0 ? loopIndex - 1 : loopIndex; this.options.interactWithHeader && this.$stickyModules && this._interactWithHeader(this.colors[i].luminosity); this._interactWithColors(element, this.colors[i].luminosity); }; timeline.fromTo(element, { backgroundColor: loopIndex === 0 ? this.colors[loopIndex].color : this.colors[loopIndex - 1].color }, { backgroundColor: this.colors[loopIndex].color, onUpdate, onComplete: () => { element.style.transition = ''; } }, 0); }); ScrollTrigger.create({ animation: timeline, trigger: lqdSection.el, start, end: `+=${this.rowsRect[loopIndex].height}`, scrub: 0.1, onUpdate: st => { this.direction = st.direction; } }); } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = { ...$(this).data('liquid-bg-options'), ...options }; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { const $liquidBgEls = $('[data-liquid-bg]'); $liquidBgEls.liquidBgColor(); if (liquidIsElementor) { $liquidBgEls.each((i, el) => { const $el = $(el); if ($el.is($liquidContents) && $liquidMainHeader.length && !$liquidMainHeader.attr('data-liquid-bg')) { $liquidMainHeader.liquidBgColor({ setBgTo: ` > .elementor > .elementor-section-wrap > .elementor-section:not(.lqd-hide-onstuck) > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-widget-ld_header_image .navbar-brand-solid .navbar-brand-inner, > .elementor > .elementor-section-wrap > .elementor-section:not(.lqd-hide-onstuck) > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-widget-ld_button .btn-solid, > .elementor > .elementor-section-wrap > .elementor-section:not(.lqd-hide-onstuck) > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-widget-ld_button .btn-icon-solid .btn-icon, > .elementor > .elementor-section:not(.lqd-hide-onstuck) > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-widget-ld_header_image .navbar-brand-solid .navbar-brand-inner, > .elementor > .elementor-section:not(.lqd-hide-onstuck) > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-widget-ld_button .btn-solid, > .elementor > .elementor-section:not(.lqd-hide-onstuck) > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-widget-ld_button .btn-icon-solid .btn-icon`, manipulateColor: [{ 'darken': 30 }, { 'brighten': 15 }, { 'saturate': 20 }] }); } }); } }); (function ($) { 'use strict'; const pluginName = 'liquidAnimatedIcon'; let defaults = { objContainer: '.iconbox-icon-container', color: '#f42958', hoverColor: null, type: 'delayed', delay: 0, duration: 100, resetOnHover: false, file: null }; class Plugin { constructor(element, options) { this._defaults = defaults; this._name = pluginName; this.options = $.extend({}, defaults, options); this.element = element; this.$element = $(element); this.options.file && this.init(); } init() { this.animateIcon(); return this; } animateIcon() { const { type, duration, file, objContainer } = this.options; const gid = this.$element.attr('id') || Math.round(Math.random() * 1000000); const containerEl = this.$element.find(objContainer).attr('id', `${gid.replace(/ld_icon_box/, 'ld_icon_container')}`); new Vivus(containerEl.attr('id'), { file, type, duration, start: 'manual', onReady: vivus => { this.onReady.call(this, vivus); } }).setFrameProgress(1); } onReady(vivus) { const $parentCarousel = this.$element.closest('.carousel-items'); const carouselData = $parentCarousel.data('plugin_liquidCarousel'); this.addColors(vivus); this.animate(vivus); if ($parentCarousel.length && carouselData != null && carouselData.flickityData != null) { carouselData.flickityData.resize(); } } addColors(svg) { const obj = $(svg.el); const { color, hoverColor } = this.options; const gid = Math.round(Math.random() * 1000000); let hoverGradientValues = hoverColor; let strokeHoverGradients = document.createElementNS('http://www.w3.org/2000/svg', 'style'); let gradientValues = color != null ? color.split(':') : '#000'; let strokegradients = null; if (undefined === gradientValues[1]) { gradientValues[1] = gradientValues[0]; } strokegradients = '' + '' + '' + '' + '' + ''; const xmlStrokegradients = new DOMParser().parseFromString(strokegradients, "text/xml"); obj.prepend(xmlStrokegradients.documentElement); if (typeof undefined !== typeof hoverGradientValues && null !== hoverGradientValues) { hoverGradientValues = hoverGradientValues.split(':'); if (undefined === hoverGradientValues[1]) { hoverGradientValues[1] = hoverGradientValues[0]; } strokeHoverGradients.innerHTML = '#' + this.$element.attr('id') + ':hover .iconbox-icon-container defs stop:first-child{stop-color:' + hoverGradientValues[0] + ';}' + '#' + this.$element.attr('id') + ':hover .iconbox-icon-container defs stop:last-child{stop-color:' + hoverGradientValues[1] + ';}'; obj.prepend(strokeHoverGradients); } obj.find('path, rect, ellipse, circle, polygon, polyline, line').attr({ 'stroke': 'url(#grad' + gid + ')', 'fill': 'none' }); this.$element.addClass('iconbox-icon-animating'); return this; } animate(vivusObj) { const options = this.options; const delayTime = parseInt(options.delay, 10); const { duration } = options; vivusObj.reset().stop(); new IntersectionObserver(([entry], observer) => { const vivusStatus = vivusObj.getStatus(); if (entry.isIntersecting && vivusStatus === 'start' && vivusStatus !== 'progress') { observer.disconnect(); this.resetAnimate(vivusObj, delayTime, duration); this.eventHandlers(vivusObj, delayTime, duration); } }).observe(this.element); return this; } eventHandlers(vivusObj, delayTime, duration) { const { options } = this; $(document).on('shown.bs.tab', 'a[data-toggle="tab"]', event => { const $target = $($(event.currentTarget).attr('href')); if ($target.find(this.element).length) { this.resetAnimate.call(this, vivusObj, delayTime, duration); } }); if (options.resetOnHover) { this.$element.on('mouseenter.lqdIconbox', () => { if (vivusObj.getStatus() === 'end') { this.resetAnimate(vivusObj, 0, duration); } }); } } resetAnimate(vivusObj, delay, duration) { vivusObj.stop().reset(); const timeout = setTimeout(() => { vivusObj.play(duration / 100); clearTimeout(timeout); }, delay); } destroy() { this.$element.off('mouseenter.lqdIconbox'); } } $.fn[pluginName] = function (options) { return this.each(function () { const pluginOptions = { ...$(this).data('plugin-options'), ...options }; if (!$.data(this, "plugin_" + pluginName)) { $.data(this, "plugin_" + pluginName, new Plugin(this, pluginOptions)); } }); }; })(jQuery); jQuery(document).ready(function ($) { $('[data-animate-icon]').liquidAnimatedIcon(); }); (function ($) { 'use strict'; const pluginName = 'liquidCarousel'; let defaults = { bypassCheck: false, carouselEl: null, contain: false, imagesLoaded: true, percentPosition: true, prevNextButtons: false, pageDots: true, adaptiveHeight: false, cellAlign: "left", groupCells: true, dragThreshold: 0, wrapAround: false, autoplay: false, fullwidthSide: false, navArrow: 1, filters: false, filtersCounter: false, doSomethingCrazyWithFilters: false, equalHeightCells: false, middleAlignContent: false, randomVerOffset: false, parallax: false, parallaxEl: 'img', dotsIndicator: 'classic', numbersStyle: 'circle', addSlideNumbersToArrows: false, marquee: false, marqueeTickerSpeed: 1, fade: false, prevNextButtonsOnlyOnMobile: false, columnsAutoWidth: false, watchCSS: false, forceApply: false, skipWrapItems: false, forceEnableOnMobile: false, forceMobileDots: false }; function Plugin(element, options) { this._defaults = defaults; this._name = pluginName; this.options = { ...defaults, ...options }; this.flickityData = null; this.isRTL = $('html').attr('dir') === 'rtl'; if (liquidIsMobile()) { this.options.dragThreshold = 5; } this.element = element; this.$element = $(element); this.$carouselContainer = this.$element.closest('.carousel-container').length ? this.$element.closest('.carousel-container') : this.$element.parent(); this.carouselNavElement = null; this.carouselDotsElement = null; this.carouselMobileDotsElement = null; this.$carouselCurrentSlide = null; this.$carouselCurrentSlideInner = null; this.$carouselTotalSlides = null; this.$carouselSlidesShape = null; this.carouselSlidesPathLength = this.options.numbersStyle === 'circle' ? 471 : 200; this.windowWidth = liquidWindowWidth(); this.$carouselEl = this.options.carouselEl ? $(this.options.carouselEl, this.element) : this.$element; this.carouselEl = this.$carouselEl[0]; this.carouselInitPromise = new Promise(resolve => { this.$element.on('lqd-carousel-initialized', resolve.bind(this, this)); }); if (this.options.marquee) { this.options.wrapAround = true; } this.init(); } Plugin.prototype = { init() { if (this.options.asNavFor) { const $targetEl = $(this.options.asNavFor); if ($targetEl.length) { $targetEl.liquidCarousel({ forceApply: true }); $targetEl.data('plugin_liquidCarousel').carouselInitPromise.then(() => { this.initFlicky(); }); } } else { if (this.options.forceApply) { this.initFlicky(); } else { this.setIO(); } } }, setIO() { new IntersectionObserver(([entry], observer) => { if (entry.isIntersecting) { this.initFlicky(); observer.unobserve(entry.target); } }, { rootMargin: '35%' }).observe(this.element); }, initFlicky() { const options = { ...this.options, rightToLeft: this.isRTL || this.options.rightToLeft }; const { equalHeightCells } = this.options; imagesLoaded(this.element, () => { this.columnsAutoWidth(); this.wrapItems(); this.setEqualHeightCells(); this.$carouselEl.flickity(options); this.flickityData = this.$carouselEl.data('flickity'); options.adaptiveHeight && $('.flickity-viewport', this.element).css('transition', 'height 0.3s'); this.onImagesLoaded(); this.$element.addClass('lqd-carousel-ready'); const resize = this.flickityData.resize; const self = this; const { carouselEl } = this; this.flickityData.resize = function () { if (self.windowWidth === liquidWindowWidth()) return; if (equalHeightCells) { carouselEl.classList.remove('flickity-equal-cells'); } resize.call(this); if (equalHeightCells) { carouselEl.classList.add('flickity-equal-cells'); } self.windowWidth = liquidWindowWidth(); }; }); }, onImagesLoaded() { if (!this.flickityData) return; this.sliderElement = this.element.querySelector('.flickity-slider'); this.initPlugins(); this.setElementNavArrow(); this.carouselNav(); this.navOffsets(); this.carouselDots(); this.carouselMobileDots(this.options.forceMobileDots); this.carouselDotsNumbers(); this.addSlideNumbersToArrows(); this.addSlidesCurrentNumbers(); this.randomVerOffset(); this.fullwidthSide(); this.controllingCarousels(); this.marquee(); this.filtersInit(); this.windowResize(); this.events(); this.dispatchEvents(); if (this.options.columnsAutoWidth) { this.$element.find('.carousel-item-content').css('width', ''); this.flickityData.reposition(); } }, initPlugins() { this.element.hasAttribute('data-custom-animations') && this.$element.liquidCustomAnimations(); }, dispatchEvents() { const e = new CustomEvent('lqd-carousel-initialized', { detail: { carouselData: this } }); document.dispatchEvent(e); this.$element.trigger('lqd-carousel-initialized', this.element); }, windowResize() { const onResize = liquidDebounce(this.doOnWindowResize.bind(this), 200); $(window).on('resize.lqdCarousel', onResize); }, doOnWindowResize() { if (this.windowWidth === window.innerWidth) return; this.windowWidth = window.innerWidth; this.fullwidthSide(); this.columnsAutoWidth(); if (this.options.columnsAutoWidth) { this.$element.find('.carousel-item-content').css('width', ''); this.flickityData.reposition(); } }, events() { this.flickityData.on('pointerDown', () => { $liquidHtml.addClass('lqd-carousel-pointer-down'); }); this.flickityData.on('pointerUp', () => { $liquidHtml.removeClass('lqd-carousel-pointer-down'); }); this.flickityData.on('dragStart', () => { $('[data-column-clickable]', this.element).css('pointer-events', 'none'); }); this.flickityData.on('dragEnd', () => { $('[data-column-clickable]', this.element).css('pointer-events', ''); }); if (this.options.marquee) return; this.flickityData.on('settle', () => { this.sliderElement.style.willChange = 'auto'; }); this.flickityData.on('scroll', () => { this.sliderElement.style.willChange = 'transform'; this.doSomethingCrazyWithFilter(); this.parallax(); this.changeSlidesShape(); }); this.flickityData.on('change', () => { this.changeSlidesNumbers(); }); $(document).on('added_to_cart', (event, frags, id, $btn) => { if (this.$carouselEl.has($btn)) { this.flickityData.resize(); } }); $('[data-toggle=tab]').on('hidden.bs.tab shown.bs.tab', event => { const $link = $(event.target); const $target = $($($link.attr('href')), $link.parent().next('.lqd-tabs-content')); const $carouselEl = $target.find('[data-lqd-flickity]'); let carouselData = $carouselEl.data('plugin_liquidCarousel'); if (event.type === 'shown') { $carouselEl.on('lqd-carousel-initialized', () => { carouselData = $carouselEl.data('plugin_liquidCarousel'); const $navEl = $(carouselData.carouselNavElement); $navEl.siblings('.carousel-nav').addClass('screen-reader-text').stop().fadeOut(300); $navEl.removeClass('screen-reader-text').stop().fadeIn(300); }); if (carouselData) { const $navEl = $(carouselData.carouselNavElement); $navEl.siblings('.carousel-nav').addClass('screen-reader-text').stop().fadeOut(300); $navEl.removeClass('screen-reader-text').stop().fadeIn(300); } } }); }, wrapItems() { const { middleAlignContent, equalHeightCells, randomVerOffset, skipWrapItems } = this.options; if (skipWrapItems) return; const $firstChild = this.$carouselEl.children().first(); if ($firstChild.hasClass('flickity-viewport') || $firstChild.hasClass('flickity-viewport-wrap')) { const $cells = $firstChild.find('.flickity-slider').children(); $cells.each((i, cell) => { const $cell = $(cell); const $cellContent = $cell.find('.carousel-item-content').first(); const hasOneChild = $cellContent.children().not('style').length === 1; if (hasOneChild) { $cell.addClass('has-one-child'); } }); return; } ; this.$carouselEl.children('p, style').insertBefore(this.$carouselEl); const $cells = this.$carouselEl.children(); $cells.each((i, cell) => { const $cell = $(cell); if ($cell.hasClass('vc_ld_carousel_section') || $cell.hasClass('vc_ld_carousel_marquee_section') || $cell.hasClass('vc_container-anchor') || $cell.hasClass('lqd-sticky-stack-nav') || $cell.is('pre')) return; const cellHasInner = $cell.children().hasClass('carousel-item-inner'); const $cellToSearch = cellHasInner ? $cell.find('.carousel-item-content') : $cell; const hasOneChild = $cellToSearch.children().not('style, .vc_controls-container').length === 1; let classnames; if ($cell.attr('class')) { if ($cell.hasClass('lqd-prod-item')) { classnames = $cell.attr('class').split(' ').filter(classname => classname !== 'lqd-prod-item' && classname !== 'product'); } else { classnames = $cell.attr('class').split(' ').filter(classname => classname.includes('vc_hidden-') || classname.includes('hidden-') || classname.includes('col-') || classname.includes('vc_col-')); } } if ($cell.hasClass('carousel-item')) { middleAlignContent && equalHeightCells && !randomVerOffset && $cell.addClass('align-items-center'); hasOneChild && $cell.addClass('has-one-child'); if (!$cell.children('.carousel-item-inner').length) { $cell.wrapInner('