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

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

2,281 lines 79.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function(_wordpress_i18n) {
2
3 //#region \0rolldown/runtime.js
4 var __create = Object.create;
5 var __defProp = Object.defineProperty;
6 var __name = (target, value) => __defProp(target, "name", {
7 value,
8 configurable: true
9 });
10 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11 var __getOwnPropNames = Object.getOwnPropertyNames;
12 var __getProtoOf = Object.getPrototypeOf;
13 var __hasOwnProp = Object.prototype.hasOwnProperty;
14 var __esmMin = (fn, res, err) => () => {
15 if (err) throw err[0];
16 try {
17 return fn && (res = fn(fn = 0)), res;
18 } catch (e) {
19 throw err = [e], e;
20 }
21 };
22 var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
23 var __copyProps = (to, from, except, desc) => {
24 if (from && typeof from === "object" || typeof from === "function") {
25 for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
26 key = keys[i];
27 if (!__hasOwnProp.call(to, key) && key !== except) {
28 __defProp(to, key, {
29 get: ((k) => from[k]).bind(null, key),
30 enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
31 });
32 }
33 }
34 }
35 return to;
36 };
37 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
38 value: mod,
39 enumerable: true
40 }) : target, mod));
41
42 //#endregion
43
44 //#region assets/dev/js/editor/utils/module.js
45 var require_module = /* @__PURE__ */ __commonJSMin(((exports, module) => {
46 var EditorModule = elementorModules.Module.extend({
47 onInit: function onInit() {
48 var _this = this;
49 var $window = jQuery(window);
50 $window.on("elementor:init-components", this.onElementorInitComponents.bind(this));
51 $window.on("elementor:loaded", function() {
52 _this.onElementorLoaded();
53 elementor.on("document:loaded", _this.onDocumentLoaded.bind(_this));
54 });
55 $window.on("elementor:init", this.onElementorReady);
56 },
57 getEditorControlView: function getEditorControlView(name) {
58 var _this$getEditorContro;
59 return elementor.getPanelView().getCurrentPageView().children.findByModelCid((_this$getEditorContro = this.getEditorControlModel(name)) === null || _this$getEditorContro === void 0 ? void 0 : _this$getEditorContro.cid);
60 },
61 getEditorControlModel: function getEditorControlModel(name) {
62 return elementor.getPanelView().getCurrentPageView().collection.findWhere({ name });
63 },
64 onElementorReady: function onElementorReady() {
65 this.onElementorInit();
66 elementor.on("frontend:init", this.onElementorFrontendInit.bind(this)).on("preview:loaded", this.onElementorPreviewLoaded.bind(this));
67 }
68 });
69 EditorModule.prototype.onElementorLoaded = function() {};
70 EditorModule.prototype.onElementorInit = function() {};
71 EditorModule.prototype.onElementorPreviewLoaded = function() {};
72 EditorModule.prototype.onDocumentLoaded = function() {};
73 EditorModule.prototype.onElementorFrontendInit = function() {};
74 EditorModule.prototype.onElementorInitComponents = function() {};
75 module.exports = EditorModule;
76 }));
77
78 //#endregion
79 //#region node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
80 var import_module = /* @__PURE__ */ __toESM(require_module());
81 function asyncGeneratorStep(n, t, e, r, o, a, c) {
82 try {
83 var i = n[a](c);
84 var u = i.value;
85 } catch (n) {
86 e(n);
87 return;
88 }
89 i.done ? t(u) : Promise.resolve(u).then(r, o);
90 }
91 function _asyncToGenerator(n) {
92 return function() {
93 var t = this;
94 var e = arguments;
95 return new Promise(function(r, o) {
96 var a = n.apply(t, e);
97 function _next(n) {
98 asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
99 }
100 function _throw(n) {
101 asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
102 }
103 _next(void 0);
104 });
105 };
106 }
107
108 //#endregion
109 //#region node_modules/@babel/runtime/helpers/esm/classCallCheck.js
110 function _classCallCheck(a, n) {
111 if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
112 }
113
114 //#endregion
115 //#region node_modules/@babel/runtime/helpers/esm/typeof.js
116 function _typeof(o) {
117 "@babel/helpers - typeof";
118 return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
119 return typeof o;
120 } : function(o) {
121 return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
122 }, _typeof(o);
123 }
124 var init_typeof = __esmMin((() => {}));
125
126 //#endregion
127 //#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js
128 init_typeof();
129 function toPrimitive(t, r) {
130 if ("object" != _typeof(t) || !t) return t;
131 var e = t[Symbol.toPrimitive];
132 if (void 0 !== e) {
133 var i = e.call(t, r || "default");
134 if ("object" != _typeof(i)) return i;
135 throw new TypeError("@@toPrimitive must return a primitive value.");
136 }
137 return ("string" === r ? String : Number)(t);
138 }
139
140 //#endregion
141 //#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
142 init_typeof();
143 function toPropertyKey(t) {
144 var i = toPrimitive(t, "string");
145 return "symbol" == _typeof(i) ? i : i + "";
146 }
147
148 //#endregion
149 //#region node_modules/@babel/runtime/helpers/esm/createClass.js
150 function _defineProperties(e, r) {
151 for (var t = 0; t < r.length; t++) {
152 var o = r[t];
153 o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
154 }
155 }
156 function _createClass(e, r, t) {
157 return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
158 }
159
160 //#endregion
161 //#region node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
162 function _assertThisInitialized(e) {
163 if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
164 return e;
165 }
166
167 //#endregion
168 //#region node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
169 init_typeof();
170 function _possibleConstructorReturn(t, e) {
171 if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
172 if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
173 return _assertThisInitialized(t);
174 }
175
176 //#endregion
177 //#region node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
178 function _getPrototypeOf(t) {
179 return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
180 return t.__proto__ || Object.getPrototypeOf(t);
181 }, _getPrototypeOf(t);
182 }
183
184 //#endregion
185 //#region node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
186 function _setPrototypeOf(t, e) {
187 return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) {
188 return t.__proto__ = e, t;
189 }, _setPrototypeOf(t, e);
190 }
191
192 //#endregion
193 //#region node_modules/@babel/runtime/helpers/esm/inherits.js
194 function _inherits(t, e) {
195 if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
196 t.prototype = Object.create(e && e.prototype, { constructor: {
197 value: t,
198 writable: !0,
199 configurable: !0
200 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e);
201 }
202
203 //#endregion
204 //#region node_modules/@babel/runtime/helpers/esm/defineProperty.js
205 function _defineProperty(e, r, t) {
206 return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
207 value: t,
208 enumerable: !0,
209 configurable: !0,
210 writable: !0
211 }) : e[r] = t, e;
212 }
213
214 //#endregion
215 //#region node_modules/@babel/runtime/helpers/OverloadYield.js
216 var require_OverloadYield = /* @__PURE__ */ __commonJSMin(((exports, module) => {
217 function _OverloadYield(e, d) {
218 this.v = e, this.k = d;
219 }
220 module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports;
221 }));
222
223 //#endregion
224 //#region node_modules/@babel/runtime/helpers/regeneratorDefine.js
225 var require_regeneratorDefine = /* @__PURE__ */ __commonJSMin(((exports, module) => {
226 function _regeneratorDefine(e, r, n, t) {
227 var i = Object.defineProperty;
228 try {
229 i({}, "", {});
230 } catch (e) {
231 i = 0;
232 }
233 module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) {
234 function o(r, n) {
235 _regeneratorDefine(e, r, function(e) {
236 return this._invoke(r, n, e);
237 });
238 }
239 r ? i ? i(e, r, {
240 value: n,
241 enumerable: !t,
242 configurable: !t,
243 writable: !t
244 }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
245 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t);
246 }
247 module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports;
248 }));
249
250 //#endregion
251 //#region node_modules/@babel/runtime/helpers/regenerator.js
252 var require_regenerator$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
253 var regeneratorDefine = require_regeneratorDefine();
254 function _regenerator() {
255 /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
256 var e;
257 var t;
258 var r = "function" == typeof Symbol ? Symbol : {};
259 var n = r.iterator || "@@iterator";
260 var o = r.toStringTag || "@@toStringTag";
261 function i(r, n, o, i) {
262 var c = n && n.prototype instanceof Generator ? n : Generator;
263 var u = Object.create(c.prototype);
264 return regeneratorDefine(u, "_invoke", function(r, n, o) {
265 var i;
266 var c;
267 var u;
268 var f = 0;
269 var p = o || [];
270 var y = !1;
271 var G = {
272 p: 0,
273 n: 0,
274 v: e,
275 a: d,
276 f: d.bind(e, 4),
277 d: function d(t, r) {
278 return i = t, c = 0, u = e, G.n = r, a;
279 }
280 };
281 function d(r, n) {
282 for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
283 var o;
284 var i = p[t];
285 var d = G.p;
286 var l = i[2];
287 r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
288 }
289 if (o || r > 1) return a;
290 throw y = !0, n;
291 }
292 return function(o, p, l) {
293 if (f > 1) throw TypeError("Generator is already running");
294 for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
295 i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
296 try {
297 if (f = 2, i) {
298 if (c || (o = "next"), t = i[o]) {
299 if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
300 if (!t.done) return t;
301 u = t.value, c < 2 && (c = 0);
302 } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
303 i = e;
304 } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
305 } catch (t) {
306 i = e, c = 1, u = t;
307 } finally {
308 f = 1;
309 }
310 }
311 return {
312 value: t,
313 done: y
314 };
315 };
316 }(r, o, i), !0), u;
317 }
318 var a = {};
319 function Generator() {}
320 function GeneratorFunction() {}
321 function GeneratorFunctionPrototype() {}
322 t = Object.getPrototypeOf;
323 var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function() {
324 return this;
325 }), t);
326 var u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
327 function f(e) {
328 return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
329 }
330 return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function() {
331 return this;
332 }), regeneratorDefine(u, "toString", function() {
333 return "[object Generator]";
334 }), (module.exports = _regenerator = function _regenerator() {
335 return {
336 w: i,
337 m: f
338 };
339 }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
340 }
341 module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
342 }));
343
344 //#endregion
345 //#region node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js
346 var require_regeneratorAsyncIterator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
347 var OverloadYield = require_OverloadYield();
348 var regeneratorDefine = require_regeneratorDefine();
349 function AsyncIterator(t, e) {
350 function n(r, o, i, f) {
351 try {
352 var c = t[r](o);
353 var u = c.value;
354 return u instanceof OverloadYield ? e.resolve(u.v).then(function(t) {
355 n("next", t, i, f);
356 }, function(t) {
357 n("throw", t, i, f);
358 }) : e.resolve(u).then(function(t) {
359 c.value = t, i(c);
360 }, function(t) {
361 return n("throw", t, i, f);
362 });
363 } catch (t) {
364 f(t);
365 }
366 }
367 var r;
368 this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function() {
369 return this;
370 })), regeneratorDefine(this, "_invoke", function(t, o, i) {
371 function f() {
372 return new e(function(e, r) {
373 n(t, i, e, r);
374 });
375 }
376 return r = r ? r.then(f, f) : f();
377 }, !0);
378 }
379 module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports;
380 }));
381
382 //#endregion
383 //#region node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js
384 var require_regeneratorAsyncGen = /* @__PURE__ */ __commonJSMin(((exports, module) => {
385 var regenerator = require_regenerator$1();
386 var regeneratorAsyncIterator = require_regeneratorAsyncIterator();
387 function _regeneratorAsyncGen(r, e, t, o, n) {
388 return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise);
389 }
390 module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports;
391 }));
392
393 //#endregion
394 //#region node_modules/@babel/runtime/helpers/regeneratorAsync.js
395 var require_regeneratorAsync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
396 var regeneratorAsyncGen = require_regeneratorAsyncGen();
397 function _regeneratorAsync(n, e, r, t, o) {
398 var a = regeneratorAsyncGen(n, e, r, t, o);
399 return a.next().then(function(n) {
400 return n.done ? n.value : a.next();
401 });
402 }
403 module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports;
404 }));
405
406 //#endregion
407 //#region node_modules/@babel/runtime/helpers/regeneratorKeys.js
408 var require_regeneratorKeys = /* @__PURE__ */ __commonJSMin(((exports, module) => {
409 function _regeneratorKeys(e) {
410 var n = Object(e);
411 var r = [];
412 for (var t in n) r.unshift(t);
413 return function e() {
414 for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;
415 return e.done = !0, e;
416 };
417 }
418 module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports;
419 }));
420
421 //#endregion
422 //#region node_modules/@babel/runtime/helpers/typeof.js
423 var require_typeof = /* @__PURE__ */ __commonJSMin(((exports, module) => {
424 function _typeof(o) {
425 "@babel/helpers - typeof";
426 return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
427 return typeof o;
428 } : function(o) {
429 return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
430 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
431 }
432 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
433 }));
434
435 //#endregion
436 //#region node_modules/@babel/runtime/helpers/regeneratorValues.js
437 var require_regeneratorValues = /* @__PURE__ */ __commonJSMin(((exports, module) => {
438 var _typeof = require_typeof()["default"];
439 function _regeneratorValues(e) {
440 if (null != e) {
441 var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"];
442 var r = 0;
443 if (t) return t.call(e);
444 if ("function" == typeof e.next) return e;
445 if (!isNaN(e.length)) return { next: function next() {
446 return e && r >= e.length && (e = void 0), {
447 value: e && e[r++],
448 done: !e
449 };
450 } };
451 }
452 throw new TypeError(_typeof(e) + " is not iterable");
453 }
454 module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports;
455 }));
456
457 //#endregion
458 //#region node_modules/@babel/runtime/helpers/regeneratorRuntime.js
459 var require_regeneratorRuntime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
460 var OverloadYield = require_OverloadYield();
461 var regenerator = require_regenerator$1();
462 var regeneratorAsync = require_regeneratorAsync();
463 var regeneratorAsyncGen = require_regeneratorAsyncGen();
464 var regeneratorAsyncIterator = require_regeneratorAsyncIterator();
465 var regeneratorKeys = require_regeneratorKeys();
466 var regeneratorValues = require_regeneratorValues();
467 function _regeneratorRuntime() {
468 "use strict";
469 var r = regenerator();
470 var e = r.m(_regeneratorRuntime);
471 var t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
472 function n(r) {
473 var e = "function" == typeof r && r.constructor;
474 return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
475 }
476 var o = {
477 "throw": 1,
478 "return": 2,
479 "break": 3,
480 "continue": 3
481 };
482 function a(r) {
483 var e;
484 var t;
485 return function(n) {
486 e || (e = {
487 stop: function stop() {
488 return t(n.a, 2);
489 },
490 "catch": function _catch() {
491 return n.v;
492 },
493 abrupt: function abrupt(r, e) {
494 return t(n.a, o[r], e);
495 },
496 delegateYield: function delegateYield(r, o, a) {
497 return e.resultName = o, t(n.d, regeneratorValues(r), a);
498 },
499 finish: function finish(r) {
500 return t(n.f, r);
501 }
502 }, t = function t(r, _t, o) {
503 n.p = e.prev, n.n = e.next;
504 try {
505 return r(_t, o);
506 } finally {
507 e.next = n.n;
508 }
509 }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
510 try {
511 return r.call(this, e);
512 } finally {
513 n.p = e.prev, n.n = e.next;
514 }
515 };
516 }
517 return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
518 return {
519 wrap: function wrap(e, t, n, o) {
520 return r.w(a(e), t, n, o && o.reverse());
521 },
522 isGeneratorFunction: n,
523 mark: r.m,
524 awrap: function awrap(r, e) {
525 return new OverloadYield(r, e);
526 },
527 AsyncIterator: regeneratorAsyncIterator,
528 async: function async(r, e, t, o, u) {
529 return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);
530 },
531 keys: regeneratorKeys,
532 values: regeneratorValues
533 };
534 }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
535 }
536 module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
537 }));
538
539 //#endregion
540 //#region node_modules/@babel/runtime/regenerator/index.js
541 var require_regenerator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
542 var runtime = require_regeneratorRuntime()();
543 module.exports = runtime;
544 try {
545 regeneratorRuntime = runtime;
546 } catch (accidentalStrictMode) {
547 if (typeof globalThis === "object") globalThis.regeneratorRuntime = runtime;
548 else Function("r", "regeneratorRuntime = r")(runtime);
549 }
550 }));
551
552 //#endregion
553 //#region assets/dev/js/utils/introduction.js
554 var import_regenerator = /* @__PURE__ */ __toESM(require_regenerator());
555 function _callSuper$3(t, o, e) {
556 return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$4() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
557 }
558 __name(_callSuper$3, "_callSuper");
559 function _isNativeReflectConstruct$4() {
560 try {
561 var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
562 } catch (t) {}
563 return (_isNativeReflectConstruct$4 = function _isNativeReflectConstruct() {
564 return !!t;
565 })();
566 }
567 __name(_isNativeReflectConstruct$4, "_isNativeReflectConstruct");
568 var _default = /*#__PURE__*/ function(_elementorModules$Mod) {
569 function _default() {
570 var _this;
571 _classCallCheck(this, _default);
572 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
573 _this = _callSuper$3(this, _default, [].concat(args));
574 _defineProperty(_this, "introductionMap", null);
575 _this.initDialog();
576 return _this;
577 }
578 _inherits(_default, _elementorModules$Mod);
579 return _createClass(_default, [
580 {
581 key: "setIntroductionMap",
582 value: function setIntroductionMap(map) {
583 this.introductionMap = map;
584 }
585 },
586 {
587 key: "getIntroductionMap",
588 value: function getIntroductionMap() {
589 return this.introductionMap || elementor.config.user.introduction;
590 }
591 },
592 {
593 key: "getDefaultSettings",
594 value: function getDefaultSettings() {
595 return {
596 dialogType: "buttons",
597 dialogOptions: {
598 effects: {
599 hide: "hide",
600 show: "show"
601 },
602 hide: { onBackgroundClick: false }
603 }
604 };
605 }
606 },
607 {
608 key: "initDialog",
609 value: function initDialog() {
610 var _this2 = this;
611 var dialog;
612 this.getDialog = function() {
613 if (!dialog) {
614 var settings = _this2.getSettings();
615 dialog = elementorCommon.dialogsManager.createWidget(settings.dialogType, settings.dialogOptions);
616 if (settings.onDialogInitCallback) settings.onDialogInitCallback.call(_this2, dialog);
617 }
618 return dialog;
619 };
620 }
621 },
622 {
623 key: "show",
624 value: function show(target) {
625 if (this.introductionViewed) return;
626 var dialog = this.getDialog();
627 if (target) dialog.setSettings("position", { of: target });
628 dialog.show();
629 }
630 },
631 {
632 key: "introductionViewed",
633 get: function get() {
634 var introductionKey = this.getSettings("introductionKey");
635 return this.getIntroductionMap()[introductionKey];
636 },
637 set: function set(isViewed) {
638 var introductionKey = this.getSettings("introductionKey");
639 this.getIntroductionMap()[introductionKey] = isViewed;
640 }
641 },
642 {
643 key: "setViewed",
644 value: function() {
645 var _setViewed = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee() {
646 var _this3 = this;
647 return import_regenerator.default.wrap(function(_context) {
648 while (1) switch (_context.prev = _context.next) {
649 case 0:
650 this.introductionViewed = true;
651 return _context.abrupt("return", new Promise(function(resolve, reject) {
652 elementorCommon.ajax.addRequest("introduction_viewed", {
653 data: { introductionKey: _this3.getSettings("introductionKey") },
654 success: resolve,
655 error: reject
656 });
657 }));
658 case 1:
659 case "end": return _context.stop();
660 }
661 }, _callee, this);
662 }));
663 function setViewed() {
664 return _setViewed.apply(this, arguments);
665 }
666 return setViewed;
667 }()
668 }
669 ]);
670 }(elementorModules.Module);
671
672 //#endregion
673 //#region assets/dev/js/editor/views/controls-popover.js
674 var ControlsPopover = /*#__PURE__*/ function() {
675 function ControlsPopover(child) {
676 _classCallCheck(this, ControlsPopover);
677 this.child = child;
678 this.$popover = jQuery("<div>", { class: "elementor-controls-popover" });
679 child.$el.before(this.$popover);
680 this.$popover.append(child.$el);
681 this.popoverToggleView = child._parent.children.findByIndex(child._index - 1);
682 if ("typography" === this.child.model.attributes.groupType) this.createPopoverHeader();
683 }
684 return _createClass(ControlsPopover, [
685 {
686 key: "addChild",
687 value: function addChild(child) {
688 this.$popover.append(child.$el);
689 }
690 },
691 {
692 key: "createPopoverHeader",
693 value: function createPopoverHeader() {
694 var _this = this;
695 var $resetLabel = this.$popover.prev().find(".elementor-control-popover-toggle-reset-label");
696 this.$popoverHeader = jQuery("<div>", { class: "e-group-control-header" }).html("<span>" + (0, _wordpress_i18n.__)("Typography", "elementor") + "</span>");
697 this.$headerControlsWrapper = jQuery("<div>", { class: "e-control-tools" });
698 $resetLabel.addClass("e-control-tool").on("click", function() {
699 return _this.onResetButtonClick();
700 });
701 this.$headerControlsWrapper.append($resetLabel);
702 this.$popoverHeader.append(this.$headerControlsWrapper);
703 var globalConfig = this.popoverToggleView.model.get("global");
704 if (globalConfig !== null && globalConfig !== void 0 && globalConfig.active) this.createAddButton();
705 this.$popover.prepend(this.$popoverHeader).addClass("e-controls-popover--typography");
706 }
707 },
708 {
709 key: "onResetButtonClick",
710 value: function onResetButtonClick() {
711 this.$popover.hide();
712 this.$popover.trigger("hide");
713 var groupControlName = this.child.model.get("groupPrefix") + "typography";
714 var args = {
715 container: this.child.options.container,
716 settings: _defineProperty({}, groupControlName, "")
717 };
718 if (this.child.options.container.globals.get(groupControlName)) $e.run("document/globals/disable", args);
719 else $e.run("document/elements/settings", args);
720 }
721 },
722 {
723 key: "onAddButtonClick",
724 value: function onAddButtonClick() {
725 this.popoverToggleView.onAddGlobalButtonClick();
726 }
727 },
728 {
729 key: "createAddButton",
730 value: function createAddButton() {
731 var _this2 = this;
732 this.$addButton = jQuery("<button>", { class: "e-control-tool" }).html(jQuery("<i>", { class: "eicon-plus" }));
733 this.$headerControlsWrapper.append(this.$addButton);
734 this.$addButton.on("click", function() {
735 return _this2.onAddButtonClick();
736 });
737 this.$addButton.tipsy({
738 title: function title() {
739 return (0, _wordpress_i18n.__)("Create New Global Font", "elementor");
740 },
741 gravity: function gravity() {
742 return "s";
743 }
744 });
745 }
746 },
747 {
748 key: "destroy",
749 value: function destroy() {
750 this.$popover.remove();
751 }
752 }
753 ]);
754 }();
755
756 //#endregion
757 //#region assets/dev/js/editor/elements/views/behaviors/inner-tabs.js
758 var require_inner_tabs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
759 var InnerTabsBehavior = Marionette.Behavior.extend({
760 onRenderCollection: function onRenderCollection() {
761 this.handleInnerTabs(this.view);
762 },
763 handleInnerTabs: function handleInnerTabs(parent) {
764 var closedClass = "e-tab-close";
765 var activeClass = "e-tab-active";
766 var tabsWrappers = parent.children.filter(function(view) {
767 return "tabs" === view.model.get("type");
768 });
769 _.each(tabsWrappers, function(view) {
770 view.$el.find(".elementor-control-content").remove();
771 var tabsId = view.model.get("name");
772 var tabs = parent.children.filter(function(childView) {
773 return "tab" === childView.model.get("type") && childView.model.get("tabs_wrapper") === tabsId;
774 });
775 _.each(tabs, function(childView, index) {
776 view._addChildView(childView);
777 var tabId = childView.model.get("name");
778 var controlsUnderTab = parent.children.filter(function(controlView) {
779 return tabId === controlView.model.get("inner_tab");
780 });
781 if (0 === index) childView.$el.addClass(activeClass);
782 else _.each(controlsUnderTab, function(controlView) {
783 controlView.$el.addClass(closedClass);
784 });
785 });
786 });
787 },
788 onChildviewControlTabClicked: function onChildviewControlTabClicked(childView) {
789 var closedClass = "e-tab-close";
790 var activeClass = "e-tab-active";
791 var tabClicked = childView.model.get("name");
792 var childrenUnderTab = this.view.children.filter(function(view) {
793 return "tab" !== view.model.get("type") && childView.model.get("tabs_wrapper") === view.model.get("tabs_wrapper");
794 });
795 var siblingTabs = this.view.children.filter(function(view) {
796 return "tab" === view.model.get("type") && childView.model.get("tabs_wrapper") === view.model.get("tabs_wrapper");
797 });
798 _.each(siblingTabs, function(view) {
799 view.$el.removeClass(activeClass);
800 });
801 childView.$el.addClass(activeClass);
802 _.each(childrenUnderTab, function(view) {
803 if (view.model.get("inner_tab") === tabClicked) view.$el.removeClass(closedClass);
804 else view.$el.addClass(closedClass);
805 });
806 elementor.getPanelView().updateScrollbar();
807 }
808 });
809 module.exports = InnerTabsBehavior;
810 }));
811
812 //#endregion
813 //#region assets/dev/js/editor/views/controls-stack.js
814 var ControlsStack = Marionette.CompositeView.extend({
815 classes: { popover: "elementor-controls-popover" },
816 activeTab: null,
817 activeSection: null,
818 className: function className() {
819 return "elementor-controls-stack";
820 },
821 templateHelpers: function templateHelpers() {
822 return { elementData: elementor.getElementData(this.model) };
823 },
824 childViewOptions: function childViewOptions() {
825 return { elementSettingsModel: this.model };
826 },
827 ui: function ui() {
828 return {
829 tabs: ".elementor-panel-navigation-tab",
830 reloadButton: ".elementor-update-preview-button"
831 };
832 },
833 events: function events() {
834 return { "click @ui.reloadButton": "onReloadButtonClick" };
835 },
836 modelEvents: { destroy: "onModelDestroy" },
837 behaviors: { HandleInnerTabs: { behaviorClass: require_inner_tabs() } },
838 initialize: function initialize(options) {
839 this.initCollection();
840 if (options.tab) {
841 this.activeTab = options.tab;
842 this.activateFirstSection();
843 }
844 this.listenTo(elementor.channels.deviceMode, "change", this.onDeviceModeChange);
845 },
846 onDestroy: function onDestroy() {
847 this.stopListening(elementor.channels.deviceMode, "change", this.onDeviceModeChange);
848 },
849 initCollection: function initCollection() {
850 this.collection = new Backbone.Collection(_.values(elementor.mergeControlsSettings(this.getOption("controls"))));
851 },
852 filter: function filter(controlModel) {
853 if (controlModel.get("tab") !== this.activeTab) return false;
854 if ("section" === controlModel.get("type")) return true;
855 var section = controlModel.get("section");
856 return !section || section === this.activeSection;
857 },
858 getControlViewByModel: function getControlViewByModel(model) {
859 return this.children.findByModelCid(model.cid);
860 },
861 getControlViewByName: function getControlViewByName(name) {
862 return this.getControlViewByModel(this.getControlModel(name));
863 },
864 getControlModel: function getControlModel(name) {
865 return this.collection.findWhere({ name });
866 },
867 isVisibleSectionControl: function isVisibleSectionControl(sectionControlModel) {
868 return this.activeTab === sectionControlModel.get("tab");
869 },
870 activateTab: function activateTab(tab) {
871 this.activeTab = tab;
872 this.activateFirstSection();
873 this._renderChildren();
874 return this;
875 },
876 activateSection: function activateSection(sectionName) {
877 this.activeSection = sectionName;
878 return this;
879 },
880 activateFirstSection: function activateFirstSection() {
881 var self = this;
882 var sectionControls = self.collection.filter(function(controlModel) {
883 return "section" === controlModel.get("type") && self.isVisibleSectionControl(controlModel);
884 });
885 var sectionToActivate;
886 if (!sectionControls[0]) {
887 self.activeSection = null;
888 sectionToActivate = null;
889 } else sectionToActivate = sectionControls[0].get("name");
890 if (sectionControls.filter(function(controlModel) {
891 return self.activeSection === controlModel.get("name");
892 })[0]) return;
893 self.activateSection(sectionToActivate);
894 return this;
895 },
896 getChildView: function getChildView(item) {
897 var controlType = item.get("type");
898 return elementor.getControlView(controlType);
899 },
900 getNamespaceArray: function getNamespaceArray() {
901 return [elementor.getPanelView().getCurrentPageName()];
902 },
903 openActiveSection: function openActiveSection() {
904 var activeSection = this.activeSection;
905 var activeSectionView = this.children.filter(function(view) {
906 return activeSection === view.model.get("name");
907 });
908 if (activeSectionView[0]) {
909 activeSectionView[0].$el.addClass("e-open");
910 var eventNamespace = this.getNamespaceArray();
911 eventNamespace.push(activeSection, "activated");
912 elementor.channels.editor.trigger(eventNamespace.join(":"), this);
913 }
914 },
915 onRenderCollection: function onRenderCollection() {
916 this.openActiveSection();
917 ControlsStack.handlePopovers(this);
918 },
919 onModelDestroy: function onModelDestroy() {
920 this.destroy();
921 },
922 onReloadButtonClick: function onReloadButtonClick() {
923 elementor.reloadPreview();
924 },
925 onDeviceModeChange: function onDeviceModeChange() {
926 if ("desktop" === elementor.channels.deviceMode.request("currentMode")) this.$el.removeClass("elementor-responsive-switchers-open");
927 },
928 onChildviewControlSectionClicked: function onChildviewControlSectionClicked(childView) {
929 var isSectionOpen = childView.$el.hasClass("e-open");
930 this.activateSection(isSectionOpen ? null : childView.model.get("name"));
931 this._renderChildren();
932 },
933 onChildviewResponsiveSwitcherClick: function onChildviewResponsiveSwitcherClick(childView, device) {
934 if ("desktop" === device) this.$el.toggleClass("elementor-responsive-switchers-open");
935 }
936 }, {
937 handlePopovers: function handlePopovers(view) {
938 var popover;
939 this.removePopovers(view);
940 view.popovers = [];
941 view.children.each(function(control) {
942 if (popover) popover.addChild(control);
943 var popoverData = control.model.get("popover");
944 if (!popoverData) return;
945 if (popoverData.start) {
946 popover = new ControlsPopover(control);
947 view.popovers.push(popover);
948 }
949 if (popoverData.end) popover = null;
950 });
951 },
952 removePopovers: function removePopovers(view) {
953 var _view$popovers;
954 (_view$popovers = view.popovers) === null || _view$popovers === void 0 || _view$popovers.forEach(function(popover) {
955 return popover.destroy();
956 });
957 }
958 });
959
960 //#endregion
961 //#region assets/dev/js/editor/elements/models/base-settings.js
962 var require_base_settings = /* @__PURE__ */ __commonJSMin(((exports, module) => {
963 init_typeof();
964 var BaseSettingsModel = Backbone.Model.extend({
965 options: {},
966 initialize: function initialize(data, options) {
967 var self = this;
968 self.options = options;
969 self.controls = elementor.mergeControlsSettings(options.controls);
970 self.validators = {};
971 if (!self.controls) return;
972 var attrs = data || {};
973 var defaults = {};
974 _.each(self.controls, function(control) {
975 if (control.features && -1 !== control.features.indexOf("ui")) return;
976 var controlName = control.name;
977 if ("object" === _typeof(control.default)) defaults[controlName] = structuredClone(control.default);
978 else defaults[controlName] = control.default;
979 var isDynamicControl = control.dynamic && control.dynamic.active;
980 var hasDynamicSettings = isDynamicControl && attrs.__dynamic__ && attrs.__dynamic__[controlName];
981 if (isDynamicControl && !hasDynamicSettings && control.dynamic.default) {
982 if (!attrs.__dynamic__) attrs.__dynamic__ = {};
983 attrs.__dynamic__[controlName] = control.dynamic.default;
984 hasDynamicSettings = true;
985 }
986 var isMultipleControl = jQuery.isPlainObject(control.default);
987 if (void 0 !== attrs[controlName] && isMultipleControl && !_.isObject(attrs[controlName]) && !hasDynamicSettings) {
988 elementorCommon.debug.addCustomError(/* @__PURE__ */ new TypeError("An invalid argument supplied as multiple control value"), "InvalidElementData", "Element `" + (self.get("widgetType") || self.get("elType")) + "` got <" + attrs[controlName] + "> as `" + controlName + "` value. Expected array or object.");
989 delete attrs[controlName];
990 }
991 if (void 0 === attrs[controlName]) attrs[controlName] = defaults[controlName];
992 });
993 self.defaults = defaults;
994 self.handleRepeaterData(attrs);
995 self.set(attrs);
996 },
997 convertRepeaterValueToCollection: function convertRepeaterValueToCollection(attrs, repeaterControl) {
998 return new Backbone.Collection(attrs[repeaterControl.name], { model: function model(attributes, options) {
999 options = options || {};
1000 options.controls = {};
1001 Object.values(repeaterControl.fields).forEach(function(item) {
1002 options.controls[item.name] = item;
1003 });
1004 if (!attributes._id) attributes._id = elementorCommon.helpers.getUniqueId();
1005 return new BaseSettingsModel(attributes, options);
1006 } });
1007 },
1008 handleRepeaterData: function handleRepeaterData(attrs) {
1009 var self = this;
1010 _.each(this.controls, function(field) {
1011 if (field.is_repeater) {
1012 if (!(attrs[field.name] instanceof Backbone.Collection)) attrs[field.name] = self.convertRepeaterValueToCollection(attrs, field);
1013 }
1014 });
1015 },
1016 getFontControls: function getFontControls() {
1017 return this.getControlsByType("font");
1018 },
1019 getIconsControls: function getIconsControls() {
1020 return this.getControlsByType("icons");
1021 },
1022 getControlsByType: function getControlsByType(type) {
1023 return _.filter(this.getActiveControls(), function(control) {
1024 return type === control.type;
1025 });
1026 },
1027 getStyleControls: function getStyleControls(controls, attributes) {
1028 var self = this;
1029 controls = structuredClone(self.getActiveControls(controls, attributes));
1030 var styleControls = [];
1031 jQuery.each(controls, function() {
1032 var _control$dynamic;
1033 var control = this;
1034 var controlDefaultSettings = elementor.config.controls[control.type];
1035 control = jQuery.extend({}, controlDefaultSettings, control);
1036 if (control.fields) {
1037 var styleFields = [];
1038 if (!(self.attributes[control.name] instanceof Backbone.Collection)) self.attributes[control.name] = self.convertRepeaterValueToCollection(self.attributes, control);
1039 self.attributes[control.name].each(function(item) {
1040 styleFields.push(self.getStyleControls(control.fields, item.attributes));
1041 });
1042 control.styleFields = styleFields;
1043 }
1044 if (control.fields || (_control$dynamic = control.dynamic) !== null && _control$dynamic !== void 0 && _control$dynamic.active || self.isGlobalControl(control, controls) || self.isStyleControl(control.name, controls)) styleControls.push(control);
1045 });
1046 return styleControls;
1047 },
1048 isGlobalControl: function isGlobalControl(control, controls) {
1049 var _globalControl$global;
1050 var _this$attributes$__gl;
1051 var controlGlobalKey = control.name;
1052 if (control.groupType) controlGlobalKey = control.groupPrefix + control.groupType;
1053 var globalControl = controls[controlGlobalKey];
1054 if (!(globalControl !== null && globalControl !== void 0 && (_globalControl$global = globalControl.global) !== null && _globalControl$global !== void 0 && _globalControl$global.active)) return false;
1055 return !!((_this$attributes$__gl = this.attributes.__globals__) === null || _this$attributes$__gl === void 0 ? void 0 : _this$attributes$__gl[controlGlobalKey]);
1056 },
1057 isStyleControl: function isStyleControl(attribute, controls) {
1058 controls = controls || this.controls;
1059 var currentControl = _.find(controls, function(control) {
1060 return attribute === control.name;
1061 });
1062 return currentControl && !_.isEmpty(currentControl.selectors);
1063 },
1064 getClassControls: function getClassControls(controls) {
1065 controls = controls || this.controls;
1066 return _.filter(controls, function(control) {
1067 return !_.isUndefined(control.prefix_class);
1068 });
1069 },
1070 isClassControl: function isClassControl(attribute) {
1071 var currentControl = _.find(this.controls, function(control) {
1072 return attribute === control.name;
1073 });
1074 return currentControl && !_.isUndefined(currentControl.prefix_class);
1075 },
1076 getControl: function getControl(id) {
1077 return _.find(this.controls, function(control) {
1078 return id === control.name;
1079 });
1080 },
1081 getActiveControls: function getActiveControls(controls, attributes) {
1082 var activeControls = {};
1083 if (!controls) controls = this.controls;
1084 if (!attributes) attributes = this.attributes;
1085 attributes = this.parseGlobalSettings(attributes, controls);
1086 jQuery.each(controls, function(controlKey, control) {
1087 if (elementor.helpers.isActiveControl(control, attributes, controls)) activeControls[controlKey] = control;
1088 });
1089 return activeControls;
1090 },
1091 clone: function clone() {
1092 return new BaseSettingsModel(elementorCommon.helpers.cloneObject(this.attributes), elementorCommon.helpers.cloneObject(this.options));
1093 },
1094 setExternalChange: function setExternalChange(key, value) {
1095 var self = this;
1096 var settingsToChange;
1097 if ("object" === _typeof(key)) settingsToChange = key;
1098 else {
1099 settingsToChange = {};
1100 settingsToChange[key] = value;
1101 }
1102 self.set(settingsToChange);
1103 jQuery.each(settingsToChange, function(changedKey, changedValue) {
1104 self.trigger("change:external:" + changedKey, changedValue);
1105 });
1106 },
1107 parseDynamicSettings: function parseDynamicSettings(settings, options, controls) {
1108 var self = this;
1109 settings = elementorCommon.helpers.cloneObject(settings || self.attributes);
1110 options = options || {};
1111 controls = controls || this.controls;
1112 jQuery.each(controls, function() {
1113 var control = this;
1114 var valueToParse;
1115 if (control.is_repeater) {
1116 valueToParse = settings[control.name];
1117 valueToParse.forEach(function(value, key) {
1118 valueToParse[key] = self.parseDynamicSettings(value, options, control.fields);
1119 });
1120 return;
1121 }
1122 valueToParse = settings.__dynamic__ && settings.__dynamic__[control.name];
1123 if (!valueToParse) return;
1124 var dynamicSettings = control.dynamic;
1125 if (void 0 === dynamicSettings) dynamicSettings = elementor.config.controls[control.type].dynamic;
1126 if (!dynamicSettings || !dynamicSettings.active) return;
1127 var dynamicValue;
1128 try {
1129 dynamicValue = elementor.dynamicTags.parseTagsText(valueToParse, dynamicSettings, elementor.dynamicTags.getTagDataContent);
1130 } catch (error) {
1131 if (elementor.dynamicTags.CACHE_KEY_NOT_FOUND_ERROR !== error.message) throw error;
1132 dynamicValue = "";
1133 if (options.onServerRequestStart) options.onServerRequestStart();
1134 elementor.dynamicTags.refreshCacheFromServer(function() {
1135 if (options.onServerRequestEnd) options.onServerRequestEnd();
1136 });
1137 }
1138 if (dynamicSettings.property) settings[control.name][dynamicSettings.property] = dynamicValue;
1139 else settings[control.name] = dynamicValue;
1140 });
1141 return settings;
1142 },
1143 parseGlobalSettings: function parseGlobalSettings(settings, controls) {
1144 var _this = this;
1145 settings = elementorCommon.helpers.cloneObject(settings);
1146 controls = controls || this.controls;
1147 jQuery.each(controls, function(index, control) {
1148 var _settings$__globals__;
1149 var _globalSettings;
1150 var valueToParse;
1151 if (control.is_repeater) {
1152 valueToParse = settings[control.name];
1153 valueToParse.forEach(function(value, key) {
1154 valueToParse[key] = _this.parseGlobalSettings(value, control.fields);
1155 });
1156 return;
1157 }
1158 valueToParse = (_settings$__globals__ = settings.__globals__) === null || _settings$__globals__ === void 0 ? void 0 : _settings$__globals__[control.name];
1159 if (!valueToParse) return;
1160 var globalSettings = control.global;
1161 if (void 0 === globalSettings) globalSettings = elementor.config.controls[control.type].global;
1162 if (!((_globalSettings = globalSettings) !== null && _globalSettings !== void 0 && _globalSettings.active)) return;
1163 var _$e$data$commandExtra = $e.data.commandExtractArgs(valueToParse);
1164 var command = _$e$data$commandExtra.command;
1165 var args = _$e$data$commandExtra.args;
1166 var globalValue = $e.data.getCache($e.components.get("globals"), command, args.query);
1167 if (control.groupType) settings[control.name] = "custom";
1168 else settings[control.name] = globalValue;
1169 });
1170 return settings;
1171 },
1172 removeDataDefaults: function removeDataDefaults(data, controls) {
1173 var _this2 = this;
1174 jQuery.each(data, function(key) {
1175 var control = controls[key];
1176 if (!control) return;
1177 if (control.save_default || ("text" === control.type || "textarea" === control.type) && data[key]) return;
1178 if (control.is_repeater) {
1179 data[key].forEach(function(repeaterRow) {
1180 _this2.removeDataDefaults(repeaterRow, control.fields);
1181 });
1182 return;
1183 }
1184 if (_.isEqual(data[key], control.default)) delete data[key];
1185 });
1186 },
1187 toJSON: function toJSON(options) {
1188 var data = Backbone.Model.prototype.toJSON.call(this);
1189 options = options || {};
1190 delete data.widgetType;
1191 delete data.elType;
1192 delete data.isInner;
1193 _.each(data, function(attribute, key) {
1194 if (attribute && attribute.toJSON) data[key] = attribute.toJSON();
1195 });
1196 if (options.remove && -1 !== options.remove.indexOf("default")) this.removeDataDefaults(data, this.controls);
1197 return structuredClone(data);
1198 }
1199 });
1200 /**
1201 * @name BaseSettingsModel
1202 */
1203 module.exports = BaseSettingsModel;
1204 }));
1205
1206 //#endregion
1207 //#region node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
1208 var import_base_settings = /* @__PURE__ */ __toESM(require_base_settings());
1209 function _arrayWithHoles(r) {
1210 if (Array.isArray(r)) return r;
1211 }
1212
1213 //#endregion
1214 //#region node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
1215 function _iterableToArrayLimit(r, l) {
1216 var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
1217 if (null != t) {
1218 var e;
1219 var n;
1220 var i;
1221 var u;
1222 var a = [];
1223 var f = !0;
1224 var o = !1;
1225 try {
1226 if (i = (t = t.call(r)).next, 0 === l) {
1227 if (Object(t) !== t) return;
1228 f = !1;
1229 } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
1230 } catch (r) {
1231 o = !0, n = r;
1232 } finally {
1233 try {
1234 if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
1235 } finally {
1236 if (o) throw n;
1237 }
1238 }
1239 return a;
1240 }
1241 }
1242
1243 //#endregion
1244 //#region node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
1245 function _arrayLikeToArray$2(r, a) {
1246 (null == a || a > r.length) && (a = r.length);
1247 for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
1248 return n;
1249 }
1250 __name(_arrayLikeToArray$2, "_arrayLikeToArray");
1251
1252 //#endregion
1253 //#region node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
1254 function _unsupportedIterableToArray$2(r, a) {
1255 if (r) {
1256 if ("string" == typeof r) return _arrayLikeToArray$2(r, a);
1257 var t = {}.toString.call(r).slice(8, -1);
1258 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$2(r, a) : void 0;
1259 }
1260 }
1261 __name(_unsupportedIterableToArray$2, "_unsupportedIterableToArray");
1262
1263 //#endregion
1264 //#region node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
1265 function _nonIterableRest() {
1266 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1267 }
1268
1269 //#endregion
1270 //#region node_modules/@babel/runtime/helpers/esm/slicedToArray.js
1271 function _slicedToArray(r, e) {
1272 return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$2(r, e) || _nonIterableRest();
1273 }
1274
1275 //#endregion
1276 //#region node_modules/@babel/runtime/helpers/esm/superPropBase.js
1277 function _superPropBase(t, o) {
1278 for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););
1279 return t;
1280 }
1281
1282 //#endregion
1283 //#region node_modules/@babel/runtime/helpers/esm/get.js
1284 function _get() {
1285 return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function(e, t, r) {
1286 var p = _superPropBase(e, t);
1287 if (p) {
1288 var n = Object.getOwnPropertyDescriptor(p, t);
1289 return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
1290 }
1291 }, _get.apply(null, arguments);
1292 }
1293
1294 //#endregion
1295 //#region assets/dev/js/modules/imports/instance-type.js
1296 function _superPropGet(t, o, e, r) {
1297 var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e);
1298 return 2 & r && "function" == typeof p ? function(t) {
1299 return p.apply(e, t);
1300 } : p;
1301 }
1302 var InstanceType = /*#__PURE__*/ function() {
1303 function InstanceType() {
1304 var _this = this;
1305 _classCallCheck(this, InstanceType);
1306 var target = this instanceof InstanceType ? this.constructor : void 0;
1307 var prototypes = [];
1308 while (target.__proto__ && target.__proto__.name) {
1309 prototypes.push(target.__proto__);
1310 target = target.__proto__;
1311 }
1312 prototypes.reverse().forEach(function(proto) {
1313 return _this instanceof proto;
1314 });
1315 }
1316 return _createClass(InstanceType, null, [{
1317 key: Symbol.hasInstance,
1318 value: function value(target) {
1319 /**
1320 * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class
1321 * its give's opportunity to mange capabilities of instanceOf operator.
1322 * saving current class each time will give option later to handle instanceOf manually.
1323 */
1324 var result = _superPropGet(InstanceType, Symbol.hasInstance, this, 2)([target]);
1325 if (target && !target.constructor.getInstanceType) return result;
1326 if (target) {
1327 if (!target.instanceTypes) target.instanceTypes = [];
1328 if (!result) {
1329 if (this.getInstanceType() === target.constructor.getInstanceType()) result = true;
1330 }
1331 if (result) {
1332 var name = this.getInstanceType === InstanceType.getInstanceType ? "BaseInstanceType" : this.getInstanceType();
1333 if (-1 === target.instanceTypes.indexOf(name)) target.instanceTypes.push(name);
1334 }
1335 }
1336 if (!result && target) result = target.instanceTypes && Array.isArray(target.instanceTypes) && -1 !== target.instanceTypes.indexOf(this.getInstanceType());
1337 return result;
1338 }
1339 }, {
1340 key: "getInstanceType",
1341 value: function getInstanceType() {
1342 elementorModules.ForceMethodImplementation();
1343 }
1344 }]);
1345 }();
1346
1347 //#endregion
1348 //#region assets/dev/js/editor/utils/is-instanceof.js
1349 function _createForOfIteratorHelper$1(r, e) {
1350 var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
1351 if (!t) {
1352 if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) {
1353 t && (r = t);
1354 var _n = 0;
1355 var F = function F() {};
1356 return {
1357 s: F,
1358 n: function n() {
1359 return _n >= r.length ? { done: !0 } : {
1360 done: !1,
1361 value: r[_n++]
1362 };
1363 },
1364 e: function e(r) {
1365 throw r;
1366 },
1367 f: F
1368 };
1369 }
1370 throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1371 }
1372 var o;
1373 var a = !0;
1374 var u = !1;
1375 return {
1376 s: function s() {
1377 t = t.call(r);
1378 },
1379 n: function n() {
1380 var r = t.next();
1381 return a = r.done, r;
1382 },
1383 e: function e(r) {
1384 u = !0, o = r;
1385 },
1386 f: function f() {
1387 try {
1388 a || null == t.return || t.return();
1389 } finally {
1390 if (u) throw o;
1391 }
1392 }
1393 };
1394 }
1395 __name(_createForOfIteratorHelper$1, "_createForOfIteratorHelper");
1396 function _unsupportedIterableToArray$1(r, a) {
1397 if (r) {
1398 if ("string" == typeof r) return _arrayLikeToArray$1(r, a);
1399 var t = {}.toString.call(r).slice(8, -1);
1400 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$1(r, a) : void 0;
1401 }
1402 }
1403 __name(_unsupportedIterableToArray$1, "_unsupportedIterableToArray");
1404 function _arrayLikeToArray$1(r, a) {
1405 (null == a || a > r.length) && (a = r.length);
1406 for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
1407 return n;
1408 }
1409 __name(_arrayLikeToArray$1, "_arrayLikeToArray");
1410 /**
1411 * Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved
1412 * object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can
1413 * check whether it's instanceof by using the objects constructor and prototype names.
1414 *
1415 * @param object
1416 * @param constructors
1417 * @return {boolean}
1418 */
1419 var is_instanceof_default = /* @__PURE__ */ __name((function(object, constructors) {
1420 constructors = Array.isArray(constructors) ? constructors : [constructors];
1421 var _iterator = _createForOfIteratorHelper$1(constructors);
1422 var _step;
1423 try {
1424 for (_iterator.s(); !(_step = _iterator.n()).done;) {
1425 var constructor = _step.value;
1426 if (object.constructor.name === constructor.prototype[Symbol.toStringTag]) return true;
1427 }
1428 } catch (err) {
1429 _iterator.e(err);
1430 } finally {
1431 _iterator.f();
1432 }
1433 return false;
1434 }), "default");
1435
1436 //#endregion
1437 //#region assets/dev/js/modules/imports/args-object.js
1438 init_typeof();
1439 function _callSuper$2(t, o, e) {
1440 return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
1441 }
1442 __name(_callSuper$2, "_callSuper");
1443 function _isNativeReflectConstruct$3() {
1444 try {
1445 var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1446 } catch (t) {}
1447 return (_isNativeReflectConstruct$3 = function _isNativeReflectConstruct() {
1448 return !!t;
1449 })();
1450 }
1451 __name(_isNativeReflectConstruct$3, "_isNativeReflectConstruct");
1452 var ArgsObject = /*#__PURE__*/ function(_InstanceType) {
1453 /**
1454 * Function constructor().
1455 *
1456 * Create ArgsObject.
1457 *
1458 * @param {{}} args
1459 */
1460 function ArgsObject(args) {
1461 var _this;
1462 _classCallCheck(this, ArgsObject);
1463 _this = _callSuper$2(this, ArgsObject);
1464 _this.args = args;
1465 return _this;
1466 }
1467 /**
1468 * Function requireArgument().
1469 *
1470 * Validate property in args.
1471 *
1472 * @param {string} property
1473 * @param {{}} args
1474 *
1475 * @throws {Error}
1476 */
1477 _inherits(ArgsObject, _InstanceType);
1478 return _createClass(ArgsObject, [
1479 {
1480 key: "requireArgument",
1481 value: function requireArgument(property) {
1482 var args = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.args;
1483 if (!Object.prototype.hasOwnProperty.call(args, property)) throw Error("".concat(property, " is required."));
1484 }
1485 },
1486 {
1487 key: "requireArgumentType",
1488 value: function requireArgumentType(property, type) {
1489 var args = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.args;
1490 this.requireArgument(property, args);
1491 if (_typeof(args[property]) !== type) throw Error("".concat(property, " invalid type: ").concat(type, "."));
1492 }
1493 },
1494 {
1495 key: "requireArgumentInstance",
1496 value: function requireArgumentInstance(property, instance) {
1497 var args = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.args;
1498 this.requireArgument(property, args);
1499 if (!(args[property] instanceof instance) && !is_instanceof_default(args[property], instance)) throw Error("".concat(property, " invalid instance."));
1500 }
1501 },
1502 {
1503 key: "requireArgumentConstructor",
1504 value: function requireArgumentConstructor(property, type) {
1505 var args = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.args;
1506 this.requireArgument(property, args);
1507 if (args[property].constructor.toString() !== type.prototype.constructor.toString()) throw Error("".concat(property, " invalid constructor type."));
1508 }
1509 }
1510 ], [{
1511 key: "getInstanceType",
1512 value: function getInstanceType() {
1513 return "ArgsObject";
1514 }
1515 }]);
1516 }(InstanceType);
1517
1518 //#endregion
1519 //#region assets/dev/js/editor/container/panel.js
1520 /**
1521 * @typedef {import('./container')} Container
1522 */
1523 var Panel = /*#__PURE__*/ function() {
1524 /**
1525 * Function constructor().
1526 *
1527 * Create constructor panel.
1528 *
1529 * @param {Container} container
1530 */
1531 function Panel(container) {
1532 _classCallCheck(this, Panel);
1533 this.container = container;
1534 }
1535 /**
1536 * Function refresh().
1537 *
1538 * Refresh the panel.
1539 */
1540 return _createClass(Panel, [
1541 {
1542 key: "refresh",
1543 value: function refresh() {
1544 if ($e.routes.isPartOf("panel/editor")) $e.routes.refreshContainer("panel");
1545 }
1546 },
1547 {
1548 key: "closeEditor",
1549 value: function closeEditor() {
1550 $e.route("panel/elements/categories");
1551 }
1552 },
1553 {
1554 key: "getControlView",
1555 value: function getControlView(name) {
1556 return elementor.getPanelView().getCurrentPageView().children.findByModelCid(this.getControlModel(name).cid);
1557 }
1558 },
1559 {
1560 key: "getControlModel",
1561 value: function getControlModel(name) {
1562 return elementor.getPanelView().getCurrentPageView().collection.findWhere({ name });
1563 }
1564 }
1565 ]);
1566 }();
1567
1568 //#endregion
1569 //#region node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
1570 function _isNativeFunction(t) {
1571 try {
1572 return -1 !== Function.toString.call(t).indexOf("[native code]");
1573 } catch (n) {
1574 return "function" == typeof t;
1575 }
1576 }
1577
1578 //#endregion
1579 //#region node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
1580 function _isNativeReflectConstruct$2() {
1581 try {
1582 var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1583 } catch (t) {}
1584 return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() {
1585 return !!t;
1586 })();
1587 }
1588 __name(_isNativeReflectConstruct$2, "_isNativeReflectConstruct");
1589
1590 //#endregion
1591 //#region node_modules/@babel/runtime/helpers/esm/construct.js
1592 function _construct(t, e, r) {
1593 if (_isNativeReflectConstruct$2()) return Reflect.construct.apply(null, arguments);
1594 var o = [null];
1595 o.push.apply(o, e);
1596 var p = new (t.bind.apply(t, o))();
1597 return r && _setPrototypeOf(p, r.prototype), p;
1598 }
1599
1600 //#endregion
1601 //#region node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
1602 function _wrapNativeSuper(t) {
1603 var r = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0;
1604 return _wrapNativeSuper = function _wrapNativeSuper(t) {
1605 if (null === t || !_isNativeFunction(t)) return t;
1606 if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function");
1607 if (void 0 !== r) {
1608 if (r.has(t)) return r.get(t);
1609 r.set(t, Wrapper);
1610 }
1611 function Wrapper() {
1612 return _construct(t, arguments, _getPrototypeOf(this).constructor);
1613 }
1614 return Wrapper.prototype = Object.create(t.prototype, { constructor: {
1615 value: Wrapper,
1616 enumerable: !1,
1617 writable: !0,
1618 configurable: !0
1619 } }), _setPrototypeOf(Wrapper, t);
1620 }, _wrapNativeSuper(t);
1621 }
1622
1623 //#endregion
1624 //#region assets/dev/js/editor/container/model/children-array.js
1625 function _createForOfIteratorHelper(r, e) {
1626 var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
1627 if (!t) {
1628 if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
1629 t && (r = t);
1630 var _n = 0;
1631 var F = function F() {};
1632 return {
1633 s: F,
1634 n: function n() {
1635 return _n >= r.length ? { done: !0 } : {
1636 done: !1,
1637 value: r[_n++]
1638 };
1639 },
1640 e: function e(r) {
1641 throw r;
1642 },
1643 f: F
1644 };
1645 }
1646 throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1647 }
1648 var o;
1649 var a = !0;
1650 var u = !1;
1651 return {
1652 s: function s() {
1653 t = t.call(r);
1654 },
1655 n: function n() {
1656 var r = t.next();
1657 return a = r.done, r;
1658 },
1659 e: function e(r) {
1660 u = !0, o = r;
1661 },
1662 f: function f() {
1663 try {
1664 a || null == t.return || t.return();
1665 } finally {
1666 if (u) throw o;
1667 }
1668 }
1669 };
1670 }
1671 function _unsupportedIterableToArray(r, a) {
1672 if (r) {
1673 if ("string" == typeof r) return _arrayLikeToArray(r, a);
1674 var t = {}.toString.call(r).slice(8, -1);
1675 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;
1676 }
1677 }
1678 function _arrayLikeToArray(r, a) {
1679 (null == a || a > r.length) && (a = r.length);
1680 for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
1681 return n;
1682 }
1683 function _callSuper$1(t, o, e) {
1684 return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
1685 }
1686 __name(_callSuper$1, "_callSuper");
1687 function _isNativeReflectConstruct$1() {
1688 try {
1689 var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1690 } catch (t) {}
1691 return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() {
1692 return !!t;
1693 })();
1694 }
1695 __name(_isNativeReflectConstruct$1, "_isNativeReflectConstruct");
1696 /**
1697 * @typedef {import('../container')} Container
1698 */
1699 var ChildrenArray = /*#__PURE__*/ function(_Array) {
1700 function ChildrenArray() {
1701 _classCallCheck(this, ChildrenArray);
1702 return _callSuper$1(this, ChildrenArray, arguments);
1703 }
1704 _inherits(ChildrenArray, _Array);
1705 return _createClass(ChildrenArray, [
1706 {
1707 key: "clear",
1708 value: function clear() {
1709 this.length = 0;
1710 }
1711 },
1712 {
1713 key: "findRecursive",
1714 value: function findRecursive(callback) {
1715 var _iterator = _createForOfIteratorHelper(this);
1716 var _step;
1717 try {
1718 for (_iterator.s(); !(_step = _iterator.n()).done;) {
1719 var container = _step.value;
1720 if (callback(container)) return container;
1721 if (container.children.length) {
1722 var foundChildren = container.children.findRecursive(callback);
1723 if (foundChildren) return foundChildren;
1724 }
1725 }
1726 } catch (err) {
1727 _iterator.e(err);
1728 } finally {
1729 _iterator.f();
1730 }
1731 return false;
1732 }
1733 },
1734 {
1735 key: "forEachRecursive",
1736 value: function forEachRecursive(callback) {
1737 var _iterator2 = _createForOfIteratorHelper(this);
1738 var _step2;
1739 try {
1740 for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1741 var container = _step2.value;
1742 callback(container);
1743 if (container.children.length) container.children.forEachRecursive(callback);
1744 }
1745 } catch (err) {
1746 _iterator2.e(err);
1747 } finally {
1748 _iterator2.f();
1749 }
1750 }
1751 },
1752 {
1753 key: "someRecursive",
1754 value: function someRecursive(callback) {
1755 var _iterator3 = _createForOfIteratorHelper(this);
1756 var _step3;
1757 try {
1758 for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
1759 var _container$children;
1760 var container = _step3.value;
1761 if (callback(container)) return true;
1762 if ((_container$children = container.children) !== null && _container$children !== void 0 && _container$children.length) {
1763 if (container.children.someRecursive(callback)) return true;
1764 }
1765 }
1766 } catch (err) {
1767 _iterator3.e(err);
1768 } finally {
1769 _iterator3.f();
1770 }
1771 return false;
1772 }
1773 }
1774 ]);
1775 }(/*#__PURE__*/ _wrapNativeSuper(Array));
1776
1777 //#endregion
1778 //#region assets/dev/js/editor/container/container.js
1779 init_typeof();
1780 function _callSuper(t, o, e) {
1781 return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
1782 }
1783 function _isNativeReflectConstruct() {
1784 try {
1785 var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
1786 } catch (t) {}
1787 return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
1788 return !!t;
1789 })();
1790 }
1791 /**
1792 * @typedef {import('../../../../lib/backbone/backbone.marionette')} Backbone
1793 * @typedef {import('../../../../lib/backbone/backbone.marionette')} Marionette
1794 * @typedef {import('../elements/views/base')} BaseElementView
1795 * @typedef {import('../elements/views/section')} SectionView
1796 * @typedef {import('../views/base-container')} BaseContainer
1797 * @typedef {import('../elements/models/base-element-model')} BaseElementModel
1798 */
1799 /**
1800 * TODO: ViewsOptions
1801 *
1802 * @typedef {(Marionette.View|Marionette.CompositeView|BaseElementView|SectionView|BaseContainer)} ViewsOptions
1803 */
1804 var Container = /*#__PURE__*/ function(_ArgsObject) {
1805 /**
1806 * Function constructor().
1807 *
1808 * Create container.
1809 *
1810 * @param {{}} args
1811 *
1812 * @throws {Error}
1813 */
1814 function Container(args) {
1815 var _this;
1816 _classCallCheck(this, Container);
1817 _this = _callSuper(this, Container, [args]);
1818 /**
1819 * Container type.
1820 *
1821 * @type {string}
1822 */
1823 _defineProperty(_this, "type", void 0);
1824 /**
1825 * Container id.
1826 *
1827 * @type {string}
1828 */
1829 _defineProperty(_this, "id", void 0);
1830 /**
1831 * Document Object.
1832 *
1833 * @type {{}}
1834 */
1835 _defineProperty(_this, "document", void 0);
1836 /**
1837 * Container model.
1838 *
1839 * @type {(Backbone.Model|BaseElementModel)}
1840 */
1841 _defineProperty(_this, "model", void 0);
1842 /**
1843 * Container settings.
1844 *
1845 * @type {Backbone.Model}
1846 */
1847 _defineProperty(_this, "settings", void 0);
1848 /**
1849 * Container view.
1850 *
1851 * @type {ViewsOptions}
1852 */
1853 _defineProperty(_this, "view", void 0);
1854 /**
1855 * Container parent.
1856 *
1857 * @type {Container}
1858 */
1859 _defineProperty(_this, "parent", void 0);
1860 /**
1861 * Container children(s).
1862 *
1863 * @type {ChildrenArray}
1864 */
1865 _defineProperty(_this, "children", new ChildrenArray());
1866 /**
1867 * Container dynamic.
1868 *
1869 * @type {Backbone.Model}
1870 */
1871 _defineProperty(_this, "dynamic", void 0);
1872 /**
1873 * Container globals.
1874 *
1875 * @type {Backbone.Model}
1876 */
1877 _defineProperty(_this, "globals", void 0);
1878 /**
1879 * Container label.
1880 *
1881 * @type {string}
1882 */
1883 _defineProperty(_this, "label", void 0);
1884 /**
1885 * Container controls.
1886 *
1887 * @type {{}}
1888 */
1889 _defineProperty(_this, "controls", {});
1890 /**
1891 * Repeaters containers
1892 *
1893 * @type {{}}
1894 */
1895 _defineProperty(_this, "repeaters", {});
1896 /**
1897 * Container renderer (The one who render).
1898 *
1899 * @type {Container}
1900 */
1901 _defineProperty(_this, "renderer", void 0);
1902 /**
1903 * Container panel.
1904 *
1905 * @type {Panel}
1906 */
1907 _defineProperty(_this, "panel", void 0);
1908 /**
1909 * Controls placeholders.
1910 *
1911 * @type {{}}
1912 */
1913 _defineProperty(_this, "placeholders", {});
1914 _this.validateArgs(args);
1915 args = Object.entries(args);
1916 if (0 === args.length) throw Error("Container cannot be empty.");
1917 args.forEach(function(_ref) {
1918 var _ref2 = _slicedToArray(_ref, 2);
1919 var key = _ref2[0];
1920 var value = _ref2[1];
1921 _this[key] = "undefined" === typeof value ? _this[key] : value;
1922 });
1923 if ("undefined" === typeof _this.renderer) _this.renderer = _this;
1924 if (!_this.document) _this.document = elementor.documents.getCurrent();
1925 _this.dynamic = new Backbone.Model(_this.settings.get("__dynamic__"));
1926 _this.globals = new Backbone.Model(_this.settings.get("__globals__"));
1927 _this.panel = new Panel(_this);
1928 _this.initialize();
1929 return _this;
1930 }
1931 _inherits(Container, _ArgsObject);
1932 return _createClass(Container, [
1933 {
1934 key: "initialize",
1935 value: function initialize() {
1936 if (this.isViewElement()) {
1937 this.addToParent();
1938 this.handleChildrenRecursive();
1939 this.view.on("destroy", this.removeFromParent.bind(this));
1940 }
1941 this.handleRepeaterChildren();
1942 }
1943 },
1944 {
1945 key: "validateArgs",
1946 value: function validateArgs(args) {
1947 this.requireArgumentType("type", "string", args);
1948 this.requireArgumentType("id", "string", args);
1949 this.requireArgumentInstance("settings", Backbone.Model, args);
1950 this.requireArgumentInstance("model", Backbone.Model, args);
1951 if (false !== args.parent) this.requireArgumentInstance("parent", elementorModules.editor.Container, args);
1952 }
1953 },
1954 {
1955 key: "getGroupRelatedControls",
1956 value: function getGroupRelatedControls(settings) {
1957 var _this2 = this;
1958 var result = {};
1959 Object.keys(settings).forEach(function(settingKey) {
1960 Object.values(_this2.controls).forEach(function(control) {
1961 var _this2$controls$setti;
1962 if (settingKey === control.name) result[control.name] = control;
1963 else if ((_this2$controls$setti = _this2.controls[settingKey]) !== null && _this2$controls$setti !== void 0 && _this2$controls$setti.groupPrefix) {
1964 var groupPrefix = _this2.controls[settingKey].groupPrefix;
1965 if (control.name.toString().startsWith(groupPrefix)) result[control.name] = control;
1966 }
1967 });
1968 });
1969 return result;
1970 }
1971 },
1972 {
1973 key: "getAffectingControls",
1974 value: function getAffectingControls() {
1975 var _this3 = this;
1976 var result = {};
1977 var activeControls = this.settings.getActiveControls();
1978 Object.entries(activeControls).forEach(function(_ref3) {
1979 var _ref4 = _slicedToArray(_ref3, 2);
1980 var controlName = _ref4[0];
1981 var control = _ref4[1];
1982 var controlValue = _this3.settings.get(control.name);
1983 if (control.global && !(controlValue !== null && controlValue !== void 0 && controlValue.length)) {
1984 var _this3$globals$get;
1985 if ((_this3$globals$get = _this3.globals.get(control.name)) !== null && _this3$globals$get !== void 0 && _this3$globals$get.length || _this3.getGlobalDefault(controlName).length) {
1986 control.global.utilized = true;
1987 result[controlName] = control;
1988 return;
1989 }
1990 }
1991 if (control.dynamic) {
1992 if (_this3.dynamic.get(controlName)) {
1993 control.dynamic.utilized = true;
1994 result[controlName] = control;
1995 return;
1996 }
1997 }
1998 if (controlValue === control.default) return;
1999 if (!controlValue) return;
2000 if ("object" === _typeof(controlValue) && Object.values(controlValue).join() === Object.values(control.default).join()) return;
2001 result[controlName] = control;
2002 });
2003 return result;
2004 }
2005 },
2006 {
2007 key: "getParentAncestry",
2008 value: function getParentAncestry() {
2009 var result = [];
2010 var parent = this;
2011 while (parent) {
2012 result.push(parent);
2013 parent = parent.parent;
2014 }
2015 return result;
2016 }
2017 },
2018 {
2019 key: "handleChildrenRecursive",
2020 value: function handleChildrenRecursive() {
2021 var _this$view$children;
2022 if ((_this$view$children = this.view.children) !== null && _this$view$children !== void 0 && _this$view$children.length) Object.values(this.view.children._views).forEach(function(view) {
2023 if (!view.container) return;
2024 var container = view.container;
2025 if (container.parent.children) container.parent.children[view._index] = container;
2026 container.handleChildrenRecursive();
2027 });
2028 else this.children.clear();
2029 }
2030 },
2031 {
2032 key: "addToParent",
2033 value: function addToParent() {
2034 if (!this.parent.children || this.isRepeaterItem()) return;
2035 this.parent.children.splice(this.view._index, 0, this);
2036 }
2037 },
2038 {
2039 key: "removeFromParent",
2040 value: function removeFromParent() {
2041 var _this4 = this;
2042 if (!this.parent.children || this.isRepeater()) return;
2043 this.parent.children = this.parent.children.filter(function(filtered) {
2044 return filtered.id !== _this4.id;
2045 });
2046 }
2047 },
2048 {
2049 key: "handleRepeaterChildren",
2050 value: function handleRepeaterChildren() {
2051 var _this5 = this;
2052 Object.values(this.controls).forEach(function(control) {
2053 if (!control.is_repeater) return;
2054 var model = new Backbone.Model({ name: control.name });
2055 _this5.repeaters[control.name] = new elementorModules.editor.Container({
2056 type: Container.TYPE_REPEATER,
2057 id: control.name,
2058 model,
2059 settings: model,
2060 view: _this5.view,
2061 parent: _this5,
2062 label: control.label || control.name,
2063 controls: {},
2064 renderer: _this5.renderer
2065 });
2066 _this5.settings.get(control.name).forEach(function(rowModel, index) {
2067 _this5.addRepeaterItem(control.name, rowModel, index);
2068 });
2069 });
2070 if (["widget", "document"].includes(this.type)) {
2071 var repeaters = Object.values(this.controls).filter(function(control) {
2072 return "repeater" === control.type;
2073 });
2074 if (!this.model.get("supportRepeaterChildren") && 1 === repeaters.length) Object.defineProperty(this, "children", { get: function get() {
2075 elementorDevTools.deprecation.deprecated("children", "3.0.0", "container.repeaters[ repeaterName ].children");
2076 return this.repeaters[repeaters[0].name].children;
2077 } });
2078 }
2079 }
2080 },
2081 {
2082 key: "addRepeaterItem",
2083 value: function addRepeaterItem(repeaterName, rowSettingsModel, index) {
2084 var rowId = rowSettingsModel.get("_id");
2085 if (!rowId) {
2086 rowId = "bc-" + elementorCommon.helpers.getUniqueId();
2087 rowSettingsModel.set("_id", rowId);
2088 }
2089 this.repeaters[repeaterName].children.splice(index, 0, new elementorModules.editor.Container({
2090 type: Container.TYPE_REPEATER_ITEM,
2091 id: rowSettingsModel.get("_id"),
2092 model: new Backbone.Model({ name: repeaterName }),
2093 settings: rowSettingsModel,
2094 view: this.view,
2095 parent: this.repeaters[repeaterName],
2096 label: this.label + " " + (0, _wordpress_i18n.__)("Item", "elementor"),
2097 controls: rowSettingsModel.options.controls,
2098 renderer: this.renderer
2099 }));
2100 return this.repeaters[repeaterName];
2101 }
2102 },
2103 {
2104 key: "lookup",
2105 value: function lookup() {
2106 var _this$renderer$view;
2107 var result = this;
2108 if (!this.renderer) return this;
2109 if (this !== this.renderer && (_this$renderer$view = this.renderer.view) !== null && _this$renderer$view !== void 0 && _this$renderer$view.isDisconnected && this.renderer.view.isDisconnected()) this.renderer = this.renderer.lookup();
2110 if (void 0 === this.view || !this.view.lookup || !this.view.isDisconnected()) {
2111 if (Container.TYPE_REPEATER_ITEM === this.type) this.settings = this.parent.parent.settings.get(this.model.get("name")).findWhere({ _id: this.id });
2112 return result;
2113 }
2114 var lookup = this.view.lookup();
2115 if (lookup) {
2116 result = lookup.getContainer();
2117 if (Container.REPEATER === this.type) {
2118 this.settings = result.settings.get(this.model.get("name")).findWhere({ _id: this.id });
2119 return this;
2120 }
2121 if (result.parent.children) result.parent.children[result.view._index] = result;
2122 }
2123 return result;
2124 }
2125 },
2126 {
2127 key: "findChildrenRecursive",
2128 value: function findChildrenRecursive(callback) {
2129 elementorDevTools.deprecation.deprecated("container.findChildrenRecursive( callback )", "3.5.0", "container.children.findRecursive( callback )");
2130 return this.children.findRecursive(callback);
2131 }
2132 },
2133 {
2134 key: "forEachChildrenRecursive",
2135 value: function forEachChildrenRecursive(callback) {
2136 elementorDevTools.deprecation.deprecated("container.forEachChildrenRecursive( callback )", "3.5.0", "container.children.forEachRecursive( callback )");
2137 return this.children.forEachRecursive(callback);
2138 }
2139 },
2140 {
2141 key: "render",
2142 value: function render() {
2143 var _this$view;
2144 if (!this.renderer) return;
2145 this.renderer.view.renderOnChange(this.settings, (_this$view = this.view) === null || _this$view === void 0 ? void 0 : _this$view.$el);
2146 }
2147 },
2148 {
2149 key: "renderUI",
2150 value: function renderUI() {
2151 if (!this.renderer) return;
2152 this.renderer.view.renderUI();
2153 }
2154 },
2155 {
2156 key: "isEditable",
2157 value: function isEditable() {
2158 var _this$model;
2159 var _this$model$get;
2160 var _this$model$get$get;
2161 return "edit" === elementor.channels.dataEditMode.request("activeMode") && "open" === this.document.editor.status && !((_this$model = this.model) !== null && _this$model !== void 0 && (_this$model$get = _this$model.get) !== null && _this$model$get !== void 0 && (_this$model$get = _this$model$get.call(_this$model, "editSettings")) !== null && _this$model$get !== void 0 && (_this$model$get$get = _this$model$get.get) !== null && _this$model$get$get !== void 0 && _this$model$get$get.call(_this$model$get, "inactive"));
2162 }
2163 },
2164 {
2165 key: "isDesignable",
2166 value: function isDesignable() {
2167 return elementor.userCan("design") && this.isEditable();
2168 }
2169 },
2170 {
2171 key: "isGridContainer",
2172 value: function isGridContainer() {
2173 return "grid" === this.parent.settings.get("container_type");
2174 }
2175 },
2176 {
2177 key: "isLocked",
2178 value: function isLocked() {
2179 return this.model.get("isLocked");
2180 }
2181 },
2182 {
2183 key: "isRepeater",
2184 value: function isRepeater() {
2185 return Container.TYPE_REPEATER === this.type;
2186 }
2187 },
2188 {
2189 key: "isRepeaterItem",
2190 value: function isRepeaterItem() {
2191 return Container.TYPE_REPEATER_ITEM === this.type;
2192 }
2193 },
2194 {
2195 key: "isViewElement",
2196 value: function isViewElement() {
2197 return this.view && this.model.get("elType");
2198 }
2199 },
2200 {
2201 key: "getSetting",
2202 value: function getSetting(name) {
2203 var localOnly = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
2204 var localValue = this.settings.get(name);
2205 if (localOnly) return localValue;
2206 var globalValue;
2207 if (this.getGlobalKey(name)) globalValue = this.getGlobalValue(name);
2208 return globalValue || localValue || this.getGlobalDefault(name);
2209 }
2210 },
2211 {
2212 key: "getGlobalKey",
2213 value: function getGlobalKey(name) {
2214 return this.globals.get(name);
2215 }
2216 },
2217 {
2218 key: "getGlobalValue",
2219 value: function getGlobalValue(name) {
2220 var control = this.controls[name];
2221 var globalKey = this.getGlobalKey(name);
2222 var globalArgs = $e.data.commandExtractArgs(globalKey);
2223 var data = $e.data.getCache($e.components.get("globals"), globalArgs.command, globalArgs.args.query);
2224 if (!(data !== null && data !== void 0 && data.value)) return;
2225 var id = data.id;
2226 var value;
2227 if (control.groupType) {
2228 var responsivePrefixRegex = elementor.breakpoints.getActiveMatchRegex();
2229 var propertyName = control.name.replace(control.groupPrefix, "").replace(responsivePrefixRegex, "");
2230 if (!data.value[elementor.config.kit_config.typography_prefix + propertyName]) return;
2231 propertyName = propertyName.replace("_", "-");
2232 value = "var( --e-global-".concat(control.groupType, "-").concat(id, "-").concat(propertyName, " )");
2233 if (elementor.config.ui.defaultGenericFonts && control.groupPrefix + "font_family" === control.name) value += ", ".concat(elementor.config.ui.defaultGenericFonts);
2234 } else value = "var( --e-global-".concat(control.type, "-").concat(id, " )");
2235 return value;
2236 }
2237 },
2238 {
2239 key: "isGlobalApplied",
2240 value: function isGlobalApplied(controlName) {
2241 return this.getSetting(controlName) !== this.settings.get(controlName);
2242 }
2243 },
2244 {
2245 key: "getGlobalDefault",
2246 value: function getGlobalDefault(controlName) {
2247 var _this$controls$contro;
2248 var controlGlobalArgs = (_this$controls$contro = this.controls[controlName]) === null || _this$controls$contro === void 0 ? void 0 : _this$controls$contro.global;
2249 if (controlGlobalArgs !== null && controlGlobalArgs !== void 0 && controlGlobalArgs.default) {
2250 var controlType = this.controls[controlName].type;
2251 if ("color" === controlType) controlType = "colors";
2252 if (!elementor.config.globals.defaults_enabled[controlType]) return "";
2253 var _$e$data$commandExtra = $e.data.commandExtractArgs(controlGlobalArgs.default);
2254 var command = _$e$data$commandExtra.command;
2255 var args = _$e$data$commandExtra.args;
2256 var result = $e.data.getCache($e.components.get("globals"), command, args.query);
2257 return result === null || result === void 0 ? void 0 : result.value;
2258 }
2259 return "";
2260 }
2261 }
2262 ]);
2263 }(ArgsObject);
2264 _defineProperty(Container, "TYPE_REPEATER", "repeater-control");
2265 _defineProperty(Container, "TYPE_REPEATER_ITEM", "repeater");
2266
2267 //#endregion
2268 //#region assets/dev/js/editor/modules.js
2269 elementorModules.editor = {
2270 elements: { models: { BaseSettings: import_base_settings.default } },
2271 utils: {
2272 Module: import_module.default,
2273 Introduction: _default
2274 },
2275 views: { ControlsStack },
2276 Container
2277 };
2278
2279 //#endregion
2280 })(wp.i18n);
2281 //# sourceMappingURL=editor-modules.js.map