PluginProbe
Elementor Website Builder – more than just a page builder / 3.8.0
Elementor Website Builder – more than just a page builder v3.8.0
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / assets / js / editor-modules.js

editor-modules.js in Elementor Website Builder – more than just a page builder 3.8.0, at assets/js/editor-modules.js

2,890 lines 100.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.8.0 - 30-10-2022 */
2 /******/ (() => { // webpackBootstrap
3 /******/ var __webpack_modules__ = ({
4
5 /***/ "../assets/dev/js/editor/container/container.js":
6 /*!******************************************************!*\
7 !*** ../assets/dev/js/editor/container/container.js ***!
8 \******************************************************/
9 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10
11 "use strict";
12 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
13
14
15 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
16
17 Object.defineProperty(exports, "__esModule", ({
18 value: true
19 }));
20 exports["default"] = void 0;
21
22 var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
23
24 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
25
26 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
27
28 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
29
30 var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
31
32 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
33
34 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
35
36 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
37
38 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
39
40 var _argsObject = _interopRequireDefault(__webpack_require__(/*! ../../modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js"));
41
42 var _panel = _interopRequireDefault(__webpack_require__(/*! ./panel */ "../assets/dev/js/editor/container/panel.js"));
43
44 var _childrenArray = _interopRequireDefault(__webpack_require__(/*! ./model/children-array */ "../assets/dev/js/editor/container/model/children-array.js"));
45
46 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
47
48 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
49
50 /**
51 * @typedef {import('../../../../lib/backbone/backbone.marionette')} Backbone
52 * @typedef {import('../../../../lib/backbone/backbone.marionette')} Marionette
53 * @typedef {import('../elements/views/base')} BaseElementView
54 * @typedef {import('../elements/views/section')} SectionView
55 * @typedef {import('../views/base-container')} BaseContainer
56 * @typedef {import('../elements/models/base-element-model')} BaseElementModel
57 */
58
59 /**
60 * TODO: ViewsOptions
61 *
62 * @typedef {(Marionette.View|Marionette.CompositeView|BaseElementView|SectionView|BaseContainer)} ViewsOptions
63 */
64 var Container = /*#__PURE__*/function (_ArgsObject) {
65 (0, _inherits2.default)(Container, _ArgsObject);
66
67 var _super = _createSuper(Container);
68
69 // TODO: Swap those backwards compatibility is required.
70
71 /**
72 * Container type.
73 *
74 * @type {string}
75 */
76
77 /**
78 * Container id.
79 *
80 * @type {string}
81 */
82
83 /**
84 * Document Object.
85 *
86 * @type {{}}
87 */
88
89 /**
90 * Container model.
91 *
92 * @type {(Backbone.Model|BaseElementModel)}
93 */
94
95 /**
96 * Container settings.
97 *
98 * @type {Backbone.Model}
99 */
100
101 /**
102 * Container view.
103 *
104 * @type {ViewsOptions}
105 */
106
107 /**
108 * Container parent.
109 *
110 * @type {Container}
111 */
112
113 /**
114 * Container children(s).
115 *
116 * @type {ChildrenArray}
117 */
118
119 /**
120 * Container dynamic.
121 *
122 * @type {Backbone.Model}
123 */
124
125 /**
126 * Container globals.
127 *
128 * @type {Backbone.Model}
129 */
130
131 /**
132 * Container label.
133 *
134 * @type {string}
135 */
136
137 /**
138 * Container controls.
139 *
140 * @type {{}}
141 */
142
143 /**
144 * Repeaters containers
145 *
146 * @type {{}}
147 */
148
149 /**
150 * Container renderer (The one who render).
151 *
152 * @type {Container}
153 */
154
155 /**
156 * Container panel.
157 *
158 * @type {Panel}
159 */
160
161 /**
162 * Controls placeholders.
163 *
164 * @type {{}}
165 */
166
167 /**
168 * Function constructor().
169 *
170 * Create container.
171 *
172 * @param {{}} args
173 *
174 * @throws {Error}
175 */
176 function Container(args) {
177 var _this;
178
179 (0, _classCallCheck2.default)(this, Container);
180 _this = _super.call(this, args); // Validate args.
181
182 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "type", void 0);
183 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "id", void 0);
184 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "document", void 0);
185 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "model", void 0);
186 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "settings", void 0);
187 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "view", void 0);
188 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "parent", void 0);
189 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "children", new _childrenArray.default());
190 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "dynamic", void 0);
191 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "globals", void 0);
192 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "label", void 0);
193 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "controls", {});
194 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "repeaters", {});
195 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderer", void 0);
196 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "panel", void 0);
197 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "placeholders", {});
198
199 _this.validateArgs(args);
200
201 args = Object.entries(args); // If empty.
202
203 if (0 === args.length) {
204 throw Error('Container cannot be empty.');
205 } // Set properties, if not defined - keep the defaults.
206
207
208 args.forEach(function (_ref) {
209 var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
210 key = _ref2[0],
211 value = _ref2[1];
212
213 _this[key] = 'undefined' === typeof value ? _this[key] : value;
214 });
215
216 if ('undefined' === typeof _this.renderer) {
217 _this.renderer = (0, _assertThisInitialized2.default)(_this);
218 }
219
220 if (!_this.document) {
221 _this.document = elementor.documents.getCurrent();
222 }
223
224 _this.dynamic = new Backbone.Model(_this.settings.get('__dynamic__'));
225 _this.globals = new Backbone.Model(_this.settings.get('__globals__'));
226 _this.panel = new _panel.default((0, _assertThisInitialized2.default)(_this));
227
228 _this.initialize();
229
230 return _this;
231 }
232
233 (0, _createClass2.default)(Container, [{
234 key: "initialize",
235 value: function initialize() {
236 if (this.isViewElement()) {
237 this.addToParent();
238 this.handleChildrenRecursive();
239 this.view.on('destroy', this.removeFromParent.bind(this));
240 }
241
242 this.handleRepeaterChildren();
243 }
244 }, {
245 key: "validateArgs",
246 value: function validateArgs(args) {
247 this.requireArgumentType('type', 'string', args);
248 this.requireArgumentType('id', 'string', args);
249 this.requireArgumentInstance('settings', Backbone.Model, args);
250 this.requireArgumentInstance('model', Backbone.Model, args); // Require it, unless it's forced to be `false`.
251
252 if (false !== args.parent) {
253 this.requireArgumentInstance('parent', elementorModules.editor.Container, args);
254 }
255 }
256 /**
257 * Function getGroupRelatedControls().
258 *
259 * Example:
260 * Settings = { typography_typography: 'whatever', button_text_color: 'whatever' };
261 * Result { control_name: controlValue, ... - and so on };
262 * `Object.keys( Result ) = [ 'typography_typography', 'typography_font_family', 'typography_font_size', 'typography_font_size_tablet', 'typography_font_size_mobile', 'typography_font_weight', 'typography_text_transform', 'typography_font_style', 'typography_text_decoration', 'typography_line_height', 'typography_line_height_tablet', 'typography_line_height_mobile', 'typography_letter_spacing', 'typography_letter_spacing_tablet', 'typography_letter_spacing_mobile', 'button_text_color' ]`.
263 *
264 * @param {{}} settings
265 *
266 * @return {{}} result
267 */
268
269 }, {
270 key: "getGroupRelatedControls",
271 value: function getGroupRelatedControls(settings) {
272 var _this2 = this;
273
274 var result = {};
275 Object.keys(settings).forEach(function (settingKey) {
276 Object.values(_this2.controls).forEach(function (control) {
277 var _this2$controls$setti;
278
279 if (settingKey === control.name) {
280 result[control.name] = control;
281 } else if ((_this2$controls$setti = _this2.controls[settingKey]) !== null && _this2$controls$setti !== void 0 && _this2$controls$setti.groupPrefix) {
282 var groupPrefix = _this2.controls[settingKey].groupPrefix;
283
284 if (control.name.toString().startsWith(groupPrefix)) {
285 result[control.name] = control;
286 }
287 }
288 });
289 });
290 return result;
291 }
292 /**
293 * Function getAffectingControls().
294 *
295 * @return {{}} All controls that effecting the container.
296 */
297
298 }, {
299 key: "getAffectingControls",
300 value: function getAffectingControls() {
301 var _this3 = this;
302
303 var result = {},
304 activeControls = this.settings.getActiveControls();
305 Object.entries(activeControls).forEach(function (_ref3) {
306 var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
307 controlName = _ref4[0],
308 control = _ref4[1];
309
310 var controlValue = _this3.settings.get(control.name);
311
312 if (control.global && !(controlValue !== null && controlValue !== void 0 && controlValue.length)) {
313 var _this3$globals$get;
314
315 if ((_this3$globals$get = _this3.globals.get(control.name)) !== null && _this3$globals$get !== void 0 && _this3$globals$get.length || _this3.getGlobalDefault(controlName).length) {
316 control.global.utilized = true;
317 result[controlName] = control;
318 return;
319 }
320 }
321
322 if (control.dynamic) {
323 if (_this3.dynamic.get(controlName)) {
324 control.dynamic.utilized = true;
325 result[controlName] = control;
326 return;
327 }
328 }
329
330 if (controlValue === control.default) {
331 return;
332 }
333
334 if (!controlValue) {
335 return;
336 }
337
338 if ('object' === (0, _typeof2.default)(controlValue) && Object.values(controlValue).join() === Object.values(control.default).join()) {
339 return;
340 }
341
342 result[controlName] = control;
343 });
344 return result;
345 }
346 /**
347 * Function getParentAncestry().
348 *
349 * Recursively run over all parents from current container till the top
350 *
351 * @return {Array.<Container>} All parent as flat array.
352 */
353
354 }, {
355 key: "getParentAncestry",
356 value: function getParentAncestry() {
357 var result = [];
358 var parent = this;
359
360 while (parent) {
361 result.push(parent);
362 parent = parent.parent;
363 }
364
365 return result;
366 }
367 }, {
368 key: "handleChildrenRecursive",
369 value: function handleChildrenRecursive() {
370 var _this$view$children;
371
372 if ((_this$view$children = this.view.children) !== null && _this$view$children !== void 0 && _this$view$children.length) {
373 Object.values(this.view.children._views).forEach(function (view) {
374 if (!view.container) {
375 return;
376 }
377
378 var container = view.container; // Since the way 'global-widget' rendered, it does not have parent sometimes.
379
380 if (container.parent.children) {
381 container.parent.children[view._index] = container;
382 }
383
384 container.handleChildrenRecursive();
385 });
386 } else {
387 this.children.clear();
388 }
389 }
390 }, {
391 key: "addToParent",
392 value: function addToParent() {
393 if (!this.parent.children || this.isRepeaterItem()) {
394 return;
395 } // On create container tell the parent where it was created.
396
397
398 this.parent.children.splice(this.view._index, 0, this);
399 }
400 }, {
401 key: "removeFromParent",
402 value: function removeFromParent() {
403 var _this4 = this;
404
405 if (!this.parent.children || this.isRepeater()) {
406 return;
407 } // When delete container its should notify its parent, that his children is dead.
408
409
410 this.parent.children = this.parent.children.filter(function (filtered) {
411 return filtered.id !== _this4.id;
412 });
413 }
414 }, {
415 key: "handleRepeaterChildren",
416 value: function handleRepeaterChildren() {
417 var _this5 = this;
418
419 Object.values(this.controls).forEach(function (control) {
420 if (!control.is_repeater) {
421 return;
422 }
423
424 var model = new Backbone.Model({
425 name: control.name
426 });
427 _this5.repeaters[control.name] = new elementorModules.editor.Container({
428 type: Container.TYPE_REPEATER,
429 id: control.name,
430 model: model,
431 settings: model,
432 view: _this5.view,
433 parent: _this5,
434 label: control.label || control.name,
435 controls: {},
436 renderer: _this5.renderer
437 });
438
439 _this5.settings.get(control.name).forEach(function (rowModel, index) {
440 _this5.addRepeaterItem(control.name, rowModel, index);
441 });
442 }); // Backwards Compatibility: if there is only one repeater (type=repeater), set it's children as current children.
443 // Since 3.0.0.
444
445 if (['widget', 'document'].includes(this.type)) {
446 var repeaters = Object.values(this.controls).filter(function (control) {
447 return 'repeater' === control.type;
448 });
449
450 if (1 === repeaters.length) {
451 Object.defineProperty(this, 'children', {
452 get: function get() {
453 elementorDevTools.deprecation.deprecated('children', '3.0.0', 'container.repeaters[ repeaterName ].children');
454 return this.repeaters[repeaters[0].name].children;
455 }
456 });
457 }
458 }
459 }
460 /**
461 * Function addRepeaterItem().
462 *
463 * The method add repeater item, find the repeater control by it name, and create new container for the item.
464 *
465 * @param {string} repeaterName
466 * @param {Backbone.Model} rowSettingsModel
467 * @param {number} index
468 *
469 * @return {Container} container
470 */
471
472 }, {
473 key: "addRepeaterItem",
474 value: function addRepeaterItem(repeaterName, rowSettingsModel, index) {
475 var rowId = rowSettingsModel.get('_id'); // TODO: Temp backwards compatibility. since 2.8.0.
476
477 if (!rowId) {
478 rowId = 'bc-' + elementorCommon.helpers.getUniqueId();
479 rowSettingsModel.set('_id', rowId);
480 }
481
482 this.repeaters[repeaterName].children.splice(index, 0, new elementorModules.editor.Container({
483 type: Container.TYPE_REPEATER_ITEM,
484 id: rowSettingsModel.get('_id'),
485 model: new Backbone.Model({
486 name: repeaterName
487 }),
488 settings: rowSettingsModel,
489 view: this.view,
490 parent: this.repeaters[repeaterName],
491 label: this.label + ' ' + __('Item', 'elementor'),
492 controls: rowSettingsModel.options.controls,
493 renderer: this.renderer
494 }));
495 return this.repeaters[repeaterName];
496 }
497 /**
498 * Function lookup().
499 *
500 * If the view were destroyed, try to find it again if it exists.
501 *
502 * TODO: Refactor.
503 *
504 * @return {Container} container
505 */
506
507 }, {
508 key: "lookup",
509 value: function lookup() {
510 var _this$renderer$view;
511
512 var result = this;
513
514 if (!this.renderer) {
515 return this;
516 }
517
518 if (this !== this.renderer && (_this$renderer$view = this.renderer.view) !== null && _this$renderer$view !== void 0 && _this$renderer$view.isDisconnected && this.renderer.view.isDisconnected()) {
519 this.renderer = this.renderer.lookup();
520 }
521
522 if (undefined === this.view || !this.view.lookup || !this.view.isDisconnected()) {
523 // Hack For repeater item the result is the parent container.
524 if (Container.TYPE_REPEATER_ITEM === this.type) {
525 this.settings = this.parent.parent.settings.get(this.model.get('name')).findWhere({
526 _id: this.id
527 });
528 }
529
530 return result;
531 }
532
533 var lookup = this.view.lookup();
534
535 if (lookup) {
536 result = lookup.getContainer(); // Hack For repeater item the result is the parent container.
537
538 if (Container.REPEATER === this.type) {
539 this.settings = result.settings.get(this.model.get('name')).findWhere({
540 _id: this.id
541 });
542 return this;
543 } // If lookup were done, new container were created and parent does not know about it.
544
545
546 if (result.parent.children) {
547 result.parent.children[result.view._index] = result;
548 }
549 }
550
551 return result;
552 }
553 }, {
554 key: "findChildrenRecursive",
555 value: function findChildrenRecursive(callback) {
556 elementorDevTools.deprecation.deprecated('container.findChildrenRecursive( callback )', '3.5.0', 'container.children.findRecursive( callback )');
557 return this.children.findRecursive(callback);
558 }
559 }, {
560 key: "forEachChildrenRecursive",
561 value: function forEachChildrenRecursive(callback) {
562 elementorDevTools.deprecation.deprecated('container.forEachChildrenRecursive( callback )', '3.5.0', 'container.children.forEachRecursive( callback )');
563 return this.children.forEachRecursive(callback);
564 }
565 /**
566 * Function render().
567 *
568 * Call view render.
569 *
570 * Run's `this.renderer.view.renderOnChange( this.settings ) `.
571 * When `this.renderer` exist.
572 *
573 */
574
575 }, {
576 key: "render",
577 value: function render() {
578 if (!this.renderer) {
579 return;
580 }
581
582 this.renderer.view.renderOnChange(this.settings);
583 }
584 }, {
585 key: "renderUI",
586 value: function renderUI() {
587 if (!this.renderer) {
588 return;
589 }
590
591 this.renderer.view.renderUI();
592 }
593 }, {
594 key: "isEditable",
595 value: function isEditable() {
596 return 'edit' === elementor.channels.dataEditMode.request('activeMode') && 'open' === this.document.editor.status;
597 }
598 }, {
599 key: "isDesignable",
600 value: function isDesignable() {
601 return elementor.userCan('design') && this.isEditable();
602 }
603 }, {
604 key: "isRepeater",
605 value: function isRepeater() {
606 return Container.TYPE_REPEATER === this.type;
607 }
608 }, {
609 key: "isRepeaterItem",
610 value: function isRepeaterItem() {
611 return Container.TYPE_REPEATER_ITEM === this.type;
612 }
613 }, {
614 key: "isViewElement",
615 value: function isViewElement() {
616 return this.view && this.model.get('elType');
617 }
618 }, {
619 key: "getSetting",
620 value: function getSetting(name) {
621 var localOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
622 var localValue = this.settings.get(name);
623
624 if (localOnly) {
625 return localValue;
626 } // Try to get the value in the order: Global, Local, Global default.
627
628
629 var globalValue;
630
631 if (this.getGlobalKey(name)) {
632 globalValue = this.getGlobalValue(name);
633 }
634
635 return globalValue || localValue || this.getGlobalDefault(name);
636 }
637 }, {
638 key: "getGlobalKey",
639 value: function getGlobalKey(name) {
640 return this.globals.get(name);
641 }
642 }, {
643 key: "getGlobalValue",
644 value: function getGlobalValue(name) {
645 var control = this.controls[name],
646 globalKey = this.getGlobalKey(name),
647 globalArgs = $e.data.commandExtractArgs(globalKey),
648 data = $e.data.getCache($e.components.get('globals'), globalArgs.command, globalArgs.args.query);
649
650 if (!(data !== null && data !== void 0 && data.value)) {
651 return;
652 }
653
654 var id = data.id;
655 var value; // It's a global settings with additional controls in group.
656
657 if (control.groupType) {
658 // A regex containing all of the active breakpoints' prefixes ('_mobile', '_tablet' etc.).
659 var responsivePrefixRegex = elementor.breakpoints.getActiveMatchRegex();
660 var propertyName = control.name.replace(control.groupPrefix, '').replace(responsivePrefixRegex, '');
661
662 if (!data.value[elementor.config.kit_config.typography_prefix + propertyName]) {
663 return;
664 }
665
666 propertyName = propertyName.replace('_', '-');
667 value = "var( --e-global-".concat(control.groupType, "-").concat(id, "-").concat(propertyName, " )");
668
669 if (elementor.config.ui.defaultGenericFonts && control.groupPrefix + 'font_family' === control.name) {
670 value += ", ".concat(elementor.config.ui.defaultGenericFonts);
671 }
672 } else {
673 value = "var( --e-global-".concat(control.type, "-").concat(id, " )");
674 }
675
676 return value;
677 }
678 /**
679 * Determine if a control's global value is applied.
680 * It actually checks if the local value is different than the global value.
681 *
682 * @param {string} controlName - Control name
683 * @return {boolean} true if a control's global value is applied
684 */
685
686 }, {
687 key: "isGlobalApplied",
688 value: function isGlobalApplied(controlName) {
689 return this.getSetting(controlName) !== this.settings.get(controlName);
690 }
691 }, {
692 key: "getGlobalDefault",
693 value: function getGlobalDefault(controlName) {
694 var _this$controls$contro;
695
696 var controlGlobalArgs = (_this$controls$contro = this.controls[controlName]) === null || _this$controls$contro === void 0 ? void 0 : _this$controls$contro.global;
697
698 if (controlGlobalArgs !== null && controlGlobalArgs !== void 0 && controlGlobalArgs.default) {
699 // Temp fix.
700 var controlType = this.controls[controlName].type;
701
702 if ('color' === controlType) {
703 controlType = 'colors';
704 } // End temp fix
705 // If the control is a color/typography control and default colors/typography are disabled, don't return the global value.
706
707
708 if (!elementor.config.globals.defaults_enabled[controlType]) {
709 return '';
710 }
711
712 var _$e$data$commandExtra = $e.data.commandExtractArgs(controlGlobalArgs.default),
713 command = _$e$data$commandExtra.command,
714 args = _$e$data$commandExtra.args,
715 result = $e.data.getCache($e.components.get('globals'), command, args.query);
716
717 return result === null || result === void 0 ? void 0 : result.value;
718 } // No global default.
719
720
721 return '';
722 }
723 }]);
724 return Container;
725 }(_argsObject.default);
726
727 exports["default"] = Container;
728 (0, _defineProperty2.default)(Container, "TYPE_REPEATER", 'repeater-control');
729 (0, _defineProperty2.default)(Container, "TYPE_REPEATER_ITEM", 'repeater');
730
731 /***/ }),
732
733 /***/ "../assets/dev/js/editor/container/model/children-array.js":
734 /*!*****************************************************************!*\
735 !*** ../assets/dev/js/editor/container/model/children-array.js ***!
736 \*****************************************************************/
737 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
738
739 "use strict";
740
741
742 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
743
744 Object.defineProperty(exports, "__esModule", ({
745 value: true
746 }));
747 exports["default"] = void 0;
748
749 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
750
751 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
752
753 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
754
755 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
756
757 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
758
759 var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js"));
760
761 function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
762
763 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
764
765 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
766
767 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
768
769 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
770
771 /**
772 * @typedef {import('../container')} Container
773 */
774 var ChildrenArray = /*#__PURE__*/function (_Array) {
775 (0, _inherits2.default)(ChildrenArray, _Array);
776
777 var _super = _createSuper(ChildrenArray);
778
779 function ChildrenArray() {
780 (0, _classCallCheck2.default)(this, ChildrenArray);
781 return _super.apply(this, arguments);
782 }
783
784 (0, _createClass2.default)(ChildrenArray, [{
785 key: "clear",
786 value: function clear() {
787 this.length = 0;
788 }
789 /**
790 * Function findRecursive().
791 *
792 * Will run over children recursively and pass the children to the callback till the callback returns positive value.
793 *
794 * @param {function(Container) : *} callback
795 *
796 * @return {Container|false} child
797 */
798
799 }, {
800 key: "findRecursive",
801 value: function findRecursive(callback) {
802 var _iterator = _createForOfIteratorHelper(this),
803 _step;
804
805 try {
806 for (_iterator.s(); !(_step = _iterator.n()).done;) {
807 var container = _step.value;
808
809 if (callback(container)) {
810 return container;
811 }
812
813 if (container.children.length) {
814 var foundChildren = container.children.findRecursive(callback);
815
816 if (foundChildren) {
817 return foundChildren;
818 }
819 }
820 }
821 } catch (err) {
822 _iterator.e(err);
823 } finally {
824 _iterator.f();
825 }
826
827 return false;
828 }
829 /**
830 * Function forEachRecursive().
831 *
832 * Will run over children recursively.
833 *
834 * @param {function(Container) : *} callback
835 *
836 * @return {void}
837 */
838
839 }, {
840 key: "forEachRecursive",
841 value: function forEachRecursive(callback) {
842 var _iterator2 = _createForOfIteratorHelper(this),
843 _step2;
844
845 try {
846 for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
847 var container = _step2.value;
848 callback(container);
849
850 if (container.children.length) {
851 container.children.forEachRecursive(callback);
852 }
853 }
854 } catch (err) {
855 _iterator2.e(err);
856 } finally {
857 _iterator2.f();
858 }
859 }
860 /**
861 * Function someRecursive().
862 *
863 * Will run over children recursively, breaks if the callback return true.
864 *
865 * @param {function(Container) : *} callback
866 *
867 */
868
869 }, {
870 key: "someRecursive",
871 value: function someRecursive(callback) {
872 var _iterator3 = _createForOfIteratorHelper(this),
873 _step3;
874
875 try {
876 for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
877 var _container$children;
878
879 var container = _step3.value;
880
881 if (callback(container)) {
882 return true;
883 }
884
885 if ((_container$children = container.children) !== null && _container$children !== void 0 && _container$children.length) {
886 if (container.children.someRecursive(callback)) {
887 return true;
888 }
889 }
890 }
891 } catch (err) {
892 _iterator3.e(err);
893 } finally {
894 _iterator3.f();
895 }
896
897 return false;
898 }
899 }]);
900 return ChildrenArray;
901 }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Array));
902
903 exports["default"] = ChildrenArray;
904
905 /***/ }),
906
907 /***/ "../assets/dev/js/editor/container/panel.js":
908 /*!**************************************************!*\
909 !*** ../assets/dev/js/editor/container/panel.js ***!
910 \**************************************************/
911 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
912
913 "use strict";
914
915
916 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
917
918 Object.defineProperty(exports, "__esModule", ({
919 value: true
920 }));
921 exports["default"] = void 0;
922
923 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
924
925 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
926
927 /**
928 * @typedef {import('./container')} Container
929 */
930 var Panel = /*#__PURE__*/function () {
931 /**
932 * Function constructor().
933 *
934 * Create constructor panel.
935 *
936 * @param {Container} container
937 */
938 function Panel(container) {
939 (0, _classCallCheck2.default)(this, Panel);
940 this.container = container;
941 }
942 /**
943 * Function refresh().
944 *
945 * Refresh the panel.
946 */
947
948
949 (0, _createClass2.default)(Panel, [{
950 key: "refresh",
951 value: function refresh() {
952 if ($e.routes.isPartOf('panel/editor')) {
953 $e.routes.refreshContainer('panel');
954 }
955 }
956 /**
957 * Function closeEditor().
958 *
959 * Route to `panel/elements/categories`
960 */
961
962 }, {
963 key: "closeEditor",
964 value: function closeEditor() {
965 $e.route('panel/elements/categories');
966 }
967 }, {
968 key: "getControlView",
969 value: function getControlView(name) {
970 var editor = elementor.getPanelView().getCurrentPageView();
971 return editor.children.findByModelCid(this.getControlModel(name).cid);
972 }
973 }, {
974 key: "getControlModel",
975 value: function getControlModel(name) {
976 var editor = elementor.getPanelView().getCurrentPageView();
977 return editor.collection.findWhere({
978 name: name
979 });
980 }
981 }]);
982 return Panel;
983 }();
984
985 exports["default"] = Panel;
986
987 /***/ }),
988
989 /***/ "../assets/dev/js/editor/elements/models/base-settings.js":
990 /*!****************************************************************!*\
991 !*** ../assets/dev/js/editor/elements/models/base-settings.js ***!
992 \****************************************************************/
993 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
994
995 "use strict";
996
997
998 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
999
1000 var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
1001
1002 var BaseSettingsModel;
1003 /**
1004 * @name BaseSettingsModel
1005 */
1006
1007 BaseSettingsModel = Backbone.Model.extend({
1008 options: {},
1009 initialize: function initialize(data, options) {
1010 var self = this; // Keep the options for cloning
1011
1012 self.options = options;
1013 self.controls = elementor.mergeControlsSettings(options.controls);
1014 self.validators = {};
1015
1016 if (!self.controls) {
1017 return;
1018 }
1019
1020 var attrs = data || {},
1021 defaults = {};
1022
1023 _.each(self.controls, function (control) {
1024 // Check features since they does not exist in tests.
1025 var isUIControl = control.features && -1 !== control.features.indexOf('ui');
1026
1027 if (isUIControl) {
1028 return;
1029 }
1030
1031 var controlName = control.name;
1032
1033 if ('object' === (0, _typeof2.default)(control.default)) {
1034 defaults[controlName] = elementorCommon.helpers.cloneObject(control.default);
1035 } else {
1036 defaults[controlName] = control.default;
1037 }
1038
1039 var isDynamicControl = control.dynamic && control.dynamic.active,
1040 hasDynamicSettings = isDynamicControl && attrs.__dynamic__ && attrs.__dynamic__[controlName];
1041
1042 if (isDynamicControl && !hasDynamicSettings && control.dynamic.default) {
1043 if (!attrs.__dynamic__) {
1044 attrs.__dynamic__ = {};
1045 }
1046
1047 attrs.__dynamic__[controlName] = control.dynamic.default;
1048 hasDynamicSettings = true;
1049 } // Check if the value is a plain object ( and not an array )
1050
1051
1052 var isMultipleControl = jQuery.isPlainObject(control.default);
1053
1054 if (undefined !== attrs[controlName] && isMultipleControl && !_.isObject(attrs[controlName]) && !hasDynamicSettings) {
1055 elementorCommon.debug.addCustomError(new TypeError('An invalid argument supplied as multiple control value'), 'InvalidElementData', 'Element `' + (self.get('widgetType') || self.get('elType')) + '` got <' + attrs[controlName] + '> as `' + controlName + '` value. Expected array or object.');
1056 delete attrs[controlName];
1057 }
1058
1059 if (undefined === attrs[controlName]) {
1060 attrs[controlName] = defaults[controlName];
1061 }
1062 });
1063
1064 self.defaults = defaults;
1065 self.handleRepeaterData(attrs);
1066 self.set(attrs);
1067 },
1068 handleRepeaterData: function handleRepeaterData(attrs) {
1069 _.each(this.controls, function (field) {
1070 if (field.is_repeater) {
1071 // TODO: Apply defaults on each field in repeater fields
1072 if (!(attrs[field.name] instanceof Backbone.Collection)) {
1073 attrs[field.name] = new Backbone.Collection(attrs[field.name], {
1074 model: function model(attributes, options) {
1075 options = options || {};
1076 options.controls = {};
1077 Object.values(field.fields).forEach(function (item) {
1078 options.controls[item.name] = item;
1079 }); // TODO: Cannot be deleted, since it handle repeater items after repeater widget creation.
1080
1081 if (!attributes._id) {
1082 attributes._id = elementorCommon.helpers.getUniqueId();
1083 }
1084
1085 return new BaseSettingsModel(attributes, options);
1086 }
1087 });
1088 }
1089 }
1090 });
1091 },
1092 getFontControls: function getFontControls() {
1093 return this.getControlsByType('font');
1094 },
1095 getIconsControls: function getIconsControls() {
1096 return this.getControlsByType('icons');
1097 },
1098 getControlsByType: function getControlsByType(type) {
1099 return _.filter(this.getActiveControls(), function (control) {
1100 return type === control.type;
1101 });
1102 },
1103 getStyleControls: function getStyleControls(controls, attributes) {
1104 var self = this;
1105 controls = elementorCommon.helpers.cloneObject(self.getActiveControls(controls, attributes));
1106 var styleControls = [];
1107 jQuery.each(controls, function () {
1108 var _control$dynamic;
1109
1110 var control = this,
1111 controlDefaultSettings = elementor.config.controls[control.type];
1112 control = jQuery.extend({}, controlDefaultSettings, control);
1113
1114 if (control.fields) {
1115 var styleFields = [];
1116 self.attributes[control.name].each(function (item) {
1117 styleFields.push(self.getStyleControls(control.fields, item.attributes));
1118 });
1119 control.styleFields = styleFields;
1120 }
1121
1122 if (control.fields || (_control$dynamic = control.dynamic) !== null && _control$dynamic !== void 0 && _control$dynamic.active || self.isGlobalControl(control, controls) || self.isStyleControl(control.name, controls)) {
1123 styleControls.push(control);
1124 }
1125 });
1126 return styleControls;
1127 },
1128 isGlobalControl: function isGlobalControl(control, controls) {
1129 var _globalControl$global, _this$attributes$__gl;
1130
1131 var controlGlobalKey = control.name;
1132
1133 if (control.groupType) {
1134 controlGlobalKey = control.groupPrefix + control.groupType;
1135 }
1136
1137 var globalControl = controls[controlGlobalKey];
1138
1139 if (!((_globalControl$global = globalControl.global) !== null && _globalControl$global !== void 0 && _globalControl$global.active)) {
1140 return false;
1141 }
1142
1143 var globalValue = (_this$attributes$__gl = this.attributes.__globals__) === null || _this$attributes$__gl === void 0 ? void 0 : _this$attributes$__gl[controlGlobalKey];
1144 return !!globalValue;
1145 },
1146 isStyleControl: function isStyleControl(attribute, controls) {
1147 controls = controls || this.controls;
1148
1149 var currentControl = _.find(controls, function (control) {
1150 return attribute === control.name;
1151 });
1152
1153 return currentControl && !_.isEmpty(currentControl.selectors);
1154 },
1155 getClassControls: function getClassControls(controls) {
1156 controls = controls || this.controls;
1157 return _.filter(controls, function (control) {
1158 return !_.isUndefined(control.prefix_class);
1159 });
1160 },
1161 isClassControl: function isClassControl(attribute) {
1162 var currentControl = _.find(this.controls, function (control) {
1163 return attribute === control.name;
1164 });
1165
1166 return currentControl && !_.isUndefined(currentControl.prefix_class);
1167 },
1168 getControl: function getControl(id) {
1169 return _.find(this.controls, function (control) {
1170 return id === control.name;
1171 });
1172 },
1173 getActiveControls: function getActiveControls(controls, attributes) {
1174 var activeControls = {};
1175
1176 if (!controls) {
1177 controls = this.controls;
1178 }
1179
1180 if (!attributes) {
1181 attributes = this.attributes;
1182 }
1183
1184 attributes = this.parseGlobalSettings(attributes, controls);
1185 jQuery.each(controls, function (controlKey, control) {
1186 if (elementor.helpers.isActiveControl(control, attributes, controls)) {
1187 activeControls[controlKey] = control;
1188 }
1189 });
1190 return activeControls;
1191 },
1192 clone: function clone() {
1193 return new BaseSettingsModel(elementorCommon.helpers.cloneObject(this.attributes), elementorCommon.helpers.cloneObject(this.options));
1194 },
1195 setExternalChange: function setExternalChange(key, value) {
1196 var self = this,
1197 settingsToChange;
1198
1199 if ('object' === (0, _typeof2.default)(key)) {
1200 settingsToChange = key;
1201 } else {
1202 settingsToChange = {};
1203 settingsToChange[key] = value;
1204 }
1205
1206 self.set(settingsToChange);
1207 jQuery.each(settingsToChange, function (changedKey, changedValue) {
1208 self.trigger('change:external:' + changedKey, changedValue);
1209 });
1210 },
1211 parseDynamicSettings: function parseDynamicSettings(settings, options, controls) {
1212 var self = this;
1213 settings = elementorCommon.helpers.cloneObject(settings || self.attributes);
1214 options = options || {};
1215 controls = controls || this.controls;
1216 jQuery.each(controls, function () {
1217 var control = this,
1218 valueToParse;
1219
1220 if (control.is_repeater) {
1221 valueToParse = settings[control.name];
1222 valueToParse.forEach(function (value, key) {
1223 valueToParse[key] = self.parseDynamicSettings(value, options, control.fields);
1224 });
1225 return;
1226 }
1227
1228 valueToParse = settings.__dynamic__ && settings.__dynamic__[control.name];
1229
1230 if (!valueToParse) {
1231 return;
1232 }
1233
1234 var dynamicSettings = control.dynamic;
1235
1236 if (undefined === dynamicSettings) {
1237 dynamicSettings = elementor.config.controls[control.type].dynamic;
1238 }
1239
1240 if (!dynamicSettings || !dynamicSettings.active) {
1241 return;
1242 }
1243
1244 var dynamicValue;
1245
1246 try {
1247 dynamicValue = elementor.dynamicTags.parseTagsText(valueToParse, dynamicSettings, elementor.dynamicTags.getTagDataContent);
1248 } catch (error) {
1249 if (elementor.dynamicTags.CACHE_KEY_NOT_FOUND_ERROR !== error.message) {
1250 throw error;
1251 }
1252
1253 dynamicValue = '';
1254
1255 if (options.onServerRequestStart) {
1256 options.onServerRequestStart();
1257 }
1258
1259 elementor.dynamicTags.refreshCacheFromServer(function () {
1260 if (options.onServerRequestEnd) {
1261 options.onServerRequestEnd();
1262 }
1263 });
1264 }
1265
1266 if (dynamicSettings.property) {
1267 settings[control.name][dynamicSettings.property] = dynamicValue;
1268 } else {
1269 settings[control.name] = dynamicValue;
1270 }
1271 });
1272 return settings;
1273 },
1274 parseGlobalSettings: function parseGlobalSettings(settings, controls) {
1275 var _this = this;
1276
1277 settings = elementorCommon.helpers.cloneObject(settings);
1278 controls = controls || this.controls;
1279 jQuery.each(controls, function (index, control) {
1280 var _settings$__globals__, _globalSettings;
1281
1282 var valueToParse;
1283
1284 if (control.is_repeater) {
1285 valueToParse = settings[control.name];
1286 valueToParse.forEach(function (value, key) {
1287 valueToParse[key] = _this.parseGlobalSettings(value, control.fields);
1288 });
1289 return;
1290 }
1291
1292 valueToParse = (_settings$__globals__ = settings.__globals__) === null || _settings$__globals__ === void 0 ? void 0 : _settings$__globals__[control.name];
1293
1294 if (!valueToParse) {
1295 return;
1296 }
1297
1298 var globalSettings = control.global;
1299
1300 if (undefined === globalSettings) {
1301 globalSettings = elementor.config.controls[control.type].global;
1302 }
1303
1304 if (!((_globalSettings = globalSettings) !== null && _globalSettings !== void 0 && _globalSettings.active)) {
1305 return;
1306 }
1307
1308 var _$e$data$commandExtra = $e.data.commandExtractArgs(valueToParse),
1309 command = _$e$data$commandExtra.command,
1310 args = _$e$data$commandExtra.args,
1311 globalValue = $e.data.getCache($e.components.get('globals'), command, args.query);
1312
1313 if (control.groupType) {
1314 settings[control.name] = 'custom';
1315 } else {
1316 settings[control.name] = globalValue;
1317 }
1318 });
1319 return settings;
1320 },
1321 removeDataDefaults: function removeDataDefaults(data, controls) {
1322 var _this2 = this;
1323
1324 jQuery.each(data, function (key) {
1325 var control = controls[key];
1326
1327 if (!control) {
1328 return;
1329 } // TODO: use `save_default` in text|textarea controls.
1330
1331
1332 if (control.save_default || ('text' === control.type || 'textarea' === control.type) && data[key]) {
1333 return;
1334 }
1335
1336 if (control.is_repeater) {
1337 data[key].forEach(function (repeaterRow) {
1338 _this2.removeDataDefaults(repeaterRow, control.fields);
1339 });
1340 return;
1341 }
1342
1343 if (_.isEqual(data[key], control.default)) {
1344 delete data[key];
1345 }
1346 });
1347 },
1348 toJSON: function toJSON(options) {
1349 var data = Backbone.Model.prototype.toJSON.call(this);
1350 options = options || {};
1351 delete data.widgetType;
1352 delete data.elType;
1353 delete data.isInner;
1354
1355 _.each(data, function (attribute, key) {
1356 if (attribute && attribute.toJSON) {
1357 data[key] = attribute.toJSON();
1358 }
1359 });
1360
1361 if (options.remove && -1 !== options.remove.indexOf('default')) {
1362 this.removeDataDefaults(data, this.controls);
1363 }
1364
1365 return elementorCommon.helpers.cloneObject(data);
1366 }
1367 });
1368 /**
1369 * @name BaseSettingsModel
1370 */
1371
1372 module.exports = BaseSettingsModel;
1373
1374 /***/ }),
1375
1376 /***/ "../assets/dev/js/editor/elements/views/behaviors/inner-tabs.js":
1377 /*!**********************************************************************!*\
1378 !*** ../assets/dev/js/editor/elements/views/behaviors/inner-tabs.js ***!
1379 \**********************************************************************/
1380 /***/ ((module) => {
1381
1382 "use strict";
1383
1384
1385 var InnerTabsBehavior;
1386 InnerTabsBehavior = Marionette.Behavior.extend({
1387 onRenderCollection: function onRenderCollection() {
1388 this.handleInnerTabs(this.view);
1389 },
1390 handleInnerTabs: function handleInnerTabs(parent) {
1391 var closedClass = 'elementor-tab-close',
1392 activeClass = 'elementor-tab-active',
1393 tabsWrappers = parent.children.filter(function (view) {
1394 return 'tabs' === view.model.get('type');
1395 });
1396
1397 _.each(tabsWrappers, function (view) {
1398 view.$el.find('.elementor-control-content').remove();
1399 var tabsId = view.model.get('name'),
1400 tabs = parent.children.filter(function (childView) {
1401 return 'tab' === childView.model.get('type') && childView.model.get('tabs_wrapper') === tabsId;
1402 });
1403
1404 _.each(tabs, function (childView, index) {
1405 view._addChildView(childView);
1406
1407 var tabId = childView.model.get('name'),
1408 controlsUnderTab = parent.children.filter(function (controlView) {
1409 return tabId === controlView.model.get('inner_tab');
1410 });
1411
1412 if (0 === index) {
1413 childView.$el.addClass(activeClass);
1414 } else {
1415 _.each(controlsUnderTab, function (controlView) {
1416 controlView.$el.addClass(closedClass);
1417 });
1418 }
1419 });
1420 });
1421 },
1422 onChildviewControlTabClicked: function onChildviewControlTabClicked(childView) {
1423 var closedClass = 'elementor-tab-close',
1424 activeClass = 'elementor-tab-active',
1425 tabClicked = childView.model.get('name'),
1426 childrenUnderTab = this.view.children.filter(function (view) {
1427 return 'tab' !== view.model.get('type') && childView.model.get('tabs_wrapper') === view.model.get('tabs_wrapper');
1428 }),
1429 siblingTabs = this.view.children.filter(function (view) {
1430 return 'tab' === view.model.get('type') && childView.model.get('tabs_wrapper') === view.model.get('tabs_wrapper');
1431 });
1432
1433 _.each(siblingTabs, function (view) {
1434 view.$el.removeClass(activeClass);
1435 });
1436
1437 childView.$el.addClass(activeClass);
1438
1439 _.each(childrenUnderTab, function (view) {
1440 if (view.model.get('inner_tab') === tabClicked) {
1441 view.$el.removeClass(closedClass);
1442 } else {
1443 view.$el.addClass(closedClass);
1444 }
1445 });
1446
1447 elementor.getPanelView().updateScrollbar();
1448 }
1449 });
1450 module.exports = InnerTabsBehavior;
1451
1452 /***/ }),
1453
1454 /***/ "../assets/dev/js/editor/utils/introduction.js":
1455 /*!*****************************************************!*\
1456 !*** ../assets/dev/js/editor/utils/introduction.js ***!
1457 \*****************************************************/
1458 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1459
1460 "use strict";
1461
1462
1463 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1464
1465 Object.defineProperty(exports, "__esModule", ({
1466 value: true
1467 }));
1468 exports["default"] = void 0;
1469
1470 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1471
1472 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1473
1474 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
1475
1476 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
1477
1478 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
1479
1480 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
1481
1482 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
1483
1484 var _default = /*#__PURE__*/function (_elementorModules$Mod) {
1485 (0, _inherits2.default)(_default, _elementorModules$Mod);
1486
1487 var _super = _createSuper(_default);
1488
1489 function _default() {
1490 var _this;
1491
1492 (0, _classCallCheck2.default)(this, _default);
1493
1494 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1495 args[_key] = arguments[_key];
1496 }
1497
1498 _this = _super.call.apply(_super, [this].concat(args));
1499
1500 _this.initDialog();
1501
1502 return _this;
1503 }
1504
1505 (0, _createClass2.default)(_default, [{
1506 key: "getDefaultSettings",
1507 value: function getDefaultSettings() {
1508 return {
1509 dialogType: 'buttons',
1510 dialogOptions: {
1511 effects: {
1512 hide: 'hide',
1513 show: 'show'
1514 },
1515 hide: {
1516 onBackgroundClick: false
1517 }
1518 }
1519 };
1520 }
1521 }, {
1522 key: "initDialog",
1523 value: function initDialog() {
1524 var _this2 = this;
1525
1526 var dialog;
1527
1528 this.getDialog = function () {
1529 if (!dialog) {
1530 var settings = _this2.getSettings();
1531
1532 dialog = elementorCommon.dialogsManager.createWidget(settings.dialogType, settings.dialogOptions);
1533
1534 if (settings.onDialogInitCallback) {
1535 settings.onDialogInitCallback.call(_this2, dialog);
1536 }
1537 }
1538
1539 return dialog;
1540 };
1541 }
1542 }, {
1543 key: "show",
1544 value: function show(target) {
1545 if (this.introductionViewed) {
1546 return;
1547 }
1548
1549 var dialog = this.getDialog();
1550
1551 if (target) {
1552 dialog.setSettings('position', {
1553 of: target
1554 });
1555 }
1556
1557 dialog.show();
1558 }
1559 }, {
1560 key: "setViewed",
1561 value: function setViewed() {
1562 this.introductionViewed = true;
1563 elementorCommon.ajax.addRequest('introduction_viewed', {
1564 data: {
1565 introductionKey: this.getSettings('introductionKey')
1566 }
1567 });
1568 }
1569 }]);
1570 return _default;
1571 }(elementorModules.Module);
1572
1573 exports["default"] = _default;
1574
1575 /***/ }),
1576
1577 /***/ "../assets/dev/js/editor/utils/is-instanceof.js":
1578 /*!******************************************************!*\
1579 !*** ../assets/dev/js/editor/utils/is-instanceof.js ***!
1580 \******************************************************/
1581 /***/ ((__unused_webpack_module, exports) => {
1582
1583 "use strict";
1584
1585
1586 Object.defineProperty(exports, "__esModule", ({
1587 value: true
1588 }));
1589 exports["default"] = void 0;
1590
1591 function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
1592
1593 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1594
1595 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1596
1597 /**
1598 * Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved
1599 * object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can
1600 * check whether it's instanceof by using the objects constructor and prototype names.
1601 *
1602 * @param object
1603 * @param constructors
1604 * @return {boolean}
1605 */
1606 var _default = function _default(object, constructors) {
1607 constructors = Array.isArray(constructors) ? constructors : [constructors];
1608
1609 var _iterator = _createForOfIteratorHelper(constructors),
1610 _step;
1611
1612 try {
1613 for (_iterator.s(); !(_step = _iterator.n()).done;) {
1614 var _constructor = _step.value;
1615
1616 if (object.constructor.name === _constructor.prototype[Symbol.toStringTag]) {
1617 return true;
1618 }
1619 }
1620 } catch (err) {
1621 _iterator.e(err);
1622 } finally {
1623 _iterator.f();
1624 }
1625
1626 return false;
1627 };
1628
1629 exports["default"] = _default;
1630
1631 /***/ }),
1632
1633 /***/ "../assets/dev/js/editor/utils/module.js":
1634 /*!***********************************************!*\
1635 !*** ../assets/dev/js/editor/utils/module.js ***!
1636 \***********************************************/
1637 /***/ ((module) => {
1638
1639 "use strict";
1640
1641
1642 var EditorModule = elementorModules.Module.extend({
1643 onInit: function onInit() {
1644 var _this = this;
1645
1646 var $window = jQuery(window);
1647 $window.on('elementor:init-components', this.onElementorInitComponents.bind(this));
1648 $window.on('elementor:loaded', function () {
1649 _this.onElementorLoaded();
1650
1651 elementor.on('document:loaded', _this.onDocumentLoaded.bind(_this));
1652 });
1653 $window.on('elementor:init', this.onElementorReady);
1654 },
1655 // TODO: Delete as soon as possible.
1656 getEditorControlView: function getEditorControlView(name) {
1657 var editor = elementor.getPanelView().getCurrentPageView();
1658 return editor.children.findByModelCid(this.getEditorControlModel(name).cid);
1659 },
1660 // TODO: Delete as soon as possible.
1661 getEditorControlModel: function getEditorControlModel(name) {
1662 var editor = elementor.getPanelView().getCurrentPageView();
1663 return editor.collection.findWhere({
1664 name: name
1665 });
1666 },
1667 onElementorReady: function onElementorReady() {
1668 this.onElementorInit();
1669 elementor.on('frontend:init', this.onElementorFrontendInit.bind(this)).on('preview:loaded', this.onElementorPreviewLoaded.bind(this));
1670 }
1671 });
1672
1673 EditorModule.prototype.onElementorLoaded = function () {};
1674
1675 EditorModule.prototype.onElementorInit = function () {};
1676
1677 EditorModule.prototype.onElementorPreviewLoaded = function () {};
1678
1679 EditorModule.prototype.onDocumentLoaded = function () {};
1680
1681 EditorModule.prototype.onElementorFrontendInit = function () {};
1682
1683 EditorModule.prototype.onElementorInitComponents = function () {};
1684
1685 module.exports = EditorModule;
1686
1687 /***/ }),
1688
1689 /***/ "../assets/dev/js/editor/views/controls-popover.js":
1690 /*!*********************************************************!*\
1691 !*** ../assets/dev/js/editor/views/controls-popover.js ***!
1692 \*********************************************************/
1693 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1694
1695 "use strict";
1696 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
1697
1698
1699 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1700
1701 Object.defineProperty(exports, "__esModule", ({
1702 value: true
1703 }));
1704 exports["default"] = void 0;
1705
1706 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
1707
1708 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1709
1710 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1711
1712 var ControlsPopover = /*#__PURE__*/function () {
1713 function ControlsPopover(child) {
1714 (0, _classCallCheck2.default)(this, ControlsPopover);
1715 this.child = child;
1716 this.$popover = jQuery('<div>', {
1717 class: 'elementor-controls-popover'
1718 });
1719 child.$el.before(this.$popover);
1720 this.$popover.append(child.$el);
1721 this.popoverToggleView = child._parent.children.findByIndex(child._index - 1); // Add the "Typography" header to the popover
1722
1723 if ('typography' === this.child.model.attributes.groupType) {
1724 this.createPopoverHeader();
1725 }
1726 }
1727
1728 (0, _createClass2.default)(ControlsPopover, [{
1729 key: "addChild",
1730 value: function addChild(child) {
1731 this.$popover.append(child.$el);
1732 }
1733 }, {
1734 key: "createPopoverHeader",
1735 value: function createPopoverHeader() {
1736 var _this = this;
1737
1738 var $popoverToggleControl = this.$popover.prev(),
1739 // Get the existing reset button.
1740 $resetLabel = $popoverToggleControl.find('.elementor-control-popover-toggle-reset-label');
1741 this.$popoverHeader = jQuery('<div>', {
1742 class: 'e-group-control-header'
1743 }).html('<span>' + __('Typography', 'elementor') + '</span>');
1744 this.$headerControlsWrapper = jQuery('<div>', {
1745 class: 'e-control-tools'
1746 }); // Give the reset button the control tool styling, and add a click event so clicking on it closes the popover.
1747
1748 $resetLabel.addClass('e-control-tool').on('click', function () {
1749 return _this.onResetButtonClick();
1750 }); // Move the popover toggle reset button into the popover header.
1751
1752 this.$headerControlsWrapper.append($resetLabel);
1753 this.$popoverHeader.append(this.$headerControlsWrapper);
1754 var globalConfig = this.popoverToggleView.model.get('global');
1755
1756 if (globalConfig !== null && globalConfig !== void 0 && globalConfig.active) {
1757 this.createAddButton();
1758 }
1759
1760 this.$popover.prepend(this.$popoverHeader).addClass('e-controls-popover--typography');
1761 }
1762 }, {
1763 key: "onResetButtonClick",
1764 value: function onResetButtonClick() {
1765 this.$popover.hide();
1766 var groupControlName = this.child.model.get('groupPrefix') + 'typography',
1767 args = {
1768 container: this.child.options.container,
1769 settings: (0, _defineProperty2.default)({}, groupControlName, '')
1770 };
1771
1772 if (this.child.options.container.globals.get(groupControlName)) {
1773 // The Disable Globals command applies global settings locally,
1774 // so disabling the global shouldn't actually change the appearance of the widget.
1775 $e.run('document/globals/disable', args);
1776 } else {
1777 $e.run('document/elements/settings', args);
1778 }
1779 }
1780 }, {
1781 key: "onAddButtonClick",
1782 value: function onAddButtonClick() {
1783 this.popoverToggleView.onAddGlobalButtonClick();
1784 }
1785 }, {
1786 key: "createAddButton",
1787 value: function createAddButton() {
1788 var _this2 = this;
1789
1790 this.$addButton = jQuery('<button>', {
1791 class: 'e-control-tool'
1792 }).html(jQuery('<i>', {
1793 class: 'eicon-plus'
1794 }));
1795 this.$headerControlsWrapper.append(this.$addButton);
1796 this.$addButton.on('click', function () {
1797 return _this2.onAddButtonClick();
1798 });
1799 this.$addButton.tipsy({
1800 title: function title() {
1801 return __('Create New Global Font', 'elementor');
1802 },
1803 gravity: function gravity() {
1804 return 's';
1805 }
1806 });
1807 }
1808 }, {
1809 key: "destroy",
1810 value: function destroy() {
1811 this.$popover.remove();
1812 }
1813 }]);
1814 return ControlsPopover;
1815 }();
1816
1817 exports["default"] = ControlsPopover;
1818
1819 /***/ }),
1820
1821 /***/ "../assets/dev/js/editor/views/controls-stack.js":
1822 /*!*******************************************************!*\
1823 !*** ../assets/dev/js/editor/views/controls-stack.js ***!
1824 \*******************************************************/
1825 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1826
1827 "use strict";
1828
1829
1830 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1831
1832 Object.defineProperty(exports, "__esModule", ({
1833 value: true
1834 }));
1835 exports["default"] = void 0;
1836
1837 var _controlsPopover = _interopRequireDefault(__webpack_require__(/*! ./controls-popover */ "../assets/dev/js/editor/views/controls-popover.js"));
1838
1839 var ControlsStack;
1840 ControlsStack = Marionette.CompositeView.extend({
1841 classes: {
1842 popover: 'elementor-controls-popover'
1843 },
1844 activeTab: null,
1845 activeSection: null,
1846 className: function className() {
1847 return 'elementor-controls-stack';
1848 },
1849 templateHelpers: function templateHelpers() {
1850 return {
1851 elementData: elementor.getElementData(this.model)
1852 };
1853 },
1854 childViewOptions: function childViewOptions() {
1855 return {
1856 // TODO: elementSettingsModel is deprecated since 2.8.0.
1857 elementSettingsModel: this.model
1858 };
1859 },
1860 ui: function ui() {
1861 return {
1862 tabs: '.elementor-panel-navigation-tab',
1863 reloadButton: '.elementor-update-preview-button'
1864 };
1865 },
1866 events: function events() {
1867 return {
1868 'click @ui.reloadButton': 'onReloadButtonClick'
1869 };
1870 },
1871 modelEvents: {
1872 destroy: 'onModelDestroy'
1873 },
1874 behaviors: {
1875 HandleInnerTabs: {
1876 behaviorClass: __webpack_require__(/*! elementor-behaviors/inner-tabs */ "../assets/dev/js/editor/elements/views/behaviors/inner-tabs.js")
1877 }
1878 },
1879 initialize: function initialize(options) {
1880 this.initCollection();
1881
1882 if (options.tab) {
1883 this.activeTab = options.tab;
1884 this.activateFirstSection();
1885 }
1886
1887 this.listenTo(elementor.channels.deviceMode, 'change', this.onDeviceModeChange);
1888 },
1889 initCollection: function initCollection() {
1890 this.collection = new Backbone.Collection(_.values(elementor.mergeControlsSettings(this.getOption('controls'))));
1891 },
1892 filter: function filter(controlModel) {
1893 if (controlModel.get('tab') !== this.activeTab) {
1894 return false;
1895 }
1896
1897 if ('section' === controlModel.get('type')) {
1898 return true;
1899 }
1900
1901 var section = controlModel.get('section');
1902 return !section || section === this.activeSection;
1903 },
1904 getControlViewByModel: function getControlViewByModel(model) {
1905 return this.children.findByModelCid(model.cid);
1906 },
1907 getControlViewByName: function getControlViewByName(name) {
1908 return this.getControlViewByModel(this.getControlModel(name));
1909 },
1910 getControlModel: function getControlModel(name) {
1911 return this.collection.findWhere({
1912 name: name
1913 });
1914 },
1915 isVisibleSectionControl: function isVisibleSectionControl(sectionControlModel) {
1916 return this.activeTab === sectionControlModel.get('tab');
1917 },
1918 activateTab: function activateTab(tab) {
1919 this.activeTab = tab;
1920 this.activateFirstSection();
1921
1922 this._renderChildren();
1923
1924 return this;
1925 },
1926 activateSection: function activateSection(sectionName) {
1927 this.activeSection = sectionName;
1928 return this;
1929 },
1930 activateFirstSection: function activateFirstSection() {
1931 var self = this;
1932 var sectionControls = self.collection.filter(function (controlModel) {
1933 return 'section' === controlModel.get('type') && self.isVisibleSectionControl(controlModel);
1934 });
1935 var sectionToActivate;
1936
1937 if (!sectionControls[0]) {
1938 self.activeSection = null;
1939 sectionToActivate = null;
1940 } else {
1941 sectionToActivate = sectionControls[0].get('name');
1942 }
1943
1944 var preActivatedSection = sectionControls.filter(function (controlModel) {
1945 return self.activeSection === controlModel.get('name');
1946 });
1947
1948 if (preActivatedSection[0]) {
1949 return;
1950 }
1951
1952 self.activateSection(sectionToActivate);
1953 return this;
1954 },
1955 getChildView: function getChildView(item) {
1956 var controlType = item.get('type');
1957 return elementor.getControlView(controlType);
1958 },
1959 getNamespaceArray: function getNamespaceArray() {
1960 return [elementor.getPanelView().getCurrentPageName()];
1961 },
1962 openActiveSection: function openActiveSection() {
1963 var activeSection = this.activeSection,
1964 activeSectionView = this.children.filter(function (view) {
1965 return activeSection === view.model.get('name');
1966 });
1967
1968 if (activeSectionView[0]) {
1969 activeSectionView[0].$el.addClass('elementor-open');
1970 var eventNamespace = this.getNamespaceArray();
1971 eventNamespace.push(activeSection, 'activated');
1972 elementor.channels.editor.trigger(eventNamespace.join(':'), this);
1973 }
1974 },
1975 onRenderCollection: function onRenderCollection() {
1976 this.openActiveSection();
1977 ControlsStack.handlePopovers(this);
1978 },
1979 onModelDestroy: function onModelDestroy() {
1980 this.destroy();
1981 },
1982 onReloadButtonClick: function onReloadButtonClick() {
1983 elementor.reloadPreview();
1984 },
1985 onDeviceModeChange: function onDeviceModeChange() {
1986 if ('desktop' === elementor.channels.deviceMode.request('currentMode')) {
1987 this.$el.removeClass('elementor-responsive-switchers-open');
1988 }
1989 },
1990 onChildviewControlSectionClicked: function onChildviewControlSectionClicked(childView) {
1991 var isSectionOpen = childView.$el.hasClass('elementor-open');
1992 this.activateSection(isSectionOpen ? null : childView.model.get('name'));
1993
1994 this._renderChildren();
1995 },
1996 onChildviewResponsiveSwitcherClick: function onChildviewResponsiveSwitcherClick(childView, device) {
1997 if ('desktop' === device) {
1998 this.$el.toggleClass('elementor-responsive-switchers-open');
1999 }
2000 }
2001 }, {
2002 handlePopovers: function handlePopovers(view) {
2003 var popover;
2004 view.popovers = [];
2005 this.removePopovers(view);
2006 view.children.each(function (control) {
2007 if (popover) {
2008 popover.addChild(control);
2009 }
2010
2011 var popoverData = control.model.get('popover');
2012
2013 if (!popoverData) {
2014 return;
2015 }
2016
2017 if (popoverData.start) {
2018 popover = new _controlsPopover.default(control);
2019 view.popovers.push(popover);
2020 }
2021
2022 if (popoverData.end) {
2023 popover = null;
2024 }
2025 });
2026 },
2027 removePopovers: function removePopovers(view) {
2028 view.popovers.forEach(function (popover) {
2029 return popover.destroy();
2030 });
2031 }
2032 });
2033 var _default = ControlsStack;
2034 exports["default"] = _default;
2035
2036 /***/ }),
2037
2038 /***/ "../assets/dev/js/modules/imports/args-object.js":
2039 /*!*******************************************************!*\
2040 !*** ../assets/dev/js/modules/imports/args-object.js ***!
2041 \*******************************************************/
2042 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2043
2044 "use strict";
2045
2046
2047 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2048
2049 Object.defineProperty(exports, "__esModule", ({
2050 value: true
2051 }));
2052 exports["default"] = void 0;
2053
2054 var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
2055
2056 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
2057
2058 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
2059
2060 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
2061
2062 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
2063
2064 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
2065
2066 var _instanceType = _interopRequireDefault(__webpack_require__(/*! ./instance-type */ "../assets/dev/js/modules/imports/instance-type.js"));
2067
2068 var _isInstanceof = _interopRequireDefault(__webpack_require__(/*! ../../editor/utils/is-instanceof */ "../assets/dev/js/editor/utils/is-instanceof.js"));
2069
2070 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
2071
2072 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
2073
2074 var ArgsObject = /*#__PURE__*/function (_InstanceType) {
2075 (0, _inherits2.default)(ArgsObject, _InstanceType);
2076
2077 var _super = _createSuper(ArgsObject);
2078
2079 /**
2080 * Function constructor().
2081 *
2082 * Create ArgsObject.
2083 *
2084 * @param {{}} args
2085 */
2086 function ArgsObject(args) {
2087 var _this;
2088
2089 (0, _classCallCheck2.default)(this, ArgsObject);
2090 _this = _super.call(this);
2091 _this.args = args;
2092 return _this;
2093 }
2094 /**
2095 * Function requireArgument().
2096 *
2097 * Validate property in args.
2098 *
2099 * @param {string} property
2100 * @param {{}} args
2101 *
2102 * @throws {Error}
2103 *
2104 */
2105
2106
2107 (0, _createClass2.default)(ArgsObject, [{
2108 key: "requireArgument",
2109 value: function requireArgument(property) {
2110 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.args;
2111
2112 if (!Object.prototype.hasOwnProperty.call(args, property)) {
2113 throw Error("".concat(property, " is required."));
2114 }
2115 }
2116 /**
2117 * Function requireArgumentType().
2118 *
2119 * Validate property in args using `type === typeof(args.whatever)`.
2120 *
2121 * @param {string} property
2122 * @param {string} type
2123 * @param {{}} args
2124 *
2125 * @throws {Error}
2126 *
2127 */
2128
2129 }, {
2130 key: "requireArgumentType",
2131 value: function requireArgumentType(property, type) {
2132 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
2133 this.requireArgument(property, args);
2134
2135 if ((0, _typeof2.default)(args[property]) !== type) {
2136 throw Error("".concat(property, " invalid type: ").concat(type, "."));
2137 }
2138 }
2139 /**
2140 * Function requireArgumentInstance().
2141 *
2142 * Validate property in args using `args.whatever instanceof instance`.
2143 *
2144 * @param {string} property
2145 * @param {*} instance
2146 * @param {{}} args
2147 *
2148 * @throws {Error}
2149 *
2150 */
2151
2152 }, {
2153 key: "requireArgumentInstance",
2154 value: function requireArgumentInstance(property, instance) {
2155 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
2156 this.requireArgument(property, args);
2157
2158 if (!(args[property] instanceof instance) && !(0, _isInstanceof.default)(args[property], instance)) {
2159 throw Error("".concat(property, " invalid instance."));
2160 }
2161 }
2162 /**
2163 * Function requireArgumentConstructor().
2164 *
2165 * Validate property in args using `type === args.whatever.constructor`.
2166 *
2167 * @param {string} property
2168 * @param {*} type
2169 * @param {{}} args
2170 *
2171 * @throws {Error}
2172 *
2173 */
2174
2175 }, {
2176 key: "requireArgumentConstructor",
2177 value: function requireArgumentConstructor(property, type) {
2178 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
2179 this.requireArgument(property, args); // Note: Converting the constructor to string in order to avoid equation issues
2180 // due to different memory addresses between iframes (window.Object !== window.top.Object).
2181
2182 if (args[property].constructor.toString() !== type.prototype.constructor.toString()) {
2183 throw Error("".concat(property, " invalid constructor type."));
2184 }
2185 }
2186 }], [{
2187 key: "getInstanceType",
2188 value: function getInstanceType() {
2189 return 'ArgsObject';
2190 }
2191 }]);
2192 return ArgsObject;
2193 }(_instanceType.default);
2194
2195 exports["default"] = ArgsObject;
2196
2197 /***/ }),
2198
2199 /***/ "../assets/dev/js/modules/imports/instance-type.js":
2200 /*!*********************************************************!*\
2201 !*** ../assets/dev/js/modules/imports/instance-type.js ***!
2202 \*********************************************************/
2203 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2204
2205 "use strict";
2206
2207
2208 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2209
2210 Object.defineProperty(exports, "__esModule", ({
2211 value: true
2212 }));
2213 exports["default"] = void 0;
2214
2215 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
2216
2217 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
2218
2219 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
2220
2221 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
2222
2223 var InstanceType = /*#__PURE__*/function (_Symbol$hasInstance) {
2224 function InstanceType() {
2225 var _this = this;
2226
2227 (0, _classCallCheck2.default)(this, InstanceType);
2228 // Since anonymous classes sometimes do not get validated by babel, do it manually.
2229 var target = this instanceof InstanceType ? this.constructor : void 0;
2230 var prototypes = [];
2231
2232 while (target.__proto__ && target.__proto__.name) {
2233 prototypes.push(target.__proto__);
2234 target = target.__proto__;
2235 }
2236
2237 prototypes.reverse().forEach(function (proto) {
2238 return _this instanceof proto;
2239 });
2240 }
2241
2242 (0, _createClass2.default)(InstanceType, null, [{
2243 key: _Symbol$hasInstance,
2244 value: function value(target) {
2245 /**
2246 * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class
2247 * its give's opportunity to mange capabilities of instanceOf operator.
2248 * saving current class each time will give option later to handle instanceOf manually.
2249 */
2250 var result = (0, _get2.default)((0, _getPrototypeOf2.default)(InstanceType), Symbol.hasInstance, this).call(this, target); // Act normal when validate a class, which does not have instance type.
2251
2252 if (target && !target.constructor.getInstanceType) {
2253 return result;
2254 }
2255
2256 if (target) {
2257 if (!target.instanceTypes) {
2258 target.instanceTypes = [];
2259 }
2260
2261 if (!result) {
2262 if (this.getInstanceType() === target.constructor.getInstanceType()) {
2263 result = true;
2264 }
2265 }
2266
2267 if (result) {
2268 var name = this.getInstanceType === InstanceType.getInstanceType ? 'BaseInstanceType' : this.getInstanceType();
2269
2270 if (-1 === target.instanceTypes.indexOf(name)) {
2271 target.instanceTypes.push(name);
2272 }
2273 }
2274 }
2275
2276 if (!result && target) {
2277 // Check if the given 'target', is instance of known types.
2278 result = target.instanceTypes && Array.isArray(target.instanceTypes) && -1 !== target.instanceTypes.indexOf(this.getInstanceType());
2279 }
2280
2281 return result;
2282 }
2283 }, {
2284 key: "getInstanceType",
2285 value: function getInstanceType() {
2286 elementorModules.ForceMethodImplementation();
2287 }
2288 }]);
2289 return InstanceType;
2290 }(Symbol.hasInstance);
2291
2292 exports["default"] = InstanceType;
2293
2294 /***/ }),
2295
2296 /***/ "@wordpress/i18n":
2297 /*!**************************!*\
2298 !*** external "wp.i18n" ***!
2299 \**************************/
2300 /***/ ((module) => {
2301
2302 "use strict";
2303 module.exports = wp.i18n;
2304
2305 /***/ }),
2306
2307 /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
2308 /*!******************************************************************!*\
2309 !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
2310 \******************************************************************/
2311 /***/ ((module) => {
2312
2313 function _arrayLikeToArray(arr, len) {
2314 if (len == null || len > arr.length) len = arr.length;
2315
2316 for (var i = 0, arr2 = new Array(len); i < len; i++) {
2317 arr2[i] = arr[i];
2318 }
2319
2320 return arr2;
2321 }
2322
2323 module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
2324
2325 /***/ }),
2326
2327 /***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
2328 /*!****************************************************************!*\
2329 !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
2330 \****************************************************************/
2331 /***/ ((module) => {
2332
2333 function _arrayWithHoles(arr) {
2334 if (Array.isArray(arr)) return arr;
2335 }
2336
2337 module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
2338
2339 /***/ }),
2340
2341 /***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js":
2342 /*!***********************************************************************!*\
2343 !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
2344 \***********************************************************************/
2345 /***/ ((module) => {
2346
2347 function _assertThisInitialized(self) {
2348 if (self === void 0) {
2349 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2350 }
2351
2352 return self;
2353 }
2354
2355 module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
2356
2357 /***/ }),
2358
2359 /***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
2360 /*!****************************************************************!*\
2361 !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
2362 \****************************************************************/
2363 /***/ ((module) => {
2364
2365 function _classCallCheck(instance, Constructor) {
2366 if (!(instance instanceof Constructor)) {
2367 throw new TypeError("Cannot call a class as a function");
2368 }
2369 }
2370
2371 module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
2372
2373 /***/ }),
2374
2375 /***/ "../node_modules/@babel/runtime/helpers/construct.js":
2376 /*!***********************************************************!*\
2377 !*** ../node_modules/@babel/runtime/helpers/construct.js ***!
2378 \***********************************************************/
2379 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2380
2381 var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
2382
2383 var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js");
2384
2385 function _construct(Parent, args, Class) {
2386 if (isNativeReflectConstruct()) {
2387 module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
2388 } else {
2389 module.exports = _construct = function _construct(Parent, args, Class) {
2390 var a = [null];
2391 a.push.apply(a, args);
2392 var Constructor = Function.bind.apply(Parent, a);
2393 var instance = new Constructor();
2394 if (Class) setPrototypeOf(instance, Class.prototype);
2395 return instance;
2396 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
2397 }
2398
2399 return _construct.apply(null, arguments);
2400 }
2401
2402 module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
2403
2404 /***/ }),
2405
2406 /***/ "../node_modules/@babel/runtime/helpers/createClass.js":
2407 /*!*************************************************************!*\
2408 !*** ../node_modules/@babel/runtime/helpers/createClass.js ***!
2409 \*************************************************************/
2410 /***/ ((module) => {
2411
2412 function _defineProperties(target, props) {
2413 for (var i = 0; i < props.length; i++) {
2414 var descriptor = props[i];
2415 descriptor.enumerable = descriptor.enumerable || false;
2416 descriptor.configurable = true;
2417 if ("value" in descriptor) descriptor.writable = true;
2418 Object.defineProperty(target, descriptor.key, descriptor);
2419 }
2420 }
2421
2422 function _createClass(Constructor, protoProps, staticProps) {
2423 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
2424 if (staticProps) _defineProperties(Constructor, staticProps);
2425 Object.defineProperty(Constructor, "prototype", {
2426 writable: false
2427 });
2428 return Constructor;
2429 }
2430
2431 module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
2432
2433 /***/ }),
2434
2435 /***/ "../node_modules/@babel/runtime/helpers/defineProperty.js":
2436 /*!****************************************************************!*\
2437 !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***!
2438 \****************************************************************/
2439 /***/ ((module) => {
2440
2441 function _defineProperty(obj, key, value) {
2442 if (key in obj) {
2443 Object.defineProperty(obj, key, {
2444 value: value,
2445 enumerable: true,
2446 configurable: true,
2447 writable: true
2448 });
2449 } else {
2450 obj[key] = value;
2451 }
2452
2453 return obj;
2454 }
2455
2456 module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
2457
2458 /***/ }),
2459
2460 /***/ "../node_modules/@babel/runtime/helpers/get.js":
2461 /*!*****************************************************!*\
2462 !*** ../node_modules/@babel/runtime/helpers/get.js ***!
2463 \*****************************************************/
2464 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2465
2466 var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js");
2467
2468 function _get() {
2469 if (typeof Reflect !== "undefined" && Reflect.get) {
2470 module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
2471 } else {
2472 module.exports = _get = function _get(target, property, receiver) {
2473 var base = superPropBase(target, property);
2474 if (!base) return;
2475 var desc = Object.getOwnPropertyDescriptor(base, property);
2476
2477 if (desc.get) {
2478 return desc.get.call(arguments.length < 3 ? target : receiver);
2479 }
2480
2481 return desc.value;
2482 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
2483 }
2484
2485 return _get.apply(this, arguments);
2486 }
2487
2488 module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports;
2489
2490 /***/ }),
2491
2492 /***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js":
2493 /*!****************************************************************!*\
2494 !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
2495 \****************************************************************/
2496 /***/ ((module) => {
2497
2498 function _getPrototypeOf(o) {
2499 module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
2500 return o.__proto__ || Object.getPrototypeOf(o);
2501 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
2502 return _getPrototypeOf(o);
2503 }
2504
2505 module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
2506
2507 /***/ }),
2508
2509 /***/ "../node_modules/@babel/runtime/helpers/inherits.js":
2510 /*!**********************************************************!*\
2511 !*** ../node_modules/@babel/runtime/helpers/inherits.js ***!
2512 \**********************************************************/
2513 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2514
2515 var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
2516
2517 function _inherits(subClass, superClass) {
2518 if (typeof superClass !== "function" && superClass !== null) {
2519 throw new TypeError("Super expression must either be null or a function");
2520 }
2521
2522 subClass.prototype = Object.create(superClass && superClass.prototype, {
2523 constructor: {
2524 value: subClass,
2525 writable: true,
2526 configurable: true
2527 }
2528 });
2529 Object.defineProperty(subClass, "prototype", {
2530 writable: false
2531 });
2532 if (superClass) setPrototypeOf(subClass, superClass);
2533 }
2534
2535 module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
2536
2537 /***/ }),
2538
2539 /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
2540 /*!***********************************************************************!*\
2541 !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
2542 \***********************************************************************/
2543 /***/ ((module) => {
2544
2545 function _interopRequireDefault(obj) {
2546 return obj && obj.__esModule ? obj : {
2547 "default": obj
2548 };
2549 }
2550
2551 module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
2552
2553 /***/ }),
2554
2555 /***/ "../node_modules/@babel/runtime/helpers/isNativeFunction.js":
2556 /*!******************************************************************!*\
2557 !*** ../node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
2558 \******************************************************************/
2559 /***/ ((module) => {
2560
2561 function _isNativeFunction(fn) {
2562 return Function.toString.call(fn).indexOf("[native code]") !== -1;
2563 }
2564
2565 module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
2566
2567 /***/ }),
2568
2569 /***/ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js":
2570 /*!**************************************************************************!*\
2571 !*** ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
2572 \**************************************************************************/
2573 /***/ ((module) => {
2574
2575 function _isNativeReflectConstruct() {
2576 if (typeof Reflect === "undefined" || !Reflect.construct) return false;
2577 if (Reflect.construct.sham) return false;
2578 if (typeof Proxy === "function") return true;
2579
2580 try {
2581 Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
2582 return true;
2583 } catch (e) {
2584 return false;
2585 }
2586 }
2587
2588 module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
2589
2590 /***/ }),
2591
2592 /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
2593 /*!**********************************************************************!*\
2594 !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
2595 \**********************************************************************/
2596 /***/ ((module) => {
2597
2598 function _iterableToArrayLimit(arr, i) {
2599 var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2600
2601 if (_i == null) return;
2602 var _arr = [];
2603 var _n = true;
2604 var _d = false;
2605
2606 var _s, _e;
2607
2608 try {
2609 for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
2610 _arr.push(_s.value);
2611
2612 if (i && _arr.length === i) break;
2613 }
2614 } catch (err) {
2615 _d = true;
2616 _e = err;
2617 } finally {
2618 try {
2619 if (!_n && _i["return"] != null) _i["return"]();
2620 } finally {
2621 if (_d) throw _e;
2622 }
2623 }
2624
2625 return _arr;
2626 }
2627
2628 module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
2629
2630 /***/ }),
2631
2632 /***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
2633 /*!*****************************************************************!*\
2634 !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
2635 \*****************************************************************/
2636 /***/ ((module) => {
2637
2638 function _nonIterableRest() {
2639 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2640 }
2641
2642 module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
2643
2644 /***/ }),
2645
2646 /***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
2647 /*!***************************************************************************!*\
2648 !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
2649 \***************************************************************************/
2650 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2651
2652 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
2653
2654 var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js");
2655
2656 function _possibleConstructorReturn(self, call) {
2657 if (call && (_typeof(call) === "object" || typeof call === "function")) {
2658 return call;
2659 } else if (call !== void 0) {
2660 throw new TypeError("Derived constructors may only return object or undefined");
2661 }
2662
2663 return assertThisInitialized(self);
2664 }
2665
2666 module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
2667
2668 /***/ }),
2669
2670 /***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js":
2671 /*!****************************************************************!*\
2672 !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
2673 \****************************************************************/
2674 /***/ ((module) => {
2675
2676 function _setPrototypeOf(o, p) {
2677 module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
2678 o.__proto__ = p;
2679 return o;
2680 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
2681 return _setPrototypeOf(o, p);
2682 }
2683
2684 module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
2685
2686 /***/ }),
2687
2688 /***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
2689 /*!***************************************************************!*\
2690 !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
2691 \***************************************************************/
2692 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2693
2694 var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
2695
2696 var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
2697
2698 var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
2699
2700 var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
2701
2702 function _slicedToArray(arr, i) {
2703 return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
2704 }
2705
2706 module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
2707
2708 /***/ }),
2709
2710 /***/ "../node_modules/@babel/runtime/helpers/superPropBase.js":
2711 /*!***************************************************************!*\
2712 !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***!
2713 \***************************************************************/
2714 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2715
2716 var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js");
2717
2718 function _superPropBase(object, property) {
2719 while (!Object.prototype.hasOwnProperty.call(object, property)) {
2720 object = getPrototypeOf(object);
2721 if (object === null) break;
2722 }
2723
2724 return object;
2725 }
2726
2727 module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports;
2728
2729 /***/ }),
2730
2731 /***/ "../node_modules/@babel/runtime/helpers/typeof.js":
2732 /*!********************************************************!*\
2733 !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
2734 \********************************************************/
2735 /***/ ((module) => {
2736
2737 function _typeof(obj) {
2738 "@babel/helpers - typeof";
2739
2740 return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
2741 return typeof obj;
2742 } : function (obj) {
2743 return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2744 }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
2745 }
2746
2747 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
2748
2749 /***/ }),
2750
2751 /***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
2752 /*!****************************************************************************!*\
2753 !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
2754 \****************************************************************************/
2755 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2756
2757 var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
2758
2759 function _unsupportedIterableToArray(o, minLen) {
2760 if (!o) return;
2761 if (typeof o === "string") return arrayLikeToArray(o, minLen);
2762 var n = Object.prototype.toString.call(o).slice(8, -1);
2763 if (n === "Object" && o.constructor) n = o.constructor.name;
2764 if (n === "Map" || n === "Set") return Array.from(o);
2765 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
2766 }
2767
2768 module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
2769
2770 /***/ }),
2771
2772 /***/ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js":
2773 /*!*****************************************************************!*\
2774 !*** ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
2775 \*****************************************************************/
2776 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2777
2778 var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js");
2779
2780 var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
2781
2782 var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ "../node_modules/@babel/runtime/helpers/isNativeFunction.js");
2783
2784 var construct = __webpack_require__(/*! ./construct.js */ "../node_modules/@babel/runtime/helpers/construct.js");
2785
2786 function _wrapNativeSuper(Class) {
2787 var _cache = typeof Map === "function" ? new Map() : undefined;
2788
2789 module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
2790 if (Class === null || !isNativeFunction(Class)) return Class;
2791
2792 if (typeof Class !== "function") {
2793 throw new TypeError("Super expression must either be null or a function");
2794 }
2795
2796 if (typeof _cache !== "undefined") {
2797 if (_cache.has(Class)) return _cache.get(Class);
2798
2799 _cache.set(Class, Wrapper);
2800 }
2801
2802 function Wrapper() {
2803 return construct(Class, arguments, getPrototypeOf(this).constructor);
2804 }
2805
2806 Wrapper.prototype = Object.create(Class.prototype, {
2807 constructor: {
2808 value: Wrapper,
2809 enumerable: false,
2810 writable: true,
2811 configurable: true
2812 }
2813 });
2814 return setPrototypeOf(Wrapper, Class);
2815 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
2816 return _wrapNativeSuper(Class);
2817 }
2818
2819 module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
2820
2821 /***/ })
2822
2823 /******/ });
2824 /************************************************************************/
2825 /******/ // The module cache
2826 /******/ var __webpack_module_cache__ = {};
2827 /******/
2828 /******/ // The require function
2829 /******/ function __webpack_require__(moduleId) {
2830 /******/ // Check if module is in cache
2831 /******/ var cachedModule = __webpack_module_cache__[moduleId];
2832 /******/ if (cachedModule !== undefined) {
2833 /******/ return cachedModule.exports;
2834 /******/ }
2835 /******/ // Create a new module (and put it into the cache)
2836 /******/ var module = __webpack_module_cache__[moduleId] = {
2837 /******/ // no module.id needed
2838 /******/ // no module.loaded needed
2839 /******/ exports: {}
2840 /******/ };
2841 /******/
2842 /******/ // Execute the module function
2843 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
2844 /******/
2845 /******/ // Return the exports of the module
2846 /******/ return module.exports;
2847 /******/ }
2848 /******/
2849 /************************************************************************/
2850 var __webpack_exports__ = {};
2851 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
2852 (() => {
2853 "use strict";
2854 /*!******************************************!*\
2855 !*** ../assets/dev/js/editor/modules.js ***!
2856 \******************************************/
2857
2858
2859 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2860
2861 var _module = _interopRequireDefault(__webpack_require__(/*! ./utils/module */ "../assets/dev/js/editor/utils/module.js"));
2862
2863 var _introduction = _interopRequireDefault(__webpack_require__(/*! ./utils/introduction */ "../assets/dev/js/editor/utils/introduction.js"));
2864
2865 var _controlsStack = _interopRequireDefault(__webpack_require__(/*! ./views/controls-stack */ "../assets/dev/js/editor/views/controls-stack.js"));
2866
2867 var _baseSettings = _interopRequireDefault(__webpack_require__(/*! ./elements/models/base-settings */ "../assets/dev/js/editor/elements/models/base-settings.js"));
2868
2869 var _container = _interopRequireDefault(__webpack_require__(/*! ./container/container */ "../assets/dev/js/editor/container/container.js"));
2870
2871 elementorModules.editor = {
2872 elements: {
2873 models: {
2874 BaseSettings: _baseSettings.default
2875 }
2876 },
2877 utils: {
2878 Module: _module.default,
2879 Introduction: _introduction.default
2880 },
2881 views: {
2882 ControlsStack: _controlsStack.default
2883 },
2884 Container: _container.default
2885 };
2886 })();
2887
2888 /******/ })()
2889 ;
2890 //# sourceMappingURL=editor-modules.js.map