| @@ -1,1139 +1,750 @@ | ||
| 1 | -/******/ (() => { // webpackBootstrap | |
| 2 | -/******/ var __webpack_modules__ = ({ | |
| 1 | +(function(_wordpress_i18n) { | |
| 3 | 2 | |
| 4 | -/***/ "../modules/container-converter/assets/js/editor/commands/convert-all.js": | |
| 5 | -/*!*******************************************************************************!*\ | |
| 6 | - !*** ../modules/container-converter/assets/js/editor/commands/convert-all.js ***! | |
| 7 | - \*******************************************************************************/ | |
| 8 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 3 | +//#region \0rolldown/runtime.js | |
| 4 | + var __defProp = Object.defineProperty; | |
| 5 | + var __name = (target, value) => __defProp(target, "name", { | |
| 6 | + value, | |
| 7 | + configurable: true | |
| 8 | + }); | |
| 9 | + var __exportAll = (all, no_symbols) => { | |
| 10 | + let target = {}; | |
| 11 | + for (var name in all) { | |
| 12 | + __defProp(target, name, { | |
| 13 | + get: all[name], | |
| 14 | + enumerable: true | |
| 15 | + }); | |
| 16 | + } | |
| 17 | + if (!no_symbols) { | |
| 18 | + __defProp(target, Symbol.toStringTag, { value: "Module" }); | |
| 19 | + } | |
| 20 | + return target; | |
| 21 | + }; | |
| 9 | 22 | |
| 10 | -"use strict"; | |
| 11 | -/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 23 | +//#endregion | |
| 12 | 24 | |
| 25 | +//#region node_modules/@babel/runtime/helpers/esm/classCallCheck.js | |
| 26 | + function _classCallCheck(a, n) { | |
| 27 | + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 28 | + } | |
| 13 | 29 | |
| 14 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 15 | -Object.defineProperty(exports, "__esModule", ({ | |
| 16 | - value: true | |
| 17 | -})); | |
| 18 | -exports.ConvertAll = void 0; | |
| 19 | -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); | |
| 20 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 21 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 22 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 23 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 24 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 25 | -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)); } | |
| 26 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 27 | -var ConvertAll = exports.ConvertAll = /*#__PURE__*/function (_$e$modules$editor$do) { | |
| 28 | - function ConvertAll() { | |
| 29 | - (0, _classCallCheck2.default)(this, ConvertAll); | |
| 30 | - return _callSuper(this, ConvertAll, arguments); | |
| 31 | - } | |
| 32 | - (0, _inherits2.default)(ConvertAll, _$e$modules$editor$do); | |
| 33 | - return (0, _createClass2.default)(ConvertAll, [{ | |
| 34 | - key: "getHistory", | |
| 35 | - value: function getHistory() { | |
| 36 | - return { | |
| 37 | - type: __('Converted to Containers', 'elementor'), | |
| 38 | - title: __('All Content', 'elementor') | |
| 39 | - }; | |
| 40 | - } | |
| 41 | - }, { | |
| 42 | - key: "apply", | |
| 43 | - value: function apply() { | |
| 44 | - var _elementor$getPreview = elementor.getPreviewContainer(), | |
| 45 | - children = _elementor$getPreview.children; | |
| 46 | - (0, _toConsumableArray2.default)(children).forEach(function (container) { | |
| 47 | - $e.run('container-converter/convert', { | |
| 48 | - container: container | |
| 49 | - }); | |
| 50 | - }); | |
| 51 | - } | |
| 52 | - }]); | |
| 53 | -}($e.modules.editor.document.CommandHistoryBase); | |
| 30 | +//#endregion | |
| 31 | +//#region node_modules/@babel/runtime/helpers/esm/typeof.js | |
| 32 | + function _typeof(o) { | |
| 33 | + "@babel/helpers - typeof"; | |
| 34 | + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 35 | + return typeof o; | |
| 36 | + } : function(o) { | |
| 37 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 38 | + }, _typeof(o); | |
| 39 | + } | |
| 54 | 40 | |
| 55 | -/***/ }), | |
| 41 | +//#endregion | |
| 42 | +//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js | |
| 43 | + function toPrimitive(t, r) { | |
| 44 | + if ("object" != _typeof(t) || !t) return t; | |
| 45 | + var e = t[Symbol.toPrimitive]; | |
| 46 | + if (void 0 !== e) { | |
| 47 | + var i = e.call(t, r || "default"); | |
| 48 | + if ("object" != _typeof(i)) return i; | |
| 49 | + throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 50 | + } | |
| 51 | + return ("string" === r ? String : Number)(t); | |
| 52 | + } | |
| 56 | 53 | |
| 57 | -/***/ "../modules/container-converter/assets/js/editor/commands/convert.js": | |
| 58 | -/*!***************************************************************************!*\ | |
| 59 | - !*** ../modules/container-converter/assets/js/editor/commands/convert.js ***! | |
| 60 | - \***************************************************************************/ | |
| 61 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 54 | +//#endregion | |
| 55 | +//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js | |
| 56 | + function toPropertyKey(t) { | |
| 57 | + var i = toPrimitive(t, "string"); | |
| 58 | + return "symbol" == _typeof(i) ? i : i + ""; | |
| 59 | + } | |
| 62 | 60 | |
| 63 | -"use strict"; | |
| 64 | -/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 61 | +//#endregion | |
| 62 | +//#region node_modules/@babel/runtime/helpers/esm/createClass.js | |
| 63 | + function _defineProperties(e, r) { | |
| 64 | + for (var t = 0; t < r.length; t++) { | |
| 65 | + var o = r[t]; | |
| 66 | + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 67 | + } | |
| 68 | + } | |
| 69 | + function _createClass(e, r, t) { | |
| 70 | + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; | |
| 71 | + } | |
| 65 | 72 | |
| 73 | +//#endregion | |
| 74 | +//#region node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js | |
| 75 | + function _assertThisInitialized(e) { | |
| 76 | + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 77 | + return e; | |
| 78 | + } | |
| 66 | 79 | |
| 67 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 68 | -Object.defineProperty(exports, "__esModule", ({ | |
| 69 | - value: true | |
| 70 | -})); | |
| 71 | -exports.Convert = void 0; | |
| 72 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 73 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 74 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 75 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 76 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 77 | -var _migrator = _interopRequireDefault(__webpack_require__(/*! ../migrator */ "../modules/container-converter/assets/js/editor/migrator.js")); | |
| 78 | -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)); } | |
| 79 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 80 | -/** | |
| 81 | - * @typedef {import('../../../../../../assets/dev/js/editor/container/container')} Container | |
| 82 | - */ | |
| 83 | -var Convert = exports.Convert = /*#__PURE__*/function (_$e$modules$editor$do) { | |
| 84 | - function Convert() { | |
| 85 | - (0, _classCallCheck2.default)(this, Convert); | |
| 86 | - return _callSuper(this, Convert, arguments); | |
| 87 | - } | |
| 88 | - (0, _inherits2.default)(Convert, _$e$modules$editor$do); | |
| 89 | - return (0, _createClass2.default)(Convert, [{ | |
| 90 | - key: "getHistory", | |
| 91 | - value: function getHistory() { | |
| 92 | - return { | |
| 93 | - type: __('Converted to Container', 'elementor'), | |
| 94 | - title: __('Section', 'elementor') | |
| 95 | - }; | |
| 96 | - } | |
| 97 | - }, { | |
| 98 | - key: "validateArgs", | |
| 99 | - value: function validateArgs() { | |
| 100 | - var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 101 | - this.requireContainer(args); | |
| 102 | - } | |
| 103 | - }, { | |
| 104 | - key: "apply", | |
| 105 | - value: function apply(args) { | |
| 106 | - this.constructor.convert(args); | |
| 107 | - } | |
| 80 | +//#endregion | |
| 81 | +//#region node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js | |
| 82 | + function _possibleConstructorReturn(t, e) { | |
| 83 | + if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 84 | + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 85 | + return _assertThisInitialized(t); | |
| 86 | + } | |
| 108 | 87 | |
| 109 | - /** | |
| 110 | - * Convert an element to Container. | |
| 111 | - * | |
| 112 | - * TODO: It's static in order to be able to test it without initializing the whole editor in a browser. | |
| 113 | - * Should be moved to `apply()` when there is a proper way to test commands using jest. | |
| 114 | - * | |
| 115 | - * @param {Object} root0 | |
| 116 | - * @param {Container} root0.container - Element to convert. | |
| 117 | - * @param {Container} root0.rootContainer - Root element to migrate the `container` into (used for recursion). | |
| 118 | - * | |
| 119 | - * @return {void} | |
| 120 | - */ | |
| 121 | - }], [{ | |
| 122 | - key: "convert", | |
| 123 | - value: function convert(_ref) { | |
| 124 | - var container = _ref.container, | |
| 125 | - _ref$rootContainer = _ref.rootContainer, | |
| 126 | - rootContainer = _ref$rootContainer === void 0 ? container.parent : _ref$rootContainer; | |
| 127 | - var view = container.view, | |
| 128 | - elType = container.type, | |
| 129 | - isFirst = rootContainer === container.parent; | |
| 88 | +//#endregion | |
| 89 | +//#region node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js | |
| 90 | + function _getPrototypeOf(t) { | |
| 91 | + return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { | |
| 92 | + return t.__proto__ || Object.getPrototypeOf(t); | |
| 93 | + }, _getPrototypeOf(t); | |
| 94 | + } | |
| 130 | 95 | |
| 131 | - // TODO: Maybe use `view._parent.collection.indexOf( this.model )`. | |
| 132 | - // Get the converted element index. The first converted element should be put after the original one. | |
| 133 | - var at = isFirst ? view._index + 1 : view._index; | |
| 96 | +//#endregion | |
| 97 | +//#region node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js | |
| 98 | + function _setPrototypeOf(t, e) { | |
| 99 | + return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) { | |
| 100 | + return t.__proto__ = e, t; | |
| 101 | + }, _setPrototypeOf(t, e); | |
| 102 | + } | |
| 134 | 103 | |
| 135 | - // Copy the element as is without converting. | |
| 136 | - if (!_migrator.default.canConvertToContainer(elType)) { | |
| 137 | - $e.run('document/elements/create', { | |
| 138 | - model: { | |
| 139 | - elType: container.model.get('elType'), | |
| 140 | - widgetType: container.model.get('widgetType'), | |
| 141 | - settings: container.settings.toJSON({ | |
| 142 | - remove: 'default' | |
| 143 | - }) | |
| 144 | - }, | |
| 145 | - container: rootContainer, | |
| 146 | - options: { | |
| 147 | - at: at, | |
| 148 | - edit: false | |
| 149 | - } | |
| 150 | - }); | |
| 151 | - return; | |
| 152 | - } | |
| 153 | - var model = container.model.toJSON(); | |
| 154 | - var controlsMapping = _migrator.default.getLegacyControlsMapping(model); | |
| 155 | - var settings = container.settings.toJSON({ | |
| 156 | - remove: 'default' | |
| 157 | - }); | |
| 158 | - settings = _migrator.default.migrate(settings, controlsMapping); | |
| 159 | - settings = _migrator.default.normalizeSettings(model, settings); | |
| 160 | - var newContainer = $e.run('document/elements/create', { | |
| 161 | - model: { | |
| 162 | - elType: 'container', | |
| 163 | - settings: settings | |
| 164 | - }, | |
| 165 | - container: rootContainer, | |
| 166 | - options: { | |
| 167 | - at: at, | |
| 168 | - edit: false | |
| 169 | - } | |
| 170 | - }); | |
| 104 | +//#endregion | |
| 105 | +//#region node_modules/@babel/runtime/helpers/esm/inherits.js | |
| 106 | + function _inherits(t, e) { | |
| 107 | + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 108 | + t.prototype = Object.create(e && e.prototype, { constructor: { | |
| 109 | + value: t, | |
| 110 | + writable: !0, | |
| 111 | + configurable: !0 | |
| 112 | + } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); | |
| 113 | + } | |
| 171 | 114 | |
| 172 | - // Recursively convert children to Containers. | |
| 173 | - container.children.forEach(function (child) { | |
| 174 | - $e.run('container-converter/convert', { | |
| 175 | - container: child, | |
| 176 | - rootContainer: newContainer | |
| 177 | - }); | |
| 178 | - }); | |
| 179 | - } | |
| 180 | - }]); | |
| 181 | -}($e.modules.editor.document.CommandHistoryBase); | |
| 115 | +//#endregion | |
| 116 | +//#region node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js | |
| 117 | + function _arrayWithHoles(r) { | |
| 118 | + if (Array.isArray(r)) return r; | |
| 119 | + } | |
| 182 | 120 | |
| 183 | -/***/ }), | |
| 121 | +//#endregion | |
| 122 | +//#region node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js | |
| 123 | + function _iterableToArrayLimit(r, l) { | |
| 124 | + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 125 | + if (null != t) { | |
| 126 | + var e; | |
| 127 | + var n; | |
| 128 | + var i; | |
| 129 | + var u; | |
| 130 | + var a = []; | |
| 131 | + var f = !0; | |
| 132 | + var o = !1; | |
| 133 | + try { | |
| 134 | + if (i = (t = t.call(r)).next, 0 === l) { | |
| 135 | + if (Object(t) !== t) return; | |
| 136 | + f = !1; | |
| 137 | + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 138 | + } catch (r) { | |
| 139 | + o = !0, n = r; | |
| 140 | + } finally { | |
| 141 | + try { | |
| 142 | + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 143 | + } finally { | |
| 144 | + if (o) throw n; | |
| 145 | + } | |
| 146 | + } | |
| 147 | + return a; | |
| 148 | + } | |
| 149 | + } | |
| 184 | 150 | |
| 185 | -/***/ "../modules/container-converter/assets/js/editor/commands/index.js": | |
| 186 | -/*!*************************************************************************!*\ | |
| 187 | - !*** ../modules/container-converter/assets/js/editor/commands/index.js ***! | |
| 188 | - \*************************************************************************/ | |
| 189 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 151 | +//#endregion | |
| 152 | +//#region node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js | |
| 153 | + function _arrayLikeToArray(r, a) { | |
| 154 | + (null == a || a > r.length) && (a = r.length); | |
| 155 | + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 156 | + return n; | |
| 157 | + } | |
| 190 | 158 | |
| 191 | -"use strict"; | |
| 159 | +//#endregion | |
| 160 | +//#region node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js | |
| 161 | + function _unsupportedIterableToArray(r, a) { | |
| 162 | + if (r) { | |
| 163 | + if ("string" == typeof r) return _arrayLikeToArray(r, a); | |
| 164 | + var t = {}.toString.call(r).slice(8, -1); | |
| 165 | + 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; | |
| 166 | + } | |
| 167 | + } | |
| 192 | 168 | |
| 169 | +//#endregion | |
| 170 | +//#region node_modules/@babel/runtime/helpers/esm/nonIterableRest.js | |
| 171 | + function _nonIterableRest() { | |
| 172 | + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 173 | + } | |
| 193 | 174 | |
| 194 | -Object.defineProperty(exports, "__esModule", ({ | |
| 195 | - value: true | |
| 196 | -})); | |
| 197 | -Object.defineProperty(exports, "Convert", ({ | |
| 198 | - enumerable: true, | |
| 199 | - get: function get() { | |
| 200 | - return _convert.Convert; | |
| 201 | - } | |
| 202 | -})); | |
| 203 | -Object.defineProperty(exports, "ConvertAll", ({ | |
| 204 | - enumerable: true, | |
| 205 | - get: function get() { | |
| 206 | - return _convertAll.ConvertAll; | |
| 207 | - } | |
| 208 | -})); | |
| 209 | -var _convert = __webpack_require__(/*! ./convert */ "../modules/container-converter/assets/js/editor/commands/convert.js"); | |
| 210 | -var _convertAll = __webpack_require__(/*! ./convert-all */ "../modules/container-converter/assets/js/editor/commands/convert-all.js"); | |
| 175 | +//#endregion | |
| 176 | +//#region node_modules/@babel/runtime/helpers/esm/slicedToArray.js | |
| 177 | + function _slicedToArray(r, e) { | |
| 178 | + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); | |
| 179 | + } | |
| 211 | 180 | |
| 212 | -/***/ }), | |
| 181 | +//#endregion | |
| 182 | +//#region node_modules/@babel/runtime/helpers/esm/defineProperty.js | |
| 183 | + function _defineProperty(e, r, t) { | |
| 184 | + return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 185 | + value: t, | |
| 186 | + enumerable: !0, | |
| 187 | + configurable: !0, | |
| 188 | + writable: !0 | |
| 189 | + }) : e[r] = t, e; | |
| 190 | + } | |
| 213 | 191 | |
| 214 | -/***/ "../modules/container-converter/assets/js/editor/component.js": | |
| 215 | -/*!********************************************************************!*\ | |
| 216 | - !*** ../modules/container-converter/assets/js/editor/component.js ***! | |
| 217 | - \********************************************************************/ | |
| 218 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 192 | +//#endregion | |
| 193 | +//#region node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js | |
| 194 | + function _arrayWithoutHoles(r) { | |
| 195 | + if (Array.isArray(r)) return _arrayLikeToArray(r); | |
| 196 | + } | |
| 219 | 197 | |
| 220 | -"use strict"; | |
| 221 | -/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 198 | +//#endregion | |
| 199 | +//#region node_modules/@babel/runtime/helpers/esm/iterableToArray.js | |
| 200 | + function _iterableToArray(r) { | |
| 201 | + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 202 | + } | |
| 222 | 203 | |
| 204 | +//#endregion | |
| 205 | +//#region node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js | |
| 206 | + function _nonIterableSpread() { | |
| 207 | + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 208 | + } | |
| 223 | 209 | |
| 224 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 225 | -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 226 | -Object.defineProperty(exports, "__esModule", ({ | |
| 227 | - value: true | |
| 228 | -})); | |
| 229 | -exports["default"] = void 0; | |
| 230 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 231 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 232 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 233 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 234 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 235 | -var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../modules/container-converter/assets/js/editor/commands/index.js")); | |
| 236 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 237 | -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)); } | |
| 238 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 239 | -var _default = exports["default"] = /*#__PURE__*/function (_$e$modules$Component) { | |
| 240 | - function _default() { | |
| 241 | - var _this; | |
| 242 | - (0, _classCallCheck2.default)(this, _default); | |
| 243 | - _this = _callSuper(this, _default); | |
| 244 | - _this.bindEvents(); | |
| 245 | - return _this; | |
| 246 | - } | |
| 210 | +//#endregion | |
| 211 | +//#region node_modules/@babel/runtime/helpers/esm/toConsumableArray.js | |
| 212 | + function _toConsumableArray(r) { | |
| 213 | + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); | |
| 214 | + } | |
| 247 | 215 | |
| 248 | - /** | |
| 249 | - * Listen to click event in the panel. | |
| 250 | - * | |
| 251 | - * @return {void} | |
| 252 | - */ | |
| 253 | - (0, _inherits2.default)(_default, _$e$modules$Component); | |
| 254 | - return (0, _createClass2.default)(_default, [{ | |
| 255 | - key: "bindEvents", | |
| 256 | - value: function bindEvents() { | |
| 257 | - elementor.channels.editor.on('elementorContainerConverter:convert', function (_ref) { | |
| 258 | - var container = _ref.container, | |
| 259 | - el = _ref.el; | |
| 260 | - var button = el.querySelector('.elementor-button'); | |
| 261 | - var loadingClass = 'e-loading'; | |
| 262 | - button.classList.add(loadingClass); | |
| 263 | - | |
| 264 | - // Defer the conversion process in order to force a re-render of the button, since the conversion is | |
| 265 | - // synchronous and blocks the main thread from re-rendering. | |
| 266 | - setTimeout(function () { | |
| 267 | - if ('document' === container.type) { | |
| 268 | - $e.run('container-converter/convert-all'); | |
| 269 | - } else { | |
| 270 | - $e.run('container-converter/convert', { | |
| 271 | - container: container | |
| 272 | - }); | |
| 273 | - } | |
| 274 | - button.classList.remove(loadingClass); | |
| 275 | - button.setAttribute('disabled', true); | |
| 276 | - elementor.notifications.showToast({ | |
| 277 | - message: __('Your changes have been updated.', 'elementor') | |
| 278 | - }); | |
| 279 | - }); | |
| 280 | - }); | |
| 281 | - } | |
| 282 | - | |
| 283 | - /** | |
| 284 | - * Get the component namespace. | |
| 285 | - * | |
| 286 | - * @return {string} component namespace | |
| 287 | - */ | |
| 288 | - }, { | |
| 289 | - key: "getNamespace", | |
| 290 | - value: function getNamespace() { | |
| 291 | - return 'container-converter'; | |
| 292 | - } | |
| 293 | - | |
| 294 | - /** | |
| 295 | - * Get the component default commands. | |
| 296 | - * | |
| 297 | - * @return {Object} commands | |
| 298 | - */ | |
| 299 | - }, { | |
| 300 | - key: "defaultCommands", | |
| 301 | - value: function defaultCommands() { | |
| 302 | - return this.importCommands(commands); | |
| 303 | - } | |
| 304 | - }]); | |
| 305 | -}($e.modules.ComponentBase); | |
| 306 | - | |
| 307 | -/***/ }), | |
| 308 | - | |
| 309 | -/***/ "../modules/container-converter/assets/js/editor/maps/column.js": | |
| 310 | -/*!**********************************************************************!*\ | |
| 311 | - !*** ../modules/container-converter/assets/js/editor/maps/column.js ***! | |
| 312 | - \**********************************************************************/ | |
| 313 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 314 | - | |
| 315 | -"use strict"; | |
| 316 | - | |
| 317 | - | |
| 318 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 319 | -Object.defineProperty(exports, "__esModule", ({ | |
| 320 | - value: true | |
| 321 | -})); | |
| 322 | -exports["default"] = void 0; | |
| 323 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 324 | -var _utils = __webpack_require__(/*! ./utils */ "../modules/container-converter/assets/js/editor/maps/utils.js"); | |
| 325 | -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; } | |
| 326 | -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; } | |
| 327 | -var map = function map() { | |
| 328 | - return _objectSpread(_objectSpread(_objectSpread({}, (0, _utils.responsive)('_inline_size', function (_ref) { | |
| 329 | - var deviceValue = _ref.deviceValue, | |
| 330 | - breakpoint = _ref.breakpoint; | |
| 331 | - var deviceKey = (0, _utils.getDeviceKey)('width', breakpoint); | |
| 332 | - var newValue = { | |
| 333 | - size: deviceValue, | |
| 334 | - unit: '%' | |
| 335 | - }; | |
| 336 | - return [deviceKey, newValue]; | |
| 337 | - })), (0, _utils.responsive)('content_position', function (_ref2) { | |
| 338 | - var deviceValue = _ref2.deviceValue, | |
| 339 | - breakpoint = _ref2.breakpoint; | |
| 340 | - var optionsMap = { | |
| 341 | - top: 'flex-start', | |
| 342 | - bottom: 'flex-end' | |
| 343 | - }; | |
| 344 | - var deviceKey = (0, _utils.getDeviceKey)('flex_justify_content', breakpoint); | |
| 345 | - return [deviceKey, optionsMap[deviceValue] || deviceValue]; | |
| 346 | - })), (0, _utils.responsive)('space_between_widgets', function (_ref3) { | |
| 347 | - var deviceValue = _ref3.deviceValue, | |
| 348 | - breakpoint = _ref3.breakpoint; | |
| 349 | - var deviceKey = (0, _utils.getDeviceKey)('flex_gap', breakpoint); | |
| 350 | - var newValue = { | |
| 351 | - size: deviceValue, | |
| 352 | - column: '' + deviceValue, | |
| 353 | - row: '' + deviceValue, | |
| 354 | - unit: 'px' | |
| 355 | - }; | |
| 356 | - return [deviceKey, newValue]; | |
| 357 | - })); | |
| 358 | -}; | |
| 359 | -var _default = exports["default"] = map; | |
| 360 | - | |
| 361 | -/***/ }), | |
| 362 | - | |
| 363 | -/***/ "../modules/container-converter/assets/js/editor/maps/section.js": | |
| 364 | -/*!***********************************************************************!*\ | |
| 365 | - !*** ../modules/container-converter/assets/js/editor/maps/section.js ***! | |
| 366 | - \***********************************************************************/ | |
| 367 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 368 | - | |
| 369 | -"use strict"; | |
| 370 | - | |
| 371 | - | |
| 372 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 373 | -Object.defineProperty(exports, "__esModule", ({ | |
| 374 | - value: true | |
| 375 | -})); | |
| 376 | -exports["default"] = void 0; | |
| 377 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 378 | -var _utils = __webpack_require__(/*! ./utils */ "../modules/container-converter/assets/js/editor/maps/utils.js"); | |
| 379 | -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; } | |
| 380 | -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; } | |
| 381 | -var map = function map(_ref) { | |
| 382 | - var isInner = _ref.isInner, | |
| 383 | - _ref$settings = _ref.settings, | |
| 384 | - settings = _ref$settings === void 0 ? {} : _ref$settings; | |
| 385 | - var widthKey = isInner ? 'width' : 'boxed_width'; | |
| 386 | - return _objectSpread(_objectSpread(_objectSpread({}, 'boxed' === settings.layout ? (0, _utils.responsive)('content_width', widthKey) : { | |
| 387 | - content_width: null | |
| 388 | - }), 'min-height' === settings.height && (0, _utils.responsive)('custom_height', 'min_height')), {}, { | |
| 389 | - layout: function layout(_ref2) { | |
| 390 | - var value = _ref2.value; | |
| 391 | - var optionsMap = { | |
| 392 | - boxed: 'boxed', | |
| 393 | - full_width: 'full' | |
| 394 | - }; | |
| 395 | - return ['content_width', optionsMap[value] || value]; | |
| 396 | - }, | |
| 397 | - height: function height(_ref3) { | |
| 398 | - var value = _ref3.value, | |
| 399 | - sectionSettings = _ref3.settings; | |
| 400 | - switch (value) { | |
| 401 | - case 'full': | |
| 402 | - value = { | |
| 403 | - size: 100, | |
| 404 | - unit: 'vh' | |
| 405 | - }; | |
| 406 | - break; | |
| 407 | - case 'min-height': | |
| 408 | - value = sectionSettings.custom_height || { | |
| 409 | - size: 400, | |
| 410 | - unit: 'px' | |
| 411 | - }; // Default section's height. | |
| 412 | - break; | |
| 413 | - default: | |
| 414 | - return false; | |
| 415 | - } | |
| 416 | - return ['min_height', value]; | |
| 417 | - }, | |
| 418 | - gap: function gap(_ref4) { | |
| 419 | - var value = _ref4.value, | |
| 420 | - sectionSettings = _ref4.settings; | |
| 421 | - var sizesMap = { | |
| 422 | - no: 0, | |
| 423 | - narrow: 5, | |
| 424 | - extended: 15, | |
| 425 | - wide: 20, | |
| 426 | - wider: 30 | |
| 427 | - }; | |
| 428 | - value = 'custom' === value ? sectionSettings.gap_columns_custom : { | |
| 429 | - size: sizesMap[value], | |
| 430 | - column: '' + sizesMap[value], | |
| 431 | - row: '' + sizesMap[value], | |
| 432 | - unit: 'px' | |
| 433 | - }; | |
| 434 | - return ['flex_gap', value]; | |
| 435 | - }, | |
| 436 | - gap_columns_custom: null, | |
| 437 | - column_position: function column_position(_ref5) { | |
| 438 | - var value = _ref5.value; | |
| 439 | - var optionsMap = { | |
| 440 | - top: 'flex-start', | |
| 441 | - middle: 'center', | |
| 442 | - bottom: 'flex-end' | |
| 443 | - }; | |
| 444 | - return ['flex_align_items', optionsMap[value] || value]; | |
| 445 | - } | |
| 446 | - }); | |
| 447 | -}; | |
| 448 | -var _default = exports["default"] = map; | |
| 449 | - | |
| 450 | -/***/ }), | |
| 451 | - | |
| 452 | -/***/ "../modules/container-converter/assets/js/editor/maps/utils.js": | |
| 453 | -/*!*********************************************************************!*\ | |
| 454 | - !*** ../modules/container-converter/assets/js/editor/maps/utils.js ***! | |
| 455 | - \*********************************************************************/ | |
| 456 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 457 | - | |
| 458 | -"use strict"; | |
| 459 | - | |
| 460 | - | |
| 461 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 462 | -Object.defineProperty(exports, "__esModule", ({ | |
| 463 | - value: true | |
| 464 | -})); | |
| 465 | -exports.getDeviceKey = getDeviceKey; | |
| 466 | -exports.responsive = responsive; | |
| 467 | -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); | |
| 216 | +//#endregion | |
| 217 | +//#region modules/container-converter/assets/js/editor/maps/utils.js | |
| 468 | 218 | /** |
| 469 | - * Generate a mapping object for responsive controls. | |
| 470 | - * | |
| 471 | - * Usage: | |
| 472 | - * 1. responsive( 'old_key', 'new_key' ); | |
| 473 | - * 2. responsive( 'old_key', ( { key, value, deviceValue, settings, breakpoint } ) => { return [ key, value ] } ); | |
| 474 | - * | |
| 475 | - * @param {string} key - Control name without device suffix. | |
| 476 | - * @param {string | Function} value - New control name without device suffix, or a callback. | |
| 477 | - * | |
| 478 | - * @return {Object} mapping object | |
| 479 | - */ | |
| 480 | -function responsive(key, value) { | |
| 481 | - var breakpoints = [''].concat((0, _toConsumableArray2.default)(Object.keys(elementorFrontend.config.responsive.activeBreakpoints))); | |
| 482 | - return Object.fromEntries(breakpoints.map(function (breakpoint) { | |
| 483 | - var deviceKey = getDeviceKey(key, breakpoint); | |
| 219 | + * Generate a mapping object for responsive controls. | |
| 220 | + * | |
| 221 | + * Usage: | |
| 222 | + * 1. responsive( 'old_key', 'new_key' ); | |
| 223 | + * 2. responsive( 'old_key', ( { key, value, deviceValue, settings, breakpoint } ) => { return [ key, value ] } ); | |
| 224 | + * | |
| 225 | + * @param {string} key - Control name without device suffix. | |
| 226 | + * @param {string | Function} value - New control name without device suffix, or a callback. | |
| 227 | + * | |
| 228 | + * @return {Object} mapping object | |
| 229 | + */ | |
| 230 | + function responsive(key, value) { | |
| 231 | + var breakpoints = [""].concat(_toConsumableArray(Object.keys(elementorFrontend.config.responsive.activeBreakpoints))); | |
| 232 | + return Object.fromEntries(breakpoints.map(function(breakpoint) { | |
| 233 | + var deviceKey = getDeviceKey(key, breakpoint); | |
| 234 | + if ("string" === typeof value) { | |
| 235 | + var newDeviceKey = getDeviceKey(value, breakpoint); | |
| 236 | + return [deviceKey, function(_ref) { | |
| 237 | + return [newDeviceKey, _ref.settings[deviceKey]]; | |
| 238 | + }]; | |
| 239 | + } | |
| 240 | + return [deviceKey, function(_ref2) { | |
| 241 | + var settings = _ref2.settings; | |
| 242 | + var desktopValue = _ref2.value; | |
| 243 | + return value({ | |
| 244 | + key, | |
| 245 | + deviceKey, | |
| 246 | + value: desktopValue, | |
| 247 | + deviceValue: settings[deviceKey], | |
| 248 | + settings, | |
| 249 | + breakpoint | |
| 250 | + }); | |
| 251 | + }]; | |
| 252 | + })); | |
| 253 | + } | |
| 254 | + /** | |
| 255 | + * Get a setting key for a device. | |
| 256 | + * | |
| 257 | + * Examples: | |
| 258 | + * 1. getDeviceKey( 'some_control', 'mobile' ) => 'some_control_mobile'. | |
| 259 | + * 2. getDeviceKey( 'some_control', '' ) => 'some_control'. | |
| 260 | + * | |
| 261 | + * @param {string} key - Setting key. | |
| 262 | + * @param {string} breakpoint - Breakpoint name. | |
| 263 | + * | |
| 264 | + * @return {string} device key | |
| 265 | + */ | |
| 266 | + function getDeviceKey(key, breakpoint) { | |
| 267 | + return [key, breakpoint].filter(function(v) { | |
| 268 | + return !!v; | |
| 269 | + }).join("_"); | |
| 270 | + } | |
| 484 | 271 | |
| 485 | - // Simple responsive rename with string: | |
| 486 | - if ('string' === typeof value) { | |
| 487 | - var newDeviceKey = getDeviceKey(value, breakpoint); | |
| 488 | - return [deviceKey, function (_ref) { | |
| 489 | - var settings = _ref.settings; | |
| 490 | - return [newDeviceKey, settings[deviceKey]]; | |
| 491 | - }]; | |
| 492 | - } | |
| 272 | +//#endregion | |
| 273 | +//#region modules/container-converter/assets/js/editor/maps/section.js | |
| 274 | + function ownKeys$2(e, r) { | |
| 275 | + var t = Object.keys(e); | |
| 276 | + if (Object.getOwnPropertySymbols) { | |
| 277 | + var o = Object.getOwnPropertySymbols(e); | |
| 278 | + r && (o = o.filter(function(r) { | |
| 279 | + return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 280 | + })), t.push.apply(t, o); | |
| 281 | + } | |
| 282 | + return t; | |
| 283 | + } | |
| 284 | + __name(ownKeys$2, "ownKeys"); | |
| 285 | + function _objectSpread$2(e) { | |
| 286 | + for (var r = 1; r < arguments.length; r++) { | |
| 287 | + var t = null != arguments[r] ? arguments[r] : {}; | |
| 288 | + r % 2 ? ownKeys$2(Object(t), !0).forEach(function(r) { | |
| 289 | + _defineProperty(e, r, t[r]); | |
| 290 | + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function(r) { | |
| 291 | + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 292 | + }); | |
| 293 | + } | |
| 294 | + return e; | |
| 295 | + } | |
| 296 | + __name(_objectSpread$2, "_objectSpread"); | |
| 297 | + var map$1 = function map(_ref) { | |
| 298 | + var isInner = _ref.isInner; | |
| 299 | + var _ref$settings = _ref.settings; | |
| 300 | + var settings = _ref$settings === void 0 ? {} : _ref$settings; | |
| 301 | + var widthKey = isInner ? "width" : "boxed_width"; | |
| 302 | + return _objectSpread$2(_objectSpread$2(_objectSpread$2({}, "boxed" === settings.layout ? responsive("content_width", widthKey) : { content_width: null }), "min-height" === settings.height && responsive("custom_height", "min_height")), {}, { | |
| 303 | + layout: function layout(_ref2) { | |
| 304 | + var value = _ref2.value; | |
| 305 | + return ["content_width", { | |
| 306 | + boxed: "boxed", | |
| 307 | + full_width: "full" | |
| 308 | + }[value] || value]; | |
| 309 | + }, | |
| 310 | + height: function height(_ref3) { | |
| 311 | + var value = _ref3.value; | |
| 312 | + var sectionSettings = _ref3.settings; | |
| 313 | + switch (value) { | |
| 314 | + case "full": | |
| 315 | + value = { | |
| 316 | + size: 100, | |
| 317 | + unit: "vh" | |
| 318 | + }; | |
| 319 | + break; | |
| 320 | + case "min-height": | |
| 321 | + value = sectionSettings.custom_height || { | |
| 322 | + size: 400, | |
| 323 | + unit: "px" | |
| 324 | + }; | |
| 325 | + break; | |
| 326 | + default: return false; | |
| 327 | + } | |
| 328 | + return ["min_height", value]; | |
| 329 | + }, | |
| 330 | + gap: function gap(_ref4) { | |
| 331 | + var value = _ref4.value; | |
| 332 | + var sectionSettings = _ref4.settings; | |
| 333 | + var sizesMap = { | |
| 334 | + no: 0, | |
| 335 | + narrow: 5, | |
| 336 | + extended: 15, | |
| 337 | + wide: 20, | |
| 338 | + wider: 30 | |
| 339 | + }; | |
| 340 | + value = "custom" === value ? sectionSettings.gap_columns_custom : { | |
| 341 | + size: sizesMap[value], | |
| 342 | + column: "" + sizesMap[value], | |
| 343 | + row: "" + sizesMap[value], | |
| 344 | + unit: "px" | |
| 345 | + }; | |
| 346 | + return ["flex_gap", value]; | |
| 347 | + }, | |
| 348 | + gap_columns_custom: null, | |
| 349 | + column_position: function column_position(_ref5) { | |
| 350 | + var value = _ref5.value; | |
| 351 | + return ["flex_align_items", { | |
| 352 | + top: "flex-start", | |
| 353 | + middle: "center", | |
| 354 | + bottom: "flex-end" | |
| 355 | + }[value] || value]; | |
| 356 | + } | |
| 357 | + }); | |
| 358 | + }; | |
| 493 | 359 | |
| 494 | - // Advanced responsive rename with callback: | |
| 495 | - return [deviceKey, function (_ref2) { | |
| 496 | - var settings = _ref2.settings, | |
| 497 | - desktopValue = _ref2.value; | |
| 498 | - return value({ | |
| 499 | - key: key, | |
| 500 | - deviceKey: deviceKey, | |
| 501 | - value: desktopValue, | |
| 502 | - deviceValue: settings[deviceKey], | |
| 503 | - settings: settings, | |
| 504 | - breakpoint: breakpoint | |
| 505 | - }); | |
| 506 | - }]; | |
| 507 | - })); | |
| 508 | -} | |
| 360 | +//#endregion | |
| 361 | +//#region modules/container-converter/assets/js/editor/maps/column.js | |
| 362 | + function ownKeys$1(e, r) { | |
| 363 | + var t = Object.keys(e); | |
| 364 | + if (Object.getOwnPropertySymbols) { | |
| 365 | + var o = Object.getOwnPropertySymbols(e); | |
| 366 | + r && (o = o.filter(function(r) { | |
| 367 | + return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 368 | + })), t.push.apply(t, o); | |
| 369 | + } | |
| 370 | + return t; | |
| 371 | + } | |
| 372 | + __name(ownKeys$1, "ownKeys"); | |
| 373 | + function _objectSpread$1(e) { | |
| 374 | + for (var r = 1; r < arguments.length; r++) { | |
| 375 | + var t = null != arguments[r] ? arguments[r] : {}; | |
| 376 | + r % 2 ? ownKeys$1(Object(t), !0).forEach(function(r) { | |
| 377 | + _defineProperty(e, r, t[r]); | |
| 378 | + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function(r) { | |
| 379 | + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 380 | + }); | |
| 381 | + } | |
| 382 | + return e; | |
| 383 | + } | |
| 384 | + __name(_objectSpread$1, "_objectSpread"); | |
| 385 | + var map = function map() { | |
| 386 | + return _objectSpread$1(_objectSpread$1(_objectSpread$1({}, responsive("_inline_size", function(_ref) { | |
| 387 | + var deviceValue = _ref.deviceValue; | |
| 388 | + var breakpoint = _ref.breakpoint; | |
| 389 | + return [getDeviceKey("width", breakpoint), { | |
| 390 | + size: deviceValue, | |
| 391 | + unit: "%" | |
| 392 | + }]; | |
| 393 | + })), responsive("content_position", function(_ref2) { | |
| 394 | + var deviceValue = _ref2.deviceValue; | |
| 395 | + var breakpoint = _ref2.breakpoint; | |
| 396 | + return [getDeviceKey("flex_justify_content", breakpoint), { | |
| 397 | + top: "flex-start", | |
| 398 | + bottom: "flex-end" | |
| 399 | + }[deviceValue] || deviceValue]; | |
| 400 | + })), responsive("space_between_widgets", function(_ref3) { | |
| 401 | + var deviceValue = _ref3.deviceValue; | |
| 402 | + var breakpoint = _ref3.breakpoint; | |
| 403 | + return [getDeviceKey("flex_gap", breakpoint), { | |
| 404 | + size: deviceValue, | |
| 405 | + column: "" + deviceValue, | |
| 406 | + row: "" + deviceValue, | |
| 407 | + unit: "px" | |
| 408 | + }]; | |
| 409 | + })); | |
| 410 | + }; | |
| 509 | 411 | |
| 510 | -/** | |
| 511 | - * Get a setting key for a device. | |
| 512 | - * | |
| 513 | - * Examples: | |
| 514 | - * 1. getDeviceKey( 'some_control', 'mobile' ) => 'some_control_mobile'. | |
| 515 | - * 2. getDeviceKey( 'some_control', '' ) => 'some_control'. | |
| 516 | - * | |
| 517 | - * @param {string} key - Setting key. | |
| 518 | - * @param {string} breakpoint - Breakpoint name. | |
| 519 | - * | |
| 520 | - * @return {string} device key | |
| 521 | - */ | |
| 522 | -function getDeviceKey(key, breakpoint) { | |
| 523 | - return [key, breakpoint].filter(function (v) { | |
| 524 | - return !!v; | |
| 525 | - }).join('_'); | |
| 526 | -} | |
| 412 | +//#endregion | |
| 413 | +//#region modules/container-converter/assets/js/editor/migrator.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 Migrator = /*#__PURE__*/ function() { | |
| 436 | + function Migrator() { | |
| 437 | + _classCallCheck(this, Migrator); | |
| 438 | + } | |
| 439 | + return _createClass(Migrator, null, [ | |
| 440 | + { | |
| 441 | + key: "migrate", | |
| 442 | + value: function migrate(settings, map) { | |
| 443 | + return Object.fromEntries(Object.entries(_objectSpread({}, settings)).map(function(_ref) { | |
| 444 | + var _ref2 = _slicedToArray(_ref, 2); | |
| 445 | + var key = _ref2[0]; | |
| 446 | + var value = _ref2[1]; | |
| 447 | + var mapped = map[key]; | |
| 448 | + if (null === mapped) return null; | |
| 449 | + if ("string" === typeof mapped) return [mapped, value]; | |
| 450 | + if ("function" === typeof mapped) return mapped({ | |
| 451 | + key, | |
| 452 | + value, | |
| 453 | + settings | |
| 454 | + }); | |
| 455 | + return [key, value]; | |
| 456 | + }).filter(Boolean)); | |
| 457 | + } | |
| 458 | + }, | |
| 459 | + { | |
| 460 | + key: "canConvertToContainer", | |
| 461 | + value: function canConvertToContainer(elType) { | |
| 462 | + return Object.keys(this.config).includes(elType); | |
| 463 | + } | |
| 464 | + }, | |
| 465 | + { | |
| 466 | + key: "getLegacyControlsMapping", | |
| 467 | + value: function getLegacyControlsMapping(model) { | |
| 468 | + var config = this.config[model.elType]; | |
| 469 | + if (!config) return {}; | |
| 470 | + var mapping = config.legacyControlsMapping; | |
| 471 | + return "function" === typeof mapping ? mapping(model) : mapping; | |
| 472 | + } | |
| 473 | + }, | |
| 474 | + { | |
| 475 | + key: "normalizeSettings", | |
| 476 | + value: function normalizeSettings(model, settings) { | |
| 477 | + var config = this.config[model.elType]; | |
| 478 | + if (!config.normalizeSettings) return settings; | |
| 479 | + return config.normalizeSettings(settings, model); | |
| 480 | + } | |
| 481 | + } | |
| 482 | + ]); | |
| 483 | + }(); | |
| 484 | + /** | |
| 485 | + * Migrations configuration by `elType`. | |
| 486 | + * | |
| 487 | + * @type {Object} | |
| 488 | + */ | |
| 489 | + _defineProperty(Migrator, "config", { | |
| 490 | + section: { | |
| 491 | + legacyControlsMapping: map$1, | |
| 492 | + normalizeSettings: function normalizeSettings(settings, _ref3) { | |
| 493 | + var isInner = _ref3.isInner; | |
| 494 | + return _objectSpread(_objectSpread({}, settings), {}, { | |
| 495 | + flex_direction: "row", | |
| 496 | + flex_align_items: settings.flex_align_items || "stretch", | |
| 497 | + flex_gap: settings.flex_gap || { | |
| 498 | + size: 10, | |
| 499 | + column: "10", | |
| 500 | + row: "10", | |
| 501 | + unit: "px" | |
| 502 | + } | |
| 503 | + }, isInner ? { content_width: "full" } : {}); | |
| 504 | + } | |
| 505 | + }, | |
| 506 | + column: { | |
| 507 | + legacyControlsMapping: map, | |
| 508 | + normalizeSettings: function normalizeSettings(settings) { | |
| 509 | + return _objectSpread(_objectSpread({}, settings), {}, { content_width: "full" }); | |
| 510 | + } | |
| 511 | + } | |
| 512 | + }); | |
| 527 | 513 | |
| 528 | -/***/ }), | |
| 514 | +//#endregion | |
| 515 | +//#region modules/container-converter/assets/js/editor/commands/convert.js | |
| 516 | + function _callSuper$3(t, o, e) { | |
| 517 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 518 | + } | |
| 519 | + __name(_callSuper$3, "_callSuper"); | |
| 520 | + function _isNativeReflectConstruct$3() { | |
| 521 | + try { | |
| 522 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 523 | + } catch (t) {} | |
| 524 | + return (_isNativeReflectConstruct$3 = function _isNativeReflectConstruct() { | |
| 525 | + return !!t; | |
| 526 | + })(); | |
| 527 | + } | |
| 528 | + __name(_isNativeReflectConstruct$3, "_isNativeReflectConstruct"); | |
| 529 | + /** | |
| 530 | + * @typedef {import('../../../../../../assets/dev/js/editor/container/container')} Container | |
| 531 | + */ | |
| 532 | + var Convert = /*#__PURE__*/ function(_$e$modules$editor$do) { | |
| 533 | + function Convert() { | |
| 534 | + _classCallCheck(this, Convert); | |
| 535 | + return _callSuper$3(this, Convert, arguments); | |
| 536 | + } | |
| 537 | + _inherits(Convert, _$e$modules$editor$do); | |
| 538 | + return _createClass(Convert, [ | |
| 539 | + { | |
| 540 | + key: "getHistory", | |
| 541 | + value: function getHistory() { | |
| 542 | + return { | |
| 543 | + type: (0, _wordpress_i18n.__)("Converted to Container", "elementor"), | |
| 544 | + title: (0, _wordpress_i18n.__)("Section", "elementor") | |
| 545 | + }; | |
| 546 | + } | |
| 547 | + }, | |
| 548 | + { | |
| 549 | + key: "validateArgs", | |
| 550 | + value: function validateArgs() { | |
| 551 | + var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 552 | + this.requireContainer(args); | |
| 553 | + } | |
| 554 | + }, | |
| 555 | + { | |
| 556 | + key: "apply", | |
| 557 | + value: function apply(args) { | |
| 558 | + this.constructor.convert(args); | |
| 559 | + } | |
| 560 | + } | |
| 561 | + ], [{ | |
| 562 | + key: "convert", | |
| 563 | + value: function convert(_ref) { | |
| 564 | + var container = _ref.container; | |
| 565 | + var _ref$rootContainer = _ref.rootContainer; | |
| 566 | + var rootContainer = _ref$rootContainer === void 0 ? container.parent : _ref$rootContainer; | |
| 567 | + var view = container.view; | |
| 568 | + var elType = container.type; | |
| 569 | + var at = rootContainer === container.parent ? view._index + 1 : view._index; | |
| 570 | + if (!Migrator.canConvertToContainer(elType)) { | |
| 571 | + $e.run("document/elements/create", { | |
| 572 | + model: { | |
| 573 | + elType: container.model.get("elType"), | |
| 574 | + widgetType: container.model.get("widgetType"), | |
| 575 | + settings: container.settings.toJSON({ remove: "default" }) | |
| 576 | + }, | |
| 577 | + container: rootContainer, | |
| 578 | + options: { | |
| 579 | + at, | |
| 580 | + edit: false | |
| 581 | + } | |
| 582 | + }); | |
| 583 | + return; | |
| 584 | + } | |
| 585 | + var model = container.model.toJSON(); | |
| 586 | + var controlsMapping = Migrator.getLegacyControlsMapping(model); | |
| 587 | + var settings = container.settings.toJSON({ remove: "default" }); | |
| 588 | + settings = Migrator.migrate(settings, controlsMapping); | |
| 589 | + settings = Migrator.normalizeSettings(model, settings); | |
| 590 | + var newContainer = $e.run("document/elements/create", { | |
| 591 | + model: { | |
| 592 | + elType: "container", | |
| 593 | + settings | |
| 594 | + }, | |
| 595 | + container: rootContainer, | |
| 596 | + options: { | |
| 597 | + at, | |
| 598 | + edit: false | |
| 599 | + } | |
| 600 | + }); | |
| 601 | + container.children.forEach(function(child) { | |
| 602 | + $e.run("container-converter/convert", { | |
| 603 | + container: child, | |
| 604 | + rootContainer: newContainer | |
| 605 | + }); | |
| 606 | + }); | |
| 607 | + } | |
| 608 | + }]); | |
| 609 | + }($e.modules.editor.document.CommandHistoryBase); | |
| 529 | 610 | |
| 530 | -/***/ "../modules/container-converter/assets/js/editor/migrator.js": | |
| 531 | -/*!*******************************************************************!*\ | |
| 532 | - !*** ../modules/container-converter/assets/js/editor/migrator.js ***! | |
| 533 | - \*******************************************************************/ | |
| 534 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 611 | +//#endregion | |
| 612 | +//#region modules/container-converter/assets/js/editor/commands/convert-all.js | |
| 613 | + function _callSuper$2(t, o, e) { | |
| 614 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 615 | + } | |
| 616 | + __name(_callSuper$2, "_callSuper"); | |
| 617 | + function _isNativeReflectConstruct$2() { | |
| 618 | + try { | |
| 619 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 620 | + } catch (t) {} | |
| 621 | + return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { | |
| 622 | + return !!t; | |
| 623 | + })(); | |
| 624 | + } | |
| 625 | + __name(_isNativeReflectConstruct$2, "_isNativeReflectConstruct"); | |
| 626 | + var ConvertAll = /*#__PURE__*/ function(_$e$modules$editor$do) { | |
| 627 | + function ConvertAll() { | |
| 628 | + _classCallCheck(this, ConvertAll); | |
| 629 | + return _callSuper$2(this, ConvertAll, arguments); | |
| 630 | + } | |
| 631 | + _inherits(ConvertAll, _$e$modules$editor$do); | |
| 632 | + return _createClass(ConvertAll, [{ | |
| 633 | + key: "getHistory", | |
| 634 | + value: function getHistory() { | |
| 635 | + return { | |
| 636 | + type: (0, _wordpress_i18n.__)("Converted to Containers", "elementor"), | |
| 637 | + title: (0, _wordpress_i18n.__)("All Content", "elementor") | |
| 638 | + }; | |
| 639 | + } | |
| 640 | + }, { | |
| 641 | + key: "apply", | |
| 642 | + value: function apply() { | |
| 643 | + var children = elementor.getPreviewContainer().children; | |
| 644 | + _toConsumableArray(children).forEach(function(container) { | |
| 645 | + $e.run("container-converter/convert", { container }); | |
| 646 | + }); | |
| 647 | + } | |
| 648 | + }]); | |
| 649 | + }($e.modules.editor.document.CommandHistoryBase); | |
| 535 | 650 | |
| 536 | -"use strict"; | |
| 651 | +//#endregion | |
| 652 | +//#region modules/container-converter/assets/js/editor/commands/index.js | |
| 653 | + var commands_exports = /* @__PURE__ */ __exportAll({ | |
| 654 | + Convert: () => Convert, | |
| 655 | + ConvertAll: () => ConvertAll | |
| 656 | + }); | |
| 537 | 657 | |
| 658 | +//#endregion | |
| 659 | +//#region modules/container-converter/assets/js/editor/component.js | |
| 660 | + function _callSuper$1(t, o, e) { | |
| 661 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 662 | + } | |
| 663 | + __name(_callSuper$1, "_callSuper"); | |
| 664 | + function _isNativeReflectConstruct$1() { | |
| 665 | + try { | |
| 666 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 667 | + } catch (t) {} | |
| 668 | + return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { | |
| 669 | + return !!t; | |
| 670 | + })(); | |
| 671 | + } | |
| 672 | + __name(_isNativeReflectConstruct$1, "_isNativeReflectConstruct"); | |
| 673 | + var _default = /*#__PURE__*/ function(_$e$modules$Component) { | |
| 674 | + function _default() { | |
| 675 | + var _this; | |
| 676 | + _classCallCheck(this, _default); | |
| 677 | + _this = _callSuper$1(this, _default); | |
| 678 | + _this.bindEvents(); | |
| 679 | + return _this; | |
| 680 | + } | |
| 681 | + /** | |
| 682 | + * Listen to click event in the panel. | |
| 683 | + * | |
| 684 | + * @return {void} | |
| 685 | + */ | |
| 686 | + _inherits(_default, _$e$modules$Component); | |
| 687 | + return _createClass(_default, [ | |
| 688 | + { | |
| 689 | + key: "bindEvents", | |
| 690 | + value: function bindEvents() { | |
| 691 | + elementor.channels.editor.on("elementorContainerConverter:convert", function(_ref) { | |
| 692 | + var container = _ref.container; | |
| 693 | + var button = _ref.el.querySelector(".elementor-button"); | |
| 694 | + var loadingClass = "e-loading"; | |
| 695 | + button.classList.add(loadingClass); | |
| 696 | + setTimeout(function() { | |
| 697 | + if ("document" === container.type) $e.run("container-converter/convert-all"); | |
| 698 | + else $e.run("container-converter/convert", { container }); | |
| 699 | + button.classList.remove(loadingClass); | |
| 700 | + button.setAttribute("disabled", true); | |
| 701 | + elementor.notifications.showToast({ message: (0, _wordpress_i18n.__)("Your changes have been updated.", "elementor") }); | |
| 702 | + }); | |
| 703 | + }); | |
| 704 | + } | |
| 705 | + }, | |
| 706 | + { | |
| 707 | + key: "getNamespace", | |
| 708 | + value: function getNamespace() { | |
| 709 | + return "container-converter"; | |
| 710 | + } | |
| 711 | + }, | |
| 712 | + { | |
| 713 | + key: "defaultCommands", | |
| 714 | + value: function defaultCommands() { | |
| 715 | + return this.importCommands(commands_exports); | |
| 716 | + } | |
| 717 | + } | |
| 718 | + ]); | |
| 719 | + }($e.modules.ComponentBase); | |
| 538 | 720 | |
| 539 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 540 | -Object.defineProperty(exports, "__esModule", ({ | |
| 541 | - value: true | |
| 542 | -})); | |
| 543 | -exports["default"] = void 0; | |
| 544 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 545 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 546 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 547 | -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 548 | -var _section = _interopRequireDefault(__webpack_require__(/*! ./maps/section */ "../modules/container-converter/assets/js/editor/maps/section.js")); | |
| 549 | -var _column = _interopRequireDefault(__webpack_require__(/*! ./maps/column */ "../modules/container-converter/assets/js/editor/maps/column.js")); | |
| 550 | -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; } | |
| 551 | -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; } | |
| 552 | -var Migrator = exports["default"] = /*#__PURE__*/function () { | |
| 553 | - function Migrator() { | |
| 554 | - (0, _classCallCheck2.default)(this, Migrator); | |
| 555 | - } | |
| 556 | - return (0, _createClass2.default)(Migrator, null, [{ | |
| 557 | - key: "migrate", | |
| 558 | - value: | |
| 559 | - /** | |
| 560 | - * Migrate element settings into new settings object, using a map object. | |
| 561 | - * | |
| 562 | - * @param {Object} settings - Settings to migrate. | |
| 563 | - * @param {Object} map - Mapping object. | |
| 564 | - * | |
| 565 | - * @return {Object} new settings | |
| 566 | - */ | |
| 567 | - function migrate(settings, map) { | |
| 568 | - return Object.fromEntries(Object.entries(_objectSpread({}, settings)).map(function (_ref) { | |
| 569 | - var _ref2 = (0, _slicedToArray2.default)(_ref, 2), | |
| 570 | - key = _ref2[0], | |
| 571 | - value = _ref2[1]; | |
| 572 | - var mapped = map[key]; | |
| 721 | +//#endregion | |
| 722 | +//#region modules/container-converter/assets/js/editor/module.js | |
| 723 | + function _callSuper(t, o, e) { | |
| 724 | + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 725 | + } | |
| 726 | + function _isNativeReflectConstruct() { | |
| 727 | + try { | |
| 728 | + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 729 | + } catch (t) {} | |
| 730 | + return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { | |
| 731 | + return !!t; | |
| 732 | + })(); | |
| 733 | + } | |
| 734 | + new (/* @__PURE__ */ function(_elementorModules$edi) { | |
| 735 | + function Module() { | |
| 736 | + _classCallCheck(this, Module); | |
| 737 | + return _callSuper(this, Module, arguments); | |
| 738 | + } | |
| 739 | + _inherits(Module, _elementorModules$edi); | |
| 740 | + return _createClass(Module, [{ | |
| 741 | + key: "onInit", | |
| 742 | + value: function onInit() { | |
| 743 | + $e.components.register(new _default()); | |
| 744 | + } | |
| 745 | + }]); | |
| 746 | + }(elementorModules.editor.utils.Module))(); | |
| 573 | 747 | |
| 574 | - // Remove setting. | |
| 575 | - if (null === mapped) { | |
| 576 | - return null; | |
| 577 | - } | |
| 578 | - | |
| 579 | - // Simple key conversion: | |
| 580 | - // { old_setting: 'new_setting' } | |
| 581 | - if ('string' === typeof mapped) { | |
| 582 | - return [mapped, value]; | |
| 583 | - } | |
| 584 | - | |
| 585 | - // Advanced conversion using a callback: | |
| 586 | - // { old_setting: ( { key, value, settings } ) => [ 'new_setting', value ] } | |
| 587 | - if ('function' === typeof mapped) { | |
| 588 | - return mapped({ | |
| 589 | - key: key, | |
| 590 | - value: value, | |
| 591 | - settings: settings | |
| 592 | - }); | |
| 593 | - } | |
| 594 | - return [key, value]; | |
| 595 | - }).filter(Boolean)); | |
| 596 | - } | |
| 597 | - | |
| 598 | - /** | |
| 599 | - * Determine if an element can be converted to a Container. | |
| 600 | - * | |
| 601 | - * @param {string} elType | |
| 602 | - * | |
| 603 | - * @return {boolean} true, if element can be converted | |
| 604 | - */ | |
| 605 | - }, { | |
| 606 | - key: "canConvertToContainer", | |
| 607 | - value: function canConvertToContainer(elType) { | |
| 608 | - return Object.keys(this.config).includes(elType); | |
| 609 | - } | |
| 610 | - | |
| 611 | - /** | |
| 612 | - * Get a mapping object of Legacy-to-Container controls mapping. | |
| 613 | - * | |
| 614 | - * @param {Object} model - Element model. | |
| 615 | - * | |
| 616 | - * @return {Object} mapping object | |
| 617 | - */ | |
| 618 | - }, { | |
| 619 | - key: "getLegacyControlsMapping", | |
| 620 | - value: function getLegacyControlsMapping(model) { | |
| 621 | - var config = this.config[model.elType]; | |
| 622 | - if (!config) { | |
| 623 | - return {}; | |
| 624 | - } | |
| 625 | - var mapping = config.legacyControlsMapping; | |
| 626 | - return 'function' === typeof mapping ? mapping(model) : mapping; | |
| 627 | - } | |
| 628 | - | |
| 629 | - /** | |
| 630 | - * Normalize element settings (adding defaults, etc.) by elType, | |
| 631 | - * | |
| 632 | - * @param {Object} model - Element model. | |
| 633 | - * @param {Object} settings - Settings object after migration. | |
| 634 | - * | |
| 635 | - * @return {Object} - normalized settings. | |
| 636 | - */ | |
| 637 | - }, { | |
| 638 | - key: "normalizeSettings", | |
| 639 | - value: function normalizeSettings(model, settings) { | |
| 640 | - var config = this.config[model.elType]; | |
| 641 | - if (!config.normalizeSettings) { | |
| 642 | - return settings; | |
| 643 | - } | |
| 644 | - return config.normalizeSettings(settings, model); | |
| 645 | - } | |
| 646 | - }]); | |
| 647 | -}(); | |
| 648 | -/** | |
| 649 | - * Migrations configuration by `elType`. | |
| 650 | - * | |
| 651 | - * @type {Object} | |
| 652 | - */ | |
| 653 | -(0, _defineProperty2.default)(Migrator, "config", { | |
| 654 | - section: { | |
| 655 | - legacyControlsMapping: _section.default, | |
| 656 | - normalizeSettings: function normalizeSettings(settings, _ref3) { | |
| 657 | - var isInner = _ref3.isInner; | |
| 658 | - return _objectSpread(_objectSpread({}, settings), {}, { | |
| 659 | - flex_direction: 'row', | |
| 660 | - // Force it to be row. | |
| 661 | - // Defaults (since default settings are removed): | |
| 662 | - flex_align_items: settings.flex_align_items || 'stretch', | |
| 663 | - flex_gap: settings.flex_gap || { | |
| 664 | - size: 10, | |
| 665 | - column: '10', | |
| 666 | - row: '10', | |
| 667 | - unit: 'px' | |
| 668 | - } | |
| 669 | - }, isInner ? { | |
| 670 | - content_width: 'full' | |
| 671 | - } : {}); | |
| 672 | - } | |
| 673 | - }, | |
| 674 | - column: { | |
| 675 | - legacyControlsMapping: _column.default, | |
| 676 | - normalizeSettings: function normalizeSettings(settings) { | |
| 677 | - return _objectSpread(_objectSpread({}, settings), {}, { | |
| 678 | - content_width: 'full' | |
| 679 | - }); | |
| 680 | - } | |
| 681 | - } | |
| 682 | -}); | |
| 683 | - | |
| 684 | -/***/ }), | |
| 685 | - | |
| 686 | -/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 687 | -/*!******************************************************************!*\ | |
| 688 | - !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 689 | - \******************************************************************/ | |
| 690 | -/***/ ((module) => { | |
| 691 | - | |
| 692 | -function _arrayLikeToArray(r, a) { | |
| 693 | - (null == a || a > r.length) && (a = r.length); | |
| 694 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 695 | - return n; | |
| 696 | -} | |
| 697 | -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 698 | - | |
| 699 | -/***/ }), | |
| 700 | - | |
| 701 | -/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 702 | -/*!****************************************************************!*\ | |
| 703 | - !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 704 | - \****************************************************************/ | |
| 705 | -/***/ ((module) => { | |
| 706 | - | |
| 707 | -function _arrayWithHoles(r) { | |
| 708 | - if (Array.isArray(r)) return r; | |
| 709 | -} | |
| 710 | -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 711 | - | |
| 712 | -/***/ }), | |
| 713 | - | |
| 714 | -/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": | |
| 715 | -/*!*******************************************************************!*\ | |
| 716 | - !*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! | |
| 717 | - \*******************************************************************/ | |
| 718 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 719 | - | |
| 720 | -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 721 | -function _arrayWithoutHoles(r) { | |
| 722 | - if (Array.isArray(r)) return arrayLikeToArray(r); | |
| 723 | -} | |
| 724 | -module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 725 | - | |
| 726 | -/***/ }), | |
| 727 | - | |
| 728 | -/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 729 | -/*!***********************************************************************!*\ | |
| 730 | - !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 731 | - \***********************************************************************/ | |
| 732 | -/***/ ((module) => { | |
| 733 | - | |
| 734 | -function _assertThisInitialized(e) { | |
| 735 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 736 | - return e; | |
| 737 | -} | |
| 738 | -module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 739 | - | |
| 740 | -/***/ }), | |
| 741 | - | |
| 742 | -/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 743 | -/*!****************************************************************!*\ | |
| 744 | - !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 745 | - \****************************************************************/ | |
| 746 | -/***/ ((module) => { | |
| 747 | - | |
| 748 | -function _classCallCheck(a, n) { | |
| 749 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 750 | -} | |
| 751 | -module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 752 | - | |
| 753 | -/***/ }), | |
| 754 | - | |
| 755 | -/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 756 | -/*!*************************************************************!*\ | |
| 757 | - !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 758 | - \*************************************************************/ | |
| 759 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 760 | - | |
| 761 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 762 | -function _defineProperties(e, r) { | |
| 763 | - for (var t = 0; t < r.length; t++) { | |
| 764 | - var o = r[t]; | |
| 765 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 766 | - } | |
| 767 | -} | |
| 768 | -function _createClass(e, r, t) { | |
| 769 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 770 | - writable: !1 | |
| 771 | - }), e; | |
| 772 | -} | |
| 773 | -module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 774 | - | |
| 775 | -/***/ }), | |
| 776 | - | |
| 777 | -/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 778 | -/*!****************************************************************!*\ | |
| 779 | - !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 780 | - \****************************************************************/ | |
| 781 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 782 | - | |
| 783 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 784 | -function _defineProperty(e, r, t) { | |
| 785 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 786 | - value: t, | |
| 787 | - enumerable: !0, | |
| 788 | - configurable: !0, | |
| 789 | - writable: !0 | |
| 790 | - }) : e[r] = t, e; | |
| 791 | -} | |
| 792 | -module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 793 | - | |
| 794 | -/***/ }), | |
| 795 | - | |
| 796 | -/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 797 | -/*!****************************************************************!*\ | |
| 798 | - !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 799 | - \****************************************************************/ | |
| 800 | -/***/ ((module) => { | |
| 801 | - | |
| 802 | -function _getPrototypeOf(t) { | |
| 803 | - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 804 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 805 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 806 | -} | |
| 807 | -module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 808 | - | |
| 809 | -/***/ }), | |
| 810 | - | |
| 811 | -/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 812 | -/*!**********************************************************!*\ | |
| 813 | - !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 814 | - \**********************************************************/ | |
| 815 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 816 | - | |
| 817 | -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 818 | -function _inherits(t, e) { | |
| 819 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 820 | - t.prototype = Object.create(e && e.prototype, { | |
| 821 | - constructor: { | |
| 822 | - value: t, | |
| 823 | - writable: !0, | |
| 824 | - configurable: !0 | |
| 825 | - } | |
| 826 | - }), Object.defineProperty(t, "prototype", { | |
| 827 | - writable: !1 | |
| 828 | - }), e && setPrototypeOf(t, e); | |
| 829 | -} | |
| 830 | -module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 831 | - | |
| 832 | -/***/ }), | |
| 833 | - | |
| 834 | -/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 835 | -/*!***********************************************************************!*\ | |
| 836 | - !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 837 | - \***********************************************************************/ | |
| 838 | -/***/ ((module) => { | |
| 839 | - | |
| 840 | -function _interopRequireDefault(e) { | |
| 841 | - return e && e.__esModule ? e : { | |
| 842 | - "default": e | |
| 843 | - }; | |
| 844 | -} | |
| 845 | -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 846 | - | |
| 847 | -/***/ }), | |
| 848 | - | |
| 849 | -/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js": | |
| 850 | -/*!*****************************************************************!*\ | |
| 851 | - !*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***! | |
| 852 | - \*****************************************************************/ | |
| 853 | -/***/ ((module) => { | |
| 854 | - | |
| 855 | -function _iterableToArray(r) { | |
| 856 | - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 857 | -} | |
| 858 | -module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 859 | - | |
| 860 | -/***/ }), | |
| 861 | - | |
| 862 | -/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 863 | -/*!**********************************************************************!*\ | |
| 864 | - !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 865 | - \**********************************************************************/ | |
| 866 | -/***/ ((module) => { | |
| 867 | - | |
| 868 | -function _iterableToArrayLimit(r, l) { | |
| 869 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 870 | - if (null != t) { | |
| 871 | - var e, | |
| 872 | - n, | |
| 873 | - i, | |
| 874 | - u, | |
| 875 | - a = [], | |
| 876 | - f = !0, | |
| 877 | - o = !1; | |
| 878 | - try { | |
| 879 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 880 | - if (Object(t) !== t) return; | |
| 881 | - f = !1; | |
| 882 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 883 | - } catch (r) { | |
| 884 | - o = !0, n = r; | |
| 885 | - } finally { | |
| 886 | - try { | |
| 887 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 888 | - } finally { | |
| 889 | - if (o) throw n; | |
| 890 | - } | |
| 891 | - } | |
| 892 | - return a; | |
| 893 | - } | |
| 894 | -} | |
| 895 | -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 896 | - | |
| 897 | -/***/ }), | |
| 898 | - | |
| 899 | -/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 900 | -/*!*****************************************************************!*\ | |
| 901 | - !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 902 | - \*****************************************************************/ | |
| 903 | -/***/ ((module) => { | |
| 904 | - | |
| 905 | -function _nonIterableRest() { | |
| 906 | - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 907 | -} | |
| 908 | -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 909 | - | |
| 910 | -/***/ }), | |
| 911 | - | |
| 912 | -/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js": | |
| 913 | -/*!*******************************************************************!*\ | |
| 914 | - !*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! | |
| 915 | - \*******************************************************************/ | |
| 916 | -/***/ ((module) => { | |
| 917 | - | |
| 918 | -function _nonIterableSpread() { | |
| 919 | - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 920 | -} | |
| 921 | -module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 922 | - | |
| 923 | -/***/ }), | |
| 924 | - | |
| 925 | -/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 926 | -/*!***************************************************************************!*\ | |
| 927 | - !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 928 | - \***************************************************************************/ | |
| 929 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 930 | - | |
| 931 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 932 | -var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 933 | -function _possibleConstructorReturn(t, e) { | |
| 934 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 935 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 936 | - return assertThisInitialized(t); | |
| 937 | -} | |
| 938 | -module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 939 | - | |
| 940 | -/***/ }), | |
| 941 | - | |
| 942 | -/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 943 | -/*!****************************************************************!*\ | |
| 944 | - !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 945 | - \****************************************************************/ | |
| 946 | -/***/ ((module) => { | |
| 947 | - | |
| 948 | -function _setPrototypeOf(t, e) { | |
| 949 | - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 950 | - return t.__proto__ = e, t; | |
| 951 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 952 | -} | |
| 953 | -module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 954 | - | |
| 955 | -/***/ }), | |
| 956 | - | |
| 957 | -/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 958 | -/*!***************************************************************!*\ | |
| 959 | - !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 960 | - \***************************************************************/ | |
| 961 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 962 | - | |
| 963 | -var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 964 | -var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 965 | -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 966 | -var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 967 | -function _slicedToArray(r, e) { | |
| 968 | - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 969 | -} | |
| 970 | -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 971 | - | |
| 972 | -/***/ }), | |
| 973 | - | |
| 974 | -/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js": | |
| 975 | -/*!*******************************************************************!*\ | |
| 976 | - !*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***! | |
| 977 | - \*******************************************************************/ | |
| 978 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 979 | - | |
| 980 | -var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); | |
| 981 | -var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js"); | |
| 982 | -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 983 | -var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js"); | |
| 984 | -function _toConsumableArray(r) { | |
| 985 | - return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); | |
| 986 | -} | |
| 987 | -module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 988 | - | |
| 989 | -/***/ }), | |
| 990 | - | |
| 991 | -/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 992 | -/*!*************************************************************!*\ | |
| 993 | - !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 994 | - \*************************************************************/ | |
| 995 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 996 | - | |
| 997 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 998 | -function toPrimitive(t, r) { | |
| 999 | - if ("object" != _typeof(t) || !t) return t; | |
| 1000 | - var e = t[Symbol.toPrimitive]; | |
| 1001 | - if (void 0 !== e) { | |
| 1002 | - var i = e.call(t, r || "default"); | |
| 1003 | - if ("object" != _typeof(i)) return i; | |
| 1004 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 1005 | - } | |
| 1006 | - return ("string" === r ? String : Number)(t); | |
| 1007 | -} | |
| 1008 | -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1009 | - | |
| 1010 | -/***/ }), | |
| 1011 | - | |
| 1012 | -/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 1013 | -/*!***************************************************************!*\ | |
| 1014 | - !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 1015 | - \***************************************************************/ | |
| 1016 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1017 | - | |
| 1018 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 1019 | -var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 1020 | -function toPropertyKey(t) { | |
| 1021 | - var i = toPrimitive(t, "string"); | |
| 1022 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 1023 | -} | |
| 1024 | -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1025 | - | |
| 1026 | -/***/ }), | |
| 1027 | - | |
| 1028 | -/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 1029 | -/*!********************************************************!*\ | |
| 1030 | - !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 1031 | - \********************************************************/ | |
| 1032 | -/***/ ((module) => { | |
| 1033 | - | |
| 1034 | -function _typeof(o) { | |
| 1035 | - "@babel/helpers - typeof"; | |
| 1036 | - | |
| 1037 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 1038 | - return typeof o; | |
| 1039 | - } : function (o) { | |
| 1040 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 1041 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 1042 | -} | |
| 1043 | -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1044 | - | |
| 1045 | -/***/ }), | |
| 1046 | - | |
| 1047 | -/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 1048 | -/*!****************************************************************************!*\ | |
| 1049 | - !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 1050 | - \****************************************************************************/ | |
| 1051 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1052 | - | |
| 1053 | -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 1054 | -function _unsupportedIterableToArray(r, a) { | |
| 1055 | - if (r) { | |
| 1056 | - if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 1057 | - var t = {}.toString.call(r).slice(8, -1); | |
| 1058 | - 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; | |
| 1059 | - } | |
| 1060 | -} | |
| 1061 | -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1062 | - | |
| 1063 | -/***/ }), | |
| 1064 | - | |
| 1065 | -/***/ "@wordpress/i18n": | |
| 1066 | -/*!**************************!*\ | |
| 1067 | - !*** external "wp.i18n" ***! | |
| 1068 | - \**************************/ | |
| 1069 | -/***/ ((module) => { | |
| 1070 | - | |
| 1071 | -"use strict"; | |
| 1072 | -module.exports = wp.i18n; | |
| 1073 | - | |
| 1074 | -/***/ }) | |
| 1075 | - | |
| 1076 | -/******/ }); | |
| 1077 | -/************************************************************************/ | |
| 1078 | -/******/ // The module cache | |
| 1079 | -/******/ var __webpack_module_cache__ = {}; | |
| 1080 | -/******/ | |
| 1081 | -/******/ // The require function | |
| 1082 | -/******/ function __webpack_require__(moduleId) { | |
| 1083 | -/******/ // Check if module is in cache | |
| 1084 | -/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 1085 | -/******/ if (cachedModule !== undefined) { | |
| 1086 | -/******/ return cachedModule.exports; | |
| 1087 | -/******/ } | |
| 1088 | -/******/ // Create a new module (and put it into the cache) | |
| 1089 | -/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 1090 | -/******/ // no module.id needed | |
| 1091 | -/******/ // no module.loaded needed | |
| 1092 | -/******/ exports: {} | |
| 1093 | -/******/ }; | |
| 1094 | -/******/ | |
| 1095 | -/******/ // Execute the module function | |
| 1096 | -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 1097 | -/******/ | |
| 1098 | -/******/ // Return the exports of the module | |
| 1099 | -/******/ return module.exports; | |
| 1100 | -/******/ } | |
| 1101 | -/******/ | |
| 1102 | -/************************************************************************/ | |
| 1103 | -var __webpack_exports__ = {}; | |
| 1104 | -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 1105 | -(() => { | |
| 1106 | -"use strict"; | |
| 1107 | -/*!*****************************************************************!*\ | |
| 1108 | - !*** ../modules/container-converter/assets/js/editor/module.js ***! | |
| 1109 | - \*****************************************************************/ | |
| 1110 | - | |
| 1111 | - | |
| 1112 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1113 | -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1114 | -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1115 | -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1116 | -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1117 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1118 | -var _component = _interopRequireDefault(__webpack_require__(/*! ./component */ "../modules/container-converter/assets/js/editor/component.js")); | |
| 1119 | -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)); } | |
| 1120 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1121 | -var Module = /*#__PURE__*/function (_elementorModules$edi) { | |
| 1122 | - function Module() { | |
| 1123 | - (0, _classCallCheck2.default)(this, Module); | |
| 1124 | - return _callSuper(this, Module, arguments); | |
| 1125 | - } | |
| 1126 | - (0, _inherits2.default)(Module, _elementorModules$edi); | |
| 1127 | - return (0, _createClass2.default)(Module, [{ | |
| 1128 | - key: "onInit", | |
| 1129 | - value: function onInit() { | |
| 1130 | - $e.components.register(new _component.default()); | |
| 1131 | - } | |
| 1132 | - }]); | |
| 1133 | -}(elementorModules.editor.utils.Module); | |
| 1134 | -new Module(); | |
| 1135 | -})(); | |
| 1136 | - | |
| 1137 | -/******/ })() | |
| 1138 | -; | |
| 748 | +//#endregion | |
| 749 | +})(wp.i18n); | |
| 1139 | 750 | //# sourceMappingURL=container-converter.js.map |