geno/wp-content/plugins/elementor/assets/js/common-modules.js

6641 lines
296 KiB
JavaScript
Raw Normal View History

2024-02-01 17:24:18 +05:30
/*! elementor - v3.18.0 - 20-12-2023 */
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js":
/*!******************************************************************!*\
!*** ../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js ***!
\******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ EnhancerArray: () => (/* binding */ EnhancerArray),
/* harmony export */ MiddlewareArray: () => (/* binding */ MiddlewareArray),
/* harmony export */ SHOULD_AUTOBATCH: () => (/* binding */ SHOULD_AUTOBATCH),
/* harmony export */ TaskAbortError: () => (/* binding */ TaskAbortError),
/* harmony export */ __DO_NOT_USE__ActionTypes: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.__DO_NOT_USE__ActionTypes),
/* harmony export */ addListener: () => (/* binding */ addListener),
/* harmony export */ applyMiddleware: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware),
/* harmony export */ autoBatchEnhancer: () => (/* binding */ autoBatchEnhancer),
/* harmony export */ bindActionCreators: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.bindActionCreators),
/* harmony export */ clearAllListeners: () => (/* binding */ clearAllListeners),
/* harmony export */ combineReducers: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers),
/* harmony export */ compose: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.compose),
/* harmony export */ configureStore: () => (/* binding */ configureStore),
/* harmony export */ createAction: () => (/* binding */ createAction),
/* harmony export */ createActionCreatorInvariantMiddleware: () => (/* binding */ createActionCreatorInvariantMiddleware),
/* harmony export */ createAsyncThunk: () => (/* binding */ createAsyncThunk),
/* harmony export */ createDraftSafeSelector: () => (/* binding */ createDraftSafeSelector),
/* harmony export */ createEntityAdapter: () => (/* binding */ createEntityAdapter),
/* harmony export */ createImmutableStateInvariantMiddleware: () => (/* binding */ createImmutableStateInvariantMiddleware),
/* harmony export */ createListenerMiddleware: () => (/* binding */ createListenerMiddleware),
/* harmony export */ createNextState: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__["default"]),
/* harmony export */ createReducer: () => (/* binding */ createReducer),
/* harmony export */ createSelector: () => (/* reexport safe */ reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector),
/* harmony export */ createSerializableStateInvariantMiddleware: () => (/* binding */ createSerializableStateInvariantMiddleware),
/* harmony export */ createSlice: () => (/* binding */ createSlice),
/* harmony export */ createStore: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.createStore),
/* harmony export */ current: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.current),
/* harmony export */ findNonSerializableValue: () => (/* binding */ findNonSerializableValue),
/* harmony export */ freeze: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.freeze),
/* harmony export */ getDefaultMiddleware: () => (/* binding */ getDefaultMiddleware),
/* harmony export */ getType: () => (/* binding */ getType),
/* harmony export */ isAction: () => (/* binding */ isAction),
/* harmony export */ isActionCreator: () => (/* binding */ isActionCreator),
/* harmony export */ isAllOf: () => (/* binding */ isAllOf),
/* harmony export */ isAnyOf: () => (/* binding */ isAnyOf),
/* harmony export */ isAsyncThunkAction: () => (/* binding */ isAsyncThunkAction),
/* harmony export */ isDraft: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.isDraft),
/* harmony export */ isFluxStandardAction: () => (/* binding */ isFSA),
/* harmony export */ isFulfilled: () => (/* binding */ isFulfilled),
/* harmony export */ isImmutableDefault: () => (/* binding */ isImmutableDefault),
/* harmony export */ isPending: () => (/* binding */ isPending),
/* harmony export */ isPlain: () => (/* binding */ isPlain),
/* harmony export */ isPlainObject: () => (/* binding */ isPlainObject),
/* harmony export */ isRejected: () => (/* binding */ isRejected),
/* harmony export */ isRejectedWithValue: () => (/* binding */ isRejectedWithValue),
/* harmony export */ legacy_createStore: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.legacy_createStore),
/* harmony export */ miniSerializeError: () => (/* binding */ miniSerializeError),
/* harmony export */ nanoid: () => (/* binding */ nanoid),
/* harmony export */ original: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.original),
/* harmony export */ prepareAutoBatched: () => (/* binding */ prepareAutoBatched),
/* harmony export */ removeListener: () => (/* binding */ removeListener),
/* harmony export */ unwrapResult: () => (/* binding */ unwrapResult)
/* harmony export */ });
/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! immer */ "../node_modules/@reduxjs/toolkit/node_modules/immer/dist/immer.esm.mjs");
/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux */ "../node_modules/redux/es/redux.js");
/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! reselect */ "../node_modules/reselect/es/index.js");
/* harmony import */ var redux_thunk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! redux-thunk */ "../node_modules/redux-thunk/es/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
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;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; };
var __spreadValues = function (a, b) {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var _i = 0, _c = __getOwnPropSymbols(b); _i < _c.length; _i++) {
var prop = _c[_i];
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); };
var __async = function (__this, __arguments, generator) {
return new Promise(function (resolve, reject) {
var fulfilled = function (value) {
try {
step(generator.next(value));
}
catch (e) {
reject(e);
}
};
var rejected = function (value) {
try {
step(generator.throw(value));
}
catch (e) {
reject(e);
}
};
var step = function (x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); };
step((generator = generator.apply(__this, __arguments)).next());
});
};
// src/index.ts
// src/createDraftSafeSelector.ts
var createDraftSafeSelector = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var selector = reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector.apply(void 0, args);
var wrappedSelector = function (value) {
var rest = [];
for (var _i = 1; _i < arguments.length; _i++) {
rest[_i - 1] = arguments[_i];
}
return selector.apply(void 0, __spreadArray([(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(value) ? (0,immer__WEBPACK_IMPORTED_MODULE_2__.current)(value) : value], rest));
};
return wrappedSelector;
};
// src/configureStore.ts
// src/devtoolsExtension.ts
var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () {
if (arguments.length === 0)
return void 0;
if (typeof arguments[0] === "object")
return redux__WEBPACK_IMPORTED_MODULE_0__.compose;
return redux__WEBPACK_IMPORTED_MODULE_0__.compose.apply(null, arguments);
};
var devToolsEnhancer = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () {
return function (noop2) {
return noop2;
};
};
// src/isPlainObject.ts
function isPlainObject(value) {
if (typeof value !== "object" || value === null)
return false;
var proto = Object.getPrototypeOf(value);
if (proto === null)
return true;
var baseProto = proto;
while (Object.getPrototypeOf(baseProto) !== null) {
baseProto = Object.getPrototypeOf(baseProto);
}
return proto === baseProto;
}
// src/getDefaultMiddleware.ts
// src/tsHelpers.ts
var hasMatchFunction = function (v) {
return v && typeof v.match === "function";
};
// src/createAction.ts
function createAction(type, prepareAction) {
function actionCreator() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (prepareAction) {
var prepared = prepareAction.apply(void 0, args);
if (!prepared) {
throw new Error("prepareAction did not return an object");
}
return __spreadValues(__spreadValues({
type: type,
payload: prepared.payload
}, "meta" in prepared && { meta: prepared.meta }), "error" in prepared && { error: prepared.error });
}
return { type: type, payload: args[0] };
}
actionCreator.toString = function () { return "" + type; };
actionCreator.type = type;
actionCreator.match = function (action) { return action.type === type; };
return actionCreator;
}
function isAction(action) {
return isPlainObject(action) && "type" in action;
}
function isActionCreator(action) {
return typeof action === "function" && "type" in action && hasMatchFunction(action);
}
function isFSA(action) {
return isAction(action) && typeof action.type === "string" && Object.keys(action).every(isValidKey);
}
function isValidKey(key) {
return ["type", "payload", "error", "meta"].indexOf(key) > -1;
}
function getType(actionCreator) {
return "" + actionCreator;
}
// src/actionCreatorInvariantMiddleware.ts
function getMessage(type) {
var splitType = type ? ("" + type).split("/") : [];
var actionName = splitType[splitType.length - 1] || "actionCreator";
return "Detected an action creator with type \"" + (type || "unknown") + "\" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. `dispatch(" + actionName + "())` instead of `dispatch(" + actionName + ")`. This is necessary even if the action has no payload.";
}
function createActionCreatorInvariantMiddleware(options) {
if (options === void 0) { options = {}; }
if (false) {}
var _c = options.isActionCreator, isActionCreator2 = _c === void 0 ? isActionCreator : _c;
return function () { return function (next) { return function (action) {
if (isActionCreator2(action)) {
console.warn(getMessage(action.type));
}
return next(action);
}; }; };
}
// src/utils.ts
function getTimeMeasureUtils(maxDelay, fnName) {
var elapsed = 0;
return {
measureTime: function (fn) {
var started = Date.now();
try {
return fn();
}
finally {
var finished = Date.now();
elapsed += finished - started;
}
},
warnIfExceeded: function () {
if (elapsed > maxDelay) {
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.");
}
}
};
}
var MiddlewareArray = /** @class */ (function (_super) {
__extends(MiddlewareArray, _super);
function MiddlewareArray() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var _this = _super.apply(this, args) || this;
Object.setPrototypeOf(_this, MiddlewareArray.prototype);
return _this;
}
Object.defineProperty(MiddlewareArray, Symbol.species, {
get: function () {
return MiddlewareArray;
},
enumerable: false,
configurable: true
});
MiddlewareArray.prototype.concat = function () {
var arr = [];
for (var _i = 0; _i < arguments.length; _i++) {
arr[_i] = arguments[_i];
}
return _super.prototype.concat.apply(this, arr);
};
MiddlewareArray.prototype.prepend = function () {
var arr = [];
for (var _i = 0; _i < arguments.length; _i++) {
arr[_i] = arguments[_i];
}
if (arr.length === 1 && Array.isArray(arr[0])) {
return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))();
}
return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))();
};
return MiddlewareArray;
}(Array));
var EnhancerArray = /** @class */ (function (_super) {
__extends(EnhancerArray, _super);
function EnhancerArray() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var _this = _super.apply(this, args) || this;
Object.setPrototypeOf(_this, EnhancerArray.prototype);
return _this;
}
Object.defineProperty(EnhancerArray, Symbol.species, {
get: function () {
return EnhancerArray;
},
enumerable: false,
configurable: true
});
EnhancerArray.prototype.concat = function () {
var arr = [];
for (var _i = 0; _i < arguments.length; _i++) {
arr[_i] = arguments[_i];
}
return _super.prototype.concat.apply(this, arr);
};
EnhancerArray.prototype.prepend = function () {
var arr = [];
for (var _i = 0; _i < arguments.length; _i++) {
arr[_i] = arguments[_i];
}
if (arr.length === 1 && Array.isArray(arr[0])) {
return new (EnhancerArray.bind.apply(EnhancerArray, __spreadArray([void 0], arr[0].concat(this))))();
}
return new (EnhancerArray.bind.apply(EnhancerArray, __spreadArray([void 0], arr.concat(this))))();
};
return EnhancerArray;
}(Array));
function freezeDraftable(val) {
return (0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraftable)(val) ? (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(val, function () {
}) : val;
}
// src/immutableStateInvariantMiddleware.ts
var isProduction = "development" === "production";
var prefix = "Invariant failed";
function invariant(condition, message) {
if (condition) {
return;
}
if (isProduction) {
throw new Error(prefix);
}
throw new Error(prefix + ": " + (message || ""));
}
function stringify(obj, serializer, indent, decycler) {
return JSON.stringify(obj, getSerialize(serializer, decycler), indent);
}
function getSerialize(serializer, decycler) {
var stack = [], keys = [];
if (!decycler)
decycler = function (_, value) {
if (stack[0] === value)
return "[Circular ~]";
return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]";
};
return function (key, value) {
if (stack.length > 0) {
var thisPos = stack.indexOf(this);
~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
if (~stack.indexOf(value))
value = decycler.call(this, key, value);
}
else
stack.push(value);
return serializer == null ? value : serializer.call(this, key, value);
};
}
function isImmutableDefault(value) {
return typeof value !== "object" || value == null || Object.isFrozen(value);
}
function trackForMutations(isImmutable, ignorePaths, obj) {
var trackedProperties = trackProperties(isImmutable, ignorePaths, obj);
return {
detectMutations: function () {
return detectMutations(isImmutable, ignorePaths, trackedProperties, obj);
}
};
}
function trackProperties(isImmutable, ignorePaths, obj, path, checkedObjects) {
if (ignorePaths === void 0) { ignorePaths = []; }
if (path === void 0) { path = ""; }
if (checkedObjects === void 0) { checkedObjects = new Set(); }
var tracked = { value: obj };
if (!isImmutable(obj) && !checkedObjects.has(obj)) {
checkedObjects.add(obj);
tracked.children = {};
for (var key in obj) {
var childPath = path ? path + "." + key : key;
if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
continue;
}
tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath);
}
}
return tracked;
}
function detectMutations(isImmutable, ignoredPaths, trackedProperty, obj, sameParentRef, path) {
if (ignoredPaths === void 0) { ignoredPaths = []; }
if (sameParentRef === void 0) { sameParentRef = false; }
if (path === void 0) { path = ""; }
var prevObj = trackedProperty ? trackedProperty.value : void 0;
var sameRef = prevObj === obj;
if (sameParentRef && !sameRef && !Number.isNaN(obj)) {
return { wasMutated: true, path: path };
}
if (isImmutable(prevObj) || isImmutable(obj)) {
return { wasMutated: false };
}
var keysToDetect = {};
for (var key in trackedProperty.children) {
keysToDetect[key] = true;
}
for (var key in obj) {
keysToDetect[key] = true;
}
var hasIgnoredPaths = ignoredPaths.length > 0;
var _loop_1 = function (key) {
var nestedPath = path ? path + "." + key : key;
if (hasIgnoredPaths) {
var hasMatches = ignoredPaths.some(function (ignored) {
if (ignored instanceof RegExp) {
return ignored.test(nestedPath);
}
return nestedPath === ignored;
});
if (hasMatches) {
return "continue";
}
}
var result = detectMutations(isImmutable, ignoredPaths, trackedProperty.children[key], obj[key], sameRef, nestedPath);
if (result.wasMutated) {
return { value: result };
}
};
for (var key in keysToDetect) {
var state_1 = _loop_1(key);
if (typeof state_1 === "object")
return state_1.value;
}
return { wasMutated: false };
}
function createImmutableStateInvariantMiddleware(options) {
if (options === void 0) { options = {}; }
if (false) {}
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;
ignoredPaths = ignoredPaths || ignore;
var track = trackForMutations.bind(null, isImmutable, ignoredPaths);
return function (_c) {
var getState = _c.getState;
var state = getState();
var tracker = track(state);
var result;
return function (next) { return function (action) {
var measureUtils = getTimeMeasureUtils(warnAfter, "ImmutableStateInvariantMiddleware");
measureUtils.measureTime(function () {
state = getState();
result = tracker.detectMutations();
tracker = track(state);
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)");
});
var dispatchedAction = next(action);
measureUtils.measureTime(function () {
state = getState();
result = tracker.detectMutations();
tracker = track(state);
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)");
});
measureUtils.warnIfExceeded();
return dispatchedAction;
}; };
};
}
// src/serializableStateInvariantMiddleware.ts
function isPlain(val) {
var type = typeof val;
return val == null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val);
}
function findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths, cache) {
if (path === void 0) { path = ""; }
if (isSerializable === void 0) { isSerializable = isPlain; }
if (ignoredPaths === void 0) { ignoredPaths = []; }
var foundNestedSerializable;
if (!isSerializable(value)) {
return {
keyPath: path || "<root>",
value: value
};
}
if (typeof value !== "object" || value === null) {
return false;
}
if (cache == null ? void 0 : cache.has(value))
return false;
var entries = getEntries != null ? getEntries(value) : Object.entries(value);
var hasIgnoredPaths = ignoredPaths.length > 0;
var _loop_2 = function (key, nestedValue) {
var nestedPath = path ? path + "." + key : key;
if (hasIgnoredPaths) {
var hasMatches = ignoredPaths.some(function (ignored) {
if (ignored instanceof RegExp) {
return ignored.test(nestedPath);
}
return nestedPath === ignored;
});
if (hasMatches) {
return "continue";
}
}
if (!isSerializable(nestedValue)) {
return { value: {
keyPath: nestedPath,
value: nestedValue
} };
}
if (typeof nestedValue === "object") {
foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths, cache);
if (foundNestedSerializable) {
return { value: foundNestedSerializable };
}
}
};
for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
var _c = entries_1[_i], key = _c[0], nestedValue = _c[1];
var state_2 = _loop_2(key, nestedValue);
if (typeof state_2 === "object")
return state_2.value;
}
if (cache && isNestedFrozen(value))
cache.add(value);
return false;
}
function isNestedFrozen(value) {
if (!Object.isFrozen(value))
return false;
for (var _i = 0, _c = Object.values(value); _i < _c.length; _i++) {
var nestedValue = _c[_i];
if (typeof nestedValue !== "object" || nestedValue === null)
continue;
if (!isNestedFrozen(nestedValue))
return false;
}
return true;
}
function createSerializableStateInvariantMiddleware(options) {
if (options === void 0) { options = {}; }
if (false) {}
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, _k = options.disableCache, disableCache = _k === void 0 ? false : _k;
var cache = !disableCache && WeakSet ? new WeakSet() : void 0;
return function (storeAPI) { return function (next) { return function (action) {
var result = next(action);
var measureUtils = getTimeMeasureUtils(warnAfter, "SerializableStateInvariantMiddleware");
if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) {
measureUtils.measureTime(function () {
var foundActionNonSerializableValue = findNonSerializableValue(action, "", isSerializable, getEntries, ignoredActionPaths, cache);
if (foundActionNonSerializableValue) {
var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value;
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)");
}
});
}
if (!ignoreState) {
measureUtils.measureTime(function () {
var state = storeAPI.getState();
var foundStateNonSerializableValue = findNonSerializableValue(state, "", isSerializable, getEntries, ignoredPaths, cache);
if (foundStateNonSerializableValue) {
var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value;
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)");
}
});
measureUtils.warnIfExceeded();
}
return result;
}; }; };
}
// src/getDefaultMiddleware.ts
function isBoolean(x) {
return typeof x === "boolean";
}
function curryGetDefaultMiddleware() {
return function curriedGetDefaultMiddleware(options) {
return getDefaultMiddleware(options);
};
}
function getDefaultMiddleware(options) {
if (options === void 0) { options = {}; }
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, _f = options.actionCreatorCheck, actionCreatorCheck = _f === void 0 ? true : _f;
var middlewareArray = new MiddlewareArray();
if (thunk) {
if (isBoolean(thunk)) {
middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"]);
}
else {
middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"].withExtraArgument(thunk.extraArgument));
}
}
if (true) {
if (immutableCheck) {
var immutableOptions = {};
if (!isBoolean(immutableCheck)) {
immutableOptions = immutableCheck;
}
middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions));
}
if (serializableCheck) {
var serializableOptions = {};
if (!isBoolean(serializableCheck)) {
serializableOptions = serializableCheck;
}
middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions));
}
if (actionCreatorCheck) {
var actionCreatorOptions = {};
if (!isBoolean(actionCreatorCheck)) {
actionCreatorOptions = actionCreatorCheck;
}
middlewareArray.unshift(createActionCreatorInvariantMiddleware(actionCreatorOptions));
}
}
return middlewareArray;
}
// src/configureStore.ts
var IS_PRODUCTION = "development" === "production";
function configureStore(options) {
var curriedGetDefaultMiddleware = curryGetDefaultMiddleware();
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;
var rootReducer;
if (typeof reducer === "function") {
rootReducer = reducer;
}
else if (isPlainObject(reducer)) {
rootReducer = (0,redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers)(reducer);
}
else {
throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');
}
var finalMiddleware = middleware;
if (typeof finalMiddleware === "function") {
finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware);
if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {
throw new Error("when using a middleware builder function, an array of middleware must be returned");
}
}
if (!IS_PRODUCTION && finalMiddleware.some(function (item) { return typeof item !== "function"; })) {
throw new Error("each middleware provided to configureStore must be a function");
}
var middlewareEnhancer = redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware.apply(void 0, finalMiddleware);
var finalCompose = redux__WEBPACK_IMPORTED_MODULE_0__.compose;
if (devTools) {
finalCompose = composeWithDevTools(__spreadValues({
trace: !IS_PRODUCTION
}, typeof devTools === "object" && devTools));
}
var defaultEnhancers = new EnhancerArray(middlewareEnhancer);
var storeEnhancers = defaultEnhancers;
if (Array.isArray(enhancers)) {
storeEnhancers = __spreadArray([middlewareEnhancer], enhancers);
}
else if (typeof enhancers === "function") {
storeEnhancers = enhancers(defaultEnhancers);
}
var composedEnhancer = finalCompose.apply(void 0, storeEnhancers);
return (0,redux__WEBPACK_IMPORTED_MODULE_0__.createStore)(rootReducer, preloadedState, composedEnhancer);
}
// src/createReducer.ts
// src/mapBuilders.ts
function executeReducerBuilderCallback(builderCallback) {
var actionsMap = {};
var actionMatchers = [];
var defaultCaseReducer;
var builder = {
addCase: function (typeOrActionCreator, reducer) {
if (true) {
if (actionMatchers.length > 0) {
throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");
}
if (defaultCaseReducer) {
throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`");
}
}
var type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
if (!type) {
throw new Error("`builder.addCase` cannot be called with an empty action type");
}
if (type in actionsMap) {
throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");
}
actionsMap[type] = reducer;
return builder;
},
addMatcher: function (matcher, reducer) {
if (true) {
if (defaultCaseReducer) {
throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
}
}
actionMatchers.push({ matcher: matcher, reducer: reducer });
return builder;
},
addDefaultCase: function (reducer) {
if (true) {
if (defaultCaseReducer) {
throw new Error("`builder.addDefaultCase` can only be called once");
}
}
defaultCaseReducer = reducer;
return builder;
}
};
builderCallback(builder);
return [actionsMap, actionMatchers, defaultCaseReducer];
}
// src/createReducer.ts
function isStateFunction(x) {
return typeof x === "function";
}
var hasWarnedAboutObjectNotation = false;
function createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) {
if (actionMatchers === void 0) { actionMatchers = []; }
if (true) {
if (typeof mapOrBuilderCallback === "object") {
if (!hasWarnedAboutObjectNotation) {
hasWarnedAboutObjectNotation = true;
console.warn("The object notation for `createReducer` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");
}
}
}
var _c = typeof mapOrBuilderCallback === "function" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _c[0], finalActionMatchers = _c[1], finalDefaultCaseReducer = _c[2];
var getInitialState;
if (isStateFunction(initialState)) {
getInitialState = function () { return freezeDraftable(initialState()); };
}
else {
var frozenInitialState_1 = freezeDraftable(initialState);
getInitialState = function () { return frozenInitialState_1; };
}
function reducer(state, action) {
if (state === void 0) { state = getInitialState(); }
var caseReducers = __spreadArray([
actionsMap[action.type]
], finalActionMatchers.filter(function (_c) {
var matcher = _c.matcher;
return matcher(action);
}).map(function (_c) {
var reducer2 = _c.reducer;
return reducer2;
}));
if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) {
caseReducers = [finalDefaultCaseReducer];
}
return caseReducers.reduce(function (previousState, caseReducer) {
if (caseReducer) {
if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(previousState)) {
var draft = previousState;
var result = caseReducer(draft, action);
if (result === void 0) {
return previousState;
}
return result;
}
else if (!(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraftable)(previousState)) {
var result = caseReducer(previousState, action);
if (result === void 0) {
if (previousState === null) {
return previousState;
}
throw Error("A case reducer on a non-draftable value must not return undefined");
}
return result;
}
else {
return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(previousState, function (draft) {
return caseReducer(draft, action);
});
}
}
return previousState;
}, state);
}
reducer.getInitialState = getInitialState;
return reducer;
}
// src/createSlice.ts
var hasWarnedAboutObjectNotation2 = false;
function getType2(slice, actionKey) {
return slice + "/" + actionKey;
}
function createSlice(options) {
var name = options.name;
if (!name) {
throw new Error("`name` is a required option for createSlice");
}
if (typeof process !== "undefined" && "development" === "development") {
if (options.initialState === void 0) {
console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");
}
}
var initialState = typeof options.initialState == "function" ? options.initialState : freezeDraftable(options.initialState);
var reducers = options.reducers || {};
var reducerNames = Object.keys(reducers);
var sliceCaseReducersByName = {};
var sliceCaseReducersByType = {};
var actionCreators = {};
reducerNames.forEach(function (reducerName) {
var maybeReducerWithPrepare = reducers[reducerName];
var type = getType2(name, reducerName);
var caseReducer;
var prepareCallback;
if ("reducer" in maybeReducerWithPrepare) {
caseReducer = maybeReducerWithPrepare.reducer;
prepareCallback = maybeReducerWithPrepare.prepare;
}
else {
caseReducer = maybeReducerWithPrepare;
}
sliceCaseReducersByName[reducerName] = caseReducer;
sliceCaseReducersByType[type] = caseReducer;
actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type);
});
function buildReducer() {
if (true) {
if (typeof options.extraReducers === "object") {
if (!hasWarnedAboutObjectNotation2) {
hasWarnedAboutObjectNotation2 = true;
console.warn("The object notation for `createSlice.extraReducers` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");
}
}
}
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;
var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType);
return createReducer(initialState, function (builder) {
for (var key in finalCaseReducers) {
builder.addCase(key, finalCaseReducers[key]);
}
for (var _i = 0, actionMatchers_1 = actionMatchers; _i < actionMatchers_1.length; _i++) {
var m = actionMatchers_1[_i];
builder.addMatcher(m.matcher, m.reducer);
}
if (defaultCaseReducer) {
builder.addDefaultCase(defaultCaseReducer);
}
});
}
var _reducer;
return {
name: name,
reducer: function (state, action) {
if (!_reducer)
_reducer = buildReducer();
return _reducer(state, action);
},
actions: actionCreators,
caseReducers: sliceCaseReducersByName,
getInitialState: function () {
if (!_reducer)
_reducer = buildReducer();
return _reducer.getInitialState();
}
};
}
// src/entities/entity_state.ts
function getInitialEntityState() {
return {
ids: [],
entities: {}
};
}
function createInitialStateFactory() {
function getInitialState(additionalState) {
if (additionalState === void 0) { additionalState = {}; }
return Object.assign(getInitialEntityState(), additionalState);
}
return { getInitialState: getInitialState };
}
// src/entities/state_selectors.ts
function createSelectorsFactory() {
function getSelectors(selectState) {
var selectIds = function (state) { return state.ids; };
var selectEntities = function (state) { return state.entities; };
var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); });
var selectId = function (_, id) { return id; };
var selectById = function (entities, id) { return entities[id]; };
var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; });
if (!selectState) {
return {
selectIds: selectIds,
selectEntities: selectEntities,
selectAll: selectAll,
selectTotal: selectTotal,
selectById: createDraftSafeSelector(selectEntities, selectId, selectById)
};
}
var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities);
return {
selectIds: createDraftSafeSelector(selectState, selectIds),
selectEntities: selectGlobalizedEntities,
selectAll: createDraftSafeSelector(selectState, selectAll),
selectTotal: createDraftSafeSelector(selectState, selectTotal),
selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById)
};
}
return { getSelectors: getSelectors };
}
// src/entities/state_adapter.ts
function createSingleArgumentStateOperator(mutator) {
var operator = createStateOperator(function (_, state) { return mutator(state); });
return function operation(state) {
return operator(state, void 0);
};
}
function createStateOperator(mutator) {
return function operation(state, arg) {
function isPayloadActionArgument(arg2) {
return isFSA(arg2);
}
var runMutator = function (draft) {
if (isPayloadActionArgument(arg)) {
mutator(arg.payload, draft);
}
else {
mutator(arg, draft);
}
};
if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(state)) {
runMutator(state);
return state;
}
else {
return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(state, runMutator);
}
};
}
// src/entities/utils.ts
function selectIdValue(entity, selectId) {
var key = selectId(entity);
if ( true && key === void 0) {
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());
}
return key;
}
function ensureEntitiesArray(entities) {
if (!Array.isArray(entities)) {
entities = Object.values(entities);
}
return entities;
}
function splitAddedUpdatedEntities(newEntities, selectId, state) {
newEntities = ensureEntitiesArray(newEntities);
var added = [];
var updated = [];
for (var _i = 0, newEntities_1 = newEntities; _i < newEntities_1.length; _i++) {
var entity = newEntities_1[_i];
var id = selectIdValue(entity, selectId);
if (id in state.entities) {
updated.push({ id: id, changes: entity });
}
else {
added.push(entity);
}
}
return [added, updated];
}
// src/entities/unsorted_state_adapter.ts
function createUnsortedStateAdapter(selectId) {
function addOneMutably(entity, state) {
var key = selectIdValue(entity, selectId);
if (key in state.entities) {
return;
}
state.ids.push(key);
state.entities[key] = entity;
}
function addManyMutably(newEntities, state) {
newEntities = ensureEntitiesArray(newEntities);
for (var _i = 0, newEntities_2 = newEntities; _i < newEntities_2.length; _i++) {
var entity = newEntities_2[_i];
addOneMutably(entity, state);
}
}
function setOneMutably(entity, state) {
var key = selectIdValue(entity, selectId);
if (!(key in state.entities)) {
state.ids.push(key);
}
state.entities[key] = entity;
}
function setManyMutably(newEntities, state) {
newEntities = ensureEntitiesArray(newEntities);
for (var _i = 0, newEntities_3 = newEntities; _i < newEntities_3.length; _i++) {
var entity = newEntities_3[_i];
setOneMutably(entity, state);
}
}
function setAllMutably(newEntities, state) {
newEntities = ensureEntitiesArray(newEntities);
state.ids = [];
state.entities = {};
addManyMutably(newEntities, state);
}
function removeOneMutably(key, state) {
return removeManyMutably([key], state);
}
function removeManyMutably(keys, state) {
var didMutate = false;
keys.forEach(function (key) {
if (key in state.entities) {
delete state.entities[key];
didMutate = true;
}
});
if (didMutate) {
state.ids = state.ids.filter(function (id) { return id in state.entities; });
}
}
function removeAllMutably(state) {
Object.assign(state, {
ids: [],
entities: {}
});
}
function takeNewKey(keys, update, state) {
var original2 = state.entities[update.id];
var updated = Object.assign({}, original2, update.changes);
var newKey = selectIdValue(updated, selectId);
var hasNewKey = newKey !== update.id;
if (hasNewKey) {
keys[update.id] = newKey;
delete state.entities[update.id];
}
state.entities[newKey] = updated;
return hasNewKey;
}
function updateOneMutably(update, state) {
return updateManyMutably([update], state);
}
function updateManyMutably(updates, state) {
var newKeys = {};
var updatesPerEntity = {};
updates.forEach(function (update) {
if (update.id in state.entities) {
updatesPerEntity[update.id] = {
id: update.id,
changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes)
};
}
});
updates = Object.values(updatesPerEntity);
var didMutateEntities = updates.length > 0;
if (didMutateEntities) {
var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0;
if (didMutateIds) {
state.ids = Object.keys(state.entities);
}
}
}
function upsertOneMutably(entity, state) {
return upsertManyMutably([entity], state);
}
function upsertManyMutably(newEntities, state) {
var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1];
updateManyMutably(updated, state);
addManyMutably(added, state);
}
return {
removeAll: createSingleArgumentStateOperator(removeAllMutably),
addOne: createStateOperator(addOneMutably),
addMany: createStateOperator(addManyMutably),
setOne: createStateOperator(setOneMutably),
setMany: createStateOperator(setManyMutably),
setAll: createStateOperator(setAllMutably),
updateOne: createStateOperator(updateOneMutably),
updateMany: createStateOperator(updateManyMutably),
upsertOne: createStateOperator(upsertOneMutably),
upsertMany: createStateOperator(upsertManyMutably),
removeOne: createStateOperator(removeOneMutably),
removeMany: createStateOperator(removeManyMutably)
};
}
// src/entities/sorted_state_adapter.ts
function createSortedStateAdapter(selectId, sort) {
var _c = createUnsortedStateAdapter(selectId), removeOne = _c.removeOne, removeMany = _c.removeMany, removeAll = _c.removeAll;
function addOneMutably(entity, state) {
return addManyMutably([entity], state);
}
function addManyMutably(newEntities, state) {
newEntities = ensureEntitiesArray(newEntities);
var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); });
if (models.length !== 0) {
merge(models, state);
}
}
function setOneMutably(entity, state) {
return setManyMutably([entity], state);
}
function setManyMutably(newEntities, state) {
newEntities = ensureEntitiesArray(newEntities);
if (newEntities.length !== 0) {
merge(newEntities, state);
}
}
function setAllMutably(newEntities, state) {
newEntities = ensureEntitiesArray(newEntities);
state.entities = {};
state.ids = [];
addManyMutably(newEntities, state);
}
function updateOneMutably(update, state) {
return updateManyMutably([update], state);
}
function updateManyMutably(updates, state) {
var appliedUpdates = false;
for (var _i = 0, updates_1 = updates; _i < updates_1.length; _i++) {
var update = updates_1[_i];
var entity = state.entities[update.id];
if (!entity) {
continue;
}
appliedUpdates = true;
Object.assign(entity, update.changes);
var newId = selectId(entity);
if (update.id !== newId) {
delete state.entities[update.id];
state.entities[newId] = entity;
}
}
if (appliedUpdates) {
resortEntities(state);
}
}
function upsertOneMutably(entity, state) {
return upsertManyMutably([entity], state);
}
function upsertManyMutably(newEntities, state) {
var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1];
updateManyMutably(updated, state);
addManyMutably(added, state);
}
function areArraysEqual(a, b) {
if (a.length !== b.length) {
return false;
}
for (var i = 0; i < a.length && i < b.length; i++) {
if (a[i] === b[i]) {
continue;
}
return false;
}
return true;
}
function merge(models, state) {
models.forEach(function (model) {
state.entities[selectId(model)] = model;
});
resortEntities(state);
}
function resortEntities(state) {
var allEntities = Object.values(state.entities);
allEntities.sort(sort);
var newSortedIds = allEntities.map(selectId);
var ids = state.ids;
if (!areArraysEqual(ids, newSortedIds)) {
state.ids = newSortedIds;
}
}
return {
removeOne: removeOne,
removeMany: removeMany,
removeAll: removeAll,
addOne: createStateOperator(addOneMutably),
updateOne: createStateOperator(updateOneMutably),
upsertOne: createStateOperator(upsertOneMutably),
setOne: createStateOperator(setOneMutably),
setMany: createStateOperator(setManyMutably),
setAll: createStateOperator(setAllMutably),
addMany: createStateOperator(addManyMutably),
updateMany: createStateOperator(updateManyMutably),
upsertMany: createStateOperator(upsertManyMutably)
};
}
// src/entities/create_adapter.ts
function createEntityAdapter(options) {
if (options === void 0) { options = {}; }
var _c = __spreadValues({
sortComparer: false,
selectId: function (instance) { return instance.id; }
}, options), selectId = _c.selectId, sortComparer = _c.sortComparer;
var stateFactory = createInitialStateFactory();
var selectorsFactory = createSelectorsFactory();
var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId);
return __spreadValues(__spreadValues(__spreadValues({
selectId: selectId,
sortComparer: sortComparer
}, stateFactory), selectorsFactory), stateAdapter);
}
// src/nanoid.ts
var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";
var nanoid = function (size) {
if (size === void 0) { size = 21; }
var id = "";
var i = size;
while (i--) {
id += urlAlphabet[Math.random() * 64 | 0];
}
return id;
};
// src/createAsyncThunk.ts
var commonProperties = [
"name",
"message",
"stack",
"code"
];
var RejectWithValue = /** @class */ (function () {
function RejectWithValue(payload, meta) {
this.payload = payload;
this.meta = meta;
}
return RejectWithValue;
}());
var FulfillWithMeta = /** @class */ (function () {
function FulfillWithMeta(payload, meta) {
this.payload = payload;
this.meta = meta;
}
return FulfillWithMeta;
}());
var miniSerializeError = function (value) {
if (typeof value === "object" && value !== null) {
var simpleError = {};
for (var _i = 0, commonProperties_1 = commonProperties; _i < commonProperties_1.length; _i++) {
var property = commonProperties_1[_i];
if (typeof value[property] === "string") {
simpleError[property] = value[property];
}
}
return simpleError;
}
return { message: String(value) };
};
var createAsyncThunk = (function () {
function createAsyncThunk2(typePrefix, payloadCreator, options) {
var fulfilled = createAction(typePrefix + "/fulfilled", function (payload, requestId, arg, meta) { return ({
payload: payload,
meta: __spreadProps(__spreadValues({}, meta || {}), {
arg: arg,
requestId: requestId,
requestStatus: "fulfilled"
})
}); });
var pending = createAction(typePrefix + "/pending", function (requestId, arg, meta) { return ({
payload: void 0,
meta: __spreadProps(__spreadValues({}, meta || {}), {
arg: arg,
requestId: requestId,
requestStatus: "pending"
})
}); });
var rejected = createAction(typePrefix + "/rejected", function (error, requestId, arg, payload, meta) { return ({
payload: payload,
error: (options && options.serializeError || miniSerializeError)(error || "Rejected"),
meta: __spreadProps(__spreadValues({}, meta || {}), {
arg: arg,
requestId: requestId,
rejectedWithValue: !!payload,
requestStatus: "rejected",
aborted: (error == null ? void 0 : error.name) === "AbortError",
condition: (error == null ? void 0 : error.name) === "ConditionError"
})
}); });
var displayedWarning = false;
var AC = typeof AbortController !== "undefined" ? AbortController : /** @class */ (function () {
function class_1() {
this.signal = {
aborted: false,
addEventListener: function () {
},
dispatchEvent: function () {
return false;
},
onabort: function () {
},
removeEventListener: function () {
},
reason: void 0,
throwIfAborted: function () {
}
};
}
class_1.prototype.abort = function () {
if (true) {
if (!displayedWarning) {
displayedWarning = true;
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'.");
}
}
};
return class_1;
}());
function actionCreator(arg) {
return function (dispatch, getState, extra) {
var requestId = (options == null ? void 0 : options.idGenerator) ? options.idGenerator(arg) : nanoid();
var abortController = new AC();
var abortReason;
var started = false;
function abort(reason) {
abortReason = reason;
abortController.abort();
}
var promise2 = function () {
return __async(this, null, function () {
var _a, _b, finalAction, conditionResult, abortedPromise, err_1, skipDispatch;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
_c.trys.push([0, 4, , 5]);
conditionResult = (_a = options == null ? void 0 : options.condition) == null ? void 0 : _a.call(options, arg, { getState: getState, extra: extra });
if (!isThenable(conditionResult)) return [3 /*break*/, 2];
return [4 /*yield*/, conditionResult];
case 1:
conditionResult = _c.sent();
_c.label = 2;
case 2:
if (conditionResult === false || abortController.signal.aborted) {
throw {
name: "ConditionError",
message: "Aborted due to condition callback returning false."
};
}
started = true;
abortedPromise = new Promise(function (_, reject) { return abortController.signal.addEventListener("abort", function () { return reject({
name: "AbortError",
message: abortReason || "Aborted"
}); }); });
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 })));
return [4 /*yield*/, Promise.race([
abortedPromise,
Promise.resolve(payloadCreator(arg, {
dispatch: dispatch,
getState: getState,
extra: extra,
requestId: requestId,
signal: abortController.signal,
abort: abort,
rejectWithValue: function (value, meta) {
return new RejectWithValue(value, meta);
},
fulfillWithValue: function (value, meta) {
return new FulfillWithMeta(value, meta);
}
})).then(function (result) {
if (result instanceof RejectWithValue) {
throw result;
}
if (result instanceof FulfillWithMeta) {
return fulfilled(result.payload, requestId, arg, result.meta);
}
return fulfilled(result, requestId, arg);
})
])];
case 3:
finalAction = _c.sent();
return [3 /*break*/, 5];
case 4:
err_1 = _c.sent();
finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg);
return [3 /*break*/, 5];
case 5:
skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;
if (!skipDispatch) {
dispatch(finalAction);
}
return [2 /*return*/, finalAction];
}
});
});
}();
return Object.assign(promise2, {
abort: abort,
requestId: requestId,
arg: arg,
unwrap: function () {
return promise2.then(unwrapResult);
}
});
};
}
return Object.assign(actionCreator, {
pending: pending,
rejected: rejected,
fulfilled: fulfilled,
typePrefix: typePrefix
});
}
createAsyncThunk2.withTypes = function () { return createAsyncThunk2; };
return createAsyncThunk2;
})();
function unwrapResult(action) {
if (action.meta && action.meta.rejectedWithValue) {
throw action.payload;
}
if (action.error) {
throw action.error;
}
return action.payload;
}
function isThenable(value) {
return value !== null && typeof value === "object" && typeof value.then === "function";
}
// src/matchers.ts
var matches = function (matcher, action) {
if (hasMatchFunction(matcher)) {
return matcher.match(action);
}
else {
return matcher(action);
}
};
function isAnyOf() {
var matchers = [];
for (var _i = 0; _i < arguments.length; _i++) {
matchers[_i] = arguments[_i];
}
return function (action) {
return matchers.some(function (matcher) { return matches(matcher, action); });
};
}
function isAllOf() {
var matchers = [];
for (var _i = 0; _i < arguments.length; _i++) {
matchers[_i] = arguments[_i];
}
return function (action) {
return matchers.every(function (matcher) { return matches(matcher, action); });
};
}
function hasExpectedRequestMetadata(action, validStatus) {
if (!action || !action.meta)
return false;
var hasValidRequestId = typeof action.meta.requestId === "string";
var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1;
return hasValidRequestId && hasValidRequestStatus;
}
function isAsyncThunkArray(a) {
return typeof a[0] === "function" && "pending" in a[0] && "fulfilled" in a[0] && "rejected" in a[0];
}
function isPending() {
var asyncThunks = [];
for (var _i = 0; _i < arguments.length; _i++) {
asyncThunks[_i] = arguments[_i];
}
if (asyncThunks.length === 0) {
return function (action) { return hasExpectedRequestMetadata(action, ["pending"]); };
}
if (!isAsyncThunkArray(asyncThunks)) {
return isPending()(asyncThunks[0]);
}
return function (action) {
var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; });
var combinedMatcher = isAnyOf.apply(void 0, matchers);
return combinedMatcher(action);
};
}
function isRejected() {
var asyncThunks = [];
for (var _i = 0; _i < arguments.length; _i++) {
asyncThunks[_i] = arguments[_i];
}
if (asyncThunks.length === 0) {
return function (action) { return hasExpectedRequestMetadata(action, ["rejected"]); };
}
if (!isAsyncThunkArray(asyncThunks)) {
return isRejected()(asyncThunks[0]);
}
return function (action) {
var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; });
var combinedMatcher = isAnyOf.apply(void 0, matchers);
return combinedMatcher(action);
};
}
function isRejectedWithValue() {
var asyncThunks = [];
for (var _i = 0; _i < arguments.length; _i++) {
asyncThunks[_i] = arguments[_i];
}
var hasFlag = function (action) {
return action && action.meta && action.meta.rejectedWithValue;
};
if (asyncThunks.length === 0) {
return function (action) {
var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);
return combinedMatcher(action);
};
}
if (!isAsyncThunkArray(asyncThunks)) {
return isRejectedWithValue()(asyncThunks[0]);
}
return function (action) {
var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);
return combinedMatcher(action);
};
}
function isFulfilled() {
var asyncThunks = [];
for (var _i = 0; _i < arguments.length; _i++) {
asyncThunks[_i] = arguments[_i];
}
if (asyncThunks.length === 0) {
return function (action) { return hasExpectedRequestMetadata(action, ["fulfilled"]); };
}
if (!isAsyncThunkArray(asyncThunks)) {
return isFulfilled()(asyncThunks[0]);
}
return function (action) {
var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; });
var combinedMatcher = isAnyOf.apply(void 0, matchers);
return combinedMatcher(action);
};
}
function isAsyncThunkAction() {
var asyncThunks = [];
for (var _i = 0; _i < arguments.length; _i++) {
asyncThunks[_i] = arguments[_i];
}
if (asyncThunks.length === 0) {
return function (action) { return hasExpectedRequestMetadata(action, ["pending", "fulfilled", "rejected"]); };
}
if (!isAsyncThunkArray(asyncThunks)) {
return isAsyncThunkAction()(asyncThunks[0]);
}
return function (action) {
var matchers = [];
for (var _i = 0, asyncThunks_1 = asyncThunks; _i < asyncThunks_1.length; _i++) {
var asyncThunk = asyncThunks_1[_i];
matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled);
}
var combinedMatcher = isAnyOf.apply(void 0, matchers);
return combinedMatcher(action);
};
}
// src/listenerMiddleware/utils.ts
var assertFunction = function (func, expected) {
if (typeof func !== "function") {
throw new TypeError(expected + " is not a function");
}
};
var noop = function () {
};
var catchRejection = function (promise2, onError) {
if (onError === void 0) { onError = noop; }
promise2.catch(onError);
return promise2;
};
var addAbortSignalListener = function (abortSignal, callback) {
abortSignal.addEventListener("abort", callback, { once: true });
return function () { return abortSignal.removeEventListener("abort", callback); };
};
var abortControllerWithReason = function (abortController, reason) {
var signal = abortController.signal;
if (signal.aborted) {
return;
}
if (!("reason" in signal)) {
Object.defineProperty(signal, "reason", {
enumerable: true,
value: reason,
configurable: true,
writable: true
});
}
;
abortController.abort(reason);
};
// src/listenerMiddleware/exceptions.ts
var task = "task";
var listener = "listener";
var completed = "completed";
var cancelled = "cancelled";
var taskCancelled = "task-" + cancelled;
var taskCompleted = "task-" + completed;
var listenerCancelled = listener + "-" + cancelled;
var listenerCompleted = listener + "-" + completed;
var TaskAbortError = /** @class */ (function () {
function TaskAbortError(code) {
this.code = code;
this.name = "TaskAbortError";
this.message = task + " " + cancelled + " (reason: " + code + ")";
}
return TaskAbortError;
}());
// src/listenerMiddleware/task.ts
var validateActive = function (signal) {
if (signal.aborted) {
throw new TaskAbortError(signal.reason);
}
};
function raceWithSignal(signal, promise2) {
var cleanup = noop;
return new Promise(function (resolve, reject) {
var notifyRejection = function () { return reject(new TaskAbortError(signal.reason)); };
if (signal.aborted) {
notifyRejection();
return;
}
cleanup = addAbortSignalListener(signal, notifyRejection);
promise2.finally(function () { return cleanup(); }).then(resolve, reject);
}).finally(function () {
cleanup = noop;
});
}
var runTask = function (task2, cleanUp) { return __async(void 0, null, function () {
var value, error_1;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
_c.trys.push([0, 3, 4, 5]);
return [4 /*yield*/, Promise.resolve()];
case 1:
_c.sent();
return [4 /*yield*/, task2()];
case 2:
value = _c.sent();
return [2 /*return*/, {
status: "ok",
value: value
}];
case 3:
error_1 = _c.sent();
return [2 /*return*/, {
status: error_1 instanceof TaskAbortError ? "cancelled" : "rejected",
error: error_1
}];
case 4:
cleanUp == null ? void 0 : cleanUp();
return [7 /*endfinally*/];
case 5: return [2 /*return*/];
}
});
}); };
var createPause = function (signal) {
return function (promise2) {
return catchRejection(raceWithSignal(signal, promise2).then(function (output) {
validateActive(signal);
return output;
}));
};
};
var createDelay = function (signal) {
var pause = createPause(signal);
return function (timeoutMs) {
return pause(new Promise(function (resolve) { return setTimeout(resolve, timeoutMs); }));
};
};
// src/listenerMiddleware/index.ts
var assign = Object.assign;
var INTERNAL_NIL_TOKEN = {};
var alm = "listenerMiddleware";
var createFork = function (parentAbortSignal, parentBlockingPromises) {
var linkControllers = function (controller) { return addAbortSignalListener(parentAbortSignal, function () { return abortControllerWithReason(controller, parentAbortSignal.reason); }); };
return function (taskExecutor, opts) {
assertFunction(taskExecutor, "taskExecutor");
var childAbortController = new AbortController();
linkControllers(childAbortController);
var result = runTask(function () { return __async(void 0, null, function () {
var result2;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
validateActive(parentAbortSignal);
validateActive(childAbortController.signal);
return [4 /*yield*/, taskExecutor({
pause: createPause(childAbortController.signal),
delay: createDelay(childAbortController.signal),
signal: childAbortController.signal
})];
case 1:
result2 = _c.sent();
validateActive(childAbortController.signal);
return [2 /*return*/, result2];
}
});
}); }, function () { return abortControllerWithReason(childAbortController, taskCompleted); });
if (opts == null ? void 0 : opts.autoJoin) {
parentBlockingPromises.push(result);
}
return {
result: createPause(parentAbortSignal)(result),
cancel: function () {
abortControllerWithReason(childAbortController, taskCancelled);
}
};
};
};
var createTakePattern = function (startListening, signal) {
var take = function (predicate, timeout) { return __async(void 0, null, function () {
var unsubscribe, tuplePromise, promises, output;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
validateActive(signal);
unsubscribe = function () {
};
tuplePromise = new Promise(function (resolve, reject) {
var stopListening = startListening({
predicate: predicate,
effect: function (action, listenerApi) {
listenerApi.unsubscribe();
resolve([
action,
listenerApi.getState(),
listenerApi.getOriginalState()
]);
}
});
unsubscribe = function () {
stopListening();
reject();
};
});
promises = [
tuplePromise
];
if (timeout != null) {
promises.push(new Promise(function (resolve) { return setTimeout(resolve, timeout, null); }));
}
_c.label = 1;
case 1:
_c.trys.push([1, , 3, 4]);
return [4 /*yield*/, raceWithSignal(signal, Promise.race(promises))];
case 2:
output = _c.sent();
validateActive(signal);
return [2 /*return*/, output];
case 3:
unsubscribe();
return [7 /*endfinally*/];
case 4: return [2 /*return*/];
}
});
}); };
return function (predicate, timeout) { return catchRejection(take(predicate, timeout)); };
};
var getListenerEntryPropsFrom = function (options) {
var type = options.type, actionCreator = options.actionCreator, matcher = options.matcher, predicate = options.predicate, effect = options.effect;
if (type) {
predicate = createAction(type).match;
}
else if (actionCreator) {
type = actionCreator.type;
predicate = actionCreator.match;
}
else if (matcher) {
predicate = matcher;
}
else if (predicate) {
}
else {
throw new Error("Creating or removing a listener requires one of the known fields for matching an action");
}
assertFunction(effect, "options.listener");
return { predicate: predicate, type: type, effect: effect };
};
var createListenerEntry = function (options) {
var _c = getListenerEntryPropsFrom(options), type = _c.type, predicate = _c.predicate, effect = _c.effect;
var id = nanoid();
var entry = {
id: id,
effect: effect,
type: type,
predicate: predicate,
pending: new Set(),
unsubscribe: function () {
throw new Error("Unsubscribe not initialized");
}
};
return entry;
};
var cancelActiveListeners = function (entry) {
entry.pending.forEach(function (controller) {
abortControllerWithReason(controller, listenerCancelled);
});
};
var createClearListenerMiddleware = function (listenerMap) {
return function () {
listenerMap.forEach(cancelActiveListeners);
listenerMap.clear();
};
};
var safelyNotifyError = function (errorHandler, errorToNotify, errorInfo) {
try {
errorHandler(errorToNotify, errorInfo);
}
catch (errorHandlerError) {
setTimeout(function () {
throw errorHandlerError;
}, 0);
}
};
var addListener = createAction(alm + "/add");
var clearAllListeners = createAction(alm + "/removeAll");
var removeListener = createAction(alm + "/remove");
var defaultErrorHandler = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
console.error.apply(console, __spreadArray([alm + "/error"], args));
};
function createListenerMiddleware(middlewareOptions) {
var _this = this;
if (middlewareOptions === void 0) { middlewareOptions = {}; }
var listenerMap = new Map();
var extra = middlewareOptions.extra, _c = middlewareOptions.onError, onError = _c === void 0 ? defaultErrorHandler : _c;
assertFunction(onError, "onError");
var insertEntry = function (entry) {
entry.unsubscribe = function () { return listenerMap.delete(entry.id); };
listenerMap.set(entry.id, entry);
return function (cancelOptions) {
entry.unsubscribe();
if (cancelOptions == null ? void 0 : cancelOptions.cancelActive) {
cancelActiveListeners(entry);
}
};
};
var findListenerEntry = function (comparator) {
for (var _i = 0, _c = Array.from(listenerMap.values()); _i < _c.length; _i++) {
var entry = _c[_i];
if (comparator(entry)) {
return entry;
}
}
return void 0;
};
var startListening = function (options) {
var entry = findListenerEntry(function (existingEntry) { return existingEntry.effect === options.effect; });
if (!entry) {
entry = createListenerEntry(options);
}
return insertEntry(entry);
};
var stopListening = function (options) {
var _c = getListenerEntryPropsFrom(options), type = _c.type, effect = _c.effect, predicate = _c.predicate;
var entry = findListenerEntry(function (entry2) {
var matchPredicateOrType = typeof type === "string" ? entry2.type === type : entry2.predicate === predicate;
return matchPredicateOrType && entry2.effect === effect;
});
if (entry) {
entry.unsubscribe();
if (options.cancelActive) {
cancelActiveListeners(entry);
}
}
return !!entry;
};
var notifyListener = function (entry, action, api, getOriginalState) { return __async(_this, null, function () {
var internalTaskController, take, autoJoinPromises, listenerError_1;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
internalTaskController = new AbortController();
take = createTakePattern(startListening, internalTaskController.signal);
autoJoinPromises = [];
_c.label = 1;
case 1:
_c.trys.push([1, 3, 4, 6]);
entry.pending.add(internalTaskController);
return [4 /*yield*/, Promise.resolve(entry.effect(action, assign({}, api, {
getOriginalState: getOriginalState,
condition: function (predicate, timeout) { return take(predicate, timeout).then(Boolean); },
take: take,
delay: createDelay(internalTaskController.signal),
pause: createPause(internalTaskController.signal),
extra: extra,
signal: internalTaskController.signal,
fork: createFork(internalTaskController.signal, autoJoinPromises),
unsubscribe: entry.unsubscribe,
subscribe: function () {
listenerMap.set(entry.id, entry);
},
cancelActiveListeners: function () {
entry.pending.forEach(function (controller, _, set) {
if (controller !== internalTaskController) {
abortControllerWithReason(controller, listenerCancelled);
set.delete(controller);
}
});
}
})))];
case 2:
_c.sent();
return [3 /*break*/, 6];
case 3:
listenerError_1 = _c.sent();
if (!(listenerError_1 instanceof TaskAbortError)) {
safelyNotifyError(onError, listenerError_1, {
raisedBy: "effect"
});
}
return [3 /*break*/, 6];
case 4: return [4 /*yield*/, Promise.allSettled(autoJoinPromises)];
case 5:
_c.sent();
abortControllerWithReason(internalTaskController, listenerCompleted);
entry.pending.delete(internalTaskController);
return [7 /*endfinally*/];
case 6: return [2 /*return*/];
}
});
}); };
var clearListenerMiddleware = createClearListenerMiddleware(listenerMap);
var middleware = function (api) { return function (next) { return function (action) {
if (!isAction(action)) {
return next(action);
}
if (addListener.match(action)) {
return startListening(action.payload);
}
if (clearAllListeners.match(action)) {
clearListenerMiddleware();
return;
}
if (removeListener.match(action)) {
return stopListening(action.payload);
}
var originalState = api.getState();
var getOriginalState = function () {
if (originalState === INTERNAL_NIL_TOKEN) {
throw new Error(alm + ": getOriginalState can only be called synchronously");
}
return originalState;
};
var result;
try {
result = next(action);
if (listenerMap.size > 0) {
var currentState = api.getState();
var listenerEntries = Array.from(listenerMap.values());
for (var _i = 0, listenerEntries_1 = listenerEntries; _i < listenerEntries_1.length; _i++) {
var entry = listenerEntries_1[_i];
var runListener = false;
try {
runListener = entry.predicate(action, currentState, originalState);
}
catch (predicateError) {
runListener = false;
safelyNotifyError(onError, predicateError, {
raisedBy: "predicate"
});
}
if (!runListener) {
continue;
}
notifyListener(entry, action, api, getOriginalState);
}
}
}
finally {
originalState = INTERNAL_NIL_TOKEN;
}
return result;
}; }; };
return {
middleware: middleware,
startListening: startListening,
stopListening: stopListening,
clearListeners: clearListenerMiddleware
};
}
// src/autoBatchEnhancer.ts
var SHOULD_AUTOBATCH = "RTK_autoBatch";
var prepareAutoBatched = function () { return function (payload) {
var _c;
return ({
payload: payload,
meta: (_c = {}, _c[SHOULD_AUTOBATCH] = true, _c)
});
}; };
var promise;
var queueMicrotaskShim = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : globalThis) : function (cb) { return (promise || (promise = Promise.resolve())).then(cb).catch(function (err) { return setTimeout(function () {
throw err;
}, 0); }); };
var createQueueWithTimer = function (timeout) {
return function (notify) {
setTimeout(notify, timeout);
};
};
var rAF = typeof window !== "undefined" && window.requestAnimationFrame ? window.requestAnimationFrame : createQueueWithTimer(10);
var autoBatchEnhancer = function (options) {
if (options === void 0) { options = { type: "raf" }; }
return function (next) { return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var store = next.apply(void 0, args);
var notifying = true;
var shouldNotifyAtEndOfTick = false;
var notificationQueued = false;
var listeners = new Set();
var queueCallback = options.type === "tick" ? queueMicrotaskShim : options.type === "raf" ? rAF : options.type === "callback" ? options.queueNotification : createQueueWithTimer(options.timeout);
var notifyListeners = function () {
notificationQueued = false;
if (shouldNotifyAtEndOfTick) {
shouldNotifyAtEndOfTick = false;
listeners.forEach(function (l) { return l(); });
}
};
return Object.assign({}, store, {
subscribe: function (listener2) {
var wrappedListener = function () { return notifying && listener2(); };
var unsubscribe = store.subscribe(wrappedListener);
listeners.add(listener2);
return function () {
unsubscribe();
listeners.delete(listener2);
};
},
dispatch: function (action) {
var _a;
try {
notifying = !((_a = action == null ? void 0 : action.meta) == null ? void 0 : _a[SHOULD_AUTOBATCH]);
shouldNotifyAtEndOfTick = !notifying;
if (shouldNotifyAtEndOfTick) {
if (!notificationQueued) {
notificationQueued = true;
queueCallback(notifyListeners);
}
}
return store.dispatch(action);
}
finally {
notifying = true;
}
}
});
}; };
};
// src/index.ts
(0,immer__WEBPACK_IMPORTED_MODULE_2__.enableES5)();
//# sourceMappingURL=redux-toolkit.esm.js.map
/***/ }),
/***/ "../assets/dev/js/editor/utils/is-instanceof.js":
/*!******************************************************!*\
!*** ../assets/dev/js/editor/utils/is-instanceof.js ***!
\******************************************************/
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
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; } } }; }
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); }
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; }
/**
* Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved
* object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can
* check whether it's instanceof by using the objects constructor and prototype names.
*
* @param object
* @param constructors
* @return {boolean}
*/
var _default = function _default(object, constructors) {
constructors = Array.isArray(constructors) ? constructors : [constructors];
var _iterator = _createForOfIteratorHelper(constructors),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var _constructor = _step.value;
if (object.constructor.name === _constructor.prototype[Symbol.toStringTag]) {
return true;
}
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
return false;
};
exports["default"] = _default;
/***/ }),
/***/ "../assets/dev/js/modules/imports/args-object.js":
/*!*******************************************************!*\
!*** ../assets/dev/js/modules/imports/args-object.js ***!
\*******************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
var _instanceType = _interopRequireDefault(__webpack_require__(/*! ./instance-type */ "../assets/dev/js/modules/imports/instance-type.js"));
var _isInstanceof = _interopRequireDefault(__webpack_require__(/*! ../../editor/utils/is-instanceof */ "../assets/dev/js/editor/utils/is-instanceof.js"));
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); }; }
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; } }
var ArgsObject = /*#__PURE__*/function (_InstanceType) {
(0, _inherits2.default)(ArgsObject, _InstanceType);
var _super = _createSuper(ArgsObject);
/**
* Function constructor().
*
* Create ArgsObject.
*
* @param {{}} args
*/
function ArgsObject(args) {
var _this;
(0, _classCallCheck2.default)(this, ArgsObject);
_this = _super.call(this);
_this.args = args;
return _this;
}
/**
* Function requireArgument().
*
* Validate property in args.
*
* @param {string} property
* @param {{}} args
*
* @throws {Error}
*
*/
(0, _createClass2.default)(ArgsObject, [{
key: "requireArgument",
value: function requireArgument(property) {
var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.args;
if (!Object.prototype.hasOwnProperty.call(args, property)) {
throw Error("".concat(property, " is required."));
}
}
/**
* Function requireArgumentType().
*
* Validate property in args using `type === typeof(args.whatever)`.
*
* @param {string} property
* @param {string} type
* @param {{}} args
*
* @throws {Error}
*
*/
}, {
key: "requireArgumentType",
value: function requireArgumentType(property, type) {
var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
this.requireArgument(property, args);
if ((0, _typeof2.default)(args[property]) !== type) {
throw Error("".concat(property, " invalid type: ").concat(type, "."));
}
}
/**
* Function requireArgumentInstance().
*
* Validate property in args using `args.whatever instanceof instance`.
*
* @param {string} property
* @param {*} instance
* @param {{}} args
*
* @throws {Error}
*
*/
}, {
key: "requireArgumentInstance",
value: function requireArgumentInstance(property, instance) {
var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
this.requireArgument(property, args);
if (!(args[property] instanceof instance) && !(0, _isInstanceof.default)(args[property], instance)) {
throw Error("".concat(property, " invalid instance."));
}
}
/**
* Function requireArgumentConstructor().
*
* Validate property in args using `type === args.whatever.constructor`.
*
* @param {string} property
* @param {*} type
* @param {{}} args
*
* @throws {Error}
*
*/
}, {
key: "requireArgumentConstructor",
value: function requireArgumentConstructor(property, type) {
var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args;
this.requireArgument(property, args);
// Note: Converting the constructor to string in order to avoid equation issues
// due to different memory addresses between iframes (window.Object !== window.top.Object).
if (args[property].constructor.toString() !== type.prototype.constructor.toString()) {
throw Error("".concat(property, " invalid constructor type."));
}
}
}], [{
key: "getInstanceType",
value: function getInstanceType() {
return 'ArgsObject';
}
}]);
return ArgsObject;
}(_instanceType.default);
exports["default"] = ArgsObject;
/***/ }),
/***/ "../assets/dev/js/modules/imports/force-method-implementation.js":
/*!***********************************************************************!*\
!*** ../assets/dev/js/modules/imports/force-method-implementation.js ***!
\***********************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = exports.ForceMethodImplementation = void 0;
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js"));
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); }; }
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; } }
// TODO: Wrong location used as `elementorModules.ForceMethodImplementation(); should be` `elementorUtils.forceMethodImplementation()`;
var ForceMethodImplementation = /*#__PURE__*/function (_Error) {
(0, _inherits2.default)(ForceMethodImplementation, _Error);
var _super = _createSuper(ForceMethodImplementation);
function ForceMethodImplementation() {
var _this;
var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
(0, _classCallCheck2.default)(this, ForceMethodImplementation);
_this = _super.call(this, "".concat(info.isStatic ? 'static ' : '').concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality."), args);
// Allow to pass custom properties to the error.
if (Object.keys(args).length) {
// eslint-disable-next-line no-console
console.error(args);
}
Error.captureStackTrace((0, _assertThisInitialized2.default)(_this), ForceMethodImplementation);
return _this;
}
return (0, _createClass2.default)(ForceMethodImplementation);
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
exports.ForceMethodImplementation = ForceMethodImplementation;
var _default = function _default(args) {
var stack = Error().stack,
caller = stack.split('\n')[2].trim(),
callerName = caller.startsWith('at new') ? 'constructor' : caller.split(' ')[1],
info = {};
info.functionName = callerName;
info.fullName = callerName;
if (info.functionName.includes('.')) {
var parts = info.functionName.split('.');
info.className = parts[0];
info.functionName = parts[1];
} else {
info.isStatic = true;
}
throw new ForceMethodImplementation(info, args);
};
exports["default"] = _default;
/***/ }),
/***/ "../assets/dev/js/modules/imports/instance-type.js":
/*!*********************************************************!*\
!*** ../assets/dev/js/modules/imports/instance-type.js ***!
\*********************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
var InstanceType = /*#__PURE__*/function (_Symbol$hasInstance) {
function InstanceType() {
var _this = this;
(0, _classCallCheck2.default)(this, InstanceType);
// Since anonymous classes sometimes do not get validated by babel, do it manually.
var target = this instanceof InstanceType ? this.constructor : void 0;
var prototypes = [];
while (target.__proto__ && target.__proto__.name) {
prototypes.push(target.__proto__);
target = target.__proto__;
}
prototypes.reverse().forEach(function (proto) {
return _this instanceof proto;
});
}
(0, _createClass2.default)(InstanceType, null, [{
key: _Symbol$hasInstance,
value: function value(target) {
/**
* This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class
* its give's opportunity to mange capabilities of instanceOf operator.
* saving current class each time will give option later to handle instanceOf manually.
*/
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.
if (target && !target.constructor.getInstanceType) {
return result;
}
if (target) {
if (!target.instanceTypes) {
target.instanceTypes = [];
}
if (!result) {
if (this.getInstanceType() === target.constructor.getInstanceType()) {
result = true;
}
}
if (result) {
var name = this.getInstanceType === InstanceType.getInstanceType ? 'BaseInstanceType' : this.getInstanceType();
if (-1 === target.instanceTypes.indexOf(name)) {
target.instanceTypes.push(name);
}
}
}
if (!result && target) {
// Check if the given 'target', is instance of known types.
result = target.instanceTypes && Array.isArray(target.instanceTypes) && -1 !== target.instanceTypes.indexOf(this.getInstanceType());
}
return result;
}
}, {
key: "getInstanceType",
value: function getInstanceType() {
elementorModules.ForceMethodImplementation();
}
}]);
return InstanceType;
}(Symbol.hasInstance);
exports["default"] = InstanceType;
/***/ }),
/***/ "../assets/dev/js/modules/imports/module.js":
/*!**************************************************!*\
!*** ../assets/dev/js/modules/imports/module.js ***!
\**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"));
var Module = function Module() {
var $ = jQuery,
instanceParams = arguments,
self = this,
events = {};
var settings;
var ensureClosureMethods = function ensureClosureMethods() {
$.each(self, function (methodName) {
var oldMethod = self[methodName];
if ('function' !== typeof oldMethod) {
return;
}
self[methodName] = function () {
return oldMethod.apply(self, arguments);
};
});
};
var initSettings = function initSettings() {
settings = self.getDefaultSettings();
var instanceSettings = instanceParams[0];
if (instanceSettings) {
$.extend(true, settings, instanceSettings);
}
};
var init = function init() {
self.__construct.apply(self, instanceParams);
ensureClosureMethods();
initSettings();
self.trigger('init');
};
this.getItems = function (items, itemKey) {
if (itemKey) {
var keyStack = itemKey.split('.'),
currentKey = keyStack.splice(0, 1);
if (!keyStack.length) {
return items[currentKey];
}
if (!items[currentKey]) {
return;
}
return this.getItems(items[currentKey], keyStack.join('.'));
}
return items;
};
this.getSettings = function (setting) {
return this.getItems(settings, setting);
};
this.setSettings = function (settingKey, value, settingsContainer) {
if (!settingsContainer) {
settingsContainer = settings;
}
if ('object' === (0, _typeof2.default)(settingKey)) {
$.extend(settingsContainer, settingKey);
return self;
}
var keyStack = settingKey.split('.'),
currentKey = keyStack.splice(0, 1);
if (!keyStack.length) {
settingsContainer[currentKey] = value;
return self;
}
if (!settingsContainer[currentKey]) {
settingsContainer[currentKey] = {};
}
return self.setSettings(keyStack.join('.'), value, settingsContainer[currentKey]);
};
this.getErrorMessage = function (type, functionName) {
var message;
switch (type) {
case 'forceMethodImplementation':
message = "The method '".concat(functionName, "' must to be implemented in the inheritor child.");
break;
default:
message = 'An error occurs';
}
return message;
};
// TODO: This function should be deleted ?.
this.forceMethodImplementation = function (functionName) {
throw new Error(this.getErrorMessage('forceMethodImplementation', functionName));
};
this.on = function (eventName, callback) {
if ('object' === (0, _typeof2.default)(eventName)) {
$.each(eventName, function (singleEventName) {
self.on(singleEventName, this);
});
return self;
}
var eventNames = eventName.split(' ');
eventNames.forEach(function (singleEventName) {
if (!events[singleEventName]) {
events[singleEventName] = [];
}
events[singleEventName].push(callback);
});
return self;
};
this.off = function (eventName, callback) {
if (!events[eventName]) {
return self;
}
if (!callback) {
delete events[eventName];
return self;
}
var callbackIndex = events[eventName].indexOf(callback);
if (-1 !== callbackIndex) {
delete events[eventName][callbackIndex];
// Reset array index (for next off on same event).
events[eventName] = events[eventName].filter(function (val) {
return val;
});
}
return self;
};
this.trigger = function (eventName) {
var methodName = 'on' + eventName[0].toUpperCase() + eventName.slice(1),
params = Array.prototype.slice.call(arguments, 1);
if (self[methodName]) {
self[methodName].apply(self, params);
}
var callbacks = events[eventName];
if (!callbacks) {
return self;
}
$.each(callbacks, function (index, callback) {
callback.apply(self, params);
});
return self;
};
init();
};
Module.prototype.__construct = function () {};
Module.prototype.getDefaultSettings = function () {
return {};
};
Module.prototype.getConstructorID = function () {
return this.constructor.name;
};
Module.extend = function (properties) {
var $ = jQuery,
parent = this;
var child = function child() {
return parent.apply(this, arguments);
};
$.extend(child, parent);
child.prototype = Object.create($.extend({}, parent.prototype, properties));
child.prototype.constructor = child;
child.__super__ = parent.prototype;
return child;
};
module.exports = Module;
/***/ }),
/***/ "../assets/dev/js/modules/imports/utils/masonry.js":
/*!*********************************************************!*\
!*** ../assets/dev/js/modules/imports/utils/masonry.js ***!
\*********************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _viewModule = _interopRequireDefault(__webpack_require__(/*! ../view-module */ "../assets/dev/js/modules/imports/view-module.js"));
var _default = _viewModule.default.extend({
getDefaultSettings: function getDefaultSettings() {
return {
container: null,
items: null,
columnsCount: 3,
verticalSpaceBetween: 30
};
},
getDefaultElements: function getDefaultElements() {
return {
$container: jQuery(this.getSettings('container')),
$items: jQuery(this.getSettings('items'))
};
},
run: function run() {
var heights = [],
distanceFromTop = this.elements.$container.position().top,
settings = this.getSettings(),
columnsCount = settings.columnsCount;
distanceFromTop += parseInt(this.elements.$container.css('margin-top'), 10);
this.elements.$items.each(function (index) {
var row = Math.floor(index / columnsCount),
$item = jQuery(this),
itemHeight = $item[0].getBoundingClientRect().height + settings.verticalSpaceBetween;
if (row) {
var itemPosition = $item.position(),
indexAtRow = index % columnsCount,
pullHeight = itemPosition.top - distanceFromTop - heights[indexAtRow];
pullHeight -= parseInt($item.css('margin-top'), 10);
pullHeight *= -1;
$item.css('margin-top', pullHeight + 'px');
heights[indexAtRow] += itemHeight;
} else {
heights.push(itemHeight);
}
});
}
});
exports["default"] = _default;
/***/ }),
/***/ "../assets/dev/js/modules/imports/utils/scroll.js":
/*!********************************************************!*\
!*** ../assets/dev/js/modules/imports/utils/scroll.js ***!
\********************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
// Moved from elementor pro: 'assets/dev/js/frontend/utils'
var Scroll = /*#__PURE__*/function () {
function Scroll() {
(0, _classCallCheck2.default)(this, Scroll);
}
(0, _createClass2.default)(Scroll, null, [{
key: "scrollObserver",
value:
/**
* @param {Object} obj
* @param {number} obj.sensitivity - Value between 0-100 - Will determine the intersection trigger points on the element
* @param {Function} obj.callback - Will be triggered on each intersection point between the element and the viewport top/bottom
* @param {string} obj.offset - Offset between the element intersection points and the viewport, written like in CSS: '-50% 0 -25%'
* @param {HTMLElement} obj.root - The element that the events will be relative to, if 'null' will be relative to the viewport
*/
function scrollObserver(obj) {
var lastScrollY = 0;
// Generating threshholds points along the animation height
// More threshholds points = more trigger points of the callback
var buildThreshholds = function buildThreshholds() {
var sensitivityPercentage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
var threshholds = [];
if (sensitivityPercentage > 0 && sensitivityPercentage <= 100) {
var increment = 100 / sensitivityPercentage;
for (var i = 0; i <= 100; i += increment) {
threshholds.push(i / 100);
}
} else {
threshholds.push(0);
}
return threshholds;
};
var options = {
root: obj.root || null,
rootMargin: obj.offset || '0px',
threshold: buildThreshholds(obj.sensitivity)
};
function handleIntersect(entries) {
var currentScrollY = entries[0].boundingClientRect.y,
isInViewport = entries[0].isIntersecting,
intersectionScrollDirection = currentScrollY < lastScrollY ? 'down' : 'up',
scrollPercentage = Math.abs(parseFloat((entries[0].intersectionRatio * 100).toFixed(2)));
obj.callback({
sensitivity: obj.sensitivity,
isInViewport: isInViewport,
scrollPercentage: scrollPercentage,
intersectionScrollDirection: intersectionScrollDirection
});
lastScrollY = currentScrollY;
}
return new IntersectionObserver(handleIntersect, options);
}
/**
* @param {jQuery.Element} $element
* @param {Object} offsetObj
* @param {number} offsetObj.start - Offset start value in percentages
* @param {number} offsetObj.end - Offset end value in percentages
*/
}, {
key: "getElementViewportPercentage",
value: function getElementViewportPercentage($element) {
var offsetObj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var elementOffset = $element[0].getBoundingClientRect(),
offsetStart = offsetObj.start || 0,
offsetEnd = offsetObj.end || 0,
windowStartOffset = window.innerHeight * offsetStart / 100,
windowEndOffset = window.innerHeight * offsetEnd / 100,
y1 = elementOffset.top - window.innerHeight,
y2 = elementOffset.top + windowStartOffset + $element.height(),
startPosition = 0 - y1 + windowStartOffset,
endPosition = y2 - y1 + windowEndOffset,
percent = Math.max(0, Math.min(startPosition / endPosition, 1));
return parseFloat((percent * 100).toFixed(2));
}
/**
* @param {Object} offsetObj
* @param {number} offsetObj.start - Offset start value in percentages
* @param {number} offsetObj.end - Offset end value in percentages
* @param {number} limitPageHeight - Will limit the page height calculation
*/
}, {
key: "getPageScrollPercentage",
value: function getPageScrollPercentage() {
var offsetObj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var limitPageHeight = arguments.length > 1 ? arguments[1] : undefined;
var offsetStart = offsetObj.start || 0,
offsetEnd = offsetObj.end || 0,
initialPageHeight = limitPageHeight || document.documentElement.scrollHeight - document.documentElement.clientHeight,
heightOffset = initialPageHeight * offsetStart / 100,
pageRange = initialPageHeight + heightOffset + initialPageHeight * offsetEnd / 100,
scrollPos = document.documentElement.scrollTop + document.body.scrollTop + heightOffset;
return scrollPos / pageRange * 100;
}
}]);
return Scroll;
}();
exports["default"] = Scroll;
/***/ }),
/***/ "../assets/dev/js/modules/imports/view-module.js":
/*!*******************************************************!*\
!*** ../assets/dev/js/modules/imports/view-module.js ***!
\*******************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _module = _interopRequireDefault(__webpack_require__(/*! ./module */ "../assets/dev/js/modules/imports/module.js"));
var _default = _module.default.extend({
elements: null,
getDefaultElements: function getDefaultElements() {
return {};
},
bindEvents: function bindEvents() {},
onInit: function onInit() {
this.initElements();
this.bindEvents();
},
initElements: function initElements() {
this.elements = this.getDefaultElements();
}
});
exports["default"] = _default;
/***/ }),
/***/ "../assets/dev/js/modules/modules.js":
/*!*******************************************!*\
!*** ../assets/dev/js/modules/modules.js ***!
\*******************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _module = _interopRequireDefault(__webpack_require__(/*! ./imports/module */ "../assets/dev/js/modules/imports/module.js"));
var _viewModule = _interopRequireDefault(__webpack_require__(/*! ./imports/view-module */ "../assets/dev/js/modules/imports/view-module.js"));
var _argsObject = _interopRequireDefault(__webpack_require__(/*! ./imports/args-object */ "../assets/dev/js/modules/imports/args-object.js"));
var _masonry = _interopRequireDefault(__webpack_require__(/*! ./imports/utils/masonry */ "../assets/dev/js/modules/imports/utils/masonry.js"));
var _scroll = _interopRequireDefault(__webpack_require__(/*! ./imports/utils/scroll */ "../assets/dev/js/modules/imports/utils/scroll.js"));
var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ./imports/force-method-implementation */ "../assets/dev/js/modules/imports/force-method-implementation.js"));
var _default = window.elementorModules = {
Module: _module.default,
ViewModule: _viewModule.default,
ArgsObject: _argsObject.default,
ForceMethodImplementation: _forceMethodImplementation.default,
utils: {
Masonry: _masonry.default,
Scroll: _scroll.default
}
};
exports["default"] = _default;
/***/ }),
/***/ "../core/common/assets/js/views/modal/header.js":
/*!******************************************************!*\
!*** ../core/common/assets/js/views/modal/header.js ***!
\******************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
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); }; }
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; } }
var _default = /*#__PURE__*/function (_Marionette$LayoutVie) {
(0, _inherits2.default)(_default, _Marionette$LayoutVie);
var _super = _createSuper(_default);
function _default() {
(0, _classCallCheck2.default)(this, _default);
return _super.apply(this, arguments);
}
(0, _createClass2.default)(_default, [{
key: "className",
value: function className() {
return 'elementor-templates-modal__header';
}
}, {
key: "getTemplate",
value: function getTemplate() {
return '#tmpl-elementor-templates-modal__header';
}
}, {
key: "regions",
value: function regions() {
return {
logoArea: '.elementor-templates-modal__header__logo-area',
tools: '#elementor-template-library-header-tools',
menuArea: '.elementor-templates-modal__header__menu-area'
};
}
}, {
key: "ui",
value: function ui() {
return {
closeModal: '.elementor-templates-modal__header__close'
};
}
}, {
key: "events",
value: function events() {
return {
'click @ui.closeModal': 'onCloseModalClick'
};
}
}, {
key: "templateHelpers",
value: function templateHelpers() {
return {
closeType: this.getOption('closeType')
};
}
}, {
key: "onCloseModalClick",
value: function onCloseModalClick() {
this._parent._parent._parent.hideModal();
}
}]);
return _default;
}(Marionette.LayoutView);
exports["default"] = _default;
/***/ }),
/***/ "../core/common/assets/js/views/modal/layout.js":
/*!******************************************************!*\
!*** ../core/common/assets/js/views/modal/layout.js ***!
\******************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
var _header = _interopRequireDefault(__webpack_require__(/*! ./header */ "../core/common/assets/js/views/modal/header.js"));
var _logo = _interopRequireDefault(__webpack_require__(/*! ./logo */ "../core/common/assets/js/views/modal/logo.js"));
var _loading = _interopRequireDefault(__webpack_require__(/*! ./loading */ "../core/common/assets/js/views/modal/loading.js"));
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); }; }
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; } }
var _default = /*#__PURE__*/function (_Marionette$LayoutVie) {
(0, _inherits2.default)(_default, _Marionette$LayoutVie);
var _super = _createSuper(_default);
function _default() {
(0, _classCallCheck2.default)(this, _default);
return _super.apply(this, arguments);
}
(0, _createClass2.default)(_default, [{
key: "el",
value: function el() {
return this.getModal().getElements('widget');
}
}, {
key: "regions",
value: function regions() {
return {
modalHeader: '.dialog-header',
modalContent: '.dialog-lightbox-content',
modalLoading: '.dialog-lightbox-loading'
};
}
}, {
key: "initialize",
value: function initialize() {
this.modalHeader.show(new _header.default(this.getHeaderOptions()));
}
}, {
key: "getModal",
value: function getModal() {
if (!this.modal) {
this.initModal();
}
return this.modal;
}
}, {
key: "initModal",
value: function initModal() {
var modalOptions = {
className: 'elementor-templates-modal',
closeButton: false,
draggable: false,
hide: {
onOutsideClick: false,
onEscKeyPress: false
}
};
jQuery.extend(true, modalOptions, this.getModalOptions());
this.modal = elementorCommon.dialogsManager.createWidget('lightbox', modalOptions);
this.modal.getElements('message').append(this.modal.addElement('content'), this.modal.addElement('loading'));
if (modalOptions.draggable) {
this.draggableModal();
}
}
}, {
key: "showModal",
value: function showModal() {
this.getModal().show();
}
}, {
key: "hideModal",
value: function hideModal() {
this.getModal().hide();
}
}, {
key: "draggableModal",
value: function draggableModal() {
var $modalWidgetContent = this.getModal().getElements('widgetContent');
$modalWidgetContent.draggable({
containment: 'parent',
stop: function stop() {
$modalWidgetContent.height('');
}
});
$modalWidgetContent.css('position', 'absolute');
}
}, {
key: "getModalOptions",
value: function getModalOptions() {
return {};
}
}, {
key: "getLogoOptions",
value: function getLogoOptions() {
return {};
}
}, {
key: "getHeaderOptions",
value: function getHeaderOptions() {
return {
closeType: 'normal'
};
}
}, {
key: "getHeaderView",
value: function getHeaderView() {
return this.modalHeader.currentView;
}
}, {
key: "showLoadingView",
value: function showLoadingView() {
this.modalLoading.show(new _loading.default());
this.modalLoading.$el.show();
this.modalContent.$el.hide();
}
}, {
key: "hideLoadingView",
value: function hideLoadingView() {
this.modalContent.$el.show();
this.modalLoading.$el.hide();
}
}, {
key: "showLogo",
value: function showLogo() {
this.getHeaderView().logoArea.show(new _logo.default(this.getLogoOptions()));
}
}]);
return _default;
}(Marionette.LayoutView);
exports["default"] = _default;
/***/ }),
/***/ "../core/common/assets/js/views/modal/loading.js":
/*!*******************************************************!*\
!*** ../core/common/assets/js/views/modal/loading.js ***!
\*******************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
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); }; }
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; } }
var _default = /*#__PURE__*/function (_Marionette$ItemView) {
(0, _inherits2.default)(_default, _Marionette$ItemView);
var _super = _createSuper(_default);
function _default() {
(0, _classCallCheck2.default)(this, _default);
return _super.apply(this, arguments);
}
(0, _createClass2.default)(_default, [{
key: "id",
value: function id() {
return 'elementor-template-library-loading';
}
}, {
key: "getTemplate",
value: function getTemplate() {
return '#tmpl-elementor-template-library-loading';
}
}]);
return _default;
}(Marionette.ItemView);
exports["default"] = _default;
/***/ }),
/***/ "../core/common/assets/js/views/modal/logo.js":
/*!****************************************************!*\
!*** ../core/common/assets/js/views/modal/logo.js ***!
\****************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
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); }; }
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; } }
var _default = /*#__PURE__*/function (_Marionette$ItemView) {
(0, _inherits2.default)(_default, _Marionette$ItemView);
var _super = _createSuper(_default);
function _default() {
(0, _classCallCheck2.default)(this, _default);
return _super.apply(this, arguments);
}
(0, _createClass2.default)(_default, [{
key: "getTemplate",
value: function getTemplate() {
return '#tmpl-elementor-templates-modal__header__logo';
}
}, {
key: "className",
value: function className() {
return 'elementor-templates-modal__header__logo';
}
}, {
key: "events",
value: function events() {
return {
click: 'onClick'
};
}
}, {
key: "templateHelpers",
value: function templateHelpers() {
return {
title: this.getOption('title')
};
}
}, {
key: "onClick",
value: function onClick() {
var clickCallback = this.getOption('click');
if (clickCallback) {
clickCallback();
}
}
}]);
return _default;
}(Marionette.ItemView);
exports["default"] = _default;
/***/ }),
/***/ "../modules/web-cli/assets/js/modules/command-base.js":
/*!************************************************************!*\
!*** ../modules/web-cli/assets/js/modules/command-base.js ***!
\************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
var _commandInfra = _interopRequireDefault(__webpack_require__(/*! ./command-infra */ "../modules/web-cli/assets/js/modules/command-infra.js"));
var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js"));
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); }; }
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; } }
/**
* @name $e.modules.CommandBase
*/
var CommandBase = /*#__PURE__*/function (_CommandInfra) {
(0, _inherits2.default)(CommandBase, _CommandInfra);
var _super = _createSuper(CommandBase);
function CommandBase() {
(0, _classCallCheck2.default)(this, CommandBase);
return _super.apply(this, arguments);
}
(0, _createClass2.default)(CommandBase, [{
key: "onBeforeRun",
value: function onBeforeRun() {
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
$e.hooks.runUIBefore(this.command, args);
}
}, {
key: "onAfterRun",
value: function onAfterRun() {
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var result = arguments.length > 1 ? arguments[1] : undefined;
$e.hooks.runUIAfter(this.command, args, result);
}
}, {
key: "onBeforeApply",
value: function onBeforeApply() {
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
$e.hooks.runDataDependency(this.command, args);
}
}, {
key: "onAfterApply",
value: function onAfterApply() {
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var result = arguments.length > 1 ? arguments[1] : undefined;
$e.hooks.runDataAfter(this.command, args, result);
}
}, {
key: "onCatchApply",
value: function onCatchApply(e) {
this.runCatchHooks(e);
}
/**
* Run all the catch hooks.
*
* @param {Error} e
*/
}, {
key: "runCatchHooks",
value: function runCatchHooks(e) {
$e.hooks.runDataCatch(this.command, this.args, e);
$e.hooks.runUICatch(this.command, this.args, e);
}
/**
* TODO - Remove - Backwards compatibility.
*
* Function requireContainer().
*
* Validate `arg.container` & `arg.containers`.
*
* @param {{}} args
* @deprecated since 3.7.0, extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase` instead.
*
* @throws {Error}
*/
}, {
key: "requireContainer",
value: function requireContainer() {
var _this = this;
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.args;
_deprecation.default.deprecated('requireContainer()', '3.7.0', 'Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`');
if (!args.container && !args.containers) {
throw Error('container or containers are required.');
}
if (args.container && args.containers) {
throw Error('container and containers cannot go together please select one of them.');
}
var containers = args.containers || [args.container];
containers.forEach(function (container) {
_this.requireArgumentInstance('container', elementorModules.editor.Container, {
container: container
});
});
}
}], [{
key: "getInstanceType",
value: function getInstanceType() {
return 'CommandBase';
}
}]);
return CommandBase;
}(_commandInfra.default);
exports["default"] = CommandBase;
/***/ }),
/***/ "../modules/web-cli/assets/js/modules/command-callback-base.js":
/*!*********************************************************************!*\
!*** ../modules/web-cli/assets/js/modules/command-callback-base.js ***!
\*********************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
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); }; }
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; } }
/**
* To support pure callbacks in the API(commands.js), to ensure they have registered with the proper context.
*/
var CommandCallbackBase = /*#__PURE__*/function (_CommandBase) {
(0, _inherits2.default)(CommandCallbackBase, _CommandBase);
var _super = _createSuper(CommandCallbackBase);
function CommandCallbackBase() {
(0, _classCallCheck2.default)(this, CommandCallbackBase);
return _super.apply(this, arguments);
}
(0, _createClass2.default)(CommandCallbackBase, [{
key: "apply",
value: function apply() {
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return this.constructor.getCallback()(args);
}
}], [{
key: "getInstanceType",
value: function getInstanceType() {
return 'CommandCallbackBase';
}
/**
* Get original callback of the command.
*
* Support pure callbacks ( Non command-base ).
*
* @return {()=>{}} Command Results.
*/
}, {
key: "getCallback",
value: function getCallback() {
return this.registerConfig.callback;
}
}]);
return CommandCallbackBase;
}(_commandBase.default);
exports["default"] = CommandCallbackBase;
/***/ }),
/***/ "../modules/web-cli/assets/js/modules/command-infra.js":
/*!*************************************************************!*\
!*** ../modules/web-cli/assets/js/modules/command-infra.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
var _argsObject = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js"));
var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js"));
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); }; }
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; } }
/**
* @typedef {import('../modules/component-base')} ComponentBase
*/
var CommandInfra = /*#__PURE__*/function (_ArgsObject) {
(0, _inherits2.default)(CommandInfra, _ArgsObject);
var _super = _createSuper(CommandInfra);
/**
* Function constructor().
*
* Create Commands Base.
*
* @param {{}} args
*/
function CommandInfra() {
var _this;
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
(0, _classCallCheck2.default)(this, CommandInfra);
_this = _super.call(this, args);
if (!_this.constructor.registerConfig) {
throw RangeError('Doing it wrong: Each command type should have `registerConfig`.');
}
// Acknowledge self about which command it run.
_this.command = _this.constructor.getCommand();
// Assign instance of current component.
_this.component = _this.constructor.getComponent();
// Who ever need do something before without `super` the constructor can use `initialize` method.
_this.initialize(args);
// Refresh args, maybe the changed via `initialize`.
args = _this.args;
// Validate args before run.
_this.validateArgs(args);
return _this;
}
/**
* Function initialize().
*
* Initialize command, called after construction.
*
* @param {{}} args
*/
(0, _createClass2.default)(CommandInfra, [{
key: "currentCommand",
get:
/**
* @deprecated since 3.7.0, use `this.command` instead.
*/
function get() {
_deprecation.default.deprecated('this.currentCommand', '3.7.0', 'this.command');
return this.command;
}
}, {
key: "initialize",
value: function initialize() {
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
} // eslint-disable-line no-unused-vars
/**
* Function validateArgs().
*
* Validate command arguments.
*
* @param {{}} args
*/
}, {
key: "validateArgs",
value: function validateArgs() {
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
} // eslint-disable-line no-unused-vars
// eslint-disable-next-line jsdoc/require-returns-check
/**
* Function apply().
*
* Do the actual command.
*
* @param {{}} args
*
* @return {*} Command results.
*/
}, {
key: "apply",
value: function apply() {
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
// eslint-disable-line no-unused-vars
elementorModules.ForceMethodImplementation();
}
/**
* Function run().
*
* Run command with history & hooks.
*
* @return {*} Command results.
*/
}, {
key: "run",
value: function run() {
return this.apply(this.args);
}
/**
* Function onBeforeRun.
*
* Called before run().
*
* @param {{}} args
*/
}, {
key: "onBeforeRun",
value: function onBeforeRun() {
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
} // eslint-disable-line no-unused-vars
/**
* Function onAfterRun.
*
* Called after run().
*
* @param {{}} args
* @param {*} result
*/
}, {
key: "onAfterRun",
value: function onAfterRun() {
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var result = arguments.length > 1 ? arguments[1] : undefined;
} // eslint-disable-line no-unused-vars
/**
* Function onBeforeApply.
*
* Called before apply().
*
* @param {{}} args
*/
}, {
key: "onBeforeApply",
value: function onBeforeApply() {
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
} // eslint-disable-line no-unused-vars
/**
* Function onAfterApply.
*
* Called after apply().
*
* @param {{}} args
* @param {*} result
*/
}, {
key: "onAfterApply",
value: function onAfterApply() {
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var result = arguments.length > 1 ? arguments[1] : undefined;
} // eslint-disable-line no-unused-vars
/**
* Function onCatchApply.
*
* Called after apply() failed.
*
* @param {Error} e
*/
}, {
key: "onCatchApply",
value: function onCatchApply(e) {} // eslint-disable-line no-unused-vars
}], [{
key: "getInstanceType",
value: function getInstanceType() {
return 'CommandInfra';
}
/**
* Get info of command.
*
* @return {Object} Extra information about the command.
*/
}, {
key: "getInfo",
value: function getInfo() {
return {};
}
/**
* @return {string} Self command name.
*/
}, {
key: "getCommand",
value: function getCommand() {
return this.registerConfig.command;
}
/**
* @return {ComponentBase} Self component
*/
}, {
key: "getComponent",
value: function getComponent() {
return this.registerConfig.component;
}
}, {
key: "setRegisterConfig",
value: function setRegisterConfig(config) {
this.registerConfig = Object.freeze(config);
}
}]);
return CommandInfra;
}(_argsObject.default);
exports["default"] = CommandInfra;
/**
* @type {Object}
*/
(0, _defineProperty2.default)(CommandInfra, "registerConfig", null);
/***/ }),
/***/ "../modules/web-cli/assets/js/modules/commands/close.js":
/*!**************************************************************!*\
!*** ../modules/web-cli/assets/js/modules/commands/close.js ***!
\**************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = exports.Close = void 0;
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
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); }; }
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; } }
var Close = /*#__PURE__*/function (_CommandBase) {
(0, _inherits2.default)(Close, _CommandBase);
var _super = _createSuper(Close);
function Close() {
(0, _classCallCheck2.default)(this, Close);
return _super.apply(this, arguments);
}
(0, _createClass2.default)(Close, [{
key: "apply",
value: function apply() {
this.component.close();
}
}]);
return Close;
}(_commandBase.default);
exports.Close = Close;
var _default = Close;
exports["default"] = _default;
/***/ }),
/***/ "../modules/web-cli/assets/js/modules/commands/index.js":
/*!**************************************************************!*\
!*** ../modules/web-cli/assets/js/modules/commands/index.js ***!
\**************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
Object.defineProperty(exports, "Close", ({
enumerable: true,
get: function get() {
return _close.Close;
}
}));
Object.defineProperty(exports, "Open", ({
enumerable: true,
get: function get() {
return _open.Open;
}
}));
Object.defineProperty(exports, "Toggle", ({
enumerable: true,
get: function get() {
return _toggle.Toggle;
}
}));
var _close = __webpack_require__(/*! ./close */ "../modules/web-cli/assets/js/modules/commands/close.js");
var _open = __webpack_require__(/*! ./open */ "../modules/web-cli/assets/js/modules/commands/open.js");
var _toggle = __webpack_require__(/*! ./toggle */ "../modules/web-cli/assets/js/modules/commands/toggle.js");
/***/ }),
/***/ "../modules/web-cli/assets/js/modules/commands/open.js":
/*!*************************************************************!*\
!*** ../modules/web-cli/assets/js/modules/commands/open.js ***!
\*************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = exports.Open = void 0;
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
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); }; }
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; } }
var Open = /*#__PURE__*/function (_CommandBase) {
(0, _inherits2.default)(Open, _CommandBase);
var _super = _createSuper(Open);
function Open() {
(0, _classCallCheck2.default)(this, Open);
return _super.apply(this, arguments);
}
(0, _createClass2.default)(Open, [{
key: "apply",
value: function apply() {
$e.route(this.component.getNamespace());
}
}]);
return Open;
}(_commandBase.default);
exports.Open = Open;
var _default = Open;
exports["default"] = _default;
/***/ }),
/***/ "../modules/web-cli/assets/js/modules/commands/toggle.js":
/*!***************************************************************!*\
!*** ../modules/web-cli/assets/js/modules/commands/toggle.js ***!
\***************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = exports.Toggle = void 0;
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js"));
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); }; }
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; } }
var Toggle = /*#__PURE__*/function (_CommandBase) {
(0, _inherits2.default)(Toggle, _CommandBase);
var _super = _createSuper(Toggle);
function Toggle() {
(0, _classCallCheck2.default)(this, Toggle);
return _super.apply(this, arguments);
}
(0, _createClass2.default)(Toggle, [{
key: "apply",
value: function apply() {
if (this.component.isOpen) {
this.component.close();
} else {
$e.route(this.component.getNamespace());
}
}
}]);
return Toggle;
}(_commandBase.default);
exports.Toggle = Toggle;
var _default = Toggle;
exports["default"] = _default;
/***/ }),
/***/ "../modules/web-cli/assets/js/modules/component-base.js":
/*!**************************************************************!*\
!*** ../modules/web-cli/assets/js/modules/component-base.js ***!
\**************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
var _commandCallbackBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-callback-base */ "../modules/web-cli/assets/js/modules/command-callback-base.js"));
var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");
var _module = _interopRequireDefault(__webpack_require__(/*! elementor/assets/dev/js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js"));
var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js"));
var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js"));
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; }
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; }
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); }; }
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; } }
/**
* @typedef {import('./command-infra')} CommandInfra
* @typedef {import('./hook-base')} HookBase
* @typedef {import('../core/states/ui-state-base')} UiStateBase
*/
var ComponentBase = /*#__PURE__*/function (_Module) {
(0, _inherits2.default)(ComponentBase, _Module);
var _super = _createSuper(ComponentBase);
function ComponentBase() {
(0, _classCallCheck2.default)(this, ComponentBase);
return _super.apply(this, arguments);
}
(0, _createClass2.default)(ComponentBase, [{
key: "__construct",
value: function __construct() {
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
if (args.manager) {
this.manager = args.manager;
}
this.commands = this.defaultCommands();
this.commandsInternal = this.defaultCommandsInternal();
this.hooks = this.defaultHooks();
this.routes = this.defaultRoutes();
this.tabs = this.defaultTabs();
this.shortcuts = this.defaultShortcuts();
this.utils = this.defaultUtils();
this.data = this.defaultData();
this.uiStates = this.defaultUiStates();
this.states = this.defaultStates();
this.defaultRoute = '';
this.currentTab = '';
}
}, {
key: "registerAPI",
value: function registerAPI() {
var _this = this;
Object.entries(this.getTabs()).forEach(function (tab) {
return _this.registerTabRoute(tab[0]);
});
Object.entries(this.getRoutes()).forEach(function (_ref) {
var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
route = _ref2[0],
callback = _ref2[1];
return _this.registerRoute(route, callback);
});
Object.entries(this.getCommands()).forEach(function (_ref3) {
var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
command = _ref4[0],
callback = _ref4[1];
return _this.registerCommand(command, callback);
});
Object.entries(this.getCommandsInternal()).forEach(function (_ref5) {
var _ref6 = (0, _slicedToArray2.default)(_ref5, 2),
command = _ref6[0],
callback = _ref6[1];
return _this.registerCommandInternal(command, callback);
});
Object.values(this.getHooks()).forEach(function (instance) {
return _this.registerHook(instance);
});
Object.entries(this.getData()).forEach(function (_ref7) {
var _ref8 = (0, _slicedToArray2.default)(_ref7, 2),
command = _ref8[0],
callback = _ref8[1];
return _this.registerData(command, callback);
});
Object.values(this.getUiStates()).forEach(function (instance) {
return _this.registerUiState(instance);
});
Object.entries(this.getStates()).forEach(function (_ref9) {
var _ref10 = (0, _slicedToArray2.default)(_ref9, 2),
id = _ref10[0],
state = _ref10[1];
return _this.registerState(id, state);
});
}
// eslint-disable-next-line jsdoc/require-returns-check
/**
* @return {string} namespace
*/
}, {
key: "getNamespace",
value: function getNamespace() {
(0, _forceMethodImplementation.default)();
}
/**
* @deprecated since 3.7.0, use `getServiceName()` instead.
*/
}, {
key: "getRootContainer",
value: function getRootContainer() {
_deprecation.default.deprecated('getRootContainer()', '3.7.0', 'getServiceName()');
return this.getServiceName();
}
}, {
key: "getServiceName",
value: function getServiceName() {
return this.getNamespace().split('/')[0];
}
}, {
key: "store",
get: function get() {
return $e.store.get(this.getNamespace());
}
}, {
key: "defaultTabs",
value: function defaultTabs() {
return {};
}
}, {
key: "defaultRoutes",
value: function defaultRoutes() {
return {};
}
}, {
key: "defaultCommands",
value: function defaultCommands() {
return {};
}
}, {
key: "defaultCommandsInternal",
value: function defaultCommandsInternal() {
return {};
}
}, {
key: "defaultHooks",
value: function defaultHooks() {
return {};
}
/**
* Get the component's default UI states.
*
* @return {Object} default UI states
*/
}, {
key: "defaultUiStates",
value: function defaultUiStates() {
return {};
}
/**
* Get the component's Redux slice settings.
*
* @return {Object} Redux slice settings
*/
}, {
key: "defaultStates",
value: function defaultStates() {
return {};
}
}, {
key: "defaultShortcuts",
value: function defaultShortcuts() {
return {};
}
}, {
key: "defaultUtils",
value: function defaultUtils() {
return {};
}
}, {
key: "defaultData",
value: function defaultData() {
return {};
}
}, {
key: "getCommands",
value: function getCommands() {
return this.commands;
}
}, {
key: "getCommandsInternal",
value: function getCommandsInternal() {
return this.commandsInternal;
}
}, {
key: "getHooks",
value: function getHooks() {
return this.hooks;
}
/**
* Retrieve the component's UI states.
*
* @return {Object} UI states
*/
}, {
key: "getUiStates",
value: function getUiStates() {
return this.uiStates;
}
/**
* Retrieve the component's Redux Slice.
*
* @return {Object} Redux Slice
*/
}, {
key: "getStates",
value: function getStates() {
return this.states;
}
}, {
key: "getRoutes",
value: function getRoutes() {
return this.routes;
}
}, {
key: "getTabs",
value: function getTabs() {
return this.tabs;
}
}, {
key: "getShortcuts",
value: function getShortcuts() {
return this.shortcuts;
}
}, {
key: "getData",
value: function getData() {
return this.data;
}
/**
* @param {string} command
* @param {(()=>{}|CommandInfra)} context
* @param {'default'|'internal'|'data'} commandsType
*/
}, {
key: "registerCommand",
value: function registerCommand(command, context) {
var commandsType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'default';
var commandsManager;
switch (commandsType) {
case 'default':
commandsManager = $e.commands;
break;
case 'internal':
commandsManager = $e.commandsInternal;
break;
case 'data':
commandsManager = $e.data;
break;
default:
throw new Error("Invalid commands type: '".concat(command, "'"));
}
var fullCommand = this.getNamespace() + '/' + command,
instanceType = context.getInstanceType ? context.getInstanceType() : false,
registerConfig = {
command: fullCommand,
component: this
};
// Support pure callback.
if (!instanceType) {
if ($e.devTools) {
$e.devTools.log.warn("Attach command-callback-base, on command: '".concat(fullCommand, "', context is unknown type."));
}
registerConfig.callback = context;
// Unique class.
context = /*#__PURE__*/function (_CommandCallbackBase) {
(0, _inherits2.default)(context, _CommandCallbackBase);
var _super2 = _createSuper(context);
function context() {
(0, _classCallCheck2.default)(this, context);
return _super2.apply(this, arguments);
}
return (0, _createClass2.default)(context);
}(_commandCallbackBase.default);
}
context.setRegisterConfig(registerConfig);
commandsManager.register(this, command, context);
}
/**
* @param {HookBase} instance
*/
}, {
key: "registerHook",
value: function registerHook(instance) {
return instance.register();
}
}, {
key: "registerCommandInternal",
value: function registerCommandInternal(command, context) {
this.registerCommand(command, context, 'internal');
}
/**
* Register a UI state.
*
* @param {UiStateBase} instance - UI state instance.
*
* @return {void}
*/
}, {
key: "registerUiState",
value: function registerUiState(instance) {
$e.uiStates.register(instance);
}
/**
* Register a Redux Slice.
*
* @param {string} id - State id.
* @param {Object} stateConfig - The state config.
*
* @return {void}
*/
}, {
key: "registerState",
value: function registerState(id, stateConfig) {
id = this.getNamespace() + (id ? "/".concat(id) : '');
var slice = (0, _toolkit.createSlice)(_objectSpread(_objectSpread({}, stateConfig), {}, {
name: id
}));
$e.store.register(id, slice);
}
}, {
key: "registerRoute",
value: function registerRoute(route, callback) {
$e.routes.register(this, route, callback);
}
}, {
key: "registerData",
value: function registerData(command, context) {
this.registerCommand(command, context, 'data');
}
}, {
key: "unregisterRoute",
value: function unregisterRoute(route) {
$e.routes.unregister(this, route);
}
}, {
key: "registerTabRoute",
value: function registerTabRoute(tab) {
var _this2 = this;
this.registerRoute(tab, function (args) {
return _this2.activateTab(tab, args);
});
}
}, {
key: "dependency",
value: function dependency() {
return true;
}
}, {
key: "open",
value: function open() {
return true;
}
}, {
key: "close",
value: function close() {
if (!this.isOpen) {
return false;
}
this.isOpen = false;
this.inactivate();
$e.routes.clearCurrent(this.getNamespace());
$e.routes.clearHistory(this.getServiceName());
return true;
}
}, {
key: "activate",
value: function activate() {
$e.components.activate(this.getNamespace());
}
}, {
key: "inactivate",
value: function inactivate() {
$e.components.inactivate(this.getNamespace());
}
}, {
key: "isActive",
value: function isActive() {
return $e.components.isActive(this.getNamespace());
}
}, {
key: "onRoute",
value: function onRoute(route) {
this.toggleRouteClass(route, true);
this.toggleHistoryClass();
this.activate();
this.trigger('route/open', route);
}
}, {
key: "onCloseRoute",
value: function onCloseRoute(route) {
this.toggleRouteClass(route, false);
this.inactivate();
this.trigger('route/close', route);
}
}, {
key: "setDefaultRoute",
value: function setDefaultRoute(route) {
this.defaultRoute = this.getNamespace() + '/' + route;
}
}, {
key: "getDefaultRoute",
value: function getDefaultRoute() {
return this.defaultRoute;
}
}, {
key: "removeTab",
value: function removeTab(tab) {
delete this.tabs[tab];
this.unregisterRoute(tab);
}
}, {
key: "hasTab",
value: function hasTab(tab) {
return !!this.tabs[tab];
}
}, {
key: "addTab",
value: function addTab(tab, args, position) {
var _this3 = this;
this.tabs[tab] = args;
// It can be 0.
if ('undefined' !== typeof position) {
var newTabs = {};
var ids = Object.keys(this.tabs);
// Remove new tab
ids.pop();
// Add it to position.
ids.splice(position, 0, tab);
ids.forEach(function (id) {
newTabs[id] = _this3.tabs[id];
});
this.tabs = newTabs;
}
this.registerTabRoute(tab);
}
}, {
key: "getTabsWrapperSelector",
value: function getTabsWrapperSelector() {
return '';
}
}, {
key: "getTabRoute",
value: function getTabRoute(tab) {
return this.getNamespace() + '/' + tab;
}
}, {
key: "renderTab",
value: function renderTab(tab) {} // eslint-disable-line
}, {
key: "activateTab",
value: function activateTab(tab, args) {
var _this4 = this;
this.renderTab(tab, args);
jQuery(this.getTabsWrapperSelector() + ' .elementor-component-tab').off('click').on('click', function (event) {
$e.route(_this4.getTabRoute(event.currentTarget.dataset.tab), args);
}).removeClass('elementor-active').filter('[data-tab="' + tab + '"]').addClass('elementor-active');
}
}, {
key: "getActiveTabConfig",
value: function getActiveTabConfig() {
return this.tabs[this.currentTab] || {};
}
}, {
key: "getBodyClass",
value: function getBodyClass(route) {
return 'e-route-' + route.replace(/\//g, '-');
}
/**
* If command includes uppercase character convert it to lowercase and add `-`.
* e.g: `CopyAll` is converted to `copy-all`.
*
* @param {string} commandName
*/
}, {
key: "normalizeCommandName",
value: function normalizeCommandName(commandName) {
return commandName.replace(/[A-Z]/g, function (match, offset) {
return (offset > 0 ? '-' : '') + match.toLowerCase();
});
}
/**
* @param {{}} commandsFromImport
* @return {{}} imported commands
*/
}, {
key: "importCommands",
value: function importCommands(commandsFromImport) {
var _this5 = this;
var commands = {};
// Convert `Commands` to `ComponentBase` workable format.
Object.entries(commandsFromImport).forEach(function (_ref11) {
var _ref12 = (0, _slicedToArray2.default)(_ref11, 2),
className = _ref12[0],
Class = _ref12[1];
var command = _this5.normalizeCommandName(className);
commands[command] = Class;
});
return commands;
}
}, {
key: "importHooks",
value: function importHooks(hooksFromImport) {
var hooks = {};
for (var key in hooksFromImport) {
var hook = new hooksFromImport[key]();
hooks[hook.getId()] = hook;
}
return hooks;
}
/**
* Import & initialize the component's UI states.
* Should be used inside `defaultUiState()`.
*
* @param {Object} statesFromImport - UI states from import.
*
* @return {Object} UI States
*/
}, {
key: "importUiStates",
value: function importUiStates(statesFromImport) {
var _this6 = this;
var uiStates = {};
Object.values(statesFromImport).forEach(function (className) {
var uiState = new className(_this6);
uiStates[uiState.getId()] = uiState;
});
return uiStates;
}
/**
* Set a UI state value.
* TODO: Should we provide such function? Maybe the developer should implicitly pass the full state ID?
*
* @param {string} state - Non-prefixed state ID.
* @param {*} value - New state value.
*
* @return {void}
*/
}, {
key: "setUiState",
value: function setUiState(state, value) {
$e.uiStates.set("".concat(this.getNamespace(), "/").concat(state), value);
}
}, {
key: "toggleRouteClass",
value: function toggleRouteClass(route, state) {
document.body.classList.toggle(this.getBodyClass(route), state);
}
}, {
key: "toggleHistoryClass",
value: function toggleHistoryClass() {
document.body.classList.toggle('e-routes-has-history', !!$e.routes.getHistory(this.getServiceName()).length);
}
}]);
return ComponentBase;
}(_module.default);
exports["default"] = ComponentBase;
/***/ }),
/***/ "../modules/web-cli/assets/js/modules/component-modal-base.js":
/*!********************************************************************!*\
!*** ../modules/web-cli/assets/js/modules/component-modal-base.js ***!
\********************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js"));
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
var _componentBase = _interopRequireDefault(__webpack_require__(/*! ./component-base */ "../modules/web-cli/assets/js/modules/component-base.js"));
var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../modules/web-cli/assets/js/modules/commands/index.js"));
var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js"));
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); }
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; }
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); }; }
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; } }
var ComponentModalBase = /*#__PURE__*/function (_ComponentBase) {
(0, _inherits2.default)(ComponentModalBase, _ComponentBase);
var _super = _createSuper(ComponentModalBase);
function ComponentModalBase() {
(0, _classCallCheck2.default)(this, ComponentModalBase);
return _super.apply(this, arguments);
}
(0, _createClass2.default)(ComponentModalBase, [{
key: "registerAPI",
value: function registerAPI() {
var _this = this;
(0, _get2.default)((0, _getPrototypeOf2.default)(ComponentModalBase.prototype), "registerAPI", this).call(this);
$e.shortcuts.register('esc', {
scopes: [this.getNamespace()],
callback: function callback() {
return _this.close();
}
});
}
}, {
key: "defaultCommands",
value: function defaultCommands() {
return this.importCommands(commands);
}
}, {
key: "defaultRoutes",
value: function defaultRoutes() {
return {
'': function _() {/* Nothing to do, it's already rendered. */}
};
}
}, {
key: "open",
value: function open() {
var _this2 = this;
if (!this.layout) {
var layout = this.getModalLayout();
this.layout = new layout({
component: this
});
this.layout.getModal().on('hide', function () {
return _this2.close();
});
}
this.layout.showModal();
return true;
}
}, {
key: "close",
value: function close() {
if (!(0, _get2.default)((0, _getPrototypeOf2.default)(ComponentModalBase.prototype), "close", this).call(this)) {
return false;
}
this.layout.getModal().hide();
return true;
}
}, {
key: "getModalLayout",
value: function getModalLayout() {
(0, _forceMethodImplementation.default)();
}
}]);
return ComponentModalBase;
}(_componentBase.default);
exports["default"] = ComponentModalBase;
/***/ }),
/***/ "../modules/web-cli/assets/js/modules/hook-break.js":
/*!**********************************************************!*\
!*** ../modules/web-cli/assets/js/modules/hook-break.js ***!
\**********************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js"));
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); }; }
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; } }
var HookBreak = /*#__PURE__*/function (_Error) {
(0, _inherits2.default)(HookBreak, _Error);
var _super = _createSuper(HookBreak);
function HookBreak() {
(0, _classCallCheck2.default)(this, HookBreak);
return _super.call(this, 'HookBreak');
}
return (0, _createClass2.default)(HookBreak);
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
exports["default"] = HookBreak;
/***/ }),
/***/ "../modules/web-cli/assets/js/utils/console.js":
/*!*****************************************************!*\
!*** ../modules/web-cli/assets/js/utils/console.js ***!
\*****************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var Console = /*#__PURE__*/function () {
function Console() {
(0, _classCallCheck2.default)(this, Console);
}
(0, _createClass2.default)(Console, null, [{
key: "error",
value: function error(message) {
// Show an error if devTools is available.
if ($e.devTools) {
$e.devTools.log.error(message);
}
// If not a 'Hook-Break' then show error.
if (!(message instanceof $e.modules.HookBreak)) {
// eslint-disable-next-line no-console
console.error(message);
}
}
}, {
key: "warn",
value: function warn() {
var _console;
var style = "font-size: 12px; background-image: url(\"".concat(elementorWebCliConfig.urls.assets, "images/logo-icon.png\"); background-repeat: no-repeat; background-size: contain;");
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
args.unshift('%c %c', style, '');
(_console = console).warn.apply(_console, args); // eslint-disable-line no-console
}
}]);
return Console;
}();
exports["default"] = Console;
/***/ }),
/***/ "../modules/web-cli/assets/js/utils/deprecation.js":
/*!*********************************************************!*\
!*** ../modules/web-cli/assets/js/utils/deprecation.js ***!
\*********************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js"));
// Copied from `modules/dev-tools/assets/js/deprecation.js`
/**
* @typedef {Object} Version
* @property {number} major1 The first number
* @property {number} major2 The second number
* @property {number} minor The third number
* @property {string} build The fourth number
*/
var softDeprecated = function softDeprecated(name, version, replacement) {
if (elementorWebCliConfig.isDebug) {
deprecatedMessage('soft', name, version, replacement);
}
};
var hardDeprecated = function hardDeprecated(name, version, replacement) {
deprecatedMessage('hard', name, version, replacement);
};
var deprecatedMessage = function deprecatedMessage(type, name, version, replacement) {
var message = "`".concat(name, "` is ").concat(type, " deprecated since ").concat(version);
if (replacement) {
message += " - Use `".concat(replacement, "` instead");
}
_console.default.warn(message);
};
var Deprecation = /*#__PURE__*/function () {
function Deprecation() {
(0, _classCallCheck2.default)(this, Deprecation);
}
(0, _createClass2.default)(Deprecation, null, [{
key: "deprecated",
value: function deprecated(name, version, replacement) {
if (this.isHardDeprecated(version)) {
hardDeprecated(name, version, replacement);
} else {
softDeprecated(name, version, replacement);
}
}
/**
* @param {string} version
*
* @return {Version}
*/
}, {
key: "parseVersion",
value: function parseVersion(version) {
var versionParts = version.split('.');
if (versionParts.length < 3 || versionParts.length > 4) {
throw new RangeError('Invalid Semantic Version string provided');
}
var _versionParts = (0, _slicedToArray2.default)(versionParts, 4),
major1 = _versionParts[0],
major2 = _versionParts[1],
minor = _versionParts[2],
_versionParts$ = _versionParts[3],
build = _versionParts$ === void 0 ? '' : _versionParts$;
return {
major1: parseInt(major1),
major2: parseInt(major2),
minor: parseInt(minor),
build: build
};
}
/**
* Get total of major.
*
* Since `get_total_major` cannot determine how much really versions between 2.9.0 and 3.3.0 if there is 2.10.0 version for example,
* versions with major2 more then 9 will be added to total.
*
* @param {Version} versionObj
*
* @return {number}
*/
}, {
key: "getTotalMajor",
value: function getTotalMajor(versionObj) {
var total = parseInt("".concat(versionObj.major1).concat(versionObj.major2, "0"));
total = Number((total / 10).toFixed(0));
if (versionObj.major2 > 9) {
total = versionObj.major2 - 9;
}
return total;
}
/**
* @param {string} version1
* @param {string} version2
*
* @return {number}
*/
}, {
key: "compareVersion",
value: function compareVersion(version1, version2) {
var _this = this;
return [this.parseVersion(version1), this.parseVersion(version2)].map(function (versionObj) {
return _this.getTotalMajor(versionObj);
}).reduce(function (acc, major) {
return acc - major;
});
}
/**
* @param {string} version
*
* @return {boolean}
*/
}, {
key: "isSoftDeprecated",
value: function isSoftDeprecated(version) {
var total = this.compareVersion(version, elementorWebCliConfig.version);
return total <= 4;
}
/**
* @param {string} version
* @return {boolean}
*/
}, {
key: "isHardDeprecated",
value: function isHardDeprecated(version) {
var total = this.compareVersion(version, elementorWebCliConfig.version);
return total < 0 || total >= 8;
}
}]);
return Deprecation;
}();
exports["default"] = Deprecation;
/***/ }),
/***/ "../modules/web-cli/assets/js/utils/force-method-implementation.js":
/*!*************************************************************************!*\
!*** ../modules/web-cli/assets/js/utils/force-method-implementation.js ***!
\*************************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = exports.ForceMethodImplementation = void 0;
var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js"));
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); }; }
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; } }
// TODO: Copied from `assets/dev/js/modules/imports/force-method-implementation.js`;
var ForceMethodImplementation = /*#__PURE__*/function (_Error) {
(0, _inherits2.default)(ForceMethodImplementation, _Error);
var _super = _createSuper(ForceMethodImplementation);
function ForceMethodImplementation() {
var _this;
var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
(0, _classCallCheck2.default)(this, ForceMethodImplementation);
_this = _super.call(this, "".concat(info.isStatic ? 'static ' : '').concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality."));
Error.captureStackTrace((0, _assertThisInitialized2.default)(_this), ForceMethodImplementation);
return _this;
}
return (0, _createClass2.default)(ForceMethodImplementation);
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
exports.ForceMethodImplementation = ForceMethodImplementation;
var _default = function _default() {
var stack = Error().stack,
caller = stack.split('\n')[2].trim(),
callerName = caller.startsWith('at new') ? 'constructor' : caller.split(' ')[1],
info = {};
info.functionName = callerName;
info.fullName = callerName;
if (info.functionName.includes('.')) {
var parts = info.functionName.split('.');
info.className = parts[0];
info.functionName = parts[1];
} else {
info.isStatic = true;
}
throw new ForceMethodImplementation(info);
};
exports["default"] = _default;
/***/ }),
/***/ "../node_modules/redux-thunk/es/index.js":
/*!***********************************************!*\
!*** ../node_modules/redux-thunk/es/index.js ***!
\***********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/** A function that accepts a potential "extra argument" value to be injected later,
* and returns an instance of the thunk middleware that uses that value
*/
function createThunkMiddleware(extraArgument) {
// Standard Redux middleware definition pattern:
// See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware
var middleware = function middleware(_ref) {
var dispatch = _ref.dispatch,
getState = _ref.getState;
return function (next) {
return function (action) {
// The thunk middleware looks for any functions that were passed to `store.dispatch`.
// If this "action" is really a function, call it and return the result.
if (typeof action === 'function') {
// Inject the store's `dispatch` and `getState` methods, as well as any "extra arg"
return action(dispatch, getState, extraArgument);
} // Otherwise, pass the action down the middleware chain as usual
return next(action);
};
};
};
return middleware;
}
var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version
// with whatever "extra arg" they want to inject into their thunks
thunk.withExtraArgument = createThunkMiddleware;
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (thunk);
/***/ }),
/***/ "../node_modules/redux/es/redux.js":
/*!*****************************************!*\
!*** ../node_modules/redux/es/redux.js ***!
\*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ __DO_NOT_USE__ActionTypes: () => (/* binding */ ActionTypes),
/* harmony export */ applyMiddleware: () => (/* binding */ applyMiddleware),
/* harmony export */ bindActionCreators: () => (/* binding */ bindActionCreators),
/* harmony export */ combineReducers: () => (/* binding */ combineReducers),
/* harmony export */ compose: () => (/* binding */ compose),
/* harmony export */ createStore: () => (/* binding */ createStore),
/* harmony export */ legacy_createStore: () => (/* binding */ legacy_createStore)
/* harmony export */ });
/* 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");
/**
* Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js
*
* Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes
* during build.
* @param {number} code
*/
function formatProdErrorMessage(code) {
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. ';
}
// Inlined version of the `symbol-observable` polyfill
var $$observable = (function () {
return typeof Symbol === 'function' && Symbol.observable || '@@observable';
})();
/**
* These are private action types reserved by Redux.
* For any unknown actions, you must return the current state.
* If the current state is undefined, you must return the initial state.
* Do not reference these action types directly in your code.
*/
var randomString = function randomString() {
return Math.random().toString(36).substring(7).split('').join('.');
};
var ActionTypes = {
INIT: "@@redux/INIT" + randomString(),
REPLACE: "@@redux/REPLACE" + randomString(),
PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
}
};
/**
* @param {any} obj The object to inspect.
* @returns {boolean} True if the argument appears to be a plain object.
*/
function isPlainObject(obj) {
if (typeof obj !== 'object' || obj === null) return false;
var proto = obj;
while (Object.getPrototypeOf(proto) !== null) {
proto = Object.getPrototypeOf(proto);
}
return Object.getPrototypeOf(obj) === proto;
}
// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of
function miniKindOf(val) {
if (val === void 0) return 'undefined';
if (val === null) return 'null';
var type = typeof val;
switch (type) {
case 'boolean':
case 'string':
case 'number':
case 'symbol':
case 'function':
{
return type;
}
}
if (Array.isArray(val)) return 'array';
if (isDate(val)) return 'date';
if (isError(val)) return 'error';
var constructorName = ctorName(val);
switch (constructorName) {
case 'Symbol':
case 'Promise':
case 'WeakMap':
case 'WeakSet':
case 'Map':
case 'Set':
return constructorName;
} // other
return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
}
function ctorName(val) {
return typeof val.constructor === 'function' ? val.constructor.name : null;
}
function isError(val) {
return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number';
}
function isDate(val) {
if (val instanceof Date) return true;
return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function';
}
function kindOf(val) {
var typeOfVal = typeof val;
if (true) {
typeOfVal = miniKindOf(val);
}
return typeOfVal;
}
/**
* @deprecated
*
* **We recommend using the `configureStore` method
* of the `@reduxjs/toolkit` package**, which replaces `createStore`.
*
* Redux Toolkit is our recommended approach for writing Redux logic today,
* including store setup, reducers, data fetching, and more.
*
* **For more details, please read this Redux docs page:**
* **https://redux.js.org/introduction/why-rtk-is-redux-today**
*
* `configureStore` from Redux Toolkit is an improved version of `createStore` that
* simplifies setup and helps avoid common bugs.
*
* You should not be using the `redux` core package by itself today, except for learning purposes.
* The `createStore` method from the core `redux` package will not be removed, but we encourage
* all users to migrate to using Redux Toolkit for all Redux code.
*
* If you want to use `createStore` without this visual deprecation warning, use
* the `legacy_createStore` import instead:
*
* `import { legacy_createStore as createStore} from 'redux'`
*
*/
function createStore(reducer, preloadedState, enhancer) {
var _ref2;
if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
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.');
}
if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
enhancer = preloadedState;
preloadedState = undefined;
}
if (typeof enhancer !== 'undefined') {
if (typeof enhancer !== 'function') {
throw new Error( false ? 0 : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'");
}
return enhancer(createStore)(reducer, preloadedState);
}
if (typeof reducer !== 'function') {
throw new Error( false ? 0 : "Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'");
}
var currentReducer = reducer;
var currentState = preloadedState;
var currentListeners = [];
var nextListeners = currentListeners;
var isDispatching = false;
/**
* This makes a shallow copy of currentListeners so we can use
* nextListeners as a temporary list while dispatching.
*
* This prevents any bugs around consumers calling
* subscribe/unsubscribe in the middle of a dispatch.
*/
function ensureCanMutateNextListeners() {
if (nextListeners === currentListeners) {
nextListeners = currentListeners.slice();
}
}
/**
* Reads the state tree managed by the store.
*
* @returns {any} The current state tree of your application.
*/
function getState() {
if (isDispatching) {
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.');
}
return currentState;
}
/**
* Adds a change listener. It will be called any time an action is dispatched,
* and some part of the state tree may potentially have changed. You may then
* call `getState()` to read the current state tree inside the callback.
*
* You may call `dispatch()` from a change listener, with the following
* caveats:
*
* 1. The subscriptions are snapshotted just before every `dispatch()` call.
* If you subscribe or unsubscribe while the listeners are being invoked, this
* will not have any effect on the `dispatch()` that is currently in progress.
* However, the next `dispatch()` call, whether nested or not, will use a more
* recent snapshot of the subscription list.
*
* 2. The listener should not expect to see all state changes, as the state
* might have been updated multiple times during a nested `dispatch()` before
* the listener is called. It is, however, guaranteed that all subscribers
* registered before the `dispatch()` started will be called with the latest
* state by the time it exits.
*
* @param {Function} listener A callback to be invoked on every dispatch.
* @returns {Function} A function to remove this change listener.
*/
function subscribe(listener) {
if (typeof listener !== 'function') {
throw new Error( false ? 0 : "Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'");
}
if (isDispatching) {
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.');
}
var isSubscribed = true;
ensureCanMutateNextListeners();
nextListeners.push(listener);
return function unsubscribe() {
if (!isSubscribed) {
return;
}
if (isDispatching) {
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.');
}
isSubscribed = false;
ensureCanMutateNextListeners();
var index = nextListeners.indexOf(listener);
nextListeners.splice(index, 1);
currentListeners = null;
};
}
/**
* Dispatches an action. It is the only way to trigger a state change.
*
* The `reducer` function, used to create the store, will be called with the
* current state tree and the given `action`. Its return value will
* be considered the **next** state of the tree, and the change listeners
* will be notified.
*
* The base implementation only supports plain object actions. If you want to
* dispatch a Promise, an Observable, a thunk, or something else, you need to
* wrap your store creating function into the corresponding middleware. For
* example, see the documentation for the `redux-thunk` package. Even the
* middleware will eventually dispatch plain object actions using this method.
*
* @param {Object} action A plain object representing what changed. It is
* a good idea to keep actions serializable so you can record and replay user
* sessions, or use the time travelling `redux-devtools`. An action must have
* a `type` property which may not be `undefined`. It is a good idea to use
* string constants for action types.
*
* @returns {Object} For convenience, the same action object you dispatched.
*
* Note that, if you use a custom middleware, it may wrap `dispatch()` to
* return something else (for example, a Promise you can await).
*/
function dispatch(action) {
if (!isPlainObject(action)) {
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.");
}
if (typeof action.type === 'undefined') {
throw new Error( false ? 0 : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');
}
if (isDispatching) {
throw new Error( false ? 0 : 'Reducers may not dispatch actions.');
}
try {
isDispatching = true;
currentState = currentReducer(currentState, action);
} finally {
isDispatching = false;
}
var listeners = currentListeners = nextListeners;
for (var i = 0; i < listeners.length; i++) {
var listener = listeners[i];
listener();
}
return action;
}
/**
* Replaces the reducer currently used by the store to calculate the state.
*
* You might need this if your app implements code splitting and you want to
* load some of the reducers dynamically. You might also need this if you
* implement a hot reloading mechanism for Redux.
*
* @param {Function} nextReducer The reducer for the store to use instead.
* @returns {void}
*/
function replaceReducer(nextReducer) {
if (typeof nextReducer !== 'function') {
throw new Error( false ? 0 : "Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer));
}
currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.
// Any reducers that existed in both the new and old rootReducer
// will receive the previous state. This effectively populates
// the new state tree with any relevant data from the old one.
dispatch({
type: ActionTypes.REPLACE
});
}
/**
* Interoperability point for observable/reactive libraries.
* @returns {observable} A minimal observable of state changes.
* For more information, see the observable proposal:
* https://github.com/tc39/proposal-observable
*/
function observable() {
var _ref;
var outerSubscribe = subscribe;
return _ref = {
/**
* The minimal observable subscription method.
* @param {Object} observer Any object that can be used as an observer.
* The observer object should have a `next` method.
* @returns {subscription} An object with an `unsubscribe` method that can
* be used to unsubscribe the observable from the store, and prevent further
* emission of values from the observable.
*/
subscribe: function subscribe(observer) {
if (typeof observer !== 'object' || observer === null) {
throw new Error( false ? 0 : "Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'");
}
function observeState() {
if (observer.next) {
observer.next(getState());
}
}
observeState();
var unsubscribe = outerSubscribe(observeState);
return {
unsubscribe: unsubscribe
};
}
}, _ref[$$observable] = function () {
return this;
}, _ref;
} // When a store is created, an "INIT" action is dispatched so that every
// reducer returns their initial state. This effectively populates
// the initial state tree.
dispatch({
type: ActionTypes.INIT
});
return _ref2 = {
dispatch: dispatch,
subscribe: subscribe,
getState: getState,
replaceReducer: replaceReducer
}, _ref2[$$observable] = observable, _ref2;
}
/**
* Creates a Redux store that holds the state tree.
*
* **We recommend using `configureStore` from the
* `@reduxjs/toolkit` package**, which replaces `createStore`:
* **https://redux.js.org/introduction/why-rtk-is-redux-today**
*
* The only way to change the data in the store is to call `dispatch()` on it.
*
* There should only be a single store in your app. To specify how different
* parts of the state tree respond to actions, you may combine several reducers
* into a single reducer function by using `combineReducers`.
*
* @param {Function} reducer A function that returns the next state tree, given
* the current state tree and the action to handle.
*
* @param {any} [preloadedState] The initial state. You may optionally specify it
* to hydrate the state from the server in universal apps, or to restore a
* previously serialized user session.
* If you use `combineReducers` to produce the root reducer function, this must be
* an object with the same shape as `combineReducers` keys.
*
* @param {Function} [enhancer] The store enhancer. You may optionally specify it
* to enhance the store with third-party capabilities such as middleware,
* time travel, persistence, etc. The only store enhancer that ships with Redux
* is `applyMiddleware()`.
*
* @returns {Store} A Redux store that lets you read the state, dispatch actions
* and subscribe to changes.
*/
var legacy_createStore = createStore;
/**
* Prints a warning in the console if it exists.
*
* @param {String} message The warning message.
* @returns {void}
*/
function warning(message) {
/* eslint-disable no-console */
if (typeof console !== 'undefined' && typeof console.error === 'function') {
console.error(message);
}
/* eslint-enable no-console */
try {
// This error was thrown as a convenience so that if you enable
// "break on all exceptions" in your console,
// it would pause the execution at this line.
throw new Error(message);
} catch (e) {} // eslint-disable-line no-empty
}
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
var reducerKeys = Object.keys(reducers);
var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
if (reducerKeys.length === 0) {
return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
}
if (!isPlainObject(inputState)) {
return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
}
var unexpectedKeys = Object.keys(inputState).filter(function (key) {
return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
});
unexpectedKeys.forEach(function (key) {
unexpectedKeyCache[key] = true;
});
if (action && action.type === ActionTypes.REPLACE) return;
if (unexpectedKeys.length > 0) {
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.");
}
}
function assertReducerShape(reducers) {
Object.keys(reducers).forEach(function (key) {
var reducer = reducers[key];
var initialState = reducer(undefined, {
type: ActionTypes.INIT
});
if (typeof initialState === 'undefined') {
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.");
}
if (typeof reducer(undefined, {
type: ActionTypes.PROBE_UNKNOWN_ACTION()
}) === 'undefined') {
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.");
}
});
}
/**
* Turns an object whose values are different reducer functions, into a single
* reducer function. It will call every child reducer, and gather their results
* into a single state object, whose keys correspond to the keys of the passed
* reducer functions.
*
* @param {Object} reducers An object whose values correspond to different
* reducer functions that need to be combined into one. One handy way to obtain
* it is to use ES6 `import * as reducers` syntax. The reducers may never return
* undefined for any action. Instead, they should return their initial state
* if the state passed to them was undefined, and the current state for any
* unrecognized action.
*
* @returns {Function} A reducer function that invokes every reducer inside the
* passed object, and builds a state object with the same shape.
*/
function combineReducers(reducers) {
var reducerKeys = Object.keys(reducers);
var finalReducers = {};
for (var i = 0; i < reducerKeys.length; i++) {
var key = reducerKeys[i];
if (true) {
if (typeof reducers[key] === 'undefined') {
warning("No reducer provided for key \"" + key + "\"");
}
}
if (typeof reducers[key] === 'function') {
finalReducers[key] = reducers[key];
}
}
var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same
// keys multiple times.
var unexpectedKeyCache;
if (true) {
unexpectedKeyCache = {};
}
var shapeAssertionError;
try {
assertReducerShape(finalReducers);
} catch (e) {
shapeAssertionError = e;
}
return function combination(state, action) {
if (state === void 0) {
state = {};
}
if (shapeAssertionError) {
throw shapeAssertionError;
}
if (true) {
var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
if (warningMessage) {
warning(warningMessage);
}
}
var hasChanged = false;
var nextState = {};
for (var _i = 0; _i < finalReducerKeys.length; _i++) {
var _key = finalReducerKeys[_i];
var reducer = finalReducers[_key];
var previousStateForKey = state[_key];
var nextStateForKey = reducer(previousStateForKey, action);
if (typeof nextStateForKey === 'undefined') {
var actionType = action && action.type;
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.");
}
nextState[_key] = nextStateForKey;
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
}
hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
return hasChanged ? nextState : state;
};
}
function bindActionCreator(actionCreator, dispatch) {
return function () {
return dispatch(actionCreator.apply(this, arguments));
};
}
/**
* Turns an object whose values are action creators, into an object with the
* same keys, but with every function wrapped into a `dispatch` call so they
* may be invoked directly. This is just a convenience method, as you can call
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
*
* For convenience, you can also pass an action creator as the first argument,
* and get a dispatch wrapped function in return.
*
* @param {Function|Object} actionCreators An object whose values are action
* creator functions. One handy way to obtain it is to use ES6 `import * as`
* syntax. You may also pass a single function.
*
* @param {Function} dispatch The `dispatch` function available on your Redux
* store.
*
* @returns {Function|Object} The object mimicking the original object, but with
* every action creator wrapped into the `dispatch` call. If you passed a
* function as `actionCreators`, the return value will also be a single
* function.
*/
function bindActionCreators(actionCreators, dispatch) {
if (typeof actionCreators === 'function') {
return bindActionCreator(actionCreators, dispatch);
}
if (typeof actionCreators !== 'object' || actionCreators === null) {
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\"?");
}
var boundActionCreators = {};
for (var key in actionCreators) {
var actionCreator = actionCreators[key];
if (typeof actionCreator === 'function') {
boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
}
}
return boundActionCreators;
}
/**
* Composes single-argument functions from right to left. The rightmost
* function can take multiple arguments as it provides the signature for
* the resulting composite function.
*
* @param {...Function} funcs The functions to compose.
* @returns {Function} A function obtained by composing the argument functions
* from right to left. For example, compose(f, g, h) is identical to doing
* (...args) => f(g(h(...args))).
*/
function compose() {
for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
funcs[_key] = arguments[_key];
}
if (funcs.length === 0) {
return function (arg) {
return arg;
};
}
if (funcs.length === 1) {
return funcs[0];
}
return funcs.reduce(function (a, b) {
return function () {
return a(b.apply(void 0, arguments));
};
});
}
/**
* Creates a store enhancer that applies middleware to the dispatch method
* of the Redux store. This is handy for a variety of tasks, such as expressing
* asynchronous actions in a concise manner, or logging every action payload.
*
* See `redux-thunk` package as an example of the Redux middleware.
*
* Because middleware is potentially asynchronous, this should be the first
* store enhancer in the composition chain.
*
* Note that each middleware will be given the `dispatch` and `getState` functions
* as named arguments.
*
* @param {...Function} middlewares The middleware chain to be applied.
* @returns {Function} A store enhancer applying the middleware.
*/
function applyMiddleware() {
for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
middlewares[_key] = arguments[_key];
}
return function (createStore) {
return function () {
var store = createStore.apply(void 0, arguments);
var _dispatch = function dispatch() {
throw new Error( false ? 0 : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
};
var middlewareAPI = {
getState: store.getState,
dispatch: function dispatch() {
return _dispatch.apply(void 0, arguments);
}
};
var chain = middlewares.map(function (middleware) {
return middleware(middlewareAPI);
});
_dispatch = compose.apply(void 0, chain)(store.dispatch);
return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, store), {}, {
dispatch: _dispatch
});
};
};
}
/***/ }),
/***/ "../node_modules/reselect/es/defaultMemoize.js":
/*!*****************************************************!*\
!*** ../node_modules/reselect/es/defaultMemoize.js ***!
\*****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ createCacheKeyComparator: () => (/* binding */ createCacheKeyComparator),
/* harmony export */ defaultEqualityCheck: () => (/* binding */ defaultEqualityCheck),
/* harmony export */ defaultMemoize: () => (/* binding */ defaultMemoize)
/* harmony export */ });
// Cache implementation based on Erik Rasmussen's `lru-memoize`:
// https://github.com/erikras/lru-memoize
var NOT_FOUND = 'NOT_FOUND';
function createSingletonCache(equals) {
var entry;
return {
get: function get(key) {
if (entry && equals(entry.key, key)) {
return entry.value;
}
return NOT_FOUND;
},
put: function put(key, value) {
entry = {
key: key,
value: value
};
},
getEntries: function getEntries() {
return entry ? [entry] : [];
},
clear: function clear() {
entry = undefined;
}
};
}
function createLruCache(maxSize, equals) {
var entries = [];
function get(key) {
var cacheIndex = entries.findIndex(function (entry) {
return equals(key, entry.key);
}); // We found a cached entry
if (cacheIndex > -1) {
var entry = entries[cacheIndex]; // Cached entry not at top of cache, move it to the top
if (cacheIndex > 0) {
entries.splice(cacheIndex, 1);
entries.unshift(entry);
}
return entry.value;
} // No entry found in cache, return sentinel
return NOT_FOUND;
}
function put(key, value) {
if (get(key) === NOT_FOUND) {
// TODO Is unshift slow?
entries.unshift({
key: key,
value: value
});
if (entries.length > maxSize) {
entries.pop();
}
}
}
function getEntries() {
return entries;
}
function clear() {
entries = [];
}
return {
get: get,
put: put,
getEntries: getEntries,
clear: clear
};
}
var defaultEqualityCheck = function defaultEqualityCheck(a, b) {
return a === b;
};
function createCacheKeyComparator(equalityCheck) {
return function areArgumentsShallowlyEqual(prev, next) {
if (prev === null || next === null || prev.length !== next.length) {
return false;
} // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.
var length = prev.length;
for (var i = 0; i < length; i++) {
if (!equalityCheck(prev[i], next[i])) {
return false;
}
}
return true;
};
}
// defaultMemoize now supports a configurable cache size with LRU behavior,
// and optional comparison of the result value with existing values
function defaultMemoize(func, equalityCheckOrOptions) {
var providedOptions = typeof equalityCheckOrOptions === 'object' ? equalityCheckOrOptions : {
equalityCheck: equalityCheckOrOptions
};
var _providedOptions$equa = providedOptions.equalityCheck,
equalityCheck = _providedOptions$equa === void 0 ? defaultEqualityCheck : _providedOptions$equa,
_providedOptions$maxS = providedOptions.maxSize,
maxSize = _providedOptions$maxS === void 0 ? 1 : _providedOptions$maxS,
resultEqualityCheck = providedOptions.resultEqualityCheck;
var comparator = createCacheKeyComparator(equalityCheck);
var cache = maxSize === 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator); // we reference arguments instead of spreading them for performance reasons
function memoized() {
var value = cache.get(arguments);
if (value === NOT_FOUND) {
// @ts-ignore
value = func.apply(null, arguments);
if (resultEqualityCheck) {
var entries = cache.getEntries();
var matchingEntry = entries.find(function (entry) {
return resultEqualityCheck(entry.value, value);
});
if (matchingEntry) {
value = matchingEntry.value;
}
}
cache.put(arguments, value);
}
return value;
}
memoized.clearCache = function () {
return cache.clear();
};
return memoized;
}
/***/ }),
/***/ "../node_modules/reselect/es/index.js":
/*!********************************************!*\
!*** ../node_modules/reselect/es/index.js ***!
\********************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ createSelector: () => (/* binding */ createSelector),
/* harmony export */ createSelectorCreator: () => (/* binding */ createSelectorCreator),
/* harmony export */ createStructuredSelector: () => (/* binding */ createStructuredSelector),
/* harmony export */ defaultEqualityCheck: () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultEqualityCheck),
/* harmony export */ defaultMemoize: () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize)
/* harmony export */ });
/* harmony import */ var _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultMemoize */ "../node_modules/reselect/es/defaultMemoize.js");
function getDependencies(funcs) {
var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs;
if (!dependencies.every(function (dep) {
return typeof dep === 'function';
})) {
var dependencyTypes = dependencies.map(function (dep) {
return typeof dep === 'function' ? "function " + (dep.name || 'unnamed') + "()" : typeof dep;
}).join(', ');
throw new Error("createSelector expects all input-selectors to be functions, but received the following types: [" + dependencyTypes + "]");
}
return dependencies;
}
function createSelectorCreator(memoize) {
for (var _len = arguments.length, memoizeOptionsFromArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
memoizeOptionsFromArgs[_key - 1] = arguments[_key];
}
var createSelector = function createSelector() {
for (var _len2 = arguments.length, funcs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
funcs[_key2] = arguments[_key2];
}
var _recomputations = 0;
var _lastResult; // Due to the intricacies of rest params, we can't do an optional arg after `...funcs`.
// So, start by declaring the default value here.
// (And yes, the words 'memoize' and 'options' appear too many times in this next sequence.)
var directlyPassedOptions = {
memoizeOptions: undefined
}; // Normally, the result func or "output selector" is the last arg
var resultFunc = funcs.pop(); // If the result func is actually an _object_, assume it's our options object
if (typeof resultFunc === 'object') {
directlyPassedOptions = resultFunc; // and pop the real result func off
resultFunc = funcs.pop();
}
if (typeof resultFunc !== 'function') {
throw new Error("createSelector expects an output function after the inputs, but received: [" + typeof resultFunc + "]");
} // Determine which set of options we're using. Prefer options passed directly,
// but fall back to options given to createSelectorCreator.
var _directlyPassedOption = directlyPassedOptions,
_directlyPassedOption2 = _directlyPassedOption.memoizeOptions,
memoizeOptions = _directlyPassedOption2 === void 0 ? memoizeOptionsFromArgs : _directlyPassedOption2; // Simplifying assumption: it's unlikely that the first options arg of the provided memoizer
// is an array. In most libs I've looked at, it's an equality function or options object.
// Based on that, if `memoizeOptions` _is_ an array, we assume it's a full
// user-provided array of options. Otherwise, it must be just the _first_ arg, and so
// we wrap it in an array so we can apply it.
var finalMemoizeOptions = Array.isArray(memoizeOptions) ? memoizeOptions : [memoizeOptions];
var dependencies = getDependencies(funcs);
var memoizedResultFunc = memoize.apply(void 0, [function recomputationWrapper() {
_recomputations++; // apply arguments instead of spreading for performance.
return resultFunc.apply(null, arguments);
}].concat(finalMemoizeOptions)); // If a selector is called with the exact same arguments we don't need to traverse our dependencies again.
var selector = memoize(function dependenciesChecker() {
var params = [];
var length = dependencies.length;
for (var i = 0; i < length; i++) {
// apply arguments instead of spreading and mutate a local list of params for performance.
// @ts-ignore
params.push(dependencies[i].apply(null, arguments));
} // apply arguments instead of spreading for performance.
_lastResult = memoizedResultFunc.apply(null, params);
return _lastResult;
});
Object.assign(selector, {
resultFunc: resultFunc,
memoizedResultFunc: memoizedResultFunc,
dependencies: dependencies,
lastResult: function lastResult() {
return _lastResult;
},
recomputations: function recomputations() {
return _recomputations;
},
resetRecomputations: function resetRecomputations() {
return _recomputations = 0;
}
});
return selector;
}; // @ts-ignore
return createSelector;
}
var createSelector = /* #__PURE__ */createSelectorCreator(_defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize);
// Manual definition of state and output arguments
var createStructuredSelector = function createStructuredSelector(selectors, selectorCreator) {
if (selectorCreator === void 0) {
selectorCreator = createSelector;
}
if (typeof selectors !== 'object') {
throw new Error('createStructuredSelector expects first argument to be an object ' + ("where each property is a selector, instead received a " + typeof selectors));
}
var objectKeys = Object.keys(selectors);
var resultSelector = selectorCreator( // @ts-ignore
objectKeys.map(function (key) {
return selectors[key];
}), function () {
for (var _len3 = arguments.length, values = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
values[_key3] = arguments[_key3];
}
return values.reduce(function (composition, value, index) {
composition[objectKeys[index]] = value;
return composition;
}, {});
});
return resultSelector;
};
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
/*!******************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
\******************************************************************/
/***/ ((module) => {
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;
}
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
/*!****************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
\****************************************************************/
/***/ ((module) => {
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js":
/*!***********************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
\***********************************************************************/
/***/ ((module) => {
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
/*!****************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
\****************************************************************/
/***/ ((module) => {
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/construct.js":
/*!***********************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/construct.js ***!
\***********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js");
function _construct(Parent, args, Class) {
if (isNativeReflectConstruct()) {
module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
} else {
module.exports = _construct = function _construct(Parent, args, Class) {
var a = [null];
a.push.apply(a, args);
var Constructor = Function.bind.apply(Parent, a);
var instance = new Constructor();
if (Class) setPrototypeOf(instance, Class.prototype);
return instance;
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
}
return _construct.apply(null, arguments);
}
module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/createClass.js":
/*!*************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/createClass.js ***!
\*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js":
/*!****************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***!
\****************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
function _defineProperty(obj, key, value) {
key = toPropertyKey(key);
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/get.js":
/*!*****************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/get.js ***!
\*****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js");
function _get() {
if (typeof Reflect !== "undefined" && Reflect.get) {
module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
} else {
module.exports = _get = function _get(target, property, receiver) {
var base = superPropBase(target, property);
if (!base) return;
var desc = Object.getOwnPropertyDescriptor(base, property);
if (desc.get) {
return desc.get.call(arguments.length < 3 ? target : receiver);
}
return desc.value;
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
}
return _get.apply(this, arguments);
}
module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js":
/*!****************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
\****************************************************************/
/***/ ((module) => {
function _getPrototypeOf(o) {
module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
return _getPrototypeOf(o);
}
module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/inherits.js":
/*!**********************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/inherits.js ***!
\**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function");
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
writable: true,
configurable: true
}
});
Object.defineProperty(subClass, "prototype", {
writable: false
});
if (superClass) setPrototypeOf(subClass, superClass);
}
module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
/*!***********************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
\***********************************************************************/
/***/ ((module) => {
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/isNativeFunction.js":
/*!******************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
\******************************************************************/
/***/ ((module) => {
function _isNativeFunction(fn) {
try {
return Function.toString.call(fn).indexOf("[native code]") !== -1;
} catch (e) {
return typeof fn === "function";
}
}
module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js":
/*!**************************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
\**************************************************************************/
/***/ ((module) => {
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;
}
}
module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
/*!**********************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
\**********************************************************************/
/***/ ((module) => {
function _iterableToArrayLimit(r, l) {
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (null != t) {
var e,
n,
i,
u,
a = [],
f = !0,
o = !1;
try {
if (i = (t = t.call(r)).next, 0 === l) {
if (Object(t) !== t) return;
f = !1;
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
} catch (r) {
o = !0, n = r;
} finally {
try {
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
} finally {
if (o) throw n;
}
}
return a;
}
}
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
/*!*****************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
\*****************************************************************/
/***/ ((module) => {
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
/*!***************************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
\***************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js");
function _possibleConstructorReturn(self, call) {
if (call && (_typeof(call) === "object" || typeof call === "function")) {
return call;
} else if (call !== void 0) {
throw new TypeError("Derived constructors may only return object or undefined");
}
return assertThisInitialized(self);
}
module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js":
/*!****************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
\****************************************************************/
/***/ ((module) => {
function _setPrototypeOf(o, p) {
module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
return _setPrototypeOf(o, p);
}
module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
/*!***************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
\***************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
function _slicedToArray(arr, i) {
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
}
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/superPropBase.js":
/*!***************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***!
\***************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js");
function _superPropBase(object, property) {
while (!Object.prototype.hasOwnProperty.call(object, property)) {
object = getPrototypeOf(object);
if (object === null) break;
}
return object;
}
module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js":
/*!*************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***!
\*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
function _toPrimitive(input, hint) {
if (_typeof(input) !== "object" || input === null) return input;
var prim = input[Symbol.toPrimitive];
if (prim !== undefined) {
var res = prim.call(input, hint || "default");
if (_typeof(res) !== "object") return res;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (hint === "string" ? String : Number)(input);
}
module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js":
/*!***************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
\***************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js");
function _toPropertyKey(arg) {
var key = toPrimitive(arg, "string");
return _typeof(key) === "symbol" ? key : String(key);
}
module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/typeof.js":
/*!********************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
\********************************************************/
/***/ ((module) => {
function _typeof(o) {
"@babel/helpers - typeof";
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
return typeof o;
} : function (o) {
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
}
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
/*!****************************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
\****************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
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);
}
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js":
/*!*****************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
\*****************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js");
var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ "../node_modules/@babel/runtime/helpers/isNativeFunction.js");
var construct = __webpack_require__(/*! ./construct.js */ "../node_modules/@babel/runtime/helpers/construct.js");
function _wrapNativeSuper(Class) {
var _cache = typeof Map === "function" ? new Map() : undefined;
module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
if (Class === null || !isNativeFunction(Class)) return Class;
if (typeof Class !== "function") {
throw new TypeError("Super expression must either be null or a function");
}
if (typeof _cache !== "undefined") {
if (_cache.has(Class)) return _cache.get(Class);
_cache.set(Class, Wrapper);
}
function Wrapper() {
return construct(Class, arguments, getPrototypeOf(this).constructor);
}
Wrapper.prototype = Object.create(Class.prototype, {
constructor: {
value: Wrapper,
enumerable: false,
writable: true,
configurable: true
}
});
return setPrototypeOf(Wrapper, Class);
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
return _wrapNativeSuper(Class);
}
module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js":
/*!********************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
\********************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ _defineProperty)
/* harmony export */ });
/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");
function _defineProperty(obj, key, value) {
key = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key);
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/esm/objectSpread2.js":
/*!*******************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***!
\*******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ _objectSpread2)
/* harmony export */ });
/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty.js */ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js");
function ownKeys(e, r) {
var t = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var o = Object.getOwnPropertySymbols(e);
r && (o = o.filter(function (r) {
return Object.getOwnPropertyDescriptor(e, r).enumerable;
})), t.push.apply(t, o);
}
return t;
}
function _objectSpread2(e) {
for (var r = 1; r < arguments.length; r++) {
var t = null != arguments[r] ? arguments[r] : {};
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
(0,_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__["default"])(e, r, t[r]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
});
}
return e;
}
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/esm/toPrimitive.js":
/*!*****************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/esm/toPrimitive.js ***!
\*****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ _toPrimitive)
/* harmony export */ });
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/esm/typeof.js");
function _toPrimitive(input, hint) {
if ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(input) !== "object" || input === null) return input;
var prim = input[Symbol.toPrimitive];
if (prim !== undefined) {
var res = prim.call(input, hint || "default");
if ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(res) !== "object") return res;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (hint === "string" ? String : Number)(input);
}
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js":
/*!*******************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js ***!
\*******************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ _toPropertyKey)
/* harmony export */ });
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/esm/typeof.js");
/* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/esm/toPrimitive.js");
function _toPropertyKey(arg) {
var key = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arg, "string");
return (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key) === "symbol" ? key : String(key);
}
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/esm/typeof.js":
/*!************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/esm/typeof.js ***!
\************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ _typeof)
/* harmony export */ });
function _typeof(o) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
return typeof o;
} : function (o) {
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
}, _typeof(o);
}
/***/ }),
/***/ "../node_modules/@reduxjs/toolkit/node_modules/immer/dist/immer.esm.mjs":
/*!******************************************************************************!*\
!*** ../node_modules/@reduxjs/toolkit/node_modules/immer/dist/immer.esm.mjs ***!
\******************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Immer: () => (/* binding */ un),
/* harmony export */ applyPatches: () => (/* binding */ pn),
/* harmony export */ castDraft: () => (/* binding */ K),
/* harmony export */ castImmutable: () => (/* binding */ $),
/* harmony export */ createDraft: () => (/* binding */ ln),
/* harmony export */ current: () => (/* binding */ R),
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
/* harmony export */ enableAllPlugins: () => (/* binding */ J),
/* harmony export */ enableES5: () => (/* binding */ F),
/* harmony export */ enableMapSet: () => (/* binding */ C),
/* harmony export */ enablePatches: () => (/* binding */ T),
/* harmony export */ finishDraft: () => (/* binding */ dn),
/* harmony export */ freeze: () => (/* binding */ d),
/* harmony export */ immerable: () => (/* binding */ L),
/* harmony export */ isDraft: () => (/* binding */ r),
/* harmony export */ isDraftable: () => (/* binding */ t),
/* harmony export */ nothing: () => (/* binding */ H),
/* harmony export */ original: () => (/* binding */ e),
/* harmony export */ produce: () => (/* binding */ fn),
/* harmony export */ produceWithPatches: () => (/* binding */ cn),
/* harmony export */ setAutoFreeze: () => (/* binding */ sn),
/* harmony export */ setUseProxies: () => (/* binding */ vn)
/* harmony export */ });
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){var r;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]||!!(null===(r=n.constructor)||void 0===r?void 0:r[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.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)||(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 g(n){O(n),n.p.forEach(S),n.p=null}function O(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.g=!0}function P(r,e){e._=e.p.length;var i=e.p[0],o=void 0!==r&&r!==i;return e.h.O||b("ES5").S(e,r,o),o?(i[Q].P&&(g(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,[]),g(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,u=o,a=!1;3===e.i&&(u=new Set(o),o.clear(),a=!0),i(u,(function(r,i){return A(n,e,o,r,i,t,a)})),x(n,o,!1),t&&n.u&&b("Patches").N(e,t,n.u,n.s)}return e.o}function A(e,i,o,a,c,s,v){if( true&&c===o&&n(5),r(c)){var p=M(e,c,s&&i&&3!==i.i&&!u(i.R,a)?s.concat(a):void 0);if(f(o,a,p),!r(p))return;e.m=!1}else v&&o.add(c);if(t(c)&&!y(c)){if(!e.h.D&&e._<1)return;M(e,c),i&&i.A.l||x(e,c)}}function x(n,r,t){void 0===t&&(t=!1),!n.l&&n.h.D&&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 N(n,r,t){var e=s(r)?b("MapSet").F(r,t):v(r)?b("MapSet").T(r,t):n.O?function(n,r){var t=Array.isArray(n),e={i:t?1:0,A:r?r.A:_(),P:!1,I:!1,R:{},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 R(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=D(r,c),u.I=!1}else e=D(r,c);return i(e,(function(r,t){u&&a(u.t,r)===t||f(e,r,n(t))})),3===c?n
//# sourceMappingURL=immer.esm.js.map
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/global */
/******/ (() => {
/******/ __webpack_require__.g = (function() {
/******/ if (typeof globalThis === 'object') return globalThis;
/******/ try {
/******/ return this || new Function('return this')();
/******/ } catch (e) {
/******/ if (typeof window === 'object') return window;
/******/ }
/******/ })();
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
(() => {
"use strict";
/*!*******************************************!*\
!*** ../core/common/assets/js/modules.js ***!
\*******************************************/
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
var _modules = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/modules */ "../assets/dev/js/modules/modules.js"));
var _layout = _interopRequireDefault(__webpack_require__(/*! ./views/modal/layout */ "../core/common/assets/js/views/modal/layout.js"));
var _componentBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/component-base */ "../modules/web-cli/assets/js/modules/component-base.js"));
var _componentModalBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/component-modal-base */ "../modules/web-cli/assets/js/modules/component-modal-base.js"));
var _hookBreak = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/hook-break */ "../modules/web-cli/assets/js/modules/hook-break.js"));
_modules.default.common = {
/**
* @deprecated since 2.9.0, use `$e.modules.ComponentBase` instead.
*/
get Component() {
// `elementorCommon` isn't available during it self initialize.
setTimeout(function () {
elementorDevTools.deprecation.deprecated('elementorModules.common.Component', '2.9.0', '$e.modules.ComponentBase');
}, 2000);
return _componentBase.default;
},
/**
* @deprecated since 2.9.0, use `$e.modules.ComponentModalBase` instead.
*/
get ComponentModal() {
// `elementorCommon` isn't available during it self initialize.
setTimeout(function () {
elementorDevTools.deprecation.deprecated('elementorModules.common.ComponentModal', '2.9.0', '$e.modules.ComponentModalBase');
}, 2000);
return _componentModalBase.default;
},
/**
* @deprecated since 2.9.0, use `$e.modules.HookBreak` instead.
*/
get HookBreak() {
// `elementorCommon` isn't available during it self initialize.
setTimeout(function () {
elementorDevTools.deprecation.deprecated('elementorModules.common.HookBreak', '2.9.0', '$e.modules.HookBreak');
}, 2000);
return _hookBreak.default;
},
views: {
modal: {
Layout: _layout.default
}
}
};
})();
/******/ })()
;
//# sourceMappingURL=common-modules.js.map