← All changes
|
assets/js/import-export-customization-admin.js
+1781
-1444
4.3.0-beta3
→
4.0.0-dev3
View file →
| @@ -1,1482 +1,1819 @@ | ||
| 1 | -(function(_wordpress_i18n, _wordpress_api_fetch) { | |
| 1 | +/******/ (() => { // webpackBootstrap | |
| 2 | +/******/ var __webpack_modules__ = ({ | |
| 2 | 3 | |
| 3 | -//#region \0rolldown/runtime.js | |
| 4 | - var __create = Object.create; | |
| 5 | - var __defProp = Object.defineProperty; | |
| 6 | - var __name = (target, value) => __defProp(target, "name", { | |
| 7 | - value, | |
| 8 | - configurable: true | |
| 9 | - }); | |
| 10 | - var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 11 | - var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 12 | - var __getProtoOf = Object.getPrototypeOf; | |
| 13 | - var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 14 | - var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); | |
| 15 | - var __copyProps = (to, from, except, desc) => { | |
| 16 | - if (from && typeof from === "object" || typeof from === "function") { | |
| 17 | - for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { | |
| 18 | - key = keys[i]; | |
| 19 | - if (!__hasOwnProp.call(to, key) && key !== except) { | |
| 20 | - __defProp(to, key, { | |
| 21 | - get: ((k) => from[k]).bind(null, key), | |
| 22 | - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable | |
| 23 | - }); | |
| 24 | - } | |
| 25 | - } | |
| 26 | - } | |
| 27 | - return to; | |
| 28 | - }; | |
| 29 | - var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { | |
| 30 | - value: mod, | |
| 31 | - enumerable: true | |
| 32 | - }) : target, mod)); | |
| 4 | +/***/ "../app/assets/js/event-track/apps-event-tracking.js": | |
| 5 | +/*!***********************************************************!*\ | |
| 6 | + !*** ../app/assets/js/event-track/apps-event-tracking.js ***! | |
| 7 | + \***********************************************************/ | |
| 8 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 33 | 9 | |
| 34 | -//#endregion | |
| 35 | -_wordpress_api_fetch = __toESM(_wordpress_api_fetch); | |
| 10 | +"use strict"; | |
| 36 | 11 | |
| 37 | -//#region node_modules/@babel/runtime/helpers/esm/classCallCheck.js | |
| 38 | - function _classCallCheck(a, n) { | |
| 39 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 40 | - } | |
| 41 | 12 | |
| 42 | -//#endregion | |
| 43 | -//#region node_modules/@babel/runtime/helpers/esm/typeof.js | |
| 44 | - function _typeof(o) { | |
| 45 | - "@babel/helpers - typeof"; | |
| 46 | - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 47 | - return typeof o; | |
| 48 | - } : function(o) { | |
| 49 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 50 | - }, _typeof(o); | |
| 51 | - } | |
| 13 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 14 | +Object.defineProperty(exports, "__esModule", ({ | |
| 15 | + value: true | |
| 16 | +})); | |
| 17 | +exports.appsEventTrackingDispatch = exports.AppsEventTracking = void 0; | |
| 18 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 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 _eventsConfig = _interopRequireDefault(__webpack_require__(/*! ../../../../core/common/modules/events-manager/assets/js/events-config */ "../core/common/modules/events-manager/assets/js/events-config.js")); | |
| 22 | +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 23 | +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 24 | +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; } } }; } | |
| 25 | +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; } } | |
| 26 | +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; } | |
| 27 | +var EVENTS_MAP = { | |
| 28 | + PAGE_VIEWS_WEBSITE_TEMPLATES: 'page_views_website_templates', | |
| 29 | + KITS_CLOUD_UPGRADE_CLICKED: 'kits_cloud_upgrade_clicked', | |
| 30 | + EXPORT_KIT_CUSTOMIZATION: 'export_kit_customization', | |
| 31 | + IMPORT_KIT_CUSTOMIZATION: 'import_kit_customization', | |
| 32 | + KIT_IMPORT_STATUS: 'kit_import_status', | |
| 33 | + KIT_CLOUD_LIBRARY_APPLY: 'kit_cloud_library_apply', | |
| 34 | + KIT_CLOUD_LIBRARY_DELETE: 'kit_cloud_library_delete', | |
| 35 | + IMPORT_EXPORT_ADMIN_ACTION: 'ie_admin_action', | |
| 36 | + KIT_IMPORT_UPLOAD_FILE: 'kit_import_upload_file' | |
| 37 | +}; | |
| 38 | +var appsEventTrackingDispatch = exports.appsEventTrackingDispatch = function appsEventTrackingDispatch(command, eventParams) { | |
| 39 | + // Add existing eventParams key value pair to the data/details object. | |
| 40 | + var objectCreator = function objectCreator(array, obj) { | |
| 41 | + var _iterator = _createForOfIteratorHelper(array), | |
| 42 | + _step; | |
| 43 | + try { | |
| 44 | + for (_iterator.s(); !(_step = _iterator.n()).done;) { | |
| 45 | + var key = _step.value; | |
| 46 | + if (eventParams.hasOwnProperty(key) && eventParams[key] !== null) { | |
| 47 | + obj[key] = eventParams[key]; | |
| 48 | + } | |
| 49 | + } | |
| 50 | + } catch (err) { | |
| 51 | + _iterator.e(err); | |
| 52 | + } finally { | |
| 53 | + _iterator.f(); | |
| 54 | + } | |
| 55 | + return obj; | |
| 56 | + }; | |
| 57 | + var dataKeys = []; | |
| 58 | + var detailsKeys = ['layout', 'site_part', 'error', 'document_name', 'document_type', 'view_type_clicked', 'tag', 'sort_direction', 'sort_type', 'action', 'grid_location', 'kit_name', 'page_source', 'element_position', 'element', 'event_type', 'modal_type', 'method', 'status', 'step', 'item', 'category', 'element_location', 'search_term', 'section', 'site_area']; | |
| 59 | + var data = {}; | |
| 60 | + var details = {}; | |
| 61 | + var init = function init() { | |
| 62 | + objectCreator(detailsKeys, details); | |
| 63 | + objectCreator(dataKeys, data); | |
| 64 | + var commandSplit = command.split('/'); | |
| 65 | + data.placement = commandSplit[0]; | |
| 66 | + data.event = commandSplit[1]; | |
| 52 | 67 | |
| 53 | -//#endregion | |
| 54 | -//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js | |
| 55 | - function toPrimitive(t, r) { | |
| 56 | - if ("object" != _typeof(t) || !t) return t; | |
| 57 | - var e = t[Symbol.toPrimitive]; | |
| 58 | - if (void 0 !== e) { | |
| 59 | - var i = e.call(t, r || "default"); | |
| 60 | - if ("object" != _typeof(i)) return i; | |
| 61 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 62 | - } | |
| 63 | - return ("string" === r ? String : Number)(t); | |
| 64 | - } | |
| 68 | + // If 'details' is not empty, add the details object to the data object. | |
| 69 | + if (Object.keys(details).length) { | |
| 70 | + data.details = details; | |
| 71 | + } | |
| 72 | + }; | |
| 73 | + init(); | |
| 74 | + $e.run(command, data); | |
| 75 | +}; | |
| 76 | +var AppsEventTracking = exports.AppsEventTracking = /*#__PURE__*/function () { | |
| 77 | + function AppsEventTracking() { | |
| 78 | + (0, _classCallCheck2.default)(this, AppsEventTracking); | |
| 79 | + } | |
| 80 | + return (0, _createClass2.default)(AppsEventTracking, null, [{ | |
| 81 | + key: "dispatchEvent", | |
| 82 | + value: function dispatchEvent(eventName, payload) { | |
| 83 | + var _window$elementorComm, _window$elementorComm2; | |
| 84 | + return (_window$elementorComm = window.elementorCommon) === null || _window$elementorComm === void 0 || (_window$elementorComm = _window$elementorComm.eventsManager) === null || _window$elementorComm === void 0 || (_window$elementorComm2 = _window$elementorComm.dispatchEvent) === null || _window$elementorComm2 === void 0 ? void 0 : _window$elementorComm2.call(_window$elementorComm, eventName, payload); | |
| 85 | + } | |
| 86 | + }, { | |
| 87 | + key: "sendPageViewsWebsiteTemplates", | |
| 88 | + value: function sendPageViewsWebsiteTemplates(page) { | |
| 89 | + return this.dispatchEvent(EVENTS_MAP.PAGE_VIEWS_WEBSITE_TEMPLATES, { | |
| 90 | + trigger: _eventsConfig.default.triggers.pageLoaded, | |
| 91 | + page_loaded: page, | |
| 92 | + secondary_location: page | |
| 93 | + }); | |
| 94 | + } | |
| 95 | + }, { | |
| 96 | + key: "sendKitsCloudUpgradeClicked", | |
| 97 | + value: function sendKitsCloudUpgradeClicked(upgradeLocation) { | |
| 98 | + return this.dispatchEvent(EVENTS_MAP.KITS_CLOUD_UPGRADE_CLICKED, { | |
| 99 | + trigger: _eventsConfig.default.triggers.click, | |
| 100 | + secondary_location: upgradeLocation, | |
| 101 | + upgrade_location: upgradeLocation | |
| 102 | + }); | |
| 103 | + } | |
| 104 | + }, { | |
| 105 | + key: "sendExportKitCustomization", | |
| 106 | + value: function sendExportKitCustomization(payload) { | |
| 107 | + return this.dispatchEvent(EVENTS_MAP.EXPORT_KIT_CUSTOMIZATION, _objectSpread({ | |
| 108 | + trigger: _eventsConfig.default.triggers.click | |
| 109 | + }, payload)); | |
| 110 | + } | |
| 111 | + }, { | |
| 112 | + key: "sendImportKitCustomization", | |
| 113 | + value: function sendImportKitCustomization(payload) { | |
| 114 | + return this.dispatchEvent(EVENTS_MAP.IMPORT_KIT_CUSTOMIZATION, _objectSpread({ | |
| 115 | + trigger: _eventsConfig.default.triggers.click | |
| 116 | + }, payload)); | |
| 117 | + } | |
| 118 | + }, { | |
| 119 | + key: "sendKitImportStatus", | |
| 120 | + value: function sendKitImportStatus() { | |
| 121 | + var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; | |
| 122 | + var isError = !!error; | |
| 123 | + return this.dispatchEvent(EVENTS_MAP.KIT_IMPORT_STATUS, _objectSpread({ | |
| 124 | + kit_import_status: !isError | |
| 125 | + }, isError && { | |
| 126 | + kit_import_error: error.message | |
| 127 | + })); | |
| 128 | + } | |
| 129 | + }, { | |
| 130 | + key: "sendKitCloudLibraryApply", | |
| 131 | + value: function sendKitCloudLibraryApply(kitId, kitApplyUrl) { | |
| 132 | + return this.dispatchEvent(EVENTS_MAP.KIT_CLOUD_LIBRARY_APPLY, _objectSpread({ | |
| 133 | + trigger: _eventsConfig.default.triggers.click, | |
| 134 | + kit_cloud_id: kitId | |
| 135 | + }, kitApplyUrl && { | |
| 136 | + kit_apply_url: kitApplyUrl | |
| 137 | + })); | |
| 138 | + } | |
| 139 | + }, { | |
| 140 | + key: "sendKitCloudLibraryDelete", | |
| 141 | + value: function sendKitCloudLibraryDelete() { | |
| 142 | + return this.dispatchEvent(EVENTS_MAP.KIT_CLOUD_LIBRARY_DELETE, { | |
| 143 | + trigger: _eventsConfig.default.triggers.click | |
| 144 | + }); | |
| 145 | + } | |
| 146 | + }, { | |
| 147 | + key: "sendImportExportAdminAction", | |
| 148 | + value: function sendImportExportAdminAction(actionType) { | |
| 149 | + return this.dispatchEvent(EVENTS_MAP.IMPORT_EXPORT_ADMIN_ACTION, { | |
| 150 | + trigger: _eventsConfig.default.triggers.click, | |
| 151 | + action_type: actionType | |
| 152 | + }); | |
| 153 | + } | |
| 154 | + }, { | |
| 155 | + key: "sendKitImportUploadFile", | |
| 156 | + value: function sendKitImportUploadFile(status) { | |
| 157 | + return this.dispatchEvent(EVENTS_MAP.KIT_IMPORT_UPLOAD_FILE, { | |
| 158 | + kit_import_upload_file_status: status | |
| 159 | + }); | |
| 160 | + } | |
| 161 | + }]); | |
| 162 | +}(); | |
| 65 | 163 | |
| 66 | -//#endregion | |
| 67 | -//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js | |
| 68 | - function toPropertyKey(t) { | |
| 69 | - var i = toPrimitive(t, "string"); | |
| 70 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 71 | - } | |
| 164 | +/***/ }), | |
| 72 | 165 | |
| 73 | -//#endregion | |
| 74 | -//#region node_modules/@babel/runtime/helpers/esm/createClass.js | |
| 75 | - function _defineProperties(e, r) { | |
| 76 | - for (var t = 0; t < r.length; t++) { | |
| 77 | - var o = r[t]; | |
| 78 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 79 | - } | |
| 80 | - } | |
| 81 | - function _createClass(e, r, t) { | |
| 82 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; | |
| 83 | - } | |
| 166 | +/***/ "../app/modules/import-export-customization/assets/js/shared/error/import-export-error.js": | |
| 167 | +/*!************************************************************************************************!*\ | |
| 168 | + !*** ../app/modules/import-export-customization/assets/js/shared/error/import-export-error.js ***! | |
| 169 | + \************************************************************************************************/ | |
| 170 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 84 | 171 | |
| 85 | -//#endregion | |
| 86 | -//#region node_modules/@babel/runtime/helpers/esm/defineProperty.js | |
| 87 | - function _defineProperty(e, r, t) { | |
| 88 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 89 | - value: t, | |
| 90 | - enumerable: !0, | |
| 91 | - configurable: !0, | |
| 92 | - writable: !0 | |
| 93 | - }) : e[r] = t, e; | |
| 94 | - } | |
| 172 | +"use strict"; | |
| 95 | 173 | |
| 96 | -//#endregion | |
| 97 | -//#region core/common/modules/events-manager/assets/js/events-config.js | |
| 98 | - var eventsConfig = { | |
| 99 | - appTypes: { | |
| 100 | - editor: "editor", | |
| 101 | - wpAdmin: "wpadmin", | |
| 102 | - wpDash: "wpdash" | |
| 103 | - }, | |
| 104 | - windowNames: { sidebarMenu: "sidebar_menu" }, | |
| 105 | - targetTypes: { | |
| 106 | - dropdownItem: "dropdown_item", | |
| 107 | - button: "button", | |
| 108 | - tab: "tab", | |
| 109 | - toggle: "toggle", | |
| 110 | - searchInput: "search_input", | |
| 111 | - searchResult: "search_result", | |
| 112 | - buttons: "buttons", | |
| 113 | - searchWidget: "search_widget", | |
| 114 | - wpDashAdminMenuItem: "wpdash_admin_menu_item", | |
| 115 | - wpDashEditorMenu: "wpdash_editor_menu", | |
| 116 | - wpDashSubMenuItem: "wpdash_sub_menu_item", | |
| 117 | - link: "link" | |
| 118 | - }, | |
| 119 | - interactionResults: { | |
| 120 | - actionSelected: "action_selected", | |
| 121 | - navigate: "navigate", | |
| 122 | - create: "create", | |
| 123 | - sessionEnd: "session_end", | |
| 124 | - tabChanged: "tab_changed", | |
| 125 | - assetInserted: "asset_inserted", | |
| 126 | - assetFavorite: "asset_favorite", | |
| 127 | - aiGenerate: "ai_generate", | |
| 128 | - resultsUpdated: "results_updated", | |
| 129 | - noResults: "no_results", | |
| 130 | - selected: "selected", | |
| 131 | - promotionViewed: "promotion_viewed", | |
| 132 | - upgradeNow: "upgrade_now", | |
| 133 | - elementorSideMenuOpened: "elementor_side_menu_opened", | |
| 134 | - editorSubMenuOpened: "wpdash_editor_sub_menu_opened", | |
| 135 | - themeBuilderPromotionWindow: "theme_builder_promotion_window", | |
| 136 | - pageOpened: "page_opened", | |
| 137 | - expanded: "expanded", | |
| 138 | - collapsed: "collapsed" | |
| 139 | - }, | |
| 140 | - targetNames: { | |
| 141 | - publishDropdown: { | |
| 142 | - saveDraft: "save_draft", | |
| 143 | - saveAsTemplate: "save_as_template", | |
| 144 | - viewPage: "view_page", | |
| 145 | - copyAndShare: "copy_and_share" | |
| 146 | - }, | |
| 147 | - pageList: { addNewPage: "add_new_page" } | |
| 148 | - }, | |
| 149 | - triggers: { | |
| 150 | - click: "Click", | |
| 151 | - rightClick: "Right Click", | |
| 152 | - doubleClick: "Double Click", | |
| 153 | - accordionClick: "Accordion Click", | |
| 154 | - toggleClick: "Toggle Click", | |
| 155 | - dropdownClick: "Click Dropdown", | |
| 156 | - editorLoaded: "Editor Loaded", | |
| 157 | - visible: "Visible", | |
| 158 | - pageLoaded: "Page Loaded", | |
| 159 | - typing: "Typing", | |
| 160 | - tabSelect: "Tab Select", | |
| 161 | - insert: "Insert", | |
| 162 | - hover: "Hover" | |
| 163 | - }, | |
| 164 | - locations: { | |
| 165 | - widgetPanel: "Widget Panel", | |
| 166 | - topBar: "Top Bar", | |
| 167 | - sidebar: "Sidebar", | |
| 168 | - elementorEditor: "Elementor Editor", | |
| 169 | - templatesLibrary: { library: "Templates Library" }, | |
| 170 | - app: { | |
| 171 | - import: "Import Kit", | |
| 172 | - export: "Export Kit", | |
| 173 | - kitLibrary: "Kit Library", | |
| 174 | - cloudKitLibrary: "Cloud Kit Library" | |
| 175 | - }, | |
| 176 | - variables: "Variables Panel", | |
| 177 | - variablesManager: "Variables Manager", | |
| 178 | - admin: "WP admin", | |
| 179 | - wpDashAdmin: "wpdash_admin", | |
| 180 | - structurePanel: "Structure Panel", | |
| 181 | - canvas: "Canvas", | |
| 182 | - leftPanel: "Left Panel", | |
| 183 | - elementorLibrary: "Elementor Library", | |
| 184 | - components: { instanceEditingPanel: "Instance Editing Panel" } | |
| 185 | - }, | |
| 186 | - secondaryLocations: { | |
| 187 | - layout: "Layout Section", | |
| 188 | - basic: "Basic Section", | |
| 189 | - "pro-elements": "Pro Section", | |
| 190 | - general: "General Section", | |
| 191 | - "theme-elements": "Site Section", | |
| 192 | - "theme-elements-single": "Single Section", | |
| 193 | - "woocommerce-elements": "WooCommerce Section", | |
| 194 | - wordpress: "WordPress Section", | |
| 195 | - categories: "Widgets Tab", | |
| 196 | - global: "Globals Tab", | |
| 197 | - "whats-new": "What's New", | |
| 198 | - "document-settings": "Document Settings icon", | |
| 199 | - "preview-page": "Preview Page", | |
| 200 | - "publish-button": "Publish Button", | |
| 201 | - "widget-panel": "Widget Panel Icon", | |
| 202 | - finder: "Finder", | |
| 203 | - help: "Help", | |
| 204 | - elementorLogoDropdown: "top_bar_elementor_logo_dropdown", | |
| 205 | - elementorLogo: "Elementor Logo", | |
| 206 | - eLogoMenu: "E-logo Menu", | |
| 207 | - notes: "Notes", | |
| 208 | - siteSettings: "Site Settings", | |
| 209 | - structure: "Structure", | |
| 210 | - documentNameDropdown: "Document Name dropdown", | |
| 211 | - responsiveControls: "Responsive controls", | |
| 212 | - launchpad: "launchpad", | |
| 213 | - checklistHeader: "Checklist Header", | |
| 214 | - checklistSteps: "Checklist Steps", | |
| 215 | - userPreferences: "User Preferences", | |
| 216 | - contextMenu: "Context Menu", | |
| 217 | - templateLibrary: { | |
| 218 | - saveModal: "Save to Modal", | |
| 219 | - moveModal: "Move to Modal", | |
| 220 | - bulkMoveModal: "Bulk Move to Modal", | |
| 221 | - copyModal: "Copy to Modal", | |
| 222 | - bulkCopyModal: "Bulk Copy to Modal", | |
| 223 | - saveModalSelectFolder: "Save to Modal - select folder", | |
| 224 | - saveModalSelectConnect: "Save to Modal - connect", | |
| 225 | - saveModalSelectUpgrade: "Save to Modal - upgrade", | |
| 226 | - importModal: "Import Modal", | |
| 227 | - newFolderModal: "New Folder Modal", | |
| 228 | - deleteDialog: "Delete Dialog", | |
| 229 | - deleteFolderDialog: "Delete Folder Dialog", | |
| 230 | - renameDialog: "Rename Dialog", | |
| 231 | - createFolderDialog: "Create Folder Dialog", | |
| 232 | - applySettingsDialog: "Apply Settings Dialog", | |
| 233 | - cloudTab: "Cloud Tab", | |
| 234 | - siteTab: "Site Tab", | |
| 235 | - cloudTabFolder: "Cloud Tab - Folder", | |
| 236 | - cloudTabConnect: "Cloud Tab - Connect", | |
| 237 | - cloudTabUpgrade: "Cloud Tab - Upgrade", | |
| 238 | - morePopup: "Context Menu", | |
| 239 | - quotaBar: "Quota Bar" | |
| 240 | - }, | |
| 241 | - kitLibrary: { | |
| 242 | - cloudKitLibrary: "kits_cloud_library", | |
| 243 | - cloudKitLibraryConnect: "kits_cloud_library_connect", | |
| 244 | - cloudKitLibraryUpgrade: "kits_cloud_library_upgrade", | |
| 245 | - kitExportCustomization: "kit_export_customization", | |
| 246 | - kitExport: "kit_export", | |
| 247 | - kitExportCustomizationEdit: "kit_export_customization_edit", | |
| 248 | - kitExportSummary: "kit_export_summary", | |
| 249 | - kitImportUploadBox: "kit_import_upload_box", | |
| 250 | - kitImportCustomization: "kit_import_customization", | |
| 251 | - kitImportSummary: "kit_import_summary" | |
| 252 | - }, | |
| 253 | - variablesPopover: "Variables Popover", | |
| 254 | - admin: { | |
| 255 | - pluginToolsTab: "plugin_tools_tab", | |
| 256 | - pluginWebsiteTemplatesTab: "plugin_website_templates_tab" | |
| 257 | - }, | |
| 258 | - componentsTab: "Components Tab", | |
| 259 | - canvasElement: "Canvas Element", | |
| 260 | - publishDropdown: "Publish Dropdown", | |
| 261 | - pageListDropdown: "Page List Dropdown", | |
| 262 | - emptyBox: "Empty Box", | |
| 263 | - searchBar: "Search Bar", | |
| 264 | - finderResults: "Finder Results", | |
| 265 | - libraryTabs: "Library Tabs", | |
| 266 | - assetCard: "Asset Card", | |
| 267 | - wpDashElementorCoreMenu: "elementor_editor_core_menu", | |
| 268 | - wpDashElementorCoreSubMenu: "elementor_editor_core_sub_menu", | |
| 269 | - wpDashThemeBuilder: "wpdash_core_sub_menu_theme_builder" | |
| 270 | - }, | |
| 271 | - elements: { | |
| 272 | - accordionSection: "Accordion section", | |
| 273 | - buttonIcon: "Button Icon", | |
| 274 | - mainCta: "Main CTA", | |
| 275 | - button: "Button", | |
| 276 | - link: "Link", | |
| 277 | - dropdown: "Dropdown", | |
| 278 | - toggle: "Toggle", | |
| 279 | - launchpadChecklist: "Checklist popup" | |
| 280 | - }, | |
| 281 | - names: { | |
| 282 | - v1: { | |
| 283 | - layout: "v1_widgets_tab_layout_section", | |
| 284 | - basic: "v1_widgets_tab_basic_section", | |
| 285 | - "pro-elements": "v1_widgets_tab_pro_section", | |
| 286 | - general: "v1_widgets_tab_general_section", | |
| 287 | - "theme-elements": "v1_widgets_tab_site_section", | |
| 288 | - "theme-elements-single": "v1_widgets_tab_single_section", | |
| 289 | - "woocommerce-elements": "v1_widgets_tab_woocommerce_section", | |
| 290 | - wordpress: "v1_widgets_tab_wordpress_section", | |
| 291 | - categories: "v1_widgets_tab", | |
| 292 | - global: "v1_globals_tab" | |
| 293 | - }, | |
| 294 | - topBar: { | |
| 295 | - whatsNew: "top_bar_whats_new", | |
| 296 | - documentSettings: "top_bar_document_settings_icon", | |
| 297 | - previewPage: "top_bar_preview_page", | |
| 298 | - publishButton: "top_bar_publish_button", | |
| 299 | - widgetPanel: "top_bar_widget_panel_icon", | |
| 300 | - finder: "top_bar_finder", | |
| 301 | - help: "top_bar_help", | |
| 302 | - history: "top_bar_elementor_logo_dropdown_history", | |
| 303 | - userPreferences: "top_bar_elementor_logo_dropdown_user_preferences", | |
| 304 | - keyboardShortcuts: "top_bar_elementor_logo_dropdown_keyboard_shortcuts", | |
| 305 | - exitToWordpress: "top_bar_elementor_logo_dropdown_exit_to_wordpress", | |
| 306 | - themeBuilder: "top_bar_elementor_logo_dropdown_theme_builder", | |
| 307 | - notes: "top_bar_notes", | |
| 308 | - siteSettings: "top_bar_site_setting", | |
| 309 | - structure: "top_bar_structure", | |
| 310 | - documentNameDropdown: "top_bar_document_name_dropdown", | |
| 311 | - responsiveControls: "top_bar_responsive_controls", | |
| 312 | - launchpadOn: "top_bar_checklist_icon_show", | |
| 313 | - launchpadOff: "top_bar_checklist_icon_hide", | |
| 314 | - elementorLogoDropdown: "open_e_menu", | |
| 315 | - connectAccount: "connect_account", | |
| 316 | - accountConnected: "account_connected" | |
| 317 | - }, | |
| 318 | - elementorEditor: { | |
| 319 | - editorLoaded: "editor_loaded", | |
| 320 | - checklist: { | |
| 321 | - checklistHeaderClose: "checklist_header_close_icon", | |
| 322 | - checklistFirstPopup: "checklist popup triggered" | |
| 323 | - }, | |
| 324 | - userPreferences: { | |
| 325 | - checklistShow: "checklist_userpreferences_toggle_show", | |
| 326 | - checklistHide: "checklist_userpreferences_toggle_hide" | |
| 327 | - } | |
| 328 | - }, | |
| 329 | - variables: { | |
| 330 | - open: "open_variables_popover", | |
| 331 | - add: "add_new_variable", | |
| 332 | - connect: "connect_variable", | |
| 333 | - save: "save_new_variable", | |
| 334 | - update: "update_variable", | |
| 335 | - openManager: "open_variables_manager", | |
| 336 | - saveChanges: "save_variables_changes", | |
| 337 | - delete: "delete_variable", | |
| 338 | - variableSyncToV3: "variable_sync_to_v3" | |
| 339 | - }, | |
| 340 | - design_system: { | |
| 341 | - importOpened: "design_system_import_opened", | |
| 342 | - fileSelected: "design_system_file_selected", | |
| 343 | - validationFailed: "design_system_validation_failed", | |
| 344 | - conflictChoice: "design_system_conflict_choice", | |
| 345 | - confirmed: "design_system_import_confirmed", | |
| 346 | - imported: "design_system_imported", | |
| 347 | - importFailed: "design_system_import_failed", | |
| 348 | - export: "design_system_export", | |
| 349 | - opened: "design_system_opened" | |
| 350 | - }, | |
| 351 | - components: { | |
| 352 | - createClicked: "component_create_clicked", | |
| 353 | - createCancelled: "component_creation_cancelled", | |
| 354 | - created: "component_created", | |
| 355 | - instanceAdded: "component_instance_added", | |
| 356 | - edited: "component_edited", | |
| 357 | - propertiesPanelOpened: "component_properties_panel_opened", | |
| 358 | - propertiesGroupCreated: "component_properties_group_created", | |
| 359 | - propertyExposed: "component_property_exposed", | |
| 360 | - propertyRemoved: "component_property_removed", | |
| 361 | - detached: "component_detached" | |
| 362 | - }, | |
| 363 | - global_classes: { | |
| 364 | - classApplied: "class_applied", | |
| 365 | - classRemoved: "class_removed", | |
| 366 | - classManagerFilterCleared: "class_manager_filter_cleared", | |
| 367 | - classDeleted: "class_deleted", | |
| 368 | - classPublishConflict: "class_publish_conflict", | |
| 369 | - classRenamed: "class_renamed", | |
| 370 | - classCreated: "class_created", | |
| 371 | - classManagerSearched: "class_manager_searched", | |
| 372 | - classManagerFiltersOpened: "class_manager_filters_opened", | |
| 373 | - classManagerOpened: "class_manager_opened", | |
| 374 | - classManagerReorder: "class_manager_reorder", | |
| 375 | - classManagerFilterUsed: "class_manager_filter_used", | |
| 376 | - classUsageLocate: "class_usage_locate", | |
| 377 | - classUsageHovered: "class_usage_hovered", | |
| 378 | - classStyled: "class_styled", | |
| 379 | - classStateClicked: "class_state_clicked", | |
| 380 | - classUsageClicked: "class_usage_clicked", | |
| 381 | - classDuplicate: "class_duplicate", | |
| 382 | - classSyncToV3PopupShown: "class_sync_to_v3_popup_shown", | |
| 383 | - classSyncToV3: "class_sync_to_v3", | |
| 384 | - classSyncToV3PopupClick: "class_sync_to_v3_popup_click" | |
| 385 | - }, | |
| 386 | - editorOne: { | |
| 387 | - topBarPublishDropdown: "top_bar_publish_dropdown", | |
| 388 | - topBarPageList: "top_bar_page_list", | |
| 389 | - siteSettingsSession: "site_settings_session", | |
| 390 | - eLibraryNav: "e_library_nav", | |
| 391 | - eLibraryInsert: "e_library_insert", | |
| 392 | - eLibraryFavorite: "e_library_favorite", | |
| 393 | - eLibraryGenerateAi: "e_library_generate_ai", | |
| 394 | - finderSearchInput: "finder_search_input", | |
| 395 | - finderResultSelect: "finder_result_select", | |
| 396 | - canvasEmptyBoxAction: "canvas_empty_box_action", | |
| 397 | - widgetPanelSearch: "widget_panel_search", | |
| 398 | - wpDashElementorMenuClick: "wpdash_elementor_menu_click", | |
| 399 | - wpDashEditorSubMenuHover: "wpdash_editor_sub_menu_hover", | |
| 400 | - wpDashThemeBuilderClick: "wpdash_theme_builder_click", | |
| 401 | - sidebarMenuItemClicked: "sidebar_menu_item_clicked", | |
| 402 | - sidebarMenuGroupToggled: "sidebar_menu_group_toggled" | |
| 403 | - }, | |
| 404 | - interactions: { created: "interactions_created" }, | |
| 405 | - promotions: { | |
| 406 | - viewPromotion: "view_promotion", | |
| 407 | - upgradePromotionClick: "upgrade_promotion_click" | |
| 408 | - } | |
| 409 | - } | |
| 410 | - }; | |
| 411 | 174 | |
| 412 | -//#endregion | |
| 413 | -//#region app/assets/js/event-track/apps-event-tracking.js | |
| 414 | - function ownKeys(e, r) { | |
| 415 | - var t = Object.keys(e); | |
| 416 | - if (Object.getOwnPropertySymbols) { | |
| 417 | - var o = Object.getOwnPropertySymbols(e); | |
| 418 | - r && (o = o.filter(function(r) { | |
| 419 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 420 | - })), t.push.apply(t, o); | |
| 421 | - } | |
| 422 | - return t; | |
| 423 | - } | |
| 424 | - function _objectSpread(e) { | |
| 425 | - for (var r = 1; r < arguments.length; r++) { | |
| 426 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 427 | - r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { | |
| 428 | - _defineProperty(e, r, t[r]); | |
| 429 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { | |
| 430 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 431 | - }); | |
| 432 | - } | |
| 433 | - return e; | |
| 434 | - } | |
| 435 | - var EVENTS_MAP = { | |
| 436 | - PAGE_VIEWS_WEBSITE_TEMPLATES: "page_views_website_templates", | |
| 437 | - KITS_CLOUD_UPGRADE_CLICKED: "kits_cloud_upgrade_clicked", | |
| 438 | - EXPORT_KIT_CUSTOMIZATION: "export_kit_customization", | |
| 439 | - IMPORT_KIT_CUSTOMIZATION: "import_kit_customization", | |
| 440 | - KIT_IMPORT_STATUS: "kit_import_status", | |
| 441 | - KIT_CLOUD_LIBRARY_APPLY: "kit_cloud_library_apply", | |
| 442 | - KIT_CLOUD_LIBRARY_DELETE: "kit_cloud_library_delete", | |
| 443 | - IMPORT_EXPORT_ADMIN_ACTION: "ie_admin_action", | |
| 444 | - KIT_IMPORT_UPLOAD_FILE: "kit_import_upload_file" | |
| 445 | - }; | |
| 446 | - var AppsEventTracking = /*#__PURE__*/ function() { | |
| 447 | - function AppsEventTracking() { | |
| 448 | - _classCallCheck(this, AppsEventTracking); | |
| 449 | - } | |
| 450 | - return _createClass(AppsEventTracking, null, [ | |
| 451 | - { | |
| 452 | - key: "dispatchEvent", | |
| 453 | - value: function dispatchEvent(eventName, payload) { | |
| 454 | - var _window$elementorComm; | |
| 455 | - var _window$elementorComm2; | |
| 456 | - return (_window$elementorComm = window.elementorCommon) === null || _window$elementorComm === void 0 || (_window$elementorComm = _window$elementorComm.eventsManager) === null || _window$elementorComm === void 0 || (_window$elementorComm2 = _window$elementorComm.dispatchEvent) === null || _window$elementorComm2 === void 0 ? void 0 : _window$elementorComm2.call(_window$elementorComm, eventName, payload); | |
| 457 | - } | |
| 458 | - }, | |
| 459 | - { | |
| 460 | - key: "sendPageViewsWebsiteTemplates", | |
| 461 | - value: function sendPageViewsWebsiteTemplates(page) { | |
| 462 | - return this.dispatchEvent(EVENTS_MAP.PAGE_VIEWS_WEBSITE_TEMPLATES, { | |
| 463 | - trigger: eventsConfig.triggers.pageLoaded, | |
| 464 | - page_loaded: page, | |
| 465 | - secondary_location: page | |
| 466 | - }); | |
| 467 | - } | |
| 468 | - }, | |
| 469 | - { | |
| 470 | - key: "sendKitsCloudUpgradeClicked", | |
| 471 | - value: function sendKitsCloudUpgradeClicked(upgradeLocation) { | |
| 472 | - return this.dispatchEvent(EVENTS_MAP.KITS_CLOUD_UPGRADE_CLICKED, { | |
| 473 | - trigger: eventsConfig.triggers.click, | |
| 474 | - secondary_location: upgradeLocation, | |
| 475 | - upgrade_location: upgradeLocation | |
| 476 | - }); | |
| 477 | - } | |
| 478 | - }, | |
| 479 | - { | |
| 480 | - key: "sendExportKitCustomization", | |
| 481 | - value: function sendExportKitCustomization(payload) { | |
| 482 | - return this.dispatchEvent(EVENTS_MAP.EXPORT_KIT_CUSTOMIZATION, _objectSpread({ trigger: eventsConfig.triggers.click }, payload)); | |
| 483 | - } | |
| 484 | - }, | |
| 485 | - { | |
| 486 | - key: "sendImportKitCustomization", | |
| 487 | - value: function sendImportKitCustomization(payload) { | |
| 488 | - return this.dispatchEvent(EVENTS_MAP.IMPORT_KIT_CUSTOMIZATION, _objectSpread({ trigger: eventsConfig.triggers.click }, payload)); | |
| 489 | - } | |
| 490 | - }, | |
| 491 | - { | |
| 492 | - key: "sendKitImportStatus", | |
| 493 | - value: function sendKitImportStatus() { | |
| 494 | - var error = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null; | |
| 495 | - var isError = !!error; | |
| 496 | - return this.dispatchEvent(EVENTS_MAP.KIT_IMPORT_STATUS, _objectSpread({ kit_import_status: !isError }, isError && { kit_import_error: error.message })); | |
| 497 | - } | |
| 498 | - }, | |
| 499 | - { | |
| 500 | - key: "sendKitCloudLibraryApply", | |
| 501 | - value: function sendKitCloudLibraryApply(kitId, kitApplyUrl) { | |
| 502 | - return this.dispatchEvent(EVENTS_MAP.KIT_CLOUD_LIBRARY_APPLY, _objectSpread({ | |
| 503 | - trigger: eventsConfig.triggers.click, | |
| 504 | - kit_cloud_id: kitId | |
| 505 | - }, kitApplyUrl && { kit_apply_url: kitApplyUrl })); | |
| 506 | - } | |
| 507 | - }, | |
| 508 | - { | |
| 509 | - key: "sendKitCloudLibraryDelete", | |
| 510 | - value: function sendKitCloudLibraryDelete() { | |
| 511 | - return this.dispatchEvent(EVENTS_MAP.KIT_CLOUD_LIBRARY_DELETE, { trigger: eventsConfig.triggers.click }); | |
| 512 | - } | |
| 513 | - }, | |
| 514 | - { | |
| 515 | - key: "sendImportExportAdminAction", | |
| 516 | - value: function sendImportExportAdminAction(actionType) { | |
| 517 | - return this.dispatchEvent(EVENTS_MAP.IMPORT_EXPORT_ADMIN_ACTION, { | |
| 518 | - trigger: eventsConfig.triggers.click, | |
| 519 | - action_type: actionType | |
| 520 | - }); | |
| 521 | - } | |
| 522 | - }, | |
| 523 | - { | |
| 524 | - key: "sendKitImportUploadFile", | |
| 525 | - value: function sendKitImportUploadFile(status) { | |
| 526 | - return this.dispatchEvent(EVENTS_MAP.KIT_IMPORT_UPLOAD_FILE, { kit_import_upload_file_status: status }); | |
| 527 | - } | |
| 528 | - } | |
| 529 | - ]); | |
| 530 | - }(); | |
| 175 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 176 | +Object.defineProperty(exports, "__esModule", ({ | |
| 177 | + value: true | |
| 178 | +})); | |
| 179 | +exports.ImportExportError = void 0; | |
| 180 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 181 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 182 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 183 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 184 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 185 | +var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js")); | |
| 186 | +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)); } | |
| 187 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 188 | +var ImportExportError = exports.ImportExportError = /*#__PURE__*/function (_Error) { | |
| 189 | + function ImportExportError(errorMessage, errorCode) { | |
| 190 | + var _this; | |
| 191 | + (0, _classCallCheck2.default)(this, ImportExportError); | |
| 192 | + _this = _callSuper(this, ImportExportError, ['string' === typeof errorMessage ? errorMessage : '']); | |
| 193 | + _this.code = errorCode || 'general'; | |
| 194 | + _this.details = errorMessage; | |
| 195 | + return _this; | |
| 196 | + } | |
| 197 | + (0, _inherits2.default)(ImportExportError, _Error); | |
| 198 | + return (0, _createClass2.default)(ImportExportError); | |
| 199 | +}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 531 | 200 | |
| 532 | -//#endregion | |
| 533 | -//#region node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js | |
| 534 | - function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 535 | - try { | |
| 536 | - var i = n[a](c); | |
| 537 | - var u = i.value; | |
| 538 | - } catch (n) { | |
| 539 | - e(n); | |
| 540 | - return; | |
| 541 | - } | |
| 542 | - i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 543 | - } | |
| 544 | - function _asyncToGenerator(n) { | |
| 545 | - return function() { | |
| 546 | - var t = this; | |
| 547 | - var e = arguments; | |
| 548 | - return new Promise(function(r, o) { | |
| 549 | - var a = n.apply(t, e); | |
| 550 | - function _next(n) { | |
| 551 | - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 552 | - } | |
| 553 | - function _throw(n) { | |
| 554 | - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 555 | - } | |
| 556 | - _next(void 0); | |
| 557 | - }); | |
| 558 | - }; | |
| 559 | - } | |
| 201 | +/***/ }), | |
| 560 | 202 | |
| 561 | -//#endregion | |
| 562 | -//#region node_modules/@babel/runtime/helpers/OverloadYield.js | |
| 563 | - var require_OverloadYield = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 564 | - function _OverloadYield(e, d) { | |
| 565 | - this.v = e, this.k = d; | |
| 566 | - } | |
| 567 | - module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 568 | - })); | |
| 203 | +/***/ "../app/modules/import-export-customization/assets/js/shared/revert-kit-handler.js": | |
| 204 | +/*!*****************************************************************************************!*\ | |
| 205 | + !*** ../app/modules/import-export-customization/assets/js/shared/revert-kit-handler.js ***! | |
| 206 | + \*****************************************************************************************/ | |
| 207 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 569 | 208 | |
| 570 | -//#endregion | |
| 571 | -//#region node_modules/@babel/runtime/helpers/regeneratorDefine.js | |
| 572 | - var require_regeneratorDefine = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 573 | - function _regeneratorDefine(e, r, n, t) { | |
| 574 | - var i = Object.defineProperty; | |
| 575 | - try { | |
| 576 | - i({}, "", {}); | |
| 577 | - } catch (e) { | |
| 578 | - i = 0; | |
| 579 | - } | |
| 580 | - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 581 | - function o(r, n) { | |
| 582 | - _regeneratorDefine(e, r, function(e) { | |
| 583 | - return this._invoke(r, n, e); | |
| 584 | - }); | |
| 585 | - } | |
| 586 | - r ? i ? i(e, r, { | |
| 587 | - value: n, | |
| 588 | - enumerable: !t, | |
| 589 | - configurable: !t, | |
| 590 | - writable: !t | |
| 591 | - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 592 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 593 | - } | |
| 594 | - module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 595 | - })); | |
| 209 | +"use strict"; | |
| 210 | +/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 596 | 211 | |
| 597 | -//#endregion | |
| 598 | -//#region node_modules/@babel/runtime/helpers/regenerator.js | |
| 599 | - var require_regenerator$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 600 | - var regeneratorDefine = require_regeneratorDefine(); | |
| 601 | - function _regenerator() { | |
| 602 | - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 603 | - var e; | |
| 604 | - var t; | |
| 605 | - var r = "function" == typeof Symbol ? Symbol : {}; | |
| 606 | - var n = r.iterator || "@@iterator"; | |
| 607 | - var o = r.toStringTag || "@@toStringTag"; | |
| 608 | - function i(r, n, o, i) { | |
| 609 | - var c = n && n.prototype instanceof Generator ? n : Generator; | |
| 610 | - var u = Object.create(c.prototype); | |
| 611 | - return regeneratorDefine(u, "_invoke", function(r, n, o) { | |
| 612 | - var i; | |
| 613 | - var c; | |
| 614 | - var u; | |
| 615 | - var f = 0; | |
| 616 | - var p = o || []; | |
| 617 | - var y = !1; | |
| 618 | - var G = { | |
| 619 | - p: 0, | |
| 620 | - n: 0, | |
| 621 | - v: e, | |
| 622 | - a: d, | |
| 623 | - f: d.bind(e, 4), | |
| 624 | - d: function d(t, r) { | |
| 625 | - return i = t, c = 0, u = e, G.n = r, a; | |
| 626 | - } | |
| 627 | - }; | |
| 628 | - function d(r, n) { | |
| 629 | - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 630 | - var o; | |
| 631 | - var i = p[t]; | |
| 632 | - var d = G.p; | |
| 633 | - var l = i[2]; | |
| 634 | - 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)); | |
| 635 | - } | |
| 636 | - if (o || r > 1) return a; | |
| 637 | - throw y = !0, n; | |
| 638 | - } | |
| 639 | - return function(o, p, l) { | |
| 640 | - if (f > 1) throw TypeError("Generator is already running"); | |
| 641 | - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 642 | - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 643 | - try { | |
| 644 | - if (f = 2, i) { | |
| 645 | - if (c || (o = "next"), t = i[o]) { | |
| 646 | - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 647 | - if (!t.done) return t; | |
| 648 | - u = t.value, c < 2 && (c = 0); | |
| 649 | - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 650 | - i = e; | |
| 651 | - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 652 | - } catch (t) { | |
| 653 | - i = e, c = 1, u = t; | |
| 654 | - } finally { | |
| 655 | - f = 1; | |
| 656 | - } | |
| 657 | - } | |
| 658 | - return { | |
| 659 | - value: t, | |
| 660 | - done: y | |
| 661 | - }; | |
| 662 | - }; | |
| 663 | - }(r, o, i), !0), u; | |
| 664 | - } | |
| 665 | - var a = {}; | |
| 666 | - function Generator() {} | |
| 667 | - function GeneratorFunction() {} | |
| 668 | - function GeneratorFunctionPrototype() {} | |
| 669 | - t = Object.getPrototypeOf; | |
| 670 | - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function() { | |
| 671 | - return this; | |
| 672 | - }), t); | |
| 673 | - var u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 674 | - function f(e) { | |
| 675 | - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 676 | - } | |
| 677 | - 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() { | |
| 678 | - return this; | |
| 679 | - }), regeneratorDefine(u, "toString", function() { | |
| 680 | - return "[object Generator]"; | |
| 681 | - }), (module.exports = _regenerator = function _regenerator() { | |
| 682 | - return { | |
| 683 | - w: i, | |
| 684 | - m: f | |
| 685 | - }; | |
| 686 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 687 | - } | |
| 688 | - module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 689 | - })); | |
| 690 | 212 | |
| 691 | -//#endregion | |
| 692 | -//#region node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js | |
| 693 | - var require_regeneratorAsyncIterator = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 694 | - var OverloadYield = require_OverloadYield(); | |
| 695 | - var regeneratorDefine = require_regeneratorDefine(); | |
| 696 | - function AsyncIterator(t, e) { | |
| 697 | - function n(r, o, i, f) { | |
| 698 | - try { | |
| 699 | - var c = t[r](o); | |
| 700 | - var u = c.value; | |
| 701 | - return u instanceof OverloadYield ? e.resolve(u.v).then(function(t) { | |
| 702 | - n("next", t, i, f); | |
| 703 | - }, function(t) { | |
| 704 | - n("throw", t, i, f); | |
| 705 | - }) : e.resolve(u).then(function(t) { | |
| 706 | - c.value = t, i(c); | |
| 707 | - }, function(t) { | |
| 708 | - return n("throw", t, i, f); | |
| 709 | - }); | |
| 710 | - } catch (t) { | |
| 711 | - f(t); | |
| 712 | - } | |
| 713 | - } | |
| 714 | - var r; | |
| 715 | - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function() { | |
| 716 | - return this; | |
| 717 | - })), regeneratorDefine(this, "_invoke", function(t, o, i) { | |
| 718 | - function f() { | |
| 719 | - return new e(function(e, r) { | |
| 720 | - n(t, i, e, r); | |
| 721 | - }); | |
| 722 | - } | |
| 723 | - return r = r ? r.then(f, f) : f(); | |
| 724 | - }, !0); | |
| 725 | - } | |
| 726 | - module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 727 | - })); | |
| 213 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 214 | +Object.defineProperty(exports, "__esModule", ({ | |
| 215 | + value: true | |
| 216 | +})); | |
| 217 | +exports.RevertKitHandler = void 0; | |
| 218 | +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 219 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 220 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 221 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 222 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 223 | +var _apiRequest = __webpack_require__(/*! ./utils/api-request */ "../app/modules/import-export-customization/assets/js/shared/utils/api-request.js"); | |
| 224 | +var RevertKitHandler = exports.RevertKitHandler = /*#__PURE__*/function () { | |
| 225 | + function RevertKitHandler() { | |
| 226 | + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, | |
| 227 | + revertButton = _ref.revertButton, | |
| 228 | + onError = _ref.onError; | |
| 229 | + (0, _classCallCheck2.default)(this, RevertKitHandler); | |
| 230 | + this.revertButton = revertButton; | |
| 231 | + this.onError = onError || this.defaultErrorHandler.bind(this); | |
| 232 | + } | |
| 233 | + return (0, _createClass2.default)(RevertKitHandler, [{ | |
| 234 | + key: "revertKit", | |
| 235 | + value: function () { | |
| 236 | + var _revertKit = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 237 | + var activeKitName, confirmed, referrerKitId, returnTo, noAutomaticRedirect, _yield$this$callRever, data, _t; | |
| 238 | + return _regenerator.default.wrap(function (_context) { | |
| 239 | + while (1) switch (_context.prev = _context.next) { | |
| 240 | + case 0: | |
| 241 | + activeKitName = this.getActiveKitName(); | |
| 242 | + _context.next = 1; | |
| 243 | + return this.showConfirmationDialog(activeKitName); | |
| 244 | + case 1: | |
| 245 | + confirmed = _context.sent; | |
| 246 | + if (confirmed) { | |
| 247 | + _context.next = 2; | |
| 248 | + break; | |
| 249 | + } | |
| 250 | + return _context.abrupt("return"); | |
| 251 | + case 2: | |
| 252 | + _context.prev = 2; | |
| 253 | + referrerKitId = this.getReferrerKitId(); | |
| 254 | + returnTo = this.getReturnTo(); | |
| 255 | + noAutomaticRedirect = this.getNoAutomaticRedirect(); | |
| 256 | + this.saveToCache(referrerKitId, activeKitName, returnTo, noAutomaticRedirect); | |
| 257 | + _context.next = 3; | |
| 258 | + return this.callRevertAPI(); | |
| 259 | + case 3: | |
| 260 | + _yield$this$callRever = _context.sent; | |
| 261 | + data = _yield$this$callRever.data; | |
| 262 | + this.handleRevertResponse(data); | |
| 263 | + _context.next = 5; | |
| 264 | + break; | |
| 265 | + case 4: | |
| 266 | + _context.prev = 4; | |
| 267 | + _t = _context["catch"](2); | |
| 268 | + this.onError(_t); | |
| 269 | + case 5: | |
| 270 | + case "end": | |
| 271 | + return _context.stop(); | |
| 272 | + } | |
| 273 | + }, _callee, this, [[2, 4]]); | |
| 274 | + })); | |
| 275 | + function revertKit() { | |
| 276 | + return _revertKit.apply(this, arguments); | |
| 277 | + } | |
| 278 | + return revertKit; | |
| 279 | + }() | |
| 280 | + }, { | |
| 281 | + key: "callRevertAPI", | |
| 282 | + value: function () { | |
| 283 | + var _callRevertAPI = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { | |
| 284 | + var result; | |
| 285 | + return _regenerator.default.wrap(function (_context2) { | |
| 286 | + while (1) switch (_context2.prev = _context2.next) { | |
| 287 | + case 0: | |
| 288 | + _context2.next = 1; | |
| 289 | + return (0, _apiRequest.apiRequest)({ | |
| 290 | + path: RevertKitHandler.API_PATH | |
| 291 | + }); | |
| 292 | + case 1: | |
| 293 | + result = _context2.sent; | |
| 294 | + return _context2.abrupt("return", result); | |
| 295 | + case 2: | |
| 296 | + case "end": | |
| 297 | + return _context2.stop(); | |
| 298 | + } | |
| 299 | + }, _callee2); | |
| 300 | + })); | |
| 301 | + function callRevertAPI() { | |
| 302 | + return _callRevertAPI.apply(this, arguments); | |
| 303 | + } | |
| 304 | + return callRevertAPI; | |
| 305 | + }() | |
| 306 | + }, { | |
| 307 | + key: "handleRevertResponse", | |
| 308 | + value: function handleRevertResponse(data) { | |
| 309 | + if (!data.revert_completed) { | |
| 310 | + this.handleRevertNoSessions(data); | |
| 311 | + return; | |
| 312 | + } | |
| 313 | + this.showRevertCompletedDialog(data); | |
| 314 | + } | |
| 315 | + }, { | |
| 316 | + key: "showRevertCompletedDialog", | |
| 317 | + value: function showRevertCompletedDialog() { | |
| 318 | + var referrerKitId = this.getReferrerKitId(); | |
| 319 | + if (referrerKitId) { | |
| 320 | + this.showReferrerKitDialog(referrerKitId); | |
| 321 | + return; | |
| 322 | + } | |
| 323 | + this.showRevertSuccessDialog(); | |
| 324 | + } | |
| 325 | + }, { | |
| 326 | + key: "handleRevertNoSessions", | |
| 327 | + value: function handleRevertNoSessions(responseData) { | |
| 328 | + elementorCommon.dialogsManager.createWidget('alert', { | |
| 329 | + message: responseData.message || __('No import sessions available to revert.', 'elementor') | |
| 330 | + }).show(); | |
| 331 | + } | |
| 332 | + }, { | |
| 333 | + key: "showConfirmationDialog", | |
| 334 | + value: function () { | |
| 335 | + var _showConfirmationDialog = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(activeKitName) { | |
| 336 | + return _regenerator.default.wrap(function (_context3) { | |
| 337 | + while (1) switch (_context3.prev = _context3.next) { | |
| 338 | + case 0: | |
| 339 | + return _context3.abrupt("return", new Promise(function (resolve) { | |
| 340 | + elementorCommon.dialogsManager.createWidget('confirm', { | |
| 341 | + headerMessage: __('Are you sure?', 'elementor'), | |
| 342 | + /* Translators: %s: Kit name */ | |
| 343 | + message: __("Removing %s will permanently delete changes made to the Website Template's content and site settings", 'elementor').replace('%s', activeKitName), | |
| 344 | + strings: { | |
| 345 | + confirm: __('Delete', 'elementor'), | |
| 346 | + cancel: __('Cancel', 'elementor') | |
| 347 | + }, | |
| 348 | + onConfirm: function onConfirm() { | |
| 349 | + return resolve(true); | |
| 350 | + }, | |
| 351 | + onCancel: function onCancel() { | |
| 352 | + return resolve(false); | |
| 353 | + } | |
| 354 | + }).show(); | |
| 355 | + })); | |
| 356 | + case 1: | |
| 357 | + case "end": | |
| 358 | + return _context3.stop(); | |
| 359 | + } | |
| 360 | + }, _callee3); | |
| 361 | + })); | |
| 362 | + function showConfirmationDialog(_x) { | |
| 363 | + return _showConfirmationDialog.apply(this, arguments); | |
| 364 | + } | |
| 365 | + return showConfirmationDialog; | |
| 366 | + }() | |
| 367 | + }, { | |
| 368 | + key: "createSuccessHeaderMessage", | |
| 369 | + value: function createSuccessHeaderMessage() { | |
| 370 | + var _this$getDataFromCach = this.getDataFromCache(), | |
| 371 | + activeKitName = _this$getDataFromCach.activeKitName; | |
| 728 | 372 | |
| 729 | -//#endregion | |
| 730 | -//#region node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js | |
| 731 | - var require_regeneratorAsyncGen = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 732 | - var regenerator = require_regenerator$1(); | |
| 733 | - var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); | |
| 734 | - function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 735 | - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 736 | - } | |
| 737 | - module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 738 | - })); | |
| 373 | + /* Translators: %s: Kit name */ | |
| 374 | + return __('%s was successfully deleted', 'elementor').replace('%s', activeKitName); | |
| 375 | + } | |
| 376 | + }, { | |
| 377 | + key: "showRevertSuccessDialog", | |
| 378 | + value: function showRevertSuccessDialog() { | |
| 379 | + elementorCommon.dialogsManager.createWidget('confirm', { | |
| 380 | + id: RevertKitHandler.DIALOG_ID, | |
| 381 | + headerMessage: this.createSuccessHeaderMessage(), | |
| 382 | + message: __('Try a different Website Template or build your site from scratch.', 'elementor'), | |
| 383 | + strings: { | |
| 384 | + confirm: __('OK', 'elementor'), | |
| 385 | + cancel: __('Library', 'elementor') | |
| 386 | + }, | |
| 387 | + onConfirm: function onConfirm() { | |
| 388 | + location.reload(); | |
| 389 | + }, | |
| 390 | + onCancel: function onCancel() { | |
| 391 | + location.href = elementorImportExport.appUrl; | |
| 392 | + } | |
| 393 | + }).show(); | |
| 394 | + this.clearCache(); | |
| 395 | + } | |
| 396 | + }, { | |
| 397 | + key: "showReferrerKitDialog", | |
| 398 | + value: function showReferrerKitDialog(referrerKitId) { | |
| 399 | + var _this = this; | |
| 400 | + var _this$getDataFromCach2 = this.getDataFromCache(), | |
| 401 | + returnTo = _this$getDataFromCach2.returnTo, | |
| 402 | + noAutomaticRedirect = _this$getDataFromCach2.noAutomaticRedirect; | |
| 403 | + elementorCommon.dialogsManager.createWidget('confirm', { | |
| 404 | + id: RevertKitHandler.DIALOG_ID, | |
| 405 | + headerMessage: this.createSuccessHeaderMessage(), | |
| 406 | + message: __("You're ready to apply a new Kit!", 'elementor'), | |
| 407 | + strings: { | |
| 408 | + confirm: __('Continue to new Kit', 'elementor'), | |
| 409 | + cancel: __('Close', 'elementor') | |
| 410 | + }, | |
| 411 | + onConfirm: function onConfirm() { | |
| 412 | + location.href = _this.buildPreviewUrl(referrerKitId, returnTo, noAutomaticRedirect); | |
| 413 | + }, | |
| 414 | + onCancel: function onCancel() { | |
| 415 | + location.reload(); | |
| 416 | + } | |
| 417 | + }).show(); | |
| 418 | + this.clearCache(); | |
| 419 | + } | |
| 420 | + }, { | |
| 421 | + key: "buildPreviewUrl", | |
| 422 | + value: function buildPreviewUrl(referrerKitId, returnTo, noAutomaticRedirect) { | |
| 423 | + var baseUrl = elementorImportExport.appUrl + '/preview/' + referrerKitId; | |
| 424 | + var url = new URL(baseUrl); | |
| 425 | + if (returnTo) { | |
| 426 | + url.searchParams.append(RevertKitHandler.URL_PARAM_RETURN_TO, returnTo); | |
| 427 | + } | |
| 428 | + if (noAutomaticRedirect) { | |
| 429 | + url.searchParams.append(RevertKitHandler.URL_PARAM_NO_AUTOMATIC_REDIRECT, noAutomaticRedirect); | |
| 430 | + } | |
| 431 | + return url.toString(); | |
| 432 | + } | |
| 433 | + }, { | |
| 434 | + key: "maybeShowReferrerKitDialog", | |
| 435 | + value: function maybeShowReferrerKitDialog() { | |
| 436 | + var _this$getDataFromCach3 = this.getDataFromCache(), | |
| 437 | + referrerKitId = _this$getDataFromCach3.referrerKitId; | |
| 438 | + if (undefined === referrerKitId) { | |
| 439 | + return; | |
| 440 | + } | |
| 441 | + if (0 === referrerKitId.length) { | |
| 442 | + this.showRevertSuccessDialog(); | |
| 443 | + return; | |
| 444 | + } | |
| 445 | + this.showReferrerKitDialog(referrerKitId); | |
| 446 | + } | |
| 447 | + }, { | |
| 448 | + key: "getActiveKitName", | |
| 449 | + value: function getActiveKitName() { | |
| 450 | + var lastKit = elementorImportExport.lastImportedSession; | |
| 451 | + if (lastKit.kit_title) { | |
| 452 | + return lastKit.kit_title; | |
| 453 | + } | |
| 454 | + if (lastKit.kit_name) { | |
| 455 | + return this.convertNameToTitle(lastKit.kit_name); | |
| 456 | + } | |
| 457 | + return __('Your Kit', 'elementor'); | |
| 458 | + } | |
| 459 | + }, { | |
| 460 | + key: "convertNameToTitle", | |
| 461 | + value: function convertNameToTitle(name) { | |
| 462 | + var words = name.split(RevertKitHandler.NAME_SEPARATOR_PATTERN).filter(function (word) { | |
| 463 | + return word.length > 0; | |
| 464 | + }); | |
| 465 | + if (0 === words.length) { | |
| 466 | + return __('Your Kit', 'elementor'); | |
| 467 | + } | |
| 468 | + return words.map(function (word) { | |
| 469 | + return word[0].toUpperCase() + word.substring(1); | |
| 470 | + }).join(' '); | |
| 471 | + } | |
| 472 | + }, { | |
| 473 | + key: "getReferrerKitId", | |
| 474 | + value: function getReferrerKitId() { | |
| 475 | + var urlParams = new URLSearchParams(window.location.search); | |
| 476 | + var pageReferrerKit = urlParams.get(RevertKitHandler.URL_PARAM_REFERRER_KIT); | |
| 477 | + if (pageReferrerKit) { | |
| 478 | + return pageReferrerKit; | |
| 479 | + } | |
| 480 | + if (!this.revertButton) { | |
| 481 | + return ''; | |
| 482 | + } | |
| 483 | + return new URL(this.revertButton.href).searchParams.get(RevertKitHandler.URL_PARAM_REFERRER_KIT) || ''; | |
| 484 | + } | |
| 485 | + }, { | |
| 486 | + key: "getReturnTo", | |
| 487 | + value: function getReturnTo() { | |
| 488 | + var urlParams = new URLSearchParams(window.location.search); | |
| 489 | + return urlParams.get(RevertKitHandler.URL_PARAM_RETURN_TO) || ''; | |
| 490 | + } | |
| 491 | + }, { | |
| 492 | + key: "getNoAutomaticRedirect", | |
| 493 | + value: function getNoAutomaticRedirect() { | |
| 494 | + var urlParams = new URLSearchParams(window.location.search); | |
| 495 | + return urlParams.get(RevertKitHandler.URL_PARAM_NO_AUTOMATIC_REDIRECT) || ''; | |
| 496 | + } | |
| 497 | + }, { | |
| 498 | + key: "saveToCache", | |
| 499 | + value: function saveToCache(referrerKitId, activeKitName, returnTo, noAutomaticRedirect) { | |
| 500 | + sessionStorage.setItem(RevertKitHandler.KIT_DATA_KEY, JSON.stringify({ | |
| 501 | + referrerKitId: referrerKitId || '', | |
| 502 | + activeKitName: activeKitName || '', | |
| 503 | + returnTo: returnTo || '', | |
| 504 | + noAutomaticRedirect: noAutomaticRedirect || '' | |
| 505 | + })); | |
| 506 | + } | |
| 507 | + }, { | |
| 508 | + key: "getDataFromCache", | |
| 509 | + value: function getDataFromCache() { | |
| 510 | + try { | |
| 511 | + return JSON.parse(sessionStorage.getItem(RevertKitHandler.KIT_DATA_KEY)) || {}; | |
| 512 | + } catch (e) { | |
| 513 | + return {}; | |
| 514 | + } | |
| 515 | + } | |
| 516 | + }, { | |
| 517 | + key: "clearCache", | |
| 518 | + value: function clearCache() { | |
| 519 | + sessionStorage.removeItem(RevertKitHandler.KIT_DATA_KEY); | |
| 520 | + } | |
| 521 | + }, { | |
| 522 | + key: "defaultErrorHandler", | |
| 523 | + value: function defaultErrorHandler() { | |
| 524 | + elementorCommon.dialogsManager.createWidget('alert', { | |
| 525 | + message: __('An error occurred while reverting the kit. Please try again.', 'elementor') | |
| 526 | + }).show(); | |
| 527 | + } | |
| 528 | + }]); | |
| 529 | +}(); | |
| 530 | +(0, _defineProperty2.default)(RevertKitHandler, "API_PATH", 'revert'); | |
| 531 | +(0, _defineProperty2.default)(RevertKitHandler, "DIALOG_ID", 'e-revert-kit-deleted-dialog'); | |
| 532 | +(0, _defineProperty2.default)(RevertKitHandler, "URL_PARAM_REFERRER_KIT", 'referrer_kit'); | |
| 533 | +(0, _defineProperty2.default)(RevertKitHandler, "URL_PARAM_RETURN_TO", 'return_to'); | |
| 534 | +(0, _defineProperty2.default)(RevertKitHandler, "URL_PARAM_NO_AUTOMATIC_REDIRECT", 'no_automatic_redirect'); | |
| 535 | +(0, _defineProperty2.default)(RevertKitHandler, "KIT_DATA_KEY", 'elementor-kit-data'); | |
| 536 | +(0, _defineProperty2.default)(RevertKitHandler, "NAME_SEPARATOR_PATTERN", /[-_]+/); | |
| 739 | 537 | |
| 740 | -//#endregion | |
| 741 | -//#region node_modules/@babel/runtime/helpers/regeneratorAsync.js | |
| 742 | - var require_regeneratorAsync = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 743 | - var regeneratorAsyncGen = require_regeneratorAsyncGen(); | |
| 744 | - function _regeneratorAsync(n, e, r, t, o) { | |
| 745 | - var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 746 | - return a.next().then(function(n) { | |
| 747 | - return n.done ? n.value : a.next(); | |
| 748 | - }); | |
| 749 | - } | |
| 750 | - module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 751 | - })); | |
| 538 | +/***/ }), | |
| 752 | 539 | |
| 753 | -//#endregion | |
| 754 | -//#region node_modules/@babel/runtime/helpers/regeneratorKeys.js | |
| 755 | - var require_regeneratorKeys = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 756 | - function _regeneratorKeys(e) { | |
| 757 | - var n = Object(e); | |
| 758 | - var r = []; | |
| 759 | - for (var t in n) r.unshift(t); | |
| 760 | - return function e() { | |
| 761 | - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 762 | - return e.done = !0, e; | |
| 763 | - }; | |
| 764 | - } | |
| 765 | - module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 766 | - })); | |
| 540 | +/***/ "../app/modules/import-export-customization/assets/js/shared/utils/api-fetch-config.js": | |
| 541 | +/*!*********************************************************************************************!*\ | |
| 542 | + !*** ../app/modules/import-export-customization/assets/js/shared/utils/api-fetch-config.js ***! | |
| 543 | + \*********************************************************************************************/ | |
| 544 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 767 | 545 | |
| 768 | -//#endregion | |
| 769 | -//#region node_modules/@babel/runtime/helpers/typeof.js | |
| 770 | - var require_typeof = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 771 | - function _typeof(o) { | |
| 772 | - "@babel/helpers - typeof"; | |
| 773 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 774 | - return typeof o; | |
| 775 | - } : function(o) { | |
| 776 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 777 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 778 | - } | |
| 779 | - module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 780 | - })); | |
| 546 | +"use strict"; | |
| 781 | 547 | |
| 782 | -//#endregion | |
| 783 | -//#region node_modules/@babel/runtime/helpers/regeneratorValues.js | |
| 784 | - var require_regeneratorValues = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 785 | - var _typeof = require_typeof()["default"]; | |
| 786 | - function _regeneratorValues(e) { | |
| 787 | - if (null != e) { | |
| 788 | - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"]; | |
| 789 | - var r = 0; | |
| 790 | - if (t) return t.call(e); | |
| 791 | - if ("function" == typeof e.next) return e; | |
| 792 | - if (!isNaN(e.length)) return { next: function next() { | |
| 793 | - return e && r >= e.length && (e = void 0), { | |
| 794 | - value: e && e[r++], | |
| 795 | - done: !e | |
| 796 | - }; | |
| 797 | - } }; | |
| 798 | - } | |
| 799 | - throw new TypeError(_typeof(e) + " is not iterable"); | |
| 800 | - } | |
| 801 | - module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 802 | - })); | |
| 803 | 548 | |
| 804 | -//#endregion | |
| 805 | -//#region node_modules/@babel/runtime/helpers/regeneratorRuntime.js | |
| 806 | - var require_regeneratorRuntime = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 807 | - var OverloadYield = require_OverloadYield(); | |
| 808 | - var regenerator = require_regenerator$1(); | |
| 809 | - var regeneratorAsync = require_regeneratorAsync(); | |
| 810 | - var regeneratorAsyncGen = require_regeneratorAsyncGen(); | |
| 811 | - var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); | |
| 812 | - var regeneratorKeys = require_regeneratorKeys(); | |
| 813 | - var regeneratorValues = require_regeneratorValues(); | |
| 814 | - function _regeneratorRuntime() { | |
| 815 | - "use strict"; | |
| 816 | - var r = regenerator(); | |
| 817 | - var e = r.m(_regeneratorRuntime); | |
| 818 | - var t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 819 | - function n(r) { | |
| 820 | - var e = "function" == typeof r && r.constructor; | |
| 821 | - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 822 | - } | |
| 823 | - var o = { | |
| 824 | - "throw": 1, | |
| 825 | - "return": 2, | |
| 826 | - "break": 3, | |
| 827 | - "continue": 3 | |
| 828 | - }; | |
| 829 | - function a(r) { | |
| 830 | - var e; | |
| 831 | - var t; | |
| 832 | - return function(n) { | |
| 833 | - e || (e = { | |
| 834 | - stop: function stop() { | |
| 835 | - return t(n.a, 2); | |
| 836 | - }, | |
| 837 | - "catch": function _catch() { | |
| 838 | - return n.v; | |
| 839 | - }, | |
| 840 | - abrupt: function abrupt(r, e) { | |
| 841 | - return t(n.a, o[r], e); | |
| 842 | - }, | |
| 843 | - delegateYield: function delegateYield(r, o, a) { | |
| 844 | - return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 845 | - }, | |
| 846 | - finish: function finish(r) { | |
| 847 | - return t(n.f, r); | |
| 848 | - } | |
| 849 | - }, t = function t(r, _t, o) { | |
| 850 | - n.p = e.prev, n.n = e.next; | |
| 851 | - try { | |
| 852 | - return r(_t, o); | |
| 853 | - } finally { | |
| 854 | - e.next = n.n; | |
| 855 | - } | |
| 856 | - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 857 | - try { | |
| 858 | - return r.call(this, e); | |
| 859 | - } finally { | |
| 860 | - n.p = e.prev, n.n = e.next; | |
| 861 | - } | |
| 862 | - }; | |
| 863 | - } | |
| 864 | - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 865 | - return { | |
| 866 | - wrap: function wrap(e, t, n, o) { | |
| 867 | - return r.w(a(e), t, n, o && o.reverse()); | |
| 868 | - }, | |
| 869 | - isGeneratorFunction: n, | |
| 870 | - mark: r.m, | |
| 871 | - awrap: function awrap(r, e) { | |
| 872 | - return new OverloadYield(r, e); | |
| 873 | - }, | |
| 874 | - AsyncIterator: regeneratorAsyncIterator, | |
| 875 | - async: function async(r, e, t, o, u) { | |
| 876 | - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 877 | - }, | |
| 878 | - keys: regeneratorKeys, | |
| 879 | - values: regeneratorValues | |
| 880 | - }; | |
| 881 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 882 | - } | |
| 883 | - module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 884 | - })); | |
| 549 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 550 | +Object.defineProperty(exports, "__esModule", ({ | |
| 551 | + value: true | |
| 552 | +})); | |
| 553 | +exports.configureApiFetch = configureApiFetch; | |
| 554 | +exports.resetApiFetchConfig = resetApiFetchConfig; | |
| 555 | +var _apiFetch = _interopRequireDefault(__webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch")); | |
| 556 | +var _importExportError = __webpack_require__(/*! ../error/import-export-error */ "../app/modules/import-export-customization/assets/js/shared/error/import-export-error.js"); | |
| 557 | +var isApiConfigured = false; | |
| 558 | +function configureApiFetch() { | |
| 559 | + var _window$elementorAppC; | |
| 560 | + if (isApiConfigured) { | |
| 561 | + return; | |
| 562 | + } | |
| 563 | + var config = (_window$elementorAppC = window.elementorAppConfig) === null || _window$elementorAppC === void 0 ? void 0 : _window$elementorAppC['import-export-customization']; | |
| 564 | + if (!config) { | |
| 565 | + throw new _importExportError.ImportExportError('Configuration not found. Please refresh the page.', 'config_missing'); | |
| 566 | + } | |
| 567 | + if (config.restNonce) { | |
| 568 | + _apiFetch.default.use(_apiFetch.default.createNonceMiddleware(config.restNonce)); | |
| 569 | + } | |
| 570 | + if (config.restUrl) { | |
| 571 | + _apiFetch.default.use(_apiFetch.default.createRootURLMiddleware(config.restUrl)); | |
| 572 | + } | |
| 573 | + isApiConfigured = true; | |
| 574 | +} | |
| 575 | +function resetApiFetchConfig() { | |
| 576 | + isApiConfigured = false; | |
| 577 | +} | |
| 885 | 578 | |
| 886 | -//#endregion | |
| 887 | -//#region node_modules/@babel/runtime/regenerator/index.js | |
| 888 | - var require_regenerator = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 889 | - var runtime = require_regeneratorRuntime()(); | |
| 890 | - module.exports = runtime; | |
| 891 | - try { | |
| 892 | - regeneratorRuntime = runtime; | |
| 893 | - } catch (accidentalStrictMode) { | |
| 894 | - if (typeof globalThis === "object") globalThis.regeneratorRuntime = runtime; | |
| 895 | - else Function("r", "regeneratorRuntime = r")(runtime); | |
| 896 | - } | |
| 897 | - })); | |
| 579 | +/***/ }), | |
| 898 | 580 | |
| 899 | -//#endregion | |
| 900 | -//#region node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js | |
| 901 | -var import_regenerator = /* @__PURE__ */ __toESM(require_regenerator()); | |
| 902 | - function _assertThisInitialized(e) { | |
| 903 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 904 | - return e; | |
| 905 | - } | |
| 581 | +/***/ "../app/modules/import-export-customization/assets/js/shared/utils/api-request.js": | |
| 582 | +/*!****************************************************************************************!*\ | |
| 583 | + !*** ../app/modules/import-export-customization/assets/js/shared/utils/api-request.js ***! | |
| 584 | + \****************************************************************************************/ | |
| 585 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 906 | 586 | |
| 907 | -//#endregion | |
| 908 | -//#region node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js | |
| 909 | - function _possibleConstructorReturn(t, e) { | |
| 910 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 911 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 912 | - return _assertThisInitialized(t); | |
| 913 | - } | |
| 587 | +"use strict"; | |
| 914 | 588 | |
| 915 | -//#endregion | |
| 916 | -//#region node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js | |
| 917 | - function _getPrototypeOf(t) { | |
| 918 | - return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { | |
| 919 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 920 | - }, _getPrototypeOf(t); | |
| 921 | - } | |
| 922 | 589 | |
| 923 | -//#endregion | |
| 924 | -//#region node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js | |
| 925 | - function _setPrototypeOf(t, e) { | |
| 926 | - return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) { | |
| 927 | - return t.__proto__ = e, t; | |
| 928 | - }, _setPrototypeOf(t, e); | |
| 929 | - } | |
| 590 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 591 | +Object.defineProperty(exports, "__esModule", ({ | |
| 592 | + value: true | |
| 593 | +})); | |
| 594 | +exports.apiRequest = apiRequest; | |
| 595 | +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 596 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 597 | +var _apiFetch = _interopRequireDefault(__webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch")); | |
| 598 | +var _importExportError = __webpack_require__(/*! ../error/import-export-error */ "../app/modules/import-export-customization/assets/js/shared/error/import-export-error.js"); | |
| 599 | +var _apiFetchConfig = __webpack_require__(/*! ./api-fetch-config */ "../app/modules/import-export-customization/assets/js/shared/utils/api-fetch-config.js"); | |
| 600 | +var HTTP_STATUS = { | |
| 601 | + REQUEST_TIMEOUT: 408 | |
| 602 | +}; | |
| 603 | +var HTTP_METHODS = { | |
| 604 | + CREATABLE: 'POST' | |
| 605 | +}; | |
| 606 | +function apiRequest(_x) { | |
| 607 | + return _apiRequest.apply(this, arguments); | |
| 608 | +} | |
| 609 | +function _apiRequest() { | |
| 610 | + _apiRequest = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(_ref) { | |
| 611 | + var _ref$data, data, path, _ref$method, method, requestOptions, _t; | |
| 612 | + return _regenerator.default.wrap(function (_context) { | |
| 613 | + while (1) switch (_context.prev = _context.next) { | |
| 614 | + case 0: | |
| 615 | + _ref$data = _ref.data, data = _ref$data === void 0 ? null : _ref$data, path = _ref.path, _ref$method = _ref.method, method = _ref$method === void 0 ? HTTP_METHODS.CREATABLE : _ref$method; | |
| 616 | + (0, _apiFetchConfig.configureApiFetch)(); | |
| 617 | + _context.prev = 1; | |
| 618 | + requestOptions = { | |
| 619 | + path: "/elementor/v1/import-export-customization/".concat(path), | |
| 620 | + method: method | |
| 621 | + }; | |
| 622 | + if (data && HTTP_METHODS.CREATABLE === method) { | |
| 623 | + requestOptions.data = data; | |
| 624 | + } | |
| 625 | + _context.next = 2; | |
| 626 | + return (0, _apiFetch.default)(requestOptions); | |
| 627 | + case 2: | |
| 628 | + return _context.abrupt("return", _context.sent); | |
| 629 | + case 3: | |
| 630 | + _context.prev = 3; | |
| 631 | + _t = _context["catch"](1); | |
| 632 | + handleApiFetchError(_t); | |
| 633 | + case 4: | |
| 634 | + case "end": | |
| 635 | + return _context.stop(); | |
| 636 | + } | |
| 637 | + }, _callee, null, [[1, 3]]); | |
| 638 | + })); | |
| 639 | + return _apiRequest.apply(this, arguments); | |
| 640 | +} | |
| 641 | +function handleApiFetchError(error) { | |
| 642 | + var errorMessage = (error === null || error === void 0 ? void 0 : error.message) || 'An unknown error occurred'; | |
| 643 | + var errorCode = 'general'; | |
| 644 | + if (error !== null && error !== void 0 && error.code) { | |
| 645 | + errorCode = error.code; | |
| 646 | + } else if (error !== null && error !== void 0 && error.status) { | |
| 647 | + errorCode = HTTP_STATUS.REQUEST_TIMEOUT === error.status ? 'timeout' : error.status; | |
| 648 | + } | |
| 649 | + throw new _importExportError.ImportExportError(errorMessage, errorCode); | |
| 650 | +} | |
| 930 | 651 | |
| 931 | -//#endregion | |
| 932 | -//#region node_modules/@babel/runtime/helpers/esm/inherits.js | |
| 933 | - function _inherits(t, e) { | |
| 934 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 935 | - t.prototype = Object.create(e && e.prototype, { constructor: { | |
| 936 | - value: t, | |
| 937 | - writable: !0, | |
| 938 | - configurable: !0 | |
| 939 | - } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); | |
| 940 | - } | |
| 652 | +/***/ }), | |
| 941 | 653 | |
| 942 | -//#endregion | |
| 943 | -//#region node_modules/@babel/runtime/helpers/esm/isNativeFunction.js | |
| 944 | - function _isNativeFunction(t) { | |
| 945 | - try { | |
| 946 | - return -1 !== Function.toString.call(t).indexOf("[native code]"); | |
| 947 | - } catch (n) { | |
| 948 | - return "function" == typeof t; | |
| 949 | - } | |
| 950 | - } | |
| 654 | +/***/ "../core/common/modules/events-manager/assets/js/events-config.js": | |
| 655 | +/*!************************************************************************!*\ | |
| 656 | + !*** ../core/common/modules/events-manager/assets/js/events-config.js ***! | |
| 657 | + \************************************************************************/ | |
| 658 | +/***/ ((__unused_webpack_module, exports) => { | |
| 951 | 659 | |
| 952 | -//#endregion | |
| 953 | -//#region node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js | |
| 954 | - function _isNativeReflectConstruct$1() { | |
| 955 | - try { | |
| 956 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 957 | - } catch (t) {} | |
| 958 | - return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { | |
| 959 | - return !!t; | |
| 960 | - })(); | |
| 961 | - } | |
| 962 | - __name(_isNativeReflectConstruct$1, "_isNativeReflectConstruct"); | |
| 660 | +"use strict"; | |
| 963 | 661 | |
| 964 | -//#endregion | |
| 965 | -//#region node_modules/@babel/runtime/helpers/esm/construct.js | |
| 966 | - function _construct(t, e, r) { | |
| 967 | - if (_isNativeReflectConstruct$1()) return Reflect.construct.apply(null, arguments); | |
| 968 | - var o = [null]; | |
| 969 | - o.push.apply(o, e); | |
| 970 | - var p = new (t.bind.apply(t, o))(); | |
| 971 | - return r && _setPrototypeOf(p, r.prototype), p; | |
| 972 | - } | |
| 973 | 662 | |
| 974 | -//#endregion | |
| 975 | -//#region node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js | |
| 976 | - function _wrapNativeSuper(t) { | |
| 977 | - var r = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0; | |
| 978 | - return _wrapNativeSuper = function _wrapNativeSuper(t) { | |
| 979 | - if (null === t || !_isNativeFunction(t)) return t; | |
| 980 | - if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); | |
| 981 | - if (void 0 !== r) { | |
| 982 | - if (r.has(t)) return r.get(t); | |
| 983 | - r.set(t, Wrapper); | |
| 984 | - } | |
| 985 | - function Wrapper() { | |
| 986 | - return _construct(t, arguments, _getPrototypeOf(this).constructor); | |
| 987 | - } | |
| 988 | - return Wrapper.prototype = Object.create(t.prototype, { constructor: { | |
| 989 | - value: Wrapper, | |
| 990 | - enumerable: !1, | |
| 991 | - writable: !0, | |
| 992 | - configurable: !0 | |
| 993 | - } }), _setPrototypeOf(Wrapper, t); | |
| 994 | - }, _wrapNativeSuper(t); | |
| 995 | - } | |
| 663 | +Object.defineProperty(exports, "__esModule", ({ | |
| 664 | + value: true | |
| 665 | +})); | |
| 666 | +exports["default"] = void 0; | |
| 667 | +var eventsConfig = { | |
| 668 | + appTypes: { | |
| 669 | + editor: 'editor', | |
| 670 | + wpAdmin: 'wpadmin' | |
| 671 | + }, | |
| 672 | + targetTypes: { | |
| 673 | + dropdownItem: 'dropdown_item', | |
| 674 | + button: 'button', | |
| 675 | + tab: 'tab', | |
| 676 | + toggle: 'toggle', | |
| 677 | + searchInput: 'search_input', | |
| 678 | + searchResult: 'search_result', | |
| 679 | + buttons: 'buttons', | |
| 680 | + searchWidget: 'search_widget' | |
| 681 | + }, | |
| 682 | + interactionResults: { | |
| 683 | + actionSelected: 'action_selected', | |
| 684 | + navigate: 'navigate', | |
| 685 | + create: 'create', | |
| 686 | + sessionEnd: 'session_end', | |
| 687 | + tabChanged: 'tab_changed', | |
| 688 | + assetInserted: 'asset_inserted', | |
| 689 | + assetFavorite: 'asset_favorite', | |
| 690 | + aiGenerate: 'ai_generate', | |
| 691 | + resultsUpdated: 'results_updated', | |
| 692 | + noResults: 'no_results', | |
| 693 | + selected: 'selected', | |
| 694 | + promotionViewed: 'promotion_viewed', | |
| 695 | + upgradeNow: 'upgrade_now' | |
| 696 | + }, | |
| 697 | + targetNames: { | |
| 698 | + publishDropdown: { | |
| 699 | + saveDraft: 'save_draft', | |
| 700 | + saveAsTemplate: 'save_as_template', | |
| 701 | + viewPage: 'view_page', | |
| 702 | + copyAndShare: 'copy_and_share' | |
| 703 | + }, | |
| 704 | + pageList: { | |
| 705 | + addNewPage: 'add_new_page' | |
| 706 | + } | |
| 707 | + }, | |
| 708 | + triggers: { | |
| 709 | + click: 'Click', | |
| 710 | + rightClick: 'Right Click', | |
| 711 | + doubleClick: 'Double Click', | |
| 712 | + accordionClick: 'Accordion Click', | |
| 713 | + toggleClick: 'Toggle Click', | |
| 714 | + dropdownClick: 'Click Dropdown', | |
| 715 | + editorLoaded: 'Editor Loaded', | |
| 716 | + visible: 'Visible', | |
| 717 | + pageLoaded: 'Page Loaded', | |
| 718 | + typing: 'Typing', | |
| 719 | + tabSelect: 'Tab Select', | |
| 720 | + insert: 'Insert' | |
| 721 | + }, | |
| 722 | + locations: { | |
| 723 | + widgetPanel: 'Widget Panel', | |
| 724 | + topBar: 'Top Bar', | |
| 725 | + sidebar: 'Sidebar', | |
| 726 | + elementorEditor: 'Elementor Editor', | |
| 727 | + templatesLibrary: { | |
| 728 | + library: 'Templates Library' | |
| 729 | + }, | |
| 730 | + app: { | |
| 731 | + import: 'Import Kit', | |
| 732 | + export: 'Export Kit', | |
| 733 | + kitLibrary: 'Kit Library', | |
| 734 | + cloudKitLibrary: 'Cloud Kit Library' | |
| 735 | + }, | |
| 736 | + variables: 'Variables Panel', | |
| 737 | + variablesManager: 'Variables Manager', | |
| 738 | + admin: 'WP admin', | |
| 739 | + structurePanel: 'Structure Panel', | |
| 740 | + canvas: 'Canvas', | |
| 741 | + leftPanel: 'Left Panel', | |
| 742 | + elementorLibrary: 'Elementor Library', | |
| 743 | + components: { | |
| 744 | + instanceEditingPanel: 'Instance Editing Panel' | |
| 745 | + } | |
| 746 | + }, | |
| 747 | + secondaryLocations: { | |
| 748 | + layout: 'Layout Section', | |
| 749 | + basic: 'Basic Section', | |
| 750 | + 'pro-elements': 'Pro Section', | |
| 751 | + general: 'General Section', | |
| 752 | + 'theme-elements': 'Site Section', | |
| 753 | + 'theme-elements-single': 'Single Section', | |
| 754 | + 'woocommerce-elements': 'WooCommerce Section', | |
| 755 | + wordpress: 'WordPress Section', | |
| 756 | + categories: 'Widgets Tab', | |
| 757 | + global: 'Globals Tab', | |
| 758 | + 'whats-new': 'What\'s New', | |
| 759 | + 'document-settings': 'Document Settings icon', | |
| 760 | + 'preview-page': 'Preview Page', | |
| 761 | + 'publish-button': 'Publish Button', | |
| 762 | + 'widget-panel': 'Widget Panel Icon', | |
| 763 | + finder: 'Finder', | |
| 764 | + help: 'Help', | |
| 765 | + elementorLogoDropdown: 'top_bar_elementor_logo_dropdown', | |
| 766 | + elementorLogo: 'Elementor Logo', | |
| 767 | + eLogoMenu: 'E-logo Menu', | |
| 768 | + notes: 'Notes', | |
| 769 | + siteSettings: 'Site Settings', | |
| 770 | + structure: 'Structure', | |
| 771 | + documentNameDropdown: 'Document Name dropdown', | |
| 772 | + responsiveControls: 'Responsive controls', | |
| 773 | + launchpad: 'launchpad', | |
| 774 | + checklistHeader: 'Checklist Header', | |
| 775 | + checklistSteps: 'Checklist Steps', | |
| 776 | + userPreferences: 'User Preferences', | |
| 777 | + contextMenu: 'Context Menu', | |
| 778 | + templateLibrary: { | |
| 779 | + saveModal: 'Save to Modal', | |
| 780 | + moveModal: 'Move to Modal', | |
| 781 | + bulkMoveModal: 'Bulk Move to Modal', | |
| 782 | + copyModal: 'Copy to Modal', | |
| 783 | + bulkCopyModal: 'Bulk Copy to Modal', | |
| 784 | + saveModalSelectFolder: 'Save to Modal - select folder', | |
| 785 | + saveModalSelectConnect: 'Save to Modal - connect', | |
| 786 | + saveModalSelectUpgrade: 'Save to Modal - upgrade', | |
| 787 | + importModal: 'Import Modal', | |
| 788 | + newFolderModal: 'New Folder Modal', | |
| 789 | + deleteDialog: 'Delete Dialog', | |
| 790 | + deleteFolderDialog: 'Delete Folder Dialog', | |
| 791 | + renameDialog: 'Rename Dialog', | |
| 792 | + createFolderDialog: 'Create Folder Dialog', | |
| 793 | + applySettingsDialog: 'Apply Settings Dialog', | |
| 794 | + cloudTab: 'Cloud Tab', | |
| 795 | + siteTab: 'Site Tab', | |
| 796 | + cloudTabFolder: 'Cloud Tab - Folder', | |
| 797 | + cloudTabConnect: 'Cloud Tab - Connect', | |
| 798 | + cloudTabUpgrade: 'Cloud Tab - Upgrade', | |
| 799 | + morePopup: 'Context Menu', | |
| 800 | + quotaBar: 'Quota Bar' | |
| 801 | + }, | |
| 802 | + kitLibrary: { | |
| 803 | + cloudKitLibrary: 'kits_cloud_library', | |
| 804 | + cloudKitLibraryConnect: 'kits_cloud_library_connect', | |
| 805 | + cloudKitLibraryUpgrade: 'kits_cloud_library_upgrade', | |
| 806 | + kitExportCustomization: 'kit_export_customization', | |
| 807 | + kitExport: 'kit_export', | |
| 808 | + kitExportCustomizationEdit: 'kit_export_customization_edit', | |
| 809 | + kitExportSummary: 'kit_export_summary', | |
| 810 | + kitImportUploadBox: 'kit_import_upload_box', | |
| 811 | + kitImportCustomization: 'kit_import_customization', | |
| 812 | + kitImportSummary: 'kit_import_summary' | |
| 813 | + }, | |
| 814 | + variablesPopover: 'Variables Popover', | |
| 815 | + admin: { | |
| 816 | + pluginToolsTab: 'plugin_tools_tab', | |
| 817 | + pluginWebsiteTemplatesTab: 'plugin_website_templates_tab' | |
| 818 | + }, | |
| 819 | + componentsTab: 'Components Tab', | |
| 820 | + canvasElement: 'Canvas Element', | |
| 821 | + publishDropdown: 'Publish Dropdown', | |
| 822 | + pageListDropdown: 'Page List Dropdown', | |
| 823 | + emptyBox: 'Empty Box', | |
| 824 | + searchBar: 'Search Bar', | |
| 825 | + finderResults: 'Finder Results', | |
| 826 | + libraryTabs: 'Library Tabs', | |
| 827 | + assetCard: 'Asset Card' | |
| 828 | + }, | |
| 829 | + elements: { | |
| 830 | + accordionSection: 'Accordion section', | |
| 831 | + buttonIcon: 'Button Icon', | |
| 832 | + mainCta: 'Main CTA', | |
| 833 | + button: 'Button', | |
| 834 | + link: 'Link', | |
| 835 | + dropdown: 'Dropdown', | |
| 836 | + toggle: 'Toggle', | |
| 837 | + launchpadChecklist: 'Checklist popup' | |
| 838 | + }, | |
| 839 | + names: { | |
| 840 | + v1: { | |
| 841 | + layout: 'v1_widgets_tab_layout_section', | |
| 842 | + basic: 'v1_widgets_tab_basic_section', | |
| 843 | + 'pro-elements': 'v1_widgets_tab_pro_section', | |
| 844 | + general: 'v1_widgets_tab_general_section', | |
| 845 | + 'theme-elements': 'v1_widgets_tab_site_section', | |
| 846 | + 'theme-elements-single': 'v1_widgets_tab_single_section', | |
| 847 | + 'woocommerce-elements': 'v1_widgets_tab_woocommerce_section', | |
| 848 | + wordpress: 'v1_widgets_tab_wordpress_section', | |
| 849 | + categories: 'v1_widgets_tab', | |
| 850 | + global: 'v1_globals_tab' | |
| 851 | + }, | |
| 852 | + topBar: { | |
| 853 | + whatsNew: 'top_bar_whats_new', | |
| 854 | + documentSettings: 'top_bar_document_settings_icon', | |
| 855 | + previewPage: 'top_bar_preview_page', | |
| 856 | + publishButton: 'top_bar_publish_button', | |
| 857 | + widgetPanel: 'top_bar_widget_panel_icon', | |
| 858 | + finder: 'top_bar_finder', | |
| 859 | + help: 'top_bar_help', | |
| 860 | + history: 'top_bar_elementor_logo_dropdown_history', | |
| 861 | + userPreferences: 'top_bar_elementor_logo_dropdown_user_preferences', | |
| 862 | + keyboardShortcuts: 'top_bar_elementor_logo_dropdown_keyboard_shortcuts', | |
| 863 | + exitToWordpress: 'top_bar_elementor_logo_dropdown_exit_to_wordpress', | |
| 864 | + themeBuilder: 'top_bar_elementor_logo_dropdown_theme_builder', | |
| 865 | + notes: 'top_bar_notes', | |
| 866 | + siteSettings: 'top_bar_site_setting', | |
| 867 | + structure: 'top_bar_structure', | |
| 868 | + documentNameDropdown: 'top_bar_document_name_dropdown', | |
| 869 | + responsiveControls: 'top_bar_responsive_controls', | |
| 870 | + launchpadOn: 'top_bar_checklist_icon_show', | |
| 871 | + launchpadOff: 'top_bar_checklist_icon_hide', | |
| 872 | + elementorLogoDropdown: 'open_e_menu', | |
| 873 | + connectAccount: 'connect_account', | |
| 874 | + accountConnected: 'account_connected' | |
| 875 | + }, | |
| 876 | + // ChecklistSteps event names are generated dynamically, based on stepId and action type taken: title, action, done, undone, upgrade | |
| 877 | + elementorEditor: { | |
| 878 | + checklist: { | |
| 879 | + checklistHeaderClose: 'checklist_header_close_icon', | |
| 880 | + checklistFirstPopup: 'checklist popup triggered' | |
| 881 | + }, | |
| 882 | + userPreferences: { | |
| 883 | + checklistShow: 'checklist_userpreferences_toggle_show', | |
| 884 | + checklistHide: 'checklist_userpreferences_toggle_hide' | |
| 885 | + } | |
| 886 | + }, | |
| 887 | + variables: { | |
| 888 | + open: 'open_variables_popover', | |
| 889 | + add: 'add_new_variable', | |
| 890 | + connect: 'connect_variable', | |
| 891 | + save: 'save_new_variable', | |
| 892 | + openManager: 'open_variables_manager', | |
| 893 | + saveChanges: 'save_variables_changes', | |
| 894 | + delete: 'delete_variable', | |
| 895 | + variableSyncToV3: 'variable_sync_to_v3' | |
| 896 | + }, | |
| 897 | + components: { | |
| 898 | + createClicked: 'component_create_clicked', | |
| 899 | + createCancelled: 'component_creation_cancelled', | |
| 900 | + created: 'component_created', | |
| 901 | + instanceAdded: 'component_instance_added', | |
| 902 | + edited: 'component_edited', | |
| 903 | + propertiesPanelOpened: 'component_properties_panel_opened', | |
| 904 | + propertiesGroupCreated: 'component_properties_group_created', | |
| 905 | + propertyExposed: 'component_property_exposed', | |
| 906 | + propertyRemoved: 'component_property_removed', | |
| 907 | + detached: 'component_detached' | |
| 908 | + }, | |
| 909 | + global_classes: { | |
| 910 | + classApplied: 'class_applied', | |
| 911 | + classRemoved: 'class_removed', | |
| 912 | + classManagerFilterCleared: 'class_manager_filter_cleared', | |
| 913 | + classDeleted: 'class_deleted', | |
| 914 | + classPublishConflict: 'class_publish_conflict', | |
| 915 | + classRenamed: 'class_renamed', | |
| 916 | + classCreated: 'class_created', | |
| 917 | + classManagerSearched: 'class_manager_searched', | |
| 918 | + classManagerFiltersOpened: 'class_manager_filters_opened', | |
| 919 | + classManagerOpened: 'class_manager_opened', | |
| 920 | + classManagerReorder: 'class_manager_reorder', | |
| 921 | + classManagerFilterUsed: 'class_manager_filter_used', | |
| 922 | + classUsageLocate: 'class_usage_locate', | |
| 923 | + classUsageHovered: 'class_usage_hovered', | |
| 924 | + classStyled: 'class_styled', | |
| 925 | + classStateClicked: 'class_state_clicked', | |
| 926 | + classUsageClicked: 'class_usage_clicked', | |
| 927 | + classDuplicate: 'class_duplicate', | |
| 928 | + classSyncToV3PopupShown: 'class_sync_to_v3_popup_shown', | |
| 929 | + classSyncToV3: 'class_sync_to_v3', | |
| 930 | + classSyncToV3PopupClick: 'class_sync_to_v3_popup_click' | |
| 931 | + }, | |
| 932 | + editorOne: { | |
| 933 | + topBarPublishDropdown: 'top_bar_publish_dropdown', | |
| 934 | + topBarPageList: 'top_bar_page_list', | |
| 935 | + siteSettingsSession: 'site_settings_session', | |
| 936 | + eLibraryNav: 'e_library_nav', | |
| 937 | + eLibraryInsert: 'e_library_insert', | |
| 938 | + eLibraryFavorite: 'e_library_favorite', | |
| 939 | + eLibraryGenerateAi: 'e_library_generate_ai', | |
| 940 | + finderSearchInput: 'finder_search_input', | |
| 941 | + finderResultSelect: 'finder_result_select', | |
| 942 | + canvasEmptyBoxAction: 'canvas_empty_box_action', | |
| 943 | + widgetPanelSearch: 'widget_panel_search' | |
| 944 | + }, | |
| 945 | + interactions: { | |
| 946 | + created: 'interactions_created' | |
| 947 | + }, | |
| 948 | + promotions: { | |
| 949 | + viewPromotion: 'view_promotion', | |
| 950 | + upgradePromotionClick: 'upgrade_promotion_click' | |
| 951 | + } | |
| 952 | + } | |
| 953 | +}; | |
| 954 | +var _default = exports["default"] = eventsConfig; | |
| 996 | 955 | |
| 997 | -//#endregion | |
| 998 | -//#region app/modules/import-export-customization/assets/js/shared/error/import-export-error.js | |
| 999 | - function _callSuper(t, o, e) { | |
| 1000 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1001 | - } | |
| 1002 | - function _isNativeReflectConstruct() { | |
| 1003 | - try { | |
| 1004 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1005 | - } catch (t) {} | |
| 1006 | - return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { | |
| 1007 | - return !!t; | |
| 1008 | - })(); | |
| 1009 | - } | |
| 1010 | - var ImportExportError = /*#__PURE__*/ function(_Error) { | |
| 1011 | - function ImportExportError(errorMessage, errorCode) { | |
| 1012 | - var _this; | |
| 1013 | - _classCallCheck(this, ImportExportError); | |
| 1014 | - _this = _callSuper(this, ImportExportError, ["string" === typeof errorMessage ? errorMessage : ""]); | |
| 1015 | - _this.code = errorCode || "general"; | |
| 1016 | - _this.details = errorMessage; | |
| 1017 | - return _this; | |
| 1018 | - } | |
| 1019 | - _inherits(ImportExportError, _Error); | |
| 1020 | - return _createClass(ImportExportError); | |
| 1021 | - }(/*#__PURE__*/ _wrapNativeSuper(Error)); | |
| 956 | +/***/ }), | |
| 1022 | 957 | |
| 1023 | -//#endregion | |
| 1024 | -//#region app/modules/import-export-customization/assets/js/shared/utils/api-fetch-config.js | |
| 1025 | - var isApiConfigured = false; | |
| 1026 | - function configureApiFetch() { | |
| 1027 | - var _window$elementorAppC; | |
| 1028 | - if (isApiConfigured) return; | |
| 1029 | - var config = (_window$elementorAppC = window.elementorAppConfig) === null || _window$elementorAppC === void 0 ? void 0 : _window$elementorAppC["import-export-customization"]; | |
| 1030 | - if (!config) throw new ImportExportError("Configuration not found. Please refresh the page.", "config_missing"); | |
| 1031 | - if (config.restNonce) _wordpress_api_fetch.default.use(_wordpress_api_fetch.default.createNonceMiddleware(config.restNonce)); | |
| 1032 | - if (config.restUrl) _wordpress_api_fetch.default.use(_wordpress_api_fetch.default.createRootURLMiddleware(config.restUrl)); | |
| 1033 | - isApiConfigured = true; | |
| 1034 | - } | |
| 958 | +/***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js": | |
| 959 | +/*!***************************************************************!*\ | |
| 960 | + !*** ../node_modules/@babel/runtime/helpers/OverloadYield.js ***! | |
| 961 | + \***************************************************************/ | |
| 962 | +/***/ ((module) => { | |
| 1035 | 963 | |
| 1036 | -//#endregion | |
| 1037 | -//#region app/modules/import-export-customization/assets/js/shared/utils/api-request.js | |
| 1038 | - var HTTP_STATUS = { REQUEST_TIMEOUT: 408 }; | |
| 1039 | - var HTTP_METHODS = { CREATABLE: "POST" }; | |
| 1040 | - function apiRequest(_x) { | |
| 1041 | - return _apiRequest.apply(this, arguments); | |
| 1042 | - } | |
| 1043 | - function _apiRequest() { | |
| 1044 | - _apiRequest = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee(_ref) { | |
| 1045 | - var _ref$data; | |
| 1046 | - var data; | |
| 1047 | - var path; | |
| 1048 | - var _ref$method; | |
| 1049 | - var method; | |
| 1050 | - var requestOptions; | |
| 1051 | - var _t; | |
| 1052 | - return import_regenerator.default.wrap(function(_context) { | |
| 1053 | - while (1) switch (_context.prev = _context.next) { | |
| 1054 | - case 0: | |
| 1055 | - _ref$data = _ref.data, data = _ref$data === void 0 ? null : _ref$data, path = _ref.path, _ref$method = _ref.method, method = _ref$method === void 0 ? HTTP_METHODS.CREATABLE : _ref$method; | |
| 1056 | - configureApiFetch(); | |
| 1057 | - _context.prev = 1; | |
| 1058 | - requestOptions = { | |
| 1059 | - path: "/elementor/v1/import-export-customization/".concat(path), | |
| 1060 | - method | |
| 1061 | - }; | |
| 1062 | - if (data && HTTP_METHODS.CREATABLE === method) requestOptions.data = data; | |
| 1063 | - _context.next = 2; | |
| 1064 | - return (0, _wordpress_api_fetch.default)(requestOptions); | |
| 1065 | - case 2: return _context.abrupt("return", _context.sent); | |
| 1066 | - case 3: | |
| 1067 | - _context.prev = 3; | |
| 1068 | - _t = _context["catch"](1); | |
| 1069 | - handleApiFetchError(_t); | |
| 1070 | - case 4: | |
| 1071 | - case "end": return _context.stop(); | |
| 1072 | - } | |
| 1073 | - }, _callee, null, [[1, 3]]); | |
| 1074 | - })); | |
| 1075 | - return _apiRequest.apply(this, arguments); | |
| 1076 | - } | |
| 1077 | - function handleApiFetchError(error) { | |
| 1078 | - var errorMessage = (error === null || error === void 0 ? void 0 : error.message) || "An unknown error occurred"; | |
| 1079 | - var errorCode = "general"; | |
| 1080 | - if (error !== null && error !== void 0 && error.code) errorCode = error.code; | |
| 1081 | - else if (error !== null && error !== void 0 && error.status) errorCode = HTTP_STATUS.REQUEST_TIMEOUT === error.status ? "timeout" : error.status; | |
| 1082 | - throw new ImportExportError(errorMessage, errorCode); | |
| 1083 | - } | |
| 964 | +function _OverloadYield(e, d) { | |
| 965 | + this.v = e, this.k = d; | |
| 966 | +} | |
| 967 | +module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1084 | 968 | |
| 1085 | -//#endregion | |
| 1086 | -//#region app/modules/import-export-customization/assets/js/shared/revert-kit-handler.js | |
| 1087 | - var RevertKitHandler = /*#__PURE__*/ function() { | |
| 1088 | - function RevertKitHandler() { | |
| 1089 | - var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 1090 | - var revertButton = _ref.revertButton; | |
| 1091 | - var onError = _ref.onError; | |
| 1092 | - _classCallCheck(this, RevertKitHandler); | |
| 1093 | - this.revertButton = revertButton; | |
| 1094 | - this.onError = onError || this.defaultErrorHandler.bind(this); | |
| 1095 | - } | |
| 1096 | - return _createClass(RevertKitHandler, [ | |
| 1097 | - { | |
| 1098 | - key: "revertKit", | |
| 1099 | - value: function() { | |
| 1100 | - var _revertKit = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee() { | |
| 1101 | - var activeKitName; | |
| 1102 | - var confirmed; | |
| 1103 | - var referrerKitId; | |
| 1104 | - var returnTo; | |
| 1105 | - var noAutomaticRedirect; | |
| 1106 | - var _yield$this$callRever; | |
| 1107 | - var data; | |
| 1108 | - var _t; | |
| 1109 | - return import_regenerator.default.wrap(function(_context) { | |
| 1110 | - while (1) switch (_context.prev = _context.next) { | |
| 1111 | - case 0: | |
| 1112 | - activeKitName = this.getActiveKitName(); | |
| 1113 | - _context.next = 1; | |
| 1114 | - return this.showConfirmationDialog(activeKitName); | |
| 1115 | - case 1: | |
| 1116 | - confirmed = _context.sent; | |
| 1117 | - if (confirmed) { | |
| 1118 | - _context.next = 2; | |
| 1119 | - break; | |
| 1120 | - } | |
| 1121 | - return _context.abrupt("return"); | |
| 1122 | - case 2: | |
| 1123 | - _context.prev = 2; | |
| 1124 | - referrerKitId = this.getReferrerKitId(); | |
| 1125 | - returnTo = this.getReturnTo(); | |
| 1126 | - noAutomaticRedirect = this.getNoAutomaticRedirect(); | |
| 1127 | - this.saveToCache(referrerKitId, activeKitName, returnTo, noAutomaticRedirect); | |
| 1128 | - _context.next = 3; | |
| 1129 | - return this.callRevertAPI(); | |
| 1130 | - case 3: | |
| 1131 | - _yield$this$callRever = _context.sent; | |
| 1132 | - data = _yield$this$callRever.data; | |
| 1133 | - this.handleRevertResponse(data); | |
| 1134 | - _context.next = 5; | |
| 1135 | - break; | |
| 1136 | - case 4: | |
| 1137 | - _context.prev = 4; | |
| 1138 | - _t = _context["catch"](2); | |
| 1139 | - this.onError(_t); | |
| 1140 | - case 5: | |
| 1141 | - case "end": return _context.stop(); | |
| 1142 | - } | |
| 1143 | - }, _callee, this, [[2, 4]]); | |
| 1144 | - })); | |
| 1145 | - function revertKit() { | |
| 1146 | - return _revertKit.apply(this, arguments); | |
| 1147 | - } | |
| 1148 | - return revertKit; | |
| 1149 | - }() | |
| 1150 | - }, | |
| 1151 | - { | |
| 1152 | - key: "callRevertAPI", | |
| 1153 | - value: function() { | |
| 1154 | - var _callRevertAPI = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee2() { | |
| 1155 | - var result; | |
| 1156 | - return import_regenerator.default.wrap(function(_context2) { | |
| 1157 | - while (1) switch (_context2.prev = _context2.next) { | |
| 1158 | - case 0: | |
| 1159 | - _context2.next = 1; | |
| 1160 | - return apiRequest({ path: RevertKitHandler.API_PATH }); | |
| 1161 | - case 1: | |
| 1162 | - result = _context2.sent; | |
| 1163 | - return _context2.abrupt("return", result); | |
| 1164 | - case 2: | |
| 1165 | - case "end": return _context2.stop(); | |
| 1166 | - } | |
| 1167 | - }, _callee2); | |
| 1168 | - })); | |
| 1169 | - function callRevertAPI() { | |
| 1170 | - return _callRevertAPI.apply(this, arguments); | |
| 1171 | - } | |
| 1172 | - return callRevertAPI; | |
| 1173 | - }() | |
| 1174 | - }, | |
| 1175 | - { | |
| 1176 | - key: "handleRevertResponse", | |
| 1177 | - value: function handleRevertResponse(data) { | |
| 1178 | - if (!data.revert_completed) { | |
| 1179 | - this.handleRevertNoSessions(data); | |
| 1180 | - return; | |
| 1181 | - } | |
| 1182 | - this.showRevertCompletedDialog(data); | |
| 1183 | - } | |
| 1184 | - }, | |
| 1185 | - { | |
| 1186 | - key: "showRevertCompletedDialog", | |
| 1187 | - value: function showRevertCompletedDialog() { | |
| 1188 | - var referrerKitId = this.getReferrerKitId(); | |
| 1189 | - if (referrerKitId) { | |
| 1190 | - this.showReferrerKitDialog(referrerKitId); | |
| 1191 | - return; | |
| 1192 | - } | |
| 1193 | - this.showRevertSuccessDialog(); | |
| 1194 | - } | |
| 1195 | - }, | |
| 1196 | - { | |
| 1197 | - key: "handleRevertNoSessions", | |
| 1198 | - value: function handleRevertNoSessions(responseData) { | |
| 1199 | - elementorCommon.dialogsManager.createWidget("alert", { message: responseData.message || (0, _wordpress_i18n.__)("No import sessions available to revert.", "elementor") }).show(); | |
| 1200 | - } | |
| 1201 | - }, | |
| 1202 | - { | |
| 1203 | - key: "showConfirmationDialog", | |
| 1204 | - value: function() { | |
| 1205 | - var _showConfirmationDialog = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee3(activeKitName) { | |
| 1206 | - return import_regenerator.default.wrap(function(_context3) { | |
| 1207 | - while (1) switch (_context3.prev = _context3.next) { | |
| 1208 | - case 0: return _context3.abrupt("return", new Promise(function(resolve) { | |
| 1209 | - elementorCommon.dialogsManager.createWidget("confirm", { | |
| 1210 | - headerMessage: (0, _wordpress_i18n.__)("Are you sure?", "elementor"), | |
| 1211 | - message: (0, _wordpress_i18n.__)("Removing %s will permanently delete changes made to the Website Template's content and site settings", "elementor").replace("%s", activeKitName), | |
| 1212 | - strings: { | |
| 1213 | - confirm: (0, _wordpress_i18n.__)("Delete", "elementor"), | |
| 1214 | - cancel: (0, _wordpress_i18n.__)("Cancel", "elementor") | |
| 1215 | - }, | |
| 1216 | - onConfirm: function onConfirm() { | |
| 1217 | - return resolve(true); | |
| 1218 | - }, | |
| 1219 | - onCancel: function onCancel() { | |
| 1220 | - return resolve(false); | |
| 1221 | - } | |
| 1222 | - }).show(); | |
| 1223 | - })); | |
| 1224 | - case 1: | |
| 1225 | - case "end": return _context3.stop(); | |
| 1226 | - } | |
| 1227 | - }, _callee3); | |
| 1228 | - })); | |
| 1229 | - function showConfirmationDialog(_x) { | |
| 1230 | - return _showConfirmationDialog.apply(this, arguments); | |
| 1231 | - } | |
| 1232 | - return showConfirmationDialog; | |
| 1233 | - }() | |
| 1234 | - }, | |
| 1235 | - { | |
| 1236 | - key: "createSuccessHeaderMessage", | |
| 1237 | - value: function createSuccessHeaderMessage() { | |
| 1238 | - var activeKitName = this.getDataFromCache().activeKitName; | |
| 1239 | - return (0, _wordpress_i18n.__)("%s was successfully deleted", "elementor").replace("%s", activeKitName); | |
| 1240 | - } | |
| 1241 | - }, | |
| 1242 | - { | |
| 1243 | - key: "showRevertSuccessDialog", | |
| 1244 | - value: function showRevertSuccessDialog() { | |
| 1245 | - elementorCommon.dialogsManager.createWidget("confirm", { | |
| 1246 | - id: RevertKitHandler.DIALOG_ID, | |
| 1247 | - headerMessage: this.createSuccessHeaderMessage(), | |
| 1248 | - message: (0, _wordpress_i18n.__)("Try a different Website Template or build your site from scratch.", "elementor"), | |
| 1249 | - strings: { | |
| 1250 | - confirm: (0, _wordpress_i18n.__)("OK", "elementor"), | |
| 1251 | - cancel: (0, _wordpress_i18n.__)("Library", "elementor") | |
| 1252 | - }, | |
| 1253 | - onConfirm: function onConfirm() { | |
| 1254 | - location.reload(); | |
| 1255 | - }, | |
| 1256 | - onCancel: function onCancel() { | |
| 1257 | - location.href = elementorImportExport.appUrl; | |
| 1258 | - } | |
| 1259 | - }).show(); | |
| 1260 | - this.clearCache(); | |
| 1261 | - } | |
| 1262 | - }, | |
| 1263 | - { | |
| 1264 | - key: "showReferrerKitDialog", | |
| 1265 | - value: function showReferrerKitDialog(referrerKitId) { | |
| 1266 | - var _this = this; | |
| 1267 | - var _this$getDataFromCach2 = this.getDataFromCache(); | |
| 1268 | - var returnTo = _this$getDataFromCach2.returnTo; | |
| 1269 | - var noAutomaticRedirect = _this$getDataFromCach2.noAutomaticRedirect; | |
| 1270 | - elementorCommon.dialogsManager.createWidget("confirm", { | |
| 1271 | - id: RevertKitHandler.DIALOG_ID, | |
| 1272 | - headerMessage: this.createSuccessHeaderMessage(), | |
| 1273 | - message: (0, _wordpress_i18n.__)("You're ready to apply a new Kit!", "elementor"), | |
| 1274 | - strings: { | |
| 1275 | - confirm: (0, _wordpress_i18n.__)("Continue to new Kit", "elementor"), | |
| 1276 | - cancel: (0, _wordpress_i18n.__)("Close", "elementor") | |
| 1277 | - }, | |
| 1278 | - onConfirm: function onConfirm() { | |
| 1279 | - location.href = _this.buildPreviewUrl(referrerKitId, returnTo, noAutomaticRedirect); | |
| 1280 | - }, | |
| 1281 | - onCancel: function onCancel() { | |
| 1282 | - location.reload(); | |
| 1283 | - } | |
| 1284 | - }).show(); | |
| 1285 | - this.clearCache(); | |
| 1286 | - } | |
| 1287 | - }, | |
| 1288 | - { | |
| 1289 | - key: "buildPreviewUrl", | |
| 1290 | - value: function buildPreviewUrl(referrerKitId, returnTo, noAutomaticRedirect) { | |
| 1291 | - var baseUrl = elementorImportExport.appUrl + "/preview/" + referrerKitId; | |
| 1292 | - var url = new URL(baseUrl); | |
| 1293 | - if (returnTo) url.searchParams.append(RevertKitHandler.URL_PARAM_RETURN_TO, returnTo); | |
| 1294 | - if (noAutomaticRedirect) url.searchParams.append(RevertKitHandler.URL_PARAM_NO_AUTOMATIC_REDIRECT, noAutomaticRedirect); | |
| 1295 | - return url.toString(); | |
| 1296 | - } | |
| 1297 | - }, | |
| 1298 | - { | |
| 1299 | - key: "maybeShowReferrerKitDialog", | |
| 1300 | - value: function maybeShowReferrerKitDialog() { | |
| 1301 | - var referrerKitId = this.getDataFromCache().referrerKitId; | |
| 1302 | - if (void 0 === referrerKitId) return; | |
| 1303 | - if (0 === referrerKitId.length) { | |
| 1304 | - this.showRevertSuccessDialog(); | |
| 1305 | - return; | |
| 1306 | - } | |
| 1307 | - this.showReferrerKitDialog(referrerKitId); | |
| 1308 | - } | |
| 1309 | - }, | |
| 1310 | - { | |
| 1311 | - key: "getActiveKitName", | |
| 1312 | - value: function getActiveKitName() { | |
| 1313 | - var lastKit = elementorImportExport.lastImportedSession; | |
| 1314 | - if (lastKit.kit_title) return lastKit.kit_title; | |
| 1315 | - if (lastKit.kit_name) return this.convertNameToTitle(lastKit.kit_name); | |
| 1316 | - return (0, _wordpress_i18n.__)("Your Kit", "elementor"); | |
| 1317 | - } | |
| 1318 | - }, | |
| 1319 | - { | |
| 1320 | - key: "convertNameToTitle", | |
| 1321 | - value: function convertNameToTitle(name) { | |
| 1322 | - var words = name.split(RevertKitHandler.NAME_SEPARATOR_PATTERN).filter(function(word) { | |
| 1323 | - return word.length > 0; | |
| 1324 | - }); | |
| 1325 | - if (0 === words.length) return (0, _wordpress_i18n.__)("Your Kit", "elementor"); | |
| 1326 | - return words.map(function(word) { | |
| 1327 | - return word[0].toUpperCase() + word.substring(1); | |
| 1328 | - }).join(" "); | |
| 1329 | - } | |
| 1330 | - }, | |
| 1331 | - { | |
| 1332 | - key: "getReferrerKitId", | |
| 1333 | - value: function getReferrerKitId() { | |
| 1334 | - var pageReferrerKit = new URLSearchParams(window.location.search).get(RevertKitHandler.URL_PARAM_REFERRER_KIT); | |
| 1335 | - if (pageReferrerKit) return pageReferrerKit; | |
| 1336 | - if (!this.revertButton) return ""; | |
| 1337 | - return new URL(this.revertButton.href).searchParams.get(RevertKitHandler.URL_PARAM_REFERRER_KIT) || ""; | |
| 1338 | - } | |
| 1339 | - }, | |
| 1340 | - { | |
| 1341 | - key: "getReturnTo", | |
| 1342 | - value: function getReturnTo() { | |
| 1343 | - return new URLSearchParams(window.location.search).get(RevertKitHandler.URL_PARAM_RETURN_TO) || ""; | |
| 1344 | - } | |
| 1345 | - }, | |
| 1346 | - { | |
| 1347 | - key: "getNoAutomaticRedirect", | |
| 1348 | - value: function getNoAutomaticRedirect() { | |
| 1349 | - return new URLSearchParams(window.location.search).get(RevertKitHandler.URL_PARAM_NO_AUTOMATIC_REDIRECT) || ""; | |
| 1350 | - } | |
| 1351 | - }, | |
| 1352 | - { | |
| 1353 | - key: "saveToCache", | |
| 1354 | - value: function saveToCache(referrerKitId, activeKitName, returnTo, noAutomaticRedirect) { | |
| 1355 | - sessionStorage.setItem(RevertKitHandler.KIT_DATA_KEY, JSON.stringify({ | |
| 1356 | - referrerKitId: referrerKitId || "", | |
| 1357 | - activeKitName: activeKitName || "", | |
| 1358 | - returnTo: returnTo || "", | |
| 1359 | - noAutomaticRedirect: noAutomaticRedirect || "" | |
| 1360 | - })); | |
| 1361 | - } | |
| 1362 | - }, | |
| 1363 | - { | |
| 1364 | - key: "getDataFromCache", | |
| 1365 | - value: function getDataFromCache() { | |
| 1366 | - try { | |
| 1367 | - return JSON.parse(sessionStorage.getItem(RevertKitHandler.KIT_DATA_KEY)) || {}; | |
| 1368 | - } catch (e) { | |
| 1369 | - return {}; | |
| 1370 | - } | |
| 1371 | - } | |
| 1372 | - }, | |
| 1373 | - { | |
| 1374 | - key: "clearCache", | |
| 1375 | - value: function clearCache() { | |
| 1376 | - sessionStorage.removeItem(RevertKitHandler.KIT_DATA_KEY); | |
| 1377 | - } | |
| 1378 | - }, | |
| 1379 | - { | |
| 1380 | - key: "defaultErrorHandler", | |
| 1381 | - value: function defaultErrorHandler() { | |
| 1382 | - elementorCommon.dialogsManager.createWidget("alert", { message: (0, _wordpress_i18n.__)("An error occurred while reverting the kit. Please try again.", "elementor") }).show(); | |
| 1383 | - } | |
| 1384 | - } | |
| 1385 | - ]); | |
| 1386 | - }(); | |
| 1387 | - _defineProperty(RevertKitHandler, "API_PATH", "revert"); | |
| 1388 | - _defineProperty(RevertKitHandler, "DIALOG_ID", "e-revert-kit-deleted-dialog"); | |
| 1389 | - _defineProperty(RevertKitHandler, "URL_PARAM_REFERRER_KIT", "referrer_kit"); | |
| 1390 | - _defineProperty(RevertKitHandler, "URL_PARAM_RETURN_TO", "return_to"); | |
| 1391 | - _defineProperty(RevertKitHandler, "URL_PARAM_NO_AUTOMATIC_REDIRECT", "no_automatic_redirect"); | |
| 1392 | - _defineProperty(RevertKitHandler, "KIT_DATA_KEY", "elementor-kit-data"); | |
| 1393 | - _defineProperty(RevertKitHandler, "NAME_SEPARATOR_PATTERN", /[-_]+/); | |
| 969 | +/***/ }), | |
| 1394 | 970 | |
| 1395 | -//#endregion | |
| 1396 | -//#region app/modules/import-export-customization/assets/js/admin.js | |
| 1397 | - var Admin = /*#__PURE__*/ function() { | |
| 1398 | - function Admin() { | |
| 1399 | - var _this = this; | |
| 1400 | - _classCallCheck(this, Admin); | |
| 1401 | - if ("elementor-tools" === new URLSearchParams(window.location.search).get("page")) { | |
| 1402 | - this.sendPageToolsViewedEvent(); | |
| 1403 | - elementorAdmin.elements.$settingsTabs.on("focus", function() { | |
| 1404 | - var location = window.location.hash.slice(1); | |
| 1405 | - _this.maybeSendImportExportLocationEvent(location); | |
| 1406 | - }); | |
| 1407 | - this.maybeSendImportExportLocationEvent(window.location.hash.slice(1)); | |
| 1408 | - } | |
| 1409 | - this.revertButton = document.getElementById("elementor-import-export__revert_kit"); | |
| 1410 | - this.importFroLibraryButton = document.getElementById("elementor-import-export__import_from_library"); | |
| 1411 | - this.importButton = document.getElementById("elementor-import-export__import"); | |
| 1412 | - this.exportButton = document.getElementById("elementor-import-export__export"); | |
| 1413 | - this.initializeRevertHandler(); | |
| 1414 | - this.bindEventListeners(); | |
| 1415 | - } | |
| 1416 | - return _createClass(Admin, [ | |
| 1417 | - { | |
| 1418 | - key: "initializeRevertHandler", | |
| 1419 | - value: function initializeRevertHandler() { | |
| 1420 | - if (this.revertButton) { | |
| 1421 | - this.revertHandler = new RevertKitHandler({ revertButton: this.revertButton }); | |
| 1422 | - this.revertHandler.maybeShowReferrerKitDialog(); | |
| 1423 | - } | |
| 1424 | - } | |
| 1425 | - }, | |
| 1426 | - { | |
| 1427 | - key: "bindEventListeners", | |
| 1428 | - value: function bindEventListeners() { | |
| 1429 | - if (this.revertButton) this.revertButton.addEventListener("click", this.onRevertButtonClick.bind(this)); | |
| 1430 | - if (this.importFroLibraryButton) this.importFroLibraryButton.addEventListener("click", this.onImportFromLibraryButtonClick.bind(this)); | |
| 1431 | - if (this.importButton) this.importButton.addEventListener("click", this.onImportButtonClick.bind(this)); | |
| 1432 | - if (this.exportButton) this.exportButton.addEventListener("click", this.onExportButtonClick.bind(this)); | |
| 1433 | - } | |
| 1434 | - }, | |
| 1435 | - { | |
| 1436 | - key: "sendPageToolsViewedEvent", | |
| 1437 | - value: function sendPageToolsViewedEvent() { | |
| 1438 | - AppsEventTracking.sendPageViewsWebsiteTemplates(elementorCommon.eventsManager.config.secondaryLocations.admin.pluginToolsTab); | |
| 1439 | - } | |
| 1440 | - }, | |
| 1441 | - { | |
| 1442 | - key: "maybeSendImportExportLocationEvent", | |
| 1443 | - value: function maybeSendImportExportLocationEvent(location) { | |
| 1444 | - if ("tab-import-export-kit" === location) AppsEventTracking.sendPageViewsWebsiteTemplates(elementorCommon.eventsManager.config.secondaryLocations.admin.pluginWebsiteTemplatesTab); | |
| 1445 | - } | |
| 1446 | - }, | |
| 1447 | - { | |
| 1448 | - key: "onRevertButtonClick", | |
| 1449 | - value: function onRevertButtonClick(event) { | |
| 1450 | - var _this$revertHandler; | |
| 1451 | - event.preventDefault(); | |
| 1452 | - AppsEventTracking.sendImportExportAdminAction("Revert"); | |
| 1453 | - (_this$revertHandler = this.revertHandler) === null || _this$revertHandler === void 0 || _this$revertHandler.revertKit(); | |
| 1454 | - } | |
| 1455 | - }, | |
| 1456 | - { | |
| 1457 | - key: "onExportButtonClick", | |
| 1458 | - value: function onExportButtonClick() { | |
| 1459 | - AppsEventTracking.sendImportExportAdminAction("Export"); | |
| 1460 | - } | |
| 1461 | - }, | |
| 1462 | - { | |
| 1463 | - key: "onImportButtonClick", | |
| 1464 | - value: function onImportButtonClick() { | |
| 1465 | - AppsEventTracking.sendImportExportAdminAction("Import"); | |
| 1466 | - } | |
| 1467 | - }, | |
| 1468 | - { | |
| 1469 | - key: "onImportFromLibraryButtonClick", | |
| 1470 | - value: function onImportFromLibraryButtonClick() { | |
| 1471 | - AppsEventTracking.sendImportExportAdminAction("Import from Library"); | |
| 1472 | - } | |
| 1473 | - } | |
| 1474 | - ]); | |
| 1475 | - }(); | |
| 1476 | - window.addEventListener("load", function() { | |
| 1477 | - new Admin(); | |
| 1478 | - }); | |
| 971 | +/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 972 | +/*!***********************************************************************!*\ | |
| 973 | + !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 974 | + \***********************************************************************/ | |
| 975 | +/***/ ((module) => { | |
| 1479 | 976 | |
| 1480 | -//#endregion | |
| 1481 | -})(wp.i18n, wp.apiFetch); | |
| 977 | +function _assertThisInitialized(e) { | |
| 978 | + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 979 | + return e; | |
| 980 | +} | |
| 981 | +module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 982 | + | |
| 983 | +/***/ }), | |
| 984 | + | |
| 985 | +/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": | |
| 986 | +/*!******************************************************************!*\ | |
| 987 | + !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! | |
| 988 | + \******************************************************************/ | |
| 989 | +/***/ ((module) => { | |
| 990 | + | |
| 991 | +function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 992 | + try { | |
| 993 | + var i = n[a](c), | |
| 994 | + u = i.value; | |
| 995 | + } catch (n) { | |
| 996 | + return void e(n); | |
| 997 | + } | |
| 998 | + i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 999 | +} | |
| 1000 | +function _asyncToGenerator(n) { | |
| 1001 | + return function () { | |
| 1002 | + var t = this, | |
| 1003 | + e = arguments; | |
| 1004 | + return new Promise(function (r, o) { | |
| 1005 | + var a = n.apply(t, e); | |
| 1006 | + function _next(n) { | |
| 1007 | + asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 1008 | + } | |
| 1009 | + function _throw(n) { | |
| 1010 | + asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 1011 | + } | |
| 1012 | + _next(void 0); | |
| 1013 | + }); | |
| 1014 | + }; | |
| 1015 | +} | |
| 1016 | +module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1017 | + | |
| 1018 | +/***/ }), | |
| 1019 | + | |
| 1020 | +/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 1021 | +/*!****************************************************************!*\ | |
| 1022 | + !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 1023 | + \****************************************************************/ | |
| 1024 | +/***/ ((module) => { | |
| 1025 | + | |
| 1026 | +function _classCallCheck(a, n) { | |
| 1027 | + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 1028 | +} | |
| 1029 | +module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1030 | + | |
| 1031 | +/***/ }), | |
| 1032 | + | |
| 1033 | +/***/ "../node_modules/@babel/runtime/helpers/construct.js": | |
| 1034 | +/*!***********************************************************!*\ | |
| 1035 | + !*** ../node_modules/@babel/runtime/helpers/construct.js ***! | |
| 1036 | + \***********************************************************/ | |
| 1037 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1038 | + | |
| 1039 | +var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js"); | |
| 1040 | +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 1041 | +function _construct(t, e, r) { | |
| 1042 | + if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); | |
| 1043 | + var o = [null]; | |
| 1044 | + o.push.apply(o, e); | |
| 1045 | + var p = new (t.bind.apply(t, o))(); | |
| 1046 | + return r && setPrototypeOf(p, r.prototype), p; | |
| 1047 | +} | |
| 1048 | +module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1049 | + | |
| 1050 | +/***/ }), | |
| 1051 | + | |
| 1052 | +/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 1053 | +/*!*************************************************************!*\ | |
| 1054 | + !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 1055 | + \*************************************************************/ | |
| 1056 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1057 | + | |
| 1058 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 1059 | +function _defineProperties(e, r) { | |
| 1060 | + for (var t = 0; t < r.length; t++) { | |
| 1061 | + var o = r[t]; | |
| 1062 | + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 1063 | + } | |
| 1064 | +} | |
| 1065 | +function _createClass(e, r, t) { | |
| 1066 | + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 1067 | + writable: !1 | |
| 1068 | + }), e; | |
| 1069 | +} | |
| 1070 | +module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1071 | + | |
| 1072 | +/***/ }), | |
| 1073 | + | |
| 1074 | +/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 1075 | +/*!****************************************************************!*\ | |
| 1076 | + !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 1077 | + \****************************************************************/ | |
| 1078 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1079 | + | |
| 1080 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 1081 | +function _defineProperty(e, r, t) { | |
| 1082 | + return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 1083 | + value: t, | |
| 1084 | + enumerable: !0, | |
| 1085 | + configurable: !0, | |
| 1086 | + writable: !0 | |
| 1087 | + }) : e[r] = t, e; | |
| 1088 | +} | |
| 1089 | +module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1090 | + | |
| 1091 | +/***/ }), | |
| 1092 | + | |
| 1093 | +/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 1094 | +/*!****************************************************************!*\ | |
| 1095 | + !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 1096 | + \****************************************************************/ | |
| 1097 | +/***/ ((module) => { | |
| 1098 | + | |
| 1099 | +function _getPrototypeOf(t) { | |
| 1100 | + return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 1101 | + return t.__proto__ || Object.getPrototypeOf(t); | |
| 1102 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 1103 | +} | |
| 1104 | +module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1105 | + | |
| 1106 | +/***/ }), | |
| 1107 | + | |
| 1108 | +/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 1109 | +/*!**********************************************************!*\ | |
| 1110 | + !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 1111 | + \**********************************************************/ | |
| 1112 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1113 | + | |
| 1114 | +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 1115 | +function _inherits(t, e) { | |
| 1116 | + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 1117 | + t.prototype = Object.create(e && e.prototype, { | |
| 1118 | + constructor: { | |
| 1119 | + value: t, | |
| 1120 | + writable: !0, | |
| 1121 | + configurable: !0 | |
| 1122 | + } | |
| 1123 | + }), Object.defineProperty(t, "prototype", { | |
| 1124 | + writable: !1 | |
| 1125 | + }), e && setPrototypeOf(t, e); | |
| 1126 | +} | |
| 1127 | +module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1128 | + | |
| 1129 | +/***/ }), | |
| 1130 | + | |
| 1131 | +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 1132 | +/*!***********************************************************************!*\ | |
| 1133 | + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 1134 | + \***********************************************************************/ | |
| 1135 | +/***/ ((module) => { | |
| 1136 | + | |
| 1137 | +function _interopRequireDefault(e) { | |
| 1138 | + return e && e.__esModule ? e : { | |
| 1139 | + "default": e | |
| 1140 | + }; | |
| 1141 | +} | |
| 1142 | +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1143 | + | |
| 1144 | +/***/ }), | |
| 1145 | + | |
| 1146 | +/***/ "../node_modules/@babel/runtime/helpers/isNativeFunction.js": | |
| 1147 | +/*!******************************************************************!*\ | |
| 1148 | + !*** ../node_modules/@babel/runtime/helpers/isNativeFunction.js ***! | |
| 1149 | + \******************************************************************/ | |
| 1150 | +/***/ ((module) => { | |
| 1151 | + | |
| 1152 | +function _isNativeFunction(t) { | |
| 1153 | + try { | |
| 1154 | + return -1 !== Function.toString.call(t).indexOf("[native code]"); | |
| 1155 | + } catch (n) { | |
| 1156 | + return "function" == typeof t; | |
| 1157 | + } | |
| 1158 | +} | |
| 1159 | +module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1160 | + | |
| 1161 | +/***/ }), | |
| 1162 | + | |
| 1163 | +/***/ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js": | |
| 1164 | +/*!**************************************************************************!*\ | |
| 1165 | + !*** ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***! | |
| 1166 | + \**************************************************************************/ | |
| 1167 | +/***/ ((module) => { | |
| 1168 | + | |
| 1169 | +function _isNativeReflectConstruct() { | |
| 1170 | + try { | |
| 1171 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); | |
| 1172 | + } catch (t) {} | |
| 1173 | + return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() { | |
| 1174 | + return !!t; | |
| 1175 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 1176 | +} | |
| 1177 | +module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1178 | + | |
| 1179 | +/***/ }), | |
| 1180 | + | |
| 1181 | +/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 1182 | +/*!***************************************************************************!*\ | |
| 1183 | + !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 1184 | + \***************************************************************************/ | |
| 1185 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1186 | + | |
| 1187 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1188 | +var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 1189 | +function _possibleConstructorReturn(t, e) { | |
| 1190 | + if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 1191 | + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 1192 | + return assertThisInitialized(t); | |
| 1193 | +} | |
| 1194 | +module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1195 | + | |
| 1196 | +/***/ }), | |
| 1197 | + | |
| 1198 | +/***/ "../node_modules/@babel/runtime/helpers/regenerator.js": | |
| 1199 | +/*!*************************************************************!*\ | |
| 1200 | + !*** ../node_modules/@babel/runtime/helpers/regenerator.js ***! | |
| 1201 | + \*************************************************************/ | |
| 1202 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1203 | + | |
| 1204 | +var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 1205 | +function _regenerator() { | |
| 1206 | + /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 1207 | + var e, | |
| 1208 | + t, | |
| 1209 | + r = "function" == typeof Symbol ? Symbol : {}, | |
| 1210 | + n = r.iterator || "@@iterator", | |
| 1211 | + o = r.toStringTag || "@@toStringTag"; | |
| 1212 | + function i(r, n, o, i) { | |
| 1213 | + var c = n && n.prototype instanceof Generator ? n : Generator, | |
| 1214 | + u = Object.create(c.prototype); | |
| 1215 | + return regeneratorDefine(u, "_invoke", function (r, n, o) { | |
| 1216 | + var i, | |
| 1217 | + c, | |
| 1218 | + u, | |
| 1219 | + f = 0, | |
| 1220 | + p = o || [], | |
| 1221 | + y = !1, | |
| 1222 | + G = { | |
| 1223 | + p: 0, | |
| 1224 | + n: 0, | |
| 1225 | + v: e, | |
| 1226 | + a: d, | |
| 1227 | + f: d.bind(e, 4), | |
| 1228 | + d: function d(t, r) { | |
| 1229 | + return i = t, c = 0, u = e, G.n = r, a; | |
| 1230 | + } | |
| 1231 | + }; | |
| 1232 | + function d(r, n) { | |
| 1233 | + for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 1234 | + var o, | |
| 1235 | + i = p[t], | |
| 1236 | + d = G.p, | |
| 1237 | + l = i[2]; | |
| 1238 | + 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)); | |
| 1239 | + } | |
| 1240 | + if (o || r > 1) return a; | |
| 1241 | + throw y = !0, n; | |
| 1242 | + } | |
| 1243 | + return function (o, p, l) { | |
| 1244 | + if (f > 1) throw TypeError("Generator is already running"); | |
| 1245 | + for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 1246 | + i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 1247 | + try { | |
| 1248 | + if (f = 2, i) { | |
| 1249 | + if (c || (o = "next"), t = i[o]) { | |
| 1250 | + if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 1251 | + if (!t.done) return t; | |
| 1252 | + u = t.value, c < 2 && (c = 0); | |
| 1253 | + } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 1254 | + i = e; | |
| 1255 | + } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 1256 | + } catch (t) { | |
| 1257 | + i = e, c = 1, u = t; | |
| 1258 | + } finally { | |
| 1259 | + f = 1; | |
| 1260 | + } | |
| 1261 | + } | |
| 1262 | + return { | |
| 1263 | + value: t, | |
| 1264 | + done: y | |
| 1265 | + }; | |
| 1266 | + }; | |
| 1267 | + }(r, o, i), !0), u; | |
| 1268 | + } | |
| 1269 | + var a = {}; | |
| 1270 | + function Generator() {} | |
| 1271 | + function GeneratorFunction() {} | |
| 1272 | + function GeneratorFunctionPrototype() {} | |
| 1273 | + t = Object.getPrototypeOf; | |
| 1274 | + var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { | |
| 1275 | + return this; | |
| 1276 | + }), t), | |
| 1277 | + u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 1278 | + function f(e) { | |
| 1279 | + return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 1280 | + } | |
| 1281 | + 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 () { | |
| 1282 | + return this; | |
| 1283 | + }), regeneratorDefine(u, "toString", function () { | |
| 1284 | + return "[object Generator]"; | |
| 1285 | + }), (module.exports = _regenerator = function _regenerator() { | |
| 1286 | + return { | |
| 1287 | + w: i, | |
| 1288 | + m: f | |
| 1289 | + }; | |
| 1290 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 1291 | +} | |
| 1292 | +module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1293 | + | |
| 1294 | +/***/ }), | |
| 1295 | + | |
| 1296 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js": | |
| 1297 | +/*!******************************************************************!*\ | |
| 1298 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorAsync.js ***! | |
| 1299 | + \******************************************************************/ | |
| 1300 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1301 | + | |
| 1302 | +var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 1303 | +function _regeneratorAsync(n, e, r, t, o) { | |
| 1304 | + var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 1305 | + return a.next().then(function (n) { | |
| 1306 | + return n.done ? n.value : a.next(); | |
| 1307 | + }); | |
| 1308 | +} | |
| 1309 | +module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1310 | + | |
| 1311 | +/***/ }), | |
| 1312 | + | |
| 1313 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js": | |
| 1314 | +/*!*********************************************************************!*\ | |
| 1315 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js ***! | |
| 1316 | + \*********************************************************************/ | |
| 1317 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1318 | + | |
| 1319 | +var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 1320 | +var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 1321 | +function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 1322 | + return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 1323 | +} | |
| 1324 | +module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1325 | + | |
| 1326 | +/***/ }), | |
| 1327 | + | |
| 1328 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js": | |
| 1329 | +/*!**************************************************************************!*\ | |
| 1330 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js ***! | |
| 1331 | + \**************************************************************************/ | |
| 1332 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1333 | + | |
| 1334 | +var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 1335 | +var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 1336 | +function AsyncIterator(t, e) { | |
| 1337 | + function n(r, o, i, f) { | |
| 1338 | + try { | |
| 1339 | + var c = t[r](o), | |
| 1340 | + u = c.value; | |
| 1341 | + return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { | |
| 1342 | + n("next", t, i, f); | |
| 1343 | + }, function (t) { | |
| 1344 | + n("throw", t, i, f); | |
| 1345 | + }) : e.resolve(u).then(function (t) { | |
| 1346 | + c.value = t, i(c); | |
| 1347 | + }, function (t) { | |
| 1348 | + return n("throw", t, i, f); | |
| 1349 | + }); | |
| 1350 | + } catch (t) { | |
| 1351 | + f(t); | |
| 1352 | + } | |
| 1353 | + } | |
| 1354 | + var r; | |
| 1355 | + this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { | |
| 1356 | + return this; | |
| 1357 | + })), regeneratorDefine(this, "_invoke", function (t, o, i) { | |
| 1358 | + function f() { | |
| 1359 | + return new e(function (e, r) { | |
| 1360 | + n(t, i, e, r); | |
| 1361 | + }); | |
| 1362 | + } | |
| 1363 | + return r = r ? r.then(f, f) : f(); | |
| 1364 | + }, !0); | |
| 1365 | +} | |
| 1366 | +module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1367 | + | |
| 1368 | +/***/ }), | |
| 1369 | + | |
| 1370 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js": | |
| 1371 | +/*!*******************************************************************!*\ | |
| 1372 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorDefine.js ***! | |
| 1373 | + \*******************************************************************/ | |
| 1374 | +/***/ ((module) => { | |
| 1375 | + | |
| 1376 | +function _regeneratorDefine(e, r, n, t) { | |
| 1377 | + var i = Object.defineProperty; | |
| 1378 | + try { | |
| 1379 | + i({}, "", {}); | |
| 1380 | + } catch (e) { | |
| 1381 | + i = 0; | |
| 1382 | + } | |
| 1383 | + module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 1384 | + function o(r, n) { | |
| 1385 | + _regeneratorDefine(e, r, function (e) { | |
| 1386 | + return this._invoke(r, n, e); | |
| 1387 | + }); | |
| 1388 | + } | |
| 1389 | + r ? i ? i(e, r, { | |
| 1390 | + value: n, | |
| 1391 | + enumerable: !t, | |
| 1392 | + configurable: !t, | |
| 1393 | + writable: !t | |
| 1394 | + }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 1395 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 1396 | +} | |
| 1397 | +module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1398 | + | |
| 1399 | +/***/ }), | |
| 1400 | + | |
| 1401 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js": | |
| 1402 | +/*!*****************************************************************!*\ | |
| 1403 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorKeys.js ***! | |
| 1404 | + \*****************************************************************/ | |
| 1405 | +/***/ ((module) => { | |
| 1406 | + | |
| 1407 | +function _regeneratorKeys(e) { | |
| 1408 | + var n = Object(e), | |
| 1409 | + r = []; | |
| 1410 | + for (var t in n) r.unshift(t); | |
| 1411 | + return function e() { | |
| 1412 | + for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 1413 | + return e.done = !0, e; | |
| 1414 | + }; | |
| 1415 | +} | |
| 1416 | +module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1417 | + | |
| 1418 | +/***/ }), | |
| 1419 | + | |
| 1420 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 1421 | +/*!********************************************************************!*\ | |
| 1422 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 1423 | + \********************************************************************/ | |
| 1424 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1425 | + | |
| 1426 | +var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 1427 | +var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 1428 | +var regeneratorAsync = __webpack_require__(/*! ./regeneratorAsync.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js"); | |
| 1429 | +var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 1430 | +var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 1431 | +var regeneratorKeys = __webpack_require__(/*! ./regeneratorKeys.js */ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js"); | |
| 1432 | +var regeneratorValues = __webpack_require__(/*! ./regeneratorValues.js */ "../node_modules/@babel/runtime/helpers/regeneratorValues.js"); | |
| 1433 | +function _regeneratorRuntime() { | |
| 1434 | + "use strict"; | |
| 1435 | + | |
| 1436 | + var r = regenerator(), | |
| 1437 | + e = r.m(_regeneratorRuntime), | |
| 1438 | + t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 1439 | + function n(r) { | |
| 1440 | + var e = "function" == typeof r && r.constructor; | |
| 1441 | + return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 1442 | + } | |
| 1443 | + var o = { | |
| 1444 | + "throw": 1, | |
| 1445 | + "return": 2, | |
| 1446 | + "break": 3, | |
| 1447 | + "continue": 3 | |
| 1448 | + }; | |
| 1449 | + function a(r) { | |
| 1450 | + var e, t; | |
| 1451 | + return function (n) { | |
| 1452 | + e || (e = { | |
| 1453 | + stop: function stop() { | |
| 1454 | + return t(n.a, 2); | |
| 1455 | + }, | |
| 1456 | + "catch": function _catch() { | |
| 1457 | + return n.v; | |
| 1458 | + }, | |
| 1459 | + abrupt: function abrupt(r, e) { | |
| 1460 | + return t(n.a, o[r], e); | |
| 1461 | + }, | |
| 1462 | + delegateYield: function delegateYield(r, o, a) { | |
| 1463 | + return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 1464 | + }, | |
| 1465 | + finish: function finish(r) { | |
| 1466 | + return t(n.f, r); | |
| 1467 | + } | |
| 1468 | + }, t = function t(r, _t, o) { | |
| 1469 | + n.p = e.prev, n.n = e.next; | |
| 1470 | + try { | |
| 1471 | + return r(_t, o); | |
| 1472 | + } finally { | |
| 1473 | + e.next = n.n; | |
| 1474 | + } | |
| 1475 | + }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 1476 | + try { | |
| 1477 | + return r.call(this, e); | |
| 1478 | + } finally { | |
| 1479 | + n.p = e.prev, n.n = e.next; | |
| 1480 | + } | |
| 1481 | + }; | |
| 1482 | + } | |
| 1483 | + return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 1484 | + return { | |
| 1485 | + wrap: function wrap(e, t, n, o) { | |
| 1486 | + return r.w(a(e), t, n, o && o.reverse()); | |
| 1487 | + }, | |
| 1488 | + isGeneratorFunction: n, | |
| 1489 | + mark: r.m, | |
| 1490 | + awrap: function awrap(r, e) { | |
| 1491 | + return new OverloadYield(r, e); | |
| 1492 | + }, | |
| 1493 | + AsyncIterator: regeneratorAsyncIterator, | |
| 1494 | + async: function async(r, e, t, o, u) { | |
| 1495 | + return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 1496 | + }, | |
| 1497 | + keys: regeneratorKeys, | |
| 1498 | + values: regeneratorValues | |
| 1499 | + }; | |
| 1500 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 1501 | +} | |
| 1502 | +module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1503 | + | |
| 1504 | +/***/ }), | |
| 1505 | + | |
| 1506 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorValues.js": | |
| 1507 | +/*!*******************************************************************!*\ | |
| 1508 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorValues.js ***! | |
| 1509 | + \*******************************************************************/ | |
| 1510 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1511 | + | |
| 1512 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1513 | +function _regeneratorValues(e) { | |
| 1514 | + if (null != e) { | |
| 1515 | + var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], | |
| 1516 | + r = 0; | |
| 1517 | + if (t) return t.call(e); | |
| 1518 | + if ("function" == typeof e.next) return e; | |
| 1519 | + if (!isNaN(e.length)) return { | |
| 1520 | + next: function next() { | |
| 1521 | + return e && r >= e.length && (e = void 0), { | |
| 1522 | + value: e && e[r++], | |
| 1523 | + done: !e | |
| 1524 | + }; | |
| 1525 | + } | |
| 1526 | + }; | |
| 1527 | + } | |
| 1528 | + throw new TypeError(_typeof(e) + " is not iterable"); | |
| 1529 | +} | |
| 1530 | +module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1531 | + | |
| 1532 | +/***/ }), | |
| 1533 | + | |
| 1534 | +/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 1535 | +/*!****************************************************************!*\ | |
| 1536 | + !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 1537 | + \****************************************************************/ | |
| 1538 | +/***/ ((module) => { | |
| 1539 | + | |
| 1540 | +function _setPrototypeOf(t, e) { | |
| 1541 | + return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 1542 | + return t.__proto__ = e, t; | |
| 1543 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 1544 | +} | |
| 1545 | +module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1546 | + | |
| 1547 | +/***/ }), | |
| 1548 | + | |
| 1549 | +/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 1550 | +/*!*************************************************************!*\ | |
| 1551 | + !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 1552 | + \*************************************************************/ | |
| 1553 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1554 | + | |
| 1555 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1556 | +function toPrimitive(t, r) { | |
| 1557 | + if ("object" != _typeof(t) || !t) return t; | |
| 1558 | + var e = t[Symbol.toPrimitive]; | |
| 1559 | + if (void 0 !== e) { | |
| 1560 | + var i = e.call(t, r || "default"); | |
| 1561 | + if ("object" != _typeof(i)) return i; | |
| 1562 | + throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 1563 | + } | |
| 1564 | + return ("string" === r ? String : Number)(t); | |
| 1565 | +} | |
| 1566 | +module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1567 | + | |
| 1568 | +/***/ }), | |
| 1569 | + | |
| 1570 | +/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 1571 | +/*!***************************************************************!*\ | |
| 1572 | + !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 1573 | + \***************************************************************/ | |
| 1574 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1575 | + | |
| 1576 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1577 | +var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 1578 | +function toPropertyKey(t) { | |
| 1579 | + var i = toPrimitive(t, "string"); | |
| 1580 | + return "symbol" == _typeof(i) ? i : i + ""; | |
| 1581 | +} | |
| 1582 | +module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1583 | + | |
| 1584 | +/***/ }), | |
| 1585 | + | |
| 1586 | +/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 1587 | +/*!********************************************************!*\ | |
| 1588 | + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 1589 | + \********************************************************/ | |
| 1590 | +/***/ ((module) => { | |
| 1591 | + | |
| 1592 | +function _typeof(o) { | |
| 1593 | + "@babel/helpers - typeof"; | |
| 1594 | + | |
| 1595 | + return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 1596 | + return typeof o; | |
| 1597 | + } : function (o) { | |
| 1598 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 1599 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 1600 | +} | |
| 1601 | +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1602 | + | |
| 1603 | +/***/ }), | |
| 1604 | + | |
| 1605 | +/***/ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js": | |
| 1606 | +/*!*****************************************************************!*\ | |
| 1607 | + !*** ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***! | |
| 1608 | + \*****************************************************************/ | |
| 1609 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1610 | + | |
| 1611 | +var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); | |
| 1612 | +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 1613 | +var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ "../node_modules/@babel/runtime/helpers/isNativeFunction.js"); | |
| 1614 | +var construct = __webpack_require__(/*! ./construct.js */ "../node_modules/@babel/runtime/helpers/construct.js"); | |
| 1615 | +function _wrapNativeSuper(t) { | |
| 1616 | + var r = "function" == typeof Map ? new Map() : void 0; | |
| 1617 | + return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) { | |
| 1618 | + if (null === t || !isNativeFunction(t)) return t; | |
| 1619 | + if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); | |
| 1620 | + if (void 0 !== r) { | |
| 1621 | + if (r.has(t)) return r.get(t); | |
| 1622 | + r.set(t, Wrapper); | |
| 1623 | + } | |
| 1624 | + function Wrapper() { | |
| 1625 | + return construct(t, arguments, getPrototypeOf(this).constructor); | |
| 1626 | + } | |
| 1627 | + return Wrapper.prototype = Object.create(t.prototype, { | |
| 1628 | + constructor: { | |
| 1629 | + value: Wrapper, | |
| 1630 | + enumerable: !1, | |
| 1631 | + writable: !0, | |
| 1632 | + configurable: !0 | |
| 1633 | + } | |
| 1634 | + }), setPrototypeOf(Wrapper, t); | |
| 1635 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t); | |
| 1636 | +} | |
| 1637 | +module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1638 | + | |
| 1639 | +/***/ }), | |
| 1640 | + | |
| 1641 | +/***/ "../node_modules/@babel/runtime/regenerator/index.js": | |
| 1642 | +/*!***********************************************************!*\ | |
| 1643 | + !*** ../node_modules/@babel/runtime/regenerator/index.js ***! | |
| 1644 | + \***********************************************************/ | |
| 1645 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1646 | + | |
| 1647 | +// TODO(Babel 8): Remove this file. | |
| 1648 | + | |
| 1649 | +var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); | |
| 1650 | +module.exports = runtime; | |
| 1651 | + | |
| 1652 | +// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= | |
| 1653 | +try { | |
| 1654 | + regeneratorRuntime = runtime; | |
| 1655 | +} catch (accidentalStrictMode) { | |
| 1656 | + if (typeof globalThis === "object") { | |
| 1657 | + globalThis.regeneratorRuntime = runtime; | |
| 1658 | + } else { | |
| 1659 | + Function("r", "regeneratorRuntime = r")(runtime); | |
| 1660 | + } | |
| 1661 | +} | |
| 1662 | + | |
| 1663 | + | |
| 1664 | +/***/ }), | |
| 1665 | + | |
| 1666 | +/***/ "@wordpress/api-fetch": | |
| 1667 | +/*!******************************!*\ | |
| 1668 | + !*** external "wp.apiFetch" ***! | |
| 1669 | + \******************************/ | |
| 1670 | +/***/ ((module) => { | |
| 1671 | + | |
| 1672 | +"use strict"; | |
| 1673 | +module.exports = wp.apiFetch; | |
| 1674 | + | |
| 1675 | +/***/ }), | |
| 1676 | + | |
| 1677 | +/***/ "@wordpress/i18n": | |
| 1678 | +/*!**************************!*\ | |
| 1679 | + !*** external "wp.i18n" ***! | |
| 1680 | + \**************************/ | |
| 1681 | +/***/ ((module) => { | |
| 1682 | + | |
| 1683 | +"use strict"; | |
| 1684 | +module.exports = wp.i18n; | |
| 1685 | + | |
| 1686 | +/***/ }) | |
| 1687 | + | |
| 1688 | +/******/ }); | |
| 1689 | +/************************************************************************/ | |
| 1690 | +/******/ // The module cache | |
| 1691 | +/******/ var __webpack_module_cache__ = {}; | |
| 1692 | +/******/ | |
| 1693 | +/******/ // The require function | |
| 1694 | +/******/ function __webpack_require__(moduleId) { | |
| 1695 | +/******/ // Check if module is in cache | |
| 1696 | +/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 1697 | +/******/ if (cachedModule !== undefined) { | |
| 1698 | +/******/ return cachedModule.exports; | |
| 1699 | +/******/ } | |
| 1700 | +/******/ // Create a new module (and put it into the cache) | |
| 1701 | +/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 1702 | +/******/ // no module.id needed | |
| 1703 | +/******/ // no module.loaded needed | |
| 1704 | +/******/ exports: {} | |
| 1705 | +/******/ }; | |
| 1706 | +/******/ | |
| 1707 | +/******/ // Execute the module function | |
| 1708 | +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 1709 | +/******/ | |
| 1710 | +/******/ // Return the exports of the module | |
| 1711 | +/******/ return module.exports; | |
| 1712 | +/******/ } | |
| 1713 | +/******/ | |
| 1714 | +/************************************************************************/ | |
| 1715 | +var __webpack_exports__ = {}; | |
| 1716 | +// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 1717 | +(() => { | |
| 1718 | +"use strict"; | |
| 1719 | +/*!*********************************************************************!*\ | |
| 1720 | + !*** ../app/modules/import-export-customization/assets/js/admin.js ***! | |
| 1721 | + \*********************************************************************/ | |
| 1722 | + | |
| 1723 | + | |
| 1724 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1725 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1726 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1727 | +var _appsEventTracking = __webpack_require__(/*! ../../../../assets/js/event-track/apps-event-tracking */ "../app/assets/js/event-track/apps-event-tracking.js"); | |
| 1728 | +var _revertKitHandler = __webpack_require__(/*! ./shared/revert-kit-handler */ "../app/modules/import-export-customization/assets/js/shared/revert-kit-handler.js"); | |
| 1729 | +var Admin = /*#__PURE__*/function () { | |
| 1730 | + function Admin() { | |
| 1731 | + var _this = this; | |
| 1732 | + (0, _classCallCheck2.default)(this, Admin); | |
| 1733 | + var urlParams = new URLSearchParams(window.location.search); | |
| 1734 | + if ('elementor-tools' === urlParams.get('page')) { | |
| 1735 | + this.sendPageToolsViewedEvent(); | |
| 1736 | + elementorAdmin.elements.$settingsTabs.on('focus', function () { | |
| 1737 | + var location = window.location.hash.slice(1); | |
| 1738 | + _this.maybeSendImportExportLocationEvent(location); | |
| 1739 | + }); | |
| 1740 | + this.maybeSendImportExportLocationEvent(window.location.hash.slice(1)); | |
| 1741 | + } | |
| 1742 | + this.revertButton = document.getElementById('elementor-import-export__revert_kit'); | |
| 1743 | + this.importFroLibraryButton = document.getElementById('elementor-import-export__import_from_library'); | |
| 1744 | + this.importButton = document.getElementById('elementor-import-export__import'); | |
| 1745 | + this.exportButton = document.getElementById('elementor-import-export__export'); | |
| 1746 | + this.initializeRevertHandler(); | |
| 1747 | + this.bindEventListeners(); | |
| 1748 | + } | |
| 1749 | + return (0, _createClass2.default)(Admin, [{ | |
| 1750 | + key: "initializeRevertHandler", | |
| 1751 | + value: function initializeRevertHandler() { | |
| 1752 | + if (this.revertButton) { | |
| 1753 | + this.revertHandler = new _revertKitHandler.RevertKitHandler({ | |
| 1754 | + revertButton: this.revertButton | |
| 1755 | + }); | |
| 1756 | + this.revertHandler.maybeShowReferrerKitDialog(); | |
| 1757 | + } | |
| 1758 | + } | |
| 1759 | + }, { | |
| 1760 | + key: "bindEventListeners", | |
| 1761 | + value: function bindEventListeners() { | |
| 1762 | + if (this.revertButton) { | |
| 1763 | + this.revertButton.addEventListener('click', this.onRevertButtonClick.bind(this)); | |
| 1764 | + } | |
| 1765 | + if (this.importFroLibraryButton) { | |
| 1766 | + this.importFroLibraryButton.addEventListener('click', this.onImportFromLibraryButtonClick.bind(this)); | |
| 1767 | + } | |
| 1768 | + if (this.importButton) { | |
| 1769 | + this.importButton.addEventListener('click', this.onImportButtonClick.bind(this)); | |
| 1770 | + } | |
| 1771 | + if (this.exportButton) { | |
| 1772 | + this.exportButton.addEventListener('click', this.onExportButtonClick.bind(this)); | |
| 1773 | + } | |
| 1774 | + } | |
| 1775 | + }, { | |
| 1776 | + key: "sendPageToolsViewedEvent", | |
| 1777 | + value: function sendPageToolsViewedEvent() { | |
| 1778 | + _appsEventTracking.AppsEventTracking.sendPageViewsWebsiteTemplates(elementorCommon.eventsManager.config.secondaryLocations.admin.pluginToolsTab); | |
| 1779 | + } | |
| 1780 | + }, { | |
| 1781 | + key: "maybeSendImportExportLocationEvent", | |
| 1782 | + value: function maybeSendImportExportLocationEvent(location) { | |
| 1783 | + if ('tab-import-export-kit' === location) { | |
| 1784 | + _appsEventTracking.AppsEventTracking.sendPageViewsWebsiteTemplates(elementorCommon.eventsManager.config.secondaryLocations.admin.pluginWebsiteTemplatesTab); | |
| 1785 | + } | |
| 1786 | + } | |
| 1787 | + }, { | |
| 1788 | + key: "onRevertButtonClick", | |
| 1789 | + value: function onRevertButtonClick(event) { | |
| 1790 | + var _this$revertHandler; | |
| 1791 | + event.preventDefault(); | |
| 1792 | + _appsEventTracking.AppsEventTracking.sendImportExportAdminAction('Revert'); | |
| 1793 | + (_this$revertHandler = this.revertHandler) === null || _this$revertHandler === void 0 || _this$revertHandler.revertKit(); | |
| 1794 | + } | |
| 1795 | + }, { | |
| 1796 | + key: "onExportButtonClick", | |
| 1797 | + value: function onExportButtonClick() { | |
| 1798 | + _appsEventTracking.AppsEventTracking.sendImportExportAdminAction('Export'); | |
| 1799 | + } | |
| 1800 | + }, { | |
| 1801 | + key: "onImportButtonClick", | |
| 1802 | + value: function onImportButtonClick() { | |
| 1803 | + _appsEventTracking.AppsEventTracking.sendImportExportAdminAction('Import'); | |
| 1804 | + } | |
| 1805 | + }, { | |
| 1806 | + key: "onImportFromLibraryButtonClick", | |
| 1807 | + value: function onImportFromLibraryButtonClick() { | |
| 1808 | + _appsEventTracking.AppsEventTracking.sendImportExportAdminAction('Import from Library'); | |
| 1809 | + } | |
| 1810 | + }]); | |
| 1811 | +}(); | |
| 1812 | +window.addEventListener('load', function () { | |
| 1813 | + new Admin(); | |
| 1814 | +}); | |
| 1815 | +})(); | |
| 1816 | + | |
| 1817 | +/******/ })() | |
| 1818 | +; | |
| 1482 | 1819 | //# sourceMappingURL=import-export-customization-admin.js.map |