/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./js/src/custom.unified.js"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./core/admin/js/frame-helpers.js": /*!****************************************!*\ !*** ./core/admin/js/frame-helpers.js ***! \****************************************/ /*! exports provided: top_window, is_iframe */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "top_window", function() { return top_window; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "is_iframe", function() { return is_iframe; }); /* ,-,- / / | ,-' _/ / / (-_ _,-' `Z_/ "#: ,-'_,-. \ _ #' _(_-'_()\ \" | ,--_,--' | / "" L-'\ \,--^---v--v-._ / \ | \_________________,-' | \ \ \ NOTE: The code in this file will be executed multiple times! */ var top_window = window; var is_iframe = false; var top; try { // Have to access top window's prop (document) to trigger same-origin DOMException // so we can catch it and act accordingly. top = window.top.document ? window.top : false; } catch (e) { // Can't access top, it means we're inside a different domain iframe. top = false; } if (top && top.__Cypress__) { if (window.parent === top) { top_window = window; is_iframe = false; } else { top_window = window.parent; is_iframe = true; } } else if (top) { top_window = top; is_iframe = top !== window.self; } /***/ }), /***/ "./epanel/.webpack/scripts.js": /*!************************************!*\ !*** ./epanel/.webpack/scripts.js ***! \************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _shortcodes_js_et_shortcodes_frontend_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shortcodes/js/et_shortcodes_frontend.js */ "./epanel/shortcodes/js/et_shortcodes_frontend.js"); /* harmony import */ var _shortcodes_js_et_shortcodes_frontend_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_shortcodes_js_et_shortcodes_frontend_js__WEBPACK_IMPORTED_MODULE_0__); /***/ }), /***/ "./epanel/shortcodes/js/et_shortcodes_frontend.js": /*!********************************************************!*\ !*** ./epanel/shortcodes/js/et_shortcodes_frontend.js ***! \********************************************************/ /*! no static exports found */ /***/ (function(module, exports) { /*! ET et_shortcodes_frontend.js */ // et_switcher plugin v2.2 (function ($) { $.fn.et_shortcodes_switcher = function (options) { var defaults = { slides: '>div', activeClass: 'active', linksNav: '', findParent: true, //use parent elements to define active states lengthElement: 'li', //parent element, used only if findParent is set to true useArrows: false, arrowLeft: 'a#prev-arrow', arrowRight: 'a#next-arrow', auto: false, autoSpeed: 5000, slidePadding: '', pauseOnHover: true, fx: 'fade', sliderType: '' }; var options = $.extend(defaults, options); return this.each(function () { var slidesContainer = jQuery(this).parent().css('position', 'relative'), $slides = jQuery(this).css({ 'overflow': 'hidden', 'position': 'relative' }), $slides_wrapper_box = slidesContainer.find('.et-tabs-content-wrapper'), $slides_wrapper = $slides_wrapper_box.parent(), $slide = $slides.find('.et-tabs-content-wrapper' + options.slides), slidesNum = $slide.length, zIndex = slidesNum, currentPosition = 1, slideHeight = 0, $activeSlide, $nextSlide, slides_wrapper_width = $slides_wrapper.width(), $et_shortcodes_mobile_nav, $et_shortcodes_mobile_controls; if (options.fx === 'slide') { $slides_wrapper_box.width((slidesNum + 2) * 200 + '%'); $slide.css({ 'width': slides_wrapper_width + 'px', 'visibility': 'visible' }); $slides_wrapper_box.append($slide.first().clone().removeClass().addClass('et_slidecontent_cloned')); $slides_wrapper_box.prepend($slide.last().clone().removeClass().addClass('et_slidecontent_cloned')); $slides_wrapper_box.css('left', -slides_wrapper_width + 'px'); } $slide.first().css({ 'display': 'block' }).addClass('et_shortcode_slide_active'); if ('' !== options.slidePadding) { var slidePaddingOption = 'number' === typeof options.slidePadding ? options.slidePadding + 'px' : options.slidePadding; $slide.css('padding', slidePaddingOption); } if (options.linksNav != '') { var linkSwitcher = jQuery(options.linksNav); var linkSwitcherTab = ''; if (options.findParent) linkSwitcherTab = linkSwitcher.parent();else linkSwitcherTab = linkSwitcher; if (!linkSwitcherTab.filter('.active').length) linkSwitcherTab.first().addClass('active'); linkSwitcher.on('click', function () { var targetElement, orderNum; if (options.findParent) targetElement = jQuery(this).parent();else targetElement = jQuery(this); orderNum = targetElement.prevAll(options.lengthElement).length + 1; if (orderNum > currentPosition) gotoSlide(orderNum, 1);else gotoSlide(orderNum, -1); return false; }); } if (options.useArrows) { var $right_arrow = jQuery(options.arrowRight), $left_arrow = jQuery(options.arrowLeft); $right_arrow.on('click', function () { et_shortcodes_go_to_next_slide(); return false; }); $left_arrow.on('click', function () { et_shortcodes_go_to_previous_slide(); return false; }); } function changeTab() { if (linkSwitcherTab != '') { linkSwitcherTab.siblings().removeClass('active'); linkSwitcherTab.eq(currentPosition - 1).addClass('active'); } } function gotoSlide(slideNumber, dir) { if ($slide.filter(':animated').length) return; $activeSlide = $slide.parent().find('.et_slidecontent').eq(currentPosition - 1); if (currentPosition === slideNumber) return; $activeSlide.removeClass('et_shortcode_slide_active'); $nextSlide = $slide.parent().find('.et_slidecontent').eq(slideNumber - 1).addClass('et_shortcode_slide_active'); if ((currentPosition > slideNumber || currentPosition === 1) && dir === -1) { if (options.fx === 'slide') slideBack(500); if (options.fx === 'fade') slideFade(500); } else { if (options.fx === 'slide') slideForward(500); if (options.fx === 'fade') slideFade(500); } currentPosition = $nextSlide.prevAll('.et_slidecontent').length + 1; if (options.linksNav != '') changeTab(); if (options.sliderType === 'images' || options.sliderType === 'simple') { $et_shortcodes_mobile_controls.find('li').removeClass('et_shortcodes_active_control'); $et_shortcodes_mobile_controls.find('li').eq(currentPosition - 1).addClass('et_shortcodes_active_control'); } return false; } if (options.auto) { auto_rotate(); var pauseSlider = false; } if (options.pauseOnHover) { slidesContainer.on('mouseenter', function () { pauseSlider = true; }).on('mouseleave', function () { pauseSlider = false; }); } function auto_rotate() { interval_shortcodes = setInterval(function () { if (!pauseSlider) { if (currentPosition === slidesNum) gotoSlide(1, 1);else gotoSlide(currentPosition + 1, 1); if (options.linksNav != '') changeTab(); } }, options.autoSpeed); } function slideFade(speed) { $activeSlide.css({ 'display': 'none', 'opacity': '0' }); $nextSlide.css({ 'opacity': '0', 'display': 'block' }).animate({ opacity: 1 }, 700); } function slideForward(speed) { var next_slide_order = $nextSlide.prevAll('.et_slidecontent').length + 1, go_to_first_slide = false; if ($activeSlide.next('.et_slidecontent_cloned').length) { next_slide_order = $activeSlide.prevAll().length + 1; go_to_first_slide = true; } $slides_wrapper_box.animate({ left: -($slides_wrapper.width() * next_slide_order) }, 500, function () { if (go_to_first_slide) { $slides_wrapper_box.css('left', -$slides_wrapper.width() + 'px'); } }); } function slideBack(speed) { var next_slide_order = $nextSlide.prevAll('.et_slidecontent').length + 1, go_to_last_slide = false; if ($activeSlide.prev('.et_slidecontent_cloned').length) { next_slide_order = 0; go_to_last_slide = true; } $slides_wrapper_box.animate({ left: -($slides_wrapper.width() * next_slide_order) }, 500, function () { if (go_to_last_slide) { $slides_wrapper_box.css('left', -($slides_wrapper.width() * slidesNum) + 'px'); } }); } if (options.fx === 'slide') { $(window).on('resize', function () { $slides_wrapper_box.find('>div').css({ 'width': $slides_wrapper.width() + 'px' }); $slides_wrapper_box.css('left', -($slides_wrapper.width() * currentPosition) + 'px'); }); } et_generate_mobile_nav(); function et_generate_mobile_nav() { var et_shortcodes_slides_num = slidesContainer.find('.et_slidecontent').length, et_shortcodes_controllers_html = ''; if (et_shortcodes_slides_num > 1 && (options.sliderType === 'images' || options.sliderType === 'simple')) { slidesContainer.append('
' + '' + '' + '
'); $et_shortcodes_mobile_controls = slidesContainer.find('.et_shortcodes_controls'); for (var i = 0; i < et_shortcodes_slides_num; i++) { et_shortcodes_controllers_html += '
  • '; } $et_shortcodes_mobile_controls.prepend(et_shortcodes_controllers_html); $et_shortcodes_mobile_controls.find('li').first().addClass('et_shortcodes_active_control'); $et_shortcodes_mobile_controls.find('a').on('click', function () { var $this_control = $(this), $this_control_li = $this_control.parent('li'), this_order = $this_control_li.prevAll().length + 1; if (this_order == currentPosition) return false; if (this_order > currentPosition) gotoSlide(this_order, 1);else gotoSlide(this_order, -1); return false; }); $et_shortcodes_mobile_nav = slidesContainer.find('.et_shortcodes_controls_arrows'); $et_shortcodes_mobile_nav.find('a').on('click', function () { var $this_link = jQuery(this), et_active_slide_order; if ($this_link.hasClass('et_sc_nav_next')) et_shortcodes_go_to_next_slide(); if ($this_link.hasClass('et_sc_nav_prev')) et_shortcodes_go_to_previous_slide(); $et_shortcodes_mobile_controls.find('li').removeClass('et_shortcodes_active_control'); et_active_slide_order = currentPosition - 1; $et_shortcodes_mobile_controls.find('li').eq(et_active_slide_order).addClass('et_shortcodes_active_control'); return false; }); } else if (options.sliderType !== 'images' && options.sliderType !== 'simple') { slidesContainer.prepend(''); $et_shortcodes_mobile_nav = slidesContainer.find('.et_shortcodes_mobile_nav'); $et_shortcodes_mobile_nav.find('a').on('click', function () { var $this_link = jQuery(this); if ($this_link.hasClass('et_sc_nav_next')) et_shortcodes_go_to_next_slide(); if ($this_link.hasClass('et_sc_nav_prev')) et_shortcodes_go_to_previous_slide(); return false; }); } } function et_shortcodes_go_to_next_slide() { if (currentPosition === slidesNum) gotoSlide(1, 1);else gotoSlide(currentPosition + 1, 1); if (options.linksNav != '') changeTab(); } function et_shortcodes_go_to_previous_slide() { if (currentPosition === 1) gotoSlide(slidesNum, -1);else gotoSlide(currentPosition - 1, -1); if (options.linksNav != '') changeTab(); } }); }; window.et_shortcodes_init = function ($container) { var $processed_container = typeof $container !== 'undefined' ? $container : $('body'); var $et_pricing_table_button = $processed_container.find('.pricing-table a.icon-button'); $et_tooltip = $processed_container.find('.et-tooltip'); $et_tooltip.on('mouseover mouseout', function (event) { if (event.type == 'mouseover') { $(this).find('.et-tooltip-box').stop(true, true).animate({ opacity: 'show', bottom: '25px' }, 300); } else { $(this).find('.et-tooltip-box').delay(200).animate({ opacity: 'hide', bottom: '35px' }, 300); } }); // learn more $et_learn_more = $processed_container.find('.et-learn-more .heading-more'); $et_learn_more.on('click', function () { if ($(this).hasClass('open')) { $(this).removeClass('open'); } else { $(this).addClass('open'); } $(this).parent('.et-learn-more').find('.learn-more-content').animate({ opacity: 'toggle', height: 'toggle' }, 300); }); $processed_container.find('.et-learn-more').not('.et-open').find('.learn-more-content').css({ 'visibility': 'visible', 'display': 'none' }); $et_pricing_table_button.each(function () { var $this_button = $(this), this_button_width = $this_button.width(), this_button_innerwidth = $this_button.innerWidth(); $this_button.css({ width: this_button_width + 'px', 'marginLeft': '-' + this_button_innerwidth / 2 + 'px', 'visibility': 'visible' }); }); var $et_shortcodes_tabs = $processed_container.find('.et-tabs-container, .tabs-left, .et-simple-slider, .et-image-slider'); $et_shortcodes_tabs.each(function (i) { var et_shortcodes_tab_class = $(this).attr('class'), et_shortcodes_tab_autospeed_class_value = /et_sliderauto_speed_(\d+)/g, et_shortcodes_tab_autospeed = et_shortcodes_tab_autospeed_class_value.exec(et_shortcodes_tab_class), et_shortcodes_tab_auto_class_value = /et_sliderauto_(\w+)/g, et_shortcodes_tab_auto = et_shortcodes_tab_auto_class_value.exec(et_shortcodes_tab_class), et_shortcodes_tab_type_class_value = /et_slidertype_(\w+)/g, et_shortcodes_tab_type = et_shortcodes_tab_type_class_value.exec(et_shortcodes_tab_class), et_shortcodes_tab_fx_class_value = /et_sliderfx_(\w+)/g, et_shortcodes_tab_fx = et_shortcodes_tab_fx_class_value.exec(et_shortcodes_tab_class), et_shortcodes_tab_apply_to_element = '.et-tabs-content', et_shortcodes_tab_settings = {}; et_shortcodes_tab_settings.linksNav = $(this).find('.et-tabs-control li a'); et_shortcodes_tab_settings.findParent = true; et_shortcodes_tab_settings.fx = et_shortcodes_tab_fx[1]; et_shortcodes_tab_settings.auto = 'false' === et_shortcodes_tab_auto[1] ? false : true; et_shortcodes_tab_settings.autoSpeed = et_shortcodes_tab_autospeed[1]; if ('simple' === et_shortcodes_tab_type[1]) { et_shortcodes_tab_settings = {}; et_shortcodes_tab_settings.fx = et_shortcodes_tab_fx[1]; et_shortcodes_tab_settings.auto = 'false' === et_shortcodes_tab_auto[1] ? false : true; et_shortcodes_tab_settings.autoSpeed = et_shortcodes_tab_autospeed[1]; et_shortcodes_tab_settings.sliderType = 'simple'; et_shortcodes_tab_apply_to_element = '.et-simple-slides'; } else if ('images' === et_shortcodes_tab_type[1]) { et_shortcodes_tab_settings.sliderType = 'images'; et_shortcodes_tab_settings.linksNav = '#' + $(this).attr('id') + ' .controllers a.switch'; et_shortcodes_tab_settings.findParent = false; et_shortcodes_tab_settings.lengthElement = '#' + $(this).attr('id') + ' a.switch'; et_shortcodes_tab_apply_to_element = '.et-image-slides'; } $(this).find(et_shortcodes_tab_apply_to_element).et_shortcodes_switcher(et_shortcodes_tab_settings); }); }; })(jQuery); // end et_switcher plugin v2 /////// Shortcodes Javascript /////// jQuery(function ($) { window.et_shortcodes_init(); }); /***/ }), /***/ "./includes/builder/.webpack/scripts.js": /*!**********************************************!*\ !*** ./includes/builder/.webpack/scripts.js ***! \**********************************************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _scripts_ext_waypoints_min_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../scripts/ext/waypoints.min.js */ "./includes/builder/scripts/ext/waypoints.min.js"); /* harmony import */ var _scripts_ext_waypoints_min_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_scripts_ext_waypoints_min_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _frontend_builder_build_frontend_builder_global_functions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../frontend-builder/build/frontend-builder-global-functions.js */ "./includes/builder/frontend-builder/build/frontend-builder-global-functions.js"); /* harmony import */ var _frontend_builder_build_frontend_builder_global_functions_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_frontend_builder_build_frontend_builder_global_functions_js__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _frontend_builder_build_frontend_builder_scripts_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../frontend-builder/build/frontend-builder-scripts.js */ "./includes/builder/frontend-builder/build/frontend-builder-scripts.js"); /* harmony import */ var _frontend_builder_build_frontend_builder_scripts_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_frontend_builder_build_frontend_builder_scripts_js__WEBPACK_IMPORTED_MODULE_2__); /***/ }), /***/ "./includes/builder/frontend-builder/build/frontend-builder-global-functions.js": /*!**************************************************************************************!*\ !*** ./includes/builder/frontend-builder/build/frontend-builder-global-functions.js ***! \**************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { function _typeof2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } (function (e, a) { for (var i in a) { e[i] = a[i]; } })(window, /******/ function (modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if (installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function (exports, name, getter) { /******/ if (!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function (exports) { /******/ if (typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function (value, mode) { /******/ if (mode & 1) value = __webpack_require__(value); /******/ if (mode & 8) return value; /******/ if (mode & 4 && _typeof2(value) === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if (mode & 2 && typeof value != 'string') for (var key in value) { __webpack_require__.d(ns, key, function (key) { return value[key]; }.bind(null, key)); } /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function (module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function (object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "http://0.0.0.0:31495/"; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "../scripts/frontend/global-functions.js"); /******/ }( /************************************************************************/ /******/ { /***/ "../../../core/admin/js/frame-helpers.js": /*!*********************************************************************************************************!*\ !*** /Users/slava/Local Sites/dividev/app/public/wp-content/themes/Divi/core/admin/js/frame-helpers.js ***! \*********************************************************************************************************/ /*! no static exports found */ /***/ function coreAdminJsFrameHelpersJs(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.top_window = exports.is_iframe = void 0; /* ,-,- / / | ,-' _/ / / (-_ _,-' `Z_/ "#: ,-'_,-. \ _ #' _(_-'_()\ \" | ,--_,--' | / "" L-'\ \,--^---v--v-._ / \ | \_________________,-' | \ \ \ NOTE: The code in this file will be executed multiple times! */ var top_window = window; exports.top_window = top_window; var is_iframe = false; exports.is_iframe = is_iframe; var top; try { // Have to access top window's prop (document) to trigger same-origin DOMException // so we can catch it and act accordingly. top = window.top.document ? window.top : false; } catch (e) { // Can't access top, it means we're inside a different domain iframe. top = false; } if (top && top.__Cypress__) { if (window.parent === top) { exports.top_window = top_window = window; exports.is_iframe = is_iframe = false; } else { exports.top_window = top_window = window.parent; exports.is_iframe = is_iframe = true; } } else if (top) { exports.top_window = top_window = top; exports.is_iframe = is_iframe = top !== window.self; } /***/ }, /***/ "../scripts/frontend/global-functions.js": /*!***********************************************!*\ !*** ../scripts/frontend/global-functions.js ***! \***********************************************/ /*! no static exports found */ /***/ function scriptsFrontendGlobalFunctionsJs(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */ (function (jQuery) { var _frameHelpers = __webpack_require__( /*! @core/admin/js/frame-helpers */ "../../../core/admin/js/frame-helpers.js"); var _utils = __webpack_require__( /*! ../utils/utils */ "../scripts/utils/utils.js"); var _sticky = __webpack_require__( /*! ../utils/sticky */ "../scripts/utils/sticky.js"); // Internal Dependencies (function ($) { var isBlockLayoutPreview = $('body').hasClass('et-block-layout-preview'); var $tbHeader = $('.et-l--header').first(); var tbHeaderAllFixedSectionHeight = 0; // Modification of underscore's _.debounce() // Underscore.js 1.8.3 // http://underscorejs.org // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors // Underscore may be freely distributed under the MIT license. window.et_pb_debounce = function (func, wait, immediate) { var timeout; var args; var context; var timestamp; var result; var now = Date.now || new Date().getTime(); var later = function later() { var last = now - timestamp; if (last < wait && last >= 0) { timeout = setTimeout(later, wait - last); } else { timeout = null; if (!immediate) { result = func.apply(context, args); if (!timeout) context = args = null; } } }; return function () { context = this; args = arguments; timestamp = now; var callNow = immediate && !timeout; if (!timeout) timeout = setTimeout(later, wait); if (callNow) { result = func.apply(context, args); context = args = null; } return result; }; }; if ($tbHeader.length) { var $tbHeaderSections = $tbHeader.find('.et_builder_inner_content').children('.et_pb_section--fixed'); // Get the most tall header fixed section height var et_pb_header_most_lengthy_fixed_section_height = et_pb_debounce(function (e) { tbHeaderAllFixedSectionHeight = 0; $.each($tbHeaderSections, function (index, section) { var $sectionHeight = $(section).outerHeight(true); tbHeaderAllFixedSectionHeight += $sectionHeight; }); }, 300); $(window).on('resize', et_pb_header_most_lengthy_fixed_section_height); } window.et_pb_smooth_scroll = function ($target, $top_section, speed, easing) { var targetOffsetTop = $target.offset().top; var $window_width = $(window).width(); var $menu_offset = 0; var $scroll_position = 0; var $menuLeft = ''; var $menuRight = ''; var $fixedHeaderSection = $tbHeader.find('.et_pb_section'); // If the target is in sticky state there should be no scroll so we can bail early. if ((0, _sticky.isTargetStickyState)($target)) { return; } if ($('body').hasClass('et_fixed_nav') && $window_width > 980) { var topHeaderHeight = $('#top-header').outerHeight() || 0; var mainHeaderHeight = $('#main-header').outerHeight() || 0; $menu_offset = topHeaderHeight + mainHeaderHeight - 1; } else { $menu_offset = 0; } if ($('#wpadminbar').length && $window_width > 600) { var wpAdminBarHeight = $('#wpadminbar').outerHeight() || 0; $menu_offset += wpAdminBarHeight; } if ($tbHeader.length) { // attach targeted section just under header (if) fixed section if ($fixedHeaderSection.hasClass('et_pb_section--fixed')) { $menuLeft = Math.ceil(parseFloat($fixedHeaderSection.css('left'))); $menuRight = Math.ceil(parseFloat($fixedHeaderSection.css('right'))); if ($window_width < 980) { $menu_offset += 90; } } if (0 === $menuLeft + $menuRight) { $menu_offset += tbHeaderAllFixedSectionHeight; } } // Calculate offset that needs to be added due to the existence of sticky module(s). // This avoids smooth scroll to stop beneath sticky module. var closestStickyOffsetTop = (0, _sticky.getClosestStickyModuleOffsetTop)($target); if (closestStickyOffsetTop) { $menu_offset += closestStickyOffsetTop; } // fix sidenav scroll to top if ($top_section) { $scroll_position = 0; } else { $scroll_position = Math.round(targetOffsetTop) - $menu_offset; } // set swing (animate's scrollTop default) as default value if ('undefined' === typeof easing) { easing = 'swing'; } $('html, body').animate({ scrollTop: $scroll_position }, speed, easing); }; window.et_pb_form_placeholders_init = function ($form) { $form.find('input:text, input[type="email"], input[type="url"], textarea').each(function (index, domEle) { var $et_current_input = jQuery(domEle); var $et_comment_label = $et_current_input.siblings('label'); var et_comment_label_value = $et_current_input.siblings('label').text(); if ($et_comment_label.length) { $et_comment_label.hide(); if ($et_current_input.siblings('span.required')) { et_comment_label_value += $et_current_input.siblings('span.required').text(); $et_current_input.siblings('span.required').hide(); } $et_current_input.val(et_comment_label_value); } }).on('focus', function () { var et_label_text = jQuery(this).siblings('label').text(); if (jQuery(this).siblings('span.required').length) et_label_text += jQuery(this).siblings('span.required').text(); if (jQuery(this).val() === et_label_text) jQuery(this).val(''); }).on('blur', function () { var et_label_text = jQuery(this).siblings('label').text(); if (jQuery(this).siblings('span.required').length) et_label_text += jQuery(this).siblings('span.required').text(); if ('' === jQuery(this).val()) jQuery(this).val(et_label_text); }); }; window.et_duplicate_menu = function (menu, append_to, menu_id, menu_class, menu_click_event) { append_to.each(function () { var $this_menu = $(this); var $cloned_nav; // Bail early if menu has already been duplicated. if ($this_menu.find("#".concat(menu_id)).length) { return; } // make this function work with existing menus, without cloning if ('' !== menu) { menu.clone().attr('id', menu_id).removeClass().attr('class', menu_class).appendTo($this_menu); } $cloned_nav = $this_menu.find('> ul'); $cloned_nav.find('.menu_slide').remove(); $cloned_nav.find('.et_pb_menu__logo-slot').remove(); $cloned_nav.find('li').first().addClass('et_first_mobile_item'); $cloned_nav.find('a').on('click', function () { $(this).parents('.et_mobile_menu').siblings('.mobile_menu_bar').trigger('click'); }); if ('no_click_event' !== menu_click_event) { if (_utils.isBuilder) { $this_menu.off('click'); } var $this_menu_section = $this_menu.closest('.et_pb_section'); var $this_menu_row = $this_menu.closest('.et_pb_row'); var $this_menu_sec_has_radius = $this_menu_section.css('border-radius') !== '0px'; var $this_menu_row_has_radius = $this_menu_row.css('border-radius') !== '0px'; $this_menu.on('click', '.mobile_menu_bar', function () { // Close all other open menus. $('.mobile_nav.opened .mobile_menu_bar').not($(this)).trigger('click'); if ($this_menu.hasClass('closed')) { $this_menu.removeClass('closed').addClass('opened'); if ($this_menu_sec_has_radius || $this_menu_row_has_radius) { $this_menu_section.css('overflow', 'visible'); $this_menu_row.css('overflow', 'visible'); } $cloned_nav.stop().slideDown(500); } else { $this_menu.removeClass('opened').addClass('closed'); $cloned_nav.stop().slideUp(500); if ($this_menu_sec_has_radius || $this_menu_row_has_radius) { setTimeout(function () { $this_menu_section.css('overflow', 'hidden'); $this_menu_row.css('overflow', 'hidden'); }, 500); } } return false; }); } }); $('#mobile_menu .centered-inline-logo-wrap').remove(); }; // remove placeholder text before form submission window.et_pb_remove_placeholder_text = function ($form) { $form.find('input:text, textarea').each(function (index, domEle) { var $et_current_input = jQuery(domEle); var $et_label = $et_current_input.siblings('label'); var et_label_value = $et_current_input.siblings('label').text(); if ($et_label.length && $et_label.is(':hidden')) { if ($et_label.text() == $et_current_input.val()) $et_current_input.val(''); } }); }; window.et_fix_fullscreen_section = function () { var $et_window = isBlockLayoutPreview ? $(_frameHelpers.top_window) : $(window); $('section.et_pb_fullscreen').each(function () { var $this_section = $(this); et_calc_fullscreen_section.bind($this_section); $et_window.on('resize', et_calc_fullscreen_section.bind($this_section)); }); }; window.et_bar_counters_init = function ($bar_item) { if (!$bar_item.length) { return; } $bar_item.css({ width: "".concat(parseFloat($bar_item.attr('data-width')), "%") }); }; window.et_fix_pricing_currency_position = function ($pricing_table) { setTimeout(function () { var $all_pricing_tables = typeof $pricing_table !== 'undefined' ? $pricing_table : $('.et_pb_pricing_table'); if (!$all_pricing_tables.length) { return; } $all_pricing_tables.each(function () { var $this_table = $(this); var $price_container = $this_table.find('.et_pb_et_price'); var $currency = $price_container.length ? $price_container.find('.et_pb_dollar_sign') : false; var $price = $price_container.length ? $price_container.find('.et_pb_sum') : false; if (!$currency || !$price) { return; } // adjust the margin of currency sign to make sure it doesn't overflow the price $currency.css({ marginLeft: "".concat(-$currency.width(), "px") }); }); }, 1); }; window.et_pb_set_responsive_grid = function ($grid_items_container, single_item_selector) { setTimeout(function () { var container_width = $grid_items_container.innerWidth(); var $grid_items = $grid_items_container.find(single_item_selector); var item_width = $grid_items.outerWidth(true); var last_item_margin = item_width - $grid_items.outerWidth(); var columns_count = Math.round((container_width + last_item_margin) / item_width); var counter = 1; var first_in_row = 1; var $first_in_last_row = $(); $grid_items.removeClass('last_in_row first_in_row on_last_row'); $grid_items.filter(':visible').each(function () { var $this_element = $(this); if (!$this_element.hasClass('inactive')) { if (first_in_row === counter) { $this_element.addClass('first_in_row'); $first_in_last_row = $this_element; } else if (0 === counter % columns_count) { $this_element.addClass('last_in_row'); first_in_row = counter + 1; } counter++; } }); if ($first_in_last_row.length) { var $module = $first_in_last_row.parents('.et_pb_module'); // set margin bottom to 0 if the gallery is the last module on the column if ($module.is(':last-child')) { var column = $first_in_last_row.parents('.et_pb_column')[0]; $(column).find('.et_pb_grid_item').removeClass('on_last_row'); // keep gutter margin if gallery has pagination var pagination = $module.find('.et_pb_gallery_pagination'); if (0 === pagination.length) { pagination = $module.find('.et_pb_portofolio_pagination'); } if (0 === pagination.length || pagination.length > 0 && !pagination.is(':visible')) { if (columns_count > 1) { $first_in_last_row.addClass('on_last_row'); } $first_in_last_row.nextAll().addClass('on_last_row'); } } } }, 1); // need this timeout to make sure all the css applied before calculating sizes }; window.et_pb_set_tabs_height = function ($tabs_module) { if ('undefined' === typeof $tabs_module) { $tabs_module = $('.et_pb_tabs'); } if (!$tabs_module.length) { return; } $tabs_module.each(function () { var $tab_controls = $(this).find('.et_pb_tabs_controls'); var $all_tabs = $tab_controls.find('li'); var max_height = 0; var small_columns = '.et_pb_column_1_3, .et_pb_column_1_4, .et_pb_column_3_8'; var in_small_column = $(this).parents(small_columns).length > 0; var on_small_screen = parseFloat($(window).width()) < 768; var vertically_stacked = in_small_column || on_small_screen; if (vertically_stacked) { $(this).addClass('et_pb_tabs_vertically_stacked'); } // determine the height of the tallest tab if ($all_tabs.length) { // remove the height attribute if it was added to calculate the height correctly $tab_controls.children('li').removeAttr('style'); $all_tabs.each(function () { var tab_height = $(this).outerHeight(); if (vertically_stacked) { return; } if (tab_height > max_height) { max_height = tab_height; } }); } if (0 !== max_height) { // set the height of tabs container based on the height of the tallest tab $tab_controls.children('li').css('height', "".concat(max_height, "px")); } }); }; window.et_pb_box_shadow_apply_overlay = function (el) { var pointerEventsSupport = document.body.style.pointerEvents !== undefined // For some reasons IE 10 tells that supports pointer-events, but it doesn't && (document.documentMode === undefined || document.documentMode >= 11); if (pointerEventsSupport) { $(el).each(function () { if (!$(this).children('.box-shadow-overlay').length) { $(this).addClass('has-box-shadow-overlay').prepend('
    '); } }); } else { $(el).addClass('.et-box-shadow-no-overlay'); } }; window.et_pb_init_nav_menu = function ($et_menus) { $et_menus.each(function () { var $et_menu = $(this); // don't attach event handlers several times to the same menu if ($et_menu.data('et-is-menu-ready')) { return; } $et_menu.find('li').on('mouseenter', function () { window.et_pb_toggle_nav_menu($(this), 'open'); }).on('mouseleave', function () { window.et_pb_toggle_nav_menu($(this), 'close'); }); // close all opened menus on touch outside the menu $('body').on('touchend', function (event) { if ($(event.target).closest('ul.nav, ul.menu').length < 1 && $('.et-hover').length > 0) { window.et_pb_toggle_nav_menu($('.et-hover'), 'close'); } }); // Dropdown menu adjustment for touch screen $et_menu.find('li.menu-item-has-children').on('touchend', function (event) { var $closest_li = $(event.target).closest('.menu-item'); // no need special processing if parent li doesn't have hidden child elements if (!$closest_li.hasClass('menu-item-has-children')) { return; } var $this_el = $(this); var is_mega_menu_opened = $closest_li.closest('.mega-menu-parent.et-touch-hover').length > 0; // open submenu on 1st tap // open link on second tap if ($this_el.hasClass('et-touch-hover') || is_mega_menu_opened) { var href = $this_el.find('>a').attr('href'); if (typeof href !== 'undefined') { // if parent link is not empty then open the link window.location = $this_el.find('>a').attr('href'); } } else { var $opened_menu = $(event.target); var $already_opened_menus = $opened_menu.closest('.menu-item').siblings('.et-touch-hover'); // close the menu before opening new one if ($opened_menu.closest('.et-touch-hover').length < 1) { window.et_pb_toggle_nav_menu($('.et-hover'), 'close', 0); } $this_el.addClass('et-touch-hover'); if ($already_opened_menus.length > 0) { var $submenus_in_already_opened = $already_opened_menus.find('.et-touch-hover'); // close already opened submenus to avoid overlaps window.et_pb_toggle_nav_menu($already_opened_menus, 'close'); window.et_pb_toggle_nav_menu($submenus_in_already_opened, 'close'); } // open new submenu window.et_pb_toggle_nav_menu($this_el, 'open'); } event.preventDefault(); event.stopPropagation(); }); $et_menu.find('li.mega-menu').each(function () { var $li_mega_menu = $(this); var $li_mega_menu_item = $li_mega_menu.children('ul').children('li'); var li_mega_menu_item_count = $li_mega_menu_item.length; if (li_mega_menu_item_count < 4) { $li_mega_menu.addClass("mega-menu-parent mega-menu-parent-".concat(li_mega_menu_item_count)); } }); // mark the menu as ready $et_menu.data('et-is-menu-ready', 'ready'); }); }; window.et_pb_toggle_nav_menu = function ($element, state, delay) { if ('open' === state) { if (!$element.closest('li.mega-menu').length || $element.hasClass('mega-menu')) { $element.addClass('et-show-dropdown'); $element.removeClass('et-hover').addClass('et-hover'); } } else { var closeDelay = typeof delay !== 'undefined' ? delay : 200; $element.removeClass('et-show-dropdown'); $element.removeClass('et-touch-hover'); setTimeout(function () { if (!$element.hasClass('et-show-dropdown')) { $element.removeClass('et-hover'); } }, closeDelay); } }; window.et_pb_apply_sticky_image_effect = function ($sticky_image_el) { var $row = $sticky_image_el.closest('.et_pb_row'); var $section = $row.closest('.et_pb_section'); var $column = $sticky_image_el.closest('.et_pb_column'); var sticky_class = 'et_pb_section_sticky'; var sticky_mobile_class = 'et_pb_section_sticky_mobile'; var $lastRowInSection = $section.children('.et_pb_row').last(); var $lastColumnInRow = $row.children('.et_pb_column').last(); var $lastModuleInColumn = $column.children('.et_pb_module').last(); // If it is not in the last row, continue if (!$row.is($lastRowInSection)) { return true; } $lastRowInSection.addClass('et-last-child'); // Make sure sticky image is the last element in the column if (!$sticky_image_el.is($lastModuleInColumn)) { return true; } // If it is in the last row, find the parent section and attach new class to it if (!$section.hasClass(sticky_class)) { $section.addClass(sticky_class); } $column.addClass('et_pb_row_sticky'); if (!$section.hasClass(sticky_mobile_class) && $column.is($lastColumnInRow)) { $section.addClass(sticky_mobile_class); } }; /** * Inject a
  • element in the middle of a menu for the purposes of the menu module's * inline centered logo style. * * @since 4.0 * * @param {object} menu * * @returns {object|null} */ window.et_pb_menu_inject_inline_centered_logo = function (menu) { var $listItems = $(menu).find('nav > ul > li'); var index = Math.round($listItems.length / 2); var li = window.et_pb_menu_inject_item(menu, index, true); if (li) { $(li).addClass('et_pb_menu__logo-slot'); } return li; }; /** * Inject a
  • element at the start of a menu for the purposes of the menu module's * additional icons. * * @since 4.0 * * @param {object} menu * @param {number} index * @param {boolean} fromTheBeginning * * @returns {object|null} */ window.et_pb_menu_inject_item = function (menu, index, fromTheBeginning) { fromTheBeginning = undefined === fromTheBeginning ? true : fromTheBeginning; index = Math.max(index, 0); var $list = $(menu).find('nav > ul').first(); if (0 === $list.length) { return null; } var $listItems = $list.find('> li'); var $li = $('
  • '); if (0 === $listItems.length) { $list.append($li); } else { var action = fromTheBeginning ? 'before' : 'after'; var $sibling = fromTheBeginning ? $listItems.eq(index) : $listItems.eq($listItems.length - 1 - index); if (0 === $sibling.length) { action = fromTheBeginning ? 'after' : 'before'; $sibling = fromTheBeginning ? $listItems.last() : $listItems.first(); } $sibling[action]($li); } return $li.get(0); }; /** * Reposition menu module dropdowns. * This is necessary due to mega menus relying on an upper wrapper's width but * still needing to be position relative to their parent li. * * @since 4.0 * * @returns {void} */ window.et_pb_reposition_menu_module_dropdowns = et_pb_debounce(function (menus) { var $menus = menus ? $(menus) : $('.et_pb_menu, .et_pb_fullwidth_menu'); $menus.each(function () { var $row = $(this).find('.et_pb_row').first(); if (0 === $row.length) { return true; // = continue. } var offset = $row.offset().top; var moduleClass = $(this).attr('class').replace(/^.*?(et_pb(?:_fullwidth)?_menu_\d+[^\s]*).*$/i, '$1'); var isUpwards = $(this).find('.et_pb_menu__menu ul').first().hasClass('upwards'); var selector = '.et_pb_menu__menu > nav > ul > li.mega-menu.menu-item-has-children'; var css = ''; $(this).find(selector).each(function () { var $li = $(this); var liId = $li.attr('class').replace(/^.*?(menu-item-\d+).*$/i, '$1'); var selector = ".".concat(moduleClass, " li.").concat(liId, " > .sub-menu"); if (isUpwards) { // Offset by 1px to ensure smooth mouse hover. var linkOffset = Math.floor(offset + $row.outerHeight() - $li.offset().top) - 1; css += "".concat(selector, "{ bottom: ").concat(linkOffset.toString(), "px !important; }"); } else { // Offset by 1px to ensure smooth mouse hover. var linkOffset = Math.floor($li.offset().top + $li.outerHeight() - offset) - 1; css += "".concat(selector, "{ top: ").concat(linkOffset.toString(), "px !important; }"); } }); var $style = $("style.et-menu-style-".concat(moduleClass)).first(); if (0 === $style.length) { $style = $(''); $style.addClass('et-menu-style'); $style.addClass("et-menu-style-".concat(moduleClass)); $style.appendTo($('head')); } var oldCss = $style.html(); if (css !== oldCss) { $style.html(css); } }); }, 200); })(jQuery); /* WEBPACK VAR INJECTION */ }).call(this, __webpack_require__( /*! jquery */ "jquery")); /***/ }, /***/ "../scripts/utils/sticky.js": /*!**********************************!*\ !*** ../scripts/utils/sticky.js ***! \**********************************/ /*! no static exports found */ /***/ function scriptsUtilsStickyJs(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.trimTransitionValue = exports.isTargetStickyState = exports.getStickyStyles = exports.getLimitSelector = exports.getLimit = exports.getClosestStickyModuleOffsetTop = exports.filterInvalidModules = void 0; var _filter = _interopRequireDefault(__webpack_require__( /*! lodash/filter */ "./node_modules/lodash/filter.js")); var _forEach = _interopRequireDefault(__webpack_require__( /*! lodash/forEach */ "./node_modules/lodash/forEach.js")); var _get = _interopRequireDefault(__webpack_require__( /*! lodash/get */ "./node_modules/lodash/get.js")); var _head = _interopRequireDefault(__webpack_require__( /*! lodash/head */ "./node_modules/lodash/head.js")); var _includes = _interopRequireDefault(__webpack_require__( /*! lodash/includes */ "./node_modules/lodash/includes.js")); var _isEmpty = _interopRequireDefault(__webpack_require__( /*! lodash/isEmpty */ "./node_modules/lodash/isEmpty.js")); var _isString = _interopRequireDefault(__webpack_require__( /*! lodash/isString */ "./node_modules/lodash/isString.js")); var _jquery = _interopRequireDefault(__webpack_require__( /*! jquery */ "jquery")); var _utils = __webpack_require__( /*! ./utils */ "../scripts/utils/utils.js"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** * Get top / bottom limit attributes. * * @since 4.6.0 * @param {object} $selector * @param limit * @param {string} * @returns {object} * @returns {string} Object.limit. * @returns {number} Object.height. * @returns {number} Object.width. * @return {object} object.offsets * @return {number} object.offsets.top * @return {number} object.offsets.right * @return {number} object.offsets.bottom * @return {number} object.offsets.left */ var getLimit = function getLimit($selector, limit) { // @todo update valid limits based on selector var validLimits = ['body', 'section', 'row', 'column']; if (!(0, _includes.default)(validLimits, limit)) { return false; } // Limit selector var $limitSelector = getLimitSelector($selector, limit); if (!$limitSelector) { return false; } var height = $limitSelector.outerHeight(); var width = $limitSelector.outerWidth(); return { limit: limit, height: height, width: width, offsets: (0, _utils.getOffsets)($limitSelector, width, height) }; }; /** * Get top / bottom limit selector based on given name. * * @since 4.6.0 * * @param {object} $selector * @param {string} limit * * @returns {bool|object} */ exports.getLimit = getLimit; var getLimitSelector = function getLimitSelector($selector, limit) { var parentSelector = false; switch (limit) { case 'body': parentSelector = '.et_builder_inner_content'; break; case 'section': parentSelector = '.et_pb_section'; break; case 'row': parentSelector = '.et_pb_row'; break; case 'column': parentSelector = '.et_pb_column'; break; default: break; } return parentSelector ? $selector.closest(parentSelector) : false; }; /** * Filter invalid sticky modules * 1. Sticky module inside another sticky module. * * @param {object} modules * @param {object} currentModules * * @since 4.6.0 */ exports.getLimitSelector = getLimitSelector; var filterInvalidModules = function filterInvalidModules(modules) { var currentModules = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var filteredModules = {}; (0, _forEach.default)(modules, function (module, key) { // If current sticky module is inside another sticky module, ignore current module if ((0, _jquery.default)(module.selector).parents('.et_pb_sticky_module').length > 0) { return; } // Repopulate the module list if (!(0, _isEmpty.default)(currentModules) && currentModules[key]) { // Keep props that isn't available on incoming modules intact filteredModules[key] = _objectSpread(_objectSpread({}, currentModules[key]), module); } else { filteredModules[key] = module; } }); return filteredModules; }; /** * Get sticky style of given module by cloning, adding sticky state classname, appending DOM, * retrieving value, then immediately the cloned DOM. This is needed for property that is most * likely to be affected by transition if the sticky value is retrieved on the fly, thus it needs * to be retrieved ahead its time by this approach. * * @since 4.6.0 * * @param {string} id * @param {object} $module * @param {object} $placeholder * * @returns {object} */ exports.filterInvalidModules = filterInvalidModules; var getStickyStyles = function getStickyStyles(id, $module, $placeholder) { // Sticky state classname to be added; these will make cloned module to have fixed position and // make sticky style take effect var stickyStyleClassname = 'et_pb_sticky et_pb_sticky_style_dom'; // Cloned the module add sticky state classname; set the opacity to 0 and remove the transition // so the dimension can be immediately retrieved var $stickyStyleDom = $module.clone().addClass(stickyStyleClassname).attr({ 'data-sticky-style-dom-id': id, // Remove inline styles so on-page styles works. Especially needed if module is in sticky state style: '' }).css({ opacity: 0, transition: 'none', animation: 'none' }); // Cloned module might contain image. However the image might take more than a milisecond to be // loaded on the cloned module after the module is appended to the layout EVEN IF the image on // the $module has been loaded. This might load to inaccurate sticky style calculation. To avoid // it, recreate the image by getting actual width and height then recreate the image using SVG $stickyStyleDom.find('img').each(function (index) { var $img = (0, _jquery.default)(this); var $measuredImg = $module.find('img').eq(index); var measuredWidth = (0, _get.default)($measuredImg, [0, 'naturalWidth'], $module.find('img').eq(index).outerWidth()); var measuredHeight = (0, _get.default)($measuredImg, [0, 'naturalHeight'], $module.find('img').eq(index).outerHeight()); $img.attr({ // Remove scrse to force DOM to use src scrset: '', // Recreate svg to use image's actual width so the image reacts appropriately when sticky // style modifies image dimension (eg image has 100% and padding in sticky style is larger; // this will resulting in image being smaller because the wrapper dimension is smaller) src: "data:image/svg+xml;utf8,") }); }); // Append the cloned DOM $module.after($stickyStyleDom); // Get inline margin style value that is substraction of sticky style - style due to position // relative to fixed change var getMarginStyle = function getMarginStyle(corner) { var marginPropName = "margin".concat(corner); var $normalModule = $module.hasClass('et_pb_sticky') ? $placeholder : $module; return parseFloat($stickyStyleDom.css(marginPropName)) - parseFloat($normalModule.css(marginPropName)); }; // Measure sticky style DOM properties var styles = { height: $stickyStyleDom.outerHeight(), width: $stickyStyleDom.outerWidth(), marginRight: getMarginStyle('Right'), marginLeft: getMarginStyle('Left'), padding: $stickyStyleDom.css('padding') }; // Immediately remove the cloned DOM (0, _jquery.default)(".et_pb_sticky_style_dom[data-sticky-style-dom-id=\"".concat(id, "\"]")).remove(); return styles; }; /** * Remove given property's transition from transition property's value. To make some properties * (eg. Width, top, left) transition smoothly when entering / leaving sticky state, its property * and transition need to be removed then re-added 50ms later. This is mostly happened because the * module positioning changed from relative to fixed when entering/leaving sticky state. * * @since 4.6.0 * * @param {string} transitionValue * @param {Array} trimmedProperties * * @returns {string} */ exports.getStickyStyles = getStickyStyles; var trimTransitionValue = function trimTransitionValue(transitionValue, trimmedProperties) { // Make sure that transitionValue is string. Otherwise split will throw error if (!(0, _isString.default)(transitionValue)) { transitionValue = ''; } var transitions = transitionValue.split(', '); var trimmedValue = (0, _filter.default)(transitions, function (transition) { return !(0, _includes.default)(trimmedProperties, (0, _head.default)(transition.split(' '))); }); return (0, _isEmpty.default)(trimmedValue) ? 'none' : trimmedValue.join(', '); }; /** * Calculate automatic offset that should be given based on sum of heights of all sticky modules * that are currently in sticky state when window reaches $target's offset. * * @since 4.6.0 * * @param {object} $target * * @returns {number} */ exports.trimTransitionValue = trimTransitionValue; var getClosestStickyModuleOffsetTop = function getClosestStickyModuleOffsetTop($target) { var offset = $target.offset(); offset.right = offset.left + $target.outerWidth(); var closestStickyElement = null; var closestStickyOffsetTop = 0; // Get all sticky module data from store. NOTE: this util might be used on various output build // so it needs to get sticky store value via global object instead of importing it var stickyModules = (0, _get.default)(window.ET_FE, 'stores.sticky.modules', {}); // Loop sticky module data to get the closest sticky module to given y offset. Sticky module // already has map of valid modules it needs to consider as automatic offset due to // adjacent-column situation. // @see https://github.com/elegantthemes/Divi/issues/19432 (0, _forEach.default)(stickyModules, function (stickyModule) { // Ignore sticky module if it is stuck to bottom if (!(0, _includes.default)(['top_bottom', 'top'], stickyModule.position)) { return; } // Ignore if $target is sticky module (that sticks to top; stuck to bottom check above has // made sure of it) - otherwise the auto-generate offset will subtract the element's offset // and causing the scroll never reaches $target location. // @see https://github.com/elegantthemes/Divi/issues/23240 if ($target.is((0, _get.default)(stickyModule, 'selector'))) { return; } // Ignore if sticky module's right edge doesn't collide with target's left edge if ((0, _get.default)(stickyModule, 'offsets.right', 0) < offset.left) { return; } // Ignore if sticky module's left edge doesn't collide with target's right edge if ((0, _get.default)(stickyModule, 'offsets.left', 0) > offset.right) { return; } // Ignore sticky module if it is located below given y offset if ((0, _get.default)(stickyModule, 'offsets.top', 0) > offset.top) { return; } // Ignore sticky module if its bottom limit is higher than given y offset var bottomLimitBottom = (0, _get.default)(stickyModule, 'bottomLimitSettings.offsets.bottom'); if (bottomLimitBottom && bottomLimitBottom < offset.top) { return; } closestStickyElement = stickyModule; }); // Once closest sticky module to given y offset has been found, loop its topOffsetModules, get // each module's heightSticky and return the sum of their heights if ((0, _get.default)(closestStickyElement, 'topOffsetModules', false)) { (0, _forEach.default)((0, _get.default)(closestStickyElement, 'topOffsetModules', []), function (stickyId) { // Get sticky module's height on sticky state; fallback to height just to be safe var stickyModuleHeight = (0, _get.default)(stickyModules, [stickyId, 'heightSticky'], (0, _get.default)(stickyModules, [stickyId, 'height'], 0)); // Sum up top offset module's height closestStickyOffsetTop += stickyModuleHeight; }); // Get closest-to-y-offset's sticky module's height on sticky state; var closestStickyElementHeight = (0, _get.default)(stickyModules, [closestStickyElement.id, 'heightSticky'], (0, _get.default)(stickyModules, [closestStickyElement.id, 'height'], 0)); // Sum up top offset module's height closestStickyOffsetTop += closestStickyElementHeight; } return closestStickyOffsetTop; }; /** * Determine if the target is in sticky state. * * @since 4.9.5 * * @param {object} $target * * @returns {bool} */ exports.getClosestStickyModuleOffsetTop = getClosestStickyModuleOffsetTop; var isTargetStickyState = function isTargetStickyState($target) { var stickyModules = (0, _get.default)(window.ET_FE, 'stores.sticky.modules', {}); var isStickyState = false; (0, _forEach.default)(stickyModules, function (stickyModule) { var isTarget = $target.is((0, _get.default)(stickyModule, 'selector')); var isSticky = stickyModule.isSticky, isPaused = stickyModule.isPaused; // If the target is in sticky state and not paused, set isStickyState to true and exit iteration. // Elements can have a sticky limit (ex: section) in which case they can be sticky but paused. if (isTarget && isSticky && !isPaused) { isStickyState = true; return false; // Exit iteration. } }); return isStickyState; }; exports.isTargetStickyState = isTargetStickyState; /***/ }, /***/ "../scripts/utils/utils.js": /*!*********************************!*\ !*** ../scripts/utils/utils.js ***! \*********************************/ /*! no static exports found */ /***/ function scriptsUtilsUtilsJs(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setImportantInlineValue = exports.registerFrontendComponent = exports.maybeIncreaseEmitterMaxListeners = exports.maybeDecreaseEmitterMaxListeners = exports.isVB = exports.isTB = exports.isLBP = exports.isLBB = exports.isFE = exports.isExtraTheme = exports.isDiviTheme = exports.isBuilderType = exports.isBuilder = exports.isBlockEditor = exports.isBFB = exports.is = exports.getOffsets = void 0; var _includes = _interopRequireDefault(__webpack_require__( /*! lodash/includes */ "./node_modules/lodash/includes.js")); var _get = _interopRequireDefault(__webpack_require__( /*! lodash/get */ "./node_modules/lodash/get.js")); var _jquery = _interopRequireDefault(__webpack_require__( /*! jquery */ "jquery")); var _frameHelpers = __webpack_require__( /*! @core/admin/js/frame-helpers */ "../../../core/admin/js/frame-helpers.js"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } /** * Check current page's builder Type. * * @since 4.6.0 * * @param {string} builderType Fe|vb|bfb|tb|lbb|lbp. * * @returns {bool} */ var isBuilderType = function isBuilderType(builderType) { return builderType === window.et_builder_utils_params.builderType; }; /** * Return condition value. * * @since 4.6.0 * * @param {string} conditionName * * @returns {bool} */ exports.isBuilderType = isBuilderType; var is = function is(conditionName) { return window.et_builder_utils_params.condition[conditionName]; }; /** * Is current page Frontend. * * @since 4.6.0 * * @type {bool} */ exports.is = is; var isFE = isBuilderType('fe'); /** * Is current page Visual Builder. * * @since 4.6.0 * * @type {bool} */ exports.isFE = isFE; var isVB = isBuilderType('vb'); /** * Is current page BFB / New Builder Experience. * * @since 4.6.0 * * @type {bool} */ exports.isVB = isVB; var isBFB = isBuilderType('bfb'); /** * Is current page Theme Builder. * * @since 4.6.0 * * @type {bool} */ exports.isBFB = isBFB; var isTB = isBuilderType('tb'); /** * Is current page Layout Block Builder. * * @type {bool} */ exports.isTB = isTB; var isLBB = isBuilderType('lbb'); /** * Is current page uses Divi Theme. * * @since 4.6.0 * * @type {bool} */ exports.isLBB = isLBB; var isDiviTheme = is('diviTheme'); /** * Is current page uses Extra Theme. * * @since 4.6.0 * * @type {bool} */ exports.isDiviTheme = isDiviTheme; var isExtraTheme = is('extraTheme'); /** * Is current page Layout Block Preview. * * @since 4.6.0 * * @type {bool} */ exports.isExtraTheme = isExtraTheme; var isLBP = isBuilderType('lbp'); /** * Check if current window is block editor window (gutenberg editing page). * * @since 4.6.0 * * @type {bool} */ exports.isLBP = isLBP; var isBlockEditor = 0 < (0, _jquery.default)(_frameHelpers.top_window.document).find('.edit-post-layout__content').length; /** * Check if current window is builder window (VB, BFB, TB, LBB). * * @since 4.6.0 * * @type {bool} */ exports.isBlockEditor = isBlockEditor; var isBuilder = (0, _includes.default)(['vb', 'bfb', 'tb', 'lbb'], window.et_builder_utils_params.builderType); /** * Get offsets value of all sides. * * @since 4.6.0 * * @param {object} $selector JQuery selector instance. * @param {number} height * @param {number} width * * @returns {object} */ exports.isBuilder = isBuilder; var getOffsets = function getOffsets($selector) { var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; var height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; // Return previously saved offset if sticky tab is active; retrieving actual offset contain risk // of incorrect offsets if sticky horizontal / vertical offset of relative position is modified. var isStickyTabActive = isBuilder && $selector.hasClass('et_pb_sticky') && 'fixed' !== $selector.css('position'); var cachedOffsets = $selector.data('et-offsets'); var cachedDevice = $selector.data('et-offsets-device'); var currentDevice = (0, _get.default)(window.ET_FE, 'stores.window.breakpoint', ''); // Only return cachedOffsets if sticky tab is active and cachedOffsets is not undefined and // cachedDevice equal to currentDevice. if (isStickyTabActive && cachedOffsets !== undefined && cachedDevice === currentDevice) { return cachedOffsets; } // Get top & left offsets var offsets = $selector.offset(); // If no offsets found, return empty object if ('undefined' === typeof offsets) { return {}; } // FE sets the flag for sticky module which uses transform as classname on module wrapper while // VB, BFB, TB, and LB sets the flag on CSS output's