| @@ -1,3797 +1,936 @@ | ||
| 1 | -/******/ (() => { // webpackBootstrap | |
| 2 | -/******/ var __webpack_modules__ = ({ | |
| 1 | +/*! elementor - v3.0.4 - 30-08-2020 */ | |
| 2 | +/******/ (function(modules) { // webpackBootstrap | |
| 3 | +/******/ // The module cache | |
| 4 | +/******/ var installedModules = {}; | |
| 5 | +/******/ | |
| 6 | +/******/ // The require function | |
| 7 | +/******/ function __webpack_require__(moduleId) { | |
| 8 | +/******/ | |
| 9 | +/******/ // Check if module is in cache | |
| 10 | +/******/ if(installedModules[moduleId]) { | |
| 11 | +/******/ return installedModules[moduleId].exports; | |
| 12 | +/******/ } | |
| 13 | +/******/ // Create a new module (and put it into the cache) | |
| 14 | +/******/ var module = installedModules[moduleId] = { | |
| 15 | +/******/ i: moduleId, | |
| 16 | +/******/ l: false, | |
| 17 | +/******/ exports: {} | |
| 18 | +/******/ }; | |
| 19 | +/******/ | |
| 20 | +/******/ // Execute the module function | |
| 21 | +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); | |
| 22 | +/******/ | |
| 23 | +/******/ // Flag the module as loaded | |
| 24 | +/******/ module.l = true; | |
| 25 | +/******/ | |
| 26 | +/******/ // Return the exports of the module | |
| 27 | +/******/ return module.exports; | |
| 28 | +/******/ } | |
| 29 | +/******/ | |
| 30 | +/******/ | |
| 31 | +/******/ // expose the modules object (__webpack_modules__) | |
| 32 | +/******/ __webpack_require__.m = modules; | |
| 33 | +/******/ | |
| 34 | +/******/ // expose the module cache | |
| 35 | +/******/ __webpack_require__.c = installedModules; | |
| 36 | +/******/ | |
| 37 | +/******/ // define getter function for harmony exports | |
| 38 | +/******/ __webpack_require__.d = function(exports, name, getter) { | |
| 39 | +/******/ if(!__webpack_require__.o(exports, name)) { | |
| 40 | +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); | |
| 41 | +/******/ } | |
| 42 | +/******/ }; | |
| 43 | +/******/ | |
| 44 | +/******/ // define __esModule on exports | |
| 45 | +/******/ __webpack_require__.r = function(exports) { | |
| 46 | +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | |
| 47 | +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | |
| 48 | +/******/ } | |
| 49 | +/******/ Object.defineProperty(exports, '__esModule', { value: true }); | |
| 50 | +/******/ }; | |
| 51 | +/******/ | |
| 52 | +/******/ // create a fake namespace object | |
| 53 | +/******/ // mode & 1: value is a module id, require it | |
| 54 | +/******/ // mode & 2: merge all properties of value into the ns | |
| 55 | +/******/ // mode & 4: return value when already ns object | |
| 56 | +/******/ // mode & 8|1: behave like require | |
| 57 | +/******/ __webpack_require__.t = function(value, mode) { | |
| 58 | +/******/ if(mode & 1) value = __webpack_require__(value); | |
| 59 | +/******/ if(mode & 8) return value; | |
| 60 | +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; | |
| 61 | +/******/ var ns = Object.create(null); | |
| 62 | +/******/ __webpack_require__.r(ns); | |
| 63 | +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); | |
| 64 | +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); | |
| 65 | +/******/ return ns; | |
| 66 | +/******/ }; | |
| 67 | +/******/ | |
| 68 | +/******/ // getDefaultExport function for compatibility with non-harmony modules | |
| 69 | +/******/ __webpack_require__.n = function(module) { | |
| 70 | +/******/ var getter = module && module.__esModule ? | |
| 71 | +/******/ function getDefault() { return module['default']; } : | |
| 72 | +/******/ function getModuleExports() { return module; }; | |
| 73 | +/******/ __webpack_require__.d(getter, 'a', getter); | |
| 74 | +/******/ return getter; | |
| 75 | +/******/ }; | |
| 76 | +/******/ | |
| 77 | +/******/ // Object.prototype.hasOwnProperty.call | |
| 78 | +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; | |
| 79 | +/******/ | |
| 80 | +/******/ // __webpack_public_path__ | |
| 81 | +/******/ __webpack_require__.p = ""; | |
| 82 | +/******/ | |
| 83 | +/******/ | |
| 84 | +/******/ // Load entry module and return exports | |
| 85 | +/******/ return __webpack_require__(__webpack_require__.s = 708); | |
| 86 | +/******/ }) | |
| 87 | +/************************************************************************/ | |
| 88 | +/******/ ({ | |
| 3 | 89 | |
| 4 | -/***/ "../app/assets/js/event-track/dashboard/action-controls.js": | |
| 5 | -/*!*****************************************************************!*\ | |
| 6 | - !*** ../app/assets/js/event-track/dashboard/action-controls.js ***! | |
| 7 | - \*****************************************************************/ | |
| 8 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 90 | +/***/ 102: | |
| 91 | +/***/ (function(module, exports) { | |
| 9 | 92 | |
| 10 | -"use strict"; | |
| 93 | +module.exports = function (bitmap, value) { | |
| 94 | + return { | |
| 95 | + enumerable: !(bitmap & 1), | |
| 96 | + configurable: !(bitmap & 2), | |
| 97 | + writable: !(bitmap & 4), | |
| 98 | + value: value | |
| 99 | + }; | |
| 100 | +}; | |
| 11 | 101 | |
| 12 | 102 | |
| 13 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 14 | -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 15 | -Object.defineProperty(exports, "__esModule", ({ | |
| 16 | - value: true | |
| 17 | -})); | |
| 18 | -exports["default"] = void 0; | |
| 19 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 20 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 21 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 22 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 23 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 24 | -var _wpDashboardTracking = _interopRequireWildcard(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); | |
| 25 | -var _utils = __webpack_require__(/*! ./utils */ "../app/assets/js/event-track/dashboard/utils.js"); | |
| 26 | -var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); | |
| 27 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 28 | -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } | |
| 29 | -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } | |
| 30 | -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } | |
| 31 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 32 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 33 | -var EXCLUDED_SELECTORS = { | |
| 34 | - ADMIN_MENU: '#adminmenu', | |
| 35 | - TOP_BAR: '.e-admin-top-bar', | |
| 36 | - TOP_BAR_EDITOR_ONE: '#editor-one-top-bar', | |
| 37 | - WP_ADMIN_BAR: '#wpadminbar', | |
| 38 | - SUBMENU: '.wp-submenu', | |
| 39 | - PROMO_PAGE: '.e-feature-promotion', | |
| 40 | - PROMO_BLANK_STATE: '.elementor-blank_state', | |
| 41 | - APP: '.e-app', | |
| 42 | - SIDEBAR_NAVIGATION: '#editor-one-sidebar-navigation', | |
| 43 | - FLYOUT_MENU: '.elementor-submenu-flyout' | |
| 44 | -}; | |
| 45 | -var ActionControlTracking = /*#__PURE__*/function (_BaseTracking) { | |
| 46 | - function ActionControlTracking() { | |
| 47 | - (0, _classCallCheck2.default)(this, ActionControlTracking); | |
| 48 | - return _callSuper(this, ActionControlTracking, arguments); | |
| 49 | - } | |
| 50 | - (0, _inherits2.default)(ActionControlTracking, _BaseTracking); | |
| 51 | - return (0, _createClass2.default)(ActionControlTracking, null, [{ | |
| 52 | - key: "init", | |
| 53 | - value: function init() { | |
| 54 | - if (!_utils.DashboardUtils.isElementorPage()) { | |
| 55 | - return; | |
| 56 | - } | |
| 57 | - this.attachDelegatedHandlers(); | |
| 58 | - this.addTrackingAttributesToFilterButtons(); | |
| 59 | - this.initializeLinkDataIds(); | |
| 60 | - } | |
| 61 | - }, { | |
| 62 | - key: "initializeLinkDataIds", | |
| 63 | - value: function initializeLinkDataIds() { | |
| 64 | - var _this = this; | |
| 65 | - var initializeLinks = function initializeLinks() { | |
| 66 | - var links = document.querySelectorAll('a[href]'); | |
| 67 | - links.forEach(function (link) { | |
| 68 | - if (_this.isExcludedElement(link) || _this.isNavigationLink(link) || link.hasAttribute('data-id')) { | |
| 69 | - return; | |
| 70 | - } | |
| 71 | - var href = link.getAttribute('href'); | |
| 72 | - if (!href) { | |
| 73 | - return; | |
| 74 | - } | |
| 75 | - var cleanedHref = _this.removeNonceFromUrl(href); | |
| 76 | - if (cleanedHref) { | |
| 77 | - link.setAttribute('data-id', cleanedHref); | |
| 78 | - } | |
| 79 | - }); | |
| 80 | - }; | |
| 81 | - if ('loading' === document.readyState) { | |
| 82 | - document.addEventListener('DOMContentLoaded', initializeLinks); | |
| 83 | - } else { | |
| 84 | - initializeLinks(); | |
| 85 | - } | |
| 86 | - } | |
| 87 | - }, { | |
| 88 | - key: "addTrackingAttributesToFilterButtons", | |
| 89 | - value: function addTrackingAttributesToFilterButtons() { | |
| 90 | - var body = document.body; | |
| 91 | - if (!body) { | |
| 92 | - return; | |
| 93 | - } | |
| 94 | - var screenPrefix = ''; | |
| 95 | - switch (true) { | |
| 96 | - case body.classList.contains('post-type-elementor_library'): | |
| 97 | - screenPrefix = 'elementor_library-library'; | |
| 98 | - break; | |
| 99 | - case body.classList.contains('post-type-e-floating-buttons'): | |
| 100 | - screenPrefix = 'e-floating-buttons'; | |
| 101 | - break; | |
| 102 | - default: | |
| 103 | - return; | |
| 104 | - } | |
| 105 | - var addDataIdToListTableButtons = function addDataIdToListTableButtons() { | |
| 106 | - var buttonConfigs = [{ | |
| 107 | - id: 'post-query-submit', | |
| 108 | - suffix: 'filter' | |
| 109 | - }, { | |
| 110 | - id: 'search-submit', | |
| 111 | - suffix: 'search' | |
| 112 | - }, { | |
| 113 | - id: 'doaction', | |
| 114 | - suffix: 'apply' | |
| 115 | - }, { | |
| 116 | - id: 'doaction2', | |
| 117 | - suffix: 'apply-bottom' | |
| 118 | - }]; | |
| 119 | - buttonConfigs.forEach(function (config) { | |
| 120 | - var button = document.getElementById(config.id); | |
| 121 | - if (!button || button.hasAttribute('data-id')) { | |
| 122 | - return; | |
| 123 | - } | |
| 124 | - button.setAttribute('data-id', "".concat(screenPrefix, "-button-").concat(config.suffix)); | |
| 125 | - }); | |
| 126 | - }; | |
| 127 | - if ('loading' === document.readyState) { | |
| 128 | - document.addEventListener('DOMContentLoaded', addDataIdToListTableButtons); | |
| 129 | - } else { | |
| 130 | - addDataIdToListTableButtons(); | |
| 131 | - } | |
| 132 | - } | |
| 133 | - }, { | |
| 134 | - key: "isExcludedElement", | |
| 135 | - value: function isExcludedElement(element) { | |
| 136 | - for (var _i = 0, _Object$values = Object.values(EXCLUDED_SELECTORS); _i < _Object$values.length; _i++) { | |
| 137 | - var selector = _Object$values[_i]; | |
| 138 | - if (element.closest(selector)) { | |
| 139 | - return true; | |
| 140 | - } | |
| 141 | - } | |
| 142 | - if (element.classList.contains('go-pro')) { | |
| 143 | - return true; | |
| 144 | - } | |
| 145 | - return false; | |
| 146 | - } | |
| 147 | - }, { | |
| 148 | - key: "attachDelegatedHandlers", | |
| 149 | - value: function attachDelegatedHandlers() { | |
| 150 | - var _this2 = this; | |
| 151 | - var FILTER_BUTTON_IDS = ['search-submit', 'post-query-submit']; | |
| 152 | - this.addEventListenerTracked(document, 'click', function (event) { | |
| 153 | - var _event$target; | |
| 154 | - var base = event.target && 1 === event.target.nodeType ? event.target : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.parentElement; | |
| 155 | - if (!base) { | |
| 156 | - return; | |
| 157 | - } | |
| 158 | - var toggle = base.closest('.elementor-role-toggle'); | |
| 159 | - if (toggle && !_this2.isExcludedElement(toggle)) { | |
| 160 | - _this2.trackControl(toggle, _wpDashboardTracking.CONTROL_TYPES.TOGGLE); | |
| 161 | - return; | |
| 162 | - } | |
| 163 | - var button = base.closest('button, input[type="submit"], input[type="button"], .button, .e-btn'); | |
| 164 | - if (button && !_this2.isExcludedElement(button)) { | |
| 165 | - if (FILTER_BUTTON_IDS.includes(button.id)) { | |
| 166 | - _this2.trackControl(button, _wpDashboardTracking.CONTROL_TYPES.FILTER); | |
| 167 | - return; | |
| 168 | - } | |
| 169 | - _this2.trackControl(button, _wpDashboardTracking.CONTROL_TYPES.BUTTON); | |
| 170 | - return; | |
| 171 | - } | |
| 172 | - var link = base.closest('a'); | |
| 173 | - if (link && !_this2.isExcludedElement(link) && !_this2.isNavigationLink(link)) { | |
| 174 | - _this2.trackControl(link, _wpDashboardTracking.CONTROL_TYPES.LINK); | |
| 175 | - } | |
| 176 | - }, { | |
| 177 | - capture: false | |
| 178 | - }); | |
| 179 | - this.addEventListenerTracked(document, 'change', function (event) { | |
| 180 | - var _event$target2; | |
| 181 | - var base = event.target && 1 === event.target.nodeType ? event.target : (_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.parentElement; | |
| 182 | - if (!base) { | |
| 183 | - return; | |
| 184 | - } | |
| 185 | - var toggle = null; | |
| 186 | - if (_wpDashboardTracking.default.isEditorOneActive()) { | |
| 187 | - toggle = base.closest('.MuiSwitch-switchBase'); | |
| 188 | - } else { | |
| 189 | - toggle = base.closest('.components-toggle-control'); | |
| 190 | - } | |
| 191 | - if (toggle && !_this2.isExcludedElement(toggle)) { | |
| 192 | - _this2.trackControl(toggle, _wpDashboardTracking.CONTROL_TYPES.TOGGLE); | |
| 193 | - return; | |
| 194 | - } | |
| 195 | - var checkbox = base.closest('input[type="checkbox"]'); | |
| 196 | - if (checkbox && !_this2.isExcludedElement(checkbox)) { | |
| 197 | - _this2.trackControl(checkbox, _wpDashboardTracking.CONTROL_TYPES.CHECKBOX); | |
| 198 | - return; | |
| 199 | - } | |
| 200 | - var radio = base.closest('input[type="radio"]'); | |
| 201 | - if (radio && !_this2.isExcludedElement(radio)) { | |
| 202 | - _this2.trackControl(radio, _wpDashboardTracking.CONTROL_TYPES.RADIO); | |
| 203 | - return; | |
| 204 | - } | |
| 205 | - var select = base.closest('select'); | |
| 206 | - if (select && !_this2.isExcludedElement(select)) { | |
| 207 | - _this2.trackControl(select, _wpDashboardTracking.CONTROL_TYPES.SELECT); | |
| 208 | - } | |
| 209 | - }); | |
| 210 | - } | |
| 211 | - }, { | |
| 212 | - key: "isNavigationLink", | |
| 213 | - value: function isNavigationLink(link) { | |
| 214 | - var href = link.getAttribute('href'); | |
| 215 | - if (!href) { | |
| 216 | - return false; | |
| 217 | - } | |
| 218 | - if (href.startsWith('#') && href.includes('tab')) { | |
| 219 | - return true; | |
| 220 | - } | |
| 221 | - if (link.classList.contains('nav-tab')) { | |
| 222 | - return true; | |
| 223 | - } | |
| 224 | - var isInNavigation = link.closest('.wp-submenu, #adminmenu, .e-admin-top-bar, #wpadminbar'); | |
| 225 | - return !!isInNavigation; | |
| 226 | - } | |
| 227 | - }, { | |
| 228 | - key: "trackControl", | |
| 229 | - value: function trackControl(element, controlType) { | |
| 230 | - var controlIdentifier = this.extractControlIdentifier(element, controlType); | |
| 231 | - if (!controlIdentifier) { | |
| 232 | - return; | |
| 233 | - } | |
| 234 | - _wpDashboardTracking.default.trackActionControl(controlIdentifier, controlType); | |
| 235 | - } | |
| 236 | - }, { | |
| 237 | - key: "extractControlIdentifier", | |
| 238 | - value: function extractControlIdentifier(element, controlType) { | |
| 239 | - if (_wpDashboardTracking.CONTROL_TYPES.RADIO === controlType) { | |
| 240 | - var name = element.getAttribute('name'); | |
| 241 | - var value = element.value || element.getAttribute('value'); | |
| 242 | - if (name && value) { | |
| 243 | - return "".concat(name, "-").concat(value); | |
| 244 | - } | |
| 245 | - if (name) { | |
| 246 | - return name; | |
| 247 | - } | |
| 248 | - } | |
| 249 | - if (_wpDashboardTracking.CONTROL_TYPES.SELECT === controlType) { | |
| 250 | - var _name = element.getAttribute('name'); | |
| 251 | - if (_name) { | |
| 252 | - return _name; | |
| 253 | - } | |
| 254 | - } | |
| 255 | - if (_wpDashboardTracking.CONTROL_TYPES.CHECKBOX === controlType) { | |
| 256 | - var _name2 = element.getAttribute('name'); | |
| 257 | - if (_name2) { | |
| 258 | - var checkboxesWithSameName = document.querySelectorAll("input[type=\"checkbox\"][name=\"".concat(CSS.escape(_name2), "\"]")); | |
| 259 | - if (checkboxesWithSameName.length > 1) { | |
| 260 | - var _value = element.value || element.getAttribute('value'); | |
| 261 | - if (_value) { | |
| 262 | - return "".concat(_name2, "-").concat(_value); | |
| 263 | - } | |
| 264 | - } | |
| 265 | - return _name2; | |
| 266 | - } | |
| 267 | - } | |
| 268 | - if (_wpDashboardTracking.CONTROL_TYPES.LINK === controlType) { | |
| 269 | - var dataId = element.getAttribute('data-id'); | |
| 270 | - if (dataId) { | |
| 271 | - return dataId; | |
| 272 | - } | |
| 273 | - var href = element.getAttribute('href'); | |
| 274 | - if (href) { | |
| 275 | - return this.removeNonceFromUrl(href); | |
| 276 | - } | |
| 277 | - } | |
| 278 | - if (_wpDashboardTracking.CONTROL_TYPES.BUTTON === controlType || _wpDashboardTracking.CONTROL_TYPES.TOGGLE === controlType || _wpDashboardTracking.CONTROL_TYPES.FILTER === controlType) { | |
| 279 | - var _dataId = element.getAttribute('data-id'); | |
| 280 | - if (_dataId) { | |
| 281 | - return _dataId; | |
| 282 | - } | |
| 283 | - var classIdMatch = this.extractClassId(element); | |
| 284 | - if (classIdMatch) { | |
| 285 | - return classIdMatch; | |
| 286 | - } | |
| 287 | - } | |
| 288 | - return ''; | |
| 289 | - } | |
| 290 | - }, { | |
| 291 | - key: "extractClassId", | |
| 292 | - value: function extractClassId(element) { | |
| 293 | - var classes = element.className; | |
| 294 | - if (!classes || 'string' !== typeof classes) { | |
| 295 | - return ''; | |
| 296 | - } | |
| 297 | - var classList = classes.split(' '); | |
| 298 | - var _iterator = _createForOfIteratorHelper(classList), | |
| 299 | - _step; | |
| 300 | - try { | |
| 301 | - for (_iterator.s(); !(_step = _iterator.n()).done;) { | |
| 302 | - var cls = _step.value; | |
| 303 | - if (cls.startsWith('e-id-')) { | |
| 304 | - return cls.substring(5); | |
| 305 | - } | |
| 306 | - } | |
| 307 | - } catch (err) { | |
| 308 | - _iterator.e(err); | |
| 309 | - } finally { | |
| 310 | - _iterator.f(); | |
| 311 | - } | |
| 312 | - return ''; | |
| 313 | - } | |
| 314 | - }, { | |
| 315 | - key: "removeNonceFromUrl", | |
| 316 | - value: function removeNonceFromUrl(url) { | |
| 317 | - try { | |
| 318 | - var urlObj = new URL(url, window.location.origin); | |
| 319 | - urlObj.searchParams.delete('_wpnonce'); | |
| 320 | - var postParam = urlObj.searchParams.get('post'); | |
| 321 | - if (postParam !== null && /^[0-9]+$/.test(postParam)) { | |
| 322 | - urlObj.searchParams.delete('post'); | |
| 323 | - } | |
| 324 | - return urlObj.pathname + urlObj.search + urlObj.hash; | |
| 325 | - } catch (e) { | |
| 326 | - return url; | |
| 327 | - } | |
| 328 | - } | |
| 329 | - }]); | |
| 330 | -}(_baseTracking.default); | |
| 331 | -var _default = exports["default"] = ActionControlTracking; | |
| 332 | - | |
| 333 | 103 | /***/ }), |
| 334 | 104 | |
| 335 | -/***/ "../app/assets/js/event-track/dashboard/base-tracking.js": | |
| 336 | -/*!***************************************************************!*\ | |
| 337 | - !*** ../app/assets/js/event-track/dashboard/base-tracking.js ***! | |
| 338 | - \***************************************************************/ | |
| 339 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 105 | +/***/ 105: | |
| 106 | +/***/ (function(module, exports, __webpack_require__) { | |
| 340 | 107 | |
| 341 | 108 | "use strict"; |
| 342 | 109 | |
| 110 | +var at = __webpack_require__(142)(true); | |
| 343 | 111 | |
| 344 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 345 | -Object.defineProperty(exports, "__esModule", ({ | |
| 346 | - value: true | |
| 347 | -})); | |
| 348 | -exports["default"] = void 0; | |
| 349 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 350 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 351 | -var BaseTracking = /*#__PURE__*/function () { | |
| 352 | - function BaseTracking() { | |
| 353 | - (0, _classCallCheck2.default)(this, BaseTracking); | |
| 354 | - } | |
| 355 | - return (0, _createClass2.default)(BaseTracking, null, [{ | |
| 356 | - key: "ensureOwnArrays", | |
| 357 | - value: function ensureOwnArrays() { | |
| 358 | - if (!Object.prototype.hasOwnProperty.call(this, 'observers')) { | |
| 359 | - this.observers = []; | |
| 360 | - } | |
| 361 | - if (!Object.prototype.hasOwnProperty.call(this, 'eventListeners')) { | |
| 362 | - this.eventListeners = []; | |
| 363 | - } | |
| 364 | - } | |
| 365 | - }, { | |
| 366 | - key: "destroy", | |
| 367 | - value: function destroy() { | |
| 368 | - this.ensureOwnArrays(); | |
| 369 | - this.observers.forEach(function (observer) { | |
| 370 | - return observer.disconnect(); | |
| 371 | - }); | |
| 372 | - this.observers = []; | |
| 373 | - this.eventListeners.forEach(function (_ref) { | |
| 374 | - var target = _ref.target, | |
| 375 | - type = _ref.type, | |
| 376 | - handler = _ref.handler, | |
| 377 | - options = _ref.options; | |
| 378 | - target.removeEventListener(type, handler, options); | |
| 379 | - }); | |
| 380 | - this.eventListeners = []; | |
| 381 | - } | |
| 382 | - }, { | |
| 383 | - key: "addObserver", | |
| 384 | - value: function addObserver(target, options, callback) { | |
| 385 | - this.ensureOwnArrays(); | |
| 386 | - var observer = new MutationObserver(callback); | |
| 387 | - observer.observe(target, options); | |
| 388 | - this.observers.push(observer); | |
| 389 | - return observer; | |
| 390 | - } | |
| 391 | - }, { | |
| 392 | - key: "addEventListenerTracked", | |
| 393 | - value: function addEventListenerTracked(target, type, handler) { | |
| 394 | - var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; | |
| 395 | - this.ensureOwnArrays(); | |
| 396 | - target.addEventListener(type, handler, options); | |
| 397 | - this.eventListeners.push({ | |
| 398 | - target: target, | |
| 399 | - type: type, | |
| 400 | - handler: handler, | |
| 401 | - options: options | |
| 402 | - }); | |
| 403 | - } | |
| 404 | - }]); | |
| 405 | -}(); | |
| 406 | -var _default = exports["default"] = BaseTracking; | |
| 112 | + // `AdvanceStringIndex` abstract operation | |
| 113 | +// https://tc39.github.io/ecma262/#sec-advancestringindex | |
| 114 | +module.exports = function (S, index, unicode) { | |
| 115 | + return index + (unicode ? at(S, index).length : 1); | |
| 116 | +}; | |
| 407 | 117 | |
| 118 | + | |
| 408 | 119 | /***/ }), |
| 409 | 120 | |
| 410 | -/***/ "../app/assets/js/event-track/dashboard/menu-promotion.js": | |
| 411 | -/*!****************************************************************!*\ | |
| 412 | - !*** ../app/assets/js/event-track/dashboard/menu-promotion.js ***! | |
| 413 | - \****************************************************************/ | |
| 414 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 121 | +/***/ 106: | |
| 122 | +/***/ (function(module, exports, __webpack_require__) { | |
| 415 | 123 | |
| 416 | 124 | "use strict"; |
| 417 | 125 | |
| 126 | +// 21.2.5.3 get RegExp.prototype.flags | |
| 127 | +var anObject = __webpack_require__(18); | |
| 128 | +module.exports = function () { | |
| 129 | + var that = anObject(this); | |
| 130 | + var result = ''; | |
| 131 | + if (that.global) result += 'g'; | |
| 132 | + if (that.ignoreCase) result += 'i'; | |
| 133 | + if (that.multiline) result += 'm'; | |
| 134 | + if (that.unicode) result += 'u'; | |
| 135 | + if (that.sticky) result += 'y'; | |
| 136 | + return result; | |
| 137 | +}; | |
| 418 | 138 | |
| 419 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 420 | -Object.defineProperty(exports, "__esModule", ({ | |
| 421 | - value: true | |
| 422 | -})); | |
| 423 | -exports["default"] = void 0; | |
| 424 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 425 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 426 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 427 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 428 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 429 | -var _wpDashboardTracking = _interopRequireDefault(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); | |
| 430 | -var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); | |
| 431 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 432 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 433 | -var PROMO_MENU_ITEMS = { | |
| 434 | - go_elementor_pro: 'Upgrade' | |
| 435 | -}; | |
| 436 | -var MenuPromotionTracking = /*#__PURE__*/function (_BaseTracking) { | |
| 437 | - function MenuPromotionTracking() { | |
| 438 | - (0, _classCallCheck2.default)(this, MenuPromotionTracking); | |
| 439 | - return _callSuper(this, MenuPromotionTracking, arguments); | |
| 440 | - } | |
| 441 | - (0, _inherits2.default)(MenuPromotionTracking, _BaseTracking); | |
| 442 | - return (0, _createClass2.default)(MenuPromotionTracking, null, [{ | |
| 443 | - key: "init", | |
| 444 | - value: function init() { | |
| 445 | - this.attachDelegatedTracking(); | |
| 446 | - } | |
| 447 | - }, { | |
| 448 | - key: "attachDelegatedTracking", | |
| 449 | - value: function attachDelegatedTracking() { | |
| 450 | - var _this = this; | |
| 451 | - this.addEventListenerTracked(document, 'click', function (event) { | |
| 452 | - var target = event.target; | |
| 453 | - if (!target) { | |
| 454 | - return; | |
| 455 | - } | |
| 456 | - var link = target.closest('a'); | |
| 457 | - if (!link) { | |
| 458 | - return; | |
| 459 | - } | |
| 460 | - var href = link.getAttribute('href'); | |
| 461 | - if (!href) { | |
| 462 | - return; | |
| 463 | - } | |
| 464 | - var menuItemKey = _this.extractPromoMenuKey(href); | |
| 465 | - if (!menuItemKey) { | |
| 466 | - return; | |
| 467 | - } | |
| 468 | - _this.handleMenuPromoClick(link, menuItemKey); | |
| 469 | - }, { | |
| 470 | - capture: true | |
| 471 | - }); | |
| 472 | - } | |
| 473 | - }, { | |
| 474 | - key: "extractPromoMenuKey", | |
| 475 | - value: function extractPromoMenuKey(href) { | |
| 476 | - for (var _i = 0, _Object$keys = Object.keys(PROMO_MENU_ITEMS); _i < _Object$keys.length; _i++) { | |
| 477 | - var menuItemKey = _Object$keys[_i]; | |
| 478 | - if (href.includes("page=".concat(menuItemKey))) { | |
| 479 | - return menuItemKey; | |
| 480 | - } | |
| 481 | - } | |
| 482 | - return null; | |
| 483 | - } | |
| 484 | - }, { | |
| 485 | - key: "handleMenuPromoClick", | |
| 486 | - value: function handleMenuPromoClick(menuItem, menuItemKey) { | |
| 487 | - var destination = menuItem.getAttribute('href'); | |
| 488 | - var promoName = PROMO_MENU_ITEMS[menuItemKey]; | |
| 489 | - var path = menuItemKey.replace('elementor_', '').replace(/_/g, '/'); | |
| 490 | - _wpDashboardTracking.default.trackPromoClicked(promoName, destination, path); | |
| 491 | - } | |
| 492 | - }]); | |
| 493 | -}(_baseTracking.default); | |
| 494 | -var _default = exports["default"] = MenuPromotionTracking; | |
| 495 | 139 | |
| 496 | 140 | /***/ }), |
| 497 | 141 | |
| 498 | -/***/ "../app/assets/js/event-track/dashboard/navigation.js": | |
| 499 | -/*!************************************************************!*\ | |
| 500 | - !*** ../app/assets/js/event-track/dashboard/navigation.js ***! | |
| 501 | - \************************************************************/ | |
| 502 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 142 | +/***/ 109: | |
| 143 | +/***/ (function(module, exports, __webpack_require__) { | |
| 503 | 144 | |
| 504 | -"use strict"; | |
| 145 | +var isObject = __webpack_require__(30); | |
| 146 | +var document = __webpack_require__(17).document; | |
| 147 | +// typeof document.createElement is 'object' in old IE | |
| 148 | +var is = isObject(document) && isObject(document.createElement); | |
| 149 | +module.exports = function (it) { | |
| 150 | + return is ? document.createElement(it) : {}; | |
| 151 | +}; | |
| 505 | 152 | |
| 506 | 153 | |
| 507 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 508 | -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 509 | -Object.defineProperty(exports, "__esModule", ({ | |
| 510 | - value: true | |
| 511 | -})); | |
| 512 | -exports["default"] = void 0; | |
| 513 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 514 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 515 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 516 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 517 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 518 | -var _wpDashboardTracking = _interopRequireWildcard(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); | |
| 519 | -var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); | |
| 520 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 521 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 522 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 523 | -var ELEMENTOR_MENU_SELECTORS = { | |
| 524 | - ELEMENTOR_TOP_LEVEL: 'li#toplevel_page_elementor', | |
| 525 | - TEMPLATES_TOP_LEVEL: 'li#menu-posts-elementor_library', | |
| 526 | - ELEMENTOR_HOME_TOP_LEVEL: 'li#toplevel_page_elementor-home', | |
| 527 | - ADMIN_MENU: '#adminmenu', | |
| 528 | - TOP_LEVEL_LINK: '.wp-menu-name', | |
| 529 | - SUBMENU_CONTAINER: '.wp-submenu', | |
| 530 | - SUBMENU_ITEM: '.wp-submenu li a', | |
| 531 | - SUBMENU_ITEM_TOP_LEVEL: '.wp-has-submenu', | |
| 532 | - SIDEBAR_NAVIGATION: '#editor-one-sidebar-navigation' | |
| 533 | -}; | |
| 534 | -var NavigationTracking = /*#__PURE__*/function (_BaseTracking) { | |
| 535 | - function NavigationTracking() { | |
| 536 | - (0, _classCallCheck2.default)(this, NavigationTracking); | |
| 537 | - return _callSuper(this, NavigationTracking, arguments); | |
| 538 | - } | |
| 539 | - (0, _inherits2.default)(NavigationTracking, _BaseTracking); | |
| 540 | - return (0, _createClass2.default)(NavigationTracking, null, [{ | |
| 541 | - key: "init", | |
| 542 | - value: function init() { | |
| 543 | - if (_wpDashboardTracking.default.isEditorOneActive()) { | |
| 544 | - this.attachSidebarNavigationTracking(); | |
| 545 | - this.attachElementorHomeMenuTracking(); | |
| 546 | - } else { | |
| 547 | - this.attachElementorMenuTracking(); | |
| 548 | - this.attachTemplatesMenuTracking(); | |
| 549 | - } | |
| 550 | - } | |
| 551 | - }, { | |
| 552 | - key: "attachTemplatesMenuTracking", | |
| 553 | - value: function attachTemplatesMenuTracking() { | |
| 554 | - var templatesMenu = document.querySelector(ELEMENTOR_MENU_SELECTORS.TEMPLATES_TOP_LEVEL); | |
| 555 | - if (!templatesMenu) { | |
| 556 | - return; | |
| 557 | - } | |
| 558 | - this.attachMenuTracking(templatesMenu, 'Templates'); | |
| 559 | - } | |
| 560 | - }, { | |
| 561 | - key: "attachElementorHomeMenuTracking", | |
| 562 | - value: function attachElementorHomeMenuTracking() { | |
| 563 | - var elementorHomeMenu = document.querySelector(ELEMENTOR_MENU_SELECTORS.ELEMENTOR_HOME_TOP_LEVEL); | |
| 564 | - if (!elementorHomeMenu) { | |
| 565 | - return; | |
| 566 | - } | |
| 567 | - this.attachMenuTracking(elementorHomeMenu, 'Elementor'); | |
| 568 | - } | |
| 569 | - }, { | |
| 570 | - key: "attachElementorMenuTracking", | |
| 571 | - value: function attachElementorMenuTracking() { | |
| 572 | - var elementorMenu = document.querySelector(ELEMENTOR_MENU_SELECTORS.ELEMENTOR_TOP_LEVEL); | |
| 573 | - if (!elementorMenu) { | |
| 574 | - return; | |
| 575 | - } | |
| 576 | - this.attachMenuTracking(elementorMenu, 'Elementor'); | |
| 577 | - } | |
| 578 | - }, { | |
| 579 | - key: "attachSidebarNavigationTracking", | |
| 580 | - value: function attachSidebarNavigationTracking() { | |
| 581 | - var sidebar = document.querySelector(ELEMENTOR_MENU_SELECTORS.SIDEBAR_NAVIGATION); | |
| 582 | - if (sidebar) { | |
| 583 | - this.attachSidebarClickListener(sidebar); | |
| 584 | - } | |
| 585 | - } | |
| 586 | - }, { | |
| 587 | - key: "attachSidebarClickListener", | |
| 588 | - value: function attachSidebarClickListener(sidebar) { | |
| 589 | - var _this = this; | |
| 590 | - this.addEventListenerTracked(sidebar, 'click', function (event) { | |
| 591 | - _this.handleSidebarClick(event); | |
| 592 | - }, { | |
| 593 | - capture: true | |
| 594 | - }); | |
| 595 | - } | |
| 596 | - }, { | |
| 597 | - key: "attachMenuTracking", | |
| 598 | - value: function attachMenuTracking(menuElement, menuName) { | |
| 599 | - var _this2 = this; | |
| 600 | - this.addEventListenerTracked(menuElement, 'click', function (event) { | |
| 601 | - _this2.handleMenuClick(event, menuName); | |
| 602 | - }); | |
| 603 | - } | |
| 604 | - }, { | |
| 605 | - key: "handleMenuClick", | |
| 606 | - value: function handleMenuClick(event, menuName) { | |
| 607 | - var link = event.target.closest('a'); | |
| 608 | - if (!link) { | |
| 609 | - return; | |
| 610 | - } | |
| 611 | - var isTopLevel = link.classList.contains('menu-top'); | |
| 612 | - var itemId = this.extractItemId(link); | |
| 613 | - var area = this.determineNavArea(link); | |
| 614 | - _wpDashboardTracking.default.trackNavClicked(itemId, isTopLevel ? null : menuName, area); | |
| 615 | - } | |
| 616 | - }, { | |
| 617 | - key: "handleSidebarClick", | |
| 618 | - value: function handleSidebarClick(event) { | |
| 619 | - var clickedElement = event.target.closest('a, button, [role="button"]'); | |
| 620 | - if (!clickedElement) { | |
| 621 | - return; | |
| 622 | - } | |
| 623 | - var itemId = this.extractSidebarItemId(clickedElement); | |
| 624 | - _wpDashboardTracking.default.trackNavClicked(itemId, null, _wpDashboardTracking.NAV_AREAS.SIDEBAR_MENU); | |
| 625 | - } | |
| 626 | - }, { | |
| 627 | - key: "extractSidebarItemId", | |
| 628 | - value: function extractSidebarItemId(element) { | |
| 629 | - var paragraph = element.querySelector('p'); | |
| 630 | - if (paragraph) { | |
| 631 | - return paragraph.textContent.trim(); | |
| 632 | - } | |
| 633 | - var textContent = element.textContent.trim(); | |
| 634 | - if (textContent) { | |
| 635 | - return textContent; | |
| 636 | - } | |
| 637 | - return 'unknown'; | |
| 638 | - } | |
| 639 | - }, { | |
| 640 | - key: "extractPageFromUrl", | |
| 641 | - value: function extractPageFromUrl(href) { | |
| 642 | - var urlParams = new URLSearchParams(href.split('?')[1] || ''); | |
| 643 | - var page = urlParams.get('page'); | |
| 644 | - if (page) { | |
| 645 | - return page; | |
| 646 | - } | |
| 647 | - var postType = urlParams.get('post_type'); | |
| 648 | - if (postType) { | |
| 649 | - return postType; | |
| 650 | - } | |
| 651 | - return 'unknown'; | |
| 652 | - } | |
| 653 | - }, { | |
| 654 | - key: "extractItemId", | |
| 655 | - value: function extractItemId(link) { | |
| 656 | - var textContent = link.textContent.trim(); | |
| 657 | - if (textContent) { | |
| 658 | - return textContent; | |
| 659 | - } | |
| 660 | - var href = link.getAttribute('href'); | |
| 661 | - if (href) { | |
| 662 | - return this.extractPageFromUrl(href); | |
| 663 | - } | |
| 664 | - var linkId = link.getAttribute('id'); | |
| 665 | - if (linkId) { | |
| 666 | - return linkId; | |
| 667 | - } | |
| 668 | - return 'unknown'; | |
| 669 | - } | |
| 670 | - }, { | |
| 671 | - key: "determineNavArea", | |
| 672 | - value: function determineNavArea(link) { | |
| 673 | - var parentMenu = link.closest('li.menu-top'); | |
| 674 | - if (parentMenu) { | |
| 675 | - var isSubmenuItem = link.closest(ELEMENTOR_MENU_SELECTORS.SUBMENU_CONTAINER); | |
| 676 | - if (isSubmenuItem) { | |
| 677 | - var submenuElement = link.closest(ELEMENTOR_MENU_SELECTORS.SUBMENU_ITEM_TOP_LEVEL); | |
| 678 | - if (submenuElement.classList.contains('wp-not-current-submenu')) { | |
| 679 | - return _wpDashboardTracking.NAV_AREAS.HOVER_MENU; | |
| 680 | - } | |
| 681 | - return _wpDashboardTracking.NAV_AREAS.SUBMENU; | |
| 682 | - } | |
| 683 | - return _wpDashboardTracking.NAV_AREAS.LEFT_MENU; | |
| 684 | - } | |
| 685 | - return _wpDashboardTracking.NAV_AREAS.LEFT_MENU; | |
| 686 | - } | |
| 687 | - }]); | |
| 688 | -}(_baseTracking.default); | |
| 689 | -var _default = exports["default"] = NavigationTracking; | |
| 690 | - | |
| 691 | 154 | /***/ }), |
| 692 | 155 | |
| 693 | -/***/ "../app/assets/js/event-track/dashboard/plugin-actions.js": | |
| 694 | -/*!****************************************************************!*\ | |
| 695 | - !*** ../app/assets/js/event-track/dashboard/plugin-actions.js ***! | |
| 696 | - \****************************************************************/ | |
| 697 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 156 | +/***/ 110: | |
| 157 | +/***/ (function(module, exports) { | |
| 698 | 158 | |
| 699 | -"use strict"; | |
| 159 | +module.exports = false; | |
| 700 | 160 | |
| 701 | 161 | |
| 702 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 703 | -Object.defineProperty(exports, "__esModule", ({ | |
| 704 | - value: true | |
| 705 | -})); | |
| 706 | -exports["default"] = void 0; | |
| 707 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 708 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 709 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 710 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 711 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 712 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 713 | -var _wpDashboardTracking = _interopRequireDefault(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); | |
| 714 | -var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); | |
| 715 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 716 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 717 | -var PLUGIN_TYPE = { | |
| 718 | - ELEMENTOR: 'core', | |
| 719 | - ELEMENTOR_PRO: 'pro' | |
| 720 | -}; | |
| 721 | -var PluginActions = /*#__PURE__*/function (_BaseTracking) { | |
| 722 | - function PluginActions() { | |
| 723 | - (0, _classCallCheck2.default)(this, PluginActions); | |
| 724 | - return _callSuper(this, PluginActions, arguments); | |
| 725 | - } | |
| 726 | - (0, _inherits2.default)(PluginActions, _BaseTracking); | |
| 727 | - return (0, _createClass2.default)(PluginActions, null, [{ | |
| 728 | - key: "init", | |
| 729 | - value: function init() { | |
| 730 | - this.attachCoreDeactivationTracking(); | |
| 731 | - this.attachProDeactivationTracking(); | |
| 732 | - this.attachProDeletionTracking(); | |
| 733 | - } | |
| 734 | - }, { | |
| 735 | - key: "attachCoreDeactivationTracking", | |
| 736 | - value: function attachCoreDeactivationTracking() { | |
| 737 | - var _this = this; | |
| 738 | - var dialogForm = document.querySelector('#elementor-deactivate-feedback-dialog-form'); | |
| 739 | - if (!dialogForm) { | |
| 740 | - return; | |
| 741 | - } | |
| 742 | - this.addEventListenerTracked(dialogForm, 'change', function (event) { | |
| 743 | - var target = event.target; | |
| 744 | - if (target.classList.contains('elementor-deactivate-feedback-dialog-input')) { | |
| 745 | - _this.selectedReason = target.value; | |
| 746 | - } | |
| 747 | - }); | |
| 748 | - this.observeModalButtons(); | |
| 749 | - } | |
| 750 | - }, { | |
| 751 | - key: "attachProDeactivationTracking", | |
| 752 | - value: function attachProDeactivationTracking() { | |
| 753 | - var _this2 = this; | |
| 754 | - var pluginsTable = document.querySelector('.plugins'); | |
| 755 | - if (!pluginsTable) { | |
| 756 | - return; | |
| 757 | - } | |
| 758 | - this.addEventListenerTracked(pluginsTable, 'click', function (event) { | |
| 759 | - var link = event.target.closest('a'); | |
| 760 | - if (link && 'deactivate-elementor-pro' === link.id) { | |
| 761 | - _this2.trackProDeactivation(); | |
| 762 | - } | |
| 763 | - }, { | |
| 764 | - capture: true | |
| 765 | - }); | |
| 766 | - } | |
| 767 | - }, { | |
| 768 | - key: "observeModalButtons", | |
| 769 | - value: function observeModalButtons() { | |
| 770 | - var _this3 = this; | |
| 771 | - var checkAndAttachDelegation = function checkAndAttachDelegation() { | |
| 772 | - var modal = document.querySelector('#elementor-deactivate-feedback-modal'); | |
| 773 | - if (!modal) { | |
| 774 | - return false; | |
| 775 | - } | |
| 776 | - _this3.addEventListenerTracked(modal, 'click', function (event) { | |
| 777 | - var submitButton = event.target.closest('.dialog-submit'); | |
| 778 | - var skipButton = event.target.closest('.dialog-skip'); | |
| 779 | - if (submitButton) { | |
| 780 | - _this3.trackCoreDeactivation('submit&deactivate'); | |
| 781 | - } else if (skipButton) { | |
| 782 | - _this3.trackCoreDeactivation('skip&deactivate'); | |
| 783 | - } | |
| 784 | - }, { | |
| 785 | - capture: true | |
| 786 | - }); | |
| 787 | - return true; | |
| 788 | - }; | |
| 789 | - if (checkAndAttachDelegation()) { | |
| 790 | - return; | |
| 791 | - } | |
| 792 | - this.addObserver(document.body, { | |
| 793 | - childList: true, | |
| 794 | - subtree: true | |
| 795 | - }, function (mutations, observer) { | |
| 796 | - if (checkAndAttachDelegation()) { | |
| 797 | - observer.disconnect(); | |
| 798 | - } | |
| 799 | - }); | |
| 800 | - } | |
| 801 | - }, { | |
| 802 | - key: "getUserInput", | |
| 803 | - value: function getUserInput() { | |
| 804 | - var reasonsWithInput = ['found_a_better_plugin', 'other']; | |
| 805 | - if (!this.selectedReason || !reasonsWithInput.includes(this.selectedReason)) { | |
| 806 | - return null; | |
| 807 | - } | |
| 808 | - var inputField = document.querySelector("input[name=\"reason_".concat(this.selectedReason, "\"]")); | |
| 809 | - if (inputField && inputField.value) { | |
| 810 | - return inputField.value; | |
| 811 | - } | |
| 812 | - return null; | |
| 813 | - } | |
| 814 | - }, { | |
| 815 | - key: "trackCoreDeactivation", | |
| 816 | - value: function trackCoreDeactivation(action) { | |
| 817 | - var properties = { | |
| 818 | - deactivate_form_submit: action, | |
| 819 | - deactivate_plugin_type: PLUGIN_TYPE.ELEMENTOR | |
| 820 | - }; | |
| 821 | - if (this.selectedReason) { | |
| 822 | - properties.deactivate_feedback_reason = this.selectedReason; | |
| 823 | - } | |
| 824 | - var userInput = this.getUserInput(); | |
| 825 | - if (userInput) { | |
| 826 | - properties.deactivate_feedback_reason += "/".concat(userInput); | |
| 827 | - } | |
| 828 | - _wpDashboardTracking.default.dispatchEvent('wpdash_deactivate_plugin', properties, { | |
| 829 | - send_immediately: true | |
| 830 | - }); | |
| 831 | - } | |
| 832 | - }, { | |
| 833 | - key: "trackProDeactivation", | |
| 834 | - value: function trackProDeactivation() { | |
| 835 | - this.trackProAction('deactivate'); | |
| 836 | - } | |
| 837 | - }, { | |
| 838 | - key: "attachProDeletionTracking", | |
| 839 | - value: function attachProDeletionTracking() { | |
| 840 | - var _this4 = this; | |
| 841 | - if ('undefined' === typeof jQuery) { | |
| 842 | - return; | |
| 843 | - } | |
| 844 | - jQuery(document).on('wp-plugin-deleting', function (event, args) { | |
| 845 | - if ('elementor-pro' === (args === null || args === void 0 ? void 0 : args.slug)) { | |
| 846 | - _this4.trackProAction('delete'); | |
| 847 | - } | |
| 848 | - }); | |
| 849 | - } | |
| 850 | - }, { | |
| 851 | - key: "destroy", | |
| 852 | - value: function destroy() { | |
| 853 | - if ('undefined' !== typeof jQuery) { | |
| 854 | - jQuery(document).off('wp-plugin-deleting'); | |
| 855 | - } | |
| 856 | - _baseTracking.default.destroy.call(this); | |
| 857 | - } | |
| 858 | - }, { | |
| 859 | - key: "trackProAction", | |
| 860 | - value: function trackProAction(action) { | |
| 861 | - var eventMap = { | |
| 862 | - deactivate: { | |
| 863 | - eventName: 'wpdash_deactivate_plugin', | |
| 864 | - propertyKey: 'deactivate_plugin_type' | |
| 865 | - }, | |
| 866 | - delete: { | |
| 867 | - eventName: 'wpdash_delete_plugin', | |
| 868 | - propertyKey: 'plugin_delete' | |
| 869 | - } | |
| 870 | - }; | |
| 871 | - var config = eventMap[action]; | |
| 872 | - if (!config) { | |
| 873 | - return; | |
| 874 | - } | |
| 875 | - var properties = (0, _defineProperty2.default)({}, config.propertyKey, PLUGIN_TYPE.ELEMENTOR_PRO); | |
| 876 | - _wpDashboardTracking.default.dispatchEvent(config.eventName, properties, { | |
| 877 | - send_immediately: true | |
| 878 | - }); | |
| 879 | - } | |
| 880 | - }]); | |
| 881 | -}(_baseTracking.default); | |
| 882 | -(0, _defineProperty2.default)(PluginActions, "selectedReason", null); | |
| 883 | -var _default = exports["default"] = PluginActions; | |
| 884 | - | |
| 885 | 162 | /***/ }), |
| 886 | 163 | |
| 887 | -/***/ "../app/assets/js/event-track/dashboard/promotion.js": | |
| 888 | -/*!***********************************************************!*\ | |
| 889 | - !*** ../app/assets/js/event-track/dashboard/promotion.js ***! | |
| 890 | - \***********************************************************/ | |
| 891 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 164 | +/***/ 113: | |
| 165 | +/***/ (function(module, exports, __webpack_require__) { | |
| 892 | 166 | |
| 893 | -"use strict"; | |
| 167 | +// getting tag from 19.1.3.6 Object.prototype.toString() | |
| 168 | +var cof = __webpack_require__(46); | |
| 169 | +var TAG = __webpack_require__(12)('toStringTag'); | |
| 170 | +// ES3 wrong here | |
| 171 | +var ARG = cof(function () { return arguments; }()) == 'Arguments'; | |
| 894 | 172 | |
| 173 | +// fallback for IE11 Script Access Denied error | |
| 174 | +var tryGet = function (it, key) { | |
| 175 | + try { | |
| 176 | + return it[key]; | |
| 177 | + } catch (e) { /* empty */ } | |
| 178 | +}; | |
| 895 | 179 | |
| 896 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 897 | -Object.defineProperty(exports, "__esModule", ({ | |
| 898 | - value: true | |
| 899 | -})); | |
| 900 | -exports["default"] = void 0; | |
| 901 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 902 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 903 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 904 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 905 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 906 | -var _wpDashboardTracking = _interopRequireDefault(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); | |
| 907 | -var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); | |
| 908 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 909 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 910 | -var PROMO_SELECTORS = { | |
| 911 | - PROMO_PAGE: '.e-feature-promotion, .elementor-settings-form-page, #elementor-element-manager-wrap', | |
| 912 | - PROMO_BLANK_STATE: '.elementor-blank_state', | |
| 913 | - CTA_BUTTON: '.go-pro', | |
| 914 | - TITLE: 'h3' | |
| 180 | +module.exports = function (it) { | |
| 181 | + var O, T, B; | |
| 182 | + return it === undefined ? 'Undefined' : it === null ? 'Null' | |
| 183 | + // @@toStringTag case | |
| 184 | + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T | |
| 185 | + // builtinTag case | |
| 186 | + : ARG ? cof(O) | |
| 187 | + // ES3 arguments fallback | |
| 188 | + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; | |
| 915 | 189 | }; |
| 916 | -var PromotionTracking = /*#__PURE__*/function (_BaseTracking) { | |
| 917 | - function PromotionTracking() { | |
| 918 | - (0, _classCallCheck2.default)(this, PromotionTracking); | |
| 919 | - return _callSuper(this, PromotionTracking, arguments); | |
| 920 | - } | |
| 921 | - (0, _inherits2.default)(PromotionTracking, _BaseTracking); | |
| 922 | - return (0, _createClass2.default)(PromotionTracking, null, [{ | |
| 923 | - key: "init", | |
| 924 | - value: function init() { | |
| 925 | - this.attachDelegatedTracking(); | |
| 926 | - } | |
| 927 | - }, { | |
| 928 | - key: "attachDelegatedTracking", | |
| 929 | - value: function attachDelegatedTracking() { | |
| 930 | - var _this = this; | |
| 931 | - this.addEventListenerTracked(document, 'click', function (event) { | |
| 932 | - var target = event.target; | |
| 933 | - if (!target) { | |
| 934 | - return; | |
| 935 | - } | |
| 936 | - var button = target.closest("a".concat(PROMO_SELECTORS.CTA_BUTTON)); | |
| 937 | - if (!button) { | |
| 938 | - return; | |
| 939 | - } | |
| 940 | - var promoPage = button.closest("".concat(PROMO_SELECTORS.PROMO_PAGE, ", ").concat(PROMO_SELECTORS.PROMO_BLANK_STATE)); | |
| 941 | - if (!promoPage) { | |
| 942 | - return; | |
| 943 | - } | |
| 944 | - _this.handlePromoClick(button, promoPage); | |
| 945 | - }, { | |
| 946 | - capture: true | |
| 947 | - }); | |
| 948 | - } | |
| 949 | - }, { | |
| 950 | - key: "handlePromoClick", | |
| 951 | - value: function handlePromoClick(button, promoPage) { | |
| 952 | - var promoTitle = this.extractPromoTitle(promoPage, button); | |
| 953 | - var destination = button.getAttribute('href'); | |
| 954 | - var path = this.extractPromoPath(); | |
| 955 | - _wpDashboardTracking.default.trackPromoClicked(promoTitle, destination, path); | |
| 956 | - } | |
| 957 | - }, { | |
| 958 | - key: "extractPromoTitle", | |
| 959 | - value: function extractPromoTitle(promoPage, button) { | |
| 960 | - var titleElement = promoPage.querySelector(PROMO_SELECTORS.TITLE); | |
| 961 | - return titleElement ? titleElement.textContent.trim() : button.textContent.trim(); | |
| 962 | - } | |
| 963 | - }, { | |
| 964 | - key: "extractPromoPath", | |
| 965 | - value: function extractPromoPath() { | |
| 966 | - var urlParams = new URLSearchParams(window.location.search); | |
| 967 | - var page = urlParams.get('page'); | |
| 968 | - if (!page) { | |
| 969 | - return 'elementor'; | |
| 970 | - } | |
| 971 | - return page.replace('elementor_', '').replace(/_/g, '/'); | |
| 972 | - } | |
| 973 | - }]); | |
| 974 | -}(_baseTracking.default); | |
| 975 | -var _default = exports["default"] = PromotionTracking; | |
| 976 | 190 | |
| 191 | + | |
| 977 | 192 | /***/ }), |
| 978 | 193 | |
| 979 | -/***/ "../app/assets/js/event-track/dashboard/screen-view.js": | |
| 980 | -/*!*************************************************************!*\ | |
| 981 | - !*** ../app/assets/js/event-track/dashboard/screen-view.js ***! | |
| 982 | - \*************************************************************/ | |
| 983 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 194 | +/***/ 12: | |
| 195 | +/***/ (function(module, exports, __webpack_require__) { | |
| 984 | 196 | |
| 985 | -"use strict"; | |
| 197 | +var store = __webpack_require__(66)('wks'); | |
| 198 | +var uid = __webpack_require__(67); | |
| 199 | +var Symbol = __webpack_require__(17).Symbol; | |
| 200 | +var USE_SYMBOL = typeof Symbol == 'function'; | |
| 986 | 201 | |
| 987 | - | |
| 988 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 989 | -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 990 | -Object.defineProperty(exports, "__esModule", ({ | |
| 991 | - value: true | |
| 992 | -})); | |
| 993 | -exports["default"] = void 0; | |
| 994 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 995 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 996 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 997 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 998 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 999 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1000 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 1001 | -var _wpDashboardTracking = _interopRequireWildcard(__webpack_require__(/*! ../wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js")); | |
| 1002 | -var _utils = __webpack_require__(/*! ./utils */ "../app/assets/js/event-track/dashboard/utils.js"); | |
| 1003 | -var _baseTracking = _interopRequireDefault(__webpack_require__(/*! ./base-tracking */ "../app/assets/js/event-track/dashboard/base-tracking.js")); | |
| 1004 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 1005 | -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } | |
| 1006 | -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } | |
| 1007 | -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } | |
| 1008 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1009 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1010 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 1011 | -var SCREEN_SELECTORS = { | |
| 1012 | - NAV_TAB_WRAPPER: '.nav-tab-wrapper', | |
| 1013 | - NAV_TAB: '.nav-tab', | |
| 1014 | - NAV_TAB_ACTIVE: '.nav-tab-active', | |
| 1015 | - SETTINGS_FORM_PAGE: '.elementor-settings-form-page', | |
| 1016 | - SETTINGS_FORM_PAGE_ACTIVE: '.elementor-settings-form-page.elementor-active', | |
| 1017 | - FLOATING_ELEMENTS_MODAL: '#elementor-new-floating-elements-modal', | |
| 1018 | - TEMPLATE_DIALOG_MODAL: '#elementor-new-template-dialog-content' | |
| 202 | +var $exports = module.exports = function (name) { | |
| 203 | + return store[name] || (store[name] = | |
| 204 | + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); | |
| 1019 | 205 | }; |
| 1020 | -var TRACKED_MODALS = [SCREEN_SELECTORS.FLOATING_ELEMENTS_MODAL, SCREEN_SELECTORS.TEMPLATE_DIALOG_MODAL]; | |
| 1021 | -var ScreenViewTracking = /*#__PURE__*/function (_BaseTracking) { | |
| 1022 | - function ScreenViewTracking() { | |
| 1023 | - (0, _classCallCheck2.default)(this, ScreenViewTracking); | |
| 1024 | - return _callSuper(this, ScreenViewTracking, arguments); | |
| 1025 | - } | |
| 1026 | - (0, _inherits2.default)(ScreenViewTracking, _BaseTracking); | |
| 1027 | - return (0, _createClass2.default)(ScreenViewTracking, null, [{ | |
| 1028 | - key: "init", | |
| 1029 | - value: function init() { | |
| 1030 | - if (!_utils.DashboardUtils.isElementorPage()) { | |
| 1031 | - return; | |
| 1032 | - } | |
| 1033 | - this.attachTabChangeTracking(); | |
| 1034 | - } | |
| 1035 | - }, { | |
| 1036 | - key: "destroy", | |
| 1037 | - value: function destroy() { | |
| 1038 | - _superPropGet(ScreenViewTracking, "destroy", this, 2)([]); | |
| 1039 | - this.trackedScreens.clear(); | |
| 1040 | - } | |
| 1041 | - }, { | |
| 1042 | - key: "getScreenData", | |
| 1043 | - value: function getScreenData() { | |
| 1044 | - var urlParams = new URLSearchParams(window.location.search); | |
| 1045 | - var page = urlParams.get('page'); | |
| 1046 | - var postType = urlParams.get('post_type'); | |
| 1047 | - var hash = window.location.hash; | |
| 1048 | - var screenId = ''; | |
| 1049 | - var screenType = ''; | |
| 1050 | - if (page) { | |
| 1051 | - screenId = page; | |
| 1052 | - } else if (postType) { | |
| 1053 | - screenId = postType; | |
| 1054 | - } else { | |
| 1055 | - screenId = this.getScreenIdFromBody(); | |
| 1056 | - } | |
| 1057 | - if (this.isElementorAppPage()) { | |
| 1058 | - var appScreenData = this.getAppScreenData(hash); | |
| 1059 | - if (appScreenData) { | |
| 1060 | - return appScreenData; | |
| 1061 | - } | |
| 1062 | - } | |
| 1063 | - var hasNavTabs = document.querySelector(SCREEN_SELECTORS.NAV_TAB_WRAPPER); | |
| 1064 | - var hasSettingsTabs = document.querySelectorAll(SCREEN_SELECTORS.SETTINGS_FORM_PAGE).length > 1; | |
| 1065 | - if (hasNavTabs || hasSettingsTabs || hash && !this.isElementorAppPage()) { | |
| 1066 | - screenType = _wpDashboardTracking.SCREEN_TYPES.TAB; | |
| 1067 | - if (hash) { | |
| 1068 | - var tabId = hash.replace(/^#(tab-)?/, ''); | |
| 1069 | - screenId = "".concat(screenId, "-").concat(tabId); | |
| 1070 | - } else if (hasNavTabs) { | |
| 1071 | - var activeTab = document.querySelector(SCREEN_SELECTORS.NAV_TAB_ACTIVE); | |
| 1072 | - if (activeTab) { | |
| 1073 | - var tabText = activeTab.textContent.trim(); | |
| 1074 | - var tabHref = activeTab.getAttribute('href'); | |
| 1075 | - if (tabText) { | |
| 1076 | - screenId = "".concat(screenId, "-").concat(this.sanitizeScreenId(tabText)); | |
| 1077 | - } else if (tabHref && tabHref.includes('#')) { | |
| 1078 | - var _tabId = tabHref.split('#')[1]; | |
| 1079 | - screenId = "".concat(screenId, "-").concat(_tabId); | |
| 1080 | - } | |
| 1081 | - } | |
| 1082 | - } else if (hasSettingsTabs) { | |
| 1083 | - var activeSettingsTab = document.querySelector(SCREEN_SELECTORS.SETTINGS_FORM_PAGE_ACTIVE); | |
| 1084 | - if (activeSettingsTab) { | |
| 1085 | - var _tabId2 = activeSettingsTab.id; | |
| 1086 | - if (_tabId2) { | |
| 1087 | - screenId = "".concat(screenId, "-").concat(_tabId2); | |
| 1088 | - } | |
| 1089 | - } | |
| 1090 | - } | |
| 1091 | - } | |
| 1092 | - return { | |
| 1093 | - screenId: screenId, | |
| 1094 | - screenType: screenType | |
| 1095 | - }; | |
| 1096 | - } | |
| 1097 | - }, { | |
| 1098 | - key: "isElementorAppPage", | |
| 1099 | - value: function isElementorAppPage() { | |
| 1100 | - var urlParams = new URLSearchParams(window.location.search); | |
| 1101 | - return 'elementor-app' === urlParams.get('page'); | |
| 1102 | - } | |
| 1103 | - }, { | |
| 1104 | - key: "getAppScreenData", | |
| 1105 | - value: function getAppScreenData(hash) { | |
| 1106 | - if (!hash) { | |
| 1107 | - return null; | |
| 1108 | - } | |
| 1109 | - var cleanHash = hash.replace(/^#/, ''); | |
| 1110 | - if (!cleanHash.startsWith('/')) { | |
| 1111 | - return null; | |
| 1112 | - } | |
| 1113 | - var pathParts = cleanHash.split('/').filter(Boolean); | |
| 1114 | - if (0 === pathParts.length) { | |
| 1115 | - return null; | |
| 1116 | - } | |
| 1117 | - var screenId = pathParts.join('/'); | |
| 1118 | - var screenType = _wpDashboardTracking.SCREEN_TYPES.APP_SCREEN; | |
| 1119 | - return { | |
| 1120 | - screenId: screenId, | |
| 1121 | - screenType: screenType | |
| 1122 | - }; | |
| 1123 | - } | |
| 1124 | - }, { | |
| 1125 | - key: "getScreenIdFromBody", | |
| 1126 | - value: function getScreenIdFromBody() { | |
| 1127 | - var body = document.body; | |
| 1128 | - var bodyClasses = body.className.split(' '); | |
| 1129 | - var _iterator = _createForOfIteratorHelper(bodyClasses), | |
| 1130 | - _step; | |
| 1131 | - try { | |
| 1132 | - for (_iterator.s(); !(_step = _iterator.n()).done;) { | |
| 1133 | - var cls = _step.value; | |
| 1134 | - if (cls.startsWith('elementor') && (cls.includes('page') || cls.includes('post-type'))) { | |
| 1135 | - return cls; | |
| 1136 | - } | |
| 1137 | - } | |
| 1138 | - } catch (err) { | |
| 1139 | - _iterator.e(err); | |
| 1140 | - } finally { | |
| 1141 | - _iterator.f(); | |
| 1142 | - } | |
| 1143 | - return 'elementor-unknown'; | |
| 1144 | - } | |
| 1145 | - }, { | |
| 1146 | - key: "sanitizeScreenId", | |
| 1147 | - value: function sanitizeScreenId(text) { | |
| 1148 | - return text.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, ''); | |
| 1149 | - } | |
| 1150 | - }, { | |
| 1151 | - key: "attachTabChangeTracking", | |
| 1152 | - value: function attachTabChangeTracking() { | |
| 1153 | - this.attachNavTabTracking(); | |
| 1154 | - this.attachHashChangeTracking(); | |
| 1155 | - this.attachSettingsTabTracking(); | |
| 1156 | - this.attachModalTracking(); | |
| 1157 | - } | |
| 1158 | - }, { | |
| 1159 | - key: "attachNavTabTracking", | |
| 1160 | - value: function attachNavTabTracking() { | |
| 1161 | - var _this = this; | |
| 1162 | - var wrapper = document.querySelector(SCREEN_SELECTORS.NAV_TAB_WRAPPER); | |
| 1163 | - if (!wrapper) { | |
| 1164 | - return; | |
| 1165 | - } | |
| 1166 | - this.addEventListenerTracked(wrapper, 'click', function (event) { | |
| 1167 | - var navTab = event.target.closest(SCREEN_SELECTORS.NAV_TAB); | |
| 1168 | - if (navTab && !navTab.classList.contains('nav-tab-active')) { | |
| 1169 | - var screenData = _this.getScreenData(); | |
| 1170 | - if (screenData) { | |
| 1171 | - _this.trackScreen(screenData.screenId, screenData.screenType); | |
| 1172 | - } | |
| 1173 | - } | |
| 1174 | - }); | |
| 1175 | - } | |
| 1176 | - }, { | |
| 1177 | - key: "attachHashChangeTracking", | |
| 1178 | - value: function attachHashChangeTracking() { | |
| 1179 | - var _this2 = this; | |
| 1180 | - this.addEventListenerTracked(window, 'hashchange', function () { | |
| 1181 | - var screenData = _this2.getScreenData(); | |
| 1182 | - if (screenData) { | |
| 1183 | - _this2.trackScreen(screenData.screenId, screenData.screenType); | |
| 1184 | - } | |
| 1185 | - }); | |
| 1186 | - } | |
| 1187 | - }, { | |
| 1188 | - key: "attachSettingsTabTracking", | |
| 1189 | - value: function attachSettingsTabTracking() { | |
| 1190 | - var _this3 = this; | |
| 1191 | - var settingsPages = document.querySelectorAll(SCREEN_SELECTORS.SETTINGS_FORM_PAGE); | |
| 1192 | - if (0 === settingsPages.length) { | |
| 1193 | - return; | |
| 1194 | - } | |
| 1195 | - settingsPages.forEach(function (page) { | |
| 1196 | - _this3.addObserver(page, { | |
| 1197 | - attributes: true, | |
| 1198 | - attributeFilter: ['class'] | |
| 1199 | - }, function () { | |
| 1200 | - var screenData = _this3.getScreenData(); | |
| 1201 | - if (screenData) { | |
| 1202 | - _this3.trackScreen(screenData.screenId, screenData.screenType); | |
| 1203 | - } | |
| 1204 | - }); | |
| 1205 | - }); | |
| 1206 | - } | |
| 1207 | - }, { | |
| 1208 | - key: "attachModalTracking", | |
| 1209 | - value: function attachModalTracking() { | |
| 1210 | - var _this4 = this; | |
| 1211 | - this.addObserver(document.body, { | |
| 1212 | - childList: true, | |
| 1213 | - subtree: true | |
| 1214 | - }, function (mutations) { | |
| 1215 | - var _iterator2 = _createForOfIteratorHelper(mutations), | |
| 1216 | - _step2; | |
| 1217 | - try { | |
| 1218 | - for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { | |
| 1219 | - var mutation = _step2.value; | |
| 1220 | - if ('childList' === mutation.type) { | |
| 1221 | - TRACKED_MODALS.forEach(function (modalSelector) { | |
| 1222 | - var modal = document.querySelector(modalSelector); | |
| 1223 | - if (modal && _this4.isModalVisible(modal)) { | |
| 1224 | - var modalId = modalSelector.replace('#', ''); | |
| 1225 | - _this4.trackScreen(modalId, _wpDashboardTracking.SCREEN_TYPES.POPUP); | |
| 1226 | - } | |
| 1227 | - }); | |
| 1228 | - } | |
| 1229 | - } | |
| 1230 | - } catch (err) { | |
| 1231 | - _iterator2.e(err); | |
| 1232 | - } finally { | |
| 1233 | - _iterator2.f(); | |
| 1234 | - } | |
| 1235 | - }); | |
| 1236 | - } | |
| 1237 | - }, { | |
| 1238 | - key: "isModalVisible", | |
| 1239 | - value: function isModalVisible(element) { | |
| 1240 | - if (!element) { | |
| 1241 | - return false; | |
| 1242 | - } | |
| 1243 | - var style = window.getComputedStyle(element); | |
| 1244 | - return 'none' !== style.display && 0 !== parseFloat(style.opacity); | |
| 1245 | - } | |
| 1246 | - }, { | |
| 1247 | - key: "trackScreen", | |
| 1248 | - value: function trackScreen(screenId) { | |
| 1249 | - var screenType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _wpDashboardTracking.SCREEN_TYPES.TOP_LEVEL_PAGE; | |
| 1250 | - var trackingKey = "".concat(screenId, "-").concat(screenType); | |
| 1251 | - if (this.trackedScreens.has(trackingKey)) { | |
| 1252 | - return; | |
| 1253 | - } | |
| 1254 | - this.trackedScreens.add(trackingKey); | |
| 1255 | - _wpDashboardTracking.default.trackScreenViewed(screenId, screenType); | |
| 1256 | - } | |
| 1257 | - }]); | |
| 1258 | -}(_baseTracking.default); | |
| 1259 | -(0, _defineProperty2.default)(ScreenViewTracking, "trackedScreens", new Set()); | |
| 1260 | -var _default = exports["default"] = ScreenViewTracking; | |
| 1261 | 206 | |
| 1262 | -/***/ }), | |
| 207 | +$exports.store = store; | |
| 1263 | 208 | |
| 1264 | -/***/ "../app/assets/js/event-track/dashboard/utils.js": | |
| 1265 | -/*!*******************************************************!*\ | |
| 1266 | - !*** ../app/assets/js/event-track/dashboard/utils.js ***! | |
| 1267 | - \*******************************************************/ | |
| 1268 | -/***/ ((__unused_webpack_module, exports) => { | |
| 1269 | 209 | |
| 1270 | -"use strict"; | |
| 210 | +/***/ }), | |
| 1271 | 211 | |
| 212 | +/***/ 120: | |
| 213 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1272 | 214 | |
| 1273 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1274 | - value: true | |
| 1275 | -})); | |
| 1276 | -exports.DashboardUtils = void 0; | |
| 1277 | -var DashboardUtils = exports.DashboardUtils = { | |
| 1278 | - isElementorPage: function isElementorPage() { | |
| 1279 | - var urlParams = new URLSearchParams(window.location.search); | |
| 1280 | - var page = urlParams.get('page'); | |
| 1281 | - if (page && (page.startsWith('elementor') || page.includes('elementor'))) { | |
| 1282 | - return true; | |
| 1283 | - } | |
| 1284 | - var postType = urlParams.get('post_type'); | |
| 1285 | - if ('elementor_library' === postType || 'e-floating-buttons' === postType) { | |
| 1286 | - return true; | |
| 1287 | - } | |
| 1288 | - var body = document.body; | |
| 1289 | - var bodyClasses = body.className.split(' '); | |
| 1290 | - return bodyClasses.some(function (cls) { | |
| 1291 | - return cls.includes('elementor') && (cls.includes('page') || cls.includes('post-type')); | |
| 1292 | - }); | |
| 1293 | - } | |
| 215 | +// fallback for non-array-like ES3 and non-enumerable old V8 strings | |
| 216 | +var cof = __webpack_require__(46); | |
| 217 | +// eslint-disable-next-line no-prototype-builtins | |
| 218 | +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { | |
| 219 | + return cof(it) == 'String' ? it.split('') : Object(it); | |
| 1294 | 220 | }; |
| 1295 | 221 | |
| 222 | + | |
| 1296 | 223 | /***/ }), |
| 1297 | 224 | |
| 1298 | -/***/ "../app/assets/js/event-track/wp-dashboard-tracking.js": | |
| 1299 | -/*!*************************************************************!*\ | |
| 1300 | - !*** ../app/assets/js/event-track/wp-dashboard-tracking.js ***! | |
| 1301 | - \*************************************************************/ | |
| 1302 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 225 | +/***/ 122: | |
| 226 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1303 | 227 | |
| 1304 | -"use strict"; | |
| 228 | +// 7.2.8 IsRegExp(argument) | |
| 229 | +var isObject = __webpack_require__(30); | |
| 230 | +var cof = __webpack_require__(46); | |
| 231 | +var MATCH = __webpack_require__(12)('match'); | |
| 232 | +module.exports = function (it) { | |
| 233 | + var isRegExp; | |
| 234 | + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); | |
| 235 | +}; | |
| 1305 | 236 | |
| 1306 | 237 | |
| 1307 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1308 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1309 | - value: true | |
| 1310 | -})); | |
| 1311 | -exports["default"] = exports.SCREEN_TYPES = exports.NAV_AREAS = exports.CONTROL_TYPES = void 0; | |
| 1312 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1313 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1314 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 1315 | -var _navigation = _interopRequireDefault(__webpack_require__(/*! ./dashboard/navigation */ "../app/assets/js/event-track/dashboard/navigation.js")); | |
| 1316 | -var _pluginActions = _interopRequireDefault(__webpack_require__(/*! ./dashboard/plugin-actions */ "../app/assets/js/event-track/dashboard/plugin-actions.js")); | |
| 1317 | -var _promotion = _interopRequireDefault(__webpack_require__(/*! ./dashboard/promotion */ "../app/assets/js/event-track/dashboard/promotion.js")); | |
| 1318 | -var _screenView = _interopRequireDefault(__webpack_require__(/*! ./dashboard/screen-view */ "../app/assets/js/event-track/dashboard/screen-view.js")); | |
| 1319 | -var _menuPromotion = _interopRequireDefault(__webpack_require__(/*! ./dashboard/menu-promotion */ "../app/assets/js/event-track/dashboard/menu-promotion.js")); | |
| 1320 | -var _actionControls = _interopRequireDefault(__webpack_require__(/*! ./dashboard/action-controls */ "../app/assets/js/event-track/dashboard/action-controls.js")); | |
| 1321 | -var SESSION_TIMEOUT_MINUTES = 30; | |
| 1322 | -var MINUTE_MS = 60 * 1000; | |
| 1323 | -var SESSION_TIMEOUT = SESSION_TIMEOUT_MINUTES * MINUTE_MS; | |
| 1324 | -var ACTIVITY_CHECK_INTERVAL = 1 * MINUTE_MS; | |
| 1325 | -var SESSION_STORAGE_KEY = 'elementor_wpdash_session'; | |
| 1326 | -var PENDING_NAV_CLICK_KEY = 'elementor_wpdash_pending_nav'; | |
| 1327 | -var CONTROL_TYPES = exports.CONTROL_TYPES = { | |
| 1328 | - BUTTON: 'button', | |
| 1329 | - CHECKBOX: 'checkbox', | |
| 1330 | - RADIO: 'radio', | |
| 1331 | - LINK: 'link', | |
| 1332 | - SELECT: 'select', | |
| 1333 | - TOGGLE: 'toggle', | |
| 1334 | - FILTER: 'filter' | |
| 1335 | -}; | |
| 1336 | -var NAV_AREAS = exports.NAV_AREAS = { | |
| 1337 | - LEFT_MENU: 'left_menu', | |
| 1338 | - SUBMENU: 'submenu', | |
| 1339 | - HOVER_MENU: 'hover_menu', | |
| 1340 | - TOP_BAR: 'top_bar', | |
| 1341 | - SIDEBAR_MENU: 'sidebar' | |
| 1342 | -}; | |
| 1343 | -var SCREEN_TYPES = exports.SCREEN_TYPES = { | |
| 1344 | - TAB: 'tab', | |
| 1345 | - POPUP: 'popup', | |
| 1346 | - APP_SCREEN: 'app_screen' | |
| 1347 | -}; | |
| 1348 | -var WpDashboardTracking = exports["default"] = /*#__PURE__*/function () { | |
| 1349 | - function WpDashboardTracking() { | |
| 1350 | - (0, _classCallCheck2.default)(this, WpDashboardTracking); | |
| 1351 | - } | |
| 1352 | - return (0, _createClass2.default)(WpDashboardTracking, null, [{ | |
| 1353 | - key: "getElementorCommon", | |
| 1354 | - value: function getElementorCommon() { | |
| 1355 | - return window.elementorCommon; | |
| 1356 | - } | |
| 1357 | - }, { | |
| 1358 | - key: "init", | |
| 1359 | - value: function init() { | |
| 1360 | - if (this.initialized) { | |
| 1361 | - return; | |
| 1362 | - } | |
| 1363 | - this.restoreOrCreateSession(); | |
| 1364 | - if (this.isEventsManagerAvailable()) { | |
| 1365 | - this.startSessionMonitoring(); | |
| 1366 | - this.attachActivityListeners(); | |
| 1367 | - this.attachNavigationListener(); | |
| 1368 | - this.initialized = true; | |
| 1369 | - } | |
| 1370 | - } | |
| 1371 | - }, { | |
| 1372 | - key: "restoreOrCreateSession", | |
| 1373 | - value: function restoreOrCreateSession() { | |
| 1374 | - var storedSession = this.getStoredSession(); | |
| 1375 | - if (storedSession) { | |
| 1376 | - this.sessionStartTime = storedSession.sessionStartTime; | |
| 1377 | - this.navItemsVisited = new Set(storedSession.navItemsVisited); | |
| 1378 | - this.lastActivityTime = Date.now(); | |
| 1379 | - this.sessionEnded = false; | |
| 1380 | - } else { | |
| 1381 | - this.sessionStartTime = Date.now(); | |
| 1382 | - this.lastActivityTime = Date.now(); | |
| 1383 | - this.sessionEnded = false; | |
| 1384 | - this.navItemsVisited = new Set(); | |
| 1385 | - } | |
| 1386 | - this.processPendingNavClick(); | |
| 1387 | - this.saveSessionToStorage(); | |
| 1388 | - } | |
| 1389 | - }, { | |
| 1390 | - key: "isEditorOneActive", | |
| 1391 | - value: function isEditorOneActive() { | |
| 1392 | - var _elementorCommon$conf, _elementorCommon$conf2; | |
| 1393 | - var elementorCommon = this.getElementorCommon(); | |
| 1394 | - return (_elementorCommon$conf = elementorCommon === null || elementorCommon === void 0 || (_elementorCommon$conf2 = elementorCommon.config) === null || _elementorCommon$conf2 === void 0 || (_elementorCommon$conf2 = _elementorCommon$conf2.editor_events) === null || _elementorCommon$conf2 === void 0 ? void 0 : _elementorCommon$conf2.isEditorOneActive) !== null && _elementorCommon$conf !== void 0 ? _elementorCommon$conf : false; | |
| 1395 | - } | |
| 1396 | - }, { | |
| 1397 | - key: "processPendingNavClick", | |
| 1398 | - value: function processPendingNavClick() { | |
| 1399 | - try { | |
| 1400 | - var pendingNav = sessionStorage.getItem(PENDING_NAV_CLICK_KEY); | |
| 1401 | - if (pendingNav) { | |
| 1402 | - var _JSON$parse = JSON.parse(pendingNav), | |
| 1403 | - itemId = _JSON$parse.itemId, | |
| 1404 | - rootItem = _JSON$parse.rootItem, | |
| 1405 | - area = _JSON$parse.area; | |
| 1406 | - this.navItemsVisited.add(itemId); | |
| 1407 | - var properties = { | |
| 1408 | - wpdash_nav_item_id: itemId, | |
| 1409 | - wpdash_nav_area: area | |
| 1410 | - }; | |
| 1411 | - if (rootItem) { | |
| 1412 | - properties.wpdash_nav_item_root = rootItem; | |
| 1413 | - } | |
| 1414 | - this.dispatchEvent('wpdash_nav_clicked', properties, { | |
| 1415 | - send_immediately: true | |
| 1416 | - }); | |
| 1417 | - sessionStorage.removeItem(PENDING_NAV_CLICK_KEY); | |
| 1418 | - } | |
| 1419 | - } catch (error) { | |
| 1420 | - sessionStorage.removeItem(PENDING_NAV_CLICK_KEY); | |
| 1421 | - } | |
| 1422 | - } | |
| 1423 | - }, { | |
| 1424 | - key: "getStoredSession", | |
| 1425 | - value: function getStoredSession() { | |
| 1426 | - try { | |
| 1427 | - var stored = sessionStorage.getItem(SESSION_STORAGE_KEY); | |
| 1428 | - return stored ? JSON.parse(stored) : null; | |
| 1429 | - } catch (error) { | |
| 1430 | - return null; | |
| 1431 | - } | |
| 1432 | - } | |
| 1433 | - }, { | |
| 1434 | - key: "saveSessionToStorage", | |
| 1435 | - value: function saveSessionToStorage() { | |
| 1436 | - var sessionData = { | |
| 1437 | - sessionStartTime: this.sessionStartTime, | |
| 1438 | - navItemsVisited: Array.from(this.navItemsVisited) | |
| 1439 | - }; | |
| 1440 | - sessionStorage.setItem(SESSION_STORAGE_KEY, JSON.stringify(sessionData)); | |
| 1441 | - } | |
| 1442 | - }, { | |
| 1443 | - key: "clearStoredSession", | |
| 1444 | - value: function clearStoredSession() { | |
| 1445 | - sessionStorage.removeItem(SESSION_STORAGE_KEY); | |
| 1446 | - } | |
| 1447 | - }, { | |
| 1448 | - key: "isEventsManagerAvailable", | |
| 1449 | - value: function isEventsManagerAvailable() { | |
| 1450 | - var elementorCommon = this.getElementorCommon(); | |
| 1451 | - return (elementorCommon === null || elementorCommon === void 0 ? void 0 : elementorCommon.eventsManager) && 'function' === typeof elementorCommon.eventsManager.dispatchEvent; | |
| 1452 | - } | |
| 1453 | - }, { | |
| 1454 | - key: "canSendEvents", | |
| 1455 | - value: function canSendEvents() { | |
| 1456 | - var _elementorCommon$conf3, _elementorCommon$conf4; | |
| 1457 | - var elementorCommon = this.getElementorCommon(); | |
| 1458 | - return (_elementorCommon$conf3 = elementorCommon === null || elementorCommon === void 0 || (_elementorCommon$conf4 = elementorCommon.config) === null || _elementorCommon$conf4 === void 0 || (_elementorCommon$conf4 = _elementorCommon$conf4.editor_events) === null || _elementorCommon$conf4 === void 0 ? void 0 : _elementorCommon$conf4.can_send_events) !== null && _elementorCommon$conf3 !== void 0 ? _elementorCommon$conf3 : false; | |
| 1459 | - } | |
| 1460 | - }, { | |
| 1461 | - key: "dispatchEvent", | |
| 1462 | - value: function dispatchEvent(eventName) { | |
| 1463 | - var _elementorCommon$even; | |
| 1464 | - var properties = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | |
| 1465 | - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | |
| 1466 | - if (!this.isEventsManagerAvailable() || !this.canSendEvents()) { | |
| 1467 | - return; | |
| 1468 | - } | |
| 1469 | - var elementorCommon = this.getElementorCommon(); | |
| 1470 | - elementorCommon === null || elementorCommon === void 0 || (_elementorCommon$even = elementorCommon.eventsManager) === null || _elementorCommon$even === void 0 || _elementorCommon$even.dispatchEvent(eventName, properties, options); | |
| 1471 | - } | |
| 1472 | - }, { | |
| 1473 | - key: "updateActivity", | |
| 1474 | - value: function updateActivity() { | |
| 1475 | - this.lastActivityTime = Date.now(); | |
| 1476 | - } | |
| 1477 | - }, { | |
| 1478 | - key: "startSessionMonitoring", | |
| 1479 | - value: function startSessionMonitoring() { | |
| 1480 | - var _this = this; | |
| 1481 | - this.activityCheckInterval = setInterval(function () { | |
| 1482 | - _this.checkSessionTimeout(); | |
| 1483 | - }, ACTIVITY_CHECK_INTERVAL); | |
| 1484 | - window.addEventListener('beforeunload', function () { | |
| 1485 | - if (!_this.sessionEnded && !_this.isNavigatingToElementor) { | |
| 1486 | - _this.trackSessionEnd('tab_closed'); | |
| 1487 | - } | |
| 1488 | - }); | |
| 1489 | - document.addEventListener('visibilitychange', function () { | |
| 1490 | - if (!_this.sessionEnded && document.hidden) { | |
| 1491 | - var timeSinceLastActivity = Date.now() - _this.lastActivityTime; | |
| 1492 | - if (timeSinceLastActivity > SESSION_TIMEOUT) { | |
| 1493 | - _this.trackSessionEnd('tab_inactive'); | |
| 1494 | - } | |
| 1495 | - } | |
| 1496 | - }); | |
| 1497 | - } | |
| 1498 | - }, { | |
| 1499 | - key: "isElementorPage", | |
| 1500 | - value: function isElementorPage(url) { | |
| 1501 | - try { | |
| 1502 | - var urlObj = new URL(url, window.location.origin); | |
| 1503 | - var params = urlObj.searchParams; | |
| 1504 | - var page = params.get('page'); | |
| 1505 | - var postType = params.get('post_type'); | |
| 1506 | - var action = params.get('action'); | |
| 1507 | - var elementorPages = ['elementor-home', 'e-form-submissions']; | |
| 1508 | - var elementorPostTypes = ['elementor_library', 'e-floating-buttons']; | |
| 1509 | - return page && elementorPages.some(function (p) { | |
| 1510 | - return page.includes(p); | |
| 1511 | - }) || postType && elementorPostTypes.includes(postType) || action && action.includes('elementor'); | |
| 1512 | - } catch (error) { | |
| 1513 | - return false; | |
| 1514 | - } | |
| 1515 | - } | |
| 1516 | - }, { | |
| 1517 | - key: "isPluginsPage", | |
| 1518 | - value: function isPluginsPage(url) { | |
| 1519 | - try { | |
| 1520 | - var urlObj = new URL(url, window.location.origin); | |
| 1521 | - return urlObj.pathname.includes('plugins.php'); | |
| 1522 | - } catch (error) { | |
| 1523 | - return false; | |
| 1524 | - } | |
| 1525 | - } | |
| 1526 | - }, { | |
| 1527 | - key: "isNavigatingAwayFromElementor", | |
| 1528 | - value: function isNavigatingAwayFromElementor(targetUrl) { | |
| 1529 | - if (!targetUrl) { | |
| 1530 | - return false; | |
| 1531 | - } | |
| 1532 | - if (targetUrl.startsWith('#')) { | |
| 1533 | - return false; | |
| 1534 | - } | |
| 1535 | - return !this.isElementorPage(targetUrl); | |
| 1536 | - } | |
| 1537 | - }, { | |
| 1538 | - key: "isLinkOpeningInNewTab", | |
| 1539 | - value: function isLinkOpeningInNewTab(link) { | |
| 1540 | - var target = link.getAttribute('target'); | |
| 1541 | - return '_blank' === target || '_new' === target; | |
| 1542 | - } | |
| 1543 | - }, { | |
| 1544 | - key: "attachNavigationListener", | |
| 1545 | - value: function attachNavigationListener() { | |
| 1546 | - var _this2 = this; | |
| 1547 | - var handleLinkClick = function handleLinkClick(event) { | |
| 1548 | - var link = event.target.closest('a'); | |
| 1549 | - if (link && link.href) { | |
| 1550 | - if (_this2.isLinkOpeningInNewTab(link)) { | |
| 1551 | - return; | |
| 1552 | - } | |
| 1553 | - if (!_this2.sessionEnded && _this2.isNavigatingAwayFromElementor(link.href)) { | |
| 1554 | - _this2.trackSessionEnd('navigate_away'); | |
| 1555 | - } else if (_this2.isElementorPage(link.href)) { | |
| 1556 | - _this2.isNavigatingToElementor = true; | |
| 1557 | - } | |
| 1558 | - } | |
| 1559 | - var isSidebar = event.target.closest('#editor-one-sidebar-navigation'); | |
| 1560 | - if (isSidebar) { | |
| 1561 | - _this2.isNavigatingToElementor = true; | |
| 1562 | - } | |
| 1563 | - }; | |
| 1564 | - var handleFormSubmit = function handleFormSubmit(event) { | |
| 1565 | - var form = event.target; | |
| 1566 | - if (form.action) { | |
| 1567 | - if (!_this2.sessionEnded && _this2.isNavigatingAwayFromElementor(form.action)) { | |
| 1568 | - _this2.trackSessionEnd('navigate_away'); | |
| 1569 | - } else if (_this2.isElementorPage(form.action)) { | |
| 1570 | - _this2.isNavigatingToElementor = true; | |
| 1571 | - } | |
| 1572 | - } | |
| 1573 | - }; | |
| 1574 | - document.addEventListener('click', handleLinkClick, true); | |
| 1575 | - document.addEventListener('submit', handleFormSubmit, true); | |
| 1576 | - this.navigationListeners.push({ | |
| 1577 | - type: 'click', | |
| 1578 | - handler: handleLinkClick | |
| 1579 | - }, { | |
| 1580 | - type: 'submit', | |
| 1581 | - handler: handleFormSubmit | |
| 1582 | - }); | |
| 1583 | - } | |
| 1584 | - }, { | |
| 1585 | - key: "checkSessionTimeout", | |
| 1586 | - value: function checkSessionTimeout() { | |
| 1587 | - var timeSinceLastActivity = Date.now() - this.lastActivityTime; | |
| 1588 | - if (timeSinceLastActivity > SESSION_TIMEOUT && !this.sessionEnded) { | |
| 1589 | - this.trackSessionEnd('timeout'); | |
| 1590 | - } | |
| 1591 | - } | |
| 1592 | - }, { | |
| 1593 | - key: "attachActivityListeners", | |
| 1594 | - value: function attachActivityListeners() { | |
| 1595 | - var _this3 = this; | |
| 1596 | - var events = ['mousedown', 'keydown', 'scroll', 'touchstart', 'click']; | |
| 1597 | - events.forEach(function (event) { | |
| 1598 | - document.addEventListener(event, function () { | |
| 1599 | - _this3.updateActivity(); | |
| 1600 | - }, { | |
| 1601 | - capture: true, | |
| 1602 | - passive: true | |
| 1603 | - }); | |
| 1604 | - }); | |
| 1605 | - } | |
| 1606 | - }, { | |
| 1607 | - key: "formatDuration", | |
| 1608 | - value: function formatDuration(milliseconds) { | |
| 1609 | - var totalSeconds = Math.floor(milliseconds / 1000); | |
| 1610 | - return Number(totalSeconds.toFixed(2)); | |
| 1611 | - } | |
| 1612 | - }, { | |
| 1613 | - key: "trackNavClicked", | |
| 1614 | - value: function trackNavClicked(itemId) { | |
| 1615 | - var rootItem = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | |
| 1616 | - var area = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : NAV_AREAS.LEFT_MENU; | |
| 1617 | - if (!this.initialized) { | |
| 1618 | - var pendingNav = { | |
| 1619 | - itemId: itemId, | |
| 1620 | - rootItem: rootItem, | |
| 1621 | - area: area | |
| 1622 | - }; | |
| 1623 | - sessionStorage.setItem(PENDING_NAV_CLICK_KEY, JSON.stringify(pendingNav)); | |
| 1624 | - return; | |
| 1625 | - } | |
| 1626 | - this.updateActivity(); | |
| 1627 | - this.navItemsVisited.add(itemId); | |
| 1628 | - this.saveSessionToStorage(); | |
| 1629 | - var properties = { | |
| 1630 | - wpdash_nav_item_id: itemId, | |
| 1631 | - wpdash_nav_area: area | |
| 1632 | - }; | |
| 1633 | - if (rootItem) { | |
| 1634 | - properties.wpdash_nav_item_root = rootItem; | |
| 1635 | - } | |
| 1636 | - this.dispatchEvent('wpdash_nav_clicked', properties); | |
| 1637 | - } | |
| 1638 | - }, { | |
| 1639 | - key: "trackScreenViewed", | |
| 1640 | - value: function trackScreenViewed(screenId) { | |
| 1641 | - var screenType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SCREEN_TYPES.TAB; | |
| 1642 | - this.updateActivity(); | |
| 1643 | - var properties = { | |
| 1644 | - wpdash_screen_id: screenId, | |
| 1645 | - wpdash_screen_type: screenType | |
| 1646 | - }; | |
| 1647 | - this.dispatchEvent('wpdash_screen_viewed', properties); | |
| 1648 | - } | |
| 1649 | - }, { | |
| 1650 | - key: "trackActionControl", | |
| 1651 | - value: function trackActionControl(controlIdentifier, controlType) { | |
| 1652 | - this.updateActivity(); | |
| 1653 | - var properties = { | |
| 1654 | - wpdash_action_control_interacted: controlIdentifier, | |
| 1655 | - wpdash_control_type: controlType | |
| 1656 | - }; | |
| 1657 | - this.dispatchEvent('wpdash_action_control', properties); | |
| 1658 | - } | |
| 1659 | - }, { | |
| 1660 | - key: "trackPromoClicked", | |
| 1661 | - value: function trackPromoClicked(promoName, destination, clickPath) { | |
| 1662 | - this.updateActivity(); | |
| 1663 | - var properties = { | |
| 1664 | - wpdash_promo_name: promoName, | |
| 1665 | - wpdash_promo_destination: destination, | |
| 1666 | - wpdash_promo_clicked_path: clickPath | |
| 1667 | - }; | |
| 1668 | - this.dispatchEvent('wpdash_promo_clicked', properties); | |
| 1669 | - } | |
| 1670 | - }, { | |
| 1671 | - key: "trackSessionEnd", | |
| 1672 | - value: function trackSessionEnd() { | |
| 1673 | - var reason = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'timeout'; | |
| 1674 | - if (this.sessionEnded) { | |
| 1675 | - return; | |
| 1676 | - } | |
| 1677 | - this.sessionEnded = true; | |
| 1678 | - if (this.activityCheckInterval) { | |
| 1679 | - clearInterval(this.activityCheckInterval); | |
| 1680 | - this.activityCheckInterval = null; | |
| 1681 | - } | |
| 1682 | - var duration = Date.now() - this.sessionStartTime; | |
| 1683 | - var properties = { | |
| 1684 | - wpdash_endstate_nav_summary: Array.from(this.navItemsVisited), | |
| 1685 | - wpdash_endstate_nav_count: this.navItemsVisited.size, | |
| 1686 | - wpdash_endstate_duration: this.formatDuration(duration), | |
| 1687 | - reason: reason | |
| 1688 | - }; | |
| 1689 | - this.dispatchEvent('wpdash_session_end_state', properties); | |
| 1690 | - this.clearStoredSession(); | |
| 1691 | - } | |
| 1692 | - }, { | |
| 1693 | - key: "destroy", | |
| 1694 | - value: function destroy() { | |
| 1695 | - if (this.activityCheckInterval) { | |
| 1696 | - clearInterval(this.activityCheckInterval); | |
| 1697 | - } | |
| 1698 | - this.navigationListeners.forEach(function (_ref) { | |
| 1699 | - var type = _ref.type, | |
| 1700 | - handler = _ref.handler; | |
| 1701 | - document.removeEventListener(type, handler, true); | |
| 1702 | - }); | |
| 1703 | - this.navigationListeners = []; | |
| 1704 | - _screenView.default.destroy(); | |
| 1705 | - _promotion.default.destroy(); | |
| 1706 | - _menuPromotion.default.destroy(); | |
| 1707 | - _actionControls.default.destroy(); | |
| 1708 | - this.initialized = false; | |
| 1709 | - } | |
| 1710 | - }]); | |
| 1711 | -}(); | |
| 1712 | -(0, _defineProperty2.default)(WpDashboardTracking, "sessionStartTime", Date.now()); | |
| 1713 | -(0, _defineProperty2.default)(WpDashboardTracking, "lastActivityTime", Date.now()); | |
| 1714 | -(0, _defineProperty2.default)(WpDashboardTracking, "sessionEnded", false); | |
| 1715 | -(0, _defineProperty2.default)(WpDashboardTracking, "navItemsVisited", new Set()); | |
| 1716 | -(0, _defineProperty2.default)(WpDashboardTracking, "activityCheckInterval", null); | |
| 1717 | -(0, _defineProperty2.default)(WpDashboardTracking, "initialized", false); | |
| 1718 | -(0, _defineProperty2.default)(WpDashboardTracking, "navigationListeners", []); | |
| 1719 | -(0, _defineProperty2.default)(WpDashboardTracking, "isNavigatingToElementor", false); | |
| 1720 | -window.addEventListener('elementor/admin/init', function () { | |
| 1721 | - var currentUrl = window.location.href; | |
| 1722 | - var isPluginsPage = WpDashboardTracking.isPluginsPage(currentUrl); | |
| 1723 | - var isElementorPage = WpDashboardTracking.isElementorPage(currentUrl); | |
| 1724 | - if (isPluginsPage) { | |
| 1725 | - _pluginActions.default.init(); | |
| 1726 | - } | |
| 1727 | - _navigation.default.init(); | |
| 1728 | - if (isElementorPage) { | |
| 1729 | - WpDashboardTracking.init(); | |
| 1730 | - _screenView.default.init(); | |
| 1731 | - _promotion.default.init(); | |
| 1732 | - _menuPromotion.default.init(); | |
| 1733 | - _actionControls.default.init(); | |
| 1734 | - } | |
| 1735 | -}); | |
| 1736 | -window.addEventListener('beforeunload', function () { | |
| 1737 | - _navigation.default.destroy(); | |
| 1738 | - _pluginActions.default.destroy(); | |
| 1739 | - WpDashboardTracking.destroy(); | |
| 1740 | -}); | |
| 1741 | - | |
| 1742 | 238 | /***/ }), |
| 1743 | 239 | |
| 1744 | -/***/ "../assets/dev/js/admin/maintenance-mode.js": | |
| 1745 | -/*!**************************************************!*\ | |
| 1746 | - !*** ../assets/dev/js/admin/maintenance-mode.js ***! | |
| 1747 | - \**************************************************/ | |
| 1748 | -/***/ ((module) => { | |
| 240 | +/***/ 123: | |
| 241 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1749 | 242 | |
| 1750 | -"use strict"; | |
| 243 | +// 7.1.1 ToPrimitive(input [, PreferredType]) | |
| 244 | +var isObject = __webpack_require__(30); | |
| 245 | +// instead of the ES6 spec version, we didn't implement @@toPrimitive case | |
| 246 | +// and the second argument - flag - preferred type is a string | |
| 247 | +module.exports = function (it, S) { | |
| 248 | + if (!isObject(it)) return it; | |
| 249 | + var fn, val; | |
| 250 | + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; | |
| 251 | + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; | |
| 252 | + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; | |
| 253 | + throw TypeError("Can't convert object to primitive value"); | |
| 254 | +}; | |
| 1751 | 255 | |
| 1752 | 256 | |
| 1753 | -module.exports = elementorModules.ViewModule.extend({ | |
| 1754 | - getDefaultSettings: function getDefaultSettings() { | |
| 1755 | - return { | |
| 1756 | - selectors: { | |
| 1757 | - modeSelect: '.elementor_maintenance_mode_mode select', | |
| 1758 | - maintenanceModeTable: '#tab-maintenance_mode table', | |
| 1759 | - maintenanceModeDescriptions: '.elementor-maintenance-mode-description', | |
| 1760 | - excludeModeSelect: '.elementor_maintenance_mode_exclude_mode select', | |
| 1761 | - excludeRolesArea: '.elementor_maintenance_mode_exclude_roles', | |
| 1762 | - templateSelect: '.elementor_maintenance_mode_template_id select', | |
| 1763 | - editTemplateButton: '.elementor-edit-template', | |
| 1764 | - maintenanceModeError: '.elementor-maintenance-mode-error' | |
| 1765 | - }, | |
| 1766 | - classes: { | |
| 1767 | - isEnabled: 'elementor-maintenance-mode-is-enabled' | |
| 1768 | - } | |
| 1769 | - }; | |
| 1770 | - }, | |
| 1771 | - getDefaultElements: function getDefaultElements() { | |
| 1772 | - var elements = {}, | |
| 1773 | - selectors = this.getSettings('selectors'); | |
| 1774 | - elements.$modeSelect = jQuery(selectors.modeSelect); | |
| 1775 | - elements.$maintenanceModeTable = elements.$modeSelect.parents(selectors.maintenanceModeTable); | |
| 1776 | - elements.$excludeModeSelect = elements.$maintenanceModeTable.find(selectors.excludeModeSelect); | |
| 1777 | - elements.$excludeRolesArea = elements.$maintenanceModeTable.find(selectors.excludeRolesArea); | |
| 1778 | - elements.$templateSelect = elements.$maintenanceModeTable.find(selectors.templateSelect); | |
| 1779 | - elements.$editTemplateButton = elements.$maintenanceModeTable.find(selectors.editTemplateButton); | |
| 1780 | - elements.$maintenanceModeDescriptions = elements.$maintenanceModeTable.find(selectors.maintenanceModeDescriptions); | |
| 1781 | - elements.$maintenanceModeError = elements.$maintenanceModeTable.find(selectors.maintenanceModeError); | |
| 1782 | - return elements; | |
| 1783 | - }, | |
| 1784 | - handleModeSelectChange: function handleModeSelectChange() { | |
| 1785 | - var settings = this.getSettings(), | |
| 1786 | - elements = this.elements; | |
| 1787 | - elements.$maintenanceModeTable.toggleClass(settings.classes.isEnabled, !!elements.$modeSelect.val()); | |
| 1788 | - elements.$maintenanceModeDescriptions.hide(); | |
| 1789 | - elements.$maintenanceModeDescriptions.filter('[data-value="' + elements.$modeSelect.val() + '"]').show(); | |
| 1790 | - }, | |
| 1791 | - handleExcludeModeSelectChange: function handleExcludeModeSelectChange() { | |
| 1792 | - var elements = this.elements; | |
| 1793 | - elements.$excludeRolesArea.toggle('custom' === elements.$excludeModeSelect.val()); | |
| 1794 | - }, | |
| 1795 | - handleTemplateSelectChange: function handleTemplateSelectChange() { | |
| 1796 | - var elements = this.elements; | |
| 1797 | - var templateID = elements.$templateSelect.val(); | |
| 1798 | - if (!templateID) { | |
| 1799 | - elements.$editTemplateButton.hide(); | |
| 1800 | - elements.$maintenanceModeError.show(); | |
| 1801 | - return; | |
| 1802 | - } | |
| 1803 | - var editUrl = elementorAdmin.config.home_url + '?p=' + templateID + '&elementor'; | |
| 1804 | - elements.$editTemplateButton.prop('href', editUrl).show(); | |
| 1805 | - elements.$maintenanceModeError.hide(); | |
| 1806 | - }, | |
| 1807 | - bindEvents: function bindEvents() { | |
| 1808 | - var elements = this.elements; | |
| 1809 | - elements.$modeSelect.on('change', this.handleModeSelectChange.bind(this)); | |
| 1810 | - elements.$excludeModeSelect.on('change', this.handleExcludeModeSelectChange.bind(this)); | |
| 1811 | - elements.$templateSelect.on('change', this.handleTemplateSelectChange.bind(this)); | |
| 1812 | - }, | |
| 1813 | - onAdminInit: function onAdminInit() { | |
| 1814 | - this.handleModeSelectChange(); | |
| 1815 | - this.handleExcludeModeSelectChange(); | |
| 1816 | - this.handleTemplateSelectChange(); | |
| 1817 | - }, | |
| 1818 | - onInit: function onInit() { | |
| 1819 | - elementorModules.ViewModule.prototype.onInit.apply(this, arguments); | |
| 1820 | - elementorCommon.elements.$window.on('elementor/admin/init', this.onAdminInit); | |
| 1821 | - } | |
| 1822 | -}); | |
| 257 | +/***/ }), | |
| 1823 | 258 | |
| 1824 | -/***/ }), | |
| 259 | +/***/ 129: | |
| 260 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1825 | 261 | |
| 1826 | -/***/ "../assets/dev/js/admin/menu-handler.js": | |
| 1827 | -/*!**********************************************!*\ | |
| 1828 | - !*** ../assets/dev/js/admin/menu-handler.js ***! | |
| 1829 | - \**********************************************/ | |
| 1830 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 262 | +module.exports = !__webpack_require__(27) && !__webpack_require__(33)(function () { | |
| 263 | + return Object.defineProperty(__webpack_require__(109)('div'), 'a', { get: function () { return 7; } }).a != 7; | |
| 264 | +}); | |
| 1831 | 265 | |
| 1832 | -"use strict"; | |
| 1833 | 266 | |
| 267 | +/***/ }), | |
| 1834 | 268 | |
| 1835 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1836 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1837 | - value: true | |
| 1838 | -})); | |
| 1839 | -exports["default"] = void 0; | |
| 1840 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1841 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1842 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1843 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1844 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 1845 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1846 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1847 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1848 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 1849 | -var MenuHandler = exports["default"] = /*#__PURE__*/function (_elementorModules$Vie) { | |
| 1850 | - function MenuHandler() { | |
| 1851 | - (0, _classCallCheck2.default)(this, MenuHandler); | |
| 1852 | - return _callSuper(this, MenuHandler, arguments); | |
| 1853 | - } | |
| 1854 | - (0, _inherits2.default)(MenuHandler, _elementorModules$Vie); | |
| 1855 | - return (0, _createClass2.default)(MenuHandler, [{ | |
| 1856 | - key: "getDefaultSettings", | |
| 1857 | - value: function getDefaultSettings() { | |
| 1858 | - return { | |
| 1859 | - selectors: { | |
| 1860 | - currentSubmenuItems: '#adminmenu .current' | |
| 1861 | - } | |
| 1862 | - }; | |
| 1863 | - } | |
| 1864 | - }, { | |
| 1865 | - key: "getDefaultElements", | |
| 1866 | - value: function getDefaultElements() { | |
| 1867 | - var settings = this.getSettings(); | |
| 1868 | - return { | |
| 1869 | - $currentSubmenuItems: jQuery(settings.selectors.currentSubmenuItems), | |
| 1870 | - $adminPageMenuLink: jQuery("a[href=\"".concat(settings.path, "\"]")) | |
| 1871 | - }; | |
| 1872 | - } | |
| 269 | +/***/ 142: | |
| 270 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1873 | 271 | |
| 1874 | - // This method highlights the currently visited submenu item for the slug provided as an argument to this handler. | |
| 1875 | - // This method also accepts a jQuery instance of a custom submenu item to highlight. If provided, the provided | |
| 1876 | - // item will be the one highlighted. | |
| 1877 | - }, { | |
| 1878 | - key: "highlightSubMenuItem", | |
| 1879 | - value: function highlightSubMenuItem() { | |
| 1880 | - var $element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; | |
| 1881 | - var $submenuItem = $element || this.elements.$adminPageMenuLink; | |
| 1882 | - if (this.elements.$currentSubmenuItems.length) { | |
| 1883 | - this.elements.$currentSubmenuItems.removeClass('current'); | |
| 1884 | - } | |
| 1885 | - $submenuItem.addClass('current'); | |
| 272 | +var toInteger = __webpack_require__(57); | |
| 273 | +var defined = __webpack_require__(42); | |
| 274 | +// true -> String#at | |
| 275 | +// false -> String#codePointAt | |
| 276 | +module.exports = function (TO_STRING) { | |
| 277 | + return function (that, pos) { | |
| 278 | + var s = String(defined(that)); | |
| 279 | + var i = toInteger(pos); | |
| 280 | + var l = s.length; | |
| 281 | + var a, b; | |
| 282 | + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; | |
| 283 | + a = s.charCodeAt(i); | |
| 284 | + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff | |
| 285 | + ? TO_STRING ? s.charAt(i) : a | |
| 286 | + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; | |
| 287 | + }; | |
| 288 | +}; | |
| 1886 | 289 | |
| 1887 | - // Need to add the 'current' class to the link element's parent `<li>` element as well. | |
| 1888 | - $submenuItem.parent().addClass('current'); | |
| 1889 | - } | |
| 1890 | - }, { | |
| 1891 | - key: "highlightTopLevelMenuItem", | |
| 1892 | - value: function highlightTopLevelMenuItem($elementToHighlight) { | |
| 1893 | - var $elementToRemove = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | |
| 1894 | - var activeClasses = 'wp-has-current-submenu wp-menu-open current'; | |
| 1895 | - $elementToHighlight.parent().addClass(activeClasses).removeClass('wp-not-current-submenu'); | |
| 1896 | - if ($elementToRemove) { | |
| 1897 | - $elementToRemove.removeClass(activeClasses); | |
| 1898 | - } | |
| 1899 | - } | |
| 1900 | - }, { | |
| 1901 | - key: "onInit", | |
| 1902 | - value: function onInit() { | |
| 1903 | - _superPropGet(MenuHandler, "onInit", this, 3)([]); | |
| 1904 | - var settings = this.getSettings(); | |
| 1905 | - if (window.location.href.includes(settings.path)) { | |
| 1906 | - this.highlightSubMenuItem(); | |
| 1907 | - } | |
| 1908 | - } | |
| 1909 | - }]); | |
| 1910 | -}(elementorModules.ViewModule); | |
| 1911 | 290 | |
| 1912 | 291 | /***/ }), |
| 1913 | 292 | |
| 1914 | -/***/ "../assets/dev/js/admin/new-template/template-controls.js": | |
| 1915 | -/*!****************************************************************!*\ | |
| 1916 | - !*** ../assets/dev/js/admin/new-template/template-controls.js ***! | |
| 1917 | - \****************************************************************/ | |
| 1918 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 293 | +/***/ 143: | |
| 294 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1919 | 295 | |
| 1920 | -"use strict"; | |
| 296 | +module.exports = __webpack_require__(66)('native-function-to-string', Function.toString); | |
| 1921 | 297 | |
| 1922 | 298 | |
| 1923 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1924 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1925 | - value: true | |
| 1926 | -})); | |
| 1927 | -exports["default"] = void 0; | |
| 1928 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 1929 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1930 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1931 | -var TemplateControls = exports["default"] = /*#__PURE__*/function () { | |
| 1932 | - function TemplateControls() { | |
| 1933 | - (0, _classCallCheck2.default)(this, TemplateControls); | |
| 1934 | - } | |
| 1935 | - return (0, _createClass2.default)(TemplateControls, [{ | |
| 1936 | - key: "setDynamicControlsVisibility", | |
| 1937 | - value: function setDynamicControlsVisibility(lookupControlIdPrefix, controls) { | |
| 1938 | - if (undefined === controls) { | |
| 1939 | - return; | |
| 1940 | - } | |
| 1941 | - var controlsArray = Object.entries(controls); | |
| 1942 | - for (var _i = 0, _controlsArray = controlsArray; _i < _controlsArray.length; _i++) { | |
| 1943 | - var _controlsArray$_i = (0, _slicedToArray2.default)(_controlsArray[_i], 2), | |
| 1944 | - controlId = _controlsArray$_i[0], | |
| 1945 | - controlSettings = _controlsArray$_i[1]; | |
| 1946 | - this.setVisibilityForControl(lookupControlIdPrefix, controlSettings, controlId); | |
| 1947 | - } | |
| 1948 | - } | |
| 1949 | - }, { | |
| 1950 | - key: "setVisibilityForControl", | |
| 1951 | - value: function setVisibilityForControl(lookupControlIdPrefix, controlSettings, controlId) { | |
| 1952 | - var _controlSettings$cond, | |
| 1953 | - _this = this; | |
| 1954 | - var conditions = Object.entries((_controlSettings$cond = controlSettings.conditions) !== null && _controlSettings$cond !== void 0 ? _controlSettings$cond : {}); | |
| 1955 | - conditions.forEach(function (condition) { | |
| 1956 | - _this.changeVisibilityBasedOnCondition(lookupControlIdPrefix, condition, controlId); | |
| 1957 | - }); | |
| 1958 | - } | |
| 1959 | - }, { | |
| 1960 | - key: "changeVisibilityBasedOnCondition", | |
| 1961 | - value: function changeVisibilityBasedOnCondition(lookupControlIdPrefix, condition, controlId) { | |
| 1962 | - var _condition = (0, _slicedToArray2.default)(condition, 2), | |
| 1963 | - conditionKey = _condition[0], | |
| 1964 | - conditionValue = _condition[1]; | |
| 1965 | - var targetControlWrapper = document.getElementById(lookupControlIdPrefix + controlId + '__wrapper'); | |
| 1966 | - var lookupControl = document.getElementById(lookupControlIdPrefix + conditionKey); | |
| 1967 | - targetControlWrapper.classList.toggle('elementor-hidden', !lookupControl || conditionValue !== lookupControl.value); | |
| 1968 | - } | |
| 1969 | - }]); | |
| 1970 | -}(); | |
| 1971 | - | |
| 1972 | 299 | /***/ }), |
| 1973 | 300 | |
| 1974 | -/***/ "../assets/dev/js/editor/utils/files-upload-handler.js": | |
| 1975 | -/*!*************************************************************!*\ | |
| 1976 | - !*** ../assets/dev/js/editor/utils/files-upload-handler.js ***! | |
| 1977 | - \*************************************************************/ | |
| 1978 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 301 | +/***/ 154: | |
| 302 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1979 | 303 | |
| 1980 | -"use strict"; | |
| 1981 | -/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 304 | +// 7.3.20 SpeciesConstructor(O, defaultConstructor) | |
| 305 | +var anObject = __webpack_require__(18); | |
| 306 | +var aFunction = __webpack_require__(91); | |
| 307 | +var SPECIES = __webpack_require__(12)('species'); | |
| 308 | +module.exports = function (O, D) { | |
| 309 | + var C = anObject(O).constructor; | |
| 310 | + var S; | |
| 311 | + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); | |
| 312 | +}; | |
| 1982 | 313 | |
| 1983 | 314 | |
| 1984 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1985 | -Object.defineProperty(exports, "__esModule", ({ | |
| 1986 | - value: true | |
| 1987 | -})); | |
| 1988 | -exports["default"] = void 0; | |
| 1989 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1990 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1991 | -var FilesUploadHandler = exports["default"] = /*#__PURE__*/function () { | |
| 1992 | - function FilesUploadHandler() { | |
| 1993 | - (0, _classCallCheck2.default)(this, FilesUploadHandler); | |
| 1994 | - } | |
| 1995 | - return (0, _createClass2.default)(FilesUploadHandler, null, [{ | |
| 1996 | - key: "isUploadEnabled", | |
| 1997 | - value: function isUploadEnabled(mediaType) { | |
| 1998 | - var unfilteredFilesTypes = ['svg', 'application/json']; | |
| 1999 | - if (!unfilteredFilesTypes.includes(mediaType)) { | |
| 2000 | - return true; | |
| 2001 | - } | |
| 2002 | - return elementorCommon.config.filesUpload.unfilteredFiles; | |
| 2003 | - } | |
| 2004 | - }, { | |
| 2005 | - key: "setUploadTypeCaller", | |
| 2006 | - value: function setUploadTypeCaller(frame) { | |
| 2007 | - frame.uploader.uploader.param('uploadTypeCaller', 'elementor-wp-media-upload'); | |
| 2008 | - } | |
| 2009 | - }, { | |
| 2010 | - key: "getUnfilteredFilesNonAdminDialog", | |
| 2011 | - value: function getUnfilteredFilesNonAdminDialog() { | |
| 2012 | - return elementorCommon.dialogsManager.createWidget('alert', { | |
| 2013 | - id: 'e-unfiltered-files-disabled-dialog', | |
| 2014 | - headerMessage: __('Sorry, you can\'t upload that file yet', 'elementor'), | |
| 2015 | - message: __('This is because JSON files may pose a security risk.', 'elementor') + '<br><br>' + __('To upload them anyway, ask the site administrator to enable unfiltered file uploads.', 'elementor'), | |
| 2016 | - strings: { | |
| 2017 | - confirm: __('Got it', 'elementor') | |
| 2018 | - } | |
| 2019 | - }); | |
| 2020 | - } | |
| 2021 | - }, { | |
| 2022 | - key: "getUnfilteredFilesNotEnabledDialog", | |
| 2023 | - value: function getUnfilteredFilesNotEnabledDialog(callback) { | |
| 2024 | - var elementorInstance = window.elementorAdmin || window.elementor; | |
| 2025 | - if (!elementorInstance.config.user.is_administrator) { | |
| 2026 | - return this.getUnfilteredFilesNonAdminDialog(); | |
| 2027 | - } | |
| 2028 | - var onConfirm = function onConfirm() { | |
| 2029 | - elementorCommon.ajax.addRequest('enable_unfiltered_files_upload', {}, true); | |
| 2030 | - elementorCommon.config.filesUpload.unfilteredFiles = true; | |
| 2031 | - callback(); | |
| 2032 | - }; | |
| 2033 | - return elementorInstance.helpers.getSimpleDialog('e-enable-unfiltered-files-dialog', __('Enable Unfiltered File Uploads', 'elementor'), __('Before you enable unfiltered files upload, note that such files include a security risk. Elementor does run a process to remove possible malicious code, but there is still risk involved when using such files.', 'elementor'), __('Enable', 'elementor'), onConfirm); | |
| 2034 | - } | |
| 2035 | - }, { | |
| 2036 | - key: "getUnfilteredFilesNotEnabledImportTemplateDialog", | |
| 2037 | - value: function getUnfilteredFilesNotEnabledImportTemplateDialog(callback) { | |
| 2038 | - if (!(window.elementorAdmin || window.elementor).config.user.is_administrator) { | |
| 2039 | - return this.getUnfilteredFilesNonAdminDialog(); | |
| 2040 | - } | |
| 2041 | - return elementorCommon.dialogsManager.createWidget('confirm', { | |
| 2042 | - id: 'e-enable-unfiltered-files-dialog-import-template', | |
| 2043 | - headerMessage: __('Enable Unfiltered File Uploads', 'elementor'), | |
| 2044 | - message: __('Before you enable unfiltered files upload, note that such files include a security risk. Elementor does run a process to remove possible malicious code, but there is still risk involved when using such files.', 'elementor') + '<br /><br />' + __('If you do not enable uploading unfiltered files, any SVG or JSON (including lottie) files used in the uploaded template will not be imported.', 'elementor'), | |
| 2045 | - position: { | |
| 2046 | - my: 'center center', | |
| 2047 | - at: 'center center' | |
| 2048 | - }, | |
| 2049 | - strings: { | |
| 2050 | - confirm: __('Enable and Import', 'elementor'), | |
| 2051 | - cancel: __('Import Without Enabling', 'elementor') | |
| 2052 | - }, | |
| 2053 | - onConfirm: function onConfirm() { | |
| 2054 | - elementorCommon.ajax.addRequest('enable_unfiltered_files_upload', { | |
| 2055 | - success: function success() { | |
| 2056 | - // This utility is used in both the admin and the Editor. | |
| 2057 | - elementorCommon.config.filesUpload.unfilteredFiles = true; | |
| 2058 | - callback(); | |
| 2059 | - } | |
| 2060 | - }, true); | |
| 2061 | - }, | |
| 2062 | - onCancel: function onCancel() { | |
| 2063 | - return callback(); | |
| 2064 | - } | |
| 2065 | - }); | |
| 2066 | - } | |
| 2067 | - }]); | |
| 2068 | -}(); | |
| 315 | +/***/ }), | |
| 2069 | 316 | |
| 2070 | -/***/ }), | |
| 317 | +/***/ 17: | |
| 318 | +/***/ (function(module, exports) { | |
| 2071 | 319 | |
| 2072 | -/***/ "../assets/dev/js/utils/events.js": | |
| 2073 | -/*!****************************************!*\ | |
| 2074 | - !*** ../assets/dev/js/utils/events.js ***! | |
| 2075 | - \****************************************/ | |
| 2076 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 320 | +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 | |
| 321 | +var global = module.exports = typeof window != 'undefined' && window.Math == Math | |
| 322 | + ? window : typeof self != 'undefined' && self.Math == Math ? self | |
| 323 | + // eslint-disable-next-line no-new-func | |
| 324 | + : Function('return this')(); | |
| 325 | +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef | |
| 2077 | 326 | |
| 2078 | -"use strict"; | |
| 2079 | 327 | |
| 328 | +/***/ }), | |
| 2080 | 329 | |
| 2081 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2082 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2083 | - value: true | |
| 2084 | -})); | |
| 2085 | -exports["default"] = exports.Events = void 0; | |
| 2086 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2087 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2088 | -var Events = exports.Events = /*#__PURE__*/function () { | |
| 2089 | - function Events() { | |
| 2090 | - (0, _classCallCheck2.default)(this, Events); | |
| 2091 | - } | |
| 2092 | - return (0, _createClass2.default)(Events, null, [{ | |
| 2093 | - key: "dispatch", | |
| 2094 | - value: | |
| 2095 | - /** | |
| 2096 | - * Dispatch an Elementor event. | |
| 2097 | - * | |
| 2098 | - * Will dispatch both native event & jQuery event (as BC). | |
| 2099 | - * By default, `bcEvent` is `null`. | |
| 2100 | - * | |
| 2101 | - * @param {Object} context - The context that will dispatch the event. | |
| 2102 | - * @param {string} event - Event to dispatch. | |
| 2103 | - * @param {*} data - Data to pass to the event, default to `null`. | |
| 2104 | - * @param {string|null} bcEvent - BC event to dispatch, default to `null`. | |
| 2105 | - * | |
| 2106 | - * @return {void} | |
| 2107 | - */ | |
| 2108 | - function dispatch(context, event) { | |
| 2109 | - var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; | |
| 2110 | - var bcEvent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; | |
| 2111 | - // Make sure to use the native context if it's a jQuery instance. | |
| 2112 | - context = context instanceof jQuery ? context[0] : context; | |
| 330 | +/***/ 18: | |
| 331 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2113 | 332 | |
| 2114 | - // Dispatch the BC event only if exists. | |
| 2115 | - if (bcEvent) { | |
| 2116 | - context.dispatchEvent(new CustomEvent(bcEvent, { | |
| 2117 | - detail: data | |
| 2118 | - })); | |
| 2119 | - } | |
| 333 | +var isObject = __webpack_require__(30); | |
| 334 | +module.exports = function (it) { | |
| 335 | + if (!isObject(it)) throw TypeError(it + ' is not an object!'); | |
| 336 | + return it; | |
| 337 | +}; | |
| 2120 | 338 | |
| 2121 | - // jQuery's `.on()` listens also to native custom events, so there is no need | |
| 2122 | - // to dispatch also a jQuery event. | |
| 2123 | - context.dispatchEvent(new CustomEvent(event, { | |
| 2124 | - detail: data | |
| 2125 | - })); | |
| 2126 | - } | |
| 2127 | - }]); | |
| 2128 | -}(); | |
| 2129 | -var _default = exports["default"] = Events; | |
| 2130 | 339 | |
| 2131 | 340 | /***/ }), |
| 2132 | 341 | |
| 2133 | -/***/ "../assets/dev/js/utils/json-upload-warning-message.js": | |
| 2134 | -/*!*************************************************************!*\ | |
| 2135 | - !*** ../assets/dev/js/utils/json-upload-warning-message.js ***! | |
| 2136 | - \*************************************************************/ | |
| 2137 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 342 | +/***/ 181: | |
| 343 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2138 | 344 | |
| 2139 | -"use strict"; | |
| 2140 | -/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 2141 | - | |
| 2142 | - | |
| 2143 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2144 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2145 | - value: true | |
| 2146 | -})); | |
| 2147 | -exports.showJsonUploadWarningMessageIfNeeded = showJsonUploadWarningMessageIfNeeded; | |
| 2148 | -var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 2149 | -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 2150 | -var genericMessageIntroductionKey = 'upload_json_warning_generic_message'; | |
| 2151 | -/** | |
| 2152 | - * @type {import('../utils/introduction').default | null} | |
| 2153 | - */ | |
| 2154 | -var genericWarningModal = null; | |
| 2155 | -function showJsonUploadWarningMessageIfNeeded(_ref) { | |
| 2156 | - var introductionMap = _ref.introductionMap, | |
| 2157 | - IntroductionClass = _ref.IntroductionClass, | |
| 2158 | - _ref$waitForSetViewed = _ref.waitForSetViewed, | |
| 2159 | - waitForSetViewed = _ref$waitForSetViewed === void 0 ? false : _ref$waitForSetViewed; | |
| 2160 | - if (!genericWarningModal) { | |
| 2161 | - genericWarningModal = createGenericWarningModal(IntroductionClass); | |
| 2162 | - } | |
| 2163 | - genericWarningModal.setIntroductionMap(introductionMap); | |
| 2164 | - if (genericWarningModal.introductionViewed) { | |
| 2165 | - return Promise.resolve(); | |
| 2166 | - } | |
| 2167 | - var dialog = genericWarningModal.getDialog(); | |
| 2168 | - return new Promise(function (resolve, reject) { | |
| 2169 | - dialog.onHide = function () { | |
| 2170 | - // When closing the dialog (esc, click on background, etc.) we need to reject the promise. | |
| 2171 | - reject(); | |
| 2172 | - }; | |
| 2173 | - dialog.onConfirm = /*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 2174 | - return _regenerator.default.wrap(function (_context) { | |
| 2175 | - while (1) switch (_context.prev = _context.next) { | |
| 2176 | - case 0: | |
| 2177 | - if (!dialog.getElements('checkbox-dont-show-again').prop('checked')) { | |
| 2178 | - _context.next = 3; | |
| 2179 | - break; | |
| 2180 | - } | |
| 2181 | - if (!waitForSetViewed) { | |
| 2182 | - _context.next = 2; | |
| 2183 | - break; | |
| 2184 | - } | |
| 2185 | - _context.next = 1; | |
| 2186 | - return genericWarningModal.setViewed(); | |
| 2187 | - case 1: | |
| 2188 | - _context.next = 3; | |
| 2189 | - break; | |
| 2190 | - case 2: | |
| 2191 | - genericWarningModal.setViewed(); | |
| 2192 | - case 3: | |
| 2193 | - // Hack: we need to resolve the promise and then hide it manually, to avoid rejecting the promise. | |
| 2194 | - // this because when closing the dialog (esc, click on background, etc.) it does not trigger `onCancel` method. | |
| 2195 | - resolve(); | |
| 2196 | - dialog.hide(); | |
| 2197 | - case 4: | |
| 2198 | - case "end": | |
| 2199 | - return _context.stop(); | |
| 2200 | - } | |
| 2201 | - }, _callee); | |
| 2202 | - })); | |
| 2203 | - dialog.onCancel = function () { | |
| 2204 | - dialog.hide(); | |
| 2205 | - }; | |
| 2206 | - genericWarningModal.show(); | |
| 2207 | - }); | |
| 2208 | -} | |
| 2209 | - | |
| 2210 | -/** | |
| 2211 | - * @param {import('../utils/introduction').default.prototype.constructor} IntroductionClass | |
| 2212 | - * | |
| 2213 | - * @return {import('../utils/introduction').default} | |
| 2214 | - */ | |
| 2215 | -function createGenericWarningModal(IntroductionClass) { | |
| 2216 | - var _introduction$getDial, _introduction$getDial2; | |
| 2217 | - var dialogId = 'e-generic-warning-modal-for-json-upload'; | |
| 2218 | - var introduction = new IntroductionClass({ | |
| 2219 | - introductionKey: genericMessageIntroductionKey, | |
| 2220 | - dialogType: 'confirm', | |
| 2221 | - dialogOptions: { | |
| 2222 | - id: dialogId, | |
| 2223 | - headerMessage: __('Warning: JSON files may be unsafe', 'elementor'), | |
| 2224 | - message: __('Uploading JSON files from unknown sources can be harmful and put your site at risk. For maximum safety, only install JSON files from trusted sources.', 'elementor'), | |
| 2225 | - effects: { | |
| 2226 | - show: 'fadeIn', | |
| 2227 | - hide: 'fadeOut' | |
| 2228 | - }, | |
| 2229 | - hide: { | |
| 2230 | - onBackgroundClick: true, | |
| 2231 | - onButtonClick: false | |
| 2232 | - }, | |
| 2233 | - strings: { | |
| 2234 | - confirm: __('Continue', 'elementor'), | |
| 2235 | - cancel: __('Cancel', 'elementor') | |
| 345 | +// 0 -> Array#forEach | |
| 346 | +// 1 -> Array#map | |
| 347 | +// 2 -> Array#filter | |
| 348 | +// 3 -> Array#some | |
| 349 | +// 4 -> Array#every | |
| 350 | +// 5 -> Array#find | |
| 351 | +// 6 -> Array#findIndex | |
| 352 | +var ctx = __webpack_require__(73); | |
| 353 | +var IObject = __webpack_require__(120); | |
| 354 | +var toObject = __webpack_require__(96); | |
| 355 | +var toLength = __webpack_require__(43); | |
| 356 | +var asc = __webpack_require__(216); | |
| 357 | +module.exports = function (TYPE, $create) { | |
| 358 | + var IS_MAP = TYPE == 1; | |
| 359 | + var IS_FILTER = TYPE == 2; | |
| 360 | + var IS_SOME = TYPE == 3; | |
| 361 | + var IS_EVERY = TYPE == 4; | |
| 362 | + var IS_FIND_INDEX = TYPE == 6; | |
| 363 | + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; | |
| 364 | + var create = $create || asc; | |
| 365 | + return function ($this, callbackfn, that) { | |
| 366 | + var O = toObject($this); | |
| 367 | + var self = IObject(O); | |
| 368 | + var f = ctx(callbackfn, that, 3); | |
| 369 | + var length = toLength(self.length); | |
| 370 | + var index = 0; | |
| 371 | + var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; | |
| 372 | + var val, res; | |
| 373 | + for (;length > index; index++) if (NO_HOLES || index in self) { | |
| 374 | + val = self[index]; | |
| 375 | + res = f(val, index, O); | |
| 376 | + if (TYPE) { | |
| 377 | + if (IS_MAP) result[index] = res; // map | |
| 378 | + else if (res) switch (TYPE) { | |
| 379 | + case 3: return true; // some | |
| 380 | + case 5: return val; // find | |
| 381 | + case 6: return index; // findIndex | |
| 382 | + case 2: result.push(val); // filter | |
| 383 | + } else if (IS_EVERY) return false; // every | |
| 2236 | 384 | } |
| 2237 | 385 | } |
| 2238 | - }); | |
| 2239 | - var _createCheckboxAndLab = createCheckboxAndLabel(dialogId), | |
| 2240 | - checkbox = _createCheckboxAndLab.checkbox, | |
| 2241 | - label = _createCheckboxAndLab.label; | |
| 2242 | - introduction.getDialog().addElement('checkbox-dont-show-again', checkbox); | |
| 2243 | - (_introduction$getDial = introduction.getDialog().getElements('message')) === null || _introduction$getDial === void 0 || (_introduction$getDial2 = _introduction$getDial.append) === null || _introduction$getDial2 === void 0 || _introduction$getDial2.call(_introduction$getDial, label); // `getElements` return JQuery object. | |
| 2244 | - | |
| 2245 | - return introduction; | |
| 2246 | -} | |
| 2247 | -function createCheckboxAndLabel(dialogId) { | |
| 2248 | - var checkboxId = "".concat(dialogId, "-dont-show-again"); | |
| 2249 | - var checkbox = document.createElement('input'); | |
| 2250 | - checkbox.type = 'checkbox'; | |
| 2251 | - checkbox.name = checkboxId; | |
| 2252 | - checkbox.id = checkboxId; | |
| 2253 | - var label = document.createElement('label'); | |
| 2254 | - label.htmlFor = checkboxId; | |
| 2255 | - label.textContent = __('Do not show this message again', 'elementor'); | |
| 2256 | - label.style.display = 'block'; | |
| 2257 | - label.style.marginTop = '20px'; | |
| 2258 | - label.style.marginBottom = '20px'; | |
| 2259 | - label.prepend(checkbox); | |
| 2260 | - return { | |
| 2261 | - checkbox: checkbox, | |
| 2262 | - label: label | |
| 386 | + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; | |
| 2263 | 387 | }; |
| 2264 | -} | |
| 388 | +}; | |
| 2265 | 389 | |
| 2266 | -/***/ }), | |
| 2267 | 390 | |
| 2268 | -/***/ "../core/common/assets/js/utils/environment.js": | |
| 2269 | -/*!*****************************************************!*\ | |
| 2270 | - !*** ../core/common/assets/js/utils/environment.js ***! | |
| 2271 | - \*****************************************************/ | |
| 2272 | -/***/ ((__unused_webpack_module, exports) => { | |
| 2273 | - | |
| 2274 | -"use strict"; | |
| 2275 | - | |
| 2276 | - | |
| 2277 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2278 | - value: true | |
| 2279 | -})); | |
| 2280 | -exports["default"] = void 0; | |
| 2281 | -var matchUserAgent = function matchUserAgent(UserAgentStr) { | |
| 2282 | - return userAgent.indexOf(UserAgentStr) >= 0; | |
| 2283 | - }, | |
| 2284 | - userAgent = navigator.userAgent, | |
| 2285 | - // Solution influenced by https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser | |
| 2286 | - | |
| 2287 | - // Opera 8.0+ | |
| 2288 | - isOpera = !!window.opr && !!opr.addons || !!window.opera || matchUserAgent(' OPR/'), | |
| 2289 | - // Firefox 1.0+ | |
| 2290 | - isFirefox = matchUserAgent('Firefox'), | |
| 2291 | - // Safari 3.0+ "[object HTMLElementConstructor]" | |
| 2292 | - isSafari = /^((?!chrome|android).)*safari/i.test(userAgent) || /constructor/i.test(window.HTMLElement) || function (p) { | |
| 2293 | - return '[object SafariRemoteNotification]' === p.toString(); | |
| 2294 | - }(!window.safari || typeof safari !== 'undefined' && safari.pushNotification), | |
| 2295 | - // Internet Explorer 6-11 | |
| 2296 | - isIE = /Trident|MSIE/.test(userAgent) && (/* @cc_on!@*/ false || !!document.documentMode), | |
| 2297 | - // Edge 20+ | |
| 2298 | - isEdge = !isIE && !!window.StyleMedia || matchUserAgent('Edg'), | |
| 2299 | - // Google Chrome (Not accurate) | |
| 2300 | - isChrome = !!window.chrome && matchUserAgent('Chrome') && !(isEdge || isOpera), | |
| 2301 | - // Blink engine | |
| 2302 | - isBlink = matchUserAgent('Chrome') && !!window.CSS, | |
| 2303 | - // Apple Webkit engine | |
| 2304 | - isAppleWebkit = matchUserAgent('AppleWebKit') && !isBlink, | |
| 2305 | - isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0, | |
| 2306 | - environment = { | |
| 2307 | - isTouchDevice: isTouchDevice, | |
| 2308 | - appleWebkit: isAppleWebkit, | |
| 2309 | - blink: isBlink, | |
| 2310 | - chrome: isChrome, | |
| 2311 | - edge: isEdge, | |
| 2312 | - firefox: isFirefox, | |
| 2313 | - ie: isIE, | |
| 2314 | - mac: matchUserAgent('Macintosh'), | |
| 2315 | - opera: isOpera, | |
| 2316 | - safari: isSafari, | |
| 2317 | - webkit: matchUserAgent('AppleWebKit') | |
| 2318 | - }; | |
| 2319 | -var _default = exports["default"] = environment; | |
| 2320 | - | |
| 2321 | 391 | /***/ }), |
| 2322 | 392 | |
| 2323 | -/***/ "../core/experiments/assets/js/admin/behaviors/experiments-messages.js": | |
| 2324 | -/*!*****************************************************************************!*\ | |
| 2325 | - !*** ../core/experiments/assets/js/admin/behaviors/experiments-messages.js ***! | |
| 2326 | - \*****************************************************************************/ | |
| 2327 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 393 | +/***/ 190: | |
| 394 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2328 | 395 | |
| 2329 | 396 | "use strict"; |
| 2330 | -/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 2331 | 397 | |
| 398 | +var regexpExec = __webpack_require__(88); | |
| 399 | +__webpack_require__(37)({ | |
| 400 | + target: 'RegExp', | |
| 401 | + proto: true, | |
| 402 | + forced: regexpExec !== /./.exec | |
| 403 | +}, { | |
| 404 | + exec: regexpExec | |
| 405 | +}); | |
| 2332 | 406 | |
| 2333 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2334 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2335 | - value: true | |
| 2336 | -})); | |
| 2337 | -exports["default"] = void 0; | |
| 2338 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 2339 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2340 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2341 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 2342 | -var STATE_ACTIVE = 'active'; | |
| 2343 | -var STATE_INACTIVE = 'inactive'; | |
| 2344 | -var STATE_DEFAULT = 'default'; | |
| 2345 | -var ExperimentsMessages = exports["default"] = /*#__PURE__*/function () { | |
| 2346 | - function ExperimentsMessages(_ref) { | |
| 2347 | - var selects = _ref.selects, | |
| 2348 | - submit = _ref.submit; | |
| 2349 | - (0, _classCallCheck2.default)(this, ExperimentsMessages); | |
| 2350 | - (0, _defineProperty2.default)(this, "elements", {}); | |
| 2351 | - this.elements = { | |
| 2352 | - /** | |
| 2353 | - * @type {HTMLSelectElement[]} | |
| 2354 | - */ | |
| 2355 | - selects: selects, | |
| 2356 | - /** | |
| 2357 | - * @type {HTMLInputElement} | |
| 2358 | - */ | |
| 2359 | - submit: submit | |
| 2360 | - }; | |
| 2361 | - } | |
| 2362 | - return (0, _createClass2.default)(ExperimentsMessages, [{ | |
| 2363 | - key: "bindEvents", | |
| 2364 | - value: function bindEvents() { | |
| 2365 | - var _this = this; | |
| 2366 | - this.elements.selects.forEach(function (select) { | |
| 2367 | - select.addEventListener('change', function (e) { | |
| 2368 | - return _this.onExperimentStateChange(e); | |
| 2369 | - }); | |
| 2370 | - }); | |
| 2371 | - } | |
| 2372 | - }, { | |
| 2373 | - key: "onExperimentStateChange", | |
| 2374 | - value: function onExperimentStateChange(e) { | |
| 2375 | - var experimentId = e.currentTarget.dataset.experimentId, | |
| 2376 | - experimentNewState = this.getExperimentActualState(experimentId); | |
| 2377 | - switch (experimentNewState) { | |
| 2378 | - case STATE_ACTIVE: | |
| 2379 | - if (this.shouldShowDependenciesDialog(experimentId)) { | |
| 2380 | - this.showDependenciesDialog(experimentId); | |
| 2381 | - } | |
| 2382 | - break; | |
| 2383 | - case STATE_INACTIVE: | |
| 2384 | - if (this.shouldShowDeactivationDialog(experimentId)) { | |
| 2385 | - this.showDeactivationDialog(experimentId); | |
| 2386 | - } else { | |
| 2387 | - this.deactivateDependantExperiments(experimentId); | |
| 2388 | - } | |
| 2389 | - break; | |
| 2390 | - default: | |
| 2391 | - break; | |
| 2392 | - } | |
| 2393 | - } | |
| 2394 | - }, { | |
| 2395 | - key: "getExperimentData", | |
| 2396 | - value: function getExperimentData(experimentId) { | |
| 2397 | - return elementorAdminConfig.experiments[experimentId]; | |
| 2398 | - } | |
| 2399 | - }, { | |
| 2400 | - key: "getExperimentDependencies", | |
| 2401 | - value: function getExperimentDependencies(experimentId) { | |
| 2402 | - var _this2 = this; | |
| 2403 | - return this.getExperimentData(experimentId).dependencies.map(function (dependencyId) { | |
| 2404 | - return _this2.getExperimentData(dependencyId); | |
| 2405 | - }); | |
| 2406 | - } | |
| 2407 | - }, { | |
| 2408 | - key: "getExperimentSelect", | |
| 2409 | - value: function getExperimentSelect(experimentId) { | |
| 2410 | - return this.elements.selects.find(function (select) { | |
| 2411 | - return select.matches("[data-experiment-id=\"".concat(experimentId, "\"]")); | |
| 2412 | - }); | |
| 2413 | - } | |
| 2414 | - }, { | |
| 2415 | - key: "setExperimentState", | |
| 2416 | - value: function setExperimentState(experimentId, state) { | |
| 2417 | - this.getExperimentSelect(experimentId).value = state; | |
| 2418 | - } | |
| 2419 | - }, { | |
| 2420 | - key: "getExperimentActualState", | |
| 2421 | - value: function getExperimentActualState(experimentId) { | |
| 2422 | - var _this$getExperimentSe; | |
| 2423 | - var state = (_this$getExperimentSe = this.getExperimentSelect(experimentId)) === null || _this$getExperimentSe === void 0 ? void 0 : _this$getExperimentSe.value; | |
| 2424 | - if (!state) { | |
| 2425 | - return this.getExperimentData(experimentId).state; | |
| 2426 | - } | |
| 2427 | - if (state !== STATE_DEFAULT) { | |
| 2428 | - return state; | |
| 2429 | - } | |
| 2430 | 407 | |
| 2431 | - // Normalize the "default" state to the actual state value. | |
| 2432 | - return this.isExperimentActiveByDefault(experimentId) ? STATE_ACTIVE : STATE_INACTIVE; | |
| 2433 | - } | |
| 2434 | - }, { | |
| 2435 | - key: "isExperimentActive", | |
| 2436 | - value: function isExperimentActive(experimentId) { | |
| 2437 | - return this.getExperimentActualState(experimentId) === STATE_ACTIVE; | |
| 2438 | - } | |
| 2439 | - }, { | |
| 2440 | - key: "isExperimentActiveByDefault", | |
| 2441 | - value: function isExperimentActiveByDefault(experimentId) { | |
| 2442 | - return this.getExperimentData(experimentId).default === STATE_ACTIVE; | |
| 2443 | - } | |
| 2444 | - }, { | |
| 2445 | - key: "areAllDependenciesActive", | |
| 2446 | - value: function areAllDependenciesActive(dependencies) { | |
| 2447 | - var _this3 = this; | |
| 2448 | - return dependencies.every(function (dependency) { | |
| 2449 | - return _this3.isExperimentActive(dependency.name); | |
| 2450 | - }); | |
| 2451 | - } | |
| 2452 | - }, { | |
| 2453 | - key: "deactivateDependantExperiments", | |
| 2454 | - value: function deactivateDependantExperiments(experimentId) { | |
| 2455 | - var _this4 = this; | |
| 2456 | - Object.entries(elementorAdminConfig.experiments).forEach(function (_ref2) { | |
| 2457 | - var _ref3 = (0, _slicedToArray2.default)(_ref2, 2), | |
| 2458 | - id = _ref3[0], | |
| 2459 | - experimentData = _ref3[1]; | |
| 2460 | - var isDependant = experimentData.dependencies.includes(experimentId), | |
| 2461 | - isActive = _this4.getExperimentActualState(id) === STATE_ACTIVE; | |
| 2462 | - if (isDependant && isActive) { | |
| 2463 | - _this4.setExperimentState(id, STATE_INACTIVE); | |
| 2464 | - } | |
| 2465 | - }); | |
| 2466 | - } | |
| 2467 | - }, { | |
| 2468 | - key: "shouldShowDependenciesDialog", | |
| 2469 | - value: function shouldShowDependenciesDialog(experimentId) { | |
| 2470 | - var dependencies = this.getExperimentDependencies(experimentId); | |
| 2471 | - return !this.areAllDependenciesActive(dependencies); | |
| 2472 | - } | |
| 2473 | - }, { | |
| 2474 | - key: "shouldShowDeactivationDialog", | |
| 2475 | - value: function shouldShowDeactivationDialog(experimentId) { | |
| 2476 | - var getExperimentData = this.getExperimentData(experimentId), | |
| 2477 | - isInitialStateActive = getExperimentData.state === STATE_ACTIVE || getExperimentData.state === STATE_DEFAULT && getExperimentData.default === STATE_ACTIVE, | |
| 2478 | - hasMessage = !!this.getMessage(experimentId, 'on_deactivate'); | |
| 2479 | - return hasMessage && isInitialStateActive; | |
| 2480 | - } | |
| 2481 | - }, { | |
| 2482 | - key: "showDialog", | |
| 2483 | - value: function showDialog(dialog) { | |
| 2484 | - return elementorCommon.dialogsManager.createWidget('confirm', { | |
| 2485 | - id: 'e-experiments-messages-dialog', | |
| 2486 | - headerMessage: dialog.headerMessage, | |
| 2487 | - message: dialog.message, | |
| 2488 | - position: { | |
| 2489 | - my: 'center center', | |
| 2490 | - at: 'center center' | |
| 2491 | - }, | |
| 2492 | - strings: { | |
| 2493 | - confirm: dialog.strings.confirm, | |
| 2494 | - cancel: dialog.strings.cancel | |
| 2495 | - }, | |
| 2496 | - hide: { | |
| 2497 | - onOutsideClick: false, | |
| 2498 | - onBackgroundClick: false, | |
| 2499 | - onEscKeyPress: false | |
| 2500 | - }, | |
| 2501 | - onConfirm: dialog.onConfirm, | |
| 2502 | - onCancel: dialog.onCancel | |
| 2503 | - }).show(); | |
| 2504 | - } | |
| 2505 | - }, { | |
| 2506 | - key: "getSiteLanguageCode", | |
| 2507 | - value: function getSiteLanguageCode() { | |
| 2508 | - var languageCode = document.querySelector('html').getAttribute('lang'); | |
| 2509 | - return languageCode !== null && languageCode !== void 0 ? languageCode : 'en'; // Fallback to English if no language code found. | |
| 2510 | - } | |
| 2511 | - }, { | |
| 2512 | - key: "formatDependenciesList", | |
| 2513 | - value: function formatDependenciesList(dependencies) { | |
| 2514 | - var dependenciesTitles = dependencies.map(function (d) { | |
| 2515 | - return d.title; | |
| 2516 | - }); | |
| 2517 | - var languageCode = this.getSiteLanguageCode(); | |
| 2518 | - return new Intl.ListFormat(languageCode).format(dependenciesTitles); | |
| 2519 | - } | |
| 2520 | - }, { | |
| 2521 | - key: "showDependenciesDialog", | |
| 2522 | - value: function showDependenciesDialog(experimentId) { | |
| 2523 | - var _this5 = this; | |
| 2524 | - var experiment = this.getExperimentData(experimentId), | |
| 2525 | - experimentName = experiment.title, | |
| 2526 | - dependenciesList = this.formatDependenciesList(this.getExperimentDependencies(experimentId)); | |
| 2527 | - | |
| 2528 | - // Translators: %1$s: Experiment title, %2$s: Comma-separated dependencies list | |
| 2529 | - var message = __('In order to use %1$s, first you need to activate %2$s.', 'elementor').replace('%1$s', "<strong>".concat(experimentName, "</strong>")).replace('%2$s', dependenciesList); | |
| 2530 | - this.showDialog({ | |
| 2531 | - message: message, | |
| 2532 | - headerMessage: __('First, activate another experiment.', 'elementor'), | |
| 2533 | - strings: { | |
| 2534 | - confirm: __('Activate', 'elementor'), | |
| 2535 | - cancel: __('Cancel', 'elementor') | |
| 2536 | - }, | |
| 2537 | - onConfirm: function onConfirm() { | |
| 2538 | - _this5.getExperimentDependencies(experimentId).forEach(function (dependency) { | |
| 2539 | - _this5.setExperimentState(dependency.name, STATE_ACTIVE); | |
| 2540 | - }); | |
| 2541 | - _this5.elements.submit.click(); | |
| 2542 | - }, | |
| 2543 | - onCancel: function onCancel() { | |
| 2544 | - _this5.setExperimentState(experimentId, STATE_INACTIVE); | |
| 2545 | - } | |
| 2546 | - }); | |
| 2547 | - } | |
| 2548 | - }, { | |
| 2549 | - key: "showDeactivationDialog", | |
| 2550 | - value: function showDeactivationDialog(experimentId) { | |
| 2551 | - var _this6 = this; | |
| 2552 | - this.showDialog({ | |
| 2553 | - message: this.getMessage(experimentId, 'on_deactivate'), | |
| 2554 | - headerMessage: __('Are you sure?', 'elementor'), | |
| 2555 | - strings: { | |
| 2556 | - confirm: __('Deactivate', 'elementor'), | |
| 2557 | - cancel: __('Cancel', 'elementor') | |
| 2558 | - }, | |
| 2559 | - onConfirm: function onConfirm() { | |
| 2560 | - _this6.setExperimentState(experimentId, STATE_INACTIVE); | |
| 2561 | - _this6.deactivateDependantExperiments(experimentId); | |
| 2562 | - _this6.elements.submit.click(); | |
| 2563 | - }, | |
| 2564 | - onCancel: function onCancel() { | |
| 2565 | - _this6.setExperimentState(experimentId, STATE_ACTIVE); | |
| 2566 | - } | |
| 2567 | - }); | |
| 2568 | - } | |
| 2569 | - }, { | |
| 2570 | - key: "getMessage", | |
| 2571 | - value: function getMessage(experimentId, messageId) { | |
| 2572 | - var _this$getExperimentDa; | |
| 2573 | - return (_this$getExperimentDa = this.getExperimentData(experimentId)) === null || _this$getExperimentDa === void 0 ? void 0 : _this$getExperimentDa.messages[messageId]; | |
| 2574 | - } | |
| 2575 | - }]); | |
| 2576 | -}(); | |
| 2577 | - | |
| 2578 | 408 | /***/ }), |
| 2579 | 409 | |
| 2580 | -/***/ "../core/experiments/assets/js/admin/module.js": | |
| 2581 | -/*!*****************************************************!*\ | |
| 2582 | - !*** ../core/experiments/assets/js/admin/module.js ***! | |
| 2583 | - \*****************************************************/ | |
| 2584 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 410 | +/***/ 216: | |
| 411 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2585 | 412 | |
| 2586 | -"use strict"; | |
| 413 | +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) | |
| 414 | +var speciesConstructor = __webpack_require__(217); | |
| 2587 | 415 | |
| 416 | +module.exports = function (original, length) { | |
| 417 | + return new (speciesConstructor(original))(length); | |
| 418 | +}; | |
| 2588 | 419 | |
| 2589 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2590 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2591 | - value: true | |
| 2592 | -})); | |
| 2593 | -exports["default"] = void 0; | |
| 2594 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2595 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2596 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2597 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2598 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 2599 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2600 | -var _experimentsMessages = _interopRequireDefault(__webpack_require__(/*! ./behaviors/experiments-messages */ "../core/experiments/assets/js/admin/behaviors/experiments-messages.js")); | |
| 2601 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2602 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2603 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 2604 | -var ExperimentsModule = exports["default"] = /*#__PURE__*/function (_elementorModules$Vie) { | |
| 2605 | - function ExperimentsModule() { | |
| 2606 | - (0, _classCallCheck2.default)(this, ExperimentsModule); | |
| 2607 | - return _callSuper(this, ExperimentsModule, arguments); | |
| 2608 | - } | |
| 2609 | - (0, _inherits2.default)(ExperimentsModule, _elementorModules$Vie); | |
| 2610 | - return (0, _createClass2.default)(ExperimentsModule, [{ | |
| 2611 | - key: "getDefaultSettings", | |
| 2612 | - value: function getDefaultSettings() { | |
| 2613 | - return { | |
| 2614 | - selectors: { | |
| 2615 | - experimentIndicators: '.e-experiment__title__indicator', | |
| 2616 | - experimentForm: '#elementor-settings-form', | |
| 2617 | - experimentSelects: '.e-experiment__select', | |
| 2618 | - experimentsButtons: '.e-experiment__button' | |
| 2619 | - } | |
| 2620 | - }; | |
| 2621 | - } | |
| 2622 | - }, { | |
| 2623 | - key: "getDefaultElements", | |
| 2624 | - value: function getDefaultElements() { | |
| 2625 | - var _this$getSettings = this.getSettings(), | |
| 2626 | - selectors = _this$getSettings.selectors; | |
| 2627 | - return { | |
| 2628 | - $experimentIndicators: jQuery(selectors.experimentIndicators), | |
| 2629 | - $experimentForm: jQuery(selectors.experimentForm), | |
| 2630 | - $experimentSelects: jQuery(selectors.experimentSelects), | |
| 2631 | - $experimentsButtons: jQuery(selectors.experimentsButtons) | |
| 2632 | - }; | |
| 2633 | - } | |
| 2634 | - }, { | |
| 2635 | - key: "bindEvents", | |
| 2636 | - value: function bindEvents() { | |
| 2637 | - var _this = this; | |
| 2638 | - this.elements.$experimentsButtons.on('click', function (event) { | |
| 2639 | - return _this.onExperimentsButtonsClick(event); | |
| 2640 | - }); | |
| 2641 | - } | |
| 2642 | - }, { | |
| 2643 | - key: "onExperimentsButtonsClick", | |
| 2644 | - value: function onExperimentsButtonsClick(event) { | |
| 2645 | - var submitButton = jQuery(event.currentTarget); | |
| 2646 | - this.elements.$experimentSelects.val(submitButton.val()); | |
| 2647 | - this.elements.$experimentForm.find('#submit').trigger('click'); | |
| 2648 | - } | |
| 2649 | - }, { | |
| 2650 | - key: "addTipsy", | |
| 2651 | - value: function addTipsy($element) { | |
| 2652 | - $element.tipsy({ | |
| 2653 | - gravity: 's', | |
| 2654 | - offset: 8, | |
| 2655 | - title: function title() { | |
| 2656 | - return this.getAttribute('data-tooltip'); | |
| 2657 | - } | |
| 2658 | - }); | |
| 2659 | - } | |
| 2660 | - }, { | |
| 2661 | - key: "addIndicatorsTooltips", | |
| 2662 | - value: function addIndicatorsTooltips() { | |
| 2663 | - var _this2 = this; | |
| 2664 | - this.elements.$experimentIndicators.each(function (index, experimentIndicator) { | |
| 2665 | - return _this2.addTipsy(jQuery(experimentIndicator)); | |
| 2666 | - }); | |
| 2667 | - } | |
| 2668 | - }, { | |
| 2669 | - key: "onInit", | |
| 2670 | - value: function onInit() { | |
| 2671 | - var _this3 = this; | |
| 2672 | - _superPropGet(ExperimentsModule, "onInit", this, 3)([]); | |
| 2673 | - this.experimentsDependency = new _experimentsMessages.default({ | |
| 2674 | - selects: this.elements.$experimentSelects.toArray(), | |
| 2675 | - submit: this.elements.$experimentForm.find('#submit').get(0) | |
| 2676 | - }); | |
| 2677 | - this.experimentsDependency.bindEvents(); | |
| 2678 | - if (this.elements.$experimentIndicators.length) { | |
| 2679 | - import(/* webpackIgnore: true */"".concat(elementorCommon.config.urls.assets, "lib/tipsy/tipsy.min.js?ver=1.0.0")).then(function () { | |
| 2680 | - return _this3.addIndicatorsTooltips(); | |
| 2681 | - }); | |
| 2682 | - } | |
| 2683 | - } | |
| 2684 | - }]); | |
| 2685 | -}(elementorModules.ViewModule); | |
| 2686 | 420 | |
| 2687 | 421 | /***/ }), |
| 2688 | 422 | |
| 2689 | -/***/ "../modules/floating-buttons/assets/js/floating-buttons/admin/floating-buttons.js": | |
| 2690 | -/*!****************************************************************************************!*\ | |
| 2691 | - !*** ../modules/floating-buttons/assets/js/floating-buttons/admin/floating-buttons.js ***! | |
| 2692 | - \****************************************************************************************/ | |
| 2693 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 423 | +/***/ 217: | |
| 424 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2694 | 425 | |
| 2695 | -"use strict"; | |
| 426 | +var isObject = __webpack_require__(30); | |
| 427 | +var isArray = __webpack_require__(218); | |
| 428 | +var SPECIES = __webpack_require__(12)('species'); | |
| 2696 | 429 | |
| 2697 | - | |
| 2698 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2699 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2700 | - value: true | |
| 2701 | -})); | |
| 2702 | -exports["default"] = void 0; | |
| 2703 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2704 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2705 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2706 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2707 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 2708 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2709 | -var _menuHandler = _interopRequireDefault(__webpack_require__(/*! elementor-admin/menu-handler */ "../assets/dev/js/admin/menu-handler.js")); | |
| 2710 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2711 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2712 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 2713 | -var FloatingButtonsHandler = exports["default"] = /*#__PURE__*/function (_AdminMenuHandler) { | |
| 2714 | - function FloatingButtonsHandler() { | |
| 2715 | - (0, _classCallCheck2.default)(this, FloatingButtonsHandler); | |
| 2716 | - return _callSuper(this, FloatingButtonsHandler, arguments); | |
| 2717 | - } | |
| 2718 | - (0, _inherits2.default)(FloatingButtonsHandler, _AdminMenuHandler); | |
| 2719 | - return (0, _createClass2.default)(FloatingButtonsHandler, [{ | |
| 2720 | - key: "getDefaultSettings", | |
| 2721 | - value: function getDefaultSettings() { | |
| 2722 | - var pageName = 'e-floating-buttons', | |
| 2723 | - adminMenuSelectors = { | |
| 2724 | - // The escaping is done because jQuery requires it for selectors. | |
| 2725 | - contactPagesTablePage: 'a[href="edit.php?post_type=' + pageName + '"]', | |
| 2726 | - contactPagesAddNewPage: 'a[href="edit.php?post_type=elementor_library&page=' + pageName + '"]' | |
| 2727 | - }; | |
| 2728 | - return { | |
| 2729 | - selectors: { | |
| 2730 | - addButton: '.page-title-action:first', | |
| 2731 | - templatesMenuItem: '.menu-icon-elementor_library', | |
| 2732 | - contactPagesMenuItem: "".concat(adminMenuSelectors.contactPagesTablePage, ", ").concat(adminMenuSelectors.contactPagesAddNewPage) | |
| 2733 | - } | |
| 2734 | - }; | |
| 430 | +module.exports = function (original) { | |
| 431 | + var C; | |
| 432 | + if (isArray(original)) { | |
| 433 | + C = original.constructor; | |
| 434 | + // cross-realm fallback | |
| 435 | + if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; | |
| 436 | + if (isObject(C)) { | |
| 437 | + C = C[SPECIES]; | |
| 438 | + if (C === null) C = undefined; | |
| 2735 | 439 | } |
| 2736 | - }, { | |
| 2737 | - key: "getDefaultElements", | |
| 2738 | - value: function getDefaultElements() { | |
| 2739 | - var selectors = this.getSettings('selectors'), | |
| 2740 | - elements = _superPropGet(FloatingButtonsHandler, "getDefaultElements", this, 3)([]); | |
| 2741 | - elements.$templatesMenuItem = jQuery(selectors.templatesMenuItem); | |
| 2742 | - elements.$contactPagesMenuItem = jQuery(selectors.contactPagesMenuItem); | |
| 2743 | - return elements; | |
| 2744 | - } | |
| 2745 | - }, { | |
| 2746 | - key: "onInit", | |
| 2747 | - value: function onInit() { | |
| 2748 | - var _elementorAdminConfig; | |
| 2749 | - _superPropGet(FloatingButtonsHandler, "onInit", this, 3)([]); | |
| 2750 | - var settings = this.getSettings(), | |
| 2751 | - isContactPagesTablePage = !!window.location.href.includes(settings.paths.contactPagesTablePage), | |
| 2752 | - isContactPagesTrashPage = !!window.location.href.includes(settings.paths.contactPagesTrashPage), | |
| 2753 | - isLContactPagesCreateYourFirstPage = !!window.location.href.includes(settings.paths.contactPagesAddNewPage); | |
| 440 | + } return C === undefined ? Array : C; | |
| 441 | +}; | |
| 2754 | 442 | |
| 2755 | - // We need this because there is a complex bug in the WordPress admin menu that causes the Contact Menu to be broken | |
| 2756 | - // When the links page has at least one post and the contact page has none. | |
| 2757 | - if ((_elementorAdminConfig = elementorAdminConfig.urls) !== null && _elementorAdminConfig !== void 0 && _elementorAdminConfig.viewContactPageUrl) { | |
| 2758 | - this.elements.$templatesMenuItem.find('li.submenu-e-contact a').attr('href', elementorAdminConfig.urls.viewContactPageUrl); | |
| 2759 | - } | |
| 2760 | - if (isContactPagesTablePage || isContactPagesTrashPage || isLContactPagesCreateYourFirstPage) { | |
| 2761 | - this.highlightTopLevelMenuItem(this.elements.$templatesMenuItem, this.elements.$pagesMenuItemAndLink); | |
| 2762 | - this.highlightSubMenuItem(this.elements.$contactPagesMenuItem); | |
| 2763 | - jQuery(settings.selectors.addButton).attr('href', elementorAdminConfig.urls.addNewLinkUrlContact); | |
| 2764 | - } | |
| 2765 | - } | |
| 2766 | - }]); | |
| 2767 | -}(_menuHandler.default); | |
| 2768 | 443 | |
| 2769 | 444 | /***/ }), |
| 2770 | 445 | |
| 2771 | -/***/ "../modules/floating-buttons/assets/js/floating-buttons/admin/module.js": | |
| 2772 | -/*!******************************************************************************!*\ | |
| 2773 | - !*** ../modules/floating-buttons/assets/js/floating-buttons/admin/module.js ***! | |
| 2774 | - \******************************************************************************/ | |
| 2775 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 446 | +/***/ 218: | |
| 447 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2776 | 448 | |
| 2777 | -"use strict"; | |
| 449 | +// 7.2.2 IsArray(argument) | |
| 450 | +var cof = __webpack_require__(46); | |
| 451 | +module.exports = Array.isArray || function isArray(arg) { | |
| 452 | + return cof(arg) == 'Array'; | |
| 453 | +}; | |
| 2778 | 454 | |
| 2779 | 455 | |
| 2780 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2781 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2782 | - value: true | |
| 2783 | -})); | |
| 2784 | -exports["default"] = void 0; | |
| 2785 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2786 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2787 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2788 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2789 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2790 | -var _floatingButtons = _interopRequireDefault(__webpack_require__(/*! ./floating-buttons */ "../modules/floating-buttons/assets/js/floating-buttons/admin/floating-buttons.js")); | |
| 2791 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2792 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2793 | -var _default = exports["default"] = /*#__PURE__*/function (_elementorModules$Mod) { | |
| 2794 | - function _default() { | |
| 2795 | - var _this; | |
| 2796 | - (0, _classCallCheck2.default)(this, _default); | |
| 2797 | - _this = _callSuper(this, _default); | |
| 2798 | - elementorCommon.elements.$window.on('elementor/admin/init', function () { | |
| 2799 | - _this.runHandler(); | |
| 2800 | - }); | |
| 2801 | - return _this; | |
| 2802 | - } | |
| 2803 | - (0, _inherits2.default)(_default, _elementorModules$Mod); | |
| 2804 | - return (0, _createClass2.default)(_default, [{ | |
| 2805 | - key: "runHandler", | |
| 2806 | - value: function runHandler() { | |
| 2807 | - var pageNameContact = 'e-floating-buttons', | |
| 2808 | - paths = { | |
| 2809 | - contactPagesTablePage: 'edit.php?post_type=' + pageNameContact, | |
| 2810 | - contactPagesAddNewPage: 'edit.php?post_type=elementor_library&page=' + pageNameContact, | |
| 2811 | - contactPagesTrashPage: 'edit.php?post_status=trash&post_type=' + pageNameContact | |
| 2812 | - }, | |
| 2813 | - args = { | |
| 2814 | - paths: paths | |
| 2815 | - }; | |
| 2816 | - | |
| 2817 | - // This class modifies elements in the WordPress admin that are rendered "wrong" by the WordPress core | |
| 2818 | - // and could not be modified in the backend. | |
| 2819 | - new _floatingButtons.default(args); | |
| 2820 | - } | |
| 2821 | - }]); | |
| 2822 | -}(elementorModules.Module); | |
| 2823 | - | |
| 2824 | 456 | /***/ }), |
| 2825 | 457 | |
| 2826 | -/***/ "../modules/landing-pages/assets/js/admin/landing-pages.js": | |
| 2827 | -/*!*****************************************************************!*\ | |
| 2828 | - !*** ../modules/landing-pages/assets/js/admin/landing-pages.js ***! | |
| 2829 | - \*****************************************************************/ | |
| 2830 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 458 | +/***/ 26: | |
| 459 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2831 | 460 | |
| 2832 | 461 | "use strict"; |
| 2833 | 462 | |
| 2834 | - | |
| 2835 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2836 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2837 | - value: true | |
| 2838 | -})); | |
| 2839 | -exports["default"] = void 0; | |
| 2840 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2841 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2842 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2843 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2844 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 2845 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2846 | -var _menuHandler = _interopRequireDefault(__webpack_require__(/*! elementor-admin/menu-handler */ "../assets/dev/js/admin/menu-handler.js")); | |
| 2847 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2848 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2849 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 2850 | -var LandingPagesHandler = exports["default"] = /*#__PURE__*/function (_AdminMenuHandler) { | |
| 2851 | - function LandingPagesHandler() { | |
| 2852 | - (0, _classCallCheck2.default)(this, LandingPagesHandler); | |
| 2853 | - return _callSuper(this, LandingPagesHandler, arguments); | |
| 463 | +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) | |
| 464 | +var $export = __webpack_require__(37); | |
| 465 | +var $find = __webpack_require__(181)(5); | |
| 466 | +var KEY = 'find'; | |
| 467 | +var forced = true; | |
| 468 | +// Shouldn't skip holes | |
| 469 | +if (KEY in []) Array(1)[KEY](function () { forced = false; }); | |
| 470 | +$export($export.P + $export.F * forced, 'Array', { | |
| 471 | + find: function find(callbackfn /* , that = undefined */) { | |
| 472 | + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); | |
| 2854 | 473 | } |
| 2855 | - (0, _inherits2.default)(LandingPagesHandler, _AdminMenuHandler); | |
| 2856 | - return (0, _createClass2.default)(LandingPagesHandler, [{ | |
| 2857 | - key: "getDefaultSettings", | |
| 2858 | - value: function getDefaultSettings() { | |
| 2859 | - var pageName = 'e-landing-page', | |
| 2860 | - adminMenuSelectors = { | |
| 2861 | - // The escaping is done because jQuery requires it for selectors. | |
| 2862 | - landingPagesTablePage: 'a[href="edit.php?post_type=' + pageName + '"]', | |
| 2863 | - landingPagesAddNewPage: 'a[href="edit.php?post_type=elementor_library&page=' + pageName + '"]' | |
| 2864 | - }; | |
| 2865 | - return { | |
| 2866 | - selectors: { | |
| 2867 | - addButton: '.page-title-action:first', | |
| 2868 | - pagesMenuItemAndLink: '#menu-pages, #menu-pages > a', | |
| 2869 | - landingPagesMenuItem: "".concat(adminMenuSelectors.landingPagesTablePage, ", ").concat(adminMenuSelectors.landingPagesAddNewPage), | |
| 2870 | - templatesMenuItem: '.menu-icon-elementor_library' | |
| 2871 | - } | |
| 2872 | - }; | |
| 2873 | - } | |
| 2874 | - }, { | |
| 2875 | - key: "getDefaultElements", | |
| 2876 | - value: function getDefaultElements() { | |
| 2877 | - var selectors = this.getSettings('selectors'), | |
| 2878 | - elements = _superPropGet(LandingPagesHandler, "getDefaultElements", this, 3)([]); | |
| 2879 | - elements.$landingPagesMenuItem = jQuery(selectors.landingPagesMenuItem); | |
| 2880 | - elements.$templatesMenuItem = jQuery(selectors.templatesMenuItem); | |
| 2881 | - elements.$pagesMenuItemAndLink = jQuery(selectors.pagesMenuItemAndLink); | |
| 2882 | - return elements; | |
| 2883 | - } | |
| 2884 | - }, { | |
| 2885 | - key: "onInit", | |
| 2886 | - value: function onInit() { | |
| 2887 | - _superPropGet(LandingPagesHandler, "onInit", this, 3)([]); | |
| 2888 | - var settings = this.getSettings(), | |
| 2889 | - isLandingPagesTablePage = !!window.location.href.includes(settings.paths.landingPagesTablePage), | |
| 2890 | - isLandingPagesTrashPage = !!window.location.href.includes(settings.paths.landingPagesTrashPage), | |
| 2891 | - isLandingPagesCreateYourFirstPage = !!window.location.href.includes(settings.paths.landingPagesAddNewPage); | |
| 474 | +}); | |
| 475 | +__webpack_require__(85)(KEY); | |
| 2892 | 476 | |
| 2893 | - // If the current page is a Landing Pages Page (the Posts Table page, "Create Your First.." page, or a native | |
| 2894 | - // WordPress dashboard page edit screen when using WordPress' Classic Editor). | |
| 2895 | - if (isLandingPagesTablePage || isLandingPagesTrashPage || isLandingPagesCreateYourFirstPage || settings.isLandingPageAdminEdit) { | |
| 2896 | - // Make sure the active admin top level menu item is 'Templates', and not 'Pages'. | |
| 2897 | - this.highlightTopLevelMenuItem(this.elements.$templatesMenuItem, this.elements.$pagesMenuItemAndLink); | |
| 2898 | - this.highlightSubMenuItem(this.elements.$landingPagesMenuItem); | |
| 2899 | 477 | |
| 2900 | - // Overwrite the 'Add New' button at the top of the page to open in Elementor with the library module open. | |
| 2901 | - jQuery(settings.selectors.addButton).attr('href', elementorAdminConfig.urls.addNewLandingPageUrl); | |
| 2902 | - } | |
| 2903 | - } | |
| 2904 | - }]); | |
| 2905 | -}(_menuHandler.default); | |
| 2906 | - | |
| 2907 | 478 | /***/ }), |
| 2908 | 479 | |
| 2909 | -/***/ "../modules/landing-pages/assets/js/admin/module.js": | |
| 2910 | -/*!**********************************************************!*\ | |
| 2911 | - !*** ../modules/landing-pages/assets/js/admin/module.js ***! | |
| 2912 | - \**********************************************************/ | |
| 2913 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 480 | +/***/ 27: | |
| 481 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2914 | 482 | |
| 2915 | -"use strict"; | |
| 483 | +// Thank's IE8 for his funny defineProperty | |
| 484 | +module.exports = !__webpack_require__(33)(function () { | |
| 485 | + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; | |
| 486 | +}); | |
| 2916 | 487 | |
| 2917 | 488 | |
| 2918 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2919 | -Object.defineProperty(exports, "__esModule", ({ | |
| 2920 | - value: true | |
| 2921 | -})); | |
| 2922 | -exports["default"] = void 0; | |
| 2923 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2924 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2925 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2926 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2927 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2928 | -var _landingPages = _interopRequireDefault(__webpack_require__(/*! ./landing-pages */ "../modules/landing-pages/assets/js/admin/landing-pages.js")); | |
| 2929 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2930 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2931 | -var _default = exports["default"] = /*#__PURE__*/function (_elementorModules$Mod) { | |
| 2932 | - function _default() { | |
| 2933 | - var _this; | |
| 2934 | - (0, _classCallCheck2.default)(this, _default); | |
| 2935 | - _this = _callSuper(this, _default); | |
| 2936 | - elementorCommon.elements.$window.on('elementor/admin/init', function () { | |
| 2937 | - _this.runHandler(); | |
| 2938 | - }); | |
| 2939 | - return _this; | |
| 2940 | - } | |
| 2941 | - (0, _inherits2.default)(_default, _elementorModules$Mod); | |
| 2942 | - return (0, _createClass2.default)(_default, [{ | |
| 2943 | - key: "runHandler", | |
| 2944 | - value: function runHandler() { | |
| 2945 | - var _elementorAdmin$confi, _elementorAdmin$confi2; | |
| 2946 | - var pageName = 'e-landing-page', | |
| 2947 | - paths = { | |
| 2948 | - landingPagesTablePage: 'edit.php?post_type=' + pageName, | |
| 2949 | - landingPagesAddNewPage: 'edit.php?post_type=elementor_library&page=' + pageName, | |
| 2950 | - landingPagesTrashPage: 'edit.php?post_status=trash&post_type=' + pageName | |
| 2951 | - }, | |
| 2952 | - args = { | |
| 2953 | - path: (_elementorAdmin$confi = elementorAdmin.config.landingPages) !== null && _elementorAdmin$confi !== void 0 && _elementorAdmin$confi.landingPagesHasPages ? paths.landingPagesTablePage : paths.landingPagesAddNewPage, | |
| 2954 | - isLandingPageAdminEdit: (_elementorAdmin$confi2 = elementorAdmin.config.landingPages) === null || _elementorAdmin$confi2 === void 0 ? void 0 : _elementorAdmin$confi2.isLandingPageAdminEdit, | |
| 2955 | - paths: paths | |
| 2956 | - }; | |
| 2957 | - | |
| 2958 | - // This class modifies elements in the WordPress admin that are rendered "wrong" by the WordPress core | |
| 2959 | - // and could not be modified in the backend. | |
| 2960 | - new _landingPages.default(args); | |
| 2961 | - } | |
| 2962 | - }]); | |
| 2963 | -}(elementorModules.Module); | |
| 2964 | - | |
| 2965 | 489 | /***/ }), |
| 2966 | 490 | |
| 2967 | -/***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js": | |
| 2968 | -/*!***************************************************************!*\ | |
| 2969 | - !*** ../node_modules/@babel/runtime/helpers/OverloadYield.js ***! | |
| 2970 | - \***************************************************************/ | |
| 2971 | -/***/ ((module) => { | |
| 491 | +/***/ 29: | |
| 492 | +/***/ (function(module, exports, __webpack_require__) { | |
| 2972 | 493 | |
| 2973 | -function _OverloadYield(e, d) { | |
| 2974 | - this.v = e, this.k = d; | |
| 2975 | -} | |
| 2976 | -module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 494 | +var dP = __webpack_require__(45); | |
| 495 | +var createDesc = __webpack_require__(102); | |
| 496 | +module.exports = __webpack_require__(27) ? function (object, key, value) { | |
| 497 | + return dP.f(object, key, createDesc(1, value)); | |
| 498 | +} : function (object, key, value) { | |
| 499 | + object[key] = value; | |
| 500 | + return object; | |
| 501 | +}; | |
| 2977 | 502 | |
| 2978 | -/***/ }), | |
| 2979 | 503 | |
| 2980 | -/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 2981 | -/*!******************************************************************!*\ | |
| 2982 | - !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 2983 | - \******************************************************************/ | |
| 2984 | -/***/ ((module) => { | |
| 2985 | - | |
| 2986 | -function _arrayLikeToArray(r, a) { | |
| 2987 | - (null == a || a > r.length) && (a = r.length); | |
| 2988 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 2989 | - return n; | |
| 2990 | -} | |
| 2991 | -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 2992 | - | |
| 2993 | 504 | /***/ }), |
| 2994 | 505 | |
| 2995 | -/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 2996 | -/*!****************************************************************!*\ | |
| 2997 | - !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 2998 | - \****************************************************************/ | |
| 2999 | -/***/ ((module) => { | |
| 506 | +/***/ 30: | |
| 507 | +/***/ (function(module, exports) { | |
| 3000 | 508 | |
| 3001 | -function _arrayWithHoles(r) { | |
| 3002 | - if (Array.isArray(r)) return r; | |
| 3003 | -} | |
| 3004 | -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 509 | +module.exports = function (it) { | |
| 510 | + return typeof it === 'object' ? it !== null : typeof it === 'function'; | |
| 511 | +}; | |
| 3005 | 512 | |
| 3006 | -/***/ }), | |
| 3007 | 513 | |
| 3008 | -/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 3009 | -/*!***********************************************************************!*\ | |
| 3010 | - !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 3011 | - \***********************************************************************/ | |
| 3012 | -/***/ ((module) => { | |
| 3013 | - | |
| 3014 | -function _assertThisInitialized(e) { | |
| 3015 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 3016 | - return e; | |
| 3017 | -} | |
| 3018 | -module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3019 | - | |
| 3020 | 514 | /***/ }), |
| 3021 | 515 | |
| 3022 | -/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": | |
| 3023 | -/*!******************************************************************!*\ | |
| 3024 | - !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! | |
| 3025 | - \******************************************************************/ | |
| 3026 | -/***/ ((module) => { | |
| 516 | +/***/ 33: | |
| 517 | +/***/ (function(module, exports) { | |
| 3027 | 518 | |
| 3028 | -function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 519 | +module.exports = function (exec) { | |
| 3029 | 520 | try { |
| 3030 | - var i = n[a](c), | |
| 3031 | - u = i.value; | |
| 3032 | - } catch (n) { | |
| 3033 | - return void e(n); | |
| 521 | + return !!exec(); | |
| 522 | + } catch (e) { | |
| 523 | + return true; | |
| 3034 | 524 | } |
| 3035 | - i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 3036 | -} | |
| 3037 | -function _asyncToGenerator(n) { | |
| 3038 | - return function () { | |
| 3039 | - var t = this, | |
| 3040 | - e = arguments; | |
| 3041 | - return new Promise(function (r, o) { | |
| 3042 | - var a = n.apply(t, e); | |
| 3043 | - function _next(n) { | |
| 3044 | - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 3045 | - } | |
| 3046 | - function _throw(n) { | |
| 3047 | - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 3048 | - } | |
| 3049 | - _next(void 0); | |
| 3050 | - }); | |
| 3051 | - }; | |
| 3052 | -} | |
| 3053 | -module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 525 | +}; | |
| 3054 | 526 | |
| 527 | + | |
| 3055 | 528 | /***/ }), |
| 3056 | 529 | |
| 3057 | -/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 3058 | -/*!****************************************************************!*\ | |
| 3059 | - !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 3060 | - \****************************************************************/ | |
| 3061 | -/***/ ((module) => { | |
| 530 | +/***/ 334: | |
| 531 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3062 | 532 | |
| 3063 | -function _classCallCheck(a, n) { | |
| 3064 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 3065 | -} | |
| 3066 | -module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 533 | +"use strict"; | |
| 3067 | 534 | |
| 3068 | -/***/ }), | |
| 3069 | 535 | |
| 3070 | -/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 3071 | -/*!*************************************************************!*\ | |
| 3072 | - !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 3073 | - \*************************************************************/ | |
| 3074 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 536 | +var anObject = __webpack_require__(18); | |
| 537 | +var sameValue = __webpack_require__(385); | |
| 538 | +var regExpExec = __webpack_require__(94); | |
| 3075 | 539 | |
| 3076 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 3077 | -function _defineProperties(e, r) { | |
| 3078 | - for (var t = 0; t < r.length; t++) { | |
| 3079 | - var o = r[t]; | |
| 3080 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 3081 | - } | |
| 3082 | -} | |
| 3083 | -function _createClass(e, r, t) { | |
| 3084 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 3085 | - writable: !1 | |
| 3086 | - }), e; | |
| 3087 | -} | |
| 3088 | -module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 540 | +// @@search logic | |
| 541 | +__webpack_require__(95)('search', 1, function (defined, SEARCH, $search, maybeCallNative) { | |
| 542 | + return [ | |
| 543 | + // `String.prototype.search` method | |
| 544 | + // https://tc39.github.io/ecma262/#sec-string.prototype.search | |
| 545 | + function search(regexp) { | |
| 546 | + var O = defined(this); | |
| 547 | + var fn = regexp == undefined ? undefined : regexp[SEARCH]; | |
| 548 | + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); | |
| 549 | + }, | |
| 550 | + // `RegExp.prototype[@@search]` method | |
| 551 | + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search | |
| 552 | + function (regexp) { | |
| 553 | + var res = maybeCallNative($search, regexp, this); | |
| 554 | + if (res.done) return res.value; | |
| 555 | + var rx = anObject(regexp); | |
| 556 | + var S = String(this); | |
| 557 | + var previousLastIndex = rx.lastIndex; | |
| 558 | + if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0; | |
| 559 | + var result = regExpExec(rx, S); | |
| 560 | + if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex; | |
| 561 | + return result === null ? -1 : result.index; | |
| 562 | + } | |
| 563 | + ]; | |
| 564 | +}); | |
| 3089 | 565 | |
| 566 | + | |
| 3090 | 567 | /***/ }), |
| 3091 | 568 | |
| 3092 | -/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 3093 | -/*!****************************************************************!*\ | |
| 3094 | - !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 3095 | - \****************************************************************/ | |
| 3096 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 569 | +/***/ 35: | |
| 570 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3097 | 571 | |
| 3098 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 3099 | -function _defineProperty(e, r, t) { | |
| 3100 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 3101 | - value: t, | |
| 3102 | - enumerable: !0, | |
| 3103 | - configurable: !0, | |
| 3104 | - writable: !0 | |
| 3105 | - }) : e[r] = t, e; | |
| 3106 | -} | |
| 3107 | -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 572 | +var global = __webpack_require__(17); | |
| 573 | +var hide = __webpack_require__(29); | |
| 574 | +var has = __webpack_require__(61); | |
| 575 | +var SRC = __webpack_require__(67)('src'); | |
| 576 | +var $toString = __webpack_require__(143); | |
| 577 | +var TO_STRING = 'toString'; | |
| 578 | +var TPL = ('' + $toString).split(TO_STRING); | |
| 3108 | 579 | |
| 3109 | -/***/ }), | |
| 580 | +__webpack_require__(55).inspectSource = function (it) { | |
| 581 | + return $toString.call(it); | |
| 582 | +}; | |
| 3110 | 583 | |
| 3111 | -/***/ "../node_modules/@babel/runtime/helpers/get.js": | |
| 3112 | -/*!*****************************************************!*\ | |
| 3113 | - !*** ../node_modules/@babel/runtime/helpers/get.js ***! | |
| 3114 | - \*****************************************************/ | |
| 3115 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 584 | +(module.exports = function (O, key, val, safe) { | |
| 585 | + var isFunction = typeof val == 'function'; | |
| 586 | + if (isFunction) has(val, 'name') || hide(val, 'name', key); | |
| 587 | + if (O[key] === val) return; | |
| 588 | + if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); | |
| 589 | + if (O === global) { | |
| 590 | + O[key] = val; | |
| 591 | + } else if (!safe) { | |
| 592 | + delete O[key]; | |
| 593 | + hide(O, key, val); | |
| 594 | + } else if (O[key]) { | |
| 595 | + O[key] = val; | |
| 596 | + } else { | |
| 597 | + hide(O, key, val); | |
| 598 | + } | |
| 599 | +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative | |
| 600 | +})(Function.prototype, TO_STRING, function toString() { | |
| 601 | + return typeof this == 'function' && this[SRC] || $toString.call(this); | |
| 602 | +}); | |
| 3116 | 603 | |
| 3117 | -var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js"); | |
| 3118 | -function _get() { | |
| 3119 | - return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { | |
| 3120 | - var p = superPropBase(e, t); | |
| 3121 | - if (p) { | |
| 3122 | - var n = Object.getOwnPropertyDescriptor(p, t); | |
| 3123 | - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; | |
| 3124 | - } | |
| 3125 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments); | |
| 3126 | -} | |
| 3127 | -module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3128 | 604 | |
| 3129 | 605 | /***/ }), |
| 3130 | 606 | |
| 3131 | -/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 3132 | -/*!****************************************************************!*\ | |
| 3133 | - !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 3134 | - \****************************************************************/ | |
| 3135 | -/***/ ((module) => { | |
| 607 | +/***/ 37: | |
| 608 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3136 | 609 | |
| 3137 | -function _getPrototypeOf(t) { | |
| 3138 | - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 3139 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 3140 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 3141 | -} | |
| 3142 | -module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 610 | +var global = __webpack_require__(17); | |
| 611 | +var core = __webpack_require__(55); | |
| 612 | +var hide = __webpack_require__(29); | |
| 613 | +var redefine = __webpack_require__(35); | |
| 614 | +var ctx = __webpack_require__(73); | |
| 615 | +var PROTOTYPE = 'prototype'; | |
| 3143 | 616 | |
| 3144 | -/***/ }), | |
| 617 | +var $export = function (type, name, source) { | |
| 618 | + var IS_FORCED = type & $export.F; | |
| 619 | + var IS_GLOBAL = type & $export.G; | |
| 620 | + var IS_STATIC = type & $export.S; | |
| 621 | + var IS_PROTO = type & $export.P; | |
| 622 | + var IS_BIND = type & $export.B; | |
| 623 | + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; | |
| 624 | + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); | |
| 625 | + var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); | |
| 626 | + var key, own, out, exp; | |
| 627 | + if (IS_GLOBAL) source = name; | |
| 628 | + for (key in source) { | |
| 629 | + // contains in native | |
| 630 | + own = !IS_FORCED && target && target[key] !== undefined; | |
| 631 | + // export native or passed | |
| 632 | + out = (own ? target : source)[key]; | |
| 633 | + // bind timers to global for call from export context | |
| 634 | + exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; | |
| 635 | + // extend global | |
| 636 | + if (target) redefine(target, key, out, type & $export.U); | |
| 637 | + // export | |
| 638 | + if (exports[key] != out) hide(exports, key, exp); | |
| 639 | + if (IS_PROTO && expProto[key] != out) expProto[key] = out; | |
| 640 | + } | |
| 641 | +}; | |
| 642 | +global.core = core; | |
| 643 | +// type bitmap | |
| 644 | +$export.F = 1; // forced | |
| 645 | +$export.G = 2; // global | |
| 646 | +$export.S = 4; // static | |
| 647 | +$export.P = 8; // proto | |
| 648 | +$export.B = 16; // bind | |
| 649 | +$export.W = 32; // wrap | |
| 650 | +$export.U = 64; // safe | |
| 651 | +$export.R = 128; // real proto method for `library` | |
| 652 | +module.exports = $export; | |
| 3145 | 653 | |
| 3146 | -/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 3147 | -/*!**********************************************************!*\ | |
| 3148 | - !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 3149 | - \**********************************************************/ | |
| 3150 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3151 | 654 | |
| 3152 | -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 3153 | -function _inherits(t, e) { | |
| 3154 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 3155 | - t.prototype = Object.create(e && e.prototype, { | |
| 3156 | - constructor: { | |
| 3157 | - value: t, | |
| 3158 | - writable: !0, | |
| 3159 | - configurable: !0 | |
| 3160 | - } | |
| 3161 | - }), Object.defineProperty(t, "prototype", { | |
| 3162 | - writable: !1 | |
| 3163 | - }), e && setPrototypeOf(t, e); | |
| 3164 | -} | |
| 3165 | -module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 655 | +/***/ }), | |
| 3166 | 656 | |
| 3167 | -/***/ }), | |
| 657 | +/***/ 385: | |
| 658 | +/***/ (function(module, exports) { | |
| 3168 | 659 | |
| 3169 | -/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 3170 | -/*!***********************************************************************!*\ | |
| 3171 | - !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 3172 | - \***********************************************************************/ | |
| 3173 | -/***/ ((module) => { | |
| 660 | +// 7.2.9 SameValue(x, y) | |
| 661 | +module.exports = Object.is || function is(x, y) { | |
| 662 | + // eslint-disable-next-line no-self-compare | |
| 663 | + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; | |
| 664 | +}; | |
| 3174 | 665 | |
| 3175 | -function _interopRequireDefault(e) { | |
| 3176 | - return e && e.__esModule ? e : { | |
| 3177 | - "default": e | |
| 3178 | - }; | |
| 3179 | -} | |
| 3180 | -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3181 | 666 | |
| 3182 | 667 | /***/ }), |
| 3183 | 668 | |
| 3184 | -/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 3185 | -/*!**********************************************************************!*\ | |
| 3186 | - !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 3187 | - \**********************************************************************/ | |
| 3188 | -/***/ ((module) => { | |
| 669 | +/***/ 42: | |
| 670 | +/***/ (function(module, exports) { | |
| 3189 | 671 | |
| 3190 | -function _iterableToArrayLimit(r, l) { | |
| 3191 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 3192 | - if (null != t) { | |
| 3193 | - var e, | |
| 3194 | - n, | |
| 3195 | - i, | |
| 3196 | - u, | |
| 3197 | - a = [], | |
| 3198 | - f = !0, | |
| 3199 | - o = !1; | |
| 3200 | - try { | |
| 3201 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 3202 | - if (Object(t) !== t) return; | |
| 3203 | - f = !1; | |
| 3204 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 3205 | - } catch (r) { | |
| 3206 | - o = !0, n = r; | |
| 3207 | - } finally { | |
| 3208 | - try { | |
| 3209 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 3210 | - } finally { | |
| 3211 | - if (o) throw n; | |
| 3212 | - } | |
| 3213 | - } | |
| 3214 | - return a; | |
| 3215 | - } | |
| 3216 | -} | |
| 3217 | -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 672 | +// 7.2.1 RequireObjectCoercible(argument) | |
| 673 | +module.exports = function (it) { | |
| 674 | + if (it == undefined) throw TypeError("Can't call method on " + it); | |
| 675 | + return it; | |
| 676 | +}; | |
| 3218 | 677 | |
| 678 | + | |
| 3219 | 679 | /***/ }), |
| 3220 | 680 | |
| 3221 | -/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 3222 | -/*!*****************************************************************!*\ | |
| 3223 | - !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 3224 | - \*****************************************************************/ | |
| 3225 | -/***/ ((module) => { | |
| 681 | +/***/ 43: | |
| 682 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3226 | 683 | |
| 3227 | -function _nonIterableRest() { | |
| 3228 | - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 3229 | -} | |
| 3230 | -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 684 | +// 7.1.15 ToLength | |
| 685 | +var toInteger = __webpack_require__(57); | |
| 686 | +var min = Math.min; | |
| 687 | +module.exports = function (it) { | |
| 688 | + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 | |
| 689 | +}; | |
| 3231 | 690 | |
| 691 | + | |
| 3232 | 692 | /***/ }), |
| 3233 | 693 | |
| 3234 | -/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 3235 | -/*!***************************************************************************!*\ | |
| 3236 | - !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 3237 | - \***************************************************************************/ | |
| 3238 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 694 | +/***/ 45: | |
| 695 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3239 | 696 | |
| 3240 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3241 | -var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 3242 | -function _possibleConstructorReturn(t, e) { | |
| 3243 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 3244 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 3245 | - return assertThisInitialized(t); | |
| 3246 | -} | |
| 3247 | -module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 697 | +var anObject = __webpack_require__(18); | |
| 698 | +var IE8_DOM_DEFINE = __webpack_require__(129); | |
| 699 | +var toPrimitive = __webpack_require__(123); | |
| 700 | +var dP = Object.defineProperty; | |
| 3248 | 701 | |
| 3249 | -/***/ }), | |
| 702 | +exports.f = __webpack_require__(27) ? Object.defineProperty : function defineProperty(O, P, Attributes) { | |
| 703 | + anObject(O); | |
| 704 | + P = toPrimitive(P, true); | |
| 705 | + anObject(Attributes); | |
| 706 | + if (IE8_DOM_DEFINE) try { | |
| 707 | + return dP(O, P, Attributes); | |
| 708 | + } catch (e) { /* empty */ } | |
| 709 | + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); | |
| 710 | + if ('value' in Attributes) O[P] = Attributes.value; | |
| 711 | + return O; | |
| 712 | +}; | |
| 3250 | 713 | |
| 3251 | -/***/ "../node_modules/@babel/runtime/helpers/regenerator.js": | |
| 3252 | -/*!*************************************************************!*\ | |
| 3253 | - !*** ../node_modules/@babel/runtime/helpers/regenerator.js ***! | |
| 3254 | - \*************************************************************/ | |
| 3255 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3256 | 714 | |
| 3257 | -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 3258 | -function _regenerator() { | |
| 3259 | - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 3260 | - var e, | |
| 3261 | - t, | |
| 3262 | - r = "function" == typeof Symbol ? Symbol : {}, | |
| 3263 | - n = r.iterator || "@@iterator", | |
| 3264 | - o = r.toStringTag || "@@toStringTag"; | |
| 3265 | - function i(r, n, o, i) { | |
| 3266 | - var c = n && n.prototype instanceof Generator ? n : Generator, | |
| 3267 | - u = Object.create(c.prototype); | |
| 3268 | - return regeneratorDefine(u, "_invoke", function (r, n, o) { | |
| 3269 | - var i, | |
| 3270 | - c, | |
| 3271 | - u, | |
| 3272 | - f = 0, | |
| 3273 | - p = o || [], | |
| 3274 | - y = !1, | |
| 3275 | - G = { | |
| 3276 | - p: 0, | |
| 3277 | - n: 0, | |
| 3278 | - v: e, | |
| 3279 | - a: d, | |
| 3280 | - f: d.bind(e, 4), | |
| 3281 | - d: function d(t, r) { | |
| 3282 | - return i = t, c = 0, u = e, G.n = r, a; | |
| 3283 | - } | |
| 3284 | - }; | |
| 3285 | - function d(r, n) { | |
| 3286 | - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 3287 | - var o, | |
| 3288 | - i = p[t], | |
| 3289 | - d = G.p, | |
| 3290 | - l = i[2]; | |
| 3291 | - r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); | |
| 3292 | - } | |
| 3293 | - if (o || r > 1) return a; | |
| 3294 | - throw y = !0, n; | |
| 3295 | - } | |
| 3296 | - return function (o, p, l) { | |
| 3297 | - if (f > 1) throw TypeError("Generator is already running"); | |
| 3298 | - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 3299 | - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 3300 | - try { | |
| 3301 | - if (f = 2, i) { | |
| 3302 | - if (c || (o = "next"), t = i[o]) { | |
| 3303 | - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 3304 | - if (!t.done) return t; | |
| 3305 | - u = t.value, c < 2 && (c = 0); | |
| 3306 | - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 3307 | - i = e; | |
| 3308 | - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 3309 | - } catch (t) { | |
| 3310 | - i = e, c = 1, u = t; | |
| 3311 | - } finally { | |
| 3312 | - f = 1; | |
| 3313 | - } | |
| 3314 | - } | |
| 3315 | - return { | |
| 3316 | - value: t, | |
| 3317 | - done: y | |
| 3318 | - }; | |
| 3319 | - }; | |
| 3320 | - }(r, o, i), !0), u; | |
| 3321 | - } | |
| 3322 | - var a = {}; | |
| 3323 | - function Generator() {} | |
| 3324 | - function GeneratorFunction() {} | |
| 3325 | - function GeneratorFunctionPrototype() {} | |
| 3326 | - t = Object.getPrototypeOf; | |
| 3327 | - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { | |
| 3328 | - return this; | |
| 3329 | - }), t), | |
| 3330 | - u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 3331 | - function f(e) { | |
| 3332 | - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 3333 | - } | |
| 3334 | - return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () { | |
| 3335 | - return this; | |
| 3336 | - }), regeneratorDefine(u, "toString", function () { | |
| 3337 | - return "[object Generator]"; | |
| 3338 | - }), (module.exports = _regenerator = function _regenerator() { | |
| 3339 | - return { | |
| 3340 | - w: i, | |
| 3341 | - m: f | |
| 3342 | - }; | |
| 3343 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 3344 | -} | |
| 3345 | -module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3346 | - | |
| 3347 | 715 | /***/ }), |
| 3348 | 716 | |
| 3349 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js": | |
| 3350 | -/*!******************************************************************!*\ | |
| 3351 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsync.js ***! | |
| 3352 | - \******************************************************************/ | |
| 3353 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 717 | +/***/ 46: | |
| 718 | +/***/ (function(module, exports) { | |
| 3354 | 719 | |
| 3355 | -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 3356 | -function _regeneratorAsync(n, e, r, t, o) { | |
| 3357 | - var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 3358 | - return a.next().then(function (n) { | |
| 3359 | - return n.done ? n.value : a.next(); | |
| 3360 | - }); | |
| 3361 | -} | |
| 3362 | -module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 720 | +var toString = {}.toString; | |
| 3363 | 721 | |
| 3364 | -/***/ }), | |
| 722 | +module.exports = function (it) { | |
| 723 | + return toString.call(it).slice(8, -1); | |
| 724 | +}; | |
| 3365 | 725 | |
| 3366 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js": | |
| 3367 | -/*!*********************************************************************!*\ | |
| 3368 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js ***! | |
| 3369 | - \*********************************************************************/ | |
| 3370 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3371 | 726 | |
| 3372 | -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 3373 | -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 3374 | -function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 3375 | - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 3376 | -} | |
| 3377 | -module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 727 | +/***/ }), | |
| 3378 | 728 | |
| 3379 | -/***/ }), | |
| 729 | +/***/ 55: | |
| 730 | +/***/ (function(module, exports) { | |
| 3380 | 731 | |
| 3381 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js": | |
| 3382 | -/*!**************************************************************************!*\ | |
| 3383 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js ***! | |
| 3384 | - \**************************************************************************/ | |
| 3385 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 732 | +var core = module.exports = { version: '2.6.11' }; | |
| 733 | +if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef | |
| 3386 | 734 | |
| 3387 | -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 3388 | -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 3389 | -function AsyncIterator(t, e) { | |
| 3390 | - function n(r, o, i, f) { | |
| 3391 | - try { | |
| 3392 | - var c = t[r](o), | |
| 3393 | - u = c.value; | |
| 3394 | - return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { | |
| 3395 | - n("next", t, i, f); | |
| 3396 | - }, function (t) { | |
| 3397 | - n("throw", t, i, f); | |
| 3398 | - }) : e.resolve(u).then(function (t) { | |
| 3399 | - c.value = t, i(c); | |
| 3400 | - }, function (t) { | |
| 3401 | - return n("throw", t, i, f); | |
| 3402 | - }); | |
| 3403 | - } catch (t) { | |
| 3404 | - f(t); | |
| 3405 | - } | |
| 3406 | - } | |
| 3407 | - var r; | |
| 3408 | - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { | |
| 3409 | - return this; | |
| 3410 | - })), regeneratorDefine(this, "_invoke", function (t, o, i) { | |
| 3411 | - function f() { | |
| 3412 | - return new e(function (e, r) { | |
| 3413 | - n(t, i, e, r); | |
| 3414 | - }); | |
| 3415 | - } | |
| 3416 | - return r = r ? r.then(f, f) : f(); | |
| 3417 | - }, !0); | |
| 3418 | -} | |
| 3419 | -module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3420 | 735 | |
| 3421 | 736 | /***/ }), |
| 3422 | 737 | |
| 3423 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js": | |
| 3424 | -/*!*******************************************************************!*\ | |
| 3425 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorDefine.js ***! | |
| 3426 | - \*******************************************************************/ | |
| 3427 | -/***/ ((module) => { | |
| 738 | +/***/ 57: | |
| 739 | +/***/ (function(module, exports) { | |
| 3428 | 740 | |
| 3429 | -function _regeneratorDefine(e, r, n, t) { | |
| 3430 | - var i = Object.defineProperty; | |
| 3431 | - try { | |
| 3432 | - i({}, "", {}); | |
| 3433 | - } catch (e) { | |
| 3434 | - i = 0; | |
| 3435 | - } | |
| 3436 | - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 3437 | - function o(r, n) { | |
| 3438 | - _regeneratorDefine(e, r, function (e) { | |
| 3439 | - return this._invoke(r, n, e); | |
| 3440 | - }); | |
| 3441 | - } | |
| 3442 | - r ? i ? i(e, r, { | |
| 3443 | - value: n, | |
| 3444 | - enumerable: !t, | |
| 3445 | - configurable: !t, | |
| 3446 | - writable: !t | |
| 3447 | - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 3448 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 3449 | -} | |
| 3450 | -module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 741 | +// 7.1.4 ToInteger | |
| 742 | +var ceil = Math.ceil; | |
| 743 | +var floor = Math.floor; | |
| 744 | +module.exports = function (it) { | |
| 745 | + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); | |
| 746 | +}; | |
| 3451 | 747 | |
| 748 | + | |
| 3452 | 749 | /***/ }), |
| 3453 | 750 | |
| 3454 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js": | |
| 3455 | -/*!*****************************************************************!*\ | |
| 3456 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorKeys.js ***! | |
| 3457 | - \*****************************************************************/ | |
| 3458 | -/***/ ((module) => { | |
| 751 | +/***/ 58: | |
| 752 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3459 | 753 | |
| 3460 | -function _regeneratorKeys(e) { | |
| 3461 | - var n = Object(e), | |
| 3462 | - r = []; | |
| 3463 | - for (var t in n) r.unshift(t); | |
| 3464 | - return function e() { | |
| 3465 | - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 3466 | - return e.done = !0, e; | |
| 3467 | - }; | |
| 3468 | -} | |
| 3469 | -module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 754 | +"use strict"; | |
| 3470 | 755 | |
| 3471 | -/***/ }), | |
| 3472 | 756 | |
| 3473 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 3474 | -/*!********************************************************************!*\ | |
| 3475 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 3476 | - \********************************************************************/ | |
| 3477 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 757 | +var anObject = __webpack_require__(18); | |
| 758 | +var toObject = __webpack_require__(96); | |
| 759 | +var toLength = __webpack_require__(43); | |
| 760 | +var toInteger = __webpack_require__(57); | |
| 761 | +var advanceStringIndex = __webpack_require__(105); | |
| 762 | +var regExpExec = __webpack_require__(94); | |
| 763 | +var max = Math.max; | |
| 764 | +var min = Math.min; | |
| 765 | +var floor = Math.floor; | |
| 766 | +var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g; | |
| 767 | +var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g; | |
| 3478 | 768 | |
| 3479 | -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 3480 | -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 3481 | -var regeneratorAsync = __webpack_require__(/*! ./regeneratorAsync.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js"); | |
| 3482 | -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 3483 | -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 3484 | -var regeneratorKeys = __webpack_require__(/*! ./regeneratorKeys.js */ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js"); | |
| 3485 | -var regeneratorValues = __webpack_require__(/*! ./regeneratorValues.js */ "../node_modules/@babel/runtime/helpers/regeneratorValues.js"); | |
| 3486 | -function _regeneratorRuntime() { | |
| 3487 | - "use strict"; | |
| 769 | +var maybeToString = function (it) { | |
| 770 | + return it === undefined ? it : String(it); | |
| 771 | +}; | |
| 3488 | 772 | |
| 3489 | - var r = regenerator(), | |
| 3490 | - e = r.m(_regeneratorRuntime), | |
| 3491 | - t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 3492 | - function n(r) { | |
| 3493 | - var e = "function" == typeof r && r.constructor; | |
| 3494 | - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 3495 | - } | |
| 3496 | - var o = { | |
| 3497 | - "throw": 1, | |
| 3498 | - "return": 2, | |
| 3499 | - "break": 3, | |
| 3500 | - "continue": 3 | |
| 3501 | - }; | |
| 3502 | - function a(r) { | |
| 3503 | - var e, t; | |
| 3504 | - return function (n) { | |
| 3505 | - e || (e = { | |
| 3506 | - stop: function stop() { | |
| 3507 | - return t(n.a, 2); | |
| 3508 | - }, | |
| 3509 | - "catch": function _catch() { | |
| 3510 | - return n.v; | |
| 3511 | - }, | |
| 3512 | - abrupt: function abrupt(r, e) { | |
| 3513 | - return t(n.a, o[r], e); | |
| 3514 | - }, | |
| 3515 | - delegateYield: function delegateYield(r, o, a) { | |
| 3516 | - return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 3517 | - }, | |
| 3518 | - finish: function finish(r) { | |
| 3519 | - return t(n.f, r); | |
| 773 | +// @@replace logic | |
| 774 | +__webpack_require__(95)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) { | |
| 775 | + return [ | |
| 776 | + // `String.prototype.replace` method | |
| 777 | + // https://tc39.github.io/ecma262/#sec-string.prototype.replace | |
| 778 | + function replace(searchValue, replaceValue) { | |
| 779 | + var O = defined(this); | |
| 780 | + var fn = searchValue == undefined ? undefined : searchValue[REPLACE]; | |
| 781 | + return fn !== undefined | |
| 782 | + ? fn.call(searchValue, O, replaceValue) | |
| 783 | + : $replace.call(String(O), searchValue, replaceValue); | |
| 784 | + }, | |
| 785 | + // `RegExp.prototype[@@replace]` method | |
| 786 | + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace | |
| 787 | + function (regexp, replaceValue) { | |
| 788 | + var res = maybeCallNative($replace, regexp, this, replaceValue); | |
| 789 | + if (res.done) return res.value; | |
| 790 | + | |
| 791 | + var rx = anObject(regexp); | |
| 792 | + var S = String(this); | |
| 793 | + var functionalReplace = typeof replaceValue === 'function'; | |
| 794 | + if (!functionalReplace) replaceValue = String(replaceValue); | |
| 795 | + var global = rx.global; | |
| 796 | + if (global) { | |
| 797 | + var fullUnicode = rx.unicode; | |
| 798 | + rx.lastIndex = 0; | |
| 799 | + } | |
| 800 | + var results = []; | |
| 801 | + while (true) { | |
| 802 | + var result = regExpExec(rx, S); | |
| 803 | + if (result === null) break; | |
| 804 | + results.push(result); | |
| 805 | + if (!global) break; | |
| 806 | + var matchStr = String(result[0]); | |
| 807 | + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); | |
| 808 | + } | |
| 809 | + var accumulatedResult = ''; | |
| 810 | + var nextSourcePosition = 0; | |
| 811 | + for (var i = 0; i < results.length; i++) { | |
| 812 | + result = results[i]; | |
| 813 | + var matched = String(result[0]); | |
| 814 | + var position = max(min(toInteger(result.index), S.length), 0); | |
| 815 | + var captures = []; | |
| 816 | + // NOTE: This is equivalent to | |
| 817 | + // captures = result.slice(1).map(maybeToString) | |
| 818 | + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in | |
| 819 | + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and | |
| 820 | + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. | |
| 821 | + for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j])); | |
| 822 | + var namedCaptures = result.groups; | |
| 823 | + if (functionalReplace) { | |
| 824 | + var replacerArgs = [matched].concat(captures, position, S); | |
| 825 | + if (namedCaptures !== undefined) replacerArgs.push(namedCaptures); | |
| 826 | + var replacement = String(replaceValue.apply(undefined, replacerArgs)); | |
| 827 | + } else { | |
| 828 | + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); | |
| 3520 | 829 | } |
| 3521 | - }, t = function t(r, _t, o) { | |
| 3522 | - n.p = e.prev, n.n = e.next; | |
| 3523 | - try { | |
| 3524 | - return r(_t, o); | |
| 3525 | - } finally { | |
| 3526 | - e.next = n.n; | |
| 830 | + if (position >= nextSourcePosition) { | |
| 831 | + accumulatedResult += S.slice(nextSourcePosition, position) + replacement; | |
| 832 | + nextSourcePosition = position + matched.length; | |
| 3527 | 833 | } |
| 3528 | - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 3529 | - try { | |
| 3530 | - return r.call(this, e); | |
| 3531 | - } finally { | |
| 3532 | - n.p = e.prev, n.n = e.next; | |
| 3533 | 834 | } |
| 3534 | - }; | |
| 3535 | - } | |
| 3536 | - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 3537 | - return { | |
| 3538 | - wrap: function wrap(e, t, n, o) { | |
| 3539 | - return r.w(a(e), t, n, o && o.reverse()); | |
| 3540 | - }, | |
| 3541 | - isGeneratorFunction: n, | |
| 3542 | - mark: r.m, | |
| 3543 | - awrap: function awrap(r, e) { | |
| 3544 | - return new OverloadYield(r, e); | |
| 3545 | - }, | |
| 3546 | - AsyncIterator: regeneratorAsyncIterator, | |
| 3547 | - async: function async(r, e, t, o, u) { | |
| 3548 | - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 3549 | - }, | |
| 3550 | - keys: regeneratorKeys, | |
| 3551 | - values: regeneratorValues | |
| 3552 | - }; | |
| 3553 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 3554 | -} | |
| 3555 | -module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 835 | + return accumulatedResult + S.slice(nextSourcePosition); | |
| 836 | + } | |
| 837 | + ]; | |
| 3556 | 838 | |
| 3557 | -/***/ }), | |
| 3558 | - | |
| 3559 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorValues.js": | |
| 3560 | -/*!*******************************************************************!*\ | |
| 3561 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorValues.js ***! | |
| 3562 | - \*******************************************************************/ | |
| 3563 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3564 | - | |
| 3565 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3566 | -function _regeneratorValues(e) { | |
| 3567 | - if (null != e) { | |
| 3568 | - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], | |
| 3569 | - r = 0; | |
| 3570 | - if (t) return t.call(e); | |
| 3571 | - if ("function" == typeof e.next) return e; | |
| 3572 | - if (!isNaN(e.length)) return { | |
| 3573 | - next: function next() { | |
| 3574 | - return e && r >= e.length && (e = void 0), { | |
| 3575 | - value: e && e[r++], | |
| 3576 | - done: !e | |
| 3577 | - }; | |
| 839 | + // https://tc39.github.io/ecma262/#sec-getsubstitution | |
| 840 | + function getSubstitution(matched, str, position, captures, namedCaptures, replacement) { | |
| 841 | + var tailPos = position + matched.length; | |
| 842 | + var m = captures.length; | |
| 843 | + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; | |
| 844 | + if (namedCaptures !== undefined) { | |
| 845 | + namedCaptures = toObject(namedCaptures); | |
| 846 | + symbols = SUBSTITUTION_SYMBOLS; | |
| 847 | + } | |
| 848 | + return $replace.call(replacement, symbols, function (match, ch) { | |
| 849 | + var capture; | |
| 850 | + switch (ch.charAt(0)) { | |
| 851 | + case '$': return '$'; | |
| 852 | + case '&': return matched; | |
| 853 | + case '`': return str.slice(0, position); | |
| 854 | + case "'": return str.slice(tailPos); | |
| 855 | + case '<': | |
| 856 | + capture = namedCaptures[ch.slice(1, -1)]; | |
| 857 | + break; | |
| 858 | + default: // \d\d? | |
| 859 | + var n = +ch; | |
| 860 | + if (n === 0) return match; | |
| 861 | + if (n > m) { | |
| 862 | + var f = floor(n / 10); | |
| 863 | + if (f === 0) return match; | |
| 864 | + if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1); | |
| 865 | + return match; | |
| 866 | + } | |
| 867 | + capture = captures[n - 1]; | |
| 3578 | 868 | } |
| 3579 | - }; | |
| 869 | + return capture === undefined ? '' : capture; | |
| 870 | + }); | |
| 3580 | 871 | } |
| 3581 | - throw new TypeError(_typeof(e) + " is not iterable"); | |
| 3582 | -} | |
| 3583 | -module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 872 | +}); | |
| 3584 | 873 | |
| 3585 | -/***/ }), | |
| 3586 | 874 | |
| 3587 | -/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 3588 | -/*!****************************************************************!*\ | |
| 3589 | - !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 3590 | - \****************************************************************/ | |
| 3591 | -/***/ ((module) => { | |
| 3592 | - | |
| 3593 | -function _setPrototypeOf(t, e) { | |
| 3594 | - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 3595 | - return t.__proto__ = e, t; | |
| 3596 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 3597 | -} | |
| 3598 | -module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3599 | - | |
| 3600 | 875 | /***/ }), |
| 3601 | 876 | |
| 3602 | -/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 3603 | -/*!***************************************************************!*\ | |
| 3604 | - !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 3605 | - \***************************************************************/ | |
| 3606 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 877 | +/***/ 61: | |
| 878 | +/***/ (function(module, exports) { | |
| 3607 | 879 | |
| 3608 | -var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 3609 | -var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 3610 | -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 3611 | -var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 3612 | -function _slicedToArray(r, e) { | |
| 3613 | - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 3614 | -} | |
| 3615 | -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 880 | +var hasOwnProperty = {}.hasOwnProperty; | |
| 881 | +module.exports = function (it, key) { | |
| 882 | + return hasOwnProperty.call(it, key); | |
| 883 | +}; | |
| 3616 | 884 | |
| 3617 | -/***/ }), | |
| 3618 | 885 | |
| 3619 | -/***/ "../node_modules/@babel/runtime/helpers/superPropBase.js": | |
| 3620 | -/*!***************************************************************!*\ | |
| 3621 | - !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***! | |
| 3622 | - \***************************************************************/ | |
| 3623 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3624 | - | |
| 3625 | -var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); | |
| 3626 | -function _superPropBase(t, o) { | |
| 3627 | - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); | |
| 3628 | - return t; | |
| 3629 | -} | |
| 3630 | -module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3631 | - | |
| 3632 | 886 | /***/ }), |
| 3633 | 887 | |
| 3634 | -/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 3635 | -/*!*************************************************************!*\ | |
| 3636 | - !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 3637 | - \*************************************************************/ | |
| 3638 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 888 | +/***/ 66: | |
| 889 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3639 | 890 | |
| 3640 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3641 | -function toPrimitive(t, r) { | |
| 3642 | - if ("object" != _typeof(t) || !t) return t; | |
| 3643 | - var e = t[Symbol.toPrimitive]; | |
| 3644 | - if (void 0 !== e) { | |
| 3645 | - var i = e.call(t, r || "default"); | |
| 3646 | - if ("object" != _typeof(i)) return i; | |
| 3647 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 3648 | - } | |
| 3649 | - return ("string" === r ? String : Number)(t); | |
| 3650 | -} | |
| 3651 | -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 891 | +var core = __webpack_require__(55); | |
| 892 | +var global = __webpack_require__(17); | |
| 893 | +var SHARED = '__core-js_shared__'; | |
| 894 | +var store = global[SHARED] || (global[SHARED] = {}); | |
| 3652 | 895 | |
| 3653 | -/***/ }), | |
| 896 | +(module.exports = function (key, value) { | |
| 897 | + return store[key] || (store[key] = value !== undefined ? value : {}); | |
| 898 | +})('versions', []).push({ | |
| 899 | + version: core.version, | |
| 900 | + mode: __webpack_require__(110) ? 'pure' : 'global', | |
| 901 | + copyright: '© 2019 Denis Pushkarev (zloirock.ru)' | |
| 902 | +}); | |
| 3654 | 903 | |
| 3655 | -/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 3656 | -/*!***************************************************************!*\ | |
| 3657 | - !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 3658 | - \***************************************************************/ | |
| 3659 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3660 | 904 | |
| 3661 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3662 | -var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 3663 | -function toPropertyKey(t) { | |
| 3664 | - var i = toPrimitive(t, "string"); | |
| 3665 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 3666 | -} | |
| 3667 | -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3668 | - | |
| 3669 | 905 | /***/ }), |
| 3670 | 906 | |
| 3671 | -/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 3672 | -/*!********************************************************!*\ | |
| 3673 | - !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 3674 | - \********************************************************/ | |
| 3675 | -/***/ ((module) => { | |
| 907 | +/***/ 67: | |
| 908 | +/***/ (function(module, exports) { | |
| 3676 | 909 | |
| 3677 | -function _typeof(o) { | |
| 3678 | - "@babel/helpers - typeof"; | |
| 910 | +var id = 0; | |
| 911 | +var px = Math.random(); | |
| 912 | +module.exports = function (key) { | |
| 913 | + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); | |
| 914 | +}; | |
| 3679 | 915 | |
| 3680 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 3681 | - return typeof o; | |
| 3682 | - } : function (o) { | |
| 3683 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 3684 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 3685 | -} | |
| 3686 | -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3687 | 916 | |
| 3688 | 917 | /***/ }), |
| 3689 | 918 | |
| 3690 | -/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 3691 | -/*!****************************************************************************!*\ | |
| 3692 | - !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 3693 | - \****************************************************************************/ | |
| 3694 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 919 | +/***/ 708: | |
| 920 | +/***/ (function(module, exports, __webpack_require__) { | |
| 3695 | 921 | |
| 3696 | -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 3697 | -function _unsupportedIterableToArray(r, a) { | |
| 3698 | - if (r) { | |
| 3699 | - if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 3700 | - var t = {}.toString.call(r).slice(8, -1); | |
| 3701 | - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0; | |
| 3702 | - } | |
| 3703 | -} | |
| 3704 | -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 922 | +"use strict"; | |
| 3705 | 923 | |
| 3706 | -/***/ }), | |
| 3707 | 924 | |
| 3708 | -/***/ "../node_modules/@babel/runtime/regenerator/index.js": | |
| 3709 | -/*!***********************************************************!*\ | |
| 3710 | - !*** ../node_modules/@babel/runtime/regenerator/index.js ***! | |
| 3711 | - \***********************************************************/ | |
| 3712 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 925 | +__webpack_require__(58); | |
| 3713 | 926 | |
| 3714 | -// TODO(Babel 8): Remove this file. | |
| 927 | +__webpack_require__(334); | |
| 3715 | 928 | |
| 3716 | -var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); | |
| 3717 | -module.exports = runtime; | |
| 929 | +__webpack_require__(80); | |
| 3718 | 930 | |
| 3719 | -// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= | |
| 3720 | -try { | |
| 3721 | - regeneratorRuntime = runtime; | |
| 3722 | -} catch (accidentalStrictMode) { | |
| 3723 | - if (typeof globalThis === "object") { | |
| 3724 | - globalThis.regeneratorRuntime = runtime; | |
| 3725 | - } else { | |
| 3726 | - Function("r", "regeneratorRuntime = r")(runtime); | |
| 3727 | - } | |
| 3728 | -} | |
| 931 | +__webpack_require__(26); | |
| 3729 | 932 | |
| 3730 | - | |
| 3731 | -/***/ }), | |
| 3732 | - | |
| 3733 | -/***/ "@wordpress/i18n": | |
| 3734 | -/*!**************************!*\ | |
| 3735 | - !*** external "wp.i18n" ***! | |
| 3736 | - \**************************/ | |
| 3737 | -/***/ ((module) => { | |
| 3738 | - | |
| 3739 | -"use strict"; | |
| 3740 | -module.exports = wp.i18n; | |
| 3741 | - | |
| 3742 | -/***/ }) | |
| 3743 | - | |
| 3744 | -/******/ }); | |
| 3745 | -/************************************************************************/ | |
| 3746 | -/******/ // The module cache | |
| 3747 | -/******/ var __webpack_module_cache__ = {}; | |
| 3748 | -/******/ | |
| 3749 | -/******/ // The require function | |
| 3750 | -/******/ function __webpack_require__(moduleId) { | |
| 3751 | -/******/ // Check if module is in cache | |
| 3752 | -/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 3753 | -/******/ if (cachedModule !== undefined) { | |
| 3754 | -/******/ return cachedModule.exports; | |
| 3755 | -/******/ } | |
| 3756 | -/******/ // Create a new module (and put it into the cache) | |
| 3757 | -/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 3758 | -/******/ // no module.id needed | |
| 3759 | -/******/ // no module.loaded needed | |
| 3760 | -/******/ exports: {} | |
| 3761 | -/******/ }; | |
| 3762 | -/******/ | |
| 3763 | -/******/ // Execute the module function | |
| 3764 | -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 3765 | -/******/ | |
| 3766 | -/******/ // Return the exports of the module | |
| 3767 | -/******/ return module.exports; | |
| 3768 | -/******/ } | |
| 3769 | -/******/ | |
| 3770 | -/************************************************************************/ | |
| 3771 | -var __webpack_exports__ = {}; | |
| 3772 | -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 3773 | -(() => { | |
| 3774 | -"use strict"; | |
| 3775 | -/*!***************************************!*\ | |
| 3776 | - !*** ../assets/dev/js/admin/admin.js ***! | |
| 3777 | - \***************************************/ | |
| 3778 | -/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 3779 | - | |
| 3780 | - | |
| 3781 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 3782 | -var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 3783 | -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 3784 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 3785 | -var _module = _interopRequireDefault(__webpack_require__(/*! elementor/modules/landing-pages/assets/js/admin/module */ "../modules/landing-pages/assets/js/admin/module.js")); | |
| 3786 | -var _module2 = _interopRequireDefault(__webpack_require__(/*! elementor/core/experiments/assets/js/admin/module */ "../core/experiments/assets/js/admin/module.js")); | |
| 3787 | -var _environment = _interopRequireDefault(__webpack_require__(/*! ../../../../core/common/assets/js/utils/environment */ "../core/common/assets/js/utils/environment.js")); | |
| 3788 | -var _events = _interopRequireDefault(__webpack_require__(/*! elementor-utils/events */ "../assets/dev/js/utils/events.js")); | |
| 3789 | -var _filesUploadHandler = _interopRequireDefault(__webpack_require__(/*! ../editor/utils/files-upload-handler */ "../assets/dev/js/editor/utils/files-upload-handler.js")); | |
| 3790 | -var _templateControls = _interopRequireDefault(__webpack_require__(/*! ./new-template/template-controls.js */ "../assets/dev/js/admin/new-template/template-controls.js")); | |
| 3791 | -var _jsonUploadWarningMessage = __webpack_require__(/*! elementor-utils/json-upload-warning-message */ "../assets/dev/js/utils/json-upload-warning-message.js"); | |
| 3792 | -var _module3 = _interopRequireDefault(__webpack_require__(/*! elementor/modules/floating-buttons/assets/js/floating-buttons/admin/module */ "../modules/floating-buttons/assets/js/floating-buttons/admin/module.js")); | |
| 3793 | -__webpack_require__(/*! elementor-app/event-track/wp-dashboard-tracking */ "../app/assets/js/event-track/wp-dashboard-tracking.js"); | |
| 3794 | 933 | (function ($) { |
| 3795 | 934 | var ElementorAdmin = elementorModules.ViewModule.extend({ |
| 3796 | 935 | maintenanceMode: null, |
| 3797 | 936 | config: elementorAdminConfig, |
| @@ -3803,15 +942,12 @@ | ||
| 3803 | 942 | $switchModeButton: $('#elementor-switch-mode-button'), |
| 3804 | 943 | $elementorLoader: $('.elementor-loader'), |
| 3805 | 944 | $builderEditor: $('#elementor-editor'), |
| 3806 | 945 | $importButton: $('#elementor-import-template-trigger'), |
| 3807 | - $importNowButton: $('#e-import-template-action'), | |
| 3808 | 946 | $importArea: $('#elementor-import-template-area'), |
| 3809 | - $importForm: $('#elementor-import-template-form'), | |
| 3810 | - $importFormFileInput: $('#elementor-import-template-form input[type="file"]'), | |
| 3811 | 947 | $settingsForm: $('#elementor-settings-form'), |
| 3812 | 948 | $settingsTabsWrapper: $('#elementor-settings-tabs-wrapper'), |
| 3813 | - $menuGoProLink: $('a[href="admin.php?page=go_elementor_pro"]'), | |
| 949 | + $menuGetHelpLink: $('a[href="admin.php?page=go_knowledge_base_site"]'), | |
| 3814 | 950 | $reMigrateGlobalsButton: $('.elementor-re-migrate-globals-button') |
| 3815 | 951 | }; |
| 3816 | 952 | elements.$settingsFormPages = elements.$settingsForm.find('.elementor-settings-form-page'); |
| 3817 | 953 | elements.$activeSettingsPage = elements.$settingsFormPages.filter('.elementor-active'); |
| @@ -3826,15 +962,16 @@ | ||
| 3826 | 962 | bindEvents: function bindEvents() { |
| 3827 | 963 | var self = this; |
| 3828 | 964 | self.elements.$switchModeButton.on('click', function (event) { |
| 3829 | 965 | event.preventDefault(); |
| 966 | + | |
| 3830 | 967 | if (self.isElementorMode()) { |
| 3831 | 968 | elementorCommon.dialogsManager.createWidget('confirm', { |
| 3832 | - message: __('Please note that you are switching to WordPress default editor. Your current layout, design and content might break.', 'elementor'), | |
| 3833 | - headerMessage: __('Back to WordPress Editor', 'elementor'), | |
| 969 | + message: self.translate('back_to_wordpress_editor_message'), | |
| 970 | + headerMessage: self.translate('back_to_wordpress_editor_header'), | |
| 3834 | 971 | strings: { |
| 3835 | - confirm: __('Continue', 'elementor'), | |
| 3836 | - cancel: __('Cancel', 'elementor') | |
| 972 | + confirm: self.translate('yes'), | |
| 973 | + cancel: self.translate('cancel') | |
| 3837 | 974 | }, |
| 3838 | 975 | defaultOption: 'confirm', |
| 3839 | 976 | onConfirm: function onConfirm() { |
| 3840 | 977 | self.elements.$switchModeInput.val(''); |
| @@ -3843,14 +980,17 @@ | ||
| 3843 | 980 | }).show(); |
| 3844 | 981 | } else { |
| 3845 | 982 | self.elements.$switchModeInput.val(true); |
| 3846 | 983 | var $wpTitle = $('#title'); |
| 984 | + | |
| 3847 | 985 | if (!$wpTitle.val()) { |
| 3848 | 986 | $wpTitle.val('Elementor #' + $('#post_ID').val()); |
| 3849 | 987 | } |
| 988 | + | |
| 3850 | 989 | if (wp.autosave) { |
| 3851 | 990 | wp.autosave.server.triggerSave(); |
| 3852 | 991 | } |
| 992 | + | |
| 3853 | 993 | self.animateLoader(); |
| 3854 | 994 | $(document).on('heartbeat-tick.autosave', function () { |
| 3855 | 995 | elementorCommon.elements.$window.off('beforeunload.edit-post'); |
| 3856 | 996 | location.href = self.elements.$goToEditLink.attr('href'); |
| @@ -3860,16 +1000,15 @@ | ||
| 3860 | 1000 | }); |
| 3861 | 1001 | self.elements.$goToEditLink.on('click', function () { |
| 3862 | 1002 | self.animateLoader(); |
| 3863 | 1003 | }); |
| 3864 | - $('.e-notice--dismissible').on('click', '.e-notice__dismiss, .e-notice-dismiss', function (event) { | |
| 1004 | + $('div.notice.elementor-message-dismissed').on('click', 'button.notice-dismiss, .elementor-button-notice-dismiss', function (event) { | |
| 3865 | 1005 | event.preventDefault(); |
| 3866 | - var $wrapperElm = $(this).closest('.e-notice--dismissible'); | |
| 3867 | 1006 | $.post(ajaxurl, { |
| 3868 | 1007 | action: 'elementor_set_admin_notice_viewed', |
| 3869 | - notice_id: $wrapperElm.data('notice_id'), | |
| 3870 | - _wpnonce: $wrapperElm.data('nonce') | |
| 1008 | + notice_id: $(this).closest('.elementor-message-dismissed').data('notice_id') | |
| 3871 | 1009 | }); |
| 1010 | + var $wrapperElm = $(this).closest('.elementor-message-dismissed'); | |
| 3872 | 1011 | $wrapperElm.fadeTo(100, 0, function () { |
| 3873 | 1012 | $wrapperElm.slideUp(100, function () { |
| 3874 | 1013 | $wrapperElm.remove(); |
| 3875 | 1014 | }); |
| @@ -3874,34 +1013,8 @@ | ||
| 3874 | 1013 | $wrapperElm.remove(); |
| 3875 | 1014 | }); |
| 3876 | 1015 | }); |
| 3877 | 1016 | }); |
| 3878 | - var campaignNotices = { | |
| 3879 | - plugin_image_optimization: 'elementor_image_optimization_campaign', | |
| 3880 | - site_mailer_promotion: 'elementor_core_site_mailer_campaign' | |
| 3881 | - }; | |
| 3882 | - Object.keys(campaignNotices).forEach(function (noticeId) { | |
| 3883 | - $(".e-notice--cta.e-notice--dismissible[data-notice_id=\"".concat(noticeId, "\"] a.e-button--cta")).on('click', function () { | |
| 3884 | - var $button = $(this); | |
| 3885 | - elementorCommon.ajax.addRequest(campaignNotices[noticeId], { | |
| 3886 | - data: { | |
| 3887 | - campaign: ($button === null || $button === void 0 ? void 0 : $button.data('campaign')) || '', | |
| 3888 | - source: ($button === null || $button === void 0 ? void 0 : $button.data('source')) || '', | |
| 3889 | - medium: ($button === null || $button === void 0 ? void 0 : $button.data('medium')) || '' | |
| 3890 | - } | |
| 3891 | - }); | |
| 3892 | - }); | |
| 3893 | - }); | |
| 3894 | - $('.e-a-apps .e-a-item[data-plugin="image-optimization/image-optimization.php"] a.e-btn').on('click', function () { | |
| 3895 | - var $button = $(this); | |
| 3896 | - elementorCommon.ajax.addRequest('elementor_image_optimization_campaign', { | |
| 3897 | - data: { | |
| 3898 | - campaign: ($button === null || $button === void 0 ? void 0 : $button.data('campaign')) || '', | |
| 3899 | - source: ($button === null || $button === void 0 ? void 0 : $button.data('source')) || '', | |
| 3900 | - medium: ($button === null || $button === void 0 ? void 0 : $button.data('medium')) || '' | |
| 3901 | - } | |
| 3902 | - }); | |
| 3903 | - }); | |
| 3904 | 1017 | $('#elementor-clear-cache-button').on('click', function (event) { |
| 3905 | 1018 | event.preventDefault(); |
| 3906 | 1019 | var $thisButton = $(this); |
| 3907 | 1020 | $thisButton.removeClass('success').addClass('loading'); |
| @@ -3922,32 +1035,14 @@ | ||
| 3922 | 1035 | }).done(function () { |
| 3923 | 1036 | $thisButton.removeClass('loading').addClass('success'); |
| 3924 | 1037 | }); |
| 3925 | 1038 | }); |
| 3926 | - $('#elementor-recreate-kit-button').on('click', function (event) { | |
| 3927 | - event.preventDefault(); | |
| 3928 | - var $thisButton = $(this); | |
| 3929 | - $thisButton.removeClass('success error').addClass('loading').next('.e-recreate-kit-error-message').remove(); | |
| 3930 | - $.post(ajaxurl, { | |
| 3931 | - action: 'elementor_recreate_kit', | |
| 3932 | - _nonce: $thisButton.data('nonce') | |
| 3933 | - }).done(function () { | |
| 3934 | - $thisButton.removeClass('loading').addClass('success'); | |
| 3935 | - }).fail(function (_ref) { | |
| 3936 | - var _responseJSON$data; | |
| 3937 | - var responseJSON = _ref.responseJSON; | |
| 3938 | - $thisButton.removeClass('loading').addClass('error'); | |
| 3939 | - if ((_responseJSON$data = responseJSON.data) !== null && _responseJSON$data !== void 0 && _responseJSON$data.message) { | |
| 3940 | - $thisButton.after("<div class=\"e-recreate-kit-error-message\">".concat(responseJSON.data.message, "</div>")); | |
| 3941 | - } | |
| 3942 | - }); | |
| 3943 | - }); | |
| 3944 | 1039 | $('#elementor-replace-url-button').on('click', function (event) { |
| 3945 | 1040 | event.preventDefault(); |
| 3946 | 1041 | var $this = $(this), |
| 3947 | - $tr = $this.parents('tr'), | |
| 3948 | - $from = $tr.find('[name="from"]'), | |
| 3949 | - $to = $tr.find('[name="to"]'); | |
| 1042 | + $tr = $this.parents('tr'), | |
| 1043 | + $from = $tr.find('[name="from"]'), | |
| 1044 | + $to = $tr.find('[name="to"]'); | |
| 3950 | 1045 | $this.removeClass('success').addClass('loading'); |
| 3951 | 1046 | $.post(ajaxurl, { |
| 3952 | 1047 | action: 'elementor_replace_url', |
| 3953 | 1048 | from: $from.val(), |
| @@ -3954,11 +1049,13 @@ | ||
| 3954 | 1049 | to: $to.val(), |
| 3955 | 1050 | _nonce: $this.data('nonce') |
| 3956 | 1051 | }).done(function (response) { |
| 3957 | 1052 | $this.removeClass('loading'); |
| 1053 | + | |
| 3958 | 1054 | if (response.success) { |
| 3959 | 1055 | $this.addClass('success'); |
| 3960 | 1056 | } |
| 1057 | + | |
| 3961 | 1058 | elementorCommon.dialogsManager.createWidget('alert', { |
| 3962 | 1059 | message: response.data |
| 3963 | 1060 | }).show(); |
| 3964 | 1061 | }); |
| @@ -3968,33 +1065,27 @@ | ||
| 3968 | 1065 | var $updateButton = $(this); |
| 3969 | 1066 | $updateButton.addClass('loading'); |
| 3970 | 1067 | elementorCommon.dialogsManager.createWidget('confirm', { |
| 3971 | 1068 | id: 'confirm_fa_migration_admin_modal', |
| 3972 | - message: __('I understand that by upgrading to Font Awesome 5,', 'elementor') + '<br>' + __('I acknowledge that some changes may affect my website and that this action cannot be undone.', 'elementor'), | |
| 3973 | - headerMessage: __('Font Awesome 5 Migration', 'elementor'), | |
| 1069 | + message: self.translate('confirm_fa_migration_admin_modal_body'), | |
| 1070 | + headerMessage: self.translate('confirm_fa_migration_admin_modal_head'), | |
| 3974 | 1071 | strings: { |
| 3975 | - confirm: __('Continue', 'elementor'), | |
| 3976 | - cancel: __('Cancel', 'elementor') | |
| 1072 | + confirm: self.translate('yes'), | |
| 1073 | + cancel: self.translate('cancel') | |
| 3977 | 1074 | }, |
| 3978 | 1075 | defaultOption: 'confirm', |
| 3979 | 1076 | onConfirm: function onConfirm() { |
| 3980 | 1077 | $updateButton.removeClass('error').addClass('loading'); |
| 3981 | - var _$updateButton$data = $updateButton.data(), | |
| 3982 | - _nonce = _$updateButton$data._nonce, | |
| 3983 | - action = _$updateButton$data.action, | |
| 3984 | - redirectUrl = _$updateButton$data.redirectUrl; | |
| 3985 | - $.post(ajaxurl, { | |
| 3986 | - action: action, | |
| 3987 | - _nonce: _nonce | |
| 3988 | - }).done(function (response) { | |
| 1078 | + $.post(ajaxurl, $updateButton.data()).done(function (response) { | |
| 3989 | 1079 | $updateButton.removeClass('loading').addClass('success'); |
| 3990 | - var messageElement = document.createElement('p'); | |
| 3991 | - messageElement.appendChild(document.createTextNode(response.data.message)); | |
| 3992 | - $('#elementor_upgrade_fa_button').parent().append(messageElement); | |
| 3993 | - if (redirectUrl) { | |
| 3994 | - location.href = decodeURIComponent(redirectUrl); | |
| 1080 | + $('#elementor_upgrade_fa_button').parent().append(response.data.message); | |
| 1081 | + var redirectTo = (location.search.split('redirect_to=')[1] || '').split('&')[0]; | |
| 1082 | + | |
| 1083 | + if (redirectTo) { | |
| 1084 | + location.href = decodeURIComponent(redirectTo); | |
| 3995 | 1085 | return; |
| 3996 | 1086 | } |
| 1087 | + | |
| 3997 | 1088 | history.go(-1); |
| 3998 | 1089 | }).fail(function () { |
| 3999 | 1090 | $updateButton.removeClass('loading').addClass('error'); |
| 4000 | 1091 | }); |
| @@ -4017,27 +1108,27 @@ | ||
| 4017 | 1108 | } |
| 4018 | 1109 | }); |
| 4019 | 1110 | $('select.elementor-rollback-select').on('change', function () { |
| 4020 | 1111 | var $this = $(this), |
| 4021 | - $rollbackButton = $this.next('.elementor-rollback-button'), | |
| 4022 | - placeholderText = $rollbackButton.data('placeholder-text'), | |
| 4023 | - placeholderUrl = $rollbackButton.data('placeholder-url'); | |
| 1112 | + $rollbackButton = $this.next('.elementor-rollback-button'), | |
| 1113 | + placeholderText = $rollbackButton.data('placeholder-text'), | |
| 1114 | + placeholderUrl = $rollbackButton.data('placeholder-url'); | |
| 4024 | 1115 | $rollbackButton.html(placeholderText.replace('{VERSION}', $this.val())); |
| 4025 | - $rollbackButton.data('href', placeholderUrl.replace('VERSION', $this.val())); | |
| 1116 | + $rollbackButton.attr('href', placeholderUrl.replace('VERSION', $this.val())); | |
| 4026 | 1117 | }).trigger('change'); |
| 4027 | 1118 | $('.elementor-rollback-button').on('click', function (event) { |
| 4028 | 1119 | event.preventDefault(); |
| 4029 | 1120 | var $this = $(this); |
| 4030 | 1121 | elementorCommon.dialogsManager.createWidget('confirm', { |
| 4031 | - headerMessage: __('Rollback to Previous Version', 'elementor'), | |
| 4032 | - message: __('Are you sure you want to reinstall previous version?', 'elementor'), | |
| 1122 | + headerMessage: self.translate('rollback_to_previous_version'), | |
| 1123 | + message: self.translate('rollback_confirm'), | |
| 4033 | 1124 | strings: { |
| 4034 | - confirm: __('Continue', 'elementor'), | |
| 4035 | - cancel: __('Cancel', 'elementor') | |
| 1125 | + confirm: self.translate('yes'), | |
| 1126 | + cancel: self.translate('cancel') | |
| 4036 | 1127 | }, |
| 4037 | 1128 | onConfirm: function onConfirm() { |
| 4038 | 1129 | $this.addClass('loading'); |
| 4039 | - location.href = $this.data('href'); | |
| 1130 | + location.href = $this.attr('href'); | |
| 4040 | 1131 | } |
| 4041 | 1132 | }).show(); |
| 4042 | 1133 | }); |
| 4043 | 1134 | self.elements.$reMigrateGlobalsButton.on('click', function (event) { |
| @@ -4043,13 +1134,13 @@ | ||
| 4043 | 1134 | self.elements.$reMigrateGlobalsButton.on('click', function (event) { |
| 4044 | 1135 | event.preventDefault(); |
| 4045 | 1136 | var $this = $(event.currentTarget); |
| 4046 | 1137 | elementorCommon.dialogsManager.createWidget('confirm', { |
| 4047 | - headerMessage: __('Migrate to v3.0', 'elementor'), | |
| 4048 | - message: __('Please note that this process will revert all changes made to Global Colors and Fonts since upgrading to v3.x.', 'elementor'), | |
| 1138 | + headerMessage: self.translate('re_migrate_globals'), | |
| 1139 | + message: self.translate('re_migrate_globals_confirm'), | |
| 4049 | 1140 | strings: { |
| 4050 | - confirm: __('Continue', 'elementor'), | |
| 4051 | - cancel: __('Cancel', 'elementor') | |
| 1141 | + confirm: self.translate('yes'), | |
| 1142 | + cancel: self.translate('cancel') | |
| 4052 | 1143 | }, |
| 4053 | 1144 | onConfirm: function onConfirm() { |
| 4054 | 1145 | $this.removeClass('success').addClass('loading'); |
| 4055 | 1146 | elementorCommon.ajax.addRequest('re_migrate_globals', { |
| @@ -4059,10 +1150,12 @@ | ||
| 4059 | 1150 | }); |
| 4060 | 1151 | } |
| 4061 | 1152 | }).show(); |
| 4062 | 1153 | }); |
| 4063 | - $('.elementor_google_font select').on('change', function () { | |
| 4064 | - $('.elementor_font_display').toggle('1' === $(this).val()); | |
| 1154 | + $('.elementor_css_print_method select').on('change', function () { | |
| 1155 | + var $descriptions = $('.elementor-css-print-method-description'); | |
| 1156 | + $descriptions.hide(); | |
| 1157 | + $descriptions.filter('[data-value="' + $(this).val() + '"]').show(); | |
| 4065 | 1158 | }).trigger('change'); |
| 4066 | 1159 | }, |
| 4067 | 1160 | onInit: function onInit() { |
| 4068 | 1161 | elementorModules.ViewModule.prototype.onInit.apply(this, arguments); |
| @@ -4068,141 +1161,32 @@ | ||
| 4068 | 1161 | elementorModules.ViewModule.prototype.onInit.apply(this, arguments); |
| 4069 | 1162 | this.initTemplatesImport(); |
| 4070 | 1163 | this.initMaintenanceMode(); |
| 4071 | 1164 | this.goToSettingsTabFromHash(); |
| 4072 | - this.openLinksInNewTab(); | |
| 4073 | - this.addUserAgentClasses(); | |
| 1165 | + this.openGetHelpInNewTab(); | |
| 4074 | 1166 | this.roleManager.init(); |
| 4075 | - if (elementorCommon.config.experimentalFeatures['landing-pages']) { | |
| 4076 | - new _module.default(); | |
| 4077 | - } | |
| 4078 | - if (elementorCommon.config.experimentalFeatures.container) { | |
| 4079 | - new _module3.default(); | |
| 4080 | - } | |
| 4081 | - this.templateControls = new _templateControls.default(); | |
| 4082 | - new _module2.default(); | |
| 4083 | 1167 | }, |
| 4084 | - addUserAgentClasses: function addUserAgentClasses() { | |
| 4085 | - var body = document.querySelector('body'); | |
| 4086 | - Object.entries(_environment.default).forEach(function (_ref2) { | |
| 4087 | - var _ref3 = (0, _slicedToArray2.default)(_ref2, 2), | |
| 4088 | - key = _ref3[0], | |
| 4089 | - value = _ref3[1]; | |
| 4090 | - if (!value) { | |
| 4091 | - return; | |
| 4092 | - } | |
| 4093 | - body.classList.add('e--ua-' + key); | |
| 4094 | - }); | |
| 1168 | + openGetHelpInNewTab: function openGetHelpInNewTab() { | |
| 1169 | + this.elements.$menuGetHelpLink.attr('target', '_blank'); | |
| 4095 | 1170 | }, |
| 4096 | - /** | |
| 4097 | - * Open Links in New Tab | |
| 4098 | - * | |
| 4099 | - * Adds a `target="_blank"` attribute to the Admin Dashboard menu items specified in the `elements` array, | |
| 4100 | - * if the elements are found in the DOM. The items in the `elements` array should be jQuery instances. | |
| 4101 | - * | |
| 4102 | - * @since 3.6.0 | |
| 4103 | - */ | |
| 4104 | - openLinksInNewTab: function openLinksInNewTab() { | |
| 4105 | - var elements = [this.elements.$menuGoProLink]; | |
| 4106 | - elements.forEach(function ($element) { | |
| 4107 | - // Only add the attribute if the element is found. | |
| 4108 | - if ($element.length) { | |
| 4109 | - $element.attr('target', '_blank'); | |
| 4110 | - } | |
| 4111 | - }); | |
| 4112 | - }, | |
| 4113 | 1171 | initTemplatesImport: function initTemplatesImport() { |
| 4114 | - var _elementorAdminConfig, _elementorAdminConfig2; | |
| 4115 | - var canImport = elementorAdminConfig.user.is_administrator || ((_elementorAdminConfig = (_elementorAdminConfig2 = elementorAdminConfig.user.restrictions) === null || _elementorAdminConfig2 === void 0 ? void 0 : _elementorAdminConfig2.includes('json-upload')) !== null && _elementorAdminConfig !== void 0 ? _elementorAdminConfig : false); | |
| 4116 | - if (!canImport || !elementorCommon.elements.$body.hasClass('post-type-elementor_library')) { | |
| 1172 | + if (!elementorCommon.elements.$body.hasClass('post-type-elementor_library')) { | |
| 4117 | 1173 | return; |
| 4118 | 1174 | } |
| 4119 | - if (0 === this.elements.$importNowButton.length) { | |
| 4120 | - return; | |
| 4121 | - } | |
| 1175 | + | |
| 4122 | 1176 | var self = this, |
| 4123 | - $importForm = self.elements.$importForm, | |
| 4124 | - $importButton = self.elements.$importButton, | |
| 4125 | - $importArea = self.elements.$importArea, | |
| 4126 | - $importNowButton = self.elements.$importNowButton, | |
| 4127 | - $importFormFileInput = self.elements.$importFormFileInput; | |
| 4128 | - self.elements.$formAnchor = $('.wp-header-end'); | |
| 4129 | - $('#wpbody-content').find('.page-title-action').first().before($importButton); | |
| 1177 | + $importButton = self.elements.$importButton, | |
| 1178 | + $importArea = self.elements.$importArea; | |
| 1179 | + self.elements.$formAnchor = $('h1'); | |
| 1180 | + $('#wpbody-content').find('.page-title-action:last').after($importButton); | |
| 4130 | 1181 | self.elements.$formAnchor.after($importArea); |
| 4131 | 1182 | $importButton.on('click', function () { |
| 4132 | 1183 | $('#elementor-import-template-area').toggle(); |
| 4133 | 1184 | }); |
| 4134 | - var messages = { | |
| 4135 | - jsonUploadWarning: { | |
| 4136 | - shown: false | |
| 4137 | - }, | |
| 4138 | - enableUnfilteredFiles: { | |
| 4139 | - shown: false | |
| 4140 | - } | |
| 4141 | - }; | |
| 4142 | - var originalButtonValue = $importNowButton[0].value; | |
| 4143 | - $importForm.on('submit', /*#__PURE__*/function () { | |
| 4144 | - var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(event) { | |
| 4145 | - var hasImportedFiles, areUnfilteredFilesEnabled, enableUnfilteredFilesModal, _t; | |
| 4146 | - return _regenerator.default.wrap(function (_context) { | |
| 4147 | - while (1) switch (_context.prev = _context.next) { | |
| 4148 | - case 0: | |
| 4149 | - $importNowButton[0].disabled = true; | |
| 4150 | - $importNowButton[0].value = __('Importing...', 'elementor'); | |
| 4151 | - if (messages.jsonUploadWarning.shown) { | |
| 4152 | - _context.next = 5; | |
| 4153 | - break; | |
| 4154 | - } | |
| 4155 | - event.preventDefault(); | |
| 4156 | - _context.prev = 1; | |
| 4157 | - _context.next = 2; | |
| 4158 | - return (0, _jsonUploadWarningMessage.showJsonUploadWarningMessageIfNeeded)({ | |
| 4159 | - IntroductionClass: window.elementorModules.admin.utils.Introduction, | |
| 4160 | - introductionMap: window.elementorAdmin.config.user.introduction, | |
| 4161 | - waitForSetViewed: true | |
| 4162 | - }); | |
| 4163 | - case 2: | |
| 4164 | - messages.jsonUploadWarning.shown = true; | |
| 4165 | - $importForm.trigger('submit'); | |
| 4166 | - _context.next = 4; | |
| 4167 | - break; | |
| 4168 | - case 3: | |
| 4169 | - _context.prev = 3; | |
| 4170 | - _t = _context["catch"](1); | |
| 4171 | - $importNowButton[0].disabled = false; | |
| 4172 | - $importNowButton[0].value = originalButtonValue; | |
| 4173 | - case 4: | |
| 4174 | - return _context.abrupt("return"); | |
| 4175 | - case 5: | |
| 4176 | - hasImportedFiles = $importFormFileInput[0].files.length; | |
| 4177 | - areUnfilteredFilesEnabled = elementorCommon.config.filesUpload.unfilteredFiles; | |
| 4178 | - if (!(hasImportedFiles && !areUnfilteredFilesEnabled && !messages.enableUnfilteredFiles.shown)) { | |
| 4179 | - _context.next = 6; | |
| 4180 | - break; | |
| 4181 | - } | |
| 4182 | - event.preventDefault(); | |
| 4183 | - enableUnfilteredFilesModal = _filesUploadHandler.default.getUnfilteredFilesNotEnabledImportTemplateDialog(function () { | |
| 4184 | - messages.enableUnfilteredFiles.shown = true; | |
| 4185 | - $importForm.trigger('submit'); | |
| 4186 | - }); | |
| 4187 | - enableUnfilteredFilesModal.show(); | |
| 4188 | - return _context.abrupt("return"); | |
| 4189 | - case 6: | |
| 4190 | - messages.jsonUploadWarning.shown = false; | |
| 4191 | - messages.enableUnfilteredFiles.shown = false; | |
| 4192 | - case 7: | |
| 4193 | - case "end": | |
| 4194 | - return _context.stop(); | |
| 4195 | - } | |
| 4196 | - }, _callee, null, [[1, 3]]); | |
| 4197 | - })); | |
| 4198 | - return function (_x) { | |
| 4199 | - return _ref4.apply(this, arguments); | |
| 4200 | - }; | |
| 4201 | - }()); | |
| 4202 | 1185 | }, |
| 4203 | 1186 | initMaintenanceMode: function initMaintenanceMode() { |
| 4204 | - var MaintenanceMode = __webpack_require__(/*! elementor-admin/maintenance-mode */ "../assets/dev/js/admin/maintenance-mode.js"); | |
| 1187 | + var MaintenanceMode = __webpack_require__(709); | |
| 1188 | + | |
| 4205 | 1189 | this.maintenanceMode = new MaintenanceMode(); |
| 4206 | 1190 | }, |
| 4207 | 1191 | isElementorMode: function isElementorMode() { |
| 4208 | 1192 | return !!this.elements.$switchModeInput.val(); |
| @@ -4211,8 +1195,9 @@ | ||
| 4211 | 1195 | this.elements.$goToEditLink.addClass('elementor-animate'); |
| 4212 | 1196 | }, |
| 4213 | 1197 | goToSettingsTabFromHash: function goToSettingsTabFromHash() { |
| 4214 | 1198 | var hash = location.hash.slice(1); |
| 1199 | + | |
| 4215 | 1200 | if (hash) { |
| 4216 | 1201 | this.goToSettingsTab(hash); |
| 4217 | 1202 | } |
| 4218 | 1203 | }, |
| @@ -4217,11 +1202,13 @@ | ||
| 4217 | 1202 | } |
| 4218 | 1203 | }, |
| 4219 | 1204 | goToSettingsTab: function goToSettingsTab(tabName) { |
| 4220 | 1205 | var $pages = this.elements.$settingsFormPages; |
| 1206 | + | |
| 4221 | 1207 | if (!$pages.length) { |
| 4222 | 1208 | return; |
| 4223 | 1209 | } |
| 1210 | + | |
| 4224 | 1211 | var $activePage = $pages.filter('#' + tabName); |
| 4225 | 1212 | this.elements.$activeSettingsPage.removeClass('elementor-active'); |
| 4226 | 1213 | this.elements.$activeSettingsTab.removeClass('nav-tab-active'); |
| 4227 | 1214 | var $activeTab = this.elements.$settingsTabs.filter('#elementor-settings-' + tabName); |
| @@ -4247,33 +1234,37 @@ | ||
| 4247 | 1234 | arrowDown: 'dashicons-arrow-down' |
| 4248 | 1235 | }, |
| 4249 | 1236 | toggle: function toggle($trigger) { |
| 4250 | 1237 | var self = this, |
| 4251 | - $row = $trigger.closest(self.selectors.row), | |
| 4252 | - $toggleHandleIcon = $row.find(self.selectors.toggleHandle).find('.dashicons'), | |
| 4253 | - $controls = $row.find(self.selectors.controlsContainer); | |
| 1238 | + $row = $trigger.closest(self.selectors.row), | |
| 1239 | + $toggleHandleIcon = $row.find(self.selectors.toggleHandle).find('.dashicons'), | |
| 1240 | + $controls = $row.find(self.selectors.controlsContainer); | |
| 4254 | 1241 | $controls.toggleClass('hidden'); |
| 1242 | + | |
| 4255 | 1243 | if ($controls.hasClass('hidden')) { |
| 4256 | 1244 | $toggleHandleIcon.removeClass(self.selectors.arrowUp).addClass(self.selectors.arrowDown); |
| 4257 | 1245 | } else { |
| 4258 | 1246 | $toggleHandleIcon.removeClass(self.selectors.arrowDown).addClass(self.selectors.arrowUp); |
| 4259 | 1247 | } |
| 1248 | + | |
| 4260 | 1249 | self.updateLabel($row); |
| 4261 | 1250 | }, |
| 4262 | 1251 | updateLabel: function updateLabel($row) { |
| 4263 | 1252 | var self = this, |
| 4264 | - $indicator = $row.find(self.selectors.excludedIndicator), | |
| 4265 | - excluded = $row.find(self.selectors.excludedField).is(':checked'); | |
| 1253 | + $indicator = $row.find(self.selectors.excludedIndicator), | |
| 1254 | + excluded = $row.find(self.selectors.excludedField).is(':checked'); | |
| 1255 | + | |
| 4266 | 1256 | if (excluded) { |
| 4267 | 1257 | $indicator.html($indicator.data('excluded-label')); |
| 4268 | 1258 | } else { |
| 4269 | 1259 | $indicator.html(''); |
| 4270 | 1260 | } |
| 1261 | + | |
| 4271 | 1262 | self.setAdvancedState($row, excluded); |
| 4272 | 1263 | }, |
| 4273 | 1264 | setAdvancedState: function setAdvancedState($row, state) { |
| 4274 | 1265 | var self = this, |
| 4275 | - $controls = $row.find('input[type="checkbox"]').not(self.selectors.excludedField); | |
| 1266 | + $controls = $row.find('input[type="checkbox"]').not(self.selectors.excludedField); | |
| 4276 | 1267 | $controls.each(function (index, input) { |
| 4277 | 1268 | $(input).prop('disabled', state); |
| 4278 | 1269 | }); |
| 4279 | 1270 | }, |
| @@ -4288,11 +1279,13 @@ | ||
| 4288 | 1279 | }); |
| 4289 | 1280 | }, |
| 4290 | 1281 | init: function init() { |
| 4291 | 1282 | var self = this; |
| 1283 | + | |
| 4292 | 1284 | if (!$('body[class*="' + self.selectors.body + '"]').length) { |
| 4293 | 1285 | return; |
| 4294 | 1286 | } |
| 1287 | + | |
| 4295 | 1288 | self.bind(); |
| 4296 | 1289 | $(self.selectors.row).each(function (index, row) { |
| 4297 | 1290 | self.updateLabel($(row)); |
| 4298 | 1291 | }); |
| @@ -4300,12 +1293,500 @@ | ||
| 4300 | 1293 | } |
| 4301 | 1294 | }); |
| 4302 | 1295 | $(function () { |
| 4303 | 1296 | window.elementorAdmin = new ElementorAdmin(); |
| 4304 | - _events.default.dispatch(elementorCommon.elements.$window, 'elementor/admin/init'); | |
| 1297 | + elementorCommon.elements.$window.trigger('elementor/admin/init'); | |
| 4305 | 1298 | }); |
| 4306 | 1299 | })(jQuery); |
| 1300 | + | |
| 1301 | +/***/ }), | |
| 1302 | + | |
| 1303 | +/***/ 709: | |
| 1304 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1305 | + | |
| 1306 | +"use strict"; | |
| 1307 | + | |
| 1308 | + | |
| 1309 | +__webpack_require__(26); | |
| 1310 | + | |
| 1311 | +module.exports = elementorModules.ViewModule.extend({ | |
| 1312 | + getDefaultSettings: function getDefaultSettings() { | |
| 1313 | + return { | |
| 1314 | + selectors: { | |
| 1315 | + modeSelect: '.elementor_maintenance_mode_mode select', | |
| 1316 | + maintenanceModeTable: '#tab-maintenance_mode table', | |
| 1317 | + maintenanceModeDescriptions: '.elementor-maintenance-mode-description', | |
| 1318 | + excludeModeSelect: '.elementor_maintenance_mode_exclude_mode select', | |
| 1319 | + excludeRolesArea: '.elementor_maintenance_mode_exclude_roles', | |
| 1320 | + templateSelect: '.elementor_maintenance_mode_template_id select', | |
| 1321 | + editTemplateButton: '.elementor-edit-template', | |
| 1322 | + maintenanceModeError: '.elementor-maintenance-mode-error' | |
| 1323 | + }, | |
| 1324 | + classes: { | |
| 1325 | + isEnabled: 'elementor-maintenance-mode-is-enabled' | |
| 1326 | + } | |
| 1327 | + }; | |
| 1328 | + }, | |
| 1329 | + getDefaultElements: function getDefaultElements() { | |
| 1330 | + var elements = {}, | |
| 1331 | + selectors = this.getSettings('selectors'); | |
| 1332 | + elements.$modeSelect = jQuery(selectors.modeSelect); | |
| 1333 | + elements.$maintenanceModeTable = elements.$modeSelect.parents(selectors.maintenanceModeTable); | |
| 1334 | + elements.$excludeModeSelect = elements.$maintenanceModeTable.find(selectors.excludeModeSelect); | |
| 1335 | + elements.$excludeRolesArea = elements.$maintenanceModeTable.find(selectors.excludeRolesArea); | |
| 1336 | + elements.$templateSelect = elements.$maintenanceModeTable.find(selectors.templateSelect); | |
| 1337 | + elements.$editTemplateButton = elements.$maintenanceModeTable.find(selectors.editTemplateButton); | |
| 1338 | + elements.$maintenanceModeDescriptions = elements.$maintenanceModeTable.find(selectors.maintenanceModeDescriptions); | |
| 1339 | + elements.$maintenanceModeError = elements.$maintenanceModeTable.find(selectors.maintenanceModeError); | |
| 1340 | + return elements; | |
| 1341 | + }, | |
| 1342 | + handleModeSelectChange: function handleModeSelectChange() { | |
| 1343 | + var settings = this.getSettings(), | |
| 1344 | + elements = this.elements; | |
| 1345 | + elements.$maintenanceModeTable.toggleClass(settings.classes.isEnabled, !!elements.$modeSelect.val()); | |
| 1346 | + elements.$maintenanceModeDescriptions.hide(); | |
| 1347 | + elements.$maintenanceModeDescriptions.filter('[data-value="' + elements.$modeSelect.val() + '"]').show(); | |
| 1348 | + }, | |
| 1349 | + handleExcludeModeSelectChange: function handleExcludeModeSelectChange() { | |
| 1350 | + var elements = this.elements; | |
| 1351 | + elements.$excludeRolesArea.toggle('custom' === elements.$excludeModeSelect.val()); | |
| 1352 | + }, | |
| 1353 | + handleTemplateSelectChange: function handleTemplateSelectChange() { | |
| 1354 | + var elements = this.elements; | |
| 1355 | + var templateID = elements.$templateSelect.val(); | |
| 1356 | + | |
| 1357 | + if (!templateID) { | |
| 1358 | + elements.$editTemplateButton.hide(); | |
| 1359 | + elements.$maintenanceModeError.show(); | |
| 1360 | + return; | |
| 1361 | + } | |
| 1362 | + | |
| 1363 | + var editUrl = elementorAdmin.config.home_url + '?p=' + templateID + '&elementor'; | |
| 1364 | + elements.$editTemplateButton.prop('href', editUrl).show(); | |
| 1365 | + elements.$maintenanceModeError.hide(); | |
| 1366 | + }, | |
| 1367 | + bindEvents: function bindEvents() { | |
| 1368 | + var elements = this.elements; | |
| 1369 | + elements.$modeSelect.on('change', this.handleModeSelectChange.bind(this)); | |
| 1370 | + elements.$excludeModeSelect.on('change', this.handleExcludeModeSelectChange.bind(this)); | |
| 1371 | + elements.$templateSelect.on('change', this.handleTemplateSelectChange.bind(this)); | |
| 1372 | + }, | |
| 1373 | + onAdminInit: function onAdminInit() { | |
| 1374 | + this.handleModeSelectChange(); | |
| 1375 | + this.handleExcludeModeSelectChange(); | |
| 1376 | + this.handleTemplateSelectChange(); | |
| 1377 | + }, | |
| 1378 | + onInit: function onInit() { | |
| 1379 | + elementorModules.ViewModule.prototype.onInit.apply(this, arguments); | |
| 1380 | + elementorCommon.elements.$window.on('elementor/admin/init', this.onAdminInit); | |
| 1381 | + } | |
| 1382 | +}); | |
| 1383 | + | |
| 1384 | +/***/ }), | |
| 1385 | + | |
| 1386 | +/***/ 73: | |
| 1387 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1388 | + | |
| 1389 | +// optional / simple context binding | |
| 1390 | +var aFunction = __webpack_require__(91); | |
| 1391 | +module.exports = function (fn, that, length) { | |
| 1392 | + aFunction(fn); | |
| 1393 | + if (that === undefined) return fn; | |
| 1394 | + switch (length) { | |
| 1395 | + case 1: return function (a) { | |
| 1396 | + return fn.call(that, a); | |
| 1397 | + }; | |
| 1398 | + case 2: return function (a, b) { | |
| 1399 | + return fn.call(that, a, b); | |
| 1400 | + }; | |
| 1401 | + case 3: return function (a, b, c) { | |
| 1402 | + return fn.call(that, a, b, c); | |
| 1403 | + }; | |
| 1404 | + } | |
| 1405 | + return function (/* ...args */) { | |
| 1406 | + return fn.apply(that, arguments); | |
| 1407 | + }; | |
| 1408 | +}; | |
| 1409 | + | |
| 1410 | + | |
| 1411 | +/***/ }), | |
| 1412 | + | |
| 1413 | +/***/ 80: | |
| 1414 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1415 | + | |
| 1416 | +"use strict"; | |
| 1417 | + | |
| 1418 | + | |
| 1419 | +var isRegExp = __webpack_require__(122); | |
| 1420 | +var anObject = __webpack_require__(18); | |
| 1421 | +var speciesConstructor = __webpack_require__(154); | |
| 1422 | +var advanceStringIndex = __webpack_require__(105); | |
| 1423 | +var toLength = __webpack_require__(43); | |
| 1424 | +var callRegExpExec = __webpack_require__(94); | |
| 1425 | +var regexpExec = __webpack_require__(88); | |
| 1426 | +var fails = __webpack_require__(33); | |
| 1427 | +var $min = Math.min; | |
| 1428 | +var $push = [].push; | |
| 1429 | +var $SPLIT = 'split'; | |
| 1430 | +var LENGTH = 'length'; | |
| 1431 | +var LAST_INDEX = 'lastIndex'; | |
| 1432 | +var MAX_UINT32 = 0xffffffff; | |
| 1433 | + | |
| 1434 | +// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError | |
| 1435 | +var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); }); | |
| 1436 | + | |
| 1437 | +// @@split logic | |
| 1438 | +__webpack_require__(95)('split', 2, function (defined, SPLIT, $split, maybeCallNative) { | |
| 1439 | + var internalSplit; | |
| 1440 | + if ( | |
| 1441 | + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || | |
| 1442 | + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || | |
| 1443 | + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || | |
| 1444 | + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || | |
| 1445 | + '.'[$SPLIT](/()()/)[LENGTH] > 1 || | |
| 1446 | + ''[$SPLIT](/.?/)[LENGTH] | |
| 1447 | + ) { | |
| 1448 | + // based on es5-shim implementation, need to rework it | |
| 1449 | + internalSplit = function (separator, limit) { | |
| 1450 | + var string = String(this); | |
| 1451 | + if (separator === undefined && limit === 0) return []; | |
| 1452 | + // If `separator` is not a regex, use native split | |
| 1453 | + if (!isRegExp(separator)) return $split.call(string, separator, limit); | |
| 1454 | + var output = []; | |
| 1455 | + var flags = (separator.ignoreCase ? 'i' : '') + | |
| 1456 | + (separator.multiline ? 'm' : '') + | |
| 1457 | + (separator.unicode ? 'u' : '') + | |
| 1458 | + (separator.sticky ? 'y' : ''); | |
| 1459 | + var lastLastIndex = 0; | |
| 1460 | + var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0; | |
| 1461 | + // Make `global` and avoid `lastIndex` issues by working with a copy | |
| 1462 | + var separatorCopy = new RegExp(separator.source, flags + 'g'); | |
| 1463 | + var match, lastIndex, lastLength; | |
| 1464 | + while (match = regexpExec.call(separatorCopy, string)) { | |
| 1465 | + lastIndex = separatorCopy[LAST_INDEX]; | |
| 1466 | + if (lastIndex > lastLastIndex) { | |
| 1467 | + output.push(string.slice(lastLastIndex, match.index)); | |
| 1468 | + if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1)); | |
| 1469 | + lastLength = match[0][LENGTH]; | |
| 1470 | + lastLastIndex = lastIndex; | |
| 1471 | + if (output[LENGTH] >= splitLimit) break; | |
| 1472 | + } | |
| 1473 | + if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop | |
| 1474 | + } | |
| 1475 | + if (lastLastIndex === string[LENGTH]) { | |
| 1476 | + if (lastLength || !separatorCopy.test('')) output.push(''); | |
| 1477 | + } else output.push(string.slice(lastLastIndex)); | |
| 1478 | + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; | |
| 1479 | + }; | |
| 1480 | + // Chakra, V8 | |
| 1481 | + } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) { | |
| 1482 | + internalSplit = function (separator, limit) { | |
| 1483 | + return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit); | |
| 1484 | + }; | |
| 1485 | + } else { | |
| 1486 | + internalSplit = $split; | |
| 1487 | + } | |
| 1488 | + | |
| 1489 | + return [ | |
| 1490 | + // `String.prototype.split` method | |
| 1491 | + // https://tc39.github.io/ecma262/#sec-string.prototype.split | |
| 1492 | + function split(separator, limit) { | |
| 1493 | + var O = defined(this); | |
| 1494 | + var splitter = separator == undefined ? undefined : separator[SPLIT]; | |
| 1495 | + return splitter !== undefined | |
| 1496 | + ? splitter.call(separator, O, limit) | |
| 1497 | + : internalSplit.call(String(O), separator, limit); | |
| 1498 | + }, | |
| 1499 | + // `RegExp.prototype[@@split]` method | |
| 1500 | + // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split | |
| 1501 | + // | |
| 1502 | + // NOTE: This cannot be properly polyfilled in engines that don't support | |
| 1503 | + // the 'y' flag. | |
| 1504 | + function (regexp, limit) { | |
| 1505 | + var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split); | |
| 1506 | + if (res.done) return res.value; | |
| 1507 | + | |
| 1508 | + var rx = anObject(regexp); | |
| 1509 | + var S = String(this); | |
| 1510 | + var C = speciesConstructor(rx, RegExp); | |
| 1511 | + | |
| 1512 | + var unicodeMatching = rx.unicode; | |
| 1513 | + var flags = (rx.ignoreCase ? 'i' : '') + | |
| 1514 | + (rx.multiline ? 'm' : '') + | |
| 1515 | + (rx.unicode ? 'u' : '') + | |
| 1516 | + (SUPPORTS_Y ? 'y' : 'g'); | |
| 1517 | + | |
| 1518 | + // ^(? + rx + ) is needed, in combination with some S slicing, to | |
| 1519 | + // simulate the 'y' flag. | |
| 1520 | + var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags); | |
| 1521 | + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; | |
| 1522 | + if (lim === 0) return []; | |
| 1523 | + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; | |
| 1524 | + var p = 0; | |
| 1525 | + var q = 0; | |
| 1526 | + var A = []; | |
| 1527 | + while (q < S.length) { | |
| 1528 | + splitter.lastIndex = SUPPORTS_Y ? q : 0; | |
| 1529 | + var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q)); | |
| 1530 | + var e; | |
| 1531 | + if ( | |
| 1532 | + z === null || | |
| 1533 | + (e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p | |
| 1534 | + ) { | |
| 1535 | + q = advanceStringIndex(S, q, unicodeMatching); | |
| 1536 | + } else { | |
| 1537 | + A.push(S.slice(p, q)); | |
| 1538 | + if (A.length === lim) return A; | |
| 1539 | + for (var i = 1; i <= z.length - 1; i++) { | |
| 1540 | + A.push(z[i]); | |
| 1541 | + if (A.length === lim) return A; | |
| 1542 | + } | |
| 1543 | + q = p = e; | |
| 1544 | + } | |
| 1545 | + } | |
| 1546 | + A.push(S.slice(p)); | |
| 1547 | + return A; | |
| 1548 | + } | |
| 1549 | + ]; | |
| 1550 | +}); | |
| 1551 | + | |
| 1552 | + | |
| 1553 | +/***/ }), | |
| 1554 | + | |
| 1555 | +/***/ 85: | |
| 1556 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1557 | + | |
| 1558 | +// 22.1.3.31 Array.prototype[@@unscopables] | |
| 1559 | +var UNSCOPABLES = __webpack_require__(12)('unscopables'); | |
| 1560 | +var ArrayProto = Array.prototype; | |
| 1561 | +if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(29)(ArrayProto, UNSCOPABLES, {}); | |
| 1562 | +module.exports = function (key) { | |
| 1563 | + ArrayProto[UNSCOPABLES][key] = true; | |
| 1564 | +}; | |
| 1565 | + | |
| 1566 | + | |
| 1567 | +/***/ }), | |
| 1568 | + | |
| 1569 | +/***/ 88: | |
| 1570 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1571 | + | |
| 1572 | +"use strict"; | |
| 1573 | + | |
| 1574 | + | |
| 1575 | +var regexpFlags = __webpack_require__(106); | |
| 1576 | + | |
| 1577 | +var nativeExec = RegExp.prototype.exec; | |
| 1578 | +// This always refers to the native implementation, because the | |
| 1579 | +// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js, | |
| 1580 | +// which loads this file before patching the method. | |
| 1581 | +var nativeReplace = String.prototype.replace; | |
| 1582 | + | |
| 1583 | +var patchedExec = nativeExec; | |
| 1584 | + | |
| 1585 | +var LAST_INDEX = 'lastIndex'; | |
| 1586 | + | |
| 1587 | +var UPDATES_LAST_INDEX_WRONG = (function () { | |
| 1588 | + var re1 = /a/, | |
| 1589 | + re2 = /b*/g; | |
| 1590 | + nativeExec.call(re1, 'a'); | |
| 1591 | + nativeExec.call(re2, 'a'); | |
| 1592 | + return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0; | |
| 4307 | 1593 | })(); |
| 4308 | 1594 | |
| 4309 | -/******/ })() | |
| 4310 | -; | |
| 1595 | +// nonparticipating capturing group, copied from es5-shim's String#split patch. | |
| 1596 | +var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; | |
| 1597 | + | |
| 1598 | +var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED; | |
| 1599 | + | |
| 1600 | +if (PATCH) { | |
| 1601 | + patchedExec = function exec(str) { | |
| 1602 | + var re = this; | |
| 1603 | + var lastIndex, reCopy, match, i; | |
| 1604 | + | |
| 1605 | + if (NPCG_INCLUDED) { | |
| 1606 | + reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re)); | |
| 1607 | + } | |
| 1608 | + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX]; | |
| 1609 | + | |
| 1610 | + match = nativeExec.call(re, str); | |
| 1611 | + | |
| 1612 | + if (UPDATES_LAST_INDEX_WRONG && match) { | |
| 1613 | + re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex; | |
| 1614 | + } | |
| 1615 | + if (NPCG_INCLUDED && match && match.length > 1) { | |
| 1616 | + // Fix browsers whose `exec` methods don't consistently return `undefined` | |
| 1617 | + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ | |
| 1618 | + // eslint-disable-next-line no-loop-func | |
| 1619 | + nativeReplace.call(match[0], reCopy, function () { | |
| 1620 | + for (i = 1; i < arguments.length - 2; i++) { | |
| 1621 | + if (arguments[i] === undefined) match[i] = undefined; | |
| 1622 | + } | |
| 1623 | + }); | |
| 1624 | + } | |
| 1625 | + | |
| 1626 | + return match; | |
| 1627 | + }; | |
| 1628 | +} | |
| 1629 | + | |
| 1630 | +module.exports = patchedExec; | |
| 1631 | + | |
| 1632 | + | |
| 1633 | +/***/ }), | |
| 1634 | + | |
| 1635 | +/***/ 91: | |
| 1636 | +/***/ (function(module, exports) { | |
| 1637 | + | |
| 1638 | +module.exports = function (it) { | |
| 1639 | + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); | |
| 1640 | + return it; | |
| 1641 | +}; | |
| 1642 | + | |
| 1643 | + | |
| 1644 | +/***/ }), | |
| 1645 | + | |
| 1646 | +/***/ 94: | |
| 1647 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1648 | + | |
| 1649 | +"use strict"; | |
| 1650 | + | |
| 1651 | + | |
| 1652 | +var classof = __webpack_require__(113); | |
| 1653 | +var builtinExec = RegExp.prototype.exec; | |
| 1654 | + | |
| 1655 | + // `RegExpExec` abstract operation | |
| 1656 | +// https://tc39.github.io/ecma262/#sec-regexpexec | |
| 1657 | +module.exports = function (R, S) { | |
| 1658 | + var exec = R.exec; | |
| 1659 | + if (typeof exec === 'function') { | |
| 1660 | + var result = exec.call(R, S); | |
| 1661 | + if (typeof result !== 'object') { | |
| 1662 | + throw new TypeError('RegExp exec method returned something other than an Object or null'); | |
| 1663 | + } | |
| 1664 | + return result; | |
| 1665 | + } | |
| 1666 | + if (classof(R) !== 'RegExp') { | |
| 1667 | + throw new TypeError('RegExp#exec called on incompatible receiver'); | |
| 1668 | + } | |
| 1669 | + return builtinExec.call(R, S); | |
| 1670 | +}; | |
| 1671 | + | |
| 1672 | + | |
| 1673 | +/***/ }), | |
| 1674 | + | |
| 1675 | +/***/ 95: | |
| 1676 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1677 | + | |
| 1678 | +"use strict"; | |
| 1679 | + | |
| 1680 | +__webpack_require__(190); | |
| 1681 | +var redefine = __webpack_require__(35); | |
| 1682 | +var hide = __webpack_require__(29); | |
| 1683 | +var fails = __webpack_require__(33); | |
| 1684 | +var defined = __webpack_require__(42); | |
| 1685 | +var wks = __webpack_require__(12); | |
| 1686 | +var regexpExec = __webpack_require__(88); | |
| 1687 | + | |
| 1688 | +var SPECIES = wks('species'); | |
| 1689 | + | |
| 1690 | +var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { | |
| 1691 | + // #replace needs built-in support for named groups. | |
| 1692 | + // #match works fine because it just return the exec results, even if it has | |
| 1693 | + // a "grops" property. | |
| 1694 | + var re = /./; | |
| 1695 | + re.exec = function () { | |
| 1696 | + var result = []; | |
| 1697 | + result.groups = { a: '7' }; | |
| 1698 | + return result; | |
| 1699 | + }; | |
| 1700 | + return ''.replace(re, '$<a>') !== '7'; | |
| 1701 | +}); | |
| 1702 | + | |
| 1703 | +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () { | |
| 1704 | + // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec | |
| 1705 | + var re = /(?:)/; | |
| 1706 | + var originalExec = re.exec; | |
| 1707 | + re.exec = function () { return originalExec.apply(this, arguments); }; | |
| 1708 | + var result = 'ab'.split(re); | |
| 1709 | + return result.length === 2 && result[0] === 'a' && result[1] === 'b'; | |
| 1710 | +})(); | |
| 1711 | + | |
| 1712 | +module.exports = function (KEY, length, exec) { | |
| 1713 | + var SYMBOL = wks(KEY); | |
| 1714 | + | |
| 1715 | + var DELEGATES_TO_SYMBOL = !fails(function () { | |
| 1716 | + // String methods call symbol-named RegEp methods | |
| 1717 | + var O = {}; | |
| 1718 | + O[SYMBOL] = function () { return 7; }; | |
| 1719 | + return ''[KEY](O) != 7; | |
| 1720 | + }); | |
| 1721 | + | |
| 1722 | + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () { | |
| 1723 | + // Symbol-named RegExp methods call .exec | |
| 1724 | + var execCalled = false; | |
| 1725 | + var re = /a/; | |
| 1726 | + re.exec = function () { execCalled = true; return null; }; | |
| 1727 | + if (KEY === 'split') { | |
| 1728 | + // RegExp[@@split] doesn't call the regex's exec method, but first creates | |
| 1729 | + // a new one. We need to return the patched regex when creating the new one. | |
| 1730 | + re.constructor = {}; | |
| 1731 | + re.constructor[SPECIES] = function () { return re; }; | |
| 1732 | + } | |
| 1733 | + re[SYMBOL](''); | |
| 1734 | + return !execCalled; | |
| 1735 | + }) : undefined; | |
| 1736 | + | |
| 1737 | + if ( | |
| 1738 | + !DELEGATES_TO_SYMBOL || | |
| 1739 | + !DELEGATES_TO_EXEC || | |
| 1740 | + (KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) || | |
| 1741 | + (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC) | |
| 1742 | + ) { | |
| 1743 | + var nativeRegExpMethod = /./[SYMBOL]; | |
| 1744 | + var fns = exec( | |
| 1745 | + defined, | |
| 1746 | + SYMBOL, | |
| 1747 | + ''[KEY], | |
| 1748 | + function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) { | |
| 1749 | + if (regexp.exec === regexpExec) { | |
| 1750 | + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { | |
| 1751 | + // The native String method already delegates to @@method (this | |
| 1752 | + // polyfilled function), leasing to infinite recursion. | |
| 1753 | + // We avoid it by directly calling the native @@method method. | |
| 1754 | + return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) }; | |
| 1755 | + } | |
| 1756 | + return { done: true, value: nativeMethod.call(str, regexp, arg2) }; | |
| 1757 | + } | |
| 1758 | + return { done: false }; | |
| 1759 | + } | |
| 1760 | + ); | |
| 1761 | + var strfn = fns[0]; | |
| 1762 | + var rxfn = fns[1]; | |
| 1763 | + | |
| 1764 | + redefine(String.prototype, KEY, strfn); | |
| 1765 | + hide(RegExp.prototype, SYMBOL, length == 2 | |
| 1766 | + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) | |
| 1767 | + // 21.2.5.11 RegExp.prototype[@@split](string, limit) | |
| 1768 | + ? function (string, arg) { return rxfn.call(string, this, arg); } | |
| 1769 | + // 21.2.5.6 RegExp.prototype[@@match](string) | |
| 1770 | + // 21.2.5.9 RegExp.prototype[@@search](string) | |
| 1771 | + : function (string) { return rxfn.call(string, this); } | |
| 1772 | + ); | |
| 1773 | + } | |
| 1774 | +}; | |
| 1775 | + | |
| 1776 | + | |
| 1777 | +/***/ }), | |
| 1778 | + | |
| 1779 | +/***/ 96: | |
| 1780 | +/***/ (function(module, exports, __webpack_require__) { | |
| 1781 | + | |
| 1782 | +// 7.1.13 ToObject(argument) | |
| 1783 | +var defined = __webpack_require__(42); | |
| 1784 | +module.exports = function (it) { | |
| 1785 | + return Object(defined(it)); | |
| 1786 | +}; | |
| 1787 | + | |
| 1788 | + | |
| 1789 | +/***/ }) | |
| 1790 | + | |
| 1791 | +/******/ }); | |
| 4311 | 1792 | //# sourceMappingURL=admin.js.map |