| 1 |
/*! elementor - v3.27.0 - 13-02-2025 */ |
| 2 |
/******/ (() => { // webpackBootstrap |
| 3 |
/******/ var __webpack_modules__ = ({ |
| 4 |
|
| 5 |
/***/ "../assets/dev/js/editor/elements/views/behaviors/sortable.js": |
| 6 |
/*!********************************************************************!*\ |
| 7 |
!*** ../assets/dev/js/editor/elements/views/behaviors/sortable.js ***! |
| 8 |
\********************************************************************/ |
| 9 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 10 |
|
| 11 |
"use strict"; |
| 12 |
|
| 13 |
|
| 14 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 15 |
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 16 |
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; } |
| 17 |
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; } |
| 18 |
var SortableBehavior; |
| 19 |
|
| 20 |
/** |
| 21 |
* @typedef {import('../../../container/container')} Container |
| 22 |
*/ |
| 23 |
SortableBehavior = Marionette.Behavior.extend({ |
| 24 |
defaults: { |
| 25 |
elChildType: 'widget' |
| 26 |
}, |
| 27 |
events: { |
| 28 |
sortstart: 'onSortStart', |
| 29 |
sortreceive: 'onSortReceive', |
| 30 |
sortupdate: 'onSortUpdate', |
| 31 |
sortover: 'onSortOver', |
| 32 |
sortout: 'onSortOut' |
| 33 |
}, |
| 34 |
initialize: function initialize() { |
| 35 |
this.listenTo(elementor.channels.dataEditMode, 'switch', this.onEditModeSwitched).listenTo(this.view.options.model, 'request:sort:start', this.startSort).listenTo(this.view.options.model, 'request:sort:update', this.updateSort).listenTo(this.view.options.model, 'request:sort:receive', this.receiveSort); |
| 36 |
}, |
| 37 |
onEditModeSwitched: function onEditModeSwitched(activeMode) { |
| 38 |
this.onToggleSortMode('edit' === activeMode); |
| 39 |
}, |
| 40 |
refresh: function refresh() { |
| 41 |
this.onEditModeSwitched(elementor.channels.dataEditMode.request('activeMode')); |
| 42 |
}, |
| 43 |
onRender: function onRender() { |
| 44 |
var _this = this; |
| 45 |
this.view.collection.on('update', function () { |
| 46 |
return _this.refresh(); |
| 47 |
}); |
| 48 |
_.defer(function () { |
| 49 |
return _this.refresh(); |
| 50 |
}); |
| 51 |
}, |
| 52 |
onDestroy: function onDestroy() { |
| 53 |
this.deactivate(); |
| 54 |
}, |
| 55 |
/** |
| 56 |
* Create an item placeholder in order to avoid UI jumps due to flex. |
| 57 |
* |
| 58 |
* @param {Object} $element - jQuery element instance to create placeholder for. |
| 59 |
* @param {string} className - Placeholder class. |
| 60 |
* @param {boolean} hide - Whether to hide the original element. |
| 61 |
* |
| 62 |
* @return {void} |
| 63 |
*/ |
| 64 |
createPlaceholder: function createPlaceholder($element) { |
| 65 |
var className = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; |
| 66 |
var hide = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; |
| 67 |
// Get the actual item size. |
| 68 |
$element.css('display', ''); |
| 69 |
var _$element$ = $element[0], |
| 70 |
width = _$element$.clientWidth, |
| 71 |
height = _$element$.clientHeight; |
| 72 |
if (hide) { |
| 73 |
$element.css('display', 'none'); |
| 74 |
} |
| 75 |
jQuery('<div />').css(_objectSpread(_objectSpread({}, $element.css(['flex-basis', 'flex-grow', 'flex-shrink', 'position'])), {}, { |
| 76 |
width: width, |
| 77 |
height: height |
| 78 |
})).addClass(className).insertAfter($element); |
| 79 |
}, |
| 80 |
/** |
| 81 |
* Return a settings object for jQuery UI sortable to make it swappable. |
| 82 |
* |
| 83 |
* @return {{stop: Function, start: Function}} options |
| 84 |
*/ |
| 85 |
getSwappableOptions: function getSwappableOptions() { |
| 86 |
var _this2 = this; |
| 87 |
var $childViewContainer = this.getChildViewContainer(), |
| 88 |
placeholderClass = 'e-swappable--item-placeholder'; |
| 89 |
return { |
| 90 |
start: function start(event, ui) { |
| 91 |
$childViewContainer.sortable('refreshPositions'); |
| 92 |
|
| 93 |
// TODO: Find a better solution than this hack. |
| 94 |
// Used in order to prevent dragging a container into itself. |
| 95 |
_this2.createPlaceholder(ui.item, placeholderClass); |
| 96 |
}, |
| 97 |
stop: function stop() { |
| 98 |
// Cleanup. |
| 99 |
$childViewContainer.find(".".concat(placeholderClass)).remove(); |
| 100 |
} |
| 101 |
}; |
| 102 |
}, |
| 103 |
onToggleSortMode: function onToggleSortMode(isActive) { |
| 104 |
if (isActive) { |
| 105 |
this.activate(); |
| 106 |
} else { |
| 107 |
this.deactivate(); |
| 108 |
} |
| 109 |
}, |
| 110 |
applySortable: function applySortable() { |
| 111 |
if (!elementor.userCan('design')) { |
| 112 |
return; |
| 113 |
} |
| 114 |
var $childViewContainer = this.getChildViewContainer(), |
| 115 |
defaultSortableOptions = { |
| 116 |
placeholder: 'elementor-sortable-placeholder elementor-' + this.getOption('elChildType') + '-placeholder', |
| 117 |
cursorAt: { |
| 118 |
top: 20, |
| 119 |
left: 25 |
| 120 |
}, |
| 121 |
helper: this._getSortableHelper.bind(this), |
| 122 |
cancel: 'input, textarea, button, select, option, .elementor-inline-editing, .elementor-tab-title', |
| 123 |
// Fix: Sortable - Unable to drag and drop sections with huge height. |
| 124 |
start: function start() { |
| 125 |
$childViewContainer.sortable('refreshPositions'); |
| 126 |
} |
| 127 |
}; |
| 128 |
var sortableOptions = _.extend(defaultSortableOptions, this.view.getSortableOptions()); |
| 129 |
|
| 130 |
// Add a swappable behavior (used for flex containers). |
| 131 |
if (this.isSwappable()) { |
| 132 |
$childViewContainer.addClass('e-swappable'); |
| 133 |
sortableOptions = _.extend(sortableOptions, this.getSwappableOptions()); |
| 134 |
} |
| 135 |
|
| 136 |
// TODO: Temporary hack for Container. |
| 137 |
// Will be removed in the future when the Navigator will use React. |
| 138 |
if (sortableOptions.preventInit) { |
| 139 |
return; |
| 140 |
} |
| 141 |
$childViewContainer.sortable(sortableOptions); |
| 142 |
}, |
| 143 |
/** |
| 144 |
* Enable sorting for this element, and generate sortable instance for it unless already generated. |
| 145 |
*/ |
| 146 |
activate: function activate() { |
| 147 |
if (!this.getChildViewContainer().sortable('instance')) { |
| 148 |
// Generate sortable instance for this element. Since fresh instances of sortable already allowing sorting, |
| 149 |
// we can return. |
| 150 |
this.applySortable(); |
| 151 |
return; |
| 152 |
} |
| 153 |
this.getChildViewContainer().sortable('enable'); |
| 154 |
}, |
| 155 |
_getSortableHelper: function _getSortableHelper(event, $item) { |
| 156 |
var model = this.view.collection.get({ |
| 157 |
cid: $item.data('model-cid') |
| 158 |
}); |
| 159 |
return '<div style="height: 84px; width: 125px;" class="elementor-sortable-helper elementor-sortable-helper-' + model.get('elType') + '"><div class="icon"><i class="' + model.getIcon() + '"></i></div><div class="title-wrapper"><div class="title">' + model.getTitle() + '</div></div></div>'; |
| 160 |
}, |
| 161 |
getChildViewContainer: function getChildViewContainer() { |
| 162 |
return this.view.getChildViewContainer(this.view); |
| 163 |
}, |
| 164 |
// The natural widget index in the column is wrong, since there are other elements |
| 165 |
// at the beginning of the column (background-overlay, element-overlay, resizeable-handle) |
| 166 |
getSortedElementNewIndex: function getSortedElementNewIndex($element) { |
| 167 |
var widgets = Object.values($element.parent().find('> .elementor-element')); |
| 168 |
return widgets.indexOf($element[0]); |
| 169 |
}, |
| 170 |
/** |
| 171 |
* Disable sorting of the element unless no sortable instance exists, in which case there is already no option to |
| 172 |
* sort. |
| 173 |
*/ |
| 174 |
deactivate: function deactivate() { |
| 175 |
var childViewContainer = this.getChildViewContainer(); |
| 176 |
if (childViewContainer.sortable('instance')) { |
| 177 |
childViewContainer.sortable('disable'); |
| 178 |
} |
| 179 |
}, |
| 180 |
/** |
| 181 |
* Determine if the current instance of Sortable is swappable. |
| 182 |
* |
| 183 |
* @return {boolean} is swappable |
| 184 |
*/ |
| 185 |
isSwappable: function isSwappable() { |
| 186 |
return !!this.view.getSortableOptions().swappable; |
| 187 |
}, |
| 188 |
startSort: function startSort(event, ui) { |
| 189 |
event.stopPropagation(); |
| 190 |
var container = elementor.getContainer(ui.item.attr('data-id')); |
| 191 |
elementor.channels.data.reply('dragging:model', container.model).reply('dragging:view', container.view).reply('dragging:parent:view', this.view).trigger('drag:start', container.model).trigger(container.model.get('elType') + ':drag:start'); |
| 192 |
}, |
| 193 |
// On sorting element |
| 194 |
updateSort: function updateSort(ui, newIndex) { |
| 195 |
if (undefined === newIndex) { |
| 196 |
newIndex = ui.item.index(); |
| 197 |
} |
| 198 |
var child = elementor.channels.data.request('dragging:view').getContainer(); |
| 199 |
this.moveChild(child, newIndex); |
| 200 |
}, |
| 201 |
// On receiving element from another container |
| 202 |
receiveSort: function receiveSort(event, ui, newIndex) { |
| 203 |
event.stopPropagation(); |
| 204 |
if (this.view.isCollectionFilled()) { |
| 205 |
jQuery(ui.sender).sortable('cancel'); |
| 206 |
return; |
| 207 |
} |
| 208 |
var model = elementor.channels.data.request('dragging:model'), |
| 209 |
draggedElType = model.get('elType'), |
| 210 |
draggedIsInnerSection = 'section' === draggedElType && model.get('isInner'), |
| 211 |
targetIsInnerColumn = 'column' === this.view.getElementType() && this.view.isInner(); |
| 212 |
if (draggedIsInnerSection && targetIsInnerColumn) { |
| 213 |
jQuery(ui.sender).sortable('cancel'); |
| 214 |
return; |
| 215 |
} |
| 216 |
if (undefined === newIndex) { |
| 217 |
newIndex = ui.item.index(); |
| 218 |
} |
| 219 |
var child = elementor.channels.data.request('dragging:view').getContainer(); |
| 220 |
this.moveChild(child, newIndex); |
| 221 |
}, |
| 222 |
onSortStart: function onSortStart(event, ui) { |
| 223 |
if ('column' === this.options.elChildType) { |
| 224 |
var uiData = ui.item.data('sortableItem'), |
| 225 |
uiItems = uiData.items, |
| 226 |
itemHeight = 0; |
| 227 |
uiItems.forEach(function (item) { |
| 228 |
if (item.item[0] === ui.item[0]) { |
| 229 |
itemHeight = item.height; |
| 230 |
return false; |
| 231 |
} |
| 232 |
}); |
| 233 |
ui.placeholder.height(itemHeight); |
| 234 |
} |
| 235 |
this.startSort(event, ui); |
| 236 |
}, |
| 237 |
onSortOver: function onSortOver(event) { |
| 238 |
event.stopPropagation(); |
| 239 |
var model = elementor.channels.data.request('dragging:model'); |
| 240 |
jQuery(event.target).addClass('elementor-draggable-over').attr({ |
| 241 |
'data-dragged-element': model.get('elType'), |
| 242 |
'data-dragged-is-inner': model.get('isInner') |
| 243 |
}); |
| 244 |
this.$el.addClass('elementor-dragging-on-child'); |
| 245 |
}, |
| 246 |
onSortOut: function onSortOut(event) { |
| 247 |
event.stopPropagation(); |
| 248 |
jQuery(event.target).removeClass('elementor-draggable-over').removeAttr('data-dragged-element data-dragged-is-inner'); |
| 249 |
this.$el.removeClass('elementor-dragging-on-child'); |
| 250 |
}, |
| 251 |
onSortReceive: function onSortReceive(event, ui) { |
| 252 |
this.receiveSort(event, ui, this.getSortedElementNewIndex(ui.item)); |
| 253 |
}, |
| 254 |
onSortUpdate: function onSortUpdate(event, ui) { |
| 255 |
event.stopPropagation(); |
| 256 |
if (this.getChildViewContainer()[0] !== ui.item.parent()[0]) { |
| 257 |
return; |
| 258 |
} |
| 259 |
this.updateSort(ui, this.getSortedElementNewIndex(ui.item)); |
| 260 |
}, |
| 261 |
onAddChild: function onAddChild(view) { |
| 262 |
view.$el.attr('data-model-cid', view.model.cid); |
| 263 |
}, |
| 264 |
/** |
| 265 |
* Move a child container to another position. |
| 266 |
* |
| 267 |
* @param {Container} child - The child container to move. |
| 268 |
* @param {number|string} index - New index. |
| 269 |
* |
| 270 |
* @return {void} |
| 271 |
*/ |
| 272 |
moveChild: function moveChild(child, index) { |
| 273 |
$e.run('document/elements/move', { |
| 274 |
container: child, |
| 275 |
target: this.view.getContainer(), |
| 276 |
options: { |
| 277 |
at: index |
| 278 |
} |
| 279 |
}); |
| 280 |
} |
| 281 |
}); |
| 282 |
module.exports = SortableBehavior; |
| 283 |
|
| 284 |
/***/ }), |
| 285 |
|
| 286 |
/***/ "../assets/dev/js/editor/elements/views/container/empty-component.js": |
| 287 |
/*!***************************************************************************!*\ |
| 288 |
!*** ../assets/dev/js/editor/elements/views/container/empty-component.js ***! |
| 289 |
\***************************************************************************/ |
| 290 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 291 |
|
| 292 |
"use strict"; |
| 293 |
|
| 294 |
|
| 295 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 296 |
Object.defineProperty(exports, "__esModule", ({ |
| 297 |
value: true |
| 298 |
})); |
| 299 |
exports["default"] = EmptyComponent; |
| 300 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 301 |
/* eslint-disable jsx-a11y/no-static-element-interactions */ |
| 302 |
/* eslint-disable jsx-a11y/click-events-have-key-events */ |
| 303 |
function EmptyComponent() { |
| 304 |
return /*#__PURE__*/_react.default.createElement("div", { |
| 305 |
className: "elementor-first-add" |
| 306 |
}, /*#__PURE__*/_react.default.createElement("div", { |
| 307 |
className: "elementor-icon eicon-plus", |
| 308 |
onClick: function onClick() { |
| 309 |
return $e.route('panel/elements/categories'); |
| 310 |
} |
| 311 |
})); |
| 312 |
} |
| 313 |
|
| 314 |
/***/ }), |
| 315 |
|
| 316 |
/***/ "../assets/dev/js/utils/react.js": |
| 317 |
/*!***************************************!*\ |
| 318 |
!*** ../assets/dev/js/utils/react.js ***! |
| 319 |
\***************************************/ |
| 320 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 321 |
|
| 322 |
"use strict"; |
| 323 |
|
| 324 |
|
| 325 |
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 326 |
Object.defineProperty(exports, "__esModule", ({ |
| 327 |
value: true |
| 328 |
})); |
| 329 |
exports["default"] = void 0; |
| 330 |
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 331 |
var ReactDOM = _interopRequireWildcard(__webpack_require__(/*! react-dom */ "react-dom")); |
| 332 |
var _client = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js"); |
| 333 |
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } |
| 334 |
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } |
| 335 |
/** |
| 336 |
* Support conditional rendering of a React App to the DOM, based on the React version. |
| 337 |
* We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions. |
| 338 |
* |
| 339 |
* @param { React.ReactElement } app The app to render. |
| 340 |
* @param { HTMLElement } domElement The DOM element to render the app into. |
| 341 |
* |
| 342 |
* @return {{ unmount: () => void }} The unmount function. |
| 343 |
*/ |
| 344 |
function render(app, domElement) { |
| 345 |
var unmountFunction; |
| 346 |
try { |
| 347 |
var root = (0, _client.createRoot)(domElement); |
| 348 |
root.render(app); |
| 349 |
unmountFunction = function unmountFunction() { |
| 350 |
root.unmount(); |
| 351 |
}; |
| 352 |
} catch (e) { |
| 353 |
// eslint-disable-next-line react/no-deprecated |
| 354 |
ReactDOM.render(app, domElement); |
| 355 |
unmountFunction = function unmountFunction() { |
| 356 |
// eslint-disable-next-line react/no-deprecated |
| 357 |
ReactDOM.unmountComponentAtNode(domElement); |
| 358 |
}; |
| 359 |
} |
| 360 |
return { |
| 361 |
unmount: unmountFunction |
| 362 |
}; |
| 363 |
} |
| 364 |
var _default = exports["default"] = { |
| 365 |
render: render |
| 366 |
}; |
| 367 |
|
| 368 |
/***/ }), |
| 369 |
|
| 370 |
/***/ "../modules/atomic-widgets/assets/js/editor/atomic-widget-type.js": |
| 371 |
/*!************************************************************************!*\ |
| 372 |
!*** ../modules/atomic-widgets/assets/js/editor/atomic-widget-type.js ***! |
| 373 |
\************************************************************************/ |
| 374 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 375 |
|
| 376 |
"use strict"; |
| 377 |
|
| 378 |
|
| 379 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 380 |
Object.defineProperty(exports, "__esModule", ({ |
| 381 |
value: true |
| 382 |
})); |
| 383 |
exports.AtomicWidgetType = void 0; |
| 384 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 385 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 386 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 387 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 388 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 389 |
var _atomicWidgetView = __webpack_require__(/*! ./atomic-widget-view */ "../modules/atomic-widgets/assets/js/editor/atomic-widget-view.js"); |
| 390 |
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)); } |
| 391 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 392 |
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); } |
| 393 |
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } |
| 394 |
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); } |
| 395 |
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; } |
| 396 |
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } |
| 397 |
var _type = /*#__PURE__*/new WeakMap(); |
| 398 |
var AtomicWidgetType = exports.AtomicWidgetType = /*#__PURE__*/function (_elementor$modules$el) { |
| 399 |
function AtomicWidgetType(type) { |
| 400 |
var _this; |
| 401 |
(0, _classCallCheck2.default)(this, AtomicWidgetType); |
| 402 |
_this = _callSuper(this, AtomicWidgetType); |
| 403 |
_classPrivateFieldInitSpec(_this, _type, void 0); |
| 404 |
_classPrivateFieldSet(_type, _this, type); |
| 405 |
return _this; |
| 406 |
} |
| 407 |
(0, _inherits2.default)(AtomicWidgetType, _elementor$modules$el); |
| 408 |
return (0, _createClass2.default)(AtomicWidgetType, [{ |
| 409 |
key: "getType", |
| 410 |
value: function getType() { |
| 411 |
return _classPrivateFieldGet(_type, this); |
| 412 |
} |
| 413 |
}, { |
| 414 |
key: "getView", |
| 415 |
value: function getView() { |
| 416 |
return _atomicWidgetView.AtomicWidgetView; |
| 417 |
} |
| 418 |
}]); |
| 419 |
}(elementor.modules.elements.types.Widget); |
| 420 |
|
| 421 |
/***/ }), |
| 422 |
|
| 423 |
/***/ "../modules/atomic-widgets/assets/js/editor/atomic-widget-view.js": |
| 424 |
/*!************************************************************************!*\ |
| 425 |
!*** ../modules/atomic-widgets/assets/js/editor/atomic-widget-view.js ***! |
| 426 |
\************************************************************************/ |
| 427 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 428 |
|
| 429 |
"use strict"; |
| 430 |
|
| 431 |
|
| 432 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 433 |
Object.defineProperty(exports, "__esModule", ({ |
| 434 |
value: true |
| 435 |
})); |
| 436 |
exports.AtomicWidgetView = void 0; |
| 437 |
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 438 |
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 439 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 440 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 441 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 442 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 443 |
var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); |
| 444 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 445 |
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; } |
| 446 |
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; } |
| 447 |
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)); } |
| 448 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 449 |
function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } |
| 450 |
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); } |
| 451 |
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); } |
| 452 |
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); } |
| 453 |
var _AtomicWidgetView_brand = /*#__PURE__*/new WeakSet(); |
| 454 |
var AtomicWidgetView = exports.AtomicWidgetView = /*#__PURE__*/function (_elementor$modules$el) { |
| 455 |
function AtomicWidgetView() { |
| 456 |
var _this; |
| 457 |
(0, _classCallCheck2.default)(this, AtomicWidgetView); |
| 458 |
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| 459 |
args[_key] = arguments[_key]; |
| 460 |
} |
| 461 |
_this = _callSuper(this, AtomicWidgetView, [].concat(args)); |
| 462 |
_classPrivateMethodInitSpec(_this, _AtomicWidgetView_brand); |
| 463 |
return _this; |
| 464 |
} |
| 465 |
(0, _inherits2.default)(AtomicWidgetView, _elementor$modules$el); |
| 466 |
return (0, _createClass2.default)(AtomicWidgetView, [{ |
| 467 |
key: "onRender", |
| 468 |
value: |
| 469 |
// Dispatch `render` event so the overlay layer will be updated |
| 470 |
function onRender() { |
| 471 |
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { |
| 472 |
args[_key2] = arguments[_key2]; |
| 473 |
} |
| 474 |
_superPropGet(AtomicWidgetView, "onRender", this, 3)(args); |
| 475 |
_assertClassBrand(_AtomicWidgetView_brand, this, _dispatchEvent).call(this, 'elementor/preview/atomic-widget/render'); |
| 476 |
} |
| 477 |
|
| 478 |
// Dispatch `destroy` event so the overlay layer will be updated |
| 479 |
}, { |
| 480 |
key: "onDestroy", |
| 481 |
value: function onDestroy() { |
| 482 |
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { |
| 483 |
args[_key3] = arguments[_key3]; |
| 484 |
} |
| 485 |
_superPropGet(AtomicWidgetView, "onDestroy", this, 3)(args); |
| 486 |
_assertClassBrand(_AtomicWidgetView_brand, this, _dispatchEvent).call(this, 'elementor/preview/atomic-widget/destroy'); |
| 487 |
} |
| 488 |
|
| 489 |
// Removes behaviors that are not needed for atomic widgets (that are implemented in the overlay layer). |
| 490 |
}, { |
| 491 |
key: "behaviors", |
| 492 |
value: function behaviors() { |
| 493 |
var disabledBehaviors = ['InlineEditing', 'Draggable', 'Resizable']; |
| 494 |
var behaviorsAsEntries = Object.entries(_superPropGet(AtomicWidgetView, "behaviors", this, 3)([])).filter(function (_ref) { |
| 495 |
var _ref2 = (0, _slicedToArray2.default)(_ref, 1), |
| 496 |
key = _ref2[0]; |
| 497 |
return !disabledBehaviors.includes(key); |
| 498 |
}); |
| 499 |
return Object.fromEntries(behaviorsAsEntries); |
| 500 |
} |
| 501 |
|
| 502 |
// Change the drag handle because the $el is not the draggable element (`display: contents`). |
| 503 |
}, { |
| 504 |
key: "getDraggableElement", |
| 505 |
value: function getDraggableElement() { |
| 506 |
return this.$el.find(':first-child'); |
| 507 |
} |
| 508 |
|
| 509 |
// Remove the overlay, so we can use the new overlay layer. |
| 510 |
}, { |
| 511 |
key: "getHandlesOverlay", |
| 512 |
value: function getHandlesOverlay() { |
| 513 |
return null; |
| 514 |
} |
| 515 |
}, { |
| 516 |
key: "attributes", |
| 517 |
value: function attributes() { |
| 518 |
return _objectSpread(_objectSpread({}, _superPropGet(AtomicWidgetView, "attributes", this, 3)([])), {}, { |
| 519 |
// Mark the widget as atomic, so the overlay layer can identify it. |
| 520 |
'data-atomic': '', |
| 521 |
// Make the wrapper non-existent in terms of CSS to mimic the frontend DOM tree. |
| 522 |
style: 'display: contents !important;' |
| 523 |
}); |
| 524 |
} |
| 525 |
}]); |
| 526 |
}(elementor.modules.elements.views.Widget); |
| 527 |
function _dispatchEvent(type) { |
| 528 |
window.top.dispatchEvent(new CustomEvent(type, { |
| 529 |
detail: { |
| 530 |
id: this.model.get('id') |
| 531 |
} |
| 532 |
})); |
| 533 |
} |
| 534 |
|
| 535 |
/***/ }), |
| 536 |
|
| 537 |
/***/ "../modules/atomic-widgets/assets/js/editor/commands-internal/create-style.js": |
| 538 |
/*!************************************************************************************!*\ |
| 539 |
!*** ../modules/atomic-widgets/assets/js/editor/commands-internal/create-style.js ***! |
| 540 |
\************************************************************************************/ |
| 541 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 542 |
|
| 543 |
"use strict"; |
| 544 |
/* provided dependency */ var sprintf = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["sprintf"]; |
| 545 |
|
| 546 |
|
| 547 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 548 |
Object.defineProperty(exports, "__esModule", ({ |
| 549 |
value: true |
| 550 |
})); |
| 551 |
exports["default"] = exports.CreateStyle = void 0; |
| 552 |
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 553 |
var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); |
| 554 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 555 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 556 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 557 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 558 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 559 |
var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 560 |
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; } |
| 561 |
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; } |
| 562 |
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)); } |
| 563 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 564 |
var PROP_TYPE_CLASSES = 'classes'; |
| 565 |
|
| 566 |
/** |
| 567 |
* @typedef {import('elementor/assets/dev/js/editor/container/container')} Container |
| 568 |
*/ |
| 569 |
var CreateStyle = exports.CreateStyle = /*#__PURE__*/function (_$e$modules$editor$Co) { |
| 570 |
function CreateStyle() { |
| 571 |
(0, _classCallCheck2.default)(this, CreateStyle); |
| 572 |
return _callSuper(this, CreateStyle, arguments); |
| 573 |
} |
| 574 |
(0, _inherits2.default)(CreateStyle, _$e$modules$editor$Co); |
| 575 |
return (0, _createClass2.default)(CreateStyle, [{ |
| 576 |
key: "validateArgs", |
| 577 |
value: function validateArgs(args) { |
| 578 |
this.requireContainer(args); |
| 579 |
this.requireArgumentConstructor('bind', String, args); |
| 580 |
if ('label' in args) { |
| 581 |
var isValidLabel = 'string' === typeof args.label && args.label.length > 0; |
| 582 |
if (!isValidLabel) { |
| 583 |
throw new Error('Invalid label arg'); |
| 584 |
} |
| 585 |
} |
| 586 |
} |
| 587 |
}, { |
| 588 |
key: "randomId", |
| 589 |
value: function randomId(containerId) { |
| 590 |
return "s-".concat(containerId, "-").concat(elementorCommon.helpers.getUniqueId()); |
| 591 |
} |
| 592 |
}, { |
| 593 |
key: "apply", |
| 594 |
value: function apply(args) { |
| 595 |
var _container$settings$g; |
| 596 |
var container = args.container, |
| 597 |
styleDefID = args.styleDefID, |
| 598 |
bind = args.bind, |
| 599 |
label = args.label; |
| 600 |
var oldStyles = container.model.get('styles') || {}; |
| 601 |
var newStyle = { |
| 602 |
id: styleDefID !== null && styleDefID !== void 0 ? styleDefID : this.randomId(container.id), |
| 603 |
/* Translators: 1: container label, 2: number of old styles */ |
| 604 |
label: label !== null && label !== void 0 ? label : sprintf((0, _i18n.__)('%1$s Style %2$s', 'elementor'), container.label, Object.keys(oldStyles).length + 1), |
| 605 |
type: 'class', |
| 606 |
variants: [] |
| 607 |
}; |
| 608 |
var oldBindSetting = (_container$settings$g = container.settings.get(bind)) !== null && _container$settings$g !== void 0 ? _container$settings$g : { |
| 609 |
$$type: PROP_TYPE_CLASSES, |
| 610 |
value: [] |
| 611 |
}; |
| 612 |
if (oldBindSetting.$$type !== PROP_TYPE_CLASSES || !Array.isArray(oldBindSetting.value)) { |
| 613 |
throw new Error('Invalid bind setting prop type'); |
| 614 |
} |
| 615 |
var newBindSetting = (0, _defineProperty2.default)({}, bind, { |
| 616 |
$$type: PROP_TYPE_CLASSES, |
| 617 |
value: [].concat((0, _toConsumableArray2.default)(oldBindSetting.value), [newStyle.id]) |
| 618 |
}); |
| 619 |
$e.internal('document/elements/set-settings', { |
| 620 |
container: container, |
| 621 |
settings: newBindSetting |
| 622 |
}); |
| 623 |
var newStyles = _objectSpread(_objectSpread({}, oldStyles), {}, (0, _defineProperty2.default)({}, newStyle.id, newStyle)); |
| 624 |
container.model.set('styles', newStyles); |
| 625 |
return newStyle; |
| 626 |
} |
| 627 |
}]); |
| 628 |
}($e.modules.editor.CommandContainerInternalBase); |
| 629 |
var _default = exports["default"] = CreateStyle; |
| 630 |
|
| 631 |
/***/ }), |
| 632 |
|
| 633 |
/***/ "../modules/atomic-widgets/assets/js/editor/commands-internal/create-variant.js": |
| 634 |
/*!**************************************************************************************!*\ |
| 635 |
!*** ../modules/atomic-widgets/assets/js/editor/commands-internal/create-variant.js ***! |
| 636 |
\**************************************************************************************/ |
| 637 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 638 |
|
| 639 |
"use strict"; |
| 640 |
|
| 641 |
|
| 642 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 643 |
Object.defineProperty(exports, "__esModule", ({ |
| 644 |
value: true |
| 645 |
})); |
| 646 |
exports["default"] = exports.CreateVariant = void 0; |
| 647 |
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 648 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 649 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 650 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 651 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 652 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 653 |
var _getVariants = __webpack_require__(/*! ../utils/get-variants */ "../modules/atomic-widgets/assets/js/editor/utils/get-variants.js"); |
| 654 |
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; } |
| 655 |
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; } |
| 656 |
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)); } |
| 657 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 658 |
/** |
| 659 |
* @typedef {import('elementor/assets/dev/js/editor/container/container')} Container |
| 660 |
*/ |
| 661 |
var CreateVariant = exports.CreateVariant = /*#__PURE__*/function (_$e$modules$editor$Co) { |
| 662 |
function CreateVariant() { |
| 663 |
(0, _classCallCheck2.default)(this, CreateVariant); |
| 664 |
return _callSuper(this, CreateVariant, arguments); |
| 665 |
} |
| 666 |
(0, _inherits2.default)(CreateVariant, _$e$modules$editor$Co); |
| 667 |
return (0, _createClass2.default)(CreateVariant, [{ |
| 668 |
key: "validateArgs", |
| 669 |
value: function validateArgs(args) { |
| 670 |
this.requireContainer(args); |
| 671 |
this.requireArgumentConstructor('styleDefID', String, args); |
| 672 |
this.requireArgumentConstructor('meta', Object, args); |
| 673 |
if (!('breakpoint' in args.meta && 'state' in args.meta)) { |
| 674 |
throw new Error('Invalid meta arg'); |
| 675 |
} |
| 676 |
} |
| 677 |
}, { |
| 678 |
key: "apply", |
| 679 |
value: function apply(args) { |
| 680 |
var container = args.container, |
| 681 |
styleDefID = args.styleDefID, |
| 682 |
meta = args.meta; |
| 683 |
var oldStyles = container.model.get('styles') || {}; |
| 684 |
if (!oldStyles[styleDefID]) { |
| 685 |
throw new Error('Style Def not found'); |
| 686 |
} |
| 687 |
var style = oldStyles[styleDefID]; |
| 688 |
if ((0, _getVariants.getVariantByMeta)(style.variants, meta)) { |
| 689 |
throw new Error('Style Variant already exits'); |
| 690 |
} |
| 691 |
style.variants.push({ |
| 692 |
meta: meta, |
| 693 |
props: {} |
| 694 |
}); |
| 695 |
var newStyles = _objectSpread(_objectSpread({}, oldStyles), {}, (0, _defineProperty2.default)({}, styleDefID, style)); |
| 696 |
container.model.set('styles', newStyles); |
| 697 |
} |
| 698 |
}]); |
| 699 |
}($e.modules.editor.CommandContainerInternalBase); |
| 700 |
var _default = exports["default"] = CreateVariant; |
| 701 |
|
| 702 |
/***/ }), |
| 703 |
|
| 704 |
/***/ "../modules/atomic-widgets/assets/js/editor/commands-internal/delete-style.js": |
| 705 |
/*!************************************************************************************!*\ |
| 706 |
!*** ../modules/atomic-widgets/assets/js/editor/commands-internal/delete-style.js ***! |
| 707 |
\************************************************************************************/ |
| 708 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 709 |
|
| 710 |
"use strict"; |
| 711 |
|
| 712 |
|
| 713 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 714 |
Object.defineProperty(exports, "__esModule", ({ |
| 715 |
value: true |
| 716 |
})); |
| 717 |
exports["default"] = exports.DeleteStyle = void 0; |
| 718 |
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 719 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 720 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 721 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 722 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 723 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 724 |
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)); } |
| 725 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 726 |
/** |
| 727 |
* @typedef {import('elementor/assets/dev/js/editor/container/container')} Container |
| 728 |
*/ |
| 729 |
var DeleteStyle = exports.DeleteStyle = /*#__PURE__*/function (_$e$modules$editor$Co) { |
| 730 |
function DeleteStyle() { |
| 731 |
(0, _classCallCheck2.default)(this, DeleteStyle); |
| 732 |
return _callSuper(this, DeleteStyle, arguments); |
| 733 |
} |
| 734 |
(0, _inherits2.default)(DeleteStyle, _$e$modules$editor$Co); |
| 735 |
return (0, _createClass2.default)(DeleteStyle, [{ |
| 736 |
key: "validateArgs", |
| 737 |
value: function validateArgs(args) { |
| 738 |
this.requireContainer(args); |
| 739 |
this.requireArgumentConstructor('styleDefID', String, args); |
| 740 |
this.requireArgumentConstructor('bind', String, args); |
| 741 |
} |
| 742 |
}, { |
| 743 |
key: "apply", |
| 744 |
value: function apply(args) { |
| 745 |
var container = args.container, |
| 746 |
styleDefID = args.styleDefID, |
| 747 |
bind = args.bind; |
| 748 |
var oldBindSetting = container.settings.get(bind); |
| 749 |
if (!oldBindSetting) { |
| 750 |
throw new Error('Setting not found'); |
| 751 |
} |
| 752 |
var newBindSetting = (0, _defineProperty2.default)({}, bind, { |
| 753 |
$$type: 'classes', |
| 754 |
value: oldBindSetting.value.filter(function (id) { |
| 755 |
return id !== styleDefID; |
| 756 |
}) |
| 757 |
}); |
| 758 |
$e.internal('document/elements/set-settings', { |
| 759 |
container: container, |
| 760 |
settings: newBindSetting |
| 761 |
}); |
| 762 |
var styles = container.model.get('styles') || {}; |
| 763 |
delete styles[styleDefID]; |
| 764 |
container.model.set('styles', styles); |
| 765 |
} |
| 766 |
}]); |
| 767 |
}($e.modules.editor.CommandContainerInternalBase); |
| 768 |
var _default = exports["default"] = DeleteStyle; |
| 769 |
|
| 770 |
/***/ }), |
| 771 |
|
| 772 |
/***/ "../modules/atomic-widgets/assets/js/editor/commands-internal/delete-variant.js": |
| 773 |
/*!**************************************************************************************!*\ |
| 774 |
!*** ../modules/atomic-widgets/assets/js/editor/commands-internal/delete-variant.js ***! |
| 775 |
\**************************************************************************************/ |
| 776 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 777 |
|
| 778 |
"use strict"; |
| 779 |
|
| 780 |
|
| 781 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 782 |
Object.defineProperty(exports, "__esModule", ({ |
| 783 |
value: true |
| 784 |
})); |
| 785 |
exports["default"] = exports.DeleteVariant = void 0; |
| 786 |
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 787 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 788 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 789 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 790 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 791 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 792 |
var _getVariants = __webpack_require__(/*! ../utils/get-variants */ "../modules/atomic-widgets/assets/js/editor/utils/get-variants.js"); |
| 793 |
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; } |
| 794 |
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; } |
| 795 |
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)); } |
| 796 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 797 |
/** |
| 798 |
* @typedef {import('elementor/assets/dev/js/editor/container/container')} Container |
| 799 |
*/ |
| 800 |
var DeleteVariant = exports.DeleteVariant = /*#__PURE__*/function (_$e$modules$editor$Co) { |
| 801 |
function DeleteVariant() { |
| 802 |
(0, _classCallCheck2.default)(this, DeleteVariant); |
| 803 |
return _callSuper(this, DeleteVariant, arguments); |
| 804 |
} |
| 805 |
(0, _inherits2.default)(DeleteVariant, _$e$modules$editor$Co); |
| 806 |
return (0, _createClass2.default)(DeleteVariant, [{ |
| 807 |
key: "validateArgs", |
| 808 |
value: function validateArgs(args) { |
| 809 |
this.requireContainer(args); |
| 810 |
this.requireArgumentConstructor('styleDefID', String, args); |
| 811 |
this.requireArgumentConstructor('meta', Object, args); |
| 812 |
if (!('breakpoint' in args.meta && 'state' in args.meta)) { |
| 813 |
throw new Error('Invalid meta arg'); |
| 814 |
} |
| 815 |
} |
| 816 |
}, { |
| 817 |
key: "apply", |
| 818 |
value: function apply(args) { |
| 819 |
var container = args.container, |
| 820 |
styleDefID = args.styleDefID, |
| 821 |
meta = args.meta; |
| 822 |
var oldStyles = container.model.get('styles') || {}; |
| 823 |
var style = {}; |
| 824 |
if (!oldStyles[styleDefID]) { |
| 825 |
throw new Error('Style Def not found'); |
| 826 |
} |
| 827 |
style = oldStyles[styleDefID]; |
| 828 |
style.variants = (0, _getVariants.getVariantsWithoutMeta)(style.variants, meta); |
| 829 |
var newStyles = _objectSpread(_objectSpread({}, oldStyles), {}, (0, _defineProperty2.default)({}, style.id, style)); |
| 830 |
container.model.set('styles', newStyles); |
| 831 |
} |
| 832 |
}]); |
| 833 |
}($e.modules.editor.CommandContainerInternalBase); |
| 834 |
var _default = exports["default"] = DeleteVariant; |
| 835 |
|
| 836 |
/***/ }), |
| 837 |
|
| 838 |
/***/ "../modules/atomic-widgets/assets/js/editor/commands-internal/index.js": |
| 839 |
/*!*****************************************************************************!*\ |
| 840 |
!*** ../modules/atomic-widgets/assets/js/editor/commands-internal/index.js ***! |
| 841 |
\*****************************************************************************/ |
| 842 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 843 |
|
| 844 |
"use strict"; |
| 845 |
|
| 846 |
|
| 847 |
Object.defineProperty(exports, "__esModule", ({ |
| 848 |
value: true |
| 849 |
})); |
| 850 |
Object.defineProperty(exports, "CreateStyle", ({ |
| 851 |
enumerable: true, |
| 852 |
get: function get() { |
| 853 |
return _createStyle.CreateStyle; |
| 854 |
} |
| 855 |
})); |
| 856 |
Object.defineProperty(exports, "CreateVariant", ({ |
| 857 |
enumerable: true, |
| 858 |
get: function get() { |
| 859 |
return _createVariant.CreateVariant; |
| 860 |
} |
| 861 |
})); |
| 862 |
Object.defineProperty(exports, "DeleteStyle", ({ |
| 863 |
enumerable: true, |
| 864 |
get: function get() { |
| 865 |
return _deleteStyle.DeleteStyle; |
| 866 |
} |
| 867 |
})); |
| 868 |
Object.defineProperty(exports, "DeleteVariant", ({ |
| 869 |
enumerable: true, |
| 870 |
get: function get() { |
| 871 |
return _deleteVariant.DeleteVariant; |
| 872 |
} |
| 873 |
})); |
| 874 |
Object.defineProperty(exports, "UpdateProps", ({ |
| 875 |
enumerable: true, |
| 876 |
get: function get() { |
| 877 |
return _updateProps.UpdateProps; |
| 878 |
} |
| 879 |
})); |
| 880 |
var _updateProps = __webpack_require__(/*! ./update-props */ "../modules/atomic-widgets/assets/js/editor/commands-internal/update-props.js"); |
| 881 |
var _createStyle = __webpack_require__(/*! ./create-style */ "../modules/atomic-widgets/assets/js/editor/commands-internal/create-style.js"); |
| 882 |
var _deleteStyle = __webpack_require__(/*! ./delete-style */ "../modules/atomic-widgets/assets/js/editor/commands-internal/delete-style.js"); |
| 883 |
var _createVariant = __webpack_require__(/*! ./create-variant */ "../modules/atomic-widgets/assets/js/editor/commands-internal/create-variant.js"); |
| 884 |
var _deleteVariant = __webpack_require__(/*! ./delete-variant */ "../modules/atomic-widgets/assets/js/editor/commands-internal/delete-variant.js"); |
| 885 |
|
| 886 |
/***/ }), |
| 887 |
|
| 888 |
/***/ "../modules/atomic-widgets/assets/js/editor/commands-internal/update-props.js": |
| 889 |
/*!************************************************************************************!*\ |
| 890 |
!*** ../modules/atomic-widgets/assets/js/editor/commands-internal/update-props.js ***! |
| 891 |
\************************************************************************************/ |
| 892 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 893 |
|
| 894 |
"use strict"; |
| 895 |
|
| 896 |
|
| 897 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 898 |
Object.defineProperty(exports, "__esModule", ({ |
| 899 |
value: true |
| 900 |
})); |
| 901 |
exports["default"] = exports.UpdateProps = void 0; |
| 902 |
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 903 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 904 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 905 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 906 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 907 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 908 |
var _getVariants = __webpack_require__(/*! ../utils/get-variants */ "../modules/atomic-widgets/assets/js/editor/utils/get-variants.js"); |
| 909 |
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)); } |
| 910 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 911 |
/** |
| 912 |
* @typedef {import('elementor/assets/dev/js/editor/container/container')} Container |
| 913 |
*/ |
| 914 |
var UpdateProps = exports.UpdateProps = /*#__PURE__*/function (_$e$modules$editor$Co) { |
| 915 |
function UpdateProps() { |
| 916 |
(0, _classCallCheck2.default)(this, UpdateProps); |
| 917 |
return _callSuper(this, UpdateProps, arguments); |
| 918 |
} |
| 919 |
(0, _inherits2.default)(UpdateProps, _$e$modules$editor$Co); |
| 920 |
return (0, _createClass2.default)(UpdateProps, [{ |
| 921 |
key: "validateArgs", |
| 922 |
value: function validateArgs(args) { |
| 923 |
this.requireContainer(args); |
| 924 |
this.requireArgumentConstructor('styleDefID', String, args); |
| 925 |
this.requireArgumentConstructor('meta', Object, args); |
| 926 |
this.requireArgumentConstructor('props', Object, args); |
| 927 |
if (!('breakpoint' in args.meta && 'state' in args.meta)) { |
| 928 |
throw new Error('Invalid meta arg'); |
| 929 |
} |
| 930 |
if (0 === Object.keys(args.props).length) { |
| 931 |
throw new Error('Props are empty'); |
| 932 |
} |
| 933 |
} |
| 934 |
}, { |
| 935 |
key: "updateExistingVariant", |
| 936 |
value: function updateExistingVariant(variant, props) { |
| 937 |
Object.entries(props).forEach(function (_ref) { |
| 938 |
var _ref2 = (0, _slicedToArray2.default)(_ref, 2), |
| 939 |
key = _ref2[0], |
| 940 |
value = _ref2[1]; |
| 941 |
if (null === value || undefined === value) { |
| 942 |
delete variant.props[key]; |
| 943 |
return; |
| 944 |
} |
| 945 |
variant.props[key] = value; |
| 946 |
}); |
| 947 |
} |
| 948 |
}, { |
| 949 |
key: "apply", |
| 950 |
value: function apply(args) { |
| 951 |
var container = args.container, |
| 952 |
styleDefID = args.styleDefID, |
| 953 |
meta = args.meta, |
| 954 |
props = args.props; |
| 955 |
var styles = container.model.get('styles') || {}; |
| 956 |
var style = styles[styleDefID]; |
| 957 |
if (!style) { |
| 958 |
throw new Error('Style Def not found'); |
| 959 |
} |
| 960 |
var variant = (0, _getVariants.getVariantByMeta)(style.variants, meta); |
| 961 |
if (!variant) { |
| 962 |
throw new Error('Style Variant not found'); |
| 963 |
} |
| 964 |
this.updateExistingVariant(variant, props); |
| 965 |
} |
| 966 |
}]); |
| 967 |
}($e.modules.editor.CommandContainerInternalBase); |
| 968 |
var _default = exports["default"] = UpdateProps; |
| 969 |
|
| 970 |
/***/ }), |
| 971 |
|
| 972 |
/***/ "../modules/atomic-widgets/assets/js/editor/commands/index.js": |
| 973 |
/*!********************************************************************!*\ |
| 974 |
!*** ../modules/atomic-widgets/assets/js/editor/commands/index.js ***! |
| 975 |
\********************************************************************/ |
| 976 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 977 |
|
| 978 |
"use strict"; |
| 979 |
|
| 980 |
|
| 981 |
Object.defineProperty(exports, "__esModule", ({ |
| 982 |
value: true |
| 983 |
})); |
| 984 |
Object.defineProperty(exports, "Styles", ({ |
| 985 |
enumerable: true, |
| 986 |
get: function get() { |
| 987 |
return _styles.Styles; |
| 988 |
} |
| 989 |
})); |
| 990 |
var _styles = __webpack_require__(/*! ./styles */ "../modules/atomic-widgets/assets/js/editor/commands/styles.js"); |
| 991 |
|
| 992 |
/***/ }), |
| 993 |
|
| 994 |
/***/ "../modules/atomic-widgets/assets/js/editor/commands/styles.js": |
| 995 |
/*!*********************************************************************!*\ |
| 996 |
!*** ../modules/atomic-widgets/assets/js/editor/commands/styles.js ***! |
| 997 |
\*********************************************************************/ |
| 998 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 999 |
|
| 1000 |
"use strict"; |
| 1001 |
/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; |
| 1002 |
|
| 1003 |
|
| 1004 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1005 |
Object.defineProperty(exports, "__esModule", ({ |
| 1006 |
value: true |
| 1007 |
})); |
| 1008 |
exports["default"] = exports.Styles = void 0; |
| 1009 |
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 1010 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1011 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1012 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1013 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1014 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1015 |
var _getVariants = __webpack_require__(/*! ../utils/get-variants */ "../modules/atomic-widgets/assets/js/editor/utils/get-variants.js"); |
| 1016 |
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; } |
| 1017 |
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; } |
| 1018 |
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)); } |
| 1019 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 1020 |
/** |
| 1021 |
* @typedef {import('elementor/assets/dev/js/editor/container/container')} Container |
| 1022 |
*/ |
| 1023 |
var Styles = exports.Styles = /*#__PURE__*/function (_$e$modules$editor$do) { |
| 1024 |
function Styles() { |
| 1025 |
(0, _classCallCheck2.default)(this, Styles); |
| 1026 |
return _callSuper(this, Styles, arguments); |
| 1027 |
} |
| 1028 |
(0, _inherits2.default)(Styles, _$e$modules$editor$do); |
| 1029 |
return (0, _createClass2.default)(Styles, [{ |
| 1030 |
key: "validateArgs", |
| 1031 |
value: function validateArgs(args) { |
| 1032 |
this.requireContainer(args); |
| 1033 |
if (!args.bind && !args.styleDefID) { |
| 1034 |
throw new Error('Missing bind or styleDefID'); |
| 1035 |
} |
| 1036 |
if (args.bind && 'string' !== typeof args.bind) { |
| 1037 |
throw new Error('Invalid bind arg'); |
| 1038 |
} |
| 1039 |
if (args.styleDefID && 'string' !== typeof args.styleDefID) { |
| 1040 |
throw new Error('Invalid styleDefID arg'); |
| 1041 |
} |
| 1042 |
} |
| 1043 |
|
| 1044 |
/** |
| 1045 |
* Function restore(). |
| 1046 |
* |
| 1047 |
* Redo/Restore. |
| 1048 |
* |
| 1049 |
* @param {{}} historyItem |
| 1050 |
* @param {boolean} isRedo |
| 1051 |
*/ |
| 1052 |
}, { |
| 1053 |
key: "addToHistory", |
| 1054 |
value: |
| 1055 |
/** |
| 1056 |
* Function addToHistory(). |
| 1057 |
* |
| 1058 |
* @param {Container} container |
| 1059 |
* @param {string} bind |
| 1060 |
* @param {string} styleDefID |
| 1061 |
* @param {{}} meta |
| 1062 |
* @param {{}} props |
| 1063 |
* @param {{}} oldProps |
| 1064 |
* @param {string|undefined} label |
| 1065 |
*/ |
| 1066 |
function addToHistory(container, bind, styleDefID, meta, props, oldProps, label) { |
| 1067 |
var newPropsEmpty = Object.keys(props).reduce(function (emptyValues, key) { |
| 1068 |
emptyValues[key] = undefined; |
| 1069 |
return emptyValues; |
| 1070 |
}, {}); |
| 1071 |
var changes = (0, _defineProperty2.default)({}, container.id, { |
| 1072 |
bind: bind, |
| 1073 |
styleDefID: styleDefID, |
| 1074 |
meta: meta, |
| 1075 |
label: label, |
| 1076 |
old: { |
| 1077 |
props: _objectSpread(_objectSpread({}, newPropsEmpty), oldProps) |
| 1078 |
}, |
| 1079 |
new: { |
| 1080 |
props: props |
| 1081 |
} |
| 1082 |
}), |
| 1083 |
historyItem = { |
| 1084 |
container: container, |
| 1085 |
data: { |
| 1086 |
changes: changes |
| 1087 |
}, |
| 1088 |
type: 'change', |
| 1089 |
restore: Styles.restore |
| 1090 |
}; |
| 1091 |
$e.internal('document/history/add-transaction', historyItem); |
| 1092 |
} |
| 1093 |
}, { |
| 1094 |
key: "getHistory", |
| 1095 |
value: function getHistory(args) { |
| 1096 |
var container = args.container, |
| 1097 |
subTitle = this.constructor.getSubTitle(args); |
| 1098 |
return { |
| 1099 |
container: container, |
| 1100 |
subTitle: subTitle, |
| 1101 |
type: 'change' |
| 1102 |
}; |
| 1103 |
} |
| 1104 |
}, { |
| 1105 |
key: "apply", |
| 1106 |
value: function apply(args) { |
| 1107 |
var _args$styleDefID, _container$model$get; |
| 1108 |
var container = args.container; |
| 1109 |
var bind = args.bind, |
| 1110 |
meta = args.meta, |
| 1111 |
props = args.props, |
| 1112 |
label = args.label; |
| 1113 |
container = container.lookup(); |
| 1114 |
var styleDefID = (_args$styleDefID = args.styleDefID) !== null && _args$styleDefID !== void 0 ? _args$styleDefID : null; |
| 1115 |
var currentStyle = (_container$model$get = container.model.get('styles')) !== null && _container$model$get !== void 0 ? _container$model$get : {}; |
| 1116 |
|
| 1117 |
// Saving a deep clone of the style before it mutates, as part of this command |
| 1118 |
var oldStyle = this.isHistoryActive() ? structuredClone(currentStyle) : null; |
| 1119 |
var style = {}; |
| 1120 |
if (!styleDefID) { |
| 1121 |
// Create a new style definition for the first time |
| 1122 |
style = $e.internal('document/atomic-widgets/create-style', { |
| 1123 |
label: label, |
| 1124 |
container: container, |
| 1125 |
bind: bind |
| 1126 |
}); |
| 1127 |
styleDefID = style.id; |
| 1128 |
} else if (!currentStyle[styleDefID]) { |
| 1129 |
// Create a new style definition with the given ID |
| 1130 |
// used when the style is deleted and then re-applied (i.e. history undo/redo) |
| 1131 |
style = $e.internal('document/atomic-widgets/create-style', { |
| 1132 |
label: label, |
| 1133 |
container: container, |
| 1134 |
styleDefID: styleDefID, |
| 1135 |
bind: bind |
| 1136 |
}); |
| 1137 |
} else { |
| 1138 |
// Use the existing style definition |
| 1139 |
style = currentStyle[styleDefID]; |
| 1140 |
} |
| 1141 |
var currentVariant = (0, _getVariants.getVariantByMeta)(style.variants, meta); |
| 1142 |
if (!currentVariant) { |
| 1143 |
$e.internal('document/atomic-widgets/create-variant', { |
| 1144 |
container: container, |
| 1145 |
styleDefID: styleDefID, |
| 1146 |
meta: meta |
| 1147 |
}); |
| 1148 |
} |
| 1149 |
var nonEmptyValues = Object.values(_objectSpread(_objectSpread({}, currentVariant === null || currentVariant === void 0 ? void 0 : currentVariant.props), props)).filter(function (value) { |
| 1150 |
return value !== undefined; |
| 1151 |
}); |
| 1152 |
if (0 === nonEmptyValues.length) { |
| 1153 |
// Doesn't have any props to use for this variant |
| 1154 |
$e.internal('document/atomic-widgets/delete-variant', { |
| 1155 |
container: container, |
| 1156 |
styleDefID: styleDefID, |
| 1157 |
meta: meta |
| 1158 |
}); |
| 1159 |
var newStyles = container.model.get('styles'); |
| 1160 |
var newVariants = newStyles[styleDefID].variants; |
| 1161 |
if (0 === newVariants.length) { |
| 1162 |
// After deleting the variant, there are no variants left |
| 1163 |
$e.internal('document/atomic-widgets/delete-style', { |
| 1164 |
container: container, |
| 1165 |
styleDefID: styleDefID, |
| 1166 |
bind: bind |
| 1167 |
}); |
| 1168 |
} |
| 1169 |
} else { |
| 1170 |
// Has valid props in the current variant |
| 1171 |
$e.internal('document/atomic-widgets/update-props', { |
| 1172 |
container: container, |
| 1173 |
styleDefID: styleDefID, |
| 1174 |
bind: bind, |
| 1175 |
meta: meta, |
| 1176 |
props: props |
| 1177 |
}); |
| 1178 |
} |
| 1179 |
if (null !== oldStyle) { |
| 1180 |
var _getVariantByMeta; |
| 1181 |
var oldStyleDef = oldStyle[styleDefID]; |
| 1182 |
var oldProps = oldStyleDef !== null && oldStyleDef !== void 0 && oldStyleDef.variants ? (_getVariantByMeta = (0, _getVariants.getVariantByMeta)(oldStyleDef.variants, meta)) === null || _getVariantByMeta === void 0 ? void 0 : _getVariantByMeta.props : {}; |
| 1183 |
this.addToHistory(container, bind, styleDefID, meta, props, oldProps, label); |
| 1184 |
} |
| 1185 |
} |
| 1186 |
}], [{ |
| 1187 |
key: "getSubTitle", |
| 1188 |
value: function getSubTitle() { |
| 1189 |
return __('Style', 'elementor'); |
| 1190 |
} |
| 1191 |
}, { |
| 1192 |
key: "restore", |
| 1193 |
value: function restore(historyItem, isRedo) { |
| 1194 |
var container = historyItem.get('container'); |
| 1195 |
var changes = historyItem.get('data').changes[container.id]; |
| 1196 |
var bind = changes.bind, |
| 1197 |
styleDefID = changes.styleDefID, |
| 1198 |
meta = changes.meta, |
| 1199 |
label = changes.label; |
| 1200 |
var _ref = isRedo ? changes.new : changes.old, |
| 1201 |
props = _ref.props; |
| 1202 |
$e.run('document/atomic-widgets/styles', { |
| 1203 |
container: container, |
| 1204 |
bind: bind, |
| 1205 |
styleDefID: styleDefID, |
| 1206 |
meta: meta, |
| 1207 |
props: props, |
| 1208 |
label: label |
| 1209 |
}); |
| 1210 |
} |
| 1211 |
}]); |
| 1212 |
}($e.modules.editor.document.CommandHistoryDebounceBase); |
| 1213 |
var _default = exports["default"] = Styles; |
| 1214 |
|
| 1215 |
/***/ }), |
| 1216 |
|
| 1217 |
/***/ "../modules/atomic-widgets/assets/js/editor/component.js": |
| 1218 |
/*!***************************************************************!*\ |
| 1219 |
!*** ../modules/atomic-widgets/assets/js/editor/component.js ***! |
| 1220 |
\***************************************************************/ |
| 1221 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1222 |
|
| 1223 |
"use strict"; |
| 1224 |
|
| 1225 |
|
| 1226 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1227 |
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 1228 |
Object.defineProperty(exports, "__esModule", ({ |
| 1229 |
value: true |
| 1230 |
})); |
| 1231 |
exports["default"] = void 0; |
| 1232 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1233 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1234 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1235 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1236 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1237 |
var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../modules/atomic-widgets/assets/js/editor/commands/index.js")); |
| 1238 |
var commandsInternal = _interopRequireWildcard(__webpack_require__(/*! ./commands-internal/ */ "../modules/atomic-widgets/assets/js/editor/commands-internal/index.js")); |
| 1239 |
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } |
| 1240 |
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } |
| 1241 |
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)); } |
| 1242 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 1243 |
var Component = exports["default"] = /*#__PURE__*/function (_$e$modules$Component) { |
| 1244 |
function Component() { |
| 1245 |
(0, _classCallCheck2.default)(this, Component); |
| 1246 |
return _callSuper(this, Component, arguments); |
| 1247 |
} |
| 1248 |
(0, _inherits2.default)(Component, _$e$modules$Component); |
| 1249 |
return (0, _createClass2.default)(Component, [{ |
| 1250 |
key: "getNamespace", |
| 1251 |
value: function getNamespace() { |
| 1252 |
return 'document/atomic-widgets'; |
| 1253 |
} |
| 1254 |
}, { |
| 1255 |
key: "defaultCommands", |
| 1256 |
value: function defaultCommands() { |
| 1257 |
return this.importCommands(commands); |
| 1258 |
} |
| 1259 |
}, { |
| 1260 |
key: "defaultCommandsInternal", |
| 1261 |
value: function defaultCommandsInternal() { |
| 1262 |
return this.importCommands(commandsInternal); |
| 1263 |
} |
| 1264 |
}]); |
| 1265 |
}($e.modules.ComponentBase); |
| 1266 |
|
| 1267 |
/***/ }), |
| 1268 |
|
| 1269 |
/***/ "../modules/atomic-widgets/assets/js/editor/container/div-block-empty-view.js": |
| 1270 |
/*!************************************************************************************!*\ |
| 1271 |
!*** ../modules/atomic-widgets/assets/js/editor/container/div-block-empty-view.js ***! |
| 1272 |
\************************************************************************************/ |
| 1273 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1274 |
|
| 1275 |
"use strict"; |
| 1276 |
|
| 1277 |
|
| 1278 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1279 |
Object.defineProperty(exports, "__esModule", ({ |
| 1280 |
value: true |
| 1281 |
})); |
| 1282 |
exports["default"] = void 0; |
| 1283 |
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 1284 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1285 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1286 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1287 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1288 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1289 |
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 1290 |
var _react2 = _interopRequireDefault(__webpack_require__(/*! elementor-utils/react */ "../assets/dev/js/utils/react.js")); |
| 1291 |
var _emptyComponent = _interopRequireDefault(__webpack_require__(/*! elementor-elements/views/container/empty-component */ "../assets/dev/js/editor/elements/views/container/empty-component.js")); |
| 1292 |
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)); } |
| 1293 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 1294 |
var DivBlockEmptyView = exports["default"] = /*#__PURE__*/function (_Marionette$ItemView) { |
| 1295 |
function DivBlockEmptyView() { |
| 1296 |
var _this; |
| 1297 |
(0, _classCallCheck2.default)(this, DivBlockEmptyView); |
| 1298 |
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| 1299 |
args[_key] = arguments[_key]; |
| 1300 |
} |
| 1301 |
_this = _callSuper(this, DivBlockEmptyView, [].concat(args)); |
| 1302 |
(0, _defineProperty2.default)(_this, "template", '<div></div>'); |
| 1303 |
(0, _defineProperty2.default)(_this, "className", 'elementor-empty-view'); |
| 1304 |
return _this; |
| 1305 |
} |
| 1306 |
(0, _inherits2.default)(DivBlockEmptyView, _Marionette$ItemView); |
| 1307 |
return (0, _createClass2.default)(DivBlockEmptyView, [{ |
| 1308 |
key: "renderReactDefaultElement", |
| 1309 |
value: function renderReactDefaultElement(container) { |
| 1310 |
var _ReactUtils$render = _react2.default.render(/*#__PURE__*/_react.default.createElement(_emptyComponent.default, { |
| 1311 |
container: container |
| 1312 |
}), this.el), |
| 1313 |
unmount = _ReactUtils$render.unmount; |
| 1314 |
this.unmount = unmount; |
| 1315 |
} |
| 1316 |
}, { |
| 1317 |
key: "onRender", |
| 1318 |
value: function onRender() { |
| 1319 |
this.$el.addClass(this.className); |
| 1320 |
this.renderReactDefaultElement(); |
| 1321 |
} |
| 1322 |
}, { |
| 1323 |
key: "onDestroy", |
| 1324 |
value: function onDestroy() { |
| 1325 |
this.unmount(); |
| 1326 |
} |
| 1327 |
}]); |
| 1328 |
}(Marionette.ItemView); |
| 1329 |
|
| 1330 |
/***/ }), |
| 1331 |
|
| 1332 |
/***/ "../modules/atomic-widgets/assets/js/editor/div-block-model.js": |
| 1333 |
/*!*********************************************************************!*\ |
| 1334 |
!*** ../modules/atomic-widgets/assets/js/editor/div-block-model.js ***! |
| 1335 |
\*********************************************************************/ |
| 1336 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1337 |
|
| 1338 |
"use strict"; |
| 1339 |
|
| 1340 |
|
| 1341 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1342 |
Object.defineProperty(exports, "__esModule", ({ |
| 1343 |
value: true |
| 1344 |
})); |
| 1345 |
exports["default"] = void 0; |
| 1346 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1347 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1348 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1349 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1350 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1351 |
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)); } |
| 1352 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 1353 |
var AtomicContainer = exports["default"] = /*#__PURE__*/function (_elementor$modules$el) { |
| 1354 |
function AtomicContainer() { |
| 1355 |
(0, _classCallCheck2.default)(this, AtomicContainer); |
| 1356 |
return _callSuper(this, AtomicContainer, arguments); |
| 1357 |
} |
| 1358 |
(0, _inherits2.default)(AtomicContainer, _elementor$modules$el); |
| 1359 |
return (0, _createClass2.default)(AtomicContainer, [{ |
| 1360 |
key: "isValidChild", |
| 1361 |
value: |
| 1362 |
/** |
| 1363 |
* Do not allow section, column or container be placed in the Atomic container. |
| 1364 |
* |
| 1365 |
* @param {*} childModel |
| 1366 |
*/ |
| 1367 |
function isValidChild(childModel) { |
| 1368 |
var elType = childModel.get('elType'); |
| 1369 |
return 'section' !== elType && 'column' !== elType && 'container' !== elType; |
| 1370 |
} |
| 1371 |
}]); |
| 1372 |
}(elementor.modules.elements.models.Element); |
| 1373 |
|
| 1374 |
/***/ }), |
| 1375 |
|
| 1376 |
/***/ "../modules/atomic-widgets/assets/js/editor/div-block-type.js": |
| 1377 |
/*!********************************************************************!*\ |
| 1378 |
!*** ../modules/atomic-widgets/assets/js/editor/div-block-type.js ***! |
| 1379 |
\********************************************************************/ |
| 1380 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1381 |
|
| 1382 |
"use strict"; |
| 1383 |
|
| 1384 |
|
| 1385 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1386 |
Object.defineProperty(exports, "__esModule", ({ |
| 1387 |
value: true |
| 1388 |
})); |
| 1389 |
exports["default"] = void 0; |
| 1390 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1391 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1392 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1393 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1394 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 1395 |
var _emptyComponent = _interopRequireDefault(__webpack_require__(/*! elementor-elements/views/container/empty-component */ "../assets/dev/js/editor/elements/views/container/empty-component.js")); |
| 1396 |
var _divBlockModel = _interopRequireDefault(__webpack_require__(/*! ./div-block-model */ "../modules/atomic-widgets/assets/js/editor/div-block-model.js")); |
| 1397 |
var _divBlockView = _interopRequireDefault(__webpack_require__(/*! ./div-block-view */ "../modules/atomic-widgets/assets/js/editor/div-block-view.js")); |
| 1398 |
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)); } |
| 1399 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 1400 |
var AtomicContainer = exports["default"] = /*#__PURE__*/function (_elementor$modules$el) { |
| 1401 |
function AtomicContainer() { |
| 1402 |
(0, _classCallCheck2.default)(this, AtomicContainer); |
| 1403 |
return _callSuper(this, AtomicContainer, arguments); |
| 1404 |
} |
| 1405 |
(0, _inherits2.default)(AtomicContainer, _elementor$modules$el); |
| 1406 |
return (0, _createClass2.default)(AtomicContainer, [{ |
| 1407 |
key: "getType", |
| 1408 |
value: function getType() { |
| 1409 |
return 'div-block'; |
| 1410 |
} |
| 1411 |
}, { |
| 1412 |
key: "getView", |
| 1413 |
value: function getView() { |
| 1414 |
return _divBlockView.default; |
| 1415 |
} |
| 1416 |
}, { |
| 1417 |
key: "getEmptyView", |
| 1418 |
value: function getEmptyView() { |
| 1419 |
return _emptyComponent.default; |
| 1420 |
} |
| 1421 |
}, { |
| 1422 |
key: "getModel", |
| 1423 |
value: function getModel() { |
| 1424 |
return _divBlockModel.default; |
| 1425 |
} |
| 1426 |
}]); |
| 1427 |
}(elementor.modules.elements.types.Base); |
| 1428 |
|
| 1429 |
/***/ }), |
| 1430 |
|
| 1431 |
/***/ "../modules/atomic-widgets/assets/js/editor/div-block-view.js": |
| 1432 |
/*!********************************************************************!*\ |
| 1433 |
!*** ../modules/atomic-widgets/assets/js/editor/div-block-view.js ***! |
| 1434 |
\********************************************************************/ |
| 1435 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1436 |
|
| 1437 |
"use strict"; |
| 1438 |
/* provided dependency */ var sprintf = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["sprintf"]; |
| 1439 |
/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; |
| 1440 |
|
| 1441 |
|
| 1442 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 1443 |
var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); |
| 1444 |
var _divBlockEmptyView = _interopRequireDefault(__webpack_require__(/*! ./container/div-block-empty-view */ "../modules/atomic-widgets/assets/js/editor/container/div-block-empty-view.js")); |
| 1445 |
var BaseElementView = elementor.modules.elements.views.BaseElement; |
| 1446 |
var DivBlockView = BaseElementView.extend({ |
| 1447 |
template: Marionette.TemplateCache.get('#tmpl-elementor-div-block-content'), |
| 1448 |
emptyView: _divBlockEmptyView.default, |
| 1449 |
tagName: function tagName() { |
| 1450 |
return this.model.getSetting('tag') || 'div'; |
| 1451 |
}, |
| 1452 |
getChildViewContainer: function getChildViewContainer() { |
| 1453 |
this.childViewContainer = ''; |
| 1454 |
return Marionette.CompositeView.prototype.getChildViewContainer.apply(this, arguments); |
| 1455 |
}, |
| 1456 |
className: function className() { |
| 1457 |
return "".concat(BaseElementView.prototype.className.apply(this), " e-con e-div-block").concat(this.getClassString()); |
| 1458 |
}, |
| 1459 |
// TODO: Copied from `views/column.js`. |
| 1460 |
ui: function ui() { |
| 1461 |
var ui = BaseElementView.prototype.ui.apply(this, arguments); |
| 1462 |
ui.percentsTooltip = '> .elementor-element-overlay .elementor-column-percents-tooltip'; |
| 1463 |
return ui; |
| 1464 |
}, |
| 1465 |
// TODO: Copied from `views/column.js`. |
| 1466 |
attachElContent: function attachElContent() { |
| 1467 |
BaseElementView.prototype.attachElContent.apply(this, arguments); |
| 1468 |
var $tooltip = jQuery('<div>', { |
| 1469 |
class: 'elementor-column-percents-tooltip', |
| 1470 |
'data-side': elementorCommon.config.isRTL ? 'right' : 'left' |
| 1471 |
}); |
| 1472 |
this.$el.children('.elementor-element-overlay').append($tooltip); |
| 1473 |
}, |
| 1474 |
// TODO: Copied from `views/column.js`. |
| 1475 |
getPercentSize: function getPercentSize(size) { |
| 1476 |
if (!size) { |
| 1477 |
size = this.el.getBoundingClientRect().width; |
| 1478 |
} |
| 1479 |
return +(size / this.$el.parent().width() * 100).toFixed(3); |
| 1480 |
}, |
| 1481 |
// TODO: Copied from `views/column.js`. |
| 1482 |
getPercentsForDisplay: function getPercentsForDisplay() { |
| 1483 |
var width = +this.model.getSetting('width') || this.getPercentSize(); |
| 1484 |
return width.toFixed(1) + '%'; |
| 1485 |
}, |
| 1486 |
renderOnChange: function renderOnChange() { |
| 1487 |
BaseElementView.prototype.renderOnChange.apply(this, arguments); |
| 1488 |
this.$el.addClass(this.getClasses()); |
| 1489 |
}, |
| 1490 |
onRender: function onRender() { |
| 1491 |
var _this = this; |
| 1492 |
BaseElementView.prototype.onRender.apply(this, arguments); |
| 1493 |
|
| 1494 |
// Defer to wait for everything to render. |
| 1495 |
setTimeout(function () { |
| 1496 |
_this.droppableInitialize(); |
| 1497 |
}); |
| 1498 |
}, |
| 1499 |
droppableInitialize: function droppableInitialize() { |
| 1500 |
this.$el.html5Droppable(this.getDroppableOptions()); |
| 1501 |
}, |
| 1502 |
isDroppingAllowed: function isDroppingAllowed() { |
| 1503 |
return true; |
| 1504 |
}, |
| 1505 |
behaviors: function behaviors() { |
| 1506 |
var behaviors = BaseElementView.prototype.behaviors.apply(this, arguments); |
| 1507 |
_.extend(behaviors, { |
| 1508 |
Sortable: { |
| 1509 |
behaviorClass: __webpack_require__(/*! elementor-behaviors/sortable */ "../assets/dev/js/editor/elements/views/behaviors/sortable.js"), |
| 1510 |
elChildType: 'widget' |
| 1511 |
} |
| 1512 |
}); |
| 1513 |
return elementor.hooks.applyFilters('elements/div-block/behaviors', behaviors, this); |
| 1514 |
}, |
| 1515 |
/** |
| 1516 |
* @return {{}} options |
| 1517 |
*/ |
| 1518 |
getSortableOptions: function getSortableOptions() { |
| 1519 |
return { |
| 1520 |
preventInit: true |
| 1521 |
}; |
| 1522 |
}, |
| 1523 |
getDroppableOptions: function getDroppableOptions() { |
| 1524 |
var _this2 = this; |
| 1525 |
var items = '> .elementor-element, > .elementor-empty-view .elementor-first-add'; |
| 1526 |
return { |
| 1527 |
items: items, |
| 1528 |
groups: ['elementor-element'], |
| 1529 |
horizontalThreshold: 5, |
| 1530 |
isDroppingAllowed: this.isDroppingAllowed.bind(this), |
| 1531 |
currentElementClass: 'elementor-html5dnd-current-element', |
| 1532 |
placeholderClass: 'elementor-sortable-placeholder elementor-widget-placeholder', |
| 1533 |
hasDraggingOnChildClass: 'e-dragging-over', |
| 1534 |
getDropContainer: function getDropContainer() { |
| 1535 |
return _this2.getContainer(); |
| 1536 |
}, |
| 1537 |
onDropping: function onDropping(side, event) { |
| 1538 |
event.stopPropagation(); |
| 1539 |
|
| 1540 |
// Triggering drag end manually, since it won't fired above iframe |
| 1541 |
elementor.getPreviewView().onPanelElementDragEnd(); |
| 1542 |
var draggedView = elementor.channels.editor.request('element:dragged'), |
| 1543 |
draggingInSameParent = (draggedView === null || draggedView === void 0 ? void 0 : draggedView.parent) === _this2, |
| 1544 |
containerSelector = event.currentTarget.parentElement; |
| 1545 |
var $elements = jQuery(containerSelector).find('> .elementor-element'); |
| 1546 |
|
| 1547 |
// Exclude the dragged element from the indexing calculations. |
| 1548 |
if (draggingInSameParent) { |
| 1549 |
$elements = $elements.not(draggedView.$el); |
| 1550 |
} |
| 1551 |
var widgetsArray = Object.values($elements); |
| 1552 |
var newIndex = widgetsArray.indexOf(event.currentTarget); |
| 1553 |
|
| 1554 |
// Plus one in order to insert it after the current target element. |
| 1555 |
if (_this2.shouldIncrementIndex(side)) { |
| 1556 |
newIndex++; |
| 1557 |
} |
| 1558 |
|
| 1559 |
// User is sorting inside a Container. |
| 1560 |
if (draggedView) { |
| 1561 |
// Prevent the user from dragging a parent container into its own child container |
| 1562 |
var draggedId = draggedView.getContainer().id; |
| 1563 |
var currentTargetParentContainer = _this2.container; |
| 1564 |
while (currentTargetParentContainer) { |
| 1565 |
if (currentTargetParentContainer.id === draggedId) { |
| 1566 |
return; |
| 1567 |
} |
| 1568 |
currentTargetParentContainer = currentTargetParentContainer.parent; |
| 1569 |
} |
| 1570 |
|
| 1571 |
// Reset the dragged element cache. |
| 1572 |
elementor.channels.editor.reply('element:dragged', null); |
| 1573 |
$e.run('document/elements/move', { |
| 1574 |
container: draggedView.getContainer(), |
| 1575 |
target: _this2.getContainer(), |
| 1576 |
options: { |
| 1577 |
at: newIndex |
| 1578 |
} |
| 1579 |
}); |
| 1580 |
return; |
| 1581 |
} |
| 1582 |
|
| 1583 |
// User is dragging an element from the panel. |
| 1584 |
_this2.onDrop(event, { |
| 1585 |
at: newIndex |
| 1586 |
}); |
| 1587 |
} |
| 1588 |
}; |
| 1589 |
}, |
| 1590 |
getEditButtons: function getEditButtons() { |
| 1591 |
var elementData = elementor.getElementData(this.model), |
| 1592 |
editTools = {}; |
| 1593 |
if ($e.components.get('document/elements').utils.allowAddingWidgets()) { |
| 1594 |
editTools.add = { |
| 1595 |
/* Translators: %s: Element Name. */ |
| 1596 |
title: sprintf(__('Add %s', 'elementor'), elementData.title), |
| 1597 |
icon: 'plus' |
| 1598 |
}; |
| 1599 |
editTools.edit = { |
| 1600 |
/* Translators: %s: Element Name. */ |
| 1601 |
title: sprintf(__('Edit %s', 'elementor'), elementData.title), |
| 1602 |
icon: 'handle' |
| 1603 |
}; |
| 1604 |
} |
| 1605 |
if (!this.getContainer().isLocked()) { |
| 1606 |
if (elementor.getPreferences('edit_buttons') && $e.components.get('document/elements').utils.allowAddingWidgets()) { |
| 1607 |
editTools.duplicate = { |
| 1608 |
/* Translators: %s: Element Name. */ |
| 1609 |
title: sprintf(__('Duplicate %s', 'elementor'), elementData.title), |
| 1610 |
icon: 'clone' |
| 1611 |
}; |
| 1612 |
} |
| 1613 |
editTools.remove = { |
| 1614 |
/* Translators: %s: Element Name. */ |
| 1615 |
title: sprintf(__('Delete %s', 'elementor'), elementData.title), |
| 1616 |
icon: 'close' |
| 1617 |
}; |
| 1618 |
} |
| 1619 |
return editTools; |
| 1620 |
}, |
| 1621 |
shouldIncrementIndex: function shouldIncrementIndex(side) { |
| 1622 |
if (!this.draggingOnBottomOrRightSide(side)) { |
| 1623 |
return false; |
| 1624 |
} |
| 1625 |
return !this.emptyViewIsCurrentlyBeingDraggedOver(); |
| 1626 |
}, |
| 1627 |
draggingOnBottomOrRightSide: function draggingOnBottomOrRightSide(side) { |
| 1628 |
return ['bottom', 'right'].includes(side); |
| 1629 |
}, |
| 1630 |
emptyViewIsCurrentlyBeingDraggedOver: function emptyViewIsCurrentlyBeingDraggedOver() { |
| 1631 |
return this.$el.find('> .elementor-empty-view > .elementor-first-add.elementor-html5dnd-current-element').length > 0; |
| 1632 |
}, |
| 1633 |
/** |
| 1634 |
* Toggle the `New Section` view when clicking the `add` button in the edit tools. |
| 1635 |
* |
| 1636 |
* @return {void} |
| 1637 |
*/ |
| 1638 |
onAddButtonClick: function onAddButtonClick() { |
| 1639 |
if (this.addSectionView && !this.addSectionView.isDestroyed) { |
| 1640 |
this.addSectionView.fadeToDeath(); |
| 1641 |
return; |
| 1642 |
} |
| 1643 |
var addSectionView = new elementor.modules.elements.components.AddSectionView({ |
| 1644 |
at: this.model.collection.indexOf(this.model) |
| 1645 |
}); |
| 1646 |
addSectionView.render(); |
| 1647 |
this.$el.before(addSectionView.$el); |
| 1648 |
addSectionView.$el.hide(); |
| 1649 |
|
| 1650 |
// Delaying the slide down for slow-render browsers (such as FF) |
| 1651 |
setTimeout(function () { |
| 1652 |
addSectionView.$el.slideDown(null, function () { |
| 1653 |
// Remove inline style, for preview mode. |
| 1654 |
jQuery(this).css('display', ''); |
| 1655 |
}); |
| 1656 |
}); |
| 1657 |
this.addSectionView = addSectionView; |
| 1658 |
}, |
| 1659 |
getClasses: function getClasses() { |
| 1660 |
var _this$options; |
| 1661 |
return ((_this$options = this.options) === null || _this$options === void 0 || (_this$options = _this$options.model) === null || _this$options === void 0 || (_this$options = _this$options.getSetting('classes')) === null || _this$options === void 0 ? void 0 : _this$options.value) || []; |
| 1662 |
}, |
| 1663 |
getClassString: function getClassString() { |
| 1664 |
var classes = this.getClasses(); |
| 1665 |
return classes.length ? [''].concat((0, _toConsumableArray2.default)(classes)).join(' ') : ''; |
| 1666 |
} |
| 1667 |
}); |
| 1668 |
module.exports = DivBlockView; |
| 1669 |
|
| 1670 |
/***/ }), |
| 1671 |
|
| 1672 |
/***/ "../modules/atomic-widgets/assets/js/editor/utils/get-variants.js": |
| 1673 |
/*!************************************************************************!*\ |
| 1674 |
!*** ../modules/atomic-widgets/assets/js/editor/utils/get-variants.js ***! |
| 1675 |
\************************************************************************/ |
| 1676 |
/***/ ((__unused_webpack_module, exports) => { |
| 1677 |
|
| 1678 |
"use strict"; |
| 1679 |
|
| 1680 |
|
| 1681 |
Object.defineProperty(exports, "__esModule", ({ |
| 1682 |
value: true |
| 1683 |
})); |
| 1684 |
exports.getVariantByMeta = getVariantByMeta; |
| 1685 |
exports.getVariantsWithoutMeta = getVariantsWithoutMeta; |
| 1686 |
function getVariantByMeta(variants, meta) { |
| 1687 |
return variants.find(function (variant) { |
| 1688 |
return variant.meta.breakpoint === meta.breakpoint && variant.meta.state === meta.state; |
| 1689 |
}); |
| 1690 |
} |
| 1691 |
function getVariantsWithoutMeta(variants, meta) { |
| 1692 |
return variants.filter(function (variant) { |
| 1693 |
return variant.meta.breakpoint !== meta.breakpoint || variant.meta.state !== meta.state; |
| 1694 |
}); |
| 1695 |
} |
| 1696 |
|
| 1697 |
/***/ }), |
| 1698 |
|
| 1699 |
/***/ "../node_modules/react-dom/client.js": |
| 1700 |
/*!*******************************************!*\ |
| 1701 |
!*** ../node_modules/react-dom/client.js ***! |
| 1702 |
\*******************************************/ |
| 1703 |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 1704 |
|
| 1705 |
"use strict"; |
| 1706 |
|
| 1707 |
|
| 1708 |
var m = __webpack_require__(/*! react-dom */ "react-dom"); |
| 1709 |
if (false) {} else { |
| 1710 |
var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; |
| 1711 |
exports.createRoot = function(c, o) { |
| 1712 |
i.usingClientEntryPoint = true; |
| 1713 |
try { |
| 1714 |
return m.createRoot(c, o); |
| 1715 |
} finally { |
| 1716 |
i.usingClientEntryPoint = false; |
| 1717 |
} |
| 1718 |
}; |
| 1719 |
exports.hydrateRoot = function(c, h, o) { |
| 1720 |
i.usingClientEntryPoint = true; |
| 1721 |
try { |
| 1722 |
return m.hydrateRoot(c, h, o); |
| 1723 |
} finally { |
| 1724 |
i.usingClientEntryPoint = false; |
| 1725 |
} |
| 1726 |
}; |
| 1727 |
} |
| 1728 |
|
| 1729 |
|
| 1730 |
/***/ }), |
| 1731 |
|
| 1732 |
/***/ "react": |
| 1733 |
/*!************************!*\ |
| 1734 |
!*** external "React" ***! |
| 1735 |
\************************/ |
| 1736 |
/***/ ((module) => { |
| 1737 |
|
| 1738 |
"use strict"; |
| 1739 |
module.exports = React; |
| 1740 |
|
| 1741 |
/***/ }), |
| 1742 |
|
| 1743 |
/***/ "react-dom": |
| 1744 |
/*!***************************!*\ |
| 1745 |
!*** external "ReactDOM" ***! |
| 1746 |
\***************************/ |
| 1747 |
/***/ ((module) => { |
| 1748 |
|
| 1749 |
"use strict"; |
| 1750 |
module.exports = ReactDOM; |
| 1751 |
|
| 1752 |
/***/ }), |
| 1753 |
|
| 1754 |
/***/ "@wordpress/i18n": |
| 1755 |
/*!**************************!*\ |
| 1756 |
!*** external "wp.i18n" ***! |
| 1757 |
\**************************/ |
| 1758 |
/***/ ((module) => { |
| 1759 |
|
| 1760 |
"use strict"; |
| 1761 |
module.exports = wp.i18n; |
| 1762 |
|
| 1763 |
/***/ }), |
| 1764 |
|
| 1765 |
/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": |
| 1766 |
/*!******************************************************************!*\ |
| 1767 |
!*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! |
| 1768 |
\******************************************************************/ |
| 1769 |
/***/ ((module) => { |
| 1770 |
|
| 1771 |
function _arrayLikeToArray(r, a) { |
| 1772 |
(null == a || a > r.length) && (a = r.length); |
| 1773 |
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; |
| 1774 |
return n; |
| 1775 |
} |
| 1776 |
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1777 |
|
| 1778 |
/***/ }), |
| 1779 |
|
| 1780 |
/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": |
| 1781 |
/*!****************************************************************!*\ |
| 1782 |
!*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! |
| 1783 |
\****************************************************************/ |
| 1784 |
/***/ ((module) => { |
| 1785 |
|
| 1786 |
function _arrayWithHoles(r) { |
| 1787 |
if (Array.isArray(r)) return r; |
| 1788 |
} |
| 1789 |
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1790 |
|
| 1791 |
/***/ }), |
| 1792 |
|
| 1793 |
/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": |
| 1794 |
/*!*******************************************************************!*\ |
| 1795 |
!*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! |
| 1796 |
\*******************************************************************/ |
| 1797 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1798 |
|
| 1799 |
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); |
| 1800 |
function _arrayWithoutHoles(r) { |
| 1801 |
if (Array.isArray(r)) return arrayLikeToArray(r); |
| 1802 |
} |
| 1803 |
module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1804 |
|
| 1805 |
/***/ }), |
| 1806 |
|
| 1807 |
/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": |
| 1808 |
/*!***********************************************************************!*\ |
| 1809 |
!*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! |
| 1810 |
\***********************************************************************/ |
| 1811 |
/***/ ((module) => { |
| 1812 |
|
| 1813 |
function _assertThisInitialized(e) { |
| 1814 |
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); |
| 1815 |
return e; |
| 1816 |
} |
| 1817 |
module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1818 |
|
| 1819 |
/***/ }), |
| 1820 |
|
| 1821 |
/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": |
| 1822 |
/*!****************************************************************!*\ |
| 1823 |
!*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! |
| 1824 |
\****************************************************************/ |
| 1825 |
/***/ ((module) => { |
| 1826 |
|
| 1827 |
function _classCallCheck(a, n) { |
| 1828 |
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); |
| 1829 |
} |
| 1830 |
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1831 |
|
| 1832 |
/***/ }), |
| 1833 |
|
| 1834 |
/***/ "../node_modules/@babel/runtime/helpers/createClass.js": |
| 1835 |
/*!*************************************************************!*\ |
| 1836 |
!*** ../node_modules/@babel/runtime/helpers/createClass.js ***! |
| 1837 |
\*************************************************************/ |
| 1838 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1839 |
|
| 1840 |
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); |
| 1841 |
function _defineProperties(e, r) { |
| 1842 |
for (var t = 0; t < r.length; t++) { |
| 1843 |
var o = r[t]; |
| 1844 |
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); |
| 1845 |
} |
| 1846 |
} |
| 1847 |
function _createClass(e, r, t) { |
| 1848 |
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { |
| 1849 |
writable: !1 |
| 1850 |
}), e; |
| 1851 |
} |
| 1852 |
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1853 |
|
| 1854 |
/***/ }), |
| 1855 |
|
| 1856 |
/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": |
| 1857 |
/*!****************************************************************!*\ |
| 1858 |
!*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! |
| 1859 |
\****************************************************************/ |
| 1860 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1861 |
|
| 1862 |
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); |
| 1863 |
function _defineProperty(e, r, t) { |
| 1864 |
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { |
| 1865 |
value: t, |
| 1866 |
enumerable: !0, |
| 1867 |
configurable: !0, |
| 1868 |
writable: !0 |
| 1869 |
}) : e[r] = t, e; |
| 1870 |
} |
| 1871 |
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1872 |
|
| 1873 |
/***/ }), |
| 1874 |
|
| 1875 |
/***/ "../node_modules/@babel/runtime/helpers/get.js": |
| 1876 |
/*!*****************************************************!*\ |
| 1877 |
!*** ../node_modules/@babel/runtime/helpers/get.js ***! |
| 1878 |
\*****************************************************/ |
| 1879 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1880 |
|
| 1881 |
var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js"); |
| 1882 |
function _get() { |
| 1883 |
return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { |
| 1884 |
var p = superPropBase(e, t); |
| 1885 |
if (p) { |
| 1886 |
var n = Object.getOwnPropertyDescriptor(p, t); |
| 1887 |
return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; |
| 1888 |
} |
| 1889 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments); |
| 1890 |
} |
| 1891 |
module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1892 |
|
| 1893 |
/***/ }), |
| 1894 |
|
| 1895 |
/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": |
| 1896 |
/*!****************************************************************!*\ |
| 1897 |
!*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! |
| 1898 |
\****************************************************************/ |
| 1899 |
/***/ ((module) => { |
| 1900 |
|
| 1901 |
function _getPrototypeOf(t) { |
| 1902 |
return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { |
| 1903 |
return t.__proto__ || Object.getPrototypeOf(t); |
| 1904 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); |
| 1905 |
} |
| 1906 |
module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1907 |
|
| 1908 |
/***/ }), |
| 1909 |
|
| 1910 |
/***/ "../node_modules/@babel/runtime/helpers/inherits.js": |
| 1911 |
/*!**********************************************************!*\ |
| 1912 |
!*** ../node_modules/@babel/runtime/helpers/inherits.js ***! |
| 1913 |
\**********************************************************/ |
| 1914 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 1915 |
|
| 1916 |
var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); |
| 1917 |
function _inherits(t, e) { |
| 1918 |
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); |
| 1919 |
t.prototype = Object.create(e && e.prototype, { |
| 1920 |
constructor: { |
| 1921 |
value: t, |
| 1922 |
writable: !0, |
| 1923 |
configurable: !0 |
| 1924 |
} |
| 1925 |
}), Object.defineProperty(t, "prototype", { |
| 1926 |
writable: !1 |
| 1927 |
}), e && setPrototypeOf(t, e); |
| 1928 |
} |
| 1929 |
module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1930 |
|
| 1931 |
/***/ }), |
| 1932 |
|
| 1933 |
/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": |
| 1934 |
/*!***********************************************************************!*\ |
| 1935 |
!*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! |
| 1936 |
\***********************************************************************/ |
| 1937 |
/***/ ((module) => { |
| 1938 |
|
| 1939 |
function _interopRequireDefault(e) { |
| 1940 |
return e && e.__esModule ? e : { |
| 1941 |
"default": e |
| 1942 |
}; |
| 1943 |
} |
| 1944 |
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1945 |
|
| 1946 |
/***/ }), |
| 1947 |
|
| 1948 |
/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js": |
| 1949 |
/*!*****************************************************************!*\ |
| 1950 |
!*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***! |
| 1951 |
\*****************************************************************/ |
| 1952 |
/***/ ((module) => { |
| 1953 |
|
| 1954 |
function _iterableToArray(r) { |
| 1955 |
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); |
| 1956 |
} |
| 1957 |
module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1958 |
|
| 1959 |
/***/ }), |
| 1960 |
|
| 1961 |
/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": |
| 1962 |
/*!**********************************************************************!*\ |
| 1963 |
!*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! |
| 1964 |
\**********************************************************************/ |
| 1965 |
/***/ ((module) => { |
| 1966 |
|
| 1967 |
function _iterableToArrayLimit(r, l) { |
| 1968 |
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; |
| 1969 |
if (null != t) { |
| 1970 |
var e, |
| 1971 |
n, |
| 1972 |
i, |
| 1973 |
u, |
| 1974 |
a = [], |
| 1975 |
f = !0, |
| 1976 |
o = !1; |
| 1977 |
try { |
| 1978 |
if (i = (t = t.call(r)).next, 0 === l) { |
| 1979 |
if (Object(t) !== t) return; |
| 1980 |
f = !1; |
| 1981 |
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); |
| 1982 |
} catch (r) { |
| 1983 |
o = !0, n = r; |
| 1984 |
} finally { |
| 1985 |
try { |
| 1986 |
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; |
| 1987 |
} finally { |
| 1988 |
if (o) throw n; |
| 1989 |
} |
| 1990 |
} |
| 1991 |
return a; |
| 1992 |
} |
| 1993 |
} |
| 1994 |
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 1995 |
|
| 1996 |
/***/ }), |
| 1997 |
|
| 1998 |
/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": |
| 1999 |
/*!*****************************************************************!*\ |
| 2000 |
!*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! |
| 2001 |
\*****************************************************************/ |
| 2002 |
/***/ ((module) => { |
| 2003 |
|
| 2004 |
function _nonIterableRest() { |
| 2005 |
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 2006 |
} |
| 2007 |
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2008 |
|
| 2009 |
/***/ }), |
| 2010 |
|
| 2011 |
/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js": |
| 2012 |
/*!*******************************************************************!*\ |
| 2013 |
!*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! |
| 2014 |
\*******************************************************************/ |
| 2015 |
/***/ ((module) => { |
| 2016 |
|
| 2017 |
function _nonIterableSpread() { |
| 2018 |
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); |
| 2019 |
} |
| 2020 |
module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2021 |
|
| 2022 |
/***/ }), |
| 2023 |
|
| 2024 |
/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": |
| 2025 |
/*!***************************************************************************!*\ |
| 2026 |
!*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! |
| 2027 |
\***************************************************************************/ |
| 2028 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2029 |
|
| 2030 |
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 2031 |
var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); |
| 2032 |
function _possibleConstructorReturn(t, e) { |
| 2033 |
if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; |
| 2034 |
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); |
| 2035 |
return assertThisInitialized(t); |
| 2036 |
} |
| 2037 |
module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2038 |
|
| 2039 |
/***/ }), |
| 2040 |
|
| 2041 |
/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": |
| 2042 |
/*!****************************************************************!*\ |
| 2043 |
!*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! |
| 2044 |
\****************************************************************/ |
| 2045 |
/***/ ((module) => { |
| 2046 |
|
| 2047 |
function _setPrototypeOf(t, e) { |
| 2048 |
return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { |
| 2049 |
return t.__proto__ = e, t; |
| 2050 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); |
| 2051 |
} |
| 2052 |
module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2053 |
|
| 2054 |
/***/ }), |
| 2055 |
|
| 2056 |
/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": |
| 2057 |
/*!***************************************************************!*\ |
| 2058 |
!*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! |
| 2059 |
\***************************************************************/ |
| 2060 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2061 |
|
| 2062 |
var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); |
| 2063 |
var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); |
| 2064 |
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); |
| 2065 |
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); |
| 2066 |
function _slicedToArray(r, e) { |
| 2067 |
return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); |
| 2068 |
} |
| 2069 |
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2070 |
|
| 2071 |
/***/ }), |
| 2072 |
|
| 2073 |
/***/ "../node_modules/@babel/runtime/helpers/superPropBase.js": |
| 2074 |
/*!***************************************************************!*\ |
| 2075 |
!*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***! |
| 2076 |
\***************************************************************/ |
| 2077 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2078 |
|
| 2079 |
var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); |
| 2080 |
function _superPropBase(t, o) { |
| 2081 |
for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); |
| 2082 |
return t; |
| 2083 |
} |
| 2084 |
module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2085 |
|
| 2086 |
/***/ }), |
| 2087 |
|
| 2088 |
/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js": |
| 2089 |
/*!*******************************************************************!*\ |
| 2090 |
!*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***! |
| 2091 |
\*******************************************************************/ |
| 2092 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2093 |
|
| 2094 |
var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); |
| 2095 |
var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js"); |
| 2096 |
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); |
| 2097 |
var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js"); |
| 2098 |
function _toConsumableArray(r) { |
| 2099 |
return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); |
| 2100 |
} |
| 2101 |
module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2102 |
|
| 2103 |
/***/ }), |
| 2104 |
|
| 2105 |
/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": |
| 2106 |
/*!*************************************************************!*\ |
| 2107 |
!*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! |
| 2108 |
\*************************************************************/ |
| 2109 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2110 |
|
| 2111 |
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 2112 |
function toPrimitive(t, r) { |
| 2113 |
if ("object" != _typeof(t) || !t) return t; |
| 2114 |
var e = t[Symbol.toPrimitive]; |
| 2115 |
if (void 0 !== e) { |
| 2116 |
var i = e.call(t, r || "default"); |
| 2117 |
if ("object" != _typeof(i)) return i; |
| 2118 |
throw new TypeError("@@toPrimitive must return a primitive value."); |
| 2119 |
} |
| 2120 |
return ("string" === r ? String : Number)(t); |
| 2121 |
} |
| 2122 |
module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2123 |
|
| 2124 |
/***/ }), |
| 2125 |
|
| 2126 |
/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": |
| 2127 |
/*!***************************************************************!*\ |
| 2128 |
!*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! |
| 2129 |
\***************************************************************/ |
| 2130 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2131 |
|
| 2132 |
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 2133 |
var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); |
| 2134 |
function toPropertyKey(t) { |
| 2135 |
var i = toPrimitive(t, "string"); |
| 2136 |
return "symbol" == _typeof(i) ? i : i + ""; |
| 2137 |
} |
| 2138 |
module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2139 |
|
| 2140 |
/***/ }), |
| 2141 |
|
| 2142 |
/***/ "../node_modules/@babel/runtime/helpers/typeof.js": |
| 2143 |
/*!********************************************************!*\ |
| 2144 |
!*** ../node_modules/@babel/runtime/helpers/typeof.js ***! |
| 2145 |
\********************************************************/ |
| 2146 |
/***/ ((module) => { |
| 2147 |
|
| 2148 |
function _typeof(o) { |
| 2149 |
"@babel/helpers - typeof"; |
| 2150 |
|
| 2151 |
return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { |
| 2152 |
return typeof o; |
| 2153 |
} : function (o) { |
| 2154 |
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; |
| 2155 |
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); |
| 2156 |
} |
| 2157 |
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2158 |
|
| 2159 |
/***/ }), |
| 2160 |
|
| 2161 |
/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": |
| 2162 |
/*!****************************************************************************!*\ |
| 2163 |
!*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! |
| 2164 |
\****************************************************************************/ |
| 2165 |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2166 |
|
| 2167 |
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); |
| 2168 |
function _unsupportedIterableToArray(r, a) { |
| 2169 |
if (r) { |
| 2170 |
if ("string" == typeof r) return arrayLikeToArray(r, a); |
| 2171 |
var t = {}.toString.call(r).slice(8, -1); |
| 2172 |
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; |
| 2173 |
} |
| 2174 |
} |
| 2175 |
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2176 |
|
| 2177 |
/***/ }) |
| 2178 |
|
| 2179 |
/******/ }); |
| 2180 |
/************************************************************************/ |
| 2181 |
/******/ // The module cache |
| 2182 |
/******/ var __webpack_module_cache__ = {}; |
| 2183 |
/******/ |
| 2184 |
/******/ // The require function |
| 2185 |
/******/ function __webpack_require__(moduleId) { |
| 2186 |
/******/ // Check if module is in cache |
| 2187 |
/******/ var cachedModule = __webpack_module_cache__[moduleId]; |
| 2188 |
/******/ if (cachedModule !== undefined) { |
| 2189 |
/******/ return cachedModule.exports; |
| 2190 |
/******/ } |
| 2191 |
/******/ // Create a new module (and put it into the cache) |
| 2192 |
/******/ var module = __webpack_module_cache__[moduleId] = { |
| 2193 |
/******/ // no module.id needed |
| 2194 |
/******/ // no module.loaded needed |
| 2195 |
/******/ exports: {} |
| 2196 |
/******/ }; |
| 2197 |
/******/ |
| 2198 |
/******/ // Execute the module function |
| 2199 |
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); |
| 2200 |
/******/ |
| 2201 |
/******/ // Return the exports of the module |
| 2202 |
/******/ return module.exports; |
| 2203 |
/******/ } |
| 2204 |
/******/ |
| 2205 |
/************************************************************************/ |
| 2206 |
var __webpack_exports__ = {}; |
| 2207 |
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. |
| 2208 |
(() => { |
| 2209 |
"use strict"; |
| 2210 |
/*!************************************************************!*\ |
| 2211 |
!*** ../modules/atomic-widgets/assets/js/editor/module.js ***! |
| 2212 |
\************************************************************/ |
| 2213 |
|
| 2214 |
|
| 2215 |
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 2216 |
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 2217 |
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2218 |
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2219 |
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 2220 |
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 2221 |
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 2222 |
var _component = _interopRequireDefault(__webpack_require__(/*! ./component */ "../modules/atomic-widgets/assets/js/editor/component.js")); |
| 2223 |
var _atomicWidgetType = __webpack_require__(/*! ./atomic-widget-type */ "../modules/atomic-widgets/assets/js/editor/atomic-widget-type.js"); |
| 2224 |
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)); } |
| 2225 |
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 2226 |
var Module = /*#__PURE__*/function (_elementorModules$edi) { |
| 2227 |
function Module() { |
| 2228 |
(0, _classCallCheck2.default)(this, Module); |
| 2229 |
return _callSuper(this, Module, arguments); |
| 2230 |
} |
| 2231 |
(0, _inherits2.default)(Module, _elementorModules$edi); |
| 2232 |
return (0, _createClass2.default)(Module, [{ |
| 2233 |
key: "onInit", |
| 2234 |
value: function onInit() { |
| 2235 |
$e.components.register(new _component.default()); |
| 2236 |
this.registerAtomicWidgetTypes(); |
| 2237 |
} |
| 2238 |
}, { |
| 2239 |
key: "registerAtomicWidgetTypes", |
| 2240 |
value: function registerAtomicWidgetTypes() { |
| 2241 |
var _elementor$widgetsCac; |
| 2242 |
Object.entries((_elementor$widgetsCac = elementor.widgetsCache) !== null && _elementor$widgetsCac !== void 0 ? _elementor$widgetsCac : {}).filter(function (_ref) { |
| 2243 |
var _ref2 = (0, _slicedToArray2.default)(_ref, 2), |
| 2244 |
widget = _ref2[1]; |
| 2245 |
return !!widget.atomic; |
| 2246 |
}).forEach(function (_ref3) { |
| 2247 |
var _ref4 = (0, _slicedToArray2.default)(_ref3, 1), |
| 2248 |
type = _ref4[0]; |
| 2249 |
return elementor.elementsManager.registerElementType(new _atomicWidgetType.AtomicWidgetType(type)); |
| 2250 |
}); |
| 2251 |
this.registerAtomicDivBlockType(); |
| 2252 |
} |
| 2253 |
}, { |
| 2254 |
key: "registerAtomicDivBlockType", |
| 2255 |
value: function registerAtomicDivBlockType() { |
| 2256 |
var DivBlock = (__webpack_require__(/*! ./div-block-type */ "../modules/atomic-widgets/assets/js/editor/div-block-type.js")["default"]); |
| 2257 |
elementor.elementsManager.registerElementType(new DivBlock()); |
| 2258 |
} |
| 2259 |
}]); |
| 2260 |
}(elementorModules.editor.utils.Module); |
| 2261 |
new Module(); |
| 2262 |
})(); |
| 2263 |
|
| 2264 |
/******/ })() |
| 2265 |
; |
| 2266 |
//# sourceMappingURL=atomic-widgets-editor.js.map |