Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/elementor/assets/js/e-react-promotions.js

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + /******/ (() => { // webpackBootstrap
2 + /******/ var __webpack_modules__ = ({
3 +
4 + /***/ "../assets/dev/js/editor/components/dynamic-tags/control-behavior.js":
5 + /*!***************************************************************************!*\
6 + !*** ../assets/dev/js/editor/components/dynamic-tags/control-behavior.js ***!
7 + \***************************************************************************/
8 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
9 +
10 + "use strict";
11 + /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
12 +
13 +
14 + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
15 + var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
16 + var TagPanelView = __webpack_require__(/*! elementor-dynamic-tags/tag-panel-view */ "../assets/dev/js/editor/components/dynamic-tags/tag-panel-view.js");
17 + module.exports = Marionette.Behavior.extend({
18 + tagView: null,
19 + listenerAttached: false,
20 + initialize: function initialize() {
21 + if (!this.listenerAttached) {
22 + this.listenTo(this.view.options.container.settings, 'change:external:__dynamic__', this.onAfterExternalChange);
23 + this.listenerAttached = true;
24 + }
25 + },
26 + shouldRenderTools: function shouldRenderTools() {
27 + var hasDefault = this.getOption('dynamicSettings').default;
28 + if (hasDefault) {
29 + return false;
30 + }
31 + var isFeatureAvailableToUser = elementor.helpers.hasPro() && !elementor.helpers.hasProAndNotConnected(),
32 + hasTags = this.getOption('tags').length > 0;
33 + return !isFeatureAvailableToUser || hasTags;
34 + },
35 + renderTools: function renderTools() {
36 + var _this = this;
37 + if (!this.shouldRenderTools()) {
38 + return;
39 + }
40 + var $dynamicSwitcher = jQuery(Marionette.Renderer.render('#tmpl-elementor-control-dynamic-switcher'));
41 + $dynamicSwitcher.on('click', function (event) {
42 + return _this.onDynamicSwitcherClick(event);
43 + });
44 + this.$el.find('.elementor-control-dynamic-switcher-wrapper').append($dynamicSwitcher);
45 + this.ui.dynamicSwitcher = $dynamicSwitcher;
46 + if ('color' === this.view.model.get('type')) {
47 + if (this.view.colorPicker) {
48 + this.moveDynamicSwitcherToColorPicker();
49 + } else {
50 + setTimeout(function () {
51 + return _this.moveDynamicSwitcherToColorPicker();
52 + });
53 + }
54 + }
55 +
56 + // Add a Tipsy Tooltip to the Dynamic Switcher
57 + this.ui.dynamicSwitcher.tipsy({
58 + title: function title() {
59 + return this.getAttribute('data-tooltip');
60 + },
61 + gravity: 's'
62 + });
63 + },
64 + moveDynamicSwitcherToColorPicker: function moveDynamicSwitcherToColorPicker() {
65 + var $colorPickerToolsContainer = this.view.colorPicker.$pickerToolsContainer;
66 + this.ui.dynamicSwitcher.removeClass('elementor-control-unit-1').addClass('e-control-tool');
67 + var $eyedropper = $colorPickerToolsContainer.find('.elementor-control-element-color-picker');
68 + if ($eyedropper.length) {
69 + this.ui.dynamicSwitcher.insertBefore($eyedropper);
70 + } else {
71 + $colorPickerToolsContainer.append(this.ui.dynamicSwitcher);
72 + }
73 + },
74 + toggleDynamicClass: function toggleDynamicClass() {
75 + this.$el.toggleClass('elementor-control-dynamic-value', this.isDynamicMode());
76 + },
77 + isDynamicMode: function isDynamicMode() {
78 + var dynamicSettings = this.view.container.settings.get('__dynamic__');
79 + return !!(dynamicSettings && dynamicSettings[this.view.model.get('name')]);
80 + },
81 + createTagsList: function createTagsList() {
82 + var tags = _.groupBy(this.getOption('tags'), 'group'),
83 + groups = elementor.dynamicTags.getConfig('groups'),
84 + $tagsList = this.ui.tagsList = jQuery('<div>', {
85 + class: 'elementor-tags-list'
86 + }),
87 + $tagsListInner = jQuery('<div>', {
88 + class: 'elementor-tags-list__inner'
89 + });
90 + $tagsList.append($tagsListInner);
91 + jQuery.each(groups, function (groupName) {
92 + var groupTags = tags[groupName];
93 + if (!groupTags) {
94 + return;
95 + }
96 + var group = this,
97 + $groupTitle = jQuery('<div>', {
98 + class: 'elementor-tags-list__group-title'
99 + }).text(group.title);
100 + $tagsListInner.append($groupTitle);
101 + groupTags.forEach(function (tag) {
102 + var $tag = jQuery('<div>', {
103 + class: 'elementor-tags-list__item'
104 + });
105 + $tag.text(tag.title).attr('data-tag-name', tag.name);
106 + $tagsListInner.append($tag);
107 + });
108 + });
109 +
110 + // Create and inject pro dynamic teaser template if Pro is not installed
111 + if (!elementor.helpers.hasPro() && Object.keys(tags).length) {
112 + var proTeaser = Marionette.Renderer.render('#tmpl-elementor-dynamic-tags-promo', {
113 + promotionUrl: elementor.config.dynamicPromotionURL.replace('%s', this.view.model.get('name'))
114 + });
115 + $tagsListInner.append(proTeaser);
116 + }
117 + $tagsListInner.on('click', '.elementor-tags-list__item', this.onTagsListItemClick.bind(this));
118 + elementorCommon.elements.$body.append($tagsList);
119 + },
120 + getTagsList: function getTagsList() {
121 + if (!this.ui.tagsList) {
122 + this.createTagsList();
123 + }
124 + return this.ui.tagsList;
125 + },
126 + toggleTagsList: function toggleTagsList() {
127 + var $tagsList = this.getTagsList();
128 + if ($tagsList.is(':visible')) {
129 + $tagsList.hide();
130 + return;
131 + }
132 + var direction = elementorCommon.config.isRTL ? 'left' : 'right';
133 + $tagsList.show().position({
134 + my: "".concat(direction, " top"),
135 + at: "".concat(direction, " bottom+5"),
136 + of: this.ui.dynamicSwitcher
137 + });
138 + },
139 + setTagView: function setTagView(id, name, settings) {
140 + if (this.tagView) {
141 + this.tagView.destroy();
142 + }
143 + var tagView = this.tagView = new TagPanelView({
144 + id: id,
145 + name: name,
146 + settings: settings,
147 + controlName: this.view.model.get('name'),
148 + dynamicSettings: this.getOption('dynamicSettings')
149 + }),
150 + elementContainer = this.view.options.container,
151 + tagViewLabel = elementContainer.controls[tagView.options.controlName].label;
152 + tagView.options.container = new elementorModules.editor.Container({
153 + type: 'dynamic',
154 + id: id,
155 + model: tagView.model,
156 + settings: tagView.model,
157 + view: tagView,
158 + parent: elementContainer,
159 + label: elementContainer.label + ' ' + tagViewLabel,
160 + controls: tagView.model.options.controls,
161 + renderer: elementContainer
162 + });
163 + tagView.render();
164 + this.$el.find('.elementor-control-tag-area').after(tagView.el);
165 + this.listenTo(tagView, 'remove', this.onTagViewRemove.bind(this));
166 + },
167 + setDefaultTagView: function setDefaultTagView() {
168 + var tagData = elementor.dynamicTags.tagTextToTagData(this.getDynamicValue());
169 + this.setTagView(tagData.id, tagData.name, tagData.settings);
170 + },
171 + tagViewToTagText: function tagViewToTagText() {
172 + var tagView = this.tagView;
173 + return elementor.dynamicTags.tagDataToTagText(tagView.getOption('id'), tagView.getOption('name'), tagView.model);
174 + },
175 + getDynamicValue: function getDynamicValue() {
176 + return this.view.container.dynamic.get(this.view.model.get('name'));
177 + },
178 + destroyTagView: function destroyTagView() {
179 + if (this.tagView) {
180 + this.tagView.destroy();
181 + this.tagView = null;
182 + }
183 + },
184 + showPromotion: function showPromotion() {
185 + var hasProAndNotConnected = elementor.helpers.hasProAndNotConnected(),
186 + dialogOptions = {
187 + title: __('Dynamic Content', 'elementor'),
188 + content: __('Create more personalized and dynamic sites by populating data from various sources with dozens of dynamic tags to choose from.', 'elementor'),
189 + targetElement: this.ui.dynamicSwitcher,
190 + position: {
191 + blockStart: '-10'
192 + },
193 + actionButton: {
194 + url: hasProAndNotConnected ? elementorProEditorConfig.urls.connect : elementor.config.dynamicPromotionURL.replace('%s', this.view.model.get('name')),
195 + text: hasProAndNotConnected ? __('Connect & Activate', 'elementor') : __('Upgrade', 'elementor')
196 + }
197 + };
198 + elementor.promotion.showDialog(dialogOptions);
199 + },
200 + onRender: function onRender() {
201 + this.$el.addClass('elementor-control-dynamic');
202 + this.renderTools();
203 + this.toggleDynamicClass();
204 + if (this.isDynamicMode()) {
205 + this.setDefaultTagView();
206 + }
207 + },
208 + onDynamicSwitcherClick: function onDynamicSwitcherClick(event) {
209 + event.stopPropagation();
210 + if (this.getOption('tags').length) {
211 + this.toggleTagsList();
212 + } else {
213 + this.showPromotion();
214 + }
215 + },
216 + onTagsListItemClick: function onTagsListItemClick(event) {
217 + var $tag = jQuery(event.currentTarget);
218 + this.setTagView(elementorCommon.helpers.getUniqueId(), $tag.data('tagName'), {});
219 +
220 + // If an element has an active global value, disable it before applying the dynamic value.
221 + if (this.view.getGlobalKey()) {
222 + this.view.triggerMethod('unset:global:value');
223 + }
224 + if (this.isDynamicMode()) {
225 + $e.run('document/dynamic/settings', {
226 + container: this.view.options.container,
227 + settings: (0, _defineProperty2.default)({}, this.view.model.get('name'), this.tagViewToTagText())
228 + });
229 + } else {
230 + $e.run('document/dynamic/enable', {
231 + container: this.view.options.container,
232 + settings: (0, _defineProperty2.default)({}, this.view.model.get('name'), this.tagViewToTagText())
233 + });
234 + }
235 + this.toggleDynamicClass();
236 + this.toggleTagsList();
237 + if (this.tagView.getTagConfig().settings_required) {
238 + this.tagView.showSettingsPopup();
239 + }
240 + },
241 + onTagViewRemove: function onTagViewRemove() {
242 + $e.run('document/dynamic/disable', {
243 + container: this.view.options.container,
244 + settings: (0, _defineProperty2.default)({}, this.view.model.get('name'), this.tagViewToTagText())
245 + });
246 + this.toggleDynamicClass();
247 + },
248 + onAfterExternalChange: function onAfterExternalChange() {
249 + this.destroyTagView();
250 + if (this.isDynamicMode()) {
251 + this.setDefaultTagView();
252 + }
253 + this.toggleDynamicClass();
254 + },
255 + onDestroy: function onDestroy() {
256 + this.destroyTagView();
257 + if (this.ui.tagsList) {
258 + this.ui.tagsList.remove();
259 + }
260 + }
261 + });
262 +
263 + /***/ }),
264 +
265 + /***/ "../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack-empty.js":
266 + /*!***********************************************************************************!*\
267 + !*** ../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack-empty.js ***!
268 + \***********************************************************************************/
269 + /***/ ((module) => {
270 +
271 + "use strict";
272 +
273 +
274 + module.exports = Marionette.ItemView.extend({
275 + className: 'elementor-tag-controls-stack-empty',
276 + template: '#tmpl-elementor-tag-controls-stack-empty'
277 + });
278 +
279 + /***/ }),
280 +
281 + /***/ "../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack.js":
282 + /*!*****************************************************************************!*\
283 + !*** ../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack.js ***!
284 + \*****************************************************************************/
285 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
286 +
287 + "use strict";
288 +
289 +
290 + var EmptyView = __webpack_require__(/*! elementor-dynamic-tags/tag-controls-stack-empty */ "../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack-empty.js");
291 + module.exports = elementorModules.editor.views.ControlsStack.extend({
292 + activeTab: 'content',
293 + template: _.noop,
294 + emptyView: EmptyView,
295 + isEmpty: function isEmpty() {
296 + // Ignore the section control
297 + return this.collection.length < 2;
298 + },
299 + childViewOptions: function childViewOptions() {
300 + return {
301 + container: this.options.container
302 + };
303 + },
304 + getNamespaceArray: function getNamespaceArray() {
305 + var currentPageView = elementor.getPanelView().getCurrentPageView(),
306 + eventNamespace = currentPageView.getNamespaceArray();
307 + eventNamespace.push(currentPageView.activeSection);
308 + eventNamespace.push(this.getOption('controlName'));
309 + eventNamespace.push(this.getOption('name'));
310 + return eventNamespace;
311 + },
312 + onRenderTemplate: function onRenderTemplate() {
313 + this.activateFirstSection();
314 + }
315 + });
316 +
317 + /***/ }),
318 +
319 + /***/ "../assets/dev/js/editor/components/dynamic-tags/tag-panel-view.js":
320 + /*!*************************************************************************!*\
321 + !*** ../assets/dev/js/editor/components/dynamic-tags/tag-panel-view.js ***!
322 + \*************************************************************************/
323 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
324 +
325 + "use strict";
326 +
327 +
328 + var TagControlsStack = __webpack_require__(/*! elementor-dynamic-tags/tag-controls-stack */ "../assets/dev/js/editor/components/dynamic-tags/tag-controls-stack.js");
329 + module.exports = Marionette.ItemView.extend({
330 + className: 'elementor-dynamic-cover e-input-style',
331 + tagControlsStack: null,
332 + templateHelpers: function templateHelpers() {
333 + var helpers = {};
334 + if (this.model) {
335 + helpers.controls = this.model.options.controls;
336 + }
337 + return helpers;
338 + },
339 + ui: {
340 + remove: '.elementor-dynamic-cover__remove'
341 + },
342 + events: function events() {
343 + var events = {
344 + 'click @ui.remove': 'onRemoveClick'
345 + };
346 + if (this.hasSettings()) {
347 + events.click = 'onClick';
348 + }
349 + return events;
350 + },
351 + getTemplate: function getTemplate() {
352 + var config = this.getTagConfig(),
353 + templateFunction = Marionette.TemplateCache.get('#tmpl-elementor-control-dynamic-cover'),
354 + renderedTemplate = Marionette.Renderer.render(templateFunction, {
355 + hasSettings: this.hasSettings(),
356 + isRemovable: !this.getOption('dynamicSettings').default,
357 + title: config.title,
358 + content: config.panel_template
359 + });
360 + return Marionette.TemplateCache.prototype.compileTemplate(renderedTemplate.trim());
361 + },
362 + getTagConfig: function getTagConfig() {
363 + return elementor.dynamicTags.getConfig('tags.' + this.getOption('name'));
364 + },
365 + initSettingsPopup: function initSettingsPopup() {
366 + var settingsPopupOptions = {
367 + className: 'elementor-tag-settings-popup',
368 + position: {
369 + my: 'left top+5',
370 + at: 'left bottom',
371 + of: this.$el,
372 + autoRefresh: true
373 + },
374 + hide: {
375 + ignore: '.select2-container'
376 + }
377 + };
378 + var settingsPopup = elementorCommon.dialogsManager.createWidget('buttons', settingsPopupOptions);
379 + this.getSettingsPopup = function () {
380 + return settingsPopup;
381 + };
382 + },
383 + hasSettings: function hasSettings() {
384 + return !!Object.values(this.getTagConfig().controls).length;
385 + },
386 + showSettingsPopup: function showSettingsPopup() {
387 + if (!this.tagControlsStack) {
388 + this.initTagControlsStack();
389 + }
390 + var settingsPopup = this.getSettingsPopup();
391 + if (settingsPopup.isVisible()) {
392 + return;
393 + }
394 + settingsPopup.show();
395 + },
396 + initTagControlsStack: function initTagControlsStack() {
397 + this.tagControlsStack = new TagControlsStack({
398 + model: this.model,
399 + controls: this.model.controls,
400 + name: this.options.name,
401 + controlName: this.options.controlName,
402 + container: this.options.container,
403 + el: this.getSettingsPopup().getElements('message')[0]
404 + });
405 + this.tagControlsStack.render();
406 + },
407 + initModel: function initModel() {
408 + this.model = new elementorModules.editor.elements.models.BaseSettings(this.getOption('settings'), {
409 + controls: this.getTagConfig().controls
410 + });
411 + },
412 + initialize: function initialize() {
413 + // The `model` should always be available.
414 + this.initModel();
415 + if (!this.hasSettings()) {
416 + return;
417 + }
418 + this.initSettingsPopup();
419 + this.listenTo(this.model, 'change', this.render);
420 + },
421 + onClick: function onClick() {
422 + this.showSettingsPopup();
423 + },
424 + onRemoveClick: function onRemoveClick(event) {
425 + event.stopPropagation();
426 + this.destroy();
427 + this.trigger('remove');
428 + },
429 + onDestroy: function onDestroy() {
430 + if (this.hasSettings()) {
431 + this.getSettingsPopup().destroy();
432 + }
433 + if (this.tagControlsStack) {
434 + this.tagControlsStack.destroy();
435 + }
436 + }
437 + });
438 +
439 + /***/ }),
440 +
441 + /***/ "../assets/dev/js/editor/components/validator/base.js":
442 + /*!************************************************************!*\
443 + !*** ../assets/dev/js/editor/components/validator/base.js ***!
444 + \************************************************************/
445 + /***/ ((module) => {
446 +
447 + "use strict";
448 +
449 +
450 + module.exports = elementorModules.Module.extend({
451 + errors: [],
452 + __construct: function __construct(settings) {
453 + var customValidationMethod = settings.customValidationMethod;
454 + if (customValidationMethod) {
455 + this.validationMethod = customValidationMethod;
456 + }
457 + },
458 + getDefaultSettings: function getDefaultSettings() {
459 + return {
460 + validationTerms: {}
461 + };
462 + },
463 + isValid: function isValid() {
464 + var validationErrors = this.validationMethod.apply(this, arguments);
465 + if (validationErrors.length) {
466 + this.errors = validationErrors;
467 + return false;
468 + }
469 + return true;
470 + },
471 + validationMethod: function validationMethod(newValue) {
472 + var validationTerms = this.getSettings('validationTerms'),
473 + errors = [];
474 + if (validationTerms.required) {
475 + if (!('' + newValue).length) {
476 + errors.push('Required value is empty');
477 + }
478 + }
479 + return errors;
480 + }
481 + });
482 +
483 + /***/ }),
484 +
485 + /***/ "../assets/dev/js/editor/components/validator/breakpoint.js":
486 + /*!******************************************************************!*\
487 + !*** ../assets/dev/js/editor/components/validator/breakpoint.js ***!
488 + \******************************************************************/
489 + /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
490 +
491 + "use strict";
492 +
493 +
494 + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
495 + Object.defineProperty(exports, "__esModule", ({
496 + value: true
497 + }));
498 + exports["default"] = void 0;
499 + var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
500 + var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
501 + var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
502 + var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
503 + var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
504 + function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
505 + function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
506 + var NumberValidator = __webpack_require__(/*! elementor-validator/number */ "../assets/dev/js/editor/components/validator/number.js");
507 + var BreakpointValidator = exports["default"] = /*#__PURE__*/function (_NumberValidator) {
508 + function BreakpointValidator() {
509 + (0, _classCallCheck2.default)(this, BreakpointValidator);
510 + return _callSuper(this, BreakpointValidator, arguments);
511 + }
512 + (0, _inherits2.default)(BreakpointValidator, _NumberValidator);
513 + return (0, _createClass2.default)(BreakpointValidator, [{
514 + key: "getDefaultSettings",
515 + value: function getDefaultSettings() {
516 + return {
517 + validationTerms: {
518 + // Max width we allow in general
519 + max: 5120
520 + }
521 + };
522 + }
523 +
524 + /**
525 + * Get Panel Active Breakpoints
526 + *
527 + * Since the active kit used in the Site Settings panel could be a draft, we need to use the panel's active
528 + * breakpoints settings and not the elementorFrontend.config values (which come from the DB).
529 + *
530 + * @return {*} Object
531 + */
532 + }, {
533 + key: "getPanelActiveBreakpoints",
534 + value: function getPanelActiveBreakpoints() {
535 + var panelBreakpoints = elementor.documents.currentDocument.config.settings.settings.active_breakpoints.map(function (breakpointName) {
536 + return breakpointName.replace('viewport_', '');
537 + }),
538 + panelActiveBreakpoints = {};
539 + panelBreakpoints.forEach(function (breakpointName) {
540 + panelActiveBreakpoints[breakpointName] = elementorFrontend.config.responsive.breakpoints[breakpointName];
541 + });
542 + return panelActiveBreakpoints;
543 + }
544 + }, {
545 + key: "initBreakpointProperties",
546 + value: function initBreakpointProperties() {
547 + var _activeBreakpoints$br, _activeBreakpoints$br2;
548 + var validationTerms = this.getSettings('validationTerms'),
549 + activeBreakpoints = this.getPanelActiveBreakpoints(),
550 + breakpointKeys = Object.keys(activeBreakpoints);
551 + this.breakpointIndex = breakpointKeys.indexOf(validationTerms.breakpointName);
552 + this.topBreakpoint = (_activeBreakpoints$br = activeBreakpoints[breakpointKeys[this.breakpointIndex + 1]]) === null || _activeBreakpoints$br === void 0 ? void 0 : _activeBreakpoints$br.value;
553 + this.bottomBreakpoint = (_activeBreakpoints$br2 = activeBreakpoints[breakpointKeys[this.breakpointIndex - 1]]) === null || _activeBreakpoints$br2 === void 0 ? void 0 : _activeBreakpoints$br2.value;
554 + }
555 + }, {
556 + key: "validationMethod",
557 + value: function validationMethod(newValue) {
558 + var validationTerms = this.getSettings('validationTerms'),
559 + errors = NumberValidator.prototype.validationMethod.call(this, newValue);
560 +
561 + // Validate both numeric and empty values, since breakpoints utilize default values when empty.
562 + if (_.isFinite(newValue) || '' === newValue) {
563 + if (!this.validateMinMaxForBreakpoint(newValue, validationTerms)) {
564 + errors.push('Value is not between the breakpoints above or under the edited breakpoint');
565 + }
566 + }
567 + return errors;
568 + }
569 + }, {
570 + key: "validateMinMaxForBreakpoint",
571 + value: function validateMinMaxForBreakpoint(newValue, validationTerms) {
572 + var breakpointDefaultValue = elementorFrontend.config.responsive.breakpoints[validationTerms.breakpointName].default_value;
573 + var isValid = true;
574 + this.initBreakpointProperties();
575 +
576 + // Since the following comparison is <=, allow usage of the 320px value for the mobile breakpoint.
577 + if ('mobile' === validationTerms.breakpointName && 320 === this.bottomBreakpoint) {
578 + this.bottomBreakpoint -= 1;
579 + }
580 +
581 + // If there is a breakpoint below the currently edited breakpoint
582 + if (this.bottomBreakpoint) {
583 + // Check that the new value is not under the bottom breakpoint's value.
584 + if ('' !== newValue && newValue <= this.bottomBreakpoint) {
585 + isValid = false;
586 + }
587 +
588 + // If the new value is empty, check that the default breakpoint value is not below the bottom breakpoint.
589 + if ('' === newValue && breakpointDefaultValue <= this.bottomBreakpoint) {
590 + isValid = false;
591 + }
592 + }
593 +
594 + // If there is a breakpoint above the currently edited breakpoint.
595 + if (this.topBreakpoint) {
596 + // Check that the value is not above the top breakpoint's value.
597 + if ('' !== newValue && newValue >= this.topBreakpoint) {
598 + isValid = false;
599 + }
600 +
601 + // If the new value is empty, check that the default breakpoint value is not above the top breakpoint.
602 + if ('' === newValue && breakpointDefaultValue >= this.topBreakpoint) {
603 + isValid = false;
604 + }
605 + }
606 + return isValid;
607 + }
608 + }]);
609 + }(NumberValidator);
610 +
611 + /***/ }),
612 +
613 + /***/ "../assets/dev/js/editor/components/validator/number.js":
614 + /*!**************************************************************!*\
615 + !*** ../assets/dev/js/editor/components/validator/number.js ***!
616 + \**************************************************************/
617 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
618 +
619 + "use strict";
620 +
621 +
622 + var Validator = __webpack_require__(/*! elementor-validator/base */ "../assets/dev/js/editor/components/validator/base.js");
623 + module.exports = Validator.extend({
624 + validationMethod: function validationMethod(newValue) {
625 + var validationTerms = this.getSettings('validationTerms'),
626 + errors = [];
627 + if (_.isFinite(newValue)) {
628 + if (undefined !== validationTerms.min && newValue < validationTerms.min) {
629 + errors.push('Value is less than minimum');
630 + }
631 + if (undefined !== validationTerms.max && newValue > validationTerms.max) {
632 + errors.push('Value is greater than maximum');
633 + }
634 + }
635 + return errors;
636 + }
637 + });
638 +
639 + /***/ }),
640 +
641 + /***/ "../assets/dev/js/editor/controls/base-data.js":
642 + /*!*****************************************************!*\
643 + !*** ../assets/dev/js/editor/controls/base-data.js ***!
644 + \*****************************************************/
645 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
646 +
647 + "use strict";
648 +
649 +
650 + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
651 + var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
652 + var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
653 + var _breakpoint = _interopRequireDefault(__webpack_require__(/*! elementor-validator/breakpoint */ "../assets/dev/js/editor/components/validator/breakpoint.js"));
654 + function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
655 + function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
656 + function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
657 + var ControlBaseView = __webpack_require__(/*! elementor-controls/base */ "../assets/dev/js/editor/controls/base.js"),
658 + TagsBehavior = __webpack_require__(/*! elementor-dynamic-tags/control-behavior */ "../assets/dev/js/editor/components/dynamic-tags/control-behavior.js"),
659 + Validator = __webpack_require__(/*! elementor-validator/base */ "../assets/dev/js/editor/components/validator/base.js"),
660 + NumberValidator = __webpack_require__(/*! elementor-validator/number */ "../assets/dev/js/editor/components/validator/number.js"),
661 + ControlBaseDataView;
662 + ControlBaseDataView = ControlBaseView.extend({
663 + validatorTypes: {
664 + Base: Validator,
665 + Number: NumberValidator,
666 + Breakpoint: _breakpoint.default
667 + },
668 + ui: function ui() {
669 + var ui = ControlBaseView.prototype.ui.apply(this, arguments);
670 + _.extend(ui, {
671 + input: 'input[data-setting][type!="checkbox"][type!="radio"]',
672 + checkbox: 'input[data-setting][type="checkbox"]',
673 + radio: 'input[data-setting][type="radio"]',
674 + select: 'select[data-setting]',
675 + textarea: 'textarea[data-setting]',
676 + responsiveSwitchersSibling: "".concat(ui.controlTitle, "[data-e-responsive-switcher-sibling!=\"false\"]"),
677 + responsiveSwitchers: '.elementor-responsive-switcher',
678 + contentEditable: '[contenteditable="true"]'
679 + });
680 + return ui;
681 + },
682 + templateHelpers: function templateHelpers() {
683 + var controlData = ControlBaseView.prototype.templateHelpers.apply(this, arguments);
684 + controlData.data.controlValue = this.getControlValue();
685 + return controlData;
686 + },
687 + events: function events() {
688 + return {
689 + 'input @ui.input': 'onBaseInputTextChange',
690 + 'change @ui.checkbox': 'onBaseInputChange',
691 + 'change @ui.radio': 'onBaseInputChange',
692 + 'input @ui.textarea': 'onBaseInputTextChange',
693 + 'change @ui.select': 'onBaseInputChange',
694 + 'input @ui.contentEditable': 'onBaseInputTextChange',
695 + 'click @ui.responsiveSwitchers': 'onResponsiveSwitchersClick'
696 + };
697 + },
698 + behaviors: function behaviors() {
699 + var behaviors = ControlBaseView.prototype.behaviors.apply(this, arguments),
700 + dynamicSettings = this.options.model.get('dynamic');
701 + if (dynamicSettings && dynamicSettings.active) {
702 + var tags = _.filter(elementor.dynamicTags.getConfig('tags'), function (tag) {
703 + return tag.editable && _.intersection(tag.categories, dynamicSettings.categories).length;
704 + });
705 + if (tags.length || elementor.config.user.is_administrator) {
706 + behaviors.tags = {
707 + behaviorClass: TagsBehavior,
708 + tags: tags,
709 + dynamicSettings: dynamicSettings
710 + };
711 + }
712 + }
713 + return behaviors;
714 + },
715 + initialize: function initialize() {
716 + ControlBaseView.prototype.initialize.apply(this, arguments);
717 + this.registerValidators();
718 + if (this.model.get('responsive')) {
719 + this.setPlaceholderFromParent();
720 + }
721 + if (undefined === this.model.get('inherit_placeholders')) {
722 + this.model.set('inherit_placeholders', true);
723 + }
724 +
725 + // TODO: this.elementSettingsModel is deprecated since 2.8.0.
726 + var settings = this.container ? this.container.settings : this.elementSettingsModel;
727 + this.listenTo(settings, 'change:external:' + this.model.get('name'), this.onAfterExternalChange);
728 + },
729 + getControlValue: function getControlValue() {
730 + return this.container.settings.get(this.model.get('name'));
731 + },
732 + getGlobalKey: function getGlobalKey() {
733 + return this.container.globals.get(this.model.get('name'));
734 + },
735 + getGlobalValue: function getGlobalValue() {
736 + return this.globalValue;
737 + },
738 + getGlobalDefault: function getGlobalDefault() {
739 + var controlGlobalArgs = this.model.get('global');
740 + if (controlGlobalArgs !== null && controlGlobalArgs !== void 0 && controlGlobalArgs.default) {
741 + // If the control is a color/typography control and default colors/typography are disabled, don't return the global value.
742 + if (!elementor.config.globals.defaults_enabled[this.getGlobalMeta().controlType]) {
743 + return '';
744 + }
745 + var _$e$data$commandExtra = $e.data.commandExtractArgs(controlGlobalArgs.default),
746 + command = _$e$data$commandExtra.command,
747 + args = _$e$data$commandExtra.args,
748 + result = $e.data.getCache($e.components.get('globals'), command, args.query);
749 + return result === null || result === void 0 ? void 0 : result.value;
750 + }
751 +
752 + // No global default.
753 + return '';
754 + },
755 + getCurrentValue: function getCurrentValue() {
756 + if (this.getGlobalKey() && !this.globalValue) {
757 + return '';
758 + }
759 + if (this.globalValue) {
760 + return this.globalValue;
761 + }
762 + var controlValue = this.getControlValue();
763 + if (controlValue) {
764 + return controlValue;
765 + }
766 + return this.getGlobalDefault();
767 + },
768 + isGlobalActive: function isGlobalActive() {
769 + var _this$options$model$g;
770 + return (_this$options$model$g = this.options.model.get('global')) === null || _this$options$model$g === void 0 ? void 0 : _this$options$model$g.active;
771 + },
772 + setValue: function setValue(value) {
773 + this.setSettingsModel(value);
774 + },
775 + setSettingsModel: function setSettingsModel(value) {
776 + var key = this.model.get('name');
777 + $e.run('document/elements/settings', {
778 + container: this.options.container,
779 + settings: (0, _defineProperty2.default)({}, key, value)
780 + });
781 + this.triggerMethod('settings:change');
782 + },
783 + applySavedValue: function applySavedValue() {
784 + this.setInputValue('[data-setting="' + this.model.get('name') + '"]', this.getControlValue());
785 + },
786 + getEditSettings: function getEditSettings(setting) {
787 + var settings = this.getOption('elementEditSettings').toJSON();
788 + if (setting) {
789 + return settings[setting];
790 + }
791 + return settings;
792 + },
793 + setEditSetting: function setEditSetting(settingKey, settingValue) {
794 + var settings = this.getOption('elementEditSettings') || this.getOption('container').settings;
795 + settings.set(settingKey, settingValue);
796 + },
797 + /**
798 + * Get the placeholder for the current control.
799 + *
800 + * @return {*} placeholder
801 + */
802 + getControlPlaceholder: function getControlPlaceholder() {
803 + var placeholder = this.model.get('placeholder');
804 + if (this.model.get('responsive') && this.model.get('inherit_placeholders')) {
805 + placeholder = placeholder || this.container.placeholders[this.model.get('name')];
806 + }
807 + return placeholder;
808 + },
809 + /**
810 + * Get the responsive parent view if exists.
811 + *
812 + * @return {ControlBaseDataView|undefined} responsive parent view if exists
813 + */
814 + getResponsiveParentView: function getResponsiveParentView() {
815 + var parent = this.model.get('parent');
816 + try {
817 + return parent && this.container.panel.getControlView(parent);
818 + // eslint-disable-next-line no-empty
819 + } catch (e) {}
820 + },
821 + /**
822 + * Get the responsive children views if exists.
823 + *
824 + * @return {ControlBaseDataView|null} responsive children views if exists
825 + */
826 + getResponsiveChildrenViews: function getResponsiveChildrenViews() {
827 + var children = this.model.get('inheritors'),
828 + views = [];
829 + try {
830 + var _iterator = _createForOfIteratorHelper(children),
831 + _step;
832 + try {
833 + for (_iterator.s(); !(_step = _iterator.n()).done;) {
834 + var child = _step.value;
835 + views.push(this.container.panel.getControlView(child));
836 + }
837 + // eslint-disable-next-line no-empty
838 + } catch (err) {
839 + _iterator.e(err);
840 + } finally {
841 + _iterator.f();
842 + }
843 + } catch (e) {}
844 + return views;
845 + },
846 + /**
847 + * Get prepared placeholder from the responsive parent, and put it into current
848 + * control model as placeholder.
849 + */
850 + setPlaceholderFromParent: function setPlaceholderFromParent() {
851 + var parent = this.getResponsiveParentView();
852 + if (parent) {
853 + this.container.placeholders[this.model.get('name')] = parent.preparePlaceholderForChildren();
854 + }
855 + },
856 + /**
857 + * Returns the value of the current control if exists, or the parent value if not,
858 + * so responsive children can set it as their placeholder. When there are multiple
859 + * inputs, the inputs which are empty on this control will inherit their values
860 + * from the responsive parent.
861 + * For example, if on desktop the padding of all edges is 10, and on tablet only
862 + * padding right and left is set to 15, the mobile control placeholder will
863 + * eventually be: { top: 10, right: 15, left: 15, bottom: 10 }, because of the
864 + * inheritance of multiple values.
865 + *
866 + * @return {*} value of the current control if exists, or the parent value if not
867 + */
868 + preparePlaceholderForChildren: function preparePlaceholderForChildren() {
869 + var _this$getResponsivePa;
870 + var cleanValue = this.getCleanControlValue(),
871 + parentValue = (_this$getResponsivePa = this.getResponsiveParentView()) === null || _this$getResponsivePa === void 0 ? void 0 : _this$getResponsivePa.preparePlaceholderForChildren();
872 + if (cleanValue instanceof Object) {
873 + return Object.assign({}, parentValue, cleanValue);
874 + }
875 + return cleanValue || parentValue;
876 + },
877 + /**
878 + * Start the re-rendering recursive chain from the responsive child of this
879 + * control. It's useful when the current control value is changed and we want
880 + * to update all responsive children. In this case, the re-rendering is supposed
881 + * to be applied only from the responsive child of this control and on.
882 + */
883 + propagatePlaceholder: function propagatePlaceholder() {
884 + var children = this.getResponsiveChildrenViews();
885 + var _iterator2 = _createForOfIteratorHelper(children),
886 + _step2;
887 + try {
888 + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
889 + var child = _step2.value;
890 + child.renderWithChildren();
891 + }
892 + } catch (err) {
893 + _iterator2.e(err);
894 + } finally {
895 + _iterator2.f();
896 + }
897 + },
898 + /**
899 + * Re-render current control and trigger this method on the responsive child.
900 + * The purpose of those actions is to recursively re-render all responsive
901 + * children.
902 + */
903 + renderWithChildren: function renderWithChildren() {
904 + this.render();
905 + this.propagatePlaceholder();
906 + },
907 + /**
908 + * Get control value without empty properties, and without default values.
909 + *
910 + * @return {{}} control value without empty properties, and without default values
911 + */
912 + getCleanControlValue: function getCleanControlValue() {
913 + var value = this.getControlValue();
914 + return value && value !== this.model.get('default') ? value : undefined;
915 + },
916 + onAfterChange: function onAfterChange(control) {
917 + if (Object.keys(control.changed).includes(this.model.get('name'))) {
918 + this.propagatePlaceholder();
919 + }
920 + ControlBaseView.prototype.onAfterChange.apply(this, arguments);
921 + },
922 + getInputValue: function getInputValue(input) {
923 + var $input = this.$(input);
924 + if ($input.is('[contenteditable="true"]')) {
925 + return $input.html();
926 + }
927 + var inputValue = $input.val(),
928 + inputType = $input.attr('type');
929 + if (-1 !== ['radio', 'checkbox'].indexOf(inputType)) {
930 + return $input.prop('checked') ? inputValue : '';
931 + }
932 + if ('number' === inputType && _.isFinite(inputValue)) {
933 + return +inputValue;
934 + }
935 +
936 + // Temp fix for jQuery (< 3.0) that return null instead of empty array
937 + if ('SELECT' === input.tagName && $input.prop('multiple') && null === inputValue) {
938 + inputValue = [];
939 + }
940 + return inputValue;
941 + },
942 + setInputValue: function setInputValue(input, value) {
943 + var $input = this.$(input),
944 + inputType = $input.attr('type');
945 + if ('checkbox' === inputType) {
946 + $input.prop('checked', !!value);
947 + } else if ('radio' === inputType) {
948 + $input.filter('[value="' + value + '"]').prop('checked', true);
949 + } else {
950 + $input.val(value);
951 + }
952 + },
953 + addValidator: function addValidator(validator) {
954 + this.validators.push(validator);
955 + },
956 + registerValidators: function registerValidators() {
957 + var _this = this;
958 + this.validators = [];
959 + var validationTerms = {};
960 + if (this.model.get('required')) {
961 + validationTerms.required = true;
962 + }
963 + if (!jQuery.isEmptyObject(validationTerms)) {
964 + this.addValidator(new this.validatorTypes.Base({
965 + validationTerms: validationTerms
966 + }));
967 + }
968 + var validators = this.model.get('validators');
969 + if (validators) {
970 + Object.entries(validators).forEach(function (_ref) {
971 + var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
972 + key = _ref2[0],
973 + args = _ref2[1];
974 + _this.addValidator(new _this.validatorTypes[key]({
975 + validationTerms: args
976 + }));
977 + });
978 + }
979 + },
980 + onBeforeRender: function onBeforeRender() {
981 + this.setPlaceholderFromParent();
982 + },
983 + onRender: function onRender() {
984 + ControlBaseView.prototype.onRender.apply(this, arguments);
985 + if (this.model.get('responsive')) {
986 + this.renderResponsiveSwitchers();
987 + }
988 + this.applySavedValue();
989 + this.triggerMethod('ready');
990 + this.toggleControlVisibility();
991 + this.addTooltip();
992 + },
993 + onBaseInputTextChange: function onBaseInputTextChange(event) {
994 + this.onBaseInputChange(event);
995 + },
996 + onBaseInputChange: function onBaseInputChange(event) {
997 + clearTimeout(this.correctionTimeout);
998 + var input = event.currentTarget,
999 + value = this.getInputValue(input),
1000 + validators = this.validators.slice(0),
1001 + settingsValidators = this.container.settings.validators[this.model.get('name')];
1002 + if (settingsValidators) {
1003 + validators = validators.concat(settingsValidators);
1004 + }
1005 + if (validators) {
1006 + var oldValue = this.getControlValue(input.dataset.setting);
1007 + var isValidValue = validators.every(function (validator) {
1008 + return validator.isValid(value, oldValue);
1009 + });
1010 + if (!isValidValue) {
1011 + this.correctionTimeout = setTimeout(this.setInputValue.bind(this, input, oldValue), 1200);
1012 + return;
1013 + }
1014 + }
1015 + this.updateElementModel(value, input);
1016 + this.triggerMethod('input:change', event);
1017 + },
1018 + onResponsiveSwitchersClick: function onResponsiveSwitchersClick(event) {
1019 + var $switcher = jQuery(event.currentTarget),
1020 + device = $switcher.data('device'),
1021 + $switchersWrapper = this.ui.responsiveSwitchersWrapper,
1022 + selectedOption = $switcher.index();
1023 + $switchersWrapper.toggleClass('elementor-responsive-switchers-open');
1024 + $switchersWrapper[0].style.setProperty('--selected-option', selectedOption);
1025 + this.triggerMethod('responsive:switcher:click', device);
1026 + elementor.changeDeviceMode(device);
1027 + },
1028 + renderResponsiveSwitchers: function renderResponsiveSwitchers() {
1029 + var templateHtml = Marionette.Renderer.render('#tmpl-elementor-control-responsive-switchers', this.model.attributes);
1030 + this.ui.responsiveSwitchersSibling.after(templateHtml);
1031 + this.ui.responsiveSwitchersWrapper = this.$el.find('.elementor-control-responsive-switchers');
1032 + },
1033 + onAfterExternalChange: function onAfterExternalChange() {
1034 + this.hideTooltip();
1035 + this.applySavedValue();
1036 + },
1037 + addTooltip: function addTooltip() {
1038 + this.ui.tooltipTargets = this.$el.find('.tooltip-target');
1039 + if (!this.ui.tooltipTargets.length) {
1040 + return;
1041 + }
1042 +
1043 + // Create tooltip on controls
1044 + this.ui.tooltipTargets.tipsy({
1045 + gravity: function gravity() {
1046 + // `n` for down, `s` for up
1047 + var gravity = jQuery(this).data('tooltip-pos');
1048 + if (undefined !== gravity) {
1049 + return gravity;
1050 + }
1051 + return 's';
1052 + },
1053 + title: function title() {
1054 + return this.getAttribute('data-tooltip');
1055 + }
1056 + });
1057 + },
1058 + hideTooltip: function hideTooltip() {
1059 + if (this.ui.tooltipTargets.length) {
1060 + this.ui.tooltipTargets.tipsy('hide');
1061 + }
1062 + },
1063 + updateElementModel: function updateElementModel(value) {
1064 + this.setValue(value);
1065 + }
1066 + }, {
1067 + // Static methods
1068 + getStyleValue: function getStyleValue(placeholder, controlValue, controlData) {
1069 + if ('DEFAULT' === placeholder) {
1070 + return controlData.default;
1071 + }
1072 + return controlValue;
1073 + },
1074 + onPasteStyle: function onPasteStyle() {
1075 + return true;
1076 + }
1077 + });
1078 + module.exports = ControlBaseDataView;
1079 +
1080 + /***/ }),
1081 +
1082 + /***/ "../assets/dev/js/editor/controls/base.js":
1083 + /*!************************************************!*\
1084 + !*** ../assets/dev/js/editor/controls/base.js ***!
1085 + \************************************************/
1086 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1087 +
1088 + "use strict";
1089 +
1090 +
1091 + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1092 + var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
1093 + function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1094 + function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1095 + var ControlBaseView;
1096 + ControlBaseView = Marionette.CompositeView.extend({
1097 + ui: function ui() {
1098 + return {
1099 + controlTitle: '.elementor-control-title'
1100 + };
1101 + },
1102 + behaviors: function behaviors() {
1103 + var behaviors = {};
1104 + return elementor.hooks.applyFilters('controls/base/behaviors', behaviors, this);
1105 + },
1106 + getBehavior: function getBehavior(name) {
1107 + return this._behaviors[Object.keys(this.behaviors()).indexOf(name)];
1108 + },
1109 + className: function className() {
1110 + // TODO: Any better classes for that?
1111 + var classes = 'elementor-control elementor-control-' + this.model.get('name') + ' elementor-control-type-' + this.model.get('type'),
1112 + modelClasses = this.model.get('classes'),
1113 + responsive = this.model.get('responsive');
1114 + if (!_.isEmpty(modelClasses)) {
1115 + classes += ' ' + modelClasses;
1116 + }
1117 + if (!_.isEmpty(responsive)) {
1118 + var responsiveControlName = responsive.max || responsive.min;
1119 + classes += ' elementor-control-responsive-' + responsiveControlName;
1120 + }
1121 + return classes;
1122 + },
1123 + templateHelpers: function templateHelpers() {
1124 + var controlData = {
1125 + _cid: this.model.cid
1126 + };
1127 + return {
1128 + view: this,
1129 + data: _.extend({}, this.model.toJSON(), controlData)
1130 + };
1131 + },
1132 + getTemplate: function getTemplate() {
1133 + return Marionette.TemplateCache.get('#tmpl-elementor-control-' + this.model.get('type') + '-content');
1134 + },
1135 + initialize: function initialize(options) {
1136 + var label = this.model.get('label');
1137 +
1138 + // TODO: Temp backwards compatibility. since 2.8.0.
1139 + Object.defineProperty(this, 'container', {
1140 + get: function get() {
1141 + if (!options.container) {
1142 + var settingsModel = options.elementSettingsModel,
1143 + view = $e.components.get('document').utils.findViewById(settingsModel.id);
1144 +
1145 + // Element control.
1146 + if (view && view.getContainer) {
1147 + options.container = view.getContainer();
1148 + } else {
1149 + if (!settingsModel.id) {
1150 + settingsModel.id = 'bc-' + elementorCommon.helpers.getUniqueId();
1151 + }
1152 +
1153 + // Document/General/Other control.
1154 + options.container = new elementorModules.editor.Container({
1155 + type: 'bc-container',
1156 + id: settingsModel.id,
1157 + model: settingsModel,
1158 + settings: settingsModel,
1159 + label: label,
1160 + view: false,
1161 + parent: false,
1162 + renderer: false,
1163 + controls: settingsModel.options.controls
1164 + });
1165 + }
1166 + }
1167 + return options.container;
1168 + }
1169 + });
1170 +
1171 + // Use `defineProperty` because `get elementSettingsModel()` fails during the `Marionette.CompositeView.extend`.
1172 + Object.defineProperty(this, 'elementSettingsModel', {
1173 + get: function get() {
1174 + elementorDevTools.deprecation.deprecated('elementSettingsModel', '2.8.0', 'container.settings');
1175 + return options.container ? options.container.settings : options.elementSettingsModel;
1176 + }
1177 + });
1178 + var controlType = this.model.get('type'),
1179 + controlSettings = jQuery.extend(true, {}, elementor.config.controls[controlType], this.model.attributes);
1180 + this.model.set(controlSettings);
1181 +
1182 + // TODO: this.elementSettingsModel is deprecated since 2.8.0.
1183 + var settings = this.container ? this.container.settings : this.elementSettingsModel;
1184 + this.listenTo(settings, 'change', this.onAfterChange);
1185 + if (this.model.attributes.responsive) {
1186 + this.onDeviceModeChange = this.onDeviceModeChange.bind(this);
1187 + elementor.listenTo(elementor.channels.deviceMode, 'change', this.onDeviceModeChange);
1188 + }
1189 + },
1190 + onDestroy: function onDestroy() {
1191 + elementor.stopListening(elementor.channels.deviceMode, 'change', this.onDeviceModeChange);
1192 + },
1193 + onDeviceModeChange: function onDeviceModeChange() {
1194 + this.toggleControlVisibility();
1195 + },
1196 + onAfterChange: function onAfterChange() {
1197 + this.toggleControlVisibility();
1198 + },
1199 + toggleControlVisibility: function toggleControlVisibility() {
1200 + // TODO: this.elementSettingsModel is deprecated since 2.8.0.
1201 + var settings = this.container ? this.container.settings : this.elementSettingsModel;
1202 + var isVisible = elementor.helpers.isActiveControl(this.model, settings.attributes, settings.controls);
1203 + this.$el.toggleClass('elementor-hidden-control', !isVisible);
1204 + elementor.getPanelView().updateScrollbar();
1205 + },
1206 + onRender: function onRender() {
1207 + var layoutType = this.model.get('label_block') ? 'block' : 'inline',
1208 + showLabel = this.model.get('show_label'),
1209 + elClasses = 'elementor-label-' + layoutType;
1210 + elClasses += ' elementor-control-separator-' + this.model.get('separator');
1211 + if (!showLabel) {
1212 + elClasses += ' elementor-control-hidden-label';
1213 + }
1214 + this.$el.addClass(elClasses);
1215 + this.toggleControlVisibility();
1216 + },
1217 + reRoute: function reRoute(controlActive) {
1218 + $e.route($e.routes.getCurrent('panel'), this.getControlInRouteArgs(controlActive ? this.getControlPath() : ''), {
1219 + history: false
1220 + });
1221 + },
1222 + getControlInRouteArgs: function getControlInRouteArgs(path) {
1223 + return _objectSpread(_objectSpread({}, $e.routes.getCurrentArgs('panel')), {}, {
1224 + activeControl: path
1225 + });
1226 + },
1227 + getControlPath: function getControlPath() {
1228 + var controlPath = this.model.get('name'),
1229 + parent = this._parent;
1230 + while (!parent.$el.hasClass('elementor-controls-stack')) {
1231 + var parentName = parent.model.get('name') || parent.model.get('_id');
1232 + controlPath = parentName + '/' + controlPath;
1233 + parent = parent._parent;
1234 + }
1235 + return controlPath;
1236 + }
1237 + });
1238 + module.exports = ControlBaseView;
1239 +
1240 + /***/ }),
1241 +
1242 + /***/ "../modules/promotions/assets/js/react/app-manager.js":
1243 + /*!************************************************************!*\
1244 + !*** ../modules/promotions/assets/js/react/app-manager.js ***!
1245 + \************************************************************/
1246 + /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1247 +
1248 + "use strict";
1249 +
1250 +
1251 + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1252 + Object.defineProperty(exports, "__esModule", ({
1253 + value: true
1254 + }));
1255 + exports.AppManager = void 0;
1256 + var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
1257 + var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1258 + var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1259 + var _app = _interopRequireDefault(__webpack_require__(/*! ./app */ "../modules/promotions/assets/js/react/app.js"));
1260 + var _client = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js");
1261 + var AppManager = exports.AppManager = /*#__PURE__*/function () {
1262 + function AppManager() {
1263 + (0, _classCallCheck2.default)(this, AppManager);
1264 + this.promotionInfoTip = null;
1265 + this.onRoute = function () {};
1266 + }
1267 + return (0, _createClass2.default)(AppManager, [{
1268 + key: "getPromotionData",
1269 + value: function getPromotionData(promotionType) {
1270 + return elementorPromotionsData[promotionType] || {};
1271 + }
1272 + }, {
1273 + key: "mount",
1274 + value: function mount(targetNode, selectors) {
1275 + var _elementor,
1276 + _elementor$getPrefere,
1277 + _rootElement$getAttri,
1278 + _this = this;
1279 + if (this.promotionInfoTip) {
1280 + return;
1281 + }
1282 + var wrapperElement = targetNode === null || targetNode === void 0 ? void 0 : targetNode.closest(selectors.wrapperElement);
1283 + var rootElement = wrapperElement === null || wrapperElement === void 0 ? void 0 : wrapperElement.querySelector(selectors.reactAnchor);
1284 + if (!rootElement) {
1285 + return;
1286 + }
1287 + this.attachEditorEventListeners();
1288 + this.promotionInfoTip = (0, _client.createRoot)(rootElement);
1289 + var colorScheme = ((_elementor = elementor) === null || _elementor === void 0 || (_elementor$getPrefere = _elementor.getPreferences) === null || _elementor$getPrefere === void 0 ? void 0 : _elementor$getPrefere.call(_elementor, 'ui_theme')) || 'auto';
1290 + var isRTL = elementorCommon.config.isRTL;
1291 + var promotionType = (_rootElement$getAttri = rootElement.getAttribute('data-promotion')) === null || _rootElement$getAttri === void 0 ? void 0 : _rootElement$getAttri.replace('_promotion', '');
1292 + this.promotionInfoTip.render(/*#__PURE__*/_react.default.createElement(_app.default, {
1293 + colorScheme: colorScheme,
1294 + isRTL: isRTL,
1295 + promotionsData: this.getPromotionData(promotionType),
1296 + onClose: function onClose() {
1297 + return _this.unmount();
1298 + }
1299 + }));
1300 + }
1301 + }, {
1302 + key: "unmount",
1303 + value: function unmount() {
1304 + if (this.promotionInfoTip) {
1305 + this.detachEditorEventListeners();
1306 + this.promotionInfoTip.unmount();
1307 + }
1308 + this.promotionInfoTip = null;
1309 + }
1310 + }, {
1311 + key: "attachEditorEventListeners",
1312 + value: function attachEditorEventListeners() {
1313 + var _this2 = this;
1314 + this.onRoute = function (component, route) {
1315 + if (route !== 'panel/elements/categories' && route !== 'panel/editor/content') {
1316 + return;
1317 + }
1318 + _this2.unmount();
1319 + };
1320 + $e.routes.on('run:after', this.onRoute);
1321 + }
1322 + }, {
1323 + key: "detachEditorEventListeners",
1324 + value: function detachEditorEventListeners() {
1325 + $e.routes.off('run:after', this.onRoute);
1326 + }
1327 + }]);
1328 + }();
1329 +
1330 + /***/ }),
1331 +
1332 + /***/ "../modules/promotions/assets/js/react/app.js":
1333 + /*!****************************************************!*\
1334 + !*** ../modules/promotions/assets/js/react/app.js ***!
1335 + \****************************************************/
1336 + /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1337 +
1338 + "use strict";
1339 + /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
1340 +
1341 +
1342 + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1343 + Object.defineProperty(exports, "__esModule", ({
1344 + value: true
1345 + }));
1346 + exports["default"] = void 0;
1347 + var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
1348 + var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
1349 + var _promotionCard = _interopRequireDefault(__webpack_require__(/*! ./components/promotion-card */ "../modules/promotions/assets/js/react/components/promotion-card.js"));
1350 + var App = function App(props) {
1351 + return /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, {
1352 + rtl: props.isRTL
1353 + }, /*#__PURE__*/_react.default.createElement(_ui.LocalizationProvider, null, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, {
1354 + colorScheme: props.colorScheme
1355 + }, /*#__PURE__*/_react.default.createElement(_ui.Infotip, {
1356 + content: /*#__PURE__*/_react.default.createElement(_promotionCard.default, {
1357 + doClose: props.onClose,
1358 + promotionsData: props.promotionsData
1359 + }),
1360 + placement: "right",
1361 + arrow: true,
1362 + open: true,
1363 + disableHoverListener: true,
1364 + PopperProps: {
1365 + modifiers: [{
1366 + name: 'offset',
1367 + options: {
1368 + offset: [-24, 8]
1369 + }
1370 + }]
1371 + }
1372 + }, /*#__PURE__*/_react.default.createElement("span", null)))));
1373 + };
1374 + App.propTypes = {
1375 + colorScheme: PropTypes.oneOf(['auto', 'light', 'dark']),
1376 + isRTL: PropTypes.bool,
1377 + promotionsData: PropTypes.object,
1378 + onClose: PropTypes.func.isRequired
1379 + };
1380 + var _default = exports["default"] = App;
1381 +
1382 + /***/ }),
1383 +
1384 + /***/ "../modules/promotions/assets/js/react/components/promotion-card.js":
1385 + /*!**************************************************************************!*\
1386 + !*** ../modules/promotions/assets/js/react/components/promotion-card.js ***!
1387 + \**************************************************************************/
1388 + /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1389 +
1390 + "use strict";
1391 + /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
1392 +
1393 +
1394 + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1395 + Object.defineProperty(exports, "__esModule", ({
1396 + value: true
1397 + }));
1398 + exports["default"] = void 0;
1399 + var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
1400 + var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1401 + var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
1402 + var PromotionCard = function PromotionCard(_ref) {
1403 + var doClose = _ref.doClose,
1404 + promotionsData = _ref.promotionsData;
1405 + var title = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.title,
1406 + description = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.description,
1407 + imgSrc = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.image,
1408 + imgAlt = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.image_alt,
1409 + ctaText = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.upgrade_text,
1410 + ctaUrl = promotionsData === null || promotionsData === void 0 ? void 0 : promotionsData.upgrade_url;
1411 + var redirectHandler = function redirectHandler() {
1412 + window.open(ctaUrl, '_blank');
1413 + return doClose();
1414 + };
1415 + return /*#__PURE__*/_react.default.createElement(_ui.ClickAwayListener, {
1416 + disableReactTree: true,
1417 + mouseEvent: "onMouseDown",
1418 + touchEvent: "onTouchStart",
1419 + onClickAway: doClose
1420 + }, /*#__PURE__*/_react.default.createElement(_ui.Box, {
1421 + sx: {
1422 + width: 296
1423 + },
1424 + "data-testid": "e-promotion-card"
1425 + }, /*#__PURE__*/_react.default.createElement(_ui.Stack, {
1426 + direction: "row",
1427 + alignItems: "center",
1428 + py: 1,
1429 + px: 2
1430 + }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
1431 + variant: "subtitle2"
1432 + }, title), /*#__PURE__*/_react.default.createElement(_ui.Chip, {
1433 + label: (0, _i18n.__)('PRO', 'elementor'),
1434 + size: "small",
1435 + variant: "outlined",
1436 + color: "promotion",
1437 + sx: {
1438 + ml: 1
1439 + }
1440 + }), /*#__PURE__*/_react.default.createElement(_ui.CloseButton, {
1441 + edge: "end",
1442 + sx: {
1443 + ml: 'auto'
1444 + },
1445 + slotProps: {
1446 + icon: {
1447 + fontSize: 'small'
1448 + }
1449 + },
1450 + onClick: doClose
1451 + })), /*#__PURE__*/_react.default.createElement(_ui.Image, {
1452 + src: imgSrc,
1453 + alt: imgAlt,
1454 + sx: {
1455 + height: 150,
1456 + width: '100%'
1457 + }
1458 + }), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
1459 + px: 2
1460 + }, 1 === description.length ? /*#__PURE__*/_react.default.createElement(_ui.Typography, {
1461 + variant: "body2",
1462 + color: "secondary",
1463 + sx: {
1464 + pt: 1.5,
1465 + pb: 1
1466 + }
1467 + }, description[0]) : /*#__PURE__*/_react.default.createElement(_ui.List, {
1468 + sx: {
1469 + pl: 2
1470 + }
1471 + }, description.map(function (text, index) {
1472 + return /*#__PURE__*/_react.default.createElement(_ui.ListItem, {
1473 + key: index,
1474 + sx: {
1475 + listStyle: 'disc',
1476 + display: 'list-item',
1477 + color: 'text.secondary',
1478 + p: 0
1479 + }
1480 + }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
1481 + variant: "body2",
1482 + color: "secondary"
1483 + }, text));
1484 + }))), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
1485 + pt: 1,
1486 + pb: 1.5,
1487 + px: 2
1488 + }, /*#__PURE__*/_react.default.createElement(_ui.Button, {
1489 + variant: "contained",
1490 + size: "small",
1491 + color: "promotion",
1492 + onClick: redirectHandler,
1493 + sx: {
1494 + ml: 'auto'
1495 + }
1496 + }, ctaText))));
1497 + };
1498 + PromotionCard.propTypes = {
1499 + doClose: PropTypes.func,
1500 + promotionsData: PropTypes.object
1501 + };
1502 + var _default = exports["default"] = PromotionCard;
1503 +
1504 + /***/ }),
1505 +
1506 + /***/ "../modules/promotions/assets/js/react/controls/promotion.js":
1507 + /*!*******************************************************************!*\
1508 + !*** ../modules/promotions/assets/js/react/controls/promotion.js ***!
1509 + \*******************************************************************/
1510 + /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1511 +
1512 + "use strict";
1513 +
1514 +
1515 + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1516 + Object.defineProperty(exports, "__esModule", ({
1517 + value: true
1518 + }));
1519 + exports["default"] = void 0;
1520 + var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1521 + var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1522 + var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
1523 + var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
1524 + var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
1525 + var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
1526 + var _baseData = _interopRequireDefault(__webpack_require__(/*! elementor-controls/base-data */ "../assets/dev/js/editor/controls/base-data.js"));
1527 + var _appManager = __webpack_require__(/*! ../app-manager */ "../modules/promotions/assets/js/react/app-manager.js");
1528 + function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
1529 + function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
1530 + var _default = exports["default"] = /*#__PURE__*/function (_ControlBaseDataView) {
1531 + function _default(options) {
1532 + var _this;
1533 + (0, _classCallCheck2.default)(this, _default);
1534 + _this = _callSuper(this, _default, [options]);
1535 + (0, _defineProperty2.default)(_this, "promotionInfoTip", null);
1536 + (0, _defineProperty2.default)(_this, "selectors", {
1537 + wrapperElement: '.elementor-control-type-switcher',
1538 + reactAnchor: '.e-promotion-react-wrapper'
1539 + });
1540 + _this.AppManager = new _appManager.AppManager();
1541 + return _this;
1542 + }
1543 + (0, _inherits2.default)(_default, _ControlBaseDataView);
1544 + return (0, _createClass2.default)(_default, [{
1545 + key: "ui",
1546 + value: function ui() {
1547 + return {
1548 + switcher: '[data-promotion].elementor-control-type-switcher'
1549 + };
1550 + }
1551 + }, {
1552 + key: "events",
1553 + value: function events() {
1554 + return {
1555 + 'click @ui.switcher': 'onClickControlSwitcher'
1556 + };
1557 + }
1558 + }, {
1559 + key: "promotionData",
1560 + value: function promotionData(promotionType) {
1561 + return elementorPromotionsData[promotionType] || {};
1562 + }
1563 + }, {
1564 + key: "onClickControlSwitcher",
1565 + value: function onClickControlSwitcher(event) {
1566 + event.stopPropagation();
1567 + this.AppManager.mount(event.target, this.selectors);
1568 + }
1569 + }]);
1570 + }(_baseData.default);
1571 +
1572 + /***/ }),
1573 +
1574 + /***/ "../modules/promotions/assets/js/react/module.js":
1575 + /*!*******************************************************!*\
1576 + !*** ../modules/promotions/assets/js/react/module.js ***!
1577 + \*******************************************************/
1578 + /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1579 +
1580 + "use strict";
1581 +
1582 +
1583 + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1584 + Object.defineProperty(exports, "__esModule", ({
1585 + value: true
1586 + }));
1587 + exports["default"] = void 0;
1588 + var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
1589 + var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
1590 + var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
1591 + var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
1592 + var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
1593 + var _promotion = _interopRequireDefault(__webpack_require__(/*! ./controls/promotion */ "../modules/promotions/assets/js/react/controls/promotion.js"));
1594 + function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
1595 + function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
1596 + var Module = exports["default"] = /*#__PURE__*/function (_elementorModules$edi) {
1597 + function Module() {
1598 + (0, _classCallCheck2.default)(this, Module);
1599 + return _callSuper(this, Module, arguments);
1600 + }
1601 + (0, _inherits2.default)(Module, _elementorModules$edi);
1602 + return (0, _createClass2.default)(Module, [{
1603 + key: "onElementorInit",
1604 + value: function onElementorInit() {
1605 + elementor.addControlView('promotion_control', _promotion.default);
1606 + }
1607 + }]);
1608 + }(elementorModules.editor.utils.Module);
1609 +
1610 + /***/ }),
1611 +
1612 + /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
1613 + /*!******************************************************************!*\
1614 + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
1615 + \******************************************************************/
1616 + /***/ ((module) => {
1617 +
1618 + function _arrayLikeToArray(r, a) {
1619 + (null == a || a > r.length) && (a = r.length);
1620 + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
1621 + return n;
1622 + }
1623 + module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
1624 +
1625 + /***/ }),
1626 +
1627 + /***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
1628 + /*!****************************************************************!*\
1629 + !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
1630 + \****************************************************************/
1631 + /***/ ((module) => {
1632 +
1633 + function _arrayWithHoles(r) {
1634 + if (Array.isArray(r)) return r;
1635 + }
1636 + module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
1637 +
1638 + /***/ }),
1639 +
1640 + /***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js":
1641 + /*!***********************************************************************!*\
1642 + !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
1643 + \***********************************************************************/
1644 + /***/ ((module) => {
1645 +
1646 + function _assertThisInitialized(e) {
1647 + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1648 + return e;
1649 + }
1650 + module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
1651 +
1652 + /***/ }),
1653 +
1654 + /***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
1655 + /*!****************************************************************!*\
1656 + !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
1657 + \****************************************************************/
1658 + /***/ ((module) => {
1659 +
1660 + function _classCallCheck(a, n) {
1661 + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
1662 + }
1663 + module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
1664 +
1665 + /***/ }),
1666 +
1667 + /***/ "../node_modules/@babel/runtime/helpers/createClass.js":
1668 + /*!*************************************************************!*\
1669 + !*** ../node_modules/@babel/runtime/helpers/createClass.js ***!
1670 + \*************************************************************/
1671 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1672 +
1673 + var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
1674 + function _defineProperties(e, r) {
1675 + for (var t = 0; t < r.length; t++) {
1676 + var o = r[t];
1677 + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
1678 + }
1679 + }
1680 + function _createClass(e, r, t) {
1681 + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
1682 + writable: !1
1683 + }), e;
1684 + }
1685 + module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
1686 +
1687 + /***/ }),
1688 +
1689 + /***/ "../node_modules/@babel/runtime/helpers/defineProperty.js":
1690 + /*!****************************************************************!*\
1691 + !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***!
1692 + \****************************************************************/
1693 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1694 +
1695 + var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
1696 + function _defineProperty(e, r, t) {
1697 + return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
1698 + value: t,
1699 + enumerable: !0,
1700 + configurable: !0,
1701 + writable: !0
1702 + }) : e[r] = t, e;
1703 + }
1704 + module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
1705 +
1706 + /***/ }),
1707 +
1708 + /***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js":
1709 + /*!****************************************************************!*\
1710 + !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
1711 + \****************************************************************/
1712 + /***/ ((module) => {
1713 +
1714 + function _getPrototypeOf(t) {
1715 + return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
1716 + return t.__proto__ || Object.getPrototypeOf(t);
1717 + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t);
1718 + }
1719 + module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
1720 +
1721 + /***/ }),
1722 +
1723 + /***/ "../node_modules/@babel/runtime/helpers/inherits.js":
1724 + /*!**********************************************************!*\
1725 + !*** ../node_modules/@babel/runtime/helpers/inherits.js ***!
1726 + \**********************************************************/
1727 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1728 +
1729 + var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
1730 + function _inherits(t, e) {
1731 + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
1732 + t.prototype = Object.create(e && e.prototype, {
1733 + constructor: {
1734 + value: t,
1735 + writable: !0,
1736 + configurable: !0
1737 + }
1738 + }), Object.defineProperty(t, "prototype", {
1739 + writable: !1
1740 + }), e && setPrototypeOf(t, e);
1741 + }
1742 + module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
1743 +
1744 + /***/ }),
1745 +
1746 + /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
1747 + /*!***********************************************************************!*\
1748 + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
1749 + \***********************************************************************/
1750 + /***/ ((module) => {
1751 +
1752 + function _interopRequireDefault(e) {
1753 + return e && e.__esModule ? e : {
1754 + "default": e
1755 + };
1756 + }
1757 + module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
1758 +
1759 + /***/ }),
1760 +
1761 + /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
1762 + /*!**********************************************************************!*\
1763 + !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
1764 + \**********************************************************************/
1765 + /***/ ((module) => {
1766 +
1767 + function _iterableToArrayLimit(r, l) {
1768 + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
1769 + if (null != t) {
1770 + var e,
1771 + n,
1772 + i,
1773 + u,
1774 + a = [],
1775 + f = !0,
1776 + o = !1;
1777 + try {
1778 + if (i = (t = t.call(r)).next, 0 === l) {
1779 + if (Object(t) !== t) return;
1780 + f = !1;
1781 + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
1782 + } catch (r) {
1783 + o = !0, n = r;
1784 + } finally {
1785 + try {
1786 + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
1787 + } finally {
1788 + if (o) throw n;
1789 + }
1790 + }
1791 + return a;
1792 + }
1793 + }
1794 + module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
1795 +
1796 + /***/ }),
1797 +
1798 + /***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
1799 + /*!*****************************************************************!*\
1800 + !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
1801 + \*****************************************************************/
1802 + /***/ ((module) => {
1803 +
1804 + function _nonIterableRest() {
1805 + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1806 + }
1807 + module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
1808 +
1809 + /***/ }),
1810 +
1811 + /***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
1812 + /*!***************************************************************************!*\
1813 + !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
1814 + \***************************************************************************/
1815 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1816 +
1817 + var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
1818 + var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js");
1819 + function _possibleConstructorReturn(t, e) {
1820 + if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
1821 + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
1822 + return assertThisInitialized(t);
1823 + }
1824 + module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
1825 +
1826 + /***/ }),
1827 +
1828 + /***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js":
1829 + /*!****************************************************************!*\
1830 + !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
1831 + \****************************************************************/
1832 + /***/ ((module) => {
1833 +
1834 + function _setPrototypeOf(t, e) {
1835 + return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
1836 + return t.__proto__ = e, t;
1837 + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e);
1838 + }
1839 + module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
1840 +
1841 + /***/ }),
1842 +
1843 + /***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
1844 + /*!***************************************************************!*\
1845 + !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
1846 + \***************************************************************/
1847 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1848 +
1849 + var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
1850 + var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
1851 + var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
1852 + var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
1853 + function _slicedToArray(r, e) {
1854 + return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
1855 + }
1856 + module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
1857 +
1858 + /***/ }),
1859 +
1860 + /***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js":
1861 + /*!*************************************************************!*\
1862 + !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***!
1863 + \*************************************************************/
1864 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1865 +
1866 + var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
1867 + function toPrimitive(t, r) {
1868 + if ("object" != _typeof(t) || !t) return t;
1869 + var e = t[Symbol.toPrimitive];
1870 + if (void 0 !== e) {
1871 + var i = e.call(t, r || "default");
1872 + if ("object" != _typeof(i)) return i;
1873 + throw new TypeError("@@toPrimitive must return a primitive value.");
1874 + }
1875 + return ("string" === r ? String : Number)(t);
1876 + }
1877 + module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
1878 +
1879 + /***/ }),
1880 +
1881 + /***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js":
1882 + /*!***************************************************************!*\
1883 + !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
1884 + \***************************************************************/
1885 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1886 +
1887 + var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
1888 + var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js");
1889 + function toPropertyKey(t) {
1890 + var i = toPrimitive(t, "string");
1891 + return "symbol" == _typeof(i) ? i : i + "";
1892 + }
1893 + module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
1894 +
1895 + /***/ }),
1896 +
1897 + /***/ "../node_modules/@babel/runtime/helpers/typeof.js":
1898 + /*!********************************************************!*\
1899 + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
1900 + \********************************************************/
1901 + /***/ ((module) => {
1902 +
1903 + function _typeof(o) {
1904 + "@babel/helpers - typeof";
1905 +
1906 + return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
1907 + return typeof o;
1908 + } : function (o) {
1909 + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
1910 + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
1911 + }
1912 + module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
1913 +
1914 + /***/ }),
1915 +
1916 + /***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
1917 + /*!****************************************************************************!*\
1918 + !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
1919 + \****************************************************************************/
1920 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1921 +
1922 + var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
1923 + function _unsupportedIterableToArray(r, a) {
1924 + if (r) {
1925 + if ("string" == typeof r) return arrayLikeToArray(r, a);
1926 + var t = {}.toString.call(r).slice(8, -1);
1927 + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;
1928 + }
1929 + }
1930 + module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
1931 +
1932 + /***/ }),
1933 +
1934 + /***/ "../node_modules/object-assign/index.js":
1935 + /*!**********************************************!*\
1936 + !*** ../node_modules/object-assign/index.js ***!
1937 + \**********************************************/
1938 + /***/ ((module) => {
1939 +
1940 + "use strict";
1941 + /*
1942 + object-assign
1943 + (c) Sindre Sorhus
1944 + @license MIT
1945 + */
1946 +
1947 +
1948 + /* eslint-disable no-unused-vars */
1949 + var getOwnPropertySymbols = Object.getOwnPropertySymbols;
1950 + var hasOwnProperty = Object.prototype.hasOwnProperty;
1951 + var propIsEnumerable = Object.prototype.propertyIsEnumerable;
1952 +
1953 + function toObject(val) {
1954 + if (val === null || val === undefined) {
1955 + throw new TypeError('Object.assign cannot be called with null or undefined');
1956 + }
1957 +
1958 + return Object(val);
1959 + }
1960 +
1961 + function shouldUseNative() {
1962 + try {
1963 + if (!Object.assign) {
1964 + return false;
1965 + }
1966 +
1967 + // Detect buggy property enumeration order in older V8 versions.
1968 +
1969 + // https://bugs.chromium.org/p/v8/issues/detail?id=4118
1970 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
1971 + test1[5] = 'de';
1972 + if (Object.getOwnPropertyNames(test1)[0] === '5') {
1973 + return false;
1974 + }
1975 +
1976 + // https://bugs.chromium.org/p/v8/issues/detail?id=3056
1977 + var test2 = {};
1978 + for (var i = 0; i < 10; i++) {
1979 + test2['_' + String.fromCharCode(i)] = i;
1980 + }
1981 + var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
1982 + return test2[n];
1983 + });
1984 + if (order2.join('') !== '0123456789') {
1985 + return false;
1986 + }
1987 +
1988 + // https://bugs.chromium.org/p/v8/issues/detail?id=3056
1989 + var test3 = {};
1990 + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
1991 + test3[letter] = letter;
1992 + });
1993 + if (Object.keys(Object.assign({}, test3)).join('') !==
1994 + 'abcdefghijklmnopqrst') {
1995 + return false;
1996 + }
1997 +
1998 + return true;
1999 + } catch (err) {
2000 + // We don't expect any of the above to throw, but better to be safe.
2001 + return false;
2002 + }
2003 + }
2004 +
2005 + module.exports = shouldUseNative() ? Object.assign : function (target, source) {
2006 + var from;
2007 + var to = toObject(target);
2008 + var symbols;
2009 +
2010 + for (var s = 1; s < arguments.length; s++) {
2011 + from = Object(arguments[s]);
2012 +
2013 + for (var key in from) {
2014 + if (hasOwnProperty.call(from, key)) {
2015 + to[key] = from[key];
2016 + }
2017 + }
2018 +
2019 + if (getOwnPropertySymbols) {
2020 + symbols = getOwnPropertySymbols(from);
2021 + for (var i = 0; i < symbols.length; i++) {
2022 + if (propIsEnumerable.call(from, symbols[i])) {
2023 + to[symbols[i]] = from[symbols[i]];
2024 + }
2025 + }
2026 + }
2027 + }
2028 +
2029 + return to;
2030 + };
2031 +
2032 +
2033 + /***/ }),
2034 +
2035 + /***/ "../node_modules/prop-types/checkPropTypes.js":
2036 + /*!****************************************************!*\
2037 + !*** ../node_modules/prop-types/checkPropTypes.js ***!
2038 + \****************************************************/
2039 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2040 +
2041 + "use strict";
2042 + /**
2043 + * Copyright (c) 2013-present, Facebook, Inc.
2044 + *
2045 + * This source code is licensed under the MIT license found in the
2046 + * LICENSE file in the root directory of this source tree.
2047 + */
2048 +
2049 +
2050 +
2051 + var printWarning = function() {};
2052 +
2053 + if (true) {
2054 + var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
2055 + var loggedTypeFailures = {};
2056 + var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
2057 +
2058 + printWarning = function(text) {
2059 + var message = 'Warning: ' + text;
2060 + if (typeof console !== 'undefined') {
2061 + console.error(message);
2062 + }
2063 + try {
2064 + // --- Welcome to debugging React ---
2065 + // This error was thrown as a convenience so that you can use this stack
2066 + // to find the callsite that caused this warning to fire.
2067 + throw new Error(message);
2068 + } catch (x) { /**/ }
2069 + };
2070 + }
2071 +
2072 + /**
2073 + * Assert that the values match with the type specs.
2074 + * Error messages are memorized and will only be shown once.
2075 + *
2076 + * @param {object} typeSpecs Map of name to a ReactPropType
2077 + * @param {object} values Runtime values that need to be type-checked
2078 + * @param {string} location e.g. "prop", "context", "child context"
2079 + * @param {string} componentName Name of the component for error messages.
2080 + * @param {?Function} getStack Returns the component stack.
2081 + * @private
2082 + */
2083 + function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
2084 + if (true) {
2085 + for (var typeSpecName in typeSpecs) {
2086 + if (has(typeSpecs, typeSpecName)) {
2087 + var error;
2088 + // Prop type validation may throw. In case they do, we don't want to
2089 + // fail the render phase where it didn't fail before. So we log it.
2090 + // After these have been cleaned up, we'll let them throw.
2091 + try {
2092 + // This is intentionally an invariant that gets caught. It's the same
2093 + // behavior as without this statement except with a better message.
2094 + if (typeof typeSpecs[typeSpecName] !== 'function') {
2095 + var err = Error(
2096 + (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
2097 + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
2098 + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
2099 + );
2100 + err.name = 'Invariant Violation';
2101 + throw err;
2102 + }
2103 + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
2104 + } catch (ex) {
2105 + error = ex;
2106 + }
2107 + if (error && !(error instanceof Error)) {
2108 + printWarning(
2109 + (componentName || 'React class') + ': type specification of ' +
2110 + location + ' `' + typeSpecName + '` is invalid; the type checker ' +
2111 + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
2112 + 'You may have forgotten to pass an argument to the type checker ' +
2113 + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
2114 + 'shape all require an argument).'
2115 + );
2116 + }
2117 + if (error instanceof Error && !(error.message in loggedTypeFailures)) {
2118 + // Only monitor this failure once because there tends to be a lot of the
2119 + // same error.
2120 + loggedTypeFailures[error.message] = true;
2121 +
2122 + var stack = getStack ? getStack() : '';
2123 +
2124 + printWarning(
2125 + 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
2126 + );
2127 + }
2128 + }
2129 + }
2130 + }
2131 + }
2132 +
2133 + /**
2134 + * Resets warning cache when testing.
2135 + *
2136 + * @private
2137 + */
2138 + checkPropTypes.resetWarningCache = function() {
2139 + if (true) {
2140 + loggedTypeFailures = {};
2141 + }
2142 + }
2143 +
2144 + module.exports = checkPropTypes;
2145 +
2146 +
2147 + /***/ }),
2148 +
2149 + /***/ "../node_modules/prop-types/factoryWithTypeCheckers.js":
2150 + /*!*************************************************************!*\
2151 + !*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***!
2152 + \*************************************************************/
2153 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2154 +
2155 + "use strict";
2156 + /**
2157 + * Copyright (c) 2013-present, Facebook, Inc.
2158 + *
2159 + * This source code is licensed under the MIT license found in the
2160 + * LICENSE file in the root directory of this source tree.
2161 + */
2162 +
2163 +
2164 +
2165 + var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
2166 + var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js");
2167 +
2168 + var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
2169 + var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
2170 + var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js");
2171 +
2172 + var printWarning = function() {};
2173 +
2174 + if (true) {
2175 + printWarning = function(text) {
2176 + var message = 'Warning: ' + text;
2177 + if (typeof console !== 'undefined') {
2178 + console.error(message);
2179 + }
2180 + try {
2181 + // --- Welcome to debugging React ---
2182 + // This error was thrown as a convenience so that you can use this stack
2183 + // to find the callsite that caused this warning to fire.
2184 + throw new Error(message);
2185 + } catch (x) {}
2186 + };
2187 + }
2188 +
2189 + function emptyFunctionThatReturnsNull() {
2190 + return null;
2191 + }
2192 +
2193 + module.exports = function(isValidElement, throwOnDirectAccess) {
2194 + /* global Symbol */
2195 + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
2196 + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
2197 +
2198 + /**
2199 + * Returns the iterator method function contained on the iterable object.
2200 + *
2201 + * Be sure to invoke the function with the iterable as context:
2202 + *
2203 + * var iteratorFn = getIteratorFn(myIterable);
2204 + * if (iteratorFn) {
2205 + * var iterator = iteratorFn.call(myIterable);
2206 + * ...
2207 + * }
2208 + *
2209 + * @param {?object} maybeIterable
2210 + * @return {?function}
2211 + */
2212 + function getIteratorFn(maybeIterable) {
2213 + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
2214 + if (typeof iteratorFn === 'function') {
2215 + return iteratorFn;
2216 + }
2217 + }
2218 +
2219 + /**
2220 + * Collection of methods that allow declaration and validation of props that are
2221 + * supplied to React components. Example usage:
2222 + *
2223 + * var Props = require('ReactPropTypes');
2224 + * var MyArticle = React.createClass({
2225 + * propTypes: {
2226 + * // An optional string prop named "description".
2227 + * description: Props.string,
2228 + *
2229 + * // A required enum prop named "category".
2230 + * category: Props.oneOf(['News','Photos']).isRequired,
2231 + *
2232 + * // A prop named "dialog" that requires an instance of Dialog.
2233 + * dialog: Props.instanceOf(Dialog).isRequired
2234 + * },
2235 + * render: function() { ... }
2236 + * });
2237 + *
2238 + * A more formal specification of how these methods are used:
2239 + *
2240 + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
2241 + * decl := ReactPropTypes.{type}(.isRequired)?
2242 + *
2243 + * Each and every declaration produces a function with the same signature. This
2244 + * allows the creation of custom validation functions. For example:
2245 + *
2246 + * var MyLink = React.createClass({
2247 + * propTypes: {
2248 + * // An optional string or URI prop named "href".
2249 + * href: function(props, propName, componentName) {
2250 + * var propValue = props[propName];
2251 + * if (propValue != null && typeof propValue !== 'string' &&
2252 + * !(propValue instanceof URI)) {
2253 + * return new Error(
2254 + * 'Expected a string or an URI for ' + propName + ' in ' +
2255 + * componentName
2256 + * );
2257 + * }
2258 + * }
2259 + * },
2260 + * render: function() {...}
2261 + * });
2262 + *
2263 + * @internal
2264 + */
2265 +
2266 + var ANONYMOUS = '<<anonymous>>';
2267 +
2268 + // Important!
2269 + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
2270 + var ReactPropTypes = {
2271 + array: createPrimitiveTypeChecker('array'),
2272 + bigint: createPrimitiveTypeChecker('bigint'),
2273 + bool: createPrimitiveTypeChecker('boolean'),
2274 + func: createPrimitiveTypeChecker('function'),
2275 + number: createPrimitiveTypeChecker('number'),
2276 + object: createPrimitiveTypeChecker('object'),
2277 + string: createPrimitiveTypeChecker('string'),
2278 + symbol: createPrimitiveTypeChecker('symbol'),
2279 +
2280 + any: createAnyTypeChecker(),
2281 + arrayOf: createArrayOfTypeChecker,
2282 + element: createElementTypeChecker(),
2283 + elementType: createElementTypeTypeChecker(),
2284 + instanceOf: createInstanceTypeChecker,
2285 + node: createNodeChecker(),
2286 + objectOf: createObjectOfTypeChecker,
2287 + oneOf: createEnumTypeChecker,
2288 + oneOfType: createUnionTypeChecker,
2289 + shape: createShapeTypeChecker,
2290 + exact: createStrictShapeTypeChecker,
2291 + };
2292 +
2293 + /**
2294 + * inlined Object.is polyfill to avoid requiring consumers ship their own
2295 + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
2296 + */
2297 + /*eslint-disable no-self-compare*/
2298 + function is(x, y) {
2299 + // SameValue algorithm
2300 + if (x === y) {
2301 + // Steps 1-5, 7-10
2302 + // Steps 6.b-6.e: +0 != -0
2303 + return x !== 0 || 1 / x === 1 / y;
2304 + } else {
2305 + // Step 6.a: NaN == NaN
2306 + return x !== x && y !== y;
2307 + }
2308 + }
2309 + /*eslint-enable no-self-compare*/
2310 +
2311 + /**
2312 + * We use an Error-like object for backward compatibility as people may call
2313 + * PropTypes directly and inspect their output. However, we don't use real
2314 + * Errors anymore. We don't inspect their stack anyway, and creating them
2315 + * is prohibitively expensive if they are created too often, such as what
2316 + * happens in oneOfType() for any type before the one that matched.
2317 + */
2318 + function PropTypeError(message, data) {
2319 + this.message = message;
2320 + this.data = data && typeof data === 'object' ? data: {};
2321 + this.stack = '';
2322 + }
2323 + // Make `instanceof Error` still work for returned errors.
2324 + PropTypeError.prototype = Error.prototype;
2325 +
2326 + function createChainableTypeChecker(validate) {
2327 + if (true) {
2328 + var manualPropTypeCallCache = {};
2329 + var manualPropTypeWarningCount = 0;
2330 + }
2331 + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
2332 + componentName = componentName || ANONYMOUS;
2333 + propFullName = propFullName || propName;
2334 +
2335 + if (secret !== ReactPropTypesSecret) {
2336 + if (throwOnDirectAccess) {
2337 + // New behavior only for users of `prop-types` package
2338 + var err = new Error(
2339 + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
2340 + 'Use `PropTypes.checkPropTypes()` to call them. ' +
2341 + 'Read more at http://fb.me/use-check-prop-types'
2342 + );
2343 + err.name = 'Invariant Violation';
2344 + throw err;
2345 + } else if ( true && typeof console !== 'undefined') {
2346 + // Old behavior for people using React.PropTypes
2347 + var cacheKey = componentName + ':' + propName;
2348 + if (
2349 + !manualPropTypeCallCache[cacheKey] &&
2350 + // Avoid spamming the console because they are often not actionable except for lib authors
2351 + manualPropTypeWarningCount < 3
2352 + ) {
2353 + printWarning(
2354 + 'You are manually calling a React.PropTypes validation ' +
2355 + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
2356 + 'and will throw in the standalone `prop-types` package. ' +
2357 + 'You may be seeing this warning due to a third-party PropTypes ' +
2358 + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
2359 + );
2360 + manualPropTypeCallCache[cacheKey] = true;
2361 + manualPropTypeWarningCount++;
2362 + }
2363 + }
2364 + }
2365 + if (props[propName] == null) {
2366 + if (isRequired) {
2367 + if (props[propName] === null) {
2368 + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
2369 + }
2370 + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
2371 + }
2372 + return null;
2373 + } else {
2374 + return validate(props, propName, componentName, location, propFullName);
2375 + }
2376 + }
2377 +
2378 + var chainedCheckType = checkType.bind(null, false);
2379 + chainedCheckType.isRequired = checkType.bind(null, true);
2380 +
2381 + return chainedCheckType;
2382 + }
2383 +
2384 + function createPrimitiveTypeChecker(expectedType) {
2385 + function validate(props, propName, componentName, location, propFullName, secret) {
2386 + var propValue = props[propName];
2387 + var propType = getPropType(propValue);
2388 + if (propType !== expectedType) {
2389 + // `propValue` being instance of, say, date/regexp, pass the 'object'
2390 + // check, but we can offer a more precise error message here rather than
2391 + // 'of type `object`'.
2392 + var preciseType = getPreciseType(propValue);
2393 +
2394 + return new PropTypeError(
2395 + 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
2396 + {expectedType: expectedType}
2397 + );
2398 + }
2399 + return null;
2400 + }
2401 + return createChainableTypeChecker(validate);
2402 + }
2403 +
2404 + function createAnyTypeChecker() {
2405 + return createChainableTypeChecker(emptyFunctionThatReturnsNull);
2406 + }
2407 +
2408 + function createArrayOfTypeChecker(typeChecker) {
2409 + function validate(props, propName, componentName, location, propFullName) {
2410 + if (typeof typeChecker !== 'function') {
2411 + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
2412 + }
2413 + var propValue = props[propName];
2414 + if (!Array.isArray(propValue)) {
2415 + var propType = getPropType(propValue);
2416 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
2417 + }
2418 + for (var i = 0; i < propValue.length; i++) {
2419 + var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
2420 + if (error instanceof Error) {
2421 + return error;
2422 + }
2423 + }
2424 + return null;
2425 + }
2426 + return createChainableTypeChecker(validate);
2427 + }
2428 +
2429 + function createElementTypeChecker() {
2430 + function validate(props, propName, componentName, location, propFullName) {
2431 + var propValue = props[propName];
2432 + if (!isValidElement(propValue)) {
2433 + var propType = getPropType(propValue);
2434 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
2435 + }
2436 + return null;
2437 + }
2438 + return createChainableTypeChecker(validate);
2439 + }
2440 +
2441 + function createElementTypeTypeChecker() {
2442 + function validate(props, propName, componentName, location, propFullName) {
2443 + var propValue = props[propName];
2444 + if (!ReactIs.isValidElementType(propValue)) {
2445 + var propType = getPropType(propValue);
2446 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
2447 + }
2448 + return null;
2449 + }
2450 + return createChainableTypeChecker(validate);
2451 + }
2452 +
2453 + function createInstanceTypeChecker(expectedClass) {
2454 + function validate(props, propName, componentName, location, propFullName) {
2455 + if (!(props[propName] instanceof expectedClass)) {
2456 + var expectedClassName = expectedClass.name || ANONYMOUS;
2457 + var actualClassName = getClassName(props[propName]);
2458 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
2459 + }
2460 + return null;
2461 + }
2462 + return createChainableTypeChecker(validate);
2463 + }
2464 +
2465 + function createEnumTypeChecker(expectedValues) {
2466 + if (!Array.isArray(expectedValues)) {
2467 + if (true) {
2468 + if (arguments.length > 1) {
2469 + printWarning(
2470 + 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
2471 + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
2472 + );
2473 + } else {
2474 + printWarning('Invalid argument supplied to oneOf, expected an array.');
2475 + }
2476 + }
2477 + return emptyFunctionThatReturnsNull;
2478 + }
2479 +
2480 + function validate(props, propName, componentName, location, propFullName) {
2481 + var propValue = props[propName];
2482 + for (var i = 0; i < expectedValues.length; i++) {
2483 + if (is(propValue, expectedValues[i])) {
2484 + return null;
2485 + }
2486 + }
2487 +
2488 + var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
2489 + var type = getPreciseType(value);
2490 + if (type === 'symbol') {
2491 + return String(value);
2492 + }
2493 + return value;
2494 + });
2495 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
2496 + }
2497 + return createChainableTypeChecker(validate);
2498 + }
2499 +
2500 + function createObjectOfTypeChecker(typeChecker) {
2501 + function validate(props, propName, componentName, location, propFullName) {
2502 + if (typeof typeChecker !== 'function') {
2503 + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
2504 + }
2505 + var propValue = props[propName];
2506 + var propType = getPropType(propValue);
2507 + if (propType !== 'object') {
2508 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
2509 + }
2510 + for (var key in propValue) {
2511 + if (has(propValue, key)) {
2512 + var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
2513 + if (error instanceof Error) {
2514 + return error;
2515 + }
2516 + }
2517 + }
2518 + return null;
2519 + }
2520 + return createChainableTypeChecker(validate);
2521 + }
2522 +
2523 + function createUnionTypeChecker(arrayOfTypeCheckers) {
2524 + if (!Array.isArray(arrayOfTypeCheckers)) {
2525 + true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
2526 + return emptyFunctionThatReturnsNull;
2527 + }
2528 +
2529 + for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
2530 + var checker = arrayOfTypeCheckers[i];
2531 + if (typeof checker !== 'function') {
2532 + printWarning(
2533 + 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
2534 + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
2535 + );
2536 + return emptyFunctionThatReturnsNull;
2537 + }
2538 + }
2539 +
2540 + function validate(props, propName, componentName, location, propFullName) {
2541 + var expectedTypes = [];
2542 + for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
2543 + var checker = arrayOfTypeCheckers[i];
2544 + var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
2545 + if (checkerResult == null) {
2546 + return null;
2547 + }
2548 + if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
2549 + expectedTypes.push(checkerResult.data.expectedType);
2550 + }
2551 + }
2552 + var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
2553 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
2554 + }
2555 + return createChainableTypeChecker(validate);
2556 + }
2557 +
2558 + function createNodeChecker() {
2559 + function validate(props, propName, componentName, location, propFullName) {
2560 + if (!isNode(props[propName])) {
2561 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
2562 + }
2563 + return null;
2564 + }
2565 + return createChainableTypeChecker(validate);
2566 + }
2567 +
2568 + function invalidValidatorError(componentName, location, propFullName, key, type) {
2569 + return new PropTypeError(
2570 + (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
2571 + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
2572 + );
2573 + }
2574 +
2575 + function createShapeTypeChecker(shapeTypes) {
2576 + function validate(props, propName, componentName, location, propFullName) {
2577 + var propValue = props[propName];
2578 + var propType = getPropType(propValue);
2579 + if (propType !== 'object') {
2580 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
2581 + }
2582 + for (var key in shapeTypes) {
2583 + var checker = shapeTypes[key];
2584 + if (typeof checker !== 'function') {
2585 + return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
2586 + }
2587 + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
2588 + if (error) {
2589 + return error;
2590 + }
2591 + }
2592 + return null;
2593 + }
2594 + return createChainableTypeChecker(validate);
2595 + }
2596 +
2597 + function createStrictShapeTypeChecker(shapeTypes) {
2598 + function validate(props, propName, componentName, location, propFullName) {
2599 + var propValue = props[propName];
2600 + var propType = getPropType(propValue);
2601 + if (propType !== 'object') {
2602 + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
2603 + }
2604 + // We need to check all keys in case some are required but missing from props.
2605 + var allKeys = assign({}, props[propName], shapeTypes);
2606 + for (var key in allKeys) {
2607 + var checker = shapeTypes[key];
2608 + if (has(shapeTypes, key) && typeof checker !== 'function') {
2609 + return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
2610 + }
2611 + if (!checker) {
2612 + return new PropTypeError(
2613 + 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
2614 + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
2615 + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
2616 + );
2617 + }
2618 + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
2619 + if (error) {
2620 + return error;
2621 + }
2622 + }
2623 + return null;
2624 + }
2625 +
2626 + return createChainableTypeChecker(validate);
2627 + }
2628 +
2629 + function isNode(propValue) {
2630 + switch (typeof propValue) {
2631 + case 'number':
2632 + case 'string':
2633 + case 'undefined':
2634 + return true;
2635 + case 'boolean':
2636 + return !propValue;
2637 + case 'object':
2638 + if (Array.isArray(propValue)) {
2639 + return propValue.every(isNode);
2640 + }
2641 + if (propValue === null || isValidElement(propValue)) {
2642 + return true;
2643 + }
2644 +
2645 + var iteratorFn = getIteratorFn(propValue);
2646 + if (iteratorFn) {
2647 + var iterator = iteratorFn.call(propValue);
2648 + var step;
2649 + if (iteratorFn !== propValue.entries) {
2650 + while (!(step = iterator.next()).done) {
2651 + if (!isNode(step.value)) {
2652 + return false;
2653 + }
2654 + }
2655 + } else {
2656 + // Iterator will provide entry [k,v] tuples rather than values.
2657 + while (!(step = iterator.next()).done) {
2658 + var entry = step.value;
2659 + if (entry) {
2660 + if (!isNode(entry[1])) {
2661 + return false;
2662 + }
2663 + }
2664 + }
2665 + }
2666 + } else {
2667 + return false;
2668 + }
2669 +
2670 + return true;
2671 + default:
2672 + return false;
2673 + }
2674 + }
2675 +
2676 + function isSymbol(propType, propValue) {
2677 + // Native Symbol.
2678 + if (propType === 'symbol') {
2679 + return true;
2680 + }
2681 +
2682 + // falsy value can't be a Symbol
2683 + if (!propValue) {
2684 + return false;
2685 + }
2686 +
2687 + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
2688 + if (propValue['@@toStringTag'] === 'Symbol') {
2689 + return true;
2690 + }
2691 +
2692 + // Fallback for non-spec compliant Symbols which are polyfilled.
2693 + if (typeof Symbol === 'function' && propValue instanceof Symbol) {
2694 + return true;
2695 + }
2696 +
2697 + return false;
2698 + }
2699 +
2700 + // Equivalent of `typeof` but with special handling for array and regexp.
2701 + function getPropType(propValue) {
2702 + var propType = typeof propValue;
2703 + if (Array.isArray(propValue)) {
2704 + return 'array';
2705 + }
2706 + if (propValue instanceof RegExp) {
2707 + // Old webkits (at least until Android 4.0) return 'function' rather than
2708 + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
2709 + // passes PropTypes.object.
2710 + return 'object';
2711 + }
2712 + if (isSymbol(propType, propValue)) {
2713 + return 'symbol';
2714 + }
2715 + return propType;
2716 + }
2717 +
2718 + // This handles more types than `getPropType`. Only used for error messages.
2719 + // See `createPrimitiveTypeChecker`.
2720 + function getPreciseType(propValue) {
2721 + if (typeof propValue === 'undefined' || propValue === null) {
2722 + return '' + propValue;
2723 + }
2724 + var propType = getPropType(propValue);
2725 + if (propType === 'object') {
2726 + if (propValue instanceof Date) {
2727 + return 'date';
2728 + } else if (propValue instanceof RegExp) {
2729 + return 'regexp';
2730 + }
2731 + }
2732 + return propType;
2733 + }
2734 +
2735 + // Returns a string that is postfixed to a warning about an invalid type.
2736 + // For example, "undefined" or "of type array"
2737 + function getPostfixForTypeWarning(value) {
2738 + var type = getPreciseType(value);
2739 + switch (type) {
2740 + case 'array':
2741 + case 'object':
2742 + return 'an ' + type;
2743 + case 'boolean':
2744 + case 'date':
2745 + case 'regexp':
2746 + return 'a ' + type;
2747 + default:
2748 + return type;
2749 + }
2750 + }
2751 +
2752 + // Returns class name of the object, if any.
2753 + function getClassName(propValue) {
2754 + if (!propValue.constructor || !propValue.constructor.name) {
2755 + return ANONYMOUS;
2756 + }
2757 + return propValue.constructor.name;
2758 + }
2759 +
2760 + ReactPropTypes.checkPropTypes = checkPropTypes;
2761 + ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
2762 + ReactPropTypes.PropTypes = ReactPropTypes;
2763 +
2764 + return ReactPropTypes;
2765 + };
2766 +
2767 +
2768 + /***/ }),
2769 +
2770 + /***/ "../node_modules/prop-types/index.js":
2771 + /*!*******************************************!*\
2772 + !*** ../node_modules/prop-types/index.js ***!
2773 + \*******************************************/
2774 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2775 +
2776 + /**
2777 + * Copyright (c) 2013-present, Facebook, Inc.
2778 + *
2779 + * This source code is licensed under the MIT license found in the
2780 + * LICENSE file in the root directory of this source tree.
2781 + */
2782 +
2783 + if (true) {
2784 + var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
2785 +
2786 + // By explicitly using `prop-types` you are opting into new development behavior.
2787 + // http://fb.me/prop-types-in-prod
2788 + var throwOnDirectAccess = true;
2789 + module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
2790 + } else // removed by dead control flow
2791 + {}
2792 +
2793 +
2794 + /***/ }),
2795 +
2796 + /***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js":
2797 + /*!**************************************************************!*\
2798 + !*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
2799 + \**************************************************************/
2800 + /***/ ((module) => {
2801 +
2802 + "use strict";
2803 + /**
2804 + * Copyright (c) 2013-present, Facebook, Inc.
2805 + *
2806 + * This source code is licensed under the MIT license found in the
2807 + * LICENSE file in the root directory of this source tree.
2808 + */
2809 +
2810 +
2811 +
2812 + var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
2813 +
2814 + module.exports = ReactPropTypesSecret;
2815 +
2816 +
2817 + /***/ }),
2818 +
2819 + /***/ "../node_modules/prop-types/lib/has.js":
2820 + /*!*********************************************!*\
2821 + !*** ../node_modules/prop-types/lib/has.js ***!
2822 + \*********************************************/
2823 + /***/ ((module) => {
2824 +
2825 + module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
2826 +
2827 +
2828 + /***/ }),
2829 +
2830 + /***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js":
2831 + /*!************************************************************************************!*\
2832 + !*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***!
2833 + \************************************************************************************/
2834 + /***/ ((__unused_webpack_module, exports) => {
2835 +
2836 + "use strict";
2837 + /** @license React v16.13.1
2838 + * react-is.development.js
2839 + *
2840 + * Copyright (c) Facebook, Inc. and its affiliates.
2841 + *
2842 + * This source code is licensed under the MIT license found in the
2843 + * LICENSE file in the root directory of this source tree.
2844 + */
2845 +
2846 +
2847 +
2848 +
2849 +
2850 + if (true) {
2851 + (function() {
2852 + 'use strict';
2853 +
2854 + // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
2855 + // nor polyfill, then a plain number is used for performance.
2856 + var hasSymbol = typeof Symbol === 'function' && Symbol.for;
2857 + var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
2858 + var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
2859 + var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
2860 + var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
2861 + var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
2862 + var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
2863 + var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
2864 + // (unstable) APIs that have been removed. Can we remove the symbols?
2865 +
2866 + var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
2867 + var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
2868 + var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
2869 + var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
2870 + var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
2871 + var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
2872 + var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
2873 + var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
2874 + var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
2875 + var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
2876 + var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
2877 +
2878 + function isValidElementType(type) {
2879 + return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
2880 + type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
2881 + }
2882 +
2883 + function typeOf(object) {
2884 + if (typeof object === 'object' && object !== null) {
2885 + var $$typeof = object.$$typeof;
2886 +
2887 + switch ($$typeof) {
2888 + case REACT_ELEMENT_TYPE:
2889 + var type = object.type;
2890 +
2891 + switch (type) {
2892 + case REACT_ASYNC_MODE_TYPE:
2893 + case REACT_CONCURRENT_MODE_TYPE:
2894 + case REACT_FRAGMENT_TYPE:
2895 + case REACT_PROFILER_TYPE:
2896 + case REACT_STRICT_MODE_TYPE:
2897 + case REACT_SUSPENSE_TYPE:
2898 + return type;
2899 +
2900 + default:
2901 + var $$typeofType = type && type.$$typeof;
2902 +
2903 + switch ($$typeofType) {
2904 + case REACT_CONTEXT_TYPE:
2905 + case REACT_FORWARD_REF_TYPE:
2906 + case REACT_LAZY_TYPE:
2907 + case REACT_MEMO_TYPE:
2908 + case REACT_PROVIDER_TYPE:
2909 + return $$typeofType;
2910 +
2911 + default:
2912 + return $$typeof;
2913 + }
2914 +
2915 + }
2916 +
2917 + case REACT_PORTAL_TYPE:
2918 + return $$typeof;
2919 + }
2920 + }
2921 +
2922 + return undefined;
2923 + } // AsyncMode is deprecated along with isAsyncMode
2924 +
2925 + var AsyncMode = REACT_ASYNC_MODE_TYPE;
2926 + var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
2927 + var ContextConsumer = REACT_CONTEXT_TYPE;
2928 + var ContextProvider = REACT_PROVIDER_TYPE;
2929 + var Element = REACT_ELEMENT_TYPE;
2930 + var ForwardRef = REACT_FORWARD_REF_TYPE;
2931 + var Fragment = REACT_FRAGMENT_TYPE;
2932 + var Lazy = REACT_LAZY_TYPE;
2933 + var Memo = REACT_MEMO_TYPE;
2934 + var Portal = REACT_PORTAL_TYPE;
2935 + var Profiler = REACT_PROFILER_TYPE;
2936 + var StrictMode = REACT_STRICT_MODE_TYPE;
2937 + var Suspense = REACT_SUSPENSE_TYPE;
2938 + var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
2939 +
2940 + function isAsyncMode(object) {
2941 + {
2942 + if (!hasWarnedAboutDeprecatedIsAsyncMode) {
2943 + hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
2944 +
2945 + console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
2946 + }
2947 + }
2948 +
2949 + return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
2950 + }
2951 + function isConcurrentMode(object) {
2952 + return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
2953 + }
2954 + function isContextConsumer(object) {
2955 + return typeOf(object) === REACT_CONTEXT_TYPE;
2956 + }
2957 + function isContextProvider(object) {
2958 + return typeOf(object) === REACT_PROVIDER_TYPE;
2959 + }
2960 + function isElement(object) {
2961 + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
2962 + }
2963 + function isForwardRef(object) {
2964 + return typeOf(object) === REACT_FORWARD_REF_TYPE;
2965 + }
2966 + function isFragment(object) {
2967 + return typeOf(object) === REACT_FRAGMENT_TYPE;
2968 + }
2969 + function isLazy(object) {
2970 + return typeOf(object) === REACT_LAZY_TYPE;
2971 + }
2972 + function isMemo(object) {
2973 + return typeOf(object) === REACT_MEMO_TYPE;
2974 + }
2975 + function isPortal(object) {
2976 + return typeOf(object) === REACT_PORTAL_TYPE;
2977 + }
2978 + function isProfiler(object) {
2979 + return typeOf(object) === REACT_PROFILER_TYPE;
2980 + }
2981 + function isStrictMode(object) {
2982 + return typeOf(object) === REACT_STRICT_MODE_TYPE;
2983 + }
2984 + function isSuspense(object) {
2985 + return typeOf(object) === REACT_SUSPENSE_TYPE;
2986 + }
2987 +
2988 + exports.AsyncMode = AsyncMode;
2989 + exports.ConcurrentMode = ConcurrentMode;
2990 + exports.ContextConsumer = ContextConsumer;
2991 + exports.ContextProvider = ContextProvider;
2992 + exports.Element = Element;
2993 + exports.ForwardRef = ForwardRef;
2994 + exports.Fragment = Fragment;
2995 + exports.Lazy = Lazy;
2996 + exports.Memo = Memo;
2997 + exports.Portal = Portal;
2998 + exports.Profiler = Profiler;
2999 + exports.StrictMode = StrictMode;
3000 + exports.Suspense = Suspense;
3001 + exports.isAsyncMode = isAsyncMode;
3002 + exports.isConcurrentMode = isConcurrentMode;
3003 + exports.isContextConsumer = isContextConsumer;
3004 + exports.isContextProvider = isContextProvider;
3005 + exports.isElement = isElement;
3006 + exports.isForwardRef = isForwardRef;
3007 + exports.isFragment = isFragment;
3008 + exports.isLazy = isLazy;
3009 + exports.isMemo = isMemo;
3010 + exports.isPortal = isPortal;
3011 + exports.isProfiler = isProfiler;
3012 + exports.isStrictMode = isStrictMode;
3013 + exports.isSuspense = isSuspense;
3014 + exports.isValidElementType = isValidElementType;
3015 + exports.typeOf = typeOf;
3016 + })();
3017 + }
3018 +
3019 +
3020 + /***/ }),
3021 +
3022 + /***/ "../node_modules/prop-types/node_modules/react-is/index.js":
3023 + /*!*****************************************************************!*\
3024 + !*** ../node_modules/prop-types/node_modules/react-is/index.js ***!
3025 + \*****************************************************************/
3026 + /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3027 +
3028 + "use strict";
3029 +
3030 +
3031 + if (false) // removed by dead control flow
3032 + {} else {
3033 + module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js");
3034 + }
3035 +
3036 +
3037 + /***/ }),
3038 +
3039 + /***/ "../node_modules/react-dom/client.js":
3040 + /*!*******************************************!*\
3041 + !*** ../node_modules/react-dom/client.js ***!
3042 + \*******************************************/
3043 + /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3044 +
3045 + "use strict";
3046 +
3047 +
3048 + var m = __webpack_require__(/*! react-dom */ "react-dom");
3049 + if (false) // removed by dead control flow
3050 + {} else {
3051 + var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
3052 + exports.createRoot = function(c, o) {
3053 + i.usingClientEntryPoint = true;
3054 + try {
3055 + return m.createRoot(c, o);
3056 + } finally {
3057 + i.usingClientEntryPoint = false;
3058 + }
3059 + };
3060 + exports.hydrateRoot = function(c, h, o) {
3061 + i.usingClientEntryPoint = true;
3062 + try {
3063 + return m.hydrateRoot(c, h, o);
3064 + } finally {
3065 + i.usingClientEntryPoint = false;
3066 + }
3067 + };
3068 + }
3069 +
3070 +
3071 + /***/ }),
3072 +
3073 + /***/ "@elementor/ui":
3074 + /*!*********************************!*\
3075 + !*** external "elementorV2.ui" ***!
3076 + \*********************************/
3077 + /***/ ((module) => {
3078 +
3079 + "use strict";
3080 + module.exports = elementorV2.ui;
3081 +
3082 + /***/ }),
3083 +
3084 + /***/ "@wordpress/i18n":
3085 + /*!**************************!*\
3086 + !*** external "wp.i18n" ***!
3087 + \**************************/
3088 + /***/ ((module) => {
3089 +
3090 + "use strict";
3091 + module.exports = wp.i18n;
3092 +
3093 + /***/ }),
3094 +
3095 + /***/ "react":
3096 + /*!************************!*\
3097 + !*** external "React" ***!
3098 + \************************/
3099 + /***/ ((module) => {
3100 +
3101 + "use strict";
3102 + module.exports = React;
3103 +
3104 + /***/ }),
3105 +
3106 + /***/ "react-dom":
3107 + /*!***************************!*\
3108 + !*** external "ReactDOM" ***!
3109 + \***************************/
3110 + /***/ ((module) => {
3111 +
3112 + "use strict";
3113 + module.exports = ReactDOM;
3114 +
3115 + /***/ })
3116 +
3117 + /******/ });
3118 + /************************************************************************/
3119 + /******/ // The module cache
3120 + /******/ var __webpack_module_cache__ = {};
3121 + /******/
3122 + /******/ // The require function
3123 + /******/ function __webpack_require__(moduleId) {
3124 + /******/ // Check if module is in cache
3125 + /******/ var cachedModule = __webpack_module_cache__[moduleId];
3126 + /******/ if (cachedModule !== undefined) {
3127 + /******/ return cachedModule.exports;
3128 + /******/ }
3129 + /******/ // Create a new module (and put it into the cache)
3130 + /******/ var module = __webpack_module_cache__[moduleId] = {
3131 + /******/ // no module.id needed
3132 + /******/ // no module.loaded needed
3133 + /******/ exports: {}
3134 + /******/ };
3135 + /******/
3136 + /******/ // Execute the module function
3137 + /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
3138 + /******/
3139 + /******/ // Return the exports of the module
3140 + /******/ return module.exports;
3141 + /******/ }
3142 + /******/
3143 + /************************************************************************/
3144 + var __webpack_exports__ = {};
3145 + // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
3146 + (() => {
3147 + "use strict";
3148 + /*!******************************************************!*\
3149 + !*** ../modules/promotions/assets/js/react/index.js ***!
3150 + \******************************************************/
3151 +
3152 +
3153 + var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3154 + var _module = _interopRequireDefault(__webpack_require__(/*! ./module.js */ "../modules/promotions/assets/js/react/module.js"));
3155 + new _module.default();
3156 + })();
3157 +
3158 + /******/ })()
3159 + ;
3160 + //# sourceMappingURL=e-react-promotions.js.map