| @@ -1,1852 +1,5574 @@ | ||
| 1 | -(function(_reduxjs_toolkit) { | |
| 1 | +/*! elementor - v3.9.2 - 21-12-2022 */ | |
| 2 | +/******/ (() => { // webpackBootstrap | |
| 3 | +/******/ var __webpack_modules__ = ({ | |
| 2 | 4 | |
| 3 | -//#region \0rolldown/runtime.js | |
| 4 | - var __create = Object.create; | |
| 5 | - var __defProp = Object.defineProperty; | |
| 6 | - var __name = (target, value) => __defProp(target, "name", { | |
| 7 | - value, | |
| 8 | - configurable: true | |
| 9 | - }); | |
| 10 | - var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 11 | - var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 12 | - var __getProtoOf = Object.getPrototypeOf; | |
| 13 | - var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 14 | - var __esmMin = (fn, res, err) => () => { | |
| 15 | - if (err) throw err[0]; | |
| 16 | - try { | |
| 17 | - return fn && (res = fn(fn = 0)), res; | |
| 18 | - } catch (e) { | |
| 19 | - throw err = [e], e; | |
| 20 | - } | |
| 21 | - }; | |
| 22 | - var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); | |
| 23 | - var __exportAll = (all, no_symbols) => { | |
| 24 | - let target = {}; | |
| 25 | - for (var name in all) { | |
| 26 | - __defProp(target, name, { | |
| 27 | - get: all[name], | |
| 28 | - enumerable: true | |
| 29 | - }); | |
| 30 | - } | |
| 31 | - if (!no_symbols) { | |
| 32 | - __defProp(target, Symbol.toStringTag, { value: "Module" }); | |
| 33 | - } | |
| 34 | - return target; | |
| 35 | - }; | |
| 36 | - var __copyProps = (to, from, except, desc) => { | |
| 37 | - if (from && typeof from === "object" || typeof from === "function") { | |
| 38 | - for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { | |
| 39 | - key = keys[i]; | |
| 40 | - if (!__hasOwnProp.call(to, key) && key !== except) { | |
| 41 | - __defProp(to, key, { | |
| 42 | - get: ((k) => from[k]).bind(null, key), | |
| 43 | - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable | |
| 44 | - }); | |
| 45 | - } | |
| 46 | - } | |
| 47 | - } | |
| 48 | - return to; | |
| 49 | - }; | |
| 50 | - var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { | |
| 51 | - value: mod, | |
| 52 | - enumerable: true | |
| 53 | - }) : target, mod)); | |
| 5 | +/***/ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js": | |
| 6 | +/*!******************************************************************!*\ | |
| 7 | + !*** ../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js ***! | |
| 8 | + \******************************************************************/ | |
| 9 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 54 | 10 | |
| 55 | -//#endregion | |
| 11 | +"use strict"; | |
| 12 | +__webpack_require__.r(__webpack_exports__); | |
| 13 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 14 | +/* harmony export */ "MiddlewareArray": () => (/* binding */ MiddlewareArray), | |
| 15 | +/* harmony export */ "TaskAbortError": () => (/* binding */ TaskAbortError), | |
| 16 | +/* harmony export */ "__DO_NOT_USE__ActionTypes": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.__DO_NOT_USE__ActionTypes), | |
| 17 | +/* harmony export */ "addListener": () => (/* binding */ addListener), | |
| 18 | +/* harmony export */ "applyMiddleware": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware), | |
| 19 | +/* harmony export */ "bindActionCreators": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.bindActionCreators), | |
| 20 | +/* harmony export */ "clearAllListeners": () => (/* binding */ clearAllListeners), | |
| 21 | +/* harmony export */ "combineReducers": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers), | |
| 22 | +/* harmony export */ "compose": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.compose), | |
| 23 | +/* harmony export */ "configureStore": () => (/* binding */ configureStore), | |
| 24 | +/* harmony export */ "createAction": () => (/* binding */ createAction), | |
| 25 | +/* harmony export */ "createAsyncThunk": () => (/* binding */ createAsyncThunk), | |
| 26 | +/* harmony export */ "createDraftSafeSelector": () => (/* binding */ createDraftSafeSelector), | |
| 27 | +/* harmony export */ "createEntityAdapter": () => (/* binding */ createEntityAdapter), | |
| 28 | +/* harmony export */ "createImmutableStateInvariantMiddleware": () => (/* binding */ createImmutableStateInvariantMiddleware), | |
| 29 | +/* harmony export */ "createListenerMiddleware": () => (/* binding */ createListenerMiddleware), | |
| 30 | +/* harmony export */ "createNextState": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__["default"]), | |
| 31 | +/* harmony export */ "createReducer": () => (/* binding */ createReducer), | |
| 32 | +/* harmony export */ "createSelector": () => (/* reexport safe */ reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector), | |
| 33 | +/* harmony export */ "createSerializableStateInvariantMiddleware": () => (/* binding */ createSerializableStateInvariantMiddleware), | |
| 34 | +/* harmony export */ "createSlice": () => (/* binding */ createSlice), | |
| 35 | +/* harmony export */ "createStore": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.createStore), | |
| 36 | +/* harmony export */ "current": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.current), | |
| 37 | +/* harmony export */ "findNonSerializableValue": () => (/* binding */ findNonSerializableValue), | |
| 38 | +/* harmony export */ "freeze": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.freeze), | |
| 39 | +/* harmony export */ "getDefaultMiddleware": () => (/* binding */ getDefaultMiddleware), | |
| 40 | +/* harmony export */ "getType": () => (/* binding */ getType), | |
| 41 | +/* harmony export */ "isAllOf": () => (/* binding */ isAllOf), | |
| 42 | +/* harmony export */ "isAnyOf": () => (/* binding */ isAnyOf), | |
| 43 | +/* harmony export */ "isAsyncThunkAction": () => (/* binding */ isAsyncThunkAction), | |
| 44 | +/* harmony export */ "isDraft": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.isDraft), | |
| 45 | +/* harmony export */ "isFulfilled": () => (/* binding */ isFulfilled), | |
| 46 | +/* harmony export */ "isImmutableDefault": () => (/* binding */ isImmutableDefault), | |
| 47 | +/* harmony export */ "isPending": () => (/* binding */ isPending), | |
| 48 | +/* harmony export */ "isPlain": () => (/* binding */ isPlain), | |
| 49 | +/* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject), | |
| 50 | +/* harmony export */ "isRejected": () => (/* binding */ isRejected), | |
| 51 | +/* harmony export */ "isRejectedWithValue": () => (/* binding */ isRejectedWithValue), | |
| 52 | +/* harmony export */ "legacy_createStore": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.legacy_createStore), | |
| 53 | +/* harmony export */ "miniSerializeError": () => (/* binding */ miniSerializeError), | |
| 54 | +/* harmony export */ "nanoid": () => (/* binding */ nanoid), | |
| 55 | +/* harmony export */ "original": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.original), | |
| 56 | +/* harmony export */ "removeListener": () => (/* binding */ removeListener), | |
| 57 | +/* harmony export */ "unwrapResult": () => (/* binding */ unwrapResult) | |
| 58 | +/* harmony export */ }); | |
| 59 | +/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! immer */ "../node_modules/immer/dist/immer.esm.mjs"); | |
| 60 | +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux */ "../node_modules/redux/es/redux.js"); | |
| 61 | +/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! reselect */ "../node_modules/reselect/es/index.js"); | |
| 62 | +/* harmony import */ var redux_thunk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! redux-thunk */ "../node_modules/redux-thunk/es/index.js"); | |
| 63 | +var __extends = (undefined && undefined.__extends) || (function () { | |
| 64 | + var extendStatics = function (d, b) { | |
| 65 | + extendStatics = Object.setPrototypeOf || | |
| 66 | + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | |
| 67 | + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | |
| 68 | + return extendStatics(d, b); | |
| 69 | + }; | |
| 70 | + return function (d, b) { | |
| 71 | + if (typeof b !== "function" && b !== null) | |
| 72 | + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | |
| 73 | + extendStatics(d, b); | |
| 74 | + function __() { this.constructor = d; } | |
| 75 | + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
| 76 | + }; | |
| 77 | +})(); | |
| 78 | +var __generator = (undefined && undefined.__generator) || function (thisArg, body) { | |
| 79 | + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | |
| 80 | + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | |
| 81 | + function verb(n) { return function (v) { return step([n, v]); }; } | |
| 82 | + function step(op) { | |
| 83 | + if (f) throw new TypeError("Generator is already executing."); | |
| 84 | + while (_) try { | |
| 85 | + 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; | |
| 86 | + if (y = 0, t) op = [op[0] & 2, t.value]; | |
| 87 | + switch (op[0]) { | |
| 88 | + case 0: case 1: t = op; break; | |
| 89 | + case 4: _.label++; return { value: op[1], done: false }; | |
| 90 | + case 5: _.label++; y = op[1]; op = [0]; continue; | |
| 91 | + case 7: op = _.ops.pop(); _.trys.pop(); continue; | |
| 92 | + default: | |
| 93 | + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | |
| 94 | + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | |
| 95 | + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | |
| 96 | + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | |
| 97 | + if (t[2]) _.ops.pop(); | |
| 98 | + _.trys.pop(); continue; | |
| 99 | + } | |
| 100 | + op = body.call(thisArg, _); | |
| 101 | + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | |
| 102 | + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | |
| 103 | + } | |
| 104 | +}; | |
| 105 | +var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) { | |
| 106 | + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | |
| 107 | + to[j] = from[i]; | |
| 108 | + return to; | |
| 109 | +}; | |
| 110 | +var __defProp = Object.defineProperty; | |
| 111 | +var __defProps = Object.defineProperties; | |
| 112 | +var __getOwnPropDescs = Object.getOwnPropertyDescriptors; | |
| 113 | +var __getOwnPropSymbols = Object.getOwnPropertySymbols; | |
| 114 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 115 | +var __propIsEnum = Object.prototype.propertyIsEnumerable; | |
| 116 | +var __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; }; | |
| 117 | +var __spreadValues = function (a, b) { | |
| 118 | + for (var prop in b || (b = {})) | |
| 119 | + if (__hasOwnProp.call(b, prop)) | |
| 120 | + __defNormalProp(a, prop, b[prop]); | |
| 121 | + if (__getOwnPropSymbols) | |
| 122 | + for (var _i = 0, _c = __getOwnPropSymbols(b); _i < _c.length; _i++) { | |
| 123 | + var prop = _c[_i]; | |
| 124 | + if (__propIsEnum.call(b, prop)) | |
| 125 | + __defNormalProp(a, prop, b[prop]); | |
| 126 | + } | |
| 127 | + return a; | |
| 128 | +}; | |
| 129 | +var __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); }; | |
| 130 | +var __async = function (__this, __arguments, generator) { | |
| 131 | + return new Promise(function (resolve, reject) { | |
| 132 | + var fulfilled = function (value) { | |
| 133 | + try { | |
| 134 | + step(generator.next(value)); | |
| 135 | + } | |
| 136 | + catch (e) { | |
| 137 | + reject(e); | |
| 138 | + } | |
| 139 | + }; | |
| 140 | + var rejected = function (value) { | |
| 141 | + try { | |
| 142 | + step(generator.throw(value)); | |
| 143 | + } | |
| 144 | + catch (e) { | |
| 145 | + reject(e); | |
| 146 | + } | |
| 147 | + }; | |
| 148 | + var step = function (x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); }; | |
| 149 | + step((generator = generator.apply(__this, __arguments)).next()); | |
| 150 | + }); | |
| 151 | +}; | |
| 152 | +// src/index.ts | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | +// src/createDraftSafeSelector.ts | |
| 158 | + | |
| 159 | + | |
| 160 | +var createDraftSafeSelector = function () { | |
| 161 | + var args = []; | |
| 162 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 163 | + args[_i] = arguments[_i]; | |
| 164 | + } | |
| 165 | + var selector = reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector.apply(void 0, args); | |
| 166 | + var wrappedSelector = function (value) { | |
| 167 | + var rest = []; | |
| 168 | + for (var _i = 1; _i < arguments.length; _i++) { | |
| 169 | + rest[_i - 1] = arguments[_i]; | |
| 170 | + } | |
| 171 | + return selector.apply(void 0, __spreadArray([(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(value) ? (0,immer__WEBPACK_IMPORTED_MODULE_2__.current)(value) : value], rest)); | |
| 172 | + }; | |
| 173 | + return wrappedSelector; | |
| 174 | +}; | |
| 175 | +// src/configureStore.ts | |
| 176 | + | |
| 177 | +// src/devtoolsExtension.ts | |
| 178 | + | |
| 179 | +var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () { | |
| 180 | + if (arguments.length === 0) | |
| 181 | + return void 0; | |
| 182 | + if (typeof arguments[0] === "object") | |
| 183 | + return redux__WEBPACK_IMPORTED_MODULE_0__.compose; | |
| 184 | + return redux__WEBPACK_IMPORTED_MODULE_0__.compose.apply(null, arguments); | |
| 185 | +}; | |
| 186 | +var devToolsEnhancer = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () { | |
| 187 | + return function (noop2) { | |
| 188 | + return noop2; | |
| 189 | + }; | |
| 190 | +}; | |
| 191 | +// src/isPlainObject.ts | |
| 192 | +function isPlainObject(value) { | |
| 193 | + if (typeof value !== "object" || value === null) | |
| 194 | + return false; | |
| 195 | + var proto = Object.getPrototypeOf(value); | |
| 196 | + if (proto === null) | |
| 197 | + return true; | |
| 198 | + var baseProto = proto; | |
| 199 | + while (Object.getPrototypeOf(baseProto) !== null) { | |
| 200 | + baseProto = Object.getPrototypeOf(baseProto); | |
| 201 | + } | |
| 202 | + return proto === baseProto; | |
| 203 | +} | |
| 204 | +// src/getDefaultMiddleware.ts | |
| 205 | + | |
| 206 | +// src/utils.ts | |
| 207 | + | |
| 208 | +function getTimeMeasureUtils(maxDelay, fnName) { | |
| 209 | + var elapsed = 0; | |
| 210 | + return { | |
| 211 | + measureTime: function (fn) { | |
| 212 | + var started = Date.now(); | |
| 213 | + try { | |
| 214 | + return fn(); | |
| 215 | + } | |
| 216 | + finally { | |
| 217 | + var finished = Date.now(); | |
| 218 | + elapsed += finished - started; | |
| 219 | + } | |
| 220 | + }, | |
| 221 | + warnIfExceeded: function () { | |
| 222 | + if (elapsed > maxDelay) { | |
| 223 | + 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."); | |
| 224 | + } | |
| 225 | + } | |
| 226 | + }; | |
| 227 | +} | |
| 228 | +var MiddlewareArray = /** @class */ (function (_super) { | |
| 229 | + __extends(MiddlewareArray, _super); | |
| 230 | + function MiddlewareArray() { | |
| 231 | + var args = []; | |
| 232 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 233 | + args[_i] = arguments[_i]; | |
| 234 | + } | |
| 235 | + var _this = _super.apply(this, args) || this; | |
| 236 | + Object.setPrototypeOf(_this, MiddlewareArray.prototype); | |
| 237 | + return _this; | |
| 238 | + } | |
| 239 | + Object.defineProperty(MiddlewareArray, Symbol.species, { | |
| 240 | + get: function () { | |
| 241 | + return MiddlewareArray; | |
| 242 | + }, | |
| 243 | + enumerable: false, | |
| 244 | + configurable: true | |
| 245 | + }); | |
| 246 | + MiddlewareArray.prototype.concat = function () { | |
| 247 | + var arr = []; | |
| 248 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 249 | + arr[_i] = arguments[_i]; | |
| 250 | + } | |
| 251 | + return _super.prototype.concat.apply(this, arr); | |
| 252 | + }; | |
| 253 | + MiddlewareArray.prototype.prepend = function () { | |
| 254 | + var arr = []; | |
| 255 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 256 | + arr[_i] = arguments[_i]; | |
| 257 | + } | |
| 258 | + if (arr.length === 1 && Array.isArray(arr[0])) { | |
| 259 | + return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))(); | |
| 260 | + } | |
| 261 | + return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))(); | |
| 262 | + }; | |
| 263 | + return MiddlewareArray; | |
| 264 | +}(Array)); | |
| 265 | +function freezeDraftable(val) { | |
| 266 | + return (0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraftable)(val) ? (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(val, function () { | |
| 267 | + }) : val; | |
| 268 | +} | |
| 269 | +// src/immutableStateInvariantMiddleware.ts | |
| 270 | +var isProduction = "development" === "production"; | |
| 271 | +var prefix = "Invariant failed"; | |
| 272 | +function invariant(condition, message) { | |
| 273 | + if (condition) { | |
| 274 | + return; | |
| 275 | + } | |
| 276 | + if (isProduction) { | |
| 277 | + throw new Error(prefix); | |
| 278 | + } | |
| 279 | + throw new Error(prefix + ": " + (message || "")); | |
| 280 | +} | |
| 281 | +function stringify(obj, serializer, indent, decycler) { | |
| 282 | + return JSON.stringify(obj, getSerialize(serializer, decycler), indent); | |
| 283 | +} | |
| 284 | +function getSerialize(serializer, decycler) { | |
| 285 | + var stack = [], keys = []; | |
| 286 | + if (!decycler) | |
| 287 | + decycler = function (_, value) { | |
| 288 | + if (stack[0] === value) | |
| 289 | + return "[Circular ~]"; | |
| 290 | + return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"; | |
| 291 | + }; | |
| 292 | + return function (key, value) { | |
| 293 | + if (stack.length > 0) { | |
| 294 | + var thisPos = stack.indexOf(this); | |
| 295 | + ~thisPos ? stack.splice(thisPos + 1) : stack.push(this); | |
| 296 | + ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key); | |
| 297 | + if (~stack.indexOf(value)) | |
| 298 | + value = decycler.call(this, key, value); | |
| 299 | + } | |
| 300 | + else | |
| 301 | + stack.push(value); | |
| 302 | + return serializer == null ? value : serializer.call(this, key, value); | |
| 303 | + }; | |
| 304 | +} | |
| 305 | +function isImmutableDefault(value) { | |
| 306 | + return typeof value !== "object" || value == null || Object.isFrozen(value); | |
| 307 | +} | |
| 308 | +function trackForMutations(isImmutable, ignorePaths, obj) { | |
| 309 | + var trackedProperties = trackProperties(isImmutable, ignorePaths, obj); | |
| 310 | + return { | |
| 311 | + detectMutations: function () { | |
| 312 | + return detectMutations(isImmutable, ignorePaths, trackedProperties, obj); | |
| 313 | + } | |
| 314 | + }; | |
| 315 | +} | |
| 316 | +function trackProperties(isImmutable, ignorePaths, obj, path) { | |
| 317 | + if (ignorePaths === void 0) { ignorePaths = []; } | |
| 318 | + if (path === void 0) { path = ""; } | |
| 319 | + var tracked = { value: obj }; | |
| 320 | + if (!isImmutable(obj)) { | |
| 321 | + tracked.children = {}; | |
| 322 | + for (var key in obj) { | |
| 323 | + var childPath = path ? path + "." + key : key; | |
| 324 | + if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) { | |
| 325 | + continue; | |
| 326 | + } | |
| 327 | + tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath); | |
| 328 | + } | |
| 329 | + } | |
| 330 | + return tracked; | |
| 331 | +} | |
| 332 | +function detectMutations(isImmutable, ignorePaths, trackedProperty, obj, sameParentRef, path) { | |
| 333 | + if (ignorePaths === void 0) { ignorePaths = []; } | |
| 334 | + if (sameParentRef === void 0) { sameParentRef = false; } | |
| 335 | + if (path === void 0) { path = ""; } | |
| 336 | + var prevObj = trackedProperty ? trackedProperty.value : void 0; | |
| 337 | + var sameRef = prevObj === obj; | |
| 338 | + if (sameParentRef && !sameRef && !Number.isNaN(obj)) { | |
| 339 | + return { wasMutated: true, path: path }; | |
| 340 | + } | |
| 341 | + if (isImmutable(prevObj) || isImmutable(obj)) { | |
| 342 | + return { wasMutated: false }; | |
| 343 | + } | |
| 344 | + var keysToDetect = {}; | |
| 345 | + for (var key in trackedProperty.children) { | |
| 346 | + keysToDetect[key] = true; | |
| 347 | + } | |
| 348 | + for (var key in obj) { | |
| 349 | + keysToDetect[key] = true; | |
| 350 | + } | |
| 351 | + for (var key in keysToDetect) { | |
| 352 | + var childPath = path ? path + "." + key : key; | |
| 353 | + if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) { | |
| 354 | + continue; | |
| 355 | + } | |
| 356 | + var result = detectMutations(isImmutable, ignorePaths, trackedProperty.children[key], obj[key], sameRef, childPath); | |
| 357 | + if (result.wasMutated) { | |
| 358 | + return result; | |
| 359 | + } | |
| 360 | + } | |
| 361 | + return { wasMutated: false }; | |
| 362 | +} | |
| 363 | +function createImmutableStateInvariantMiddleware(options) { | |
| 364 | + if (options === void 0) { options = {}; } | |
| 365 | + if (false) {} | |
| 366 | + 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; | |
| 367 | + ignoredPaths = ignoredPaths || ignore; | |
| 368 | + var track = trackForMutations.bind(null, isImmutable, ignoredPaths); | |
| 369 | + return function (_c) { | |
| 370 | + var getState = _c.getState; | |
| 371 | + var state = getState(); | |
| 372 | + var tracker = track(state); | |
| 373 | + var result; | |
| 374 | + return function (next) { return function (action) { | |
| 375 | + var measureUtils = getTimeMeasureUtils(warnAfter, "ImmutableStateInvariantMiddleware"); | |
| 376 | + measureUtils.measureTime(function () { | |
| 377 | + state = getState(); | |
| 378 | + result = tracker.detectMutations(); | |
| 379 | + tracker = track(state); | |
| 380 | + 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)"); | |
| 381 | + }); | |
| 382 | + var dispatchedAction = next(action); | |
| 383 | + measureUtils.measureTime(function () { | |
| 384 | + state = getState(); | |
| 385 | + result = tracker.detectMutations(); | |
| 386 | + tracker = track(state); | |
| 387 | + 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)"); | |
| 388 | + }); | |
| 389 | + measureUtils.warnIfExceeded(); | |
| 390 | + return dispatchedAction; | |
| 391 | + }; }; | |
| 392 | + }; | |
| 393 | +} | |
| 394 | +// src/serializableStateInvariantMiddleware.ts | |
| 395 | +function isPlain(val) { | |
| 396 | + var type = typeof val; | |
| 397 | + return val == null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val); | |
| 398 | +} | |
| 399 | +function findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths) { | |
| 400 | + if (path === void 0) { path = ""; } | |
| 401 | + if (isSerializable === void 0) { isSerializable = isPlain; } | |
| 402 | + if (ignoredPaths === void 0) { ignoredPaths = []; } | |
| 403 | + var foundNestedSerializable; | |
| 404 | + if (!isSerializable(value)) { | |
| 405 | + return { | |
| 406 | + keyPath: path || "<root>", | |
| 407 | + value: value | |
| 408 | + }; | |
| 409 | + } | |
| 410 | + if (typeof value !== "object" || value === null) { | |
| 411 | + return false; | |
| 412 | + } | |
| 413 | + var entries = getEntries != null ? getEntries(value) : Object.entries(value); | |
| 414 | + var hasIgnoredPaths = ignoredPaths.length > 0; | |
| 415 | + for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { | |
| 416 | + var _c = entries_1[_i], key = _c[0], nestedValue = _c[1]; | |
| 417 | + var nestedPath = path ? path + "." + key : key; | |
| 418 | + if (hasIgnoredPaths && ignoredPaths.indexOf(nestedPath) >= 0) { | |
| 419 | + continue; | |
| 420 | + } | |
| 421 | + if (!isSerializable(nestedValue)) { | |
| 422 | + return { | |
| 423 | + keyPath: nestedPath, | |
| 424 | + value: nestedValue | |
| 425 | + }; | |
| 426 | + } | |
| 427 | + if (typeof nestedValue === "object") { | |
| 428 | + foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths); | |
| 429 | + if (foundNestedSerializable) { | |
| 430 | + return foundNestedSerializable; | |
| 431 | + } | |
| 432 | + } | |
| 433 | + } | |
| 434 | + return false; | |
| 435 | +} | |
| 436 | +function createSerializableStateInvariantMiddleware(options) { | |
| 437 | + if (options === void 0) { options = {}; } | |
| 438 | + if (false) {} | |
| 439 | + 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; | |
| 440 | + return function (storeAPI) { return function (next) { return function (action) { | |
| 441 | + var result = next(action); | |
| 442 | + var measureUtils = getTimeMeasureUtils(warnAfter, "SerializableStateInvariantMiddleware"); | |
| 443 | + if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) { | |
| 444 | + measureUtils.measureTime(function () { | |
| 445 | + var foundActionNonSerializableValue = findNonSerializableValue(action, "", isSerializable, getEntries, ignoredActionPaths); | |
| 446 | + if (foundActionNonSerializableValue) { | |
| 447 | + var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value; | |
| 448 | + 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)"); | |
| 449 | + } | |
| 450 | + }); | |
| 451 | + } | |
| 452 | + if (!ignoreState) { | |
| 453 | + measureUtils.measureTime(function () { | |
| 454 | + var state = storeAPI.getState(); | |
| 455 | + var foundStateNonSerializableValue = findNonSerializableValue(state, "", isSerializable, getEntries, ignoredPaths); | |
| 456 | + if (foundStateNonSerializableValue) { | |
| 457 | + var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value; | |
| 458 | + 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)"); | |
| 459 | + } | |
| 460 | + }); | |
| 461 | + measureUtils.warnIfExceeded(); | |
| 462 | + } | |
| 463 | + return result; | |
| 464 | + }; }; }; | |
| 465 | +} | |
| 466 | +// src/getDefaultMiddleware.ts | |
| 467 | +function isBoolean(x) { | |
| 468 | + return typeof x === "boolean"; | |
| 469 | +} | |
| 470 | +function curryGetDefaultMiddleware() { | |
| 471 | + return function curriedGetDefaultMiddleware(options) { | |
| 472 | + return getDefaultMiddleware(options); | |
| 473 | + }; | |
| 474 | +} | |
| 475 | +function getDefaultMiddleware(options) { | |
| 476 | + if (options === void 0) { options = {}; } | |
| 477 | + 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; | |
| 478 | + var middlewareArray = new MiddlewareArray(); | |
| 479 | + if (thunk) { | |
| 480 | + if (isBoolean(thunk)) { | |
| 481 | + middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"]); | |
| 482 | + } | |
| 483 | + else { | |
| 484 | + middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"].withExtraArgument(thunk.extraArgument)); | |
| 485 | + } | |
| 486 | + } | |
| 487 | + if (true) { | |
| 488 | + if (immutableCheck) { | |
| 489 | + var immutableOptions = {}; | |
| 490 | + if (!isBoolean(immutableCheck)) { | |
| 491 | + immutableOptions = immutableCheck; | |
| 492 | + } | |
| 493 | + middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions)); | |
| 494 | + } | |
| 495 | + if (serializableCheck) { | |
| 496 | + var serializableOptions = {}; | |
| 497 | + if (!isBoolean(serializableCheck)) { | |
| 498 | + serializableOptions = serializableCheck; | |
| 499 | + } | |
| 500 | + middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions)); | |
| 501 | + } | |
| 502 | + } | |
| 503 | + return middlewareArray; | |
| 504 | +} | |
| 505 | +// src/configureStore.ts | |
| 506 | +var IS_PRODUCTION = "development" === "production"; | |
| 507 | +function configureStore(options) { | |
| 508 | + var curriedGetDefaultMiddleware = curryGetDefaultMiddleware(); | |
| 509 | + 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; | |
| 510 | + var rootReducer; | |
| 511 | + if (typeof reducer === "function") { | |
| 512 | + rootReducer = reducer; | |
| 513 | + } | |
| 514 | + else if (isPlainObject(reducer)) { | |
| 515 | + rootReducer = (0,redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers)(reducer); | |
| 516 | + } | |
| 517 | + else { | |
| 518 | + throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers'); | |
| 519 | + } | |
| 520 | + var finalMiddleware = middleware; | |
| 521 | + if (typeof finalMiddleware === "function") { | |
| 522 | + finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware); | |
| 523 | + if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) { | |
| 524 | + throw new Error("when using a middleware builder function, an array of middleware must be returned"); | |
| 525 | + } | |
| 526 | + } | |
| 527 | + if (!IS_PRODUCTION && finalMiddleware.some(function (item) { return typeof item !== "function"; })) { | |
| 528 | + throw new Error("each middleware provided to configureStore must be a function"); | |
| 529 | + } | |
| 530 | + var middlewareEnhancer = redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware.apply(void 0, finalMiddleware); | |
| 531 | + var finalCompose = redux__WEBPACK_IMPORTED_MODULE_0__.compose; | |
| 532 | + if (devTools) { | |
| 533 | + finalCompose = composeWithDevTools(__spreadValues({ | |
| 534 | + trace: !IS_PRODUCTION | |
| 535 | + }, typeof devTools === "object" && devTools)); | |
| 536 | + } | |
| 537 | + var storeEnhancers = [middlewareEnhancer]; | |
| 538 | + if (Array.isArray(enhancers)) { | |
| 539 | + storeEnhancers = __spreadArray([middlewareEnhancer], enhancers); | |
| 540 | + } | |
| 541 | + else if (typeof enhancers === "function") { | |
| 542 | + storeEnhancers = enhancers(storeEnhancers); | |
| 543 | + } | |
| 544 | + var composedEnhancer = finalCompose.apply(void 0, storeEnhancers); | |
| 545 | + return (0,redux__WEBPACK_IMPORTED_MODULE_0__.createStore)(rootReducer, preloadedState, composedEnhancer); | |
| 546 | +} | |
| 547 | +// src/createAction.ts | |
| 548 | +function createAction(type, prepareAction) { | |
| 549 | + function actionCreator() { | |
| 550 | + var args = []; | |
| 551 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 552 | + args[_i] = arguments[_i]; | |
| 553 | + } | |
| 554 | + if (prepareAction) { | |
| 555 | + var prepared = prepareAction.apply(void 0, args); | |
| 556 | + if (!prepared) { | |
| 557 | + throw new Error("prepareAction did not return an object"); | |
| 558 | + } | |
| 559 | + return __spreadValues(__spreadValues({ | |
| 560 | + type: type, | |
| 561 | + payload: prepared.payload | |
| 562 | + }, "meta" in prepared && { meta: prepared.meta }), "error" in prepared && { error: prepared.error }); | |
| 563 | + } | |
| 564 | + return { type: type, payload: args[0] }; | |
| 565 | + } | |
| 566 | + actionCreator.toString = function () { return "" + type; }; | |
| 567 | + actionCreator.type = type; | |
| 568 | + actionCreator.match = function (action) { return action.type === type; }; | |
| 569 | + return actionCreator; | |
| 570 | +} | |
| 571 | +function isFSA(action) { | |
| 572 | + return isPlainObject(action) && typeof action.type === "string" && Object.keys(action).every(isValidKey); | |
| 573 | +} | |
| 574 | +function isValidKey(key) { | |
| 575 | + return ["type", "payload", "error", "meta"].indexOf(key) > -1; | |
| 576 | +} | |
| 577 | +function getType(actionCreator) { | |
| 578 | + return "" + actionCreator; | |
| 579 | +} | |
| 580 | +// src/createReducer.ts | |
| 581 | + | |
| 582 | +// src/mapBuilders.ts | |
| 583 | +function executeReducerBuilderCallback(builderCallback) { | |
| 584 | + var actionsMap = {}; | |
| 585 | + var actionMatchers = []; | |
| 586 | + var defaultCaseReducer; | |
| 587 | + var builder = { | |
| 588 | + addCase: function (typeOrActionCreator, reducer) { | |
| 589 | + if (true) { | |
| 590 | + if (actionMatchers.length > 0) { | |
| 591 | + throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`"); | |
| 592 | + } | |
| 593 | + if (defaultCaseReducer) { | |
| 594 | + throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`"); | |
| 595 | + } | |
| 596 | + } | |
| 597 | + var type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type; | |
| 598 | + if (type in actionsMap) { | |
| 599 | + throw new Error("addCase cannot be called with two reducers for the same action type"); | |
| 600 | + } | |
| 601 | + actionsMap[type] = reducer; | |
| 602 | + return builder; | |
| 603 | + }, | |
| 604 | + addMatcher: function (matcher, reducer) { | |
| 605 | + if (true) { | |
| 606 | + if (defaultCaseReducer) { | |
| 607 | + throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`"); | |
| 608 | + } | |
| 609 | + } | |
| 610 | + actionMatchers.push({ matcher: matcher, reducer: reducer }); | |
| 611 | + return builder; | |
| 612 | + }, | |
| 613 | + addDefaultCase: function (reducer) { | |
| 614 | + if (true) { | |
| 615 | + if (defaultCaseReducer) { | |
| 616 | + throw new Error("`builder.addDefaultCase` can only be called once"); | |
| 617 | + } | |
| 618 | + } | |
| 619 | + defaultCaseReducer = reducer; | |
| 620 | + return builder; | |
| 621 | + } | |
| 622 | + }; | |
| 623 | + builderCallback(builder); | |
| 624 | + return [actionsMap, actionMatchers, defaultCaseReducer]; | |
| 625 | +} | |
| 626 | +// src/createReducer.ts | |
| 627 | +function isStateFunction(x) { | |
| 628 | + return typeof x === "function"; | |
| 629 | +} | |
| 630 | +function createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) { | |
| 631 | + if (actionMatchers === void 0) { actionMatchers = []; } | |
| 632 | + var _c = typeof mapOrBuilderCallback === "function" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _c[0], finalActionMatchers = _c[1], finalDefaultCaseReducer = _c[2]; | |
| 633 | + var getInitialState; | |
| 634 | + if (isStateFunction(initialState)) { | |
| 635 | + getInitialState = function () { return freezeDraftable(initialState()); }; | |
| 636 | + } | |
| 637 | + else { | |
| 638 | + var frozenInitialState_1 = freezeDraftable(initialState); | |
| 639 | + getInitialState = function () { return frozenInitialState_1; }; | |
| 640 | + } | |
| 641 | + function reducer(state, action) { | |
| 642 | + if (state === void 0) { state = getInitialState(); } | |
| 643 | + var caseReducers = __spreadArray([ | |
| 644 | + actionsMap[action.type] | |
| 645 | + ], finalActionMatchers.filter(function (_c) { | |
| 646 | + var matcher = _c.matcher; | |
| 647 | + return matcher(action); | |
| 648 | + }).map(function (_c) { | |
| 649 | + var reducer2 = _c.reducer; | |
| 650 | + return reducer2; | |
| 651 | + })); | |
| 652 | + if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) { | |
| 653 | + caseReducers = [finalDefaultCaseReducer]; | |
| 654 | + } | |
| 655 | + return caseReducers.reduce(function (previousState, caseReducer) { | |
| 656 | + if (caseReducer) { | |
| 657 | + if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(previousState)) { | |
| 658 | + var draft = previousState; | |
| 659 | + var result = caseReducer(draft, action); | |
| 660 | + if (result === void 0) { | |
| 661 | + return previousState; | |
| 662 | + } | |
| 663 | + return result; | |
| 664 | + } | |
| 665 | + else if (!(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraftable)(previousState)) { | |
| 666 | + var result = caseReducer(previousState, action); | |
| 667 | + if (result === void 0) { | |
| 668 | + if (previousState === null) { | |
| 669 | + return previousState; | |
| 670 | + } | |
| 671 | + throw Error("A case reducer on a non-draftable value must not return undefined"); | |
| 672 | + } | |
| 673 | + return result; | |
| 674 | + } | |
| 675 | + else { | |
| 676 | + return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(previousState, function (draft) { | |
| 677 | + return caseReducer(draft, action); | |
| 678 | + }); | |
| 679 | + } | |
| 680 | + } | |
| 681 | + return previousState; | |
| 682 | + }, state); | |
| 683 | + } | |
| 684 | + reducer.getInitialState = getInitialState; | |
| 685 | + return reducer; | |
| 686 | +} | |
| 687 | +// src/createSlice.ts | |
| 688 | +function getType2(slice, actionKey) { | |
| 689 | + return slice + "/" + actionKey; | |
| 690 | +} | |
| 691 | +function createSlice(options) { | |
| 692 | + var name = options.name; | |
| 693 | + if (!name) { | |
| 694 | + throw new Error("`name` is a required option for createSlice"); | |
| 695 | + } | |
| 696 | + if (typeof process !== "undefined" && "development" === "development") { | |
| 697 | + if (options.initialState === void 0) { | |
| 698 | + console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`"); | |
| 699 | + } | |
| 700 | + } | |
| 701 | + var initialState = typeof options.initialState == "function" ? options.initialState : freezeDraftable(options.initialState); | |
| 702 | + var reducers = options.reducers || {}; | |
| 703 | + var reducerNames = Object.keys(reducers); | |
| 704 | + var sliceCaseReducersByName = {}; | |
| 705 | + var sliceCaseReducersByType = {}; | |
| 706 | + var actionCreators = {}; | |
| 707 | + reducerNames.forEach(function (reducerName) { | |
| 708 | + var maybeReducerWithPrepare = reducers[reducerName]; | |
| 709 | + var type = getType2(name, reducerName); | |
| 710 | + var caseReducer; | |
| 711 | + var prepareCallback; | |
| 712 | + if ("reducer" in maybeReducerWithPrepare) { | |
| 713 | + caseReducer = maybeReducerWithPrepare.reducer; | |
| 714 | + prepareCallback = maybeReducerWithPrepare.prepare; | |
| 715 | + } | |
| 716 | + else { | |
| 717 | + caseReducer = maybeReducerWithPrepare; | |
| 718 | + } | |
| 719 | + sliceCaseReducersByName[reducerName] = caseReducer; | |
| 720 | + sliceCaseReducersByType[type] = caseReducer; | |
| 721 | + actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type); | |
| 722 | + }); | |
| 723 | + function buildReducer() { | |
| 724 | + 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; | |
| 725 | + var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType); | |
| 726 | + return createReducer(initialState, finalCaseReducers, actionMatchers, defaultCaseReducer); | |
| 727 | + } | |
| 728 | + var _reducer; | |
| 729 | + return { | |
| 730 | + name: name, | |
| 731 | + reducer: function (state, action) { | |
| 732 | + if (!_reducer) | |
| 733 | + _reducer = buildReducer(); | |
| 734 | + return _reducer(state, action); | |
| 735 | + }, | |
| 736 | + actions: actionCreators, | |
| 737 | + caseReducers: sliceCaseReducersByName, | |
| 738 | + getInitialState: function () { | |
| 739 | + if (!_reducer) | |
| 740 | + _reducer = buildReducer(); | |
| 741 | + return _reducer.getInitialState(); | |
| 742 | + } | |
| 743 | + }; | |
| 744 | +} | |
| 745 | +// src/entities/entity_state.ts | |
| 746 | +function getInitialEntityState() { | |
| 747 | + return { | |
| 748 | + ids: [], | |
| 749 | + entities: {} | |
| 750 | + }; | |
| 751 | +} | |
| 752 | +function createInitialStateFactory() { | |
| 753 | + function getInitialState(additionalState) { | |
| 754 | + if (additionalState === void 0) { additionalState = {}; } | |
| 755 | + return Object.assign(getInitialEntityState(), additionalState); | |
| 756 | + } | |
| 757 | + return { getInitialState: getInitialState }; | |
| 758 | +} | |
| 759 | +// src/entities/state_selectors.ts | |
| 760 | +function createSelectorsFactory() { | |
| 761 | + function getSelectors(selectState) { | |
| 762 | + var selectIds = function (state) { return state.ids; }; | |
| 763 | + var selectEntities = function (state) { return state.entities; }; | |
| 764 | + var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); }); | |
| 765 | + var selectId = function (_, id) { return id; }; | |
| 766 | + var selectById = function (entities, id) { return entities[id]; }; | |
| 767 | + var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; }); | |
| 768 | + if (!selectState) { | |
| 769 | + return { | |
| 770 | + selectIds: selectIds, | |
| 771 | + selectEntities: selectEntities, | |
| 772 | + selectAll: selectAll, | |
| 773 | + selectTotal: selectTotal, | |
| 774 | + selectById: createDraftSafeSelector(selectEntities, selectId, selectById) | |
| 775 | + }; | |
| 776 | + } | |
| 777 | + var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities); | |
| 778 | + return { | |
| 779 | + selectIds: createDraftSafeSelector(selectState, selectIds), | |
| 780 | + selectEntities: selectGlobalizedEntities, | |
| 781 | + selectAll: createDraftSafeSelector(selectState, selectAll), | |
| 782 | + selectTotal: createDraftSafeSelector(selectState, selectTotal), | |
| 783 | + selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById) | |
| 784 | + }; | |
| 785 | + } | |
| 786 | + return { getSelectors: getSelectors }; | |
| 787 | +} | |
| 788 | +// src/entities/state_adapter.ts | |
| 789 | + | |
| 790 | +function createSingleArgumentStateOperator(mutator) { | |
| 791 | + var operator = createStateOperator(function (_, state) { return mutator(state); }); | |
| 792 | + return function operation(state) { | |
| 793 | + return operator(state, void 0); | |
| 794 | + }; | |
| 795 | +} | |
| 796 | +function createStateOperator(mutator) { | |
| 797 | + return function operation(state, arg) { | |
| 798 | + function isPayloadActionArgument(arg2) { | |
| 799 | + return isFSA(arg2); | |
| 800 | + } | |
| 801 | + var runMutator = function (draft) { | |
| 802 | + if (isPayloadActionArgument(arg)) { | |
| 803 | + mutator(arg.payload, draft); | |
| 804 | + } | |
| 805 | + else { | |
| 806 | + mutator(arg, draft); | |
| 807 | + } | |
| 808 | + }; | |
| 809 | + if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(state)) { | |
| 810 | + runMutator(state); | |
| 811 | + return state; | |
| 812 | + } | |
| 813 | + else { | |
| 814 | + return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(state, runMutator); | |
| 815 | + } | |
| 816 | + }; | |
| 817 | +} | |
| 818 | +// src/entities/utils.ts | |
| 819 | +function selectIdValue(entity, selectId) { | |
| 820 | + var key = selectId(entity); | |
| 821 | + if ( true && key === void 0) { | |
| 822 | + 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()); | |
| 823 | + } | |
| 824 | + return key; | |
| 825 | +} | |
| 826 | +function ensureEntitiesArray(entities) { | |
| 827 | + if (!Array.isArray(entities)) { | |
| 828 | + entities = Object.values(entities); | |
| 829 | + } | |
| 830 | + return entities; | |
| 831 | +} | |
| 832 | +function splitAddedUpdatedEntities(newEntities, selectId, state) { | |
| 833 | + newEntities = ensureEntitiesArray(newEntities); | |
| 834 | + var added = []; | |
| 835 | + var updated = []; | |
| 836 | + for (var _i = 0, newEntities_1 = newEntities; _i < newEntities_1.length; _i++) { | |
| 837 | + var entity = newEntities_1[_i]; | |
| 838 | + var id = selectIdValue(entity, selectId); | |
| 839 | + if (id in state.entities) { | |
| 840 | + updated.push({ id: id, changes: entity }); | |
| 841 | + } | |
| 842 | + else { | |
| 843 | + added.push(entity); | |
| 844 | + } | |
| 845 | + } | |
| 846 | + return [added, updated]; | |
| 847 | +} | |
| 848 | +// src/entities/unsorted_state_adapter.ts | |
| 849 | +function createUnsortedStateAdapter(selectId) { | |
| 850 | + function addOneMutably(entity, state) { | |
| 851 | + var key = selectIdValue(entity, selectId); | |
| 852 | + if (key in state.entities) { | |
| 853 | + return; | |
| 854 | + } | |
| 855 | + state.ids.push(key); | |
| 856 | + state.entities[key] = entity; | |
| 857 | + } | |
| 858 | + function addManyMutably(newEntities, state) { | |
| 859 | + newEntities = ensureEntitiesArray(newEntities); | |
| 860 | + for (var _i = 0, newEntities_2 = newEntities; _i < newEntities_2.length; _i++) { | |
| 861 | + var entity = newEntities_2[_i]; | |
| 862 | + addOneMutably(entity, state); | |
| 863 | + } | |
| 864 | + } | |
| 865 | + function setOneMutably(entity, state) { | |
| 866 | + var key = selectIdValue(entity, selectId); | |
| 867 | + if (!(key in state.entities)) { | |
| 868 | + state.ids.push(key); | |
| 869 | + } | |
| 870 | + state.entities[key] = entity; | |
| 871 | + } | |
| 872 | + function setManyMutably(newEntities, state) { | |
| 873 | + newEntities = ensureEntitiesArray(newEntities); | |
| 874 | + for (var _i = 0, newEntities_3 = newEntities; _i < newEntities_3.length; _i++) { | |
| 875 | + var entity = newEntities_3[_i]; | |
| 876 | + setOneMutably(entity, state); | |
| 877 | + } | |
| 878 | + } | |
| 879 | + function setAllMutably(newEntities, state) { | |
| 880 | + newEntities = ensureEntitiesArray(newEntities); | |
| 881 | + state.ids = []; | |
| 882 | + state.entities = {}; | |
| 883 | + addManyMutably(newEntities, state); | |
| 884 | + } | |
| 885 | + function removeOneMutably(key, state) { | |
| 886 | + return removeManyMutably([key], state); | |
| 887 | + } | |
| 888 | + function removeManyMutably(keys, state) { | |
| 889 | + var didMutate = false; | |
| 890 | + keys.forEach(function (key) { | |
| 891 | + if (key in state.entities) { | |
| 892 | + delete state.entities[key]; | |
| 893 | + didMutate = true; | |
| 894 | + } | |
| 895 | + }); | |
| 896 | + if (didMutate) { | |
| 897 | + state.ids = state.ids.filter(function (id) { return id in state.entities; }); | |
| 898 | + } | |
| 899 | + } | |
| 900 | + function removeAllMutably(state) { | |
| 901 | + Object.assign(state, { | |
| 902 | + ids: [], | |
| 903 | + entities: {} | |
| 904 | + }); | |
| 905 | + } | |
| 906 | + function takeNewKey(keys, update, state) { | |
| 907 | + var original2 = state.entities[update.id]; | |
| 908 | + var updated = Object.assign({}, original2, update.changes); | |
| 909 | + var newKey = selectIdValue(updated, selectId); | |
| 910 | + var hasNewKey = newKey !== update.id; | |
| 911 | + if (hasNewKey) { | |
| 912 | + keys[update.id] = newKey; | |
| 913 | + delete state.entities[update.id]; | |
| 914 | + } | |
| 915 | + state.entities[newKey] = updated; | |
| 916 | + return hasNewKey; | |
| 917 | + } | |
| 918 | + function updateOneMutably(update, state) { | |
| 919 | + return updateManyMutably([update], state); | |
| 920 | + } | |
| 921 | + function updateManyMutably(updates, state) { | |
| 922 | + var newKeys = {}; | |
| 923 | + var updatesPerEntity = {}; | |
| 924 | + updates.forEach(function (update) { | |
| 925 | + if (update.id in state.entities) { | |
| 926 | + updatesPerEntity[update.id] = { | |
| 927 | + id: update.id, | |
| 928 | + changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes) | |
| 929 | + }; | |
| 930 | + } | |
| 931 | + }); | |
| 932 | + updates = Object.values(updatesPerEntity); | |
| 933 | + var didMutateEntities = updates.length > 0; | |
| 934 | + if (didMutateEntities) { | |
| 935 | + var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0; | |
| 936 | + if (didMutateIds) { | |
| 937 | + state.ids = Object.keys(state.entities); | |
| 938 | + } | |
| 939 | + } | |
| 940 | + } | |
| 941 | + function upsertOneMutably(entity, state) { | |
| 942 | + return upsertManyMutably([entity], state); | |
| 943 | + } | |
| 944 | + function upsertManyMutably(newEntities, state) { | |
| 945 | + var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1]; | |
| 946 | + updateManyMutably(updated, state); | |
| 947 | + addManyMutably(added, state); | |
| 948 | + } | |
| 949 | + return { | |
| 950 | + removeAll: createSingleArgumentStateOperator(removeAllMutably), | |
| 951 | + addOne: createStateOperator(addOneMutably), | |
| 952 | + addMany: createStateOperator(addManyMutably), | |
| 953 | + setOne: createStateOperator(setOneMutably), | |
| 954 | + setMany: createStateOperator(setManyMutably), | |
| 955 | + setAll: createStateOperator(setAllMutably), | |
| 956 | + updateOne: createStateOperator(updateOneMutably), | |
| 957 | + updateMany: createStateOperator(updateManyMutably), | |
| 958 | + upsertOne: createStateOperator(upsertOneMutably), | |
| 959 | + upsertMany: createStateOperator(upsertManyMutably), | |
| 960 | + removeOne: createStateOperator(removeOneMutably), | |
| 961 | + removeMany: createStateOperator(removeManyMutably) | |
| 962 | + }; | |
| 963 | +} | |
| 964 | +// src/entities/sorted_state_adapter.ts | |
| 965 | +function createSortedStateAdapter(selectId, sort) { | |
| 966 | + var _c = createUnsortedStateAdapter(selectId), removeOne = _c.removeOne, removeMany = _c.removeMany, removeAll = _c.removeAll; | |
| 967 | + function addOneMutably(entity, state) { | |
| 968 | + return addManyMutably([entity], state); | |
| 969 | + } | |
| 970 | + function addManyMutably(newEntities, state) { | |
| 971 | + newEntities = ensureEntitiesArray(newEntities); | |
| 972 | + var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); }); | |
| 973 | + if (models.length !== 0) { | |
| 974 | + merge(models, state); | |
| 975 | + } | |
| 976 | + } | |
| 977 | + function setOneMutably(entity, state) { | |
| 978 | + return setManyMutably([entity], state); | |
| 979 | + } | |
| 980 | + function setManyMutably(newEntities, state) { | |
| 981 | + newEntities = ensureEntitiesArray(newEntities); | |
| 982 | + if (newEntities.length !== 0) { | |
| 983 | + merge(newEntities, state); | |
| 984 | + } | |
| 985 | + } | |
| 986 | + function setAllMutably(newEntities, state) { | |
| 987 | + newEntities = ensureEntitiesArray(newEntities); | |
| 988 | + state.entities = {}; | |
| 989 | + state.ids = []; | |
| 990 | + addManyMutably(newEntities, state); | |
| 991 | + } | |
| 992 | + function updateOneMutably(update, state) { | |
| 993 | + return updateManyMutably([update], state); | |
| 994 | + } | |
| 995 | + function updateManyMutably(updates, state) { | |
| 996 | + var appliedUpdates = false; | |
| 997 | + for (var _i = 0, updates_1 = updates; _i < updates_1.length; _i++) { | |
| 998 | + var update = updates_1[_i]; | |
| 999 | + var entity = state.entities[update.id]; | |
| 1000 | + if (!entity) { | |
| 1001 | + continue; | |
| 1002 | + } | |
| 1003 | + appliedUpdates = true; | |
| 1004 | + Object.assign(entity, update.changes); | |
| 1005 | + var newId = selectId(entity); | |
| 1006 | + if (update.id !== newId) { | |
| 1007 | + delete state.entities[update.id]; | |
| 1008 | + state.entities[newId] = entity; | |
| 1009 | + } | |
| 1010 | + } | |
| 1011 | + if (appliedUpdates) { | |
| 1012 | + resortEntities(state); | |
| 1013 | + } | |
| 1014 | + } | |
| 1015 | + function upsertOneMutably(entity, state) { | |
| 1016 | + return upsertManyMutably([entity], state); | |
| 1017 | + } | |
| 1018 | + function upsertManyMutably(newEntities, state) { | |
| 1019 | + var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1]; | |
| 1020 | + updateManyMutably(updated, state); | |
| 1021 | + addManyMutably(added, state); | |
| 1022 | + } | |
| 1023 | + function areArraysEqual(a, b) { | |
| 1024 | + if (a.length !== b.length) { | |
| 1025 | + return false; | |
| 1026 | + } | |
| 1027 | + for (var i = 0; i < a.length && i < b.length; i++) { | |
| 1028 | + if (a[i] === b[i]) { | |
| 1029 | + continue; | |
| 1030 | + } | |
| 1031 | + return false; | |
| 1032 | + } | |
| 1033 | + return true; | |
| 1034 | + } | |
| 1035 | + function merge(models, state) { | |
| 1036 | + models.forEach(function (model) { | |
| 1037 | + state.entities[selectId(model)] = model; | |
| 1038 | + }); | |
| 1039 | + resortEntities(state); | |
| 1040 | + } | |
| 1041 | + function resortEntities(state) { | |
| 1042 | + var allEntities = Object.values(state.entities); | |
| 1043 | + allEntities.sort(sort); | |
| 1044 | + var newSortedIds = allEntities.map(selectId); | |
| 1045 | + var ids = state.ids; | |
| 1046 | + if (!areArraysEqual(ids, newSortedIds)) { | |
| 1047 | + state.ids = newSortedIds; | |
| 1048 | + } | |
| 1049 | + } | |
| 1050 | + return { | |
| 1051 | + removeOne: removeOne, | |
| 1052 | + removeMany: removeMany, | |
| 1053 | + removeAll: removeAll, | |
| 1054 | + addOne: createStateOperator(addOneMutably), | |
| 1055 | + updateOne: createStateOperator(updateOneMutably), | |
| 1056 | + upsertOne: createStateOperator(upsertOneMutably), | |
| 1057 | + setOne: createStateOperator(setOneMutably), | |
| 1058 | + setMany: createStateOperator(setManyMutably), | |
| 1059 | + setAll: createStateOperator(setAllMutably), | |
| 1060 | + addMany: createStateOperator(addManyMutably), | |
| 1061 | + updateMany: createStateOperator(updateManyMutably), | |
| 1062 | + upsertMany: createStateOperator(upsertManyMutably) | |
| 1063 | + }; | |
| 1064 | +} | |
| 1065 | +// src/entities/create_adapter.ts | |
| 1066 | +function createEntityAdapter(options) { | |
| 1067 | + if (options === void 0) { options = {}; } | |
| 1068 | + var _c = __spreadValues({ | |
| 1069 | + sortComparer: false, | |
| 1070 | + selectId: function (instance) { return instance.id; } | |
| 1071 | + }, options), selectId = _c.selectId, sortComparer = _c.sortComparer; | |
| 1072 | + var stateFactory = createInitialStateFactory(); | |
| 1073 | + var selectorsFactory = createSelectorsFactory(); | |
| 1074 | + var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId); | |
| 1075 | + return __spreadValues(__spreadValues(__spreadValues({ | |
| 1076 | + selectId: selectId, | |
| 1077 | + sortComparer: sortComparer | |
| 1078 | + }, stateFactory), selectorsFactory), stateAdapter); | |
| 1079 | +} | |
| 1080 | +// src/nanoid.ts | |
| 1081 | +var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"; | |
| 1082 | +var nanoid = function (size) { | |
| 1083 | + if (size === void 0) { size = 21; } | |
| 1084 | + var id = ""; | |
| 1085 | + var i = size; | |
| 1086 | + while (i--) { | |
| 1087 | + id += urlAlphabet[Math.random() * 64 | 0]; | |
| 1088 | + } | |
| 1089 | + return id; | |
| 1090 | +}; | |
| 1091 | +// src/createAsyncThunk.ts | |
| 1092 | +var commonProperties = [ | |
| 1093 | + "name", | |
| 1094 | + "message", | |
| 1095 | + "stack", | |
| 1096 | + "code" | |
| 1097 | +]; | |
| 1098 | +var RejectWithValue = /** @class */ (function () { | |
| 1099 | + function RejectWithValue(payload, meta) { | |
| 1100 | + this.payload = payload; | |
| 1101 | + this.meta = meta; | |
| 1102 | + } | |
| 1103 | + return RejectWithValue; | |
| 1104 | +}()); | |
| 1105 | +var FulfillWithMeta = /** @class */ (function () { | |
| 1106 | + function FulfillWithMeta(payload, meta) { | |
| 1107 | + this.payload = payload; | |
| 1108 | + this.meta = meta; | |
| 1109 | + } | |
| 1110 | + return FulfillWithMeta; | |
| 1111 | +}()); | |
| 1112 | +var miniSerializeError = function (value) { | |
| 1113 | + if (typeof value === "object" && value !== null) { | |
| 1114 | + var simpleError = {}; | |
| 1115 | + for (var _i = 0, commonProperties_1 = commonProperties; _i < commonProperties_1.length; _i++) { | |
| 1116 | + var property = commonProperties_1[_i]; | |
| 1117 | + if (typeof value[property] === "string") { | |
| 1118 | + simpleError[property] = value[property]; | |
| 1119 | + } | |
| 1120 | + } | |
| 1121 | + return simpleError; | |
| 1122 | + } | |
| 1123 | + return { message: String(value) }; | |
| 1124 | +}; | |
| 1125 | +function createAsyncThunk(typePrefix, payloadCreator, options) { | |
| 1126 | + var fulfilled = createAction(typePrefix + "/fulfilled", function (payload, requestId, arg, meta) { return ({ | |
| 1127 | + payload: payload, | |
| 1128 | + meta: __spreadProps(__spreadValues({}, meta || {}), { | |
| 1129 | + arg: arg, | |
| 1130 | + requestId: requestId, | |
| 1131 | + requestStatus: "fulfilled" | |
| 1132 | + }) | |
| 1133 | + }); }); | |
| 1134 | + var pending = createAction(typePrefix + "/pending", function (requestId, arg, meta) { return ({ | |
| 1135 | + payload: void 0, | |
| 1136 | + meta: __spreadProps(__spreadValues({}, meta || {}), { | |
| 1137 | + arg: arg, | |
| 1138 | + requestId: requestId, | |
| 1139 | + requestStatus: "pending" | |
| 1140 | + }) | |
| 1141 | + }); }); | |
| 1142 | + var rejected = createAction(typePrefix + "/rejected", function (error, requestId, arg, payload, meta) { return ({ | |
| 1143 | + payload: payload, | |
| 1144 | + error: (options && options.serializeError || miniSerializeError)(error || "Rejected"), | |
| 1145 | + meta: __spreadProps(__spreadValues({}, meta || {}), { | |
| 1146 | + arg: arg, | |
| 1147 | + requestId: requestId, | |
| 1148 | + rejectedWithValue: !!payload, | |
| 1149 | + requestStatus: "rejected", | |
| 1150 | + aborted: (error == null ? void 0 : error.name) === "AbortError", | |
| 1151 | + condition: (error == null ? void 0 : error.name) === "ConditionError" | |
| 1152 | + }) | |
| 1153 | + }); }); | |
| 1154 | + var displayedWarning = false; | |
| 1155 | + var AC = typeof AbortController !== "undefined" ? AbortController : /** @class */ (function () { | |
| 1156 | + function class_1() { | |
| 1157 | + this.signal = { | |
| 1158 | + aborted: false, | |
| 1159 | + addEventListener: function () { | |
| 1160 | + }, | |
| 1161 | + dispatchEvent: function () { | |
| 1162 | + return false; | |
| 1163 | + }, | |
| 1164 | + onabort: function () { | |
| 1165 | + }, | |
| 1166 | + removeEventListener: function () { | |
| 1167 | + }, | |
| 1168 | + reason: void 0, | |
| 1169 | + throwIfAborted: function () { | |
| 1170 | + } | |
| 1171 | + }; | |
| 1172 | + } | |
| 1173 | + class_1.prototype.abort = function () { | |
| 1174 | + if (true) { | |
| 1175 | + if (!displayedWarning) { | |
| 1176 | + displayedWarning = true; | |
| 1177 | + 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'."); | |
| 1178 | + } | |
| 1179 | + } | |
| 1180 | + }; | |
| 1181 | + return class_1; | |
| 1182 | + }()); | |
| 1183 | + function actionCreator(arg) { | |
| 1184 | + return function (dispatch, getState, extra) { | |
| 1185 | + var requestId = (options == null ? void 0 : options.idGenerator) ? options.idGenerator(arg) : nanoid(); | |
| 1186 | + var abortController = new AC(); | |
| 1187 | + var abortReason; | |
| 1188 | + var abortedPromise = new Promise(function (_, reject) { return abortController.signal.addEventListener("abort", function () { return reject({ name: "AbortError", message: abortReason || "Aborted" }); }); }); | |
| 1189 | + var started = false; | |
| 1190 | + function abort(reason) { | |
| 1191 | + if (started) { | |
| 1192 | + abortReason = reason; | |
| 1193 | + abortController.abort(); | |
| 1194 | + } | |
| 1195 | + } | |
| 1196 | + var promise = function () { | |
| 1197 | + return __async(this, null, function () { | |
| 1198 | + var _a, _b, finalAction, conditionResult, err_1, skipDispatch; | |
| 1199 | + return __generator(this, function (_c) { | |
| 1200 | + switch (_c.label) { | |
| 1201 | + case 0: | |
| 1202 | + _c.trys.push([0, 4, , 5]); | |
| 1203 | + conditionResult = (_a = options == null ? void 0 : options.condition) == null ? void 0 : _a.call(options, arg, { getState: getState, extra: extra }); | |
| 1204 | + if (!isThenable(conditionResult)) return [3 /*break*/, 2]; | |
| 1205 | + return [4 /*yield*/, conditionResult]; | |
| 1206 | + case 1: | |
| 1207 | + conditionResult = _c.sent(); | |
| 1208 | + _c.label = 2; | |
| 1209 | + case 2: | |
| 1210 | + if (conditionResult === false) { | |
| 1211 | + throw { | |
| 1212 | + name: "ConditionError", | |
| 1213 | + message: "Aborted due to condition callback returning false." | |
| 1214 | + }; | |
| 1215 | + } | |
| 1216 | + started = true; | |
| 1217 | + 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 }))); | |
| 1218 | + return [4 /*yield*/, Promise.race([ | |
| 1219 | + abortedPromise, | |
| 1220 | + Promise.resolve(payloadCreator(arg, { | |
| 1221 | + dispatch: dispatch, | |
| 1222 | + getState: getState, | |
| 1223 | + extra: extra, | |
| 1224 | + requestId: requestId, | |
| 1225 | + signal: abortController.signal, | |
| 1226 | + rejectWithValue: function (value, meta) { | |
| 1227 | + return new RejectWithValue(value, meta); | |
| 1228 | + }, | |
| 1229 | + fulfillWithValue: function (value, meta) { | |
| 1230 | + return new FulfillWithMeta(value, meta); | |
| 1231 | + } | |
| 1232 | + })).then(function (result) { | |
| 1233 | + if (result instanceof RejectWithValue) { | |
| 1234 | + throw result; | |
| 1235 | + } | |
| 1236 | + if (result instanceof FulfillWithMeta) { | |
| 1237 | + return fulfilled(result.payload, requestId, arg, result.meta); | |
| 1238 | + } | |
| 1239 | + return fulfilled(result, requestId, arg); | |
| 1240 | + }) | |
| 1241 | + ])]; | |
| 1242 | + case 3: | |
| 1243 | + finalAction = _c.sent(); | |
| 1244 | + return [3 /*break*/, 5]; | |
| 1245 | + case 4: | |
| 1246 | + err_1 = _c.sent(); | |
| 1247 | + finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg); | |
| 1248 | + return [3 /*break*/, 5]; | |
| 1249 | + case 5: | |
| 1250 | + skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition; | |
| 1251 | + if (!skipDispatch) { | |
| 1252 | + dispatch(finalAction); | |
| 1253 | + } | |
| 1254 | + return [2 /*return*/, finalAction]; | |
| 1255 | + } | |
| 1256 | + }); | |
| 1257 | + }); | |
| 1258 | + }(); | |
| 1259 | + return Object.assign(promise, { | |
| 1260 | + abort: abort, | |
| 1261 | + requestId: requestId, | |
| 1262 | + arg: arg, | |
| 1263 | + unwrap: function () { | |
| 1264 | + return promise.then(unwrapResult); | |
| 1265 | + } | |
| 1266 | + }); | |
| 1267 | + }; | |
| 1268 | + } | |
| 1269 | + return Object.assign(actionCreator, { | |
| 1270 | + pending: pending, | |
| 1271 | + rejected: rejected, | |
| 1272 | + fulfilled: fulfilled, | |
| 1273 | + typePrefix: typePrefix | |
| 1274 | + }); | |
| 1275 | +} | |
| 1276 | +function unwrapResult(action) { | |
| 1277 | + if (action.meta && action.meta.rejectedWithValue) { | |
| 1278 | + throw action.payload; | |
| 1279 | + } | |
| 1280 | + if (action.error) { | |
| 1281 | + throw action.error; | |
| 1282 | + } | |
| 1283 | + return action.payload; | |
| 1284 | +} | |
| 1285 | +function isThenable(value) { | |
| 1286 | + return value !== null && typeof value === "object" && typeof value.then === "function"; | |
| 1287 | +} | |
| 1288 | +// src/tsHelpers.ts | |
| 1289 | +var hasMatchFunction = function (v) { | |
| 1290 | + return v && typeof v.match === "function"; | |
| 1291 | +}; | |
| 1292 | +// src/matchers.ts | |
| 1293 | +var matches = function (matcher, action) { | |
| 1294 | + if (hasMatchFunction(matcher)) { | |
| 1295 | + return matcher.match(action); | |
| 1296 | + } | |
| 1297 | + else { | |
| 1298 | + return matcher(action); | |
| 1299 | + } | |
| 1300 | +}; | |
| 1301 | +function isAnyOf() { | |
| 1302 | + var matchers = []; | |
| 1303 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1304 | + matchers[_i] = arguments[_i]; | |
| 1305 | + } | |
| 1306 | + return function (action) { | |
| 1307 | + return matchers.some(function (matcher) { return matches(matcher, action); }); | |
| 1308 | + }; | |
| 1309 | +} | |
| 1310 | +function isAllOf() { | |
| 1311 | + var matchers = []; | |
| 1312 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1313 | + matchers[_i] = arguments[_i]; | |
| 1314 | + } | |
| 1315 | + return function (action) { | |
| 1316 | + return matchers.every(function (matcher) { return matches(matcher, action); }); | |
| 1317 | + }; | |
| 1318 | +} | |
| 1319 | +function hasExpectedRequestMetadata(action, validStatus) { | |
| 1320 | + if (!action || !action.meta) | |
| 1321 | + return false; | |
| 1322 | + var hasValidRequestId = typeof action.meta.requestId === "string"; | |
| 1323 | + var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1; | |
| 1324 | + return hasValidRequestId && hasValidRequestStatus; | |
| 1325 | +} | |
| 1326 | +function isAsyncThunkArray(a) { | |
| 1327 | + return typeof a[0] === "function" && "pending" in a[0] && "fulfilled" in a[0] && "rejected" in a[0]; | |
| 1328 | +} | |
| 1329 | +function isPending() { | |
| 1330 | + var asyncThunks = []; | |
| 1331 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1332 | + asyncThunks[_i] = arguments[_i]; | |
| 1333 | + } | |
| 1334 | + if (asyncThunks.length === 0) { | |
| 1335 | + return function (action) { return hasExpectedRequestMetadata(action, ["pending"]); }; | |
| 1336 | + } | |
| 1337 | + if (!isAsyncThunkArray(asyncThunks)) { | |
| 1338 | + return isPending()(asyncThunks[0]); | |
| 1339 | + } | |
| 1340 | + return function (action) { | |
| 1341 | + var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; }); | |
| 1342 | + var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 1343 | + return combinedMatcher(action); | |
| 1344 | + }; | |
| 1345 | +} | |
| 1346 | +function isRejected() { | |
| 1347 | + var asyncThunks = []; | |
| 1348 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1349 | + asyncThunks[_i] = arguments[_i]; | |
| 1350 | + } | |
| 1351 | + if (asyncThunks.length === 0) { | |
| 1352 | + return function (action) { return hasExpectedRequestMetadata(action, ["rejected"]); }; | |
| 1353 | + } | |
| 1354 | + if (!isAsyncThunkArray(asyncThunks)) { | |
| 1355 | + return isRejected()(asyncThunks[0]); | |
| 1356 | + } | |
| 1357 | + return function (action) { | |
| 1358 | + var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; }); | |
| 1359 | + var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 1360 | + return combinedMatcher(action); | |
| 1361 | + }; | |
| 1362 | +} | |
| 1363 | +function isRejectedWithValue() { | |
| 1364 | + var asyncThunks = []; | |
| 1365 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1366 | + asyncThunks[_i] = arguments[_i]; | |
| 1367 | + } | |
| 1368 | + var hasFlag = function (action) { | |
| 1369 | + return action && action.meta && action.meta.rejectedWithValue; | |
| 1370 | + }; | |
| 1371 | + if (asyncThunks.length === 0) { | |
| 1372 | + return function (action) { | |
| 1373 | + var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag); | |
| 1374 | + return combinedMatcher(action); | |
| 1375 | + }; | |
| 1376 | + } | |
| 1377 | + if (!isAsyncThunkArray(asyncThunks)) { | |
| 1378 | + return isRejectedWithValue()(asyncThunks[0]); | |
| 1379 | + } | |
| 1380 | + return function (action) { | |
| 1381 | + var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag); | |
| 1382 | + return combinedMatcher(action); | |
| 1383 | + }; | |
| 1384 | +} | |
| 1385 | +function isFulfilled() { | |
| 1386 | + var asyncThunks = []; | |
| 1387 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1388 | + asyncThunks[_i] = arguments[_i]; | |
| 1389 | + } | |
| 1390 | + if (asyncThunks.length === 0) { | |
| 1391 | + return function (action) { return hasExpectedRequestMetadata(action, ["fulfilled"]); }; | |
| 1392 | + } | |
| 1393 | + if (!isAsyncThunkArray(asyncThunks)) { | |
| 1394 | + return isFulfilled()(asyncThunks[0]); | |
| 1395 | + } | |
| 1396 | + return function (action) { | |
| 1397 | + var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; }); | |
| 1398 | + var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 1399 | + return combinedMatcher(action); | |
| 1400 | + }; | |
| 1401 | +} | |
| 1402 | +function isAsyncThunkAction() { | |
| 1403 | + var asyncThunks = []; | |
| 1404 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1405 | + asyncThunks[_i] = arguments[_i]; | |
| 1406 | + } | |
| 1407 | + if (asyncThunks.length === 0) { | |
| 1408 | + return function (action) { return hasExpectedRequestMetadata(action, ["pending", "fulfilled", "rejected"]); }; | |
| 1409 | + } | |
| 1410 | + if (!isAsyncThunkArray(asyncThunks)) { | |
| 1411 | + return isAsyncThunkAction()(asyncThunks[0]); | |
| 1412 | + } | |
| 1413 | + return function (action) { | |
| 1414 | + var matchers = []; | |
| 1415 | + for (var _i = 0, asyncThunks_1 = asyncThunks; _i < asyncThunks_1.length; _i++) { | |
| 1416 | + var asyncThunk = asyncThunks_1[_i]; | |
| 1417 | + matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled); | |
| 1418 | + } | |
| 1419 | + var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 1420 | + return combinedMatcher(action); | |
| 1421 | + }; | |
| 1422 | +} | |
| 1423 | +// src/listenerMiddleware/utils.ts | |
| 1424 | +var assertFunction = function (func, expected) { | |
| 1425 | + if (typeof func !== "function") { | |
| 1426 | + throw new TypeError(expected + " is not a function"); | |
| 1427 | + } | |
| 1428 | +}; | |
| 1429 | +var noop = function () { | |
| 1430 | +}; | |
| 1431 | +var catchRejection = function (promise, onError) { | |
| 1432 | + if (onError === void 0) { onError = noop; } | |
| 1433 | + promise.catch(onError); | |
| 1434 | + return promise; | |
| 1435 | +}; | |
| 1436 | +var addAbortSignalListener = function (abortSignal, callback) { | |
| 1437 | + abortSignal.addEventListener("abort", callback, { once: true }); | |
| 1438 | +}; | |
| 1439 | +var abortControllerWithReason = function (abortController, reason) { | |
| 1440 | + var signal = abortController.signal; | |
| 1441 | + if (signal.aborted) { | |
| 1442 | + return; | |
| 1443 | + } | |
| 1444 | + if (!("reason" in signal)) { | |
| 1445 | + Object.defineProperty(signal, "reason", { | |
| 1446 | + enumerable: true, | |
| 1447 | + value: reason, | |
| 1448 | + configurable: true, | |
| 1449 | + writable: true | |
| 1450 | + }); | |
| 1451 | + } | |
| 1452 | + ; | |
| 1453 | + abortController.abort(reason); | |
| 1454 | +}; | |
| 1455 | +// src/listenerMiddleware/exceptions.ts | |
| 1456 | +var task = "task"; | |
| 1457 | +var listener = "listener"; | |
| 1458 | +var completed = "completed"; | |
| 1459 | +var cancelled = "cancelled"; | |
| 1460 | +var taskCancelled = "task-" + cancelled; | |
| 1461 | +var taskCompleted = "task-" + completed; | |
| 1462 | +var listenerCancelled = listener + "-" + cancelled; | |
| 1463 | +var listenerCompleted = listener + "-" + completed; | |
| 1464 | +var TaskAbortError = /** @class */ (function () { | |
| 1465 | + function TaskAbortError(code) { | |
| 1466 | + this.code = code; | |
| 1467 | + this.name = "TaskAbortError"; | |
| 1468 | + this.message = task + " " + cancelled + " (reason: " + code + ")"; | |
| 1469 | + } | |
| 1470 | + return TaskAbortError; | |
| 1471 | +}()); | |
| 1472 | +// src/listenerMiddleware/task.ts | |
| 1473 | +var validateActive = function (signal) { | |
| 1474 | + if (signal.aborted) { | |
| 1475 | + throw new TaskAbortError(signal.reason); | |
| 1476 | + } | |
| 1477 | +}; | |
| 1478 | +var promisifyAbortSignal = function (signal) { | |
| 1479 | + return catchRejection(new Promise(function (_, reject) { | |
| 1480 | + var notifyRejection = function () { return reject(new TaskAbortError(signal.reason)); }; | |
| 1481 | + if (signal.aborted) { | |
| 1482 | + notifyRejection(); | |
| 1483 | + } | |
| 1484 | + else { | |
| 1485 | + addAbortSignalListener(signal, notifyRejection); | |
| 1486 | + } | |
| 1487 | + })); | |
| 1488 | +}; | |
| 1489 | +var runTask = function (task2, cleanUp) { return __async(void 0, null, function () { | |
| 1490 | + var value, error_1; | |
| 1491 | + return __generator(this, function (_c) { | |
| 1492 | + switch (_c.label) { | |
| 1493 | + case 0: | |
| 1494 | + _c.trys.push([0, 3, 4, 5]); | |
| 1495 | + return [4 /*yield*/, Promise.resolve()]; | |
| 1496 | + case 1: | |
| 1497 | + _c.sent(); | |
| 1498 | + return [4 /*yield*/, task2()]; | |
| 1499 | + case 2: | |
| 1500 | + value = _c.sent(); | |
| 1501 | + return [2 /*return*/, { | |
| 1502 | + status: "ok", | |
| 1503 | + value: value | |
| 1504 | + }]; | |
| 1505 | + case 3: | |
| 1506 | + error_1 = _c.sent(); | |
| 1507 | + return [2 /*return*/, { | |
| 1508 | + status: error_1 instanceof TaskAbortError ? "cancelled" : "rejected", | |
| 1509 | + error: error_1 | |
| 1510 | + }]; | |
| 1511 | + case 4: | |
| 1512 | + cleanUp == null ? void 0 : cleanUp(); | |
| 1513 | + return [7 /*endfinally*/]; | |
| 1514 | + case 5: return [2 /*return*/]; | |
| 1515 | + } | |
| 1516 | + }); | |
| 1517 | +}); }; | |
| 1518 | +var createPause = function (signal) { | |
| 1519 | + return function (promise) { | |
| 1520 | + return catchRejection(Promise.race([promisifyAbortSignal(signal), promise]).then(function (output) { | |
| 1521 | + validateActive(signal); | |
| 1522 | + return output; | |
| 1523 | + })); | |
| 1524 | + }; | |
| 1525 | +}; | |
| 1526 | +var createDelay = function (signal) { | |
| 1527 | + var pause = createPause(signal); | |
| 1528 | + return function (timeoutMs) { | |
| 1529 | + return pause(new Promise(function (resolve) { return setTimeout(resolve, timeoutMs); })); | |
| 1530 | + }; | |
| 1531 | +}; | |
| 1532 | +// src/listenerMiddleware/index.ts | |
| 1533 | +var assign = Object.assign; | |
| 1534 | +var INTERNAL_NIL_TOKEN = {}; | |
| 1535 | +var alm = "listenerMiddleware"; | |
| 1536 | +var createFork = function (parentAbortSignal) { | |
| 1537 | + var linkControllers = function (controller) { return addAbortSignalListener(parentAbortSignal, function () { return abortControllerWithReason(controller, parentAbortSignal.reason); }); }; | |
| 1538 | + return function (taskExecutor) { | |
| 1539 | + assertFunction(taskExecutor, "taskExecutor"); | |
| 1540 | + var childAbortController = new AbortController(); | |
| 1541 | + linkControllers(childAbortController); | |
| 1542 | + var result = runTask(function () { return __async(void 0, null, function () { | |
| 1543 | + var result2; | |
| 1544 | + return __generator(this, function (_c) { | |
| 1545 | + switch (_c.label) { | |
| 1546 | + case 0: | |
| 1547 | + validateActive(parentAbortSignal); | |
| 1548 | + validateActive(childAbortController.signal); | |
| 1549 | + return [4 /*yield*/, taskExecutor({ | |
| 1550 | + pause: createPause(childAbortController.signal), | |
| 1551 | + delay: createDelay(childAbortController.signal), | |
| 1552 | + signal: childAbortController.signal | |
| 1553 | + })]; | |
| 1554 | + case 1: | |
| 1555 | + result2 = _c.sent(); | |
| 1556 | + validateActive(childAbortController.signal); | |
| 1557 | + return [2 /*return*/, result2]; | |
| 1558 | + } | |
| 1559 | + }); | |
| 1560 | + }); }, function () { return abortControllerWithReason(childAbortController, taskCompleted); }); | |
| 1561 | + return { | |
| 1562 | + result: createPause(parentAbortSignal)(result), | |
| 1563 | + cancel: function () { | |
| 1564 | + abortControllerWithReason(childAbortController, taskCancelled); | |
| 1565 | + } | |
| 1566 | + }; | |
| 1567 | + }; | |
| 1568 | +}; | |
| 1569 | +var createTakePattern = function (startListening, signal) { | |
| 1570 | + var take = function (predicate, timeout) { return __async(void 0, null, function () { | |
| 1571 | + var unsubscribe, tuplePromise, promises, output; | |
| 1572 | + return __generator(this, function (_c) { | |
| 1573 | + switch (_c.label) { | |
| 1574 | + case 0: | |
| 1575 | + validateActive(signal); | |
| 1576 | + unsubscribe = function () { | |
| 1577 | + }; | |
| 1578 | + tuplePromise = new Promise(function (resolve) { | |
| 1579 | + unsubscribe = startListening({ | |
| 1580 | + predicate: predicate, | |
| 1581 | + effect: function (action, listenerApi) { | |
| 1582 | + listenerApi.unsubscribe(); | |
| 1583 | + resolve([ | |
| 1584 | + action, | |
| 1585 | + listenerApi.getState(), | |
| 1586 | + listenerApi.getOriginalState() | |
| 1587 | + ]); | |
| 1588 | + } | |
| 1589 | + }); | |
| 1590 | + }); | |
| 1591 | + promises = [ | |
| 1592 | + promisifyAbortSignal(signal), | |
| 1593 | + tuplePromise | |
| 1594 | + ]; | |
| 1595 | + if (timeout != null) { | |
| 1596 | + promises.push(new Promise(function (resolve) { return setTimeout(resolve, timeout, null); })); | |
| 1597 | + } | |
| 1598 | + _c.label = 1; | |
| 1599 | + case 1: | |
| 1600 | + _c.trys.push([1, , 3, 4]); | |
| 1601 | + return [4 /*yield*/, Promise.race(promises)]; | |
| 1602 | + case 2: | |
| 1603 | + output = _c.sent(); | |
| 1604 | + validateActive(signal); | |
| 1605 | + return [2 /*return*/, output]; | |
| 1606 | + case 3: | |
| 1607 | + unsubscribe(); | |
| 1608 | + return [7 /*endfinally*/]; | |
| 1609 | + case 4: return [2 /*return*/]; | |
| 1610 | + } | |
| 1611 | + }); | |
| 1612 | + }); }; | |
| 1613 | + return function (predicate, timeout) { return catchRejection(take(predicate, timeout)); }; | |
| 1614 | +}; | |
| 1615 | +var getListenerEntryPropsFrom = function (options) { | |
| 1616 | + var type = options.type, actionCreator = options.actionCreator, matcher = options.matcher, predicate = options.predicate, effect = options.effect; | |
| 1617 | + if (type) { | |
| 1618 | + predicate = createAction(type).match; | |
| 1619 | + } | |
| 1620 | + else if (actionCreator) { | |
| 1621 | + type = actionCreator.type; | |
| 1622 | + predicate = actionCreator.match; | |
| 1623 | + } | |
| 1624 | + else if (matcher) { | |
| 1625 | + predicate = matcher; | |
| 1626 | + } | |
| 1627 | + else if (predicate) { | |
| 1628 | + } | |
| 1629 | + else { | |
| 1630 | + throw new Error("Creating or removing a listener requires one of the known fields for matching an action"); | |
| 1631 | + } | |
| 1632 | + assertFunction(effect, "options.listener"); | |
| 1633 | + return { predicate: predicate, type: type, effect: effect }; | |
| 1634 | +}; | |
| 1635 | +var createListenerEntry = function (options) { | |
| 1636 | + var _c = getListenerEntryPropsFrom(options), type = _c.type, predicate = _c.predicate, effect = _c.effect; | |
| 1637 | + var id = nanoid(); | |
| 1638 | + var entry = { | |
| 1639 | + id: id, | |
| 1640 | + effect: effect, | |
| 1641 | + type: type, | |
| 1642 | + predicate: predicate, | |
| 1643 | + pending: new Set(), | |
| 1644 | + unsubscribe: function () { | |
| 1645 | + throw new Error("Unsubscribe not initialized"); | |
| 1646 | + } | |
| 1647 | + }; | |
| 1648 | + return entry; | |
| 1649 | +}; | |
| 1650 | +var createClearListenerMiddleware = function (listenerMap) { | |
| 1651 | + return function () { | |
| 1652 | + listenerMap.forEach(cancelActiveListeners); | |
| 1653 | + listenerMap.clear(); | |
| 1654 | + }; | |
| 1655 | +}; | |
| 1656 | +var safelyNotifyError = function (errorHandler, errorToNotify, errorInfo) { | |
| 1657 | + try { | |
| 1658 | + errorHandler(errorToNotify, errorInfo); | |
| 1659 | + } | |
| 1660 | + catch (errorHandlerError) { | |
| 1661 | + setTimeout(function () { | |
| 1662 | + throw errorHandlerError; | |
| 1663 | + }, 0); | |
| 1664 | + } | |
| 1665 | +}; | |
| 1666 | +var addListener = createAction(alm + "/add"); | |
| 1667 | +var clearAllListeners = createAction(alm + "/removeAll"); | |
| 1668 | +var removeListener = createAction(alm + "/remove"); | |
| 1669 | +var defaultErrorHandler = function () { | |
| 1670 | + var args = []; | |
| 1671 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1672 | + args[_i] = arguments[_i]; | |
| 1673 | + } | |
| 1674 | + console.error.apply(console, __spreadArray([alm + "/error"], args)); | |
| 1675 | +}; | |
| 1676 | +var cancelActiveListeners = function (entry) { | |
| 1677 | + entry.pending.forEach(function (controller) { | |
| 1678 | + abortControllerWithReason(controller, listenerCancelled); | |
| 1679 | + }); | |
| 1680 | +}; | |
| 1681 | +function createListenerMiddleware(middlewareOptions) { | |
| 1682 | + var _this = this; | |
| 1683 | + if (middlewareOptions === void 0) { middlewareOptions = {}; } | |
| 1684 | + var listenerMap = new Map(); | |
| 1685 | + var extra = middlewareOptions.extra, _c = middlewareOptions.onError, onError = _c === void 0 ? defaultErrorHandler : _c; | |
| 1686 | + assertFunction(onError, "onError"); | |
| 1687 | + var insertEntry = function (entry) { | |
| 1688 | + entry.unsubscribe = function () { return listenerMap.delete(entry.id); }; | |
| 1689 | + listenerMap.set(entry.id, entry); | |
| 1690 | + return function (cancelOptions) { | |
| 1691 | + entry.unsubscribe(); | |
| 1692 | + if (cancelOptions == null ? void 0 : cancelOptions.cancelActive) { | |
| 1693 | + cancelActiveListeners(entry); | |
| 1694 | + } | |
| 1695 | + }; | |
| 1696 | + }; | |
| 1697 | + var findListenerEntry = function (comparator) { | |
| 1698 | + for (var _i = 0, _c = Array.from(listenerMap.values()); _i < _c.length; _i++) { | |
| 1699 | + var entry = _c[_i]; | |
| 1700 | + if (comparator(entry)) { | |
| 1701 | + return entry; | |
| 1702 | + } | |
| 1703 | + } | |
| 1704 | + return void 0; | |
| 1705 | + }; | |
| 1706 | + var startListening = function (options) { | |
| 1707 | + var entry = findListenerEntry(function (existingEntry) { return existingEntry.effect === options.effect; }); | |
| 1708 | + if (!entry) { | |
| 1709 | + entry = createListenerEntry(options); | |
| 1710 | + } | |
| 1711 | + return insertEntry(entry); | |
| 1712 | + }; | |
| 1713 | + var stopListening = function (options) { | |
| 1714 | + var _c = getListenerEntryPropsFrom(options), type = _c.type, effect = _c.effect, predicate = _c.predicate; | |
| 1715 | + var entry = findListenerEntry(function (entry2) { | |
| 1716 | + var matchPredicateOrType = typeof type === "string" ? entry2.type === type : entry2.predicate === predicate; | |
| 1717 | + return matchPredicateOrType && entry2.effect === effect; | |
| 1718 | + }); | |
| 1719 | + if (entry) { | |
| 1720 | + entry.unsubscribe(); | |
| 1721 | + if (options.cancelActive) { | |
| 1722 | + cancelActiveListeners(entry); | |
| 1723 | + } | |
| 1724 | + } | |
| 1725 | + return !!entry; | |
| 1726 | + }; | |
| 1727 | + var notifyListener = function (entry, action, api, getOriginalState) { return __async(_this, null, function () { | |
| 1728 | + var internalTaskController, take, listenerError_1; | |
| 1729 | + return __generator(this, function (_c) { | |
| 1730 | + switch (_c.label) { | |
| 1731 | + case 0: | |
| 1732 | + internalTaskController = new AbortController(); | |
| 1733 | + take = createTakePattern(startListening, internalTaskController.signal); | |
| 1734 | + _c.label = 1; | |
| 1735 | + case 1: | |
| 1736 | + _c.trys.push([1, 3, 4, 5]); | |
| 1737 | + entry.pending.add(internalTaskController); | |
| 1738 | + return [4 /*yield*/, Promise.resolve(entry.effect(action, assign({}, api, { | |
| 1739 | + getOriginalState: getOriginalState, | |
| 1740 | + condition: function (predicate, timeout) { return take(predicate, timeout).then(Boolean); }, | |
| 1741 | + take: take, | |
| 1742 | + delay: createDelay(internalTaskController.signal), | |
| 1743 | + pause: createPause(internalTaskController.signal), | |
| 1744 | + extra: extra, | |
| 1745 | + signal: internalTaskController.signal, | |
| 1746 | + fork: createFork(internalTaskController.signal), | |
| 1747 | + unsubscribe: entry.unsubscribe, | |
| 1748 | + subscribe: function () { | |
| 1749 | + listenerMap.set(entry.id, entry); | |
| 1750 | + }, | |
| 1751 | + cancelActiveListeners: function () { | |
| 1752 | + entry.pending.forEach(function (controller, _, set) { | |
| 1753 | + if (controller !== internalTaskController) { | |
| 1754 | + abortControllerWithReason(controller, listenerCancelled); | |
| 1755 | + set.delete(controller); | |
| 1756 | + } | |
| 1757 | + }); | |
| 1758 | + } | |
| 1759 | + })))]; | |
| 1760 | + case 2: | |
| 1761 | + _c.sent(); | |
| 1762 | + return [3 /*break*/, 5]; | |
| 1763 | + case 3: | |
| 1764 | + listenerError_1 = _c.sent(); | |
| 1765 | + if (!(listenerError_1 instanceof TaskAbortError)) { | |
| 1766 | + safelyNotifyError(onError, listenerError_1, { | |
| 1767 | + raisedBy: "effect" | |
| 1768 | + }); | |
| 1769 | + } | |
| 1770 | + return [3 /*break*/, 5]; | |
| 1771 | + case 4: | |
| 1772 | + abortControllerWithReason(internalTaskController, listenerCompleted); | |
| 1773 | + entry.pending.delete(internalTaskController); | |
| 1774 | + return [7 /*endfinally*/]; | |
| 1775 | + case 5: return [2 /*return*/]; | |
| 1776 | + } | |
| 1777 | + }); | |
| 1778 | + }); }; | |
| 1779 | + var clearListenerMiddleware = createClearListenerMiddleware(listenerMap); | |
| 1780 | + var middleware = function (api) { return function (next) { return function (action) { | |
| 1781 | + if (addListener.match(action)) { | |
| 1782 | + return startListening(action.payload); | |
| 1783 | + } | |
| 1784 | + if (clearAllListeners.match(action)) { | |
| 1785 | + clearListenerMiddleware(); | |
| 1786 | + return; | |
| 1787 | + } | |
| 1788 | + if (removeListener.match(action)) { | |
| 1789 | + return stopListening(action.payload); | |
| 1790 | + } | |
| 1791 | + var originalState = api.getState(); | |
| 1792 | + var getOriginalState = function () { | |
| 1793 | + if (originalState === INTERNAL_NIL_TOKEN) { | |
| 1794 | + throw new Error(alm + ": getOriginalState can only be called synchronously"); | |
| 1795 | + } | |
| 1796 | + return originalState; | |
| 1797 | + }; | |
| 1798 | + var result; | |
| 1799 | + try { | |
| 1800 | + result = next(action); | |
| 1801 | + if (listenerMap.size > 0) { | |
| 1802 | + var currentState = api.getState(); | |
| 1803 | + var listenerEntries = Array.from(listenerMap.values()); | |
| 1804 | + for (var _i = 0, listenerEntries_1 = listenerEntries; _i < listenerEntries_1.length; _i++) { | |
| 1805 | + var entry = listenerEntries_1[_i]; | |
| 1806 | + var runListener = false; | |
| 1807 | + try { | |
| 1808 | + runListener = entry.predicate(action, currentState, originalState); | |
| 1809 | + } | |
| 1810 | + catch (predicateError) { | |
| 1811 | + runListener = false; | |
| 1812 | + safelyNotifyError(onError, predicateError, { | |
| 1813 | + raisedBy: "predicate" | |
| 1814 | + }); | |
| 1815 | + } | |
| 1816 | + if (!runListener) { | |
| 1817 | + continue; | |
| 1818 | + } | |
| 1819 | + notifyListener(entry, action, api, getOriginalState); | |
| 1820 | + } | |
| 1821 | + } | |
| 1822 | + } | |
| 1823 | + finally { | |
| 1824 | + originalState = INTERNAL_NIL_TOKEN; | |
| 1825 | + } | |
| 1826 | + return result; | |
| 1827 | + }; }; }; | |
| 1828 | + return { | |
| 1829 | + middleware: middleware, | |
| 1830 | + startListening: startListening, | |
| 1831 | + stopListening: stopListening, | |
| 1832 | + clearListeners: clearListenerMiddleware | |
| 1833 | + }; | |
| 1834 | +} | |
| 1835 | +// src/index.ts | |
| 1836 | +(0,immer__WEBPACK_IMPORTED_MODULE_2__.enableES5)(); | |
| 1837 | + | |
| 1838 | +//# sourceMappingURL=redux-toolkit.esm.js.map | |
| 56 | 1839 | |
| 57 | -//#region node_modules/@babel/runtime/helpers/esm/classCallCheck.js | |
| 58 | - function _classCallCheck(a, n) { | |
| 59 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 60 | - } | |
| 1840 | +/***/ }), | |
| 61 | 1841 | |
| 62 | -//#endregion | |
| 63 | -//#region node_modules/@babel/runtime/helpers/esm/typeof.js | |
| 64 | - function _typeof(o) { | |
| 65 | - "@babel/helpers - typeof"; | |
| 66 | - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 67 | - return typeof o; | |
| 68 | - } : function(o) { | |
| 69 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 70 | - }, _typeof(o); | |
| 71 | - } | |
| 72 | - var init_typeof = __esmMin((() => {})); | |
| 1842 | +/***/ "../app/assets/js/loader/commands/close.js": | |
| 1843 | +/*!*************************************************!*\ | |
| 1844 | + !*** ../app/assets/js/loader/commands/close.js ***! | |
| 1845 | + \*************************************************/ | |
| 1846 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 73 | 1847 | |
| 74 | -//#endregion | |
| 75 | -//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js | |
| 76 | - init_typeof(); | |
| 77 | - function toPrimitive(t, r) { | |
| 78 | - if ("object" != _typeof(t) || !t) return t; | |
| 79 | - var e = t[Symbol.toPrimitive]; | |
| 80 | - if (void 0 !== e) { | |
| 81 | - var i = e.call(t, r || "default"); | |
| 82 | - if ("object" != _typeof(i)) return i; | |
| 83 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 84 | - } | |
| 85 | - return ("string" === r ? String : Number)(t); | |
| 86 | - } | |
| 1848 | +"use strict"; | |
| 87 | 1849 | |
| 88 | -//#endregion | |
| 89 | -//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js | |
| 90 | - init_typeof(); | |
| 91 | - function toPropertyKey(t) { | |
| 92 | - var i = toPrimitive(t, "string"); | |
| 93 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 94 | - } | |
| 95 | 1850 | |
| 96 | -//#endregion | |
| 97 | -//#region node_modules/@babel/runtime/helpers/esm/createClass.js | |
| 98 | - function _defineProperties(e, r) { | |
| 99 | - for (var t = 0; t < r.length; t++) { | |
| 100 | - var o = r[t]; | |
| 101 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 102 | - } | |
| 103 | - } | |
| 104 | - function _createClass(e, r, t) { | |
| 105 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; | |
| 106 | - } | |
| 1851 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1852 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1853 | + value: true | |
| 1854 | +})); | |
| 1855 | +exports["default"] = exports.Close = void 0; | |
| 1856 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1857 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1858 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1859 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1860 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1861 | +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); }; } | |
| 1862 | +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; } } | |
| 1863 | +var Close = /*#__PURE__*/function (_$e$modules$CommandBa) { | |
| 1864 | + (0, _inherits2.default)(Close, _$e$modules$CommandBa); | |
| 1865 | + var _super = _createSuper(Close); | |
| 1866 | + function Close() { | |
| 1867 | + (0, _classCallCheck2.default)(this, Close); | |
| 1868 | + return _super.apply(this, arguments); | |
| 1869 | + } | |
| 1870 | + (0, _createClass2.default)(Close, [{ | |
| 1871 | + key: "apply", | |
| 1872 | + value: function apply() { | |
| 1873 | + if (!this.component.close()) { | |
| 1874 | + return false; | |
| 1875 | + } | |
| 1876 | + this.component.iframe.remove(); | |
| 1877 | + this.component.iframe = null; | |
| 1878 | + return true; | |
| 1879 | + } | |
| 1880 | + }]); | |
| 1881 | + return Close; | |
| 1882 | +}($e.modules.CommandBase); | |
| 1883 | +exports.Close = Close; | |
| 1884 | +var _default = Close; | |
| 1885 | +exports["default"] = _default; | |
| 107 | 1886 | |
| 108 | -//#endregion | |
| 109 | -//#region node_modules/@babel/runtime/helpers/esm/defineProperty.js | |
| 110 | - function _defineProperty(e, r, t) { | |
| 111 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 112 | - value: t, | |
| 113 | - enumerable: !0, | |
| 114 | - configurable: !0, | |
| 115 | - writable: !0 | |
| 116 | - }) : e[r] = t, e; | |
| 117 | - } | |
| 1887 | +/***/ }), | |
| 118 | 1888 | |
| 119 | -//#endregion | |
| 120 | -//#region node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js | |
| 121 | - function _assertThisInitialized(e) { | |
| 122 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 123 | - return e; | |
| 124 | - } | |
| 1889 | +/***/ "../app/assets/js/loader/commands/index.js": | |
| 1890 | +/*!*************************************************!*\ | |
| 1891 | + !*** ../app/assets/js/loader/commands/index.js ***! | |
| 1892 | + \*************************************************/ | |
| 1893 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 125 | 1894 | |
| 126 | -//#endregion | |
| 127 | -//#region node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js | |
| 128 | - init_typeof(); | |
| 129 | - function _possibleConstructorReturn(t, e) { | |
| 130 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 131 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 132 | - return _assertThisInitialized(t); | |
| 133 | - } | |
| 1895 | +"use strict"; | |
| 134 | 1896 | |
| 135 | -//#endregion | |
| 136 | -//#region node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js | |
| 137 | - function _getPrototypeOf(t) { | |
| 138 | - return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { | |
| 139 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 140 | - }, _getPrototypeOf(t); | |
| 141 | - } | |
| 142 | 1897 | |
| 143 | -//#endregion | |
| 144 | -//#region node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js | |
| 145 | - function _setPrototypeOf(t, e) { | |
| 146 | - return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) { | |
| 147 | - return t.__proto__ = e, t; | |
| 148 | - }, _setPrototypeOf(t, e); | |
| 149 | - } | |
| 1898 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1899 | + value: true | |
| 1900 | +})); | |
| 1901 | +Object.defineProperty(exports, "Close", ({ | |
| 1902 | + enumerable: true, | |
| 1903 | + get: function get() { | |
| 1904 | + return _close.Close; | |
| 1905 | + } | |
| 1906 | +})); | |
| 1907 | +Object.defineProperty(exports, "Load", ({ | |
| 1908 | + enumerable: true, | |
| 1909 | + get: function get() { | |
| 1910 | + return _load.Load; | |
| 1911 | + } | |
| 1912 | +})); | |
| 1913 | +Object.defineProperty(exports, "Open", ({ | |
| 1914 | + enumerable: true, | |
| 1915 | + get: function get() { | |
| 1916 | + return _open.Open; | |
| 1917 | + } | |
| 1918 | +})); | |
| 1919 | +var _close = __webpack_require__(/*! ./close */ "../app/assets/js/loader/commands/close.js"); | |
| 1920 | +var _load = __webpack_require__(/*! ./load */ "../app/assets/js/loader/commands/load.js"); | |
| 1921 | +var _open = __webpack_require__(/*! ./open */ "../app/assets/js/loader/commands/open.js"); | |
| 150 | 1922 | |
| 151 | -//#endregion | |
| 152 | -//#region node_modules/@babel/runtime/helpers/esm/inherits.js | |
| 153 | - function _inherits(t, e) { | |
| 154 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 155 | - t.prototype = Object.create(e && e.prototype, { constructor: { | |
| 156 | - value: t, | |
| 157 | - writable: !0, | |
| 158 | - configurable: !0 | |
| 159 | - } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); | |
| 160 | - } | |
| 1923 | +/***/ }), | |
| 161 | 1924 | |
| 162 | -//#endregion | |
| 163 | -//#region node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js | |
| 164 | - function _arrayWithHoles(r) { | |
| 165 | - if (Array.isArray(r)) return r; | |
| 166 | - } | |
| 1925 | +/***/ "../app/assets/js/loader/commands/load.js": | |
| 1926 | +/*!************************************************!*\ | |
| 1927 | + !*** ../app/assets/js/loader/commands/load.js ***! | |
| 1928 | + \************************************************/ | |
| 1929 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 167 | 1930 | |
| 168 | -//#endregion | |
| 169 | -//#region node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js | |
| 170 | - function _iterableToArrayLimit(r, l) { | |
| 171 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 172 | - if (null != t) { | |
| 173 | - var e; | |
| 174 | - var n; | |
| 175 | - var i; | |
| 176 | - var u; | |
| 177 | - var a = []; | |
| 178 | - var f = !0; | |
| 179 | - var o = !1; | |
| 180 | - try { | |
| 181 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 182 | - if (Object(t) !== t) return; | |
| 183 | - f = !1; | |
| 184 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 185 | - } catch (r) { | |
| 186 | - o = !0, n = r; | |
| 187 | - } finally { | |
| 188 | - try { | |
| 189 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 190 | - } finally { | |
| 191 | - if (o) throw n; | |
| 192 | - } | |
| 193 | - } | |
| 194 | - return a; | |
| 195 | - } | |
| 196 | - } | |
| 1931 | +"use strict"; | |
| 197 | 1932 | |
| 198 | -//#endregion | |
| 199 | -//#region node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js | |
| 200 | - function _arrayLikeToArray$1(r, a) { | |
| 201 | - (null == a || a > r.length) && (a = r.length); | |
| 202 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 203 | - return n; | |
| 204 | - } | |
| 205 | - __name(_arrayLikeToArray$1, "_arrayLikeToArray"); | |
| 206 | 1933 | |
| 207 | -//#endregion | |
| 208 | -//#region node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js | |
| 209 | - function _unsupportedIterableToArray$1(r, a) { | |
| 210 | - if (r) { | |
| 211 | - if ("string" == typeof r) return _arrayLikeToArray$1(r, a); | |
| 212 | - var t = {}.toString.call(r).slice(8, -1); | |
| 213 | - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; | |
| 214 | - } | |
| 215 | - } | |
| 216 | - __name(_unsupportedIterableToArray$1, "_unsupportedIterableToArray"); | |
| 1934 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1935 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1936 | + value: true | |
| 1937 | +})); | |
| 1938 | +exports["default"] = exports.Load = void 0; | |
| 1939 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1940 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1941 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1942 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1943 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1944 | +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); }; } | |
| 1945 | +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; } } | |
| 1946 | +var Load = /*#__PURE__*/function (_$e$modules$CommandBa) { | |
| 1947 | + (0, _inherits2.default)(Load, _$e$modules$CommandBa); | |
| 1948 | + var _super = _createSuper(Load); | |
| 1949 | + function Load() { | |
| 1950 | + (0, _classCallCheck2.default)(this, Load); | |
| 1951 | + return _super.apply(this, arguments); | |
| 1952 | + } | |
| 1953 | + (0, _createClass2.default)(Load, [{ | |
| 1954 | + key: "apply", | |
| 1955 | + value: function apply(args) { | |
| 1956 | + var component = this.component; | |
| 1957 | + if (!component.iframe) { | |
| 1958 | + component.iframe = document.createElement('iframe'); | |
| 1959 | + component.iframe.className = 'elementor-app-iframe'; | |
| 1960 | + component.iframe.style.cssText = '' + 'display: none;' + 'width: 100%;' + 'height: 100%;' + 'position: fixed;' + 'top: 0;' + 'left: 0;' + 'z-index: 99999; /* Over WP Admin Bar */' + 'background-color: rgba(0, 0, 0, 0.8);'; | |
| 1961 | + document.body.appendChild(component.iframe); | |
| 1962 | + } | |
| 1963 | + if (args.url === component.iframe.src) { | |
| 1964 | + return; | |
| 1965 | + } | |
| 1966 | + component.iframe.src = args.url; | |
| 1967 | + } | |
| 1968 | + }]); | |
| 1969 | + return Load; | |
| 1970 | +}($e.modules.CommandBase); | |
| 1971 | +exports.Load = Load; | |
| 1972 | +var _default = Load; | |
| 1973 | +exports["default"] = _default; | |
| 217 | 1974 | |
| 218 | -//#endregion | |
| 219 | -//#region node_modules/@babel/runtime/helpers/esm/nonIterableRest.js | |
| 220 | - function _nonIterableRest() { | |
| 221 | - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 222 | - } | |
| 1975 | +/***/ }), | |
| 223 | 1976 | |
| 224 | -//#endregion | |
| 225 | -//#region node_modules/@babel/runtime/helpers/esm/slicedToArray.js | |
| 226 | - function _slicedToArray(r, e) { | |
| 227 | - return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$1(r, e) || _nonIterableRest(); | |
| 228 | - } | |
| 1977 | +/***/ "../app/assets/js/loader/commands/open.js": | |
| 1978 | +/*!************************************************!*\ | |
| 1979 | + !*** ../app/assets/js/loader/commands/open.js ***! | |
| 1980 | + \************************************************/ | |
| 1981 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 229 | 1982 | |
| 230 | -//#endregion | |
| 231 | -//#region node_modules/@babel/runtime/helpers/esm/superPropBase.js | |
| 232 | - function _superPropBase(t, o) { | |
| 233 | - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); | |
| 234 | - return t; | |
| 235 | - } | |
| 1983 | +"use strict"; | |
| 236 | 1984 | |
| 237 | -//#endregion | |
| 238 | -//#region node_modules/@babel/runtime/helpers/esm/get.js | |
| 239 | - function _get() { | |
| 240 | - return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function(e, t, r) { | |
| 241 | - var p = _superPropBase(e, t); | |
| 242 | - if (p) { | |
| 243 | - var n = Object.getOwnPropertyDescriptor(p, t); | |
| 244 | - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; | |
| 245 | - } | |
| 246 | - }, _get.apply(null, arguments); | |
| 247 | - } | |
| 248 | 1985 | |
| 249 | -//#endregion | |
| 250 | -//#region assets/dev/js/modules/imports/instance-type.js | |
| 251 | - function _superPropGet(t, o, e, r) { | |
| 252 | - var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); | |
| 253 | - return 2 & r && "function" == typeof p ? function(t) { | |
| 254 | - return p.apply(e, t); | |
| 255 | - } : p; | |
| 256 | - } | |
| 257 | - var InstanceType = /*#__PURE__*/ function() { | |
| 258 | - function InstanceType() { | |
| 259 | - var _this = this; | |
| 260 | - _classCallCheck(this, InstanceType); | |
| 261 | - var target = this instanceof InstanceType ? this.constructor : void 0; | |
| 262 | - var prototypes = []; | |
| 263 | - while (target.__proto__ && target.__proto__.name) { | |
| 264 | - prototypes.push(target.__proto__); | |
| 265 | - target = target.__proto__; | |
| 266 | - } | |
| 267 | - prototypes.reverse().forEach(function(proto) { | |
| 268 | - return _this instanceof proto; | |
| 269 | - }); | |
| 270 | - } | |
| 271 | - return _createClass(InstanceType, null, [{ | |
| 272 | - key: Symbol.hasInstance, | |
| 273 | - value: function value(target) { | |
| 274 | - /** | |
| 275 | - * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class | |
| 276 | - * its give's opportunity to mange capabilities of instanceOf operator. | |
| 277 | - * saving current class each time will give option later to handle instanceOf manually. | |
| 278 | - */ | |
| 279 | - var result = _superPropGet(InstanceType, Symbol.hasInstance, this, 2)([target]); | |
| 280 | - if (target && !target.constructor.getInstanceType) return result; | |
| 281 | - if (target) { | |
| 282 | - if (!target.instanceTypes) target.instanceTypes = []; | |
| 283 | - if (!result) { | |
| 284 | - if (this.getInstanceType() === target.constructor.getInstanceType()) result = true; | |
| 285 | - } | |
| 286 | - if (result) { | |
| 287 | - var name = this.getInstanceType === InstanceType.getInstanceType ? "BaseInstanceType" : this.getInstanceType(); | |
| 288 | - if (-1 === target.instanceTypes.indexOf(name)) target.instanceTypes.push(name); | |
| 289 | - } | |
| 290 | - } | |
| 291 | - if (!result && target) result = target.instanceTypes && Array.isArray(target.instanceTypes) && -1 !== target.instanceTypes.indexOf(this.getInstanceType()); | |
| 292 | - return result; | |
| 293 | - } | |
| 294 | - }, { | |
| 295 | - key: "getInstanceType", | |
| 296 | - value: function getInstanceType() { | |
| 297 | - elementorModules.ForceMethodImplementation(); | |
| 298 | - } | |
| 299 | - }]); | |
| 300 | - }(); | |
| 1986 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1987 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1988 | + value: true | |
| 1989 | +})); | |
| 1990 | +exports["default"] = exports.Open = void 0; | |
| 1991 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1992 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1993 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1994 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1995 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1996 | +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); }; } | |
| 1997 | +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; } } | |
| 1998 | +var Open = /*#__PURE__*/function (_$e$modules$CommandBa) { | |
| 1999 | + (0, _inherits2.default)(Open, _$e$modules$CommandBa); | |
| 2000 | + var _super = _createSuper(Open); | |
| 2001 | + function Open() { | |
| 2002 | + (0, _classCallCheck2.default)(this, Open); | |
| 2003 | + return _super.apply(this, arguments); | |
| 2004 | + } | |
| 2005 | + (0, _createClass2.default)(Open, [{ | |
| 2006 | + key: "apply", | |
| 2007 | + value: function apply(args) { | |
| 2008 | + $e.route('app', args); | |
| 2009 | + return true; | |
| 2010 | + } | |
| 2011 | + }]); | |
| 2012 | + return Open; | |
| 2013 | +}($e.modules.CommandBase); | |
| 2014 | +exports.Open = Open; | |
| 2015 | +var _default = Open; | |
| 2016 | +exports["default"] = _default; | |
| 301 | 2017 | |
| 302 | -//#endregion | |
| 303 | -//#region assets/dev/js/editor/utils/is-instanceof.js | |
| 304 | - function _createForOfIteratorHelper(r, e) { | |
| 305 | - var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 306 | - if (!t) { | |
| 307 | - if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { | |
| 308 | - t && (r = t); | |
| 309 | - var _n = 0; | |
| 310 | - var F = function F() {}; | |
| 311 | - return { | |
| 312 | - s: F, | |
| 313 | - n: function n() { | |
| 314 | - return _n >= r.length ? { done: !0 } : { | |
| 315 | - done: !1, | |
| 316 | - value: r[_n++] | |
| 317 | - }; | |
| 318 | - }, | |
| 319 | - e: function e(r) { | |
| 320 | - throw r; | |
| 321 | - }, | |
| 322 | - f: F | |
| 323 | - }; | |
| 324 | - } | |
| 325 | - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 326 | - } | |
| 327 | - var o; | |
| 328 | - var a = !0; | |
| 329 | - var u = !1; | |
| 330 | - return { | |
| 331 | - s: function s() { | |
| 332 | - t = t.call(r); | |
| 333 | - }, | |
| 334 | - n: function n() { | |
| 335 | - var r = t.next(); | |
| 336 | - return a = r.done, r; | |
| 337 | - }, | |
| 338 | - e: function e(r) { | |
| 339 | - u = !0, o = r; | |
| 340 | - }, | |
| 341 | - f: function f() { | |
| 342 | - try { | |
| 343 | - a || null == t.return || t.return(); | |
| 344 | - } finally { | |
| 345 | - if (u) throw o; | |
| 346 | - } | |
| 347 | - } | |
| 348 | - }; | |
| 349 | - } | |
| 350 | - function _unsupportedIterableToArray(r, a) { | |
| 351 | - if (r) { | |
| 352 | - if ("string" == typeof r) return _arrayLikeToArray(r, a); | |
| 353 | - var t = {}.toString.call(r).slice(8, -1); | |
| 354 | - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; | |
| 355 | - } | |
| 356 | - } | |
| 357 | - function _arrayLikeToArray(r, a) { | |
| 358 | - (null == a || a > r.length) && (a = r.length); | |
| 359 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 360 | - return n; | |
| 361 | - } | |
| 362 | - /** | |
| 363 | - * Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved | |
| 364 | - * object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can | |
| 365 | - * check whether it's instanceof by using the objects constructor and prototype names. | |
| 366 | - * | |
| 367 | - * @param object | |
| 368 | - * @param constructors | |
| 369 | - * @return {boolean} | |
| 370 | - */ | |
| 371 | - var is_instanceof_default = /* @__PURE__ */ __name((function(object, constructors) { | |
| 372 | - constructors = Array.isArray(constructors) ? constructors : [constructors]; | |
| 373 | - var _iterator = _createForOfIteratorHelper(constructors); | |
| 374 | - var _step; | |
| 375 | - try { | |
| 376 | - for (_iterator.s(); !(_step = _iterator.n()).done;) { | |
| 377 | - var constructor = _step.value; | |
| 378 | - if (object.constructor.name === constructor.prototype[Symbol.toStringTag]) return true; | |
| 379 | - } | |
| 380 | - } catch (err) { | |
| 381 | - _iterator.e(err); | |
| 382 | - } finally { | |
| 383 | - _iterator.f(); | |
| 384 | - } | |
| 385 | - return false; | |
| 386 | - }), "default"); | |
| 2018 | +/***/ }), | |
| 387 | 2019 | |
| 388 | -//#endregion | |
| 389 | -//#region assets/dev/js/modules/imports/args-object.js | |
| 390 | - init_typeof(); | |
| 391 | - function _callSuper$9(t, o, e) { | |
| 392 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$10() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 393 | - } | |
| 394 | - __name(_callSuper$9, "_callSuper"); | |
| 395 | - function _isNativeReflectConstruct$10() { | |
| 396 | - try { | |
| 397 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 398 | - } catch (t) {} | |
| 399 | - return (_isNativeReflectConstruct$10 = function _isNativeReflectConstruct() { | |
| 400 | - return !!t; | |
| 401 | - })(); | |
| 402 | - } | |
| 403 | - __name(_isNativeReflectConstruct$10, "_isNativeReflectConstruct"); | |
| 404 | - var ArgsObject = /*#__PURE__*/ function(_InstanceType) { | |
| 405 | - /** | |
| 406 | - * Function constructor(). | |
| 407 | - * | |
| 408 | - * Create ArgsObject. | |
| 409 | - * | |
| 410 | - * @param {{}} args | |
| 411 | - */ | |
| 412 | - function ArgsObject(args) { | |
| 413 | - var _this; | |
| 414 | - _classCallCheck(this, ArgsObject); | |
| 415 | - _this = _callSuper$9(this, ArgsObject); | |
| 416 | - _this.args = args; | |
| 417 | - return _this; | |
| 418 | - } | |
| 419 | - /** | |
| 420 | - * Function requireArgument(). | |
| 421 | - * | |
| 422 | - * Validate property in args. | |
| 423 | - * | |
| 424 | - * @param {string} property | |
| 425 | - * @param {{}} args | |
| 426 | - * | |
| 427 | - * @throws {Error} | |
| 428 | - */ | |
| 429 | - _inherits(ArgsObject, _InstanceType); | |
| 430 | - return _createClass(ArgsObject, [ | |
| 431 | - { | |
| 432 | - key: "requireArgument", | |
| 433 | - value: function requireArgument(property) { | |
| 434 | - var args = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.args; | |
| 435 | - if (!Object.prototype.hasOwnProperty.call(args, property)) throw Error("".concat(property, " is required.")); | |
| 436 | - } | |
| 437 | - }, | |
| 438 | - { | |
| 439 | - key: "requireArgumentType", | |
| 440 | - value: function requireArgumentType(property, type) { | |
| 441 | - var args = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.args; | |
| 442 | - this.requireArgument(property, args); | |
| 443 | - if (_typeof(args[property]) !== type) throw Error("".concat(property, " invalid type: ").concat(type, ".")); | |
| 444 | - } | |
| 445 | - }, | |
| 446 | - { | |
| 447 | - key: "requireArgumentInstance", | |
| 448 | - value: function requireArgumentInstance(property, instance) { | |
| 449 | - var args = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.args; | |
| 450 | - this.requireArgument(property, args); | |
| 451 | - if (!(args[property] instanceof instance) && !is_instanceof_default(args[property], instance)) throw Error("".concat(property, " invalid instance.")); | |
| 452 | - } | |
| 453 | - }, | |
| 454 | - { | |
| 455 | - key: "requireArgumentConstructor", | |
| 456 | - value: function requireArgumentConstructor(property, type) { | |
| 457 | - var args = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.args; | |
| 458 | - this.requireArgument(property, args); | |
| 459 | - if (args[property].constructor.toString() !== type.prototype.constructor.toString()) throw Error("".concat(property, " invalid constructor type.")); | |
| 460 | - } | |
| 461 | - } | |
| 462 | - ], [{ | |
| 463 | - key: "getInstanceType", | |
| 464 | - value: function getInstanceType() { | |
| 465 | - return "ArgsObject"; | |
| 466 | - } | |
| 467 | - }]); | |
| 468 | - }(InstanceType); | |
| 2020 | +/***/ "../app/assets/js/loader/component.js": | |
| 2021 | +/*!********************************************!*\ | |
| 2022 | + !*** ../app/assets/js/loader/component.js ***! | |
| 2023 | + \********************************************/ | |
| 2024 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 469 | 2025 | |
| 470 | -//#endregion | |
| 471 | -//#region modules/web-cli/assets/js/utils/console.js | |
| 472 | - var Console = /*#__PURE__*/ function() { | |
| 473 | - function Console() { | |
| 474 | - _classCallCheck(this, Console); | |
| 475 | - } | |
| 476 | - return _createClass(Console, null, [{ | |
| 477 | - key: "error", | |
| 478 | - value: function error(message) { | |
| 479 | - if ($e.devTools) $e.devTools.log.error(message); | |
| 480 | - if (!(message instanceof $e.modules.HookBreak)) console.error(message); | |
| 481 | - } | |
| 482 | - }, { | |
| 483 | - key: "warn", | |
| 484 | - value: function warn() { | |
| 485 | - var _console; | |
| 486 | - var style = "font-size: 12px; background-image: url(\"".concat(elementorWebCliConfig.urls.assets, "images/logo-icon.png\"); background-repeat: no-repeat; background-size: contain;"); | |
| 487 | - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; | |
| 488 | - args.unshift("%c %c", style, ""); | |
| 489 | - (_console = console).warn.apply(_console, args); | |
| 490 | - } | |
| 491 | - }]); | |
| 492 | - }(); | |
| 2026 | +"use strict"; | |
| 493 | 2027 | |
| 494 | -//#endregion | |
| 495 | -//#region modules/web-cli/assets/js/utils/deprecation.js | |
| 2028 | + | |
| 2029 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2030 | +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 2031 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2032 | + value: true | |
| 2033 | +})); | |
| 2034 | +exports["default"] = void 0; | |
| 2035 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2036 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2037 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2038 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2039 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2040 | +var _componentBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/component-base */ "../modules/web-cli/assets/js/modules/component-base.js")); | |
| 2041 | +var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../app/assets/js/loader/commands/index.js")); | |
| 2042 | +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); } | |
| 2043 | +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; } | |
| 2044 | +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); }; } | |
| 2045 | +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; } } | |
| 2046 | +var Component = /*#__PURE__*/function (_ComponentModalBase) { | |
| 2047 | + (0, _inherits2.default)(Component, _ComponentModalBase); | |
| 2048 | + var _super = _createSuper(Component); | |
| 2049 | + function Component() { | |
| 2050 | + (0, _classCallCheck2.default)(this, Component); | |
| 2051 | + return _super.apply(this, arguments); | |
| 2052 | + } | |
| 2053 | + (0, _createClass2.default)(Component, [{ | |
| 2054 | + key: "getNamespace", | |
| 2055 | + value: function getNamespace() { | |
| 2056 | + return 'app'; | |
| 2057 | + } | |
| 2058 | + }, { | |
| 2059 | + key: "defaultRoutes", | |
| 2060 | + value: function defaultRoutes() { | |
| 2061 | + var _this = this; | |
| 2062 | + return { | |
| 2063 | + '': function _(args) { | |
| 2064 | + args.url = args.url || elementorAppConfig.menu_url; | |
| 2065 | + $e.run('app/load', args); | |
| 2066 | + _this.iframe.style.display = ''; | |
| 2067 | + document.body.style.overflow = 'hidden'; | |
| 2068 | + } | |
| 2069 | + }; | |
| 2070 | + } | |
| 2071 | + }, { | |
| 2072 | + key: "defaultCommands", | |
| 2073 | + value: function defaultCommands() { | |
| 2074 | + return this.importCommands(commands); | |
| 2075 | + } | |
| 2076 | + }, { | |
| 2077 | + key: "defaultShortcuts", | |
| 2078 | + value: function defaultShortcuts() { | |
| 2079 | + return { | |
| 2080 | + '': { | |
| 2081 | + keys: 'ctrl+shift+e' | |
| 2082 | + }, | |
| 2083 | + close: { | |
| 2084 | + keys: 'esc', | |
| 2085 | + scopes: [this.getNamespace()] | |
| 2086 | + } | |
| 2087 | + }; | |
| 2088 | + } | |
| 2089 | + }]); | |
| 2090 | + return Component; | |
| 2091 | +}(_componentBase.default); | |
| 2092 | +exports["default"] = Component; | |
| 2093 | + | |
| 2094 | +/***/ }), | |
| 2095 | + | |
| 2096 | +/***/ "../assets/dev/js/editor/utils/is-instanceof.js": | |
| 2097 | +/*!******************************************************!*\ | |
| 2098 | + !*** ../assets/dev/js/editor/utils/is-instanceof.js ***! | |
| 2099 | + \******************************************************/ | |
| 2100 | +/***/ ((__unused_webpack_module, exports) => { | |
| 2101 | + | |
| 2102 | +"use strict"; | |
| 2103 | + | |
| 2104 | + | |
| 2105 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2106 | + value: true | |
| 2107 | +})); | |
| 2108 | +exports["default"] = void 0; | |
| 2109 | +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; } } }; } | |
| 2110 | +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); } | |
| 2111 | +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; } | |
| 496 | 2112 | /** |
| 497 | - * @typedef {Object} Version | |
| 498 | - * @property {number} major1 The first number | |
| 499 | - * @property {number} major2 The second number | |
| 500 | - * @property {number} minor The third number | |
| 501 | - * @property {string} build The fourth number | |
| 502 | - */ | |
| 503 | - var softDeprecated = function softDeprecated(name, version, replacement) { | |
| 504 | - if (elementorWebCliConfig.isDebug) deprecatedMessage("soft", name, version, replacement); | |
| 505 | - }; | |
| 506 | - var hardDeprecated = function hardDeprecated(name, version, replacement) { | |
| 507 | - deprecatedMessage("hard", name, version, replacement); | |
| 508 | - }; | |
| 509 | - var deprecatedMessage = function deprecatedMessage(type, name, version, replacement) { | |
| 510 | - var message = "`".concat(name, "` is ").concat(type, " deprecated since ").concat(version); | |
| 511 | - if (replacement) message += " - Use `".concat(replacement, "` instead"); | |
| 512 | - Console.warn(message); | |
| 513 | - }; | |
| 514 | - var Deprecation = /*#__PURE__*/ function() { | |
| 515 | - function Deprecation() { | |
| 516 | - _classCallCheck(this, Deprecation); | |
| 517 | - } | |
| 518 | - return _createClass(Deprecation, null, [ | |
| 519 | - { | |
| 520 | - key: "deprecated", | |
| 521 | - value: function deprecated(name, version, replacement) { | |
| 522 | - if (this.isHardDeprecated(version)) hardDeprecated(name, version, replacement); | |
| 523 | - else softDeprecated(name, version, replacement); | |
| 524 | - } | |
| 525 | - }, | |
| 526 | - { | |
| 527 | - key: "parseVersion", | |
| 528 | - value: function parseVersion(version) { | |
| 529 | - var versionParts = version.split("."); | |
| 530 | - if (versionParts.length < 3 || versionParts.length > 4) throw new RangeError("Invalid Semantic Version string provided"); | |
| 531 | - var _versionParts = _slicedToArray(versionParts, 4); | |
| 532 | - var major1 = _versionParts[0]; | |
| 533 | - var major2 = _versionParts[1]; | |
| 534 | - var minor = _versionParts[2]; | |
| 535 | - var _versionParts$ = _versionParts[3]; | |
| 536 | - return { | |
| 537 | - major1: parseInt(major1), | |
| 538 | - major2: parseInt(major2), | |
| 539 | - minor: parseInt(minor), | |
| 540 | - build: _versionParts$ === void 0 ? "" : _versionParts$ | |
| 541 | - }; | |
| 542 | - } | |
| 543 | - }, | |
| 544 | - { | |
| 545 | - key: "getTotalMajor", | |
| 546 | - value: function getTotalMajor(versionObj) { | |
| 547 | - var total = parseInt("".concat(versionObj.major1).concat(versionObj.major2, "0")); | |
| 548 | - total = Number((total / 10).toFixed(0)); | |
| 549 | - if (versionObj.major2 > 9) total = versionObj.major2 - 9; | |
| 550 | - return total; | |
| 551 | - } | |
| 552 | - }, | |
| 553 | - { | |
| 554 | - key: "compareVersion", | |
| 555 | - value: function compareVersion(version1, version2) { | |
| 556 | - var _this = this; | |
| 557 | - return [this.parseVersion(version1), this.parseVersion(version2)].map(function(versionObj) { | |
| 558 | - return _this.getTotalMajor(versionObj); | |
| 559 | - }).reduce(function(acc, major) { | |
| 560 | - return acc - major; | |
| 561 | - }); | |
| 562 | - } | |
| 563 | - }, | |
| 564 | - { | |
| 565 | - key: "isSoftDeprecated", | |
| 566 | - value: function isSoftDeprecated(version) { | |
| 567 | - return this.compareVersion(version, elementorWebCliConfig.version) <= 4; | |
| 568 | - } | |
| 569 | - }, | |
| 570 | - { | |
| 571 | - key: "isHardDeprecated", | |
| 572 | - value: function isHardDeprecated(version) { | |
| 573 | - var total = this.compareVersion(version, elementorWebCliConfig.version); | |
| 574 | - return total < 0 || total >= 8; | |
| 575 | - } | |
| 576 | - } | |
| 577 | - ]); | |
| 578 | - }(); | |
| 2113 | + * Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved | |
| 2114 | + * object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can | |
| 2115 | + * check whether it's instanceof by using the objects constructor and prototype names. | |
| 2116 | + * | |
| 2117 | + * @param object | |
| 2118 | + * @param constructors | |
| 2119 | + * @return {boolean} | |
| 2120 | + */ | |
| 2121 | +var _default = function _default(object, constructors) { | |
| 2122 | + constructors = Array.isArray(constructors) ? constructors : [constructors]; | |
| 2123 | + var _iterator = _createForOfIteratorHelper(constructors), | |
| 2124 | + _step; | |
| 2125 | + try { | |
| 2126 | + for (_iterator.s(); !(_step = _iterator.n()).done;) { | |
| 2127 | + var _constructor = _step.value; | |
| 2128 | + if (object.constructor.name === _constructor.prototype[Symbol.toStringTag]) { | |
| 2129 | + return true; | |
| 2130 | + } | |
| 2131 | + } | |
| 2132 | + } catch (err) { | |
| 2133 | + _iterator.e(err); | |
| 2134 | + } finally { | |
| 2135 | + _iterator.f(); | |
| 2136 | + } | |
| 2137 | + return false; | |
| 2138 | +}; | |
| 2139 | +exports["default"] = _default; | |
| 579 | 2140 | |
| 580 | -//#endregion | |
| 581 | -//#region modules/web-cli/assets/js/modules/command-infra.js | |
| 582 | - function _callSuper$8(t, o, e) { | |
| 583 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$9() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 584 | - } | |
| 585 | - __name(_callSuper$8, "_callSuper"); | |
| 586 | - function _isNativeReflectConstruct$9() { | |
| 587 | - try { | |
| 588 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 589 | - } catch (t) {} | |
| 590 | - return (_isNativeReflectConstruct$9 = function _isNativeReflectConstruct() { | |
| 591 | - return !!t; | |
| 592 | - })(); | |
| 593 | - } | |
| 594 | - __name(_isNativeReflectConstruct$9, "_isNativeReflectConstruct"); | |
| 595 | - /** | |
| 596 | - * @typedef {import('../modules/component-base')} ComponentBase | |
| 597 | - */ | |
| 598 | - var CommandInfra = /*#__PURE__*/ function(_ArgsObject) { | |
| 599 | - /** | |
| 600 | - * Function constructor(). | |
| 601 | - * | |
| 602 | - * Create Commands Base. | |
| 603 | - * | |
| 604 | - * @param {{}} args | |
| 605 | - */ | |
| 606 | - function CommandInfra() { | |
| 607 | - var _this; | |
| 608 | - var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 609 | - _classCallCheck(this, CommandInfra); | |
| 610 | - _this = _callSuper$8(this, CommandInfra, [args]); | |
| 611 | - if (!_this.constructor.registerConfig) throw RangeError("Doing it wrong: Each command type should have `registerConfig`."); | |
| 612 | - _this.command = _this.constructor.getCommand(); | |
| 613 | - _this.component = _this.constructor.getComponent(); | |
| 614 | - _this.initialize(args); | |
| 615 | - args = _this.args; | |
| 616 | - _this.validateArgs(args); | |
| 617 | - return _this; | |
| 618 | - } | |
| 619 | - /** | |
| 620 | - * Function initialize(). | |
| 621 | - * | |
| 622 | - * Initialize command, called after construction. | |
| 623 | - * | |
| 624 | - * @param {{}} args | |
| 625 | - */ | |
| 626 | - _inherits(CommandInfra, _ArgsObject); | |
| 627 | - return _createClass(CommandInfra, [ | |
| 628 | - { | |
| 629 | - key: "currentCommand", | |
| 630 | - get: function get() { | |
| 631 | - Deprecation.deprecated("this.currentCommand", "3.7.0", "this.command"); | |
| 632 | - return this.command; | |
| 633 | - } | |
| 634 | - }, | |
| 635 | - { | |
| 636 | - key: "initialize", | |
| 637 | - value: function initialize() { | |
| 638 | - arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; | |
| 639 | - } | |
| 640 | - }, | |
| 641 | - { | |
| 642 | - key: "validateArgs", | |
| 643 | - value: function validateArgs() { | |
| 644 | - arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; | |
| 645 | - } | |
| 646 | - }, | |
| 647 | - { | |
| 648 | - key: "apply", | |
| 649 | - value: function apply() { | |
| 650 | - arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; | |
| 651 | - elementorModules.ForceMethodImplementation(); | |
| 652 | - } | |
| 653 | - }, | |
| 654 | - { | |
| 655 | - key: "run", | |
| 656 | - value: function run() { | |
| 657 | - return this.apply(this.args); | |
| 658 | - } | |
| 659 | - }, | |
| 660 | - { | |
| 661 | - key: "onBeforeRun", | |
| 662 | - value: function onBeforeRun() { | |
| 663 | - arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; | |
| 664 | - } | |
| 665 | - }, | |
| 666 | - { | |
| 667 | - key: "onAfterRun", | |
| 668 | - value: function onAfterRun() { | |
| 669 | - arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; | |
| 670 | - arguments.length > 1 && arguments[1]; | |
| 671 | - } | |
| 672 | - }, | |
| 673 | - { | |
| 674 | - key: "onBeforeApply", | |
| 675 | - value: function onBeforeApply() { | |
| 676 | - arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; | |
| 677 | - } | |
| 678 | - }, | |
| 679 | - { | |
| 680 | - key: "onAfterApply", | |
| 681 | - value: function onAfterApply() { | |
| 682 | - arguments.length > 0 && arguments[0] !== void 0 && arguments[0]; | |
| 683 | - arguments.length > 1 && arguments[1]; | |
| 684 | - } | |
| 685 | - }, | |
| 686 | - { | |
| 687 | - key: "onCatchApply", | |
| 688 | - value: function onCatchApply(e) {} | |
| 689 | - } | |
| 690 | - ], [ | |
| 691 | - { | |
| 692 | - key: "getInstanceType", | |
| 693 | - value: function getInstanceType() { | |
| 694 | - return "CommandInfra"; | |
| 695 | - } | |
| 696 | - }, | |
| 697 | - { | |
| 698 | - key: "getInfo", | |
| 699 | - value: function getInfo() { | |
| 700 | - return {}; | |
| 701 | - } | |
| 702 | - }, | |
| 703 | - { | |
| 704 | - key: "getCommand", | |
| 705 | - value: function getCommand() { | |
| 706 | - return this.registerConfig.command; | |
| 707 | - } | |
| 708 | - }, | |
| 709 | - { | |
| 710 | - key: "getComponent", | |
| 711 | - value: function getComponent() { | |
| 712 | - return this.registerConfig.component; | |
| 713 | - } | |
| 714 | - }, | |
| 715 | - { | |
| 716 | - key: "setRegisterConfig", | |
| 717 | - value: function setRegisterConfig(config) { | |
| 718 | - this.registerConfig = Object.freeze(config); | |
| 719 | - } | |
| 720 | - } | |
| 721 | - ]); | |
| 722 | - }(ArgsObject); | |
| 723 | - /** | |
| 724 | - * @type {Object} | |
| 725 | - */ | |
| 726 | - _defineProperty(CommandInfra, "registerConfig", null); | |
| 2141 | +/***/ }), | |
| 727 | 2142 | |
| 728 | -//#endregion | |
| 729 | -//#region modules/web-cli/assets/js/modules/command-base.js | |
| 730 | - function _callSuper$7(t, o, e) { | |
| 731 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$8() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 732 | - } | |
| 733 | - __name(_callSuper$7, "_callSuper"); | |
| 734 | - function _isNativeReflectConstruct$8() { | |
| 735 | - try { | |
| 736 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 737 | - } catch (t) {} | |
| 738 | - return (_isNativeReflectConstruct$8 = function _isNativeReflectConstruct() { | |
| 739 | - return !!t; | |
| 740 | - })(); | |
| 741 | - } | |
| 742 | - __name(_isNativeReflectConstruct$8, "_isNativeReflectConstruct"); | |
| 743 | - /** | |
| 744 | - * @name $e.modules.CommandBase | |
| 745 | - */ | |
| 746 | - var CommandBase = /*#__PURE__*/ function(_CommandInfra) { | |
| 747 | - function CommandBase() { | |
| 748 | - _classCallCheck(this, CommandBase); | |
| 749 | - return _callSuper$7(this, CommandBase, arguments); | |
| 750 | - } | |
| 751 | - _inherits(CommandBase, _CommandInfra); | |
| 752 | - return _createClass(CommandBase, [ | |
| 753 | - { | |
| 754 | - key: "onBeforeRun", | |
| 755 | - value: function onBeforeRun() { | |
| 756 | - var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 757 | - $e.hooks.runUIBefore(this.command, args); | |
| 758 | - } | |
| 759 | - }, | |
| 760 | - { | |
| 761 | - key: "onAfterRun", | |
| 762 | - value: function onAfterRun() { | |
| 763 | - var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 764 | - var result = arguments.length > 1 ? arguments[1] : void 0; | |
| 765 | - $e.hooks.runUIAfter(this.command, args, result); | |
| 766 | - } | |
| 767 | - }, | |
| 768 | - { | |
| 769 | - key: "onBeforeApply", | |
| 770 | - value: function onBeforeApply() { | |
| 771 | - var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 772 | - $e.hooks.runDataDependency(this.command, args); | |
| 773 | - } | |
| 774 | - }, | |
| 775 | - { | |
| 776 | - key: "onAfterApply", | |
| 777 | - value: function onAfterApply() { | |
| 778 | - var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 779 | - var result = arguments.length > 1 ? arguments[1] : void 0; | |
| 780 | - return $e.hooks.runDataAfter(this.command, args, result); | |
| 781 | - } | |
| 782 | - }, | |
| 783 | - { | |
| 784 | - key: "onCatchApply", | |
| 785 | - value: function onCatchApply(e) { | |
| 786 | - this.runCatchHooks(e); | |
| 787 | - } | |
| 788 | - }, | |
| 789 | - { | |
| 790 | - key: "runCatchHooks", | |
| 791 | - value: function runCatchHooks(e) { | |
| 792 | - $e.hooks.runDataCatch(this.command, this.args, e); | |
| 793 | - $e.hooks.runUICatch(this.command, this.args, e); | |
| 794 | - } | |
| 795 | - }, | |
| 796 | - { | |
| 797 | - key: "requireContainer", | |
| 798 | - value: function requireContainer() { | |
| 799 | - var _this = this; | |
| 800 | - var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.args; | |
| 801 | - Deprecation.deprecated("requireContainer()", "3.7.0", "Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`"); | |
| 802 | - if (!args.container && !args.containers) throw Error("container or containers are required."); | |
| 803 | - if (args.container && args.containers) throw Error("container and containers cannot go together please select one of them."); | |
| 804 | - (args.containers || [args.container]).forEach(function(container) { | |
| 805 | - _this.requireArgumentInstance("container", elementorModules.editor.Container, { container }); | |
| 806 | - }); | |
| 807 | - } | |
| 808 | - } | |
| 809 | - ], [{ | |
| 810 | - key: "getInstanceType", | |
| 811 | - value: function getInstanceType() { | |
| 812 | - return "CommandBase"; | |
| 813 | - } | |
| 814 | - }]); | |
| 815 | - }(CommandInfra); | |
| 2143 | +/***/ "../assets/dev/js/modules/imports/args-object.js": | |
| 2144 | +/*!*******************************************************!*\ | |
| 2145 | + !*** ../assets/dev/js/modules/imports/args-object.js ***! | |
| 2146 | + \*******************************************************/ | |
| 2147 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 816 | 2148 | |
| 817 | -//#endregion | |
| 818 | -//#region modules/web-cli/assets/js/modules/command-callback-base.js | |
| 819 | - function _callSuper$6(t, o, e) { | |
| 820 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$7() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 821 | - } | |
| 822 | - __name(_callSuper$6, "_callSuper"); | |
| 823 | - function _isNativeReflectConstruct$7() { | |
| 824 | - try { | |
| 825 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 826 | - } catch (t) {} | |
| 827 | - return (_isNativeReflectConstruct$7 = function _isNativeReflectConstruct() { | |
| 828 | - return !!t; | |
| 829 | - })(); | |
| 830 | - } | |
| 831 | - __name(_isNativeReflectConstruct$7, "_isNativeReflectConstruct"); | |
| 832 | - /** | |
| 833 | - * To support pure callbacks in the API(commands.js), to ensure they have registered with the proper context. | |
| 834 | - */ | |
| 835 | - var CommandCallbackBase = /*#__PURE__*/ function(_CommandBase) { | |
| 836 | - function CommandCallbackBase() { | |
| 837 | - _classCallCheck(this, CommandCallbackBase); | |
| 838 | - return _callSuper$6(this, CommandCallbackBase, arguments); | |
| 839 | - } | |
| 840 | - _inherits(CommandCallbackBase, _CommandBase); | |
| 841 | - return _createClass(CommandCallbackBase, [{ | |
| 842 | - key: "apply", | |
| 843 | - value: function apply() { | |
| 844 | - var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 845 | - return this.constructor.getCallback()(args); | |
| 846 | - } | |
| 847 | - }], [{ | |
| 848 | - key: "getInstanceType", | |
| 849 | - value: function getInstanceType() { | |
| 850 | - return "CommandCallbackBase"; | |
| 851 | - } | |
| 852 | - }, { | |
| 853 | - key: "getCallback", | |
| 854 | - value: function getCallback() { | |
| 855 | - return this.registerConfig.callback; | |
| 856 | - } | |
| 857 | - }]); | |
| 858 | - }(CommandBase); | |
| 2149 | +"use strict"; | |
| 859 | 2150 | |
| 860 | -//#endregion | |
| 861 | -//#region assets/dev/js/modules/imports/module.js | |
| 862 | - var require_module = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 863 | - init_typeof(); | |
| 864 | - var Module = function Module() { | |
| 865 | - var $ = jQuery; | |
| 866 | - var instanceParams = arguments; | |
| 867 | - var self = this; | |
| 868 | - var events = {}; | |
| 869 | - var settings; | |
| 870 | - var ensureClosureMethods = function ensureClosureMethods() { | |
| 871 | - $.each(self, function(methodName) { | |
| 872 | - var oldMethod = self[methodName]; | |
| 873 | - if ("function" !== typeof oldMethod) return; | |
| 874 | - self[methodName] = function() { | |
| 875 | - return oldMethod.apply(self, arguments); | |
| 876 | - }; | |
| 877 | - }); | |
| 878 | - }; | |
| 879 | - var initSettings = function initSettings() { | |
| 880 | - settings = self.getDefaultSettings(); | |
| 881 | - var instanceSettings = instanceParams[0]; | |
| 882 | - if (instanceSettings) $.extend(true, settings, instanceSettings); | |
| 883 | - }; | |
| 884 | - var init = function init() { | |
| 885 | - self.__construct.apply(self, instanceParams); | |
| 886 | - ensureClosureMethods(); | |
| 887 | - initSettings(); | |
| 888 | - self.trigger("init"); | |
| 889 | - }; | |
| 890 | - this.getItems = function(items, itemKey) { | |
| 891 | - if (itemKey) { | |
| 892 | - var keyStack = itemKey.split("."); | |
| 893 | - var currentKey = keyStack.splice(0, 1); | |
| 894 | - if (!keyStack.length) return items[currentKey]; | |
| 895 | - if (!items[currentKey]) return; | |
| 896 | - return this.getItems(items[currentKey], keyStack.join(".")); | |
| 897 | - } | |
| 898 | - return items; | |
| 899 | - }; | |
| 900 | - this.getSettings = function(setting) { | |
| 901 | - return this.getItems(settings, setting); | |
| 902 | - }; | |
| 903 | - this.setSettings = function(settingKey, value, settingsContainer) { | |
| 904 | - if (!settingsContainer) settingsContainer = settings; | |
| 905 | - if ("object" === _typeof(settingKey)) { | |
| 906 | - $.extend(settingsContainer, settingKey); | |
| 907 | - return self; | |
| 908 | - } | |
| 909 | - var keyStack = settingKey.split("."); | |
| 910 | - var currentKey = keyStack.splice(0, 1); | |
| 911 | - if (!keyStack.length) { | |
| 912 | - settingsContainer[currentKey] = value; | |
| 913 | - return self; | |
| 914 | - } | |
| 915 | - if (!settingsContainer[currentKey]) settingsContainer[currentKey] = {}; | |
| 916 | - return self.setSettings(keyStack.join("."), value, settingsContainer[currentKey]); | |
| 917 | - }; | |
| 918 | - this.getErrorMessage = function(type, functionName) { | |
| 919 | - var message; | |
| 920 | - switch (type) { | |
| 921 | - case "forceMethodImplementation": | |
| 922 | - message = "The method '".concat(functionName, "' must to be implemented in the inheritor child."); | |
| 923 | - break; | |
| 924 | - default: message = "An error occurs"; | |
| 925 | - } | |
| 926 | - return message; | |
| 927 | - }; | |
| 928 | - this.forceMethodImplementation = function(functionName) { | |
| 929 | - throw new Error(this.getErrorMessage("forceMethodImplementation", functionName)); | |
| 930 | - }; | |
| 931 | - this.on = function(eventName, callback) { | |
| 932 | - if ("object" === _typeof(eventName)) { | |
| 933 | - $.each(eventName, function(singleEventName) { | |
| 934 | - self.on(singleEventName, this); | |
| 935 | - }); | |
| 936 | - return self; | |
| 937 | - } | |
| 938 | - eventName.split(" ").forEach(function(singleEventName) { | |
| 939 | - if (!events[singleEventName]) events[singleEventName] = []; | |
| 940 | - events[singleEventName].push(callback); | |
| 941 | - }); | |
| 942 | - return self; | |
| 943 | - }; | |
| 944 | - this.off = function(eventName, callback) { | |
| 945 | - if (!events[eventName]) return self; | |
| 946 | - if (!callback) { | |
| 947 | - delete events[eventName]; | |
| 948 | - return self; | |
| 949 | - } | |
| 950 | - var callbackIndex = events[eventName].indexOf(callback); | |
| 951 | - if (-1 !== callbackIndex) { | |
| 952 | - delete events[eventName][callbackIndex]; | |
| 953 | - events[eventName] = events[eventName].filter(function(val) { | |
| 954 | - return val; | |
| 955 | - }); | |
| 956 | - } | |
| 957 | - return self; | |
| 958 | - }; | |
| 959 | - this.trigger = function(eventName) { | |
| 960 | - var methodName = "on" + eventName[0].toUpperCase() + eventName.slice(1); | |
| 961 | - var params = Array.prototype.slice.call(arguments, 1); | |
| 962 | - if (self[methodName]) self[methodName].apply(self, params); | |
| 963 | - var callbacks = events[eventName]; | |
| 964 | - if (!callbacks) return self; | |
| 965 | - $.each(callbacks, function(index, callback) { | |
| 966 | - callback.apply(self, params); | |
| 967 | - }); | |
| 968 | - return self; | |
| 969 | - }; | |
| 970 | - init(); | |
| 971 | - }; | |
| 972 | - Module.prototype.__construct = function() {}; | |
| 973 | - Module.prototype.getDefaultSettings = function() { | |
| 974 | - return {}; | |
| 975 | - }; | |
| 976 | - Module.prototype.getConstructorID = function() { | |
| 977 | - return this.constructor.name; | |
| 978 | - }; | |
| 979 | - Module.extend = function(properties) { | |
| 980 | - var $ = jQuery; | |
| 981 | - var parent = this; | |
| 982 | - var child = function child() { | |
| 983 | - return parent.apply(this, arguments); | |
| 984 | - }; | |
| 985 | - $.extend(child, parent); | |
| 986 | - child.prototype = Object.create($.extend({}, parent.prototype, properties)); | |
| 987 | - child.prototype.constructor = child; | |
| 988 | - child.__super__ = parent.prototype; | |
| 989 | - return child; | |
| 990 | - }; | |
| 991 | - module.exports = Module; | |
| 992 | - })); | |
| 993 | 2151 | |
| 994 | -//#endregion | |
| 995 | -//#region node_modules/@babel/runtime/helpers/esm/isNativeFunction.js | |
| 996 | -var import_module = /* @__PURE__ */ __toESM(require_module()); | |
| 997 | - function _isNativeFunction(t) { | |
| 998 | - try { | |
| 999 | - return -1 !== Function.toString.call(t).indexOf("[native code]"); | |
| 1000 | - } catch (n) { | |
| 1001 | - return "function" == typeof t; | |
| 1002 | - } | |
| 1003 | - } | |
| 2152 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2153 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2154 | + value: true | |
| 2155 | +})); | |
| 2156 | +exports["default"] = void 0; | |
| 2157 | +var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js")); | |
| 2158 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2159 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2160 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2161 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2162 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2163 | +var _instanceType = _interopRequireDefault(__webpack_require__(/*! ./instance-type */ "../assets/dev/js/modules/imports/instance-type.js")); | |
| 2164 | +var _isInstanceof = _interopRequireDefault(__webpack_require__(/*! ../../editor/utils/is-instanceof */ "../assets/dev/js/editor/utils/is-instanceof.js")); | |
| 2165 | +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); }; } | |
| 2166 | +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; } } | |
| 2167 | +var ArgsObject = /*#__PURE__*/function (_InstanceType) { | |
| 2168 | + (0, _inherits2.default)(ArgsObject, _InstanceType); | |
| 2169 | + var _super = _createSuper(ArgsObject); | |
| 2170 | + /** | |
| 2171 | + * Function constructor(). | |
| 2172 | + * | |
| 2173 | + * Create ArgsObject. | |
| 2174 | + * | |
| 2175 | + * @param {{}} args | |
| 2176 | + */ | |
| 2177 | + function ArgsObject(args) { | |
| 2178 | + var _this; | |
| 2179 | + (0, _classCallCheck2.default)(this, ArgsObject); | |
| 2180 | + _this = _super.call(this); | |
| 2181 | + _this.args = args; | |
| 2182 | + return _this; | |
| 2183 | + } | |
| 1004 | 2184 | |
| 1005 | -//#endregion | |
| 1006 | -//#region node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js | |
| 1007 | - function _isNativeReflectConstruct$6() { | |
| 1008 | - try { | |
| 1009 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1010 | - } catch (t) {} | |
| 1011 | - return (_isNativeReflectConstruct$6 = function _isNativeReflectConstruct() { | |
| 1012 | - return !!t; | |
| 1013 | - })(); | |
| 1014 | - } | |
| 1015 | - __name(_isNativeReflectConstruct$6, "_isNativeReflectConstruct"); | |
| 2185 | + /** | |
| 2186 | + * Function requireArgument(). | |
| 2187 | + * | |
| 2188 | + * Validate property in args. | |
| 2189 | + * | |
| 2190 | + * @param {string} property | |
| 2191 | + * @param {{}} args | |
| 2192 | + * | |
| 2193 | + * @throws {Error} | |
| 2194 | + * | |
| 2195 | + */ | |
| 2196 | + (0, _createClass2.default)(ArgsObject, [{ | |
| 2197 | + key: "requireArgument", | |
| 2198 | + value: function requireArgument(property) { | |
| 2199 | + var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.args; | |
| 2200 | + if (!Object.prototype.hasOwnProperty.call(args, property)) { | |
| 2201 | + throw Error("".concat(property, " is required.")); | |
| 2202 | + } | |
| 2203 | + } | |
| 1016 | 2204 | |
| 1017 | -//#endregion | |
| 1018 | -//#region node_modules/@babel/runtime/helpers/esm/construct.js | |
| 1019 | - function _construct(t, e, r) { | |
| 1020 | - if (_isNativeReflectConstruct$6()) return Reflect.construct.apply(null, arguments); | |
| 1021 | - var o = [null]; | |
| 1022 | - o.push.apply(o, e); | |
| 1023 | - var p = new (t.bind.apply(t, o))(); | |
| 1024 | - return r && _setPrototypeOf(p, r.prototype), p; | |
| 1025 | - } | |
| 2205 | + /** | |
| 2206 | + * Function requireArgumentType(). | |
| 2207 | + * | |
| 2208 | + * Validate property in args using `type === typeof(args.whatever)`. | |
| 2209 | + * | |
| 2210 | + * @param {string} property | |
| 2211 | + * @param {string} type | |
| 2212 | + * @param {{}} args | |
| 2213 | + * | |
| 2214 | + * @throws {Error} | |
| 2215 | + * | |
| 2216 | + */ | |
| 2217 | + }, { | |
| 2218 | + key: "requireArgumentType", | |
| 2219 | + value: function requireArgumentType(property, type) { | |
| 2220 | + var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args; | |
| 2221 | + this.requireArgument(property, args); | |
| 2222 | + if ((0, _typeof2.default)(args[property]) !== type) { | |
| 2223 | + throw Error("".concat(property, " invalid type: ").concat(type, ".")); | |
| 2224 | + } | |
| 2225 | + } | |
| 1026 | 2226 | |
| 1027 | -//#endregion | |
| 1028 | -//#region node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js | |
| 1029 | - function _wrapNativeSuper(t) { | |
| 1030 | - var r = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0; | |
| 1031 | - return _wrapNativeSuper = function _wrapNativeSuper(t) { | |
| 1032 | - if (null === t || !_isNativeFunction(t)) return t; | |
| 1033 | - if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); | |
| 1034 | - if (void 0 !== r) { | |
| 1035 | - if (r.has(t)) return r.get(t); | |
| 1036 | - r.set(t, Wrapper); | |
| 1037 | - } | |
| 1038 | - function Wrapper() { | |
| 1039 | - return _construct(t, arguments, _getPrototypeOf(this).constructor); | |
| 1040 | - } | |
| 1041 | - return Wrapper.prototype = Object.create(t.prototype, { constructor: { | |
| 1042 | - value: Wrapper, | |
| 1043 | - enumerable: !1, | |
| 1044 | - writable: !0, | |
| 1045 | - configurable: !0 | |
| 1046 | - } }), _setPrototypeOf(Wrapper, t); | |
| 1047 | - }, _wrapNativeSuper(t); | |
| 1048 | - } | |
| 2227 | + /** | |
| 2228 | + * Function requireArgumentInstance(). | |
| 2229 | + * | |
| 2230 | + * Validate property in args using `args.whatever instanceof instance`. | |
| 2231 | + * | |
| 2232 | + * @param {string} property | |
| 2233 | + * @param {*} instance | |
| 2234 | + * @param {{}} args | |
| 2235 | + * | |
| 2236 | + * @throws {Error} | |
| 2237 | + * | |
| 2238 | + */ | |
| 2239 | + }, { | |
| 2240 | + key: "requireArgumentInstance", | |
| 2241 | + value: function requireArgumentInstance(property, instance) { | |
| 2242 | + var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args; | |
| 2243 | + this.requireArgument(property, args); | |
| 2244 | + if (!(args[property] instanceof instance) && !(0, _isInstanceof.default)(args[property], instance)) { | |
| 2245 | + throw Error("".concat(property, " invalid instance.")); | |
| 2246 | + } | |
| 2247 | + } | |
| 1049 | 2248 | |
| 1050 | -//#endregion | |
| 1051 | -//#region modules/web-cli/assets/js/utils/force-method-implementation.js | |
| 1052 | - function _callSuper$5(t, o, e) { | |
| 1053 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$5() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1054 | - } | |
| 1055 | - __name(_callSuper$5, "_callSuper"); | |
| 1056 | - function _isNativeReflectConstruct$5() { | |
| 1057 | - try { | |
| 1058 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1059 | - } catch (t) {} | |
| 1060 | - return (_isNativeReflectConstruct$5 = function _isNativeReflectConstruct() { | |
| 1061 | - return !!t; | |
| 1062 | - })(); | |
| 1063 | - } | |
| 1064 | - __name(_isNativeReflectConstruct$5, "_isNativeReflectConstruct"); | |
| 1065 | - var ForceMethodImplementation = /*#__PURE__*/ function(_Error) { | |
| 1066 | - function ForceMethodImplementation() { | |
| 1067 | - var _this; | |
| 1068 | - var info = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 1069 | - _classCallCheck(this, ForceMethodImplementation); | |
| 1070 | - _this = _callSuper$5(this, ForceMethodImplementation, ["".concat(info.isStatic ? "static " : "").concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality.")]); | |
| 1071 | - Error.captureStackTrace(_this, ForceMethodImplementation); | |
| 1072 | - return _this; | |
| 1073 | - } | |
| 1074 | - _inherits(ForceMethodImplementation, _Error); | |
| 1075 | - return _createClass(ForceMethodImplementation); | |
| 1076 | - }(/*#__PURE__*/ _wrapNativeSuper(Error)); | |
| 1077 | - var force_method_implementation_default = /* @__PURE__ */ __name((function() { | |
| 1078 | - var caller = Error().stack.split("\n")[2].trim(); | |
| 1079 | - var callerName = caller.startsWith("at new") ? "constructor" : caller.split(" ")[1]; | |
| 1080 | - var info = {}; | |
| 1081 | - info.functionName = callerName; | |
| 1082 | - info.fullName = callerName; | |
| 1083 | - if (info.functionName.includes(".")) { | |
| 1084 | - var parts = info.functionName.split("."); | |
| 1085 | - info.className = parts[0]; | |
| 1086 | - info.functionName = parts[1]; | |
| 1087 | - } else info.isStatic = true; | |
| 1088 | - throw new ForceMethodImplementation(info); | |
| 1089 | - }), "default"); | |
| 2249 | + /** | |
| 2250 | + * Function requireArgumentConstructor(). | |
| 2251 | + * | |
| 2252 | + * Validate property in args using `type === args.whatever.constructor`. | |
| 2253 | + * | |
| 2254 | + * @param {string} property | |
| 2255 | + * @param {*} type | |
| 2256 | + * @param {{}} args | |
| 2257 | + * | |
| 2258 | + * @throws {Error} | |
| 2259 | + * | |
| 2260 | + */ | |
| 2261 | + }, { | |
| 2262 | + key: "requireArgumentConstructor", | |
| 2263 | + value: function requireArgumentConstructor(property, type) { | |
| 2264 | + var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.args; | |
| 2265 | + this.requireArgument(property, args); | |
| 1090 | 2266 | |
| 1091 | -//#endregion | |
| 1092 | -//#region modules/web-cli/assets/js/modules/component-base.js | |
| 1093 | - function ownKeys(e, r) { | |
| 1094 | - var t = Object.keys(e); | |
| 1095 | - if (Object.getOwnPropertySymbols) { | |
| 1096 | - var o = Object.getOwnPropertySymbols(e); | |
| 1097 | - r && (o = o.filter(function(r) { | |
| 1098 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 1099 | - })), t.push.apply(t, o); | |
| 1100 | - } | |
| 1101 | - return t; | |
| 1102 | - } | |
| 1103 | - function _objectSpread(e) { | |
| 1104 | - for (var r = 1; r < arguments.length; r++) { | |
| 1105 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 1106 | - r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { | |
| 1107 | - _defineProperty(e, r, t[r]); | |
| 1108 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { | |
| 1109 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 1110 | - }); | |
| 1111 | - } | |
| 1112 | - return e; | |
| 1113 | - } | |
| 1114 | - function _callSuper$4(t, o, e) { | |
| 1115 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$4() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1116 | - } | |
| 1117 | - __name(_callSuper$4, "_callSuper"); | |
| 1118 | - function _isNativeReflectConstruct$4() { | |
| 1119 | - try { | |
| 1120 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1121 | - } catch (t) {} | |
| 1122 | - return (_isNativeReflectConstruct$4 = function _isNativeReflectConstruct() { | |
| 1123 | - return !!t; | |
| 1124 | - })(); | |
| 1125 | - } | |
| 1126 | - __name(_isNativeReflectConstruct$4, "_isNativeReflectConstruct"); | |
| 1127 | - /** | |
| 1128 | - * @typedef {import('./command-infra')} CommandInfra | |
| 1129 | - * @typedef {import('./hook-base')} HookBase | |
| 1130 | - * @typedef {import('../core/states/ui-state-base')} UiStateBase | |
| 1131 | - */ | |
| 1132 | - var ComponentBase = /*#__PURE__*/ function(_Module) { | |
| 1133 | - function ComponentBase() { | |
| 1134 | - _classCallCheck(this, ComponentBase); | |
| 1135 | - return _callSuper$4(this, ComponentBase, arguments); | |
| 1136 | - } | |
| 1137 | - _inherits(ComponentBase, _Module); | |
| 1138 | - return _createClass(ComponentBase, [ | |
| 1139 | - { | |
| 1140 | - key: "__construct", | |
| 1141 | - value: function __construct() { | |
| 1142 | - var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; | |
| 1143 | - if (args.manager) this.manager = args.manager; | |
| 1144 | - this.commands = this.defaultCommands(); | |
| 1145 | - this.commandsInternal = this.defaultCommandsInternal(); | |
| 1146 | - this.hooks = this.defaultHooks(); | |
| 1147 | - this.routes = this.defaultRoutes(); | |
| 1148 | - this.tabs = this.defaultTabs(); | |
| 1149 | - this.shortcuts = this.defaultShortcuts(); | |
| 1150 | - this.utils = this.defaultUtils(); | |
| 1151 | - this.data = this.defaultData(); | |
| 1152 | - this.uiStates = this.defaultUiStates(); | |
| 1153 | - this.states = this.defaultStates(); | |
| 1154 | - this.defaultRoute = ""; | |
| 1155 | - this.currentTab = ""; | |
| 1156 | - } | |
| 1157 | - }, | |
| 1158 | - { | |
| 1159 | - key: "registerAPI", | |
| 1160 | - value: function registerAPI() { | |
| 1161 | - var _this = this; | |
| 1162 | - Object.entries(this.getTabs()).forEach(function(tab) { | |
| 1163 | - return _this.registerTabRoute(tab[0]); | |
| 1164 | - }); | |
| 1165 | - Object.entries(this.getRoutes()).forEach(function(_ref) { | |
| 1166 | - var _ref2 = _slicedToArray(_ref, 2); | |
| 1167 | - var route = _ref2[0]; | |
| 1168 | - var callback = _ref2[1]; | |
| 1169 | - return _this.registerRoute(route, callback); | |
| 1170 | - }); | |
| 1171 | - Object.entries(this.getCommands()).forEach(function(_ref3) { | |
| 1172 | - var _ref4 = _slicedToArray(_ref3, 2); | |
| 1173 | - var command = _ref4[0]; | |
| 1174 | - var callback = _ref4[1]; | |
| 1175 | - return _this.registerCommand(command, callback); | |
| 1176 | - }); | |
| 1177 | - Object.entries(this.getCommandsInternal()).forEach(function(_ref5) { | |
| 1178 | - var _ref6 = _slicedToArray(_ref5, 2); | |
| 1179 | - var command = _ref6[0]; | |
| 1180 | - var callback = _ref6[1]; | |
| 1181 | - return _this.registerCommandInternal(command, callback); | |
| 1182 | - }); | |
| 1183 | - Object.values(this.getHooks()).forEach(function(instance) { | |
| 1184 | - return _this.registerHook(instance); | |
| 1185 | - }); | |
| 1186 | - Object.entries(this.getData()).forEach(function(_ref7) { | |
| 1187 | - var _ref8 = _slicedToArray(_ref7, 2); | |
| 1188 | - var command = _ref8[0]; | |
| 1189 | - var callback = _ref8[1]; | |
| 1190 | - return _this.registerData(command, callback); | |
| 1191 | - }); | |
| 1192 | - Object.values(this.getUiStates()).forEach(function(instance) { | |
| 1193 | - return _this.registerUiState(instance); | |
| 1194 | - }); | |
| 1195 | - Object.entries(this.getStates()).forEach(function(_ref9) { | |
| 1196 | - var _ref0 = _slicedToArray(_ref9, 2); | |
| 1197 | - var id = _ref0[0]; | |
| 1198 | - var state = _ref0[1]; | |
| 1199 | - return _this.registerState(id, state); | |
| 1200 | - }); | |
| 1201 | - } | |
| 1202 | - }, | |
| 1203 | - { | |
| 1204 | - key: "getNamespace", | |
| 1205 | - value: function getNamespace() { | |
| 1206 | - force_method_implementation_default(); | |
| 1207 | - } | |
| 1208 | - }, | |
| 1209 | - { | |
| 1210 | - key: "getRootContainer", | |
| 1211 | - value: function getRootContainer() { | |
| 1212 | - Deprecation.deprecated("getRootContainer()", "3.7.0", "getServiceName()"); | |
| 1213 | - return this.getServiceName(); | |
| 1214 | - } | |
| 1215 | - }, | |
| 1216 | - { | |
| 1217 | - key: "getServiceName", | |
| 1218 | - value: function getServiceName() { | |
| 1219 | - return this.getNamespace().split("/")[0]; | |
| 1220 | - } | |
| 1221 | - }, | |
| 1222 | - { | |
| 1223 | - key: "store", | |
| 1224 | - get: function get() { | |
| 1225 | - return $e.store.get(this.getNamespace()); | |
| 1226 | - } | |
| 1227 | - }, | |
| 1228 | - { | |
| 1229 | - key: "defaultTabs", | |
| 1230 | - value: function defaultTabs() { | |
| 1231 | - return {}; | |
| 1232 | - } | |
| 1233 | - }, | |
| 1234 | - { | |
| 1235 | - key: "defaultRoutes", | |
| 1236 | - value: function defaultRoutes() { | |
| 1237 | - return {}; | |
| 1238 | - } | |
| 1239 | - }, | |
| 1240 | - { | |
| 1241 | - key: "defaultCommands", | |
| 1242 | - value: function defaultCommands() { | |
| 1243 | - return {}; | |
| 1244 | - } | |
| 1245 | - }, | |
| 1246 | - { | |
| 1247 | - key: "defaultCommandsInternal", | |
| 1248 | - value: function defaultCommandsInternal() { | |
| 1249 | - return {}; | |
| 1250 | - } | |
| 1251 | - }, | |
| 1252 | - { | |
| 1253 | - key: "defaultHooks", | |
| 1254 | - value: function defaultHooks() { | |
| 1255 | - return {}; | |
| 1256 | - } | |
| 1257 | - }, | |
| 1258 | - { | |
| 1259 | - key: "defaultUiStates", | |
| 1260 | - value: function defaultUiStates() { | |
| 1261 | - return {}; | |
| 1262 | - } | |
| 1263 | - }, | |
| 1264 | - { | |
| 1265 | - key: "defaultStates", | |
| 1266 | - value: function defaultStates() { | |
| 1267 | - return {}; | |
| 1268 | - } | |
| 1269 | - }, | |
| 1270 | - { | |
| 1271 | - key: "defaultShortcuts", | |
| 1272 | - value: function defaultShortcuts() { | |
| 1273 | - return {}; | |
| 1274 | - } | |
| 1275 | - }, | |
| 1276 | - { | |
| 1277 | - key: "defaultUtils", | |
| 1278 | - value: function defaultUtils() { | |
| 1279 | - return {}; | |
| 1280 | - } | |
| 1281 | - }, | |
| 1282 | - { | |
| 1283 | - key: "defaultData", | |
| 1284 | - value: function defaultData() { | |
| 1285 | - return {}; | |
| 1286 | - } | |
| 1287 | - }, | |
| 1288 | - { | |
| 1289 | - key: "getCommands", | |
| 1290 | - value: function getCommands() { | |
| 1291 | - return this.commands; | |
| 1292 | - } | |
| 1293 | - }, | |
| 1294 | - { | |
| 1295 | - key: "getCommandsInternal", | |
| 1296 | - value: function getCommandsInternal() { | |
| 1297 | - return this.commandsInternal; | |
| 1298 | - } | |
| 1299 | - }, | |
| 1300 | - { | |
| 1301 | - key: "getHooks", | |
| 1302 | - value: function getHooks() { | |
| 1303 | - return this.hooks; | |
| 1304 | - } | |
| 1305 | - }, | |
| 1306 | - { | |
| 1307 | - key: "getUiStates", | |
| 1308 | - value: function getUiStates() { | |
| 1309 | - return this.uiStates; | |
| 1310 | - } | |
| 1311 | - }, | |
| 1312 | - { | |
| 1313 | - key: "getStates", | |
| 1314 | - value: function getStates() { | |
| 1315 | - return this.states; | |
| 1316 | - } | |
| 1317 | - }, | |
| 1318 | - { | |
| 1319 | - key: "getRoutes", | |
| 1320 | - value: function getRoutes() { | |
| 1321 | - return this.routes; | |
| 1322 | - } | |
| 1323 | - }, | |
| 1324 | - { | |
| 1325 | - key: "getTabs", | |
| 1326 | - value: function getTabs() { | |
| 1327 | - return this.tabs; | |
| 1328 | - } | |
| 1329 | - }, | |
| 1330 | - { | |
| 1331 | - key: "getShortcuts", | |
| 1332 | - value: function getShortcuts() { | |
| 1333 | - return this.shortcuts; | |
| 1334 | - } | |
| 1335 | - }, | |
| 1336 | - { | |
| 1337 | - key: "getData", | |
| 1338 | - value: function getData() { | |
| 1339 | - return this.data; | |
| 1340 | - } | |
| 1341 | - }, | |
| 1342 | - { | |
| 1343 | - key: "registerCommand", | |
| 1344 | - value: function registerCommand(command, context) { | |
| 1345 | - var commandsType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "default"; | |
| 1346 | - var commandsManager; | |
| 1347 | - switch (commandsType) { | |
| 1348 | - case "default": | |
| 1349 | - commandsManager = $e.commands; | |
| 1350 | - break; | |
| 1351 | - case "internal": | |
| 1352 | - commandsManager = $e.commandsInternal; | |
| 1353 | - break; | |
| 1354 | - case "data": | |
| 1355 | - commandsManager = $e.data; | |
| 1356 | - break; | |
| 1357 | - default: throw new Error("Invalid commands type: '".concat(command, "'")); | |
| 1358 | - } | |
| 1359 | - var fullCommand = this.getNamespace() + "/" + command; | |
| 1360 | - var instanceType = context.getInstanceType ? context.getInstanceType() : false; | |
| 1361 | - var registerConfig = { | |
| 1362 | - command: fullCommand, | |
| 1363 | - component: this | |
| 1364 | - }; | |
| 1365 | - if (!instanceType) { | |
| 1366 | - if ($e.devTools) $e.devTools.log.warn("Attach command-callback-base, on command: '".concat(fullCommand, "', context is unknown type.")); | |
| 1367 | - registerConfig.callback = context; | |
| 1368 | - context = /*#__PURE__*/ function(_CommandCallbackBase) { | |
| 1369 | - function context() { | |
| 1370 | - _classCallCheck(this, context); | |
| 1371 | - return _callSuper$4(this, context, arguments); | |
| 1372 | - } | |
| 1373 | - _inherits(context, _CommandCallbackBase); | |
| 1374 | - return _createClass(context); | |
| 1375 | - }(CommandCallbackBase); | |
| 1376 | - } | |
| 1377 | - context.setRegisterConfig(registerConfig); | |
| 1378 | - commandsManager.register(this, command, context); | |
| 1379 | - } | |
| 1380 | - }, | |
| 1381 | - { | |
| 1382 | - key: "registerHook", | |
| 1383 | - value: function registerHook(instance) { | |
| 1384 | - return instance.register(); | |
| 1385 | - } | |
| 1386 | - }, | |
| 1387 | - { | |
| 1388 | - key: "registerCommandInternal", | |
| 1389 | - value: function registerCommandInternal(command, context) { | |
| 1390 | - this.registerCommand(command, context, "internal"); | |
| 1391 | - } | |
| 1392 | - }, | |
| 1393 | - { | |
| 1394 | - key: "registerUiState", | |
| 1395 | - value: function registerUiState(instance) { | |
| 1396 | - $e.uiStates.register(instance); | |
| 1397 | - } | |
| 1398 | - }, | |
| 1399 | - { | |
| 1400 | - key: "registerState", | |
| 1401 | - value: function registerState(id, stateConfig) { | |
| 1402 | - id = this.getNamespace() + (id ? "/".concat(id) : ""); | |
| 1403 | - var slice = (0, _reduxjs_toolkit.createSlice)(_objectSpread(_objectSpread({}, stateConfig), {}, { name: id })); | |
| 1404 | - $e.store.register(id, slice); | |
| 1405 | - } | |
| 1406 | - }, | |
| 1407 | - { | |
| 1408 | - key: "registerRoute", | |
| 1409 | - value: function registerRoute(route, callback) { | |
| 1410 | - $e.routes.register(this, route, callback); | |
| 1411 | - } | |
| 1412 | - }, | |
| 1413 | - { | |
| 1414 | - key: "registerData", | |
| 1415 | - value: function registerData(command, context) { | |
| 1416 | - this.registerCommand(command, context, "data"); | |
| 1417 | - } | |
| 1418 | - }, | |
| 1419 | - { | |
| 1420 | - key: "unregisterRoute", | |
| 1421 | - value: function unregisterRoute(route) { | |
| 1422 | - $e.routes.unregister(this, route); | |
| 1423 | - } | |
| 1424 | - }, | |
| 1425 | - { | |
| 1426 | - key: "registerTabRoute", | |
| 1427 | - value: function registerTabRoute(tab) { | |
| 1428 | - var _this2 = this; | |
| 1429 | - this.registerRoute(tab, function(args) { | |
| 1430 | - return _this2.activateTab(tab, args); | |
| 1431 | - }); | |
| 1432 | - } | |
| 1433 | - }, | |
| 1434 | - { | |
| 1435 | - key: "dependency", | |
| 1436 | - value: function dependency() { | |
| 1437 | - return true; | |
| 1438 | - } | |
| 1439 | - }, | |
| 1440 | - { | |
| 1441 | - key: "open", | |
| 1442 | - value: function open() { | |
| 1443 | - return true; | |
| 1444 | - } | |
| 1445 | - }, | |
| 1446 | - { | |
| 1447 | - key: "close", | |
| 1448 | - value: function close() { | |
| 1449 | - if (!this.isOpen) return false; | |
| 1450 | - this.isOpen = false; | |
| 1451 | - this.inactivate(); | |
| 1452 | - $e.routes.clearCurrent(this.getNamespace()); | |
| 1453 | - $e.routes.clearHistory(this.getServiceName()); | |
| 1454 | - return true; | |
| 1455 | - } | |
| 1456 | - }, | |
| 1457 | - { | |
| 1458 | - key: "activate", | |
| 1459 | - value: function activate() { | |
| 1460 | - $e.components.activate(this.getNamespace()); | |
| 1461 | - } | |
| 1462 | - }, | |
| 1463 | - { | |
| 1464 | - key: "inactivate", | |
| 1465 | - value: function inactivate() { | |
| 1466 | - $e.components.inactivate(this.getNamespace()); | |
| 1467 | - } | |
| 1468 | - }, | |
| 1469 | - { | |
| 1470 | - key: "isActive", | |
| 1471 | - value: function isActive() { | |
| 1472 | - return $e.components.isActive(this.getNamespace()); | |
| 1473 | - } | |
| 1474 | - }, | |
| 1475 | - { | |
| 1476 | - key: "onRoute", | |
| 1477 | - value: function onRoute(route) { | |
| 1478 | - this.toggleRouteClass(route, true); | |
| 1479 | - this.toggleHistoryClass(); | |
| 1480 | - this.activate(); | |
| 1481 | - this.trigger("route/open", route); | |
| 1482 | - } | |
| 1483 | - }, | |
| 1484 | - { | |
| 1485 | - key: "onCloseRoute", | |
| 1486 | - value: function onCloseRoute(route) { | |
| 1487 | - this.toggleRouteClass(route, false); | |
| 1488 | - this.inactivate(); | |
| 1489 | - this.trigger("route/close", route); | |
| 1490 | - } | |
| 1491 | - }, | |
| 1492 | - { | |
| 1493 | - key: "setDefaultRoute", | |
| 1494 | - value: function setDefaultRoute(route) { | |
| 1495 | - this.defaultRoute = this.getNamespace() + "/" + route; | |
| 1496 | - } | |
| 1497 | - }, | |
| 1498 | - { | |
| 1499 | - key: "getDefaultRoute", | |
| 1500 | - value: function getDefaultRoute() { | |
| 1501 | - return this.defaultRoute; | |
| 1502 | - } | |
| 1503 | - }, | |
| 1504 | - { | |
| 1505 | - key: "removeTab", | |
| 1506 | - value: function removeTab(tab) { | |
| 1507 | - delete this.tabs[tab]; | |
| 1508 | - this.unregisterRoute(tab); | |
| 1509 | - } | |
| 1510 | - }, | |
| 1511 | - { | |
| 1512 | - key: "hasTab", | |
| 1513 | - value: function hasTab(tab) { | |
| 1514 | - return !!this.tabs[tab]; | |
| 1515 | - } | |
| 1516 | - }, | |
| 1517 | - { | |
| 1518 | - key: "addTab", | |
| 1519 | - value: function addTab(tab, args, position) { | |
| 1520 | - var _this3 = this; | |
| 1521 | - this.tabs[tab] = args; | |
| 1522 | - if ("undefined" !== typeof position) { | |
| 1523 | - var newTabs = {}; | |
| 1524 | - var ids = Object.keys(this.tabs); | |
| 1525 | - ids.pop(); | |
| 1526 | - ids.splice(position, 0, tab); | |
| 1527 | - ids.forEach(function(id) { | |
| 1528 | - newTabs[id] = _this3.tabs[id]; | |
| 1529 | - }); | |
| 1530 | - this.tabs = newTabs; | |
| 1531 | - } | |
| 1532 | - this.registerTabRoute(tab); | |
| 1533 | - } | |
| 1534 | - }, | |
| 1535 | - { | |
| 1536 | - key: "getTabsWrapperSelector", | |
| 1537 | - value: function getTabsWrapperSelector() { | |
| 1538 | - return ""; | |
| 1539 | - } | |
| 1540 | - }, | |
| 1541 | - { | |
| 1542 | - key: "getTabRoute", | |
| 1543 | - value: function getTabRoute(tab) { | |
| 1544 | - return this.getNamespace() + "/" + tab; | |
| 1545 | - } | |
| 1546 | - }, | |
| 1547 | - { | |
| 1548 | - key: "renderTab", | |
| 1549 | - value: function renderTab(tab) {} | |
| 1550 | - }, | |
| 1551 | - { | |
| 1552 | - key: "activateTab", | |
| 1553 | - value: function activateTab(tab, args) { | |
| 1554 | - var _this4 = this; | |
| 1555 | - this.renderTab(tab, args); | |
| 1556 | - jQuery(this.getTabsWrapperSelector() + " .elementor-component-tab").off("click").on("click", function(event) { | |
| 1557 | - $e.route(_this4.getTabRoute(event.currentTarget.dataset.tab), args); | |
| 1558 | - }).removeClass("elementor-active").filter("[data-tab=\"" + tab + "\"]").addClass("elementor-active"); | |
| 1559 | - } | |
| 1560 | - }, | |
| 1561 | - { | |
| 1562 | - key: "getActiveTabConfig", | |
| 1563 | - value: function getActiveTabConfig() { | |
| 1564 | - return this.tabs[this.currentTab] || {}; | |
| 1565 | - } | |
| 1566 | - }, | |
| 1567 | - { | |
| 1568 | - key: "getBodyClass", | |
| 1569 | - value: function getBodyClass(route) { | |
| 1570 | - return "e-route-" + route.replace(/\//g, "-"); | |
| 1571 | - } | |
| 1572 | - }, | |
| 1573 | - { | |
| 1574 | - key: "normalizeCommandName", | |
| 1575 | - value: function normalizeCommandName(commandName) { | |
| 1576 | - return commandName.replace(/[A-Z]/g, function(match, offset) { | |
| 1577 | - return (offset > 0 ? "-" : "") + match.toLowerCase(); | |
| 1578 | - }); | |
| 1579 | - } | |
| 1580 | - }, | |
| 1581 | - { | |
| 1582 | - key: "importCommands", | |
| 1583 | - value: function importCommands(commandsFromImport) { | |
| 1584 | - var _this5 = this; | |
| 1585 | - var commands = {}; | |
| 1586 | - Object.entries(commandsFromImport).forEach(function(_ref1) { | |
| 1587 | - var _ref10 = _slicedToArray(_ref1, 2); | |
| 1588 | - var className = _ref10[0]; | |
| 1589 | - var Class = _ref10[1]; | |
| 1590 | - var command = _this5.normalizeCommandName(className); | |
| 1591 | - commands[command] = Class; | |
| 1592 | - }); | |
| 1593 | - return commands; | |
| 1594 | - } | |
| 1595 | - }, | |
| 1596 | - { | |
| 1597 | - key: "importHooks", | |
| 1598 | - value: function importHooks(hooksFromImport) { | |
| 1599 | - var hooks = {}; | |
| 1600 | - for (var key in hooksFromImport) { | |
| 1601 | - var hook = new hooksFromImport[key](); | |
| 1602 | - hooks[hook.getId()] = hook; | |
| 1603 | - } | |
| 1604 | - return hooks; | |
| 1605 | - } | |
| 1606 | - }, | |
| 1607 | - { | |
| 1608 | - key: "importUiStates", | |
| 1609 | - value: function importUiStates(statesFromImport) { | |
| 1610 | - var _this6 = this; | |
| 1611 | - var uiStates = {}; | |
| 1612 | - Object.values(statesFromImport).forEach(function(className) { | |
| 1613 | - var uiState = new className(_this6); | |
| 1614 | - uiStates[uiState.getId()] = uiState; | |
| 1615 | - }); | |
| 1616 | - return uiStates; | |
| 1617 | - } | |
| 1618 | - }, | |
| 1619 | - { | |
| 1620 | - key: "setUiState", | |
| 1621 | - value: function setUiState(state, value) { | |
| 1622 | - $e.uiStates.set("".concat(this.getNamespace(), "/").concat(state), value); | |
| 1623 | - } | |
| 1624 | - }, | |
| 1625 | - { | |
| 1626 | - key: "toggleRouteClass", | |
| 1627 | - value: function toggleRouteClass(route, state) { | |
| 1628 | - document.body.classList.toggle(this.getBodyClass(route), state); | |
| 1629 | - } | |
| 1630 | - }, | |
| 1631 | - { | |
| 1632 | - key: "toggleHistoryClass", | |
| 1633 | - value: function toggleHistoryClass() { | |
| 1634 | - document.body.classList.toggle("e-routes-has-history", !!$e.routes.getHistory(this.getServiceName()).length); | |
| 1635 | - } | |
| 1636 | - } | |
| 1637 | - ]); | |
| 1638 | - }(import_module.default); | |
| 2267 | + // Note: Converting the constructor to string in order to avoid equation issues | |
| 2268 | + // due to different memory addresses between iframes (window.Object !== window.top.Object). | |
| 2269 | + if (args[property].constructor.toString() !== type.prototype.constructor.toString()) { | |
| 2270 | + throw Error("".concat(property, " invalid constructor type.")); | |
| 2271 | + } | |
| 2272 | + } | |
| 2273 | + }], [{ | |
| 2274 | + key: "getInstanceType", | |
| 2275 | + value: function getInstanceType() { | |
| 2276 | + return 'ArgsObject'; | |
| 2277 | + } | |
| 2278 | + }]); | |
| 2279 | + return ArgsObject; | |
| 2280 | +}(_instanceType.default); | |
| 2281 | +exports["default"] = ArgsObject; | |
| 1639 | 2282 | |
| 1640 | -//#endregion | |
| 1641 | -//#region app/assets/js/loader/commands/close.js | |
| 1642 | - function _callSuper$3(t, o, e) { | |
| 1643 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1644 | - } | |
| 1645 | - __name(_callSuper$3, "_callSuper"); | |
| 1646 | - function _isNativeReflectConstruct$3() { | |
| 1647 | - try { | |
| 1648 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1649 | - } catch (t) {} | |
| 1650 | - return (_isNativeReflectConstruct$3 = function _isNativeReflectConstruct() { | |
| 1651 | - return !!t; | |
| 1652 | - })(); | |
| 1653 | - } | |
| 1654 | - __name(_isNativeReflectConstruct$3, "_isNativeReflectConstruct"); | |
| 1655 | - var Close = /*#__PURE__*/ function(_$e$modules$CommandBa) { | |
| 1656 | - function Close() { | |
| 1657 | - _classCallCheck(this, Close); | |
| 1658 | - return _callSuper$3(this, Close, arguments); | |
| 1659 | - } | |
| 1660 | - _inherits(Close, _$e$modules$CommandBa); | |
| 1661 | - return _createClass(Close, [{ | |
| 1662 | - key: "apply", | |
| 1663 | - value: function apply() { | |
| 1664 | - if (!this.component.close()) return false; | |
| 1665 | - this.component.iframe.remove(); | |
| 1666 | - this.component.iframe = null; | |
| 1667 | - if (this.component.backdrop) { | |
| 1668 | - this.component.backdrop.remove(); | |
| 1669 | - this.component.backdrop = null; | |
| 1670 | - } | |
| 1671 | - document.body.style.overflow = ""; | |
| 1672 | - return true; | |
| 1673 | - } | |
| 1674 | - }]); | |
| 1675 | - }($e.modules.CommandBase); | |
| 2283 | +/***/ }), | |
| 1676 | 2284 | |
| 1677 | -//#endregion | |
| 1678 | -//#region app/assets/js/loader/commands/load.js | |
| 1679 | - function _callSuper$2(t, o, e) { | |
| 1680 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1681 | - } | |
| 1682 | - __name(_callSuper$2, "_callSuper"); | |
| 1683 | - function _isNativeReflectConstruct$2() { | |
| 1684 | - try { | |
| 1685 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1686 | - } catch (t) {} | |
| 1687 | - return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { | |
| 1688 | - return !!t; | |
| 1689 | - })(); | |
| 1690 | - } | |
| 1691 | - __name(_isNativeReflectConstruct$2, "_isNativeReflectConstruct"); | |
| 1692 | - var Load = /*#__PURE__*/ function(_$e$modules$CommandBa) { | |
| 1693 | - function Load() { | |
| 1694 | - _classCallCheck(this, Load); | |
| 1695 | - return _callSuper$2(this, Load, arguments); | |
| 1696 | - } | |
| 1697 | - _inherits(Load, _$e$modules$CommandBa); | |
| 1698 | - return _createClass(Load, [{ | |
| 1699 | - key: "apply", | |
| 1700 | - value: function apply(args) { | |
| 1701 | - var component = this.component; | |
| 1702 | - if (!component.iframe) { | |
| 1703 | - component.backdrop = document.createElement("div"); | |
| 1704 | - component.backdrop.className = "elementor-app-backdrop"; | |
| 1705 | - component.backdrop.style.display = "none"; | |
| 1706 | - component.backdrop.addEventListener("click", function() { | |
| 1707 | - $e.run("app/close"); | |
| 1708 | - }); | |
| 1709 | - document.body.appendChild(component.backdrop); | |
| 1710 | - component.iframe = document.createElement("iframe"); | |
| 1711 | - component.iframe.className = "elementor-app-iframe"; | |
| 1712 | - component.iframe.style.display = "none"; | |
| 1713 | - component.iframe.addEventListener("load", function() { | |
| 1714 | - if (component.iframe) component.iframe.classList.add("elementor-app-iframe--visible"); | |
| 1715 | - if (component.backdrop) component.backdrop.classList.add("elementor-app-backdrop--visible"); | |
| 1716 | - }); | |
| 1717 | - document.body.appendChild(component.iframe); | |
| 1718 | - } | |
| 1719 | - if (args.url === component.iframe.src) return; | |
| 1720 | - component.iframe.src = args.url; | |
| 1721 | - } | |
| 1722 | - }]); | |
| 1723 | - }($e.modules.CommandBase); | |
| 2285 | +/***/ "../assets/dev/js/modules/imports/instance-type.js": | |
| 2286 | +/*!*********************************************************!*\ | |
| 2287 | + !*** ../assets/dev/js/modules/imports/instance-type.js ***! | |
| 2288 | + \*********************************************************/ | |
| 2289 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1724 | 2290 | |
| 1725 | -//#endregion | |
| 1726 | -//#region app/assets/js/loader/commands/open.js | |
| 1727 | - function _callSuper$1(t, o, e) { | |
| 1728 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1729 | - } | |
| 1730 | - __name(_callSuper$1, "_callSuper"); | |
| 1731 | - function _isNativeReflectConstruct$1() { | |
| 1732 | - try { | |
| 1733 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1734 | - } catch (t) {} | |
| 1735 | - return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { | |
| 1736 | - return !!t; | |
| 1737 | - })(); | |
| 1738 | - } | |
| 1739 | - __name(_isNativeReflectConstruct$1, "_isNativeReflectConstruct"); | |
| 1740 | - var Open = /*#__PURE__*/ function(_$e$modules$CommandBa) { | |
| 1741 | - function Open() { | |
| 1742 | - _classCallCheck(this, Open); | |
| 1743 | - return _callSuper$1(this, Open, arguments); | |
| 1744 | - } | |
| 1745 | - _inherits(Open, _$e$modules$CommandBa); | |
| 1746 | - return _createClass(Open, [{ | |
| 1747 | - key: "apply", | |
| 1748 | - value: function apply(args) { | |
| 1749 | - $e.route("app", args); | |
| 1750 | - return true; | |
| 1751 | - } | |
| 1752 | - }]); | |
| 1753 | - }($e.modules.CommandBase); | |
| 2291 | +"use strict"; | |
| 1754 | 2292 | |
| 1755 | -//#endregion | |
| 1756 | -//#region app/assets/js/loader/commands/index.js | |
| 1757 | - var commands_exports = /* @__PURE__ */ __exportAll({ | |
| 1758 | - Close: () => Close, | |
| 1759 | - Load: () => Load, | |
| 1760 | - Open: () => Open | |
| 1761 | - }); | |
| 1762 | 2293 | |
| 1763 | -//#endregion | |
| 1764 | -//#region app/assets/js/loader/component.js | |
| 1765 | - function _callSuper(t, o, e) { | |
| 1766 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 1767 | - } | |
| 1768 | - function _isNativeReflectConstruct() { | |
| 1769 | - try { | |
| 1770 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 1771 | - } catch (t) {} | |
| 1772 | - return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { | |
| 1773 | - return !!t; | |
| 1774 | - })(); | |
| 1775 | - } | |
| 1776 | - var Component = /*#__PURE__*/ function(_ComponentModalBase) { | |
| 1777 | - function Component() { | |
| 1778 | - _classCallCheck(this, Component); | |
| 1779 | - return _callSuper(this, Component, arguments); | |
| 1780 | - } | |
| 1781 | - _inherits(Component, _ComponentModalBase); | |
| 1782 | - return _createClass(Component, [ | |
| 1783 | - { | |
| 1784 | - key: "getNamespace", | |
| 1785 | - value: function getNamespace() { | |
| 1786 | - return "app"; | |
| 1787 | - } | |
| 1788 | - }, | |
| 1789 | - { | |
| 1790 | - key: "defaultRoutes", | |
| 1791 | - value: function defaultRoutes() { | |
| 1792 | - var _this = this; | |
| 1793 | - return { "": function _(args) { | |
| 1794 | - args.url = args.url || elementorAppConfig.menu_url; | |
| 1795 | - $e.run("app/load", args); | |
| 1796 | - _this.iframe.style.display = ""; | |
| 1797 | - if (_this.backdrop) _this.backdrop.style.display = ""; | |
| 1798 | - document.body.style.overflow = "hidden"; | |
| 1799 | - } }; | |
| 1800 | - } | |
| 1801 | - }, | |
| 1802 | - { | |
| 1803 | - key: "defaultCommands", | |
| 1804 | - value: function defaultCommands() { | |
| 1805 | - return this.importCommands(commands_exports); | |
| 1806 | - } | |
| 1807 | - }, | |
| 1808 | - { | |
| 1809 | - key: "defaultShortcuts", | |
| 1810 | - value: function defaultShortcuts() { | |
| 1811 | - return { | |
| 1812 | - "": { keys: "ctrl+shift+e" }, | |
| 1813 | - close: { | |
| 1814 | - keys: "esc", | |
| 1815 | - scopes: [this.getNamespace()] | |
| 1816 | - } | |
| 1817 | - }; | |
| 1818 | - } | |
| 1819 | - } | |
| 1820 | - ]); | |
| 1821 | - }(ComponentBase); | |
| 2294 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2295 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2296 | + value: true | |
| 2297 | +})); | |
| 2298 | +exports["default"] = void 0; | |
| 2299 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2300 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2301 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 2302 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2303 | +var InstanceType = /*#__PURE__*/function (_Symbol$hasInstance) { | |
| 2304 | + function InstanceType() { | |
| 2305 | + var _this = this; | |
| 2306 | + (0, _classCallCheck2.default)(this, InstanceType); | |
| 2307 | + // Since anonymous classes sometimes do not get validated by babel, do it manually. | |
| 2308 | + var target = this instanceof InstanceType ? this.constructor : void 0; | |
| 2309 | + var prototypes = []; | |
| 2310 | + while (target.__proto__ && target.__proto__.name) { | |
| 2311 | + prototypes.push(target.__proto__); | |
| 2312 | + target = target.__proto__; | |
| 2313 | + } | |
| 2314 | + prototypes.reverse().forEach(function (proto) { | |
| 2315 | + return _this instanceof proto; | |
| 2316 | + }); | |
| 2317 | + } | |
| 2318 | + (0, _createClass2.default)(InstanceType, null, [{ | |
| 2319 | + key: _Symbol$hasInstance, | |
| 2320 | + value: function value(target) { | |
| 2321 | + /** | |
| 2322 | + * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class | |
| 2323 | + * its give's opportunity to mange capabilities of instanceOf operator. | |
| 2324 | + * saving current class each time will give option later to handle instanceOf manually. | |
| 2325 | + */ | |
| 2326 | + var result = (0, _get2.default)((0, _getPrototypeOf2.default)(InstanceType), Symbol.hasInstance, this).call(this, target); | |
| 1822 | 2327 | |
| 1823 | -//#endregion | |
| 1824 | -//#region app/assets/js/app-loader.js | |
| 1825 | - window.elementorAppLoader = new (/* @__PURE__ */ function() { | |
| 1826 | - function AppLoader() { | |
| 1827 | - _classCallCheck(this, AppLoader); | |
| 1828 | - _defineProperty(this, "selector", "a.elementor-app-link, .elementor-app-link .ab-item"); | |
| 1829 | - $e.components.register(new Component()); | |
| 1830 | - window.addEventListener("DOMContentLoaded", this.onLoad.bind(this)); | |
| 1831 | - } | |
| 1832 | - return _createClass(AppLoader, [{ | |
| 1833 | - key: "onLoad", | |
| 1834 | - value: function onLoad() { | |
| 1835 | - var links = document.querySelectorAll(this.selector); | |
| 1836 | - if (!links.length) return; | |
| 1837 | - links.forEach(function(link) { | |
| 1838 | - link.addEventListener("click", function(event) { | |
| 1839 | - event.preventDefault(); | |
| 1840 | - $e.run("app/open", { url: link.href }); | |
| 1841 | - }); | |
| 1842 | - link.addEventListener("mouseenter", function() { | |
| 1843 | - $e.run("app/load", { url: link.href }); | |
| 1844 | - }); | |
| 1845 | - }); | |
| 1846 | - } | |
| 1847 | - }]); | |
| 1848 | - }())(); | |
| 2328 | + // Act normal when validate a class, which does not have instance type. | |
| 2329 | + if (target && !target.constructor.getInstanceType) { | |
| 2330 | + return result; | |
| 2331 | + } | |
| 2332 | + if (target) { | |
| 2333 | + if (!target.instanceTypes) { | |
| 2334 | + target.instanceTypes = []; | |
| 2335 | + } | |
| 2336 | + if (!result) { | |
| 2337 | + if (this.getInstanceType() === target.constructor.getInstanceType()) { | |
| 2338 | + result = true; | |
| 2339 | + } | |
| 2340 | + } | |
| 2341 | + if (result) { | |
| 2342 | + var name = this.getInstanceType === InstanceType.getInstanceType ? 'BaseInstanceType' : this.getInstanceType(); | |
| 2343 | + if (-1 === target.instanceTypes.indexOf(name)) { | |
| 2344 | + target.instanceTypes.push(name); | |
| 2345 | + } | |
| 2346 | + } | |
| 2347 | + } | |
| 2348 | + if (!result && target) { | |
| 2349 | + // Check if the given 'target', is instance of known types. | |
| 2350 | + result = target.instanceTypes && Array.isArray(target.instanceTypes) && -1 !== target.instanceTypes.indexOf(this.getInstanceType()); | |
| 2351 | + } | |
| 2352 | + return result; | |
| 2353 | + } | |
| 2354 | + }, { | |
| 2355 | + key: "getInstanceType", | |
| 2356 | + value: function getInstanceType() { | |
| 2357 | + elementorModules.ForceMethodImplementation(); | |
| 2358 | + } | |
| 2359 | + }]); | |
| 2360 | + return InstanceType; | |
| 2361 | +}(Symbol.hasInstance); | |
| 2362 | +exports["default"] = InstanceType; | |
| 1849 | 2363 | |
| 1850 | -//#endregion | |
| 1851 | -})(elementorVendors.reduxToolkit); | |
| 2364 | +/***/ }), | |
| 2365 | + | |
| 2366 | +/***/ "../assets/dev/js/modules/imports/module.js": | |
| 2367 | +/*!**************************************************!*\ | |
| 2368 | + !*** ../assets/dev/js/modules/imports/module.js ***! | |
| 2369 | + \**************************************************/ | |
| 2370 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2371 | + | |
| 2372 | +"use strict"; | |
| 2373 | + | |
| 2374 | + | |
| 2375 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2376 | +var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js")); | |
| 2377 | +var Module = function Module() { | |
| 2378 | + var $ = jQuery, | |
| 2379 | + instanceParams = arguments, | |
| 2380 | + self = this, | |
| 2381 | + events = {}; | |
| 2382 | + var settings; | |
| 2383 | + var ensureClosureMethods = function ensureClosureMethods() { | |
| 2384 | + $.each(self, function (methodName) { | |
| 2385 | + var oldMethod = self[methodName]; | |
| 2386 | + if ('function' !== typeof oldMethod) { | |
| 2387 | + return; | |
| 2388 | + } | |
| 2389 | + self[methodName] = function () { | |
| 2390 | + return oldMethod.apply(self, arguments); | |
| 2391 | + }; | |
| 2392 | + }); | |
| 2393 | + }; | |
| 2394 | + var initSettings = function initSettings() { | |
| 2395 | + settings = self.getDefaultSettings(); | |
| 2396 | + var instanceSettings = instanceParams[0]; | |
| 2397 | + if (instanceSettings) { | |
| 2398 | + $.extend(true, settings, instanceSettings); | |
| 2399 | + } | |
| 2400 | + }; | |
| 2401 | + var init = function init() { | |
| 2402 | + self.__construct.apply(self, instanceParams); | |
| 2403 | + ensureClosureMethods(); | |
| 2404 | + initSettings(); | |
| 2405 | + self.trigger('init'); | |
| 2406 | + }; | |
| 2407 | + this.getItems = function (items, itemKey) { | |
| 2408 | + if (itemKey) { | |
| 2409 | + var keyStack = itemKey.split('.'), | |
| 2410 | + currentKey = keyStack.splice(0, 1); | |
| 2411 | + if (!keyStack.length) { | |
| 2412 | + return items[currentKey]; | |
| 2413 | + } | |
| 2414 | + if (!items[currentKey]) { | |
| 2415 | + return; | |
| 2416 | + } | |
| 2417 | + return this.getItems(items[currentKey], keyStack.join('.')); | |
| 2418 | + } | |
| 2419 | + return items; | |
| 2420 | + }; | |
| 2421 | + this.getSettings = function (setting) { | |
| 2422 | + return this.getItems(settings, setting); | |
| 2423 | + }; | |
| 2424 | + this.setSettings = function (settingKey, value, settingsContainer) { | |
| 2425 | + if (!settingsContainer) { | |
| 2426 | + settingsContainer = settings; | |
| 2427 | + } | |
| 2428 | + if ('object' === (0, _typeof2.default)(settingKey)) { | |
| 2429 | + $.extend(settingsContainer, settingKey); | |
| 2430 | + return self; | |
| 2431 | + } | |
| 2432 | + var keyStack = settingKey.split('.'), | |
| 2433 | + currentKey = keyStack.splice(0, 1); | |
| 2434 | + if (!keyStack.length) { | |
| 2435 | + settingsContainer[currentKey] = value; | |
| 2436 | + return self; | |
| 2437 | + } | |
| 2438 | + if (!settingsContainer[currentKey]) { | |
| 2439 | + settingsContainer[currentKey] = {}; | |
| 2440 | + } | |
| 2441 | + return self.setSettings(keyStack.join('.'), value, settingsContainer[currentKey]); | |
| 2442 | + }; | |
| 2443 | + this.getErrorMessage = function (type, functionName) { | |
| 2444 | + var message; | |
| 2445 | + switch (type) { | |
| 2446 | + case 'forceMethodImplementation': | |
| 2447 | + message = "The method '".concat(functionName, "' must to be implemented in the inheritor child."); | |
| 2448 | + break; | |
| 2449 | + default: | |
| 2450 | + message = 'An error occurs'; | |
| 2451 | + } | |
| 2452 | + return message; | |
| 2453 | + }; | |
| 2454 | + | |
| 2455 | + // TODO: This function should be deleted ?. | |
| 2456 | + this.forceMethodImplementation = function (functionName) { | |
| 2457 | + throw new Error(this.getErrorMessage('forceMethodImplementation', functionName)); | |
| 2458 | + }; | |
| 2459 | + this.on = function (eventName, callback) { | |
| 2460 | + if ('object' === (0, _typeof2.default)(eventName)) { | |
| 2461 | + $.each(eventName, function (singleEventName) { | |
| 2462 | + self.on(singleEventName, this); | |
| 2463 | + }); | |
| 2464 | + return self; | |
| 2465 | + } | |
| 2466 | + var eventNames = eventName.split(' '); | |
| 2467 | + eventNames.forEach(function (singleEventName) { | |
| 2468 | + if (!events[singleEventName]) { | |
| 2469 | + events[singleEventName] = []; | |
| 2470 | + } | |
| 2471 | + events[singleEventName].push(callback); | |
| 2472 | + }); | |
| 2473 | + return self; | |
| 2474 | + }; | |
| 2475 | + this.off = function (eventName, callback) { | |
| 2476 | + if (!events[eventName]) { | |
| 2477 | + return self; | |
| 2478 | + } | |
| 2479 | + if (!callback) { | |
| 2480 | + delete events[eventName]; | |
| 2481 | + return self; | |
| 2482 | + } | |
| 2483 | + var callbackIndex = events[eventName].indexOf(callback); | |
| 2484 | + if (-1 !== callbackIndex) { | |
| 2485 | + delete events[eventName][callbackIndex]; | |
| 2486 | + | |
| 2487 | + // Reset array index (for next off on same event). | |
| 2488 | + events[eventName] = events[eventName].filter(function (val) { | |
| 2489 | + return val; | |
| 2490 | + }); | |
| 2491 | + } | |
| 2492 | + return self; | |
| 2493 | + }; | |
| 2494 | + this.trigger = function (eventName) { | |
| 2495 | + var methodName = 'on' + eventName[0].toUpperCase() + eventName.slice(1), | |
| 2496 | + params = Array.prototype.slice.call(arguments, 1); | |
| 2497 | + if (self[methodName]) { | |
| 2498 | + self[methodName].apply(self, params); | |
| 2499 | + } | |
| 2500 | + var callbacks = events[eventName]; | |
| 2501 | + if (!callbacks) { | |
| 2502 | + return self; | |
| 2503 | + } | |
| 2504 | + $.each(callbacks, function (index, callback) { | |
| 2505 | + callback.apply(self, params); | |
| 2506 | + }); | |
| 2507 | + return self; | |
| 2508 | + }; | |
| 2509 | + init(); | |
| 2510 | +}; | |
| 2511 | +Module.prototype.__construct = function () {}; | |
| 2512 | +Module.prototype.getDefaultSettings = function () { | |
| 2513 | + return {}; | |
| 2514 | +}; | |
| 2515 | +Module.prototype.getConstructorID = function () { | |
| 2516 | + return this.constructor.name; | |
| 2517 | +}; | |
| 2518 | +Module.extend = function (properties) { | |
| 2519 | + var $ = jQuery, | |
| 2520 | + parent = this; | |
| 2521 | + var child = function child() { | |
| 2522 | + return parent.apply(this, arguments); | |
| 2523 | + }; | |
| 2524 | + $.extend(child, parent); | |
| 2525 | + child.prototype = Object.create($.extend({}, parent.prototype, properties)); | |
| 2526 | + child.prototype.constructor = child; | |
| 2527 | + child.__super__ = parent.prototype; | |
| 2528 | + return child; | |
| 2529 | +}; | |
| 2530 | +module.exports = Module; | |
| 2531 | + | |
| 2532 | +/***/ }), | |
| 2533 | + | |
| 2534 | +/***/ "../modules/web-cli/assets/js/modules/command-base.js": | |
| 2535 | +/*!************************************************************!*\ | |
| 2536 | + !*** ../modules/web-cli/assets/js/modules/command-base.js ***! | |
| 2537 | + \************************************************************/ | |
| 2538 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2539 | + | |
| 2540 | +"use strict"; | |
| 2541 | + | |
| 2542 | + | |
| 2543 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2544 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2545 | + value: true | |
| 2546 | +})); | |
| 2547 | +exports["default"] = void 0; | |
| 2548 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2549 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2550 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2551 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2552 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2553 | +var _commandInfra = _interopRequireDefault(__webpack_require__(/*! ./command-infra */ "../modules/web-cli/assets/js/modules/command-infra.js")); | |
| 2554 | +var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); | |
| 2555 | +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); }; } | |
| 2556 | +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; } } | |
| 2557 | +/** | |
| 2558 | + * @name $e.modules.CommandBase | |
| 2559 | + */ | |
| 2560 | +var CommandBase = /*#__PURE__*/function (_CommandInfra) { | |
| 2561 | + (0, _inherits2.default)(CommandBase, _CommandInfra); | |
| 2562 | + var _super = _createSuper(CommandBase); | |
| 2563 | + function CommandBase() { | |
| 2564 | + (0, _classCallCheck2.default)(this, CommandBase); | |
| 2565 | + return _super.apply(this, arguments); | |
| 2566 | + } | |
| 2567 | + (0, _createClass2.default)(CommandBase, [{ | |
| 2568 | + key: "onBeforeRun", | |
| 2569 | + value: function onBeforeRun() { | |
| 2570 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 2571 | + $e.hooks.runUIBefore(this.command, args); | |
| 2572 | + } | |
| 2573 | + }, { | |
| 2574 | + key: "onAfterRun", | |
| 2575 | + value: function onAfterRun() { | |
| 2576 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 2577 | + var result = arguments.length > 1 ? arguments[1] : undefined; | |
| 2578 | + $e.hooks.runUIAfter(this.command, args, result); | |
| 2579 | + } | |
| 2580 | + }, { | |
| 2581 | + key: "onBeforeApply", | |
| 2582 | + value: function onBeforeApply() { | |
| 2583 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 2584 | + $e.hooks.runDataDependency(this.command, args); | |
| 2585 | + } | |
| 2586 | + }, { | |
| 2587 | + key: "onAfterApply", | |
| 2588 | + value: function onAfterApply() { | |
| 2589 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 2590 | + var result = arguments.length > 1 ? arguments[1] : undefined; | |
| 2591 | + $e.hooks.runDataAfter(this.command, args, result); | |
| 2592 | + } | |
| 2593 | + }, { | |
| 2594 | + key: "onCatchApply", | |
| 2595 | + value: function onCatchApply(e) { | |
| 2596 | + this.runCatchHooks(e); | |
| 2597 | + } | |
| 2598 | + | |
| 2599 | + /** | |
| 2600 | + * Run all the catch hooks. | |
| 2601 | + * | |
| 2602 | + * @param {Error} e | |
| 2603 | + */ | |
| 2604 | + }, { | |
| 2605 | + key: "runCatchHooks", | |
| 2606 | + value: function runCatchHooks(e) { | |
| 2607 | + $e.hooks.runDataCatch(this.command, this.args, e); | |
| 2608 | + $e.hooks.runUICatch(this.command, this.args, e); | |
| 2609 | + } | |
| 2610 | + | |
| 2611 | + /** | |
| 2612 | + * TODO - Remove - Backwards compatibility. | |
| 2613 | + * | |
| 2614 | + * Function requireContainer(). | |
| 2615 | + * | |
| 2616 | + * Validate `arg.container` & `arg.containers`. | |
| 2617 | + * | |
| 2618 | + * @param {{}} args | |
| 2619 | + * | |
| 2620 | + * @throws {Error} | |
| 2621 | + */ | |
| 2622 | + }, { | |
| 2623 | + key: "requireContainer", | |
| 2624 | + value: function requireContainer() { | |
| 2625 | + var _this = this; | |
| 2626 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.args; | |
| 2627 | + _deprecation.default.deprecated('requireContainer', '3.7.0', 'Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`'); | |
| 2628 | + if (!args.container && !args.containers) { | |
| 2629 | + throw Error('container or containers are required.'); | |
| 2630 | + } | |
| 2631 | + if (args.container && args.containers) { | |
| 2632 | + throw Error('container and containers cannot go together please select one of them.'); | |
| 2633 | + } | |
| 2634 | + var containers = args.containers || [args.container]; | |
| 2635 | + containers.forEach(function (container) { | |
| 2636 | + _this.requireArgumentInstance('container', elementorModules.editor.Container, { | |
| 2637 | + container: container | |
| 2638 | + }); | |
| 2639 | + }); | |
| 2640 | + } | |
| 2641 | + }], [{ | |
| 2642 | + key: "getInstanceType", | |
| 2643 | + value: function getInstanceType() { | |
| 2644 | + return 'CommandBase'; | |
| 2645 | + } | |
| 2646 | + }]); | |
| 2647 | + return CommandBase; | |
| 2648 | +}(_commandInfra.default); | |
| 2649 | +exports["default"] = CommandBase; | |
| 2650 | + | |
| 2651 | +/***/ }), | |
| 2652 | + | |
| 2653 | +/***/ "../modules/web-cli/assets/js/modules/command-callback-base.js": | |
| 2654 | +/*!*********************************************************************!*\ | |
| 2655 | + !*** ../modules/web-cli/assets/js/modules/command-callback-base.js ***! | |
| 2656 | + \*********************************************************************/ | |
| 2657 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2658 | + | |
| 2659 | +"use strict"; | |
| 2660 | + | |
| 2661 | + | |
| 2662 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2663 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2664 | + value: true | |
| 2665 | +})); | |
| 2666 | +exports["default"] = void 0; | |
| 2667 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2668 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2669 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2670 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2671 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2672 | +var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); | |
| 2673 | +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); }; } | |
| 2674 | +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; } } | |
| 2675 | +/** | |
| 2676 | + * To support pure callbacks in the API(commands.js), to ensure they have registered with the proper context. | |
| 2677 | + */ | |
| 2678 | +var CommandCallbackBase = /*#__PURE__*/function (_CommandBase) { | |
| 2679 | + (0, _inherits2.default)(CommandCallbackBase, _CommandBase); | |
| 2680 | + var _super = _createSuper(CommandCallbackBase); | |
| 2681 | + function CommandCallbackBase() { | |
| 2682 | + (0, _classCallCheck2.default)(this, CommandCallbackBase); | |
| 2683 | + return _super.apply(this, arguments); | |
| 2684 | + } | |
| 2685 | + (0, _createClass2.default)(CommandCallbackBase, [{ | |
| 2686 | + key: "apply", | |
| 2687 | + value: function apply() { | |
| 2688 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 2689 | + return this.constructor.getCallback()(args); | |
| 2690 | + } | |
| 2691 | + }], [{ | |
| 2692 | + key: "getInstanceType", | |
| 2693 | + value: function getInstanceType() { | |
| 2694 | + return 'CommandCallbackBase'; | |
| 2695 | + } | |
| 2696 | + | |
| 2697 | + /** | |
| 2698 | + * Get original callback of the command. | |
| 2699 | + * | |
| 2700 | + * Support pure callbacks ( Non command-base ). | |
| 2701 | + * | |
| 2702 | + * @return {()=>{}} Command Results. | |
| 2703 | + */ | |
| 2704 | + }, { | |
| 2705 | + key: "getCallback", | |
| 2706 | + value: function getCallback() { | |
| 2707 | + return this.registerConfig.callback; | |
| 2708 | + } | |
| 2709 | + }]); | |
| 2710 | + return CommandCallbackBase; | |
| 2711 | +}(_commandBase.default); | |
| 2712 | +exports["default"] = CommandCallbackBase; | |
| 2713 | + | |
| 2714 | +/***/ }), | |
| 2715 | + | |
| 2716 | +/***/ "../modules/web-cli/assets/js/modules/command-infra.js": | |
| 2717 | +/*!*************************************************************!*\ | |
| 2718 | + !*** ../modules/web-cli/assets/js/modules/command-infra.js ***! | |
| 2719 | + \*************************************************************/ | |
| 2720 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2721 | + | |
| 2722 | +"use strict"; | |
| 2723 | + | |
| 2724 | + | |
| 2725 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2726 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2727 | + value: true | |
| 2728 | +})); | |
| 2729 | +exports["default"] = void 0; | |
| 2730 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2731 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2732 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2733 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2734 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2735 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 2736 | +var _argsObject = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js")); | |
| 2737 | +var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); | |
| 2738 | +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); }; } | |
| 2739 | +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; } } | |
| 2740 | +/** | |
| 2741 | + * @typedef {import('../modules/component-base')} ComponentBase | |
| 2742 | + */ | |
| 2743 | +var CommandInfra = /*#__PURE__*/function (_ArgsObject) { | |
| 2744 | + (0, _inherits2.default)(CommandInfra, _ArgsObject); | |
| 2745 | + var _super = _createSuper(CommandInfra); | |
| 2746 | + /** | |
| 2747 | + * Function constructor(). | |
| 2748 | + * | |
| 2749 | + * Create Commands Base. | |
| 2750 | + * | |
| 2751 | + * @param {{}} args | |
| 2752 | + */ | |
| 2753 | + function CommandInfra() { | |
| 2754 | + var _this; | |
| 2755 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 2756 | + (0, _classCallCheck2.default)(this, CommandInfra); | |
| 2757 | + _this = _super.call(this, args); | |
| 2758 | + if (!_this.constructor.registerConfig) { | |
| 2759 | + throw RangeError('Doing it wrong: Each command type should have `registerConfig`.'); | |
| 2760 | + } | |
| 2761 | + | |
| 2762 | + // Acknowledge self about which command it run. | |
| 2763 | + _this.command = _this.constructor.getCommand(); | |
| 2764 | + | |
| 2765 | + // Assign instance of current component. | |
| 2766 | + _this.component = _this.constructor.getComponent(); | |
| 2767 | + | |
| 2768 | + // Who ever need do something before without `super` the constructor can use `initialize` method. | |
| 2769 | + _this.initialize(args); | |
| 2770 | + | |
| 2771 | + // Refresh args, maybe the changed via `initialize`. | |
| 2772 | + args = _this.args; | |
| 2773 | + | |
| 2774 | + // Validate args before run. | |
| 2775 | + _this.validateArgs(args); | |
| 2776 | + return _this; | |
| 2777 | + } | |
| 2778 | + | |
| 2779 | + /** | |
| 2780 | + * Function initialize(). | |
| 2781 | + * | |
| 2782 | + * Initialize command, called after construction. | |
| 2783 | + * | |
| 2784 | + * @param {{}} args | |
| 2785 | + */ | |
| 2786 | + (0, _createClass2.default)(CommandInfra, [{ | |
| 2787 | + key: "currentCommand", | |
| 2788 | + get: | |
| 2789 | + // TODO - Remove backwards compatibility. | |
| 2790 | + function get() { | |
| 2791 | + _deprecation.default.deprecated('this.currentCommand', '3.7.0', 'this.command'); | |
| 2792 | + return this.command; | |
| 2793 | + } | |
| 2794 | + }, { | |
| 2795 | + key: "initialize", | |
| 2796 | + value: function initialize() { | |
| 2797 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 2798 | + } // eslint-disable-line no-unused-vars | |
| 2799 | + | |
| 2800 | + /** | |
| 2801 | + * Function validateArgs(). | |
| 2802 | + * | |
| 2803 | + * Validate command arguments. | |
| 2804 | + * | |
| 2805 | + * @param {{}} args | |
| 2806 | + */ | |
| 2807 | + }, { | |
| 2808 | + key: "validateArgs", | |
| 2809 | + value: function validateArgs() { | |
| 2810 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 2811 | + } // eslint-disable-line no-unused-vars | |
| 2812 | + | |
| 2813 | + // eslint-disable-next-line jsdoc/require-returns-check | |
| 2814 | + /** | |
| 2815 | + * Function apply(). | |
| 2816 | + * | |
| 2817 | + * Do the actual command. | |
| 2818 | + * | |
| 2819 | + * @param {{}} args | |
| 2820 | + * | |
| 2821 | + * @return {*} Command results. | |
| 2822 | + */ | |
| 2823 | + }, { | |
| 2824 | + key: "apply", | |
| 2825 | + value: function apply() { | |
| 2826 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 2827 | + // eslint-disable-line no-unused-vars | |
| 2828 | + elementorModules.ForceMethodImplementation(); | |
| 2829 | + } | |
| 2830 | + | |
| 2831 | + /** | |
| 2832 | + * Function run(). | |
| 2833 | + * | |
| 2834 | + * Run command with history & hooks. | |
| 2835 | + * | |
| 2836 | + * @return {*} Command results. | |
| 2837 | + */ | |
| 2838 | + }, { | |
| 2839 | + key: "run", | |
| 2840 | + value: function run() { | |
| 2841 | + return this.apply(this.args); | |
| 2842 | + } | |
| 2843 | + | |
| 2844 | + /** | |
| 2845 | + * Function onBeforeRun. | |
| 2846 | + * | |
| 2847 | + * Called before run(). | |
| 2848 | + * | |
| 2849 | + * @param {{}} args | |
| 2850 | + */ | |
| 2851 | + }, { | |
| 2852 | + key: "onBeforeRun", | |
| 2853 | + value: function onBeforeRun() { | |
| 2854 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 2855 | + } // eslint-disable-line no-unused-vars | |
| 2856 | + | |
| 2857 | + /** | |
| 2858 | + * Function onAfterRun. | |
| 2859 | + * | |
| 2860 | + * Called after run(). | |
| 2861 | + * | |
| 2862 | + * @param {{}} args | |
| 2863 | + * @param {*} result | |
| 2864 | + */ | |
| 2865 | + }, { | |
| 2866 | + key: "onAfterRun", | |
| 2867 | + value: function onAfterRun() { | |
| 2868 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 2869 | + var result = arguments.length > 1 ? arguments[1] : undefined; | |
| 2870 | + } // eslint-disable-line no-unused-vars | |
| 2871 | + | |
| 2872 | + /** | |
| 2873 | + * Function onBeforeApply. | |
| 2874 | + * | |
| 2875 | + * Called before apply(). | |
| 2876 | + * | |
| 2877 | + * @param {{}} args | |
| 2878 | + */ | |
| 2879 | + }, { | |
| 2880 | + key: "onBeforeApply", | |
| 2881 | + value: function onBeforeApply() { | |
| 2882 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 2883 | + } // eslint-disable-line no-unused-vars | |
| 2884 | + | |
| 2885 | + /** | |
| 2886 | + * Function onAfterApply. | |
| 2887 | + * | |
| 2888 | + * Called after apply(). | |
| 2889 | + * | |
| 2890 | + * @param {{}} args | |
| 2891 | + * @param {*} result | |
| 2892 | + */ | |
| 2893 | + }, { | |
| 2894 | + key: "onAfterApply", | |
| 2895 | + value: function onAfterApply() { | |
| 2896 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 2897 | + var result = arguments.length > 1 ? arguments[1] : undefined; | |
| 2898 | + } // eslint-disable-line no-unused-vars | |
| 2899 | + | |
| 2900 | + /** | |
| 2901 | + * Function onCatchApply. | |
| 2902 | + * | |
| 2903 | + * Called after apply() failed. | |
| 2904 | + * | |
| 2905 | + * @param {Error} e | |
| 2906 | + */ | |
| 2907 | + }, { | |
| 2908 | + key: "onCatchApply", | |
| 2909 | + value: function onCatchApply(e) {} // eslint-disable-line no-unused-vars | |
| 2910 | + }], [{ | |
| 2911 | + key: "getInstanceType", | |
| 2912 | + value: | |
| 2913 | + /** | |
| 2914 | + * @type {Object} | |
| 2915 | + */ | |
| 2916 | + | |
| 2917 | + function getInstanceType() { | |
| 2918 | + return 'CommandInfra'; | |
| 2919 | + } | |
| 2920 | + | |
| 2921 | + /** | |
| 2922 | + * Get info of command. | |
| 2923 | + * | |
| 2924 | + * @return {Object} Extra information about the command. | |
| 2925 | + */ | |
| 2926 | + }, { | |
| 2927 | + key: "getInfo", | |
| 2928 | + value: function getInfo() { | |
| 2929 | + return {}; | |
| 2930 | + } | |
| 2931 | + | |
| 2932 | + /** | |
| 2933 | + * @return {string} Self command name. | |
| 2934 | + */ | |
| 2935 | + }, { | |
| 2936 | + key: "getCommand", | |
| 2937 | + value: function getCommand() { | |
| 2938 | + return this.registerConfig.command; | |
| 2939 | + } | |
| 2940 | + | |
| 2941 | + /** | |
| 2942 | + * @return {ComponentBase} Self component | |
| 2943 | + */ | |
| 2944 | + }, { | |
| 2945 | + key: "getComponent", | |
| 2946 | + value: function getComponent() { | |
| 2947 | + return this.registerConfig.component; | |
| 2948 | + } | |
| 2949 | + }, { | |
| 2950 | + key: "setRegisterConfig", | |
| 2951 | + value: function setRegisterConfig(config) { | |
| 2952 | + this.registerConfig = Object.freeze(config); | |
| 2953 | + } | |
| 2954 | + }]); | |
| 2955 | + return CommandInfra; | |
| 2956 | +}(_argsObject.default); | |
| 2957 | +exports["default"] = CommandInfra; | |
| 2958 | +(0, _defineProperty2.default)(CommandInfra, "registerConfig", null); | |
| 2959 | + | |
| 2960 | +/***/ }), | |
| 2961 | + | |
| 2962 | +/***/ "../modules/web-cli/assets/js/modules/component-base.js": | |
| 2963 | +/*!**************************************************************!*\ | |
| 2964 | + !*** ../modules/web-cli/assets/js/modules/component-base.js ***! | |
| 2965 | + \**************************************************************/ | |
| 2966 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2967 | + | |
| 2968 | +"use strict"; | |
| 2969 | + | |
| 2970 | + | |
| 2971 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 2972 | +Object.defineProperty(exports, "__esModule", ({ | |
| 2973 | + value: true | |
| 2974 | +})); | |
| 2975 | +exports["default"] = void 0; | |
| 2976 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 2977 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 2978 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 2979 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 2980 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2981 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 2982 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 2983 | +var _commandCallbackBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-callback-base */ "../modules/web-cli/assets/js/modules/command-callback-base.js")); | |
| 2984 | +var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"); | |
| 2985 | +var _module = _interopRequireDefault(__webpack_require__(/*! elementor/assets/dev/js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js")); | |
| 2986 | +var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js")); | |
| 2987 | +var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); | |
| 2988 | +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; } | |
| 2989 | +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; } | |
| 2990 | +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); }; } | |
| 2991 | +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; } } | |
| 2992 | +/** | |
| 2993 | + * @typedef {import('./command-infra')} CommandInfra | |
| 2994 | + * @typedef {import('./hook-base')} HookBase | |
| 2995 | + * @typedef {import('../core/states/ui-state-base')} UiStateBase | |
| 2996 | + */ | |
| 2997 | +var ComponentBase = /*#__PURE__*/function (_Module) { | |
| 2998 | + (0, _inherits2.default)(ComponentBase, _Module); | |
| 2999 | + var _super = _createSuper(ComponentBase); | |
| 3000 | + function ComponentBase() { | |
| 3001 | + (0, _classCallCheck2.default)(this, ComponentBase); | |
| 3002 | + return _super.apply(this, arguments); | |
| 3003 | + } | |
| 3004 | + (0, _createClass2.default)(ComponentBase, [{ | |
| 3005 | + key: "__construct", | |
| 3006 | + value: function __construct() { | |
| 3007 | + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 3008 | + if (args.manager) { | |
| 3009 | + this.manager = args.manager; | |
| 3010 | + } | |
| 3011 | + this.commands = this.defaultCommands(); | |
| 3012 | + this.commandsInternal = this.defaultCommandsInternal(); | |
| 3013 | + this.hooks = this.defaultHooks(); | |
| 3014 | + this.routes = this.defaultRoutes(); | |
| 3015 | + this.tabs = this.defaultTabs(); | |
| 3016 | + this.shortcuts = this.defaultShortcuts(); | |
| 3017 | + this.utils = this.defaultUtils(); | |
| 3018 | + this.data = this.defaultData(); | |
| 3019 | + this.uiStates = this.defaultUiStates(); | |
| 3020 | + this.states = this.defaultStates(); | |
| 3021 | + this.defaultRoute = ''; | |
| 3022 | + this.currentTab = ''; | |
| 3023 | + } | |
| 3024 | + }, { | |
| 3025 | + key: "registerAPI", | |
| 3026 | + value: function registerAPI() { | |
| 3027 | + var _this = this; | |
| 3028 | + Object.entries(this.getTabs()).forEach(function (tab) { | |
| 3029 | + return _this.registerTabRoute(tab[0]); | |
| 3030 | + }); | |
| 3031 | + Object.entries(this.getRoutes()).forEach(function (_ref) { | |
| 3032 | + var _ref2 = (0, _slicedToArray2.default)(_ref, 2), | |
| 3033 | + route = _ref2[0], | |
| 3034 | + callback = _ref2[1]; | |
| 3035 | + return _this.registerRoute(route, callback); | |
| 3036 | + }); | |
| 3037 | + Object.entries(this.getCommands()).forEach(function (_ref3) { | |
| 3038 | + var _ref4 = (0, _slicedToArray2.default)(_ref3, 2), | |
| 3039 | + command = _ref4[0], | |
| 3040 | + callback = _ref4[1]; | |
| 3041 | + return _this.registerCommand(command, callback); | |
| 3042 | + }); | |
| 3043 | + Object.entries(this.getCommandsInternal()).forEach(function (_ref5) { | |
| 3044 | + var _ref6 = (0, _slicedToArray2.default)(_ref5, 2), | |
| 3045 | + command = _ref6[0], | |
| 3046 | + callback = _ref6[1]; | |
| 3047 | + return _this.registerCommandInternal(command, callback); | |
| 3048 | + }); | |
| 3049 | + Object.values(this.getHooks()).forEach(function (instance) { | |
| 3050 | + return _this.registerHook(instance); | |
| 3051 | + }); | |
| 3052 | + Object.entries(this.getData()).forEach(function (_ref7) { | |
| 3053 | + var _ref8 = (0, _slicedToArray2.default)(_ref7, 2), | |
| 3054 | + command = _ref8[0], | |
| 3055 | + callback = _ref8[1]; | |
| 3056 | + return _this.registerData(command, callback); | |
| 3057 | + }); | |
| 3058 | + Object.values(this.getUiStates()).forEach(function (instance) { | |
| 3059 | + return _this.registerUiState(instance); | |
| 3060 | + }); | |
| 3061 | + Object.entries(this.getStates()).forEach(function (_ref9) { | |
| 3062 | + var _ref10 = (0, _slicedToArray2.default)(_ref9, 2), | |
| 3063 | + id = _ref10[0], | |
| 3064 | + state = _ref10[1]; | |
| 3065 | + return _this.registerState(id, state); | |
| 3066 | + }); | |
| 3067 | + } | |
| 3068 | + | |
| 3069 | + // eslint-disable-next-line jsdoc/require-returns-check | |
| 3070 | + /** | |
| 3071 | + * @return {string} namespace | |
| 3072 | + */ | |
| 3073 | + }, { | |
| 3074 | + key: "getNamespace", | |
| 3075 | + value: function getNamespace() { | |
| 3076 | + (0, _forceMethodImplementation.default)(); | |
| 3077 | + } | |
| 3078 | + }, { | |
| 3079 | + key: "getRootContainer", | |
| 3080 | + value: function getRootContainer() { | |
| 3081 | + _deprecation.default.deprecated('getRootContainer()', '3.7.0', 'getServiceName()'); | |
| 3082 | + return this.getServiceName(); | |
| 3083 | + } | |
| 3084 | + }, { | |
| 3085 | + key: "getServiceName", | |
| 3086 | + value: function getServiceName() { | |
| 3087 | + return this.getNamespace().split('/')[0]; | |
| 3088 | + } | |
| 3089 | + }, { | |
| 3090 | + key: "store", | |
| 3091 | + get: function get() { | |
| 3092 | + return $e.store.get(this.getNamespace()); | |
| 3093 | + } | |
| 3094 | + }, { | |
| 3095 | + key: "defaultTabs", | |
| 3096 | + value: function defaultTabs() { | |
| 3097 | + return {}; | |
| 3098 | + } | |
| 3099 | + }, { | |
| 3100 | + key: "defaultRoutes", | |
| 3101 | + value: function defaultRoutes() { | |
| 3102 | + return {}; | |
| 3103 | + } | |
| 3104 | + }, { | |
| 3105 | + key: "defaultCommands", | |
| 3106 | + value: function defaultCommands() { | |
| 3107 | + return {}; | |
| 3108 | + } | |
| 3109 | + }, { | |
| 3110 | + key: "defaultCommandsInternal", | |
| 3111 | + value: function defaultCommandsInternal() { | |
| 3112 | + return {}; | |
| 3113 | + } | |
| 3114 | + }, { | |
| 3115 | + key: "defaultHooks", | |
| 3116 | + value: function defaultHooks() { | |
| 3117 | + return {}; | |
| 3118 | + } | |
| 3119 | + | |
| 3120 | + /** | |
| 3121 | + * Get the component's default UI states. | |
| 3122 | + * | |
| 3123 | + * @return {Object} default UI states | |
| 3124 | + */ | |
| 3125 | + }, { | |
| 3126 | + key: "defaultUiStates", | |
| 3127 | + value: function defaultUiStates() { | |
| 3128 | + return {}; | |
| 3129 | + } | |
| 3130 | + | |
| 3131 | + /** | |
| 3132 | + * Get the component's Redux slice settings. | |
| 3133 | + * | |
| 3134 | + * @return {Object} Redux slice settings | |
| 3135 | + */ | |
| 3136 | + }, { | |
| 3137 | + key: "defaultStates", | |
| 3138 | + value: function defaultStates() { | |
| 3139 | + return {}; | |
| 3140 | + } | |
| 3141 | + }, { | |
| 3142 | + key: "defaultShortcuts", | |
| 3143 | + value: function defaultShortcuts() { | |
| 3144 | + return {}; | |
| 3145 | + } | |
| 3146 | + }, { | |
| 3147 | + key: "defaultUtils", | |
| 3148 | + value: function defaultUtils() { | |
| 3149 | + return {}; | |
| 3150 | + } | |
| 3151 | + }, { | |
| 3152 | + key: "defaultData", | |
| 3153 | + value: function defaultData() { | |
| 3154 | + return {}; | |
| 3155 | + } | |
| 3156 | + }, { | |
| 3157 | + key: "getCommands", | |
| 3158 | + value: function getCommands() { | |
| 3159 | + return this.commands; | |
| 3160 | + } | |
| 3161 | + }, { | |
| 3162 | + key: "getCommandsInternal", | |
| 3163 | + value: function getCommandsInternal() { | |
| 3164 | + return this.commandsInternal; | |
| 3165 | + } | |
| 3166 | + }, { | |
| 3167 | + key: "getHooks", | |
| 3168 | + value: function getHooks() { | |
| 3169 | + return this.hooks; | |
| 3170 | + } | |
| 3171 | + | |
| 3172 | + /** | |
| 3173 | + * Retrieve the component's UI states. | |
| 3174 | + * | |
| 3175 | + * @return {Object} UI states | |
| 3176 | + */ | |
| 3177 | + }, { | |
| 3178 | + key: "getUiStates", | |
| 3179 | + value: function getUiStates() { | |
| 3180 | + return this.uiStates; | |
| 3181 | + } | |
| 3182 | + | |
| 3183 | + /** | |
| 3184 | + * Retrieve the component's Redux Slice. | |
| 3185 | + * | |
| 3186 | + * @return {Object} Redux Slice | |
| 3187 | + */ | |
| 3188 | + }, { | |
| 3189 | + key: "getStates", | |
| 3190 | + value: function getStates() { | |
| 3191 | + return this.states; | |
| 3192 | + } | |
| 3193 | + }, { | |
| 3194 | + key: "getRoutes", | |
| 3195 | + value: function getRoutes() { | |
| 3196 | + return this.routes; | |
| 3197 | + } | |
| 3198 | + }, { | |
| 3199 | + key: "getTabs", | |
| 3200 | + value: function getTabs() { | |
| 3201 | + return this.tabs; | |
| 3202 | + } | |
| 3203 | + }, { | |
| 3204 | + key: "getShortcuts", | |
| 3205 | + value: function getShortcuts() { | |
| 3206 | + return this.shortcuts; | |
| 3207 | + } | |
| 3208 | + }, { | |
| 3209 | + key: "getData", | |
| 3210 | + value: function getData() { | |
| 3211 | + return this.data; | |
| 3212 | + } | |
| 3213 | + | |
| 3214 | + /** | |
| 3215 | + * @param {string} command | |
| 3216 | + * @param {(()=>{}|CommandInfra)} context | |
| 3217 | + * @param {'default'|'internal'|'data'} commandsType | |
| 3218 | + */ | |
| 3219 | + }, { | |
| 3220 | + key: "registerCommand", | |
| 3221 | + value: function registerCommand(command, context) { | |
| 3222 | + var commandsType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'default'; | |
| 3223 | + var commandsManager; | |
| 3224 | + switch (commandsType) { | |
| 3225 | + case 'default': | |
| 3226 | + commandsManager = $e.commands; | |
| 3227 | + break; | |
| 3228 | + case 'internal': | |
| 3229 | + commandsManager = $e.commandsInternal; | |
| 3230 | + break; | |
| 3231 | + case 'data': | |
| 3232 | + commandsManager = $e.data; | |
| 3233 | + break; | |
| 3234 | + default: | |
| 3235 | + throw new Error("Invalid commands type: '".concat(command, "'")); | |
| 3236 | + } | |
| 3237 | + var fullCommand = this.getNamespace() + '/' + command, | |
| 3238 | + instanceType = context.getInstanceType ? context.getInstanceType() : false, | |
| 3239 | + registerConfig = { | |
| 3240 | + command: fullCommand, | |
| 3241 | + component: this | |
| 3242 | + }; | |
| 3243 | + | |
| 3244 | + // Support pure callback. | |
| 3245 | + if (!instanceType) { | |
| 3246 | + if ($e.devTools) { | |
| 3247 | + $e.devTools.log.warn("Attach command-callback-base, on command: '".concat(fullCommand, "', context is unknown type.")); | |
| 3248 | + } | |
| 3249 | + registerConfig.callback = context; | |
| 3250 | + | |
| 3251 | + // Unique class. | |
| 3252 | + context = /*#__PURE__*/function (_CommandCallbackBase) { | |
| 3253 | + (0, _inherits2.default)(context, _CommandCallbackBase); | |
| 3254 | + var _super2 = _createSuper(context); | |
| 3255 | + function context() { | |
| 3256 | + (0, _classCallCheck2.default)(this, context); | |
| 3257 | + return _super2.apply(this, arguments); | |
| 3258 | + } | |
| 3259 | + return (0, _createClass2.default)(context); | |
| 3260 | + }(_commandCallbackBase.default); | |
| 3261 | + } | |
| 3262 | + context.setRegisterConfig(registerConfig); | |
| 3263 | + commandsManager.register(this, command, context); | |
| 3264 | + } | |
| 3265 | + | |
| 3266 | + /** | |
| 3267 | + * @param {HookBase} instance | |
| 3268 | + */ | |
| 3269 | + }, { | |
| 3270 | + key: "registerHook", | |
| 3271 | + value: function registerHook(instance) { | |
| 3272 | + return instance.register(); | |
| 3273 | + } | |
| 3274 | + }, { | |
| 3275 | + key: "registerCommandInternal", | |
| 3276 | + value: function registerCommandInternal(command, context) { | |
| 3277 | + this.registerCommand(command, context, 'internal'); | |
| 3278 | + } | |
| 3279 | + | |
| 3280 | + /** | |
| 3281 | + * Register a UI state. | |
| 3282 | + * | |
| 3283 | + * @param {UiStateBase} instance - UI state instance. | |
| 3284 | + * | |
| 3285 | + * @return {void} | |
| 3286 | + */ | |
| 3287 | + }, { | |
| 3288 | + key: "registerUiState", | |
| 3289 | + value: function registerUiState(instance) { | |
| 3290 | + $e.uiStates.register(instance); | |
| 3291 | + } | |
| 3292 | + | |
| 3293 | + /** | |
| 3294 | + * Register a Redux Slice. | |
| 3295 | + * | |
| 3296 | + * @param {string} id - State id. | |
| 3297 | + * @param {Object} stateConfig - The state config. | |
| 3298 | + * | |
| 3299 | + * @return {void} | |
| 3300 | + */ | |
| 3301 | + }, { | |
| 3302 | + key: "registerState", | |
| 3303 | + value: function registerState(id, stateConfig) { | |
| 3304 | + id = this.getNamespace() + (id ? "/".concat(id) : ''); | |
| 3305 | + var slice = (0, _toolkit.createSlice)(_objectSpread(_objectSpread({}, stateConfig), {}, { | |
| 3306 | + name: id | |
| 3307 | + })); | |
| 3308 | + $e.store.register(id, slice); | |
| 3309 | + } | |
| 3310 | + }, { | |
| 3311 | + key: "registerRoute", | |
| 3312 | + value: function registerRoute(route, callback) { | |
| 3313 | + $e.routes.register(this, route, callback); | |
| 3314 | + } | |
| 3315 | + }, { | |
| 3316 | + key: "registerData", | |
| 3317 | + value: function registerData(command, context) { | |
| 3318 | + this.registerCommand(command, context, 'data'); | |
| 3319 | + } | |
| 3320 | + }, { | |
| 3321 | + key: "unregisterRoute", | |
| 3322 | + value: function unregisterRoute(route) { | |
| 3323 | + $e.routes.unregister(this, route); | |
| 3324 | + } | |
| 3325 | + }, { | |
| 3326 | + key: "registerTabRoute", | |
| 3327 | + value: function registerTabRoute(tab) { | |
| 3328 | + var _this2 = this; | |
| 3329 | + this.registerRoute(tab, function (args) { | |
| 3330 | + return _this2.activateTab(tab, args); | |
| 3331 | + }); | |
| 3332 | + } | |
| 3333 | + }, { | |
| 3334 | + key: "dependency", | |
| 3335 | + value: function dependency() { | |
| 3336 | + return true; | |
| 3337 | + } | |
| 3338 | + }, { | |
| 3339 | + key: "open", | |
| 3340 | + value: function open() { | |
| 3341 | + return true; | |
| 3342 | + } | |
| 3343 | + }, { | |
| 3344 | + key: "close", | |
| 3345 | + value: function close() { | |
| 3346 | + if (!this.isOpen) { | |
| 3347 | + return false; | |
| 3348 | + } | |
| 3349 | + this.isOpen = false; | |
| 3350 | + this.inactivate(); | |
| 3351 | + $e.routes.clearCurrent(this.getNamespace()); | |
| 3352 | + $e.routes.clearHistory(this.getServiceName()); | |
| 3353 | + return true; | |
| 3354 | + } | |
| 3355 | + }, { | |
| 3356 | + key: "activate", | |
| 3357 | + value: function activate() { | |
| 3358 | + $e.components.activate(this.getNamespace()); | |
| 3359 | + } | |
| 3360 | + }, { | |
| 3361 | + key: "inactivate", | |
| 3362 | + value: function inactivate() { | |
| 3363 | + $e.components.inactivate(this.getNamespace()); | |
| 3364 | + } | |
| 3365 | + }, { | |
| 3366 | + key: "isActive", | |
| 3367 | + value: function isActive() { | |
| 3368 | + return $e.components.isActive(this.getNamespace()); | |
| 3369 | + } | |
| 3370 | + }, { | |
| 3371 | + key: "onRoute", | |
| 3372 | + value: function onRoute(route) { | |
| 3373 | + this.toggleRouteClass(route, true); | |
| 3374 | + this.toggleHistoryClass(); | |
| 3375 | + this.activate(); | |
| 3376 | + this.trigger('route/open', route); | |
| 3377 | + } | |
| 3378 | + }, { | |
| 3379 | + key: "onCloseRoute", | |
| 3380 | + value: function onCloseRoute(route) { | |
| 3381 | + this.toggleRouteClass(route, false); | |
| 3382 | + this.inactivate(); | |
| 3383 | + this.trigger('route/close', route); | |
| 3384 | + } | |
| 3385 | + }, { | |
| 3386 | + key: "setDefaultRoute", | |
| 3387 | + value: function setDefaultRoute(route) { | |
| 3388 | + this.defaultRoute = this.getNamespace() + '/' + route; | |
| 3389 | + } | |
| 3390 | + }, { | |
| 3391 | + key: "getDefaultRoute", | |
| 3392 | + value: function getDefaultRoute() { | |
| 3393 | + return this.defaultRoute; | |
| 3394 | + } | |
| 3395 | + }, { | |
| 3396 | + key: "removeTab", | |
| 3397 | + value: function removeTab(tab) { | |
| 3398 | + delete this.tabs[tab]; | |
| 3399 | + this.unregisterRoute(tab); | |
| 3400 | + } | |
| 3401 | + }, { | |
| 3402 | + key: "hasTab", | |
| 3403 | + value: function hasTab(tab) { | |
| 3404 | + return !!this.tabs[tab]; | |
| 3405 | + } | |
| 3406 | + }, { | |
| 3407 | + key: "addTab", | |
| 3408 | + value: function addTab(tab, args, position) { | |
| 3409 | + var _this3 = this; | |
| 3410 | + this.tabs[tab] = args; | |
| 3411 | + // It can be 0. | |
| 3412 | + if ('undefined' !== typeof position) { | |
| 3413 | + var newTabs = {}; | |
| 3414 | + var ids = Object.keys(this.tabs); | |
| 3415 | + // Remove new tab | |
| 3416 | + ids.pop(); | |
| 3417 | + | |
| 3418 | + // Add it to position. | |
| 3419 | + ids.splice(position, 0, tab); | |
| 3420 | + ids.forEach(function (id) { | |
| 3421 | + newTabs[id] = _this3.tabs[id]; | |
| 3422 | + }); | |
| 3423 | + this.tabs = newTabs; | |
| 3424 | + } | |
| 3425 | + this.registerTabRoute(tab); | |
| 3426 | + } | |
| 3427 | + }, { | |
| 3428 | + key: "getTabsWrapperSelector", | |
| 3429 | + value: function getTabsWrapperSelector() { | |
| 3430 | + return ''; | |
| 3431 | + } | |
| 3432 | + }, { | |
| 3433 | + key: "getTabRoute", | |
| 3434 | + value: function getTabRoute(tab) { | |
| 3435 | + return this.getNamespace() + '/' + tab; | |
| 3436 | + } | |
| 3437 | + }, { | |
| 3438 | + key: "renderTab", | |
| 3439 | + value: function renderTab(tab) {} // eslint-disable-line | |
| 3440 | + }, { | |
| 3441 | + key: "activateTab", | |
| 3442 | + value: function activateTab(tab, args) { | |
| 3443 | + var _this4 = this; | |
| 3444 | + this.currentTab = tab; | |
| 3445 | + this.renderTab(tab, args); | |
| 3446 | + jQuery(this.getTabsWrapperSelector() + ' .elementor-component-tab').off('click').on('click', function (event) { | |
| 3447 | + $e.route(_this4.getTabRoute(event.currentTarget.dataset.tab), args); | |
| 3448 | + }).removeClass('elementor-active').filter('[data-tab="' + tab + '"]').addClass('elementor-active'); | |
| 3449 | + } | |
| 3450 | + }, { | |
| 3451 | + key: "getActiveTabConfig", | |
| 3452 | + value: function getActiveTabConfig() { | |
| 3453 | + return this.tabs[this.currentTab] || {}; | |
| 3454 | + } | |
| 3455 | + }, { | |
| 3456 | + key: "getBodyClass", | |
| 3457 | + value: function getBodyClass(route) { | |
| 3458 | + return 'e-route-' + route.replace(/\//g, '-'); | |
| 3459 | + } | |
| 3460 | + | |
| 3461 | + /** | |
| 3462 | + * If command includes uppercase character convert it to lowercase and add `-`. | |
| 3463 | + * e.g: `CopyAll` is converted to `copy-all`. | |
| 3464 | + * | |
| 3465 | + * @param {string} commandName | |
| 3466 | + */ | |
| 3467 | + }, { | |
| 3468 | + key: "normalizeCommandName", | |
| 3469 | + value: function normalizeCommandName(commandName) { | |
| 3470 | + return commandName.replace(/[A-Z]/g, function (match, offset) { | |
| 3471 | + return (offset > 0 ? '-' : '') + match.toLowerCase(); | |
| 3472 | + }); | |
| 3473 | + } | |
| 3474 | + | |
| 3475 | + /** | |
| 3476 | + * @param {{}} commandsFromImport | |
| 3477 | + * @return {{}} imported commands | |
| 3478 | + */ | |
| 3479 | + }, { | |
| 3480 | + key: "importCommands", | |
| 3481 | + value: function importCommands(commandsFromImport) { | |
| 3482 | + var _this5 = this; | |
| 3483 | + var commands = {}; | |
| 3484 | + | |
| 3485 | + // Convert `Commands` to `ComponentBase` workable format. | |
| 3486 | + Object.entries(commandsFromImport).forEach(function (_ref11) { | |
| 3487 | + var _ref12 = (0, _slicedToArray2.default)(_ref11, 2), | |
| 3488 | + className = _ref12[0], | |
| 3489 | + Class = _ref12[1]; | |
| 3490 | + var command = _this5.normalizeCommandName(className); | |
| 3491 | + commands[command] = Class; | |
| 3492 | + }); | |
| 3493 | + return commands; | |
| 3494 | + } | |
| 3495 | + }, { | |
| 3496 | + key: "importHooks", | |
| 3497 | + value: function importHooks(hooksFromImport) { | |
| 3498 | + var hooks = {}; | |
| 3499 | + for (var key in hooksFromImport) { | |
| 3500 | + var hook = new hooksFromImport[key](); | |
| 3501 | + hooks[hook.getId()] = hook; | |
| 3502 | + } | |
| 3503 | + return hooks; | |
| 3504 | + } | |
| 3505 | + | |
| 3506 | + /** | |
| 3507 | + * Import & initialize the component's UI states. | |
| 3508 | + * Should be used inside `defaultUiState()`. | |
| 3509 | + * | |
| 3510 | + * @param {Object} statesFromImport - UI states from import. | |
| 3511 | + * | |
| 3512 | + * @return {Object} UI States | |
| 3513 | + */ | |
| 3514 | + }, { | |
| 3515 | + key: "importUiStates", | |
| 3516 | + value: function importUiStates(statesFromImport) { | |
| 3517 | + var _this6 = this; | |
| 3518 | + var uiStates = {}; | |
| 3519 | + Object.values(statesFromImport).forEach(function (className) { | |
| 3520 | + var uiState = new className(_this6); | |
| 3521 | + uiStates[uiState.getId()] = uiState; | |
| 3522 | + }); | |
| 3523 | + return uiStates; | |
| 3524 | + } | |
| 3525 | + | |
| 3526 | + /** | |
| 3527 | + * Set a UI state value. | |
| 3528 | + * TODO: Should we provide such function? Maybe the developer should implicitly pass the full state ID? | |
| 3529 | + * | |
| 3530 | + * @param {string} state - Non-prefixed state ID. | |
| 3531 | + * @param {*} value - New state value. | |
| 3532 | + * | |
| 3533 | + * @return {void} | |
| 3534 | + */ | |
| 3535 | + }, { | |
| 3536 | + key: "setUiState", | |
| 3537 | + value: function setUiState(state, value) { | |
| 3538 | + $e.uiStates.set("".concat(this.getNamespace(), "/").concat(state), value); | |
| 3539 | + } | |
| 3540 | + }, { | |
| 3541 | + key: "toggleRouteClass", | |
| 3542 | + value: function toggleRouteClass(route, state) { | |
| 3543 | + document.body.classList.toggle(this.getBodyClass(route), state); | |
| 3544 | + } | |
| 3545 | + }, { | |
| 3546 | + key: "toggleHistoryClass", | |
| 3547 | + value: function toggleHistoryClass() { | |
| 3548 | + document.body.classList.toggle('e-routes-has-history', !!$e.routes.getHistory(this.getServiceName()).length); | |
| 3549 | + } | |
| 3550 | + }]); | |
| 3551 | + return ComponentBase; | |
| 3552 | +}(_module.default); | |
| 3553 | +exports["default"] = ComponentBase; | |
| 3554 | + | |
| 3555 | +/***/ }), | |
| 3556 | + | |
| 3557 | +/***/ "../modules/web-cli/assets/js/utils/console.js": | |
| 3558 | +/*!*****************************************************!*\ | |
| 3559 | + !*** ../modules/web-cli/assets/js/utils/console.js ***! | |
| 3560 | + \*****************************************************/ | |
| 3561 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 3562 | + | |
| 3563 | +"use strict"; | |
| 3564 | + | |
| 3565 | + | |
| 3566 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 3567 | +Object.defineProperty(exports, "__esModule", ({ | |
| 3568 | + value: true | |
| 3569 | +})); | |
| 3570 | +exports["default"] = void 0; | |
| 3571 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 3572 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 3573 | +var Console = /*#__PURE__*/function () { | |
| 3574 | + function Console() { | |
| 3575 | + (0, _classCallCheck2.default)(this, Console); | |
| 3576 | + } | |
| 3577 | + (0, _createClass2.default)(Console, null, [{ | |
| 3578 | + key: "error", | |
| 3579 | + value: function error(message) { | |
| 3580 | + // Show an error if devTools is available. | |
| 3581 | + if ($e.devTools) { | |
| 3582 | + $e.devTools.log.error(message); | |
| 3583 | + } | |
| 3584 | + | |
| 3585 | + // If not a 'Hook-Break' then show error. | |
| 3586 | + if (!(message instanceof $e.modules.HookBreak)) { | |
| 3587 | + // eslint-disable-next-line no-console | |
| 3588 | + console.error(message); | |
| 3589 | + } | |
| 3590 | + } | |
| 3591 | + }, { | |
| 3592 | + key: "warn", | |
| 3593 | + value: function warn() { | |
| 3594 | + var _console; | |
| 3595 | + var style = "font-size: 12px; background-image: url(\"".concat(elementorWebCliConfig.urls.assets, "images/logo-icon.png\"); background-repeat: no-repeat; background-size: contain;"); | |
| 3596 | + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 3597 | + args[_key] = arguments[_key]; | |
| 3598 | + } | |
| 3599 | + args.unshift('%c %c', style, ''); | |
| 3600 | + (_console = console).warn.apply(_console, args); // eslint-disable-line no-console | |
| 3601 | + } | |
| 3602 | + }]); | |
| 3603 | + return Console; | |
| 3604 | +}(); | |
| 3605 | +exports["default"] = Console; | |
| 3606 | + | |
| 3607 | +/***/ }), | |
| 3608 | + | |
| 3609 | +/***/ "../modules/web-cli/assets/js/utils/deprecation.js": | |
| 3610 | +/*!*********************************************************!*\ | |
| 3611 | + !*** ../modules/web-cli/assets/js/utils/deprecation.js ***! | |
| 3612 | + \*********************************************************/ | |
| 3613 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 3614 | + | |
| 3615 | +"use strict"; | |
| 3616 | + | |
| 3617 | + | |
| 3618 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 3619 | +Object.defineProperty(exports, "__esModule", ({ | |
| 3620 | + value: true | |
| 3621 | +})); | |
| 3622 | +exports["default"] = void 0; | |
| 3623 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 3624 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 3625 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 3626 | +var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js")); | |
| 3627 | +// Copied from `modules/dev-tools/assets/js/deprecation.js` | |
| 3628 | +/** | |
| 3629 | + * @typedef {Object} Version | |
| 3630 | + * @property {number} major1 The first number | |
| 3631 | + * @property {number} major2 The second number | |
| 3632 | + * @property {number} minor The third number | |
| 3633 | + * @property {string} build The fourth number | |
| 3634 | + */ | |
| 3635 | + | |
| 3636 | +var softDeprecated = function softDeprecated(name, version, replacement) { | |
| 3637 | + if (elementorWebCliConfig.isDebug) { | |
| 3638 | + deprecatedMessage('soft', name, version, replacement); | |
| 3639 | + } | |
| 3640 | +}; | |
| 3641 | +var hardDeprecated = function hardDeprecated(name, version, replacement) { | |
| 3642 | + deprecatedMessage('hard', name, version, replacement); | |
| 3643 | +}; | |
| 3644 | +var deprecatedMessage = function deprecatedMessage(type, name, version, replacement) { | |
| 3645 | + var message = "`".concat(name, "` is ").concat(type, " deprecated since ").concat(version); | |
| 3646 | + if (replacement) { | |
| 3647 | + message += " - Use `".concat(replacement, "` instead"); | |
| 3648 | + } | |
| 3649 | + _console.default.warn(message); | |
| 3650 | +}; | |
| 3651 | +var Deprecation = /*#__PURE__*/function () { | |
| 3652 | + function Deprecation() { | |
| 3653 | + (0, _classCallCheck2.default)(this, Deprecation); | |
| 3654 | + } | |
| 3655 | + (0, _createClass2.default)(Deprecation, null, [{ | |
| 3656 | + key: "deprecated", | |
| 3657 | + value: function deprecated(name, version, replacement) { | |
| 3658 | + if (this.isHardDeprecated(version)) { | |
| 3659 | + hardDeprecated(name, version, replacement); | |
| 3660 | + } else { | |
| 3661 | + softDeprecated(name, version, replacement); | |
| 3662 | + } | |
| 3663 | + } | |
| 3664 | + | |
| 3665 | + /** | |
| 3666 | + * @param {string} version | |
| 3667 | + * | |
| 3668 | + * @return {Version} | |
| 3669 | + */ | |
| 3670 | + }, { | |
| 3671 | + key: "parseVersion", | |
| 3672 | + value: function parseVersion(version) { | |
| 3673 | + var versionParts = version.split('.'); | |
| 3674 | + if (versionParts.length < 3 || versionParts.length > 4) { | |
| 3675 | + throw new RangeError('Invalid Semantic Version string provided'); | |
| 3676 | + } | |
| 3677 | + var _versionParts = (0, _slicedToArray2.default)(versionParts, 4), | |
| 3678 | + major1 = _versionParts[0], | |
| 3679 | + major2 = _versionParts[1], | |
| 3680 | + minor = _versionParts[2], | |
| 3681 | + _versionParts$ = _versionParts[3], | |
| 3682 | + build = _versionParts$ === void 0 ? '' : _versionParts$; | |
| 3683 | + return { | |
| 3684 | + major1: parseInt(major1), | |
| 3685 | + major2: parseInt(major2), | |
| 3686 | + minor: parseInt(minor), | |
| 3687 | + build: build | |
| 3688 | + }; | |
| 3689 | + } | |
| 3690 | + | |
| 3691 | + /** | |
| 3692 | + * Get total of major. | |
| 3693 | + * | |
| 3694 | + * 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, | |
| 3695 | + * versions with major2 more then 9 will be added to total. | |
| 3696 | + * | |
| 3697 | + * @param {Version} versionObj | |
| 3698 | + * | |
| 3699 | + * @return {number} | |
| 3700 | + */ | |
| 3701 | + }, { | |
| 3702 | + key: "getTotalMajor", | |
| 3703 | + value: function getTotalMajor(versionObj) { | |
| 3704 | + var total = parseInt("".concat(versionObj.major1).concat(versionObj.major2, "0")); | |
| 3705 | + total = Number((total / 10).toFixed(0)); | |
| 3706 | + if (versionObj.major2 > 9) { | |
| 3707 | + total = versionObj.major2 - 9; | |
| 3708 | + } | |
| 3709 | + return total; | |
| 3710 | + } | |
| 3711 | + | |
| 3712 | + /** | |
| 3713 | + * @param {string} version1 | |
| 3714 | + * @param {string} version2 | |
| 3715 | + * | |
| 3716 | + * @return {number} | |
| 3717 | + */ | |
| 3718 | + }, { | |
| 3719 | + key: "compareVersion", | |
| 3720 | + value: function compareVersion(version1, version2) { | |
| 3721 | + var _this = this; | |
| 3722 | + return [this.parseVersion(version1), this.parseVersion(version2)].map(function (versionObj) { | |
| 3723 | + return _this.getTotalMajor(versionObj); | |
| 3724 | + }).reduce(function (acc, major) { | |
| 3725 | + return acc - major; | |
| 3726 | + }); | |
| 3727 | + } | |
| 3728 | + | |
| 3729 | + /** | |
| 3730 | + * @param {string} version | |
| 3731 | + * | |
| 3732 | + * @return {boolean} | |
| 3733 | + */ | |
| 3734 | + }, { | |
| 3735 | + key: "isSoftDeprecated", | |
| 3736 | + value: function isSoftDeprecated(version) { | |
| 3737 | + var total = this.compareVersion(version, elementorWebCliConfig.version); | |
| 3738 | + return total <= 4; | |
| 3739 | + } | |
| 3740 | + | |
| 3741 | + /** | |
| 3742 | + * @param {string} version | |
| 3743 | + * @return {boolean} | |
| 3744 | + */ | |
| 3745 | + }, { | |
| 3746 | + key: "isHardDeprecated", | |
| 3747 | + value: function isHardDeprecated(version) { | |
| 3748 | + var total = this.compareVersion(version, elementorWebCliConfig.version); | |
| 3749 | + return total < 0 || total >= 8; | |
| 3750 | + } | |
| 3751 | + }]); | |
| 3752 | + return Deprecation; | |
| 3753 | +}(); | |
| 3754 | +exports["default"] = Deprecation; | |
| 3755 | + | |
| 3756 | +/***/ }), | |
| 3757 | + | |
| 3758 | +/***/ "../modules/web-cli/assets/js/utils/force-method-implementation.js": | |
| 3759 | +/*!*************************************************************************!*\ | |
| 3760 | + !*** ../modules/web-cli/assets/js/utils/force-method-implementation.js ***! | |
| 3761 | + \*************************************************************************/ | |
| 3762 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 3763 | + | |
| 3764 | +"use strict"; | |
| 3765 | + | |
| 3766 | + | |
| 3767 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 3768 | +Object.defineProperty(exports, "__esModule", ({ | |
| 3769 | + value: true | |
| 3770 | +})); | |
| 3771 | +exports["default"] = exports.ForceMethodImplementation = void 0; | |
| 3772 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 3773 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 3774 | +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js")); | |
| 3775 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 3776 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 3777 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 3778 | +var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js")); | |
| 3779 | +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); }; } | |
| 3780 | +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; } } | |
| 3781 | +// TODO: Copied from `assets/dev/js/modules/imports/force-method-implementation.js`; | |
| 3782 | +var ForceMethodImplementation = /*#__PURE__*/function (_Error) { | |
| 3783 | + (0, _inherits2.default)(ForceMethodImplementation, _Error); | |
| 3784 | + var _super = _createSuper(ForceMethodImplementation); | |
| 3785 | + function ForceMethodImplementation() { | |
| 3786 | + var _this; | |
| 3787 | + var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | |
| 3788 | + (0, _classCallCheck2.default)(this, ForceMethodImplementation); | |
| 3789 | + _this = _super.call(this, "".concat(info.isStatic ? 'static ' : '').concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality.")); | |
| 3790 | + Error.captureStackTrace((0, _assertThisInitialized2.default)(_this), ForceMethodImplementation); | |
| 3791 | + return _this; | |
| 3792 | + } | |
| 3793 | + return (0, _createClass2.default)(ForceMethodImplementation); | |
| 3794 | +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 3795 | +exports.ForceMethodImplementation = ForceMethodImplementation; | |
| 3796 | +var _default = function _default() { | |
| 3797 | + var stack = Error().stack, | |
| 3798 | + caller = stack.split('\n')[2].trim(), | |
| 3799 | + callerName = caller.startsWith('at new') ? 'constructor' : caller.split(' ')[1], | |
| 3800 | + info = {}; | |
| 3801 | + info.functionName = callerName; | |
| 3802 | + info.fullName = callerName; | |
| 3803 | + if (info.functionName.includes('.')) { | |
| 3804 | + var parts = info.functionName.split('.'); | |
| 3805 | + info.className = parts[0]; | |
| 3806 | + info.functionName = parts[1]; | |
| 3807 | + } else { | |
| 3808 | + info.isStatic = true; | |
| 3809 | + } | |
| 3810 | + throw new ForceMethodImplementation(info); | |
| 3811 | +}; | |
| 3812 | +exports["default"] = _default; | |
| 3813 | + | |
| 3814 | +/***/ }), | |
| 3815 | + | |
| 3816 | +/***/ "../node_modules/redux-thunk/es/index.js": | |
| 3817 | +/*!***********************************************!*\ | |
| 3818 | + !*** ../node_modules/redux-thunk/es/index.js ***! | |
| 3819 | + \***********************************************/ | |
| 3820 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 3821 | + | |
| 3822 | +"use strict"; | |
| 3823 | +__webpack_require__.r(__webpack_exports__); | |
| 3824 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3825 | +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 3826 | +/* harmony export */ }); | |
| 3827 | +/** A function that accepts a potential "extra argument" value to be injected later, | |
| 3828 | + * and returns an instance of the thunk middleware that uses that value | |
| 3829 | + */ | |
| 3830 | +function createThunkMiddleware(extraArgument) { | |
| 3831 | + // Standard Redux middleware definition pattern: | |
| 3832 | + // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware | |
| 3833 | + var middleware = function middleware(_ref) { | |
| 3834 | + var dispatch = _ref.dispatch, | |
| 3835 | + getState = _ref.getState; | |
| 3836 | + return function (next) { | |
| 3837 | + return function (action) { | |
| 3838 | + // The thunk middleware looks for any functions that were passed to `store.dispatch`. | |
| 3839 | + // If this "action" is really a function, call it and return the result. | |
| 3840 | + if (typeof action === 'function') { | |
| 3841 | + // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg" | |
| 3842 | + return action(dispatch, getState, extraArgument); | |
| 3843 | + } // Otherwise, pass the action down the middleware chain as usual | |
| 3844 | + | |
| 3845 | + | |
| 3846 | + return next(action); | |
| 3847 | + }; | |
| 3848 | + }; | |
| 3849 | + }; | |
| 3850 | + | |
| 3851 | + return middleware; | |
| 3852 | +} | |
| 3853 | + | |
| 3854 | +var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version | |
| 3855 | +// with whatever "extra arg" they want to inject into their thunks | |
| 3856 | + | |
| 3857 | +thunk.withExtraArgument = createThunkMiddleware; | |
| 3858 | +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (thunk); | |
| 3859 | + | |
| 3860 | +/***/ }), | |
| 3861 | + | |
| 3862 | +/***/ "../node_modules/redux/es/redux.js": | |
| 3863 | +/*!*****************************************!*\ | |
| 3864 | + !*** ../node_modules/redux/es/redux.js ***! | |
| 3865 | + \*****************************************/ | |
| 3866 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 3867 | + | |
| 3868 | +"use strict"; | |
| 3869 | +__webpack_require__.r(__webpack_exports__); | |
| 3870 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 3871 | +/* harmony export */ "__DO_NOT_USE__ActionTypes": () => (/* binding */ ActionTypes), | |
| 3872 | +/* harmony export */ "applyMiddleware": () => (/* binding */ applyMiddleware), | |
| 3873 | +/* harmony export */ "bindActionCreators": () => (/* binding */ bindActionCreators), | |
| 3874 | +/* harmony export */ "combineReducers": () => (/* binding */ combineReducers), | |
| 3875 | +/* harmony export */ "compose": () => (/* binding */ compose), | |
| 3876 | +/* harmony export */ "createStore": () => (/* binding */ createStore), | |
| 3877 | +/* harmony export */ "legacy_createStore": () => (/* binding */ legacy_createStore) | |
| 3878 | +/* harmony export */ }); | |
| 3879 | +/* 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"); | |
| 3880 | + | |
| 3881 | + | |
| 3882 | +/** | |
| 3883 | + * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js | |
| 3884 | + * | |
| 3885 | + * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes | |
| 3886 | + * during build. | |
| 3887 | + * @param {number} code | |
| 3888 | + */ | |
| 3889 | +function formatProdErrorMessage(code) { | |
| 3890 | + 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. '; | |
| 3891 | +} | |
| 3892 | + | |
| 3893 | +// Inlined version of the `symbol-observable` polyfill | |
| 3894 | +var $$observable = (function () { | |
| 3895 | + return typeof Symbol === 'function' && Symbol.observable || '@@observable'; | |
| 3896 | +})(); | |
| 3897 | + | |
| 3898 | +/** | |
| 3899 | + * These are private action types reserved by Redux. | |
| 3900 | + * For any unknown actions, you must return the current state. | |
| 3901 | + * If the current state is undefined, you must return the initial state. | |
| 3902 | + * Do not reference these action types directly in your code. | |
| 3903 | + */ | |
| 3904 | +var randomString = function randomString() { | |
| 3905 | + return Math.random().toString(36).substring(7).split('').join('.'); | |
| 3906 | +}; | |
| 3907 | + | |
| 3908 | +var ActionTypes = { | |
| 3909 | + INIT: "@@redux/INIT" + randomString(), | |
| 3910 | + REPLACE: "@@redux/REPLACE" + randomString(), | |
| 3911 | + PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { | |
| 3912 | + return "@@redux/PROBE_UNKNOWN_ACTION" + randomString(); | |
| 3913 | + } | |
| 3914 | +}; | |
| 3915 | + | |
| 3916 | +/** | |
| 3917 | + * @param {any} obj The object to inspect. | |
| 3918 | + * @returns {boolean} True if the argument appears to be a plain object. | |
| 3919 | + */ | |
| 3920 | +function isPlainObject(obj) { | |
| 3921 | + if (typeof obj !== 'object' || obj === null) return false; | |
| 3922 | + var proto = obj; | |
| 3923 | + | |
| 3924 | + while (Object.getPrototypeOf(proto) !== null) { | |
| 3925 | + proto = Object.getPrototypeOf(proto); | |
| 3926 | + } | |
| 3927 | + | |
| 3928 | + return Object.getPrototypeOf(obj) === proto; | |
| 3929 | +} | |
| 3930 | + | |
| 3931 | +// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of | |
| 3932 | +function miniKindOf(val) { | |
| 3933 | + if (val === void 0) return 'undefined'; | |
| 3934 | + if (val === null) return 'null'; | |
| 3935 | + var type = typeof val; | |
| 3936 | + | |
| 3937 | + switch (type) { | |
| 3938 | + case 'boolean': | |
| 3939 | + case 'string': | |
| 3940 | + case 'number': | |
| 3941 | + case 'symbol': | |
| 3942 | + case 'function': | |
| 3943 | + { | |
| 3944 | + return type; | |
| 3945 | + } | |
| 3946 | + } | |
| 3947 | + | |
| 3948 | + if (Array.isArray(val)) return 'array'; | |
| 3949 | + if (isDate(val)) return 'date'; | |
| 3950 | + if (isError(val)) return 'error'; | |
| 3951 | + var constructorName = ctorName(val); | |
| 3952 | + | |
| 3953 | + switch (constructorName) { | |
| 3954 | + case 'Symbol': | |
| 3955 | + case 'Promise': | |
| 3956 | + case 'WeakMap': | |
| 3957 | + case 'WeakSet': | |
| 3958 | + case 'Map': | |
| 3959 | + case 'Set': | |
| 3960 | + return constructorName; | |
| 3961 | + } // other | |
| 3962 | + | |
| 3963 | + | |
| 3964 | + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); | |
| 3965 | +} | |
| 3966 | + | |
| 3967 | +function ctorName(val) { | |
| 3968 | + return typeof val.constructor === 'function' ? val.constructor.name : null; | |
| 3969 | +} | |
| 3970 | + | |
| 3971 | +function isError(val) { | |
| 3972 | + return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'; | |
| 3973 | +} | |
| 3974 | + | |
| 3975 | +function isDate(val) { | |
| 3976 | + if (val instanceof Date) return true; | |
| 3977 | + return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function'; | |
| 3978 | +} | |
| 3979 | + | |
| 3980 | +function kindOf(val) { | |
| 3981 | + var typeOfVal = typeof val; | |
| 3982 | + | |
| 3983 | + if (true) { | |
| 3984 | + typeOfVal = miniKindOf(val); | |
| 3985 | + } | |
| 3986 | + | |
| 3987 | + return typeOfVal; | |
| 3988 | +} | |
| 3989 | + | |
| 3990 | +/** | |
| 3991 | + * @deprecated | |
| 3992 | + * | |
| 3993 | + * **We recommend using the `configureStore` method | |
| 3994 | + * of the `@reduxjs/toolkit` package**, which replaces `createStore`. | |
| 3995 | + * | |
| 3996 | + * Redux Toolkit is our recommended approach for writing Redux logic today, | |
| 3997 | + * including store setup, reducers, data fetching, and more. | |
| 3998 | + * | |
| 3999 | + * **For more details, please read this Redux docs page:** | |
| 4000 | + * **https://redux.js.org/introduction/why-rtk-is-redux-today** | |
| 4001 | + * | |
| 4002 | + * `configureStore` from Redux Toolkit is an improved version of `createStore` that | |
| 4003 | + * simplifies setup and helps avoid common bugs. | |
| 4004 | + * | |
| 4005 | + * You should not be using the `redux` core package by itself today, except for learning purposes. | |
| 4006 | + * The `createStore` method from the core `redux` package will not be removed, but we encourage | |
| 4007 | + * all users to migrate to using Redux Toolkit for all Redux code. | |
| 4008 | + * | |
| 4009 | + * If you want to use `createStore` without this visual deprecation warning, use | |
| 4010 | + * the `legacy_createStore` import instead: | |
| 4011 | + * | |
| 4012 | + * `import { legacy_createStore as createStore} from 'redux'` | |
| 4013 | + * | |
| 4014 | + */ | |
| 4015 | + | |
| 4016 | +function createStore(reducer, preloadedState, enhancer) { | |
| 4017 | + var _ref2; | |
| 4018 | + | |
| 4019 | + if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') { | |
| 4020 | + 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.'); | |
| 4021 | + } | |
| 4022 | + | |
| 4023 | + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { | |
| 4024 | + enhancer = preloadedState; | |
| 4025 | + preloadedState = undefined; | |
| 4026 | + } | |
| 4027 | + | |
| 4028 | + if (typeof enhancer !== 'undefined') { | |
| 4029 | + if (typeof enhancer !== 'function') { | |
| 4030 | + throw new Error( false ? 0 : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'"); | |
| 4031 | + } | |
| 4032 | + | |
| 4033 | + return enhancer(createStore)(reducer, preloadedState); | |
| 4034 | + } | |
| 4035 | + | |
| 4036 | + if (typeof reducer !== 'function') { | |
| 4037 | + throw new Error( false ? 0 : "Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'"); | |
| 4038 | + } | |
| 4039 | + | |
| 4040 | + var currentReducer = reducer; | |
| 4041 | + var currentState = preloadedState; | |
| 4042 | + var currentListeners = []; | |
| 4043 | + var nextListeners = currentListeners; | |
| 4044 | + var isDispatching = false; | |
| 4045 | + /** | |
| 4046 | + * This makes a shallow copy of currentListeners so we can use | |
| 4047 | + * nextListeners as a temporary list while dispatching. | |
| 4048 | + * | |
| 4049 | + * This prevents any bugs around consumers calling | |
| 4050 | + * subscribe/unsubscribe in the middle of a dispatch. | |
| 4051 | + */ | |
| 4052 | + | |
| 4053 | + function ensureCanMutateNextListeners() { | |
| 4054 | + if (nextListeners === currentListeners) { | |
| 4055 | + nextListeners = currentListeners.slice(); | |
| 4056 | + } | |
| 4057 | + } | |
| 4058 | + /** | |
| 4059 | + * Reads the state tree managed by the store. | |
| 4060 | + * | |
| 4061 | + * @returns {any} The current state tree of your application. | |
| 4062 | + */ | |
| 4063 | + | |
| 4064 | + | |
| 4065 | + function getState() { | |
| 4066 | + if (isDispatching) { | |
| 4067 | + 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.'); | |
| 4068 | + } | |
| 4069 | + | |
| 4070 | + return currentState; | |
| 4071 | + } | |
| 4072 | + /** | |
| 4073 | + * Adds a change listener. It will be called any time an action is dispatched, | |
| 4074 | + * and some part of the state tree may potentially have changed. You may then | |
| 4075 | + * call `getState()` to read the current state tree inside the callback. | |
| 4076 | + * | |
| 4077 | + * You may call `dispatch()` from a change listener, with the following | |
| 4078 | + * caveats: | |
| 4079 | + * | |
| 4080 | + * 1. The subscriptions are snapshotted just before every `dispatch()` call. | |
| 4081 | + * If you subscribe or unsubscribe while the listeners are being invoked, this | |
| 4082 | + * will not have any effect on the `dispatch()` that is currently in progress. | |
| 4083 | + * However, the next `dispatch()` call, whether nested or not, will use a more | |
| 4084 | + * recent snapshot of the subscription list. | |
| 4085 | + * | |
| 4086 | + * 2. The listener should not expect to see all state changes, as the state | |
| 4087 | + * might have been updated multiple times during a nested `dispatch()` before | |
| 4088 | + * the listener is called. It is, however, guaranteed that all subscribers | |
| 4089 | + * registered before the `dispatch()` started will be called with the latest | |
| 4090 | + * state by the time it exits. | |
| 4091 | + * | |
| 4092 | + * @param {Function} listener A callback to be invoked on every dispatch. | |
| 4093 | + * @returns {Function} A function to remove this change listener. | |
| 4094 | + */ | |
| 4095 | + | |
| 4096 | + | |
| 4097 | + function subscribe(listener) { | |
| 4098 | + if (typeof listener !== 'function') { | |
| 4099 | + throw new Error( false ? 0 : "Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'"); | |
| 4100 | + } | |
| 4101 | + | |
| 4102 | + if (isDispatching) { | |
| 4103 | + 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.'); | |
| 4104 | + } | |
| 4105 | + | |
| 4106 | + var isSubscribed = true; | |
| 4107 | + ensureCanMutateNextListeners(); | |
| 4108 | + nextListeners.push(listener); | |
| 4109 | + return function unsubscribe() { | |
| 4110 | + if (!isSubscribed) { | |
| 4111 | + return; | |
| 4112 | + } | |
| 4113 | + | |
| 4114 | + if (isDispatching) { | |
| 4115 | + 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.'); | |
| 4116 | + } | |
| 4117 | + | |
| 4118 | + isSubscribed = false; | |
| 4119 | + ensureCanMutateNextListeners(); | |
| 4120 | + var index = nextListeners.indexOf(listener); | |
| 4121 | + nextListeners.splice(index, 1); | |
| 4122 | + currentListeners = null; | |
| 4123 | + }; | |
| 4124 | + } | |
| 4125 | + /** | |
| 4126 | + * Dispatches an action. It is the only way to trigger a state change. | |
| 4127 | + * | |
| 4128 | + * The `reducer` function, used to create the store, will be called with the | |
| 4129 | + * current state tree and the given `action`. Its return value will | |
| 4130 | + * be considered the **next** state of the tree, and the change listeners | |
| 4131 | + * will be notified. | |
| 4132 | + * | |
| 4133 | + * The base implementation only supports plain object actions. If you want to | |
| 4134 | + * dispatch a Promise, an Observable, a thunk, or something else, you need to | |
| 4135 | + * wrap your store creating function into the corresponding middleware. For | |
| 4136 | + * example, see the documentation for the `redux-thunk` package. Even the | |
| 4137 | + * middleware will eventually dispatch plain object actions using this method. | |
| 4138 | + * | |
| 4139 | + * @param {Object} action A plain object representing “what changed”. It is | |
| 4140 | + * a good idea to keep actions serializable so you can record and replay user | |
| 4141 | + * sessions, or use the time travelling `redux-devtools`. An action must have | |
| 4142 | + * a `type` property which may not be `undefined`. It is a good idea to use | |
| 4143 | + * string constants for action types. | |
| 4144 | + * | |
| 4145 | + * @returns {Object} For convenience, the same action object you dispatched. | |
| 4146 | + * | |
| 4147 | + * Note that, if you use a custom middleware, it may wrap `dispatch()` to | |
| 4148 | + * return something else (for example, a Promise you can await). | |
| 4149 | + */ | |
| 4150 | + | |
| 4151 | + | |
| 4152 | + function dispatch(action) { | |
| 4153 | + if (!isPlainObject(action)) { | |
| 4154 | + 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."); | |
| 4155 | + } | |
| 4156 | + | |
| 4157 | + if (typeof action.type === 'undefined') { | |
| 4158 | + throw new Error( false ? 0 : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.'); | |
| 4159 | + } | |
| 4160 | + | |
| 4161 | + if (isDispatching) { | |
| 4162 | + throw new Error( false ? 0 : 'Reducers may not dispatch actions.'); | |
| 4163 | + } | |
| 4164 | + | |
| 4165 | + try { | |
| 4166 | + isDispatching = true; | |
| 4167 | + currentState = currentReducer(currentState, action); | |
| 4168 | + } finally { | |
| 4169 | + isDispatching = false; | |
| 4170 | + } | |
| 4171 | + | |
| 4172 | + var listeners = currentListeners = nextListeners; | |
| 4173 | + | |
| 4174 | + for (var i = 0; i < listeners.length; i++) { | |
| 4175 | + var listener = listeners[i]; | |
| 4176 | + listener(); | |
| 4177 | + } | |
| 4178 | + | |
| 4179 | + return action; | |
| 4180 | + } | |
| 4181 | + /** | |
| 4182 | + * Replaces the reducer currently used by the store to calculate the state. | |
| 4183 | + * | |
| 4184 | + * You might need this if your app implements code splitting and you want to | |
| 4185 | + * load some of the reducers dynamically. You might also need this if you | |
| 4186 | + * implement a hot reloading mechanism for Redux. | |
| 4187 | + * | |
| 4188 | + * @param {Function} nextReducer The reducer for the store to use instead. | |
| 4189 | + * @returns {void} | |
| 4190 | + */ | |
| 4191 | + | |
| 4192 | + | |
| 4193 | + function replaceReducer(nextReducer) { | |
| 4194 | + if (typeof nextReducer !== 'function') { | |
| 4195 | + throw new Error( false ? 0 : "Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer)); | |
| 4196 | + } | |
| 4197 | + | |
| 4198 | + currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT. | |
| 4199 | + // Any reducers that existed in both the new and old rootReducer | |
| 4200 | + // will receive the previous state. This effectively populates | |
| 4201 | + // the new state tree with any relevant data from the old one. | |
| 4202 | + | |
| 4203 | + dispatch({ | |
| 4204 | + type: ActionTypes.REPLACE | |
| 4205 | + }); | |
| 4206 | + } | |
| 4207 | + /** | |
| 4208 | + * Interoperability point for observable/reactive libraries. | |
| 4209 | + * @returns {observable} A minimal observable of state changes. | |
| 4210 | + * For more information, see the observable proposal: | |
| 4211 | + * https://github.com/tc39/proposal-observable | |
| 4212 | + */ | |
| 4213 | + | |
| 4214 | + | |
| 4215 | + function observable() { | |
| 4216 | + var _ref; | |
| 4217 | + | |
| 4218 | + var outerSubscribe = subscribe; | |
| 4219 | + return _ref = { | |
| 4220 | + /** | |
| 4221 | + * The minimal observable subscription method. | |
| 4222 | + * @param {Object} observer Any object that can be used as an observer. | |
| 4223 | + * The observer object should have a `next` method. | |
| 4224 | + * @returns {subscription} An object with an `unsubscribe` method that can | |
| 4225 | + * be used to unsubscribe the observable from the store, and prevent further | |
| 4226 | + * emission of values from the observable. | |
| 4227 | + */ | |
| 4228 | + subscribe: function subscribe(observer) { | |
| 4229 | + if (typeof observer !== 'object' || observer === null) { | |
| 4230 | + throw new Error( false ? 0 : "Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'"); | |
| 4231 | + } | |
| 4232 | + | |
| 4233 | + function observeState() { | |
| 4234 | + if (observer.next) { | |
| 4235 | + observer.next(getState()); | |
| 4236 | + } | |
| 4237 | + } | |
| 4238 | + | |
| 4239 | + observeState(); | |
| 4240 | + var unsubscribe = outerSubscribe(observeState); | |
| 4241 | + return { | |
| 4242 | + unsubscribe: unsubscribe | |
| 4243 | + }; | |
| 4244 | + } | |
| 4245 | + }, _ref[$$observable] = function () { | |
| 4246 | + return this; | |
| 4247 | + }, _ref; | |
| 4248 | + } // When a store is created, an "INIT" action is dispatched so that every | |
| 4249 | + // reducer returns their initial state. This effectively populates | |
| 4250 | + // the initial state tree. | |
| 4251 | + | |
| 4252 | + | |
| 4253 | + dispatch({ | |
| 4254 | + type: ActionTypes.INIT | |
| 4255 | + }); | |
| 4256 | + return _ref2 = { | |
| 4257 | + dispatch: dispatch, | |
| 4258 | + subscribe: subscribe, | |
| 4259 | + getState: getState, | |
| 4260 | + replaceReducer: replaceReducer | |
| 4261 | + }, _ref2[$$observable] = observable, _ref2; | |
| 4262 | +} | |
| 4263 | +/** | |
| 4264 | + * Creates a Redux store that holds the state tree. | |
| 4265 | + * | |
| 4266 | + * **We recommend using `configureStore` from the | |
| 4267 | + * `@reduxjs/toolkit` package**, which replaces `createStore`: | |
| 4268 | + * **https://redux.js.org/introduction/why-rtk-is-redux-today** | |
| 4269 | + * | |
| 4270 | + * The only way to change the data in the store is to call `dispatch()` on it. | |
| 4271 | + * | |
| 4272 | + * There should only be a single store in your app. To specify how different | |
| 4273 | + * parts of the state tree respond to actions, you may combine several reducers | |
| 4274 | + * into a single reducer function by using `combineReducers`. | |
| 4275 | + * | |
| 4276 | + * @param {Function} reducer A function that returns the next state tree, given | |
| 4277 | + * the current state tree and the action to handle. | |
| 4278 | + * | |
| 4279 | + * @param {any} [preloadedState] The initial state. You may optionally specify it | |
| 4280 | + * to hydrate the state from the server in universal apps, or to restore a | |
| 4281 | + * previously serialized user session. | |
| 4282 | + * If you use `combineReducers` to produce the root reducer function, this must be | |
| 4283 | + * an object with the same shape as `combineReducers` keys. | |
| 4284 | + * | |
| 4285 | + * @param {Function} [enhancer] The store enhancer. You may optionally specify it | |
| 4286 | + * to enhance the store with third-party capabilities such as middleware, | |
| 4287 | + * time travel, persistence, etc. The only store enhancer that ships with Redux | |
| 4288 | + * is `applyMiddleware()`. | |
| 4289 | + * | |
| 4290 | + * @returns {Store} A Redux store that lets you read the state, dispatch actions | |
| 4291 | + * and subscribe to changes. | |
| 4292 | + */ | |
| 4293 | + | |
| 4294 | +var legacy_createStore = createStore; | |
| 4295 | + | |
| 4296 | +/** | |
| 4297 | + * Prints a warning in the console if it exists. | |
| 4298 | + * | |
| 4299 | + * @param {String} message The warning message. | |
| 4300 | + * @returns {void} | |
| 4301 | + */ | |
| 4302 | +function warning(message) { | |
| 4303 | + /* eslint-disable no-console */ | |
| 4304 | + if (typeof console !== 'undefined' && typeof console.error === 'function') { | |
| 4305 | + console.error(message); | |
| 4306 | + } | |
| 4307 | + /* eslint-enable no-console */ | |
| 4308 | + | |
| 4309 | + | |
| 4310 | + try { | |
| 4311 | + // This error was thrown as a convenience so that if you enable | |
| 4312 | + // "break on all exceptions" in your console, | |
| 4313 | + // it would pause the execution at this line. | |
| 4314 | + throw new Error(message); | |
| 4315 | + } catch (e) {} // eslint-disable-line no-empty | |
| 4316 | + | |
| 4317 | +} | |
| 4318 | + | |
| 4319 | +function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { | |
| 4320 | + var reducerKeys = Object.keys(reducers); | |
| 4321 | + var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; | |
| 4322 | + | |
| 4323 | + if (reducerKeys.length === 0) { | |
| 4324 | + return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; | |
| 4325 | + } | |
| 4326 | + | |
| 4327 | + if (!isPlainObject(inputState)) { | |
| 4328 | + return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\""); | |
| 4329 | + } | |
| 4330 | + | |
| 4331 | + var unexpectedKeys = Object.keys(inputState).filter(function (key) { | |
| 4332 | + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; | |
| 4333 | + }); | |
| 4334 | + unexpectedKeys.forEach(function (key) { | |
| 4335 | + unexpectedKeyCache[key] = true; | |
| 4336 | + }); | |
| 4337 | + if (action && action.type === ActionTypes.REPLACE) return; | |
| 4338 | + | |
| 4339 | + if (unexpectedKeys.length > 0) { | |
| 4340 | + 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."); | |
| 4341 | + } | |
| 4342 | +} | |
| 4343 | + | |
| 4344 | +function assertReducerShape(reducers) { | |
| 4345 | + Object.keys(reducers).forEach(function (key) { | |
| 4346 | + var reducer = reducers[key]; | |
| 4347 | + var initialState = reducer(undefined, { | |
| 4348 | + type: ActionTypes.INIT | |
| 4349 | + }); | |
| 4350 | + | |
| 4351 | + if (typeof initialState === 'undefined') { | |
| 4352 | + 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."); | |
| 4353 | + } | |
| 4354 | + | |
| 4355 | + if (typeof reducer(undefined, { | |
| 4356 | + type: ActionTypes.PROBE_UNKNOWN_ACTION() | |
| 4357 | + }) === 'undefined') { | |
| 4358 | + 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."); | |
| 4359 | + } | |
| 4360 | + }); | |
| 4361 | +} | |
| 4362 | +/** | |
| 4363 | + * Turns an object whose values are different reducer functions, into a single | |
| 4364 | + * reducer function. It will call every child reducer, and gather their results | |
| 4365 | + * into a single state object, whose keys correspond to the keys of the passed | |
| 4366 | + * reducer functions. | |
| 4367 | + * | |
| 4368 | + * @param {Object} reducers An object whose values correspond to different | |
| 4369 | + * reducer functions that need to be combined into one. One handy way to obtain | |
| 4370 | + * it is to use ES6 `import * as reducers` syntax. The reducers may never return | |
| 4371 | + * undefined for any action. Instead, they should return their initial state | |
| 4372 | + * if the state passed to them was undefined, and the current state for any | |
| 4373 | + * unrecognized action. | |
| 4374 | + * | |
| 4375 | + * @returns {Function} A reducer function that invokes every reducer inside the | |
| 4376 | + * passed object, and builds a state object with the same shape. | |
| 4377 | + */ | |
| 4378 | + | |
| 4379 | + | |
| 4380 | +function combineReducers(reducers) { | |
| 4381 | + var reducerKeys = Object.keys(reducers); | |
| 4382 | + var finalReducers = {}; | |
| 4383 | + | |
| 4384 | + for (var i = 0; i < reducerKeys.length; i++) { | |
| 4385 | + var key = reducerKeys[i]; | |
| 4386 | + | |
| 4387 | + if (true) { | |
| 4388 | + if (typeof reducers[key] === 'undefined') { | |
| 4389 | + warning("No reducer provided for key \"" + key + "\""); | |
| 4390 | + } | |
| 4391 | + } | |
| 4392 | + | |
| 4393 | + if (typeof reducers[key] === 'function') { | |
| 4394 | + finalReducers[key] = reducers[key]; | |
| 4395 | + } | |
| 4396 | + } | |
| 4397 | + | |
| 4398 | + var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same | |
| 4399 | + // keys multiple times. | |
| 4400 | + | |
| 4401 | + var unexpectedKeyCache; | |
| 4402 | + | |
| 4403 | + if (true) { | |
| 4404 | + unexpectedKeyCache = {}; | |
| 4405 | + } | |
| 4406 | + | |
| 4407 | + var shapeAssertionError; | |
| 4408 | + | |
| 4409 | + try { | |
| 4410 | + assertReducerShape(finalReducers); | |
| 4411 | + } catch (e) { | |
| 4412 | + shapeAssertionError = e; | |
| 4413 | + } | |
| 4414 | + | |
| 4415 | + return function combination(state, action) { | |
| 4416 | + if (state === void 0) { | |
| 4417 | + state = {}; | |
| 4418 | + } | |
| 4419 | + | |
| 4420 | + if (shapeAssertionError) { | |
| 4421 | + throw shapeAssertionError; | |
| 4422 | + } | |
| 4423 | + | |
| 4424 | + if (true) { | |
| 4425 | + var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); | |
| 4426 | + | |
| 4427 | + if (warningMessage) { | |
| 4428 | + warning(warningMessage); | |
| 4429 | + } | |
| 4430 | + } | |
| 4431 | + | |
| 4432 | + var hasChanged = false; | |
| 4433 | + var nextState = {}; | |
| 4434 | + | |
| 4435 | + for (var _i = 0; _i < finalReducerKeys.length; _i++) { | |
| 4436 | + var _key = finalReducerKeys[_i]; | |
| 4437 | + var reducer = finalReducers[_key]; | |
| 4438 | + var previousStateForKey = state[_key]; | |
| 4439 | + var nextStateForKey = reducer(previousStateForKey, action); | |
| 4440 | + | |
| 4441 | + if (typeof nextStateForKey === 'undefined') { | |
| 4442 | + var actionType = action && action.type; | |
| 4443 | + 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."); | |
| 4444 | + } | |
| 4445 | + | |
| 4446 | + nextState[_key] = nextStateForKey; | |
| 4447 | + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; | |
| 4448 | + } | |
| 4449 | + | |
| 4450 | + hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length; | |
| 4451 | + return hasChanged ? nextState : state; | |
| 4452 | + }; | |
| 4453 | +} | |
| 4454 | + | |
| 4455 | +function bindActionCreator(actionCreator, dispatch) { | |
| 4456 | + return function () { | |
| 4457 | + return dispatch(actionCreator.apply(this, arguments)); | |
| 4458 | + }; | |
| 4459 | +} | |
| 4460 | +/** | |
| 4461 | + * Turns an object whose values are action creators, into an object with the | |
| 4462 | + * same keys, but with every function wrapped into a `dispatch` call so they | |
| 4463 | + * may be invoked directly. This is just a convenience method, as you can call | |
| 4464 | + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. | |
| 4465 | + * | |
| 4466 | + * For convenience, you can also pass an action creator as the first argument, | |
| 4467 | + * and get a dispatch wrapped function in return. | |
| 4468 | + * | |
| 4469 | + * @param {Function|Object} actionCreators An object whose values are action | |
| 4470 | + * creator functions. One handy way to obtain it is to use ES6 `import * as` | |
| 4471 | + * syntax. You may also pass a single function. | |
| 4472 | + * | |
| 4473 | + * @param {Function} dispatch The `dispatch` function available on your Redux | |
| 4474 | + * store. | |
| 4475 | + * | |
| 4476 | + * @returns {Function|Object} The object mimicking the original object, but with | |
| 4477 | + * every action creator wrapped into the `dispatch` call. If you passed a | |
| 4478 | + * function as `actionCreators`, the return value will also be a single | |
| 4479 | + * function. | |
| 4480 | + */ | |
| 4481 | + | |
| 4482 | + | |
| 4483 | +function bindActionCreators(actionCreators, dispatch) { | |
| 4484 | + if (typeof actionCreators === 'function') { | |
| 4485 | + return bindActionCreator(actionCreators, dispatch); | |
| 4486 | + } | |
| 4487 | + | |
| 4488 | + if (typeof actionCreators !== 'object' || actionCreators === null) { | |
| 4489 | + 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\"?"); | |
| 4490 | + } | |
| 4491 | + | |
| 4492 | + var boundActionCreators = {}; | |
| 4493 | + | |
| 4494 | + for (var key in actionCreators) { | |
| 4495 | + var actionCreator = actionCreators[key]; | |
| 4496 | + | |
| 4497 | + if (typeof actionCreator === 'function') { | |
| 4498 | + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); | |
| 4499 | + } | |
| 4500 | + } | |
| 4501 | + | |
| 4502 | + return boundActionCreators; | |
| 4503 | +} | |
| 4504 | + | |
| 4505 | +/** | |
| 4506 | + * Composes single-argument functions from right to left. The rightmost | |
| 4507 | + * function can take multiple arguments as it provides the signature for | |
| 4508 | + * the resulting composite function. | |
| 4509 | + * | |
| 4510 | + * @param {...Function} funcs The functions to compose. | |
| 4511 | + * @returns {Function} A function obtained by composing the argument functions | |
| 4512 | + * from right to left. For example, compose(f, g, h) is identical to doing | |
| 4513 | + * (...args) => f(g(h(...args))). | |
| 4514 | + */ | |
| 4515 | +function compose() { | |
| 4516 | + for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 4517 | + funcs[_key] = arguments[_key]; | |
| 4518 | + } | |
| 4519 | + | |
| 4520 | + if (funcs.length === 0) { | |
| 4521 | + return function (arg) { | |
| 4522 | + return arg; | |
| 4523 | + }; | |
| 4524 | + } | |
| 4525 | + | |
| 4526 | + if (funcs.length === 1) { | |
| 4527 | + return funcs[0]; | |
| 4528 | + } | |
| 4529 | + | |
| 4530 | + return funcs.reduce(function (a, b) { | |
| 4531 | + return function () { | |
| 4532 | + return a(b.apply(void 0, arguments)); | |
| 4533 | + }; | |
| 4534 | + }); | |
| 4535 | +} | |
| 4536 | + | |
| 4537 | +/** | |
| 4538 | + * Creates a store enhancer that applies middleware to the dispatch method | |
| 4539 | + * of the Redux store. This is handy for a variety of tasks, such as expressing | |
| 4540 | + * asynchronous actions in a concise manner, or logging every action payload. | |
| 4541 | + * | |
| 4542 | + * See `redux-thunk` package as an example of the Redux middleware. | |
| 4543 | + * | |
| 4544 | + * Because middleware is potentially asynchronous, this should be the first | |
| 4545 | + * store enhancer in the composition chain. | |
| 4546 | + * | |
| 4547 | + * Note that each middleware will be given the `dispatch` and `getState` functions | |
| 4548 | + * as named arguments. | |
| 4549 | + * | |
| 4550 | + * @param {...Function} middlewares The middleware chain to be applied. | |
| 4551 | + * @returns {Function} A store enhancer applying the middleware. | |
| 4552 | + */ | |
| 4553 | + | |
| 4554 | +function applyMiddleware() { | |
| 4555 | + for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 4556 | + middlewares[_key] = arguments[_key]; | |
| 4557 | + } | |
| 4558 | + | |
| 4559 | + return function (createStore) { | |
| 4560 | + return function () { | |
| 4561 | + var store = createStore.apply(void 0, arguments); | |
| 4562 | + | |
| 4563 | + var _dispatch = function dispatch() { | |
| 4564 | + throw new Error( false ? 0 : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.'); | |
| 4565 | + }; | |
| 4566 | + | |
| 4567 | + var middlewareAPI = { | |
| 4568 | + getState: store.getState, | |
| 4569 | + dispatch: function dispatch() { | |
| 4570 | + return _dispatch.apply(void 0, arguments); | |
| 4571 | + } | |
| 4572 | + }; | |
| 4573 | + var chain = middlewares.map(function (middleware) { | |
| 4574 | + return middleware(middlewareAPI); | |
| 4575 | + }); | |
| 4576 | + _dispatch = compose.apply(void 0, chain)(store.dispatch); | |
| 4577 | + return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, store), {}, { | |
| 4578 | + dispatch: _dispatch | |
| 4579 | + }); | |
| 4580 | + }; | |
| 4581 | + }; | |
| 4582 | +} | |
| 4583 | + | |
| 4584 | +/* | |
| 4585 | + * This is a dummy function to check if the function name has been altered by minification. | |
| 4586 | + * If the function has been minified and NODE_ENV !== 'production', warn the user. | |
| 4587 | + */ | |
| 4588 | + | |
| 4589 | +function isCrushed() {} | |
| 4590 | + | |
| 4591 | +if ( true && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') { | |
| 4592 | + warning('You are currently using minified code outside of NODE_ENV === "production". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.'); | |
| 4593 | +} | |
| 4594 | + | |
| 4595 | + | |
| 4596 | + | |
| 4597 | + | |
| 4598 | +/***/ }), | |
| 4599 | + | |
| 4600 | +/***/ "../node_modules/reselect/es/defaultMemoize.js": | |
| 4601 | +/*!*****************************************************!*\ | |
| 4602 | + !*** ../node_modules/reselect/es/defaultMemoize.js ***! | |
| 4603 | + \*****************************************************/ | |
| 4604 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 4605 | + | |
| 4606 | +"use strict"; | |
| 4607 | +__webpack_require__.r(__webpack_exports__); | |
| 4608 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4609 | +/* harmony export */ "createCacheKeyComparator": () => (/* binding */ createCacheKeyComparator), | |
| 4610 | +/* harmony export */ "defaultEqualityCheck": () => (/* binding */ defaultEqualityCheck), | |
| 4611 | +/* harmony export */ "defaultMemoize": () => (/* binding */ defaultMemoize) | |
| 4612 | +/* harmony export */ }); | |
| 4613 | +// Cache implementation based on Erik Rasmussen's `lru-memoize`: | |
| 4614 | +// https://github.com/erikras/lru-memoize | |
| 4615 | +var NOT_FOUND = 'NOT_FOUND'; | |
| 4616 | + | |
| 4617 | +function createSingletonCache(equals) { | |
| 4618 | + var entry; | |
| 4619 | + return { | |
| 4620 | + get: function get(key) { | |
| 4621 | + if (entry && equals(entry.key, key)) { | |
| 4622 | + return entry.value; | |
| 4623 | + } | |
| 4624 | + | |
| 4625 | + return NOT_FOUND; | |
| 4626 | + }, | |
| 4627 | + put: function put(key, value) { | |
| 4628 | + entry = { | |
| 4629 | + key: key, | |
| 4630 | + value: value | |
| 4631 | + }; | |
| 4632 | + }, | |
| 4633 | + getEntries: function getEntries() { | |
| 4634 | + return entry ? [entry] : []; | |
| 4635 | + }, | |
| 4636 | + clear: function clear() { | |
| 4637 | + entry = undefined; | |
| 4638 | + } | |
| 4639 | + }; | |
| 4640 | +} | |
| 4641 | + | |
| 4642 | +function createLruCache(maxSize, equals) { | |
| 4643 | + var entries = []; | |
| 4644 | + | |
| 4645 | + function get(key) { | |
| 4646 | + var cacheIndex = entries.findIndex(function (entry) { | |
| 4647 | + return equals(key, entry.key); | |
| 4648 | + }); // We found a cached entry | |
| 4649 | + | |
| 4650 | + if (cacheIndex > -1) { | |
| 4651 | + var entry = entries[cacheIndex]; // Cached entry not at top of cache, move it to the top | |
| 4652 | + | |
| 4653 | + if (cacheIndex > 0) { | |
| 4654 | + entries.splice(cacheIndex, 1); | |
| 4655 | + entries.unshift(entry); | |
| 4656 | + } | |
| 4657 | + | |
| 4658 | + return entry.value; | |
| 4659 | + } // No entry found in cache, return sentinel | |
| 4660 | + | |
| 4661 | + | |
| 4662 | + return NOT_FOUND; | |
| 4663 | + } | |
| 4664 | + | |
| 4665 | + function put(key, value) { | |
| 4666 | + if (get(key) === NOT_FOUND) { | |
| 4667 | + // TODO Is unshift slow? | |
| 4668 | + entries.unshift({ | |
| 4669 | + key: key, | |
| 4670 | + value: value | |
| 4671 | + }); | |
| 4672 | + | |
| 4673 | + if (entries.length > maxSize) { | |
| 4674 | + entries.pop(); | |
| 4675 | + } | |
| 4676 | + } | |
| 4677 | + } | |
| 4678 | + | |
| 4679 | + function getEntries() { | |
| 4680 | + return entries; | |
| 4681 | + } | |
| 4682 | + | |
| 4683 | + function clear() { | |
| 4684 | + entries = []; | |
| 4685 | + } | |
| 4686 | + | |
| 4687 | + return { | |
| 4688 | + get: get, | |
| 4689 | + put: put, | |
| 4690 | + getEntries: getEntries, | |
| 4691 | + clear: clear | |
| 4692 | + }; | |
| 4693 | +} | |
| 4694 | + | |
| 4695 | +var defaultEqualityCheck = function defaultEqualityCheck(a, b) { | |
| 4696 | + return a === b; | |
| 4697 | +}; | |
| 4698 | +function createCacheKeyComparator(equalityCheck) { | |
| 4699 | + return function areArgumentsShallowlyEqual(prev, next) { | |
| 4700 | + if (prev === null || next === null || prev.length !== next.length) { | |
| 4701 | + return false; | |
| 4702 | + } // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible. | |
| 4703 | + | |
| 4704 | + | |
| 4705 | + var length = prev.length; | |
| 4706 | + | |
| 4707 | + for (var i = 0; i < length; i++) { | |
| 4708 | + if (!equalityCheck(prev[i], next[i])) { | |
| 4709 | + return false; | |
| 4710 | + } | |
| 4711 | + } | |
| 4712 | + | |
| 4713 | + return true; | |
| 4714 | + }; | |
| 4715 | +} | |
| 4716 | +// defaultMemoize now supports a configurable cache size with LRU behavior, | |
| 4717 | +// and optional comparison of the result value with existing values | |
| 4718 | +function defaultMemoize(func, equalityCheckOrOptions) { | |
| 4719 | + var providedOptions = typeof equalityCheckOrOptions === 'object' ? equalityCheckOrOptions : { | |
| 4720 | + equalityCheck: equalityCheckOrOptions | |
| 4721 | + }; | |
| 4722 | + var _providedOptions$equa = providedOptions.equalityCheck, | |
| 4723 | + equalityCheck = _providedOptions$equa === void 0 ? defaultEqualityCheck : _providedOptions$equa, | |
| 4724 | + _providedOptions$maxS = providedOptions.maxSize, | |
| 4725 | + maxSize = _providedOptions$maxS === void 0 ? 1 : _providedOptions$maxS, | |
| 4726 | + resultEqualityCheck = providedOptions.resultEqualityCheck; | |
| 4727 | + var comparator = createCacheKeyComparator(equalityCheck); | |
| 4728 | + var cache = maxSize === 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator); // we reference arguments instead of spreading them for performance reasons | |
| 4729 | + | |
| 4730 | + function memoized() { | |
| 4731 | + var value = cache.get(arguments); | |
| 4732 | + | |
| 4733 | + if (value === NOT_FOUND) { | |
| 4734 | + // @ts-ignore | |
| 4735 | + value = func.apply(null, arguments); | |
| 4736 | + | |
| 4737 | + if (resultEqualityCheck) { | |
| 4738 | + var entries = cache.getEntries(); | |
| 4739 | + var matchingEntry = entries.find(function (entry) { | |
| 4740 | + return resultEqualityCheck(entry.value, value); | |
| 4741 | + }); | |
| 4742 | + | |
| 4743 | + if (matchingEntry) { | |
| 4744 | + value = matchingEntry.value; | |
| 4745 | + } | |
| 4746 | + } | |
| 4747 | + | |
| 4748 | + cache.put(arguments, value); | |
| 4749 | + } | |
| 4750 | + | |
| 4751 | + return value; | |
| 4752 | + } | |
| 4753 | + | |
| 4754 | + memoized.clearCache = function () { | |
| 4755 | + return cache.clear(); | |
| 4756 | + }; | |
| 4757 | + | |
| 4758 | + return memoized; | |
| 4759 | +} | |
| 4760 | + | |
| 4761 | +/***/ }), | |
| 4762 | + | |
| 4763 | +/***/ "../node_modules/reselect/es/index.js": | |
| 4764 | +/*!********************************************!*\ | |
| 4765 | + !*** ../node_modules/reselect/es/index.js ***! | |
| 4766 | + \********************************************/ | |
| 4767 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 4768 | + | |
| 4769 | +"use strict"; | |
| 4770 | +__webpack_require__.r(__webpack_exports__); | |
| 4771 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4772 | +/* harmony export */ "createSelector": () => (/* binding */ createSelector), | |
| 4773 | +/* harmony export */ "createSelectorCreator": () => (/* binding */ createSelectorCreator), | |
| 4774 | +/* harmony export */ "createStructuredSelector": () => (/* binding */ createStructuredSelector), | |
| 4775 | +/* harmony export */ "defaultEqualityCheck": () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultEqualityCheck), | |
| 4776 | +/* harmony export */ "defaultMemoize": () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize) | |
| 4777 | +/* harmony export */ }); | |
| 4778 | +/* harmony import */ var _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultMemoize */ "../node_modules/reselect/es/defaultMemoize.js"); | |
| 4779 | + | |
| 4780 | + | |
| 4781 | + | |
| 4782 | +function getDependencies(funcs) { | |
| 4783 | + var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs; | |
| 4784 | + | |
| 4785 | + if (!dependencies.every(function (dep) { | |
| 4786 | + return typeof dep === 'function'; | |
| 4787 | + })) { | |
| 4788 | + var dependencyTypes = dependencies.map(function (dep) { | |
| 4789 | + return typeof dep === 'function' ? "function " + (dep.name || 'unnamed') + "()" : typeof dep; | |
| 4790 | + }).join(', '); | |
| 4791 | + throw new Error("createSelector expects all input-selectors to be functions, but received the following types: [" + dependencyTypes + "]"); | |
| 4792 | + } | |
| 4793 | + | |
| 4794 | + return dependencies; | |
| 4795 | +} | |
| 4796 | + | |
| 4797 | +function createSelectorCreator(memoize) { | |
| 4798 | + for (var _len = arguments.length, memoizeOptionsFromArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
| 4799 | + memoizeOptionsFromArgs[_key - 1] = arguments[_key]; | |
| 4800 | + } | |
| 4801 | + | |
| 4802 | + var createSelector = function createSelector() { | |
| 4803 | + for (var _len2 = arguments.length, funcs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | |
| 4804 | + funcs[_key2] = arguments[_key2]; | |
| 4805 | + } | |
| 4806 | + | |
| 4807 | + var _recomputations = 0; | |
| 4808 | + | |
| 4809 | + var _lastResult; // Due to the intricacies of rest params, we can't do an optional arg after `...funcs`. | |
| 4810 | + // So, start by declaring the default value here. | |
| 4811 | + // (And yes, the words 'memoize' and 'options' appear too many times in this next sequence.) | |
| 4812 | + | |
| 4813 | + | |
| 4814 | + var directlyPassedOptions = { | |
| 4815 | + memoizeOptions: undefined | |
| 4816 | + }; // Normally, the result func or "output selector" is the last arg | |
| 4817 | + | |
| 4818 | + var resultFunc = funcs.pop(); // If the result func is actually an _object_, assume it's our options object | |
| 4819 | + | |
| 4820 | + if (typeof resultFunc === 'object') { | |
| 4821 | + directlyPassedOptions = resultFunc; // and pop the real result func off | |
| 4822 | + | |
| 4823 | + resultFunc = funcs.pop(); | |
| 4824 | + } | |
| 4825 | + | |
| 4826 | + if (typeof resultFunc !== 'function') { | |
| 4827 | + throw new Error("createSelector expects an output function after the inputs, but received: [" + typeof resultFunc + "]"); | |
| 4828 | + } // Determine which set of options we're using. Prefer options passed directly, | |
| 4829 | + // but fall back to options given to createSelectorCreator. | |
| 4830 | + | |
| 4831 | + | |
| 4832 | + var _directlyPassedOption = directlyPassedOptions, | |
| 4833 | + _directlyPassedOption2 = _directlyPassedOption.memoizeOptions, | |
| 4834 | + memoizeOptions = _directlyPassedOption2 === void 0 ? memoizeOptionsFromArgs : _directlyPassedOption2; // Simplifying assumption: it's unlikely that the first options arg of the provided memoizer | |
| 4835 | + // is an array. In most libs I've looked at, it's an equality function or options object. | |
| 4836 | + // Based on that, if `memoizeOptions` _is_ an array, we assume it's a full | |
| 4837 | + // user-provided array of options. Otherwise, it must be just the _first_ arg, and so | |
| 4838 | + // we wrap it in an array so we can apply it. | |
| 4839 | + | |
| 4840 | + var finalMemoizeOptions = Array.isArray(memoizeOptions) ? memoizeOptions : [memoizeOptions]; | |
| 4841 | + var dependencies = getDependencies(funcs); | |
| 4842 | + var memoizedResultFunc = memoize.apply(void 0, [function recomputationWrapper() { | |
| 4843 | + _recomputations++; // apply arguments instead of spreading for performance. | |
| 4844 | + | |
| 4845 | + return resultFunc.apply(null, arguments); | |
| 4846 | + }].concat(finalMemoizeOptions)); // If a selector is called with the exact same arguments we don't need to traverse our dependencies again. | |
| 4847 | + | |
| 4848 | + var selector = memoize(function dependenciesChecker() { | |
| 4849 | + var params = []; | |
| 4850 | + var length = dependencies.length; | |
| 4851 | + | |
| 4852 | + for (var i = 0; i < length; i++) { | |
| 4853 | + // apply arguments instead of spreading and mutate a local list of params for performance. | |
| 4854 | + // @ts-ignore | |
| 4855 | + params.push(dependencies[i].apply(null, arguments)); | |
| 4856 | + } // apply arguments instead of spreading for performance. | |
| 4857 | + | |
| 4858 | + | |
| 4859 | + _lastResult = memoizedResultFunc.apply(null, params); | |
| 4860 | + return _lastResult; | |
| 4861 | + }); | |
| 4862 | + Object.assign(selector, { | |
| 4863 | + resultFunc: resultFunc, | |
| 4864 | + memoizedResultFunc: memoizedResultFunc, | |
| 4865 | + dependencies: dependencies, | |
| 4866 | + lastResult: function lastResult() { | |
| 4867 | + return _lastResult; | |
| 4868 | + }, | |
| 4869 | + recomputations: function recomputations() { | |
| 4870 | + return _recomputations; | |
| 4871 | + }, | |
| 4872 | + resetRecomputations: function resetRecomputations() { | |
| 4873 | + return _recomputations = 0; | |
| 4874 | + } | |
| 4875 | + }); | |
| 4876 | + return selector; | |
| 4877 | + }; // @ts-ignore | |
| 4878 | + | |
| 4879 | + | |
| 4880 | + return createSelector; | |
| 4881 | +} | |
| 4882 | +var createSelector = /* #__PURE__ */createSelectorCreator(_defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize); | |
| 4883 | +// Manual definition of state and output arguments | |
| 4884 | +var createStructuredSelector = function createStructuredSelector(selectors, selectorCreator) { | |
| 4885 | + if (selectorCreator === void 0) { | |
| 4886 | + selectorCreator = createSelector; | |
| 4887 | + } | |
| 4888 | + | |
| 4889 | + if (typeof selectors !== 'object') { | |
| 4890 | + throw new Error('createStructuredSelector expects first argument to be an object ' + ("where each property is a selector, instead received a " + typeof selectors)); | |
| 4891 | + } | |
| 4892 | + | |
| 4893 | + var objectKeys = Object.keys(selectors); | |
| 4894 | + var resultSelector = selectorCreator( // @ts-ignore | |
| 4895 | + objectKeys.map(function (key) { | |
| 4896 | + return selectors[key]; | |
| 4897 | + }), function () { | |
| 4898 | + for (var _len3 = arguments.length, values = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | |
| 4899 | + values[_key3] = arguments[_key3]; | |
| 4900 | + } | |
| 4901 | + | |
| 4902 | + return values.reduce(function (composition, value, index) { | |
| 4903 | + composition[objectKeys[index]] = value; | |
| 4904 | + return composition; | |
| 4905 | + }, {}); | |
| 4906 | + }); | |
| 4907 | + return resultSelector; | |
| 4908 | +}; | |
| 4909 | + | |
| 4910 | +/***/ }), | |
| 4911 | + | |
| 4912 | +/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 4913 | +/*!******************************************************************!*\ | |
| 4914 | + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 4915 | + \******************************************************************/ | |
| 4916 | +/***/ ((module) => { | |
| 4917 | + | |
| 4918 | +function _arrayLikeToArray(arr, len) { | |
| 4919 | + if (len == null || len > arr.length) len = arr.length; | |
| 4920 | + for (var i = 0, arr2 = new Array(len); i < len; i++) { | |
| 4921 | + arr2[i] = arr[i]; | |
| 4922 | + } | |
| 4923 | + return arr2; | |
| 4924 | +} | |
| 4925 | +module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4926 | + | |
| 4927 | +/***/ }), | |
| 4928 | + | |
| 4929 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 4930 | +/*!****************************************************************!*\ | |
| 4931 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 4932 | + \****************************************************************/ | |
| 4933 | +/***/ ((module) => { | |
| 4934 | + | |
| 4935 | +function _arrayWithHoles(arr) { | |
| 4936 | + if (Array.isArray(arr)) return arr; | |
| 4937 | +} | |
| 4938 | +module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4939 | + | |
| 4940 | +/***/ }), | |
| 4941 | + | |
| 4942 | +/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 4943 | +/*!***********************************************************************!*\ | |
| 4944 | + !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 4945 | + \***********************************************************************/ | |
| 4946 | +/***/ ((module) => { | |
| 4947 | + | |
| 4948 | +function _assertThisInitialized(self) { | |
| 4949 | + if (self === void 0) { | |
| 4950 | + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 4951 | + } | |
| 4952 | + return self; | |
| 4953 | +} | |
| 4954 | +module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4955 | + | |
| 4956 | +/***/ }), | |
| 4957 | + | |
| 4958 | +/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 4959 | +/*!****************************************************************!*\ | |
| 4960 | + !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 4961 | + \****************************************************************/ | |
| 4962 | +/***/ ((module) => { | |
| 4963 | + | |
| 4964 | +function _classCallCheck(instance, Constructor) { | |
| 4965 | + if (!(instance instanceof Constructor)) { | |
| 4966 | + throw new TypeError("Cannot call a class as a function"); | |
| 4967 | + } | |
| 4968 | +} | |
| 4969 | +module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4970 | + | |
| 4971 | +/***/ }), | |
| 4972 | + | |
| 4973 | +/***/ "../node_modules/@babel/runtime/helpers/construct.js": | |
| 4974 | +/*!***********************************************************!*\ | |
| 4975 | + !*** ../node_modules/@babel/runtime/helpers/construct.js ***! | |
| 4976 | + \***********************************************************/ | |
| 4977 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4978 | + | |
| 4979 | +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 4980 | +var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js"); | |
| 4981 | +function _construct(Parent, args, Class) { | |
| 4982 | + if (isNativeReflectConstruct()) { | |
| 4983 | + module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4984 | + } else { | |
| 4985 | + module.exports = _construct = function _construct(Parent, args, Class) { | |
| 4986 | + var a = [null]; | |
| 4987 | + a.push.apply(a, args); | |
| 4988 | + var Constructor = Function.bind.apply(Parent, a); | |
| 4989 | + var instance = new Constructor(); | |
| 4990 | + if (Class) setPrototypeOf(instance, Class.prototype); | |
| 4991 | + return instance; | |
| 4992 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4993 | + } | |
| 4994 | + return _construct.apply(null, arguments); | |
| 4995 | +} | |
| 4996 | +module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4997 | + | |
| 4998 | +/***/ }), | |
| 4999 | + | |
| 5000 | +/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 5001 | +/*!*************************************************************!*\ | |
| 5002 | + !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 5003 | + \*************************************************************/ | |
| 5004 | +/***/ ((module) => { | |
| 5005 | + | |
| 5006 | +function _defineProperties(target, props) { | |
| 5007 | + for (var i = 0; i < props.length; i++) { | |
| 5008 | + var descriptor = props[i]; | |
| 5009 | + descriptor.enumerable = descriptor.enumerable || false; | |
| 5010 | + descriptor.configurable = true; | |
| 5011 | + if ("value" in descriptor) descriptor.writable = true; | |
| 5012 | + Object.defineProperty(target, descriptor.key, descriptor); | |
| 5013 | + } | |
| 5014 | +} | |
| 5015 | +function _createClass(Constructor, protoProps, staticProps) { | |
| 5016 | + if (protoProps) _defineProperties(Constructor.prototype, protoProps); | |
| 5017 | + if (staticProps) _defineProperties(Constructor, staticProps); | |
| 5018 | + Object.defineProperty(Constructor, "prototype", { | |
| 5019 | + writable: false | |
| 5020 | + }); | |
| 5021 | + return Constructor; | |
| 5022 | +} | |
| 5023 | +module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5024 | + | |
| 5025 | +/***/ }), | |
| 5026 | + | |
| 5027 | +/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 5028 | +/*!****************************************************************!*\ | |
| 5029 | + !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 5030 | + \****************************************************************/ | |
| 5031 | +/***/ ((module) => { | |
| 5032 | + | |
| 5033 | +function _defineProperty(obj, key, value) { | |
| 5034 | + if (key in obj) { | |
| 5035 | + Object.defineProperty(obj, key, { | |
| 5036 | + value: value, | |
| 5037 | + enumerable: true, | |
| 5038 | + configurable: true, | |
| 5039 | + writable: true | |
| 5040 | + }); | |
| 5041 | + } else { | |
| 5042 | + obj[key] = value; | |
| 5043 | + } | |
| 5044 | + return obj; | |
| 5045 | +} | |
| 5046 | +module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5047 | + | |
| 5048 | +/***/ }), | |
| 5049 | + | |
| 5050 | +/***/ "../node_modules/@babel/runtime/helpers/get.js": | |
| 5051 | +/*!*****************************************************!*\ | |
| 5052 | + !*** ../node_modules/@babel/runtime/helpers/get.js ***! | |
| 5053 | + \*****************************************************/ | |
| 5054 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5055 | + | |
| 5056 | +var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js"); | |
| 5057 | +function _get() { | |
| 5058 | + if (typeof Reflect !== "undefined" && Reflect.get) { | |
| 5059 | + module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5060 | + } else { | |
| 5061 | + module.exports = _get = function _get(target, property, receiver) { | |
| 5062 | + var base = superPropBase(target, property); | |
| 5063 | + if (!base) return; | |
| 5064 | + var desc = Object.getOwnPropertyDescriptor(base, property); | |
| 5065 | + if (desc.get) { | |
| 5066 | + return desc.get.call(arguments.length < 3 ? target : receiver); | |
| 5067 | + } | |
| 5068 | + return desc.value; | |
| 5069 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5070 | + } | |
| 5071 | + return _get.apply(this, arguments); | |
| 5072 | +} | |
| 5073 | +module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5074 | + | |
| 5075 | +/***/ }), | |
| 5076 | + | |
| 5077 | +/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 5078 | +/*!****************************************************************!*\ | |
| 5079 | + !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 5080 | + \****************************************************************/ | |
| 5081 | +/***/ ((module) => { | |
| 5082 | + | |
| 5083 | +function _getPrototypeOf(o) { | |
| 5084 | + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { | |
| 5085 | + return o.__proto__ || Object.getPrototypeOf(o); | |
| 5086 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5087 | + return _getPrototypeOf(o); | |
| 5088 | +} | |
| 5089 | +module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5090 | + | |
| 5091 | +/***/ }), | |
| 5092 | + | |
| 5093 | +/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 5094 | +/*!**********************************************************!*\ | |
| 5095 | + !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 5096 | + \**********************************************************/ | |
| 5097 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5098 | + | |
| 5099 | +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 5100 | +function _inherits(subClass, superClass) { | |
| 5101 | + if (typeof superClass !== "function" && superClass !== null) { | |
| 5102 | + throw new TypeError("Super expression must either be null or a function"); | |
| 5103 | + } | |
| 5104 | + subClass.prototype = Object.create(superClass && superClass.prototype, { | |
| 5105 | + constructor: { | |
| 5106 | + value: subClass, | |
| 5107 | + writable: true, | |
| 5108 | + configurable: true | |
| 5109 | + } | |
| 5110 | + }); | |
| 5111 | + Object.defineProperty(subClass, "prototype", { | |
| 5112 | + writable: false | |
| 5113 | + }); | |
| 5114 | + if (superClass) setPrototypeOf(subClass, superClass); | |
| 5115 | +} | |
| 5116 | +module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5117 | + | |
| 5118 | +/***/ }), | |
| 5119 | + | |
| 5120 | +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 5121 | +/*!***********************************************************************!*\ | |
| 5122 | + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 5123 | + \***********************************************************************/ | |
| 5124 | +/***/ ((module) => { | |
| 5125 | + | |
| 5126 | +function _interopRequireDefault(obj) { | |
| 5127 | + return obj && obj.__esModule ? obj : { | |
| 5128 | + "default": obj | |
| 5129 | + }; | |
| 5130 | +} | |
| 5131 | +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5132 | + | |
| 5133 | +/***/ }), | |
| 5134 | + | |
| 5135 | +/***/ "../node_modules/@babel/runtime/helpers/isNativeFunction.js": | |
| 5136 | +/*!******************************************************************!*\ | |
| 5137 | + !*** ../node_modules/@babel/runtime/helpers/isNativeFunction.js ***! | |
| 5138 | + \******************************************************************/ | |
| 5139 | +/***/ ((module) => { | |
| 5140 | + | |
| 5141 | +function _isNativeFunction(fn) { | |
| 5142 | + return Function.toString.call(fn).indexOf("[native code]") !== -1; | |
| 5143 | +} | |
| 5144 | +module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5145 | + | |
| 5146 | +/***/ }), | |
| 5147 | + | |
| 5148 | +/***/ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js": | |
| 5149 | +/*!**************************************************************************!*\ | |
| 5150 | + !*** ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***! | |
| 5151 | + \**************************************************************************/ | |
| 5152 | +/***/ ((module) => { | |
| 5153 | + | |
| 5154 | +function _isNativeReflectConstruct() { | |
| 5155 | + if (typeof Reflect === "undefined" || !Reflect.construct) return false; | |
| 5156 | + if (Reflect.construct.sham) return false; | |
| 5157 | + if (typeof Proxy === "function") return true; | |
| 5158 | + try { | |
| 5159 | + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); | |
| 5160 | + return true; | |
| 5161 | + } catch (e) { | |
| 5162 | + return false; | |
| 5163 | + } | |
| 5164 | +} | |
| 5165 | +module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5166 | + | |
| 5167 | +/***/ }), | |
| 5168 | + | |
| 5169 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 5170 | +/*!**********************************************************************!*\ | |
| 5171 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 5172 | + \**********************************************************************/ | |
| 5173 | +/***/ ((module) => { | |
| 5174 | + | |
| 5175 | +function _iterableToArrayLimit(arr, i) { | |
| 5176 | + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; | |
| 5177 | + if (_i == null) return; | |
| 5178 | + var _arr = []; | |
| 5179 | + var _n = true; | |
| 5180 | + var _d = false; | |
| 5181 | + var _s, _e; | |
| 5182 | + try { | |
| 5183 | + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { | |
| 5184 | + _arr.push(_s.value); | |
| 5185 | + if (i && _arr.length === i) break; | |
| 5186 | + } | |
| 5187 | + } catch (err) { | |
| 5188 | + _d = true; | |
| 5189 | + _e = err; | |
| 5190 | + } finally { | |
| 5191 | + try { | |
| 5192 | + if (!_n && _i["return"] != null) _i["return"](); | |
| 5193 | + } finally { | |
| 5194 | + if (_d) throw _e; | |
| 5195 | + } | |
| 5196 | + } | |
| 5197 | + return _arr; | |
| 5198 | +} | |
| 5199 | +module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5200 | + | |
| 5201 | +/***/ }), | |
| 5202 | + | |
| 5203 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 5204 | +/*!*****************************************************************!*\ | |
| 5205 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 5206 | + \*****************************************************************/ | |
| 5207 | +/***/ ((module) => { | |
| 5208 | + | |
| 5209 | +function _nonIterableRest() { | |
| 5210 | + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 5211 | +} | |
| 5212 | +module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5213 | + | |
| 5214 | +/***/ }), | |
| 5215 | + | |
| 5216 | +/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 5217 | +/*!***************************************************************************!*\ | |
| 5218 | + !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 5219 | + \***************************************************************************/ | |
| 5220 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5221 | + | |
| 5222 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 5223 | +var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 5224 | +function _possibleConstructorReturn(self, call) { | |
| 5225 | + if (call && (_typeof(call) === "object" || typeof call === "function")) { | |
| 5226 | + return call; | |
| 5227 | + } else if (call !== void 0) { | |
| 5228 | + throw new TypeError("Derived constructors may only return object or undefined"); | |
| 5229 | + } | |
| 5230 | + return assertThisInitialized(self); | |
| 5231 | +} | |
| 5232 | +module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5233 | + | |
| 5234 | +/***/ }), | |
| 5235 | + | |
| 5236 | +/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 5237 | +/*!****************************************************************!*\ | |
| 5238 | + !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 5239 | + \****************************************************************/ | |
| 5240 | +/***/ ((module) => { | |
| 5241 | + | |
| 5242 | +function _setPrototypeOf(o, p) { | |
| 5243 | + module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { | |
| 5244 | + o.__proto__ = p; | |
| 5245 | + return o; | |
| 5246 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5247 | + return _setPrototypeOf(o, p); | |
| 5248 | +} | |
| 5249 | +module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5250 | + | |
| 5251 | +/***/ }), | |
| 5252 | + | |
| 5253 | +/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 5254 | +/*!***************************************************************!*\ | |
| 5255 | + !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 5256 | + \***************************************************************/ | |
| 5257 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5258 | + | |
| 5259 | +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 5260 | +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 5261 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 5262 | +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 5263 | +function _slicedToArray(arr, i) { | |
| 5264 | + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); | |
| 5265 | +} | |
| 5266 | +module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5267 | + | |
| 5268 | +/***/ }), | |
| 5269 | + | |
| 5270 | +/***/ "../node_modules/@babel/runtime/helpers/superPropBase.js": | |
| 5271 | +/*!***************************************************************!*\ | |
| 5272 | + !*** ../node_modules/@babel/runtime/helpers/superPropBase.js ***! | |
| 5273 | + \***************************************************************/ | |
| 5274 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5275 | + | |
| 5276 | +var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); | |
| 5277 | +function _superPropBase(object, property) { | |
| 5278 | + while (!Object.prototype.hasOwnProperty.call(object, property)) { | |
| 5279 | + object = getPrototypeOf(object); | |
| 5280 | + if (object === null) break; | |
| 5281 | + } | |
| 5282 | + return object; | |
| 5283 | +} | |
| 5284 | +module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5285 | + | |
| 5286 | +/***/ }), | |
| 5287 | + | |
| 5288 | +/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 5289 | +/*!********************************************************!*\ | |
| 5290 | + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 5291 | + \********************************************************/ | |
| 5292 | +/***/ ((module) => { | |
| 5293 | + | |
| 5294 | +function _typeof(obj) { | |
| 5295 | + "@babel/helpers - typeof"; | |
| 5296 | + | |
| 5297 | + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { | |
| 5298 | + return typeof obj; | |
| 5299 | + } : function (obj) { | |
| 5300 | + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; | |
| 5301 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); | |
| 5302 | +} | |
| 5303 | +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5304 | + | |
| 5305 | +/***/ }), | |
| 5306 | + | |
| 5307 | +/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 5308 | +/*!****************************************************************************!*\ | |
| 5309 | + !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 5310 | + \****************************************************************************/ | |
| 5311 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5312 | + | |
| 5313 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 5314 | +function _unsupportedIterableToArray(o, minLen) { | |
| 5315 | + if (!o) return; | |
| 5316 | + if (typeof o === "string") return arrayLikeToArray(o, minLen); | |
| 5317 | + var n = Object.prototype.toString.call(o).slice(8, -1); | |
| 5318 | + if (n === "Object" && o.constructor) n = o.constructor.name; | |
| 5319 | + if (n === "Map" || n === "Set") return Array.from(o); | |
| 5320 | + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); | |
| 5321 | +} | |
| 5322 | +module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5323 | + | |
| 5324 | +/***/ }), | |
| 5325 | + | |
| 5326 | +/***/ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js": | |
| 5327 | +/*!*****************************************************************!*\ | |
| 5328 | + !*** ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***! | |
| 5329 | + \*****************************************************************/ | |
| 5330 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5331 | + | |
| 5332 | +var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); | |
| 5333 | +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 5334 | +var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ "../node_modules/@babel/runtime/helpers/isNativeFunction.js"); | |
| 5335 | +var construct = __webpack_require__(/*! ./construct.js */ "../node_modules/@babel/runtime/helpers/construct.js"); | |
| 5336 | +function _wrapNativeSuper(Class) { | |
| 5337 | + var _cache = typeof Map === "function" ? new Map() : undefined; | |
| 5338 | + module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) { | |
| 5339 | + if (Class === null || !isNativeFunction(Class)) return Class; | |
| 5340 | + if (typeof Class !== "function") { | |
| 5341 | + throw new TypeError("Super expression must either be null or a function"); | |
| 5342 | + } | |
| 5343 | + if (typeof _cache !== "undefined") { | |
| 5344 | + if (_cache.has(Class)) return _cache.get(Class); | |
| 5345 | + _cache.set(Class, Wrapper); | |
| 5346 | + } | |
| 5347 | + function Wrapper() { | |
| 5348 | + return construct(Class, arguments, getPrototypeOf(this).constructor); | |
| 5349 | + } | |
| 5350 | + Wrapper.prototype = Object.create(Class.prototype, { | |
| 5351 | + constructor: { | |
| 5352 | + value: Wrapper, | |
| 5353 | + enumerable: false, | |
| 5354 | + writable: true, | |
| 5355 | + configurable: true | |
| 5356 | + } | |
| 5357 | + }); | |
| 5358 | + return setPrototypeOf(Wrapper, Class); | |
| 5359 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5360 | + return _wrapNativeSuper(Class); | |
| 5361 | +} | |
| 5362 | +module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5363 | + | |
| 5364 | +/***/ }), | |
| 5365 | + | |
| 5366 | +/***/ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js": | |
| 5367 | +/*!********************************************************************!*\ | |
| 5368 | + !*** ../node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! | |
| 5369 | + \********************************************************************/ | |
| 5370 | +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 5371 | + | |
| 5372 | +"use strict"; | |
| 5373 | +__webpack_require__.r(__webpack_exports__); | |
| 5374 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 5375 | +/* harmony export */ "default": () => (/* binding */ _defineProperty) | |
| 5376 | +/* harmony export */ }); | |
| 5377 | +function _defineProperty(obj, key, value) { | |
| 5378 | + if (key in obj) { | |
| 5379 | + Object.defineProperty(obj, key, { | |
| 5380 | + value: value, | |
| 5381 | + enumerable: true, | |
| 5382 | + configurable: true, | |
| 5383 | + writable: true | |
| 5384 | + }); | |
| 5385 | + } else { | |
| 5386 | + obj[key] = value; | |
| 5387 | + } | |
| 5388 | + return obj; | |
| 5389 | +} | |
| 5390 | + | |
| 5391 | +/***/ }), | |
| 5392 | + | |
| 5393 | +/***/ "../node_modules/@babel/runtime/helpers/esm/objectSpread2.js": | |
| 5394 | +/*!*******************************************************************!*\ | |
| 5395 | + !*** ../node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***! | |
| 5396 | + \*******************************************************************/ | |
| 5397 | +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 5398 | + | |
| 5399 | +"use strict"; | |
| 5400 | +__webpack_require__.r(__webpack_exports__); | |
| 5401 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 5402 | +/* harmony export */ "default": () => (/* binding */ _objectSpread2) | |
| 5403 | +/* harmony export */ }); | |
| 5404 | +/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty.js */ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js"); | |
| 5405 | + | |
| 5406 | +function ownKeys(object, enumerableOnly) { | |
| 5407 | + var keys = Object.keys(object); | |
| 5408 | + if (Object.getOwnPropertySymbols) { | |
| 5409 | + var symbols = Object.getOwnPropertySymbols(object); | |
| 5410 | + enumerableOnly && (symbols = symbols.filter(function (sym) { | |
| 5411 | + return Object.getOwnPropertyDescriptor(object, sym).enumerable; | |
| 5412 | + })), keys.push.apply(keys, symbols); | |
| 5413 | + } | |
| 5414 | + return keys; | |
| 5415 | +} | |
| 5416 | +function _objectSpread2(target) { | |
| 5417 | + for (var i = 1; i < arguments.length; i++) { | |
| 5418 | + var source = null != arguments[i] ? arguments[i] : {}; | |
| 5419 | + i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { | |
| 5420 | + (0,_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]); | |
| 5421 | + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { | |
| 5422 | + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | |
| 5423 | + }); | |
| 5424 | + } | |
| 5425 | + return target; | |
| 5426 | +} | |
| 5427 | + | |
| 5428 | +/***/ }), | |
| 5429 | + | |
| 5430 | +/***/ "../node_modules/immer/dist/immer.esm.mjs": | |
| 5431 | +/*!************************************************!*\ | |
| 5432 | + !*** ../node_modules/immer/dist/immer.esm.mjs ***! | |
| 5433 | + \************************************************/ | |
| 5434 | +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 5435 | + | |
| 5436 | +"use strict"; | |
| 5437 | +__webpack_require__.r(__webpack_exports__); | |
| 5438 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 5439 | +/* harmony export */ "Immer": () => (/* binding */ un), | |
| 5440 | +/* harmony export */ "applyPatches": () => (/* binding */ pn), | |
| 5441 | +/* harmony export */ "castDraft": () => (/* binding */ K), | |
| 5442 | +/* harmony export */ "castImmutable": () => (/* binding */ $), | |
| 5443 | +/* harmony export */ "createDraft": () => (/* binding */ ln), | |
| 5444 | +/* harmony export */ "current": () => (/* binding */ D), | |
| 5445 | +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), | |
| 5446 | +/* harmony export */ "enableAllPlugins": () => (/* binding */ J), | |
| 5447 | +/* harmony export */ "enableES5": () => (/* binding */ N), | |
| 5448 | +/* harmony export */ "enableMapSet": () => (/* binding */ C), | |
| 5449 | +/* harmony export */ "enablePatches": () => (/* binding */ T), | |
| 5450 | +/* harmony export */ "finishDraft": () => (/* binding */ dn), | |
| 5451 | +/* harmony export */ "freeze": () => (/* binding */ d), | |
| 5452 | +/* harmony export */ "immerable": () => (/* binding */ L), | |
| 5453 | +/* harmony export */ "isDraft": () => (/* binding */ r), | |
| 5454 | +/* harmony export */ "isDraftable": () => (/* binding */ t), | |
| 5455 | +/* harmony export */ "nothing": () => (/* binding */ H), | |
| 5456 | +/* harmony export */ "original": () => (/* binding */ e), | |
| 5457 | +/* harmony export */ "produce": () => (/* binding */ fn), | |
| 5458 | +/* harmony export */ "produceWithPatches": () => (/* binding */ cn), | |
| 5459 | +/* harmony export */ "setAutoFreeze": () => (/* binding */ sn), | |
| 5460 | +/* harmony export */ "setUseProxies": () => (/* binding */ vn) | |
| 5461 | +/* harmony export */ }); | |
| 5462 | +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.delete(r),n.add(t)):n[r]=t}function c(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r}function s(n){return X&&n instanceof Map}function v(n){return q&&n instanceof Set}function p(n){return n.o||n.t}function l(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var r=rn(n);delete r[Q];for(var t=nn(r),e=0;e<t.length;e++){var i=t[e],o=r[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(r[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:n[i]})}return Object.create(Object.getPrototypeOf(n),r)}function d(n,e){return void 0===e&&(e=!1),y(n)||r(n)||!t(n)?n:(o(n)>1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,r){return d(r,!0)}),!0),n)}function h(){n(2)}function y(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function b(r){var t=tn[r];return t||n(18,r),t}function m(n,r){tn[n]||(tn[n]=r)}function _(){return false||U||n(0),U}function j(n,r){r&&(b("Patches"),n.u=[],n.s=[],n.v=r)}function O(n){g(n),n.p.forEach(S),n.p=null}function g(n){n===U&&(U=n.l)}function w(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var r=n[Q];0===r.i||1===r.i?r.j():r.O=!0}function P(r,e){e._=e.p.length;var i=e.p[0],o=void 0!==r&&r!==i;return e.h.g||b("ES5").S(e,r,o),o?(i[Q].P&&(O(e),n(4)),t(r)&&(r=M(e,r),e.l||x(e,r)),e.u&&b("Patches").M(i[Q].t,r,e.u,e.s)):r=M(e,i,[]),O(e),e.u&&e.v(e.u,e.s),r!==H?r:void 0}function M(n,r,t){if(y(r))return r;var e=r[Q];if(!e)return i(r,(function(i,o){return A(n,e,r,i,o,t)}),!0),r;if(e.A!==n)return r;if(!e.P)return x(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l(e.k):e.o;i(3===e.i?new Set(o):o,(function(r,i){return A(n,e,o,r,i,t)})),x(n,o,!1),t&&n.u&&b("Patches").R(e,t,n.u,n.s)}return e.o}function A(e,i,o,a,c,s){if( true&&c===o&&n(5),r(c)){var v=M(e,c,s&&i&&3!==i.i&&!u(i.D,a)?s.concat(a):void 0);if(f(o,a,v),!r(v))return;e.m=!1}if(t(c)&&!y(c)){if(!e.h.F&&e._<1)return;M(e,c),i&&i.A.l||x(e,c)}}function x(n,r,t){void 0===t&&(t=!1),n.h.F&&n.m&&d(r,t)}function z(n,r){var t=n[Q];return(t?p(t):n)[r]}function I(n,r){if(r in n)for(var t=Object.getPrototypeOf(n);t;){var e=Object.getOwnPropertyDescriptor(t,r);if(e)return e;t=Object.getPrototypeOf(t)}}function k(n){n.P||(n.P=!0,n.l&&k(n.l))}function E(n){n.o||(n.o=l(n.t))}function R(n,r,t){var e=s(r)?b("MapSet").N(r,t):v(r)?b("MapSet").T(r,t):n.g?function(n,r){var t=Array.isArray(n),e={i:t?1:0,A:r?r.A:_(),P:!1,I:!1,D:{},l:r,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;t&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(r,t):b("ES5").J(r,t);return(t?t.A:_()).p.push(e),e}function D(e){return r(e)||n(22,e),function n(r){if(!t(r))return r;var e,u=r[Q],c=o(r);if(u){if(!u.P&&(u.i<4||!b("ES5").K(u)))return u.t;u.I=!0,e=F(r,c),u.I=!1}else e=F(r,c);return i(e,(function(r,t){u&&a(u.t,r)===t||f(e,r,n(t))})),3===c?new Set(e):e}(e)}function F(n,r){switch(r){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}function N(){function t(n,r){var t=s[n];return t?t.enumerable=r:s[n]=t={configurable:!0,enumerable:r,get:function(){var r=this[Q];return true&&f(r),en.get(r,n)},set:function(r){var t=this[Q]; true&&f(t),en.set(t,n,r)}},t}function e(n){for(var r=n.length-1;r>=0;r--){var t=n[r][Q];if(!t.P)switch(t.i){case 5:a(t)&&k(t);break;case 4:o(t)&&k(t)}}}function o(n){for(var r=n.t,t=n.k,e=nn(t),i=e.length-1;i>=0;i--){var o=e[i];if(o!==Q){var a=r[o];if(void 0===a&&!u(r,o))return!0;var f=t[o],s=f&&f[Q];if(s?s.t!==a:!c(f,a))return!0}}var v=!!r[Q];return e.length!==nn(r).length+(v?0:1)}function a(n){var r=n.k;if(r.length!==n.t.length)return!0;var t=Object.getOwnPropertyDescriptor(r,r.length-1);if(t&&!t.get)return!0;for(var e=0;e<r.length;e++)if(!r.hasOwnProperty(e))return!0;return!1}function f(r){r.O&&n(3,JSON.stringify(p(r)))}var s={};m("ES5",{J:function(n,r){var e=Array.isArray(n),i=function(n,r){if(n){for(var e=Array(r.length),i=0;i<r.length;i++)Object.defineProperty(e,""+i,t(i,!0));return e}var o=rn(r);delete o[Q];for(var u=nn(o),a=0;a<u.length;a++){var f=u[a];o[f]=t(f,n||!!o[f].enumerable)}return Object.create(Object.getPrototypeOf(r),o)}(e,n),o={i:e?5:4,A:r?r.A:_(),P:!1,I:!1,D:{},l:r,t:n,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,Q,{value:o,writable:!0}),i},S:function(n,t,o){o?r(t)&&t[Q].A===n&&e(n.p):(n.u&&function n(r){if(r&&"object"==typeof r){var t=r[Q];if(t){var e=t.t,o=t.k,f=t.D,c=t.i;if(4===c)i(o,(function(r){r!==Q&&(void 0!==e[r]||u(e,r)?f[r]||n(o[r]):(f[r]=!0,k(t)))})),i(e,(function(n){void 0!==o[n]||u(o,n)||(f[n]=!1,k(t))}));else if(5===c){if(a(t)&&(k(t),f.length=!0),o.length<e.length)for(var s=o.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<o.length;v++)f[v]=!0;for(var p=Math.min(o.length,e.length),l=0;l<p;l++)o.hasOwnProperty(l)||(f[l]=!0),void 0===f[l]&&n(o[l])}}}}(n.p[0]),e(n.p))},K:function(n){return 4===n.i?o(n):a(n)}})}function T(){function e(n){if(!t(n))return n;if(Array.isArray(n))return n.map(e);if(s(n))return new Map(Array.from(n.entries()).map((function(n){return[n[0],e(n[1])]})));if(v(n))return new Set(Array.from(n).map(e));var r=Object.create(Object.getPrototypeOf(n));for(var i in n)r[i]=e(n[i]);return u(n,L)&&(r[L]=n[L]),r}function f(n){return r(n)?e(n):n}var c="add";m("Patches",{$:function(r,t){return t.forEach((function(t){for(var i=t.path,u=t.op,f=r,s=0;s<i.length-1;s++){var v=o(f),p=""+i[s];0!==v&&1!==v||"__proto__"!==p&&"constructor"!==p||n(24),"function"==typeof f&&"prototype"===p&&n(24),"object"!=typeof(f=a(f,p))&&n(15,i.join("/"))}var l=o(f),d=e(t.value),h=i[i.length-1];switch(u){case"replace":switch(l){case 2:return f.set(h,d);case 3:n(16);default:return f[h]=d}case c:switch(l){case 1:return"-"===h?f.push(d):f.splice(h,0,d);case 2:return f.set(h,d);case 3:return f.add(d);default:return f[h]=d}case"remove":switch(l){case 1:return f.splice(h,1);case 2:return f.delete(h);case 3:return f.delete(t.value);default:return delete f[h]}default:n(17,u)}})),r},R:function(n,r,t,e){switch(n.i){case 0:case 4:case 2:return function(n,r,t,e){var o=n.t,s=n.o;i(n.D,(function(n,i){var v=a(o,n),p=a(s,n),l=i?u(o,n)?"replace":c:"remove";if(v!==p||"replace"!==l){var d=r.concat(n);t.push("remove"===l?{op:l,path:d}:{op:l,path:d,value:p}),e.push(l===c?{op:"remove",path:d}:"remove"===l?{op:c,path:d,value:f(v)}:{op:"replace",path:d,value:f(v)})}}))}(n,r,t,e);case 5:case 1:return function(n,r,t,e){var i=n.t,o=n.D,u=n.o;if(u.length<i.length){var a=[u,i];i=a[0],u=a[1];var s=[e,t];t=s[0],e=s[1]}for(var v=0;v<i.length;v++)if(o[v]&&u[v]!==i[v]){var p=r.concat([v]);t.push({op:"replace",path:p,value:f(u[v])}),e.push({op:"replace",path:p,value:f(i[v])})}for(var l=i.length;l<u.length;l++){var d=r.concat([l]);t.push({op:c,path:d,value:f(u[l])})}i.length<u.length&&e.push({op:"replace",path:r.concat(["length"]),value:i.length})}(n,r,t,e);case 3:return function(n,r,t,e){var i=n.t,o=n.o,u=0;i.forEach((function(n){if(!o.has(n)){var i=r.concat([u]);t.push({op:"remove",path:i,value:n}),e.unshift({op:c,path:i,value:n})}u++})),u=0,o.forEach((function(n){if(!i.has(n)){var o=r.concat([u]);t.push({op:c,path:o,value:n}),e.unshift({op:"remove",path:o,value:n})}u++}))}(n,r,t,e)}},M:function(n,r,t,e){t.push({op:"replace",path:[],value:r===H?void 0:r}),e.push({op:"replace",path:[],value:n})}})}function C(){function r(n,r){function t(){this.constructor=n}a(n,r),n.prototype=(t.prototype=r.prototype,new t)}function e(n){n.o||(n.D=new Map,n.o=new Map(n.t))}function o(n){n.o||(n.o=new Set,n.t.forEach((function(r){if(t(r)){var e=R(n.A.h,r,n);n.p.set(r,e),n.o.add(e)}else n.o.add(r)})))}function u(r){r.O&&n(3,JSON.stringify(p(r)))}var a=function(n,r){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var t in r)r.hasOwnProperty(t)&&(n[t]=r[t])})(n,r)},f=function(){function n(n,r){return this[Q]={i:2,l:r,A:r?r.A:_(),P:!1,I:!1,o:void 0,D:void 0,t:n,k:this,C:!1,O:!1},this}r(n,Map);var o=n.prototype;return Object.defineProperty(o,"size",{get:function(){return p(this[Q]).size}}),o.has=function(n){return p(this[Q]).has(n)},o.set=function(n,r){var t=this[Q];return u(t),p(t).has(n)&&p(t).get(n)===r||(e(t),k(t),t.D.set(n,!0),t.o.set(n,r),t.D.set(n,!0)),this},o.delete=function(n){if(!this.has(n))return!1;var r=this[Q];return u(r),e(r),k(r),r.t.has(n)?r.D.set(n,!1):r.D.delete(n),r.o.delete(n),!0},o.clear=function(){var n=this[Q];u(n),p(n).size&&(e(n),k(n),n.D=new Map,i(n.t,(function(r){n.D.set(r,!1)})),n.o.clear())},o.forEach=function(n,r){var t=this;p(this[Q]).forEach((function(e,i){n.call(r,t.get(i),i,t)}))},o.get=function(n){var r=this[Q];u(r);var i=p(r).get(n);if(r.I||!t(i))return i;if(i!==r.t.get(n))return i;var o=R(r.A.h,i,r);return e(r),r.o.set(n,o),o},o.keys=function(){return p(this[Q]).keys()},o.values=function(){var n,r=this,t=this.keys();return(n={})[V]=function(){return r.values()},n.next=function(){var n=t.next();return n.done?n:{done:!1,value:r.get(n.value)}},n},o.entries=function(){var n,r=this,t=this.keys();return(n={})[V]=function(){return r.entries()},n.next=function(){var n=t.next();if(n.done)return n;var e=r.get(n.value);return{done:!1,value:[n.value,e]}},n},o[V]=function(){return this.entries()},n}(),c=function(){function n(n,r){return this[Q]={i:3,l:r,A:r?r.A:_(),P:!1,I:!1,o:void 0,t:n,k:this,p:new Map,O:!1,C:!1},this}r(n,Set);var t=n.prototype;return Object.defineProperty(t,"size",{get:function(){return p(this[Q]).size}}),t.has=function(n){var r=this[Q];return u(r),r.o?!!r.o.has(n)||!(!r.p.has(n)||!r.o.has(r.p.get(n))):r.t.has(n)},t.add=function(n){var r=this[Q];return u(r),this.has(n)||(o(r),k(r),r.o.add(n)),this},t.delete=function(n){if(!this.has(n))return!1;var r=this[Q];return u(r),o(r),k(r),r.o.delete(n)||!!r.p.has(n)&&r.o.delete(r.p.get(n))},t.clear=function(){var n=this[Q];u(n),p(n).size&&(o(n),k(n),n.o.clear())},t.values=function(){var n=this[Q];return u(n),o(n),n.o.values()},t.entries=function(){var n=this[Q];return u(n),o(n),n.o.entries()},t.keys=function(){return this.values()},t[V]=function(){return this.values()},t.forEach=function(n,r){for(var t=this.values(),e=t.next();!e.done;)n.call(r,e.value,e.value,this),e=t.next()},n}();m("MapSet",{N:function(n,r){return new f(n,r)},T:function(n,r){return new c(n,r)}})}function J(){N(),C(),T()}function K(n){return n}function $(n){return n}var G,U,W="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),X="undefined"!=typeof Map,q="undefined"!=typeof Set,B="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H=W?Symbol.for("immer-nothing"):((G={})["immer-nothing"]=!0,G),L=W?Symbol.for("immer-draftable"):"__$immer_draftable",Q=W?Symbol.for("immer-state"):"__$immer_state",V="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",Y={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(n){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(n){return"Cannot apply patch, path doesn't resolve: "+n},16:'Sets cannot have "replace" patches.',17:function(n){return"Unsupported patch operation: "+n},18:function(n){return"The plugin for '"+n+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+n+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(n){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+n+"'"},22:function(n){return"'current' expects a draft, got: "+n},23:function(n){return"'original' expects a draft, got: "+n},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},Z=""+Object.prototype.constructor,nn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,rn=Object.getOwnPropertyDescriptors||function(n){var r={};return nn(n).forEach((function(t){r[t]=Object.getOwnPropertyDescriptor(n,t)})),r},tn={},en={get:function(n,r){if(r===Q)return n;var e=p(n);if(!u(e,r))return function(n,r,t){var e,i=I(r,t);return i?"value"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(n.k):void 0}(n,e,r);var i=e[r];return n.I||!t(i)?i:i===z(n.t,r)?(E(n),n.o[r]=R(n.A.h,i,n)):i},has:function(n,r){return r in p(n)},ownKeys:function(n){return Reflect.ownKeys(p(n))},set:function(n,r,t){var e=I(p(n),r);if(null==e?void 0:e.set)return e.set.call(n.k,t),!0;if(!n.P){var i=z(p(n),r),o=null==i?void 0:i[Q];if(o&&o.t===t)return n.o[r]=t,n.D[r]=!1,!0;if(c(t,i)&&(void 0!==t||u(n.t,r)))return!0;E(n),k(n)}return n.o[r]===t&&"number"!=typeof t&&(void 0!==t||r in n.o)||(n.o[r]=t,n.D[r]=!0,!0)},deleteProperty:function(n,r){return void 0!==z(n.t,r)||r in n.t?(n.D[r]=!1,E(n),k(n)):delete n.D[r],n.o&&delete n.o[r],!0},getOwnPropertyDescriptor:function(n,r){var t=p(n),e=Reflect.getOwnPropertyDescriptor(t,r);return e?{writable:!0,configurable:1!==n.i||"length"!==r,enumerable:e.enumerable,value:t[r]}:e},defineProperty:function(){n(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n(12)}},on={};i(en,(function(n,r){on[n]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}})),on.deleteProperty=function(r,t){return true&&isNaN(parseInt(t))&&n(13),on.set.call(this,r,t,void 0)},on.set=function(r,t,e){return true&&"length"!==t&&isNaN(parseInt(t))&&n(14),en.set.call(this,r[0],t,e,r[0])};var un=function(){function e(r){var e=this;this.g=B,this.F=!0,this.produce=function(r,i,o){if("function"==typeof r&&"function"!=typeof i){var u=i;i=r;var a=e;return function(n){var r=this;void 0===n&&(n=u);for(var t=arguments.length,e=Array(t>1?t-1:0),o=1;o<t;o++)e[o-1]=arguments[o];return a.produce(n,(function(n){var t;return(t=i).call.apply(t,[r,n].concat(e))}))}}var f;if("function"!=typeof i&&n(6),void 0!==o&&"function"!=typeof o&&n(7),t(r)){var c=w(e),s=R(e,r,void 0),v=!0;try{f=i(s),v=!1}finally{v?O(c):g(c)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw O(c),n})):(j(c,o),P(f,c))}if(!r||"object"!=typeof r){if(void 0===(f=i(r))&&(f=r),f===H&&(f=void 0),e.F&&d(f,!0),o){var p=[],l=[];b("Patches").M(r,f,p,l),o(p,l)}return f}n(21,r)},this.produceWithPatches=function(n,r){if("function"==typeof n)return function(r){for(var t=arguments.length,i=Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];return e.produceWithPatches(r,(function(r){return n.apply(void 0,[r].concat(i))}))};var t,i,o=e.produce(n,r,(function(n,r){t=n,i=r}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(n){return[n,t,i]})):[o,t,i]},"boolean"==typeof(null==r?void 0:r.useProxies)&&this.setUseProxies(r.useProxies),"boolean"==typeof(null==r?void 0:r.autoFreeze)&&this.setAutoFreeze(r.autoFreeze)}var i=e.prototype;return i.createDraft=function(e){t(e)||n(8),r(e)&&(e=D(e));var i=w(this),o=R(this,e,void 0);return o[Q].C=!0,g(i),o},i.finishDraft=function(r,t){var e=r&&r[Q]; true&&(e&&e.C||n(9),e.I&&n(10));var i=e.A;return j(i,t),P(void 0,i)},i.setAutoFreeze=function(n){this.F=n},i.setUseProxies=function(r){r&&!B&&n(20),this.g=r},i.applyPatches=function(n,t){var e;for(e=t.length-1;e>=0;e--){var i=t[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}e>-1&&(t=t.slice(e+1));var o=b("Patches").$;return r(n)?o(n,t):this.produce(n,(function(n){return o(n,t)}))},e}(),an=new un,fn=an.produce,cn=an.produceWithPatches.bind(an),sn=an.setAutoFreeze.bind(an),vn=an.setUseProxies.bind(an),pn=an.applyPatches.bind(an),ln=an.createDraft.bind(an),dn=an.finishDraft.bind(an);/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (fn); | |
| 5463 | +//# sourceMappingURL=immer.esm.js.map | |
| 5464 | + | |
| 5465 | + | |
| 5466 | +/***/ }) | |
| 5467 | + | |
| 5468 | +/******/ }); | |
| 5469 | +/************************************************************************/ | |
| 5470 | +/******/ // The module cache | |
| 5471 | +/******/ var __webpack_module_cache__ = {}; | |
| 5472 | +/******/ | |
| 5473 | +/******/ // The require function | |
| 5474 | +/******/ function __webpack_require__(moduleId) { | |
| 5475 | +/******/ // Check if module is in cache | |
| 5476 | +/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 5477 | +/******/ if (cachedModule !== undefined) { | |
| 5478 | +/******/ return cachedModule.exports; | |
| 5479 | +/******/ } | |
| 5480 | +/******/ // Create a new module (and put it into the cache) | |
| 5481 | +/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 5482 | +/******/ // no module.id needed | |
| 5483 | +/******/ // no module.loaded needed | |
| 5484 | +/******/ exports: {} | |
| 5485 | +/******/ }; | |
| 5486 | +/******/ | |
| 5487 | +/******/ // Execute the module function | |
| 5488 | +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 5489 | +/******/ | |
| 5490 | +/******/ // Return the exports of the module | |
| 5491 | +/******/ return module.exports; | |
| 5492 | +/******/ } | |
| 5493 | +/******/ | |
| 5494 | +/************************************************************************/ | |
| 5495 | +/******/ /* webpack/runtime/define property getters */ | |
| 5496 | +/******/ (() => { | |
| 5497 | +/******/ // define getter functions for harmony exports | |
| 5498 | +/******/ __webpack_require__.d = (exports, definition) => { | |
| 5499 | +/******/ for(var key in definition) { | |
| 5500 | +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 5501 | +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 5502 | +/******/ } | |
| 5503 | +/******/ } | |
| 5504 | +/******/ }; | |
| 5505 | +/******/ })(); | |
| 5506 | +/******/ | |
| 5507 | +/******/ /* webpack/runtime/hasOwnProperty shorthand */ | |
| 5508 | +/******/ (() => { | |
| 5509 | +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) | |
| 5510 | +/******/ })(); | |
| 5511 | +/******/ | |
| 5512 | +/******/ /* webpack/runtime/make namespace object */ | |
| 5513 | +/******/ (() => { | |
| 5514 | +/******/ // define __esModule on exports | |
| 5515 | +/******/ __webpack_require__.r = (exports) => { | |
| 5516 | +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | |
| 5517 | +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | |
| 5518 | +/******/ } | |
| 5519 | +/******/ Object.defineProperty(exports, '__esModule', { value: true }); | |
| 5520 | +/******/ }; | |
| 5521 | +/******/ })(); | |
| 5522 | +/******/ | |
| 5523 | +/************************************************************************/ | |
| 5524 | +var __webpack_exports__ = {}; | |
| 5525 | +// This entry need to be wrapped in an IIFE because it need to be in strict mode. | |
| 5526 | +(() => { | |
| 5527 | +"use strict"; | |
| 5528 | +/*!**************************************!*\ | |
| 5529 | + !*** ../app/assets/js/app-loader.js ***! | |
| 5530 | + \**************************************/ | |
| 5531 | + | |
| 5532 | + | |
| 5533 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 5534 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 5535 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 5536 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 5537 | +var _component = _interopRequireDefault(__webpack_require__(/*! ./loader/component */ "../app/assets/js/loader/component.js")); | |
| 5538 | +var AppLoader = /*#__PURE__*/function () { | |
| 5539 | + function AppLoader() { | |
| 5540 | + (0, _classCallCheck2.default)(this, AppLoader); | |
| 5541 | + (0, _defineProperty2.default)(this, "selector", 'a.elementor-app-link, .elementor-app-link .ab-item'); | |
| 5542 | + $e.components.register(new _component.default()); | |
| 5543 | + window.addEventListener('DOMContentLoaded', this.onLoad.bind(this)); | |
| 5544 | + } | |
| 5545 | + (0, _createClass2.default)(AppLoader, [{ | |
| 5546 | + key: "onLoad", | |
| 5547 | + value: function onLoad() { | |
| 5548 | + var links = document.querySelectorAll(this.selector); | |
| 5549 | + if (!links.length) { | |
| 5550 | + return; | |
| 5551 | + } | |
| 5552 | + links.forEach(function (link) { | |
| 5553 | + link.addEventListener('click', function (event) { | |
| 5554 | + event.preventDefault(); | |
| 5555 | + $e.run('app/open', { | |
| 5556 | + url: link.href | |
| 5557 | + }); | |
| 5558 | + }); | |
| 5559 | + link.addEventListener('mouseenter', function () { | |
| 5560 | + $e.run('app/load', { | |
| 5561 | + url: link.href | |
| 5562 | + }); | |
| 5563 | + }); | |
| 5564 | + }); | |
| 5565 | + } | |
| 5566 | + }]); | |
| 5567 | + return AppLoader; | |
| 5568 | +}(); | |
| 5569 | +window.elementorAppLoader = new AppLoader(); | |
| 5570 | +})(); | |
| 5571 | + | |
| 5572 | +/******/ })() | |
| 5573 | +; | |
| 1852 | 5574 | //# sourceMappingURL=app-loader.js.map |