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

web-cli.js in Elementor Website Builder – more than just a page builder 3.6.7, at assets/js/web-cli.js

12,278 lines 464.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.6.7 - 03-07-2022 */
2 /******/ (() => { // webpackBootstrap
3 /******/ var __webpack_modules__ = ({
4
5 /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
6 /*!******************************************************************!*\
7 !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
8 \******************************************************************/
9 /***/ ((module) => {
10
11 function _arrayLikeToArray(arr, len) {
12 if (len == null || len > arr.length) len = arr.length;
13
14 for (var i = 0, arr2 = new Array(len); i < len; i++) {
15 arr2[i] = arr[i];
16 }
17
18 return arr2;
19 }
20
21 module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
22
23 /***/ }),
24
25 /***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
26 /*!****************************************************************!*\
27 !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
28 \****************************************************************/
29 /***/ ((module) => {
30
31 function _arrayWithHoles(arr) {
32 if (Array.isArray(arr)) return arr;
33 }
34
35 module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
36
37 /***/ }),
38
39 /***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js":
40 /*!***********************************************************************!*\
41 !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
42 \***********************************************************************/
43 /***/ ((module) => {
44
45 function _assertThisInitialized(self) {
46 if (self === void 0) {
47 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
48 }
49
50 return self;
51 }
52
53 module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
54
55 /***/ }),
56
57 /***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js":
58 /*!******************************************************************!*\
59 !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
60 \******************************************************************/
61 /***/ ((module) => {
62
63 function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
64 try {
65 var info = gen[key](arg);
66 var value = info.value;
67 } catch (error) {
68 reject(error);
69 return;
70 }
71
72 if (info.done) {
73 resolve(value);
74 } else {
75 Promise.resolve(value).then(_next, _throw);
76 }
77 }
78
79 function _asyncToGenerator(fn) {
80 return function () {
81 var self = this,
82 args = arguments;
83 return new Promise(function (resolve, reject) {
84 var gen = fn.apply(self, args);
85
86 function _next(value) {
87 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
88 }
89
90 function _throw(err) {
91 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
92 }
93
94 _next(undefined);
95 });
96 };
97 }
98
99 module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
100
101 /***/ }),
102
103 /***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
104 /*!****************************************************************!*\
105 !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
106 \****************************************************************/
107 /***/ ((module) => {
108
109 function _classCallCheck(instance, Constructor) {
110 if (!(instance instanceof Constructor)) {
111 throw new TypeError("Cannot call a class as a function");
112 }
113 }
114
115 module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
116
117 /***/ }),
118
119 /***/ "../node_modules/@babel/runtime/helpers/construct.js":
120 /*!***********************************************************!*\
121 !*** ../node_modules/@babel/runtime/helpers/construct.js ***!
122 \***********************************************************/
123 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
124
125 var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
126
127 var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js");
128
129 function _construct(Parent, args, Class) {
130 if (isNativeReflectConstruct()) {
131 module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
132 } else {
133 module.exports = _construct = function _construct(Parent, args, Class) {
134 var a = [null];
135 a.push.apply(a, args);
136 var Constructor = Function.bind.apply(Parent, a);
137 var instance = new Constructor();
138 if (Class) setPrototypeOf(instance, Class.prototype);
139 return instance;
140 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
141 }
142
143 return _construct.apply(null, arguments);
144 }
145
146 module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
147
148 /***/ }),
149
150 /***/ "../node_modules/@babel/runtime/helpers/createClass.js":
151 /*!*************************************************************!*\
152 !*** ../node_modules/@babel/runtime/helpers/createClass.js ***!
153 \*************************************************************/
154 /***/ ((module) => {
155
156 function _defineProperties(target, props) {
157 for (var i = 0; i < props.length; i++) {
158 var descriptor = props[i];
159 descriptor.enumerable = descriptor.enumerable || false;
160 descriptor.configurable = true;
161 if ("value" in descriptor) descriptor.writable = true;
162 Object.defineProperty(target, descriptor.key, descriptor);
163 }
164 }
165
166 function _createClass(Constructor, protoProps, staticProps) {
167 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
168 if (staticProps) _defineProperties(Constructor, staticProps);
169 Object.defineProperty(Constructor, "prototype", {
170 writable: false
171 });
172 return Constructor;
173 }
174
175 module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
176
177 /***/ }),
178
179 /***/ "../node_modules/@babel/runtime/helpers/defineProperty.js":
180 /*!****************************************************************!*\
181 !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***!
182 \****************************************************************/
183 /***/ ((module) => {
184
185 function _defineProperty(obj, key, value) {
186 if (key in obj) {
187 Object.defineProperty(obj, key, {
188 value: value,
189 enumerable: true,
190 configurable: true,
191 writable: true
192 });
193 } else {
194 obj[key] = value;
195 }
196
197 return obj;
198 }
199
200 module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
201
202 /***/ }),
203
204 /***/ "../node_modules/@babel/runtime/helpers/get.js":
205 /*!*****************************************************!*\
206 !*** ../node_modules/@babel/runtime/helpers/get.js ***!
207 \*****************************************************/
208 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
209
210 var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js");
211
212 function _get() {
213 if (typeof Reflect !== "undefined" && Reflect.get) {
214 module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
215 } else {
216 module.exports = _get = function _get(target, property, receiver) {
217 var base = superPropBase(target, property);
218 if (!base) return;
219 var desc = Object.getOwnPropertyDescriptor(base, property);
220
221 if (desc.get) {
222 return desc.get.call(arguments.length < 3 ? target : receiver);
223 }
224
225 return desc.value;
226 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
227 }
228
229 return _get.apply(this, arguments);
230 }
231
232 module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports;
233
234 /***/ }),
235
236 /***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js":
237 /*!****************************************************************!*\
238 !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
239 \****************************************************************/
240 /***/ ((module) => {
241
242 function _getPrototypeOf(o) {
243 module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
244 return o.__proto__ || Object.getPrototypeOf(o);
245 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
246 return _getPrototypeOf(o);
247 }
248
249 module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
250
251 /***/ }),
252
253 /***/ "../node_modules/@babel/runtime/helpers/inherits.js":
254 /*!**********************************************************!*\
255 !*** ../node_modules/@babel/runtime/helpers/inherits.js ***!
256 \**********************************************************/
257 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
258
259 var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
260
261 function _inherits(subClass, superClass) {
262 if (typeof superClass !== "function" && superClass !== null) {
263 throw new TypeError("Super expression must either be null or a function");
264 }
265
266 subClass.prototype = Object.create(superClass && superClass.prototype, {
267 constructor: {
268 value: subClass,
269 writable: true,
270 configurable: true
271 }
272 });
273 Object.defineProperty(subClass, "prototype", {
274 writable: false
275 });
276 if (superClass) setPrototypeOf(subClass, superClass);
277 }
278
279 module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
280
281 /***/ }),
282
283 /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
284 /*!***********************************************************************!*\
285 !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
286 \***********************************************************************/
287 /***/ ((module) => {
288
289 function _interopRequireDefault(obj) {
290 return obj && obj.__esModule ? obj : {
291 "default": obj
292 };
293 }
294
295 module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
296
297 /***/ }),
298
299 /***/ "../node_modules/@babel/runtime/helpers/isNativeFunction.js":
300 /*!******************************************************************!*\
301 !*** ../node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
302 \******************************************************************/
303 /***/ ((module) => {
304
305 function _isNativeFunction(fn) {
306 return Function.toString.call(fn).indexOf("[native code]") !== -1;
307 }
308
309 module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
310
311 /***/ }),
312
313 /***/ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js":
314 /*!**************************************************************************!*\
315 !*** ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
316 \**************************************************************************/
317 /***/ ((module) => {
318
319 function _isNativeReflectConstruct() {
320 if (typeof Reflect === "undefined" || !Reflect.construct) return false;
321 if (Reflect.construct.sham) return false;
322 if (typeof Proxy === "function") return true;
323
324 try {
325 Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
326 return true;
327 } catch (e) {
328 return false;
329 }
330 }
331
332 module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
333
334 /***/ }),
335
336 /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
337 /*!**********************************************************************!*\
338 !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
339 \**********************************************************************/
340 /***/ ((module) => {
341
342 function _iterableToArrayLimit(arr, i) {
343 var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
344
345 if (_i == null) return;
346 var _arr = [];
347 var _n = true;
348 var _d = false;
349
350 var _s, _e;
351
352 try {
353 for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
354 _arr.push(_s.value);
355
356 if (i && _arr.length === i) break;
357 }
358 } catch (err) {
359 _d = true;
360 _e = err;
361 } finally {
362 try {
363 if (!_n && _i["return"] != null) _i["return"]();
364 } finally {
365 if (_d) throw _e;
366 }
367 }
368
369 return _arr;
370 }
371
372 module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
373
374 /***/ }),
375
376 /***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
377 /*!*****************************************************************!*\
378 !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
379 \*****************************************************************/
380 /***/ ((module) => {
381
382 function _nonIterableRest() {
383 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
384 }
385
386 module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
387
388 /***/ }),
389
390 /***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
391 /*!***************************************************************************!*\
392 !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
393 \***************************************************************************/
394 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
395
396 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
397
398 var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js");
399
400 function _possibleConstructorReturn(self, call) {
401 if (call && (_typeof(call) === "object" || typeof call === "function")) {
402 return call;
403 } else if (call !== void 0) {
404 throw new TypeError("Derived constructors may only return object or undefined");
405 }
406
407 return assertThisInitialized(self);
408 }
409
410 module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
411
412 /***/ }),
413
414 /***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js":
415 /*!********************************************************************!*\
416 !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
417 \********************************************************************/
418 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
419
420 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
421
422 function _regeneratorRuntime() {
423 "use strict";
424 /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
425
426 module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
427 return exports;
428 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
429 var exports = {},
430 Op = Object.prototype,
431 hasOwn = Op.hasOwnProperty,
432 $Symbol = "function" == typeof Symbol ? Symbol : {},
433 iteratorSymbol = $Symbol.iterator || "@@iterator",
434 asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
435 toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
436
437 function define(obj, key, value) {
438 return Object.defineProperty(obj, key, {
439 value: value,
440 enumerable: !0,
441 configurable: !0,
442 writable: !0
443 }), obj[key];
444 }
445
446 try {
447 define({}, "");
448 } catch (err) {
449 define = function define(obj, key, value) {
450 return obj[key] = value;
451 };
452 }
453
454 function wrap(innerFn, outerFn, self, tryLocsList) {
455 var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
456 generator = Object.create(protoGenerator.prototype),
457 context = new Context(tryLocsList || []);
458 return generator._invoke = function (innerFn, self, context) {
459 var state = "suspendedStart";
460 return function (method, arg) {
461 if ("executing" === state) throw new Error("Generator is already running");
462
463 if ("completed" === state) {
464 if ("throw" === method) throw arg;
465 return doneResult();
466 }
467
468 for (context.method = method, context.arg = arg;;) {
469 var delegate = context.delegate;
470
471 if (delegate) {
472 var delegateResult = maybeInvokeDelegate(delegate, context);
473
474 if (delegateResult) {
475 if (delegateResult === ContinueSentinel) continue;
476 return delegateResult;
477 }
478 }
479
480 if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
481 if ("suspendedStart" === state) throw state = "completed", context.arg;
482 context.dispatchException(context.arg);
483 } else "return" === context.method && context.abrupt("return", context.arg);
484 state = "executing";
485 var record = tryCatch(innerFn, self, context);
486
487 if ("normal" === record.type) {
488 if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
489 return {
490 value: record.arg,
491 done: context.done
492 };
493 }
494
495 "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
496 }
497 };
498 }(innerFn, self, context), generator;
499 }
500
501 function tryCatch(fn, obj, arg) {
502 try {
503 return {
504 type: "normal",
505 arg: fn.call(obj, arg)
506 };
507 } catch (err) {
508 return {
509 type: "throw",
510 arg: err
511 };
512 }
513 }
514
515 exports.wrap = wrap;
516 var ContinueSentinel = {};
517
518 function Generator() {}
519
520 function GeneratorFunction() {}
521
522 function GeneratorFunctionPrototype() {}
523
524 var IteratorPrototype = {};
525 define(IteratorPrototype, iteratorSymbol, function () {
526 return this;
527 });
528 var getProto = Object.getPrototypeOf,
529 NativeIteratorPrototype = getProto && getProto(getProto(values([])));
530 NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
531 var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
532
533 function defineIteratorMethods(prototype) {
534 ["next", "throw", "return"].forEach(function (method) {
535 define(prototype, method, function (arg) {
536 return this._invoke(method, arg);
537 });
538 });
539 }
540
541 function AsyncIterator(generator, PromiseImpl) {
542 function invoke(method, arg, resolve, reject) {
543 var record = tryCatch(generator[method], generator, arg);
544
545 if ("throw" !== record.type) {
546 var result = record.arg,
547 value = result.value;
548 return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
549 invoke("next", value, resolve, reject);
550 }, function (err) {
551 invoke("throw", err, resolve, reject);
552 }) : PromiseImpl.resolve(value).then(function (unwrapped) {
553 result.value = unwrapped, resolve(result);
554 }, function (error) {
555 return invoke("throw", error, resolve, reject);
556 });
557 }
558
559 reject(record.arg);
560 }
561
562 var previousPromise;
563
564 this._invoke = function (method, arg) {
565 function callInvokeWithMethodAndArg() {
566 return new PromiseImpl(function (resolve, reject) {
567 invoke(method, arg, resolve, reject);
568 });
569 }
570
571 return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
572 };
573 }
574
575 function maybeInvokeDelegate(delegate, context) {
576 var method = delegate.iterator[context.method];
577
578 if (undefined === method) {
579 if (context.delegate = null, "throw" === context.method) {
580 if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
581 context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
582 }
583
584 return ContinueSentinel;
585 }
586
587 var record = tryCatch(method, delegate.iterator, context.arg);
588 if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
589 var info = record.arg;
590 return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
591 }
592
593 function pushTryEntry(locs) {
594 var entry = {
595 tryLoc: locs[0]
596 };
597 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
598 }
599
600 function resetTryEntry(entry) {
601 var record = entry.completion || {};
602 record.type = "normal", delete record.arg, entry.completion = record;
603 }
604
605 function Context(tryLocsList) {
606 this.tryEntries = [{
607 tryLoc: "root"
608 }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
609 }
610
611 function values(iterable) {
612 if (iterable) {
613 var iteratorMethod = iterable[iteratorSymbol];
614 if (iteratorMethod) return iteratorMethod.call(iterable);
615 if ("function" == typeof iterable.next) return iterable;
616
617 if (!isNaN(iterable.length)) {
618 var i = -1,
619 next = function next() {
620 for (; ++i < iterable.length;) {
621 if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
622 }
623
624 return next.value = undefined, next.done = !0, next;
625 };
626
627 return next.next = next;
628 }
629 }
630
631 return {
632 next: doneResult
633 };
634 }
635
636 function doneResult() {
637 return {
638 value: undefined,
639 done: !0
640 };
641 }
642
643 return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
644 var ctor = "function" == typeof genFun && genFun.constructor;
645 return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
646 }, exports.mark = function (genFun) {
647 return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
648 }, exports.awrap = function (arg) {
649 return {
650 __await: arg
651 };
652 }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
653 return this;
654 }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
655 void 0 === PromiseImpl && (PromiseImpl = Promise);
656 var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
657 return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
658 return result.done ? result.value : iter.next();
659 });
660 }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
661 return this;
662 }), define(Gp, "toString", function () {
663 return "[object Generator]";
664 }), exports.keys = function (object) {
665 var keys = [];
666
667 for (var key in object) {
668 keys.push(key);
669 }
670
671 return keys.reverse(), function next() {
672 for (; keys.length;) {
673 var key = keys.pop();
674 if (key in object) return next.value = key, next.done = !1, next;
675 }
676
677 return next.done = !0, next;
678 };
679 }, exports.values = values, Context.prototype = {
680 constructor: Context,
681 reset: function reset(skipTempReset) {
682 if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
683 "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
684 }
685 },
686 stop: function stop() {
687 this.done = !0;
688 var rootRecord = this.tryEntries[0].completion;
689 if ("throw" === rootRecord.type) throw rootRecord.arg;
690 return this.rval;
691 },
692 dispatchException: function dispatchException(exception) {
693 if (this.done) throw exception;
694 var context = this;
695
696 function handle(loc, caught) {
697 return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
698 }
699
700 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
701 var entry = this.tryEntries[i],
702 record = entry.completion;
703 if ("root" === entry.tryLoc) return handle("end");
704
705 if (entry.tryLoc <= this.prev) {
706 var hasCatch = hasOwn.call(entry, "catchLoc"),
707 hasFinally = hasOwn.call(entry, "finallyLoc");
708
709 if (hasCatch && hasFinally) {
710 if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
711 if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
712 } else if (hasCatch) {
713 if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
714 } else {
715 if (!hasFinally) throw new Error("try statement without catch or finally");
716 if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
717 }
718 }
719 }
720 },
721 abrupt: function abrupt(type, arg) {
722 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
723 var entry = this.tryEntries[i];
724
725 if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
726 var finallyEntry = entry;
727 break;
728 }
729 }
730
731 finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
732 var record = finallyEntry ? finallyEntry.completion : {};
733 return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
734 },
735 complete: function complete(record, afterLoc) {
736 if ("throw" === record.type) throw record.arg;
737 return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
738 },
739 finish: function finish(finallyLoc) {
740 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
741 var entry = this.tryEntries[i];
742 if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
743 }
744 },
745 "catch": function _catch(tryLoc) {
746 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
747 var entry = this.tryEntries[i];
748
749 if (entry.tryLoc === tryLoc) {
750 var record = entry.completion;
751
752 if ("throw" === record.type) {
753 var thrown = record.arg;
754 resetTryEntry(entry);
755 }
756
757 return thrown;
758 }
759 }
760
761 throw new Error("illegal catch attempt");
762 },
763 delegateYield: function delegateYield(iterable, resultName, nextLoc) {
764 return this.delegate = {
765 iterator: values(iterable),
766 resultName: resultName,
767 nextLoc: nextLoc
768 }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
769 }
770 }, exports;
771 }
772
773 module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
774
775 /***/ }),
776
777 /***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js":
778 /*!****************************************************************!*\
779 !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
780 \****************************************************************/
781 /***/ ((module) => {
782
783 function _setPrototypeOf(o, p) {
784 module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
785 o.__proto__ = p;
786 return o;
787 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
788 return _setPrototypeOf(o, p);
789 }
790
791 module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
792
793 /***/ }),
794
795 /***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
796 /*!***************************************************************!*\
797 !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
798 \***************************************************************/
799 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
800
801 var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
802
803 var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
804
805 var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
806
807 var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
808
809 function _slicedToArray(arr, i) {
810 return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
811 }
812
813 module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
814
815 /***/ }),
816
817 /***/ "../node_modules/@babel/runtime/helpers/superPropBase.js":
818 /*!***************************************************************!*\
819 !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***!
820 \***************************************************************/
821 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
822
823 var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js");
824
825 function _superPropBase(object, property) {
826 while (!Object.prototype.hasOwnProperty.call(object, property)) {
827 object = getPrototypeOf(object);
828 if (object === null) break;
829 }
830
831 return object;
832 }
833
834 module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports;
835
836 /***/ }),
837
838 /***/ "../node_modules/@babel/runtime/helpers/typeof.js":
839 /*!********************************************************!*\
840 !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
841 \********************************************************/
842 /***/ ((module) => {
843
844 function _typeof(obj) {
845 "@babel/helpers - typeof";
846
847 return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
848 return typeof obj;
849 } : function (obj) {
850 return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
851 }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
852 }
853
854 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
855
856 /***/ }),
857
858 /***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
859 /*!****************************************************************************!*\
860 !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
861 \****************************************************************************/
862 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
863
864 var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
865
866 function _unsupportedIterableToArray(o, minLen) {
867 if (!o) return;
868 if (typeof o === "string") return arrayLikeToArray(o, minLen);
869 var n = Object.prototype.toString.call(o).slice(8, -1);
870 if (n === "Object" && o.constructor) n = o.constructor.name;
871 if (n === "Map" || n === "Set") return Array.from(o);
872 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
873 }
874
875 module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
876
877 /***/ }),
878
879 /***/ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js":
880 /*!*****************************************************************!*\
881 !*** ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
882 \*****************************************************************/
883 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
884
885 var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js");
886
887 var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
888
889 var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ "../node_modules/@babel/runtime/helpers/isNativeFunction.js");
890
891 var construct = __webpack_require__(/*! ./construct.js */ "../node_modules/@babel/runtime/helpers/construct.js");
892
893 function _wrapNativeSuper(Class) {
894 var _cache = typeof Map === "function" ? new Map() : undefined;
895
896 module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
897 if (Class === null || !isNativeFunction(Class)) return Class;
898
899 if (typeof Class !== "function") {
900 throw new TypeError("Super expression must either be null or a function");
901 }
902
903 if (typeof _cache !== "undefined") {
904 if (_cache.has(Class)) return _cache.get(Class);
905
906 _cache.set(Class, Wrapper);
907 }
908
909 function Wrapper() {
910 return construct(Class, arguments, getPrototypeOf(this).constructor);
911 }
912
913 Wrapper.prototype = Object.create(Class.prototype, {
914 constructor: {
915 value: Wrapper,
916 enumerable: false,
917 writable: true,
918 configurable: true
919 }
920 });
921 return setPrototypeOf(Wrapper, Class);
922 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
923 return _wrapNativeSuper(Class);
924 }
925
926 module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
927
928 /***/ }),
929
930 /***/ "../node_modules/@babel/runtime/regenerator/index.js":
931 /*!***********************************************************!*\
932 !*** ../node_modules/@babel/runtime/regenerator/index.js ***!
933 \***********************************************************/
934 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
935
936 // TODO(Babel 8): Remove this file.
937
938 var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")();
939 module.exports = runtime;
940
941 // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
942 try {
943 regeneratorRuntime = runtime;
944 } catch (accidentalStrictMode) {
945 if (typeof globalThis === "object") {
946 globalThis.regeneratorRuntime = runtime;
947 } else {
948 Function("r", "regeneratorRuntime = r")(runtime);
949 }
950 }
951
952
953 /***/ }),
954
955 /***/ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js":
956 /*!******************************************************************!*\
957 !*** ../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js ***!
958 \******************************************************************/
959 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
960
961 "use strict";
962 __webpack_require__.r(__webpack_exports__);
963 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
964 /* harmony export */ "MiddlewareArray": () => (/* binding */ MiddlewareArray),
965 /* harmony export */ "TaskAbortError": () => (/* binding */ TaskAbortError),
966 /* harmony export */ "__DO_NOT_USE__ActionTypes": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.__DO_NOT_USE__ActionTypes),
967 /* harmony export */ "addListener": () => (/* binding */ addListener),
968 /* harmony export */ "applyMiddleware": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware),
969 /* harmony export */ "bindActionCreators": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.bindActionCreators),
970 /* harmony export */ "clearAllListeners": () => (/* binding */ clearAllListeners),
971 /* harmony export */ "combineReducers": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers),
972 /* harmony export */ "compose": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.compose),
973 /* harmony export */ "configureStore": () => (/* binding */ configureStore),
974 /* harmony export */ "createAction": () => (/* binding */ createAction),
975 /* harmony export */ "createAsyncThunk": () => (/* binding */ createAsyncThunk),
976 /* harmony export */ "createDraftSafeSelector": () => (/* binding */ createDraftSafeSelector),
977 /* harmony export */ "createEntityAdapter": () => (/* binding */ createEntityAdapter),
978 /* harmony export */ "createImmutableStateInvariantMiddleware": () => (/* binding */ createImmutableStateInvariantMiddleware),
979 /* harmony export */ "createListenerMiddleware": () => (/* binding */ createListenerMiddleware),
980 /* harmony export */ "createNextState": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__["default"]),
981 /* harmony export */ "createReducer": () => (/* binding */ createReducer),
982 /* harmony export */ "createSelector": () => (/* reexport safe */ reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector),
983 /* harmony export */ "createSerializableStateInvariantMiddleware": () => (/* binding */ createSerializableStateInvariantMiddleware),
984 /* harmony export */ "createSlice": () => (/* binding */ createSlice),
985 /* harmony export */ "createStore": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.createStore),
986 /* harmony export */ "current": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.current),
987 /* harmony export */ "findNonSerializableValue": () => (/* binding */ findNonSerializableValue),
988 /* harmony export */ "freeze": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.freeze),
989 /* harmony export */ "getDefaultMiddleware": () => (/* binding */ getDefaultMiddleware),
990 /* harmony export */ "getType": () => (/* binding */ getType),
991 /* harmony export */ "isAllOf": () => (/* binding */ isAllOf),
992 /* harmony export */ "isAnyOf": () => (/* binding */ isAnyOf),
993 /* harmony export */ "isAsyncThunkAction": () => (/* binding */ isAsyncThunkAction),
994 /* harmony export */ "isDraft": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.isDraft),
995 /* harmony export */ "isFulfilled": () => (/* binding */ isFulfilled),
996 /* harmony export */ "isImmutableDefault": () => (/* binding */ isImmutableDefault),
997 /* harmony export */ "isPending": () => (/* binding */ isPending),
998 /* harmony export */ "isPlain": () => (/* binding */ isPlain),
999 /* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject),
1000 /* harmony export */ "isRejected": () => (/* binding */ isRejected),
1001 /* harmony export */ "isRejectedWithValue": () => (/* binding */ isRejectedWithValue),
1002 /* harmony export */ "legacy_createStore": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.legacy_createStore),
1003 /* harmony export */ "miniSerializeError": () => (/* binding */ miniSerializeError),
1004 /* harmony export */ "nanoid": () => (/* binding */ nanoid),
1005 /* harmony export */ "original": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.original),
1006 /* harmony export */ "removeListener": () => (/* binding */ removeListener),
1007 /* harmony export */ "unwrapResult": () => (/* binding */ unwrapResult)
1008 /* harmony export */ });
1009 /* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! immer */ "../node_modules/immer/dist/immer.esm.mjs");
1010 /* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux */ "../node_modules/redux/es/redux.js");
1011 /* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! reselect */ "../node_modules/reselect/es/index.js");
1012 /* harmony import */ var redux_thunk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! redux-thunk */ "../node_modules/redux-thunk/es/index.js");
1013 var __extends = (undefined && undefined.__extends) || (function () {
1014 var extendStatics = function (d, b) {
1015 extendStatics = Object.setPrototypeOf ||
1016 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1017 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
1018 return extendStatics(d, b);
1019 };
1020 return function (d, b) {
1021 if (typeof b !== "function" && b !== null)
1022 throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1023 extendStatics(d, b);
1024 function __() { this.constructor = d; }
1025 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1026 };
1027 })();
1028 var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
1029 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
1030 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
1031 function verb(n) { return function (v) { return step([n, v]); }; }
1032 function step(op) {
1033 if (f) throw new TypeError("Generator is already executing.");
1034 while (_) try {
1035 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
1036 if (y = 0, t) op = [op[0] & 2, t.value];
1037 switch (op[0]) {
1038 case 0: case 1: t = op; break;
1039 case 4: _.label++; return { value: op[1], done: false };
1040 case 5: _.label++; y = op[1]; op = [0]; continue;
1041 case 7: op = _.ops.pop(); _.trys.pop(); continue;
1042 default:
1043 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
1044 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
1045 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
1046 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
1047 if (t[2]) _.ops.pop();
1048 _.trys.pop(); continue;
1049 }
1050 op = body.call(thisArg, _);
1051 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
1052 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
1053 }
1054 };
1055 var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) {
1056 for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
1057 to[j] = from[i];
1058 return to;
1059 };
1060 var __defProp = Object.defineProperty;
1061 var __defProps = Object.defineProperties;
1062 var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
1063 var __getOwnPropSymbols = Object.getOwnPropertySymbols;
1064 var __hasOwnProp = Object.prototype.hasOwnProperty;
1065 var __propIsEnum = Object.prototype.propertyIsEnumerable;
1066 var __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; };
1067 var __spreadValues = function (a, b) {
1068 for (var prop in b || (b = {}))
1069 if (__hasOwnProp.call(b, prop))
1070 __defNormalProp(a, prop, b[prop]);
1071 if (__getOwnPropSymbols)
1072 for (var _i = 0, _c = __getOwnPropSymbols(b); _i < _c.length; _i++) {
1073 var prop = _c[_i];
1074 if (__propIsEnum.call(b, prop))
1075 __defNormalProp(a, prop, b[prop]);
1076 }
1077 return a;
1078 };
1079 var __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); };
1080 var __async = function (__this, __arguments, generator) {
1081 return new Promise(function (resolve, reject) {
1082 var fulfilled = function (value) {
1083 try {
1084 step(generator.next(value));
1085 }
1086 catch (e) {
1087 reject(e);
1088 }
1089 };
1090 var rejected = function (value) {
1091 try {
1092 step(generator.throw(value));
1093 }
1094 catch (e) {
1095 reject(e);
1096 }
1097 };
1098 var step = function (x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); };
1099 step((generator = generator.apply(__this, __arguments)).next());
1100 });
1101 };
1102 // src/index.ts
1103
1104
1105
1106
1107 // src/createDraftSafeSelector.ts
1108
1109
1110 var createDraftSafeSelector = function () {
1111 var args = [];
1112 for (var _i = 0; _i < arguments.length; _i++) {
1113 args[_i] = arguments[_i];
1114 }
1115 var selector = reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector.apply(void 0, args);
1116 var wrappedSelector = function (value) {
1117 var rest = [];
1118 for (var _i = 1; _i < arguments.length; _i++) {
1119 rest[_i - 1] = arguments[_i];
1120 }
1121 return selector.apply(void 0, __spreadArray([(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(value) ? (0,immer__WEBPACK_IMPORTED_MODULE_2__.current)(value) : value], rest));
1122 };
1123 return wrappedSelector;
1124 };
1125 // src/configureStore.ts
1126
1127 // src/devtoolsExtension.ts
1128
1129 var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () {
1130 if (arguments.length === 0)
1131 return void 0;
1132 if (typeof arguments[0] === "object")
1133 return redux__WEBPACK_IMPORTED_MODULE_0__.compose;
1134 return redux__WEBPACK_IMPORTED_MODULE_0__.compose.apply(null, arguments);
1135 };
1136 var devToolsEnhancer = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () {
1137 return function (noop2) {
1138 return noop2;
1139 };
1140 };
1141 // src/isPlainObject.ts
1142 function isPlainObject(value) {
1143 if (typeof value !== "object" || value === null)
1144 return false;
1145 var proto = Object.getPrototypeOf(value);
1146 if (proto === null)
1147 return true;
1148 var baseProto = proto;
1149 while (Object.getPrototypeOf(baseProto) !== null) {
1150 baseProto = Object.getPrototypeOf(baseProto);
1151 }
1152 return proto === baseProto;
1153 }
1154 // src/getDefaultMiddleware.ts
1155
1156 // src/utils.ts
1157 function getTimeMeasureUtils(maxDelay, fnName) {
1158 var elapsed = 0;
1159 return {
1160 measureTime: function (fn) {
1161 var started = Date.now();
1162 try {
1163 return fn();
1164 }
1165 finally {
1166 var finished = Date.now();
1167 elapsed += finished - started;
1168 }
1169 },
1170 warnIfExceeded: function () {
1171 if (elapsed > maxDelay) {
1172 console.warn(fnName + " took " + elapsed + "ms, which is more than the warning threshold of " + maxDelay + "ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.");
1173 }
1174 }
1175 };
1176 }
1177 var MiddlewareArray = /** @class */ (function (_super) {
1178 __extends(MiddlewareArray, _super);
1179 function MiddlewareArray() {
1180 var args = [];
1181 for (var _i = 0; _i < arguments.length; _i++) {
1182 args[_i] = arguments[_i];
1183 }
1184 var _this = _super.apply(this, args) || this;
1185 Object.setPrototypeOf(_this, MiddlewareArray.prototype);
1186 return _this;
1187 }
1188 Object.defineProperty(MiddlewareArray, Symbol.species, {
1189 get: function () {
1190 return MiddlewareArray;
1191 },
1192 enumerable: false,
1193 configurable: true
1194 });
1195 MiddlewareArray.prototype.concat = function () {
1196 var arr = [];
1197 for (var _i = 0; _i < arguments.length; _i++) {
1198 arr[_i] = arguments[_i];
1199 }
1200 return _super.prototype.concat.apply(this, arr);
1201 };
1202 MiddlewareArray.prototype.prepend = function () {
1203 var arr = [];
1204 for (var _i = 0; _i < arguments.length; _i++) {
1205 arr[_i] = arguments[_i];
1206 }
1207 if (arr.length === 1 && Array.isArray(arr[0])) {
1208 return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))();
1209 }
1210 return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))();
1211 };
1212 return MiddlewareArray;
1213 }(Array));
1214 // src/immutableStateInvariantMiddleware.ts
1215 var isProduction = "development" === "production";
1216 var prefix = "Invariant failed";
1217 function invariant(condition, message) {
1218 if (condition) {
1219 return;
1220 }
1221 if (isProduction) {
1222 throw new Error(prefix);
1223 }
1224 throw new Error(prefix + ": " + (message || ""));
1225 }
1226 function stringify(obj, serializer, indent, decycler) {
1227 return JSON.stringify(obj, getSerialize(serializer, decycler), indent);
1228 }
1229 function getSerialize(serializer, decycler) {
1230 var stack = [], keys = [];
1231 if (!decycler)
1232 decycler = function (_, value) {
1233 if (stack[0] === value)
1234 return "[Circular ~]";
1235 return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]";
1236 };
1237 return function (key, value) {
1238 if (stack.length > 0) {
1239 var thisPos = stack.indexOf(this);
1240 ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
1241 ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
1242 if (~stack.indexOf(value))
1243 value = decycler.call(this, key, value);
1244 }
1245 else
1246 stack.push(value);
1247 return serializer == null ? value : serializer.call(this, key, value);
1248 };
1249 }
1250 function isImmutableDefault(value) {
1251 return typeof value !== "object" || value === null || typeof value === "undefined" || Object.isFrozen(value);
1252 }
1253 function trackForMutations(isImmutable, ignorePaths, obj) {
1254 var trackedProperties = trackProperties(isImmutable, ignorePaths, obj);
1255 return {
1256 detectMutations: function () {
1257 return detectMutations(isImmutable, ignorePaths, trackedProperties, obj);
1258 }
1259 };
1260 }
1261 function trackProperties(isImmutable, ignorePaths, obj, path) {
1262 if (ignorePaths === void 0) { ignorePaths = []; }
1263 if (path === void 0) { path = ""; }
1264 var tracked = { value: obj };
1265 if (!isImmutable(obj)) {
1266 tracked.children = {};
1267 for (var key in obj) {
1268 var childPath = path ? path + "." + key : key;
1269 if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
1270 continue;
1271 }
1272 tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath);
1273 }
1274 }
1275 return tracked;
1276 }
1277 function detectMutations(isImmutable, ignorePaths, trackedProperty, obj, sameParentRef, path) {
1278 if (ignorePaths === void 0) { ignorePaths = []; }
1279 if (sameParentRef === void 0) { sameParentRef = false; }
1280 if (path === void 0) { path = ""; }
1281 var prevObj = trackedProperty ? trackedProperty.value : void 0;
1282 var sameRef = prevObj === obj;
1283 if (sameParentRef && !sameRef && !Number.isNaN(obj)) {
1284 return { wasMutated: true, path: path };
1285 }
1286 if (isImmutable(prevObj) || isImmutable(obj)) {
1287 return { wasMutated: false };
1288 }
1289 var keysToDetect = {};
1290 for (var key in trackedProperty.children) {
1291 keysToDetect[key] = true;
1292 }
1293 for (var key in obj) {
1294 keysToDetect[key] = true;
1295 }
1296 for (var key in keysToDetect) {
1297 var childPath = path ? path + "." + key : key;
1298 if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
1299 continue;
1300 }
1301 var result = detectMutations(isImmutable, ignorePaths, trackedProperty.children[key], obj[key], sameRef, childPath);
1302 if (result.wasMutated) {
1303 return result;
1304 }
1305 }
1306 return { wasMutated: false };
1307 }
1308 function createImmutableStateInvariantMiddleware(options) {
1309 if (options === void 0) { options = {}; }
1310 if (false) {}
1311 var _c = options.isImmutable, isImmutable = _c === void 0 ? isImmutableDefault : _c, ignoredPaths = options.ignoredPaths, _d = options.warnAfter, warnAfter = _d === void 0 ? 32 : _d, ignore = options.ignore;
1312 ignoredPaths = ignoredPaths || ignore;
1313 var track = trackForMutations.bind(null, isImmutable, ignoredPaths);
1314 return function (_c) {
1315 var getState = _c.getState;
1316 var state = getState();
1317 var tracker = track(state);
1318 var result;
1319 return function (next) { return function (action) {
1320 var measureUtils = getTimeMeasureUtils(warnAfter, "ImmutableStateInvariantMiddleware");
1321 measureUtils.measureTime(function () {
1322 state = getState();
1323 result = tracker.detectMutations();
1324 tracker = track(state);
1325 invariant(!result.wasMutated, "A state mutation was detected between dispatches, in the path '" + (result.path || "") + "'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)");
1326 });
1327 var dispatchedAction = next(action);
1328 measureUtils.measureTime(function () {
1329 state = getState();
1330 result = tracker.detectMutations();
1331 tracker = track(state);
1332 result.wasMutated && invariant(!result.wasMutated, "A state mutation was detected inside a dispatch, in the path: " + (result.path || "") + ". Take a look at the reducer(s) handling the action " + stringify(action) + ". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)");
1333 });
1334 measureUtils.warnIfExceeded();
1335 return dispatchedAction;
1336 }; };
1337 };
1338 }
1339 // src/serializableStateInvariantMiddleware.ts
1340 function isPlain(val) {
1341 var type = typeof val;
1342 return type === "undefined" || val === null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val);
1343 }
1344 function findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths) {
1345 if (path === void 0) { path = ""; }
1346 if (isSerializable === void 0) { isSerializable = isPlain; }
1347 if (ignoredPaths === void 0) { ignoredPaths = []; }
1348 var foundNestedSerializable;
1349 if (!isSerializable(value)) {
1350 return {
1351 keyPath: path || "<root>",
1352 value: value
1353 };
1354 }
1355 if (typeof value !== "object" || value === null) {
1356 return false;
1357 }
1358 var entries = getEntries != null ? getEntries(value) : Object.entries(value);
1359 var hasIgnoredPaths = ignoredPaths.length > 0;
1360 for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
1361 var _c = entries_1[_i], key = _c[0], nestedValue = _c[1];
1362 var nestedPath = path ? path + "." + key : key;
1363 if (hasIgnoredPaths && ignoredPaths.indexOf(nestedPath) >= 0) {
1364 continue;
1365 }
1366 if (!isSerializable(nestedValue)) {
1367 return {
1368 keyPath: nestedPath,
1369 value: nestedValue
1370 };
1371 }
1372 if (typeof nestedValue === "object") {
1373 foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths);
1374 if (foundNestedSerializable) {
1375 return foundNestedSerializable;
1376 }
1377 }
1378 }
1379 return false;
1380 }
1381 function createSerializableStateInvariantMiddleware(options) {
1382 if (options === void 0) { options = {}; }
1383 if (false) {}
1384 var _c = options.isSerializable, isSerializable = _c === void 0 ? isPlain : _c, getEntries = options.getEntries, _d = options.ignoredActions, ignoredActions = _d === void 0 ? [] : _d, _e = options.ignoredActionPaths, ignoredActionPaths = _e === void 0 ? ["meta.arg", "meta.baseQueryMeta"] : _e, _f = options.ignoredPaths, ignoredPaths = _f === void 0 ? [] : _f, _g = options.warnAfter, warnAfter = _g === void 0 ? 32 : _g, _h = options.ignoreState, ignoreState = _h === void 0 ? false : _h, _j = options.ignoreActions, ignoreActions = _j === void 0 ? false : _j;
1385 return function (storeAPI) { return function (next) { return function (action) {
1386 var result = next(action);
1387 var measureUtils = getTimeMeasureUtils(warnAfter, "SerializableStateInvariantMiddleware");
1388 if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) {
1389 measureUtils.measureTime(function () {
1390 var foundActionNonSerializableValue = findNonSerializableValue(action, "", isSerializable, getEntries, ignoredActionPaths);
1391 if (foundActionNonSerializableValue) {
1392 var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value;
1393 console.error("A non-serializable value was detected in an action, in the path: `" + keyPath + "`. Value:", value, "\nTake a look at the logic that dispatched this action: ", action, "\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)", "\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)");
1394 }
1395 });
1396 }
1397 if (!ignoreState) {
1398 measureUtils.measureTime(function () {
1399 var state = storeAPI.getState();
1400 var foundStateNonSerializableValue = findNonSerializableValue(state, "", isSerializable, getEntries, ignoredPaths);
1401 if (foundStateNonSerializableValue) {
1402 var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value;
1403 console.error("A non-serializable value was detected in the state, in the path: `" + keyPath + "`. Value:", value, "\nTake a look at the reducer(s) handling this action type: " + action.type + ".\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)");
1404 }
1405 });
1406 measureUtils.warnIfExceeded();
1407 }
1408 return result;
1409 }; }; };
1410 }
1411 // src/getDefaultMiddleware.ts
1412 function isBoolean(x) {
1413 return typeof x === "boolean";
1414 }
1415 function curryGetDefaultMiddleware() {
1416 return function curriedGetDefaultMiddleware(options) {
1417 return getDefaultMiddleware(options);
1418 };
1419 }
1420 function getDefaultMiddleware(options) {
1421 if (options === void 0) { options = {}; }
1422 var _c = options.thunk, thunk = _c === void 0 ? true : _c, _d = options.immutableCheck, immutableCheck = _d === void 0 ? true : _d, _e = options.serializableCheck, serializableCheck = _e === void 0 ? true : _e;
1423 var middlewareArray = new MiddlewareArray();
1424 if (thunk) {
1425 if (isBoolean(thunk)) {
1426 middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"]);
1427 }
1428 else {
1429 middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"].withExtraArgument(thunk.extraArgument));
1430 }
1431 }
1432 if (true) {
1433 if (immutableCheck) {
1434 var immutableOptions = {};
1435 if (!isBoolean(immutableCheck)) {
1436 immutableOptions = immutableCheck;
1437 }
1438 middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions));
1439 }
1440 if (serializableCheck) {
1441 var serializableOptions = {};
1442 if (!isBoolean(serializableCheck)) {
1443 serializableOptions = serializableCheck;
1444 }
1445 middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions));
1446 }
1447 }
1448 return middlewareArray;
1449 }
1450 // src/configureStore.ts
1451 var IS_PRODUCTION = "development" === "production";
1452 function configureStore(options) {
1453 var curriedGetDefaultMiddleware = curryGetDefaultMiddleware();
1454 var _c = options || {}, _d = _c.reducer, reducer = _d === void 0 ? void 0 : _d, _e = _c.middleware, middleware = _e === void 0 ? curriedGetDefaultMiddleware() : _e, _f = _c.devTools, devTools = _f === void 0 ? true : _f, _g = _c.preloadedState, preloadedState = _g === void 0 ? void 0 : _g, _h = _c.enhancers, enhancers = _h === void 0 ? void 0 : _h;
1455 var rootReducer;
1456 if (typeof reducer === "function") {
1457 rootReducer = reducer;
1458 }
1459 else if (isPlainObject(reducer)) {
1460 rootReducer = (0,redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers)(reducer);
1461 }
1462 else {
1463 throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');
1464 }
1465 var finalMiddleware = middleware;
1466 if (typeof finalMiddleware === "function") {
1467 finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware);
1468 if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {
1469 throw new Error("when using a middleware builder function, an array of middleware must be returned");
1470 }
1471 }
1472 if (!IS_PRODUCTION && finalMiddleware.some(function (item) { return typeof item !== "function"; })) {
1473 throw new Error("each middleware provided to configureStore must be a function");
1474 }
1475 var middlewareEnhancer = redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware.apply(void 0, finalMiddleware);
1476 var finalCompose = redux__WEBPACK_IMPORTED_MODULE_0__.compose;
1477 if (devTools) {
1478 finalCompose = composeWithDevTools(__spreadValues({
1479 trace: !IS_PRODUCTION
1480 }, typeof devTools === "object" && devTools));
1481 }
1482 var storeEnhancers = [middlewareEnhancer];
1483 if (Array.isArray(enhancers)) {
1484 storeEnhancers = __spreadArray([middlewareEnhancer], enhancers);
1485 }
1486 else if (typeof enhancers === "function") {
1487 storeEnhancers = enhancers(storeEnhancers);
1488 }
1489 var composedEnhancer = finalCompose.apply(void 0, storeEnhancers);
1490 return (0,redux__WEBPACK_IMPORTED_MODULE_0__.createStore)(rootReducer, preloadedState, composedEnhancer);
1491 }
1492 // src/createAction.ts
1493 function createAction(type, prepareAction) {
1494 function actionCreator() {
1495 var args = [];
1496 for (var _i = 0; _i < arguments.length; _i++) {
1497 args[_i] = arguments[_i];
1498 }
1499 if (prepareAction) {
1500 var prepared = prepareAction.apply(void 0, args);
1501 if (!prepared) {
1502 throw new Error("prepareAction did not return an object");
1503 }
1504 return __spreadValues(__spreadValues({
1505 type: type,
1506 payload: prepared.payload
1507 }, "meta" in prepared && { meta: prepared.meta }), "error" in prepared && { error: prepared.error });
1508 }
1509 return { type: type, payload: args[0] };
1510 }
1511 actionCreator.toString = function () { return "" + type; };
1512 actionCreator.type = type;
1513 actionCreator.match = function (action) { return action.type === type; };
1514 return actionCreator;
1515 }
1516 function isFSA(action) {
1517 return isPlainObject(action) && typeof action.type === "string" && Object.keys(action).every(isValidKey);
1518 }
1519 function isValidKey(key) {
1520 return ["type", "payload", "error", "meta"].indexOf(key) > -1;
1521 }
1522 function getType(actionCreator) {
1523 return "" + actionCreator;
1524 }
1525 // src/createReducer.ts
1526
1527 // src/mapBuilders.ts
1528 function executeReducerBuilderCallback(builderCallback) {
1529 var actionsMap = {};
1530 var actionMatchers = [];
1531 var defaultCaseReducer;
1532 var builder = {
1533 addCase: function (typeOrActionCreator, reducer) {
1534 if (true) {
1535 if (actionMatchers.length > 0) {
1536 throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");
1537 }
1538 if (defaultCaseReducer) {
1539 throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`");
1540 }
1541 }
1542 var type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
1543 if (type in actionsMap) {
1544 throw new Error("addCase cannot be called with two reducers for the same action type");
1545 }
1546 actionsMap[type] = reducer;
1547 return builder;
1548 },
1549 addMatcher: function (matcher, reducer) {
1550 if (true) {
1551 if (defaultCaseReducer) {
1552 throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
1553 }
1554 }
1555 actionMatchers.push({ matcher: matcher, reducer: reducer });
1556 return builder;
1557 },
1558 addDefaultCase: function (reducer) {
1559 if (true) {
1560 if (defaultCaseReducer) {
1561 throw new Error("`builder.addDefaultCase` can only be called once");
1562 }
1563 }
1564 defaultCaseReducer = reducer;
1565 return builder;
1566 }
1567 };
1568 builderCallback(builder);
1569 return [actionsMap, actionMatchers, defaultCaseReducer];
1570 }
1571 // src/createReducer.ts
1572 function isStateFunction(x) {
1573 return typeof x === "function";
1574 }
1575 function createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) {
1576 if (actionMatchers === void 0) { actionMatchers = []; }
1577 var _c = typeof mapOrBuilderCallback === "function" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _c[0], finalActionMatchers = _c[1], finalDefaultCaseReducer = _c[2];
1578 var getInitialState;
1579 if (isStateFunction(initialState)) {
1580 getInitialState = function () { return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(initialState(), function () {
1581 }); };
1582 }
1583 else {
1584 var frozenInitialState_1 = (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(initialState, function () {
1585 });
1586 getInitialState = function () { return frozenInitialState_1; };
1587 }
1588 function reducer(state, action) {
1589 if (state === void 0) { state = getInitialState(); }
1590 var caseReducers = __spreadArray([
1591 actionsMap[action.type]
1592 ], finalActionMatchers.filter(function (_c) {
1593 var matcher = _c.matcher;
1594 return matcher(action);
1595 }).map(function (_c) {
1596 var reducer2 = _c.reducer;
1597 return reducer2;
1598 }));
1599 if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) {
1600 caseReducers = [finalDefaultCaseReducer];
1601 }
1602 return caseReducers.reduce(function (previousState, caseReducer) {
1603 if (caseReducer) {
1604 if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(previousState)) {
1605 var draft = previousState;
1606 var result = caseReducer(draft, action);
1607 if (typeof result === "undefined") {
1608 return previousState;
1609 }
1610 return result;
1611 }
1612 else if (!(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraftable)(previousState)) {
1613 var result = caseReducer(previousState, action);
1614 if (typeof result === "undefined") {
1615 if (previousState === null) {
1616 return previousState;
1617 }
1618 throw Error("A case reducer on a non-draftable value must not return undefined");
1619 }
1620 return result;
1621 }
1622 else {
1623 return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(previousState, function (draft) {
1624 return caseReducer(draft, action);
1625 });
1626 }
1627 }
1628 return previousState;
1629 }, state);
1630 }
1631 reducer.getInitialState = getInitialState;
1632 return reducer;
1633 }
1634 // src/createSlice.ts
1635 function getType2(slice, actionKey) {
1636 return slice + "/" + actionKey;
1637 }
1638 function createSlice(options) {
1639 var name = options.name;
1640 if (!name) {
1641 throw new Error("`name` is a required option for createSlice");
1642 }
1643 var initialState = typeof options.initialState == "function" ? options.initialState : (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(options.initialState, function () {
1644 });
1645 var reducers = options.reducers || {};
1646 var reducerNames = Object.keys(reducers);
1647 var sliceCaseReducersByName = {};
1648 var sliceCaseReducersByType = {};
1649 var actionCreators = {};
1650 reducerNames.forEach(function (reducerName) {
1651 var maybeReducerWithPrepare = reducers[reducerName];
1652 var type = getType2(name, reducerName);
1653 var caseReducer;
1654 var prepareCallback;
1655 if ("reducer" in maybeReducerWithPrepare) {
1656 caseReducer = maybeReducerWithPrepare.reducer;
1657 prepareCallback = maybeReducerWithPrepare.prepare;
1658 }
1659 else {
1660 caseReducer = maybeReducerWithPrepare;
1661 }
1662 sliceCaseReducersByName[reducerName] = caseReducer;
1663 sliceCaseReducersByType[type] = caseReducer;
1664 actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type);
1665 });
1666 function buildReducer() {
1667 var _c = typeof options.extraReducers === "function" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers], _d = _c[0], extraReducers = _d === void 0 ? {} : _d, _e = _c[1], actionMatchers = _e === void 0 ? [] : _e, _f = _c[2], defaultCaseReducer = _f === void 0 ? void 0 : _f;
1668 var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType);
1669 return createReducer(initialState, finalCaseReducers, actionMatchers, defaultCaseReducer);
1670 }
1671 var _reducer;
1672 return {
1673 name: name,
1674 reducer: function (state, action) {
1675 if (!_reducer)
1676 _reducer = buildReducer();
1677 return _reducer(state, action);
1678 },
1679 actions: actionCreators,
1680 caseReducers: sliceCaseReducersByName,
1681 getInitialState: function () {
1682 if (!_reducer)
1683 _reducer = buildReducer();
1684 return _reducer.getInitialState();
1685 }
1686 };
1687 }
1688 // src/entities/entity_state.ts
1689 function getInitialEntityState() {
1690 return {
1691 ids: [],
1692 entities: {}
1693 };
1694 }
1695 function createInitialStateFactory() {
1696 function getInitialState(additionalState) {
1697 if (additionalState === void 0) { additionalState = {}; }
1698 return Object.assign(getInitialEntityState(), additionalState);
1699 }
1700 return { getInitialState: getInitialState };
1701 }
1702 // src/entities/state_selectors.ts
1703 function createSelectorsFactory() {
1704 function getSelectors(selectState) {
1705 var selectIds = function (state) { return state.ids; };
1706 var selectEntities = function (state) { return state.entities; };
1707 var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); });
1708 var selectId = function (_, id) { return id; };
1709 var selectById = function (entities, id) { return entities[id]; };
1710 var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; });
1711 if (!selectState) {
1712 return {
1713 selectIds: selectIds,
1714 selectEntities: selectEntities,
1715 selectAll: selectAll,
1716 selectTotal: selectTotal,
1717 selectById: createDraftSafeSelector(selectEntities, selectId, selectById)
1718 };
1719 }
1720 var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities);
1721 return {
1722 selectIds: createDraftSafeSelector(selectState, selectIds),
1723 selectEntities: selectGlobalizedEntities,
1724 selectAll: createDraftSafeSelector(selectState, selectAll),
1725 selectTotal: createDraftSafeSelector(selectState, selectTotal),
1726 selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById)
1727 };
1728 }
1729 return { getSelectors: getSelectors };
1730 }
1731 // src/entities/state_adapter.ts
1732
1733 function createSingleArgumentStateOperator(mutator) {
1734 var operator = createStateOperator(function (_, state) { return mutator(state); });
1735 return function operation(state) {
1736 return operator(state, void 0);
1737 };
1738 }
1739 function createStateOperator(mutator) {
1740 return function operation(state, arg) {
1741 function isPayloadActionArgument(arg2) {
1742 return isFSA(arg2);
1743 }
1744 var runMutator = function (draft) {
1745 if (isPayloadActionArgument(arg)) {
1746 mutator(arg.payload, draft);
1747 }
1748 else {
1749 mutator(arg, draft);
1750 }
1751 };
1752 if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(state)) {
1753 runMutator(state);
1754 return state;
1755 }
1756 else {
1757 return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(state, runMutator);
1758 }
1759 };
1760 }
1761 // src/entities/utils.ts
1762 function selectIdValue(entity, selectId) {
1763 var key = selectId(entity);
1764 if ( true && key === void 0) {
1765 console.warn("The entity passed to the `selectId` implementation returned undefined.", "You should probably provide your own `selectId` implementation.", "The entity that was passed:", entity, "The `selectId` implementation:", selectId.toString());
1766 }
1767 return key;
1768 }
1769 function ensureEntitiesArray(entities) {
1770 if (!Array.isArray(entities)) {
1771 entities = Object.values(entities);
1772 }
1773 return entities;
1774 }
1775 function splitAddedUpdatedEntities(newEntities, selectId, state) {
1776 newEntities = ensureEntitiesArray(newEntities);
1777 var added = [];
1778 var updated = [];
1779 for (var _i = 0, newEntities_1 = newEntities; _i < newEntities_1.length; _i++) {
1780 var entity = newEntities_1[_i];
1781 var id = selectIdValue(entity, selectId);
1782 if (id in state.entities) {
1783 updated.push({ id: id, changes: entity });
1784 }
1785 else {
1786 added.push(entity);
1787 }
1788 }
1789 return [added, updated];
1790 }
1791 // src/entities/unsorted_state_adapter.ts
1792 function createUnsortedStateAdapter(selectId) {
1793 function addOneMutably(entity, state) {
1794 var key = selectIdValue(entity, selectId);
1795 if (key in state.entities) {
1796 return;
1797 }
1798 state.ids.push(key);
1799 state.entities[key] = entity;
1800 }
1801 function addManyMutably(newEntities, state) {
1802 newEntities = ensureEntitiesArray(newEntities);
1803 for (var _i = 0, newEntities_2 = newEntities; _i < newEntities_2.length; _i++) {
1804 var entity = newEntities_2[_i];
1805 addOneMutably(entity, state);
1806 }
1807 }
1808 function setOneMutably(entity, state) {
1809 var key = selectIdValue(entity, selectId);
1810 if (!(key in state.entities)) {
1811 state.ids.push(key);
1812 }
1813 state.entities[key] = entity;
1814 }
1815 function setManyMutably(newEntities, state) {
1816 newEntities = ensureEntitiesArray(newEntities);
1817 for (var _i = 0, newEntities_3 = newEntities; _i < newEntities_3.length; _i++) {
1818 var entity = newEntities_3[_i];
1819 setOneMutably(entity, state);
1820 }
1821 }
1822 function setAllMutably(newEntities, state) {
1823 newEntities = ensureEntitiesArray(newEntities);
1824 state.ids = [];
1825 state.entities = {};
1826 addManyMutably(newEntities, state);
1827 }
1828 function removeOneMutably(key, state) {
1829 return removeManyMutably([key], state);
1830 }
1831 function removeManyMutably(keys, state) {
1832 var didMutate = false;
1833 keys.forEach(function (key) {
1834 if (key in state.entities) {
1835 delete state.entities[key];
1836 didMutate = true;
1837 }
1838 });
1839 if (didMutate) {
1840 state.ids = state.ids.filter(function (id) { return id in state.entities; });
1841 }
1842 }
1843 function removeAllMutably(state) {
1844 Object.assign(state, {
1845 ids: [],
1846 entities: {}
1847 });
1848 }
1849 function takeNewKey(keys, update, state) {
1850 var original2 = state.entities[update.id];
1851 var updated = Object.assign({}, original2, update.changes);
1852 var newKey = selectIdValue(updated, selectId);
1853 var hasNewKey = newKey !== update.id;
1854 if (hasNewKey) {
1855 keys[update.id] = newKey;
1856 delete state.entities[update.id];
1857 }
1858 state.entities[newKey] = updated;
1859 return hasNewKey;
1860 }
1861 function updateOneMutably(update, state) {
1862 return updateManyMutably([update], state);
1863 }
1864 function updateManyMutably(updates, state) {
1865 var newKeys = {};
1866 var updatesPerEntity = {};
1867 updates.forEach(function (update) {
1868 if (update.id in state.entities) {
1869 updatesPerEntity[update.id] = {
1870 id: update.id,
1871 changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes)
1872 };
1873 }
1874 });
1875 updates = Object.values(updatesPerEntity);
1876 var didMutateEntities = updates.length > 0;
1877 if (didMutateEntities) {
1878 var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0;
1879 if (didMutateIds) {
1880 state.ids = state.ids.map(function (id) { return newKeys[id] || id; });
1881 }
1882 }
1883 }
1884 function upsertOneMutably(entity, state) {
1885 return upsertManyMutably([entity], state);
1886 }
1887 function upsertManyMutably(newEntities, state) {
1888 var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1];
1889 updateManyMutably(updated, state);
1890 addManyMutably(added, state);
1891 }
1892 return {
1893 removeAll: createSingleArgumentStateOperator(removeAllMutably),
1894 addOne: createStateOperator(addOneMutably),
1895 addMany: createStateOperator(addManyMutably),
1896 setOne: createStateOperator(setOneMutably),
1897 setMany: createStateOperator(setManyMutably),
1898 setAll: createStateOperator(setAllMutably),
1899 updateOne: createStateOperator(updateOneMutably),
1900 updateMany: createStateOperator(updateManyMutably),
1901 upsertOne: createStateOperator(upsertOneMutably),
1902 upsertMany: createStateOperator(upsertManyMutably),
1903 removeOne: createStateOperator(removeOneMutably),
1904 removeMany: createStateOperator(removeManyMutably)
1905 };
1906 }
1907 // src/entities/sorted_state_adapter.ts
1908 function createSortedStateAdapter(selectId, sort) {
1909 var _c = createUnsortedStateAdapter(selectId), removeOne = _c.removeOne, removeMany = _c.removeMany, removeAll = _c.removeAll;
1910 function addOneMutably(entity, state) {
1911 return addManyMutably([entity], state);
1912 }
1913 function addManyMutably(newEntities, state) {
1914 newEntities = ensureEntitiesArray(newEntities);
1915 var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); });
1916 if (models.length !== 0) {
1917 merge(models, state);
1918 }
1919 }
1920 function setOneMutably(entity, state) {
1921 return setManyMutably([entity], state);
1922 }
1923 function setManyMutably(newEntities, state) {
1924 newEntities = ensureEntitiesArray(newEntities);
1925 if (newEntities.length !== 0) {
1926 merge(newEntities, state);
1927 }
1928 }
1929 function setAllMutably(newEntities, state) {
1930 newEntities = ensureEntitiesArray(newEntities);
1931 state.entities = {};
1932 state.ids = [];
1933 addManyMutably(newEntities, state);
1934 }
1935 function updateOneMutably(update, state) {
1936 return updateManyMutably([update], state);
1937 }
1938 function takeUpdatedModel(models, update, state) {
1939 if (!(update.id in state.entities)) {
1940 return false;
1941 }
1942 var original2 = state.entities[update.id];
1943 var updated = Object.assign({}, original2, update.changes);
1944 var newKey = selectIdValue(updated, selectId);
1945 delete state.entities[update.id];
1946 models.push(updated);
1947 return newKey !== update.id;
1948 }
1949 function updateManyMutably(updates, state) {
1950 var models = [];
1951 updates.forEach(function (update) { return takeUpdatedModel(models, update, state); });
1952 if (models.length !== 0) {
1953 merge(models, state);
1954 }
1955 }
1956 function upsertOneMutably(entity, state) {
1957 return upsertManyMutably([entity], state);
1958 }
1959 function upsertManyMutably(newEntities, state) {
1960 var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1];
1961 updateManyMutably(updated, state);
1962 addManyMutably(added, state);
1963 }
1964 function areArraysEqual(a, b) {
1965 if (a.length !== b.length) {
1966 return false;
1967 }
1968 for (var i = 0; i < a.length && i < b.length; i++) {
1969 if (a[i] === b[i]) {
1970 continue;
1971 }
1972 return false;
1973 }
1974 return true;
1975 }
1976 function merge(models, state) {
1977 models.forEach(function (model) {
1978 state.entities[selectId(model)] = model;
1979 });
1980 var allEntities = Object.values(state.entities);
1981 allEntities.sort(sort);
1982 var newSortedIds = allEntities.map(selectId);
1983 var ids = state.ids;
1984 if (!areArraysEqual(ids, newSortedIds)) {
1985 state.ids = newSortedIds;
1986 }
1987 }
1988 return {
1989 removeOne: removeOne,
1990 removeMany: removeMany,
1991 removeAll: removeAll,
1992 addOne: createStateOperator(addOneMutably),
1993 updateOne: createStateOperator(updateOneMutably),
1994 upsertOne: createStateOperator(upsertOneMutably),
1995 setOne: createStateOperator(setOneMutably),
1996 setMany: createStateOperator(setManyMutably),
1997 setAll: createStateOperator(setAllMutably),
1998 addMany: createStateOperator(addManyMutably),
1999 updateMany: createStateOperator(updateManyMutably),
2000 upsertMany: createStateOperator(upsertManyMutably)
2001 };
2002 }
2003 // src/entities/create_adapter.ts
2004 function createEntityAdapter(options) {
2005 if (options === void 0) { options = {}; }
2006 var _c = __spreadValues({
2007 sortComparer: false,
2008 selectId: function (instance) { return instance.id; }
2009 }, options), selectId = _c.selectId, sortComparer = _c.sortComparer;
2010 var stateFactory = createInitialStateFactory();
2011 var selectorsFactory = createSelectorsFactory();
2012 var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId);
2013 return __spreadValues(__spreadValues(__spreadValues({
2014 selectId: selectId,
2015 sortComparer: sortComparer
2016 }, stateFactory), selectorsFactory), stateAdapter);
2017 }
2018 // src/nanoid.ts
2019 var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";
2020 var nanoid = function (size) {
2021 if (size === void 0) { size = 21; }
2022 var id = "";
2023 var i = size;
2024 while (i--) {
2025 id += urlAlphabet[Math.random() * 64 | 0];
2026 }
2027 return id;
2028 };
2029 // src/createAsyncThunk.ts
2030 var commonProperties = [
2031 "name",
2032 "message",
2033 "stack",
2034 "code"
2035 ];
2036 var RejectWithValue = /** @class */ (function () {
2037 function RejectWithValue(payload, meta) {
2038 this.payload = payload;
2039 this.meta = meta;
2040 }
2041 return RejectWithValue;
2042 }());
2043 var FulfillWithMeta = /** @class */ (function () {
2044 function FulfillWithMeta(payload, meta) {
2045 this.payload = payload;
2046 this.meta = meta;
2047 }
2048 return FulfillWithMeta;
2049 }());
2050 var miniSerializeError = function (value) {
2051 if (typeof value === "object" && value !== null) {
2052 var simpleError = {};
2053 for (var _i = 0, commonProperties_1 = commonProperties; _i < commonProperties_1.length; _i++) {
2054 var property = commonProperties_1[_i];
2055 if (typeof value[property] === "string") {
2056 simpleError[property] = value[property];
2057 }
2058 }
2059 return simpleError;
2060 }
2061 return { message: String(value) };
2062 };
2063 function createAsyncThunk(typePrefix, payloadCreator, options) {
2064 var fulfilled = createAction(typePrefix + "/fulfilled", function (payload, requestId, arg, meta) { return ({
2065 payload: payload,
2066 meta: __spreadProps(__spreadValues({}, meta || {}), {
2067 arg: arg,
2068 requestId: requestId,
2069 requestStatus: "fulfilled"
2070 })
2071 }); });
2072 var pending = createAction(typePrefix + "/pending", function (requestId, arg, meta) { return ({
2073 payload: void 0,
2074 meta: __spreadProps(__spreadValues({}, meta || {}), {
2075 arg: arg,
2076 requestId: requestId,
2077 requestStatus: "pending"
2078 })
2079 }); });
2080 var rejected = createAction(typePrefix + "/rejected", function (error, requestId, arg, payload, meta) { return ({
2081 payload: payload,
2082 error: (options && options.serializeError || miniSerializeError)(error || "Rejected"),
2083 meta: __spreadProps(__spreadValues({}, meta || {}), {
2084 arg: arg,
2085 requestId: requestId,
2086 rejectedWithValue: !!payload,
2087 requestStatus: "rejected",
2088 aborted: (error == null ? void 0 : error.name) === "AbortError",
2089 condition: (error == null ? void 0 : error.name) === "ConditionError"
2090 })
2091 }); });
2092 var displayedWarning = false;
2093 var AC = typeof AbortController !== "undefined" ? AbortController : /** @class */ (function () {
2094 function class_1() {
2095 this.signal = {
2096 aborted: false,
2097 addEventListener: function () {
2098 },
2099 dispatchEvent: function () {
2100 return false;
2101 },
2102 onabort: function () {
2103 },
2104 removeEventListener: function () {
2105 }
2106 };
2107 }
2108 class_1.prototype.abort = function () {
2109 if (true) {
2110 if (!displayedWarning) {
2111 displayedWarning = true;
2112 console.info("This platform does not implement AbortController. \nIf you want to use the AbortController to react to `abort` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.");
2113 }
2114 }
2115 };
2116 return class_1;
2117 }());
2118 function actionCreator(arg) {
2119 return function (dispatch, getState, extra) {
2120 var requestId = (options == null ? void 0 : options.idGenerator) ? options.idGenerator(arg) : nanoid();
2121 var abortController = new AC();
2122 var abortReason;
2123 var abortedPromise = new Promise(function (_, reject) { return abortController.signal.addEventListener("abort", function () { return reject({ name: "AbortError", message: abortReason || "Aborted" }); }); });
2124 var started = false;
2125 function abort(reason) {
2126 if (started) {
2127 abortReason = reason;
2128 abortController.abort();
2129 }
2130 }
2131 var promise = function () {
2132 return __async(this, null, function () {
2133 var _a, _b, finalAction, conditionResult, err_1, skipDispatch;
2134 return __generator(this, function (_c) {
2135 switch (_c.label) {
2136 case 0:
2137 _c.trys.push([0, 4, , 5]);
2138 conditionResult = (_a = options == null ? void 0 : options.condition) == null ? void 0 : _a.call(options, arg, { getState: getState, extra: extra });
2139 if (!isThenable(conditionResult)) return [3 /*break*/, 2];
2140 return [4 /*yield*/, conditionResult];
2141 case 1:
2142 conditionResult = _c.sent();
2143 _c.label = 2;
2144 case 2:
2145 if (conditionResult === false) {
2146 throw {
2147 name: "ConditionError",
2148 message: "Aborted due to condition callback returning false."
2149 };
2150 }
2151 started = true;
2152 dispatch(pending(requestId, arg, (_b = options == null ? void 0 : options.getPendingMeta) == null ? void 0 : _b.call(options, { requestId: requestId, arg: arg }, { getState: getState, extra: extra })));
2153 return [4 /*yield*/, Promise.race([
2154 abortedPromise,
2155 Promise.resolve(payloadCreator(arg, {
2156 dispatch: dispatch,
2157 getState: getState,
2158 extra: extra,
2159 requestId: requestId,
2160 signal: abortController.signal,
2161 rejectWithValue: function (value, meta) {
2162 return new RejectWithValue(value, meta);
2163 },
2164 fulfillWithValue: function (value, meta) {
2165 return new FulfillWithMeta(value, meta);
2166 }
2167 })).then(function (result) {
2168 if (result instanceof RejectWithValue) {
2169 throw result;
2170 }
2171 if (result instanceof FulfillWithMeta) {
2172 return fulfilled(result.payload, requestId, arg, result.meta);
2173 }
2174 return fulfilled(result, requestId, arg);
2175 })
2176 ])];
2177 case 3:
2178 finalAction = _c.sent();
2179 return [3 /*break*/, 5];
2180 case 4:
2181 err_1 = _c.sent();
2182 finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg);
2183 return [3 /*break*/, 5];
2184 case 5:
2185 skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;
2186 if (!skipDispatch) {
2187 dispatch(finalAction);
2188 }
2189 return [2 /*return*/, finalAction];
2190 }
2191 });
2192 });
2193 }();
2194 return Object.assign(promise, {
2195 abort: abort,
2196 requestId: requestId,
2197 arg: arg,
2198 unwrap: function () {
2199 return promise.then(unwrapResult);
2200 }
2201 });
2202 };
2203 }
2204 return Object.assign(actionCreator, {
2205 pending: pending,
2206 rejected: rejected,
2207 fulfilled: fulfilled,
2208 typePrefix: typePrefix
2209 });
2210 }
2211 function unwrapResult(action) {
2212 if (action.meta && action.meta.rejectedWithValue) {
2213 throw action.payload;
2214 }
2215 if (action.error) {
2216 throw action.error;
2217 }
2218 return action.payload;
2219 }
2220 function isThenable(value) {
2221 return value !== null && typeof value === "object" && typeof value.then === "function";
2222 }
2223 // src/tsHelpers.ts
2224 var hasMatchFunction = function (v) {
2225 return v && typeof v.match === "function";
2226 };
2227 // src/matchers.ts
2228 var matches = function (matcher, action) {
2229 if (hasMatchFunction(matcher)) {
2230 return matcher.match(action);
2231 }
2232 else {
2233 return matcher(action);
2234 }
2235 };
2236 function isAnyOf() {
2237 var matchers = [];
2238 for (var _i = 0; _i < arguments.length; _i++) {
2239 matchers[_i] = arguments[_i];
2240 }
2241 return function (action) {
2242 return matchers.some(function (matcher) { return matches(matcher, action); });
2243 };
2244 }
2245 function isAllOf() {
2246 var matchers = [];
2247 for (var _i = 0; _i < arguments.length; _i++) {
2248 matchers[_i] = arguments[_i];
2249 }
2250 return function (action) {
2251 return matchers.every(function (matcher) { return matches(matcher, action); });
2252 };
2253 }
2254 function hasExpectedRequestMetadata(action, validStatus) {
2255 if (!action || !action.meta)
2256 return false;
2257 var hasValidRequestId = typeof action.meta.requestId === "string";
2258 var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1;
2259 return hasValidRequestId && hasValidRequestStatus;
2260 }
2261 function isAsyncThunkArray(a) {
2262 return typeof a[0] === "function" && "pending" in a[0] && "fulfilled" in a[0] && "rejected" in a[0];
2263 }
2264 function isPending() {
2265 var asyncThunks = [];
2266 for (var _i = 0; _i < arguments.length; _i++) {
2267 asyncThunks[_i] = arguments[_i];
2268 }
2269 if (asyncThunks.length === 0) {
2270 return function (action) { return hasExpectedRequestMetadata(action, ["pending"]); };
2271 }
2272 if (!isAsyncThunkArray(asyncThunks)) {
2273 return isPending()(asyncThunks[0]);
2274 }
2275 return function (action) {
2276 var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; });
2277 var combinedMatcher = isAnyOf.apply(void 0, matchers);
2278 return combinedMatcher(action);
2279 };
2280 }
2281 function isRejected() {
2282 var asyncThunks = [];
2283 for (var _i = 0; _i < arguments.length; _i++) {
2284 asyncThunks[_i] = arguments[_i];
2285 }
2286 if (asyncThunks.length === 0) {
2287 return function (action) { return hasExpectedRequestMetadata(action, ["rejected"]); };
2288 }
2289 if (!isAsyncThunkArray(asyncThunks)) {
2290 return isRejected()(asyncThunks[0]);
2291 }
2292 return function (action) {
2293 var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; });
2294 var combinedMatcher = isAnyOf.apply(void 0, matchers);
2295 return combinedMatcher(action);
2296 };
2297 }
2298 function isRejectedWithValue() {
2299 var asyncThunks = [];
2300 for (var _i = 0; _i < arguments.length; _i++) {
2301 asyncThunks[_i] = arguments[_i];
2302 }
2303 var hasFlag = function (action) {
2304 return action && action.meta && action.meta.rejectedWithValue;
2305 };
2306 if (asyncThunks.length === 0) {
2307 return function (action) {
2308 var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);
2309 return combinedMatcher(action);
2310 };
2311 }
2312 if (!isAsyncThunkArray(asyncThunks)) {
2313 return isRejectedWithValue()(asyncThunks[0]);
2314 }
2315 return function (action) {
2316 var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);
2317 return combinedMatcher(action);
2318 };
2319 }
2320 function isFulfilled() {
2321 var asyncThunks = [];
2322 for (var _i = 0; _i < arguments.length; _i++) {
2323 asyncThunks[_i] = arguments[_i];
2324 }
2325 if (asyncThunks.length === 0) {
2326 return function (action) { return hasExpectedRequestMetadata(action, ["fulfilled"]); };
2327 }
2328 if (!isAsyncThunkArray(asyncThunks)) {
2329 return isFulfilled()(asyncThunks[0]);
2330 }
2331 return function (action) {
2332 var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; });
2333 var combinedMatcher = isAnyOf.apply(void 0, matchers);
2334 return combinedMatcher(action);
2335 };
2336 }
2337 function isAsyncThunkAction() {
2338 var asyncThunks = [];
2339 for (var _i = 0; _i < arguments.length; _i++) {
2340 asyncThunks[_i] = arguments[_i];
2341 }
2342 if (asyncThunks.length === 0) {
2343 return function (action) { return hasExpectedRequestMetadata(action, ["pending", "fulfilled", "rejected"]); };
2344 }
2345 if (!isAsyncThunkArray(asyncThunks)) {
2346 return isAsyncThunkAction()(asyncThunks[0]);
2347 }
2348 return function (action) {
2349 var matchers = [];
2350 for (var _i = 0, asyncThunks_1 = asyncThunks; _i < asyncThunks_1.length; _i++) {
2351 var asyncThunk = asyncThunks_1[_i];
2352 matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled);
2353 }
2354 var combinedMatcher = isAnyOf.apply(void 0, matchers);
2355 return combinedMatcher(action);
2356 };
2357 }
2358 // src/listenerMiddleware/utils.ts
2359 var assertFunction = function (func, expected) {
2360 if (typeof func !== "function") {
2361 throw new TypeError(expected + " is not a function");
2362 }
2363 };
2364 var noop = function () {
2365 };
2366 var catchRejection = function (promise, onError) {
2367 if (onError === void 0) { onError = noop; }
2368 promise.catch(onError);
2369 return promise;
2370 };
2371 var addAbortSignalListener = function (abortSignal, callback) {
2372 abortSignal.addEventListener("abort", callback, { once: true });
2373 };
2374 var abortControllerWithReason = function (abortController, reason) {
2375 var signal = abortController.signal;
2376 if (signal.aborted) {
2377 return;
2378 }
2379 if (!("reason" in signal)) {
2380 Object.defineProperty(signal, "reason", {
2381 enumerable: true,
2382 value: reason,
2383 configurable: true,
2384 writable: true
2385 });
2386 }
2387 ;
2388 abortController.abort(reason);
2389 };
2390 // src/listenerMiddleware/exceptions.ts
2391 var task = "task";
2392 var listener = "listener";
2393 var completed = "completed";
2394 var cancelled = "cancelled";
2395 var taskCancelled = "task-" + cancelled;
2396 var taskCompleted = "task-" + completed;
2397 var listenerCancelled = listener + "-" + cancelled;
2398 var listenerCompleted = listener + "-" + completed;
2399 var TaskAbortError = /** @class */ (function () {
2400 function TaskAbortError(code) {
2401 this.code = code;
2402 this.name = "TaskAbortError";
2403 this.message = task + " " + cancelled + " (reason: " + code + ")";
2404 }
2405 return TaskAbortError;
2406 }());
2407 // src/listenerMiddleware/task.ts
2408 var validateActive = function (signal) {
2409 if (signal.aborted) {
2410 throw new TaskAbortError(signal.reason);
2411 }
2412 };
2413 var promisifyAbortSignal = function (signal) {
2414 return catchRejection(new Promise(function (_, reject) {
2415 var notifyRejection = function () { return reject(new TaskAbortError(signal.reason)); };
2416 if (signal.aborted) {
2417 notifyRejection();
2418 }
2419 else {
2420 addAbortSignalListener(signal, notifyRejection);
2421 }
2422 }));
2423 };
2424 var runTask = function (task2, cleanUp) { return __async(void 0, null, function () {
2425 var value, error_1;
2426 return __generator(this, function (_c) {
2427 switch (_c.label) {
2428 case 0:
2429 _c.trys.push([0, 3, 4, 5]);
2430 return [4 /*yield*/, Promise.resolve()];
2431 case 1:
2432 _c.sent();
2433 return [4 /*yield*/, task2()];
2434 case 2:
2435 value = _c.sent();
2436 return [2 /*return*/, {
2437 status: "ok",
2438 value: value
2439 }];
2440 case 3:
2441 error_1 = _c.sent();
2442 return [2 /*return*/, {
2443 status: error_1 instanceof TaskAbortError ? "cancelled" : "rejected",
2444 error: error_1
2445 }];
2446 case 4:
2447 cleanUp == null ? void 0 : cleanUp();
2448 return [7 /*endfinally*/];
2449 case 5: return [2 /*return*/];
2450 }
2451 });
2452 }); };
2453 var createPause = function (signal) {
2454 return function (promise) {
2455 return catchRejection(Promise.race([promisifyAbortSignal(signal), promise]).then(function (output) {
2456 validateActive(signal);
2457 return output;
2458 }));
2459 };
2460 };
2461 var createDelay = function (signal) {
2462 var pause = createPause(signal);
2463 return function (timeoutMs) {
2464 return pause(new Promise(function (resolve) { return setTimeout(resolve, timeoutMs); }));
2465 };
2466 };
2467 // src/listenerMiddleware/index.ts
2468 var assign = Object.assign;
2469 var INTERNAL_NIL_TOKEN = {};
2470 var alm = "listenerMiddleware";
2471 var createFork = function (parentAbortSignal) {
2472 var linkControllers = function (controller) { return addAbortSignalListener(parentAbortSignal, function () { return abortControllerWithReason(controller, parentAbortSignal.reason); }); };
2473 return function (taskExecutor) {
2474 assertFunction(taskExecutor, "taskExecutor");
2475 var childAbortController = new AbortController();
2476 linkControllers(childAbortController);
2477 var result = runTask(function () { return __async(void 0, null, function () {
2478 var result2;
2479 return __generator(this, function (_c) {
2480 switch (_c.label) {
2481 case 0:
2482 validateActive(parentAbortSignal);
2483 validateActive(childAbortController.signal);
2484 return [4 /*yield*/, taskExecutor({
2485 pause: createPause(childAbortController.signal),
2486 delay: createDelay(childAbortController.signal),
2487 signal: childAbortController.signal
2488 })];
2489 case 1:
2490 result2 = _c.sent();
2491 validateActive(childAbortController.signal);
2492 return [2 /*return*/, result2];
2493 }
2494 });
2495 }); }, function () { return abortControllerWithReason(childAbortController, taskCompleted); });
2496 return {
2497 result: createPause(parentAbortSignal)(result),
2498 cancel: function () {
2499 abortControllerWithReason(childAbortController, taskCancelled);
2500 }
2501 };
2502 };
2503 };
2504 var createTakePattern = function (startListening, signal) {
2505 var take = function (predicate, timeout) { return __async(void 0, null, function () {
2506 var unsubscribe, tuplePromise, promises, output;
2507 return __generator(this, function (_c) {
2508 switch (_c.label) {
2509 case 0:
2510 validateActive(signal);
2511 unsubscribe = function () {
2512 };
2513 tuplePromise = new Promise(function (resolve) {
2514 unsubscribe = startListening({
2515 predicate: predicate,
2516 effect: function (action, listenerApi) {
2517 listenerApi.unsubscribe();
2518 resolve([
2519 action,
2520 listenerApi.getState(),
2521 listenerApi.getOriginalState()
2522 ]);
2523 }
2524 });
2525 });
2526 promises = [
2527 promisifyAbortSignal(signal),
2528 tuplePromise
2529 ];
2530 if (timeout != null) {
2531 promises.push(new Promise(function (resolve) { return setTimeout(resolve, timeout, null); }));
2532 }
2533 _c.label = 1;
2534 case 1:
2535 _c.trys.push([1, , 3, 4]);
2536 return [4 /*yield*/, Promise.race(promises)];
2537 case 2:
2538 output = _c.sent();
2539 validateActive(signal);
2540 return [2 /*return*/, output];
2541 case 3:
2542 unsubscribe();
2543 return [7 /*endfinally*/];
2544 case 4: return [2 /*return*/];
2545 }
2546 });
2547 }); };
2548 return function (predicate, timeout) { return catchRejection(take(predicate, timeout)); };
2549 };
2550 var getListenerEntryPropsFrom = function (options) {
2551 var type = options.type, actionCreator = options.actionCreator, matcher = options.matcher, predicate = options.predicate, effect = options.effect;
2552 if (type) {
2553 predicate = createAction(type).match;
2554 }
2555 else if (actionCreator) {
2556 type = actionCreator.type;
2557 predicate = actionCreator.match;
2558 }
2559 else if (matcher) {
2560 predicate = matcher;
2561 }
2562 else if (predicate) {
2563 }
2564 else {
2565 throw new Error("Creating or removing a listener requires one of the known fields for matching an action");
2566 }
2567 assertFunction(effect, "options.listener");
2568 return { predicate: predicate, type: type, effect: effect };
2569 };
2570 var createListenerEntry = function (options) {
2571 var _c = getListenerEntryPropsFrom(options), type = _c.type, predicate = _c.predicate, effect = _c.effect;
2572 var id = nanoid();
2573 var entry = {
2574 id: id,
2575 effect: effect,
2576 type: type,
2577 predicate: predicate,
2578 pending: new Set(),
2579 unsubscribe: function () {
2580 throw new Error("Unsubscribe not initialized");
2581 }
2582 };
2583 return entry;
2584 };
2585 var createClearListenerMiddleware = function (listenerMap) {
2586 return function () {
2587 listenerMap.forEach(cancelActiveListeners);
2588 listenerMap.clear();
2589 };
2590 };
2591 var safelyNotifyError = function (errorHandler, errorToNotify, errorInfo) {
2592 try {
2593 errorHandler(errorToNotify, errorInfo);
2594 }
2595 catch (errorHandlerError) {
2596 setTimeout(function () {
2597 throw errorHandlerError;
2598 }, 0);
2599 }
2600 };
2601 var addListener = createAction(alm + "/add");
2602 var clearAllListeners = createAction(alm + "/removeAll");
2603 var removeListener = createAction(alm + "/remove");
2604 var defaultErrorHandler = function () {
2605 var args = [];
2606 for (var _i = 0; _i < arguments.length; _i++) {
2607 args[_i] = arguments[_i];
2608 }
2609 console.error.apply(console, __spreadArray([alm + "/error"], args));
2610 };
2611 var cancelActiveListeners = function (entry) {
2612 entry.pending.forEach(function (controller) {
2613 abortControllerWithReason(controller, listenerCancelled);
2614 });
2615 };
2616 function createListenerMiddleware(middlewareOptions) {
2617 var _this = this;
2618 if (middlewareOptions === void 0) { middlewareOptions = {}; }
2619 var listenerMap = new Map();
2620 var extra = middlewareOptions.extra, _c = middlewareOptions.onError, onError = _c === void 0 ? defaultErrorHandler : _c;
2621 assertFunction(onError, "onError");
2622 var insertEntry = function (entry) {
2623 entry.unsubscribe = function () { return listenerMap.delete(entry.id); };
2624 listenerMap.set(entry.id, entry);
2625 return function (cancelOptions) {
2626 entry.unsubscribe();
2627 if (cancelOptions == null ? void 0 : cancelOptions.cancelActive) {
2628 cancelActiveListeners(entry);
2629 }
2630 };
2631 };
2632 var findListenerEntry = function (comparator) {
2633 for (var _i = 0, _c = Array.from(listenerMap.values()); _i < _c.length; _i++) {
2634 var entry = _c[_i];
2635 if (comparator(entry)) {
2636 return entry;
2637 }
2638 }
2639 return void 0;
2640 };
2641 var startListening = function (options) {
2642 var entry = findListenerEntry(function (existingEntry) { return existingEntry.effect === options.effect; });
2643 if (!entry) {
2644 entry = createListenerEntry(options);
2645 }
2646 return insertEntry(entry);
2647 };
2648 var stopListening = function (options) {
2649 var _c = getListenerEntryPropsFrom(options), type = _c.type, effect = _c.effect, predicate = _c.predicate;
2650 var entry = findListenerEntry(function (entry2) {
2651 var matchPredicateOrType = typeof type === "string" ? entry2.type === type : entry2.predicate === predicate;
2652 return matchPredicateOrType && entry2.effect === effect;
2653 });
2654 if (entry) {
2655 entry.unsubscribe();
2656 if (options.cancelActive) {
2657 cancelActiveListeners(entry);
2658 }
2659 }
2660 return !!entry;
2661 };
2662 var notifyListener = function (entry, action, api, getOriginalState) { return __async(_this, null, function () {
2663 var internalTaskController, take, listenerError_1;
2664 return __generator(this, function (_c) {
2665 switch (_c.label) {
2666 case 0:
2667 internalTaskController = new AbortController();
2668 take = createTakePattern(startListening, internalTaskController.signal);
2669 _c.label = 1;
2670 case 1:
2671 _c.trys.push([1, 3, 4, 5]);
2672 entry.pending.add(internalTaskController);
2673 return [4 /*yield*/, Promise.resolve(entry.effect(action, assign({}, api, {
2674 getOriginalState: getOriginalState,
2675 condition: function (predicate, timeout) { return take(predicate, timeout).then(Boolean); },
2676 take: take,
2677 delay: createDelay(internalTaskController.signal),
2678 pause: createPause(internalTaskController.signal),
2679 extra: extra,
2680 signal: internalTaskController.signal,
2681 fork: createFork(internalTaskController.signal),
2682 unsubscribe: entry.unsubscribe,
2683 subscribe: function () {
2684 listenerMap.set(entry.id, entry);
2685 },
2686 cancelActiveListeners: function () {
2687 entry.pending.forEach(function (controller, _, set) {
2688 if (controller !== internalTaskController) {
2689 abortControllerWithReason(controller, listenerCancelled);
2690 set.delete(controller);
2691 }
2692 });
2693 }
2694 })))];
2695 case 2:
2696 _c.sent();
2697 return [3 /*break*/, 5];
2698 case 3:
2699 listenerError_1 = _c.sent();
2700 if (!(listenerError_1 instanceof TaskAbortError)) {
2701 safelyNotifyError(onError, listenerError_1, {
2702 raisedBy: "effect"
2703 });
2704 }
2705 return [3 /*break*/, 5];
2706 case 4:
2707 abortControllerWithReason(internalTaskController, listenerCompleted);
2708 entry.pending.delete(internalTaskController);
2709 return [7 /*endfinally*/];
2710 case 5: return [2 /*return*/];
2711 }
2712 });
2713 }); };
2714 var clearListenerMiddleware = createClearListenerMiddleware(listenerMap);
2715 var middleware = function (api) { return function (next) { return function (action) {
2716 if (addListener.match(action)) {
2717 return startListening(action.payload);
2718 }
2719 if (clearAllListeners.match(action)) {
2720 clearListenerMiddleware();
2721 return;
2722 }
2723 if (removeListener.match(action)) {
2724 return stopListening(action.payload);
2725 }
2726 var originalState = api.getState();
2727 var getOriginalState = function () {
2728 if (originalState === INTERNAL_NIL_TOKEN) {
2729 throw new Error(alm + ": getOriginalState can only be called synchronously");
2730 }
2731 return originalState;
2732 };
2733 var result;
2734 try {
2735 result = next(action);
2736 if (listenerMap.size > 0) {
2737 var currentState = api.getState();
2738 var listenerEntries = Array.from(listenerMap.values());
2739 for (var _i = 0, listenerEntries_1 = listenerEntries; _i < listenerEntries_1.length; _i++) {
2740 var entry = listenerEntries_1[_i];
2741 var runListener = false;
2742 try {
2743 runListener = entry.predicate(action, currentState, originalState);
2744 }
2745 catch (predicateError) {
2746 runListener = false;
2747 safelyNotifyError(onError, predicateError, {
2748 raisedBy: "predicate"
2749 });
2750 }
2751 if (!runListener) {
2752 continue;
2753 }
2754 notifyListener(entry, action, api, getOriginalState);
2755 }
2756 }
2757 }
2758 finally {
2759 originalState = INTERNAL_NIL_TOKEN;
2760 }
2761 return result;
2762 }; }; };
2763 return {
2764 middleware: middleware,
2765 startListening: startListening,
2766 stopListening: stopListening,
2767 clearListeners: clearListenerMiddleware
2768 };
2769 }
2770 // src/index.ts
2771 (0,immer__WEBPACK_IMPORTED_MODULE_2__.enableES5)();
2772
2773 //# sourceMappingURL=redux-toolkit.esm.js.map
2774
2775 /***/ }),
2776
2777 /***/ "../assets/dev/js/editor/utils/is-instanceof.js":
2778 /*!******************************************************!*\
2779 !*** ../assets/dev/js/editor/utils/is-instanceof.js ***!
2780 \******************************************************/
2781 /***/ ((__unused_webpack_module, exports) => {
2782
2783 "use strict";
2784
2785
2786 Object.defineProperty(exports, "__esModule", ({
2787 value: true
2788 }));
2789 exports["default"] = void 0;
2790
2791 function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
2792
2793 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2794
2795 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2796
2797 /**
2798 * Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved
2799 * object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can
2800 * check whether it's instanceof by using the objects constructor and prototype names.
2801 *
2802 * @param object
2803 * @param constructors
2804 * @return {boolean}
2805 */
2806 var _default = function _default(object, constructors) {
2807 constructors = Array.isArray(constructors) ? constructors : [constructors];
2808
2809 var _iterator = _createForOfIteratorHelper(constructors),
2810 _step;
2811
2812 try {
2813 for (_iterator.s(); !(_step = _iterator.n()).done;) {
2814 var _constructor = _step.value;
2815
2816 if (object.constructor.name === _constructor.prototype[Symbol.toStringTag]) {
2817 return true;
2818 }
2819 }
2820 } catch (err) {
2821 _iterator.e(err);
2822 } finally {
2823 _iterator.f();
2824 }
2825
2826 return false;
2827 };
2828
2829 exports["default"] = _default;
2830
2831 /***/ }),
2832
2833 /***/ "../assets/dev/js/modules/imports/args-object.js":
2834 /*!*******************************************************!*\
2835 !*** ../assets/dev/js/modules/imports/args-object.js ***!
2836 \*******************************************************/
2837 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2838
2839 "use strict";
2840
2841
2842 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2843
2844 Object.defineProperty(exports, "__esModule", ({
2845 value: true
2846 }));
2847 exports["default"] = void 0;
2848
2849 var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
2850
2851 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
2852
2853 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
2854
2855 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
2856
2857 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
2858
2859 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
2860
2861 var _instanceType = _interopRequireDefault(__webpack_require__(/*! ./instance-type */ "../assets/dev/js/modules/imports/instance-type.js"));
2862
2863 var _isInstanceof = _interopRequireDefault(__webpack_require__(/*! ../../editor/utils/is-instanceof */ "../assets/dev/js/editor/utils/is-instanceof.js"));
2864
2865 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
2866
2867 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
2868
2869 var ArgsObject = /*#__PURE__*/function (_InstanceType) {
2870 (0, _inherits2.default)(ArgsObject, _InstanceType);
2871
2872 var _super = _createSuper(ArgsObject);
2873
2874 /**
2875 * Function constructor().
2876 *
2877 * Create ArgsObject.
2878 *
2879 * @param {{}} args
2880 */
2881 function ArgsObject(args) {
2882 var _this;
2883
2884 (0, _classCallCheck2.default)(this, ArgsObject);
2885 _this = _super.call(this);
2886 _this.args = args;
2887 return _this;
2888 }
2889 /**
2890 * Function requireArgument().
2891 *
2892 * Validate property in args.
2893 *
2894 * @param {string} property
2895 * @param {{}} args
2896 *
2897 * @throws {Error}
2898 *
2899 */
2900
2901
2902 (0, _createClass2.default)(ArgsObject, [{
2903 key: "requireArgument",
2904 value: function requireArgument(property) {
2905 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.args;
2906
2907 if (!args.hasOwnProperty(property)) {
2908 throw Error("".concat(property, " is required."));
2909 }
2910 }
2911 /**
2912 * Function requireArgumentType().
2913 *
2914 * Validate property in args using `type === typeof(args.whatever)`.
2915 *
2916 * @param {string} property
2917 * @param {string} type
2918 * @param {{}} args
2919 *
2920 * @throws {Error}
2921 *
2922 */
2923
2924 }, {
2925 key: "requireArgumentType",
2926 value: function requireArgumentType(property, type) {
2927 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
2928 this.requireArgument(property, args);
2929
2930 if ((0, _typeof2.default)(args[property]) !== type) {
2931 throw Error("".concat(property, " invalid type: ").concat(type, "."));
2932 }
2933 }
2934 /**
2935 * Function requireArgumentInstance().
2936 *
2937 * Validate property in args using `args.whatever instanceof instance`.
2938 *
2939 * @param {string} property
2940 * @param {*} instance
2941 * @param {{}} args
2942 *
2943 * @throws {Error}
2944 *
2945 */
2946
2947 }, {
2948 key: "requireArgumentInstance",
2949 value: function requireArgumentInstance(property, instance) {
2950 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
2951 this.requireArgument(property, args);
2952
2953 if (!(args[property] instanceof instance) && !(0, _isInstanceof.default)(args[property], instance)) {
2954 throw Error("".concat(property, " invalid instance."));
2955 }
2956 }
2957 /**
2958 * Function requireArgumentConstructor().
2959 *
2960 * Validate property in args using `type === args.whatever.constructor`.
2961 *
2962 * @param {string} property
2963 * @param {*} type
2964 * @param {{}} args
2965 *
2966 * @throws {Error}
2967 *
2968 */
2969
2970 }, {
2971 key: "requireArgumentConstructor",
2972 value: function requireArgumentConstructor(property, type) {
2973 var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
2974 this.requireArgument(property, args); // Note: Converting the constructor to string in order to avoid equation issues
2975 // due to different memory addresses between iframes (window.Object !== window.top.Object).
2976
2977 if (args[property].constructor.toString() !== type.prototype.constructor.toString()) {
2978 throw Error("".concat(property, " invalid constructor type."));
2979 }
2980 }
2981 }], [{
2982 key: "getInstanceType",
2983 value: function getInstanceType() {
2984 return 'ArgsObject';
2985 }
2986 }]);
2987 return ArgsObject;
2988 }(_instanceType.default);
2989
2990 exports["default"] = ArgsObject;
2991
2992 /***/ }),
2993
2994 /***/ "../assets/dev/js/modules/imports/instance-type.js":
2995 /*!*********************************************************!*\
2996 !*** ../assets/dev/js/modules/imports/instance-type.js ***!
2997 \*********************************************************/
2998 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2999
3000 "use strict";
3001
3002
3003 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3004
3005 Object.defineProperty(exports, "__esModule", ({
3006 value: true
3007 }));
3008 exports["default"] = void 0;
3009
3010 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
3011
3012 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
3013
3014 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
3015
3016 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
3017
3018 var InstanceType = /*#__PURE__*/function (_Symbol$hasInstance) {
3019 function InstanceType() {
3020 var _this = this;
3021
3022 (0, _classCallCheck2.default)(this, InstanceType);
3023 // Since anonymous classes sometimes do not get validated by babel, do it manually.
3024 var target = this instanceof InstanceType ? this.constructor : void 0;
3025 var prototypes = [];
3026
3027 while (target.__proto__ && target.__proto__.name) {
3028 prototypes.push(target.__proto__);
3029 target = target.__proto__;
3030 }
3031
3032 prototypes.reverse().forEach(function (proto) {
3033 return _this instanceof proto;
3034 });
3035 }
3036
3037 (0, _createClass2.default)(InstanceType, null, [{
3038 key: _Symbol$hasInstance,
3039 value: function value(target) {
3040 /**
3041 * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class
3042 * its give's opportunity to mange capabilities of instanceOf operator.
3043 * saving current class each time will give option later to handle instanceOf manually.
3044 */
3045 var result = (0, _get2.default)((0, _getPrototypeOf2.default)(InstanceType), Symbol.hasInstance, this).call(this, target); // Act normal when validate a class, which does not have instance type.
3046
3047 if (target && !target.constructor.getInstanceType) {
3048 return result;
3049 }
3050
3051 if (target) {
3052 if (!target.instanceTypes) {
3053 target.instanceTypes = [];
3054 }
3055
3056 if (!result) {
3057 if (this.getInstanceType() === target.constructor.getInstanceType()) {
3058 result = true;
3059 }
3060 }
3061
3062 if (result) {
3063 var name = this.getInstanceType === InstanceType.getInstanceType ? 'BaseInstanceType' : this.getInstanceType();
3064
3065 if (-1 === target.instanceTypes.indexOf(name)) {
3066 target.instanceTypes.push(name);
3067 }
3068 }
3069 }
3070
3071 if (!result && target) {
3072 // Check if the given 'target', is instance of known types.
3073 result = target.instanceTypes && Array.isArray(target.instanceTypes) && -1 !== target.instanceTypes.indexOf(this.getInstanceType());
3074 }
3075
3076 return result;
3077 }
3078 }, {
3079 key: "getInstanceType",
3080 value: function getInstanceType() {
3081 elementorModules.ForceMethodImplementation();
3082 }
3083 }]);
3084 return InstanceType;
3085 }(Symbol.hasInstance);
3086
3087 exports["default"] = InstanceType;
3088
3089 /***/ }),
3090
3091 /***/ "../assets/dev/js/modules/imports/module.js":
3092 /*!**************************************************!*\
3093 !*** ../assets/dev/js/modules/imports/module.js ***!
3094 \**************************************************/
3095 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3096
3097 "use strict";
3098
3099
3100 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3101
3102 var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
3103
3104 var Module = function Module() {
3105 var $ = jQuery,
3106 instanceParams = arguments,
3107 self = this,
3108 events = {};
3109 var settings;
3110
3111 var ensureClosureMethods = function ensureClosureMethods() {
3112 $.each(self, function (methodName) {
3113 var oldMethod = self[methodName];
3114
3115 if ('function' !== typeof oldMethod) {
3116 return;
3117 }
3118
3119 self[methodName] = function () {
3120 return oldMethod.apply(self, arguments);
3121 };
3122 });
3123 };
3124
3125 var initSettings = function initSettings() {
3126 settings = self.getDefaultSettings();
3127 var instanceSettings = instanceParams[0];
3128
3129 if (instanceSettings) {
3130 $.extend(true, settings, instanceSettings);
3131 }
3132 };
3133
3134 var init = function init() {
3135 self.__construct.apply(self, instanceParams);
3136
3137 ensureClosureMethods();
3138 initSettings();
3139 self.trigger('init');
3140 };
3141
3142 this.getItems = function (items, itemKey) {
3143 if (itemKey) {
3144 var keyStack = itemKey.split('.'),
3145 currentKey = keyStack.splice(0, 1);
3146
3147 if (!keyStack.length) {
3148 return items[currentKey];
3149 }
3150
3151 if (!items[currentKey]) {
3152 return;
3153 }
3154
3155 return this.getItems(items[currentKey], keyStack.join('.'));
3156 }
3157
3158 return items;
3159 };
3160
3161 this.getSettings = function (setting) {
3162 return this.getItems(settings, setting);
3163 };
3164
3165 this.setSettings = function (settingKey, value, settingsContainer) {
3166 if (!settingsContainer) {
3167 settingsContainer = settings;
3168 }
3169
3170 if ('object' === (0, _typeof2.default)(settingKey)) {
3171 $.extend(settingsContainer, settingKey);
3172 return self;
3173 }
3174
3175 var keyStack = settingKey.split('.'),
3176 currentKey = keyStack.splice(0, 1);
3177
3178 if (!keyStack.length) {
3179 settingsContainer[currentKey] = value;
3180 return self;
3181 }
3182
3183 if (!settingsContainer[currentKey]) {
3184 settingsContainer[currentKey] = {};
3185 }
3186
3187 return self.setSettings(keyStack.join('.'), value, settingsContainer[currentKey]);
3188 };
3189
3190 this.getErrorMessage = function (type, functionName) {
3191 var message;
3192
3193 switch (type) {
3194 case 'forceMethodImplementation':
3195 message = "The method '".concat(functionName, "' must to be implemented in the inheritor child.");
3196 break;
3197
3198 default:
3199 message = 'An error occurs';
3200 }
3201
3202 return message;
3203 }; // TODO: This function should be deleted ?.
3204
3205
3206 this.forceMethodImplementation = function (functionName) {
3207 throw new Error(this.getErrorMessage('forceMethodImplementation', functionName));
3208 };
3209
3210 this.on = function (eventName, callback) {
3211 if ('object' === (0, _typeof2.default)(eventName)) {
3212 $.each(eventName, function (singleEventName) {
3213 self.on(singleEventName, this);
3214 });
3215 return self;
3216 }
3217
3218 var eventNames = eventName.split(' ');
3219 eventNames.forEach(function (singleEventName) {
3220 if (!events[singleEventName]) {
3221 events[singleEventName] = [];
3222 }
3223
3224 events[singleEventName].push(callback);
3225 });
3226 return self;
3227 };
3228
3229 this.off = function (eventName, callback) {
3230 if (!events[eventName]) {
3231 return self;
3232 }
3233
3234 if (!callback) {
3235 delete events[eventName];
3236 return self;
3237 }
3238
3239 var callbackIndex = events[eventName].indexOf(callback);
3240
3241 if (-1 !== callbackIndex) {
3242 delete events[eventName][callbackIndex]; // Reset array index (for next off on same event).
3243
3244 events[eventName] = events[eventName].filter(function (val) {
3245 return val;
3246 });
3247 }
3248
3249 return self;
3250 };
3251
3252 this.trigger = function (eventName) {
3253 var methodName = 'on' + eventName[0].toUpperCase() + eventName.slice(1),
3254 params = Array.prototype.slice.call(arguments, 1);
3255
3256 if (self[methodName]) {
3257 self[methodName].apply(self, params);
3258 }
3259
3260 var callbacks = events[eventName];
3261
3262 if (!callbacks) {
3263 return self;
3264 }
3265
3266 $.each(callbacks, function (index, callback) {
3267 callback.apply(self, params);
3268 });
3269 return self;
3270 };
3271
3272 init();
3273 };
3274
3275 Module.prototype.__construct = function () {};
3276
3277 Module.prototype.getDefaultSettings = function () {
3278 return {};
3279 };
3280
3281 Module.prototype.getConstructorID = function () {
3282 return this.constructor.name;
3283 };
3284
3285 Module.extend = function (properties) {
3286 var $ = jQuery,
3287 parent = this;
3288
3289 var child = function child() {
3290 return parent.apply(this, arguments);
3291 };
3292
3293 $.extend(child, parent);
3294 child.prototype = Object.create($.extend({}, parent.prototype, properties));
3295 child.prototype.constructor = child;
3296 child.__super__ = parent.prototype;
3297 return child;
3298 };
3299
3300 module.exports = Module;
3301
3302 /***/ }),
3303
3304 /***/ "../modules/web-cli/assets/js/api.js":
3305 /*!*******************************************!*\
3306 !*** ../modules/web-cli/assets/js/api.js ***!
3307 \*******************************************/
3308 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3309
3310 "use strict";
3311
3312
3313 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3314
3315 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
3316
3317 Object.defineProperty(exports, "__esModule", ({
3318 value: true
3319 }));
3320 exports["default"] = void 0;
3321
3322 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
3323
3324 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
3325
3326 var _backwardsCompatibility = _interopRequireDefault(__webpack_require__(/*! ./core/backwards-compatibility */ "../modules/web-cli/assets/js/core/backwards-compatibility.js"));
3327
3328 var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
3329
3330 var _commandInternalBase = _interopRequireDefault(__webpack_require__(/*! ./modules/command-internal-base */ "../modules/web-cli/assets/js/modules/command-internal-base.js"));
3331
3332 var _commandData = _interopRequireDefault(__webpack_require__(/*! ./modules/command-data */ "../modules/web-cli/assets/js/modules/command-data.js"));
3333
3334 var _commands = _interopRequireDefault(__webpack_require__(/*! ./core/commands */ "../modules/web-cli/assets/js/core/commands.js"));
3335
3336 var _commandsInternal = _interopRequireDefault(__webpack_require__(/*! ./core/commands-internal */ "../modules/web-cli/assets/js/core/commands-internal.js"));
3337
3338 var _componentBase = _interopRequireDefault(__webpack_require__(/*! ./modules/component-base */ "../modules/web-cli/assets/js/modules/component-base.js"));
3339
3340 var _componentModalBase = _interopRequireDefault(__webpack_require__(/*! ./modules/component-modal-base */ "../modules/web-cli/assets/js/modules/component-modal-base.js"));
3341
3342 var _components = _interopRequireDefault(__webpack_require__(/*! ./core/components */ "../modules/web-cli/assets/js/core/components.js"));
3343
3344 var _data = _interopRequireDefault(__webpack_require__(/*! ./core/data.js */ "../modules/web-cli/assets/js/core/data.js"));
3345
3346 var _hashCommands = _interopRequireDefault(__webpack_require__(/*! ./extras/hash-commands */ "../modules/web-cli/assets/js/extras/hash-commands.js"));
3347
3348 var _hookBreak = _interopRequireDefault(__webpack_require__(/*! ./modules/hook-break */ "../modules/web-cli/assets/js/modules/hook-break.js"));
3349
3350 var _hooks = _interopRequireDefault(__webpack_require__(/*! ./core/hooks */ "../modules/web-cli/assets/js/core/hooks.js"));
3351
3352 var _routes = _interopRequireDefault(__webpack_require__(/*! ./core/routes */ "../modules/web-cli/assets/js/core/routes.js"));
3353
3354 var _shortcuts = _interopRequireDefault(__webpack_require__(/*! ./core/shortcuts */ "../modules/web-cli/assets/js/core/shortcuts.js"));
3355
3356 var _store = _interopRequireDefault(__webpack_require__(/*! ./core/store */ "../modules/web-cli/assets/js/core/store.js"));
3357
3358 var _uiStates = _interopRequireDefault(__webpack_require__(/*! ./core/ui-states */ "../modules/web-cli/assets/js/core/ui-states.js"));
3359
3360 var hookData = _interopRequireWildcard(__webpack_require__(/*! ./modules/hooks/data/ */ "../modules/web-cli/assets/js/modules/hooks/data/index.js"));
3361
3362 var hookUI = _interopRequireWildcard(__webpack_require__(/*! ./modules/hooks/ui */ "../modules/web-cli/assets/js/modules/hooks/ui/index.js"));
3363
3364 function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
3365
3366 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
3367
3368 /* Alphabetical order */
3369 var API = /*#__PURE__*/function () {
3370 /**
3371 * Function constructor().
3372 *
3373 * Create's 'elementor' api.
3374 */
3375 function API() {
3376 (0, _classCallCheck2.default)(this, API);
3377 this.components = new _components.default();
3378 this.commands = new _commands.default();
3379 this.commandsInternal = new _commandsInternal.default();
3380 this.hooks = new _hooks.default();
3381 this.routes = new _routes.default();
3382 this.shortcuts = new _shortcuts.default(jQuery(window));
3383 this.data = new _data.default();
3384 this.store = new _store.default();
3385 this.uiStates = new _uiStates.default();
3386 this.modules = {
3387 CommandBase: _commandBase.default,
3388 CommandInternalBase: _commandInternalBase.default,
3389 CommandData: _commandData.default,
3390 ComponentBase: _componentBase.default,
3391 ComponentModalBase: _componentModalBase.default,
3392 HookBreak: _hookBreak.default,
3393 hookData: hookData,
3394 hookUI: hookUI
3395 };
3396 this.extras = {
3397 hashCommands: new _hashCommands.default()
3398 }; // Backwards compatibility should be last, in order to handle others.
3399
3400 this.bc = new _backwardsCompatibility.default();
3401 }
3402 /**
3403 * Function run().
3404 *
3405 * Alias of `$e.commands.run()`.
3406 *
3407 * @param {string} command
3408 * @param {*} [args={}]
3409 *
3410 * @return {*} result
3411 */
3412
3413
3414 (0, _createClass2.default)(API, [{
3415 key: "run",
3416 value: function run(command) {
3417 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3418 return $e.commands.run(command, args);
3419 }
3420 /**
3421 * Function internal().
3422 *
3423 * Alias of `$e.commandsInternal.run()`.
3424 *
3425 * @param {string} command
3426 * @param {*} [args={}]
3427 *
3428 * @return {boolean} result
3429 */
3430
3431 }, {
3432 key: "internal",
3433 value: function internal(command) {
3434 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3435 return $e.commandsInternal.run(command, args);
3436 }
3437 /**
3438 * Function route().
3439 *
3440 * Alias of `$e.routes.to()`.
3441 *
3442 * @param {string} route
3443 * @param {*} [args={}]
3444 */
3445
3446 }, {
3447 key: "route",
3448 value: function route(_route) {
3449 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3450 return $e.routes.to(_route, args);
3451 } // TODO: shortcut();
3452
3453 }]);
3454 return API;
3455 }();
3456
3457 exports["default"] = API;
3458
3459 /***/ }),
3460
3461 /***/ "../modules/web-cli/assets/js/core/backwards-compatibility.js":
3462 /*!********************************************************************!*\
3463 !*** ../modules/web-cli/assets/js/core/backwards-compatibility.js ***!
3464 \********************************************************************/
3465 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3466
3467 "use strict";
3468
3469
3470 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3471
3472 Object.defineProperty(exports, "__esModule", ({
3473 value: true
3474 }));
3475 exports["default"] = void 0;
3476
3477 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
3478
3479 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
3480
3481 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
3482
3483 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
3484
3485 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
3486
3487 var _componentBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/component-base */ "../modules/web-cli/assets/js/modules/component-base.js"));
3488
3489 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
3490
3491 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
3492
3493 var BackwardsCompatibility = /*#__PURE__*/function () {
3494 function BackwardsCompatibility() {
3495 (0, _classCallCheck2.default)(this, BackwardsCompatibility);
3496 }
3497
3498 (0, _createClass2.default)(BackwardsCompatibility, [{
3499 key: "ensureTab",
3500 value: function ensureTab(namespace, tabSlug) {
3501 var page = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
3502 var component = $e.components.get(namespace);
3503
3504 if (!component) {
3505 var Component = /*#__PURE__*/function (_ComponentBase) {
3506 (0, _inherits2.default)(Component, _ComponentBase);
3507
3508 var _super = _createSuper(Component);
3509
3510 function Component() {
3511 (0, _classCallCheck2.default)(this, Component);
3512 return _super.apply(this, arguments);
3513 }
3514
3515 (0, _createClass2.default)(Component, [{
3516 key: "getNamespace",
3517 value: function getNamespace() {
3518 return namespace;
3519 }
3520 }, {
3521 key: "renderTab",
3522 value: function renderTab(tab) {
3523 elementor.getPanelView().setPage(page).activateTab(tab);
3524 }
3525 }]);
3526 return Component;
3527 }(_componentBase.default);
3528
3529 component = $e.components.register(new Component());
3530 }
3531
3532 if (!component.hasTab(tabSlug) && elementor.config.tabs[tabSlug]) {
3533 component.addTab(tabSlug, {
3534 title: elementor.config.tabs[tabSlug]
3535 });
3536 }
3537 }
3538 }]);
3539 return BackwardsCompatibility;
3540 }();
3541
3542 exports["default"] = BackwardsCompatibility;
3543
3544 /***/ }),
3545
3546 /***/ "../modules/web-cli/assets/js/core/backwards-compatibility/commands.js":
3547 /*!*****************************************************************************!*\
3548 !*** ../modules/web-cli/assets/js/core/backwards-compatibility/commands.js ***!
3549 \*****************************************************************************/
3550 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3551
3552 "use strict";
3553
3554
3555 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3556
3557 Object.defineProperty(exports, "__esModule", ({
3558 value: true
3559 }));
3560 exports["default"] = void 0;
3561
3562 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
3563
3564 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
3565
3566 var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
3567
3568 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
3569
3570 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
3571
3572 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
3573
3574 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
3575
3576 var _helpers = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/helpers */ "../modules/web-cli/assets/js/utils/helpers.js"));
3577
3578 var _module = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js"));
3579
3580 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
3581
3582 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
3583
3584 var CommandsBackwardsCompatibility = /*#__PURE__*/function (_Module) {
3585 (0, _inherits2.default)(CommandsBackwardsCompatibility, _Module);
3586
3587 var _super = _createSuper(CommandsBackwardsCompatibility);
3588
3589 function CommandsBackwardsCompatibility() {
3590 var _this;
3591
3592 (0, _classCallCheck2.default)(this, CommandsBackwardsCompatibility);
3593
3594 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
3595 args[_key] = arguments[_key];
3596 }
3597
3598 _this = _super.call.apply(_super, [this].concat(args));
3599 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "on", function (eventName, callback) {
3600 if ('run' === eventName) {
3601 var componentName = _this.getConstructorID(); // Regex takes the first letter and convert it to lower case.
3602
3603
3604 componentName = componentName.replace(/^./, function (val) {
3605 return val.toLowerCase();
3606 });
3607
3608 _helpers.default.softDeprecated("$e.".concat(componentName, ".on( 'run', ... )"), '3.0.0', "$e.".concat(componentName, ".on( 'run:before', ... )"));
3609
3610 _this.onOrig('run:before', callback);
3611
3612 return;
3613 }
3614
3615 _this.onOrig(eventName, callback);
3616 });
3617 return _this;
3618 }
3619
3620 (0, _createClass2.default)(CommandsBackwardsCompatibility, [{
3621 key: "__construct",
3622 value: function __construct() {
3623 this.onOrig = this.on;
3624 }
3625 }]);
3626 return CommandsBackwardsCompatibility;
3627 }(_module.default);
3628
3629 exports["default"] = CommandsBackwardsCompatibility;
3630
3631 /***/ }),
3632
3633 /***/ "../modules/web-cli/assets/js/core/commands-internal.js":
3634 /*!**************************************************************!*\
3635 !*** ../modules/web-cli/assets/js/core/commands-internal.js ***!
3636 \**************************************************************/
3637 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3638
3639 "use strict";
3640
3641
3642 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3643
3644 Object.defineProperty(exports, "__esModule", ({
3645 value: true
3646 }));
3647 exports["default"] = void 0;
3648
3649 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
3650
3651 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
3652
3653 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
3654
3655 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
3656
3657 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
3658
3659 var _commands = _interopRequireDefault(__webpack_require__(/*! ./commands.js */ "../modules/web-cli/assets/js/core/commands.js"));
3660
3661 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
3662
3663 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
3664
3665 var CommandsInternal = /*#__PURE__*/function (_Commands) {
3666 (0, _inherits2.default)(CommandsInternal, _Commands);
3667
3668 var _super = _createSuper(CommandsInternal);
3669
3670 function CommandsInternal() {
3671 (0, _classCallCheck2.default)(this, CommandsInternal);
3672 return _super.apply(this, arguments);
3673 }
3674
3675 (0, _createClass2.default)(CommandsInternal, [{
3676 key: "error",
3677 value: function error(message) {
3678 throw Error('Commands internal: ' + message);
3679 }
3680 }]);
3681 return CommandsInternal;
3682 }(_commands.default);
3683
3684 exports["default"] = CommandsInternal;
3685
3686 /***/ }),
3687
3688 /***/ "../modules/web-cli/assets/js/core/commands.js":
3689 /*!*****************************************************!*\
3690 !*** ../modules/web-cli/assets/js/core/commands.js ***!
3691 \*****************************************************/
3692 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3693
3694 "use strict";
3695
3696
3697 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
3698
3699 Object.defineProperty(exports, "__esModule", ({
3700 value: true
3701 }));
3702 exports["default"] = void 0;
3703
3704 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
3705
3706 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
3707
3708 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
3709
3710 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
3711
3712 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
3713
3714 var _commands = _interopRequireDefault(__webpack_require__(/*! ./backwards-compatibility/commands */ "../modules/web-cli/assets/js/core/backwards-compatibility/commands.js"));
3715
3716 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
3717
3718 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
3719
3720 /**
3721 * @typedef {import('../modules/component-base')} ComponentBase
3722 */
3723
3724 /**
3725 * @typedef {import('../modules/command-base')} CommandBase
3726 */
3727
3728 /**
3729 * @typedef {{}} Component
3730 */
3731 var Commands = /*#__PURE__*/function (_CommandsBackwardsCom) {
3732 (0, _inherits2.default)(Commands, _CommandsBackwardsCom);
3733
3734 var _super = _createSuper(Commands);
3735
3736 /**
3737 * Function constructor().
3738 *
3739 * Create `$e.commands` API.
3740 *
3741 * @param {{}} args
3742 */
3743 function Commands() {
3744 var _this;
3745
3746 (0, _classCallCheck2.default)(this, Commands);
3747
3748 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
3749 args[_key] = arguments[_key];
3750 }
3751
3752 _this = _super.call.apply(_super, [this].concat(args));
3753 _this.current = {};
3754 _this.currentArgs = {};
3755 _this.currentTrace = [];
3756 _this.commands = {};
3757 _this.components = {};
3758 _this.classes = {};
3759 return _this;
3760 }
3761 /**
3762 * @param {string} id
3763 * @return {CommandBase} command class
3764 */
3765
3766
3767 (0, _createClass2.default)(Commands, [{
3768 key: "getCommandClass",
3769 value: function getCommandClass(id) {
3770 return this.classes[id];
3771 }
3772 /**
3773 * Function getAll().
3774 *
3775 * Receive all loaded commands.
3776 *
3777 * @return {string[]} commands
3778 */
3779
3780 }, {
3781 key: "getAll",
3782 value: function getAll() {
3783 return Object.keys(this.commands).sort();
3784 }
3785 /**
3786 * Function register().
3787 *
3788 * Register new command.
3789 *
3790 * @param {ComponentBase|string} component
3791 * @param {string} command
3792 * @param {Function} callback
3793 *
3794 * @return {Commands} commands
3795 */
3796
3797 }, {
3798 key: "register",
3799 value: function register(component, command, callback) {
3800 var _this2 = this;
3801
3802 var namespace;
3803
3804 if ('string' === typeof component) {
3805 namespace = component;
3806 component = $e.components.get(namespace);
3807
3808 if (!component) {
3809 this.error("'".concat(namespace, "' component is not exist."));
3810 }
3811 } else {
3812 namespace = component.getNamespace();
3813 }
3814
3815 var fullCommand = namespace + (command ? '/' + command : '');
3816
3817 if (this.commands[fullCommand]) {
3818 this.error("`".concat(fullCommand, "` is already registered."));
3819 }
3820
3821 this.commands[fullCommand] = callback;
3822 this.components[fullCommand] = namespace;
3823 var shortcuts = component.getShortcuts(),
3824 shortcut = shortcuts[command];
3825
3826 if (shortcut) {
3827 shortcut.command = fullCommand;
3828
3829 shortcut.callback = function (event) {
3830 return _this2.runShortcut(fullCommand, event);
3831 };
3832
3833 $e.shortcuts.register(shortcut.keys, shortcut);
3834 }
3835
3836 return this;
3837 }
3838 }, {
3839 key: "unregister",
3840 value: function unregister(component, command) {
3841 var namespace;
3842
3843 if ('string' === typeof component) {
3844 namespace = component;
3845 component = $e.components.get(namespace);
3846
3847 if (!component) {
3848 this.error("'".concat(namespace, "' component is not exist."));
3849 }
3850 } else {
3851 namespace = component.getNamespace();
3852 }
3853
3854 var fullCommand = namespace + (command ? '/' + command : '');
3855
3856 if (!this.commands[fullCommand]) {
3857 this.error("`".concat(fullCommand, "` not exist."));
3858 }
3859
3860 delete this.commands[fullCommand];
3861 delete this.components[fullCommand];
3862 var shortcuts = component.getShortcuts(),
3863 shortcut = shortcuts[command];
3864
3865 if (shortcut) {
3866 $e.shortcuts.unregister(shortcut.keys, shortcut);
3867 }
3868
3869 return this;
3870 }
3871 /**
3872 * Function getComponent().
3873 *
3874 * Receive Component of the command.
3875 *
3876 * @param {string} command
3877 *
3878 * @return {Component} component
3879 */
3880
3881 }, {
3882 key: "getComponent",
3883 value: function getComponent(command) {
3884 var namespace = this.components[command];
3885 return $e.components.get(namespace);
3886 }
3887 /**
3888 * Function is().
3889 *
3890 * Checks if current running command is the same parameter command.
3891 *
3892 * @param {string} command
3893 *
3894 * @return {boolean} is this command the same as the one passed in the arguments
3895 */
3896
3897 }, {
3898 key: "is",
3899 value: function is(command) {
3900 var component = this.getComponent(command);
3901
3902 if (!component) {
3903 return false;
3904 }
3905
3906 return command === this.current[component.getRootContainer()];
3907 }
3908 /**
3909 * Function isCurrentFirstTrace().
3910 *
3911 * Checks if parameter command is the first command in trace that currently running.
3912 *
3913 * @param {string} command
3914 *
3915 * @return {boolean} is parameter command the first command in trace that currently running
3916 */
3917
3918 }, {
3919 key: "isCurrentFirstTrace",
3920 value: function isCurrentFirstTrace(command) {
3921 return command === this.getCurrentFirstTrace();
3922 }
3923 /**
3924 * Function getCurrent().
3925 *
3926 * Receive currently running components and its commands.
3927 *
3928 * @param {string} container
3929 *
3930 * @return {{}|boolean|*} currently running components
3931 */
3932
3933 }, {
3934 key: "getCurrent",
3935 value: function getCurrent() {
3936 var container = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
3937
3938 if (container) {
3939 if (!this.current[container]) {
3940 return false;
3941 }
3942
3943 return this.current[container];
3944 }
3945
3946 return this.current;
3947 }
3948 /**
3949 * Function getCurrentArgs().
3950 *
3951 * Receive currently running command args.
3952 *
3953 * @param {string} container
3954 *
3955 * @return {{}|boolean|*} current arguments
3956 */
3957
3958 }, {
3959 key: "getCurrentArgs",
3960 value: function getCurrentArgs() {
3961 var container = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
3962
3963 if (container) {
3964 if (!this.currentArgs[container]) {
3965 return false;
3966 }
3967
3968 return this.currentArgs[container];
3969 }
3970
3971 return this.currentArgs;
3972 }
3973 /**
3974 * Function getCurrentFirst().
3975 *
3976 * Receive first command that currently running.
3977 *
3978 * @return {string} first running command
3979 */
3980
3981 }, {
3982 key: "getCurrentFirst",
3983 value: function getCurrentFirst() {
3984 return Object.values(this.current)[0];
3985 }
3986 /**
3987 * Function getCurrentLast().
3988 *
3989 * Receive last command that currently running.
3990 *
3991 * @return {string} last running command
3992 */
3993
3994 }, {
3995 key: "getCurrentLast",
3996 value: function getCurrentLast() {
3997 var current = Object.values(this.current);
3998 return current[current.length - 1];
3999 }
4000 /**
4001 * Function getCurrentFirstTrace().
4002 *
4003 * Receive first command in trace that currently running
4004 *
4005 * @return {string} first command in trace
4006 */
4007
4008 }, {
4009 key: "getCurrentFirstTrace",
4010 value: function getCurrentFirstTrace() {
4011 return this.currentTrace[0];
4012 }
4013 /**
4014 * Function beforeRun().
4015 *
4016 * @param {string} command
4017 * @param {*} args
4018 *
4019 * @return {boolean} dependency result
4020 */
4021
4022 }, {
4023 key: "beforeRun",
4024 value: function beforeRun(command) {
4025 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4026
4027 if (!this.commands[command]) {
4028 this.error("`".concat(command, "` not found."));
4029 }
4030
4031 this.currentTrace.push(command);
4032 return this.getComponent(command).dependency(command, args);
4033 }
4034 /**
4035 * Function run().
4036 *
4037 * Runs a command.
4038 *
4039 * @param {string} command
4040 * @param {{}} args
4041 *
4042 * @return {boolean|*} results
4043 */
4044
4045 }, {
4046 key: "run",
4047 value: function run(command) {
4048 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4049
4050 if (!this.beforeRun(command, args)) {
4051 return false;
4052 }
4053
4054 var component = this.getComponent(command),
4055 container = component.getRootContainer();
4056 this.current[container] = command;
4057 this.currentArgs[container] = args;
4058 this.trigger('run:before', component, command, args);
4059
4060 if (args.onBefore) {
4061 args.onBefore.apply(component, [args]);
4062 }
4063
4064 var results = this.commands[command].apply(component, [args]); // TODO: Consider add results to `$e.devTools`.
4065
4066 if (args.onAfter) {
4067 args.onAfter.apply(component, [args, results]);
4068 }
4069
4070 this.trigger('run:after', component, command, args, results);
4071 this.afterRun(command);
4072
4073 if (false === args.returnValue) {
4074 return true;
4075 }
4076
4077 return results;
4078 }
4079 /**
4080 * Function runShortcut().
4081 *
4082 * Run shortcut.
4083 *
4084 * It's separated in order to allow override.
4085 *
4086 * @param {string} command
4087 * @param {*} event
4088 *
4089 * @return {boolean|*} result
4090 */
4091
4092 }, {
4093 key: "runShortcut",
4094 value: function runShortcut(command, event) {
4095 return this.run(command, event);
4096 }
4097 /**
4098 * Function afterRun().
4099 *
4100 * Method fired after the command runs.
4101 *
4102 * @param {string} command
4103 */
4104
4105 }, {
4106 key: "afterRun",
4107 value: function afterRun(command) {
4108 var component = this.getComponent(command),
4109 container = component.getRootContainer();
4110 this.currentTrace.pop();
4111 delete this.current[container];
4112 delete this.currentArgs[container];
4113 }
4114 /**
4115 * Function error().
4116 *
4117 * Throws error.
4118 *
4119 * @throws {Error}
4120 *
4121 * @param {string} message
4122 */
4123
4124 }, {
4125 key: "error",
4126 value: function error(message) {
4127 throw Error("Commands: ".concat(message));
4128 }
4129 }]);
4130 return Commands;
4131 }(_commands.default);
4132
4133 exports["default"] = Commands;
4134
4135 /***/ }),
4136
4137 /***/ "../modules/web-cli/assets/js/core/components.js":
4138 /*!*******************************************************!*\
4139 !*** ../modules/web-cli/assets/js/core/components.js ***!
4140 \*******************************************************/
4141 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4142
4143 "use strict";
4144
4145
4146 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
4147
4148 Object.defineProperty(exports, "__esModule", ({
4149 value: true
4150 }));
4151 exports["default"] = void 0;
4152
4153 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
4154
4155 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
4156
4157 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
4158
4159 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
4160
4161 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
4162
4163 var _module = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js"));
4164
4165 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
4166
4167 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
4168
4169 /**
4170 * @typedef {{}} Component
4171 */
4172 var _default = /*#__PURE__*/function (_Module) {
4173 (0, _inherits2.default)(_default, _Module);
4174
4175 var _super = _createSuper(_default);
4176
4177 function _default() {
4178 var _this;
4179
4180 (0, _classCallCheck2.default)(this, _default);
4181
4182 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
4183 args[_key] = arguments[_key];
4184 }
4185
4186 _this = _super.call.apply(_super, [this].concat(args));
4187 _this.components = {};
4188 _this.activeComponents = {};
4189 return _this;
4190 }
4191
4192 (0, _createClass2.default)(_default, [{
4193 key: "getAll",
4194 value: function getAll() {
4195 return Object.keys(this.components).sort();
4196 }
4197 }, {
4198 key: "register",
4199 value: function register(component) {
4200 if (this.components[component.getNamespace()]) {
4201 return;
4202 }
4203
4204 component.registerAPI();
4205 this.components[component.getNamespace()] = component;
4206 return component;
4207 }
4208 /**
4209 * @param {string} id
4210 * @return {Component} component
4211 */
4212
4213 }, {
4214 key: "get",
4215 value: function get(id) {
4216 return this.components[id];
4217 }
4218 }, {
4219 key: "getActive",
4220 value: function getActive() {
4221 return this.activeComponents;
4222 }
4223 }, {
4224 key: "activate",
4225 value: function activate(namespace) {
4226 // Add as last.
4227 this.inactivate(namespace);
4228 this.activeComponents[namespace] = true;
4229 }
4230 }, {
4231 key: "inactivate",
4232 value: function inactivate(namespace) {
4233 delete this.activeComponents[namespace];
4234 }
4235 }, {
4236 key: "isActive",
4237 value: function isActive(namespace) {
4238 return !!this.activeComponents[namespace];
4239 }
4240 }]);
4241 return _default;
4242 }(_module.default);
4243
4244 exports["default"] = _default;
4245
4246 /***/ }),
4247
4248 /***/ "../modules/web-cli/assets/js/core/data.js":
4249 /*!*************************************************!*\
4250 !*** ../modules/web-cli/assets/js/core/data.js ***!
4251 \*************************************************/
4252 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4253
4254 "use strict";
4255
4256
4257 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
4258
4259 Object.defineProperty(exports, "__esModule", ({
4260 value: true
4261 }));
4262 exports["default"] = exports.READABLE = exports.EDITABLE = exports.DELETABLE = exports.CREATABLE = exports.ALLMETHODS = void 0;
4263
4264 var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
4265
4266 var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
4267
4268 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
4269
4270 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
4271
4272 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
4273
4274 var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
4275
4276 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
4277
4278 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
4279
4280 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
4281
4282 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
4283
4284 var _argsObject = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js"));
4285
4286 var _commands = _interopRequireDefault(__webpack_require__(/*! ./commands.js */ "../modules/web-cli/assets/js/core/commands.js"));
4287
4288 var _cache = _interopRequireDefault(__webpack_require__(/*! ./data/cache */ "../modules/web-cli/assets/js/core/data/cache.js"));
4289
4290 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
4291
4292 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
4293
4294 /**
4295 * @typedef {('create'|'delete'|'get'|'update'|'options')} DataTypes
4296 */
4297
4298 /**
4299 * @typedef {import('../modules/component-base')} ComponentBase
4300 */
4301
4302 /**
4303 * @typedef {{}} RequestInfo
4304 */
4305
4306 /**
4307 * @typedef {{}} RequestData
4308 * @property {ComponentBase} component component
4309 * @property {string} command command
4310 * @property {{}} args arguments
4311 * @property {DataTypes} type type
4312 * @property {number} timestamp timestamp
4313 * @property {string} endpoint endpoint
4314 *
4315 * @property {string} [baseEndpointURL] baseEndpointURL
4316 * @property {string} [namespace] namespace
4317 * @property {string} [version] version
4318 * @property {('hit'|'miss')} [cache] cache
4319 */
4320
4321 /**
4322 * @typedef {Object} ExtractedCommand
4323 * @property {string} command command
4324 * @property {Object} args arguments
4325 */
4326 // TODO: Return it from the server. Original at WP_REST_Server.
4327 var READABLE = ['GET'],
4328 CREATABLE = ['POST'],
4329 EDITABLE = ['POST', 'PUT', 'PATCH'],
4330 DELETABLE = ['DELETE'],
4331 ALLMETHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'];
4332 exports.ALLMETHODS = ALLMETHODS;
4333 exports.DELETABLE = DELETABLE;
4334 exports.EDITABLE = EDITABLE;
4335 exports.CREATABLE = CREATABLE;
4336 exports.READABLE = READABLE;
4337
4338 var Data = /*#__PURE__*/function (_Commands) {
4339 (0, _inherits2.default)(Data, _Commands);
4340
4341 var _super = _createSuper(Data);
4342
4343 function Data() {
4344 var _this;
4345
4346 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
4347 (0, _classCallCheck2.default)(this, Data);
4348 _this = _super.call(this, args);
4349 _this.args = Object.assign(args, {
4350 namespace: 'elementor',
4351 version: '1',
4352 baseEndpointURL: elementorWebCliConfig.urls.rest
4353 });
4354 _this.cache = new _cache.default((0, _assertThisInitialized2.default)(_this));
4355 _this.validatedRequests = {};
4356 _this.commandFormats = {};
4357 return _this;
4358 }
4359 /**
4360 * Function getHTTPMethod().
4361 *
4362 * Returns HTTP Method by type.
4363 *
4364 * @param {DataTypes} type
4365 *
4366 * @return {string|boolean} HTTP Method
4367 */
4368
4369
4370 (0, _createClass2.default)(Data, [{
4371 key: "getHTTPMethod",
4372 value: function getHTTPMethod(type) {
4373 switch (type) {
4374 case 'create':
4375 return 'POST';
4376
4377 case 'delete':
4378 return 'DELETE';
4379
4380 case 'get':
4381 return 'GET';
4382
4383 case 'update':
4384 return 'PUT';
4385
4386 case 'options':
4387 return 'OPTIONS';
4388 }
4389
4390 return false;
4391 }
4392 /**
4393 * Function getAllowedMethods().
4394 *
4395 * Returns allowed HTTP methods by type.
4396 *
4397 * @param {DataTypes} type
4398 *
4399 * @return {[string]|boolean} allowed HTTP methods
4400 */
4401
4402 }, {
4403 key: "getAllowedMethods",
4404 value: function getAllowedMethods(type) {
4405 switch (type) {
4406 case 'create':
4407 return CREATABLE;
4408
4409 case 'delete':
4410 return DELETABLE;
4411
4412 case 'get':
4413 return READABLE;
4414
4415 case 'update':
4416 return EDITABLE;
4417
4418 case 'options':
4419 return ['OPTIONS'];
4420 }
4421
4422 return false;
4423 }
4424 /**
4425 * Function getEndpointURL().
4426 *
4427 * Get remote endpoint address.
4428 *
4429 * @param {RequestData} requestData
4430 * @param {string} [endpoint=requestData.endpoint]
4431 *
4432 * @return {string} endpoint address
4433 */
4434
4435 }, {
4436 key: "getEndpointURL",
4437 value: function getEndpointURL(requestData) {
4438 var endpoint = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : requestData.endpoint;
4439 // Allow to request data override default namespace and args.
4440 var _requestData$baseEndp = requestData.baseEndpointURL,
4441 baseEndpointURL = _requestData$baseEndp === void 0 ? this.args.baseEndpointURL : _requestData$baseEndp,
4442 _requestData$namespac = requestData.namespace,
4443 namespace = _requestData$namespac === void 0 ? this.args.namespace : _requestData$namespac,
4444 _requestData$version = requestData.version,
4445 version = _requestData$version === void 0 ? this.args.version : _requestData$version;
4446 return "".concat(baseEndpointURL).concat(namespace, "/v").concat(version, "/") + endpoint;
4447 }
4448 /**
4449 * Function commandToEndpoint().
4450 *
4451 * Convert command to endpoint.
4452 *
4453 * For example `component/command/{arg}` => `controller/endpoint/8`.
4454 *
4455 * TODO: Find a better solution.
4456 *
4457 * @param {string} command
4458 * @param {{}} args
4459 * @param {string|null} [format]
4460 *
4461 * @return {string} endpoint
4462 */
4463
4464 }, {
4465 key: "commandToEndpoint",
4466 value: function commandToEndpoint(command, args) {
4467 var format = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
4468 var endpoint = command;
4469 var argsQueryLength = args !== null && args !== void 0 && args.query ? Object.values(args.query).length : 0;
4470
4471 if (argsQueryLength && format && format.includes('/{')) {
4472 // Means command includes magic query arguments ( controller/endpoint/{whatever} ).
4473 var magicParams = format.split('/').filter(function (str) {
4474 return '{' === str.charAt(0);
4475 });
4476 magicParams.forEach(function (param) {
4477 // Remove the '{', '}'.
4478 param = param.replace('{', '');
4479 param = param.replace('}', '');
4480 var formatted = Object.entries(args.query).find(function (_ref) {
4481 var _ref2 = (0, _slicedToArray2.default)(_ref, 1),
4482 key = _ref2[0];
4483
4484 return key === param;
4485 });
4486
4487 if (!formatted) {
4488 return;
4489 }
4490
4491 var key = formatted[0],
4492 value = formatted[1].toString(); // Replace magic params with values.
4493
4494 format = format.replace(new RegExp('{' + param + '}', 'g'), value);
4495 delete args.query[key];
4496 });
4497 }
4498
4499 if (format) {
4500 endpoint = format;
4501 } // If requested magic param does not exist in args, need to remove it to have fixed endpoint.
4502 // eg: 'documents/{documentId}/elements/{elementId}' and args { documentId: 4123 }.
4503 // result: 'documents/4123/elements'
4504
4505
4506 if (format && endpoint.includes('/{')) {
4507 endpoint = endpoint.substring(0, endpoint.indexOf('/{'));
4508 }
4509
4510 if (args.query && Object.values(args.query).length) {
4511 // Sorting since the endpoint later will be used as key to store the cache.
4512 var queryEntries = Object.entries(args.query).sort(function (_ref3, _ref4) {
4513 var _ref5 = (0, _slicedToArray2.default)(_ref3, 1),
4514 aKey = _ref5[0];
4515
4516 var _ref6 = (0, _slicedToArray2.default)(_ref4, 1),
4517 bKey = _ref6[0];
4518
4519 return aKey - bKey;
4520 } // Sort by param name.
4521 ); // `args.query` will become a part of GET params.
4522
4523 if (queryEntries.length) {
4524 endpoint += '?';
4525 queryEntries.forEach(function (_ref7) {
4526 var _ref8 = (0, _slicedToArray2.default)(_ref7, 2),
4527 name = _ref8[0],
4528 value = _ref8[1];
4529
4530 // Replace the character '/' with the encoded version,
4531 // mostly because when saving this endpoint value to the cache it splits the url base on the '/' character.
4532 value = "".concat(value).replace(/\//g, '%2F');
4533 endpoint += name + '=' + value + '&';
4534 });
4535 } // If last character is '&' remove it.
4536
4537
4538 endpoint = endpoint.replace(/&$/, '');
4539 }
4540
4541 return endpoint;
4542 }
4543 /**
4544 * Function commandExtractArgs().
4545 *
4546 * If the command have query convert it to args.
4547 *
4548 * @param {string} command
4549 * @param {Object} args
4550 *
4551 * @return {ExtractedCommand} command
4552 */
4553
4554 }, {
4555 key: "commandExtractArgs",
4556 value: function commandExtractArgs(command) {
4557 var _command;
4558
4559 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4560
4561 if ((_command = command) !== null && _command !== void 0 && _command.includes('?')) {
4562 if (!args.query) {
4563 args.query = {};
4564 }
4565
4566 var commandParts = command.split('?'),
4567 pureCommand = commandParts[0],
4568 queryString = commandParts[1],
4569 query = new URLSearchParams(queryString);
4570 Object.assign(args.query, Object.fromEntries(query));
4571 command = pureCommand;
4572 }
4573
4574 return {
4575 command: command,
4576 args: args
4577 };
4578 }
4579 /**
4580 * Function validateRequestData().
4581 *
4582 * Validate request data requirements.
4583 *
4584 * @param {RequestData} requestData
4585 * @param {boolean} [requireArgsData]
4586 */
4587
4588 }, {
4589 key: "validateRequestData",
4590 value: function validateRequestData(requestData) {
4591 var requireArgsData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
4592
4593 // Do not validate if its already valid.
4594 if (requestData.timestamp && this.validatedRequests[requestData.timestamp]) {
4595 return;
4596 }
4597
4598 var argsObject = new _argsObject.default(requestData);
4599 argsObject.requireArgument('component');
4600 argsObject.requireArgumentType('command', 'string');
4601 argsObject.requireArgumentType('endpoint', 'string');
4602
4603 if (requireArgsData) {
4604 argsObject.requireArgumentType('data', 'object', requestData.args);
4605 } // Ensure timestamp.
4606
4607
4608 if (!requestData.timestamp) {
4609 requestData.timestamp = new Date().getTime();
4610 }
4611
4612 this.validatedRequests[requestData.timestamp] = true;
4613 }
4614 /**
4615 * Function prepareHeaders().
4616 *
4617 * Prepare the headers for each request.
4618 *
4619 * @param {RequestData} requestData
4620 *
4621 * @return {{}} params
4622 */
4623
4624 }, {
4625 key: "prepareHeaders",
4626 value: function prepareHeaders(requestData) {
4627 var _requestData$args, _requestData$args$opt;
4628
4629 var type = requestData.type,
4630 nonce = elementorWebCliConfig.nonce,
4631 params = {
4632 signal: (_requestData$args = requestData.args) === null || _requestData$args === void 0 ? void 0 : (_requestData$args$opt = _requestData$args.options) === null || _requestData$args$opt === void 0 ? void 0 : _requestData$args$opt.signal,
4633 credentials: 'include' // cookies is required for wp reset.
4634
4635 },
4636 headers = {
4637 'X-WP-Nonce': nonce
4638 };
4639 /**
4640 * Translate:
4641 * 'create, delete, get, update' to HTTP Methods:
4642 * 'GET, POST, PUT, PATCH, DELETE'
4643 */
4644
4645 var allowedMethods = this.getAllowedMethods(type),
4646 method = this.getHTTPMethod(type);
4647
4648 if ('GET' === method) {
4649 Object.assign(params, {
4650 headers: headers
4651 });
4652 } else if (allowedMethods) {
4653 var _requestData$args2, _requestData$args3;
4654
4655 if (['POST', 'PUT'].includes(method) && !((_requestData$args2 = requestData.args) !== null && _requestData$args2 !== void 0 && _requestData$args2.data)) {
4656 throw Error('Invalid requestData.args.data');
4657 }
4658
4659 Object.assign(headers, {
4660 'Content-Type': 'application/json'
4661 });
4662
4663 if ((_requestData$args3 = requestData.args) !== null && _requestData$args3 !== void 0 && _requestData$args3.headers) {
4664 Object.assign(headers, requestData.args.headers);
4665 }
4666
4667 Object.assign(params, {
4668 method: method,
4669 headers: headers,
4670 body: 'application/json' === headers['Content-Type'] ? JSON.stringify(requestData.args.data) : requestData.args.data
4671 });
4672 } else {
4673 throw Error("Invalid type: '".concat(type, "'"));
4674 }
4675
4676 return params;
4677 }
4678 /**
4679 * Function prepareEndpoint().
4680 *
4681 * This method response for building a final endpoint,
4682 * the main problem is with plain permalink mode + command with query params that creates a weird url,
4683 * the current method should fix it.
4684 *
4685 * @param {RequestData} requestData
4686 *
4687 * @return {string} Endpoint URL
4688 */
4689
4690 }, {
4691 key: "prepareEndpoint",
4692 value: function prepareEndpoint(requestData) {
4693 var splitEndpoint = requestData.endpoint.split('?'),
4694 endpoint = splitEndpoint.shift();
4695 var endpointAddress = this.getEndpointURL(requestData, endpoint);
4696
4697 if (splitEndpoint.length) {
4698 var separator = endpointAddress.includes('?') ? '&' : '?';
4699 endpointAddress += separator + splitEndpoint.pop();
4700 }
4701
4702 return endpointAddress;
4703 }
4704 /**
4705 * Function fetch().
4706 *
4707 * @param {RequestData} requestData
4708 * @param {function(RequestInfo,*) : Promise<Response> } [fetchAPI]
4709 *
4710 * @return {Promise<Response>} response
4711 */
4712
4713 }, {
4714 key: "fetch",
4715 value: function fetch(requestData) {
4716 var _requestData$args$opt2,
4717 _this2 = this;
4718
4719 var fetchAPI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.fetch;
4720 requestData.cache = 'miss';
4721 var refresh = (_requestData$args$opt2 = requestData.args.options) === null || _requestData$args$opt2 === void 0 ? void 0 : _requestData$args$opt2.refresh,
4722 getCache = 'get' === requestData.type && !refresh,
4723 saveCache = ['create', 'get'].includes(requestData.type) && !refresh;
4724
4725 if (getCache) {
4726 var cachePromise = this.cache.getAsync(requestData);
4727
4728 if (cachePromise) {
4729 return cachePromise;
4730 }
4731 }
4732
4733 var params = this.prepareHeaders(requestData);
4734 return new Promise( /*#__PURE__*/function () {
4735 var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(resolve, reject) {
4736 var endpoint, request, response;
4737 return _regenerator.default.wrap(function _callee2$(_context2) {
4738 while (1) {
4739 switch (_context2.prev = _context2.next) {
4740 case 0:
4741 _context2.prev = 0;
4742 endpoint = _this2.prepareEndpoint(requestData);
4743 request = fetchAPI(endpoint, params);
4744 _context2.next = 5;
4745 return request.then( /*#__PURE__*/function () {
4746 var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_response) {
4747 return _regenerator.default.wrap(function _callee$(_context) {
4748 while (1) {
4749 switch (_context.prev = _context.next) {
4750 case 0:
4751 if (_response.ok) {
4752 _context.next = 6;
4753 break;
4754 }
4755
4756 if (!_response.headers.get('content-type').includes('application/json')) {
4757 _context.next = 5;
4758 break;
4759 }
4760
4761 _context.next = 4;
4762 return _response.json();
4763
4764 case 4:
4765 _response = _context.sent;
4766
4767 case 5:
4768 throw _response;
4769
4770 case 6:
4771 return _context.abrupt("return", _response.json());
4772
4773 case 7:
4774 case "end":
4775 return _context.stop();
4776 }
4777 }
4778 }, _callee);
4779 }));
4780
4781 return function (_x3) {
4782 return _ref10.apply(this, arguments);
4783 };
4784 }());
4785
4786 case 5:
4787 response = _context2.sent;
4788
4789 // At this point, it got the resolved response from remote.
4790 // So load cache, and resolve it.
4791 if (saveCache) {
4792 _this2.cache.set(requestData, response);
4793 }
4794
4795 resolve(response);
4796 _context2.next = 13;
4797 break;
4798
4799 case 10:
4800 _context2.prev = 10;
4801 _context2.t0 = _context2["catch"](0);
4802 reject(_context2.t0);
4803
4804 case 13:
4805 case "end":
4806 return _context2.stop();
4807 }
4808 }
4809 }, _callee2, null, [[0, 10]]);
4810 }));
4811
4812 return function (_x, _x2) {
4813 return _ref9.apply(this, arguments);
4814 };
4815 }());
4816 }
4817 /**
4818 * Function getCache().
4819 *
4820 * @param {ComponentBase} component
4821 * @param {string} command
4822 * @param {{}} query
4823 *
4824 * @return {{}} cache object
4825 */
4826
4827 }, {
4828 key: "getCache",
4829 value: function getCache(component, command) {
4830 var query = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
4831 var args = {
4832 query: query
4833 };
4834 return this.cache.get({
4835 endpoint: this.commandToEndpoint(command, args, this.commandFormats[command]),
4836 component: component,
4837 command: command,
4838 args: args
4839 });
4840 }
4841 /**
4842 * Function setCache().
4843 *
4844 * @param {ComponentBase} component
4845 * @param {string} command
4846 * @param {{}} query
4847 * @param {*} data
4848 */
4849
4850 }, {
4851 key: "setCache",
4852 value: function setCache(component, command, query, data) {
4853 var args = {
4854 query: query
4855 };
4856 this.cache.set({
4857 endpoint: this.commandToEndpoint(command, args, this.commandFormats[command]),
4858 component: component,
4859 command: command,
4860 args: args
4861 }, data);
4862 }
4863 /**
4864 * Function updateCache().
4865 *
4866 * The difference between 'setCache' and 'updateCache' is update will only modify exist values.
4867 * and 'setCache' will create or update.
4868 *
4869 * @param {ComponentBase} component
4870 * @param {string} command
4871 * @param {{}} query
4872 * @param {*} data
4873 */
4874
4875 }, {
4876 key: "updateCache",
4877 value: function updateCache(component, command, query, data) {
4878 var args = {
4879 query: query,
4880 data: data
4881 };
4882 this.cache.update({
4883 endpoint: this.commandToEndpoint(command, args, this.commandFormats[command]),
4884 component: component,
4885 command: command,
4886 args: args
4887 });
4888 }
4889 /**
4890 * Function deleteCache().
4891 *
4892 * @param {ComponentBase} component
4893 * @param {string} command
4894 * @param {{}} query
4895 */
4896
4897 }, {
4898 key: "deleteCache",
4899 value: function deleteCache(component, command) {
4900 var query = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
4901 var args = {
4902 query: query
4903 };
4904 this.cache.delete({
4905 endpoint: this.commandToEndpoint(command, args, this.commandFormats[command]),
4906 component: component,
4907 command: command,
4908 args: args
4909 });
4910 }
4911 /**
4912 * Function registerFormat().
4913 *
4914 * Register's format for each command.
4915 *
4916 * @param {string} command
4917 * @param {string} format
4918 */
4919
4920 }, {
4921 key: "registerFormat",
4922 value: function registerFormat(command, format) {
4923 this.commandFormats[command] = format;
4924 }
4925 /**
4926 * Function create().
4927 *
4928 * Run a command, that will be translated as endpoint for creating new data.
4929 *
4930 * @param {string} command
4931 * @param {*} data
4932 * @param {{}} query
4933 * @param {{}} options
4934 *
4935 * @return {*} result
4936 */
4937
4938 }, {
4939 key: "create",
4940 value: function create(command, data) {
4941 var query = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
4942 var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
4943 return this.run('create', command, {
4944 query: query,
4945 options: options,
4946 data: data
4947 });
4948 }
4949 /**
4950 * Function delete().
4951 *
4952 * Run a command, that will be translated as endpoint for deleting data.
4953 *
4954 * @param {string} command
4955 * @param {{}} query
4956 * @param {{}} options
4957 *
4958 * @return {*} result
4959 */
4960
4961 }, {
4962 key: "delete",
4963 value: function _delete(command) {
4964 var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4965 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
4966 return this.run('delete', command, {
4967 query: query,
4968 options: options
4969 });
4970 }
4971 /**
4972 * Function get().
4973 *
4974 * Run a command, that will be translated as endpoint for getting data.
4975 *
4976 * @param {string} command
4977 * @param {{}} query
4978 * @param {{}} options
4979 *
4980 * @return {*} result
4981 */
4982
4983 }, {
4984 key: "get",
4985 value: function get(command) {
4986 var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4987 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
4988 return this.run('get', command, {
4989 query: query,
4990 options: options
4991 });
4992 }
4993 /**
4994 * Function update().
4995 *
4996 * Run a command, that will be translated as endpoint for updating data.
4997 *
4998 * @param {string} command
4999 * @param {*} data
5000 * @param {{}} query
5001 * @param {{}} options
5002 *
5003 * @return {*} result
5004 */
5005
5006 }, {
5007 key: "update",
5008 value: function update(command, data) {
5009 var query = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
5010 var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
5011 return this.run('update', command, {
5012 query: query,
5013 options: options,
5014 data: data
5015 });
5016 }
5017 /**
5018 * Function options().
5019 *
5020 * Run a command, that will be translated as endpoint for requesting options/information about specific endpoint.
5021 *
5022 * @param {string} command
5023 * @param {{}} query
5024 * @param {{}} options
5025 *
5026 * @return {*} result
5027 */
5028
5029 }, {
5030 key: "options",
5031 value: function options(command, query) {
5032 var _options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
5033
5034 return this.run('options', command, {
5035 query: query,
5036 options: _options
5037 });
5038 }
5039 }, {
5040 key: "register",
5041 value: function register(component, command, callback) {
5042 (0, _get2.default)((0, _getPrototypeOf2.default)(Data.prototype), "register", this).call(this, component, command, callback);
5043 var fullCommandName = component.getNamespace() + '/' + command,
5044 commandInstance = $e.commands.getCommandClass(fullCommandName),
5045 format = commandInstance !== null && commandInstance !== void 0 && commandInstance.getEndpointFormat ? commandInstance.getEndpointFormat() : false;
5046
5047 if (format) {
5048 $e.data.registerFormat(fullCommandName, format);
5049 }
5050
5051 return this;
5052 }
5053 /**
5054 * TODO: Add JSDOC typedef for args ( query and options ).
5055 *
5056 * @param {DataTypes} type
5057 * @param {string} command
5058 * @param {{}} args
5059 *
5060 * @override
5061 */
5062
5063 }, {
5064 key: "run",
5065 value: function run(type, command, args) {
5066 args.options.type = type;
5067
5068 var _this$commandExtractA = this.commandExtractArgs(command, args);
5069
5070 command = _this$commandExtractA.command;
5071 args = _this$commandExtractA.args;
5072 return (0, _get2.default)((0, _getPrototypeOf2.default)(Data.prototype), "run", this).call(this, command, args);
5073 }
5074 }, {
5075 key: "error",
5076 value: function error(message) {
5077 throw Error('Data commands: ' + message);
5078 }
5079 }]);
5080 return Data;
5081 }(_commands.default);
5082
5083 exports["default"] = Data;
5084
5085 /***/ }),
5086
5087 /***/ "../modules/web-cli/assets/js/core/data/cache.js":
5088 /*!*******************************************************!*\
5089 !*** ../modules/web-cli/assets/js/core/data/cache.js ***!
5090 \*******************************************************/
5091 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5092
5093 "use strict";
5094
5095
5096 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5097
5098 Object.defineProperty(exports, "__esModule", ({
5099 value: true
5100 }));
5101 exports["default"] = void 0;
5102
5103 var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
5104
5105 var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
5106
5107 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
5108
5109 var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
5110
5111 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
5112
5113 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
5114
5115 var _localStorage = _interopRequireDefault(__webpack_require__(/*! ./storages/local-storage */ "../modules/web-cli/assets/js/core/data/storages/local-storage.js"));
5116
5117 /**
5118 * @typedef {{}} RequestData
5119 */
5120
5121 /**
5122 * @typedef {import('../data')} Data
5123 */
5124
5125 /**
5126 * TODO: Search common logic, create functions to reduce code size.
5127 */
5128 var Cache = /*#__PURE__*/function () {
5129 /**
5130 * Function constructor().
5131 *
5132 * Create cache.
5133 *
5134 * @param {Data} manager
5135 */
5136 function Cache(manager) {
5137 (0, _classCallCheck2.default)(this, Cache);
5138 this.manager = manager;
5139 this.storage = new _localStorage.default();
5140 }
5141 /**
5142 * Function getAsync().
5143 *
5144 * Receive from cache. the difference between getAsync() and get() is that receive return it as promise...
5145 * to fake fetch mechanism.
5146 *
5147 * @param {RequestData} requestData
5148 *
5149 * @return {(Promise|boolean)} request data
5150 */
5151
5152
5153 (0, _createClass2.default)(Cache, [{
5154 key: "getAsync",
5155 value: function getAsync(requestData) {
5156 var data = this.get(requestData);
5157
5158 if (null !== data) {
5159 // If data comes from cache, add 'cache = hit' to requestData.
5160 requestData.cache = 'hit';
5161 return new Promise( /*#__PURE__*/function () {
5162 var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(resolve) {
5163 return _regenerator.default.wrap(function _callee$(_context) {
5164 while (1) {
5165 switch (_context.prev = _context.next) {
5166 case 0:
5167 resolve(data);
5168
5169 case 1:
5170 case "end":
5171 return _context.stop();
5172 }
5173 }
5174 }, _callee);
5175 }));
5176
5177 return function (_x) {
5178 return _ref.apply(this, arguments);
5179 };
5180 }());
5181 } // TODO: Check if possible, always return promise and reject it.
5182
5183
5184 return false;
5185 }
5186 /**
5187 * Function set().
5188 *
5189 * set data to cache.
5190 *
5191 * The difference between set() and update() is that set, will modify the data anyway...
5192 * when update() will only modify exist objects/values.
5193 *
5194 * @param {RequestData} requestData
5195 * @param {*} data
5196 */
5197
5198 }, {
5199 key: "set",
5200 value: function set(requestData, data) {
5201 $e.data.validateRequestData(requestData);
5202 var componentName = requestData.component.getNamespace(),
5203 pureEndpoint = requestData.endpoint.replace(componentName + '/', ''),
5204 pureEndpointParts = pureEndpoint.split('/');
5205 var newData = {}; // Example of working with reaming endpoint part(s) can be found at 'cache.spec.js' test: 'load(): deep'.
5206 // Analyze reaming endpoint.
5207
5208 if (pureEndpointParts.length && pureEndpoint !== componentName) {
5209 // Using reaming endpoint parts, to build new data object.
5210 var result = pureEndpointParts.reduce(function (accumulator, pureEndpointPart) {
5211 accumulator[pureEndpointPart] = {};
5212 return accumulator[pureEndpointPart];
5213 }, newData); // 'result' is equal to 'newData' with a deeper pointer, build based on 'pureEndpointParts' ( will effect newData ).
5214
5215 Object.assign(result, data);
5216 } else {
5217 newData = data;
5218 }
5219
5220 var oldData = this.storage.getItem(componentName); // When have old data, merge it recursively with newData using jQuery.extend().
5221
5222 if (oldData !== null) {
5223 newData = jQuery.extend(true, oldData, newData);
5224 }
5225
5226 this.storage.setItem(componentName, newData);
5227 }
5228 /**
5229 * Function get().
5230 *
5231 * Get from exist storage.
5232 *
5233 * @param {RequestData} requestData
5234 *
5235 * @return {{}} data
5236 */
5237
5238 }, {
5239 key: "get",
5240 value: function get(requestData) {
5241 $e.data.validateRequestData(requestData);
5242 var componentName = requestData.component.getNamespace(),
5243 componentData = this.storage.getItem(componentName);
5244
5245 if (componentData !== null) {
5246 if (componentName === requestData.endpoint) {
5247 return componentData;
5248 } // Example of working with reaming endpoint part(s) can be found at 'cache.spec.js' test: 'get(): complex'.
5249 // Analyze reaming endpoint (Using reduce over endpoint parts, build the right index).
5250
5251
5252 var pureEndpoint = requestData.endpoint.replace(requestData.component.getNamespace() + '/', ''),
5253 pureEndpointParts = pureEndpoint.split('/'),
5254 // eslint-disable-next-line array-callback-return
5255 result = pureEndpointParts.reduce(function (accumulator, endpointPart) {
5256 if (accumulator && accumulator[endpointPart]) {
5257 return accumulator[endpointPart];
5258 }
5259 }, componentData); // Since $e.data.cache.receive will reject only if null is the result.
5260
5261 return result || null;
5262 }
5263
5264 return null;
5265 }
5266 /**
5267 * Function update().
5268 *
5269 * Update only already exist storage, runs over all storage
5270 *
5271 * @param {RequestData} requestData
5272 *
5273 * @return {boolean} is updated
5274 */
5275
5276 }, {
5277 key: "update",
5278 value: function update(requestData) {
5279 $e.data.validateRequestData(requestData, true);
5280 var endpoint = requestData.endpoint;
5281 var response = {}; // Simulate response from cache.
5282
5283 Object.entries(this.storage.getAll()).forEach(function (_ref2) {
5284 var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
5285 endpointKey = _ref3[0],
5286
5287 /*string*/
5288 endpointValue = _ref3[1];
5289
5290 if (endpointValue && endpoint.includes(endpointKey)) {
5291 // Assuming it is a specific endpoint.
5292 var oldData = endpointValue,
5293 pureEndpoint = requestData.endpoint.replace(requestData.component.getNamespace() + '/', ''),
5294 pureEndpointParts = pureEndpoint.split('/'),
5295 isComponentUpdate = 1 === pureEndpointParts.length && endpointKey === requestData.endpoint && endpointKey === requestData.component.getNamespace(); // Component update or specific update?
5296
5297 if (isComponentUpdate) {
5298 response = jQuery.extend(true, oldData, requestData.args.data);
5299 } else {
5300 var oldSpecificData = pureEndpointParts.reduce(function (accumulator, pureEndpointPart) {
5301 return accumulator[pureEndpointPart];
5302 }, oldData);
5303 response = jQuery.extend(true, oldSpecificData, requestData.args.data);
5304 }
5305 }
5306 }); // If response not found.
5307
5308 if (0 === Object.values(response).length) {
5309 return false;
5310 } // Update cache.
5311
5312
5313 this.set(requestData, response);
5314 return true;
5315 }
5316 /**
5317 * Function delete().
5318 *
5319 * Delete endpoint from storage.
5320 *
5321 * @param {RequestData} requestData
5322 *
5323 * @return {boolean} is deleted
5324 */
5325
5326 }, {
5327 key: "delete",
5328 value: function _delete(requestData) {
5329 $e.data.validateRequestData(requestData);
5330 var result = false;
5331 var componentName = requestData.component.getNamespace();
5332
5333 if (componentName !== requestData.endpoint) {
5334 var oldData = this.storage.getItem(componentName),
5335 newData = {};
5336
5337 if (null === oldData) {
5338 return false;
5339 }
5340
5341 var pureEndpoint = requestData.endpoint.replace(componentName + '/', ''),
5342 pureEndpointParts = pureEndpoint.split('/'),
5343 lastEndpointPart = pureEndpointParts[pureEndpointParts.length - 1];
5344 pureEndpointParts.reduce(function (accumulator, pureEndpointPart) {
5345 if (pureEndpointPart === lastEndpointPart) {
5346 // Null, means delete.
5347 accumulator[pureEndpointPart] = null;
5348 } else {
5349 accumulator[pureEndpointPart] = {};
5350 }
5351
5352 return accumulator[pureEndpointPart];
5353 }, newData);
5354
5355 if (Object.keys(oldData).length) {
5356 var deleteKeys = function deleteKeys(target, nullsObject) {
5357 if (nullsObject) {
5358 Object.keys(nullsObject).forEach(function (key) {
5359 if (nullsObject[key] && 'object' === (0, _typeof2.default)(nullsObject[key])) {
5360 deleteKeys(target[key], nullsObject[key]);
5361 } else if (null === nullsObject[key]) {
5362 delete target[key];
5363 result = true;
5364 }
5365 });
5366 } else {
5367 // Means need to clear all the object.
5368 Object.keys(target).forEach(function (key) {
5369 return delete target[key];
5370 });
5371 }
5372
5373 return target;
5374 };
5375
5376 this.storage.setItem(componentName, deleteKeys(oldData, newData));
5377 }
5378 } else {
5379 for (var key in this.storage.getAll()) {
5380 if (key === requestData.endpoint) {
5381 this.storage.removeItem(requestData.endpoint);
5382 result = true;
5383 break;
5384 }
5385 }
5386 }
5387
5388 return result;
5389 }
5390 }]);
5391 return Cache;
5392 }();
5393
5394 exports["default"] = Cache;
5395
5396 /***/ }),
5397
5398 /***/ "../modules/web-cli/assets/js/core/data/errors/base-error.js":
5399 /*!*******************************************************************!*\
5400 !*** ../modules/web-cli/assets/js/core/data/errors/base-error.js ***!
5401 \*******************************************************************/
5402 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5403
5404 "use strict";
5405
5406
5407 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5408
5409 Object.defineProperty(exports, "__esModule", ({
5410 value: true
5411 }));
5412 exports["default"] = void 0;
5413
5414 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
5415
5416 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
5417
5418 var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
5419
5420 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
5421
5422 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
5423
5424 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
5425
5426 var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js"));
5427
5428 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
5429
5430 var _helpers = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/helpers */ "../modules/web-cli/assets/js/utils/helpers.js"));
5431
5432 var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../../../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js"));
5433
5434 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5435
5436 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5437
5438 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
5439
5440 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5441
5442 var BaseError = /*#__PURE__*/function (_Error) {
5443 (0, _inherits2.default)(BaseError, _Error);
5444
5445 var _super = _createSuper(BaseError);
5446
5447 /**
5448 * Error constructor.
5449 *
5450 * @param {string} message
5451 * @param {string} code
5452 * @param {*} data
5453 */
5454 function BaseError() {
5455 var _this;
5456
5457 var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
5458 var code = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
5459 var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
5460 (0, _classCallCheck2.default)(this, BaseError);
5461 _this = _super.call(this, message);
5462 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "code", '');
5463 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "data", []);
5464 _this.code = code;
5465 _this.data = data;
5466 return _this;
5467 }
5468 /**
5469 * Notify a message when the error occurs.
5470 */
5471
5472
5473 (0, _createClass2.default)(BaseError, [{
5474 key: "notify",
5475 value: function notify() {
5476 _helpers.default.consoleError(_objectSpread({
5477 message: this.message
5478 }, this));
5479 }
5480 }], [{
5481 key: "create",
5482 value:
5483 /**
5484 * The server error code.
5485 *
5486 * @type {string}
5487 */
5488
5489 /**
5490 * Additional data about the current error.
5491 *
5492 * @type {*[]}
5493 */
5494
5495 /**
5496 * Static helper function to create the error.
5497 *
5498 * @param {string} message
5499 * @param {string} code
5500 * @param {*} data
5501 * @return {BaseError} error
5502 */
5503 function create(message) {
5504 var code = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
5505 var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
5506 return new this(message, code, data);
5507 }
5508 /**
5509 * Returns the status code of the error.
5510 */
5511
5512 }, {
5513 key: "getHTTPErrorCode",
5514 value: function getHTTPErrorCode() {
5515 (0, _forceMethodImplementation.default)();
5516 }
5517 }]);
5518 return BaseError;
5519 }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
5520
5521 exports["default"] = BaseError;
5522
5523 /***/ }),
5524
5525 /***/ "../modules/web-cli/assets/js/core/data/errors/default-error.js":
5526 /*!**********************************************************************!*\
5527 !*** ../modules/web-cli/assets/js/core/data/errors/default-error.js ***!
5528 \**********************************************************************/
5529 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5530
5531 "use strict";
5532
5533
5534 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5535
5536 Object.defineProperty(exports, "__esModule", ({
5537 value: true
5538 }));
5539 exports["default"] = exports.DefaultError = void 0;
5540
5541 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
5542
5543 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
5544
5545 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
5546
5547 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
5548
5549 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
5550
5551 var _baseError = _interopRequireDefault(__webpack_require__(/*! ./base-error */ "../modules/web-cli/assets/js/core/data/errors/base-error.js"));
5552
5553 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
5554
5555 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5556
5557 var DefaultError = /*#__PURE__*/function (_BaseError) {
5558 (0, _inherits2.default)(DefaultError, _BaseError);
5559
5560 var _super = _createSuper(DefaultError);
5561
5562 function DefaultError() {
5563 (0, _classCallCheck2.default)(this, DefaultError);
5564 return _super.apply(this, arguments);
5565 }
5566
5567 (0, _createClass2.default)(DefaultError, null, [{
5568 key: "getHTTPErrorCode",
5569 value: function getHTTPErrorCode() {
5570 return 501;
5571 }
5572 }]);
5573 return DefaultError;
5574 }(_baseError.default);
5575
5576 exports.DefaultError = DefaultError;
5577 var _default = DefaultError;
5578 exports["default"] = _default;
5579
5580 /***/ }),
5581
5582 /***/ "../modules/web-cli/assets/js/core/data/errors/error-404.js":
5583 /*!******************************************************************!*\
5584 !*** ../modules/web-cli/assets/js/core/data/errors/error-404.js ***!
5585 \******************************************************************/
5586 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5587
5588 "use strict";
5589
5590
5591 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5592
5593 Object.defineProperty(exports, "__esModule", ({
5594 value: true
5595 }));
5596 exports["default"] = exports.Error404 = void 0;
5597
5598 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
5599
5600 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
5601
5602 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
5603
5604 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
5605
5606 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
5607
5608 var _baseError = _interopRequireDefault(__webpack_require__(/*! ./base-error */ "../modules/web-cli/assets/js/core/data/errors/base-error.js"));
5609
5610 var _helpers = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/helpers */ "../modules/web-cli/assets/js/utils/helpers.js"));
5611
5612 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
5613
5614 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5615
5616 var Error404 = /*#__PURE__*/function (_BaseError) {
5617 (0, _inherits2.default)(Error404, _BaseError);
5618
5619 var _super = _createSuper(Error404);
5620
5621 function Error404() {
5622 (0, _classCallCheck2.default)(this, Error404);
5623 return _super.apply(this, arguments);
5624 }
5625
5626 (0, _createClass2.default)(Error404, [{
5627 key: "notify",
5628 value: function notify() {
5629 _helpers.default.consoleWarn(this.message);
5630 }
5631 }], [{
5632 key: "getHTTPErrorCode",
5633 value: function getHTTPErrorCode() {
5634 return 404;
5635 }
5636 }]);
5637 return Error404;
5638 }(_baseError.default);
5639
5640 exports.Error404 = Error404;
5641 var _default = Error404;
5642 exports["default"] = _default;
5643
5644 /***/ }),
5645
5646 /***/ "../modules/web-cli/assets/js/core/data/errors/index.js":
5647 /*!**************************************************************!*\
5648 !*** ../modules/web-cli/assets/js/core/data/errors/index.js ***!
5649 \**************************************************************/
5650 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5651
5652 "use strict";
5653
5654
5655 Object.defineProperty(exports, "__esModule", ({
5656 value: true
5657 }));
5658 Object.defineProperty(exports, "DefaultError", ({
5659 enumerable: true,
5660 get: function get() {
5661 return _defaultError.DefaultError;
5662 }
5663 }));
5664 Object.defineProperty(exports, "Error404", ({
5665 enumerable: true,
5666 get: function get() {
5667 return _error.Error404;
5668 }
5669 }));
5670
5671 var _defaultError = __webpack_require__(/*! ./default-error */ "../modules/web-cli/assets/js/core/data/errors/default-error.js");
5672
5673 var _error = __webpack_require__(/*! ./error-404 */ "../modules/web-cli/assets/js/core/data/errors/error-404.js");
5674
5675 /***/ }),
5676
5677 /***/ "../modules/web-cli/assets/js/core/data/storages/base-prefix-storage.js":
5678 /*!******************************************************************************!*\
5679 !*** ../modules/web-cli/assets/js/core/data/storages/base-prefix-storage.js ***!
5680 \******************************************************************************/
5681 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5682
5683 "use strict";
5684
5685
5686 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5687
5688 Object.defineProperty(exports, "__esModule", ({
5689 value: true
5690 }));
5691 exports["default"] = void 0;
5692
5693 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
5694
5695 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
5696
5697 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
5698
5699 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
5700
5701 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
5702
5703 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
5704
5705 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
5706
5707 var _baseStorage = _interopRequireDefault(__webpack_require__(/*! elementor-api/core/data/storages/base-storage */ "../modules/web-cli/assets/js/core/data/storages/base-storage.js"));
5708
5709 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
5710
5711 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5712
5713 var BasePrefixStorage = /*#__PURE__*/function (_BaseStorage) {
5714 (0, _inherits2.default)(BasePrefixStorage, _BaseStorage);
5715
5716 var _super = _createSuper(BasePrefixStorage);
5717
5718 function BasePrefixStorage() {
5719 (0, _classCallCheck2.default)(this, BasePrefixStorage);
5720 return _super.apply(this, arguments);
5721 }
5722
5723 (0, _createClass2.default)(BasePrefixStorage, [{
5724 key: "clear",
5725 value: function clear() {
5726 var _this = this;
5727
5728 Object.keys(this.getAll()).forEach(function (key) {
5729 return _this.removeItem(key);
5730 });
5731 }
5732 }, {
5733 key: "getItem",
5734 value: function getItem(key) {
5735 return (0, _get2.default)((0, _getPrototypeOf2.default)(BasePrefixStorage.prototype), "getItem", this).call(this, BasePrefixStorage.DEFAULT_KEY_PREFIX + key);
5736 }
5737 }, {
5738 key: "removeItem",
5739 value: function removeItem(key) {
5740 return (0, _get2.default)((0, _getPrototypeOf2.default)(BasePrefixStorage.prototype), "removeItem", this).call(this, BasePrefixStorage.DEFAULT_KEY_PREFIX + key);
5741 }
5742 }, {
5743 key: "setItem",
5744 value: function setItem(key, value) {
5745 return (0, _get2.default)((0, _getPrototypeOf2.default)(BasePrefixStorage.prototype), "setItem", this).call(this, BasePrefixStorage.DEFAULT_KEY_PREFIX + key, value);
5746 }
5747 }, {
5748 key: "getAll",
5749 value: function getAll() {
5750 var _this2 = this;
5751
5752 var DEFAULT_KEY_PREFIX = BasePrefixStorage.DEFAULT_KEY_PREFIX,
5753 keys = Object.keys(this.provider),
5754 result = {};
5755 keys.forEach(function (key) {
5756 if (key.startsWith(DEFAULT_KEY_PREFIX)) {
5757 key = key.replace(DEFAULT_KEY_PREFIX, '');
5758 result[key] = _this2.getItem(key);
5759 }
5760 });
5761 return result;
5762 }
5763 }]);
5764 return BasePrefixStorage;
5765 }(_baseStorage.default);
5766
5767 exports["default"] = BasePrefixStorage;
5768 (0, _defineProperty2.default)(BasePrefixStorage, "DEFAULT_KEY_PREFIX", 'e_');
5769
5770 /***/ }),
5771
5772 /***/ "../modules/web-cli/assets/js/core/data/storages/base-storage.js":
5773 /*!***********************************************************************!*\
5774 !*** ../modules/web-cli/assets/js/core/data/storages/base-storage.js ***!
5775 \***********************************************************************/
5776 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5777
5778 "use strict";
5779
5780
5781 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5782
5783 Object.defineProperty(exports, "__esModule", ({
5784 value: true
5785 }));
5786 exports["default"] = void 0;
5787
5788 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
5789
5790 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
5791
5792 /**
5793 * TODO: Merge all storage's to one.
5794 * Using this technique give's the ability to use JSDOC from 'window.storage'.
5795 *
5796 * @implements {Storage}
5797 */
5798 var BaseStorage = /*#__PURE__*/function () {
5799 /**
5800 * Create storage wrapper.
5801 *
5802 * @param {Storage} provider
5803 */
5804 function BaseStorage(provider) {
5805 (0, _classCallCheck2.default)(this, BaseStorage);
5806
5807 if (BaseStorage === (this instanceof BaseStorage ? this.constructor : void 0)) {
5808 throw new TypeError('Cannot construct BaseStorage instances directly');
5809 }
5810
5811 this.provider = provider;
5812 }
5813
5814 (0, _createClass2.default)(BaseStorage, [{
5815 key: "clear",
5816 value: function clear() {
5817 return this.provider.clear();
5818 }
5819 }, {
5820 key: "getItem",
5821 value: function getItem(key) {
5822 var result = this.provider.getItem(key);
5823
5824 if (null !== result) {
5825 return JSON.parse(result);
5826 }
5827
5828 return result;
5829 }
5830 }, {
5831 key: "key",
5832 value: function key(index) {
5833 return this.provider.key(index);
5834 }
5835 }, {
5836 key: "removeItem",
5837 value: function removeItem(key) {
5838 return this.provider.removeItem(key);
5839 }
5840 }, {
5841 key: "setItem",
5842 value: function setItem(key, value) {
5843 return this.provider.setItem(key, JSON.stringify(value));
5844 }
5845 }, {
5846 key: "getAll",
5847 value: function getAll() {
5848 var _this = this;
5849
5850 var keys = Object.keys(this.provider),
5851 result = {};
5852 keys.forEach(function (key) {
5853 result[key] = _this.getItem(key);
5854 });
5855 return result;
5856 }
5857 }]);
5858 return BaseStorage;
5859 }();
5860
5861 exports["default"] = BaseStorage;
5862
5863 /***/ }),
5864
5865 /***/ "../modules/web-cli/assets/js/core/data/storages/local-storage.js":
5866 /*!************************************************************************!*\
5867 !*** ../modules/web-cli/assets/js/core/data/storages/local-storage.js ***!
5868 \************************************************************************/
5869 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5870
5871 "use strict";
5872
5873
5874 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5875
5876 Object.defineProperty(exports, "__esModule", ({
5877 value: true
5878 }));
5879 exports["default"] = void 0;
5880
5881 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
5882
5883 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
5884
5885 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
5886
5887 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
5888
5889 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
5890
5891 var _basePrefixStorage = _interopRequireDefault(__webpack_require__(/*! ./base-prefix-storage */ "../modules/web-cli/assets/js/core/data/storages/base-prefix-storage.js"));
5892
5893 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
5894
5895 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5896
5897 var LocalStorage = /*#__PURE__*/function (_BasePrefixStorage) {
5898 (0, _inherits2.default)(LocalStorage, _BasePrefixStorage);
5899
5900 var _super = _createSuper(LocalStorage);
5901
5902 function LocalStorage() {
5903 (0, _classCallCheck2.default)(this, LocalStorage);
5904 return _super.call(this, localStorage);
5905 }
5906
5907 (0, _createClass2.default)(LocalStorage, [{
5908 key: "debug",
5909 value: function debug() {
5910 var entries = this.getAll(),
5911 ordered = {};
5912 Object.keys(entries).sort().forEach(function (key) {
5913 var value = entries[key];
5914 ordered[key] = value;
5915 });
5916 return ordered;
5917 }
5918 }]);
5919 return LocalStorage;
5920 }(_basePrefixStorage.default);
5921
5922 exports["default"] = LocalStorage;
5923
5924 /***/ }),
5925
5926 /***/ "../modules/web-cli/assets/js/core/hooks.js":
5927 /*!**************************************************!*\
5928 !*** ../modules/web-cli/assets/js/core/hooks.js ***!
5929 \**************************************************/
5930 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5931
5932 "use strict";
5933
5934
5935 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
5936
5937 Object.defineProperty(exports, "__esModule", ({
5938 value: true
5939 }));
5940 exports["default"] = void 0;
5941
5942 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
5943
5944 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
5945
5946 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
5947
5948 var _data = _interopRequireDefault(__webpack_require__(/*! ./hooks/data.js */ "../modules/web-cli/assets/js/core/hooks/data.js"));
5949
5950 var _ui = _interopRequireDefault(__webpack_require__(/*! ./hooks/ui.js */ "../modules/web-cli/assets/js/core/hooks/ui.js"));
5951
5952 /**
5953 * @typedef {import('../modules/hook-base')} HookBase
5954 */
5955 var Hooks = /*#__PURE__*/function () {
5956 function Hooks() {
5957 (0, _classCallCheck2.default)(this, Hooks);
5958 (0, _defineProperty2.default)(this, "data", new _data.default());
5959 (0, _defineProperty2.default)(this, "ui", new _ui.default());
5960 }
5961
5962 (0, _createClass2.default)(Hooks, [{
5963 key: "activate",
5964 value:
5965 /**
5966 * Function activate().
5967 *
5968 * Activate all hooks.
5969 */
5970 function activate() {
5971 this.getTypes().forEach(function (hooksType) {
5972 hooksType.activate();
5973 });
5974 }
5975 /**
5976 * Function deactivate().
5977 *
5978 * Deactivate all hooks.
5979 */
5980
5981 }, {
5982 key: "deactivate",
5983 value: function deactivate() {
5984 this.getTypes().forEach(function (hooksType) {
5985 hooksType.deactivate();
5986 });
5987 }
5988 }, {
5989 key: "getAll",
5990 value: function getAll() {
5991 var flat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
5992 var result = {};
5993 this.getTypes().forEach(function (hooksType) {
5994 result[hooksType.getType()] = hooksType.getAll(flat);
5995 });
5996 return result;
5997 }
5998 }, {
5999 key: "getTypes",
6000 value: function getTypes() {
6001 return [this.data, this.ui];
6002 }
6003 }, {
6004 key: "getType",
6005 value: function getType(type) {
6006 return this.getTypes().find(function (hooks) {
6007 return type === hooks.getType();
6008 });
6009 }
6010 /**
6011 * Function register().
6012 *
6013 * Register hook.
6014 *
6015 * @param {string} type
6016 * @param {string} event
6017 * @param {HookBase} instance
6018 *
6019 * @return {{}} Created callback
6020 */
6021
6022 }, {
6023 key: "register",
6024 value: function register(type, event, instance) {
6025 return this.getType(type).register(event, instance);
6026 }
6027 /**
6028 * Function run().
6029 *
6030 * Run's a hook.
6031 *
6032 * @param {string} type
6033 * @param {string} event
6034 * @param {string} command
6035 * @param {{}} args
6036 * @param {*} result
6037 *
6038 * @return {boolean} result
6039 */
6040
6041 }, {
6042 key: "run",
6043 value: function run(type, event, command, args) {
6044 var result = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : undefined;
6045 return this.getType(type).run(event, command, args, result);
6046 }
6047 /**
6048 * Function registerDataAfter().
6049 *
6050 * Register data hook that's run after the command.
6051 *
6052 * @param {HookBase} instance
6053 *
6054 * @return {{}} callback
6055 */
6056
6057 }, {
6058 key: "registerDataAfter",
6059 value: function registerDataAfter(instance) {
6060 return this.register('data', 'after', instance);
6061 }
6062 /**
6063 * Function registerDataCatch().
6064 *
6065 * Register data hook that's run when the command fails.
6066 *
6067 * @param {HookBase} instance
6068 *
6069 * @return {{}} callback
6070 */
6071
6072 }, {
6073 key: "registerDataCatch",
6074 value: function registerDataCatch(instance) {
6075 return this.register('data', 'catch', instance);
6076 }
6077 /**
6078 * Function registerDataDependency().
6079 *
6080 * Register data hook that's run before the command as dependency.
6081 *
6082 * @param {HookBase} instance
6083 *
6084 * @return {{}} callback
6085 */
6086
6087 }, {
6088 key: "registerDataDependency",
6089 value: function registerDataDependency(instance) {
6090 return this.register('data', 'dependency', instance);
6091 }
6092 /**
6093 * Function registerUIAfter().
6094 *
6095 * Register UI hook that's run after the commands run.
6096 *
6097 * @param {HookBase} instance
6098 *
6099 * @return {{}} callback
6100 */
6101
6102 }, {
6103 key: "registerUIAfter",
6104 value: function registerUIAfter(instance) {
6105 return this.register('ui', 'after', instance);
6106 }
6107 /**
6108 * Function registerUICatch().
6109 *
6110 * Register UI hook that's run when the command fails.
6111 *
6112 * @param {HookBase} instance
6113 *
6114 * @return {{}} callback
6115 */
6116
6117 }, {
6118 key: "registerUICatch",
6119 value: function registerUICatch(instance) {
6120 return this.register('ui', 'catch', instance);
6121 }
6122 /**
6123 * Function registerUIBefore().
6124 *
6125 * Register UI hook that's run before the command.
6126 *
6127 * @param {HookBase} instance
6128 *
6129 * @return {{}} callback
6130 */
6131
6132 }, {
6133 key: "registerUIBefore",
6134 value: function registerUIBefore(instance) {
6135 return this.register('ui', 'before', instance);
6136 }
6137 /**
6138 * Function runDataAfter().
6139 *
6140 * Run data hook that's run after the command.
6141 *
6142 * @param {string} command
6143 * @param {{}} args
6144 * @param {*} result
6145 *
6146 * @return {boolean} result
6147 */
6148
6149 }, {
6150 key: "runDataAfter",
6151 value: function runDataAfter(command, args, result) {
6152 return this.run('data', 'after', command, args, result);
6153 }
6154 /**
6155 * Function runDataCatch().
6156 *
6157 * Run data hook that's run when the command fails.
6158 *
6159 * @param {string} command
6160 * @param {{}} args
6161 * @param {*} error
6162 *
6163 * @return {boolean} result
6164 */
6165
6166 }, {
6167 key: "runDataCatch",
6168 value: function runDataCatch(command, args, error) {
6169 return this.run('data', 'catch', command, args, error);
6170 }
6171 /**
6172 * Function runDataDependency().
6173 *
6174 * Run data hook that's run before the command as dependency.
6175 *
6176 * @param {string} command
6177 * @param {{}} args
6178 *
6179 * @return {boolean} result
6180 */
6181
6182 }, {
6183 key: "runDataDependency",
6184 value: function runDataDependency(command, args) {
6185 return this.run('data', 'dependency', command, args);
6186 }
6187 /**
6188 * Function runUIAfter().
6189 *
6190 * Run UI hook that's run after the commands run.
6191 *
6192 * @param {string} command
6193 * @param {{}} args
6194 * @param {*} result
6195 *
6196 * @return {boolean} result
6197 */
6198
6199 }, {
6200 key: "runUIAfter",
6201 value: function runUIAfter(command, args, result) {
6202 return this.run('ui', 'after', command, args, result);
6203 }
6204 /**
6205 * Function runUICatch().
6206 *
6207 * Run UI hook that's run when the command fails.
6208 *
6209 * @param {string} command
6210 * @param {{}} args
6211 * @param {*} e
6212 *
6213 * @return {boolean} result
6214 */
6215
6216 }, {
6217 key: "runUICatch",
6218 value: function runUICatch(command, args, e) {
6219 return this.run('ui', 'catch', command, args, e);
6220 }
6221 /**
6222 * Function runUIBefore().
6223 *
6224 * Run UI hook that's run before the command.
6225 *
6226 * @param {string} command
6227 * @param {{}} args
6228 *
6229 * @return {boolean} result
6230 */
6231
6232 }, {
6233 key: "runUIBefore",
6234 value: function runUIBefore(command, args) {
6235 return this.run('ui', 'before', command, args);
6236 }
6237 }]);
6238 return Hooks;
6239 }();
6240
6241 exports["default"] = Hooks;
6242
6243 /***/ }),
6244
6245 /***/ "../modules/web-cli/assets/js/core/hooks/base.js":
6246 /*!*******************************************************!*\
6247 !*** ../modules/web-cli/assets/js/core/hooks/base.js ***!
6248 \*******************************************************/
6249 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6250
6251 "use strict";
6252
6253
6254 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6255
6256 Object.defineProperty(exports, "__esModule", ({
6257 value: true
6258 }));
6259 exports["default"] = void 0;
6260
6261 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
6262
6263 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
6264
6265 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
6266
6267 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
6268
6269 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
6270
6271 var _helpers = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/helpers */ "../modules/web-cli/assets/js/utils/helpers.js"));
6272
6273 var _module = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js"));
6274
6275 var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js"));
6276
6277 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
6278
6279 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6280
6281 /**
6282 * @typedef {import('../../modules/hook-base')} HookBase
6283 */
6284 var HooksBase = /*#__PURE__*/function (_Module) {
6285 (0, _inherits2.default)(HooksBase, _Module);
6286
6287 var _super = _createSuper(HooksBase);
6288
6289 /**
6290 * Function constructor().
6291 *
6292 * Create hooks base.
6293 *
6294 * @param {{}} args
6295 */
6296 function HooksBase() {
6297 var _this;
6298
6299 (0, _classCallCheck2.default)(this, HooksBase);
6300
6301 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
6302 args[_key] = arguments[_key];
6303 }
6304
6305 _this = _super.call.apply(_super, [this].concat(args));
6306 /**
6307 * Current command.
6308 *
6309 * @type {string}
6310 */
6311
6312 _this.current = '';
6313 /**
6314 * Array of ids which in use.
6315 *
6316 * @type {Array}
6317 */
6318
6319 _this.usedIds = [];
6320 /**
6321 * Object of callbacks that was bound by container type.
6322 *
6323 * @type {{}}
6324 */
6325
6326 _this.callbacks = {
6327 after: {},
6328 catch: {}
6329 };
6330 /**
6331 * Object of depth.
6332 *
6333 * @type {{}}
6334 */
6335
6336 _this.depth = {
6337 after: {},
6338 catch: {}
6339 };
6340 _this.callbacksFlatList = {};
6341 return _this;
6342 }
6343
6344 (0, _createClass2.default)(HooksBase, [{
6345 key: "activate",
6346 value: function activate() {
6347 Object.values(this.getAll(true)).forEach(function (callback) {
6348 callback.activate();
6349 });
6350 }
6351 }, {
6352 key: "deactivate",
6353 value: function deactivate() {
6354 Object.values(this.getAll(true)).forEach(function (callback) {
6355 callback.deactivate();
6356 });
6357 } // eslint-disable-next-line jsdoc/require-returns-check
6358
6359 /**
6360 * Function getType().
6361 *
6362 * Returns type eg: ( event, hook, etc ... ).
6363 *
6364 * @return {string} type
6365 */
6366
6367 }, {
6368 key: "getType",
6369 value: function getType() {
6370 (0, _forceMethodImplementation.default)();
6371 }
6372 }, {
6373 key: "get",
6374 value: function get(id) {
6375 return this.callbacksFlatList[id];
6376 }
6377 /**
6378 * Function getAll().
6379 *
6380 * Return all possible callbacks.
6381 *
6382 * @param {boolean} flat
6383 *
6384 * @return {{}} all callbacks
6385 */
6386
6387 }, {
6388 key: "getAll",
6389 value: function getAll() {
6390 var _this2 = this;
6391
6392 var flat = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
6393
6394 if (flat) {
6395 return this.callbacksFlatList;
6396 }
6397
6398 var result = {};
6399 Object.keys(this.callbacks).forEach(function (event) {
6400 if (!result[event]) {
6401 result[event] = [];
6402 }
6403
6404 Object.keys(_this2.callbacks[event]).forEach(function (command) {
6405 result[event].push({
6406 command: command,
6407 callbacks: _this2.callbacks[event][command]
6408 });
6409 });
6410 });
6411 return result;
6412 }
6413 /**
6414 * Function getCurrent();
6415 *
6416 * Return current command.
6417 *
6418 * @return {string} current command
6419 */
6420
6421 }, {
6422 key: "getCurrent",
6423 value: function getCurrent() {
6424 return this.current;
6425 }
6426 /**
6427 * Function getUsedIds().
6428 *
6429 * Returns the current used ids.
6430 *
6431 * @return {Array} used IDs
6432 */
6433
6434 }, {
6435 key: "getUsedIds",
6436 value: function getUsedIds() {
6437 return this.usedIds;
6438 }
6439 /**
6440 * Function getCallbacks().
6441 *
6442 * Get available callbacks for specific event and command.
6443 *
6444 * @param {string} event
6445 * @param {string} command
6446 * @param {*} args
6447 * @return {(Array | boolean)} callbacks
6448 */
6449
6450 }, {
6451 key: "getCallbacks",
6452 value: function getCallbacks(event, command, args) {
6453 var _args$containers = args.containers,
6454 containers = _args$containers === void 0 ? [args.container] : _args$containers,
6455 containerType = containers[0] ? containers[0].type : false;
6456 var callbacks = [];
6457
6458 if (this.callbacks[event] && this.callbacks[event][command]) {
6459 if (containerType && this.callbacks[event][command][containerType]) {
6460 callbacks = callbacks.concat(this.callbacks[event][command][containerType]);
6461 }
6462
6463 if (this.callbacks[event][command].all) {
6464 callbacks = callbacks.concat(this.callbacks[event][command].all);
6465 }
6466 }
6467
6468 if (callbacks.length) {
6469 return callbacks;
6470 }
6471
6472 return false;
6473 }
6474 /**
6475 * function checkEvent().
6476 *
6477 * Validate if the event is available.
6478 *
6479 * @param {string} event
6480 */
6481
6482 }, {
6483 key: "checkEvent",
6484 value: function checkEvent(event) {
6485 if (-1 === Object.keys(this.callbacks).indexOf(event)) {
6486 throw Error("".concat(this.getType(), ": '").concat(event, "' is not available."));
6487 }
6488 }
6489 /**
6490 * Function checkInstance().
6491 *
6492 * Validate given instance.
6493 *
6494 * @param {HookBase} instance
6495 */
6496
6497 }, {
6498 key: "checkInstance",
6499 value: function checkInstance(instance) {
6500 if (instance.getType() !== this.getType()) {
6501 throw new Error("invalid instance, please use: 'elementor-api/modules/hook-base.js'. ");
6502 }
6503 }
6504 /**
6505 * Function checkId().
6506 *
6507 * Validate if the id is not used before.
6508 *
6509 * @param {string} id
6510 */
6511
6512 }, {
6513 key: "checkId",
6514 value: function checkId(id) {
6515 if (-1 !== this.usedIds.indexOf(id)) {
6516 throw Error("id: '".concat(id, "' is already in use."));
6517 }
6518 }
6519 /**
6520 * Function shouldRun().
6521 *
6522 * Determine if the event should run.
6523 *
6524 * @param {Array} callbacks
6525 *
6526 * @return {boolean} true if there are callbacks, otherwise false
6527 *
6528 * @throws {Error}
6529 */
6530
6531 }, {
6532 key: "shouldRun",
6533 value: function shouldRun(callbacks) {
6534 return !!callbacks && callbacks.length;
6535 }
6536 /**
6537 * Function register().
6538 *
6539 * Register the callback instance.
6540 *
6541 * @param {string} event
6542 * @param {HookBase} instance
6543 *
6544 * @return {{}} Created callback
6545 */
6546
6547 }, {
6548 key: "register",
6549 value: function register(event, instance) {
6550 var command = instance.getCommand(),
6551 id = instance.getId(),
6552 containerType = instance.getContainerType();
6553 this.checkEvent(event);
6554 this.checkInstance(instance);
6555 this.checkId(id);
6556 return this.registerCallback(id, event, command, instance, containerType);
6557 }
6558 /**
6559 * Function registerCallback().
6560 *
6561 * Register callback.
6562 *
6563 * @param {string} id
6564 * @param {string} event
6565 * @param {string} command
6566 * @param {HookBase} instance
6567 * @param {string} containerType
6568 *
6569 * TODO: Consider replace with typedef.
6570 * @return {{callback: *, id: *, isActive: boolean}} callback
6571 */
6572
6573 }, {
6574 key: "registerCallback",
6575 value: function registerCallback(id, event, command, instance, containerType) {
6576 if (!this.callbacks[event][command]) {
6577 this.callbacks[event][command] = [];
6578 } // Save used id(s).
6579
6580
6581 this.usedIds.push(id);
6582
6583 if (!this.callbacks[event][command]) {
6584 this.callbacks[event][command] = {};
6585 } // TODO: Create HookCallback class/type.
6586
6587
6588 var callback = {
6589 id: id,
6590 callback: instance.run.bind(instance),
6591 isActive: true,
6592 activate: function activate() {
6593 this.isActive = true;
6594 },
6595 deactivate: function deactivate() {
6596 this.isActive = false;
6597 }
6598 };
6599
6600 if (containerType) {
6601 if (!this.callbacks[event][command][containerType]) {
6602 this.callbacks[event][command][containerType] = [];
6603 }
6604
6605 this.callbacks[event][command][containerType].push(callback);
6606 } else {
6607 if (!this.callbacks[event][command].all) {
6608 this.callbacks[event][command].all = [];
6609 }
6610
6611 this.callbacks[event][command].all.push(callback);
6612 }
6613
6614 this.callbacksFlatList[callback.id] = callback;
6615 return callback;
6616 }
6617 /**
6618 * Function run().
6619 *
6620 * Run the callbacks.
6621 *
6622 * @param {string} event
6623 * @param {string} command
6624 * @param {{}} args
6625 * @param {*} result
6626 *
6627 * @return {*} results
6628 */
6629
6630 }, {
6631 key: "run",
6632 value: function run(event, command, args) {
6633 var result = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined;
6634 var callbacks = this.getCallbacks(event, command, args);
6635
6636 if (this.shouldRun(callbacks)) {
6637 this.current = command;
6638 this.onRun(command, args, event);
6639 return this.runCallbacks(event, command, callbacks, args, result);
6640 }
6641
6642 return false;
6643 }
6644 /**
6645 * Function runCallbacks().
6646 *
6647 * Run's the given callbacks.
6648 *
6649 * @param {string} event
6650 * @param {string} command
6651 * @param {Array} callbacks
6652 * @param {{}} args
6653 * @param {[]} result
6654 */
6655
6656 }, {
6657 key: "runCallbacks",
6658 value: function runCallbacks(event, command, callbacks, args, result) {
6659 var callbacksResult = [];
6660
6661 for (var i in callbacks) {
6662 var callback = callbacks[i];
6663
6664 if (!callback.isActive) {
6665 continue;
6666 } // If not exist, set zero.
6667
6668
6669 if (undefined === this.depth[event][callback.id]) {
6670 this.depth[event][callback.id] = 0;
6671 }
6672
6673 this.depth[event][callback.id]++; // Prevent recursive hooks.
6674
6675 if (1 === this.depth[event][callback.id]) {
6676 this.onCallback(command, args, event, callback.id);
6677
6678 try {
6679 var callbackResult = this.runCallback(event, callback, args, result);
6680
6681 if (!callbackResult) {
6682 throw Error("Callback failed, event: '".concat(event, "'"));
6683 }
6684
6685 callbacksResult.push(callbackResult);
6686 } catch (e) {
6687 // If its 'Hook-Break' then parent `try {}` will handle it.
6688 if (e instanceof $e.modules.HookBreak) {
6689 throw e;
6690 }
6691
6692 _helpers.default.consoleError(e);
6693 }
6694 }
6695
6696 this.depth[event][callback.id]--;
6697 }
6698
6699 return callbacksResult;
6700 } // eslint-disable-next-line jsdoc/require-returns-check
6701
6702 /**
6703 * Function runCallback().
6704 *
6705 * Run's the given callback.
6706 *
6707 * @param {string} event
6708 * @param {{}} callback
6709 * @param {{}} args
6710 * @param {*} result
6711 *
6712 * @return {*} results
6713 *
6714 * @throws {Error}
6715 */
6716
6717 }, {
6718 key: "runCallback",
6719 value: function runCallback(event, callback, args, result) {
6720 // eslint-disable-line no-unused-vars
6721 (0, _forceMethodImplementation.default)();
6722 }
6723 /**
6724 * Function onRun().
6725 *
6726 * Called before run a set of callbacks.
6727 *
6728 * @param {string} command
6729 * @param {{}} args
6730 * @param {string} event
6731 *
6732 * @throws {Error}
6733 */
6734
6735 }, {
6736 key: "onRun",
6737 value: function onRun(command, args, event) {
6738 // eslint-disable-line no-unused-vars
6739 (0, _forceMethodImplementation.default)();
6740 }
6741 /**
6742 * Function onCallback().
6743 *
6744 * Called before a single callback.
6745 *
6746 * @param {string} command
6747 * @param {{}} args
6748 * @param {string} event
6749 * @param {string} id
6750 *
6751 * @throws {Error}
6752 */
6753
6754 }, {
6755 key: "onCallback",
6756 value: function onCallback(command, args, event, id) {
6757 // eslint-disable-line no-unused-vars
6758 (0, _forceMethodImplementation.default)();
6759 }
6760 }]);
6761 return HooksBase;
6762 }(_module.default);
6763
6764 exports["default"] = HooksBase;
6765
6766 /***/ }),
6767
6768 /***/ "../modules/web-cli/assets/js/core/hooks/data.js":
6769 /*!*******************************************************!*\
6770 !*** ../modules/web-cli/assets/js/core/hooks/data.js ***!
6771 \*******************************************************/
6772 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6773
6774 "use strict";
6775
6776
6777 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6778
6779 Object.defineProperty(exports, "__esModule", ({
6780 value: true
6781 }));
6782 exports["default"] = void 0;
6783
6784 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
6785
6786 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
6787
6788 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
6789
6790 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
6791
6792 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
6793
6794 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
6795
6796 var _base = _interopRequireDefault(__webpack_require__(/*! ./base.js */ "../modules/web-cli/assets/js/core/hooks/base.js"));
6797
6798 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
6799
6800 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6801
6802 var Data = /*#__PURE__*/function (_HooksBase) {
6803 (0, _inherits2.default)(Data, _HooksBase);
6804
6805 var _super = _createSuper(Data);
6806
6807 function Data() {
6808 var _this;
6809
6810 (0, _classCallCheck2.default)(this, Data);
6811
6812 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
6813 args[_key] = arguments[_key];
6814 }
6815
6816 _this = _super.call.apply(_super, [this].concat(args));
6817 _this.callbacks.dependency = {};
6818 _this.depth.dependency = {};
6819 return _this;
6820 }
6821
6822 (0, _createClass2.default)(Data, [{
6823 key: "getType",
6824 value: function getType() {
6825 return 'data';
6826 }
6827 }, {
6828 key: "runCallback",
6829 value: function runCallback(event, callback, args, result) {
6830 switch (event) {
6831 case 'dependency':
6832 {
6833 // If callback returns false and its dependency, then 'Hook-Break'.
6834 if (!callback.callback(args)) {
6835 this.depth[event][callback.id]--; // Throw custom break to be catch by the base for 'Safe' exit.
6836
6837 throw new $e.modules.HookBreak();
6838 }
6839
6840 return true;
6841 }
6842
6843 case 'catch':
6844 case 'after':
6845 {
6846 /**
6847 * When handling HOOK which is data after (not breakable),
6848 * even the result of the callback is negative, it is required to return positive,
6849 * since result of runCallback determine if the callback succeeded.
6850 */
6851 return callback.callback(args, result) || 'after' === event;
6852 }
6853 }
6854
6855 return false;
6856 }
6857 }, {
6858 key: "shouldRun",
6859 value: function shouldRun(callbacks) {
6860 return (0, _get2.default)((0, _getPrototypeOf2.default)(Data.prototype), "shouldRun", this).call(this, callbacks) && elementor.documents.getCurrent().history.getActive();
6861 }
6862 }, {
6863 key: "onRun",
6864 value: function onRun(command, args, event) {
6865 if (!$e.devTools) {
6866 return;
6867 }
6868
6869 $e.devTools.log.callbacks().run(this.getType(), command, args, event);
6870 }
6871 }, {
6872 key: "onCallback",
6873 value: function onCallback(command, args, event, id) {
6874 if (!$e.devTools) {
6875 return;
6876 }
6877
6878 $e.devTools.log.callbacks().callback(this.getType(), command, args, event, id);
6879 }
6880 }]);
6881 return Data;
6882 }(_base.default);
6883
6884 exports["default"] = Data;
6885
6886 /***/ }),
6887
6888 /***/ "../modules/web-cli/assets/js/core/hooks/ui.js":
6889 /*!*****************************************************!*\
6890 !*** ../modules/web-cli/assets/js/core/hooks/ui.js ***!
6891 \*****************************************************/
6892 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6893
6894 "use strict";
6895
6896
6897 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
6898
6899 Object.defineProperty(exports, "__esModule", ({
6900 value: true
6901 }));
6902 exports["default"] = void 0;
6903
6904 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
6905
6906 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
6907
6908 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
6909
6910 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
6911
6912 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
6913
6914 var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/core/hooks/base.js"));
6915
6916 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
6917
6918 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6919
6920 var Ui = /*#__PURE__*/function (_HooksBase) {
6921 (0, _inherits2.default)(Ui, _HooksBase);
6922
6923 var _super = _createSuper(Ui);
6924
6925 function Ui() {
6926 var _this;
6927
6928 (0, _classCallCheck2.default)(this, Ui);
6929
6930 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
6931 args[_key] = arguments[_key];
6932 }
6933
6934 _this = _super.call.apply(_super, [this].concat(args));
6935 _this.callbacks.before = {};
6936 _this.depth.before = {};
6937 return _this;
6938 }
6939
6940 (0, _createClass2.default)(Ui, [{
6941 key: "getType",
6942 value: function getType() {
6943 return 'ui';
6944 }
6945 }, {
6946 key: "runCallback",
6947 value: function runCallback(event, callback, args, result) {
6948 switch (event) {
6949 case 'before':
6950 callback.callback(args);
6951 break;
6952
6953 case 'catch':
6954 case 'after':
6955 callback.callback(args, result);
6956 break;
6957
6958 default:
6959 return false;
6960 }
6961
6962 return true;
6963 }
6964 }, {
6965 key: "onRun",
6966 value: function onRun(command, args, event) {
6967 if (!$e.devTools) {
6968 return;
6969 }
6970
6971 $e.devTools.log.callbacks().run(this.getType(), command, args, event);
6972 }
6973 }, {
6974 key: "onCallback",
6975 value: function onCallback(command, args, event, id) {
6976 if (!$e.devTools) {
6977 return;
6978 }
6979
6980 $e.devTools.log.callbacks().callback(this.getType(), command, args, event, id);
6981 }
6982 }]);
6983 return Ui;
6984 }(_base.default);
6985
6986 exports["default"] = Ui;
6987
6988 /***/ }),
6989
6990 /***/ "../modules/web-cli/assets/js/core/routes.js":
6991 /*!***************************************************!*\
6992 !*** ../modules/web-cli/assets/js/core/routes.js ***!
6993 \***************************************************/
6994 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6995
6996 "use strict";
6997
6998
6999 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
7000
7001 Object.defineProperty(exports, "__esModule", ({
7002 value: true
7003 }));
7004 exports["default"] = void 0;
7005
7006 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
7007
7008 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
7009
7010 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
7011
7012 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
7013
7014 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
7015
7016 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
7017
7018 var _commands = _interopRequireDefault(__webpack_require__(/*! ./commands */ "../modules/web-cli/assets/js/core/commands.js"));
7019
7020 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
7021
7022 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
7023
7024 var Routes = /*#__PURE__*/function (_Commands) {
7025 (0, _inherits2.default)(Routes, _Commands);
7026
7027 var _super = _createSuper(Routes);
7028
7029 function Routes() {
7030 var _this;
7031
7032 (0, _classCallCheck2.default)(this, Routes);
7033
7034 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7035 args[_key] = arguments[_key];
7036 }
7037
7038 _this = _super.call.apply(_super, [this].concat(args));
7039 _this.savedStates = {};
7040 _this.historyPerComponent = {};
7041 return _this;
7042 }
7043
7044 (0, _createClass2.default)(Routes, [{
7045 key: "refreshContainer",
7046 value: function refreshContainer(container) {
7047 var currentRoute = this.getCurrent(container),
7048 currentArgs = this.getCurrentArgs(container);
7049 this.clearCurrent(container);
7050 this.to(currentRoute, currentArgs);
7051 }
7052 }, {
7053 key: "getHistory",
7054 value: function getHistory() {
7055 var namespaceRoot = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
7056
7057 if (namespaceRoot) {
7058 return this.historyPerComponent[namespaceRoot] || [];
7059 }
7060
7061 return this.historyPerComponent;
7062 }
7063 }, {
7064 key: "clearHistory",
7065 value: function clearHistory(namespaceRoot) {
7066 delete this.historyPerComponent[namespaceRoot];
7067 }
7068 }, {
7069 key: "clearCurrent",
7070 value: function clearCurrent(container) {
7071 var route = this.current[container];
7072
7073 if (!route) {
7074 return;
7075 }
7076
7077 delete this.current[container];
7078 delete this.currentArgs[container];
7079 this.getComponent(route).onCloseRoute(route);
7080 }
7081 }, {
7082 key: "clear",
7083 value: function clear() {
7084 var _this2 = this;
7085
7086 Object.keys(this.current).forEach(function (container) {
7087 return _this2.clearCurrent(container);
7088 });
7089 }
7090 }, {
7091 key: "saveState",
7092 value: function saveState(container) {
7093 this.savedStates[container] = {
7094 route: this.current[container],
7095 args: this.currentArgs[container]
7096 };
7097 return this;
7098 }
7099 }, {
7100 key: "restoreState",
7101 value: function restoreState(container) {
7102 if (!this.savedStates[container]) {
7103 return false;
7104 }
7105
7106 this.to(this.savedStates[container].route, this.savedStates[container].args);
7107 return true;
7108 }
7109 }, {
7110 key: "beforeRun",
7111 value: function beforeRun(route, args) {
7112 if (!(0, _get2.default)((0, _getPrototypeOf2.default)(Routes.prototype), "beforeRun", this).call(this, route, args)) {
7113 return false;
7114 }
7115
7116 if (this.is(route, args) && !args.refresh) {
7117 return false;
7118 }
7119
7120 var component = this.getComponent(route),
7121 container = component.getRootContainer(),
7122 oldRoute = this.current[container];
7123
7124 if (oldRoute) {
7125 this.getComponent(oldRoute).onCloseRoute(oldRoute);
7126 }
7127
7128 if (!component.isOpen || args.reOpen) {
7129 component.isOpen = component.open(args);
7130 }
7131
7132 return component.isOpen;
7133 }
7134 }, {
7135 key: "to",
7136 value: function to(route, args) {
7137 this.run(route, args);
7138 var namespaceRoot = this.getComponent(route).getRootContainer();
7139
7140 if (!this.historyPerComponent[namespaceRoot]) {
7141 this.historyPerComponent[namespaceRoot] = [];
7142 }
7143
7144 this.historyPerComponent[namespaceRoot].push({
7145 route: route,
7146 args: args
7147 });
7148 }
7149 }, {
7150 key: "back",
7151 value: function back(namespaceRoot) {
7152 var history = this.getHistory(namespaceRoot); // Remove current;
7153
7154 history.pop();
7155 var last = history.pop();
7156
7157 if (!last) {
7158 return;
7159 }
7160
7161 this.to(last.route, last.args);
7162 } // Don't use the event object.
7163
7164 }, {
7165 key: "runShortcut",
7166 value: function runShortcut(command) {
7167 this.to(command);
7168 } // Don't clear current route.
7169
7170 }, {
7171 key: "afterRun",
7172 value: function afterRun(route, args) {
7173 this.getComponent(route).onRoute(route, args);
7174 }
7175 }, {
7176 key: "is",
7177 value: function is(route) {
7178 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7179
7180 if (!(0, _get2.default)((0, _getPrototypeOf2.default)(Routes.prototype), "is", this).call(this, route)) {
7181 return false;
7182 }
7183
7184 var container = this.getComponent(route).getRootContainer();
7185 return _.isEqual(args, this.currentArgs[container]);
7186 }
7187 }, {
7188 key: "isPartOf",
7189 value: function isPartOf(route) {
7190 /**
7191 * Check against current command hierarchically.
7192 * For example `is( 'panel' )` will be true for `panel/elements`
7193 * `is( 'panel/editor' )` will be true for `panel/editor/style`
7194 */
7195 var parts = route.split('/'),
7196 container = parts[0],
7197 toCheck = [],
7198 currentParts = this.current[container] ? this.current[container].split('/') : [];
7199 var match = false;
7200 currentParts.forEach(function (part) {
7201 toCheck.push(part);
7202
7203 if (toCheck.join('/') === route) {
7204 match = true;
7205 }
7206 });
7207 return match;
7208 }
7209 }, {
7210 key: "error",
7211 value: function error(message) {
7212 throw Error('Routes: ' + message);
7213 }
7214 }]);
7215 return Routes;
7216 }(_commands.default);
7217
7218 exports["default"] = Routes;
7219
7220 /***/ }),
7221
7222 /***/ "../modules/web-cli/assets/js/core/shortcuts.js":
7223 /*!******************************************************!*\
7224 !*** ../modules/web-cli/assets/js/core/shortcuts.js ***!
7225 \******************************************************/
7226 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7227
7228 "use strict";
7229
7230
7231 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
7232
7233 Object.defineProperty(exports, "__esModule", ({
7234 value: true
7235 }));
7236 exports["default"] = void 0;
7237
7238 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
7239
7240 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
7241
7242 var _environment = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/environment */ "../modules/web-cli/assets/js/utils/environment.js"));
7243
7244 var _helpers = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/helpers */ "../modules/web-cli/assets/js/utils/helpers.js"));
7245
7246 var Shortcuts = /*#__PURE__*/function () {
7247 function Shortcuts($window) {
7248 (0, _classCallCheck2.default)(this, Shortcuts);
7249 this.specialKeys = {
7250 13: 'enter',
7251 27: 'esc',
7252 38: 'up',
7253 40: 'down',
7254 46: 'del',
7255 191: '?'
7256 };
7257 this.component = '';
7258 this.handlers = {};
7259 this.bindListener($window);
7260 }
7261
7262 (0, _createClass2.default)(Shortcuts, [{
7263 key: "bindListener",
7264 value: function bindListener($window) {
7265 var _this = this;
7266
7267 $window.on('keydown', function (event) {
7268 return _this.handle(event);
7269 });
7270 }
7271 }, {
7272 key: "getAll",
7273 value: function getAll() {
7274 var shortcuts = {};
7275 jQuery.each(this.handlers, function (key, handler) {
7276 jQuery.each(handler, function (index, config) {
7277 shortcuts[config.command] = key;
7278 });
7279 });
7280 return shortcuts;
7281 }
7282 /**
7283 * @param {string} shortcuts
7284 * @param {Object} args
7285 * @param {Function} args.callback Required
7286 * @param {string} args.component Optional
7287 * @param {Function} args.dependency Optional
7288 * @param {Array} args.exclude Optional
7289 * @param {boolean} args.allowAltKey Optional
7290 */
7291
7292 }, {
7293 key: "register",
7294 value: function register(shortcuts, args) {
7295 var _this2 = this;
7296
7297 shortcuts.replace(' ', '').split(',').forEach(function (shortcut) {
7298 if (!_this2.handlers[shortcut]) {
7299 _this2.handlers[shortcut] = [];
7300 }
7301
7302 _this2.handlers[shortcut].push(args);
7303 });
7304 }
7305 }, {
7306 key: "unregister",
7307 value: function unregister(shortcuts, args) {
7308 var _this3 = this;
7309
7310 shortcuts.replace(' ', '').split(',').forEach(function (shortcut) {
7311 _this3.handlers[shortcut].forEach(function (index, handler) {
7312 if (args === handler) {
7313 delete _this3.handlers[shortcut][index];
7314 }
7315 });
7316 });
7317 }
7318 }, {
7319 key: "handle",
7320 value: function handle(event) {
7321 var handlers = this.getHandlersByPriority(event);
7322
7323 if (!handlers) {
7324 return;
7325 }
7326
7327 var filteredHandlers = handlers.filter(function (handler) {
7328 if (handler.exclude && -1 !== handler.exclude.indexOf('input')) {
7329 var $target = jQuery(event.target);
7330
7331 if ($target.is(':input, .elementor-input') || $target.closest('[contenteditable="true"]').length) {
7332 return false;
7333 }
7334 }
7335
7336 if (handler.dependency && !handler.dependency(event)) {
7337 return false;
7338 } // Fix for some keyboard sources that consider alt key as ctrl key
7339
7340
7341 if (!handler.allowAltKey && event.altKey) {
7342 return false;
7343 }
7344
7345 return true;
7346 });
7347
7348 if (!filteredHandlers.length) {
7349 return;
7350 }
7351
7352 if (1 < filteredHandlers.length && elementorWebCliConfig.isDebug) {
7353 _helpers.default.consoleWarn('Multiple handlers for shortcut.', filteredHandlers, event);
7354 }
7355
7356 event.preventDefault();
7357 filteredHandlers[0].callback(event);
7358 }
7359 }, {
7360 key: "isControlEvent",
7361 value: function isControlEvent(event) {
7362 return event[_environment.default.mac ? 'metaKey' : 'ctrlKey'];
7363 }
7364 }, {
7365 key: "getEventShortcut",
7366 value: function getEventShortcut(event) {
7367 var shortcut = [];
7368
7369 if (event.altKey) {
7370 shortcut.push('alt');
7371 }
7372
7373 if (this.isControlEvent(event)) {
7374 shortcut.push('ctrl');
7375 }
7376
7377 if (event.shiftKey) {
7378 shortcut.push('shift');
7379 }
7380
7381 if (this.specialKeys[event.which]) {
7382 shortcut.push(this.specialKeys[event.which]);
7383 } else {
7384 shortcut.push(String.fromCharCode(event.which).toLowerCase());
7385 }
7386
7387 return shortcut.join('+');
7388 }
7389 }, {
7390 key: "isActiveScope",
7391 value: function isActiveScope(scopes) {
7392 var activeComponents = Object.keys($e.components.activeComponents),
7393 activeComponent = activeComponents[activeComponents.length - 1],
7394 component = $e.components.get(activeComponent);
7395
7396 if (!component) {
7397 return false;
7398 }
7399
7400 var namespace = component.getNamespace();
7401 var filteredByNamespace = scopes.some(function (scope) {
7402 return namespace === scope;
7403 });
7404
7405 if (filteredByNamespace) {
7406 return true;
7407 } // Else filter by namespaceRoot.
7408
7409
7410 var namespaceRoot = component.getRootContainer();
7411 return scopes.some(function (scope) {
7412 return namespaceRoot === scope;
7413 });
7414 }
7415 }, {
7416 key: "getHandlersByPriority",
7417 value: function getHandlersByPriority(event) {
7418 var _this4 = this;
7419
7420 var handlers = this.handlers[this.getEventShortcut(event)];
7421
7422 if (!handlers) {
7423 return false;
7424 } // TODO: Prioritize current scope before roo scope.
7425
7426
7427 var inCurrentScope = handlers.filter(function (handler) {
7428 return handler.scopes && _this4.isActiveScope(handler.scopes);
7429 });
7430
7431 if (inCurrentScope.length) {
7432 return inCurrentScope;
7433 }
7434
7435 var noScope = handlers.filter(function (handler) {
7436 return !handler.scopes;
7437 });
7438
7439 if (noScope.length) {
7440 return noScope;
7441 }
7442 }
7443 }]);
7444 return Shortcuts;
7445 }();
7446
7447 exports["default"] = Shortcuts;
7448
7449 /***/ }),
7450
7451 /***/ "../modules/web-cli/assets/js/core/store.js":
7452 /*!**************************************************!*\
7453 !*** ../modules/web-cli/assets/js/core/store.js ***!
7454 \**************************************************/
7455 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7456
7457 "use strict";
7458
7459
7460 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
7461
7462 Object.defineProperty(exports, "__esModule", ({
7463 value: true
7464 }));
7465 exports["default"] = void 0;
7466
7467 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
7468
7469 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
7470
7471 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
7472
7473 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
7474
7475 var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");
7476
7477 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7478
7479 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7480
7481 /**
7482 * @typedef {import('@reduxjs/toolkit').Slice} Slice
7483 */
7484
7485 /**
7486 * @typedef {import('@reduxjs/toolkit').EnhancedStore} EnhancedStore
7487 */
7488
7489 /**
7490 * @typedef {import('@reduxjs/toolkit').AnyAction} AnyAction
7491 */
7492
7493 /**
7494 * @typedef {import('@reduxjs/toolkit').ThunkMiddlewareFor} ThunkMiddlewareFor
7495 */
7496 var Store = /*#__PURE__*/function () {
7497 /**
7498 * @type {Object}
7499 */
7500
7501 /**
7502 * @type {EnhancedStore<{}, AnyAction, [ThunkMiddlewareFor<{}>]>}
7503 */
7504
7505 /**
7506 * Initialize the Store.
7507 *
7508 * @return {void}
7509 */
7510 function Store() {
7511 (0, _classCallCheck2.default)(this, Store);
7512 (0, _defineProperty2.default)(this, "slices", {});
7513 (0, _defineProperty2.default)(this, "reduxStore", void 0);
7514 this.slices = {};
7515 this.reduxStore = this.createStore();
7516 }
7517 /**
7518 * Create a Redux Store object.
7519 *
7520 * @return {EnhancedStore<{}, AnyAction, [ThunkMiddlewareFor<{}>]>} store
7521 */
7522
7523
7524 (0, _createClass2.default)(Store, [{
7525 key: "createStore",
7526 value: function createStore() {
7527 return (0, _toolkit.configureStore)({
7528 // Use an empty function instead of empty object since an empty object
7529 // isn't a valid reducer value.
7530 reducer: function reducer() {}
7531 });
7532 }
7533 /**
7534 * Inject a new reducer.
7535 *
7536 * See: https://redux.js.org/usage/code-splitting#defining-an-injectreducer-function
7537 *
7538 * @param {string} id - Reducer unique ID.
7539 * @param {Function} newReducer - New reducer to inject.
7540 *
7541 * @return {void}
7542 */
7543
7544 }, {
7545 key: "injectReducer",
7546 value: function injectReducer(id, newReducer) {
7547 var prevReducers = this.getReducers();
7548 this.reduxStore.replaceReducer((0, _toolkit.combineReducers)(_objectSpread(_objectSpread({}, prevReducers), {}, (0, _defineProperty2.default)({}, id, newReducer))));
7549 }
7550 /**
7551 * Register a Redux Store slice.
7552 *
7553 * @param {string} sliceId - Slice unique ID.
7554 * @param {Slice} instance - Slice object to add.
7555 *
7556 * @return {void}
7557 */
7558
7559 }, {
7560 key: "register",
7561 value: function register(sliceId, instance) {
7562 if (this.slices[sliceId]) {
7563 throw "Slice with ID '".concat(sliceId, "' already exists.");
7564 }
7565
7566 this.slices[sliceId] = instance;
7567 this.injectReducer(sliceId, instance.reducer);
7568 }
7569 /**
7570 * Get a specific slice.
7571 *
7572 * @param {string|null} sliceId - Slice ID to get.
7573 *
7574 * @return {Slice} slice
7575 */
7576
7577 }, {
7578 key: "get",
7579 value: function get(sliceId) {
7580 return this.slices[sliceId];
7581 }
7582 /**
7583 * Get all slices.
7584 *
7585 * @return {Object} slices
7586 */
7587
7588 }, {
7589 key: "getAllSlices",
7590 value: function getAllSlices() {
7591 return this.slices;
7592 }
7593 /**
7594 * Get All slices.
7595 *
7596 * @return {Object} slices
7597 */
7598
7599 }, {
7600 key: "getAll",
7601 value: function getAll() {
7602 return Object.keys(this.slices).sort();
7603 }
7604 /**
7605 * Return the current reducers.
7606 *
7607 * @return {Object} reducers
7608 */
7609
7610 }, {
7611 key: "getReducers",
7612 value: function getReducers() {
7613 return Object.entries(this.slices).reduce(function (reducers, _ref) {
7614 var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
7615 key = _ref2[0],
7616 slice = _ref2[1];
7617
7618 return _objectSpread(_objectSpread({}, reducers), {}, (0, _defineProperty2.default)({}, key, slice.reducer));
7619 }, {});
7620 }
7621 /**
7622 * Get the actual Redux store object.
7623 *
7624 * @return {Object} redux store object
7625 */
7626
7627 }, {
7628 key: "getReduxStore",
7629 value: function getReduxStore() {
7630 return this.reduxStore;
7631 }
7632 /**
7633 * Proxy to Redux's `dispatch()` function.
7634 *
7635 * @return {*} the dispatched action
7636 */
7637
7638 }, {
7639 key: "dispatch",
7640 value: function dispatch() {
7641 var _this$reduxStore;
7642
7643 return (_this$reduxStore = this.reduxStore).dispatch.apply(_this$reduxStore, arguments);
7644 }
7645 /**
7646 * Proxy to Redux's `getState()` function.
7647 *
7648 * @return {*} The current state tree of the application
7649 */
7650
7651 }, {
7652 key: "getState",
7653 value: function getState() {
7654 var _this$reduxStore2;
7655
7656 return (_this$reduxStore2 = this.reduxStore).getState.apply(_this$reduxStore2, arguments);
7657 }
7658 /**
7659 * Proxy to Redux's `replaceReducer()` function.
7660 * TODO: Do we want that?
7661 *
7662 * @return {*} undefined
7663 */
7664
7665 }, {
7666 key: "replaceReducer",
7667 value: function replaceReducer() {
7668 var _this$reduxStore3;
7669
7670 return (_this$reduxStore3 = this.reduxStore).replaceReducer.apply(_this$reduxStore3, arguments);
7671 }
7672 /**
7673 * Proxy to Redux's `subscribe()` function.
7674 *
7675 * @return {*} A function that unsubscribes the change listener
7676 */
7677
7678 }, {
7679 key: "subscribe",
7680 value: function subscribe() {
7681 var _this$reduxStore4;
7682
7683 return (_this$reduxStore4 = this.reduxStore).subscribe.apply(_this$reduxStore4, arguments);
7684 }
7685 }]);
7686 return Store;
7687 }();
7688
7689 exports["default"] = Store;
7690
7691 /***/ }),
7692
7693 /***/ "../modules/web-cli/assets/js/core/ui-states.js":
7694 /*!******************************************************!*\
7695 !*** ../modules/web-cli/assets/js/core/ui-states.js ***!
7696 \******************************************************/
7697 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7698
7699 "use strict";
7700
7701
7702 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
7703
7704 Object.defineProperty(exports, "__esModule", ({
7705 value: true
7706 }));
7707 exports["default"] = void 0;
7708
7709 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
7710
7711 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
7712
7713 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
7714
7715 /**
7716 * @typedef {import('./states/ui-state-base')} UiStateBase
7717 */
7718 var UiStates = /*#__PURE__*/function () {
7719 /**
7720 * Initialize the State Manager.
7721 *
7722 * @return {void}
7723 */
7724 function UiStates() {
7725 (0, _classCallCheck2.default)(this, UiStates);
7726 this.states = {};
7727 }
7728 /**
7729 * Register a new state.
7730 *
7731 * @param {UiStateBase} instance - State instance.
7732 */
7733
7734
7735 (0, _createClass2.default)(UiStates, [{
7736 key: "register",
7737 value: function register(instance) {
7738 var stateId = instance.getPrefixedId();
7739
7740 if (this.states[stateId]) {
7741 throw "State '".concat(stateId, "' already exists.");
7742 }
7743
7744 this.states[stateId] = instance;
7745 }
7746 /**
7747 * Get all existing states with their options:
7748 *
7749 * {
7750 * 'state-id': [
7751 * 'option-1',
7752 * 'option-2',
7753 * 'option-3',
7754 * ],
7755 * }
7756 *
7757 * @return {Object} all existing states
7758 */
7759
7760 }, {
7761 key: "getAll",
7762 value: function getAll() {
7763 var states = {};
7764 Object.entries(this.states).forEach(function (_ref) {
7765 var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
7766 id = _ref2[0],
7767 instance = _ref2[1];
7768
7769 var options = instance.getOptions();
7770 states[id] = Object.keys(options);
7771 });
7772 return states;
7773 }
7774 /**
7775 * Get the state value, or return all of them if no `state` is set.
7776 *
7777 * @param {string} state - State ID.
7778 *
7779 * @return {UiStateBase} state value
7780 */
7781
7782 }, {
7783 key: "get",
7784 value: function get(state) {
7785 if (state) {
7786 return this.states[state];
7787 }
7788
7789 return this.states;
7790 }
7791 /**
7792 * Set the current state value and trigger its callbacks & events.
7793 * This function triggers a `e-ui-state:${ stateID }` event to the scope, with `oldValue` & `newValue`
7794 * under `e.detail`.
7795 * Additionally, it adds a `e-ui-state--${ stateID }__${ value }` class to the scope element.
7796 *
7797 * @param {string} state - State ID.
7798 * @param {string} value - New state value.
7799 *
7800 * @return {void}
7801 */
7802
7803 }, {
7804 key: "set",
7805 value: function set(state, value) {
7806 // Invalid state or option.
7807 if (!this.get(state)) {
7808 throw "State '".concat(state, "' doesn't exist.");
7809 }
7810
7811 var oldValue = this.getCurrent(state),
7812 classPrefix = "e-ui-state--".concat(state.replaceAll('/', '-')),
7813 oldStateClass = "".concat(classPrefix, "__").concat(oldValue),
7814 newStateClass = "".concat(classPrefix, "__").concat(value),
7815 scopes = this.get(state).getScopes(); // Set the current state to the new value.
7816
7817 this.get(state).set(value);
7818 scopes.forEach(function (scope) {
7819 scope.classList.remove(oldStateClass); // Set the new class only if there is a value (i.e. it's not a state removal action).
7820
7821 if (value) {
7822 scope.classList.add(newStateClass);
7823 } // Dispatch a custom state-change event to the scope.
7824
7825
7826 var event = new CustomEvent("e-ui-state:".concat(state), {
7827 detail: {
7828 oldValue: oldValue,
7829 newValue: value
7830 }
7831 });
7832 scope.dispatchEvent(event);
7833 });
7834 }
7835 /**
7836 * Remove a state.
7837 *
7838 * @param {string} state - State ID.
7839 *
7840 * @return {void}
7841 */
7842
7843 }, {
7844 key: "remove",
7845 value: function remove(state) {
7846 this.set(state, '');
7847 }
7848 /**
7849 * Get the current state value.
7850 *
7851 * @param {string} state - State ID.
7852 *
7853 * @return {string} current state value
7854 */
7855
7856 }, {
7857 key: "getCurrent",
7858 value: function getCurrent(state) {
7859 var _this$get;
7860
7861 return (_this$get = this.get(state)) === null || _this$get === void 0 ? void 0 : _this$get.getCurrent();
7862 }
7863 }]);
7864 return UiStates;
7865 }();
7866
7867 exports["default"] = UiStates;
7868
7869 /***/ }),
7870
7871 /***/ "../modules/web-cli/assets/js/extras/hash-commands.js":
7872 /*!************************************************************!*\
7873 !*** ../modules/web-cli/assets/js/extras/hash-commands.js ***!
7874 \************************************************************/
7875 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7876
7877 "use strict";
7878
7879
7880 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
7881
7882 Object.defineProperty(exports, "__esModule", ({
7883 value: true
7884 }));
7885 exports["default"] = void 0;
7886
7887 var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
7888
7889 var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
7890
7891 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
7892
7893 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
7894
7895 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
7896
7897 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
7898
7899 var _helpers = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/helpers */ "../modules/web-cli/assets/js/utils/helpers.js"));
7900
7901 function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
7902
7903 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
7904
7905 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
7906
7907 var HashCommands = /*#__PURE__*/function () {
7908 /**
7909 * Cannot be static since it uses callback(s) that are available only after '$e' is initialized.
7910 */
7911
7912 /**
7913 * @typedef HashCommand
7914 * @property {string} method method
7915 * @property {string} command command
7916 * @property {Object} args arguments
7917 */
7918
7919 /**
7920 * List of current loaded hash commands.
7921 *
7922 * @type {Array.<HashCommand>}
7923 */
7924 function HashCommands() {
7925 (0, _classCallCheck2.default)(this, HashCommands);
7926 (0, _defineProperty2.default)(this, "dispatchersList", {
7927 'e:run': {
7928 runner: function runner() {
7929 return $e.run;
7930 },
7931 isSafe: function isSafe(command) {
7932 var _$e$commands$getComma;
7933
7934 return (_$e$commands$getComma = $e.commands.getCommandClass(command)) === null || _$e$commands$getComma === void 0 ? void 0 : _$e$commands$getComma.getInfo().isSafe;
7935 },
7936 isSafeWithArgs: function isSafeWithArgs(command) {
7937 var _$e$commands$getComma2;
7938
7939 return (_$e$commands$getComma2 = $e.commands.getCommandClass(command)) === null || _$e$commands$getComma2 === void 0 ? void 0 : _$e$commands$getComma2.getInfo().isSafeWithArgs;
7940 }
7941 },
7942 'e:route': {
7943 runner: function runner() {
7944 return $e.route;
7945 },
7946 isSafe: function isSafe() {
7947 return true;
7948 },
7949 isSafeWithArgs: function isSafeWithArgs() {
7950 return false;
7951 }
7952 }
7953 });
7954 (0, _defineProperty2.default)(this, "commands", []);
7955 this.commands = this.get();
7956 }
7957 /**
7958 * Function get().
7959 *
7960 * Get API requests that comes from hash ( eg #e:run ).
7961 *
7962 * @param {string} hash
7963 *
7964 * @return {Array.<HashCommand>} API requests
7965 */
7966
7967
7968 (0, _createClass2.default)(HashCommands, [{
7969 key: "get",
7970 value: function get() {
7971 var _this = this;
7972
7973 var hash = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : location.hash;
7974 var result = [];
7975
7976 if (hash) {
7977 // Remove first '#' and split each '&'.
7978 var hashList = hash.substr(1).split('&');
7979 hashList.forEach(function (hashItem) {
7980 // eslint-disable-next-line @wordpress/no-unused-vars-before-return
7981 var _hashItem$split = hashItem.split('?'),
7982 _hashItem$split2 = (0, _slicedToArray2.default)(_hashItem$split, 2),
7983 rawCommand = _hashItem$split2[0],
7984 rawArgs = _hashItem$split2[1];
7985
7986 var hashParts = rawCommand.split(':');
7987
7988 if (3 !== hashParts.length) {
7989 return;
7990 }
7991
7992 var method = hashParts[0] + ':' + hashParts[1],
7993 dispatcher = _this.dispatchersList[method];
7994
7995 if (dispatcher) {
7996 var command = hashParts[2],
7997 args = _this.parseCommandArgs(rawArgs);
7998
7999 result.push({
8000 method: method,
8001 command: command,
8002 args: args
8003 });
8004 }
8005 });
8006 }
8007
8008 return result;
8009 }
8010 /**
8011 * Function run().
8012 *
8013 * Run API requests that comes from hash ( eg #e:run ).
8014 *
8015 * @param {Array.<HashCommand>} [commands=this.commands]
8016 */
8017
8018 }, {
8019 key: "run",
8020 value: function () {
8021 var _run = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
8022 var commands,
8023 _iterator,
8024 _step,
8025 hashCommand,
8026 dispatcher,
8027 _iterator2,
8028 _step2,
8029 _hashCommand,
8030 _dispatcher,
8031 _args = arguments;
8032
8033 return _regenerator.default.wrap(function _callee$(_context) {
8034 while (1) {
8035 switch (_context.prev = _context.next) {
8036 case 0:
8037 commands = _args.length > 0 && _args[0] !== undefined ? _args[0] : this.commands;
8038 // To allow validate the run first.
8039 _iterator = _createForOfIteratorHelper(commands);
8040 _context.prev = 2;
8041
8042 _iterator.s();
8043
8044 case 4:
8045 if ((_step = _iterator.n()).done) {
8046 _context.next = 13;
8047 break;
8048 }
8049
8050 hashCommand = _step.value;
8051 dispatcher = this.dispatchersList[hashCommand.method];
8052
8053 if (dispatcher) {
8054 _context.next = 9;
8055 break;
8056 }
8057
8058 return _context.abrupt("return", Promise.reject(new Error("No dispatcher found for the command: `".concat(hashCommand.command, "`."))));
8059
8060 case 9:
8061 if (dispatcher.isSafe(hashCommand.command)) {
8062 _context.next = 11;
8063 break;
8064 }
8065
8066 return _context.abrupt("return", Promise.reject(new Error("Attempting to run unsafe or non exist command: `".concat(hashCommand.command, "`."))));
8067
8068 case 11:
8069 _context.next = 4;
8070 break;
8071
8072 case 13:
8073 _context.next = 18;
8074 break;
8075
8076 case 15:
8077 _context.prev = 15;
8078 _context.t0 = _context["catch"](2);
8079
8080 _iterator.e(_context.t0);
8081
8082 case 18:
8083 _context.prev = 18;
8084
8085 _iterator.f();
8086
8087 return _context.finish(18);
8088
8089 case 21:
8090 // This logic will run the promises by sequence (will wait for dispatcher to finish, before run again).
8091 _iterator2 = _createForOfIteratorHelper(commands);
8092 _context.prev = 22;
8093
8094 _iterator2.s();
8095
8096 case 24:
8097 if ((_step2 = _iterator2.n()).done) {
8098 _context.next = 31;
8099 break;
8100 }
8101
8102 _hashCommand = _step2.value;
8103 _dispatcher = this.dispatchersList[_hashCommand.method];
8104 _context.next = 29;
8105 return _dispatcher.runner()(_hashCommand.command, _dispatcher.isSafeWithArgs(_hashCommand.command) ? _hashCommand.args : undefined);
8106
8107 case 29:
8108 _context.next = 24;
8109 break;
8110
8111 case 31:
8112 _context.next = 36;
8113 break;
8114
8115 case 33:
8116 _context.prev = 33;
8117 _context.t1 = _context["catch"](22);
8118
8119 _iterator2.e(_context.t1);
8120
8121 case 36:
8122 _context.prev = 36;
8123
8124 _iterator2.f();
8125
8126 return _context.finish(36);
8127
8128 case 39:
8129 case "end":
8130 return _context.stop();
8131 }
8132 }
8133 }, _callee, this, [[2, 15, 18, 21], [22, 33, 36, 39]]);
8134 }));
8135
8136 function run() {
8137 return _run.apply(this, arguments);
8138 }
8139
8140 return run;
8141 }()
8142 /**
8143 * Function runOnce().
8144 *
8145 * Do same as `run` but clear `this.commands` before leaving.
8146 */
8147
8148 }, {
8149 key: "runOnce",
8150 value: function runOnce() {
8151 var _this2 = this;
8152
8153 this.run(this.commands).then(function () {
8154 _this2.commands = [];
8155 });
8156 }
8157 /**
8158 * Takes a args in form of JSON and parse it.
8159 *
8160 * @param {string} rawArgs
8161 * @return {Object} args in as an object
8162 */
8163
8164 }, {
8165 key: "parseCommandArgs",
8166 value: function parseCommandArgs(rawArgs) {
8167 try {
8168 return JSON.parse(decodeURI(rawArgs || '{}'));
8169 } catch (e) {
8170 _helpers.default.consoleWarn('Hash commands JSON args cannot be parsed. \n\n', e);
8171
8172 return {};
8173 }
8174 }
8175 }]);
8176 return HashCommands;
8177 }();
8178
8179 exports["default"] = HashCommands;
8180
8181 /***/ }),
8182
8183 /***/ "../modules/web-cli/assets/js/modules/command-base.js":
8184 /*!************************************************************!*\
8185 !*** ../modules/web-cli/assets/js/modules/command-base.js ***!
8186 \************************************************************/
8187 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8188
8189 "use strict";
8190
8191
8192 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
8193
8194 Object.defineProperty(exports, "__esModule", ({
8195 value: true
8196 }));
8197 exports["default"] = void 0;
8198
8199 var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
8200
8201 var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
8202
8203 var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
8204
8205 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
8206
8207 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
8208
8209 var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
8210
8211 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
8212
8213 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
8214
8215 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
8216
8217 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
8218
8219 var _argsObject = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js"));
8220
8221 var _helpers = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/helpers */ "../modules/web-cli/assets/js/utils/helpers.js"));
8222
8223 var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js"));
8224
8225 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
8226
8227 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
8228
8229 /**
8230 * @typedef {import('../modules/component-base')} ComponentBase
8231 */
8232
8233 /**
8234 * @typedef {{}} Component
8235 */
8236 var CommandBase = /*#__PURE__*/function (_ArgsObject) {
8237 (0, _inherits2.default)(CommandBase, _ArgsObject);
8238
8239 var _super = _createSuper(CommandBase);
8240
8241 /**
8242 * Function constructor().
8243 *
8244 * Create Commands Base.
8245 *
8246 * @param {*} [args={}]
8247 * @param {*} [commandsAPI={}]
8248 */
8249 function CommandBase(args) {
8250 var _this;
8251
8252 var commandsAPI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $e.commands;
8253 (0, _classCallCheck2.default)(this, CommandBase);
8254 _this = _super.call(this, args); // Acknowledge self about which command it run.
8255
8256 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "component", void 0);
8257 _this.currentCommand = commandsAPI.getCurrentLast(); // Assign instance of current component.
8258
8259 _this.component = commandsAPI.getComponent(_this.currentCommand); // Who ever need do something before without `super` the constructor can use `initialize` method.
8260
8261 _this.initialize(args); // Refresh args, maybe the changed via `initialize`.
8262
8263
8264 args = _this.args; // Validate args before run.
8265
8266 _this.validateArgs(args);
8267
8268 return _this;
8269 }
8270 /**
8271 * Function requireContainer().
8272 *
8273 * Validate `arg.container` & `arg.containers`.
8274 *
8275 * @param {{}} args
8276 *
8277 * @throws {Error}
8278 */
8279
8280
8281 (0, _createClass2.default)(CommandBase, [{
8282 key: "requireContainer",
8283 value: function requireContainer() {
8284 var _this2 = this;
8285
8286 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.args;
8287
8288 if (!args.container && !args.containers) {
8289 throw Error('container or containers are required.');
8290 }
8291
8292 if (args.container && args.containers) {
8293 throw Error('container and containers cannot go together please select one of them.');
8294 }
8295
8296 var containers = args.containers || [args.container];
8297 containers.forEach(function (container) {
8298 _this2.requireArgumentInstance('container', elementorModules.editor.Container, {
8299 container: container
8300 });
8301 });
8302 }
8303 /**
8304 * Function initialize().
8305 *
8306 * Initialize command, called after construction.
8307 *
8308 * @param {*} [args={}]
8309 */
8310
8311 }, {
8312 key: "initialize",
8313 value: function initialize() {
8314 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8315 } // eslint-disable-line no-unused-vars
8316
8317 /**
8318 * Function validateArgs().
8319 *
8320 * Validate command arguments.
8321 *
8322 * @param {*} [args={}]
8323 */
8324
8325 }, {
8326 key: "validateArgs",
8327 value: function validateArgs() {
8328 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8329 } // eslint-disable-line no-unused-vars
8330
8331 /**
8332 * Function isDataChanged().
8333 *
8334 * Whether the editor needs to set change flag on/off.
8335 *
8336 * @return {boolean} Whether the editor needs to set change flag on/off.
8337 */
8338
8339 }, {
8340 key: "isDataChanged",
8341 value: function isDataChanged() {
8342 return false;
8343 } // eslint-disable-next-line jsdoc/require-returns-check
8344
8345 /**
8346 * Function apply().
8347 *
8348 * Do the actual command.
8349 *
8350 * @param {*} [args={}]
8351 *
8352 * @return {*} callback
8353 */
8354
8355 }, {
8356 key: "apply",
8357 value: function apply() {
8358 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8359 // eslint-disable-line no-unused-vars
8360 (0, _forceMethodImplementation.default)();
8361 }
8362 /**
8363 * Function run().
8364 *
8365 * Run command with history & hooks.
8366 *
8367 * @return {*} run results
8368 */
8369
8370 }, {
8371 key: "run",
8372 value: function run() {
8373 var result; // For UI Hooks.
8374
8375 this.onBeforeRun(this.args);
8376
8377 try {
8378 // For Data hooks.
8379 this.onBeforeApply(this.args);
8380 result = this.apply(this.args);
8381 } catch (e) {
8382 this.onCatchApply(e); // Catch 'Hook-Break' that comes from hooks base.
8383
8384 if (e instanceof $e.modules.HookBreak) {
8385 // Bypass.
8386 return false;
8387 }
8388 }
8389
8390 return this.runAfter(result);
8391 }
8392 }, {
8393 key: "runAfter",
8394 value: function runAfter(result) {
8395 var _this3 = this;
8396
8397 var onAfter = function onAfter(_result) {
8398 // Run Data hooks.
8399 _this3.onAfterApply(_this3.args, _result); // TODO: Create Command-Base for Command-Document and apply it on after.
8400
8401
8402 if (_this3.isDataChanged()) {
8403 $e.internal('document/save/set-is-modified', {
8404 status: true
8405 });
8406 } // For UI hooks.
8407
8408
8409 _this3.onAfterRun(_this3.args, _result);
8410 },
8411 asyncOnAfter = /*#__PURE__*/function () {
8412 var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_result) {
8413 var results, promises;
8414 return _regenerator.default.wrap(function _callee$(_context) {
8415 while (1) {
8416 switch (_context.prev = _context.next) {
8417 case 0:
8418 // Run Data hooks.
8419 results = _this3.onAfterApply(_this3.args, _result), promises = Array.isArray(results) ? results.flat().filter(function (filtered) {
8420 return filtered instanceof Promise;
8421 }) : [];
8422
8423 if (!promises.length) {
8424 _context.next = 4;
8425 break;
8426 }
8427
8428 _context.next = 4;
8429 return Promise.all(promises);
8430
8431 case 4:
8432 if (_this3.isDataChanged()) {
8433 // TODO: Create Command-Base for Command-Document and apply it on after.
8434 $e.internal('document/save/set-is-modified', {
8435 status: true
8436 });
8437 } // For UI hooks.
8438
8439
8440 _this3.onAfterRun(_this3.args, _result);
8441
8442 case 6:
8443 case "end":
8444 return _context.stop();
8445 }
8446 }
8447 }, _callee);
8448 }));
8449
8450 return function asyncOnAfter(_x) {
8451 return _ref.apply(this, arguments);
8452 };
8453 }(); // TODO: Temp code determine if it's a jQuery deferred object.
8454
8455
8456 if (result && 'object' === (0, _typeof2.default)(result) && result.promise && result.then && result.fail) {
8457 result.fail(this.onCatchApply.bind(this));
8458 result.done(onAfter);
8459 } else if (result instanceof Promise) {
8460 // Override initial result ( promise ) to await onAfter promises, first!.
8461 return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
8462 return _regenerator.default.wrap(function _callee2$(_context2) {
8463 while (1) {
8464 switch (_context2.prev = _context2.next) {
8465 case 0:
8466 _context2.next = 2;
8467 return result.catch(_this3.onCatchApply.bind(_this3));
8468
8469 case 2:
8470 _context2.next = 4;
8471 return result.then(function (_result) {
8472 return asyncOnAfter(_result);
8473 });
8474
8475 case 4:
8476 return _context2.abrupt("return", result);
8477
8478 case 5:
8479 case "end":
8480 return _context2.stop();
8481 }
8482 }
8483 }, _callee2);
8484 }))();
8485 } else {
8486 onAfter(result);
8487 }
8488
8489 return result;
8490 }
8491 /**
8492 * Run all the catch hooks.
8493 *
8494 * @param {Error} e
8495 */
8496
8497 }, {
8498 key: "runCatchHooks",
8499 value: function runCatchHooks(e) {
8500 $e.hooks.runDataCatch(this.currentCommand, this.args, e);
8501 $e.hooks.runUICatch(this.currentCommand, this.args, e);
8502 }
8503 /**
8504 * Function onBeforeRun.
8505 *
8506 * Called before run().
8507 *
8508 * @param {*} [args={}]
8509 */
8510
8511 }, {
8512 key: "onBeforeRun",
8513 value: function onBeforeRun() {
8514 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8515 $e.hooks.runUIBefore(this.currentCommand, args);
8516 }
8517 /**
8518 * Function onAfterRun.
8519 *
8520 * Called after run().
8521 *
8522 * @param {*} [args={}]
8523 * @param {*} [result={*}]
8524 */
8525
8526 }, {
8527 key: "onAfterRun",
8528 value: function onAfterRun() {
8529 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8530 var result = arguments.length > 1 ? arguments[1] : undefined;
8531 $e.hooks.runUIAfter(this.currentCommand, args, result);
8532 }
8533 /**
8534 * Function onBeforeApply.
8535 *
8536 * Called before apply().
8537 *
8538 * @param {*} [args={}]
8539 */
8540
8541 }, {
8542 key: "onBeforeApply",
8543 value: function onBeforeApply() {
8544 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8545 $e.hooks.runDataDependency(this.currentCommand, args);
8546 }
8547 /**
8548 * Function onAfterApply.
8549 *
8550 * Called after apply().
8551 *
8552 * @param {*} [args={}]
8553 * @param {*} [result={*}]
8554 */
8555
8556 }, {
8557 key: "onAfterApply",
8558 value: function onAfterApply() {
8559 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8560 var result = arguments.length > 1 ? arguments[1] : undefined;
8561 return $e.hooks.runDataAfter(this.currentCommand, args, result);
8562 }
8563 /**
8564 * Function onCatchApply.
8565 *
8566 * Called after apply() failed.
8567 *
8568 * @param {Error} e
8569 */
8570
8571 }, {
8572 key: "onCatchApply",
8573 value: function onCatchApply(e) {
8574 this.runCatchHooks(e);
8575
8576 _helpers.default.consoleError(e);
8577 }
8578 }], [{
8579 key: "getInstanceType",
8580 value: function getInstanceType() {
8581 return 'CommandBase';
8582 }
8583 /**
8584 * Get info of command.
8585 *
8586 * Use to provide 'extra' information about the command.
8587 *
8588 * @return {Object} info of command
8589 */
8590
8591 }, {
8592 key: "getInfo",
8593 value: function getInfo() {
8594 return {};
8595 }
8596 /**
8597 * Current component.
8598 *
8599 * @type {Component}
8600 */
8601
8602 }]);
8603 return CommandBase;
8604 }(_argsObject.default);
8605
8606 exports["default"] = CommandBase;
8607
8608 /***/ }),
8609
8610 /***/ "../modules/web-cli/assets/js/modules/command-data.js":
8611 /*!************************************************************!*\
8612 !*** ../modules/web-cli/assets/js/modules/command-data.js ***!
8613 \************************************************************/
8614 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8615
8616 "use strict";
8617
8618
8619 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
8620
8621 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
8622
8623 Object.defineProperty(exports, "__esModule", ({
8624 value: true
8625 }));
8626 exports["default"] = void 0;
8627
8628 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
8629
8630 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
8631
8632 var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
8633
8634 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
8635
8636 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
8637
8638 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
8639
8640 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
8641
8642 var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
8643
8644 var errors = _interopRequireWildcard(__webpack_require__(/*! ../core/data/errors/ */ "../modules/web-cli/assets/js/core/data/errors/index.js"));
8645
8646 var _helpers = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/helpers */ "../modules/web-cli/assets/js/utils/helpers.js"));
8647
8648 function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
8649
8650 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
8651
8652 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
8653
8654 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
8655
8656 /**
8657 * @typedef {('create'|'delete'|'get'|'update'|'options')} DataTypes
8658 */
8659
8660 /**
8661 * @typedef {{}} RequestData
8662 */
8663
8664 /**
8665 * @typedef {import('../core/data/errors/base-error')} BaseError
8666 */
8667 var CommandData = /*#__PURE__*/function (_CommandBase) {
8668 (0, _inherits2.default)(CommandData, _CommandBase);
8669
8670 var _super = _createSuper(CommandData);
8671
8672 function CommandData(args) {
8673 var _this$args$options;
8674
8675 var _this;
8676
8677 var commandsAPI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $e.data;
8678 (0, _classCallCheck2.default)(this, CommandData);
8679 _this = _super.call(this, args, commandsAPI);
8680 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "data", void 0);
8681 (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "type", void 0);
8682
8683 if ((_this$args$options = _this.args.options) !== null && _this$args$options !== void 0 && _this$args$options.type) {
8684 _this.type = _this.args.options.type;
8685 }
8686
8687 return _this;
8688 }
8689 /**
8690 * Function getEndpointFormat().
8691 *
8692 * @return {null|string} endpoint format
8693 */
8694
8695
8696 (0, _createClass2.default)(CommandData, [{
8697 key: "getApplyMethods",
8698 value:
8699 /**
8700 * @param {DataTypes} type
8701 *
8702 * @return {boolean|{before: (function(*=): {}), after: (function({}, *=): {})}} apply methods
8703 */
8704 function getApplyMethods() {
8705 var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.type;
8706 var before, after;
8707
8708 switch (type) {
8709 case 'create':
8710 before = this.applyBeforeCreate;
8711 after = this.applyAfterCreate;
8712 break;
8713
8714 case 'delete':
8715 before = this.applyBeforeDelete;
8716 after = this.applyAfterDelete;
8717 break;
8718
8719 case 'get':
8720 before = this.applyBeforeGet;
8721 after = this.applyAfterGet;
8722 break;
8723
8724 case 'update':
8725 before = this.applyBeforeUpdate;
8726 after = this.applyAfterUpdate;
8727 break;
8728
8729 case 'options':
8730 before = this.applyBeforeOptions;
8731 after = this.applyAfterOptions;
8732 break;
8733
8734 default:
8735 return false;
8736 }
8737
8738 return {
8739 before: before.bind(this),
8740 after: after.bind(this)
8741 };
8742 }
8743 /**
8744 * Function getRequestData().
8745 *
8746 * @return {RequestData} request data
8747 */
8748
8749 }, {
8750 key: "getRequestData",
8751 value: function getRequestData() {
8752 return {
8753 component: this.component,
8754 command: this.currentCommand,
8755 type: this.type,
8756 args: this.args,
8757 timestamp: new Date().getTime(),
8758 endpoint: $e.data.commandToEndpoint(this.currentCommand, _helpers.default.cloneObject(this.args), this.constructor.getEndpointFormat())
8759 };
8760 }
8761 }, {
8762 key: "apply",
8763 value: function apply() {
8764 var _this2 = this;
8765
8766 var applyMethods = this.getApplyMethods(); // Run 'before' method.
8767
8768 this.args = applyMethods.before(this.args);
8769 var requestData = this.getRequestData();
8770 return $e.data.fetch(requestData).then(function (data) {
8771 _this2.data = data; // Run 'after' method.
8772
8773 _this2.data = applyMethods.after(data, _this2.args);
8774 _this2.data = {
8775 data: _this2.data
8776 }; // Append requestData.
8777
8778 _this2.data = Object.assign({
8779 __requestData__: requestData
8780 }, _this2.data);
8781 return _this2.data;
8782 });
8783 }
8784 /**
8785 * @param {*} [args={}]
8786 * @return {{}} filtered args
8787 */
8788
8789 }, {
8790 key: "applyBeforeCreate",
8791 value: function applyBeforeCreate() {
8792 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8793 return args;
8794 }
8795 /**
8796 * @param {{}} data
8797 * @param {*} [args={}]
8798 * @return {{}} filtered result
8799 */
8800
8801 }, {
8802 key: "applyAfterCreate",
8803 value: function applyAfterCreate(data) {
8804 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8805 // eslint-disable-line no-unused-vars
8806 return data;
8807 }
8808 /**
8809 * @param {*} [args={}]
8810 * @return {{}} filtered args
8811 */
8812
8813 }, {
8814 key: "applyBeforeDelete",
8815 value: function applyBeforeDelete() {
8816 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8817 return args;
8818 }
8819 /**
8820 * @param {{}} data
8821 * @param {*} [args={}]
8822 * @return {{}} filtered result
8823 */
8824
8825 }, {
8826 key: "applyAfterDelete",
8827 value: function applyAfterDelete(data) {
8828 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8829 // eslint-disable-line no-unused-vars
8830 return data;
8831 }
8832 /**
8833 * @param {*} [args={}]
8834 * @return {{}} filtered args
8835 */
8836
8837 }, {
8838 key: "applyBeforeGet",
8839 value: function applyBeforeGet() {
8840 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8841 return args;
8842 }
8843 /**
8844 * @param {{}} data
8845 * @param {*} [args={}]
8846 * @return {{}} filtered result
8847 */
8848
8849 }, {
8850 key: "applyAfterGet",
8851 value: function applyAfterGet(data) {
8852 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8853 // eslint-disable-line no-unused-vars
8854 return data;
8855 }
8856 /**
8857 * @param {*} [args={}]
8858 * @return {{}} filtered args
8859 */
8860
8861 }, {
8862 key: "applyBeforeUpdate",
8863 value: function applyBeforeUpdate() {
8864 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8865 return args;
8866 }
8867 /**
8868 * @param {{}} data
8869 * @param {*} [args={}]
8870 * @return {{}} filtered result
8871 */
8872
8873 }, {
8874 key: "applyAfterUpdate",
8875 value: function applyAfterUpdate(data) {
8876 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8877 // eslint-disable-line no-unused-vars
8878 return data;
8879 }
8880 /**
8881 * @param {*} [args={}]
8882 * @return {{}} filtered args
8883 */
8884
8885 }, {
8886 key: "applyBeforeOptions",
8887 value: function applyBeforeOptions() {
8888 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8889 return args;
8890 }
8891 /**
8892 * @param {{}} data
8893 * @param {*} [args={}]
8894 * @return {{}} filtered result
8895 */
8896
8897 }, {
8898 key: "applyAfterOptions",
8899 value: function applyAfterOptions(data) {
8900 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8901 // eslint-disable-line no-unused-vars
8902 return data;
8903 }
8904 /**
8905 * @param {BaseError} e
8906 */
8907
8908 }, {
8909 key: "applyAfterCatch",
8910 value: function applyAfterCatch(e) {
8911 e.notify();
8912 }
8913 }, {
8914 key: "onCatchApply",
8915 value: function onCatchApply(e) {
8916 var _e, _e$data;
8917
8918 // TODO: If the errors that returns from the server is consistent remove the '?' from 'e'
8919 var httpErrorCode = ((_e = e) === null || _e === void 0 ? void 0 : (_e$data = _e.data) === null || _e$data === void 0 ? void 0 : _e$data.status) || 501;
8920 var dataError = Object.values(errors).find(function (error) {
8921 return error.getHTTPErrorCode() === httpErrorCode;
8922 });
8923
8924 if (!dataError) {
8925 dataError = errors.DefaultError;
8926 }
8927
8928 e = dataError.create(e.message, e.code, e.data || []);
8929 this.runCatchHooks(e);
8930 this.applyAfterCatch(e);
8931 }
8932 }], [{
8933 key: "getInstanceType",
8934 value:
8935 /**
8936 * Data returned from remote.
8937 *
8938 * @type {*}
8939 */
8940
8941 /**
8942 * Fetch type.
8943 *
8944 * @type {DataTypes}
8945 */
8946 function getInstanceType() {
8947 return 'CommandData';
8948 }
8949 }, {
8950 key: "getEndpointFormat",
8951 value: function getEndpointFormat() {
8952 return null;
8953 }
8954 }]);
8955 return CommandData;
8956 }(_commandBase.default);
8957
8958 exports["default"] = CommandData;
8959
8960 /***/ }),
8961
8962 /***/ "../modules/web-cli/assets/js/modules/command-internal-base.js":
8963 /*!*********************************************************************!*\
8964 !*** ../modules/web-cli/assets/js/modules/command-internal-base.js ***!
8965 \*********************************************************************/
8966 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8967
8968 "use strict";
8969
8970
8971 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
8972
8973 Object.defineProperty(exports, "__esModule", ({
8974 value: true
8975 }));
8976 exports["default"] = void 0;
8977
8978 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
8979
8980 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
8981
8982 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
8983
8984 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
8985
8986 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
8987
8988 var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
8989
8990 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
8991
8992 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
8993
8994 var CommandInternalBase = /*#__PURE__*/function (_CommandBase) {
8995 (0, _inherits2.default)(CommandInternalBase, _CommandBase);
8996
8997 var _super = _createSuper(CommandInternalBase);
8998
8999 function CommandInternalBase(args) {
9000 var commandsAPI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $e.commandsInternal;
9001 (0, _classCallCheck2.default)(this, CommandInternalBase);
9002 return _super.call(this, args, commandsAPI);
9003 }
9004
9005 (0, _createClass2.default)(CommandInternalBase, null, [{
9006 key: "getInstanceType",
9007 value: function getInstanceType() {
9008 return 'CommandInternalBase';
9009 }
9010 }]);
9011 return CommandInternalBase;
9012 }(_commandBase.default);
9013
9014 exports["default"] = CommandInternalBase;
9015
9016 /***/ }),
9017
9018 /***/ "../modules/web-cli/assets/js/modules/commands/close.js":
9019 /*!**************************************************************!*\
9020 !*** ../modules/web-cli/assets/js/modules/commands/close.js ***!
9021 \**************************************************************/
9022 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9023
9024 "use strict";
9025
9026
9027 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
9028
9029 Object.defineProperty(exports, "__esModule", ({
9030 value: true
9031 }));
9032 exports["default"] = exports.Close = void 0;
9033
9034 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
9035
9036 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
9037
9038 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
9039
9040 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
9041
9042 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
9043
9044 var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
9045
9046 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
9047
9048 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
9049
9050 var Close = /*#__PURE__*/function (_CommandBase) {
9051 (0, _inherits2.default)(Close, _CommandBase);
9052
9053 var _super = _createSuper(Close);
9054
9055 function Close() {
9056 (0, _classCallCheck2.default)(this, Close);
9057 return _super.apply(this, arguments);
9058 }
9059
9060 (0, _createClass2.default)(Close, [{
9061 key: "apply",
9062 value: function apply() {
9063 this.component.close();
9064 }
9065 }]);
9066 return Close;
9067 }(_commandBase.default);
9068
9069 exports.Close = Close;
9070 var _default = Close;
9071 exports["default"] = _default;
9072
9073 /***/ }),
9074
9075 /***/ "../modules/web-cli/assets/js/modules/commands/index.js":
9076 /*!**************************************************************!*\
9077 !*** ../modules/web-cli/assets/js/modules/commands/index.js ***!
9078 \**************************************************************/
9079 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9080
9081 "use strict";
9082
9083
9084 Object.defineProperty(exports, "__esModule", ({
9085 value: true
9086 }));
9087 Object.defineProperty(exports, "Close", ({
9088 enumerable: true,
9089 get: function get() {
9090 return _close.Close;
9091 }
9092 }));
9093 Object.defineProperty(exports, "Open", ({
9094 enumerable: true,
9095 get: function get() {
9096 return _open.Open;
9097 }
9098 }));
9099 Object.defineProperty(exports, "Toggle", ({
9100 enumerable: true,
9101 get: function get() {
9102 return _toggle.Toggle;
9103 }
9104 }));
9105
9106 var _close = __webpack_require__(/*! ./close */ "../modules/web-cli/assets/js/modules/commands/close.js");
9107
9108 var _open = __webpack_require__(/*! ./open */ "../modules/web-cli/assets/js/modules/commands/open.js");
9109
9110 var _toggle = __webpack_require__(/*! ./toggle */ "../modules/web-cli/assets/js/modules/commands/toggle.js");
9111
9112 /***/ }),
9113
9114 /***/ "../modules/web-cli/assets/js/modules/commands/open.js":
9115 /*!*************************************************************!*\
9116 !*** ../modules/web-cli/assets/js/modules/commands/open.js ***!
9117 \*************************************************************/
9118 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9119
9120 "use strict";
9121
9122
9123 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
9124
9125 Object.defineProperty(exports, "__esModule", ({
9126 value: true
9127 }));
9128 exports["default"] = exports.Open = void 0;
9129
9130 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
9131
9132 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
9133
9134 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
9135
9136 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
9137
9138 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
9139
9140 var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
9141
9142 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
9143
9144 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
9145
9146 var Open = /*#__PURE__*/function (_CommandBase) {
9147 (0, _inherits2.default)(Open, _CommandBase);
9148
9149 var _super = _createSuper(Open);
9150
9151 function Open() {
9152 (0, _classCallCheck2.default)(this, Open);
9153 return _super.apply(this, arguments);
9154 }
9155
9156 (0, _createClass2.default)(Open, [{
9157 key: "apply",
9158 value: function apply() {
9159 $e.route(this.component.getNamespace());
9160 }
9161 }]);
9162 return Open;
9163 }(_commandBase.default);
9164
9165 exports.Open = Open;
9166 var _default = Open;
9167 exports["default"] = _default;
9168
9169 /***/ }),
9170
9171 /***/ "../modules/web-cli/assets/js/modules/commands/toggle.js":
9172 /*!***************************************************************!*\
9173 !*** ../modules/web-cli/assets/js/modules/commands/toggle.js ***!
9174 \***************************************************************/
9175 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9176
9177 "use strict";
9178
9179
9180 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
9181
9182 Object.defineProperty(exports, "__esModule", ({
9183 value: true
9184 }));
9185 exports["default"] = exports.Toggle = void 0;
9186
9187 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
9188
9189 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
9190
9191 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
9192
9193 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
9194
9195 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
9196
9197 var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
9198
9199 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
9200
9201 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
9202
9203 var Toggle = /*#__PURE__*/function (_CommandBase) {
9204 (0, _inherits2.default)(Toggle, _CommandBase);
9205
9206 var _super = _createSuper(Toggle);
9207
9208 function Toggle() {
9209 (0, _classCallCheck2.default)(this, Toggle);
9210 return _super.apply(this, arguments);
9211 }
9212
9213 (0, _createClass2.default)(Toggle, [{
9214 key: "apply",
9215 value: function apply() {
9216 if (this.component.isOpen) {
9217 this.component.close();
9218 } else {
9219 $e.route(this.component.getNamespace());
9220 }
9221 }
9222 }]);
9223 return Toggle;
9224 }(_commandBase.default);
9225
9226 exports.Toggle = Toggle;
9227 var _default = Toggle;
9228 exports["default"] = _default;
9229
9230 /***/ }),
9231
9232 /***/ "../modules/web-cli/assets/js/modules/component-base.js":
9233 /*!**************************************************************!*\
9234 !*** ../modules/web-cli/assets/js/modules/component-base.js ***!
9235 \**************************************************************/
9236 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9237
9238 "use strict";
9239
9240
9241 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
9242
9243 Object.defineProperty(exports, "__esModule", ({
9244 value: true
9245 }));
9246 exports["default"] = void 0;
9247
9248 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
9249
9250 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
9251
9252 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
9253
9254 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
9255
9256 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
9257
9258 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
9259
9260 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
9261
9262 var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");
9263
9264 var _module = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js"));
9265
9266 var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js"));
9267
9268 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9269
9270 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
9271
9272 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
9273
9274 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
9275
9276 /**
9277 * @typedef {import('./hook-base')} HookBase
9278 */
9279
9280 /**
9281 * @typedef {import('../core/states/ui-state-base')} UiStateBase
9282 */
9283 var ComponentBase = /*#__PURE__*/function (_Module) {
9284 (0, _inherits2.default)(ComponentBase, _Module);
9285
9286 var _super = _createSuper(ComponentBase);
9287
9288 function ComponentBase() {
9289 (0, _classCallCheck2.default)(this, ComponentBase);
9290 return _super.apply(this, arguments);
9291 }
9292
9293 (0, _createClass2.default)(ComponentBase, [{
9294 key: "__construct",
9295 value: function __construct() {
9296 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9297
9298 if (args.manager) {
9299 this.manager = args.manager;
9300 }
9301
9302 this.commands = this.defaultCommands();
9303 this.commandsInternal = this.defaultCommandsInternal();
9304 this.hooks = this.defaultHooks();
9305 this.routes = this.defaultRoutes();
9306 this.tabs = this.defaultTabs();
9307 this.shortcuts = this.defaultShortcuts();
9308 this.utils = this.defaultUtils();
9309 this.data = this.defaultData();
9310 this.uiStates = this.defaultUiStates();
9311 this.states = this.defaultStates();
9312 this.defaultRoute = '';
9313 this.currentTab = '';
9314 }
9315 }, {
9316 key: "registerAPI",
9317 value: function registerAPI() {
9318 var _this = this;
9319
9320 Object.entries(this.getTabs()).forEach(function (tab) {
9321 return _this.registerTabRoute(tab[0]);
9322 });
9323 Object.entries(this.getRoutes()).forEach(function (_ref) {
9324 var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
9325 route = _ref2[0],
9326 callback = _ref2[1];
9327
9328 return _this.registerRoute(route, callback);
9329 });
9330 Object.entries(this.getCommands()).forEach(function (_ref3) {
9331 var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
9332 command = _ref4[0],
9333 callback = _ref4[1];
9334
9335 return _this.registerCommand(command, callback);
9336 });
9337 Object.entries(this.getCommandsInternal()).forEach(function (_ref5) {
9338 var _ref6 = (0, _slicedToArray2.default)(_ref5, 2),
9339 command = _ref6[0],
9340 callback = _ref6[1];
9341
9342 return _this.registerCommandInternal(command, callback);
9343 });
9344 Object.values(this.getHooks()).forEach(function (instance) {
9345 return _this.registerHook(instance);
9346 });
9347 Object.entries(this.getData()).forEach(function (_ref7) {
9348 var _ref8 = (0, _slicedToArray2.default)(_ref7, 2),
9349 command = _ref8[0],
9350 callback = _ref8[1];
9351
9352 return _this.registerData(command, callback);
9353 });
9354 Object.values(this.getUiStates()).forEach(function (instance) {
9355 return _this.registerUiState(instance);
9356 });
9357 Object.entries(this.getStates()).forEach(function (_ref9) {
9358 var _ref10 = (0, _slicedToArray2.default)(_ref9, 2),
9359 id = _ref10[0],
9360 state = _ref10[1];
9361
9362 return _this.registerState(id, state);
9363 });
9364 } // eslint-disable-next-line jsdoc/require-returns-check
9365
9366 /**
9367 * @return {string} namespace
9368 */
9369
9370 }, {
9371 key: "getNamespace",
9372 value: function getNamespace() {
9373 (0, _forceMethodImplementation.default)();
9374 }
9375 }, {
9376 key: "getRootContainer",
9377 value: function getRootContainer() {
9378 var parts = this.getNamespace().split('/');
9379 return parts[0];
9380 }
9381 }, {
9382 key: "defaultTabs",
9383 value: function defaultTabs() {
9384 return {};
9385 }
9386 }, {
9387 key: "defaultRoutes",
9388 value: function defaultRoutes() {
9389 return {};
9390 }
9391 }, {
9392 key: "defaultCommands",
9393 value: function defaultCommands() {
9394 return {};
9395 }
9396 }, {
9397 key: "defaultCommandsInternal",
9398 value: function defaultCommandsInternal() {
9399 return {};
9400 }
9401 }, {
9402 key: "defaultHooks",
9403 value: function defaultHooks() {
9404 return {};
9405 }
9406 /**
9407 * Get the component's default UI states.
9408 *
9409 * @return {Object} default UI states
9410 */
9411
9412 }, {
9413 key: "defaultUiStates",
9414 value: function defaultUiStates() {
9415 return {};
9416 }
9417 /**
9418 * Get the component's Redux slice settings.
9419 *
9420 * @return {Object} Redux slice settings
9421 */
9422
9423 }, {
9424 key: "defaultStates",
9425 value: function defaultStates() {
9426 return {};
9427 }
9428 }, {
9429 key: "defaultShortcuts",
9430 value: function defaultShortcuts() {
9431 return {};
9432 }
9433 }, {
9434 key: "defaultUtils",
9435 value: function defaultUtils() {
9436 return {};
9437 }
9438 }, {
9439 key: "defaultData",
9440 value: function defaultData() {
9441 return {};
9442 }
9443 }, {
9444 key: "getCommands",
9445 value: function getCommands() {
9446 return this.commands;
9447 }
9448 }, {
9449 key: "getCommandsInternal",
9450 value: function getCommandsInternal() {
9451 return this.commandsInternal;
9452 }
9453 }, {
9454 key: "getHooks",
9455 value: function getHooks() {
9456 return this.hooks;
9457 }
9458 /**
9459 * Retrieve the component's UI states.
9460 *
9461 * @return {Object} UI states
9462 */
9463
9464 }, {
9465 key: "getUiStates",
9466 value: function getUiStates() {
9467 return this.uiStates;
9468 }
9469 /**
9470 * Retrieve the component's Redux Slice.
9471 *
9472 * @return {Object} Redux Slice
9473 */
9474
9475 }, {
9476 key: "getStates",
9477 value: function getStates() {
9478 return this.states;
9479 }
9480 }, {
9481 key: "getRoutes",
9482 value: function getRoutes() {
9483 return this.routes;
9484 }
9485 }, {
9486 key: "getTabs",
9487 value: function getTabs() {
9488 return this.tabs;
9489 }
9490 }, {
9491 key: "getShortcuts",
9492 value: function getShortcuts() {
9493 return this.shortcuts;
9494 }
9495 }, {
9496 key: "getData",
9497 value: function getData() {
9498 return this.data;
9499 }
9500 }, {
9501 key: "registerCommand",
9502 value: function registerCommand(command, callback) {
9503 $e.commands.register(this, command, callback);
9504 }
9505 /**
9506 * @param {HookBase} instance
9507 */
9508
9509 }, {
9510 key: "registerHook",
9511 value: function registerHook(instance) {
9512 return instance.register();
9513 }
9514 /**
9515 * Register a UI state.
9516 *
9517 * @param {UiStateBase} instance - UI state instance.
9518 *
9519 * @return {void}
9520 */
9521
9522 }, {
9523 key: "registerUiState",
9524 value: function registerUiState(instance) {
9525 $e.uiStates.register(instance);
9526 }
9527 /**
9528 * Register a Redux Slice.
9529 *
9530 * @param {string} id - State id.
9531 * @param {Object} stateConfig - The state config.
9532 *
9533 * @return {void}
9534 */
9535
9536 }, {
9537 key: "registerState",
9538 value: function registerState(id, stateConfig) {
9539 id = this.getNamespace() + (id ? "/".concat(id) : '');
9540 var slice = (0, _toolkit.createSlice)(_objectSpread(_objectSpread({}, stateConfig), {}, {
9541 name: id
9542 }));
9543 $e.store.register(id, slice);
9544 }
9545 }, {
9546 key: "registerCommandInternal",
9547 value: function registerCommandInternal(command, callback) {
9548 $e.commandsInternal.register(this, command, callback);
9549 }
9550 }, {
9551 key: "registerRoute",
9552 value: function registerRoute(route, callback) {
9553 $e.routes.register(this, route, callback);
9554 }
9555 }, {
9556 key: "registerData",
9557 value: function registerData(command, callback) {
9558 $e.data.register(this, command, callback);
9559 }
9560 }, {
9561 key: "unregisterRoute",
9562 value: function unregisterRoute(route) {
9563 $e.routes.unregister(this, route);
9564 }
9565 }, {
9566 key: "registerTabRoute",
9567 value: function registerTabRoute(tab) {
9568 var _this2 = this;
9569
9570 this.registerRoute(tab, function (args) {
9571 return _this2.activateTab(tab, args);
9572 });
9573 }
9574 }, {
9575 key: "dependency",
9576 value: function dependency() {
9577 return true;
9578 }
9579 }, {
9580 key: "open",
9581 value: function open() {
9582 return true;
9583 }
9584 }, {
9585 key: "close",
9586 value: function close() {
9587 if (!this.isOpen) {
9588 return false;
9589 }
9590
9591 this.isOpen = false;
9592 this.inactivate();
9593 $e.routes.clearCurrent(this.getNamespace());
9594 $e.routes.clearHistory(this.getRootContainer());
9595 return true;
9596 }
9597 }, {
9598 key: "activate",
9599 value: function activate() {
9600 $e.components.activate(this.getNamespace());
9601 }
9602 }, {
9603 key: "inactivate",
9604 value: function inactivate() {
9605 $e.components.inactivate(this.getNamespace());
9606 }
9607 }, {
9608 key: "isActive",
9609 value: function isActive() {
9610 return $e.components.isActive(this.getNamespace());
9611 }
9612 }, {
9613 key: "onRoute",
9614 value: function onRoute(route) {
9615 this.toggleRouteClass(route, true);
9616 this.toggleHistoryClass();
9617 this.activate();
9618 this.trigger('route/open', route);
9619 }
9620 }, {
9621 key: "onCloseRoute",
9622 value: function onCloseRoute(route) {
9623 this.toggleRouteClass(route, false);
9624 this.inactivate();
9625 this.trigger('route/close', route);
9626 }
9627 }, {
9628 key: "setDefaultRoute",
9629 value: function setDefaultRoute(route) {
9630 this.defaultRoute = this.getNamespace() + '/' + route;
9631 }
9632 }, {
9633 key: "getDefaultRoute",
9634 value: function getDefaultRoute() {
9635 return this.defaultRoute;
9636 }
9637 }, {
9638 key: "removeTab",
9639 value: function removeTab(tab) {
9640 delete this.tabs[tab];
9641 this.unregisterRoute(tab);
9642 }
9643 }, {
9644 key: "hasTab",
9645 value: function hasTab(tab) {
9646 return !!this.tabs[tab];
9647 }
9648 }, {
9649 key: "addTab",
9650 value: function addTab(tab, args, position) {
9651 var _this3 = this;
9652
9653 this.tabs[tab] = args; // It can be 0.
9654
9655 if ('undefined' !== typeof position) {
9656 var newTabs = {};
9657 var ids = Object.keys(this.tabs); // Remove new tab
9658
9659 ids.pop(); // Add it to position.
9660
9661 ids.splice(position, 0, tab);
9662 ids.forEach(function (id) {
9663 newTabs[id] = _this3.tabs[id];
9664 });
9665 this.tabs = newTabs;
9666 }
9667
9668 this.registerTabRoute(tab);
9669 }
9670 }, {
9671 key: "getTabsWrapperSelector",
9672 value: function getTabsWrapperSelector() {
9673 return '';
9674 }
9675 }, {
9676 key: "getTabRoute",
9677 value: function getTabRoute(tab) {
9678 return this.getNamespace() + '/' + tab;
9679 }
9680 }, {
9681 key: "renderTab",
9682 value: function renderTab(tab) {} // eslint-disable-line
9683
9684 }, {
9685 key: "activateTab",
9686 value: function activateTab(tab, args) {
9687 var _this4 = this;
9688
9689 this.currentTab = tab;
9690 this.renderTab(tab, args);
9691 jQuery(this.getTabsWrapperSelector() + ' .elementor-component-tab').off('click').on('click', function (event) {
9692 $e.route(_this4.getTabRoute(event.currentTarget.dataset.tab), args);
9693 }).removeClass('elementor-active').filter('[data-tab="' + tab + '"]').addClass('elementor-active');
9694 }
9695 }, {
9696 key: "getActiveTabConfig",
9697 value: function getActiveTabConfig() {
9698 return this.tabs[this.currentTab] || {};
9699 }
9700 }, {
9701 key: "getBodyClass",
9702 value: function getBodyClass(route) {
9703 return 'e-route-' + route.replace(/\//g, '-');
9704 }
9705 /**
9706 * If command includes uppercase character convert it to lowercase and add `-`.
9707 * e.g: `CopyAll` is converted to `copy-all`.
9708 *
9709 * @param {string} commandName
9710 */
9711
9712 }, {
9713 key: "normalizeCommandName",
9714 value: function normalizeCommandName(commandName) {
9715 return commandName.replace(/[A-Z]/g, function (match, offset) {
9716 return (offset > 0 ? '-' : '') + match.toLowerCase();
9717 });
9718 }
9719 }, {
9720 key: "importCommands",
9721 value: function importCommands(commandsFromImport) {
9722 var _this5 = this;
9723
9724 var commands = {}; // Convert `Commands` to `ComponentBase` workable format.
9725
9726 Object.entries(commandsFromImport).forEach(function (_ref11) {
9727 var _ref12 = (0, _slicedToArray2.default)(_ref11, 2),
9728 className = _ref12[0],
9729 Class = _ref12[1];
9730
9731 var command = _this5.normalizeCommandName(className);
9732
9733 commands[command] = function (args) {
9734 return new Class(args).run();
9735 }; // TODO: Temporary code, remove after merge with 'require-commands-base' branch.
9736 // should not return callback, but Class or Instance without run ( gain performance ).
9737
9738
9739 $e.commands.classes[_this5.getNamespace() + '/' + command] = Class;
9740 });
9741 return commands;
9742 }
9743 }, {
9744 key: "importHooks",
9745 value: function importHooks(hooksFromImport) {
9746 var hooks = {};
9747
9748 for (var key in hooksFromImport) {
9749 var hook = new hooksFromImport[key]();
9750 hooks[hook.getId()] = hook;
9751 }
9752
9753 return hooks;
9754 }
9755 /**
9756 * Import & initialize the component's UI states.
9757 * Should be used inside `defaultUiState()`.
9758 *
9759 * @param {Object} statesFromImport - UI states from import.
9760 *
9761 * @return {Object} UI States
9762 */
9763
9764 }, {
9765 key: "importUiStates",
9766 value: function importUiStates(statesFromImport) {
9767 var _this6 = this;
9768
9769 var uiStates = {};
9770 Object.values(statesFromImport).forEach(function (className) {
9771 var uiState = new className(_this6);
9772 uiStates[uiState.getId()] = uiState;
9773 });
9774 return uiStates;
9775 }
9776 /**
9777 * Set a UI state value.
9778 * TODO: Should we provide such function? Maybe the developer should implicitly pass the full state ID?
9779 *
9780 * @param {string} state - Non-prefixed state ID.
9781 * @param {*} value - New state value.
9782 *
9783 * @return {void}
9784 */
9785
9786 }, {
9787 key: "setUiState",
9788 value: function setUiState(state, value) {
9789 $e.uiStates.set("".concat(this.getNamespace(), "/").concat(state), value);
9790 }
9791 }, {
9792 key: "toggleRouteClass",
9793 value: function toggleRouteClass(route, state) {
9794 document.body.classList.toggle(this.getBodyClass(route), state);
9795 }
9796 }, {
9797 key: "toggleHistoryClass",
9798 value: function toggleHistoryClass() {
9799 document.body.classList.toggle('e-routes-has-history', !!$e.routes.getHistory(this.getRootContainer()).length);
9800 }
9801 }]);
9802 return ComponentBase;
9803 }(_module.default);
9804
9805 exports["default"] = ComponentBase;
9806
9807 /***/ }),
9808
9809 /***/ "../modules/web-cli/assets/js/modules/component-modal-base.js":
9810 /*!********************************************************************!*\
9811 !*** ../modules/web-cli/assets/js/modules/component-modal-base.js ***!
9812 \********************************************************************/
9813 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9814
9815 "use strict";
9816
9817
9818 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
9819
9820 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
9821
9822 Object.defineProperty(exports, "__esModule", ({
9823 value: true
9824 }));
9825 exports["default"] = void 0;
9826
9827 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
9828
9829 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
9830
9831 var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
9832
9833 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
9834
9835 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
9836
9837 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
9838
9839 var _componentBase = _interopRequireDefault(__webpack_require__(/*! ./component-base */ "../modules/web-cli/assets/js/modules/component-base.js"));
9840
9841 var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../modules/web-cli/assets/js/modules/commands/index.js"));
9842
9843 var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js"));
9844
9845 function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9846
9847 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
9848
9849 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
9850
9851 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
9852
9853 var ComponentModalBase = /*#__PURE__*/function (_ComponentBase) {
9854 (0, _inherits2.default)(ComponentModalBase, _ComponentBase);
9855
9856 var _super = _createSuper(ComponentModalBase);
9857
9858 function ComponentModalBase() {
9859 (0, _classCallCheck2.default)(this, ComponentModalBase);
9860 return _super.apply(this, arguments);
9861 }
9862
9863 (0, _createClass2.default)(ComponentModalBase, [{
9864 key: "registerAPI",
9865 value: function registerAPI() {
9866 var _this = this;
9867
9868 (0, _get2.default)((0, _getPrototypeOf2.default)(ComponentModalBase.prototype), "registerAPI", this).call(this);
9869 $e.shortcuts.register('esc', {
9870 scopes: [this.getNamespace()],
9871 callback: function callback() {
9872 return _this.close();
9873 }
9874 });
9875 }
9876 }, {
9877 key: "defaultCommands",
9878 value: function defaultCommands() {
9879 return this.importCommands(commands);
9880 }
9881 }, {
9882 key: "defaultRoutes",
9883 value: function defaultRoutes() {
9884 return {
9885 '': function _() {
9886 /* Nothing to do, it's already rendered. */
9887 }
9888 };
9889 }
9890 }, {
9891 key: "open",
9892 value: function open() {
9893 var _this2 = this;
9894
9895 if (!this.layout) {
9896 var layout = this.getModalLayout();
9897 this.layout = new layout({
9898 component: this
9899 });
9900 this.layout.getModal().on('hide', function () {
9901 return _this2.close();
9902 });
9903 }
9904
9905 this.layout.showModal();
9906 return true;
9907 }
9908 }, {
9909 key: "close",
9910 value: function close() {
9911 if (!(0, _get2.default)((0, _getPrototypeOf2.default)(ComponentModalBase.prototype), "close", this).call(this)) {
9912 return false;
9913 }
9914
9915 this.layout.getModal().hide();
9916 return true;
9917 }
9918 }, {
9919 key: "getModalLayout",
9920 value: function getModalLayout() {
9921 (0, _forceMethodImplementation.default)();
9922 }
9923 }]);
9924 return ComponentModalBase;
9925 }(_componentBase.default);
9926
9927 exports["default"] = ComponentModalBase;
9928
9929 /***/ }),
9930
9931 /***/ "../modules/web-cli/assets/js/modules/hook-base.js":
9932 /*!*********************************************************!*\
9933 !*** ../modules/web-cli/assets/js/modules/hook-base.js ***!
9934 \*********************************************************/
9935 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9936
9937 "use strict";
9938
9939
9940 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
9941
9942 Object.defineProperty(exports, "__esModule", ({
9943 value: true
9944 }));
9945 exports["default"] = void 0;
9946
9947 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
9948
9949 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
9950
9951 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
9952
9953 var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js"));
9954
9955 var HookBase = /*#__PURE__*/function () {
9956 /**
9957 * Callback type, eg ( hook, event ).
9958 *
9959 * @type {string}
9960 */
9961
9962 /**
9963 * Full command address, that will hook the callback.
9964 *
9965 * @type {string}
9966 */
9967
9968 /**
9969 * Unique id of the callback.
9970 *
9971 * @type {string}
9972 */
9973
9974 /**
9975 * Function constructor().
9976 *
9977 * Create callback base.
9978 */
9979 function HookBase() {
9980 (0, _classCallCheck2.default)(this, HookBase);
9981 (0, _defineProperty2.default)(this, "type", void 0);
9982 (0, _defineProperty2.default)(this, "command", void 0);
9983 (0, _defineProperty2.default)(this, "id", void 0);
9984 this.initialize();
9985 this.type = this.getType();
9986 this.command = this.getCommand();
9987 this.id = this.getId();
9988 }
9989 /**
9990 * Function initialize().
9991 *
9992 * Called after creation of the base, used for initialize extras.
9993 * Without expending constructor.
9994 */
9995
9996
9997 (0, _createClass2.default)(HookBase, [{
9998 key: "initialize",
9999 value: function initialize() {}
10000 /**
10001 * Function register().
10002 *
10003 * Used to register the callback.
10004 *
10005 * @throws {Error}
10006 */
10007
10008 }, {
10009 key: "register",
10010 value: function register() {
10011 (0, _forceMethodImplementation.default)();
10012 } // eslint-disable-next-line jsdoc/require-returns-check
10013
10014 /**
10015 * Function getType().
10016 *
10017 * Get type eg: ( hook, event, etc ... ).
10018 *
10019 * @return {string} type
10020 *
10021 * @throws {Error}
10022 */
10023
10024 }, {
10025 key: "getType",
10026 value: function getType() {
10027 (0, _forceMethodImplementation.default)();
10028 } // eslint-disable-next-line jsdoc/require-returns-check
10029
10030 /**
10031 * Function getCommand().
10032 *
10033 * Returns the full command path for callback binding.
10034 *
10035 * Supports array of strings ( commands ).
10036 *
10037 * @return {string} command
10038 *
10039 * @throws {Error}
10040 */
10041
10042 }, {
10043 key: "getCommand",
10044 value: function getCommand() {
10045 (0, _forceMethodImplementation.default)();
10046 } // eslint-disable-next-line jsdoc/require-returns-check
10047
10048 /**
10049 * Function getId().
10050 *
10051 * Returns command id for the hook (should be unique).
10052 *
10053 * @return {string} id
10054 *
10055 * @throws {Error}
10056 */
10057
10058 }, {
10059 key: "getId",
10060 value: function getId() {
10061 (0, _forceMethodImplementation.default)();
10062 } // eslint-disable-next-line jsdoc/require-returns-check
10063
10064 /**
10065 * Function getContainerType().
10066 *
10067 * Bind eContainer type to callback.
10068 *
10069 * Used to gain performance.
10070 *
10071 * @return {string} type
10072 */
10073
10074 }, {
10075 key: "getContainerType",
10076 value: function getContainerType() {}
10077 /**
10078 * Function getConditions().
10079 *
10080 * Condition for running the callback, if true, call to apply().
10081 *
10082 * @param {*} [args={}]
10083 * @param {*} [result=*]
10084 *
10085 * @return {boolean} conditions
10086 */
10087
10088 }, {
10089 key: "getConditions",
10090 value: function getConditions() {
10091 var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10092 var result = arguments.length > 1 ? arguments[1] : undefined;
10093 // eslint-disable-line no-unused-vars
10094 return true;
10095 } // eslint-disable-next-line jsdoc/require-returns-check
10096
10097 /**
10098 * Function apply().
10099 *
10100 * Apply the callback, ( The actual affect of the callback ).
10101 *
10102 * @param {*} [args={}]
10103 *
10104 * @return {*} results
10105 */
10106
10107 }, {
10108 key: "apply",
10109 value: function apply(args) {
10110 // eslint-disable-line no-unused-vars
10111 (0, _forceMethodImplementation.default)();
10112 }
10113 /**
10114 * Function run().
10115 *
10116 * Run the callback.
10117 *
10118 * @param {*} args
10119 *
10120 * @return {*} results
10121 */
10122
10123 }, {
10124 key: "run",
10125 value: function run() {
10126 var _ref = arguments.length <= 0 ? undefined : arguments[0],
10127 _ref$options = _ref.options,
10128 options = _ref$options === void 0 ? {} : _ref$options; // Disable callback if requested by args.options.
10129
10130
10131 if (options.callbacks && false === options.callbacks[this.id]) {
10132 return true;
10133 }
10134
10135 if (this.getConditions.apply(this, arguments)) {
10136 if ($e.devTools) {
10137 $e.devTools.log.callbacks().active(this.type, this.command, this.id);
10138 }
10139
10140 return this.apply.apply(this, arguments);
10141 }
10142
10143 return true;
10144 }
10145 }]);
10146 return HookBase;
10147 }();
10148
10149 exports["default"] = HookBase;
10150
10151 /***/ }),
10152
10153 /***/ "../modules/web-cli/assets/js/modules/hook-break.js":
10154 /*!**********************************************************!*\
10155 !*** ../modules/web-cli/assets/js/modules/hook-break.js ***!
10156 \**********************************************************/
10157 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10158
10159 "use strict";
10160
10161
10162 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10163
10164 Object.defineProperty(exports, "__esModule", ({
10165 value: true
10166 }));
10167 exports["default"] = void 0;
10168
10169 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10170
10171 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10172
10173 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
10174
10175 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
10176
10177 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
10178
10179 var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js"));
10180
10181 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
10182
10183 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10184
10185 var HookBreak = /*#__PURE__*/function (_Error) {
10186 (0, _inherits2.default)(HookBreak, _Error);
10187
10188 var _super = _createSuper(HookBreak);
10189
10190 function HookBreak() {
10191 (0, _classCallCheck2.default)(this, HookBreak);
10192 return _super.call(this, 'HookBreak');
10193 }
10194
10195 return (0, _createClass2.default)(HookBreak);
10196 }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
10197
10198 exports["default"] = HookBreak;
10199
10200 /***/ }),
10201
10202 /***/ "../modules/web-cli/assets/js/modules/hooks/data/after.js":
10203 /*!****************************************************************!*\
10204 !*** ../modules/web-cli/assets/js/modules/hooks/data/after.js ***!
10205 \****************************************************************/
10206 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10207
10208 "use strict";
10209
10210
10211 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10212
10213 Object.defineProperty(exports, "__esModule", ({
10214 value: true
10215 }));
10216 exports["default"] = exports.After = void 0;
10217
10218 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10219
10220 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10221
10222 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
10223
10224 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
10225
10226 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
10227
10228 var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/data/base.js"));
10229
10230 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
10231
10232 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10233
10234 var After = /*#__PURE__*/function (_Base) {
10235 (0, _inherits2.default)(After, _Base);
10236
10237 var _super = _createSuper(After);
10238
10239 function After() {
10240 (0, _classCallCheck2.default)(this, After);
10241 return _super.apply(this, arguments);
10242 }
10243
10244 (0, _createClass2.default)(After, [{
10245 key: "register",
10246 value: function register() {
10247 $e.hooks.registerDataAfter(this);
10248 }
10249 }]);
10250 return After;
10251 }(_base.default);
10252
10253 exports.After = After;
10254 var _default = After;
10255 exports["default"] = _default;
10256
10257 /***/ }),
10258
10259 /***/ "../modules/web-cli/assets/js/modules/hooks/data/base.js":
10260 /*!***************************************************************!*\
10261 !*** ../modules/web-cli/assets/js/modules/hooks/data/base.js ***!
10262 \***************************************************************/
10263 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10264
10265 "use strict";
10266
10267
10268 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10269
10270 Object.defineProperty(exports, "__esModule", ({
10271 value: true
10272 }));
10273 exports["default"] = exports.Base = void 0;
10274
10275 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10276
10277 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10278
10279 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
10280
10281 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
10282
10283 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
10284
10285 var _hookBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/hook-base */ "../modules/web-cli/assets/js/modules/hook-base.js"));
10286
10287 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
10288
10289 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10290
10291 var Base = /*#__PURE__*/function (_HookBase) {
10292 (0, _inherits2.default)(Base, _HookBase);
10293
10294 var _super = _createSuper(Base);
10295
10296 function Base() {
10297 (0, _classCallCheck2.default)(this, Base);
10298 return _super.apply(this, arguments);
10299 }
10300
10301 (0, _createClass2.default)(Base, [{
10302 key: "getType",
10303 value: function getType() {
10304 return 'data';
10305 }
10306 }]);
10307 return Base;
10308 }(_hookBase.default);
10309
10310 exports.Base = Base;
10311 var _default = Base;
10312 exports["default"] = _default;
10313
10314 /***/ }),
10315
10316 /***/ "../modules/web-cli/assets/js/modules/hooks/data/catch.js":
10317 /*!****************************************************************!*\
10318 !*** ../modules/web-cli/assets/js/modules/hooks/data/catch.js ***!
10319 \****************************************************************/
10320 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10321
10322 "use strict";
10323
10324
10325 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10326
10327 Object.defineProperty(exports, "__esModule", ({
10328 value: true
10329 }));
10330 exports["default"] = exports.Catch = void 0;
10331
10332 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10333
10334 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10335
10336 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
10337
10338 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
10339
10340 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
10341
10342 var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/data/base.js"));
10343
10344 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
10345
10346 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10347
10348 var Catch = /*#__PURE__*/function (_Base) {
10349 (0, _inherits2.default)(Catch, _Base);
10350
10351 var _super = _createSuper(Catch);
10352
10353 function Catch() {
10354 (0, _classCallCheck2.default)(this, Catch);
10355 return _super.apply(this, arguments);
10356 }
10357
10358 (0, _createClass2.default)(Catch, [{
10359 key: "register",
10360 value: function register() {
10361 $e.hooks.registerDataCatch(this);
10362 }
10363 }]);
10364 return Catch;
10365 }(_base.default);
10366
10367 exports.Catch = Catch;
10368 var _default = Catch;
10369 exports["default"] = _default;
10370
10371 /***/ }),
10372
10373 /***/ "../modules/web-cli/assets/js/modules/hooks/data/dependency.js":
10374 /*!*********************************************************************!*\
10375 !*** ../modules/web-cli/assets/js/modules/hooks/data/dependency.js ***!
10376 \*********************************************************************/
10377 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10378
10379 "use strict";
10380
10381
10382 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10383
10384 Object.defineProperty(exports, "__esModule", ({
10385 value: true
10386 }));
10387 exports["default"] = exports.Dependency = void 0;
10388
10389 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10390
10391 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10392
10393 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
10394
10395 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
10396
10397 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
10398
10399 var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/data/base.js"));
10400
10401 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
10402
10403 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10404
10405 var Dependency = /*#__PURE__*/function (_Base) {
10406 (0, _inherits2.default)(Dependency, _Base);
10407
10408 var _super = _createSuper(Dependency);
10409
10410 function Dependency() {
10411 (0, _classCallCheck2.default)(this, Dependency);
10412 return _super.apply(this, arguments);
10413 }
10414
10415 (0, _createClass2.default)(Dependency, [{
10416 key: "register",
10417 value: function register() {
10418 $e.hooks.registerDataDependency(this);
10419 }
10420 }]);
10421 return Dependency;
10422 }(_base.default);
10423
10424 exports.Dependency = Dependency;
10425 var _default = Dependency;
10426 exports["default"] = _default;
10427
10428 /***/ }),
10429
10430 /***/ "../modules/web-cli/assets/js/modules/hooks/data/index.js":
10431 /*!****************************************************************!*\
10432 !*** ../modules/web-cli/assets/js/modules/hooks/data/index.js ***!
10433 \****************************************************************/
10434 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10435
10436 "use strict";
10437
10438
10439 Object.defineProperty(exports, "__esModule", ({
10440 value: true
10441 }));
10442 Object.defineProperty(exports, "After", ({
10443 enumerable: true,
10444 get: function get() {
10445 return _after.After;
10446 }
10447 }));
10448 Object.defineProperty(exports, "Base", ({
10449 enumerable: true,
10450 get: function get() {
10451 return _base.Base;
10452 }
10453 }));
10454 Object.defineProperty(exports, "Catch", ({
10455 enumerable: true,
10456 get: function get() {
10457 return _catch.Catch;
10458 }
10459 }));
10460 Object.defineProperty(exports, "Dependency", ({
10461 enumerable: true,
10462 get: function get() {
10463 return _dependency.Dependency;
10464 }
10465 }));
10466
10467 var _after = __webpack_require__(/*! ./after */ "../modules/web-cli/assets/js/modules/hooks/data/after.js");
10468
10469 var _base = __webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/data/base.js");
10470
10471 var _catch = __webpack_require__(/*! ./catch */ "../modules/web-cli/assets/js/modules/hooks/data/catch.js");
10472
10473 var _dependency = __webpack_require__(/*! ./dependency */ "../modules/web-cli/assets/js/modules/hooks/data/dependency.js");
10474
10475 /***/ }),
10476
10477 /***/ "../modules/web-cli/assets/js/modules/hooks/ui/after.js":
10478 /*!**************************************************************!*\
10479 !*** ../modules/web-cli/assets/js/modules/hooks/ui/after.js ***!
10480 \**************************************************************/
10481 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10482
10483 "use strict";
10484
10485
10486 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10487
10488 Object.defineProperty(exports, "__esModule", ({
10489 value: true
10490 }));
10491 exports["default"] = exports.After = void 0;
10492
10493 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10494
10495 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10496
10497 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
10498
10499 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
10500
10501 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
10502
10503 var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/ui/base.js"));
10504
10505 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
10506
10507 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10508
10509 var After = /*#__PURE__*/function (_Base) {
10510 (0, _inherits2.default)(After, _Base);
10511
10512 var _super = _createSuper(After);
10513
10514 function After() {
10515 (0, _classCallCheck2.default)(this, After);
10516 return _super.apply(this, arguments);
10517 }
10518
10519 (0, _createClass2.default)(After, [{
10520 key: "register",
10521 value: function register() {
10522 $e.hooks.registerUIAfter(this);
10523 }
10524 }]);
10525 return After;
10526 }(_base.default);
10527
10528 exports.After = After;
10529 var _default = After;
10530 exports["default"] = _default;
10531
10532 /***/ }),
10533
10534 /***/ "../modules/web-cli/assets/js/modules/hooks/ui/base.js":
10535 /*!*************************************************************!*\
10536 !*** ../modules/web-cli/assets/js/modules/hooks/ui/base.js ***!
10537 \*************************************************************/
10538 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10539
10540 "use strict";
10541
10542
10543 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10544
10545 Object.defineProperty(exports, "__esModule", ({
10546 value: true
10547 }));
10548 exports["default"] = exports.Base = void 0;
10549
10550 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10551
10552 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10553
10554 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
10555
10556 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
10557
10558 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
10559
10560 var _hookBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/hook-base */ "../modules/web-cli/assets/js/modules/hook-base.js"));
10561
10562 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
10563
10564 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10565
10566 var Base = /*#__PURE__*/function (_HookBase) {
10567 (0, _inherits2.default)(Base, _HookBase);
10568
10569 var _super = _createSuper(Base);
10570
10571 function Base() {
10572 (0, _classCallCheck2.default)(this, Base);
10573 return _super.apply(this, arguments);
10574 }
10575
10576 (0, _createClass2.default)(Base, [{
10577 key: "getType",
10578 value: function getType() {
10579 return 'ui';
10580 }
10581 }]);
10582 return Base;
10583 }(_hookBase.default);
10584
10585 exports.Base = Base;
10586 var _default = Base;
10587 exports["default"] = _default;
10588
10589 /***/ }),
10590
10591 /***/ "../modules/web-cli/assets/js/modules/hooks/ui/before.js":
10592 /*!***************************************************************!*\
10593 !*** ../modules/web-cli/assets/js/modules/hooks/ui/before.js ***!
10594 \***************************************************************/
10595 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10596
10597 "use strict";
10598
10599
10600 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10601
10602 Object.defineProperty(exports, "__esModule", ({
10603 value: true
10604 }));
10605 exports["default"] = exports.Before = void 0;
10606
10607 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10608
10609 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10610
10611 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
10612
10613 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
10614
10615 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
10616
10617 var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/ui/base.js"));
10618
10619 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
10620
10621 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10622
10623 var Before = /*#__PURE__*/function (_Base) {
10624 (0, _inherits2.default)(Before, _Base);
10625
10626 var _super = _createSuper(Before);
10627
10628 function Before() {
10629 (0, _classCallCheck2.default)(this, Before);
10630 return _super.apply(this, arguments);
10631 }
10632
10633 (0, _createClass2.default)(Before, [{
10634 key: "register",
10635 value: function register() {
10636 $e.hooks.registerUIBefore(this);
10637 }
10638 }]);
10639 return Before;
10640 }(_base.default);
10641
10642 exports.Before = Before;
10643 var _default = Before;
10644 exports["default"] = _default;
10645
10646 /***/ }),
10647
10648 /***/ "../modules/web-cli/assets/js/modules/hooks/ui/catch.js":
10649 /*!**************************************************************!*\
10650 !*** ../modules/web-cli/assets/js/modules/hooks/ui/catch.js ***!
10651 \**************************************************************/
10652 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10653
10654 "use strict";
10655
10656
10657 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10658
10659 Object.defineProperty(exports, "__esModule", ({
10660 value: true
10661 }));
10662 exports["default"] = exports.Catch = void 0;
10663
10664 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10665
10666 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10667
10668 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
10669
10670 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
10671
10672 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
10673
10674 var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/ui/base.js"));
10675
10676 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
10677
10678 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10679
10680 var Catch = /*#__PURE__*/function (_Base) {
10681 (0, _inherits2.default)(Catch, _Base);
10682
10683 var _super = _createSuper(Catch);
10684
10685 function Catch() {
10686 (0, _classCallCheck2.default)(this, Catch);
10687 return _super.apply(this, arguments);
10688 }
10689
10690 (0, _createClass2.default)(Catch, [{
10691 key: "register",
10692 value: function register() {
10693 $e.hooks.registerUICatch(this);
10694 }
10695 }]);
10696 return Catch;
10697 }(_base.default);
10698
10699 exports.Catch = Catch;
10700 var _default = Catch;
10701 exports["default"] = _default;
10702
10703 /***/ }),
10704
10705 /***/ "../modules/web-cli/assets/js/modules/hooks/ui/index.js":
10706 /*!**************************************************************!*\
10707 !*** ../modules/web-cli/assets/js/modules/hooks/ui/index.js ***!
10708 \**************************************************************/
10709 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10710
10711 "use strict";
10712
10713
10714 Object.defineProperty(exports, "__esModule", ({
10715 value: true
10716 }));
10717 Object.defineProperty(exports, "After", ({
10718 enumerable: true,
10719 get: function get() {
10720 return _after.After;
10721 }
10722 }));
10723 Object.defineProperty(exports, "Base", ({
10724 enumerable: true,
10725 get: function get() {
10726 return _base.Base;
10727 }
10728 }));
10729 Object.defineProperty(exports, "Before", ({
10730 enumerable: true,
10731 get: function get() {
10732 return _before.Before;
10733 }
10734 }));
10735 Object.defineProperty(exports, "Catch", ({
10736 enumerable: true,
10737 get: function get() {
10738 return _catch.Catch;
10739 }
10740 }));
10741
10742 var _after = __webpack_require__(/*! ./after */ "../modules/web-cli/assets/js/modules/hooks/ui/after.js");
10743
10744 var _base = __webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/ui/base.js");
10745
10746 var _before = __webpack_require__(/*! ./before */ "../modules/web-cli/assets/js/modules/hooks/ui/before.js");
10747
10748 var _catch = __webpack_require__(/*! ./catch */ "../modules/web-cli/assets/js/modules/hooks/ui/catch.js");
10749
10750 /***/ }),
10751
10752 /***/ "../modules/web-cli/assets/js/utils/environment.js":
10753 /*!*********************************************************!*\
10754 !*** ../modules/web-cli/assets/js/utils/environment.js ***!
10755 \*********************************************************/
10756 /***/ ((__unused_webpack_module, exports) => {
10757
10758 "use strict";
10759
10760
10761 Object.defineProperty(exports, "__esModule", ({
10762 value: true
10763 }));
10764 exports["default"] = void 0;
10765
10766 // TODO: Copied from `core/common/assets/js/utils/environment.js`.
10767 var matchUserAgent = function matchUserAgent(UserAgentStr) {
10768 return userAgent.indexOf(UserAgentStr) >= 0;
10769 },
10770 userAgent = navigator.userAgent,
10771 // Solution influenced by https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser
10772 // Opera 8.0+
10773 isOpera = !!window.opr && !!opr.addons || !!window.opera || matchUserAgent(' OPR/'),
10774 // Firefox 1.0+
10775 isFirefox = matchUserAgent('Firefox'),
10776 // Safari 3.0+ "[object HTMLElementConstructor]"
10777 isSafari = /^((?!chrome|android).)*safari/i.test(userAgent) || /constructor/i.test(window.HTMLElement) || function (p) {
10778 return '[object SafariRemoteNotification]' === p.toString();
10779 }(!window.safari || typeof safari !== 'undefined' && safari.pushNotification),
10780 // Internet Explorer 6-11
10781 isIE = /Trident|MSIE/.test(userAgent) && (
10782 /*@cc_on!@*/
10783 false || !!document.documentMode),
10784 // Edge 20+
10785 isEdge = !isIE && !!window.StyleMedia || matchUserAgent('Edg'),
10786 // Google Chrome (Not accurate)
10787 isChrome = !!window.chrome && matchUserAgent('Chrome') && !(isEdge || isOpera),
10788 // Blink engine
10789 isBlink = matchUserAgent('Chrome') && !!window.CSS,
10790 // Apple Webkit engine
10791 isAppleWebkit = matchUserAgent('AppleWebKit') && !isBlink,
10792 environment = {
10793 appleWebkit: isAppleWebkit,
10794 blink: isBlink,
10795 chrome: isChrome,
10796 edge: isEdge,
10797 firefox: isFirefox,
10798 ie: isIE,
10799 mac: matchUserAgent('Macintosh'),
10800 opera: isOpera,
10801 safari: isSafari,
10802 webkit: matchUserAgent('AppleWebKit')
10803 };
10804
10805 var _default = environment;
10806 exports["default"] = _default;
10807
10808 /***/ }),
10809
10810 /***/ "../modules/web-cli/assets/js/utils/force-method-implementation.js":
10811 /*!*************************************************************************!*\
10812 !*** ../modules/web-cli/assets/js/utils/force-method-implementation.js ***!
10813 \*************************************************************************/
10814 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10815
10816 "use strict";
10817
10818
10819 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10820
10821 Object.defineProperty(exports, "__esModule", ({
10822 value: true
10823 }));
10824 exports["default"] = exports.ForceMethodImplementation = void 0;
10825
10826 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10827
10828 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10829
10830 var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
10831
10832 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
10833
10834 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
10835
10836 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
10837
10838 var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js"));
10839
10840 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
10841
10842 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10843
10844 // TODO: Copied from `assets/dev/js/modules/imports/force-method-implementation.js`;
10845 var ForceMethodImplementation = /*#__PURE__*/function (_Error) {
10846 (0, _inherits2.default)(ForceMethodImplementation, _Error);
10847
10848 var _super = _createSuper(ForceMethodImplementation);
10849
10850 function ForceMethodImplementation() {
10851 var _this;
10852
10853 var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10854 (0, _classCallCheck2.default)(this, ForceMethodImplementation);
10855 _this = _super.call(this, "".concat(info.isStatic ? 'static ' : '').concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality."));
10856 Error.captureStackTrace((0, _assertThisInitialized2.default)(_this), ForceMethodImplementation);
10857 return _this;
10858 }
10859
10860 return (0, _createClass2.default)(ForceMethodImplementation);
10861 }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
10862
10863 exports.ForceMethodImplementation = ForceMethodImplementation;
10864
10865 var _default = function _default() {
10866 var stack = Error().stack,
10867 caller = stack.split('\n')[2].trim(),
10868 callerName = caller.startsWith('at new') ? 'constructor' : caller.split(' ')[1],
10869 info = {};
10870 info.functionName = callerName;
10871 info.fullName = callerName;
10872
10873 if (info.functionName.includes('.')) {
10874 var parts = info.functionName.split('.');
10875 info.className = parts[0];
10876 info.functionName = parts[1];
10877 } else {
10878 info.isStatic = true;
10879 }
10880
10881 throw new ForceMethodImplementation(info);
10882 };
10883
10884 exports["default"] = _default;
10885
10886 /***/ }),
10887
10888 /***/ "../modules/web-cli/assets/js/utils/helpers.js":
10889 /*!*****************************************************!*\
10890 !*** ../modules/web-cli/assets/js/utils/helpers.js ***!
10891 \*****************************************************/
10892 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10893
10894 "use strict";
10895
10896
10897 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10898
10899 Object.defineProperty(exports, "__esModule", ({
10900 value: true
10901 }));
10902 exports["default"] = void 0;
10903
10904 var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
10905
10906 var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
10907
10908 // TODO: Copied from `core/common/assets/js/utils/helpers.js` and modified into static functions.
10909 var Helpers = /*#__PURE__*/function () {
10910 function Helpers() {
10911 (0, _classCallCheck2.default)(this, Helpers);
10912 }
10913
10914 (0, _createClass2.default)(Helpers, null, [{
10915 key: "softDeprecated",
10916 value: function softDeprecated(name, version, replacement) {
10917 if (elementorWebCliConfig.isDebug) {
10918 this.deprecatedMessage('soft', name, version, replacement);
10919 }
10920 }
10921 }, {
10922 key: "hardDeprecated",
10923 value: function hardDeprecated(name, version, replacement) {
10924 this.deprecatedMessage('hard', name, version, replacement);
10925 }
10926 }, {
10927 key: "deprecatedMessage",
10928 value: function deprecatedMessage(type, name, version, replacement) {
10929 var message = "`".concat(name, "` is ").concat(type, " deprecated since ").concat(version);
10930
10931 if (replacement) {
10932 message += " - Use `".concat(replacement, "` instead");
10933 }
10934
10935 this.consoleWarn(message);
10936 }
10937 }, {
10938 key: "consoleWarn",
10939 value: function consoleWarn() {
10940 var _console;
10941
10942 var style = "font-size: 12px; background-image: url(\"".concat(elementorWebCliConfig.urls.assets, "images/logo-icon.png\"); background-repeat: no-repeat; background-size: contain;");
10943
10944 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
10945 args[_key] = arguments[_key];
10946 }
10947
10948 args.unshift('%c %c', style, '');
10949
10950 (_console = console).warn.apply(_console, args); // eslint-disable-line no-console
10951
10952 }
10953 }, {
10954 key: "consoleError",
10955 value: function consoleError(message) {
10956 // TODO: function is part of $e.
10957 // Show an error if devTools is available.
10958 if ($e.devTools) {
10959 $e.devTools.log.error(message);
10960 } // If not a 'Hook-Break' then show error.
10961
10962
10963 if (!(message instanceof $e.modules.HookBreak)) {
10964 // eslint-disable-next-line no-console
10965 console.error(message);
10966 }
10967 }
10968 }, {
10969 key: "deprecatedMethod",
10970 value: function deprecatedMethod(methodName, version, replacement) {
10971 this.deprecatedMessage('hard', methodName, version, replacement); // This itself is deprecated.
10972
10973 this.softDeprecated('Helpers.deprecatedMethod', '2.8.0', 'Helpers.softDeprecated || Helpers.hardDeprecated');
10974 }
10975 }, {
10976 key: "cloneObject",
10977 value: function cloneObject(object) {
10978 return JSON.parse(JSON.stringify(object));
10979 }
10980 }, {
10981 key: "upperCaseWords",
10982 value: function upperCaseWords(string) {
10983 return (string + '').replace(/^(.)|\s+(.)/g, function ($1) {
10984 return $1.toUpperCase();
10985 });
10986 }
10987 }, {
10988 key: "getUniqueId",
10989 value: function getUniqueId() {
10990 return Math.random().toString(16).substr(2, 7);
10991 }
10992 }]);
10993 return Helpers;
10994 }();
10995
10996 exports["default"] = Helpers;
10997
10998 /***/ }),
10999
11000 /***/ "../node_modules/redux-thunk/es/index.js":
11001 /*!***********************************************!*\
11002 !*** ../node_modules/redux-thunk/es/index.js ***!
11003 \***********************************************/
11004 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
11005
11006 "use strict";
11007 __webpack_require__.r(__webpack_exports__);
11008 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11009 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
11010 /* harmony export */ });
11011 /** A function that accepts a potential "extra argument" value to be injected later,
11012 * and returns an instance of the thunk middleware that uses that value
11013 */
11014 function createThunkMiddleware(extraArgument) {
11015 // Standard Redux middleware definition pattern:
11016 // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware
11017 var middleware = function middleware(_ref) {
11018 var dispatch = _ref.dispatch,
11019 getState = _ref.getState;
11020 return function (next) {
11021 return function (action) {
11022 // The thunk middleware looks for any functions that were passed to `store.dispatch`.
11023 // If this "action" is really a function, call it and return the result.
11024 if (typeof action === 'function') {
11025 // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg"
11026 return action(dispatch, getState, extraArgument);
11027 } // Otherwise, pass the action down the middleware chain as usual
11028
11029
11030 return next(action);
11031 };
11032 };
11033 };
11034
11035 return middleware;
11036 }
11037
11038 var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version
11039 // with whatever "extra arg" they want to inject into their thunks
11040
11041 thunk.withExtraArgument = createThunkMiddleware;
11042 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (thunk);
11043
11044 /***/ }),
11045
11046 /***/ "../node_modules/redux/es/redux.js":
11047 /*!*****************************************!*\
11048 !*** ../node_modules/redux/es/redux.js ***!
11049 \*****************************************/
11050 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
11051
11052 "use strict";
11053 __webpack_require__.r(__webpack_exports__);
11054 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11055 /* harmony export */ "__DO_NOT_USE__ActionTypes": () => (/* binding */ ActionTypes),
11056 /* harmony export */ "applyMiddleware": () => (/* binding */ applyMiddleware),
11057 /* harmony export */ "bindActionCreators": () => (/* binding */ bindActionCreators),
11058 /* harmony export */ "combineReducers": () => (/* binding */ combineReducers),
11059 /* harmony export */ "compose": () => (/* binding */ compose),
11060 /* harmony export */ "createStore": () => (/* binding */ createStore),
11061 /* harmony export */ "legacy_createStore": () => (/* binding */ legacy_createStore)
11062 /* harmony export */ });
11063 /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "../node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
11064
11065
11066 /**
11067 * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js
11068 *
11069 * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes
11070 * during build.
11071 * @param {number} code
11072 */
11073 function formatProdErrorMessage(code) {
11074 return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + 'use the non-minified dev environment for full errors. ';
11075 }
11076
11077 // Inlined version of the `symbol-observable` polyfill
11078 var $$observable = (function () {
11079 return typeof Symbol === 'function' && Symbol.observable || '@@observable';
11080 })();
11081
11082 /**
11083 * These are private action types reserved by Redux.
11084 * For any unknown actions, you must return the current state.
11085 * If the current state is undefined, you must return the initial state.
11086 * Do not reference these action types directly in your code.
11087 */
11088 var randomString = function randomString() {
11089 return Math.random().toString(36).substring(7).split('').join('.');
11090 };
11091
11092 var ActionTypes = {
11093 INIT: "@@redux/INIT" + randomString(),
11094 REPLACE: "@@redux/REPLACE" + randomString(),
11095 PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
11096 return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
11097 }
11098 };
11099
11100 /**
11101 * @param {any} obj The object to inspect.
11102 * @returns {boolean} True if the argument appears to be a plain object.
11103 */
11104 function isPlainObject(obj) {
11105 if (typeof obj !== 'object' || obj === null) return false;
11106 var proto = obj;
11107
11108 while (Object.getPrototypeOf(proto) !== null) {
11109 proto = Object.getPrototypeOf(proto);
11110 }
11111
11112 return Object.getPrototypeOf(obj) === proto;
11113 }
11114
11115 // Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of
11116 function miniKindOf(val) {
11117 if (val === void 0) return 'undefined';
11118 if (val === null) return 'null';
11119 var type = typeof val;
11120
11121 switch (type) {
11122 case 'boolean':
11123 case 'string':
11124 case 'number':
11125 case 'symbol':
11126 case 'function':
11127 {
11128 return type;
11129 }
11130 }
11131
11132 if (Array.isArray(val)) return 'array';
11133 if (isDate(val)) return 'date';
11134 if (isError(val)) return 'error';
11135 var constructorName = ctorName(val);
11136
11137 switch (constructorName) {
11138 case 'Symbol':
11139 case 'Promise':
11140 case 'WeakMap':
11141 case 'WeakSet':
11142 case 'Map':
11143 case 'Set':
11144 return constructorName;
11145 } // other
11146
11147
11148 return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
11149 }
11150
11151 function ctorName(val) {
11152 return typeof val.constructor === 'function' ? val.constructor.name : null;
11153 }
11154
11155 function isError(val) {
11156 return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number';
11157 }
11158
11159 function isDate(val) {
11160 if (val instanceof Date) return true;
11161 return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function';
11162 }
11163
11164 function kindOf(val) {
11165 var typeOfVal = typeof val;
11166
11167 if (true) {
11168 typeOfVal = miniKindOf(val);
11169 }
11170
11171 return typeOfVal;
11172 }
11173
11174 /**
11175 * @deprecated
11176 *
11177 * **We recommend using the `configureStore` method
11178 * of the `@reduxjs/toolkit` package**, which replaces `createStore`.
11179 *
11180 * Redux Toolkit is our recommended approach for writing Redux logic today,
11181 * including store setup, reducers, data fetching, and more.
11182 *
11183 * **For more details, please read this Redux docs page:**
11184 * **https://redux.js.org/introduction/why-rtk-is-redux-today**
11185 *
11186 * `configureStore` from Redux Toolkit is an improved version of `createStore` that
11187 * simplifies setup and helps avoid common bugs.
11188 *
11189 * You should not be using the `redux` core package by itself today, except for learning purposes.
11190 * The `createStore` method from the core `redux` package will not be removed, but we encourage
11191 * all users to migrate to using Redux Toolkit for all Redux code.
11192 *
11193 * If you want to use `createStore` without this visual deprecation warning, use
11194 * the `legacy_createStore` import instead:
11195 *
11196 * `import { legacy_createStore as createStore} from 'redux'`
11197 *
11198 */
11199
11200 function createStore(reducer, preloadedState, enhancer) {
11201 var _ref2;
11202
11203 if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
11204 throw new Error( false ? 0 : 'It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.');
11205 }
11206
11207 if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
11208 enhancer = preloadedState;
11209 preloadedState = undefined;
11210 }
11211
11212 if (typeof enhancer !== 'undefined') {
11213 if (typeof enhancer !== 'function') {
11214 throw new Error( false ? 0 : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'");
11215 }
11216
11217 return enhancer(createStore)(reducer, preloadedState);
11218 }
11219
11220 if (typeof reducer !== 'function') {
11221 throw new Error( false ? 0 : "Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'");
11222 }
11223
11224 var currentReducer = reducer;
11225 var currentState = preloadedState;
11226 var currentListeners = [];
11227 var nextListeners = currentListeners;
11228 var isDispatching = false;
11229 /**
11230 * This makes a shallow copy of currentListeners so we can use
11231 * nextListeners as a temporary list while dispatching.
11232 *
11233 * This prevents any bugs around consumers calling
11234 * subscribe/unsubscribe in the middle of a dispatch.
11235 */
11236
11237 function ensureCanMutateNextListeners() {
11238 if (nextListeners === currentListeners) {
11239 nextListeners = currentListeners.slice();
11240 }
11241 }
11242 /**
11243 * Reads the state tree managed by the store.
11244 *
11245 * @returns {any} The current state tree of your application.
11246 */
11247
11248
11249 function getState() {
11250 if (isDispatching) {
11251 throw new Error( false ? 0 : 'You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');
11252 }
11253
11254 return currentState;
11255 }
11256 /**
11257 * Adds a change listener. It will be called any time an action is dispatched,
11258 * and some part of the state tree may potentially have changed. You may then
11259 * call `getState()` to read the current state tree inside the callback.
11260 *
11261 * You may call `dispatch()` from a change listener, with the following
11262 * caveats:
11263 *
11264 * 1. The subscriptions are snapshotted just before every `dispatch()` call.
11265 * If you subscribe or unsubscribe while the listeners are being invoked, this
11266 * will not have any effect on the `dispatch()` that is currently in progress.
11267 * However, the next `dispatch()` call, whether nested or not, will use a more
11268 * recent snapshot of the subscription list.
11269 *
11270 * 2. The listener should not expect to see all state changes, as the state
11271 * might have been updated multiple times during a nested `dispatch()` before
11272 * the listener is called. It is, however, guaranteed that all subscribers
11273 * registered before the `dispatch()` started will be called with the latest
11274 * state by the time it exits.
11275 *
11276 * @param {Function} listener A callback to be invoked on every dispatch.
11277 * @returns {Function} A function to remove this change listener.
11278 */
11279
11280
11281 function subscribe(listener) {
11282 if (typeof listener !== 'function') {
11283 throw new Error( false ? 0 : "Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'");
11284 }
11285
11286 if (isDispatching) {
11287 throw new Error( false ? 0 : 'You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.');
11288 }
11289
11290 var isSubscribed = true;
11291 ensureCanMutateNextListeners();
11292 nextListeners.push(listener);
11293 return function unsubscribe() {
11294 if (!isSubscribed) {
11295 return;
11296 }
11297
11298 if (isDispatching) {
11299 throw new Error( false ? 0 : 'You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.');
11300 }
11301
11302 isSubscribed = false;
11303 ensureCanMutateNextListeners();
11304 var index = nextListeners.indexOf(listener);
11305 nextListeners.splice(index, 1);
11306 currentListeners = null;
11307 };
11308 }
11309 /**
11310 * Dispatches an action. It is the only way to trigger a state change.
11311 *
11312 * The `reducer` function, used to create the store, will be called with the
11313 * current state tree and the given `action`. Its return value will
11314 * be considered the **next** state of the tree, and the change listeners
11315 * will be notified.
11316 *
11317 * The base implementation only supports plain object actions. If you want to
11318 * dispatch a Promise, an Observable, a thunk, or something else, you need to
11319 * wrap your store creating function into the corresponding middleware. For
11320 * example, see the documentation for the `redux-thunk` package. Even the
11321 * middleware will eventually dispatch plain object actions using this method.
11322 *
11323 * @param {Object} action A plain object representing “what changed”. It is
11324 * a good idea to keep actions serializable so you can record and replay user
11325 * sessions, or use the time travelling `redux-devtools`. An action must have
11326 * a `type` property which may not be `undefined`. It is a good idea to use
11327 * string constants for action types.
11328 *
11329 * @returns {Object} For convenience, the same action object you dispatched.
11330 *
11331 * Note that, if you use a custom middleware, it may wrap `dispatch()` to
11332 * return something else (for example, a Promise you can await).
11333 */
11334
11335
11336 function dispatch(action) {
11337 if (!isPlainObject(action)) {
11338 throw new Error( false ? 0 : "Actions must be plain objects. Instead, the actual type was: '" + kindOf(action) + "'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");
11339 }
11340
11341 if (typeof action.type === 'undefined') {
11342 throw new Error( false ? 0 : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');
11343 }
11344
11345 if (isDispatching) {
11346 throw new Error( false ? 0 : 'Reducers may not dispatch actions.');
11347 }
11348
11349 try {
11350 isDispatching = true;
11351 currentState = currentReducer(currentState, action);
11352 } finally {
11353 isDispatching = false;
11354 }
11355
11356 var listeners = currentListeners = nextListeners;
11357
11358 for (var i = 0; i < listeners.length; i++) {
11359 var listener = listeners[i];
11360 listener();
11361 }
11362
11363 return action;
11364 }
11365 /**
11366 * Replaces the reducer currently used by the store to calculate the state.
11367 *
11368 * You might need this if your app implements code splitting and you want to
11369 * load some of the reducers dynamically. You might also need this if you
11370 * implement a hot reloading mechanism for Redux.
11371 *
11372 * @param {Function} nextReducer The reducer for the store to use instead.
11373 * @returns {void}
11374 */
11375
11376
11377 function replaceReducer(nextReducer) {
11378 if (typeof nextReducer !== 'function') {
11379 throw new Error( false ? 0 : "Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer));
11380 }
11381
11382 currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.
11383 // Any reducers that existed in both the new and old rootReducer
11384 // will receive the previous state. This effectively populates
11385 // the new state tree with any relevant data from the old one.
11386
11387 dispatch({
11388 type: ActionTypes.REPLACE
11389 });
11390 }
11391 /**
11392 * Interoperability point for observable/reactive libraries.
11393 * @returns {observable} A minimal observable of state changes.
11394 * For more information, see the observable proposal:
11395 * https://github.com/tc39/proposal-observable
11396 */
11397
11398
11399 function observable() {
11400 var _ref;
11401
11402 var outerSubscribe = subscribe;
11403 return _ref = {
11404 /**
11405 * The minimal observable subscription method.
11406 * @param {Object} observer Any object that can be used as an observer.
11407 * The observer object should have a `next` method.
11408 * @returns {subscription} An object with an `unsubscribe` method that can
11409 * be used to unsubscribe the observable from the store, and prevent further
11410 * emission of values from the observable.
11411 */
11412 subscribe: function subscribe(observer) {
11413 if (typeof observer !== 'object' || observer === null) {
11414 throw new Error( false ? 0 : "Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'");
11415 }
11416
11417 function observeState() {
11418 if (observer.next) {
11419 observer.next(getState());
11420 }
11421 }
11422
11423 observeState();
11424 var unsubscribe = outerSubscribe(observeState);
11425 return {
11426 unsubscribe: unsubscribe
11427 };
11428 }
11429 }, _ref[$$observable] = function () {
11430 return this;
11431 }, _ref;
11432 } // When a store is created, an "INIT" action is dispatched so that every
11433 // reducer returns their initial state. This effectively populates
11434 // the initial state tree.
11435
11436
11437 dispatch({
11438 type: ActionTypes.INIT
11439 });
11440 return _ref2 = {
11441 dispatch: dispatch,
11442 subscribe: subscribe,
11443 getState: getState,
11444 replaceReducer: replaceReducer
11445 }, _ref2[$$observable] = observable, _ref2;
11446 }
11447 /**
11448 * Creates a Redux store that holds the state tree.
11449 *
11450 * **We recommend using `configureStore` from the
11451 * `@reduxjs/toolkit` package**, which replaces `createStore`:
11452 * **https://redux.js.org/introduction/why-rtk-is-redux-today**
11453 *
11454 * The only way to change the data in the store is to call `dispatch()` on it.
11455 *
11456 * There should only be a single store in your app. To specify how different
11457 * parts of the state tree respond to actions, you may combine several reducers
11458 * into a single reducer function by using `combineReducers`.
11459 *
11460 * @param {Function} reducer A function that returns the next state tree, given
11461 * the current state tree and the action to handle.
11462 *
11463 * @param {any} [preloadedState] The initial state. You may optionally specify it
11464 * to hydrate the state from the server in universal apps, or to restore a
11465 * previously serialized user session.
11466 * If you use `combineReducers` to produce the root reducer function, this must be
11467 * an object with the same shape as `combineReducers` keys.
11468 *
11469 * @param {Function} [enhancer] The store enhancer. You may optionally specify it
11470 * to enhance the store with third-party capabilities such as middleware,
11471 * time travel, persistence, etc. The only store enhancer that ships with Redux
11472 * is `applyMiddleware()`.
11473 *
11474 * @returns {Store} A Redux store that lets you read the state, dispatch actions
11475 * and subscribe to changes.
11476 */
11477
11478 var legacy_createStore = createStore;
11479
11480 /**
11481 * Prints a warning in the console if it exists.
11482 *
11483 * @param {String} message The warning message.
11484 * @returns {void}
11485 */
11486 function warning(message) {
11487 /* eslint-disable no-console */
11488 if (typeof console !== 'undefined' && typeof console.error === 'function') {
11489 console.error(message);
11490 }
11491 /* eslint-enable no-console */
11492
11493
11494 try {
11495 // This error was thrown as a convenience so that if you enable
11496 // "break on all exceptions" in your console,
11497 // it would pause the execution at this line.
11498 throw new Error(message);
11499 } catch (e) {} // eslint-disable-line no-empty
11500
11501 }
11502
11503 function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
11504 var reducerKeys = Object.keys(reducers);
11505 var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
11506
11507 if (reducerKeys.length === 0) {
11508 return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
11509 }
11510
11511 if (!isPlainObject(inputState)) {
11512 return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
11513 }
11514
11515 var unexpectedKeys = Object.keys(inputState).filter(function (key) {
11516 return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
11517 });
11518 unexpectedKeys.forEach(function (key) {
11519 unexpectedKeyCache[key] = true;
11520 });
11521 if (action && action.type === ActionTypes.REPLACE) return;
11522
11523 if (unexpectedKeys.length > 0) {
11524 return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored.");
11525 }
11526 }
11527
11528 function assertReducerShape(reducers) {
11529 Object.keys(reducers).forEach(function (key) {
11530 var reducer = reducers[key];
11531 var initialState = reducer(undefined, {
11532 type: ActionTypes.INIT
11533 });
11534
11535 if (typeof initialState === 'undefined') {
11536 throw new Error( false ? 0 : "The slice reducer for key \"" + key + "\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don't want to set a value for this reducer, " + "you can use null instead of undefined.");
11537 }
11538
11539 if (typeof reducer(undefined, {
11540 type: ActionTypes.PROBE_UNKNOWN_ACTION()
11541 }) === 'undefined') {
11542 throw new Error( false ? 0 : "The slice reducer for key \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle '" + ActionTypes.INIT + "' or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null.");
11543 }
11544 });
11545 }
11546 /**
11547 * Turns an object whose values are different reducer functions, into a single
11548 * reducer function. It will call every child reducer, and gather their results
11549 * into a single state object, whose keys correspond to the keys of the passed
11550 * reducer functions.
11551 *
11552 * @param {Object} reducers An object whose values correspond to different
11553 * reducer functions that need to be combined into one. One handy way to obtain
11554 * it is to use ES6 `import * as reducers` syntax. The reducers may never return
11555 * undefined for any action. Instead, they should return their initial state
11556 * if the state passed to them was undefined, and the current state for any
11557 * unrecognized action.
11558 *
11559 * @returns {Function} A reducer function that invokes every reducer inside the
11560 * passed object, and builds a state object with the same shape.
11561 */
11562
11563
11564 function combineReducers(reducers) {
11565 var reducerKeys = Object.keys(reducers);
11566 var finalReducers = {};
11567
11568 for (var i = 0; i < reducerKeys.length; i++) {
11569 var key = reducerKeys[i];
11570
11571 if (true) {
11572 if (typeof reducers[key] === 'undefined') {
11573 warning("No reducer provided for key \"" + key + "\"");
11574 }
11575 }
11576
11577 if (typeof reducers[key] === 'function') {
11578 finalReducers[key] = reducers[key];
11579 }
11580 }
11581
11582 var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same
11583 // keys multiple times.
11584
11585 var unexpectedKeyCache;
11586
11587 if (true) {
11588 unexpectedKeyCache = {};
11589 }
11590
11591 var shapeAssertionError;
11592
11593 try {
11594 assertReducerShape(finalReducers);
11595 } catch (e) {
11596 shapeAssertionError = e;
11597 }
11598
11599 return function combination(state, action) {
11600 if (state === void 0) {
11601 state = {};
11602 }
11603
11604 if (shapeAssertionError) {
11605 throw shapeAssertionError;
11606 }
11607
11608 if (true) {
11609 var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
11610
11611 if (warningMessage) {
11612 warning(warningMessage);
11613 }
11614 }
11615
11616 var hasChanged = false;
11617 var nextState = {};
11618
11619 for (var _i = 0; _i < finalReducerKeys.length; _i++) {
11620 var _key = finalReducerKeys[_i];
11621 var reducer = finalReducers[_key];
11622 var previousStateForKey = state[_key];
11623 var nextStateForKey = reducer(previousStateForKey, action);
11624
11625 if (typeof nextStateForKey === 'undefined') {
11626 var actionType = action && action.type;
11627 throw new Error( false ? 0 : "When called with an action of type " + (actionType ? "\"" + String(actionType) + "\"" : '(unknown type)') + ", the slice reducer for key \"" + _key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined.");
11628 }
11629
11630 nextState[_key] = nextStateForKey;
11631 hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
11632 }
11633
11634 hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
11635 return hasChanged ? nextState : state;
11636 };
11637 }
11638
11639 function bindActionCreator(actionCreator, dispatch) {
11640 return function () {
11641 return dispatch(actionCreator.apply(this, arguments));
11642 };
11643 }
11644 /**
11645 * Turns an object whose values are action creators, into an object with the
11646 * same keys, but with every function wrapped into a `dispatch` call so they
11647 * may be invoked directly. This is just a convenience method, as you can call
11648 * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
11649 *
11650 * For convenience, you can also pass an action creator as the first argument,
11651 * and get a dispatch wrapped function in return.
11652 *
11653 * @param {Function|Object} actionCreators An object whose values are action
11654 * creator functions. One handy way to obtain it is to use ES6 `import * as`
11655 * syntax. You may also pass a single function.
11656 *
11657 * @param {Function} dispatch The `dispatch` function available on your Redux
11658 * store.
11659 *
11660 * @returns {Function|Object} The object mimicking the original object, but with
11661 * every action creator wrapped into the `dispatch` call. If you passed a
11662 * function as `actionCreators`, the return value will also be a single
11663 * function.
11664 */
11665
11666
11667 function bindActionCreators(actionCreators, dispatch) {
11668 if (typeof actionCreators === 'function') {
11669 return bindActionCreator(actionCreators, dispatch);
11670 }
11671
11672 if (typeof actionCreators !== 'object' || actionCreators === null) {
11673 throw new Error( false ? 0 : "bindActionCreators expected an object or a function, but instead received: '" + kindOf(actionCreators) + "'. " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?");
11674 }
11675
11676 var boundActionCreators = {};
11677
11678 for (var key in actionCreators) {
11679 var actionCreator = actionCreators[key];
11680
11681 if (typeof actionCreator === 'function') {
11682 boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
11683 }
11684 }
11685
11686 return boundActionCreators;
11687 }
11688
11689 /**
11690 * Composes single-argument functions from right to left. The rightmost
11691 * function can take multiple arguments as it provides the signature for
11692 * the resulting composite function.
11693 *
11694 * @param {...Function} funcs The functions to compose.
11695 * @returns {Function} A function obtained by composing the argument functions
11696 * from right to left. For example, compose(f, g, h) is identical to doing
11697 * (...args) => f(g(h(...args))).
11698 */
11699 function compose() {
11700 for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
11701 funcs[_key] = arguments[_key];
11702 }
11703
11704 if (funcs.length === 0) {
11705 return function (arg) {
11706 return arg;
11707 };
11708 }
11709
11710 if (funcs.length === 1) {
11711 return funcs[0];
11712 }
11713
11714 return funcs.reduce(function (a, b) {
11715 return function () {
11716 return a(b.apply(void 0, arguments));
11717 };
11718 });
11719 }
11720
11721 /**
11722 * Creates a store enhancer that applies middleware to the dispatch method
11723 * of the Redux store. This is handy for a variety of tasks, such as expressing
11724 * asynchronous actions in a concise manner, or logging every action payload.
11725 *
11726 * See `redux-thunk` package as an example of the Redux middleware.
11727 *
11728 * Because middleware is potentially asynchronous, this should be the first
11729 * store enhancer in the composition chain.
11730 *
11731 * Note that each middleware will be given the `dispatch` and `getState` functions
11732 * as named arguments.
11733 *
11734 * @param {...Function} middlewares The middleware chain to be applied.
11735 * @returns {Function} A store enhancer applying the middleware.
11736 */
11737
11738 function applyMiddleware() {
11739 for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
11740 middlewares[_key] = arguments[_key];
11741 }
11742
11743 return function (createStore) {
11744 return function () {
11745 var store = createStore.apply(void 0, arguments);
11746
11747 var _dispatch = function dispatch() {
11748 throw new Error( false ? 0 : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
11749 };
11750
11751 var middlewareAPI = {
11752 getState: store.getState,
11753 dispatch: function dispatch() {
11754 return _dispatch.apply(void 0, arguments);
11755 }
11756 };
11757 var chain = middlewares.map(function (middleware) {
11758 return middleware(middlewareAPI);
11759 });
11760 _dispatch = compose.apply(void 0, chain)(store.dispatch);
11761 return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, store), {}, {
11762 dispatch: _dispatch
11763 });
11764 };
11765 };
11766 }
11767
11768 /*
11769 * This is a dummy function to check if the function name has been altered by minification.
11770 * If the function has been minified and NODE_ENV !== 'production', warn the user.
11771 */
11772
11773 function isCrushed() {}
11774
11775 if ( true && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
11776 warning('You are currently using minified code outside of NODE_ENV === "production". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.');
11777 }
11778
11779
11780
11781
11782 /***/ }),
11783
11784 /***/ "../node_modules/reselect/es/defaultMemoize.js":
11785 /*!*****************************************************!*\
11786 !*** ../node_modules/reselect/es/defaultMemoize.js ***!
11787 \*****************************************************/
11788 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
11789
11790 "use strict";
11791 __webpack_require__.r(__webpack_exports__);
11792 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11793 /* harmony export */ "createCacheKeyComparator": () => (/* binding */ createCacheKeyComparator),
11794 /* harmony export */ "defaultEqualityCheck": () => (/* binding */ defaultEqualityCheck),
11795 /* harmony export */ "defaultMemoize": () => (/* binding */ defaultMemoize)
11796 /* harmony export */ });
11797 // Cache implementation based on Erik Rasmussen's `lru-memoize`:
11798 // https://github.com/erikras/lru-memoize
11799 var NOT_FOUND = 'NOT_FOUND';
11800
11801 function createSingletonCache(equals) {
11802 var entry;
11803 return {
11804 get: function get(key) {
11805 if (entry && equals(entry.key, key)) {
11806 return entry.value;
11807 }
11808
11809 return NOT_FOUND;
11810 },
11811 put: function put(key, value) {
11812 entry = {
11813 key: key,
11814 value: value
11815 };
11816 },
11817 getEntries: function getEntries() {
11818 return entry ? [entry] : [];
11819 },
11820 clear: function clear() {
11821 entry = undefined;
11822 }
11823 };
11824 }
11825
11826 function createLruCache(maxSize, equals) {
11827 var entries = [];
11828
11829 function get(key) {
11830 var cacheIndex = entries.findIndex(function (entry) {
11831 return equals(key, entry.key);
11832 }); // We found a cached entry
11833
11834 if (cacheIndex > -1) {
11835 var entry = entries[cacheIndex]; // Cached entry not at top of cache, move it to the top
11836
11837 if (cacheIndex > 0) {
11838 entries.splice(cacheIndex, 1);
11839 entries.unshift(entry);
11840 }
11841
11842 return entry.value;
11843 } // No entry found in cache, return sentinel
11844
11845
11846 return NOT_FOUND;
11847 }
11848
11849 function put(key, value) {
11850 if (get(key) === NOT_FOUND) {
11851 // TODO Is unshift slow?
11852 entries.unshift({
11853 key: key,
11854 value: value
11855 });
11856
11857 if (entries.length > maxSize) {
11858 entries.pop();
11859 }
11860 }
11861 }
11862
11863 function getEntries() {
11864 return entries;
11865 }
11866
11867 function clear() {
11868 entries = [];
11869 }
11870
11871 return {
11872 get: get,
11873 put: put,
11874 getEntries: getEntries,
11875 clear: clear
11876 };
11877 }
11878
11879 var defaultEqualityCheck = function defaultEqualityCheck(a, b) {
11880 return a === b;
11881 };
11882 function createCacheKeyComparator(equalityCheck) {
11883 return function areArgumentsShallowlyEqual(prev, next) {
11884 if (prev === null || next === null || prev.length !== next.length) {
11885 return false;
11886 } // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.
11887
11888
11889 var length = prev.length;
11890
11891 for (var i = 0; i < length; i++) {
11892 if (!equalityCheck(prev[i], next[i])) {
11893 return false;
11894 }
11895 }
11896
11897 return true;
11898 };
11899 }
11900 // defaultMemoize now supports a configurable cache size with LRU behavior,
11901 // and optional comparison of the result value with existing values
11902 function defaultMemoize(func, equalityCheckOrOptions) {
11903 var providedOptions = typeof equalityCheckOrOptions === 'object' ? equalityCheckOrOptions : {
11904 equalityCheck: equalityCheckOrOptions
11905 };
11906 var _providedOptions$equa = providedOptions.equalityCheck,
11907 equalityCheck = _providedOptions$equa === void 0 ? defaultEqualityCheck : _providedOptions$equa,
11908 _providedOptions$maxS = providedOptions.maxSize,
11909 maxSize = _providedOptions$maxS === void 0 ? 1 : _providedOptions$maxS,
11910 resultEqualityCheck = providedOptions.resultEqualityCheck;
11911 var comparator = createCacheKeyComparator(equalityCheck);
11912 var cache = maxSize === 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator); // we reference arguments instead of spreading them for performance reasons
11913
11914 function memoized() {
11915 var value = cache.get(arguments);
11916
11917 if (value === NOT_FOUND) {
11918 // @ts-ignore
11919 value = func.apply(null, arguments);
11920
11921 if (resultEqualityCheck) {
11922 var entries = cache.getEntries();
11923 var matchingEntry = entries.find(function (entry) {
11924 return resultEqualityCheck(entry.value, value);
11925 });
11926
11927 if (matchingEntry) {
11928 value = matchingEntry.value;
11929 }
11930 }
11931
11932 cache.put(arguments, value);
11933 }
11934
11935 return value;
11936 }
11937
11938 memoized.clearCache = function () {
11939 return cache.clear();
11940 };
11941
11942 return memoized;
11943 }
11944
11945 /***/ }),
11946
11947 /***/ "../node_modules/reselect/es/index.js":
11948 /*!********************************************!*\
11949 !*** ../node_modules/reselect/es/index.js ***!
11950 \********************************************/
11951 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
11952
11953 "use strict";
11954 __webpack_require__.r(__webpack_exports__);
11955 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11956 /* harmony export */ "createSelector": () => (/* binding */ createSelector),
11957 /* harmony export */ "createSelectorCreator": () => (/* binding */ createSelectorCreator),
11958 /* harmony export */ "createStructuredSelector": () => (/* binding */ createStructuredSelector),
11959 /* harmony export */ "defaultEqualityCheck": () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultEqualityCheck),
11960 /* harmony export */ "defaultMemoize": () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize)
11961 /* harmony export */ });
11962 /* harmony import */ var _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultMemoize */ "../node_modules/reselect/es/defaultMemoize.js");
11963
11964
11965
11966 function getDependencies(funcs) {
11967 var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs;
11968
11969 if (!dependencies.every(function (dep) {
11970 return typeof dep === 'function';
11971 })) {
11972 var dependencyTypes = dependencies.map(function (dep) {
11973 return typeof dep === 'function' ? "function " + (dep.name || 'unnamed') + "()" : typeof dep;
11974 }).join(', ');
11975 throw new Error("createSelector expects all input-selectors to be functions, but received the following types: [" + dependencyTypes + "]");
11976 }
11977
11978 return dependencies;
11979 }
11980
11981 function createSelectorCreator(memoize) {
11982 for (var _len = arguments.length, memoizeOptionsFromArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
11983 memoizeOptionsFromArgs[_key - 1] = arguments[_key];
11984 }
11985
11986 var createSelector = function createSelector() {
11987 for (var _len2 = arguments.length, funcs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
11988 funcs[_key2] = arguments[_key2];
11989 }
11990
11991 var _recomputations = 0;
11992
11993 var _lastResult; // Due to the intricacies of rest params, we can't do an optional arg after `...funcs`.
11994 // So, start by declaring the default value here.
11995 // (And yes, the words 'memoize' and 'options' appear too many times in this next sequence.)
11996
11997
11998 var directlyPassedOptions = {
11999 memoizeOptions: undefined
12000 }; // Normally, the result func or "output selector" is the last arg
12001
12002 var resultFunc = funcs.pop(); // If the result func is actually an _object_, assume it's our options object
12003
12004 if (typeof resultFunc === 'object') {
12005 directlyPassedOptions = resultFunc; // and pop the real result func off
12006
12007 resultFunc = funcs.pop();
12008 }
12009
12010 if (typeof resultFunc !== 'function') {
12011 throw new Error("createSelector expects an output function after the inputs, but received: [" + typeof resultFunc + "]");
12012 } // Determine which set of options we're using. Prefer options passed directly,
12013 // but fall back to options given to createSelectorCreator.
12014
12015
12016 var _directlyPassedOption = directlyPassedOptions,
12017 _directlyPassedOption2 = _directlyPassedOption.memoizeOptions,
12018 memoizeOptions = _directlyPassedOption2 === void 0 ? memoizeOptionsFromArgs : _directlyPassedOption2; // Simplifying assumption: it's unlikely that the first options arg of the provided memoizer
12019 // is an array. In most libs I've looked at, it's an equality function or options object.
12020 // Based on that, if `memoizeOptions` _is_ an array, we assume it's a full
12021 // user-provided array of options. Otherwise, it must be just the _first_ arg, and so
12022 // we wrap it in an array so we can apply it.
12023
12024 var finalMemoizeOptions = Array.isArray(memoizeOptions) ? memoizeOptions : [memoizeOptions];
12025 var dependencies = getDependencies(funcs);
12026 var memoizedResultFunc = memoize.apply(void 0, [function recomputationWrapper() {
12027 _recomputations++; // apply arguments instead of spreading for performance.
12028
12029 return resultFunc.apply(null, arguments);
12030 }].concat(finalMemoizeOptions)); // If a selector is called with the exact same arguments we don't need to traverse our dependencies again.
12031
12032 var selector = memoize(function dependenciesChecker() {
12033 var params = [];
12034 var length = dependencies.length;
12035
12036 for (var i = 0; i < length; i++) {
12037 // apply arguments instead of spreading and mutate a local list of params for performance.
12038 // @ts-ignore
12039 params.push(dependencies[i].apply(null, arguments));
12040 } // apply arguments instead of spreading for performance.
12041
12042
12043 _lastResult = memoizedResultFunc.apply(null, params);
12044 return _lastResult;
12045 });
12046 Object.assign(selector, {
12047 resultFunc: resultFunc,
12048 memoizedResultFunc: memoizedResultFunc,
12049 dependencies: dependencies,
12050 lastResult: function lastResult() {
12051 return _lastResult;
12052 },
12053 recomputations: function recomputations() {
12054 return _recomputations;
12055 },
12056 resetRecomputations: function resetRecomputations() {
12057 return _recomputations = 0;
12058 }
12059 });
12060 return selector;
12061 }; // @ts-ignore
12062
12063
12064 return createSelector;
12065 }
12066 var createSelector = /* #__PURE__ */createSelectorCreator(_defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize);
12067 // Manual definition of state and output arguments
12068 var createStructuredSelector = function createStructuredSelector(selectors, selectorCreator) {
12069 if (selectorCreator === void 0) {
12070 selectorCreator = createSelector;
12071 }
12072
12073 if (typeof selectors !== 'object') {
12074 throw new Error('createStructuredSelector expects first argument to be an object ' + ("where each property is a selector, instead received a " + typeof selectors));
12075 }
12076
12077 var objectKeys = Object.keys(selectors);
12078 var resultSelector = selectorCreator( // @ts-ignore
12079 objectKeys.map(function (key) {
12080 return selectors[key];
12081 }), function () {
12082 for (var _len3 = arguments.length, values = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
12083 values[_key3] = arguments[_key3];
12084 }
12085
12086 return values.reduce(function (composition, value, index) {
12087 composition[objectKeys[index]] = value;
12088 return composition;
12089 }, {});
12090 });
12091 return resultSelector;
12092 };
12093
12094 /***/ }),
12095
12096 /***/ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js":
12097 /*!********************************************************************!*\
12098 !*** ../node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
12099 \********************************************************************/
12100 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12101
12102 "use strict";
12103 __webpack_require__.r(__webpack_exports__);
12104 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12105 /* harmony export */ "default": () => (/* binding */ _defineProperty)
12106 /* harmony export */ });
12107 function _defineProperty(obj, key, value) {
12108 if (key in obj) {
12109 Object.defineProperty(obj, key, {
12110 value: value,
12111 enumerable: true,
12112 configurable: true,
12113 writable: true
12114 });
12115 } else {
12116 obj[key] = value;
12117 }
12118
12119 return obj;
12120 }
12121
12122 /***/ }),
12123
12124 /***/ "../node_modules/@babel/runtime/helpers/esm/objectSpread2.js":
12125 /*!*******************************************************************!*\
12126 !*** ../node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***!
12127 \*******************************************************************/
12128 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12129
12130 "use strict";
12131 __webpack_require__.r(__webpack_exports__);
12132 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12133 /* harmony export */ "default": () => (/* binding */ _objectSpread2)
12134 /* harmony export */ });
12135 /* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty.js */ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js");
12136
12137
12138 function ownKeys(object, enumerableOnly) {
12139 var keys = Object.keys(object);
12140
12141 if (Object.getOwnPropertySymbols) {
12142 var symbols = Object.getOwnPropertySymbols(object);
12143 enumerableOnly && (symbols = symbols.filter(function (sym) {
12144 return Object.getOwnPropertyDescriptor(object, sym).enumerable;
12145 })), keys.push.apply(keys, symbols);
12146 }
12147
12148 return keys;
12149 }
12150
12151 function _objectSpread2(target) {
12152 for (var i = 1; i < arguments.length; i++) {
12153 var source = null != arguments[i] ? arguments[i] : {};
12154 i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
12155 (0,_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]);
12156 }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
12157 Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
12158 });
12159 }
12160
12161 return target;
12162 }
12163
12164 /***/ }),
12165
12166 /***/ "../node_modules/immer/dist/immer.esm.mjs":
12167 /*!************************************************!*\
12168 !*** ../node_modules/immer/dist/immer.esm.mjs ***!
12169 \************************************************/
12170 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12171
12172 "use strict";
12173 __webpack_require__.r(__webpack_exports__);
12174 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12175 /* harmony export */ "Immer": () => (/* binding */ un),
12176 /* harmony export */ "applyPatches": () => (/* binding */ pn),
12177 /* harmony export */ "castDraft": () => (/* binding */ K),
12178 /* harmony export */ "castImmutable": () => (/* binding */ $),
12179 /* harmony export */ "createDraft": () => (/* binding */ ln),
12180 /* harmony export */ "current": () => (/* binding */ D),
12181 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
12182 /* harmony export */ "enableAllPlugins": () => (/* binding */ J),
12183 /* harmony export */ "enableES5": () => (/* binding */ N),
12184 /* harmony export */ "enableMapSet": () => (/* binding */ C),
12185 /* harmony export */ "enablePatches": () => (/* binding */ T),
12186 /* harmony export */ "finishDraft": () => (/* binding */ dn),
12187 /* harmony export */ "freeze": () => (/* binding */ d),
12188 /* harmony export */ "immerable": () => (/* binding */ L),
12189 /* harmony export */ "isDraft": () => (/* binding */ r),
12190 /* harmony export */ "isDraftable": () => (/* binding */ t),
12191 /* harmony export */ "nothing": () => (/* binding */ H),
12192 /* harmony export */ "original": () => (/* binding */ e),
12193 /* harmony export */ "produce": () => (/* binding */ fn),
12194 /* harmony export */ "produceWithPatches": () => (/* binding */ cn),
12195 /* harmony export */ "setAutoFreeze": () => (/* binding */ sn),
12196 /* harmony export */ "setUseProxies": () => (/* binding */ vn)
12197 /* harmony export */ });
12198 function n(n){for(var r=arguments.length,t=Array(r>1?r-1:0),e=1;e<r;e++)t[e-1]=arguments[e];if(true){var i=Y[n],o=i?"function"==typeof i?i.apply(null,t):i:"unknown error nr: "+n;throw Error("[Immer] "+o)}throw Error("[Immer] minified error nr: "+n+(t.length?" "+t.map((function(n){return"'"+n+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function r(n){return!!n&&!!n[Q]}function t(n){return!!n&&(function(n){if(!n||"object"!=typeof n)return!1;var r=Object.getPrototypeOf(n);if(null===r)return!0;var t=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return t===Object||"function"==typeof t&&Function.toString.call(t)===Z}(n)||Array.isArray(n)||!!n[L]||!!n.constructor[L]||s(n)||v(n))}function e(t){return r(t)||n(23,t),t[Q].t}function i(n,r,t){void 0===t&&(t=!1),0===o(n)?(t?Object.keys:nn)(n).forEach((function(e){t&&"symbol"==typeof e||r(e,n[e],n)})):n.forEach((function(t,e){return r(e,t,n)}))}function o(n){var r=n[Q];return r?r.i>3?r.i-4:r.i:Array.isArray(n)?1:s(n)?2:v(n)?3:0}function u(n,r){return 2===o(n)?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function a(n,r){return 2===o(n)?n.get(r):n[r]}function f(n,r,t){var e=o(n);2===e?n.set(r,t):3===e?(n.delete(r),n.add(t)):n[r]=t}function c(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r}function s(n){return X&&n instanceof Map}function v(n){return q&&n instanceof Set}function p(n){return n.o||n.t}function l(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var r=rn(n);delete r[Q];for(var t=nn(r),e=0;e<t.length;e++){var i=t[e],o=r[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(r[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:n[i]})}return Object.create(Object.getPrototypeOf(n),r)}function d(n,e){return void 0===e&&(e=!1),y(n)||r(n)||!t(n)?n:(o(n)>1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,r){return d(r,!0)}),!0),n)}function h(){n(2)}function y(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function b(r){var t=tn[r];return t||n(18,r),t}function m(n,r){tn[n]||(tn[n]=r)}function _(){return false||U||n(0),U}function j(n,r){r&&(b("Patches"),n.u=[],n.s=[],n.v=r)}function O(n){g(n),n.p.forEach(S),n.p=null}function g(n){n===U&&(U=n.l)}function w(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var r=n[Q];0===r.i||1===r.i?r.j():r.O=!0}function P(r,e){e._=e.p.length;var i=e.p[0],o=void 0!==r&&r!==i;return e.h.g||b("ES5").S(e,r,o),o?(i[Q].P&&(O(e),n(4)),t(r)&&(r=M(e,r),e.l||x(e,r)),e.u&&b("Patches").M(i[Q].t,r,e.u,e.s)):r=M(e,i,[]),O(e),e.u&&e.v(e.u,e.s),r!==H?r:void 0}function M(n,r,t){if(y(r))return r;var e=r[Q];if(!e)return i(r,(function(i,o){return A(n,e,r,i,o,t)}),!0),r;if(e.A!==n)return r;if(!e.P)return x(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l(e.k):e.o;i(3===e.i?new Set(o):o,(function(r,i){return A(n,e,o,r,i,t)})),x(n,o,!1),t&&n.u&&b("Patches").R(e,t,n.u,n.s)}return e.o}function A(e,i,o,a,c,s){if( true&&c===o&&n(5),r(c)){var v=M(e,c,s&&i&&3!==i.i&&!u(i.D,a)?s.concat(a):void 0);if(f(o,a,v),!r(v))return;e.m=!1}if(t(c)&&!y(c)){if(!e.h.F&&e._<1)return;M(e,c),i&&i.A.l||x(e,c)}}function x(n,r,t){void 0===t&&(t=!1),n.h.F&&n.m&&d(r,t)}function z(n,r){var t=n[Q];return(t?p(t):n)[r]}function I(n,r){if(r in n)for(var t=Object.getPrototypeOf(n);t;){var e=Object.getOwnPropertyDescriptor(t,r);if(e)return e;t=Object.getPrototypeOf(t)}}function k(n){n.P||(n.P=!0,n.l&&k(n.l))}function E(n){n.o||(n.o=l(n.t))}function R(n,r,t){var e=s(r)?b("MapSet").N(r,t):v(r)?b("MapSet").T(r,t):n.g?function(n,r){var t=Array.isArray(n),e={i:t?1:0,A:r?r.A:_(),P:!1,I:!1,D:{},l:r,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;t&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(r,t):b("ES5").J(r,t);return(t?t.A:_()).p.push(e),e}function D(e){return r(e)||n(22,e),function n(r){if(!t(r))return r;var e,u=r[Q],c=o(r);if(u){if(!u.P&&(u.i<4||!b("ES5").K(u)))return u.t;u.I=!0,e=F(r,c),u.I=!1}else e=F(r,c);return i(e,(function(r,t){u&&a(u.t,r)===t||f(e,r,n(t))})),3===c?new Set(e):e}(e)}function F(n,r){switch(r){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}function N(){function t(n,r){var t=s[n];return t?t.enumerable=r:s[n]=t={configurable:!0,enumerable:r,get:function(){var r=this[Q];return true&&f(r),en.get(r,n)},set:function(r){var t=this[Q]; true&&f(t),en.set(t,n,r)}},t}function e(n){for(var r=n.length-1;r>=0;r--){var t=n[r][Q];if(!t.P)switch(t.i){case 5:a(t)&&k(t);break;case 4:o(t)&&k(t)}}}function o(n){for(var r=n.t,t=n.k,e=nn(t),i=e.length-1;i>=0;i--){var o=e[i];if(o!==Q){var a=r[o];if(void 0===a&&!u(r,o))return!0;var f=t[o],s=f&&f[Q];if(s?s.t!==a:!c(f,a))return!0}}var v=!!r[Q];return e.length!==nn(r).length+(v?0:1)}function a(n){var r=n.k;if(r.length!==n.t.length)return!0;var t=Object.getOwnPropertyDescriptor(r,r.length-1);if(t&&!t.get)return!0;for(var e=0;e<r.length;e++)if(!r.hasOwnProperty(e))return!0;return!1}function f(r){r.O&&n(3,JSON.stringify(p(r)))}var s={};m("ES5",{J:function(n,r){var e=Array.isArray(n),i=function(n,r){if(n){for(var e=Array(r.length),i=0;i<r.length;i++)Object.defineProperty(e,""+i,t(i,!0));return e}var o=rn(r);delete o[Q];for(var u=nn(o),a=0;a<u.length;a++){var f=u[a];o[f]=t(f,n||!!o[f].enumerable)}return Object.create(Object.getPrototypeOf(r),o)}(e,n),o={i:e?5:4,A:r?r.A:_(),P:!1,I:!1,D:{},l:r,t:n,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,Q,{value:o,writable:!0}),i},S:function(n,t,o){o?r(t)&&t[Q].A===n&&e(n.p):(n.u&&function n(r){if(r&&"object"==typeof r){var t=r[Q];if(t){var e=t.t,o=t.k,f=t.D,c=t.i;if(4===c)i(o,(function(r){r!==Q&&(void 0!==e[r]||u(e,r)?f[r]||n(o[r]):(f[r]=!0,k(t)))})),i(e,(function(n){void 0!==o[n]||u(o,n)||(f[n]=!1,k(t))}));else if(5===c){if(a(t)&&(k(t),f.length=!0),o.length<e.length)for(var s=o.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<o.length;v++)f[v]=!0;for(var p=Math.min(o.length,e.length),l=0;l<p;l++)o.hasOwnProperty(l)||(f[l]=!0),void 0===f[l]&&n(o[l])}}}}(n.p[0]),e(n.p))},K:function(n){return 4===n.i?o(n):a(n)}})}function T(){function e(n){if(!t(n))return n;if(Array.isArray(n))return n.map(e);if(s(n))return new Map(Array.from(n.entries()).map((function(n){return[n[0],e(n[1])]})));if(v(n))return new Set(Array.from(n).map(e));var r=Object.create(Object.getPrototypeOf(n));for(var i in n)r[i]=e(n[i]);return u(n,L)&&(r[L]=n[L]),r}function f(n){return r(n)?e(n):n}var c="add";m("Patches",{$:function(r,t){return t.forEach((function(t){for(var i=t.path,u=t.op,f=r,s=0;s<i.length-1;s++){var v=o(f),p=""+i[s];0!==v&&1!==v||"__proto__"!==p&&"constructor"!==p||n(24),"function"==typeof f&&"prototype"===p&&n(24),"object"!=typeof(f=a(f,p))&&n(15,i.join("/"))}var l=o(f),d=e(t.value),h=i[i.length-1];switch(u){case"replace":switch(l){case 2:return f.set(h,d);case 3:n(16);default:return f[h]=d}case c:switch(l){case 1:return"-"===h?f.push(d):f.splice(h,0,d);case 2:return f.set(h,d);case 3:return f.add(d);default:return f[h]=d}case"remove":switch(l){case 1:return f.splice(h,1);case 2:return f.delete(h);case 3:return f.delete(t.value);default:return delete f[h]}default:n(17,u)}})),r},R:function(n,r,t,e){switch(n.i){case 0:case 4:case 2:return function(n,r,t,e){var o=n.t,s=n.o;i(n.D,(function(n,i){var v=a(o,n),p=a(s,n),l=i?u(o,n)?"replace":c:"remove";if(v!==p||"replace"!==l){var d=r.concat(n);t.push("remove"===l?{op:l,path:d}:{op:l,path:d,value:p}),e.push(l===c?{op:"remove",path:d}:"remove"===l?{op:c,path:d,value:f(v)}:{op:"replace",path:d,value:f(v)})}}))}(n,r,t,e);case 5:case 1:return function(n,r,t,e){var i=n.t,o=n.D,u=n.o;if(u.length<i.length){var a=[u,i];i=a[0],u=a[1];var s=[e,t];t=s[0],e=s[1]}for(var v=0;v<i.length;v++)if(o[v]&&u[v]!==i[v]){var p=r.concat([v]);t.push({op:"replace",path:p,value:f(u[v])}),e.push({op:"replace",path:p,value:f(i[v])})}for(var l=i.length;l<u.length;l++){var d=r.concat([l]);t.push({op:c,path:d,value:f(u[l])})}i.length<u.length&&e.push({op:"replace",path:r.concat(["length"]),value:i.length})}(n,r,t,e);case 3:return function(n,r,t,e){var i=n.t,o=n.o,u=0;i.forEach((function(n){if(!o.has(n)){var i=r.concat([u]);t.push({op:"remove",path:i,value:n}),e.unshift({op:c,path:i,value:n})}u++})),u=0,o.forEach((function(n){if(!i.has(n)){var o=r.concat([u]);t.push({op:c,path:o,value:n}),e.unshift({op:"remove",path:o,value:n})}u++}))}(n,r,t,e)}},M:function(n,r,t,e){t.push({op:"replace",path:[],value:r===H?void 0:r}),e.push({op:"replace",path:[],value:n})}})}function C(){function r(n,r){function t(){this.constructor=n}a(n,r),n.prototype=(t.prototype=r.prototype,new t)}function e(n){n.o||(n.D=new Map,n.o=new Map(n.t))}function o(n){n.o||(n.o=new Set,n.t.forEach((function(r){if(t(r)){var e=R(n.A.h,r,n);n.p.set(r,e),n.o.add(e)}else n.o.add(r)})))}function u(r){r.O&&n(3,JSON.stringify(p(r)))}var a=function(n,r){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var t in r)r.hasOwnProperty(t)&&(n[t]=r[t])})(n,r)},f=function(){function n(n,r){return this[Q]={i:2,l:r,A:r?r.A:_(),P:!1,I:!1,o:void 0,D:void 0,t:n,k:this,C:!1,O:!1},this}r(n,Map);var o=n.prototype;return Object.defineProperty(o,"size",{get:function(){return p(this[Q]).size}}),o.has=function(n){return p(this[Q]).has(n)},o.set=function(n,r){var t=this[Q];return u(t),p(t).has(n)&&p(t).get(n)===r||(e(t),k(t),t.D.set(n,!0),t.o.set(n,r),t.D.set(n,!0)),this},o.delete=function(n){if(!this.has(n))return!1;var r=this[Q];return u(r),e(r),k(r),r.t.has(n)?r.D.set(n,!1):r.D.delete(n),r.o.delete(n),!0},o.clear=function(){var n=this[Q];u(n),p(n).size&&(e(n),k(n),n.D=new Map,i(n.t,(function(r){n.D.set(r,!1)})),n.o.clear())},o.forEach=function(n,r){var t=this;p(this[Q]).forEach((function(e,i){n.call(r,t.get(i),i,t)}))},o.get=function(n){var r=this[Q];u(r);var i=p(r).get(n);if(r.I||!t(i))return i;if(i!==r.t.get(n))return i;var o=R(r.A.h,i,r);return e(r),r.o.set(n,o),o},o.keys=function(){return p(this[Q]).keys()},o.values=function(){var n,r=this,t=this.keys();return(n={})[V]=function(){return r.values()},n.next=function(){var n=t.next();return n.done?n:{done:!1,value:r.get(n.value)}},n},o.entries=function(){var n,r=this,t=this.keys();return(n={})[V]=function(){return r.entries()},n.next=function(){var n=t.next();if(n.done)return n;var e=r.get(n.value);return{done:!1,value:[n.value,e]}},n},o[V]=function(){return this.entries()},n}(),c=function(){function n(n,r){return this[Q]={i:3,l:r,A:r?r.A:_(),P:!1,I:!1,o:void 0,t:n,k:this,p:new Map,O:!1,C:!1},this}r(n,Set);var t=n.prototype;return Object.defineProperty(t,"size",{get:function(){return p(this[Q]).size}}),t.has=function(n){var r=this[Q];return u(r),r.o?!!r.o.has(n)||!(!r.p.has(n)||!r.o.has(r.p.get(n))):r.t.has(n)},t.add=function(n){var r=this[Q];return u(r),this.has(n)||(o(r),k(r),r.o.add(n)),this},t.delete=function(n){if(!this.has(n))return!1;var r=this[Q];return u(r),o(r),k(r),r.o.delete(n)||!!r.p.has(n)&&r.o.delete(r.p.get(n))},t.clear=function(){var n=this[Q];u(n),p(n).size&&(o(n),k(n),n.o.clear())},t.values=function(){var n=this[Q];return u(n),o(n),n.o.values()},t.entries=function(){var n=this[Q];return u(n),o(n),n.o.entries()},t.keys=function(){return this.values()},t[V]=function(){return this.values()},t.forEach=function(n,r){for(var t=this.values(),e=t.next();!e.done;)n.call(r,e.value,e.value,this),e=t.next()},n}();m("MapSet",{N:function(n,r){return new f(n,r)},T:function(n,r){return new c(n,r)}})}function J(){N(),C(),T()}function K(n){return n}function $(n){return n}var G,U,W="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),X="undefined"!=typeof Map,q="undefined"!=typeof Set,B="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H=W?Symbol.for("immer-nothing"):((G={})["immer-nothing"]=!0,G),L=W?Symbol.for("immer-draftable"):"__$immer_draftable",Q=W?Symbol.for("immer-state"):"__$immer_state",V="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",Y={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(n){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(n){return"Cannot apply patch, path doesn't resolve: "+n},16:'Sets cannot have "replace" patches.',17:function(n){return"Unsupported patch operation: "+n},18:function(n){return"The plugin for '"+n+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+n+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(n){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+n+"'"},22:function(n){return"'current' expects a draft, got: "+n},23:function(n){return"'original' expects a draft, got: "+n},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},Z=""+Object.prototype.constructor,nn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,rn=Object.getOwnPropertyDescriptors||function(n){var r={};return nn(n).forEach((function(t){r[t]=Object.getOwnPropertyDescriptor(n,t)})),r},tn={},en={get:function(n,r){if(r===Q)return n;var e=p(n);if(!u(e,r))return function(n,r,t){var e,i=I(r,t);return i?"value"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(n.k):void 0}(n,e,r);var i=e[r];return n.I||!t(i)?i:i===z(n.t,r)?(E(n),n.o[r]=R(n.A.h,i,n)):i},has:function(n,r){return r in p(n)},ownKeys:function(n){return Reflect.ownKeys(p(n))},set:function(n,r,t){var e=I(p(n),r);if(null==e?void 0:e.set)return e.set.call(n.k,t),!0;if(!n.P){var i=z(p(n),r),o=null==i?void 0:i[Q];if(o&&o.t===t)return n.o[r]=t,n.D[r]=!1,!0;if(c(t,i)&&(void 0!==t||u(n.t,r)))return!0;E(n),k(n)}return n.o[r]===t&&"number"!=typeof t&&(void 0!==t||r in n.o)||(n.o[r]=t,n.D[r]=!0,!0)},deleteProperty:function(n,r){return void 0!==z(n.t,r)||r in n.t?(n.D[r]=!1,E(n),k(n)):delete n.D[r],n.o&&delete n.o[r],!0},getOwnPropertyDescriptor:function(n,r){var t=p(n),e=Reflect.getOwnPropertyDescriptor(t,r);return e?{writable:!0,configurable:1!==n.i||"length"!==r,enumerable:e.enumerable,value:t[r]}:e},defineProperty:function(){n(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n(12)}},on={};i(en,(function(n,r){on[n]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}})),on.deleteProperty=function(r,t){return true&&isNaN(parseInt(t))&&n(13),on.set.call(this,r,t,void 0)},on.set=function(r,t,e){return true&&"length"!==t&&isNaN(parseInt(t))&&n(14),en.set.call(this,r[0],t,e,r[0])};var un=function(){function e(r){var e=this;this.g=B,this.F=!0,this.produce=function(r,i,o){if("function"==typeof r&&"function"!=typeof i){var u=i;i=r;var a=e;return function(n){var r=this;void 0===n&&(n=u);for(var t=arguments.length,e=Array(t>1?t-1:0),o=1;o<t;o++)e[o-1]=arguments[o];return a.produce(n,(function(n){var t;return(t=i).call.apply(t,[r,n].concat(e))}))}}var f;if("function"!=typeof i&&n(6),void 0!==o&&"function"!=typeof o&&n(7),t(r)){var c=w(e),s=R(e,r,void 0),v=!0;try{f=i(s),v=!1}finally{v?O(c):g(c)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw O(c),n})):(j(c,o),P(f,c))}if(!r||"object"!=typeof r){if(void 0===(f=i(r))&&(f=r),f===H&&(f=void 0),e.F&&d(f,!0),o){var p=[],l=[];b("Patches").M(r,f,p,l),o(p,l)}return f}n(21,r)},this.produceWithPatches=function(n,r){if("function"==typeof n)return function(r){for(var t=arguments.length,i=Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];return e.produceWithPatches(r,(function(r){return n.apply(void 0,[r].concat(i))}))};var t,i,o=e.produce(n,r,(function(n,r){t=n,i=r}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(n){return[n,t,i]})):[o,t,i]},"boolean"==typeof(null==r?void 0:r.useProxies)&&this.setUseProxies(r.useProxies),"boolean"==typeof(null==r?void 0:r.autoFreeze)&&this.setAutoFreeze(r.autoFreeze)}var i=e.prototype;return i.createDraft=function(e){t(e)||n(8),r(e)&&(e=D(e));var i=w(this),o=R(this,e,void 0);return o[Q].C=!0,g(i),o},i.finishDraft=function(r,t){var e=r&&r[Q]; true&&(e&&e.C||n(9),e.I&&n(10));var i=e.A;return j(i,t),P(void 0,i)},i.setAutoFreeze=function(n){this.F=n},i.setUseProxies=function(r){r&&!B&&n(20),this.g=r},i.applyPatches=function(n,t){var e;for(e=t.length-1;e>=0;e--){var i=t[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}e>-1&&(t=t.slice(e+1));var o=b("Patches").$;return r(n)?o(n,t):this.produce(n,(function(n){return o(n,t)}))},e}(),an=new un,fn=an.produce,cn=an.produceWithPatches.bind(an),sn=an.setAutoFreeze.bind(an),vn=an.setUseProxies.bind(an),pn=an.applyPatches.bind(an),ln=an.createDraft.bind(an),dn=an.finishDraft.bind(an);/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (fn);
12199 //# sourceMappingURL=immer.esm.js.map
12200
12201
12202 /***/ })
12203
12204 /******/ });
12205 /************************************************************************/
12206 /******/ // The module cache
12207 /******/ var __webpack_module_cache__ = {};
12208 /******/
12209 /******/ // The require function
12210 /******/ function __webpack_require__(moduleId) {
12211 /******/ // Check if module is in cache
12212 /******/ var cachedModule = __webpack_module_cache__[moduleId];
12213 /******/ if (cachedModule !== undefined) {
12214 /******/ return cachedModule.exports;
12215 /******/ }
12216 /******/ // Create a new module (and put it into the cache)
12217 /******/ var module = __webpack_module_cache__[moduleId] = {
12218 /******/ // no module.id needed
12219 /******/ // no module.loaded needed
12220 /******/ exports: {}
12221 /******/ };
12222 /******/
12223 /******/ // Execute the module function
12224 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
12225 /******/
12226 /******/ // Return the exports of the module
12227 /******/ return module.exports;
12228 /******/ }
12229 /******/
12230 /************************************************************************/
12231 /******/ /* webpack/runtime/define property getters */
12232 /******/ (() => {
12233 /******/ // define getter functions for harmony exports
12234 /******/ __webpack_require__.d = (exports, definition) => {
12235 /******/ for(var key in definition) {
12236 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
12237 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
12238 /******/ }
12239 /******/ }
12240 /******/ };
12241 /******/ })();
12242 /******/
12243 /******/ /* webpack/runtime/hasOwnProperty shorthand */
12244 /******/ (() => {
12245 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
12246 /******/ })();
12247 /******/
12248 /******/ /* webpack/runtime/make namespace object */
12249 /******/ (() => {
12250 /******/ // define __esModule on exports
12251 /******/ __webpack_require__.r = (exports) => {
12252 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
12253 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
12254 /******/ }
12255 /******/ Object.defineProperty(exports, '__esModule', { value: true });
12256 /******/ };
12257 /******/ })();
12258 /******/
12259 /************************************************************************/
12260 var __webpack_exports__ = {};
12261 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
12262 (() => {
12263 "use strict";
12264 /*!*********************************************!*\
12265 !*** ../modules/web-cli/assets/js/index.js ***!
12266 \*********************************************/
12267
12268
12269 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
12270
12271 var _api = _interopRequireDefault(__webpack_require__(/*! ./api */ "../modules/web-cli/assets/js/api.js"));
12272
12273 window.$e = new _api.default();
12274 })();
12275
12276 /******/ })()
12277 ;
12278 //# sourceMappingURL=web-cli.js.map