| @@ -1,7 +1,1845 @@ | ||
| 1 | +/*! elementor - v3.9.2 - 21-12-2022 */ | |
| 1 | 2 | /******/ (() => { // webpackBootstrap |
| 2 | 3 | /******/ var __webpack_modules__ = ({ |
| 3 | 4 | |
| 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__) => { | |
| 10 | + | |
| 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 | |
| 1839 | + | |
| 1840 | +/***/ }), | |
| 1841 | + | |
| 4 | 1842 | /***/ "../assets/dev/js/editor/utils/is-instanceof.js": |
| 5 | 1843 | /*!******************************************************!*\ |
| 6 | 1844 | !*** ../assets/dev/js/editor/utils/is-instanceof.js ***! |
| 7 | 1845 | \******************************************************/ |
| @@ -13,11 +1851,11 @@ | ||
| 13 | 1851 | Object.defineProperty(exports, "__esModule", ({ |
| 14 | 1852 | value: true |
| 15 | 1853 | })); |
| 16 | 1854 | exports["default"] = void 0; |
| 17 | -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } | |
| 18 | -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } | |
| 19 | -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } | |
| 1855 | +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; } } }; } | |
| 1856 | +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); } | |
| 1857 | +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; } | |
| 20 | 1858 | /** |
| 21 | 1859 | * Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved |
| 22 | 1860 | * object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can |
| 23 | 1861 | * check whether it's instanceof by using the objects constructor and prototype names. |
| @@ -25,16 +1863,16 @@ | ||
| 25 | 1863 | * @param object |
| 26 | 1864 | * @param constructors |
| 27 | 1865 | * @return {boolean} |
| 28 | 1866 | */ |
| 29 | -var _default = exports["default"] = function _default(object, constructors) { | |
| 1867 | +var _default = function _default(object, constructors) { | |
| 30 | 1868 | constructors = Array.isArray(constructors) ? constructors : [constructors]; |
| 31 | 1869 | var _iterator = _createForOfIteratorHelper(constructors), |
| 32 | 1870 | _step; |
| 33 | 1871 | try { |
| 34 | 1872 | for (_iterator.s(); !(_step = _iterator.n()).done;) { |
| 35 | - var constructor = _step.value; | |
| 36 | - if (object.constructor.name === constructor.prototype[Symbol.toStringTag]) { | |
| 1873 | + var _constructor = _step.value; | |
| 1874 | + if (object.constructor.name === _constructor.prototype[Symbol.toStringTag]) { | |
| 37 | 1875 | return true; |
| 38 | 1876 | } |
| 39 | 1877 | } |
| 40 | 1878 | } catch (err) { |
| @@ -43,8 +1881,9 @@ | ||
| 43 | 1881 | _iterator.f(); |
| 44 | 1882 | } |
| 45 | 1883 | return false; |
| 46 | 1884 | }; |
| 1885 | +exports["default"] = _default; | |
| 47 | 1886 | |
| 48 | 1887 | /***/ }), |
| 49 | 1888 | |
| 50 | 1889 | /***/ "../assets/dev/js/modules/imports/args-object.js": |
| @@ -63,16 +1902,18 @@ | ||
| 63 | 1902 | exports["default"] = void 0; |
| 64 | 1903 | var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js")); |
| 65 | 1904 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 66 | 1905 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1906 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 67 | 1907 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 68 | 1908 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 69 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 70 | 1909 | var _instanceType = _interopRequireDefault(__webpack_require__(/*! ./instance-type */ "../assets/dev/js/modules/imports/instance-type.js")); |
| 71 | 1910 | var _isInstanceof = _interopRequireDefault(__webpack_require__(/*! ../../editor/utils/is-instanceof */ "../assets/dev/js/editor/utils/is-instanceof.js")); |
| 72 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 73 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 74 | -var ArgsObject = exports["default"] = /*#__PURE__*/function (_InstanceType) { | |
| 1911 | +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); }; } | |
| 1912 | +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; } } | |
| 1913 | +var ArgsObject = /*#__PURE__*/function (_InstanceType) { | |
| 1914 | + (0, _inherits2.default)(ArgsObject, _InstanceType); | |
| 1915 | + var _super = _createSuper(ArgsObject); | |
| 75 | 1916 | /** |
| 76 | 1917 | * Function constructor(). |
| 77 | 1918 | * |
| 78 | 1919 | * Create ArgsObject. |
| @@ -81,9 +1922,9 @@ | ||
| 81 | 1922 | */ |
| 82 | 1923 | function ArgsObject(args) { |
| 83 | 1924 | var _this; |
| 84 | 1925 | (0, _classCallCheck2.default)(this, ArgsObject); |
| 85 | - _this = _callSuper(this, ArgsObject); | |
| 1926 | + _this = _super.call(this); | |
| 86 | 1927 | _this.args = args; |
| 87 | 1928 | return _this; |
| 88 | 1929 | } |
| 89 | 1930 | |
| @@ -95,11 +1936,11 @@ | ||
| 95 | 1936 | * @param {string} property |
| 96 | 1937 | * @param {{}} args |
| 97 | 1938 | * |
| 98 | 1939 | * @throws {Error} |
| 1940 | + * | |
| 99 | 1941 | */ |
| 100 | - (0, _inherits2.default)(ArgsObject, _InstanceType); | |
| 101 | - return (0, _createClass2.default)(ArgsObject, [{ | |
| 1942 | + (0, _createClass2.default)(ArgsObject, [{ | |
| 102 | 1943 | key: "requireArgument", |
| 103 | 1944 | value: function requireArgument(property) { |
| 104 | 1945 | var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.args; |
| 105 | 1946 | if (!Object.prototype.hasOwnProperty.call(args, property)) { |
| @@ -116,8 +1957,9 @@ | ||
| 116 | 1957 | * @param {string} type |
| 117 | 1958 | * @param {{}} args |
| 118 | 1959 | * |
| 119 | 1960 | * @throws {Error} |
| 1961 | + * | |
| 120 | 1962 | */ |
| 121 | 1963 | }, { |
| 122 | 1964 | key: "requireArgumentType", |
| 123 | 1965 | value: function requireArgumentType(property, type) { |
| @@ -137,8 +1979,9 @@ | ||
| 137 | 1979 | * @param {*} instance |
| 138 | 1980 | * @param {{}} args |
| 139 | 1981 | * |
| 140 | 1982 | * @throws {Error} |
| 1983 | + * | |
| 141 | 1984 | */ |
| 142 | 1985 | }, { |
| 143 | 1986 | key: "requireArgumentInstance", |
| 144 | 1987 | value: function requireArgumentInstance(property, instance) { |
| @@ -158,8 +2001,9 @@ | ||
| 158 | 2001 | * @param {*} type |
| 159 | 2002 | * @param {{}} args |
| 160 | 2003 | * |
| 161 | 2004 | * @throws {Error} |
| 2005 | + * | |
| 162 | 2006 | */ |
| 163 | 2007 | }, { |
| 164 | 2008 | key: "requireArgumentConstructor", |
| 165 | 2009 | value: function requireArgumentConstructor(property, type) { |
| @@ -177,9 +2021,11 @@ | ||
| 177 | 2021 | value: function getInstanceType() { |
| 178 | 2022 | return 'ArgsObject'; |
| 179 | 2023 | } |
| 180 | 2024 | }]); |
| 2025 | + return ArgsObject; | |
| 181 | 2026 | }(_instanceType.default); |
| 2027 | +exports["default"] = ArgsObject; | |
| 182 | 2028 | |
| 183 | 2029 | /***/ }), |
| 184 | 2030 | |
| 185 | 2031 | /***/ "../assets/dev/js/modules/imports/instance-type.js": |
| @@ -197,12 +2043,11 @@ | ||
| 197 | 2043 | })); |
| 198 | 2044 | exports["default"] = void 0; |
| 199 | 2045 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 200 | 2046 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2047 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 201 | 2048 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 202 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 203 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 204 | -var InstanceType = exports["default"] = /*#__PURE__*/function () { | |
| 2049 | +var InstanceType = /*#__PURE__*/function (_Symbol$hasInstance) { | |
| 205 | 2050 | function InstanceType() { |
| 206 | 2051 | var _this = this; |
| 207 | 2052 | (0, _classCallCheck2.default)(this, InstanceType); |
| 208 | 2053 | // Since anonymous classes sometimes do not get validated by babel, do it manually. |
| @@ -215,10 +2060,10 @@ | ||
| 215 | 2060 | prototypes.reverse().forEach(function (proto) { |
| 216 | 2061 | return _this instanceof proto; |
| 217 | 2062 | }); |
| 218 | 2063 | } |
| 219 | - return (0, _createClass2.default)(InstanceType, null, [{ | |
| 220 | - key: Symbol.hasInstance, | |
| 2064 | + (0, _createClass2.default)(InstanceType, null, [{ | |
| 2065 | + key: _Symbol$hasInstance, | |
| 221 | 2066 | value: function value(target) { |
| 222 | 2067 | /** |
| 223 | 2068 | * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class |
| 224 | 2069 | * its give's opportunity to mange capabilities of instanceOf operator. |
| @@ -223,9 +2068,9 @@ | ||
| 223 | 2068 | * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class |
| 224 | 2069 | * its give's opportunity to mange capabilities of instanceOf operator. |
| 225 | 2070 | * saving current class each time will give option later to handle instanceOf manually. |
| 226 | 2071 | */ |
| 227 | - var result = _superPropGet(InstanceType, Symbol.hasInstance, this, 2)([target]); | |
| 2072 | + var result = (0, _get2.default)((0, _getPrototypeOf2.default)(InstanceType), Symbol.hasInstance, this).call(this, target); | |
| 228 | 2073 | |
| 229 | 2074 | // Act normal when validate a class, which does not have instance type. |
| 230 | 2075 | if (target && !target.constructor.getInstanceType) { |
| 231 | 2076 | return result; |
| @@ -257,9 +2102,11 @@ | ||
| 257 | 2102 | value: function getInstanceType() { |
| 258 | 2103 | elementorModules.ForceMethodImplementation(); |
| 259 | 2104 | } |
| 260 | 2105 | }]); |
| 261 | -}(); | |
| 2106 | + return InstanceType; | |
| 2107 | +}(Symbol.hasInstance); | |
| 2108 | +exports["default"] = InstanceType; | |
| 262 | 2109 | |
| 263 | 2110 | /***/ }), |
| 264 | 2111 | |
| 265 | 2112 | /***/ "../assets/dev/js/modules/imports/module.js": |
| @@ -465,11 +2312,12 @@ | ||
| 465 | 2312 | var _store = _interopRequireDefault(__webpack_require__(/*! ./core/store */ "../modules/web-cli/assets/js/core/store.js")); |
| 466 | 2313 | var _uiStates = _interopRequireDefault(__webpack_require__(/*! ./core/ui-states */ "../modules/web-cli/assets/js/core/ui-states.js")); |
| 467 | 2314 | var hookData = _interopRequireWildcard(__webpack_require__(/*! ./modules/hooks/data/ */ "../modules/web-cli/assets/js/modules/hooks/data/index.js")); |
| 468 | 2315 | var hookUI = _interopRequireWildcard(__webpack_require__(/*! ./modules/hooks/ui */ "../modules/web-cli/assets/js/modules/hooks/ui/index.js")); |
| 469 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 2316 | +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); } | |
| 2317 | +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; } | |
| 470 | 2318 | /* Alphabetical order */ |
| 471 | -var API = exports["default"] = /*#__PURE__*/function () { | |
| 2319 | +var API = /*#__PURE__*/function () { | |
| 472 | 2320 | /** |
| 473 | 2321 | * Function constructor(). |
| 474 | 2322 | * |
| 475 | 2323 | * Create's 'elementor' api. |
| @@ -512,9 +2360,9 @@ | ||
| 512 | 2360 | * @param {*} [args={}] |
| 513 | 2361 | * |
| 514 | 2362 | * @return {*} result |
| 515 | 2363 | */ |
| 516 | - return (0, _createClass2.default)(API, [{ | |
| 2364 | + (0, _createClass2.default)(API, [{ | |
| 517 | 2365 | key: "run", |
| 518 | 2366 | value: function run(command) { |
| 519 | 2367 | var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; |
| 520 | 2368 | return $e.commands.run(command, args); |
| @@ -543,23 +2391,21 @@ | ||
| 543 | 2391 | * Alias of `$e.routes.to()`. |
| 544 | 2392 | * |
| 545 | 2393 | * @param {string} route |
| 546 | 2394 | * @param {*} [args={}] |
| 547 | - * @param {Object} [options] | |
| 548 | 2395 | */ |
| 549 | 2396 | }, { |
| 550 | 2397 | key: "route", |
| 551 | 2398 | value: function route(_route) { |
| 552 | 2399 | var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; |
| 553 | - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { | |
| 554 | - history: true | |
| 555 | - }; | |
| 556 | - return $e.routes.to(_route, args, options); | |
| 2400 | + return $e.routes.to(_route, args); | |
| 557 | 2401 | } |
| 558 | 2402 | |
| 559 | 2403 | // TODO: shortcut(); |
| 560 | 2404 | }]); |
| 2405 | + return API; | |
| 561 | 2406 | }(); |
| 2407 | +exports["default"] = API; | |
| 562 | 2408 | |
| 563 | 2409 | /***/ }), |
| 564 | 2410 | |
| 565 | 2411 | /***/ "../modules/web-cli/assets/js/core/backwards-compatibility.js": |
| @@ -575,21 +2421,21 @@ | ||
| 575 | 2421 | Object.defineProperty(exports, "__esModule", ({ |
| 576 | 2422 | value: true |
| 577 | 2423 | })); |
| 578 | 2424 | exports["default"] = void 0; |
| 2425 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 579 | 2426 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 580 | 2427 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 581 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 582 | 2428 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 583 | 2429 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 584 | 2430 | var _componentBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/component-base */ "../modules/web-cli/assets/js/modules/component-base.js")); |
| 585 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 586 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 587 | -var BackwardsCompatibility = exports["default"] = /*#__PURE__*/function () { | |
| 2431 | +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); }; } | |
| 2432 | +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; } } | |
| 2433 | +var BackwardsCompatibility = /*#__PURE__*/function () { | |
| 588 | 2434 | function BackwardsCompatibility() { |
| 589 | 2435 | (0, _classCallCheck2.default)(this, BackwardsCompatibility); |
| 590 | 2436 | } |
| 591 | - return (0, _createClass2.default)(BackwardsCompatibility, [{ | |
| 2437 | + (0, _createClass2.default)(BackwardsCompatibility, [{ | |
| 592 | 2438 | key: "ensureTab", |
| 593 | 2439 | value: function ensureTab(namespace, tabSlug) { |
| 594 | 2440 | var page = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; |
| 595 | 2441 | var component = $e.components.get(namespace); |
| @@ -594,14 +2440,15 @@ | ||
| 594 | 2440 | var page = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; |
| 595 | 2441 | var component = $e.components.get(namespace); |
| 596 | 2442 | if (!component) { |
| 597 | 2443 | var Component = /*#__PURE__*/function (_ComponentBase) { |
| 2444 | + (0, _inherits2.default)(Component, _ComponentBase); | |
| 2445 | + var _super = _createSuper(Component); | |
| 598 | 2446 | function Component() { |
| 599 | 2447 | (0, _classCallCheck2.default)(this, Component); |
| 600 | - return _callSuper(this, Component, arguments); | |
| 2448 | + return _super.apply(this, arguments); | |
| 601 | 2449 | } |
| 602 | - (0, _inherits2.default)(Component, _ComponentBase); | |
| 603 | - return (0, _createClass2.default)(Component, [{ | |
| 2450 | + (0, _createClass2.default)(Component, [{ | |
| 604 | 2451 | key: "getNamespace", |
| 605 | 2452 | value: function getNamespace() { |
| 606 | 2453 | return namespace; |
| 607 | 2454 | } |
| @@ -610,8 +2457,9 @@ | ||
| 610 | 2457 | value: function renderTab(tab) { |
| 611 | 2458 | elementor.getPanelView().setPage(page).activateTab(tab); |
| 612 | 2459 | } |
| 613 | 2460 | }]); |
| 2461 | + return Component; | |
| 614 | 2462 | }(_componentBase.default); |
| 615 | 2463 | component = $e.components.register(new Component()); |
| 616 | 2464 | } |
| 617 | 2465 | if (!component.hasTab(tabSlug) && elementor.config.tabs[tabSlug]) { |
| @@ -620,9 +2468,11 @@ | ||
| 620 | 2468 | }); |
| 621 | 2469 | } |
| 622 | 2470 | } |
| 623 | 2471 | }]); |
| 2472 | + return BackwardsCompatibility; | |
| 624 | 2473 | }(); |
| 2474 | +exports["default"] = BackwardsCompatibility; | |
| 625 | 2475 | |
| 626 | 2476 | /***/ }), |
| 627 | 2477 | |
| 628 | 2478 | /***/ "../modules/web-cli/assets/js/core/backwards-compatibility/commands.js": |
| @@ -640,17 +2490,20 @@ | ||
| 640 | 2490 | })); |
| 641 | 2491 | exports["default"] = void 0; |
| 642 | 2492 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 643 | 2493 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2494 | +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js")); | |
| 2495 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 644 | 2496 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 645 | 2497 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 646 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 647 | 2498 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 648 | 2499 | var _module = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js")); |
| 649 | 2500 | var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); |
| 650 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 651 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 652 | -var CommandsBackwardsCompatibility = exports["default"] = /*#__PURE__*/function (_Module) { | |
| 2501 | +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); }; } | |
| 2502 | +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; } } | |
| 2503 | +var CommandsBackwardsCompatibility = /*#__PURE__*/function (_Module) { | |
| 2504 | + (0, _inherits2.default)(CommandsBackwardsCompatibility, _Module); | |
| 2505 | + var _super = _createSuper(CommandsBackwardsCompatibility); | |
| 653 | 2506 | function CommandsBackwardsCompatibility() { |
| 654 | 2507 | var _this; |
| 655 | 2508 | (0, _classCallCheck2.default)(this, CommandsBackwardsCompatibility); |
| 656 | 2509 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| @@ -655,10 +2508,10 @@ | ||
| 655 | 2508 | (0, _classCallCheck2.default)(this, CommandsBackwardsCompatibility); |
| 656 | 2509 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| 657 | 2510 | args[_key] = arguments[_key]; |
| 658 | 2511 | } |
| 659 | - _this = _callSuper(this, CommandsBackwardsCompatibility, [].concat(args)); | |
| 660 | - (0, _defineProperty2.default)(_this, "on", function (eventName, callback) { | |
| 2512 | + _this = _super.call.apply(_super, [this].concat(args)); | |
| 2513 | + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "on", function (eventName, callback) { | |
| 661 | 2514 | if ('run' === eventName) { |
| 662 | 2515 | var componentName = _this.getConstructorID(); |
| 663 | 2516 | |
| 664 | 2517 | // Regex takes the first letter and convert it to lower case. |
| @@ -672,16 +2525,17 @@ | ||
| 672 | 2525 | _this.onOrig(eventName, callback); |
| 673 | 2526 | }); |
| 674 | 2527 | return _this; |
| 675 | 2528 | } |
| 676 | - (0, _inherits2.default)(CommandsBackwardsCompatibility, _Module); | |
| 677 | - return (0, _createClass2.default)(CommandsBackwardsCompatibility, [{ | |
| 2529 | + (0, _createClass2.default)(CommandsBackwardsCompatibility, [{ | |
| 678 | 2530 | key: "__construct", |
| 679 | 2531 | value: function __construct() { |
| 680 | 2532 | this.onOrig = this.on; |
| 681 | 2533 | } |
| 682 | 2534 | }]); |
| 2535 | + return CommandsBackwardsCompatibility; | |
| 683 | 2536 | }(_module.default); |
| 2537 | +exports["default"] = CommandsBackwardsCompatibility; | |
| 684 | 2538 | |
| 685 | 2539 | /***/ }), |
| 686 | 2540 | |
| 687 | 2541 | /***/ "../modules/web-cli/assets/js/core/commands-internal.js": |
| @@ -699,27 +2553,30 @@ | ||
| 699 | 2553 | })); |
| 700 | 2554 | exports["default"] = void 0; |
| 701 | 2555 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 702 | 2556 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2557 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 703 | 2558 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 704 | 2559 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 705 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 706 | 2560 | var _commands = _interopRequireDefault(__webpack_require__(/*! ./commands.js */ "../modules/web-cli/assets/js/core/commands.js")); |
| 707 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 708 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 709 | -var CommandsInternal = exports["default"] = /*#__PURE__*/function (_Commands) { | |
| 2561 | +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); }; } | |
| 2562 | +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; } } | |
| 2563 | +var CommandsInternal = /*#__PURE__*/function (_Commands) { | |
| 2564 | + (0, _inherits2.default)(CommandsInternal, _Commands); | |
| 2565 | + var _super = _createSuper(CommandsInternal); | |
| 710 | 2566 | function CommandsInternal() { |
| 711 | 2567 | (0, _classCallCheck2.default)(this, CommandsInternal); |
| 712 | - return _callSuper(this, CommandsInternal, arguments); | |
| 2568 | + return _super.apply(this, arguments); | |
| 713 | 2569 | } |
| 714 | - (0, _inherits2.default)(CommandsInternal, _Commands); | |
| 715 | - return (0, _createClass2.default)(CommandsInternal, [{ | |
| 2570 | + (0, _createClass2.default)(CommandsInternal, [{ | |
| 716 | 2571 | key: "error", |
| 717 | 2572 | value: function error(message) { |
| 718 | 2573 | throw Error('Commands internal: ' + message); |
| 719 | 2574 | } |
| 720 | 2575 | }]); |
| 2576 | + return CommandsInternal; | |
| 721 | 2577 | }(_commands.default); |
| 2578 | +exports["default"] = CommandsInternal; | |
| 722 | 2579 | |
| 723 | 2580 | /***/ }), |
| 724 | 2581 | |
| 725 | 2582 | /***/ "../modules/web-cli/assets/js/core/commands.js": |
| @@ -740,20 +2597,21 @@ | ||
| 740 | 2597 | var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); |
| 741 | 2598 | var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js")); |
| 742 | 2599 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 743 | 2600 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2601 | +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js")); | |
| 2602 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 744 | 2603 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 745 | 2604 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 746 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 747 | 2605 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 748 | 2606 | var _commands = _interopRequireDefault(__webpack_require__(/*! ./backwards-compatibility/commands */ "../modules/web-cli/assets/js/core/backwards-compatibility/commands.js")); |
| 749 | 2607 | var _commandBase = _interopRequireDefault(__webpack_require__(/*! ../modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); |
| 750 | 2608 | var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js")); |
| 751 | 2609 | var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); |
| 752 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 753 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 754 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 755 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2610 | +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; } | |
| 2611 | +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; } | |
| 2612 | +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); }; } | |
| 2613 | +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; } } | |
| 756 | 2614 | /** |
| 757 | 2615 | * @typedef {import('../modules/component-base')} ComponentBase |
| 758 | 2616 | */ |
| 759 | 2617 | /** |
| @@ -761,9 +2619,11 @@ | ||
| 761 | 2619 | */ |
| 762 | 2620 | /** |
| 763 | 2621 | * @typedef {{}} Component |
| 764 | 2622 | */ |
| 765 | -var Commands = exports["default"] = /*#__PURE__*/function (_CommandsBackwardsCom) { | |
| 2623 | +var Commands = /*#__PURE__*/function (_CommandsBackwardsCom) { | |
| 2624 | + (0, _inherits2.default)(Commands, _CommandsBackwardsCom); | |
| 2625 | + var _super = _createSuper(Commands); | |
| 766 | 2626 | /** |
| 767 | 2627 | * Function constructor(). |
| 768 | 2628 | * |
| 769 | 2629 | * Create `$e.commands` API. |
| @@ -775,15 +2635,15 @@ | ||
| 775 | 2635 | (0, _classCallCheck2.default)(this, Commands); |
| 776 | 2636 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| 777 | 2637 | args[_key] = arguments[_key]; |
| 778 | 2638 | } |
| 779 | - _this = _callSuper(this, Commands, [].concat(args)); | |
| 2639 | + _this = _super.call.apply(_super, [this].concat(args)); | |
| 780 | 2640 | _this.current = {}; |
| 781 | 2641 | _this.currentArgs = {}; |
| 782 | 2642 | _this.currentTrace = []; |
| 783 | 2643 | _this.commands = {}; |
| 784 | 2644 | _this.components = {}; |
| 785 | - Object.defineProperty(_this, 'classes', { | |
| 2645 | + Object.defineProperty((0, _assertThisInitialized2.default)(_this), 'classes', { | |
| 786 | 2646 | get: function get() { |
| 787 | 2647 | _deprecation.default.deprecated('$e.commands.classes', '3.7.0', '$e.commands.getCommandClass(), $e.commandsInternal.getCommandClass(), $e.data.getCommandClass(), $e.routes.getCommandClass() according to the requested command infra-structure,'); |
| 788 | 2648 | return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, $e.commands.commands), $e.commandsInternal.commands), $e.data.commands), $e.routes.commands); |
| 789 | 2649 | } |
| @@ -794,10 +2654,9 @@ | ||
| 794 | 2654 | /** |
| 795 | 2655 | * @param {string} id |
| 796 | 2656 | * @return {CommandBase} command class |
| 797 | 2657 | */ |
| 798 | - (0, _inherits2.default)(Commands, _CommandsBackwardsCom); | |
| 799 | - return (0, _createClass2.default)(Commands, [{ | |
| 2658 | + (0, _createClass2.default)(Commands, [{ | |
| 800 | 2659 | key: "getCommandClass", |
| 801 | 2660 | value: function getCommandClass(id) { |
| 802 | 2661 | return this.commands[id]; |
| 803 | 2662 | } |
| @@ -1041,14 +2900,8 @@ | ||
| 1041 | 2900 | if (args.onBefore) { |
| 1042 | 2901 | args.onBefore.apply(component, [args]); |
| 1043 | 2902 | } |
| 1044 | 2903 | this.trigger('run:before', component, command, args); |
| 1045 | - window.dispatchEvent(new CustomEvent('elementor/commands/run/before', { | |
| 1046 | - detail: { | |
| 1047 | - command: command, | |
| 1048 | - args: args | |
| 1049 | - } | |
| 1050 | - })); | |
| 1051 | 2904 | } |
| 1052 | 2905 | |
| 1053 | 2906 | /** |
| 1054 | 2907 | * Function validateRun(). |
| @@ -1160,11 +3013,12 @@ | ||
| 1160 | 3013 | _result.fail(function (e) { |
| 1161 | 3014 | _this3.catchApply(e, instance); |
| 1162 | 3015 | _this3.afterRun(instance.command, instance.args, e); |
| 1163 | 3016 | }); |
| 1164 | - return _result.done(function (__result) { | |
| 1165 | - return _this3.applyRunAfterAsyncResult(instance, __result); | |
| 3017 | + _result.done(function (__result) { | |
| 3018 | + _this3.applyRunAfterSync(instance, __result); | |
| 1166 | 3019 | }); |
| 3020 | + return _result; | |
| 1167 | 3021 | }; |
| 1168 | 3022 | return handleJQueryDeferred(result); |
| 1169 | 3023 | } else if (result instanceof Promise) { |
| 1170 | 3024 | return this.applyRunAfterAsync(instance, result); |
| @@ -1206,27 +3060,29 @@ | ||
| 1206 | 3060 | key: "applyRunAfterAsync", |
| 1207 | 3061 | value: function applyRunAfterAsync(instance, result) { |
| 1208 | 3062 | var _this4 = this; |
| 1209 | 3063 | // Override initial result ( promise ) to await onAfter promises, first!. |
| 1210 | - return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 1211 | - return _regenerator.default.wrap(function (_context) { | |
| 1212 | - while (1) switch (_context.prev = _context.next) { | |
| 1213 | - case 0: | |
| 1214 | - _context.next = 1; | |
| 1215 | - return result.catch(function (e) { | |
| 1216 | - _this4.catchApply(e, instance); | |
| 1217 | - _this4.afterRun(instance.command, instance.args, e); | |
| 1218 | - }); | |
| 1219 | - case 1: | |
| 1220 | - _context.next = 2; | |
| 1221 | - return result.then(function (_result) { | |
| 1222 | - return _this4.applyRunAfterAsyncResult(instance, _result); | |
| 1223 | - }); | |
| 1224 | - case 2: | |
| 1225 | - return _context.abrupt("return", result); | |
| 1226 | - case 3: | |
| 1227 | - case "end": | |
| 1228 | - return _context.stop(); | |
| 3064 | + return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 3065 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 3066 | + while (1) { | |
| 3067 | + switch (_context.prev = _context.next) { | |
| 3068 | + case 0: | |
| 3069 | + _context.next = 2; | |
| 3070 | + return result.catch(function (e) { | |
| 3071 | + _this4.catchApply(e, instance); | |
| 3072 | + _this4.afterRun(instance.command, instance.args, e); | |
| 3073 | + }); | |
| 3074 | + case 2: | |
| 3075 | + _context.next = 4; | |
| 3076 | + return result.then(function (_result) { | |
| 3077 | + return _this4.applyRunAfterAsyncResult(instance, _result); | |
| 3078 | + }); | |
| 3079 | + case 4: | |
| 3080 | + return _context.abrupt("return", result); | |
| 3081 | + case 5: | |
| 3082 | + case "end": | |
| 3083 | + return _context.stop(); | |
| 3084 | + } | |
| 1229 | 3085 | } |
| 1230 | 3086 | }, _callee); |
| 1231 | 3087 | }))(); |
| 1232 | 3088 | } |
| @@ -1242,31 +3098,33 @@ | ||
| 1242 | 3098 | * @param {*} result |
| 1243 | 3099 | */ |
| 1244 | 3100 | }, { |
| 1245 | 3101 | key: "applyRunAfterAsyncResult", |
| 1246 | - value: (function () { | |
| 1247 | - var _applyRunAfterAsyncResult = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(instance, result) { | |
| 3102 | + value: function () { | |
| 3103 | + var _applyRunAfterAsyncResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(instance, result) { | |
| 1248 | 3104 | var results, promises; |
| 1249 | - return _regenerator.default.wrap(function (_context2) { | |
| 1250 | - while (1) switch (_context2.prev = _context2.next) { | |
| 1251 | - case 0: | |
| 1252 | - // Run Data hooks. | |
| 1253 | - results = instance.onAfterApply(instance.args, result), promises = Array.isArray(results) ? results.flat().filter(function (filtered) { | |
| 1254 | - return filtered instanceof Promise; | |
| 1255 | - }) : []; | |
| 1256 | - if (!promises.length) { | |
| 1257 | - _context2.next = 1; | |
| 1258 | - break; | |
| 1259 | - } | |
| 1260 | - _context2.next = 1; | |
| 1261 | - return Promise.all(promises); | |
| 1262 | - case 1: | |
| 1263 | - // For UI hooks. | |
| 1264 | - instance.onAfterRun(instance.args, result); | |
| 1265 | - this.afterRun(instance.command, instance.args, result); | |
| 1266 | - case 2: | |
| 1267 | - case "end": | |
| 1268 | - return _context2.stop(); | |
| 3105 | + return _regenerator.default.wrap(function _callee2$(_context2) { | |
| 3106 | + while (1) { | |
| 3107 | + switch (_context2.prev = _context2.next) { | |
| 3108 | + case 0: | |
| 3109 | + // Run Data hooks. | |
| 3110 | + results = instance.onAfterApply(instance.args, result), promises = Array.isArray(results) ? results.flat().filter(function (filtered) { | |
| 3111 | + return filtered instanceof Promise; | |
| 3112 | + }) : []; | |
| 3113 | + if (!promises.length) { | |
| 3114 | + _context2.next = 4; | |
| 3115 | + break; | |
| 3116 | + } | |
| 3117 | + _context2.next = 4; | |
| 3118 | + return Promise.all(promises); | |
| 3119 | + case 4: | |
| 3120 | + // For UI hooks. | |
| 3121 | + instance.onAfterRun(instance.args, result); | |
| 3122 | + this.afterRun(instance.command, instance.args, result); | |
| 3123 | + case 6: | |
| 3124 | + case "end": | |
| 3125 | + return _context2.stop(); | |
| 3126 | + } | |
| 1269 | 3127 | } |
| 1270 | 3128 | }, _callee2, this); |
| 1271 | 3129 | })); |
| 1272 | 3130 | function applyRunAfterAsyncResult(_x, _x2) { |
| @@ -1284,9 +3142,8 @@ | ||
| 1284 | 3142 | * @param {{}} args |
| 1285 | 3143 | * @param {*} results |
| 1286 | 3144 | * @param {boolean} [removeTrace=true] |
| 1287 | 3145 | */ |
| 1288 | - ) | |
| 1289 | 3146 | }, { |
| 1290 | 3147 | key: "afterRun", |
| 1291 | 3148 | value: function afterRun(command, args) { |
| 1292 | 3149 | var results = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; |
| @@ -1295,14 +3152,8 @@ | ||
| 1295 | 3152 | if (args.onAfter) { |
| 1296 | 3153 | args.onAfter.apply(component, [args, results]); |
| 1297 | 3154 | } |
| 1298 | 3155 | this.trigger('run:after', component, command, args, results); |
| 1299 | - window.dispatchEvent(new CustomEvent('elementor/commands/run/after', { | |
| 1300 | - detail: { | |
| 1301 | - command: command, | |
| 1302 | - args: args | |
| 1303 | - } | |
| 1304 | - })); | |
| 1305 | 3156 | if (removeTrace) { |
| 1306 | 3157 | this.removeCurrentTrace(component); |
| 1307 | 3158 | } |
| 1308 | 3159 | } |
| @@ -1393,9 +3244,11 @@ | ||
| 1393 | 3244 | value: function error(message) { |
| 1394 | 3245 | throw Error("Commands: ".concat(message)); |
| 1395 | 3246 | } |
| 1396 | 3247 | }]); |
| 3248 | + return Commands; | |
| 1397 | 3249 | }(_commands.default); |
| 3250 | +exports["default"] = Commands; | |
| 1398 | 3251 | (0, _defineProperty2.default)(Commands, "trace", []); |
| 1399 | 3252 | |
| 1400 | 3253 | /***/ }), |
| 1401 | 3254 | |
| @@ -1414,18 +3267,20 @@ | ||
| 1414 | 3267 | })); |
| 1415 | 3268 | exports["default"] = void 0; |
| 1416 | 3269 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1417 | 3270 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 3271 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1418 | 3272 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1419 | 3273 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1420 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1421 | 3274 | var _module = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js")); |
| 1422 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1423 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 3275 | +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); }; } | |
| 3276 | +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; } } | |
| 1424 | 3277 | /** |
| 1425 | 3278 | * @typedef {{}} Component |
| 1426 | 3279 | */ |
| 1427 | -var _default = exports["default"] = /*#__PURE__*/function (_Module) { | |
| 3280 | +var _default = /*#__PURE__*/function (_Module) { | |
| 3281 | + (0, _inherits2.default)(_default, _Module); | |
| 3282 | + var _super = _createSuper(_default); | |
| 1428 | 3283 | function _default() { |
| 1429 | 3284 | var _this; |
| 1430 | 3285 | (0, _classCallCheck2.default)(this, _default); |
| 1431 | 3286 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| @@ -1430,15 +3285,14 @@ | ||
| 1430 | 3285 | (0, _classCallCheck2.default)(this, _default); |
| 1431 | 3286 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| 1432 | 3287 | args[_key] = arguments[_key]; |
| 1433 | 3288 | } |
| 1434 | - _this = _callSuper(this, _default, [].concat(args)); | |
| 3289 | + _this = _super.call.apply(_super, [this].concat(args)); | |
| 1435 | 3290 | _this.components = {}; |
| 1436 | 3291 | _this.activeComponents = {}; |
| 1437 | 3292 | return _this; |
| 1438 | 3293 | } |
| 1439 | - (0, _inherits2.default)(_default, _Module); | |
| 1440 | - return (0, _createClass2.default)(_default, [{ | |
| 3294 | + (0, _createClass2.default)(_default, [{ | |
| 1441 | 3295 | key: "getAll", |
| 1442 | 3296 | value: function getAll() { |
| 1443 | 3297 | return Object.keys(this.components).sort(); |
| 1444 | 3298 | } |
| @@ -1484,9 +3338,11 @@ | ||
| 1484 | 3338 | value: function isActive(namespace) { |
| 1485 | 3339 | return !!this.activeComponents[namespace]; |
| 1486 | 3340 | } |
| 1487 | 3341 | }]); |
| 3342 | + return _default; | |
| 1488 | 3343 | }(_module.default); |
| 3344 | +exports["default"] = _default; | |
| 1489 | 3345 | |
| 1490 | 3346 | /***/ }), |
| 1491 | 3347 | |
| 1492 | 3348 | /***/ "../modules/web-cli/assets/js/core/data.js": |
| @@ -1507,18 +3363,18 @@ | ||
| 1507 | 3363 | var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); |
| 1508 | 3364 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 1509 | 3365 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1510 | 3366 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 3367 | +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js")); | |
| 3368 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 3369 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1511 | 3370 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1512 | 3371 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1513 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 1514 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1515 | 3372 | var _argsObject = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js")); |
| 1516 | 3373 | var _commands = _interopRequireDefault(__webpack_require__(/*! ./commands.js */ "../modules/web-cli/assets/js/core/commands.js")); |
| 1517 | 3374 | var _cache = _interopRequireDefault(__webpack_require__(/*! ./data/cache */ "../modules/web-cli/assets/js/core/data/cache.js")); |
| 1518 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1519 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1520 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 3375 | +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); }; } | |
| 3376 | +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; } } | |
| 1521 | 3377 | /** |
| 1522 | 3378 | * @typedef {('create'|'delete'|'get'|'update'|'options')} DataTypes |
| 1523 | 3379 | */ |
| 1524 | 3380 | /** |
| @@ -1549,25 +3405,32 @@ | ||
| 1549 | 3405 | * @property {Object} args arguments |
| 1550 | 3406 | */ |
| 1551 | 3407 | |
| 1552 | 3408 | // TODO: Return it from the server. Original at WP_REST_Server. |
| 1553 | -var READABLE = exports.READABLE = ['GET'], | |
| 1554 | - CREATABLE = exports.CREATABLE = ['POST'], | |
| 1555 | - EDITABLE = exports.EDITABLE = ['POST', 'PUT', 'PATCH'], | |
| 1556 | - DELETABLE = exports.DELETABLE = ['DELETE'], | |
| 1557 | - ALLMETHODS = exports.ALLMETHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE']; | |
| 1558 | -var Data = exports["default"] = /*#__PURE__*/function (_Commands) { | |
| 3409 | +var READABLE = ['GET'], | |
| 3410 | + CREATABLE = ['POST'], | |
| 3411 | + EDITABLE = ['POST', 'PUT', 'PATCH'], | |
| 3412 | + DELETABLE = ['DELETE'], | |
| 3413 | + ALLMETHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE']; | |
| 3414 | +exports.ALLMETHODS = ALLMETHODS; | |
| 3415 | +exports.DELETABLE = DELETABLE; | |
| 3416 | +exports.EDITABLE = EDITABLE; | |
| 3417 | +exports.CREATABLE = CREATABLE; | |
| 3418 | +exports.READABLE = READABLE; | |
| 3419 | +var Data = /*#__PURE__*/function (_Commands) { | |
| 3420 | + (0, _inherits2.default)(Data, _Commands); | |
| 3421 | + var _super = _createSuper(Data); | |
| 1559 | 3422 | function Data() { |
| 1560 | 3423 | var _this; |
| 1561 | 3424 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 1562 | 3425 | (0, _classCallCheck2.default)(this, Data); |
| 1563 | - _this = _callSuper(this, Data, [args]); | |
| 3426 | + _this = _super.call(this, args); | |
| 1564 | 3427 | _this.args = Object.assign(args, { |
| 1565 | 3428 | namespace: 'elementor', |
| 1566 | 3429 | version: '1', |
| 1567 | 3430 | baseEndpointURL: elementorWebCliConfig.urls.rest |
| 1568 | 3431 | }); |
| 1569 | - _this.cache = new _cache.default(_this); | |
| 3432 | + _this.cache = new _cache.default((0, _assertThisInitialized2.default)(_this)); | |
| 1570 | 3433 | _this.validatedRequests = {}; |
| 1571 | 3434 | _this.commandFormats = {}; |
| 1572 | 3435 | return _this; |
| 1573 | 3436 | } |
| @@ -1580,10 +3443,9 @@ | ||
| 1580 | 3443 | * @param {DataTypes} type |
| 1581 | 3444 | * |
| 1582 | 3445 | * @return {string|boolean} HTTP Method |
| 1583 | 3446 | */ |
| 1584 | - (0, _inherits2.default)(Data, _Commands); | |
| 1585 | - return (0, _createClass2.default)(Data, [{ | |
| 3447 | + (0, _createClass2.default)(Data, [{ | |
| 1586 | 3448 | key: "getHTTPMethod", |
| 1587 | 3449 | value: function getHTTPMethod(type) { |
| 1588 | 3450 | switch (type) { |
| 1589 | 3451 | case 'create': |
| @@ -1812,13 +3674,13 @@ | ||
| 1812 | 3674 | */ |
| 1813 | 3675 | }, { |
| 1814 | 3676 | key: "prepareHeaders", |
| 1815 | 3677 | value: function prepareHeaders(requestData) { |
| 1816 | - var _requestData$args; | |
| 3678 | + var _requestData$args, _requestData$args$opt; | |
| 1817 | 3679 | var type = requestData.type, |
| 1818 | 3680 | nonce = elementorWebCliConfig.nonce, |
| 1819 | 3681 | params = { |
| 1820 | - signal: (_requestData$args = requestData.args) === null || _requestData$args === void 0 || (_requestData$args = _requestData$args.options) === null || _requestData$args === void 0 ? void 0 : _requestData$args.signal, | |
| 3682 | + signal: (_requestData$args = requestData.args) === null || _requestData$args === void 0 ? void 0 : (_requestData$args$opt = _requestData$args.options) === null || _requestData$args$opt === void 0 ? void 0 : _requestData$args$opt.signal, | |
| 1821 | 3683 | credentials: 'include' // Cookies is required for wp reset. |
| 1822 | 3684 | }, |
| 1823 | 3685 | headers = { |
| 1824 | 3686 | 'X-WP-Nonce': nonce |
| @@ -1891,13 +3753,13 @@ | ||
| 1891 | 3753 | */ |
| 1892 | 3754 | }, { |
| 1893 | 3755 | key: "fetch", |
| 1894 | 3756 | value: function fetch(requestData) { |
| 1895 | - var _requestData$args$opt, | |
| 3757 | + var _requestData$args$opt2, | |
| 1896 | 3758 | _this2 = this; |
| 1897 | 3759 | var fetchAPI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.fetch; |
| 1898 | 3760 | requestData.cache = 'miss'; |
| 1899 | - var refresh = (_requestData$args$opt = requestData.args.options) === null || _requestData$args$opt === void 0 ? void 0 : _requestData$args$opt.refresh, | |
| 3761 | + var refresh = (_requestData$args$opt2 = requestData.args.options) === null || _requestData$args$opt2 === void 0 ? void 0 : _requestData$args$opt2.refresh, | |
| 1900 | 3762 | getCache = 'get' === requestData.type && !refresh, |
| 1901 | 3763 | saveCache = ['create', 'get'].includes(requestData.type) && !refresh; |
| 1902 | 3764 | if (getCache) { |
| 1903 | 3765 | var cachePromise = this.cache.getAsync(requestData); |
| @@ -1906,68 +3768,72 @@ | ||
| 1906 | 3768 | } |
| 1907 | 3769 | } |
| 1908 | 3770 | var params = this.prepareHeaders(requestData); |
| 1909 | 3771 | // eslint-disable-next-line no-async-promise-executor |
| 1910 | - return new Promise(/*#__PURE__*/function () { | |
| 1911 | - var _ref9 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(resolve, reject) { | |
| 1912 | - var endpoint, request, response, _t; | |
| 1913 | - return _regenerator.default.wrap(function (_context2) { | |
| 1914 | - while (1) switch (_context2.prev = _context2.next) { | |
| 1915 | - case 0: | |
| 1916 | - _context2.prev = 0; | |
| 1917 | - endpoint = _this2.prepareEndpoint(requestData); | |
| 1918 | - request = fetchAPI(endpoint, params); | |
| 1919 | - _context2.next = 1; | |
| 1920 | - return request.then(/*#__PURE__*/function () { | |
| 1921 | - var _ref0 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(_response) { | |
| 1922 | - return _regenerator.default.wrap(function (_context) { | |
| 1923 | - while (1) switch (_context.prev = _context.next) { | |
| 1924 | - case 0: | |
| 1925 | - if (_response.ok) { | |
| 1926 | - _context.next = 3; | |
| 1927 | - break; | |
| 3772 | + return new Promise( /*#__PURE__*/function () { | |
| 3773 | + var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(resolve, reject) { | |
| 3774 | + var endpoint, request, response; | |
| 3775 | + return _regenerator.default.wrap(function _callee2$(_context2) { | |
| 3776 | + while (1) { | |
| 3777 | + switch (_context2.prev = _context2.next) { | |
| 3778 | + case 0: | |
| 3779 | + _context2.prev = 0; | |
| 3780 | + endpoint = _this2.prepareEndpoint(requestData); | |
| 3781 | + request = fetchAPI(endpoint, params); | |
| 3782 | + _context2.next = 5; | |
| 3783 | + return request.then( /*#__PURE__*/function () { | |
| 3784 | + var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_response) { | |
| 3785 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 3786 | + while (1) { | |
| 3787 | + switch (_context.prev = _context.next) { | |
| 3788 | + case 0: | |
| 3789 | + if (_response.ok) { | |
| 3790 | + _context.next = 6; | |
| 3791 | + break; | |
| 3792 | + } | |
| 3793 | + if (!_response.headers.get('content-type').includes('application/json')) { | |
| 3794 | + _context.next = 5; | |
| 3795 | + break; | |
| 3796 | + } | |
| 3797 | + _context.next = 4; | |
| 3798 | + return _response.json(); | |
| 3799 | + case 4: | |
| 3800 | + _response = _context.sent; | |
| 3801 | + case 5: | |
| 3802 | + throw _response; | |
| 3803 | + case 6: | |
| 3804 | + return _context.abrupt("return", _response.json()); | |
| 3805 | + case 7: | |
| 3806 | + case "end": | |
| 3807 | + return _context.stop(); | |
| 1928 | 3808 | } |
| 1929 | - if (!_response.headers.get('content-type').includes('application/json')) { | |
| 1930 | - _context.next = 2; | |
| 1931 | - break; | |
| 1932 | - } | |
| 1933 | - _context.next = 1; | |
| 1934 | - return _response.json(); | |
| 1935 | - case 1: | |
| 1936 | - _response = _context.sent; | |
| 1937 | - case 2: | |
| 1938 | - throw _response; | |
| 1939 | - case 3: | |
| 1940 | - return _context.abrupt("return", _response.json()); | |
| 1941 | - case 4: | |
| 1942 | - case "end": | |
| 1943 | - return _context.stop(); | |
| 1944 | - } | |
| 1945 | - }, _callee); | |
| 1946 | - })); | |
| 1947 | - return function (_x3) { | |
| 1948 | - return _ref0.apply(this, arguments); | |
| 1949 | - }; | |
| 1950 | - }()); | |
| 1951 | - case 1: | |
| 1952 | - response = _context2.sent; | |
| 1953 | - // At this point, it got the resolved response from remote. | |
| 1954 | - // So load cache, and resolve it. | |
| 1955 | - if (saveCache) { | |
| 1956 | - _this2.cache.set(requestData, response); | |
| 1957 | - } | |
| 1958 | - resolve(response); | |
| 1959 | - _context2.next = 3; | |
| 1960 | - break; | |
| 1961 | - case 2: | |
| 1962 | - _context2.prev = 2; | |
| 1963 | - _t = _context2["catch"](0); | |
| 1964 | - reject(_t); | |
| 1965 | - case 3: | |
| 1966 | - case "end": | |
| 1967 | - return _context2.stop(); | |
| 3809 | + } | |
| 3810 | + }, _callee); | |
| 3811 | + })); | |
| 3812 | + return function (_x3) { | |
| 3813 | + return _ref10.apply(this, arguments); | |
| 3814 | + }; | |
| 3815 | + }()); | |
| 3816 | + case 5: | |
| 3817 | + response = _context2.sent; | |
| 3818 | + // At this point, it got the resolved response from remote. | |
| 3819 | + // So load cache, and resolve it. | |
| 3820 | + if (saveCache) { | |
| 3821 | + _this2.cache.set(requestData, response); | |
| 3822 | + } | |
| 3823 | + resolve(response); | |
| 3824 | + _context2.next = 13; | |
| 3825 | + break; | |
| 3826 | + case 10: | |
| 3827 | + _context2.prev = 10; | |
| 3828 | + _context2.t0 = _context2["catch"](0); | |
| 3829 | + reject(_context2.t0); | |
| 3830 | + case 13: | |
| 3831 | + case "end": | |
| 3832 | + return _context2.stop(); | |
| 3833 | + } | |
| 1968 | 3834 | } |
| 1969 | - }, _callee2, null, [[0, 2]]); | |
| 3835 | + }, _callee2, null, [[0, 10]]); | |
| 1970 | 3836 | })); |
| 1971 | 3837 | return function (_x, _x2) { |
| 1972 | 3838 | return _ref9.apply(this, arguments); |
| 1973 | 3839 | }; |
| @@ -2196,9 +4062,9 @@ | ||
| 2196 | 4062 | } |
| 2197 | 4063 | }, { |
| 2198 | 4064 | key: "register", |
| 2199 | 4065 | value: function register(component, command, callback) { |
| 2200 | - _superPropGet(Data, "register", this, 3)([component, command, callback]); | |
| 4066 | + (0, _get2.default)((0, _getPrototypeOf2.default)(Data.prototype), "register", this).call(this, component, command, callback); | |
| 2201 | 4067 | var fullCommandName = component.getNamespace() + '/' + command, |
| 2202 | 4068 | commandInstance = $e.data.getCommandClass(fullCommandName), |
| 2203 | 4069 | format = commandInstance !== null && commandInstance !== void 0 && commandInstance.getEndpointFormat ? commandInstance.getEndpointFormat() : false; |
| 2204 | 4070 | if (format) { |
| @@ -2222,9 +4088,9 @@ | ||
| 2222 | 4088 | args.options.type = type; |
| 2223 | 4089 | var _this$commandExtractA = this.commandExtractArgs(command, args); |
| 2224 | 4090 | command = _this$commandExtractA.command; |
| 2225 | 4091 | args = _this$commandExtractA.args; |
| 2226 | - return _superPropGet(Data, "run", this, 3)([command, args]); | |
| 4092 | + return (0, _get2.default)((0, _getPrototypeOf2.default)(Data.prototype), "run", this).call(this, command, args); | |
| 2227 | 4093 | } |
| 2228 | 4094 | }, { |
| 2229 | 4095 | key: "error", |
| 2230 | 4096 | value: function error(message) { |
| @@ -2230,9 +4096,11 @@ | ||
| 2230 | 4096 | value: function error(message) { |
| 2231 | 4097 | throw Error('Data commands: ' + message); |
| 2232 | 4098 | } |
| 2233 | 4099 | }]); |
| 4100 | + return Data; | |
| 2234 | 4101 | }(_commands.default); |
| 4102 | +exports["default"] = Data; | |
| 2235 | 4103 | |
| 2236 | 4104 | /***/ }), |
| 2237 | 4105 | |
| 2238 | 4106 | /***/ "../modules/web-cli/assets/js/core/data/cache.js": |
| @@ -2262,9 +4130,9 @@ | ||
| 2262 | 4130 | */ |
| 2263 | 4131 | /** |
| 2264 | 4132 | * TODO: Search common logic, create functions to reduce code size. |
| 2265 | 4133 | */ |
| 2266 | -var Cache = exports["default"] = /*#__PURE__*/function () { | |
| 4134 | +var Cache = /*#__PURE__*/function () { | |
| 2267 | 4135 | /** |
| 2268 | 4136 | * Function constructor(). |
| 2269 | 4137 | * |
| 2270 | 4138 | * Create cache. |
| @@ -2286,9 +4154,9 @@ | ||
| 2286 | 4154 | * @param {RequestData} requestData |
| 2287 | 4155 | * |
| 2288 | 4156 | * @return {(Promise|boolean)} request data |
| 2289 | 4157 | */ |
| 2290 | - return (0, _createClass2.default)(Cache, [{ | |
| 4158 | + (0, _createClass2.default)(Cache, [{ | |
| 2291 | 4159 | key: "getAsync", |
| 2292 | 4160 | value: function getAsync(requestData) { |
| 2293 | 4161 | var data = this.get(requestData); |
| 2294 | 4162 | if (null !== data) { |
| @@ -2466,13 +4334,13 @@ | ||
| 2466 | 4334 | } |
| 2467 | 4335 | return accumulator[pureEndpointPart]; |
| 2468 | 4336 | }, newData); |
| 2469 | 4337 | if (Object.keys(oldData).length) { |
| 2470 | - var _deleteKeys = function deleteKeys(target, nullsObject) { | |
| 4338 | + var deleteKeys = function deleteKeys(target, nullsObject) { | |
| 2471 | 4339 | if (nullsObject) { |
| 2472 | 4340 | Object.keys(nullsObject).forEach(function (key) { |
| 2473 | 4341 | if (nullsObject[key] && 'object' === (0, _typeof2.default)(nullsObject[key])) { |
| 2474 | - _deleteKeys(target[key], nullsObject[key]); | |
| 4342 | + deleteKeys(target[key], nullsObject[key]); | |
| 2475 | 4343 | } else if (null === nullsObject[key]) { |
| 2476 | 4344 | delete target[key]; |
| 2477 | 4345 | result = true; |
| 2478 | 4346 | } |
| @@ -2484,9 +4352,9 @@ | ||
| 2484 | 4352 | }); |
| 2485 | 4353 | } |
| 2486 | 4354 | return target; |
| 2487 | 4355 | }; |
| 2488 | - this.storage.setItem(componentName, _deleteKeys(oldData, newData)); | |
| 4356 | + this.storage.setItem(componentName, deleteKeys(oldData, newData)); | |
| 2489 | 4357 | } |
| 2490 | 4358 | } else { |
| 2491 | 4359 | for (var key in this.storage.getAll()) { |
| 2492 | 4360 | if (key === requestData.endpoint) { |
| @@ -2498,9 +4366,11 @@ | ||
| 2498 | 4366 | } |
| 2499 | 4367 | return result; |
| 2500 | 4368 | } |
| 2501 | 4369 | }]); |
| 4370 | + return Cache; | |
| 2502 | 4371 | }(); |
| 4372 | +exports["default"] = Cache; | |
| 2503 | 4373 | |
| 2504 | 4374 | /***/ }), |
| 2505 | 4375 | |
| 2506 | 4376 | /***/ "../modules/web-cli/assets/js/core/data/errors/base-error.js": |
| @@ -2518,20 +4388,23 @@ | ||
| 2518 | 4388 | })); |
| 2519 | 4389 | exports["default"] = void 0; |
| 2520 | 4390 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2521 | 4391 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 4392 | +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js")); | |
| 4393 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2522 | 4394 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 2523 | 4395 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 2524 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2525 | 4396 | var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js")); |
| 2526 | 4397 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 2527 | 4398 | var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js")); |
| 2528 | 4399 | var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../../../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js")); |
| 2529 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 2530 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 2531 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2532 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2533 | -var BaseError = exports["default"] = /*#__PURE__*/function (_Error) { | |
| 4400 | +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; } | |
| 4401 | +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; } | |
| 4402 | +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); }; } | |
| 4403 | +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; } } | |
| 4404 | +var BaseError = /*#__PURE__*/function (_Error) { | |
| 4405 | + (0, _inherits2.default)(BaseError, _Error); | |
| 4406 | + var _super = _createSuper(BaseError); | |
| 2534 | 4407 | /** |
| 2535 | 4408 | * Error constructor. |
| 2536 | 4409 | * |
| 2537 | 4410 | * @param {string} message |
| @@ -2543,21 +4416,11 @@ | ||
| 2543 | 4416 | var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; |
| 2544 | 4417 | var code = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; |
| 2545 | 4418 | var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; |
| 2546 | 4419 | (0, _classCallCheck2.default)(this, BaseError); |
| 2547 | - _this = _callSuper(this, BaseError, [message]); | |
| 2548 | - /** | |
| 2549 | - * The server error code. | |
| 2550 | - * | |
| 2551 | - * @type {string} | |
| 2552 | - */ | |
| 2553 | - (0, _defineProperty2.default)(_this, "code", ''); | |
| 2554 | - /** | |
| 2555 | - * Additional data about the current error. | |
| 2556 | - * | |
| 2557 | - * @type {*[]} | |
| 2558 | - */ | |
| 2559 | - (0, _defineProperty2.default)(_this, "data", []); | |
| 4420 | + _this = _super.call(this, message); | |
| 4421 | + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "code", ''); | |
| 4422 | + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "data", []); | |
| 2560 | 4423 | _this.code = code; |
| 2561 | 4424 | _this.data = data; |
| 2562 | 4425 | return _this; |
| 2563 | 4426 | } |
| @@ -2564,10 +4427,9 @@ | ||
| 2564 | 4427 | |
| 2565 | 4428 | /** |
| 2566 | 4429 | * Notify a message when the error occurs. |
| 2567 | 4430 | */ |
| 2568 | - (0, _inherits2.default)(BaseError, _Error); | |
| 2569 | - return (0, _createClass2.default)(BaseError, [{ | |
| 4431 | + (0, _createClass2.default)(BaseError, [{ | |
| 2570 | 4432 | key: "notify", |
| 2571 | 4433 | value: function notify() { |
| 2572 | 4434 | _console.default.error(_objectSpread({ |
| 2573 | 4435 | message: this.message |
| @@ -2576,8 +4438,20 @@ | ||
| 2576 | 4438 | }], [{ |
| 2577 | 4439 | key: "create", |
| 2578 | 4440 | value: |
| 2579 | 4441 | /** |
| 4442 | + * The server error code. | |
| 4443 | + * | |
| 4444 | + * @type {string} | |
| 4445 | + */ | |
| 4446 | + | |
| 4447 | + /** | |
| 4448 | + * Additional data about the current error. | |
| 4449 | + * | |
| 4450 | + * @type {*[]} | |
| 4451 | + */ | |
| 4452 | + | |
| 4453 | + /** | |
| 2580 | 4454 | * Static helper function to create the error. |
| 2581 | 4455 | * |
| 2582 | 4456 | * @param {string} message |
| 2583 | 4457 | * @param {string} code |
| @@ -2598,9 +4472,11 @@ | ||
| 2598 | 4472 | value: function getHTTPErrorCode() { |
| 2599 | 4473 | (0, _forceMethodImplementation.default)(); |
| 2600 | 4474 | } |
| 2601 | 4475 | }]); |
| 2602 | -}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 4476 | + return BaseError; | |
| 4477 | +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 4478 | +exports["default"] = BaseError; | |
| 2603 | 4479 | |
| 2604 | 4480 | /***/ }), |
| 2605 | 4481 | |
| 2606 | 4482 | /***/ "../modules/web-cli/assets/js/core/data/errors/default-error.js": |
| @@ -2618,28 +4494,32 @@ | ||
| 2618 | 4494 | })); |
| 2619 | 4495 | exports["default"] = exports.DefaultError = void 0; |
| 2620 | 4496 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2621 | 4497 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 4498 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2622 | 4499 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 2623 | 4500 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 2624 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2625 | 4501 | var _baseError = _interopRequireDefault(__webpack_require__(/*! ./base-error */ "../modules/web-cli/assets/js/core/data/errors/base-error.js")); |
| 2626 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2627 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2628 | -var DefaultError = exports.DefaultError = /*#__PURE__*/function (_BaseError) { | |
| 4502 | +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); }; } | |
| 4503 | +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; } } | |
| 4504 | +var DefaultError = /*#__PURE__*/function (_BaseError) { | |
| 4505 | + (0, _inherits2.default)(DefaultError, _BaseError); | |
| 4506 | + var _super = _createSuper(DefaultError); | |
| 2629 | 4507 | function DefaultError() { |
| 2630 | 4508 | (0, _classCallCheck2.default)(this, DefaultError); |
| 2631 | - return _callSuper(this, DefaultError, arguments); | |
| 4509 | + return _super.apply(this, arguments); | |
| 2632 | 4510 | } |
| 2633 | - (0, _inherits2.default)(DefaultError, _BaseError); | |
| 2634 | - return (0, _createClass2.default)(DefaultError, null, [{ | |
| 4511 | + (0, _createClass2.default)(DefaultError, null, [{ | |
| 2635 | 4512 | key: "getHTTPErrorCode", |
| 2636 | 4513 | value: function getHTTPErrorCode() { |
| 2637 | 4514 | return 501; |
| 2638 | 4515 | } |
| 2639 | 4516 | }]); |
| 4517 | + return DefaultError; | |
| 2640 | 4518 | }(_baseError.default); |
| 2641 | -var _default = exports["default"] = DefaultError; | |
| 4519 | +exports.DefaultError = DefaultError; | |
| 4520 | +var _default = DefaultError; | |
| 4521 | +exports["default"] = _default; | |
| 2642 | 4522 | |
| 2643 | 4523 | /***/ }), |
| 2644 | 4524 | |
| 2645 | 4525 | /***/ "../modules/web-cli/assets/js/core/data/errors/error-404.js": |
| @@ -2657,22 +4537,23 @@ | ||
| 2657 | 4537 | })); |
| 2658 | 4538 | exports["default"] = exports.Error404 = void 0; |
| 2659 | 4539 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2660 | 4540 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 4541 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2661 | 4542 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 2662 | 4543 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 2663 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2664 | 4544 | var _baseError = _interopRequireDefault(__webpack_require__(/*! ./base-error */ "../modules/web-cli/assets/js/core/data/errors/base-error.js")); |
| 2665 | 4545 | var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js")); |
| 2666 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2667 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2668 | -var Error404 = exports.Error404 = /*#__PURE__*/function (_BaseError) { | |
| 4546 | +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); }; } | |
| 4547 | +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; } } | |
| 4548 | +var Error404 = /*#__PURE__*/function (_BaseError) { | |
| 4549 | + (0, _inherits2.default)(Error404, _BaseError); | |
| 4550 | + var _super = _createSuper(Error404); | |
| 2669 | 4551 | function Error404() { |
| 2670 | 4552 | (0, _classCallCheck2.default)(this, Error404); |
| 2671 | - return _callSuper(this, Error404, arguments); | |
| 4553 | + return _super.apply(this, arguments); | |
| 2672 | 4554 | } |
| 2673 | - (0, _inherits2.default)(Error404, _BaseError); | |
| 2674 | - return (0, _createClass2.default)(Error404, [{ | |
| 4555 | + (0, _createClass2.default)(Error404, [{ | |
| 2675 | 4556 | key: "notify", |
| 2676 | 4557 | value: function notify() { |
| 2677 | 4558 | _console.default.warn(this.message); |
| 2678 | 4559 | } |
| @@ -2681,10 +4562,13 @@ | ||
| 2681 | 4562 | value: function getHTTPErrorCode() { |
| 2682 | 4563 | return 404; |
| 2683 | 4564 | } |
| 2684 | 4565 | }]); |
| 4566 | + return Error404; | |
| 2685 | 4567 | }(_baseError.default); |
| 2686 | -var _default = exports["default"] = Error404; | |
| 4568 | +exports.Error404 = Error404; | |
| 4569 | +var _default = Error404; | |
| 4570 | +exports["default"] = _default; | |
| 2687 | 4571 | |
| 2688 | 4572 | /***/ }), |
| 2689 | 4573 | |
| 2690 | 4574 | /***/ "../modules/web-cli/assets/js/core/data/errors/index.js": |
| @@ -2731,24 +4615,24 @@ | ||
| 2731 | 4615 | })); |
| 2732 | 4616 | exports["default"] = void 0; |
| 2733 | 4617 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2734 | 4618 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 4619 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 4620 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2735 | 4621 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 2736 | 4622 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 2737 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 2738 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2739 | 4623 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 2740 | 4624 | var _baseStorage = _interopRequireDefault(__webpack_require__(/*! elementor-api/core/data/storages/base-storage */ "../modules/web-cli/assets/js/core/data/storages/base-storage.js")); |
| 2741 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2742 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2743 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 2744 | -var BasePrefixStorage = exports["default"] = /*#__PURE__*/function (_BaseStorage) { | |
| 4625 | +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); }; } | |
| 4626 | +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; } } | |
| 4627 | +var BasePrefixStorage = /*#__PURE__*/function (_BaseStorage) { | |
| 4628 | + (0, _inherits2.default)(BasePrefixStorage, _BaseStorage); | |
| 4629 | + var _super = _createSuper(BasePrefixStorage); | |
| 2745 | 4630 | function BasePrefixStorage() { |
| 2746 | 4631 | (0, _classCallCheck2.default)(this, BasePrefixStorage); |
| 2747 | - return _callSuper(this, BasePrefixStorage, arguments); | |
| 4632 | + return _super.apply(this, arguments); | |
| 2748 | 4633 | } |
| 2749 | - (0, _inherits2.default)(BasePrefixStorage, _BaseStorage); | |
| 2750 | - return (0, _createClass2.default)(BasePrefixStorage, [{ | |
| 4634 | + (0, _createClass2.default)(BasePrefixStorage, [{ | |
| 2751 | 4635 | key: "clear", |
| 2752 | 4636 | value: function clear() { |
| 2753 | 4637 | var _this = this; |
| 2754 | 4638 | Object.keys(this.getAll()).forEach(function (key) { |
| @@ -2757,19 +4641,19 @@ | ||
| 2757 | 4641 | } |
| 2758 | 4642 | }, { |
| 2759 | 4643 | key: "getItem", |
| 2760 | 4644 | value: function getItem(key) { |
| 2761 | - return _superPropGet(BasePrefixStorage, "getItem", this, 3)([BasePrefixStorage.DEFAULT_KEY_PREFIX + key]); | |
| 4645 | + return (0, _get2.default)((0, _getPrototypeOf2.default)(BasePrefixStorage.prototype), "getItem", this).call(this, BasePrefixStorage.DEFAULT_KEY_PREFIX + key); | |
| 2762 | 4646 | } |
| 2763 | 4647 | }, { |
| 2764 | 4648 | key: "removeItem", |
| 2765 | 4649 | value: function removeItem(key) { |
| 2766 | - return _superPropGet(BasePrefixStorage, "removeItem", this, 3)([BasePrefixStorage.DEFAULT_KEY_PREFIX + key]); | |
| 4650 | + return (0, _get2.default)((0, _getPrototypeOf2.default)(BasePrefixStorage.prototype), "removeItem", this).call(this, BasePrefixStorage.DEFAULT_KEY_PREFIX + key); | |
| 2767 | 4651 | } |
| 2768 | 4652 | }, { |
| 2769 | 4653 | key: "setItem", |
| 2770 | 4654 | value: function setItem(key, value) { |
| 2771 | - return _superPropGet(BasePrefixStorage, "setItem", this, 3)([BasePrefixStorage.DEFAULT_KEY_PREFIX + key, value]); | |
| 4655 | + return (0, _get2.default)((0, _getPrototypeOf2.default)(BasePrefixStorage.prototype), "setItem", this).call(this, BasePrefixStorage.DEFAULT_KEY_PREFIX + key, value); | |
| 2772 | 4656 | } |
| 2773 | 4657 | }, { |
| 2774 | 4658 | key: "getAll", |
| 2775 | 4659 | value: function getAll() { |
| @@ -2785,9 +4669,11 @@ | ||
| 2785 | 4669 | }); |
| 2786 | 4670 | return result; |
| 2787 | 4671 | } |
| 2788 | 4672 | }]); |
| 4673 | + return BasePrefixStorage; | |
| 2789 | 4674 | }(_baseStorage.default); |
| 4675 | +exports["default"] = BasePrefixStorage; | |
| 2790 | 4676 | (0, _defineProperty2.default)(BasePrefixStorage, "DEFAULT_KEY_PREFIX", 'e_'); |
| 2791 | 4677 | |
| 2792 | 4678 | /***/ }), |
| 2793 | 4679 | |
| @@ -2812,9 +4698,9 @@ | ||
| 2812 | 4698 | * Using this technique give's the ability to use JSDOC from 'window.storage'. |
| 2813 | 4699 | * |
| 2814 | 4700 | * @implements {Storage} |
| 2815 | 4701 | */ |
| 2816 | -var BaseStorage = exports["default"] = /*#__PURE__*/function () { | |
| 4702 | +var BaseStorage = /*#__PURE__*/function () { | |
| 2817 | 4703 | /** |
| 2818 | 4704 | * Create storage wrapper. |
| 2819 | 4705 | * |
| 2820 | 4706 | * @param {Storage} provider |
| @@ -2825,9 +4711,9 @@ | ||
| 2825 | 4711 | throw new TypeError('Cannot construct BaseStorage instances directly'); |
| 2826 | 4712 | } |
| 2827 | 4713 | this.provider = provider; |
| 2828 | 4714 | } |
| 2829 | - return (0, _createClass2.default)(BaseStorage, [{ | |
| 4715 | + (0, _createClass2.default)(BaseStorage, [{ | |
| 2830 | 4716 | key: "clear", |
| 2831 | 4717 | value: function clear() { |
| 2832 | 4718 | return this.provider.clear(); |
| 2833 | 4719 | } |
| @@ -2866,9 +4752,11 @@ | ||
| 2866 | 4752 | }); |
| 2867 | 4753 | return result; |
| 2868 | 4754 | } |
| 2869 | 4755 | }]); |
| 4756 | + return BaseStorage; | |
| 2870 | 4757 | }(); |
| 4758 | +exports["default"] = BaseStorage; | |
| 2871 | 4759 | |
| 2872 | 4760 | /***/ }), |
| 2873 | 4761 | |
| 2874 | 4762 | /***/ "../modules/web-cli/assets/js/core/data/storages/local-storage.js": |
| @@ -2886,21 +4774,22 @@ | ||
| 2886 | 4774 | })); |
| 2887 | 4775 | exports["default"] = void 0; |
| 2888 | 4776 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2889 | 4777 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 4778 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2890 | 4779 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 2891 | 4780 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 2892 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2893 | 4781 | var _basePrefixStorage = _interopRequireDefault(__webpack_require__(/*! ./base-prefix-storage */ "../modules/web-cli/assets/js/core/data/storages/base-prefix-storage.js")); |
| 2894 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2895 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2896 | -var LocalStorage = exports["default"] = /*#__PURE__*/function (_BasePrefixStorage) { | |
| 4782 | +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); }; } | |
| 4783 | +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; } } | |
| 4784 | +var LocalStorage = /*#__PURE__*/function (_BasePrefixStorage) { | |
| 4785 | + (0, _inherits2.default)(LocalStorage, _BasePrefixStorage); | |
| 4786 | + var _super = _createSuper(LocalStorage); | |
| 2897 | 4787 | function LocalStorage() { |
| 2898 | 4788 | (0, _classCallCheck2.default)(this, LocalStorage); |
| 2899 | - return _callSuper(this, LocalStorage, [localStorage]); | |
| 4789 | + return _super.call(this, localStorage); | |
| 2900 | 4790 | } |
| 2901 | - (0, _inherits2.default)(LocalStorage, _BasePrefixStorage); | |
| 2902 | - return (0, _createClass2.default)(LocalStorage, [{ | |
| 4791 | + (0, _createClass2.default)(LocalStorage, [{ | |
| 2903 | 4792 | key: "debug", |
| 2904 | 4793 | value: function debug() { |
| 2905 | 4794 | var entries = this.getAll(), |
| 2906 | 4795 | ordered = {}; |
| @@ -2910,9 +4799,11 @@ | ||
| 2910 | 4799 | }); |
| 2911 | 4800 | return ordered; |
| 2912 | 4801 | } |
| 2913 | 4802 | }]); |
| 4803 | + return LocalStorage; | |
| 2914 | 4804 | }(_basePrefixStorage.default); |
| 4805 | +exports["default"] = LocalStorage; | |
| 2915 | 4806 | |
| 2916 | 4807 | /***/ }), |
| 2917 | 4808 | |
| 2918 | 4809 | /***/ "../modules/web-cli/assets/js/core/hooks.js": |
| @@ -2936,15 +4827,15 @@ | ||
| 2936 | 4827 | var _ui = _interopRequireDefault(__webpack_require__(/*! ./hooks/ui.js */ "../modules/web-cli/assets/js/core/hooks/ui.js")); |
| 2937 | 4828 | /** |
| 2938 | 4829 | * @typedef {import('../modules/hook-base')} HookBase |
| 2939 | 4830 | */ |
| 2940 | -var Hooks = exports["default"] = /*#__PURE__*/function () { | |
| 4831 | +var Hooks = /*#__PURE__*/function () { | |
| 2941 | 4832 | function Hooks() { |
| 2942 | 4833 | (0, _classCallCheck2.default)(this, Hooks); |
| 2943 | 4834 | (0, _defineProperty2.default)(this, "data", new _data.default()); |
| 2944 | 4835 | (0, _defineProperty2.default)(this, "ui", new _ui.default()); |
| 2945 | 4836 | } |
| 2946 | - return (0, _createClass2.default)(Hooks, [{ | |
| 4837 | + (0, _createClass2.default)(Hooks, [{ | |
| 2947 | 4838 | key: "activate", |
| 2948 | 4839 | value: |
| 2949 | 4840 | /** |
| 2950 | 4841 | * Function activate(). |
| @@ -3218,9 +5109,11 @@ | ||
| 3218 | 5109 | value: function runUIBefore(command, args) { |
| 3219 | 5110 | return this.run('ui', 'before', command, args); |
| 3220 | 5111 | } |
| 3221 | 5112 | }]); |
| 5113 | + return Hooks; | |
| 3222 | 5114 | }(); |
| 5115 | +exports["default"] = Hooks; | |
| 3223 | 5116 | |
| 3224 | 5117 | /***/ }), |
| 3225 | 5118 | |
| 3226 | 5119 | /***/ "../modules/web-cli/assets/js/core/hooks/base.js": |
| @@ -3238,20 +5131,22 @@ | ||
| 3238 | 5131 | })); |
| 3239 | 5132 | exports["default"] = void 0; |
| 3240 | 5133 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 3241 | 5134 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 5135 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 3242 | 5136 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 3243 | 5137 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 3244 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 3245 | 5138 | var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js")); |
| 3246 | 5139 | var _module = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js")); |
| 3247 | 5140 | var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js")); |
| 3248 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 3249 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 5141 | +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); }; } | |
| 5142 | +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; } } | |
| 3250 | 5143 | /** |
| 3251 | 5144 | * @typedef {import('../../modules/hook-base')} HookBase |
| 3252 | 5145 | */ |
| 3253 | -var HooksBase = exports["default"] = /*#__PURE__*/function (_Module) { | |
| 5146 | +var HooksBase = /*#__PURE__*/function (_Module) { | |
| 5147 | + (0, _inherits2.default)(HooksBase, _Module); | |
| 5148 | + var _super = _createSuper(HooksBase); | |
| 3254 | 5149 | /** |
| 3255 | 5150 | * Function constructor(). |
| 3256 | 5151 | * |
| 3257 | 5152 | * Create hooks base. |
| @@ -3263,9 +5158,9 @@ | ||
| 3263 | 5158 | (0, _classCallCheck2.default)(this, HooksBase); |
| 3264 | 5159 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| 3265 | 5160 | args[_key] = arguments[_key]; |
| 3266 | 5161 | } |
| 3267 | - _this = _callSuper(this, HooksBase, [].concat(args)); | |
| 5162 | + _this = _super.call.apply(_super, [this].concat(args)); | |
| 3268 | 5163 | |
| 3269 | 5164 | /** |
| 3270 | 5165 | * Current command. |
| 3271 | 5166 | * |
| @@ -3301,10 +5196,9 @@ | ||
| 3301 | 5196 | }; |
| 3302 | 5197 | _this.callbacksFlatList = {}; |
| 3303 | 5198 | return _this; |
| 3304 | 5199 | } |
| 3305 | - (0, _inherits2.default)(HooksBase, _Module); | |
| 3306 | - return (0, _createClass2.default)(HooksBase, [{ | |
| 5200 | + (0, _createClass2.default)(HooksBase, [{ | |
| 3307 | 5201 | key: "activate", |
| 3308 | 5202 | value: function activate() { |
| 3309 | 5203 | Object.values(this.getAll(true)).forEach(function (callback) { |
| 3310 | 5204 | callback.activate(); |
| @@ -3696,9 +5590,11 @@ | ||
| 3696 | 5590 | // eslint-disable-line no-unused-vars |
| 3697 | 5591 | (0, _forceMethodImplementation.default)(); |
| 3698 | 5592 | } |
| 3699 | 5593 | }]); |
| 5594 | + return HooksBase; | |
| 3700 | 5595 | }(_module.default); |
| 5596 | +exports["default"] = HooksBase; | |
| 3701 | 5597 | |
| 3702 | 5598 | /***/ }), |
| 3703 | 5599 | |
| 3704 | 5600 | /***/ "../modules/web-cli/assets/js/core/hooks/data.js": |
| @@ -3716,17 +5612,18 @@ | ||
| 3716 | 5612 | })); |
| 3717 | 5613 | exports["default"] = void 0; |
| 3718 | 5614 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 3719 | 5615 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 5616 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 5617 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 3720 | 5618 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 3721 | 5619 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 3722 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 3723 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 3724 | 5620 | var _base = _interopRequireDefault(__webpack_require__(/*! ./base.js */ "../modules/web-cli/assets/js/core/hooks/base.js")); |
| 3725 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 3726 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 3727 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 3728 | -var Data = exports["default"] = /*#__PURE__*/function (_HooksBase) { | |
| 5621 | +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); }; } | |
| 5622 | +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; } } | |
| 5623 | +var Data = /*#__PURE__*/function (_HooksBase) { | |
| 5624 | + (0, _inherits2.default)(Data, _HooksBase); | |
| 5625 | + var _super = _createSuper(Data); | |
| 3729 | 5626 | function Data() { |
| 3730 | 5627 | var _this; |
| 3731 | 5628 | (0, _classCallCheck2.default)(this, Data); |
| 3732 | 5629 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| @@ -3731,15 +5628,14 @@ | ||
| 3731 | 5628 | (0, _classCallCheck2.default)(this, Data); |
| 3732 | 5629 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| 3733 | 5630 | args[_key] = arguments[_key]; |
| 3734 | 5631 | } |
| 3735 | - _this = _callSuper(this, Data, [].concat(args)); | |
| 5632 | + _this = _super.call.apply(_super, [this].concat(args)); | |
| 3736 | 5633 | _this.callbacks.dependency = {}; |
| 3737 | 5634 | _this.depth.dependency = {}; |
| 3738 | 5635 | return _this; |
| 3739 | 5636 | } |
| 3740 | - (0, _inherits2.default)(Data, _HooksBase); | |
| 3741 | - return (0, _createClass2.default)(Data, [{ | |
| 5637 | + (0, _createClass2.default)(Data, [{ | |
| 3742 | 5638 | key: "getType", |
| 3743 | 5639 | value: function getType() { |
| 3744 | 5640 | return 'data'; |
| 3745 | 5641 | } |
| @@ -3773,9 +5669,9 @@ | ||
| 3773 | 5669 | } |
| 3774 | 5670 | }, { |
| 3775 | 5671 | key: "shouldRun", |
| 3776 | 5672 | value: function shouldRun(callbacks) { |
| 3777 | - return _superPropGet(Data, "shouldRun", this, 3)([callbacks]) && elementor.documents.getCurrent().history.getActive(); | |
| 5673 | + return (0, _get2.default)((0, _getPrototypeOf2.default)(Data.prototype), "shouldRun", this).call(this, callbacks) && elementor.documents.getCurrent().history.getActive(); | |
| 3778 | 5674 | } |
| 3779 | 5675 | }, { |
| 3780 | 5676 | key: "onRun", |
| 3781 | 5677 | value: function onRun(command, args, event) { |
| @@ -3792,9 +5688,11 @@ | ||
| 3792 | 5688 | } |
| 3793 | 5689 | $e.devTools.log.callbacks().callback(this.getType(), command, args, event, id); |
| 3794 | 5690 | } |
| 3795 | 5691 | }]); |
| 5692 | + return Data; | |
| 3796 | 5693 | }(_base.default); |
| 5694 | +exports["default"] = Data; | |
| 3797 | 5695 | |
| 3798 | 5696 | /***/ }), |
| 3799 | 5697 | |
| 3800 | 5698 | /***/ "../modules/web-cli/assets/js/core/hooks/ui.js": |
| @@ -3812,15 +5710,17 @@ | ||
| 3812 | 5710 | })); |
| 3813 | 5711 | exports["default"] = void 0; |
| 3814 | 5712 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 3815 | 5713 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 5714 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 3816 | 5715 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 3817 | 5716 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 3818 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 3819 | 5717 | var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/core/hooks/base.js")); |
| 3820 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 3821 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 3822 | -var Ui = exports["default"] = /*#__PURE__*/function (_HooksBase) { | |
| 5718 | +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); }; } | |
| 5719 | +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; } } | |
| 5720 | +var Ui = /*#__PURE__*/function (_HooksBase) { | |
| 5721 | + (0, _inherits2.default)(Ui, _HooksBase); | |
| 5722 | + var _super = _createSuper(Ui); | |
| 3823 | 5723 | function Ui() { |
| 3824 | 5724 | var _this; |
| 3825 | 5725 | (0, _classCallCheck2.default)(this, Ui); |
| 3826 | 5726 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| @@ -3825,15 +5725,14 @@ | ||
| 3825 | 5725 | (0, _classCallCheck2.default)(this, Ui); |
| 3826 | 5726 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| 3827 | 5727 | args[_key] = arguments[_key]; |
| 3828 | 5728 | } |
| 3829 | - _this = _callSuper(this, Ui, [].concat(args)); | |
| 5729 | + _this = _super.call.apply(_super, [this].concat(args)); | |
| 3830 | 5730 | _this.callbacks.before = {}; |
| 3831 | 5731 | _this.depth.before = {}; |
| 3832 | 5732 | return _this; |
| 3833 | 5733 | } |
| 3834 | - (0, _inherits2.default)(Ui, _HooksBase); | |
| 3835 | - return (0, _createClass2.default)(Ui, [{ | |
| 5734 | + (0, _createClass2.default)(Ui, [{ | |
| 3836 | 5735 | key: "getType", |
| 3837 | 5736 | value: function getType() { |
| 3838 | 5737 | return 'ui'; |
| 3839 | 5738 | } |
| @@ -3869,9 +5768,11 @@ | ||
| 3869 | 5768 | } |
| 3870 | 5769 | $e.devTools.log.callbacks().callback(this.getType(), command, args, event, id); |
| 3871 | 5770 | } |
| 3872 | 5771 | }]); |
| 5772 | + return Ui; | |
| 3873 | 5773 | }(_base.default); |
| 5774 | +exports["default"] = Ui; | |
| 3874 | 5775 | |
| 3875 | 5776 | /***/ }), |
| 3876 | 5777 | |
| 3877 | 5778 | /***/ "../modules/web-cli/assets/js/core/routes.js": |
| @@ -3889,17 +5790,18 @@ | ||
| 3889 | 5790 | })); |
| 3890 | 5791 | exports["default"] = void 0; |
| 3891 | 5792 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 3892 | 5793 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 5794 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 5795 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 3893 | 5796 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 3894 | 5797 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 3895 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 3896 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 3897 | 5798 | var _commands = _interopRequireDefault(__webpack_require__(/*! ./commands */ "../modules/web-cli/assets/js/core/commands.js")); |
| 3898 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 3899 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 3900 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 3901 | -var Routes = exports["default"] = /*#__PURE__*/function (_Commands) { | |
| 5799 | +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); }; } | |
| 5800 | +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; } } | |
| 5801 | +var Routes = /*#__PURE__*/function (_Commands) { | |
| 5802 | + (0, _inherits2.default)(Routes, _Commands); | |
| 5803 | + var _super = _createSuper(Routes); | |
| 3902 | 5804 | function Routes() { |
| 3903 | 5805 | var _this; |
| 3904 | 5806 | (0, _classCallCheck2.default)(this, Routes); |
| 3905 | 5807 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| @@ -3904,15 +5806,14 @@ | ||
| 3904 | 5806 | (0, _classCallCheck2.default)(this, Routes); |
| 3905 | 5807 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { |
| 3906 | 5808 | args[_key] = arguments[_key]; |
| 3907 | 5809 | } |
| 3908 | - _this = _callSuper(this, Routes, [].concat(args)); | |
| 5810 | + _this = _super.call.apply(_super, [this].concat(args)); | |
| 3909 | 5811 | _this.savedStates = {}; |
| 3910 | 5812 | _this.historyPerComponent = {}; |
| 3911 | 5813 | return _this; |
| 3912 | 5814 | } |
| 3913 | - (0, _inherits2.default)(Routes, _Commands); | |
| 3914 | - return (0, _createClass2.default)(Routes, [{ | |
| 5815 | + (0, _createClass2.default)(Routes, [{ | |
| 3915 | 5816 | key: "refreshContainer", |
| 3916 | 5817 | value: function refreshContainer(container) { |
| 3917 | 5818 | var currentRoute = this.getCurrent(container), |
| 3918 | 5819 | currentArgs = this.getCurrentArgs(container); |
| @@ -3941,9 +5842,8 @@ | ||
| 3941 | 5842 | return; |
| 3942 | 5843 | } |
| 3943 | 5844 | this.detachCurrent(container); |
| 3944 | 5845 | this.getComponent(route).onCloseRoute(route); |
| 3945 | - this.dispatchOnClose(route); | |
| 3946 | 5846 | } |
| 3947 | 5847 | }, { |
| 3948 | 5848 | key: "clear", |
| 3949 | 5849 | value: function clear() { |
| @@ -3973,9 +5873,9 @@ | ||
| 3973 | 5873 | }, { |
| 3974 | 5874 | key: "validateRun", |
| 3975 | 5875 | value: function validateRun(route) { |
| 3976 | 5876 | var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; |
| 3977 | - if (!_superPropGet(Routes, "validateRun", this, 3)([route, args])) { | |
| 5877 | + if (!(0, _get2.default)((0, _getPrototypeOf2.default)(Routes.prototype), "validateRun", this).call(this, route, args)) { | |
| 3978 | 5878 | return false; |
| 3979 | 5879 | } |
| 3980 | 5880 | if (this.is(route, args) && !args.refresh) { |
| 3981 | 5881 | return false; |
| @@ -3999,34 +5899,23 @@ | ||
| 3999 | 5899 | if (oldRoute) { |
| 4000 | 5900 | this.getComponent(oldRoute).onCloseRoute(oldRoute); |
| 4001 | 5901 | } |
| 4002 | 5902 | _commands.default.trace.push(route); |
| 4003 | - _superPropGet(Routes, "beforeRun", this, 3)([route, args, false]); | |
| 5903 | + (0, _get2.default)((0, _getPrototypeOf2.default)(Routes.prototype), "beforeRun", this).call(this, route, args, false); | |
| 4004 | 5904 | this.attachCurrent(container, route, args); |
| 4005 | - | |
| 4006 | - // In the previous condition, `$e.routes.is()` resolves the old route as active (because the actual route | |
| 4007 | - // switching happens inside `this.attachCurrent()`), so we can't use it there. | |
| 4008 | - if (oldRoute) { | |
| 4009 | - this.dispatchOnClose(oldRoute); | |
| 4010 | - } | |
| 4011 | 5905 | } |
| 4012 | 5906 | }, { |
| 4013 | 5907 | key: "to", |
| 4014 | 5908 | value: function to(route, args) { |
| 4015 | - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { | |
| 4016 | - history: true | |
| 4017 | - }; | |
| 4018 | 5909 | this.run(route, args); |
| 4019 | 5910 | var namespaceRoot = this.getComponent(route).getServiceName(); |
| 4020 | - if (options.history) { | |
| 4021 | - if (!this.historyPerComponent[namespaceRoot]) { | |
| 4022 | - this.historyPerComponent[namespaceRoot] = []; | |
| 4023 | - } | |
| 4024 | - this.historyPerComponent[namespaceRoot].push({ | |
| 4025 | - route: route, | |
| 4026 | - args: args | |
| 4027 | - }); | |
| 5911 | + if (!this.historyPerComponent[namespaceRoot]) { | |
| 5912 | + this.historyPerComponent[namespaceRoot] = []; | |
| 4028 | 5913 | } |
| 5914 | + this.historyPerComponent[namespaceRoot].push({ | |
| 5915 | + route: route, | |
| 5916 | + args: args | |
| 5917 | + }); | |
| 4029 | 5918 | } |
| 4030 | 5919 | }, { |
| 4031 | 5920 | key: "back", |
| 4032 | 5921 | value: function back(namespaceRoot) { |
| @@ -4054,10 +5943,9 @@ | ||
| 4054 | 5943 | value: function afterRun(route, args) { |
| 4055 | 5944 | var results = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; |
| 4056 | 5945 | var component = this.getComponent(route); |
| 4057 | 5946 | component.onRoute(route, args); |
| 4058 | - this.dispatchOnOpen(route); | |
| 4059 | - _superPropGet(Routes, "afterRun", this, 3)([route, args, results, false]); | |
| 5947 | + (0, _get2.default)((0, _getPrototypeOf2.default)(Routes.prototype), "afterRun", this).call(this, route, args, results, false); | |
| 4060 | 5948 | _commands.default.trace.pop(); |
| 4061 | 5949 | } |
| 4062 | 5950 | }, { |
| 4063 | 5951 | key: "is", |
| @@ -4062,9 +5950,9 @@ | ||
| 4062 | 5950 | }, { |
| 4063 | 5951 | key: "is", |
| 4064 | 5952 | value: function is(route) { |
| 4065 | 5953 | var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; |
| 4066 | - if (!_superPropGet(Routes, "is", this, 3)([route])) { | |
| 5954 | + if (!(0, _get2.default)((0, _getPrototypeOf2.default)(Routes.prototype), "is", this).call(this, route)) { | |
| 4067 | 5955 | return false; |
| 4068 | 5956 | } |
| 4069 | 5957 | var container = this.getComponent(route).getServiceName(); |
| 4070 | 5958 | return _.isEqual(args, this.currentArgs[container]); |
| @@ -4094,28 +5982,12 @@ | ||
| 4094 | 5982 | key: "error", |
| 4095 | 5983 | value: function error(message) { |
| 4096 | 5984 | throw Error('Routes: ' + message); |
| 4097 | 5985 | } |
| 4098 | - }, { | |
| 4099 | - key: "dispatchOnOpen", | |
| 4100 | - value: function dispatchOnOpen(route) { | |
| 4101 | - window.dispatchEvent(new CustomEvent('elementor/routes/open', { | |
| 4102 | - detail: { | |
| 4103 | - route: route | |
| 4104 | - } | |
| 4105 | - })); | |
| 4106 | - } | |
| 4107 | - }, { | |
| 4108 | - key: "dispatchOnClose", | |
| 4109 | - value: function dispatchOnClose(route) { | |
| 4110 | - window.dispatchEvent(new CustomEvent('elementor/routes/close', { | |
| 4111 | - detail: { | |
| 4112 | - route: route | |
| 4113 | - } | |
| 4114 | - })); | |
| 4115 | - } | |
| 4116 | 5986 | }]); |
| 5987 | + return Routes; | |
| 4117 | 5988 | }(_commands.default); |
| 5989 | +exports["default"] = Routes; | |
| 4118 | 5990 | |
| 4119 | 5991 | /***/ }), |
| 4120 | 5992 | |
| 4121 | 5993 | /***/ "../modules/web-cli/assets/js/core/shortcuts.js": |
| @@ -4135,9 +6007,9 @@ | ||
| 4135 | 6007 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 4136 | 6008 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 4137 | 6009 | var _environment = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/environment */ "../modules/web-cli/assets/js/utils/environment.js")); |
| 4138 | 6010 | var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js")); |
| 4139 | -var Shortcuts = exports["default"] = /*#__PURE__*/function () { | |
| 6011 | +var Shortcuts = /*#__PURE__*/function () { | |
| 4140 | 6012 | function Shortcuts($window) { |
| 4141 | 6013 | (0, _classCallCheck2.default)(this, Shortcuts); |
| 4142 | 6014 | this.specialKeys = { |
| 4143 | 6015 | 13: 'enter', |
| @@ -4150,9 +6022,9 @@ | ||
| 4150 | 6022 | this.component = ''; |
| 4151 | 6023 | this.handlers = {}; |
| 4152 | 6024 | this.bindListener($window); |
| 4153 | 6025 | } |
| 4154 | - return (0, _createClass2.default)(Shortcuts, [{ | |
| 6026 | + (0, _createClass2.default)(Shortcuts, [{ | |
| 4155 | 6027 | key: "bindListener", |
| 4156 | 6028 | value: function bindListener($window) { |
| 4157 | 6029 | var _this = this; |
| 4158 | 6030 | $window.on('keydown', function (event) { |
| @@ -4307,9 +6179,11 @@ | ||
| 4307 | 6179 | return noScope; |
| 4308 | 6180 | } |
| 4309 | 6181 | } |
| 4310 | 6182 | }]); |
| 6183 | + return Shortcuts; | |
| 4311 | 6184 | }(); |
| 6185 | +exports["default"] = Shortcuts; | |
| 4312 | 6186 | |
| 4313 | 6187 | /***/ }), |
| 4314 | 6188 | |
| 4315 | 6189 | /***/ "../modules/web-cli/assets/js/core/store.js": |
| @@ -4329,11 +6203,11 @@ | ||
| 4329 | 6203 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 4330 | 6204 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 4331 | 6205 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 4332 | 6206 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 4333 | -var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "@reduxjs/toolkit"); | |
| 4334 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 4335 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 6207 | +var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"); | |
| 6208 | +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; } | |
| 6209 | +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; } | |
| 4336 | 6210 | /** |
| 4337 | 6211 | * @typedef {import('@reduxjs/toolkit').Slice} Slice |
| 4338 | 6212 | */ |
| 4339 | 6213 | /** |
| @@ -4344,10 +6218,18 @@ | ||
| 4344 | 6218 | */ |
| 4345 | 6219 | /** |
| 4346 | 6220 | * @typedef {import('@reduxjs/toolkit').ThunkMiddlewareFor} ThunkMiddlewareFor |
| 4347 | 6221 | */ |
| 4348 | -var Store = exports["default"] = /*#__PURE__*/function () { | |
| 6222 | +var Store = /*#__PURE__*/function () { | |
| 4349 | 6223 | /** |
| 6224 | + * @type {Object} | |
| 6225 | + */ | |
| 6226 | + | |
| 6227 | + /** | |
| 6228 | + * @type {EnhancedStore<{}, AnyAction, [ThunkMiddlewareFor<{}>]>} | |
| 6229 | + */ | |
| 6230 | + | |
| 6231 | + /** | |
| 4350 | 6232 | * Initialize the Store. |
| 4351 | 6233 | * |
| 4352 | 6234 | * @return {void} |
| 4353 | 6235 | */ |
| @@ -4352,15 +6234,9 @@ | ||
| 4352 | 6234 | * @return {void} |
| 4353 | 6235 | */ |
| 4354 | 6236 | function Store() { |
| 4355 | 6237 | (0, _classCallCheck2.default)(this, Store); |
| 4356 | - /** | |
| 4357 | - * @type {Object} | |
| 4358 | - */ | |
| 4359 | 6238 | (0, _defineProperty2.default)(this, "slices", {}); |
| 4360 | - /** | |
| 4361 | - * @type {EnhancedStore<{}, AnyAction, [ThunkMiddlewareFor<{}>]>} | |
| 4362 | - */ | |
| 4363 | 6239 | (0, _defineProperty2.default)(this, "reduxStore", void 0); |
| 4364 | 6240 | this.slices = {}; |
| 4365 | 6241 | this.reduxStore = this.createStore(); |
| 4366 | 6242 | } |
| @@ -4369,9 +6245,9 @@ | ||
| 4369 | 6245 | * Create a Redux Store object. |
| 4370 | 6246 | * |
| 4371 | 6247 | * @return {EnhancedStore<{}, AnyAction, [ThunkMiddlewareFor<{}>]>} store |
| 4372 | 6248 | */ |
| 4373 | - return (0, _createClass2.default)(Store, [{ | |
| 6249 | + (0, _createClass2.default)(Store, [{ | |
| 4374 | 6250 | key: "createStore", |
| 4375 | 6251 | value: function createStore() { |
| 4376 | 6252 | return (0, _toolkit.configureStore)({ |
| 4377 | 6253 | // Use an empty function instead of empty object since an empty object |
| @@ -4528,9 +6404,11 @@ | ||
| 4528 | 6404 | var _this$reduxStore3; |
| 4529 | 6405 | return (_this$reduxStore3 = this.reduxStore).subscribe.apply(_this$reduxStore3, arguments); |
| 4530 | 6406 | } |
| 4531 | 6407 | }]); |
| 6408 | + return Store; | |
| 4532 | 6409 | }(); |
| 6410 | +exports["default"] = Store; | |
| 4533 | 6411 | |
| 4534 | 6412 | /***/ }), |
| 4535 | 6413 | |
| 4536 | 6414 | /***/ "../modules/web-cli/assets/js/core/ui-states.js": |
| @@ -4552,9 +6430,9 @@ | ||
| 4552 | 6430 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 4553 | 6431 | /** |
| 4554 | 6432 | * @typedef {import('./states/ui-state-base')} UiStateBase |
| 4555 | 6433 | */ |
| 4556 | -var UiStates = exports["default"] = /*#__PURE__*/function () { | |
| 6434 | +var UiStates = /*#__PURE__*/function () { | |
| 4557 | 6435 | /** |
| 4558 | 6436 | * Initialize the State Manager. |
| 4559 | 6437 | * |
| 4560 | 6438 | * @return {void} |
| @@ -4568,9 +6446,9 @@ | ||
| 4568 | 6446 | * Register a new state. |
| 4569 | 6447 | * |
| 4570 | 6448 | * @param {UiStateBase} instance - State instance. |
| 4571 | 6449 | */ |
| 4572 | - return (0, _createClass2.default)(UiStates, [{ | |
| 6450 | + (0, _createClass2.default)(UiStates, [{ | |
| 4573 | 6451 | key: "register", |
| 4574 | 6452 | value: function register(instance) { |
| 4575 | 6453 | var stateId = instance.getPrefixedId(); |
| 4576 | 6454 | if (this.states[stateId]) { |
| @@ -4693,9 +6571,11 @@ | ||
| 4693 | 6571 | var _this$get; |
| 4694 | 6572 | return (_this$get = this.get(state)) === null || _this$get === void 0 ? void 0 : _this$get.getCurrent(); |
| 4695 | 6573 | } |
| 4696 | 6574 | }]); |
| 6575 | + return UiStates; | |
| 4697 | 6576 | }(); |
| 6577 | +exports["default"] = UiStates; | |
| 4698 | 6578 | |
| 4699 | 6579 | /***/ }), |
| 4700 | 6580 | |
| 4701 | 6581 | /***/ "../modules/web-cli/assets/js/extras/hash-commands.js": |
| @@ -4718,17 +6598,30 @@ | ||
| 4718 | 6598 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 4719 | 6599 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 4720 | 6600 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 4721 | 6601 | var _console = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/console */ "../modules/web-cli/assets/js/utils/console.js")); |
| 4722 | -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } | |
| 4723 | -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } | |
| 4724 | -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } | |
| 4725 | -var HashCommands = exports["default"] = /*#__PURE__*/function () { | |
| 6602 | +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; } } }; } | |
| 6603 | +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); } | |
| 6604 | +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; } | |
| 6605 | +var HashCommands = /*#__PURE__*/function () { | |
| 6606 | + /** | |
| 6607 | + * Cannot be static since it uses callback(s) that are available only after '$e' is initialized. | |
| 6608 | + */ | |
| 6609 | + | |
| 6610 | + /** | |
| 6611 | + * @typedef HashCommand | |
| 6612 | + * @property {string} method method | |
| 6613 | + * @property {string} command command | |
| 6614 | + * @property {Object} args arguments | |
| 6615 | + */ | |
| 6616 | + /** | |
| 6617 | + * List of current loaded hash commands. | |
| 6618 | + * | |
| 6619 | + * @type {Array.<HashCommand>} | |
| 6620 | + */ | |
| 6621 | + | |
| 4726 | 6622 | function HashCommands() { |
| 4727 | 6623 | (0, _classCallCheck2.default)(this, HashCommands); |
| 4728 | - /** | |
| 4729 | - * Cannot be static since it uses callback(s) that are available only after '$e' is initialized. | |
| 4730 | - */ | |
| 4731 | 6624 | (0, _defineProperty2.default)(this, "dispatchersList", { |
| 4732 | 6625 | 'e:run': { |
| 4733 | 6626 | runner: function runner() { |
| 4734 | 6627 | return $e.run; |
| @@ -4753,19 +6646,8 @@ | ||
| 4753 | 6646 | return false; |
| 4754 | 6647 | } |
| 4755 | 6648 | } |
| 4756 | 6649 | }); |
| 4757 | - /** | |
| 4758 | - * @typedef HashCommand | |
| 4759 | - * @property {string} method method | |
| 4760 | - * @property {string} command command | |
| 4761 | - * @property {Object} args arguments | |
| 4762 | - */ | |
| 4763 | - /** | |
| 4764 | - * List of current loaded hash commands. | |
| 4765 | - * | |
| 4766 | - * @type {Array.<HashCommand>} | |
| 4767 | - */ | |
| 4768 | 6650 | (0, _defineProperty2.default)(this, "commands", []); |
| 4769 | 6651 | this.commands = this.get(); |
| 4770 | 6652 | } |
| 4771 | 6653 | |
| @@ -4777,9 +6659,9 @@ | ||
| 4777 | 6659 | * @param {string} hash |
| 4778 | 6660 | * |
| 4779 | 6661 | * @return {Array.<HashCommand>} API requests |
| 4780 | 6662 | */ |
| 4781 | - return (0, _createClass2.default)(HashCommands, [{ | |
| 6663 | + (0, _createClass2.default)(HashCommands, [{ | |
| 4782 | 6664 | key: "get", |
| 4783 | 6665 | value: function get() { |
| 4784 | 6666 | var _this = this; |
| 4785 | 6667 | var hash = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : location.hash; |
| @@ -4821,10 +6703,10 @@ | ||
| 4821 | 6703 | * @param {Array.<HashCommand>} [commands=this.commands] |
| 4822 | 6704 | */ |
| 4823 | 6705 | }, { |
| 4824 | 6706 | key: "run", |
| 4825 | - value: (function () { | |
| 4826 | - var _run = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 6707 | + value: function () { | |
| 6708 | + var _run = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 4827 | 6709 | var commands, |
| 4828 | 6710 | _iterator, |
| 4829 | 6711 | _step, |
| 4830 | 6712 | hashCommand, |
| @@ -4832,84 +6714,84 @@ | ||
| 4832 | 6714 | _iterator2, |
| 4833 | 6715 | _step2, |
| 4834 | 6716 | _hashCommand, |
| 4835 | 6717 | _dispatcher, |
| 4836 | - _args = arguments, | |
| 4837 | - _t, | |
| 4838 | - _t2; | |
| 4839 | - return _regenerator.default.wrap(function (_context) { | |
| 4840 | - while (1) switch (_context.prev = _context.next) { | |
| 4841 | - case 0: | |
| 4842 | - commands = _args.length > 0 && _args[0] !== undefined ? _args[0] : this.commands; | |
| 4843 | - // To allow validate the run first. | |
| 4844 | - _iterator = _createForOfIteratorHelper(commands); | |
| 4845 | - _context.prev = 1; | |
| 4846 | - _iterator.s(); | |
| 4847 | - case 2: | |
| 4848 | - if ((_step = _iterator.n()).done) { | |
| 4849 | - _context.next = 5; | |
| 6718 | + _args = arguments; | |
| 6719 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 6720 | + while (1) { | |
| 6721 | + switch (_context.prev = _context.next) { | |
| 6722 | + case 0: | |
| 6723 | + commands = _args.length > 0 && _args[0] !== undefined ? _args[0] : this.commands; | |
| 6724 | + // To allow validate the run first. | |
| 6725 | + _iterator = _createForOfIteratorHelper(commands); | |
| 6726 | + _context.prev = 2; | |
| 6727 | + _iterator.s(); | |
| 6728 | + case 4: | |
| 6729 | + if ((_step = _iterator.n()).done) { | |
| 6730 | + _context.next = 13; | |
| 6731 | + break; | |
| 6732 | + } | |
| 6733 | + hashCommand = _step.value; | |
| 6734 | + dispatcher = this.dispatchersList[hashCommand.method]; | |
| 6735 | + if (dispatcher) { | |
| 6736 | + _context.next = 9; | |
| 6737 | + break; | |
| 6738 | + } | |
| 6739 | + return _context.abrupt("return", Promise.reject(new Error("No dispatcher found for the command: `".concat(hashCommand.command, "`.")))); | |
| 6740 | + case 9: | |
| 6741 | + if (dispatcher.isSafe(hashCommand.command)) { | |
| 6742 | + _context.next = 11; | |
| 6743 | + break; | |
| 6744 | + } | |
| 6745 | + return _context.abrupt("return", Promise.reject(new Error("Attempting to run unsafe or non exist command: `".concat(hashCommand.command, "`.")))); | |
| 6746 | + case 11: | |
| 6747 | + _context.next = 4; | |
| 4850 | 6748 | break; |
| 4851 | - } | |
| 4852 | - hashCommand = _step.value; | |
| 4853 | - dispatcher = this.dispatchersList[hashCommand.method]; | |
| 4854 | - if (dispatcher) { | |
| 4855 | - _context.next = 3; | |
| 6749 | + case 13: | |
| 6750 | + _context.next = 18; | |
| 4856 | 6751 | break; |
| 4857 | - } | |
| 4858 | - return _context.abrupt("return", Promise.reject(new Error("No dispatcher found for the command: `".concat(hashCommand.command, "`.")))); | |
| 4859 | - case 3: | |
| 4860 | - if (dispatcher.isSafe(hashCommand.command)) { | |
| 4861 | - _context.next = 4; | |
| 6752 | + case 15: | |
| 6753 | + _context.prev = 15; | |
| 6754 | + _context.t0 = _context["catch"](2); | |
| 6755 | + _iterator.e(_context.t0); | |
| 6756 | + case 18: | |
| 6757 | + _context.prev = 18; | |
| 6758 | + _iterator.f(); | |
| 6759 | + return _context.finish(18); | |
| 6760 | + case 21: | |
| 6761 | + // This logic will run the promises by sequence (will wait for dispatcher to finish, before run again). | |
| 6762 | + _iterator2 = _createForOfIteratorHelper(commands); | |
| 6763 | + _context.prev = 22; | |
| 6764 | + _iterator2.s(); | |
| 6765 | + case 24: | |
| 6766 | + if ((_step2 = _iterator2.n()).done) { | |
| 6767 | + _context.next = 31; | |
| 6768 | + break; | |
| 6769 | + } | |
| 6770 | + _hashCommand = _step2.value; | |
| 6771 | + _dispatcher = this.dispatchersList[_hashCommand.method]; | |
| 6772 | + _context.next = 29; | |
| 6773 | + return _dispatcher.runner()(_hashCommand.command, _dispatcher.isSafeWithArgs(_hashCommand.command) ? _hashCommand.args : undefined); | |
| 6774 | + case 29: | |
| 6775 | + _context.next = 24; | |
| 4862 | 6776 | break; |
| 4863 | - } | |
| 4864 | - return _context.abrupt("return", Promise.reject(new Error("Attempting to run unsafe or non exist command: `".concat(hashCommand.command, "`.")))); | |
| 4865 | - case 4: | |
| 4866 | - _context.next = 2; | |
| 4867 | - break; | |
| 4868 | - case 5: | |
| 4869 | - _context.next = 7; | |
| 4870 | - break; | |
| 4871 | - case 6: | |
| 4872 | - _context.prev = 6; | |
| 4873 | - _t = _context["catch"](1); | |
| 4874 | - _iterator.e(_t); | |
| 4875 | - case 7: | |
| 4876 | - _context.prev = 7; | |
| 4877 | - _iterator.f(); | |
| 4878 | - return _context.finish(7); | |
| 4879 | - case 8: | |
| 4880 | - // This logic will run the promises by sequence (will wait for dispatcher to finish, before run again). | |
| 4881 | - _iterator2 = _createForOfIteratorHelper(commands); | |
| 4882 | - _context.prev = 9; | |
| 4883 | - _iterator2.s(); | |
| 4884 | - case 10: | |
| 4885 | - if ((_step2 = _iterator2.n()).done) { | |
| 4886 | - _context.next = 12; | |
| 6777 | + case 31: | |
| 6778 | + _context.next = 36; | |
| 4887 | 6779 | break; |
| 4888 | - } | |
| 4889 | - _hashCommand = _step2.value; | |
| 4890 | - _dispatcher = this.dispatchersList[_hashCommand.method]; | |
| 4891 | - _context.next = 11; | |
| 4892 | - return _dispatcher.runner()(_hashCommand.command, _dispatcher.isSafeWithArgs(_hashCommand.command) ? _hashCommand.args : undefined); | |
| 4893 | - case 11: | |
| 4894 | - _context.next = 10; | |
| 4895 | - break; | |
| 4896 | - case 12: | |
| 4897 | - _context.next = 14; | |
| 4898 | - break; | |
| 4899 | - case 13: | |
| 4900 | - _context.prev = 13; | |
| 4901 | - _t2 = _context["catch"](9); | |
| 4902 | - _iterator2.e(_t2); | |
| 4903 | - case 14: | |
| 4904 | - _context.prev = 14; | |
| 4905 | - _iterator2.f(); | |
| 4906 | - return _context.finish(14); | |
| 4907 | - case 15: | |
| 4908 | - case "end": | |
| 4909 | - return _context.stop(); | |
| 6780 | + case 33: | |
| 6781 | + _context.prev = 33; | |
| 6782 | + _context.t1 = _context["catch"](22); | |
| 6783 | + _iterator2.e(_context.t1); | |
| 6784 | + case 36: | |
| 6785 | + _context.prev = 36; | |
| 6786 | + _iterator2.f(); | |
| 6787 | + return _context.finish(36); | |
| 6788 | + case 39: | |
| 6789 | + case "end": | |
| 6790 | + return _context.stop(); | |
| 6791 | + } | |
| 4910 | 6792 | } |
| 4911 | - }, _callee, this, [[1, 6, 7, 8], [9, 13, 14, 15]]); | |
| 6793 | + }, _callee, this, [[2, 15, 18, 21], [22, 33, 36, 39]]); | |
| 4912 | 6794 | })); |
| 4913 | 6795 | function run() { |
| 4914 | 6796 | return _run.apply(this, arguments); |
| 4915 | 6797 | } |
| @@ -4919,9 +6801,8 @@ | ||
| 4919 | 6801 | * Function runOnce(). |
| 4920 | 6802 | * |
| 4921 | 6803 | * Do same as `run` but clear `this.commands` before leaving. |
| 4922 | 6804 | */ |
| 4923 | - ) | |
| 4924 | 6805 | }, { |
| 4925 | 6806 | key: "runOnce", |
| 4926 | 6807 | value: function runOnce() { |
| 4927 | 6808 | var _this2 = this; |
| @@ -4946,9 +6827,11 @@ | ||
| 4946 | 6827 | return {}; |
| 4947 | 6828 | } |
| 4948 | 6829 | } |
| 4949 | 6830 | }]); |
| 6831 | + return HashCommands; | |
| 4950 | 6832 | }(); |
| 6833 | +exports["default"] = HashCommands; | |
| 4951 | 6834 | |
| 4952 | 6835 | /***/ }), |
| 4953 | 6836 | |
| 4954 | 6837 | /***/ "../modules/web-cli/assets/js/modules/command-base.js": |
| @@ -4966,25 +6849,26 @@ | ||
| 4966 | 6849 | })); |
| 4967 | 6850 | exports["default"] = void 0; |
| 4968 | 6851 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 4969 | 6852 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 6853 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 4970 | 6854 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 4971 | 6855 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 4972 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 4973 | 6856 | var _commandInfra = _interopRequireDefault(__webpack_require__(/*! ./command-infra */ "../modules/web-cli/assets/js/modules/command-infra.js")); |
| 4974 | 6857 | var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); |
| 4975 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 4976 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 6858 | +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); }; } | |
| 6859 | +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; } } | |
| 4977 | 6860 | /** |
| 4978 | 6861 | * @name $e.modules.CommandBase |
| 4979 | 6862 | */ |
| 4980 | -var CommandBase = exports["default"] = /*#__PURE__*/function (_CommandInfra) { | |
| 6863 | +var CommandBase = /*#__PURE__*/function (_CommandInfra) { | |
| 6864 | + (0, _inherits2.default)(CommandBase, _CommandInfra); | |
| 6865 | + var _super = _createSuper(CommandBase); | |
| 4981 | 6866 | function CommandBase() { |
| 4982 | 6867 | (0, _classCallCheck2.default)(this, CommandBase); |
| 4983 | - return _callSuper(this, CommandBase, arguments); | |
| 6868 | + return _super.apply(this, arguments); | |
| 4984 | 6869 | } |
| 4985 | - (0, _inherits2.default)(CommandBase, _CommandInfra); | |
| 4986 | - return (0, _createClass2.default)(CommandBase, [{ | |
| 6870 | + (0, _createClass2.default)(CommandBase, [{ | |
| 4987 | 6871 | key: "onBeforeRun", |
| 4988 | 6872 | value: function onBeforeRun() { |
| 4989 | 6873 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 4990 | 6874 | $e.hooks.runUIBefore(this.command, args); |
| @@ -5006,9 +6890,9 @@ | ||
| 5006 | 6890 | key: "onAfterApply", |
| 5007 | 6891 | value: function onAfterApply() { |
| 5008 | 6892 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 5009 | 6893 | var result = arguments.length > 1 ? arguments[1] : undefined; |
| 5010 | - return $e.hooks.runDataAfter(this.command, args, result); | |
| 6894 | + $e.hooks.runDataAfter(this.command, args, result); | |
| 5011 | 6895 | } |
| 5012 | 6896 | }, { |
| 5013 | 6897 | key: "onCatchApply", |
| 5014 | 6898 | value: function onCatchApply(e) { |
| @@ -5034,9 +6918,8 @@ | ||
| 5034 | 6918 | * |
| 5035 | 6919 | * Validate `arg.container` & `arg.containers`. |
| 5036 | 6920 | * |
| 5037 | 6921 | * @param {{}} args |
| 5038 | - * @deprecated since 3.7.0, extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase` instead. | |
| 5039 | 6922 | * |
| 5040 | 6923 | * @throws {Error} |
| 5041 | 6924 | */ |
| 5042 | 6925 | }, { |
| @@ -5043,9 +6926,9 @@ | ||
| 5043 | 6926 | key: "requireContainer", |
| 5044 | 6927 | value: function requireContainer() { |
| 5045 | 6928 | var _this = this; |
| 5046 | 6929 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.args; |
| 5047 | - _deprecation.default.deprecated('requireContainer()', '3.7.0', 'Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`'); | |
| 6930 | + _deprecation.default.deprecated('requireContainer', '3.7.0', 'Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`'); | |
| 5048 | 6931 | if (!args.container && !args.containers) { |
| 5049 | 6932 | throw Error('container or containers are required.'); |
| 5050 | 6933 | } |
| 5051 | 6934 | if (args.container && args.containers) { |
| @@ -5063,9 +6946,11 @@ | ||
| 5063 | 6946 | value: function getInstanceType() { |
| 5064 | 6947 | return 'CommandBase'; |
| 5065 | 6948 | } |
| 5066 | 6949 | }]); |
| 6950 | + return CommandBase; | |
| 5067 | 6951 | }(_commandInfra.default); |
| 6952 | +exports["default"] = CommandBase; | |
| 5068 | 6953 | |
| 5069 | 6954 | /***/ }), |
| 5070 | 6955 | |
| 5071 | 6956 | /***/ "../modules/web-cli/assets/js/modules/command-callback-base.js": |
| @@ -5083,24 +6968,25 @@ | ||
| 5083 | 6968 | })); |
| 5084 | 6969 | exports["default"] = void 0; |
| 5085 | 6970 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 5086 | 6971 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 6972 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 5087 | 6973 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 5088 | 6974 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 5089 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 5090 | 6975 | var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); |
| 5091 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 5092 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 6976 | +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); }; } | |
| 6977 | +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; } } | |
| 5093 | 6978 | /** |
| 5094 | 6979 | * To support pure callbacks in the API(commands.js), to ensure they have registered with the proper context. |
| 5095 | 6980 | */ |
| 5096 | -var CommandCallbackBase = exports["default"] = /*#__PURE__*/function (_CommandBase) { | |
| 6981 | +var CommandCallbackBase = /*#__PURE__*/function (_CommandBase) { | |
| 6982 | + (0, _inherits2.default)(CommandCallbackBase, _CommandBase); | |
| 6983 | + var _super = _createSuper(CommandCallbackBase); | |
| 5097 | 6984 | function CommandCallbackBase() { |
| 5098 | 6985 | (0, _classCallCheck2.default)(this, CommandCallbackBase); |
| 5099 | - return _callSuper(this, CommandCallbackBase, arguments); | |
| 6986 | + return _super.apply(this, arguments); | |
| 5100 | 6987 | } |
| 5101 | - (0, _inherits2.default)(CommandCallbackBase, _CommandBase); | |
| 5102 | - return (0, _createClass2.default)(CommandCallbackBase, [{ | |
| 6988 | + (0, _createClass2.default)(CommandCallbackBase, [{ | |
| 5103 | 6989 | key: "apply", |
| 5104 | 6990 | value: function apply() { |
| 5105 | 6991 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 5106 | 6992 | return this.constructor.getCallback()(args); |
| @@ -5123,9 +7009,11 @@ | ||
| 5123 | 7009 | value: function getCallback() { |
| 5124 | 7010 | return this.registerConfig.callback; |
| 5125 | 7011 | } |
| 5126 | 7012 | }]); |
| 7013 | + return CommandCallbackBase; | |
| 5127 | 7014 | }(_commandBase.default); |
| 7015 | +exports["default"] = CommandCallbackBase; | |
| 5128 | 7016 | |
| 5129 | 7017 | /***/ }), |
| 5130 | 7018 | |
| 5131 | 7019 | /***/ "../modules/web-cli/assets/js/modules/command-data.js": |
| @@ -5144,17 +7032,19 @@ | ||
| 5144 | 7032 | })); |
| 5145 | 7033 | exports["default"] = void 0; |
| 5146 | 7034 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 5147 | 7035 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 7036 | +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js")); | |
| 7037 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 5148 | 7038 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 5149 | 7039 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 5150 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 5151 | 7040 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 5152 | 7041 | var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); |
| 5153 | 7042 | var errors = _interopRequireWildcard(__webpack_require__(/*! ../core/data/errors/ */ "../modules/web-cli/assets/js/core/data/errors/index.js")); |
| 5154 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 5155 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 5156 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 7043 | +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); } | |
| 7044 | +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; } | |
| 7045 | +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); }; } | |
| 7046 | +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; } } | |
| 5157 | 7047 | /** |
| 5158 | 7048 | * @name $e.modules.CommandData |
| 5159 | 7049 | */ |
| 5160 | 7050 | /** |
| @@ -5165,27 +7055,19 @@ | ||
| 5165 | 7055 | */ |
| 5166 | 7056 | /** |
| 5167 | 7057 | * @typedef {import('../core/data/errors/base-error')} BaseError |
| 5168 | 7058 | */ |
| 5169 | -var CommandData = exports["default"] = /*#__PURE__*/function (_CommandBase) { | |
| 7059 | +var CommandData = /*#__PURE__*/function (_CommandBase) { | |
| 7060 | + (0, _inherits2.default)(CommandData, _CommandBase); | |
| 7061 | + var _super = _createSuper(CommandData); | |
| 5170 | 7062 | function CommandData(args) { |
| 5171 | 7063 | var _this$args$options; |
| 5172 | 7064 | var _this; |
| 5173 | 7065 | var commandsAPI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $e.data; |
| 5174 | 7066 | (0, _classCallCheck2.default)(this, CommandData); |
| 5175 | - _this = _callSuper(this, CommandData, [args, commandsAPI]); | |
| 5176 | - /** | |
| 5177 | - * Data returned from remote. | |
| 5178 | - * | |
| 5179 | - * @type {*} | |
| 5180 | - */ | |
| 5181 | - (0, _defineProperty2.default)(_this, "data", void 0); | |
| 5182 | - /** | |
| 5183 | - * Fetch type. | |
| 5184 | - * | |
| 5185 | - * @type {DataTypes} | |
| 5186 | - */ | |
| 5187 | - (0, _defineProperty2.default)(_this, "type", void 0); | |
| 7067 | + _this = _super.call(this, args, commandsAPI); | |
| 7068 | + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "data", void 0); | |
| 7069 | + (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "type", void 0); | |
| 5188 | 7070 | if ((_this$args$options = _this.args.options) !== null && _this$args$options !== void 0 && _this$args$options.type) { |
| 5189 | 7071 | _this.type = _this.args.options.type; |
| 5190 | 7072 | } |
| 5191 | 7073 | return _this; |
| @@ -5195,10 +7077,9 @@ | ||
| 5195 | 7077 | * Function getEndpointFormat(). |
| 5196 | 7078 | * |
| 5197 | 7079 | * @return {null|string} endpoint format |
| 5198 | 7080 | */ |
| 5199 | - (0, _inherits2.default)(CommandData, _CommandBase); | |
| 5200 | - return (0, _createClass2.default)(CommandData, [{ | |
| 7081 | + (0, _createClass2.default)(CommandData, [{ | |
| 5201 | 7082 | key: "getApplyMethods", |
| 5202 | 7083 | value: |
| 5203 | 7084 | /** |
| 5204 | 7085 | * @param {DataTypes} type |
| @@ -5411,11 +7292,11 @@ | ||
| 5411 | 7292 | } |
| 5412 | 7293 | }, { |
| 5413 | 7294 | key: "onCatchApply", |
| 5414 | 7295 | value: function onCatchApply(e) { |
| 5415 | - var _e; | |
| 7296 | + var _e, _e$data; | |
| 5416 | 7297 | // TODO: If the errors that returns from the server is consistent remove the '?' from 'e' |
| 5417 | - var httpErrorCode = ((_e = e) === null || _e === void 0 || (_e = _e.data) === null || _e === void 0 ? void 0 : _e.status) || 501; | |
| 7298 | + var httpErrorCode = ((_e = e) === null || _e === void 0 ? void 0 : (_e$data = _e.data) === null || _e$data === void 0 ? void 0 : _e$data.status) || 501; | |
| 5418 | 7299 | var dataError = Object.values(errors).find(function (error) { |
| 5419 | 7300 | return error.getHTTPErrorCode() === httpErrorCode; |
| 5420 | 7301 | }); |
| 5421 | 7302 | if (!dataError) { |
| @@ -5426,9 +7307,22 @@ | ||
| 5426 | 7307 | this.applyAfterCatch(e); |
| 5427 | 7308 | } |
| 5428 | 7309 | }], [{ |
| 5429 | 7310 | key: "getInstanceType", |
| 5430 | - value: function getInstanceType() { | |
| 7311 | + value: | |
| 7312 | + /** | |
| 7313 | + * Data returned from remote. | |
| 7314 | + * | |
| 7315 | + * @type {*} | |
| 7316 | + */ | |
| 7317 | + | |
| 7318 | + /** | |
| 7319 | + * Fetch type. | |
| 7320 | + * | |
| 7321 | + * @type {DataTypes} | |
| 7322 | + */ | |
| 7323 | + | |
| 7324 | + function getInstanceType() { | |
| 5431 | 7325 | return 'CommandData'; |
| 5432 | 7326 | } |
| 5433 | 7327 | }, { |
| 5434 | 7328 | key: "getEndpointFormat", |
| @@ -5435,9 +7329,11 @@ | ||
| 5435 | 7329 | value: function getEndpointFormat() { |
| 5436 | 7330 | return null; |
| 5437 | 7331 | } |
| 5438 | 7332 | }]); |
| 7333 | + return CommandData; | |
| 5439 | 7334 | }(_commandBase.default); |
| 7335 | +exports["default"] = CommandData; | |
| 5440 | 7336 | |
| 5441 | 7337 | /***/ }), |
| 5442 | 7338 | |
| 5443 | 7339 | /***/ "../modules/web-cli/assets/js/modules/command-infra.js": |
| @@ -5455,20 +7351,22 @@ | ||
| 5455 | 7351 | })); |
| 5456 | 7352 | exports["default"] = void 0; |
| 5457 | 7353 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 5458 | 7354 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 7355 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 5459 | 7356 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 5460 | 7357 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 5461 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 5462 | 7358 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 5463 | 7359 | var _argsObject = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js")); |
| 5464 | 7360 | var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); |
| 5465 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 5466 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 7361 | +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); }; } | |
| 7362 | +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; } } | |
| 5467 | 7363 | /** |
| 5468 | 7364 | * @typedef {import('../modules/component-base')} ComponentBase |
| 5469 | 7365 | */ |
| 5470 | -var CommandInfra = exports["default"] = /*#__PURE__*/function (_ArgsObject) { | |
| 7366 | +var CommandInfra = /*#__PURE__*/function (_ArgsObject) { | |
| 7367 | + (0, _inherits2.default)(CommandInfra, _ArgsObject); | |
| 7368 | + var _super = _createSuper(CommandInfra); | |
| 5471 | 7369 | /** |
| 5472 | 7370 | * Function constructor(). |
| 5473 | 7371 | * |
| 5474 | 7372 | * Create Commands Base. |
| @@ -5478,9 +7376,9 @@ | ||
| 5478 | 7376 | function CommandInfra() { |
| 5479 | 7377 | var _this; |
| 5480 | 7378 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 5481 | 7379 | (0, _classCallCheck2.default)(this, CommandInfra); |
| 5482 | - _this = _callSuper(this, CommandInfra, [args]); | |
| 7380 | + _this = _super.call(this, args); | |
| 5483 | 7381 | if (!_this.constructor.registerConfig) { |
| 5484 | 7382 | throw RangeError('Doing it wrong: Each command type should have `registerConfig`.'); |
| 5485 | 7383 | } |
| 5486 | 7384 | |
| @@ -5507,15 +7405,12 @@ | ||
| 5507 | 7405 | * Initialize command, called after construction. |
| 5508 | 7406 | * |
| 5509 | 7407 | * @param {{}} args |
| 5510 | 7408 | */ |
| 5511 | - (0, _inherits2.default)(CommandInfra, _ArgsObject); | |
| 5512 | - return (0, _createClass2.default)(CommandInfra, [{ | |
| 7409 | + (0, _createClass2.default)(CommandInfra, [{ | |
| 5513 | 7410 | key: "currentCommand", |
| 5514 | 7411 | get: |
| 5515 | - /** | |
| 5516 | - * @deprecated since 3.7.0, use `this.command` instead. | |
| 5517 | - */ | |
| 7412 | + // TODO - Remove backwards compatibility. | |
| 5518 | 7413 | function get() { |
| 5519 | 7414 | _deprecation.default.deprecated('this.currentCommand', '3.7.0', 'this.command'); |
| 5520 | 7415 | return this.command; |
| 5521 | 7416 | } |
| @@ -5636,9 +7531,14 @@ | ||
| 5636 | 7531 | key: "onCatchApply", |
| 5637 | 7532 | value: function onCatchApply(e) {} // eslint-disable-line no-unused-vars |
| 5638 | 7533 | }], [{ |
| 5639 | 7534 | key: "getInstanceType", |
| 5640 | - value: function getInstanceType() { | |
| 7535 | + value: | |
| 7536 | + /** | |
| 7537 | + * @type {Object} | |
| 7538 | + */ | |
| 7539 | + | |
| 7540 | + function getInstanceType() { | |
| 5641 | 7541 | return 'CommandInfra'; |
| 5642 | 7542 | } |
| 5643 | 7543 | |
| 5644 | 7544 | /** |
| @@ -5674,12 +7574,11 @@ | ||
| 5674 | 7574 | value: function setRegisterConfig(config) { |
| 5675 | 7575 | this.registerConfig = Object.freeze(config); |
| 5676 | 7576 | } |
| 5677 | 7577 | }]); |
| 7578 | + return CommandInfra; | |
| 5678 | 7579 | }(_argsObject.default); |
| 5679 | -/** | |
| 5680 | - * @type {Object} | |
| 5681 | - */ | |
| 7580 | +exports["default"] = CommandInfra; | |
| 5682 | 7581 | (0, _defineProperty2.default)(CommandInfra, "registerConfig", null); |
| 5683 | 7582 | |
| 5684 | 7583 | /***/ }), |
| 5685 | 7584 | |
| @@ -5698,31 +7597,34 @@ | ||
| 5698 | 7597 | })); |
| 5699 | 7598 | exports["default"] = void 0; |
| 5700 | 7599 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 5701 | 7600 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 7601 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 5702 | 7602 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 5703 | 7603 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 5704 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 5705 | 7604 | var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); |
| 5706 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 5707 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 7605 | +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); }; } | |
| 7606 | +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; } } | |
| 5708 | 7607 | /** |
| 5709 | 7608 | * @name $e.modules.CommandInternalBase |
| 5710 | 7609 | */ |
| 5711 | -var CommandInternalBase = exports["default"] = /*#__PURE__*/function (_CommandBase) { | |
| 7610 | +var CommandInternalBase = /*#__PURE__*/function (_CommandBase) { | |
| 7611 | + (0, _inherits2.default)(CommandInternalBase, _CommandBase); | |
| 7612 | + var _super = _createSuper(CommandInternalBase); | |
| 5712 | 7613 | function CommandInternalBase(args) { |
| 5713 | 7614 | var commandsAPI = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $e.commandsInternal; |
| 5714 | 7615 | (0, _classCallCheck2.default)(this, CommandInternalBase); |
| 5715 | - return _callSuper(this, CommandInternalBase, [args, commandsAPI]); | |
| 7616 | + return _super.call(this, args, commandsAPI); | |
| 5716 | 7617 | } |
| 5717 | - (0, _inherits2.default)(CommandInternalBase, _CommandBase); | |
| 5718 | - return (0, _createClass2.default)(CommandInternalBase, null, [{ | |
| 7618 | + (0, _createClass2.default)(CommandInternalBase, null, [{ | |
| 5719 | 7619 | key: "getInstanceType", |
| 5720 | 7620 | value: function getInstanceType() { |
| 5721 | 7621 | return 'CommandInternalBase'; |
| 5722 | 7622 | } |
| 5723 | 7623 | }]); |
| 7624 | + return CommandInternalBase; | |
| 5724 | 7625 | }(_commandBase.default); |
| 7626 | +exports["default"] = CommandInternalBase; | |
| 5725 | 7627 | |
| 5726 | 7628 | /***/ }), |
| 5727 | 7629 | |
| 5728 | 7630 | /***/ "../modules/web-cli/assets/js/modules/commands/close.js": |
| @@ -5740,28 +7642,32 @@ | ||
| 5740 | 7642 | })); |
| 5741 | 7643 | exports["default"] = exports.Close = void 0; |
| 5742 | 7644 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 5743 | 7645 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 7646 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 5744 | 7647 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 5745 | 7648 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 5746 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 5747 | 7649 | var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); |
| 5748 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 5749 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 5750 | -var Close = exports.Close = /*#__PURE__*/function (_CommandBase) { | |
| 7650 | +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); }; } | |
| 7651 | +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; } } | |
| 7652 | +var Close = /*#__PURE__*/function (_CommandBase) { | |
| 7653 | + (0, _inherits2.default)(Close, _CommandBase); | |
| 7654 | + var _super = _createSuper(Close); | |
| 5751 | 7655 | function Close() { |
| 5752 | 7656 | (0, _classCallCheck2.default)(this, Close); |
| 5753 | - return _callSuper(this, Close, arguments); | |
| 7657 | + return _super.apply(this, arguments); | |
| 5754 | 7658 | } |
| 5755 | - (0, _inherits2.default)(Close, _CommandBase); | |
| 5756 | - return (0, _createClass2.default)(Close, [{ | |
| 7659 | + (0, _createClass2.default)(Close, [{ | |
| 5757 | 7660 | key: "apply", |
| 5758 | 7661 | value: function apply() { |
| 5759 | 7662 | this.component.close(); |
| 5760 | 7663 | } |
| 5761 | 7664 | }]); |
| 7665 | + return Close; | |
| 5762 | 7666 | }(_commandBase.default); |
| 5763 | -var _default = exports["default"] = Close; | |
| 7667 | +exports.Close = Close; | |
| 7668 | +var _default = Close; | |
| 7669 | +exports["default"] = _default; | |
| 5764 | 7670 | |
| 5765 | 7671 | /***/ }), |
| 5766 | 7672 | |
| 5767 | 7673 | /***/ "../modules/web-cli/assets/js/modules/commands/index.js": |
| @@ -5815,28 +7721,32 @@ | ||
| 5815 | 7721 | })); |
| 5816 | 7722 | exports["default"] = exports.Open = void 0; |
| 5817 | 7723 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 5818 | 7724 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 7725 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 5819 | 7726 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 5820 | 7727 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 5821 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 5822 | 7728 | var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); |
| 5823 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 5824 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 5825 | -var Open = exports.Open = /*#__PURE__*/function (_CommandBase) { | |
| 7729 | +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); }; } | |
| 7730 | +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; } } | |
| 7731 | +var Open = /*#__PURE__*/function (_CommandBase) { | |
| 7732 | + (0, _inherits2.default)(Open, _CommandBase); | |
| 7733 | + var _super = _createSuper(Open); | |
| 5826 | 7734 | function Open() { |
| 5827 | 7735 | (0, _classCallCheck2.default)(this, Open); |
| 5828 | - return _callSuper(this, Open, arguments); | |
| 7736 | + return _super.apply(this, arguments); | |
| 5829 | 7737 | } |
| 5830 | - (0, _inherits2.default)(Open, _CommandBase); | |
| 5831 | - return (0, _createClass2.default)(Open, [{ | |
| 7738 | + (0, _createClass2.default)(Open, [{ | |
| 5832 | 7739 | key: "apply", |
| 5833 | 7740 | value: function apply() { |
| 5834 | 7741 | $e.route(this.component.getNamespace()); |
| 5835 | 7742 | } |
| 5836 | 7743 | }]); |
| 7744 | + return Open; | |
| 5837 | 7745 | }(_commandBase.default); |
| 5838 | -var _default = exports["default"] = Open; | |
| 7746 | +exports.Open = Open; | |
| 7747 | +var _default = Open; | |
| 7748 | +exports["default"] = _default; | |
| 5839 | 7749 | |
| 5840 | 7750 | /***/ }), |
| 5841 | 7751 | |
| 5842 | 7752 | /***/ "../modules/web-cli/assets/js/modules/commands/toggle.js": |
| @@ -5854,21 +7764,22 @@ | ||
| 5854 | 7764 | })); |
| 5855 | 7765 | exports["default"] = exports.Toggle = void 0; |
| 5856 | 7766 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 5857 | 7767 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 7768 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 5858 | 7769 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 5859 | 7770 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 5860 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 5861 | 7771 | var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); |
| 5862 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 5863 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 5864 | -var Toggle = exports.Toggle = /*#__PURE__*/function (_CommandBase) { | |
| 7772 | +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); }; } | |
| 7773 | +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; } } | |
| 7774 | +var Toggle = /*#__PURE__*/function (_CommandBase) { | |
| 7775 | + (0, _inherits2.default)(Toggle, _CommandBase); | |
| 7776 | + var _super = _createSuper(Toggle); | |
| 5865 | 7777 | function Toggle() { |
| 5866 | 7778 | (0, _classCallCheck2.default)(this, Toggle); |
| 5867 | - return _callSuper(this, Toggle, arguments); | |
| 7779 | + return _super.apply(this, arguments); | |
| 5868 | 7780 | } |
| 5869 | - (0, _inherits2.default)(Toggle, _CommandBase); | |
| 5870 | - return (0, _createClass2.default)(Toggle, [{ | |
| 7781 | + (0, _createClass2.default)(Toggle, [{ | |
| 5871 | 7782 | key: "apply", |
| 5872 | 7783 | value: function apply() { |
| 5873 | 7784 | if (this.component.isOpen) { |
| 5874 | 7785 | this.component.close(); |
| @@ -5876,10 +7787,13 @@ | ||
| 5876 | 7787 | $e.route(this.component.getNamespace()); |
| 5877 | 7788 | } |
| 5878 | 7789 | } |
| 5879 | 7790 | }]); |
| 7791 | + return Toggle; | |
| 5880 | 7792 | }(_commandBase.default); |
| 5881 | -var _default = exports["default"] = Toggle; | |
| 7793 | +exports.Toggle = Toggle; | |
| 7794 | +var _default = Toggle; | |
| 7795 | +exports["default"] = _default; | |
| 5882 | 7796 | |
| 5883 | 7797 | /***/ }), |
| 5884 | 7798 | |
| 5885 | 7799 | /***/ "../modules/web-cli/assets/js/modules/component-base.js": |
| @@ -5899,32 +7813,33 @@ | ||
| 5899 | 7813 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 5900 | 7814 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 5901 | 7815 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 5902 | 7816 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 7817 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 5903 | 7818 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 5904 | 7819 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 5905 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 5906 | 7820 | var _commandCallbackBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-callback-base */ "../modules/web-cli/assets/js/modules/command-callback-base.js")); |
| 5907 | -var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "@reduxjs/toolkit"); | |
| 7821 | +var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"); | |
| 5908 | 7822 | var _module = _interopRequireDefault(__webpack_require__(/*! elementor/assets/dev/js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js")); |
| 5909 | 7823 | var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js")); |
| 5910 | 7824 | var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); |
| 5911 | -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 5912 | -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 5913 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 5914 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 7825 | +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; } | |
| 7826 | +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; } | |
| 7827 | +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); }; } | |
| 7828 | +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; } } | |
| 5915 | 7829 | /** |
| 5916 | 7830 | * @typedef {import('./command-infra')} CommandInfra |
| 5917 | 7831 | * @typedef {import('./hook-base')} HookBase |
| 5918 | 7832 | * @typedef {import('../core/states/ui-state-base')} UiStateBase |
| 5919 | 7833 | */ |
| 5920 | -var ComponentBase = exports["default"] = /*#__PURE__*/function (_Module) { | |
| 7834 | +var ComponentBase = /*#__PURE__*/function (_Module) { | |
| 7835 | + (0, _inherits2.default)(ComponentBase, _Module); | |
| 7836 | + var _super = _createSuper(ComponentBase); | |
| 5921 | 7837 | function ComponentBase() { |
| 5922 | 7838 | (0, _classCallCheck2.default)(this, ComponentBase); |
| 5923 | - return _callSuper(this, ComponentBase, arguments); | |
| 7839 | + return _super.apply(this, arguments); | |
| 5924 | 7840 | } |
| 5925 | - (0, _inherits2.default)(ComponentBase, _Module); | |
| 5926 | - return (0, _createClass2.default)(ComponentBase, [{ | |
| 7841 | + (0, _createClass2.default)(ComponentBase, [{ | |
| 5927 | 7842 | key: "__construct", |
| 5928 | 7843 | value: function __construct() { |
| 5929 | 7844 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 5930 | 7845 | if (args.manager) { |
| @@ -5980,11 +7895,11 @@ | ||
| 5980 | 7895 | Object.values(this.getUiStates()).forEach(function (instance) { |
| 5981 | 7896 | return _this.registerUiState(instance); |
| 5982 | 7897 | }); |
| 5983 | 7898 | Object.entries(this.getStates()).forEach(function (_ref9) { |
| 5984 | - var _ref0 = (0, _slicedToArray2.default)(_ref9, 2), | |
| 5985 | - id = _ref0[0], | |
| 5986 | - state = _ref0[1]; | |
| 7899 | + var _ref10 = (0, _slicedToArray2.default)(_ref9, 2), | |
| 7900 | + id = _ref10[0], | |
| 7901 | + state = _ref10[1]; | |
| 5987 | 7902 | return _this.registerState(id, state); |
| 5988 | 7903 | }); |
| 5989 | 7904 | } |
| 5990 | 7905 | |
| @@ -5996,12 +7911,8 @@ | ||
| 5996 | 7911 | key: "getNamespace", |
| 5997 | 7912 | value: function getNamespace() { |
| 5998 | 7913 | (0, _forceMethodImplementation.default)(); |
| 5999 | 7914 | } |
| 6000 | - | |
| 6001 | - /** | |
| 6002 | - * @deprecated since 3.7.0, use `getServiceName()` instead. | |
| 6003 | - */ | |
| 6004 | 7915 | }, { |
| 6005 | 7916 | key: "getRootContainer", |
| 6006 | 7917 | value: function getRootContainer() { |
| 6007 | 7918 | _deprecation.default.deprecated('getRootContainer()', '3.7.0', 'getServiceName()'); |
| @@ -6175,13 +8086,14 @@ | ||
| 6175 | 8086 | registerConfig.callback = context; |
| 6176 | 8087 | |
| 6177 | 8088 | // Unique class. |
| 6178 | 8089 | context = /*#__PURE__*/function (_CommandCallbackBase) { |
| 8090 | + (0, _inherits2.default)(context, _CommandCallbackBase); | |
| 8091 | + var _super2 = _createSuper(context); | |
| 6179 | 8092 | function context() { |
| 6180 | 8093 | (0, _classCallCheck2.default)(this, context); |
| 6181 | - return _callSuper(this, context, arguments); | |
| 8094 | + return _super2.apply(this, arguments); | |
| 6182 | 8095 | } |
| 6183 | - (0, _inherits2.default)(context, _CommandCallbackBase); | |
| 6184 | 8096 | return (0, _createClass2.default)(context); |
| 6185 | 8097 | }(_commandCallbackBase.default); |
| 6186 | 8098 | } |
| 6187 | 8099 | context.setRegisterConfig(registerConfig); |
| @@ -6365,8 +8277,9 @@ | ||
| 6365 | 8277 | }, { |
| 6366 | 8278 | key: "activateTab", |
| 6367 | 8279 | value: function activateTab(tab, args) { |
| 6368 | 8280 | var _this4 = this; |
| 8281 | + this.currentTab = tab; | |
| 6369 | 8282 | this.renderTab(tab, args); |
| 6370 | 8283 | jQuery(this.getTabsWrapperSelector() + ' .elementor-component-tab').off('click').on('click', function (event) { |
| 6371 | 8284 | $e.route(_this4.getTabRoute(event.currentTarget.dataset.tab), args); |
| 6372 | 8285 | }).removeClass('elementor-active').filter('[data-tab="' + tab + '"]').addClass('elementor-active'); |
| @@ -6406,12 +8319,12 @@ | ||
| 6406 | 8319 | var _this5 = this; |
| 6407 | 8320 | var commands = {}; |
| 6408 | 8321 | |
| 6409 | 8322 | // Convert `Commands` to `ComponentBase` workable format. |
| 6410 | - Object.entries(commandsFromImport).forEach(function (_ref1) { | |
| 6411 | - var _ref10 = (0, _slicedToArray2.default)(_ref1, 2), | |
| 6412 | - className = _ref10[0], | |
| 6413 | - Class = _ref10[1]; | |
| 8323 | + Object.entries(commandsFromImport).forEach(function (_ref11) { | |
| 8324 | + var _ref12 = (0, _slicedToArray2.default)(_ref11, 2), | |
| 8325 | + className = _ref12[0], | |
| 8326 | + Class = _ref12[1]; | |
| 6414 | 8327 | var command = _this5.normalizeCommandName(className); |
| 6415 | 8328 | commands[command] = Class; |
| 6416 | 8329 | }); |
| 6417 | 8330 | return commands; |
| @@ -6471,9 +8384,11 @@ | ||
| 6471 | 8384 | value: function toggleHistoryClass() { |
| 6472 | 8385 | document.body.classList.toggle('e-routes-has-history', !!$e.routes.getHistory(this.getServiceName()).length); |
| 6473 | 8386 | } |
| 6474 | 8387 | }]); |
| 8388 | + return ComponentBase; | |
| 6475 | 8389 | }(_module.default); |
| 8390 | +exports["default"] = ComponentBase; | |
| 6476 | 8391 | |
| 6477 | 8392 | /***/ }), |
| 6478 | 8393 | |
| 6479 | 8394 | /***/ "../modules/web-cli/assets/js/modules/component-modal-base.js": |
| @@ -6490,33 +8405,33 @@ | ||
| 6490 | 8405 | Object.defineProperty(exports, "__esModule", ({ |
| 6491 | 8406 | value: true |
| 6492 | 8407 | })); |
| 6493 | 8408 | exports["default"] = void 0; |
| 6494 | -var _readOnlyError2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/readOnlyError */ "../node_modules/@babel/runtime/helpers/readOnlyError.js")); | |
| 6495 | 8409 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 6496 | 8410 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 8411 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 8412 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 6497 | 8413 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 6498 | 8414 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 6499 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 6500 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 6501 | 8415 | var _componentBase = _interopRequireDefault(__webpack_require__(/*! ./component-base */ "../modules/web-cli/assets/js/modules/component-base.js")); |
| 6502 | 8416 | var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../modules/web-cli/assets/js/modules/commands/index.js")); |
| 6503 | 8417 | var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js")); |
| 6504 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 6505 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 6506 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 6507 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 6508 | -var ComponentModalBase = exports["default"] = /*#__PURE__*/function (_ComponentBase) { | |
| 8418 | +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); } | |
| 8419 | +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; } | |
| 8420 | +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); }; } | |
| 8421 | +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; } } | |
| 8422 | +var ComponentModalBase = /*#__PURE__*/function (_ComponentBase) { | |
| 8423 | + (0, _inherits2.default)(ComponentModalBase, _ComponentBase); | |
| 8424 | + var _super = _createSuper(ComponentModalBase); | |
| 6509 | 8425 | function ComponentModalBase() { |
| 6510 | 8426 | (0, _classCallCheck2.default)(this, ComponentModalBase); |
| 6511 | - return _callSuper(this, ComponentModalBase, arguments); | |
| 8427 | + return _super.apply(this, arguments); | |
| 6512 | 8428 | } |
| 6513 | - (0, _inherits2.default)(ComponentModalBase, _ComponentBase); | |
| 6514 | - return (0, _createClass2.default)(ComponentModalBase, [{ | |
| 8429 | + (0, _createClass2.default)(ComponentModalBase, [{ | |
| 6515 | 8430 | key: "registerAPI", |
| 6516 | 8431 | value: function registerAPI() { |
| 6517 | 8432 | var _this = this; |
| 6518 | - _superPropGet(ComponentModalBase, "registerAPI", this, 3)([]); | |
| 8433 | + (0, _get2.default)((0, _getPrototypeOf2.default)(ComponentModalBase.prototype), "registerAPI", this).call(this); | |
| 6519 | 8434 | $e.shortcuts.register('esc', { |
| 6520 | 8435 | scopes: [this.getNamespace()], |
| 6521 | 8436 | callback: function callback() { |
| 6522 | 8437 | return _this.close(); |
| @@ -6553,13 +8468,12 @@ | ||
| 6553 | 8468 | } |
| 6554 | 8469 | }, { |
| 6555 | 8470 | key: "close", |
| 6556 | 8471 | value: function close() { |
| 6557 | - if (!_superPropGet(ComponentModalBase, "close", this, 3)([])) { | |
| 8472 | + if (!(0, _get2.default)((0, _getPrototypeOf2.default)(ComponentModalBase.prototype), "close", this).call(this)) { | |
| 6558 | 8473 | return false; |
| 6559 | 8474 | } |
| 6560 | - var close = elementor.hooks.applyFilters('component/modal/close', this.layout.getModal().hide.bind(this.layout.getModal()), this); | |
| 6561 | - close(); | |
| 8475 | + this.layout.getModal().hide(); | |
| 6562 | 8476 | return true; |
| 6563 | 8477 | } |
| 6564 | 8478 | }, { |
| 6565 | 8479 | key: "getModalLayout", |
| @@ -6566,9 +8480,11 @@ | ||
| 6566 | 8480 | value: function getModalLayout() { |
| 6567 | 8481 | (0, _forceMethodImplementation.default)(); |
| 6568 | 8482 | } |
| 6569 | 8483 | }]); |
| 8484 | + return ComponentModalBase; | |
| 6570 | 8485 | }(_componentBase.default); |
| 8486 | +exports["default"] = ComponentModalBase; | |
| 6571 | 8487 | |
| 6572 | 8488 | /***/ }), |
| 6573 | 8489 | |
| 6574 | 8490 | /***/ "../modules/web-cli/assets/js/modules/hook-base.js": |
| @@ -6588,10 +8504,28 @@ | ||
| 6588 | 8504 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 6589 | 8505 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 6590 | 8506 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 6591 | 8507 | var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js")); |
| 6592 | -var HookBase = exports["default"] = /*#__PURE__*/function () { | |
| 8508 | +var HookBase = /*#__PURE__*/function () { | |
| 6593 | 8509 | /** |
| 8510 | + * Callback type, eg ( hook, event ). | |
| 8511 | + * | |
| 8512 | + * @type {string} | |
| 8513 | + */ | |
| 8514 | + | |
| 8515 | + /** | |
| 8516 | + * Full command address, that will hook the callback. | |
| 8517 | + * | |
| 8518 | + * @type {string} | |
| 8519 | + */ | |
| 8520 | + | |
| 8521 | + /** | |
| 8522 | + * Unique id of the callback. | |
| 8523 | + * | |
| 8524 | + * @type {string} | |
| 8525 | + */ | |
| 8526 | + | |
| 8527 | + /** | |
| 6594 | 8528 | * Function constructor(). |
| 6595 | 8529 | * |
| 6596 | 8530 | * Create callback base. |
| 6597 | 8531 | */ |
| @@ -6596,25 +8530,10 @@ | ||
| 6596 | 8530 | * Create callback base. |
| 6597 | 8531 | */ |
| 6598 | 8532 | function HookBase() { |
| 6599 | 8533 | (0, _classCallCheck2.default)(this, HookBase); |
| 6600 | - /** | |
| 6601 | - * Callback type, eg ( hook, event ). | |
| 6602 | - * | |
| 6603 | - * @type {string} | |
| 6604 | - */ | |
| 6605 | 8534 | (0, _defineProperty2.default)(this, "type", void 0); |
| 6606 | - /** | |
| 6607 | - * Full command address, that will hook the callback. | |
| 6608 | - * | |
| 6609 | - * @type {string} | |
| 6610 | - */ | |
| 6611 | 8535 | (0, _defineProperty2.default)(this, "command", void 0); |
| 6612 | - /** | |
| 6613 | - * Unique id of the callback. | |
| 6614 | - * | |
| 6615 | - * @type {string} | |
| 6616 | - */ | |
| 6617 | 8536 | (0, _defineProperty2.default)(this, "id", void 0); |
| 6618 | 8537 | this.initialize(); |
| 6619 | 8538 | this.type = this.getType(); |
| 6620 | 8539 | this.command = this.getCommand(); |
| @@ -6626,9 +8545,9 @@ | ||
| 6626 | 8545 | * |
| 6627 | 8546 | * Called after creation of the base, used for initialize extras. |
| 6628 | 8547 | * Without expending constructor. |
| 6629 | 8548 | */ |
| 6630 | - return (0, _createClass2.default)(HookBase, [{ | |
| 8549 | + (0, _createClass2.default)(HookBase, [{ | |
| 6631 | 8550 | key: "initialize", |
| 6632 | 8551 | value: function initialize() {} |
| 6633 | 8552 | |
| 6634 | 8553 | /** |
| @@ -6772,9 +8691,11 @@ | ||
| 6772 | 8691 | } |
| 6773 | 8692 | return true; |
| 6774 | 8693 | } |
| 6775 | 8694 | }]); |
| 8695 | + return HookBase; | |
| 6776 | 8696 | }(); |
| 8697 | +exports["default"] = HookBase; | |
| 6777 | 8698 | |
| 6778 | 8699 | /***/ }), |
| 6779 | 8700 | |
| 6780 | 8701 | /***/ "../modules/web-cli/assets/js/modules/hook-break.js": |
| @@ -6792,22 +8713,24 @@ | ||
| 6792 | 8713 | })); |
| 6793 | 8714 | exports["default"] = void 0; |
| 6794 | 8715 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 6795 | 8716 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 8717 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 6796 | 8718 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 6797 | 8719 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 6798 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 6799 | 8720 | var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js")); |
| 6800 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 6801 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 6802 | -var HookBreak = exports["default"] = /*#__PURE__*/function (_Error) { | |
| 8721 | +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); }; } | |
| 8722 | +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; } } | |
| 8723 | +var HookBreak = /*#__PURE__*/function (_Error) { | |
| 8724 | + (0, _inherits2.default)(HookBreak, _Error); | |
| 8725 | + var _super = _createSuper(HookBreak); | |
| 6803 | 8726 | function HookBreak() { |
| 6804 | 8727 | (0, _classCallCheck2.default)(this, HookBreak); |
| 6805 | - return _callSuper(this, HookBreak, ['HookBreak']); | |
| 8728 | + return _super.call(this, 'HookBreak'); | |
| 6806 | 8729 | } |
| 6807 | - (0, _inherits2.default)(HookBreak, _Error); | |
| 6808 | 8730 | return (0, _createClass2.default)(HookBreak); |
| 6809 | -}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 8731 | +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 8732 | +exports["default"] = HookBreak; | |
| 6810 | 8733 | |
| 6811 | 8734 | /***/ }), |
| 6812 | 8735 | |
| 6813 | 8736 | /***/ "../modules/web-cli/assets/js/modules/hooks/data/after.js": |
| @@ -6825,28 +8748,32 @@ | ||
| 6825 | 8748 | })); |
| 6826 | 8749 | exports["default"] = exports.After = void 0; |
| 6827 | 8750 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 6828 | 8751 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 8752 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 6829 | 8753 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 6830 | 8754 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 6831 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 6832 | 8755 | var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/data/base.js")); |
| 6833 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 6834 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 6835 | -var After = exports.After = /*#__PURE__*/function (_Base) { | |
| 8756 | +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); }; } | |
| 8757 | +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; } } | |
| 8758 | +var After = /*#__PURE__*/function (_Base) { | |
| 8759 | + (0, _inherits2.default)(After, _Base); | |
| 8760 | + var _super = _createSuper(After); | |
| 6836 | 8761 | function After() { |
| 6837 | 8762 | (0, _classCallCheck2.default)(this, After); |
| 6838 | - return _callSuper(this, After, arguments); | |
| 8763 | + return _super.apply(this, arguments); | |
| 6839 | 8764 | } |
| 6840 | - (0, _inherits2.default)(After, _Base); | |
| 6841 | - return (0, _createClass2.default)(After, [{ | |
| 8765 | + (0, _createClass2.default)(After, [{ | |
| 6842 | 8766 | key: "register", |
| 6843 | 8767 | value: function register() { |
| 6844 | 8768 | $e.hooks.registerDataAfter(this); |
| 6845 | 8769 | } |
| 6846 | 8770 | }]); |
| 8771 | + return After; | |
| 6847 | 8772 | }(_base.default); |
| 6848 | -var _default = exports["default"] = After; | |
| 8773 | +exports.After = After; | |
| 8774 | +var _default = After; | |
| 8775 | +exports["default"] = _default; | |
| 6849 | 8776 | |
| 6850 | 8777 | /***/ }), |
| 6851 | 8778 | |
| 6852 | 8779 | /***/ "../modules/web-cli/assets/js/modules/hooks/data/base.js": |
| @@ -6864,28 +8791,32 @@ | ||
| 6864 | 8791 | })); |
| 6865 | 8792 | exports["default"] = exports.Base = void 0; |
| 6866 | 8793 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 6867 | 8794 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 8795 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 6868 | 8796 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 6869 | 8797 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 6870 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 6871 | 8798 | var _hookBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/hook-base */ "../modules/web-cli/assets/js/modules/hook-base.js")); |
| 6872 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 6873 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 6874 | -var Base = exports.Base = /*#__PURE__*/function (_HookBase) { | |
| 8799 | +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); }; } | |
| 8800 | +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; } } | |
| 8801 | +var Base = /*#__PURE__*/function (_HookBase) { | |
| 8802 | + (0, _inherits2.default)(Base, _HookBase); | |
| 8803 | + var _super = _createSuper(Base); | |
| 6875 | 8804 | function Base() { |
| 6876 | 8805 | (0, _classCallCheck2.default)(this, Base); |
| 6877 | - return _callSuper(this, Base, arguments); | |
| 8806 | + return _super.apply(this, arguments); | |
| 6878 | 8807 | } |
| 6879 | - (0, _inherits2.default)(Base, _HookBase); | |
| 6880 | - return (0, _createClass2.default)(Base, [{ | |
| 8808 | + (0, _createClass2.default)(Base, [{ | |
| 6881 | 8809 | key: "getType", |
| 6882 | 8810 | value: function getType() { |
| 6883 | 8811 | return 'data'; |
| 6884 | 8812 | } |
| 6885 | 8813 | }]); |
| 8814 | + return Base; | |
| 6886 | 8815 | }(_hookBase.default); |
| 6887 | -var _default = exports["default"] = Base; | |
| 8816 | +exports.Base = Base; | |
| 8817 | +var _default = Base; | |
| 8818 | +exports["default"] = _default; | |
| 6888 | 8819 | |
| 6889 | 8820 | /***/ }), |
| 6890 | 8821 | |
| 6891 | 8822 | /***/ "../modules/web-cli/assets/js/modules/hooks/data/catch.js": |
| @@ -6903,28 +8834,32 @@ | ||
| 6903 | 8834 | })); |
| 6904 | 8835 | exports["default"] = exports.Catch = void 0; |
| 6905 | 8836 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 6906 | 8837 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 8838 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 6907 | 8839 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 6908 | 8840 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 6909 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 6910 | 8841 | var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/data/base.js")); |
| 6911 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 6912 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 6913 | -var Catch = exports.Catch = /*#__PURE__*/function (_Base) { | |
| 8842 | +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); }; } | |
| 8843 | +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; } } | |
| 8844 | +var Catch = /*#__PURE__*/function (_Base) { | |
| 8845 | + (0, _inherits2.default)(Catch, _Base); | |
| 8846 | + var _super = _createSuper(Catch); | |
| 6914 | 8847 | function Catch() { |
| 6915 | 8848 | (0, _classCallCheck2.default)(this, Catch); |
| 6916 | - return _callSuper(this, Catch, arguments); | |
| 8849 | + return _super.apply(this, arguments); | |
| 6917 | 8850 | } |
| 6918 | - (0, _inherits2.default)(Catch, _Base); | |
| 6919 | - return (0, _createClass2.default)(Catch, [{ | |
| 8851 | + (0, _createClass2.default)(Catch, [{ | |
| 6920 | 8852 | key: "register", |
| 6921 | 8853 | value: function register() { |
| 6922 | 8854 | $e.hooks.registerDataCatch(this); |
| 6923 | 8855 | } |
| 6924 | 8856 | }]); |
| 8857 | + return Catch; | |
| 6925 | 8858 | }(_base.default); |
| 6926 | -var _default = exports["default"] = Catch; | |
| 8859 | +exports.Catch = Catch; | |
| 8860 | +var _default = Catch; | |
| 8861 | +exports["default"] = _default; | |
| 6927 | 8862 | |
| 6928 | 8863 | /***/ }), |
| 6929 | 8864 | |
| 6930 | 8865 | /***/ "../modules/web-cli/assets/js/modules/hooks/data/dependency.js": |
| @@ -6942,28 +8877,32 @@ | ||
| 6942 | 8877 | })); |
| 6943 | 8878 | exports["default"] = exports.Dependency = void 0; |
| 6944 | 8879 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 6945 | 8880 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 8881 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 6946 | 8882 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 6947 | 8883 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 6948 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 6949 | 8884 | var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/data/base.js")); |
| 6950 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 6951 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 6952 | -var Dependency = exports.Dependency = /*#__PURE__*/function (_Base) { | |
| 8885 | +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); }; } | |
| 8886 | +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; } } | |
| 8887 | +var Dependency = /*#__PURE__*/function (_Base) { | |
| 8888 | + (0, _inherits2.default)(Dependency, _Base); | |
| 8889 | + var _super = _createSuper(Dependency); | |
| 6953 | 8890 | function Dependency() { |
| 6954 | 8891 | (0, _classCallCheck2.default)(this, Dependency); |
| 6955 | - return _callSuper(this, Dependency, arguments); | |
| 8892 | + return _super.apply(this, arguments); | |
| 6956 | 8893 | } |
| 6957 | - (0, _inherits2.default)(Dependency, _Base); | |
| 6958 | - return (0, _createClass2.default)(Dependency, [{ | |
| 8894 | + (0, _createClass2.default)(Dependency, [{ | |
| 6959 | 8895 | key: "register", |
| 6960 | 8896 | value: function register() { |
| 6961 | 8897 | $e.hooks.registerDataDependency(this); |
| 6962 | 8898 | } |
| 6963 | 8899 | }]); |
| 8900 | + return Dependency; | |
| 6964 | 8901 | }(_base.default); |
| 6965 | -var _default = exports["default"] = Dependency; | |
| 8902 | +exports.Dependency = Dependency; | |
| 8903 | +var _default = Dependency; | |
| 8904 | +exports["default"] = _default; | |
| 6966 | 8905 | |
| 6967 | 8906 | /***/ }), |
| 6968 | 8907 | |
| 6969 | 8908 | /***/ "../modules/web-cli/assets/js/modules/hooks/data/index.js": |
| @@ -7024,28 +8963,32 @@ | ||
| 7024 | 8963 | })); |
| 7025 | 8964 | exports["default"] = exports.After = void 0; |
| 7026 | 8965 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 7027 | 8966 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 8967 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 7028 | 8968 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 7029 | 8969 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 7030 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 7031 | 8970 | var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/ui/base.js")); |
| 7032 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 7033 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 7034 | -var After = exports.After = /*#__PURE__*/function (_Base) { | |
| 8971 | +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); }; } | |
| 8972 | +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; } } | |
| 8973 | +var After = /*#__PURE__*/function (_Base) { | |
| 8974 | + (0, _inherits2.default)(After, _Base); | |
| 8975 | + var _super = _createSuper(After); | |
| 7035 | 8976 | function After() { |
| 7036 | 8977 | (0, _classCallCheck2.default)(this, After); |
| 7037 | - return _callSuper(this, After, arguments); | |
| 8978 | + return _super.apply(this, arguments); | |
| 7038 | 8979 | } |
| 7039 | - (0, _inherits2.default)(After, _Base); | |
| 7040 | - return (0, _createClass2.default)(After, [{ | |
| 8980 | + (0, _createClass2.default)(After, [{ | |
| 7041 | 8981 | key: "register", |
| 7042 | 8982 | value: function register() { |
| 7043 | 8983 | $e.hooks.registerUIAfter(this); |
| 7044 | 8984 | } |
| 7045 | 8985 | }]); |
| 8986 | + return After; | |
| 7046 | 8987 | }(_base.default); |
| 7047 | -var _default = exports["default"] = After; | |
| 8988 | +exports.After = After; | |
| 8989 | +var _default = After; | |
| 8990 | +exports["default"] = _default; | |
| 7048 | 8991 | |
| 7049 | 8992 | /***/ }), |
| 7050 | 8993 | |
| 7051 | 8994 | /***/ "../modules/web-cli/assets/js/modules/hooks/ui/base.js": |
| @@ -7063,28 +9006,32 @@ | ||
| 7063 | 9006 | })); |
| 7064 | 9007 | exports["default"] = exports.Base = void 0; |
| 7065 | 9008 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 7066 | 9009 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 9010 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 7067 | 9011 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 7068 | 9012 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 7069 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 7070 | 9013 | var _hookBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/hook-base */ "../modules/web-cli/assets/js/modules/hook-base.js")); |
| 7071 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 7072 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 7073 | -var Base = exports.Base = /*#__PURE__*/function (_HookBase) { | |
| 9014 | +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); }; } | |
| 9015 | +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; } } | |
| 9016 | +var Base = /*#__PURE__*/function (_HookBase) { | |
| 9017 | + (0, _inherits2.default)(Base, _HookBase); | |
| 9018 | + var _super = _createSuper(Base); | |
| 7074 | 9019 | function Base() { |
| 7075 | 9020 | (0, _classCallCheck2.default)(this, Base); |
| 7076 | - return _callSuper(this, Base, arguments); | |
| 9021 | + return _super.apply(this, arguments); | |
| 7077 | 9022 | } |
| 7078 | - (0, _inherits2.default)(Base, _HookBase); | |
| 7079 | - return (0, _createClass2.default)(Base, [{ | |
| 9023 | + (0, _createClass2.default)(Base, [{ | |
| 7080 | 9024 | key: "getType", |
| 7081 | 9025 | value: function getType() { |
| 7082 | 9026 | return 'ui'; |
| 7083 | 9027 | } |
| 7084 | 9028 | }]); |
| 9029 | + return Base; | |
| 7085 | 9030 | }(_hookBase.default); |
| 7086 | -var _default = exports["default"] = Base; | |
| 9031 | +exports.Base = Base; | |
| 9032 | +var _default = Base; | |
| 9033 | +exports["default"] = _default; | |
| 7087 | 9034 | |
| 7088 | 9035 | /***/ }), |
| 7089 | 9036 | |
| 7090 | 9037 | /***/ "../modules/web-cli/assets/js/modules/hooks/ui/before.js": |
| @@ -7102,28 +9049,32 @@ | ||
| 7102 | 9049 | })); |
| 7103 | 9050 | exports["default"] = exports.Before = void 0; |
| 7104 | 9051 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 7105 | 9052 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 9053 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 7106 | 9054 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 7107 | 9055 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 7108 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 7109 | 9056 | var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/ui/base.js")); |
| 7110 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 7111 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 7112 | -var Before = exports.Before = /*#__PURE__*/function (_Base) { | |
| 9057 | +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); }; } | |
| 9058 | +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; } } | |
| 9059 | +var Before = /*#__PURE__*/function (_Base) { | |
| 9060 | + (0, _inherits2.default)(Before, _Base); | |
| 9061 | + var _super = _createSuper(Before); | |
| 7113 | 9062 | function Before() { |
| 7114 | 9063 | (0, _classCallCheck2.default)(this, Before); |
| 7115 | - return _callSuper(this, Before, arguments); | |
| 9064 | + return _super.apply(this, arguments); | |
| 7116 | 9065 | } |
| 7117 | - (0, _inherits2.default)(Before, _Base); | |
| 7118 | - return (0, _createClass2.default)(Before, [{ | |
| 9066 | + (0, _createClass2.default)(Before, [{ | |
| 7119 | 9067 | key: "register", |
| 7120 | 9068 | value: function register() { |
| 7121 | 9069 | $e.hooks.registerUIBefore(this); |
| 7122 | 9070 | } |
| 7123 | 9071 | }]); |
| 9072 | + return Before; | |
| 7124 | 9073 | }(_base.default); |
| 7125 | -var _default = exports["default"] = Before; | |
| 9074 | +exports.Before = Before; | |
| 9075 | +var _default = Before; | |
| 9076 | +exports["default"] = _default; | |
| 7126 | 9077 | |
| 7127 | 9078 | /***/ }), |
| 7128 | 9079 | |
| 7129 | 9080 | /***/ "../modules/web-cli/assets/js/modules/hooks/ui/catch.js": |
| @@ -7141,28 +9092,32 @@ | ||
| 7141 | 9092 | })); |
| 7142 | 9093 | exports["default"] = exports.Catch = void 0; |
| 7143 | 9094 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 7144 | 9095 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 9096 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 7145 | 9097 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 7146 | 9098 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 7147 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 7148 | 9099 | var _base = _interopRequireDefault(__webpack_require__(/*! ./base */ "../modules/web-cli/assets/js/modules/hooks/ui/base.js")); |
| 7149 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 7150 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 7151 | -var Catch = exports.Catch = /*#__PURE__*/function (_Base) { | |
| 9100 | +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); }; } | |
| 9101 | +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; } } | |
| 9102 | +var Catch = /*#__PURE__*/function (_Base) { | |
| 9103 | + (0, _inherits2.default)(Catch, _Base); | |
| 9104 | + var _super = _createSuper(Catch); | |
| 7152 | 9105 | function Catch() { |
| 7153 | 9106 | (0, _classCallCheck2.default)(this, Catch); |
| 7154 | - return _callSuper(this, Catch, arguments); | |
| 9107 | + return _super.apply(this, arguments); | |
| 7155 | 9108 | } |
| 7156 | - (0, _inherits2.default)(Catch, _Base); | |
| 7157 | - return (0, _createClass2.default)(Catch, [{ | |
| 9109 | + (0, _createClass2.default)(Catch, [{ | |
| 7158 | 9110 | key: "register", |
| 7159 | 9111 | value: function register() { |
| 7160 | 9112 | $e.hooks.registerUICatch(this); |
| 7161 | 9113 | } |
| 7162 | 9114 | }]); |
| 9115 | + return Catch; | |
| 7163 | 9116 | }(_base.default); |
| 7164 | -var _default = exports["default"] = Catch; | |
| 9117 | +exports.Catch = Catch; | |
| 9118 | +var _default = Catch; | |
| 9119 | +exports["default"] = _default; | |
| 7165 | 9120 | |
| 7166 | 9121 | /***/ }), |
| 7167 | 9122 | |
| 7168 | 9123 | /***/ "../modules/web-cli/assets/js/modules/hooks/ui/index.js": |
| @@ -7223,13 +9178,13 @@ | ||
| 7223 | 9178 | })); |
| 7224 | 9179 | exports["default"] = void 0; |
| 7225 | 9180 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 7226 | 9181 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 7227 | -var Console = exports["default"] = /*#__PURE__*/function () { | |
| 9182 | +var Console = /*#__PURE__*/function () { | |
| 7228 | 9183 | function Console() { |
| 7229 | 9184 | (0, _classCallCheck2.default)(this, Console); |
| 7230 | 9185 | } |
| 7231 | - return (0, _createClass2.default)(Console, null, [{ | |
| 9186 | + (0, _createClass2.default)(Console, null, [{ | |
| 7232 | 9187 | key: "error", |
| 7233 | 9188 | value: function error(message) { |
| 7234 | 9189 | // Show an error if devTools is available. |
| 7235 | 9190 | if ($e.devTools) { |
| @@ -7253,9 +9208,11 @@ | ||
| 7253 | 9208 | args.unshift('%c %c', style, ''); |
| 7254 | 9209 | (_console = console).warn.apply(_console, args); // eslint-disable-line no-console |
| 7255 | 9210 | } |
| 7256 | 9211 | }]); |
| 9212 | + return Console; | |
| 7257 | 9213 | }(); |
| 9214 | +exports["default"] = Console; | |
| 7258 | 9215 | |
| 7259 | 9216 | /***/ }), |
| 7260 | 9217 | |
| 7261 | 9218 | /***/ "../modules/web-cli/assets/js/utils/deprecation.js": |
| @@ -7299,13 +9256,13 @@ | ||
| 7299 | 9256 | message += " - Use `".concat(replacement, "` instead"); |
| 7300 | 9257 | } |
| 7301 | 9258 | _console.default.warn(message); |
| 7302 | 9259 | }; |
| 7303 | -var Deprecation = exports["default"] = /*#__PURE__*/function () { | |
| 9260 | +var Deprecation = /*#__PURE__*/function () { | |
| 7304 | 9261 | function Deprecation() { |
| 7305 | 9262 | (0, _classCallCheck2.default)(this, Deprecation); |
| 7306 | 9263 | } |
| 7307 | - return (0, _createClass2.default)(Deprecation, null, [{ | |
| 9264 | + (0, _createClass2.default)(Deprecation, null, [{ | |
| 7308 | 9265 | key: "deprecated", |
| 7309 | 9266 | value: function deprecated(name, version, replacement) { |
| 7310 | 9267 | if (this.isHardDeprecated(version)) { |
| 7311 | 9268 | hardDeprecated(name, version, replacement); |
| @@ -7400,9 +9357,11 @@ | ||
| 7400 | 9357 | var total = this.compareVersion(version, elementorWebCliConfig.version); |
| 7401 | 9358 | return total < 0 || total >= 8; |
| 7402 | 9359 | } |
| 7403 | 9360 | }]); |
| 9361 | + return Deprecation; | |
| 7404 | 9362 | }(); |
| 9363 | +exports["default"] = Deprecation; | |
| 7405 | 9364 | |
| 7406 | 9365 | /***/ }), |
| 7407 | 9366 | |
| 7408 | 9367 | /***/ "../modules/web-cli/assets/js/utils/environment.js": |
| @@ -7433,9 +9392,9 @@ | ||
| 7433 | 9392 | isSafari = /^((?!chrome|android).)*safari/i.test(userAgent) || /constructor/i.test(window.HTMLElement) || function (p) { |
| 7434 | 9393 | return '[object SafariRemoteNotification]' === p.toString(); |
| 7435 | 9394 | }(!window.safari || typeof safari !== 'undefined' && safari.pushNotification), |
| 7436 | 9395 | // Internet Explorer 6-11 |
| 7437 | - isIE = /Trident|MSIE/.test(userAgent) && (/* @cc_on!@*/ false || !!document.documentMode), | |
| 9396 | + isIE = /Trident|MSIE/.test(userAgent) && ( /* @cc_on!@*/ false || !!document.documentMode), | |
| 7438 | 9397 | // Edge 20+ |
| 7439 | 9398 | isEdge = !isIE && !!window.StyleMedia || matchUserAgent('Edg'), |
| 7440 | 9399 | // Google Chrome (Not accurate) |
| 7441 | 9400 | isChrome = !!window.chrome && matchUserAgent('Chrome') && !(isEdge || isOpera), |
| @@ -7454,9 +9413,10 @@ | ||
| 7454 | 9413 | opera: isOpera, |
| 7455 | 9414 | safari: isSafari, |
| 7456 | 9415 | webkit: matchUserAgent('AppleWebKit') |
| 7457 | 9416 | }; |
| 7458 | -var _default = exports["default"] = environment; | |
| 9417 | +var _default = environment; | |
| 9418 | +exports["default"] = _default; | |
| 7459 | 9419 | |
| 7460 | 9420 | /***/ }), |
| 7461 | 9421 | |
| 7462 | 9422 | /***/ "../modules/web-cli/assets/js/utils/force-method-implementation.js": |
| @@ -7474,28 +9434,31 @@ | ||
| 7474 | 9434 | })); |
| 7475 | 9435 | exports["default"] = exports.ForceMethodImplementation = void 0; |
| 7476 | 9436 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 7477 | 9437 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 9438 | +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js")); | |
| 9439 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 7478 | 9440 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 7479 | 9441 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 7480 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 7481 | 9442 | var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js")); |
| 7482 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 7483 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 9443 | +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); }; } | |
| 9444 | +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; } } | |
| 7484 | 9445 | // TODO: Copied from `assets/dev/js/modules/imports/force-method-implementation.js`; |
| 7485 | -var ForceMethodImplementation = exports.ForceMethodImplementation = /*#__PURE__*/function (_Error) { | |
| 9446 | +var ForceMethodImplementation = /*#__PURE__*/function (_Error) { | |
| 9447 | + (0, _inherits2.default)(ForceMethodImplementation, _Error); | |
| 9448 | + var _super = _createSuper(ForceMethodImplementation); | |
| 7486 | 9449 | function ForceMethodImplementation() { |
| 7487 | 9450 | var _this; |
| 7488 | 9451 | var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 7489 | 9452 | (0, _classCallCheck2.default)(this, ForceMethodImplementation); |
| 7490 | - _this = _callSuper(this, ForceMethodImplementation, ["".concat(info.isStatic ? 'static ' : '').concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality.")]); | |
| 7491 | - Error.captureStackTrace(_this, ForceMethodImplementation); | |
| 9453 | + _this = _super.call(this, "".concat(info.isStatic ? 'static ' : '').concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality.")); | |
| 9454 | + Error.captureStackTrace((0, _assertThisInitialized2.default)(_this), ForceMethodImplementation); | |
| 7492 | 9455 | return _this; |
| 7493 | 9456 | } |
| 7494 | - (0, _inherits2.default)(ForceMethodImplementation, _Error); | |
| 7495 | 9457 | return (0, _createClass2.default)(ForceMethodImplementation); |
| 7496 | -}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 7497 | -var _default = exports["default"] = function _default() { | |
| 9458 | +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 9459 | +exports.ForceMethodImplementation = ForceMethodImplementation; | |
| 9460 | +var _default = function _default() { | |
| 7498 | 9461 | var stack = Error().stack, |
| 7499 | 9462 | caller = stack.split('\n')[2].trim(), |
| 7500 | 9463 | callerName = caller.startsWith('at new') ? 'constructor' : caller.split(' ')[1], |
| 7501 | 9464 | info = {}; |
| @@ -7509,24 +9472,1108 @@ | ||
| 7509 | 9472 | info.isStatic = true; |
| 7510 | 9473 | } |
| 7511 | 9474 | throw new ForceMethodImplementation(info); |
| 7512 | 9475 | }; |
| 9476 | +exports["default"] = _default; | |
| 7513 | 9477 | |
| 7514 | 9478 | /***/ }), |
| 7515 | 9479 | |
| 7516 | -/***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js": | |
| 7517 | -/*!***************************************************************!*\ | |
| 7518 | - !*** ../node_modules/@babel/runtime/helpers/OverloadYield.js ***! | |
| 7519 | - \***************************************************************/ | |
| 7520 | -/***/ ((module) => { | |
| 9480 | +/***/ "../node_modules/redux-thunk/es/index.js": | |
| 9481 | +/*!***********************************************!*\ | |
| 9482 | + !*** ../node_modules/redux-thunk/es/index.js ***! | |
| 9483 | + \***********************************************/ | |
| 9484 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 7521 | 9485 | |
| 7522 | -function _OverloadYield(e, d) { | |
| 7523 | - this.v = e, this.k = d; | |
| 9486 | +"use strict"; | |
| 9487 | +__webpack_require__.r(__webpack_exports__); | |
| 9488 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 9489 | +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 9490 | +/* harmony export */ }); | |
| 9491 | +/** A function that accepts a potential "extra argument" value to be injected later, | |
| 9492 | + * and returns an instance of the thunk middleware that uses that value | |
| 9493 | + */ | |
| 9494 | +function createThunkMiddleware(extraArgument) { | |
| 9495 | + // Standard Redux middleware definition pattern: | |
| 9496 | + // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware | |
| 9497 | + var middleware = function middleware(_ref) { | |
| 9498 | + var dispatch = _ref.dispatch, | |
| 9499 | + getState = _ref.getState; | |
| 9500 | + return function (next) { | |
| 9501 | + return function (action) { | |
| 9502 | + // The thunk middleware looks for any functions that were passed to `store.dispatch`. | |
| 9503 | + // If this "action" is really a function, call it and return the result. | |
| 9504 | + if (typeof action === 'function') { | |
| 9505 | + // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg" | |
| 9506 | + return action(dispatch, getState, extraArgument); | |
| 9507 | + } // Otherwise, pass the action down the middleware chain as usual | |
| 9508 | + | |
| 9509 | + | |
| 9510 | + return next(action); | |
| 9511 | + }; | |
| 9512 | + }; | |
| 9513 | + }; | |
| 9514 | + | |
| 9515 | + return middleware; | |
| 7524 | 9516 | } |
| 7525 | -module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 7526 | 9517 | |
| 9518 | +var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version | |
| 9519 | +// with whatever "extra arg" they want to inject into their thunks | |
| 9520 | + | |
| 9521 | +thunk.withExtraArgument = createThunkMiddleware; | |
| 9522 | +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (thunk); | |
| 9523 | + | |
| 7527 | 9524 | /***/ }), |
| 7528 | 9525 | |
| 9526 | +/***/ "../node_modules/redux/es/redux.js": | |
| 9527 | +/*!*****************************************!*\ | |
| 9528 | + !*** ../node_modules/redux/es/redux.js ***! | |
| 9529 | + \*****************************************/ | |
| 9530 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 9531 | + | |
| 9532 | +"use strict"; | |
| 9533 | +__webpack_require__.r(__webpack_exports__); | |
| 9534 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 9535 | +/* harmony export */ "__DO_NOT_USE__ActionTypes": () => (/* binding */ ActionTypes), | |
| 9536 | +/* harmony export */ "applyMiddleware": () => (/* binding */ applyMiddleware), | |
| 9537 | +/* harmony export */ "bindActionCreators": () => (/* binding */ bindActionCreators), | |
| 9538 | +/* harmony export */ "combineReducers": () => (/* binding */ combineReducers), | |
| 9539 | +/* harmony export */ "compose": () => (/* binding */ compose), | |
| 9540 | +/* harmony export */ "createStore": () => (/* binding */ createStore), | |
| 9541 | +/* harmony export */ "legacy_createStore": () => (/* binding */ legacy_createStore) | |
| 9542 | +/* harmony export */ }); | |
| 9543 | +/* 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"); | |
| 9544 | + | |
| 9545 | + | |
| 9546 | +/** | |
| 9547 | + * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js | |
| 9548 | + * | |
| 9549 | + * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes | |
| 9550 | + * during build. | |
| 9551 | + * @param {number} code | |
| 9552 | + */ | |
| 9553 | +function formatProdErrorMessage(code) { | |
| 9554 | + 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. '; | |
| 9555 | +} | |
| 9556 | + | |
| 9557 | +// Inlined version of the `symbol-observable` polyfill | |
| 9558 | +var $$observable = (function () { | |
| 9559 | + return typeof Symbol === 'function' && Symbol.observable || '@@observable'; | |
| 9560 | +})(); | |
| 9561 | + | |
| 9562 | +/** | |
| 9563 | + * These are private action types reserved by Redux. | |
| 9564 | + * For any unknown actions, you must return the current state. | |
| 9565 | + * If the current state is undefined, you must return the initial state. | |
| 9566 | + * Do not reference these action types directly in your code. | |
| 9567 | + */ | |
| 9568 | +var randomString = function randomString() { | |
| 9569 | + return Math.random().toString(36).substring(7).split('').join('.'); | |
| 9570 | +}; | |
| 9571 | + | |
| 9572 | +var ActionTypes = { | |
| 9573 | + INIT: "@@redux/INIT" + randomString(), | |
| 9574 | + REPLACE: "@@redux/REPLACE" + randomString(), | |
| 9575 | + PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { | |
| 9576 | + return "@@redux/PROBE_UNKNOWN_ACTION" + randomString(); | |
| 9577 | + } | |
| 9578 | +}; | |
| 9579 | + | |
| 9580 | +/** | |
| 9581 | + * @param {any} obj The object to inspect. | |
| 9582 | + * @returns {boolean} True if the argument appears to be a plain object. | |
| 9583 | + */ | |
| 9584 | +function isPlainObject(obj) { | |
| 9585 | + if (typeof obj !== 'object' || obj === null) return false; | |
| 9586 | + var proto = obj; | |
| 9587 | + | |
| 9588 | + while (Object.getPrototypeOf(proto) !== null) { | |
| 9589 | + proto = Object.getPrototypeOf(proto); | |
| 9590 | + } | |
| 9591 | + | |
| 9592 | + return Object.getPrototypeOf(obj) === proto; | |
| 9593 | +} | |
| 9594 | + | |
| 9595 | +// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of | |
| 9596 | +function miniKindOf(val) { | |
| 9597 | + if (val === void 0) return 'undefined'; | |
| 9598 | + if (val === null) return 'null'; | |
| 9599 | + var type = typeof val; | |
| 9600 | + | |
| 9601 | + switch (type) { | |
| 9602 | + case 'boolean': | |
| 9603 | + case 'string': | |
| 9604 | + case 'number': | |
| 9605 | + case 'symbol': | |
| 9606 | + case 'function': | |
| 9607 | + { | |
| 9608 | + return type; | |
| 9609 | + } | |
| 9610 | + } | |
| 9611 | + | |
| 9612 | + if (Array.isArray(val)) return 'array'; | |
| 9613 | + if (isDate(val)) return 'date'; | |
| 9614 | + if (isError(val)) return 'error'; | |
| 9615 | + var constructorName = ctorName(val); | |
| 9616 | + | |
| 9617 | + switch (constructorName) { | |
| 9618 | + case 'Symbol': | |
| 9619 | + case 'Promise': | |
| 9620 | + case 'WeakMap': | |
| 9621 | + case 'WeakSet': | |
| 9622 | + case 'Map': | |
| 9623 | + case 'Set': | |
| 9624 | + return constructorName; | |
| 9625 | + } // other | |
| 9626 | + | |
| 9627 | + | |
| 9628 | + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); | |
| 9629 | +} | |
| 9630 | + | |
| 9631 | +function ctorName(val) { | |
| 9632 | + return typeof val.constructor === 'function' ? val.constructor.name : null; | |
| 9633 | +} | |
| 9634 | + | |
| 9635 | +function isError(val) { | |
| 9636 | + return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'; | |
| 9637 | +} | |
| 9638 | + | |
| 9639 | +function isDate(val) { | |
| 9640 | + if (val instanceof Date) return true; | |
| 9641 | + return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function'; | |
| 9642 | +} | |
| 9643 | + | |
| 9644 | +function kindOf(val) { | |
| 9645 | + var typeOfVal = typeof val; | |
| 9646 | + | |
| 9647 | + if (true) { | |
| 9648 | + typeOfVal = miniKindOf(val); | |
| 9649 | + } | |
| 9650 | + | |
| 9651 | + return typeOfVal; | |
| 9652 | +} | |
| 9653 | + | |
| 9654 | +/** | |
| 9655 | + * @deprecated | |
| 9656 | + * | |
| 9657 | + * **We recommend using the `configureStore` method | |
| 9658 | + * of the `@reduxjs/toolkit` package**, which replaces `createStore`. | |
| 9659 | + * | |
| 9660 | + * Redux Toolkit is our recommended approach for writing Redux logic today, | |
| 9661 | + * including store setup, reducers, data fetching, and more. | |
| 9662 | + * | |
| 9663 | + * **For more details, please read this Redux docs page:** | |
| 9664 | + * **https://redux.js.org/introduction/why-rtk-is-redux-today** | |
| 9665 | + * | |
| 9666 | + * `configureStore` from Redux Toolkit is an improved version of `createStore` that | |
| 9667 | + * simplifies setup and helps avoid common bugs. | |
| 9668 | + * | |
| 9669 | + * You should not be using the `redux` core package by itself today, except for learning purposes. | |
| 9670 | + * The `createStore` method from the core `redux` package will not be removed, but we encourage | |
| 9671 | + * all users to migrate to using Redux Toolkit for all Redux code. | |
| 9672 | + * | |
| 9673 | + * If you want to use `createStore` without this visual deprecation warning, use | |
| 9674 | + * the `legacy_createStore` import instead: | |
| 9675 | + * | |
| 9676 | + * `import { legacy_createStore as createStore} from 'redux'` | |
| 9677 | + * | |
| 9678 | + */ | |
| 9679 | + | |
| 9680 | +function createStore(reducer, preloadedState, enhancer) { | |
| 9681 | + var _ref2; | |
| 9682 | + | |
| 9683 | + if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') { | |
| 9684 | + 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.'); | |
| 9685 | + } | |
| 9686 | + | |
| 9687 | + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { | |
| 9688 | + enhancer = preloadedState; | |
| 9689 | + preloadedState = undefined; | |
| 9690 | + } | |
| 9691 | + | |
| 9692 | + if (typeof enhancer !== 'undefined') { | |
| 9693 | + if (typeof enhancer !== 'function') { | |
| 9694 | + throw new Error( false ? 0 : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'"); | |
| 9695 | + } | |
| 9696 | + | |
| 9697 | + return enhancer(createStore)(reducer, preloadedState); | |
| 9698 | + } | |
| 9699 | + | |
| 9700 | + if (typeof reducer !== 'function') { | |
| 9701 | + throw new Error( false ? 0 : "Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'"); | |
| 9702 | + } | |
| 9703 | + | |
| 9704 | + var currentReducer = reducer; | |
| 9705 | + var currentState = preloadedState; | |
| 9706 | + var currentListeners = []; | |
| 9707 | + var nextListeners = currentListeners; | |
| 9708 | + var isDispatching = false; | |
| 9709 | + /** | |
| 9710 | + * This makes a shallow copy of currentListeners so we can use | |
| 9711 | + * nextListeners as a temporary list while dispatching. | |
| 9712 | + * | |
| 9713 | + * This prevents any bugs around consumers calling | |
| 9714 | + * subscribe/unsubscribe in the middle of a dispatch. | |
| 9715 | + */ | |
| 9716 | + | |
| 9717 | + function ensureCanMutateNextListeners() { | |
| 9718 | + if (nextListeners === currentListeners) { | |
| 9719 | + nextListeners = currentListeners.slice(); | |
| 9720 | + } | |
| 9721 | + } | |
| 9722 | + /** | |
| 9723 | + * Reads the state tree managed by the store. | |
| 9724 | + * | |
| 9725 | + * @returns {any} The current state tree of your application. | |
| 9726 | + */ | |
| 9727 | + | |
| 9728 | + | |
| 9729 | + function getState() { | |
| 9730 | + if (isDispatching) { | |
| 9731 | + 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.'); | |
| 9732 | + } | |
| 9733 | + | |
| 9734 | + return currentState; | |
| 9735 | + } | |
| 9736 | + /** | |
| 9737 | + * Adds a change listener. It will be called any time an action is dispatched, | |
| 9738 | + * and some part of the state tree may potentially have changed. You may then | |
| 9739 | + * call `getState()` to read the current state tree inside the callback. | |
| 9740 | + * | |
| 9741 | + * You may call `dispatch()` from a change listener, with the following | |
| 9742 | + * caveats: | |
| 9743 | + * | |
| 9744 | + * 1. The subscriptions are snapshotted just before every `dispatch()` call. | |
| 9745 | + * If you subscribe or unsubscribe while the listeners are being invoked, this | |
| 9746 | + * will not have any effect on the `dispatch()` that is currently in progress. | |
| 9747 | + * However, the next `dispatch()` call, whether nested or not, will use a more | |
| 9748 | + * recent snapshot of the subscription list. | |
| 9749 | + * | |
| 9750 | + * 2. The listener should not expect to see all state changes, as the state | |
| 9751 | + * might have been updated multiple times during a nested `dispatch()` before | |
| 9752 | + * the listener is called. It is, however, guaranteed that all subscribers | |
| 9753 | + * registered before the `dispatch()` started will be called with the latest | |
| 9754 | + * state by the time it exits. | |
| 9755 | + * | |
| 9756 | + * @param {Function} listener A callback to be invoked on every dispatch. | |
| 9757 | + * @returns {Function} A function to remove this change listener. | |
| 9758 | + */ | |
| 9759 | + | |
| 9760 | + | |
| 9761 | + function subscribe(listener) { | |
| 9762 | + if (typeof listener !== 'function') { | |
| 9763 | + throw new Error( false ? 0 : "Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'"); | |
| 9764 | + } | |
| 9765 | + | |
| 9766 | + if (isDispatching) { | |
| 9767 | + 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.'); | |
| 9768 | + } | |
| 9769 | + | |
| 9770 | + var isSubscribed = true; | |
| 9771 | + ensureCanMutateNextListeners(); | |
| 9772 | + nextListeners.push(listener); | |
| 9773 | + return function unsubscribe() { | |
| 9774 | + if (!isSubscribed) { | |
| 9775 | + return; | |
| 9776 | + } | |
| 9777 | + | |
| 9778 | + if (isDispatching) { | |
| 9779 | + 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.'); | |
| 9780 | + } | |
| 9781 | + | |
| 9782 | + isSubscribed = false; | |
| 9783 | + ensureCanMutateNextListeners(); | |
| 9784 | + var index = nextListeners.indexOf(listener); | |
| 9785 | + nextListeners.splice(index, 1); | |
| 9786 | + currentListeners = null; | |
| 9787 | + }; | |
| 9788 | + } | |
| 9789 | + /** | |
| 9790 | + * Dispatches an action. It is the only way to trigger a state change. | |
| 9791 | + * | |
| 9792 | + * The `reducer` function, used to create the store, will be called with the | |
| 9793 | + * current state tree and the given `action`. Its return value will | |
| 9794 | + * be considered the **next** state of the tree, and the change listeners | |
| 9795 | + * will be notified. | |
| 9796 | + * | |
| 9797 | + * The base implementation only supports plain object actions. If you want to | |
| 9798 | + * dispatch a Promise, an Observable, a thunk, or something else, you need to | |
| 9799 | + * wrap your store creating function into the corresponding middleware. For | |
| 9800 | + * example, see the documentation for the `redux-thunk` package. Even the | |
| 9801 | + * middleware will eventually dispatch plain object actions using this method. | |
| 9802 | + * | |
| 9803 | + * @param {Object} action A plain object representing “what changed”. It is | |
| 9804 | + * a good idea to keep actions serializable so you can record and replay user | |
| 9805 | + * sessions, or use the time travelling `redux-devtools`. An action must have | |
| 9806 | + * a `type` property which may not be `undefined`. It is a good idea to use | |
| 9807 | + * string constants for action types. | |
| 9808 | + * | |
| 9809 | + * @returns {Object} For convenience, the same action object you dispatched. | |
| 9810 | + * | |
| 9811 | + * Note that, if you use a custom middleware, it may wrap `dispatch()` to | |
| 9812 | + * return something else (for example, a Promise you can await). | |
| 9813 | + */ | |
| 9814 | + | |
| 9815 | + | |
| 9816 | + function dispatch(action) { | |
| 9817 | + if (!isPlainObject(action)) { | |
| 9818 | + 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."); | |
| 9819 | + } | |
| 9820 | + | |
| 9821 | + if (typeof action.type === 'undefined') { | |
| 9822 | + throw new Error( false ? 0 : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.'); | |
| 9823 | + } | |
| 9824 | + | |
| 9825 | + if (isDispatching) { | |
| 9826 | + throw new Error( false ? 0 : 'Reducers may not dispatch actions.'); | |
| 9827 | + } | |
| 9828 | + | |
| 9829 | + try { | |
| 9830 | + isDispatching = true; | |
| 9831 | + currentState = currentReducer(currentState, action); | |
| 9832 | + } finally { | |
| 9833 | + isDispatching = false; | |
| 9834 | + } | |
| 9835 | + | |
| 9836 | + var listeners = currentListeners = nextListeners; | |
| 9837 | + | |
| 9838 | + for (var i = 0; i < listeners.length; i++) { | |
| 9839 | + var listener = listeners[i]; | |
| 9840 | + listener(); | |
| 9841 | + } | |
| 9842 | + | |
| 9843 | + return action; | |
| 9844 | + } | |
| 9845 | + /** | |
| 9846 | + * Replaces the reducer currently used by the store to calculate the state. | |
| 9847 | + * | |
| 9848 | + * You might need this if your app implements code splitting and you want to | |
| 9849 | + * load some of the reducers dynamically. You might also need this if you | |
| 9850 | + * implement a hot reloading mechanism for Redux. | |
| 9851 | + * | |
| 9852 | + * @param {Function} nextReducer The reducer for the store to use instead. | |
| 9853 | + * @returns {void} | |
| 9854 | + */ | |
| 9855 | + | |
| 9856 | + | |
| 9857 | + function replaceReducer(nextReducer) { | |
| 9858 | + if (typeof nextReducer !== 'function') { | |
| 9859 | + throw new Error( false ? 0 : "Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer)); | |
| 9860 | + } | |
| 9861 | + | |
| 9862 | + currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT. | |
| 9863 | + // Any reducers that existed in both the new and old rootReducer | |
| 9864 | + // will receive the previous state. This effectively populates | |
| 9865 | + // the new state tree with any relevant data from the old one. | |
| 9866 | + | |
| 9867 | + dispatch({ | |
| 9868 | + type: ActionTypes.REPLACE | |
| 9869 | + }); | |
| 9870 | + } | |
| 9871 | + /** | |
| 9872 | + * Interoperability point for observable/reactive libraries. | |
| 9873 | + * @returns {observable} A minimal observable of state changes. | |
| 9874 | + * For more information, see the observable proposal: | |
| 9875 | + * https://github.com/tc39/proposal-observable | |
| 9876 | + */ | |
| 9877 | + | |
| 9878 | + | |
| 9879 | + function observable() { | |
| 9880 | + var _ref; | |
| 9881 | + | |
| 9882 | + var outerSubscribe = subscribe; | |
| 9883 | + return _ref = { | |
| 9884 | + /** | |
| 9885 | + * The minimal observable subscription method. | |
| 9886 | + * @param {Object} observer Any object that can be used as an observer. | |
| 9887 | + * The observer object should have a `next` method. | |
| 9888 | + * @returns {subscription} An object with an `unsubscribe` method that can | |
| 9889 | + * be used to unsubscribe the observable from the store, and prevent further | |
| 9890 | + * emission of values from the observable. | |
| 9891 | + */ | |
| 9892 | + subscribe: function subscribe(observer) { | |
| 9893 | + if (typeof observer !== 'object' || observer === null) { | |
| 9894 | + throw new Error( false ? 0 : "Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'"); | |
| 9895 | + } | |
| 9896 | + | |
| 9897 | + function observeState() { | |
| 9898 | + if (observer.next) { | |
| 9899 | + observer.next(getState()); | |
| 9900 | + } | |
| 9901 | + } | |
| 9902 | + | |
| 9903 | + observeState(); | |
| 9904 | + var unsubscribe = outerSubscribe(observeState); | |
| 9905 | + return { | |
| 9906 | + unsubscribe: unsubscribe | |
| 9907 | + }; | |
| 9908 | + } | |
| 9909 | + }, _ref[$$observable] = function () { | |
| 9910 | + return this; | |
| 9911 | + }, _ref; | |
| 9912 | + } // When a store is created, an "INIT" action is dispatched so that every | |
| 9913 | + // reducer returns their initial state. This effectively populates | |
| 9914 | + // the initial state tree. | |
| 9915 | + | |
| 9916 | + | |
| 9917 | + dispatch({ | |
| 9918 | + type: ActionTypes.INIT | |
| 9919 | + }); | |
| 9920 | + return _ref2 = { | |
| 9921 | + dispatch: dispatch, | |
| 9922 | + subscribe: subscribe, | |
| 9923 | + getState: getState, | |
| 9924 | + replaceReducer: replaceReducer | |
| 9925 | + }, _ref2[$$observable] = observable, _ref2; | |
| 9926 | +} | |
| 9927 | +/** | |
| 9928 | + * Creates a Redux store that holds the state tree. | |
| 9929 | + * | |
| 9930 | + * **We recommend using `configureStore` from the | |
| 9931 | + * `@reduxjs/toolkit` package**, which replaces `createStore`: | |
| 9932 | + * **https://redux.js.org/introduction/why-rtk-is-redux-today** | |
| 9933 | + * | |
| 9934 | + * The only way to change the data in the store is to call `dispatch()` on it. | |
| 9935 | + * | |
| 9936 | + * There should only be a single store in your app. To specify how different | |
| 9937 | + * parts of the state tree respond to actions, you may combine several reducers | |
| 9938 | + * into a single reducer function by using `combineReducers`. | |
| 9939 | + * | |
| 9940 | + * @param {Function} reducer A function that returns the next state tree, given | |
| 9941 | + * the current state tree and the action to handle. | |
| 9942 | + * | |
| 9943 | + * @param {any} [preloadedState] The initial state. You may optionally specify it | |
| 9944 | + * to hydrate the state from the server in universal apps, or to restore a | |
| 9945 | + * previously serialized user session. | |
| 9946 | + * If you use `combineReducers` to produce the root reducer function, this must be | |
| 9947 | + * an object with the same shape as `combineReducers` keys. | |
| 9948 | + * | |
| 9949 | + * @param {Function} [enhancer] The store enhancer. You may optionally specify it | |
| 9950 | + * to enhance the store with third-party capabilities such as middleware, | |
| 9951 | + * time travel, persistence, etc. The only store enhancer that ships with Redux | |
| 9952 | + * is `applyMiddleware()`. | |
| 9953 | + * | |
| 9954 | + * @returns {Store} A Redux store that lets you read the state, dispatch actions | |
| 9955 | + * and subscribe to changes. | |
| 9956 | + */ | |
| 9957 | + | |
| 9958 | +var legacy_createStore = createStore; | |
| 9959 | + | |
| 9960 | +/** | |
| 9961 | + * Prints a warning in the console if it exists. | |
| 9962 | + * | |
| 9963 | + * @param {String} message The warning message. | |
| 9964 | + * @returns {void} | |
| 9965 | + */ | |
| 9966 | +function warning(message) { | |
| 9967 | + /* eslint-disable no-console */ | |
| 9968 | + if (typeof console !== 'undefined' && typeof console.error === 'function') { | |
| 9969 | + console.error(message); | |
| 9970 | + } | |
| 9971 | + /* eslint-enable no-console */ | |
| 9972 | + | |
| 9973 | + | |
| 9974 | + try { | |
| 9975 | + // This error was thrown as a convenience so that if you enable | |
| 9976 | + // "break on all exceptions" in your console, | |
| 9977 | + // it would pause the execution at this line. | |
| 9978 | + throw new Error(message); | |
| 9979 | + } catch (e) {} // eslint-disable-line no-empty | |
| 9980 | + | |
| 9981 | +} | |
| 9982 | + | |
| 9983 | +function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { | |
| 9984 | + var reducerKeys = Object.keys(reducers); | |
| 9985 | + var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; | |
| 9986 | + | |
| 9987 | + if (reducerKeys.length === 0) { | |
| 9988 | + return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; | |
| 9989 | + } | |
| 9990 | + | |
| 9991 | + if (!isPlainObject(inputState)) { | |
| 9992 | + return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\""); | |
| 9993 | + } | |
| 9994 | + | |
| 9995 | + var unexpectedKeys = Object.keys(inputState).filter(function (key) { | |
| 9996 | + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; | |
| 9997 | + }); | |
| 9998 | + unexpectedKeys.forEach(function (key) { | |
| 9999 | + unexpectedKeyCache[key] = true; | |
| 10000 | + }); | |
| 10001 | + if (action && action.type === ActionTypes.REPLACE) return; | |
| 10002 | + | |
| 10003 | + if (unexpectedKeys.length > 0) { | |
| 10004 | + 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."); | |
| 10005 | + } | |
| 10006 | +} | |
| 10007 | + | |
| 10008 | +function assertReducerShape(reducers) { | |
| 10009 | + Object.keys(reducers).forEach(function (key) { | |
| 10010 | + var reducer = reducers[key]; | |
| 10011 | + var initialState = reducer(undefined, { | |
| 10012 | + type: ActionTypes.INIT | |
| 10013 | + }); | |
| 10014 | + | |
| 10015 | + if (typeof initialState === 'undefined') { | |
| 10016 | + 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."); | |
| 10017 | + } | |
| 10018 | + | |
| 10019 | + if (typeof reducer(undefined, { | |
| 10020 | + type: ActionTypes.PROBE_UNKNOWN_ACTION() | |
| 10021 | + }) === 'undefined') { | |
| 10022 | + 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."); | |
| 10023 | + } | |
| 10024 | + }); | |
| 10025 | +} | |
| 10026 | +/** | |
| 10027 | + * Turns an object whose values are different reducer functions, into a single | |
| 10028 | + * reducer function. It will call every child reducer, and gather their results | |
| 10029 | + * into a single state object, whose keys correspond to the keys of the passed | |
| 10030 | + * reducer functions. | |
| 10031 | + * | |
| 10032 | + * @param {Object} reducers An object whose values correspond to different | |
| 10033 | + * reducer functions that need to be combined into one. One handy way to obtain | |
| 10034 | + * it is to use ES6 `import * as reducers` syntax. The reducers may never return | |
| 10035 | + * undefined for any action. Instead, they should return their initial state | |
| 10036 | + * if the state passed to them was undefined, and the current state for any | |
| 10037 | + * unrecognized action. | |
| 10038 | + * | |
| 10039 | + * @returns {Function} A reducer function that invokes every reducer inside the | |
| 10040 | + * passed object, and builds a state object with the same shape. | |
| 10041 | + */ | |
| 10042 | + | |
| 10043 | + | |
| 10044 | +function combineReducers(reducers) { | |
| 10045 | + var reducerKeys = Object.keys(reducers); | |
| 10046 | + var finalReducers = {}; | |
| 10047 | + | |
| 10048 | + for (var i = 0; i < reducerKeys.length; i++) { | |
| 10049 | + var key = reducerKeys[i]; | |
| 10050 | + | |
| 10051 | + if (true) { | |
| 10052 | + if (typeof reducers[key] === 'undefined') { | |
| 10053 | + warning("No reducer provided for key \"" + key + "\""); | |
| 10054 | + } | |
| 10055 | + } | |
| 10056 | + | |
| 10057 | + if (typeof reducers[key] === 'function') { | |
| 10058 | + finalReducers[key] = reducers[key]; | |
| 10059 | + } | |
| 10060 | + } | |
| 10061 | + | |
| 10062 | + var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same | |
| 10063 | + // keys multiple times. | |
| 10064 | + | |
| 10065 | + var unexpectedKeyCache; | |
| 10066 | + | |
| 10067 | + if (true) { | |
| 10068 | + unexpectedKeyCache = {}; | |
| 10069 | + } | |
| 10070 | + | |
| 10071 | + var shapeAssertionError; | |
| 10072 | + | |
| 10073 | + try { | |
| 10074 | + assertReducerShape(finalReducers); | |
| 10075 | + } catch (e) { | |
| 10076 | + shapeAssertionError = e; | |
| 10077 | + } | |
| 10078 | + | |
| 10079 | + return function combination(state, action) { | |
| 10080 | + if (state === void 0) { | |
| 10081 | + state = {}; | |
| 10082 | + } | |
| 10083 | + | |
| 10084 | + if (shapeAssertionError) { | |
| 10085 | + throw shapeAssertionError; | |
| 10086 | + } | |
| 10087 | + | |
| 10088 | + if (true) { | |
| 10089 | + var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); | |
| 10090 | + | |
| 10091 | + if (warningMessage) { | |
| 10092 | + warning(warningMessage); | |
| 10093 | + } | |
| 10094 | + } | |
| 10095 | + | |
| 10096 | + var hasChanged = false; | |
| 10097 | + var nextState = {}; | |
| 10098 | + | |
| 10099 | + for (var _i = 0; _i < finalReducerKeys.length; _i++) { | |
| 10100 | + var _key = finalReducerKeys[_i]; | |
| 10101 | + var reducer = finalReducers[_key]; | |
| 10102 | + var previousStateForKey = state[_key]; | |
| 10103 | + var nextStateForKey = reducer(previousStateForKey, action); | |
| 10104 | + | |
| 10105 | + if (typeof nextStateForKey === 'undefined') { | |
| 10106 | + var actionType = action && action.type; | |
| 10107 | + 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."); | |
| 10108 | + } | |
| 10109 | + | |
| 10110 | + nextState[_key] = nextStateForKey; | |
| 10111 | + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; | |
| 10112 | + } | |
| 10113 | + | |
| 10114 | + hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length; | |
| 10115 | + return hasChanged ? nextState : state; | |
| 10116 | + }; | |
| 10117 | +} | |
| 10118 | + | |
| 10119 | +function bindActionCreator(actionCreator, dispatch) { | |
| 10120 | + return function () { | |
| 10121 | + return dispatch(actionCreator.apply(this, arguments)); | |
| 10122 | + }; | |
| 10123 | +} | |
| 10124 | +/** | |
| 10125 | + * Turns an object whose values are action creators, into an object with the | |
| 10126 | + * same keys, but with every function wrapped into a `dispatch` call so they | |
| 10127 | + * may be invoked directly. This is just a convenience method, as you can call | |
| 10128 | + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. | |
| 10129 | + * | |
| 10130 | + * For convenience, you can also pass an action creator as the first argument, | |
| 10131 | + * and get a dispatch wrapped function in return. | |
| 10132 | + * | |
| 10133 | + * @param {Function|Object} actionCreators An object whose values are action | |
| 10134 | + * creator functions. One handy way to obtain it is to use ES6 `import * as` | |
| 10135 | + * syntax. You may also pass a single function. | |
| 10136 | + * | |
| 10137 | + * @param {Function} dispatch The `dispatch` function available on your Redux | |
| 10138 | + * store. | |
| 10139 | + * | |
| 10140 | + * @returns {Function|Object} The object mimicking the original object, but with | |
| 10141 | + * every action creator wrapped into the `dispatch` call. If you passed a | |
| 10142 | + * function as `actionCreators`, the return value will also be a single | |
| 10143 | + * function. | |
| 10144 | + */ | |
| 10145 | + | |
| 10146 | + | |
| 10147 | +function bindActionCreators(actionCreators, dispatch) { | |
| 10148 | + if (typeof actionCreators === 'function') { | |
| 10149 | + return bindActionCreator(actionCreators, dispatch); | |
| 10150 | + } | |
| 10151 | + | |
| 10152 | + if (typeof actionCreators !== 'object' || actionCreators === null) { | |
| 10153 | + 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\"?"); | |
| 10154 | + } | |
| 10155 | + | |
| 10156 | + var boundActionCreators = {}; | |
| 10157 | + | |
| 10158 | + for (var key in actionCreators) { | |
| 10159 | + var actionCreator = actionCreators[key]; | |
| 10160 | + | |
| 10161 | + if (typeof actionCreator === 'function') { | |
| 10162 | + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); | |
| 10163 | + } | |
| 10164 | + } | |
| 10165 | + | |
| 10166 | + return boundActionCreators; | |
| 10167 | +} | |
| 10168 | + | |
| 10169 | +/** | |
| 10170 | + * Composes single-argument functions from right to left. The rightmost | |
| 10171 | + * function can take multiple arguments as it provides the signature for | |
| 10172 | + * the resulting composite function. | |
| 10173 | + * | |
| 10174 | + * @param {...Function} funcs The functions to compose. | |
| 10175 | + * @returns {Function} A function obtained by composing the argument functions | |
| 10176 | + * from right to left. For example, compose(f, g, h) is identical to doing | |
| 10177 | + * (...args) => f(g(h(...args))). | |
| 10178 | + */ | |
| 10179 | +function compose() { | |
| 10180 | + for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 10181 | + funcs[_key] = arguments[_key]; | |
| 10182 | + } | |
| 10183 | + | |
| 10184 | + if (funcs.length === 0) { | |
| 10185 | + return function (arg) { | |
| 10186 | + return arg; | |
| 10187 | + }; | |
| 10188 | + } | |
| 10189 | + | |
| 10190 | + if (funcs.length === 1) { | |
| 10191 | + return funcs[0]; | |
| 10192 | + } | |
| 10193 | + | |
| 10194 | + return funcs.reduce(function (a, b) { | |
| 10195 | + return function () { | |
| 10196 | + return a(b.apply(void 0, arguments)); | |
| 10197 | + }; | |
| 10198 | + }); | |
| 10199 | +} | |
| 10200 | + | |
| 10201 | +/** | |
| 10202 | + * Creates a store enhancer that applies middleware to the dispatch method | |
| 10203 | + * of the Redux store. This is handy for a variety of tasks, such as expressing | |
| 10204 | + * asynchronous actions in a concise manner, or logging every action payload. | |
| 10205 | + * | |
| 10206 | + * See `redux-thunk` package as an example of the Redux middleware. | |
| 10207 | + * | |
| 10208 | + * Because middleware is potentially asynchronous, this should be the first | |
| 10209 | + * store enhancer in the composition chain. | |
| 10210 | + * | |
| 10211 | + * Note that each middleware will be given the `dispatch` and `getState` functions | |
| 10212 | + * as named arguments. | |
| 10213 | + * | |
| 10214 | + * @param {...Function} middlewares The middleware chain to be applied. | |
| 10215 | + * @returns {Function} A store enhancer applying the middleware. | |
| 10216 | + */ | |
| 10217 | + | |
| 10218 | +function applyMiddleware() { | |
| 10219 | + for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 10220 | + middlewares[_key] = arguments[_key]; | |
| 10221 | + } | |
| 10222 | + | |
| 10223 | + return function (createStore) { | |
| 10224 | + return function () { | |
| 10225 | + var store = createStore.apply(void 0, arguments); | |
| 10226 | + | |
| 10227 | + var _dispatch = function dispatch() { | |
| 10228 | + throw new Error( false ? 0 : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.'); | |
| 10229 | + }; | |
| 10230 | + | |
| 10231 | + var middlewareAPI = { | |
| 10232 | + getState: store.getState, | |
| 10233 | + dispatch: function dispatch() { | |
| 10234 | + return _dispatch.apply(void 0, arguments); | |
| 10235 | + } | |
| 10236 | + }; | |
| 10237 | + var chain = middlewares.map(function (middleware) { | |
| 10238 | + return middleware(middlewareAPI); | |
| 10239 | + }); | |
| 10240 | + _dispatch = compose.apply(void 0, chain)(store.dispatch); | |
| 10241 | + return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, store), {}, { | |
| 10242 | + dispatch: _dispatch | |
| 10243 | + }); | |
| 10244 | + }; | |
| 10245 | + }; | |
| 10246 | +} | |
| 10247 | + | |
| 10248 | +/* | |
| 10249 | + * This is a dummy function to check if the function name has been altered by minification. | |
| 10250 | + * If the function has been minified and NODE_ENV !== 'production', warn the user. | |
| 10251 | + */ | |
| 10252 | + | |
| 10253 | +function isCrushed() {} | |
| 10254 | + | |
| 10255 | +if ( true && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') { | |
| 10256 | + 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.'); | |
| 10257 | +} | |
| 10258 | + | |
| 10259 | + | |
| 10260 | + | |
| 10261 | + | |
| 10262 | +/***/ }), | |
| 10263 | + | |
| 10264 | +/***/ "../node_modules/reselect/es/defaultMemoize.js": | |
| 10265 | +/*!*****************************************************!*\ | |
| 10266 | + !*** ../node_modules/reselect/es/defaultMemoize.js ***! | |
| 10267 | + \*****************************************************/ | |
| 10268 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 10269 | + | |
| 10270 | +"use strict"; | |
| 10271 | +__webpack_require__.r(__webpack_exports__); | |
| 10272 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 10273 | +/* harmony export */ "createCacheKeyComparator": () => (/* binding */ createCacheKeyComparator), | |
| 10274 | +/* harmony export */ "defaultEqualityCheck": () => (/* binding */ defaultEqualityCheck), | |
| 10275 | +/* harmony export */ "defaultMemoize": () => (/* binding */ defaultMemoize) | |
| 10276 | +/* harmony export */ }); | |
| 10277 | +// Cache implementation based on Erik Rasmussen's `lru-memoize`: | |
| 10278 | +// https://github.com/erikras/lru-memoize | |
| 10279 | +var NOT_FOUND = 'NOT_FOUND'; | |
| 10280 | + | |
| 10281 | +function createSingletonCache(equals) { | |
| 10282 | + var entry; | |
| 10283 | + return { | |
| 10284 | + get: function get(key) { | |
| 10285 | + if (entry && equals(entry.key, key)) { | |
| 10286 | + return entry.value; | |
| 10287 | + } | |
| 10288 | + | |
| 10289 | + return NOT_FOUND; | |
| 10290 | + }, | |
| 10291 | + put: function put(key, value) { | |
| 10292 | + entry = { | |
| 10293 | + key: key, | |
| 10294 | + value: value | |
| 10295 | + }; | |
| 10296 | + }, | |
| 10297 | + getEntries: function getEntries() { | |
| 10298 | + return entry ? [entry] : []; | |
| 10299 | + }, | |
| 10300 | + clear: function clear() { | |
| 10301 | + entry = undefined; | |
| 10302 | + } | |
| 10303 | + }; | |
| 10304 | +} | |
| 10305 | + | |
| 10306 | +function createLruCache(maxSize, equals) { | |
| 10307 | + var entries = []; | |
| 10308 | + | |
| 10309 | + function get(key) { | |
| 10310 | + var cacheIndex = entries.findIndex(function (entry) { | |
| 10311 | + return equals(key, entry.key); | |
| 10312 | + }); // We found a cached entry | |
| 10313 | + | |
| 10314 | + if (cacheIndex > -1) { | |
| 10315 | + var entry = entries[cacheIndex]; // Cached entry not at top of cache, move it to the top | |
| 10316 | + | |
| 10317 | + if (cacheIndex > 0) { | |
| 10318 | + entries.splice(cacheIndex, 1); | |
| 10319 | + entries.unshift(entry); | |
| 10320 | + } | |
| 10321 | + | |
| 10322 | + return entry.value; | |
| 10323 | + } // No entry found in cache, return sentinel | |
| 10324 | + | |
| 10325 | + | |
| 10326 | + return NOT_FOUND; | |
| 10327 | + } | |
| 10328 | + | |
| 10329 | + function put(key, value) { | |
| 10330 | + if (get(key) === NOT_FOUND) { | |
| 10331 | + // TODO Is unshift slow? | |
| 10332 | + entries.unshift({ | |
| 10333 | + key: key, | |
| 10334 | + value: value | |
| 10335 | + }); | |
| 10336 | + | |
| 10337 | + if (entries.length > maxSize) { | |
| 10338 | + entries.pop(); | |
| 10339 | + } | |
| 10340 | + } | |
| 10341 | + } | |
| 10342 | + | |
| 10343 | + function getEntries() { | |
| 10344 | + return entries; | |
| 10345 | + } | |
| 10346 | + | |
| 10347 | + function clear() { | |
| 10348 | + entries = []; | |
| 10349 | + } | |
| 10350 | + | |
| 10351 | + return { | |
| 10352 | + get: get, | |
| 10353 | + put: put, | |
| 10354 | + getEntries: getEntries, | |
| 10355 | + clear: clear | |
| 10356 | + }; | |
| 10357 | +} | |
| 10358 | + | |
| 10359 | +var defaultEqualityCheck = function defaultEqualityCheck(a, b) { | |
| 10360 | + return a === b; | |
| 10361 | +}; | |
| 10362 | +function createCacheKeyComparator(equalityCheck) { | |
| 10363 | + return function areArgumentsShallowlyEqual(prev, next) { | |
| 10364 | + if (prev === null || next === null || prev.length !== next.length) { | |
| 10365 | + return false; | |
| 10366 | + } // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible. | |
| 10367 | + | |
| 10368 | + | |
| 10369 | + var length = prev.length; | |
| 10370 | + | |
| 10371 | + for (var i = 0; i < length; i++) { | |
| 10372 | + if (!equalityCheck(prev[i], next[i])) { | |
| 10373 | + return false; | |
| 10374 | + } | |
| 10375 | + } | |
| 10376 | + | |
| 10377 | + return true; | |
| 10378 | + }; | |
| 10379 | +} | |
| 10380 | +// defaultMemoize now supports a configurable cache size with LRU behavior, | |
| 10381 | +// and optional comparison of the result value with existing values | |
| 10382 | +function defaultMemoize(func, equalityCheckOrOptions) { | |
| 10383 | + var providedOptions = typeof equalityCheckOrOptions === 'object' ? equalityCheckOrOptions : { | |
| 10384 | + equalityCheck: equalityCheckOrOptions | |
| 10385 | + }; | |
| 10386 | + var _providedOptions$equa = providedOptions.equalityCheck, | |
| 10387 | + equalityCheck = _providedOptions$equa === void 0 ? defaultEqualityCheck : _providedOptions$equa, | |
| 10388 | + _providedOptions$maxS = providedOptions.maxSize, | |
| 10389 | + maxSize = _providedOptions$maxS === void 0 ? 1 : _providedOptions$maxS, | |
| 10390 | + resultEqualityCheck = providedOptions.resultEqualityCheck; | |
| 10391 | + var comparator = createCacheKeyComparator(equalityCheck); | |
| 10392 | + var cache = maxSize === 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator); // we reference arguments instead of spreading them for performance reasons | |
| 10393 | + | |
| 10394 | + function memoized() { | |
| 10395 | + var value = cache.get(arguments); | |
| 10396 | + | |
| 10397 | + if (value === NOT_FOUND) { | |
| 10398 | + // @ts-ignore | |
| 10399 | + value = func.apply(null, arguments); | |
| 10400 | + | |
| 10401 | + if (resultEqualityCheck) { | |
| 10402 | + var entries = cache.getEntries(); | |
| 10403 | + var matchingEntry = entries.find(function (entry) { | |
| 10404 | + return resultEqualityCheck(entry.value, value); | |
| 10405 | + }); | |
| 10406 | + | |
| 10407 | + if (matchingEntry) { | |
| 10408 | + value = matchingEntry.value; | |
| 10409 | + } | |
| 10410 | + } | |
| 10411 | + | |
| 10412 | + cache.put(arguments, value); | |
| 10413 | + } | |
| 10414 | + | |
| 10415 | + return value; | |
| 10416 | + } | |
| 10417 | + | |
| 10418 | + memoized.clearCache = function () { | |
| 10419 | + return cache.clear(); | |
| 10420 | + }; | |
| 10421 | + | |
| 10422 | + return memoized; | |
| 10423 | +} | |
| 10424 | + | |
| 10425 | +/***/ }), | |
| 10426 | + | |
| 10427 | +/***/ "../node_modules/reselect/es/index.js": | |
| 10428 | +/*!********************************************!*\ | |
| 10429 | + !*** ../node_modules/reselect/es/index.js ***! | |
| 10430 | + \********************************************/ | |
| 10431 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 10432 | + | |
| 10433 | +"use strict"; | |
| 10434 | +__webpack_require__.r(__webpack_exports__); | |
| 10435 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 10436 | +/* harmony export */ "createSelector": () => (/* binding */ createSelector), | |
| 10437 | +/* harmony export */ "createSelectorCreator": () => (/* binding */ createSelectorCreator), | |
| 10438 | +/* harmony export */ "createStructuredSelector": () => (/* binding */ createStructuredSelector), | |
| 10439 | +/* harmony export */ "defaultEqualityCheck": () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultEqualityCheck), | |
| 10440 | +/* harmony export */ "defaultMemoize": () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize) | |
| 10441 | +/* harmony export */ }); | |
| 10442 | +/* harmony import */ var _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultMemoize */ "../node_modules/reselect/es/defaultMemoize.js"); | |
| 10443 | + | |
| 10444 | + | |
| 10445 | + | |
| 10446 | +function getDependencies(funcs) { | |
| 10447 | + var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs; | |
| 10448 | + | |
| 10449 | + if (!dependencies.every(function (dep) { | |
| 10450 | + return typeof dep === 'function'; | |
| 10451 | + })) { | |
| 10452 | + var dependencyTypes = dependencies.map(function (dep) { | |
| 10453 | + return typeof dep === 'function' ? "function " + (dep.name || 'unnamed') + "()" : typeof dep; | |
| 10454 | + }).join(', '); | |
| 10455 | + throw new Error("createSelector expects all input-selectors to be functions, but received the following types: [" + dependencyTypes + "]"); | |
| 10456 | + } | |
| 10457 | + | |
| 10458 | + return dependencies; | |
| 10459 | +} | |
| 10460 | + | |
| 10461 | +function createSelectorCreator(memoize) { | |
| 10462 | + for (var _len = arguments.length, memoizeOptionsFromArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
| 10463 | + memoizeOptionsFromArgs[_key - 1] = arguments[_key]; | |
| 10464 | + } | |
| 10465 | + | |
| 10466 | + var createSelector = function createSelector() { | |
| 10467 | + for (var _len2 = arguments.length, funcs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | |
| 10468 | + funcs[_key2] = arguments[_key2]; | |
| 10469 | + } | |
| 10470 | + | |
| 10471 | + var _recomputations = 0; | |
| 10472 | + | |
| 10473 | + var _lastResult; // Due to the intricacies of rest params, we can't do an optional arg after `...funcs`. | |
| 10474 | + // So, start by declaring the default value here. | |
| 10475 | + // (And yes, the words 'memoize' and 'options' appear too many times in this next sequence.) | |
| 10476 | + | |
| 10477 | + | |
| 10478 | + var directlyPassedOptions = { | |
| 10479 | + memoizeOptions: undefined | |
| 10480 | + }; // Normally, the result func or "output selector" is the last arg | |
| 10481 | + | |
| 10482 | + var resultFunc = funcs.pop(); // If the result func is actually an _object_, assume it's our options object | |
| 10483 | + | |
| 10484 | + if (typeof resultFunc === 'object') { | |
| 10485 | + directlyPassedOptions = resultFunc; // and pop the real result func off | |
| 10486 | + | |
| 10487 | + resultFunc = funcs.pop(); | |
| 10488 | + } | |
| 10489 | + | |
| 10490 | + if (typeof resultFunc !== 'function') { | |
| 10491 | + throw new Error("createSelector expects an output function after the inputs, but received: [" + typeof resultFunc + "]"); | |
| 10492 | + } // Determine which set of options we're using. Prefer options passed directly, | |
| 10493 | + // but fall back to options given to createSelectorCreator. | |
| 10494 | + | |
| 10495 | + | |
| 10496 | + var _directlyPassedOption = directlyPassedOptions, | |
| 10497 | + _directlyPassedOption2 = _directlyPassedOption.memoizeOptions, | |
| 10498 | + memoizeOptions = _directlyPassedOption2 === void 0 ? memoizeOptionsFromArgs : _directlyPassedOption2; // Simplifying assumption: it's unlikely that the first options arg of the provided memoizer | |
| 10499 | + // is an array. In most libs I've looked at, it's an equality function or options object. | |
| 10500 | + // Based on that, if `memoizeOptions` _is_ an array, we assume it's a full | |
| 10501 | + // user-provided array of options. Otherwise, it must be just the _first_ arg, and so | |
| 10502 | + // we wrap it in an array so we can apply it. | |
| 10503 | + | |
| 10504 | + var finalMemoizeOptions = Array.isArray(memoizeOptions) ? memoizeOptions : [memoizeOptions]; | |
| 10505 | + var dependencies = getDependencies(funcs); | |
| 10506 | + var memoizedResultFunc = memoize.apply(void 0, [function recomputationWrapper() { | |
| 10507 | + _recomputations++; // apply arguments instead of spreading for performance. | |
| 10508 | + | |
| 10509 | + return resultFunc.apply(null, arguments); | |
| 10510 | + }].concat(finalMemoizeOptions)); // If a selector is called with the exact same arguments we don't need to traverse our dependencies again. | |
| 10511 | + | |
| 10512 | + var selector = memoize(function dependenciesChecker() { | |
| 10513 | + var params = []; | |
| 10514 | + var length = dependencies.length; | |
| 10515 | + | |
| 10516 | + for (var i = 0; i < length; i++) { | |
| 10517 | + // apply arguments instead of spreading and mutate a local list of params for performance. | |
| 10518 | + // @ts-ignore | |
| 10519 | + params.push(dependencies[i].apply(null, arguments)); | |
| 10520 | + } // apply arguments instead of spreading for performance. | |
| 10521 | + | |
| 10522 | + | |
| 10523 | + _lastResult = memoizedResultFunc.apply(null, params); | |
| 10524 | + return _lastResult; | |
| 10525 | + }); | |
| 10526 | + Object.assign(selector, { | |
| 10527 | + resultFunc: resultFunc, | |
| 10528 | + memoizedResultFunc: memoizedResultFunc, | |
| 10529 | + dependencies: dependencies, | |
| 10530 | + lastResult: function lastResult() { | |
| 10531 | + return _lastResult; | |
| 10532 | + }, | |
| 10533 | + recomputations: function recomputations() { | |
| 10534 | + return _recomputations; | |
| 10535 | + }, | |
| 10536 | + resetRecomputations: function resetRecomputations() { | |
| 10537 | + return _recomputations = 0; | |
| 10538 | + } | |
| 10539 | + }); | |
| 10540 | + return selector; | |
| 10541 | + }; // @ts-ignore | |
| 10542 | + | |
| 10543 | + | |
| 10544 | + return createSelector; | |
| 10545 | +} | |
| 10546 | +var createSelector = /* #__PURE__ */createSelectorCreator(_defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize); | |
| 10547 | +// Manual definition of state and output arguments | |
| 10548 | +var createStructuredSelector = function createStructuredSelector(selectors, selectorCreator) { | |
| 10549 | + if (selectorCreator === void 0) { | |
| 10550 | + selectorCreator = createSelector; | |
| 10551 | + } | |
| 10552 | + | |
| 10553 | + if (typeof selectors !== 'object') { | |
| 10554 | + throw new Error('createStructuredSelector expects first argument to be an object ' + ("where each property is a selector, instead received a " + typeof selectors)); | |
| 10555 | + } | |
| 10556 | + | |
| 10557 | + var objectKeys = Object.keys(selectors); | |
| 10558 | + var resultSelector = selectorCreator( // @ts-ignore | |
| 10559 | + objectKeys.map(function (key) { | |
| 10560 | + return selectors[key]; | |
| 10561 | + }), function () { | |
| 10562 | + for (var _len3 = arguments.length, values = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | |
| 10563 | + values[_key3] = arguments[_key3]; | |
| 10564 | + } | |
| 10565 | + | |
| 10566 | + return values.reduce(function (composition, value, index) { | |
| 10567 | + composition[objectKeys[index]] = value; | |
| 10568 | + return composition; | |
| 10569 | + }, {}); | |
| 10570 | + }); | |
| 10571 | + return resultSelector; | |
| 10572 | +}; | |
| 10573 | + | |
| 10574 | +/***/ }), | |
| 10575 | + | |
| 7529 | 10576 | /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": |
| 7530 | 10577 | /*!******************************************************************!*\ |
| 7531 | 10578 | !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! |
| 7532 | 10579 | \******************************************************************/ |
| @@ -7531,12 +10578,14 @@ | ||
| 7531 | 10578 | !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! |
| 7532 | 10579 | \******************************************************************/ |
| 7533 | 10580 | /***/ ((module) => { |
| 7534 | 10581 | |
| 7535 | -function _arrayLikeToArray(r, a) { | |
| 7536 | - (null == a || a > r.length) && (a = r.length); | |
| 7537 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 7538 | - return n; | |
| 10582 | +function _arrayLikeToArray(arr, len) { | |
| 10583 | + if (len == null || len > arr.length) len = arr.length; | |
| 10584 | + for (var i = 0, arr2 = new Array(len); i < len; i++) { | |
| 10585 | + arr2[i] = arr[i]; | |
| 10586 | + } | |
| 10587 | + return arr2; | |
| 7539 | 10588 | } |
| 7540 | 10589 | module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7541 | 10590 | |
| 7542 | 10591 | /***/ }), |
| @@ -7546,10 +10595,10 @@ | ||
| 7546 | 10595 | !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! |
| 7547 | 10596 | \****************************************************************/ |
| 7548 | 10597 | /***/ ((module) => { |
| 7549 | 10598 | |
| 7550 | -function _arrayWithHoles(r) { | |
| 7551 | - if (Array.isArray(r)) return r; | |
| 10599 | +function _arrayWithHoles(arr) { | |
| 10600 | + if (Array.isArray(arr)) return arr; | |
| 7552 | 10601 | } |
| 7553 | 10602 | module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7554 | 10603 | |
| 7555 | 10604 | /***/ }), |
| @@ -7559,11 +10608,13 @@ | ||
| 7559 | 10608 | !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! |
| 7560 | 10609 | \***********************************************************************/ |
| 7561 | 10610 | /***/ ((module) => { |
| 7562 | 10611 | |
| 7563 | -function _assertThisInitialized(e) { | |
| 7564 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 7565 | - return e; | |
| 10612 | +function _assertThisInitialized(self) { | |
| 10613 | + if (self === void 0) { | |
| 10614 | + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 10615 | + } | |
| 10616 | + return self; | |
| 7566 | 10617 | } |
| 7567 | 10618 | module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7568 | 10619 | |
| 7569 | 10620 | /***/ }), |
| @@ -7573,30 +10624,35 @@ | ||
| 7573 | 10624 | !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! |
| 7574 | 10625 | \******************************************************************/ |
| 7575 | 10626 | /***/ ((module) => { |
| 7576 | 10627 | |
| 7577 | -function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 10628 | +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { | |
| 7578 | 10629 | try { |
| 7579 | - var i = n[a](c), | |
| 7580 | - u = i.value; | |
| 7581 | - } catch (n) { | |
| 7582 | - return void e(n); | |
| 10630 | + var info = gen[key](arg); | |
| 10631 | + var value = info.value; | |
| 10632 | + } catch (error) { | |
| 10633 | + reject(error); | |
| 10634 | + return; | |
| 7583 | 10635 | } |
| 7584 | - i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 10636 | + if (info.done) { | |
| 10637 | + resolve(value); | |
| 10638 | + } else { | |
| 10639 | + Promise.resolve(value).then(_next, _throw); | |
| 10640 | + } | |
| 7585 | 10641 | } |
| 7586 | -function _asyncToGenerator(n) { | |
| 10642 | +function _asyncToGenerator(fn) { | |
| 7587 | 10643 | return function () { |
| 7588 | - var t = this, | |
| 7589 | - e = arguments; | |
| 7590 | - return new Promise(function (r, o) { | |
| 7591 | - var a = n.apply(t, e); | |
| 7592 | - function _next(n) { | |
| 7593 | - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 10644 | + var self = this, | |
| 10645 | + args = arguments; | |
| 10646 | + return new Promise(function (resolve, reject) { | |
| 10647 | + var gen = fn.apply(self, args); | |
| 10648 | + function _next(value) { | |
| 10649 | + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); | |
| 7594 | 10650 | } |
| 7595 | - function _throw(n) { | |
| 7596 | - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 10651 | + function _throw(err) { | |
| 10652 | + asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); | |
| 7597 | 10653 | } |
| 7598 | - _next(void 0); | |
| 10654 | + _next(undefined); | |
| 7599 | 10655 | }); |
| 7600 | 10656 | }; |
| 7601 | 10657 | } |
| 7602 | 10658 | module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| @@ -7608,10 +10664,12 @@ | ||
| 7608 | 10664 | !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! |
| 7609 | 10665 | \****************************************************************/ |
| 7610 | 10666 | /***/ ((module) => { |
| 7611 | 10667 | |
| 7612 | -function _classCallCheck(a, n) { | |
| 7613 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 10668 | +function _classCallCheck(instance, Constructor) { | |
| 10669 | + if (!(instance instanceof Constructor)) { | |
| 10670 | + throw new TypeError("Cannot call a class as a function"); | |
| 10671 | + } | |
| 7614 | 10672 | } |
| 7615 | 10673 | module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7616 | 10674 | |
| 7617 | 10675 | /***/ }), |
| @@ -7621,16 +10679,24 @@ | ||
| 7621 | 10679 | !*** ../node_modules/@babel/runtime/helpers/construct.js ***! |
| 7622 | 10680 | \***********************************************************/ |
| 7623 | 10681 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 7624 | 10682 | |
| 10683 | +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 7625 | 10684 | var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js"); |
| 7626 | -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 7627 | -function _construct(t, e, r) { | |
| 7628 | - if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); | |
| 7629 | - var o = [null]; | |
| 7630 | - o.push.apply(o, e); | |
| 7631 | - var p = new (t.bind.apply(t, o))(); | |
| 7632 | - return r && setPrototypeOf(p, r.prototype), p; | |
| 10685 | +function _construct(Parent, args, Class) { | |
| 10686 | + if (isNativeReflectConstruct()) { | |
| 10687 | + module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 10688 | + } else { | |
| 10689 | + module.exports = _construct = function _construct(Parent, args, Class) { | |
| 10690 | + var a = [null]; | |
| 10691 | + a.push.apply(a, args); | |
| 10692 | + var Constructor = Function.bind.apply(Parent, a); | |
| 10693 | + var instance = new Constructor(); | |
| 10694 | + if (Class) setPrototypeOf(instance, Class.prototype); | |
| 10695 | + return instance; | |
| 10696 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 10697 | + } | |
| 10698 | + return _construct.apply(null, arguments); | |
| 7633 | 10699 | } |
| 7634 | 10700 | module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7635 | 10701 | |
| 7636 | 10702 | /***/ }), |
| @@ -7638,21 +10704,26 @@ | ||
| 7638 | 10704 | /***/ "../node_modules/@babel/runtime/helpers/createClass.js": |
| 7639 | 10705 | /*!*************************************************************!*\ |
| 7640 | 10706 | !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! |
| 7641 | 10707 | \*************************************************************/ |
| 7642 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 10708 | +/***/ ((module) => { | |
| 7643 | 10709 | |
| 7644 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 7645 | -function _defineProperties(e, r) { | |
| 7646 | - for (var t = 0; t < r.length; t++) { | |
| 7647 | - var o = r[t]; | |
| 7648 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 10710 | +function _defineProperties(target, props) { | |
| 10711 | + for (var i = 0; i < props.length; i++) { | |
| 10712 | + var descriptor = props[i]; | |
| 10713 | + descriptor.enumerable = descriptor.enumerable || false; | |
| 10714 | + descriptor.configurable = true; | |
| 10715 | + if ("value" in descriptor) descriptor.writable = true; | |
| 10716 | + Object.defineProperty(target, descriptor.key, descriptor); | |
| 7649 | 10717 | } |
| 7650 | 10718 | } |
| 7651 | -function _createClass(e, r, t) { | |
| 7652 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 7653 | - writable: !1 | |
| 7654 | - }), e; | |
| 10719 | +function _createClass(Constructor, protoProps, staticProps) { | |
| 10720 | + if (protoProps) _defineProperties(Constructor.prototype, protoProps); | |
| 10721 | + if (staticProps) _defineProperties(Constructor, staticProps); | |
| 10722 | + Object.defineProperty(Constructor, "prototype", { | |
| 10723 | + writable: false | |
| 10724 | + }); | |
| 10725 | + return Constructor; | |
| 7655 | 10726 | } |
| 7656 | 10727 | module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7657 | 10728 | |
| 7658 | 10729 | /***/ }), |
| @@ -7660,18 +10731,22 @@ | ||
| 7660 | 10731 | /***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": |
| 7661 | 10732 | /*!****************************************************************!*\ |
| 7662 | 10733 | !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! |
| 7663 | 10734 | \****************************************************************/ |
| 7664 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 10735 | +/***/ ((module) => { | |
| 7665 | 10736 | |
| 7666 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 7667 | -function _defineProperty(e, r, t) { | |
| 7668 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 7669 | - value: t, | |
| 7670 | - enumerable: !0, | |
| 7671 | - configurable: !0, | |
| 7672 | - writable: !0 | |
| 7673 | - }) : e[r] = t, e; | |
| 10737 | +function _defineProperty(obj, key, value) { | |
| 10738 | + if (key in obj) { | |
| 10739 | + Object.defineProperty(obj, key, { | |
| 10740 | + value: value, | |
| 10741 | + enumerable: true, | |
| 10742 | + configurable: true, | |
| 10743 | + writable: true | |
| 10744 | + }); | |
| 10745 | + } else { | |
| 10746 | + obj[key] = value; | |
| 10747 | + } | |
| 10748 | + return obj; | |
| 7674 | 10749 | } |
| 7675 | 10750 | module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7676 | 10751 | |
| 7677 | 10752 | /***/ }), |
| @@ -7683,15 +10758,22 @@ | ||
| 7683 | 10758 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 7684 | 10759 | |
| 7685 | 10760 | var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js"); |
| 7686 | 10761 | function _get() { |
| 7687 | - return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { | |
| 7688 | - var p = superPropBase(e, t); | |
| 7689 | - if (p) { | |
| 7690 | - var n = Object.getOwnPropertyDescriptor(p, t); | |
| 7691 | - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; | |
| 7692 | - } | |
| 7693 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments); | |
| 10762 | + if (typeof Reflect !== "undefined" && Reflect.get) { | |
| 10763 | + module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 10764 | + } else { | |
| 10765 | + module.exports = _get = function _get(target, property, receiver) { | |
| 10766 | + var base = superPropBase(target, property); | |
| 10767 | + if (!base) return; | |
| 10768 | + var desc = Object.getOwnPropertyDescriptor(base, property); | |
| 10769 | + if (desc.get) { | |
| 10770 | + return desc.get.call(arguments.length < 3 ? target : receiver); | |
| 10771 | + } | |
| 10772 | + return desc.value; | |
| 10773 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 10774 | + } | |
| 10775 | + return _get.apply(this, arguments); | |
| 7694 | 10776 | } |
| 7695 | 10777 | module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7696 | 10778 | |
| 7697 | 10779 | /***/ }), |
| @@ -7701,12 +10783,13 @@ | ||
| 7701 | 10783 | !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! |
| 7702 | 10784 | \****************************************************************/ |
| 7703 | 10785 | /***/ ((module) => { |
| 7704 | 10786 | |
| 7705 | -function _getPrototypeOf(t) { | |
| 7706 | - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 7707 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 7708 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 10787 | +function _getPrototypeOf(o) { | |
| 10788 | + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { | |
| 10789 | + return o.__proto__ || Object.getPrototypeOf(o); | |
| 10790 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 10791 | + return _getPrototypeOf(o); | |
| 7709 | 10792 | } |
| 7710 | 10793 | module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7711 | 10794 | |
| 7712 | 10795 | /***/ }), |
| @@ -7717,19 +10800,23 @@ | ||
| 7717 | 10800 | \**********************************************************/ |
| 7718 | 10801 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 7719 | 10802 | |
| 7720 | 10803 | var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); |
| 7721 | -function _inherits(t, e) { | |
| 7722 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 7723 | - t.prototype = Object.create(e && e.prototype, { | |
| 10804 | +function _inherits(subClass, superClass) { | |
| 10805 | + if (typeof superClass !== "function" && superClass !== null) { | |
| 10806 | + throw new TypeError("Super expression must either be null or a function"); | |
| 10807 | + } | |
| 10808 | + subClass.prototype = Object.create(superClass && superClass.prototype, { | |
| 7724 | 10809 | constructor: { |
| 7725 | - value: t, | |
| 7726 | - writable: !0, | |
| 7727 | - configurable: !0 | |
| 10810 | + value: subClass, | |
| 10811 | + writable: true, | |
| 10812 | + configurable: true | |
| 7728 | 10813 | } |
| 7729 | - }), Object.defineProperty(t, "prototype", { | |
| 7730 | - writable: !1 | |
| 7731 | - }), e && setPrototypeOf(t, e); | |
| 10814 | + }); | |
| 10815 | + Object.defineProperty(subClass, "prototype", { | |
| 10816 | + writable: false | |
| 10817 | + }); | |
| 10818 | + if (superClass) setPrototypeOf(subClass, superClass); | |
| 7732 | 10819 | } |
| 7733 | 10820 | module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7734 | 10821 | |
| 7735 | 10822 | /***/ }), |
| @@ -7739,11 +10826,11 @@ | ||
| 7739 | 10826 | !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! |
| 7740 | 10827 | \***********************************************************************/ |
| 7741 | 10828 | /***/ ((module) => { |
| 7742 | 10829 | |
| 7743 | -function _interopRequireDefault(e) { | |
| 7744 | - return e && e.__esModule ? e : { | |
| 7745 | - "default": e | |
| 10830 | +function _interopRequireDefault(obj) { | |
| 10831 | + return obj && obj.__esModule ? obj : { | |
| 10832 | + "default": obj | |
| 7746 | 10833 | }; |
| 7747 | 10834 | } |
| 7748 | 10835 | module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7749 | 10836 | |
| @@ -7754,14 +10841,10 @@ | ||
| 7754 | 10841 | !*** ../node_modules/@babel/runtime/helpers/isNativeFunction.js ***! |
| 7755 | 10842 | \******************************************************************/ |
| 7756 | 10843 | /***/ ((module) => { |
| 7757 | 10844 | |
| 7758 | -function _isNativeFunction(t) { | |
| 7759 | - try { | |
| 7760 | - return -1 !== Function.toString.call(t).indexOf("[native code]"); | |
| 7761 | - } catch (n) { | |
| 7762 | - return "function" == typeof t; | |
| 7763 | - } | |
| 10845 | +function _isNativeFunction(fn) { | |
| 10846 | + return Function.toString.call(fn).indexOf("[native code]") !== -1; | |
| 7764 | 10847 | } |
| 7765 | 10848 | module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7766 | 10849 | |
| 7767 | 10850 | /***/ }), |
| @@ -7772,14 +10855,17 @@ | ||
| 7772 | 10855 | \**************************************************************************/ |
| 7773 | 10856 | /***/ ((module) => { |
| 7774 | 10857 | |
| 7775 | 10858 | function _isNativeReflectConstruct() { |
| 10859 | + if (typeof Reflect === "undefined" || !Reflect.construct) return false; | |
| 10860 | + if (Reflect.construct.sham) return false; | |
| 10861 | + if (typeof Proxy === "function") return true; | |
| 7776 | 10862 | try { |
| 7777 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); | |
| 7778 | - } catch (t) {} | |
| 7779 | - return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() { | |
| 7780 | - return !!t; | |
| 7781 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 10863 | + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); | |
| 10864 | + return true; | |
| 10865 | + } catch (e) { | |
| 10866 | + return false; | |
| 10867 | + } | |
| 7782 | 10868 | } |
| 7783 | 10869 | module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7784 | 10870 | |
| 7785 | 10871 | /***/ }), |
| @@ -7789,34 +10875,31 @@ | ||
| 7789 | 10875 | !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! |
| 7790 | 10876 | \**********************************************************************/ |
| 7791 | 10877 | /***/ ((module) => { |
| 7792 | 10878 | |
| 7793 | -function _iterableToArrayLimit(r, l) { | |
| 7794 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 7795 | - if (null != t) { | |
| 7796 | - var e, | |
| 7797 | - n, | |
| 7798 | - i, | |
| 7799 | - u, | |
| 7800 | - a = [], | |
| 7801 | - f = !0, | |
| 7802 | - o = !1; | |
| 10879 | +function _iterableToArrayLimit(arr, i) { | |
| 10880 | + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; | |
| 10881 | + if (_i == null) return; | |
| 10882 | + var _arr = []; | |
| 10883 | + var _n = true; | |
| 10884 | + var _d = false; | |
| 10885 | + var _s, _e; | |
| 10886 | + try { | |
| 10887 | + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { | |
| 10888 | + _arr.push(_s.value); | |
| 10889 | + if (i && _arr.length === i) break; | |
| 10890 | + } | |
| 10891 | + } catch (err) { | |
| 10892 | + _d = true; | |
| 10893 | + _e = err; | |
| 10894 | + } finally { | |
| 7803 | 10895 | try { |
| 7804 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 7805 | - if (Object(t) !== t) return; | |
| 7806 | - f = !1; | |
| 7807 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 7808 | - } catch (r) { | |
| 7809 | - o = !0, n = r; | |
| 10896 | + if (!_n && _i["return"] != null) _i["return"](); | |
| 7810 | 10897 | } finally { |
| 7811 | - try { | |
| 7812 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 7813 | - } finally { | |
| 7814 | - if (o) throw n; | |
| 7815 | - } | |
| 10898 | + if (_d) throw _e; | |
| 7816 | 10899 | } |
| 7817 | - return a; | |
| 7818 | 10900 | } |
| 10901 | + return _arr; | |
| 7819 | 10902 | } |
| 7820 | 10903 | module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7821 | 10904 | |
| 7822 | 10905 | /***/ }), |
| @@ -7841,363 +10924,326 @@ | ||
| 7841 | 10924 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 7842 | 10925 | |
| 7843 | 10926 | var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 7844 | 10927 | var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); |
| 7845 | -function _possibleConstructorReturn(t, e) { | |
| 7846 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 7847 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 7848 | - return assertThisInitialized(t); | |
| 10928 | +function _possibleConstructorReturn(self, call) { | |
| 10929 | + if (call && (_typeof(call) === "object" || typeof call === "function")) { | |
| 10930 | + return call; | |
| 10931 | + } else if (call !== void 0) { | |
| 10932 | + throw new TypeError("Derived constructors may only return object or undefined"); | |
| 10933 | + } | |
| 10934 | + return assertThisInitialized(self); | |
| 7849 | 10935 | } |
| 7850 | 10936 | module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7851 | 10937 | |
| 7852 | 10938 | /***/ }), |
| 7853 | 10939 | |
| 7854 | -/***/ "../node_modules/@babel/runtime/helpers/readOnlyError.js": | |
| 7855 | -/*!***************************************************************!*\ | |
| 7856 | - !*** ../node_modules/@babel/runtime/helpers/readOnlyError.js ***! | |
| 7857 | - \***************************************************************/ | |
| 7858 | -/***/ ((module) => { | |
| 7859 | - | |
| 7860 | -function _readOnlyError(r) { | |
| 7861 | - throw new TypeError('"' + r + '" is read-only'); | |
| 7862 | -} | |
| 7863 | -module.exports = _readOnlyError, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 7864 | - | |
| 7865 | -/***/ }), | |
| 7866 | - | |
| 7867 | -/***/ "../node_modules/@babel/runtime/helpers/regenerator.js": | |
| 7868 | -/*!*************************************************************!*\ | |
| 7869 | - !*** ../node_modules/@babel/runtime/helpers/regenerator.js ***! | |
| 7870 | - \*************************************************************/ | |
| 10940 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 10941 | +/*!********************************************************************!*\ | |
| 10942 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 10943 | + \********************************************************************/ | |
| 7871 | 10944 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 7872 | 10945 | |
| 7873 | -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 7874 | -function _regenerator() { | |
| 7875 | - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 7876 | - var e, | |
| 7877 | - t, | |
| 7878 | - r = "function" == typeof Symbol ? Symbol : {}, | |
| 7879 | - n = r.iterator || "@@iterator", | |
| 7880 | - o = r.toStringTag || "@@toStringTag"; | |
| 7881 | - function i(r, n, o, i) { | |
| 7882 | - var c = n && n.prototype instanceof Generator ? n : Generator, | |
| 7883 | - u = Object.create(c.prototype); | |
| 7884 | - return regeneratorDefine(u, "_invoke", function (r, n, o) { | |
| 7885 | - var i, | |
| 7886 | - c, | |
| 7887 | - u, | |
| 7888 | - f = 0, | |
| 7889 | - p = o || [], | |
| 7890 | - y = !1, | |
| 7891 | - G = { | |
| 7892 | - p: 0, | |
| 7893 | - n: 0, | |
| 7894 | - v: e, | |
| 7895 | - a: d, | |
| 7896 | - f: d.bind(e, 4), | |
| 7897 | - d: function d(t, r) { | |
| 7898 | - return i = t, c = 0, u = e, G.n = r, a; | |
| 10946 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 10947 | +function _regeneratorRuntime() { | |
| 10948 | + "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ | |
| 10949 | + module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 10950 | + return exports; | |
| 10951 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 10952 | + var exports = {}, | |
| 10953 | + Op = Object.prototype, | |
| 10954 | + hasOwn = Op.hasOwnProperty, | |
| 10955 | + $Symbol = "function" == typeof Symbol ? Symbol : {}, | |
| 10956 | + iteratorSymbol = $Symbol.iterator || "@@iterator", | |
| 10957 | + asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", | |
| 10958 | + toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; | |
| 10959 | + function define(obj, key, value) { | |
| 10960 | + return Object.defineProperty(obj, key, { | |
| 10961 | + value: value, | |
| 10962 | + enumerable: !0, | |
| 10963 | + configurable: !0, | |
| 10964 | + writable: !0 | |
| 10965 | + }), obj[key]; | |
| 10966 | + } | |
| 10967 | + try { | |
| 10968 | + define({}, ""); | |
| 10969 | + } catch (err) { | |
| 10970 | + define = function define(obj, key, value) { | |
| 10971 | + return obj[key] = value; | |
| 10972 | + }; | |
| 10973 | + } | |
| 10974 | + function wrap(innerFn, outerFn, self, tryLocsList) { | |
| 10975 | + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, | |
| 10976 | + generator = Object.create(protoGenerator.prototype), | |
| 10977 | + context = new Context(tryLocsList || []); | |
| 10978 | + return generator._invoke = function (innerFn, self, context) { | |
| 10979 | + var state = "suspendedStart"; | |
| 10980 | + return function (method, arg) { | |
| 10981 | + if ("executing" === state) throw new Error("Generator is already running"); | |
| 10982 | + if ("completed" === state) { | |
| 10983 | + if ("throw" === method) throw arg; | |
| 10984 | + return doneResult(); | |
| 10985 | + } | |
| 10986 | + for (context.method = method, context.arg = arg;;) { | |
| 10987 | + var delegate = context.delegate; | |
| 10988 | + if (delegate) { | |
| 10989 | + var delegateResult = maybeInvokeDelegate(delegate, context); | |
| 10990 | + if (delegateResult) { | |
| 10991 | + if (delegateResult === ContinueSentinel) continue; | |
| 10992 | + return delegateResult; | |
| 10993 | + } | |
| 7899 | 10994 | } |
| 7900 | - }; | |
| 7901 | - function d(r, n) { | |
| 7902 | - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 7903 | - var o, | |
| 7904 | - i = p[t], | |
| 7905 | - d = G.p, | |
| 7906 | - l = i[2]; | |
| 7907 | - r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); | |
| 7908 | - } | |
| 7909 | - if (o || r > 1) return a; | |
| 7910 | - throw y = !0, n; | |
| 7911 | - } | |
| 7912 | - return function (o, p, l) { | |
| 7913 | - if (f > 1) throw TypeError("Generator is already running"); | |
| 7914 | - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 7915 | - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 7916 | - try { | |
| 7917 | - if (f = 2, i) { | |
| 7918 | - if (c || (o = "next"), t = i[o]) { | |
| 7919 | - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 7920 | - if (!t.done) return t; | |
| 7921 | - u = t.value, c < 2 && (c = 0); | |
| 7922 | - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 7923 | - i = e; | |
| 7924 | - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 7925 | - } catch (t) { | |
| 7926 | - i = e, c = 1, u = t; | |
| 7927 | - } finally { | |
| 7928 | - f = 1; | |
| 10995 | + if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { | |
| 10996 | + if ("suspendedStart" === state) throw state = "completed", context.arg; | |
| 10997 | + context.dispatchException(context.arg); | |
| 10998 | + } else "return" === context.method && context.abrupt("return", context.arg); | |
| 10999 | + state = "executing"; | |
| 11000 | + var record = tryCatch(innerFn, self, context); | |
| 11001 | + if ("normal" === record.type) { | |
| 11002 | + if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; | |
| 11003 | + return { | |
| 11004 | + value: record.arg, | |
| 11005 | + done: context.done | |
| 11006 | + }; | |
| 7929 | 11007 | } |
| 11008 | + "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); | |
| 7930 | 11009 | } |
| 7931 | - return { | |
| 7932 | - value: t, | |
| 7933 | - done: y | |
| 7934 | - }; | |
| 7935 | 11010 | }; |
| 7936 | - }(r, o, i), !0), u; | |
| 11011 | + }(innerFn, self, context), generator; | |
| 7937 | 11012 | } |
| 7938 | - var a = {}; | |
| 11013 | + function tryCatch(fn, obj, arg) { | |
| 11014 | + try { | |
| 11015 | + return { | |
| 11016 | + type: "normal", | |
| 11017 | + arg: fn.call(obj, arg) | |
| 11018 | + }; | |
| 11019 | + } catch (err) { | |
| 11020 | + return { | |
| 11021 | + type: "throw", | |
| 11022 | + arg: err | |
| 11023 | + }; | |
| 11024 | + } | |
| 11025 | + } | |
| 11026 | + exports.wrap = wrap; | |
| 11027 | + var ContinueSentinel = {}; | |
| 7939 | 11028 | function Generator() {} |
| 7940 | 11029 | function GeneratorFunction() {} |
| 7941 | 11030 | function GeneratorFunctionPrototype() {} |
| 7942 | - t = Object.getPrototypeOf; | |
| 7943 | - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () { | |
| 7944 | - return this; | |
| 7945 | - }), t), | |
| 7946 | - u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 7947 | - function f(e) { | |
| 7948 | - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 7949 | - } | |
| 7950 | - return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () { | |
| 11031 | + var IteratorPrototype = {}; | |
| 11032 | + define(IteratorPrototype, iteratorSymbol, function () { | |
| 7951 | 11033 | return this; |
| 7952 | - }), regeneratorDefine(u, "toString", function () { | |
| 7953 | - return "[object Generator]"; | |
| 7954 | - }), (module.exports = _regenerator = function _regenerator() { | |
| 7955 | - return { | |
| 7956 | - w: i, | |
| 7957 | - m: f | |
| 7958 | - }; | |
| 7959 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 7960 | -} | |
| 7961 | -module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 7962 | - | |
| 7963 | -/***/ }), | |
| 7964 | - | |
| 7965 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js": | |
| 7966 | -/*!******************************************************************!*\ | |
| 7967 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsync.js ***! | |
| 7968 | - \******************************************************************/ | |
| 7969 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 7970 | - | |
| 7971 | -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 7972 | -function _regeneratorAsync(n, e, r, t, o) { | |
| 7973 | - var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 7974 | - return a.next().then(function (n) { | |
| 7975 | - return n.done ? n.value : a.next(); | |
| 7976 | 11034 | }); |
| 7977 | -} | |
| 7978 | -module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 7979 | - | |
| 7980 | -/***/ }), | |
| 7981 | - | |
| 7982 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js": | |
| 7983 | -/*!*********************************************************************!*\ | |
| 7984 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js ***! | |
| 7985 | - \*********************************************************************/ | |
| 7986 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 7987 | - | |
| 7988 | -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 7989 | -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 7990 | -function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 7991 | - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 7992 | -} | |
| 7993 | -module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 7994 | - | |
| 7995 | -/***/ }), | |
| 7996 | - | |
| 7997 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js": | |
| 7998 | -/*!**************************************************************************!*\ | |
| 7999 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js ***! | |
| 8000 | - \**************************************************************************/ | |
| 8001 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8002 | - | |
| 8003 | -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 8004 | -var regeneratorDefine = __webpack_require__(/*! ./regeneratorDefine.js */ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js"); | |
| 8005 | -function AsyncIterator(t, e) { | |
| 8006 | - function n(r, o, i, f) { | |
| 8007 | - try { | |
| 8008 | - var c = t[r](o), | |
| 8009 | - u = c.value; | |
| 8010 | - return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) { | |
| 8011 | - n("next", t, i, f); | |
| 8012 | - }, function (t) { | |
| 8013 | - n("throw", t, i, f); | |
| 8014 | - }) : e.resolve(u).then(function (t) { | |
| 8015 | - c.value = t, i(c); | |
| 8016 | - }, function (t) { | |
| 8017 | - return n("throw", t, i, f); | |
| 11035 | + var getProto = Object.getPrototypeOf, | |
| 11036 | + NativeIteratorPrototype = getProto && getProto(getProto(values([]))); | |
| 11037 | + NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); | |
| 11038 | + var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); | |
| 11039 | + function defineIteratorMethods(prototype) { | |
| 11040 | + ["next", "throw", "return"].forEach(function (method) { | |
| 11041 | + define(prototype, method, function (arg) { | |
| 11042 | + return this._invoke(method, arg); | |
| 8018 | 11043 | }); |
| 8019 | - } catch (t) { | |
| 8020 | - f(t); | |
| 11044 | + }); | |
| 11045 | + } | |
| 11046 | + function AsyncIterator(generator, PromiseImpl) { | |
| 11047 | + function invoke(method, arg, resolve, reject) { | |
| 11048 | + var record = tryCatch(generator[method], generator, arg); | |
| 11049 | + if ("throw" !== record.type) { | |
| 11050 | + var result = record.arg, | |
| 11051 | + value = result.value; | |
| 11052 | + return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { | |
| 11053 | + invoke("next", value, resolve, reject); | |
| 11054 | + }, function (err) { | |
| 11055 | + invoke("throw", err, resolve, reject); | |
| 11056 | + }) : PromiseImpl.resolve(value).then(function (unwrapped) { | |
| 11057 | + result.value = unwrapped, resolve(result); | |
| 11058 | + }, function (error) { | |
| 11059 | + return invoke("throw", error, resolve, reject); | |
| 11060 | + }); | |
| 11061 | + } | |
| 11062 | + reject(record.arg); | |
| 8021 | 11063 | } |
| 11064 | + var previousPromise; | |
| 11065 | + this._invoke = function (method, arg) { | |
| 11066 | + function callInvokeWithMethodAndArg() { | |
| 11067 | + return new PromiseImpl(function (resolve, reject) { | |
| 11068 | + invoke(method, arg, resolve, reject); | |
| 11069 | + }); | |
| 11070 | + } | |
| 11071 | + return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); | |
| 11072 | + }; | |
| 8022 | 11073 | } |
| 8023 | - var r; | |
| 8024 | - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { | |
| 8025 | - return this; | |
| 8026 | - })), regeneratorDefine(this, "_invoke", function (t, o, i) { | |
| 8027 | - function f() { | |
| 8028 | - return new e(function (e, r) { | |
| 8029 | - n(t, i, e, r); | |
| 8030 | - }); | |
| 11074 | + function maybeInvokeDelegate(delegate, context) { | |
| 11075 | + var method = delegate.iterator[context.method]; | |
| 11076 | + if (undefined === method) { | |
| 11077 | + if (context.delegate = null, "throw" === context.method) { | |
| 11078 | + if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; | |
| 11079 | + context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); | |
| 11080 | + } | |
| 11081 | + return ContinueSentinel; | |
| 8031 | 11082 | } |
| 8032 | - return r = r ? r.then(f, f) : f(); | |
| 8033 | - }, !0); | |
| 8034 | -} | |
| 8035 | -module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 8036 | - | |
| 8037 | -/***/ }), | |
| 8038 | - | |
| 8039 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorDefine.js": | |
| 8040 | -/*!*******************************************************************!*\ | |
| 8041 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorDefine.js ***! | |
| 8042 | - \*******************************************************************/ | |
| 8043 | -/***/ ((module) => { | |
| 8044 | - | |
| 8045 | -function _regeneratorDefine(e, r, n, t) { | |
| 8046 | - var i = Object.defineProperty; | |
| 8047 | - try { | |
| 8048 | - i({}, "", {}); | |
| 8049 | - } catch (e) { | |
| 8050 | - i = 0; | |
| 11083 | + var record = tryCatch(method, delegate.iterator, context.arg); | |
| 11084 | + if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; | |
| 11085 | + var info = record.arg; | |
| 11086 | + return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); | |
| 8051 | 11087 | } |
| 8052 | - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 8053 | - function o(r, n) { | |
| 8054 | - _regeneratorDefine(e, r, function (e) { | |
| 8055 | - return this._invoke(r, n, e); | |
| 8056 | - }); | |
| 11088 | + function pushTryEntry(locs) { | |
| 11089 | + var entry = { | |
| 11090 | + tryLoc: locs[0] | |
| 11091 | + }; | |
| 11092 | + 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); | |
| 11093 | + } | |
| 11094 | + function resetTryEntry(entry) { | |
| 11095 | + var record = entry.completion || {}; | |
| 11096 | + record.type = "normal", delete record.arg, entry.completion = record; | |
| 11097 | + } | |
| 11098 | + function Context(tryLocsList) { | |
| 11099 | + this.tryEntries = [{ | |
| 11100 | + tryLoc: "root" | |
| 11101 | + }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); | |
| 11102 | + } | |
| 11103 | + function values(iterable) { | |
| 11104 | + if (iterable) { | |
| 11105 | + var iteratorMethod = iterable[iteratorSymbol]; | |
| 11106 | + if (iteratorMethod) return iteratorMethod.call(iterable); | |
| 11107 | + if ("function" == typeof iterable.next) return iterable; | |
| 11108 | + if (!isNaN(iterable.length)) { | |
| 11109 | + var i = -1, | |
| 11110 | + next = function next() { | |
| 11111 | + for (; ++i < iterable.length;) { | |
| 11112 | + if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; | |
| 11113 | + } | |
| 11114 | + return next.value = undefined, next.done = !0, next; | |
| 11115 | + }; | |
| 11116 | + return next.next = next; | |
| 11117 | + } | |
| 8057 | 11118 | } |
| 8058 | - r ? i ? i(e, r, { | |
| 8059 | - value: n, | |
| 8060 | - enumerable: !t, | |
| 8061 | - configurable: !t, | |
| 8062 | - writable: !t | |
| 8063 | - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 8064 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 8065 | -} | |
| 8066 | -module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 8067 | - | |
| 8068 | -/***/ }), | |
| 8069 | - | |
| 8070 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js": | |
| 8071 | -/*!*****************************************************************!*\ | |
| 8072 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorKeys.js ***! | |
| 8073 | - \*****************************************************************/ | |
| 8074 | -/***/ ((module) => { | |
| 8075 | - | |
| 8076 | -function _regeneratorKeys(e) { | |
| 8077 | - var n = Object(e), | |
| 8078 | - r = []; | |
| 8079 | - for (var t in n) r.unshift(t); | |
| 8080 | - return function e() { | |
| 8081 | - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 8082 | - return e.done = !0, e; | |
| 8083 | - }; | |
| 8084 | -} | |
| 8085 | -module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 8086 | - | |
| 8087 | -/***/ }), | |
| 8088 | - | |
| 8089 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 8090 | -/*!********************************************************************!*\ | |
| 8091 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 8092 | - \********************************************************************/ | |
| 8093 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8094 | - | |
| 8095 | -var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ "../node_modules/@babel/runtime/helpers/OverloadYield.js"); | |
| 8096 | -var regenerator = __webpack_require__(/*! ./regenerator.js */ "../node_modules/@babel/runtime/helpers/regenerator.js"); | |
| 8097 | -var regeneratorAsync = __webpack_require__(/*! ./regeneratorAsync.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsync.js"); | |
| 8098 | -var regeneratorAsyncGen = __webpack_require__(/*! ./regeneratorAsyncGen.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js"); | |
| 8099 | -var regeneratorAsyncIterator = __webpack_require__(/*! ./regeneratorAsyncIterator.js */ "../node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js"); | |
| 8100 | -var regeneratorKeys = __webpack_require__(/*! ./regeneratorKeys.js */ "../node_modules/@babel/runtime/helpers/regeneratorKeys.js"); | |
| 8101 | -var regeneratorValues = __webpack_require__(/*! ./regeneratorValues.js */ "../node_modules/@babel/runtime/helpers/regeneratorValues.js"); | |
| 8102 | -function _regeneratorRuntime() { | |
| 8103 | - "use strict"; | |
| 8104 | - | |
| 8105 | - var r = regenerator(), | |
| 8106 | - e = r.m(_regeneratorRuntime), | |
| 8107 | - t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 8108 | - function n(r) { | |
| 8109 | - var e = "function" == typeof r && r.constructor; | |
| 8110 | - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 11119 | + return { | |
| 11120 | + next: doneResult | |
| 11121 | + }; | |
| 8111 | 11122 | } |
| 8112 | - var o = { | |
| 8113 | - "throw": 1, | |
| 8114 | - "return": 2, | |
| 8115 | - "break": 3, | |
| 8116 | - "continue": 3 | |
| 8117 | - }; | |
| 8118 | - function a(r) { | |
| 8119 | - var e, t; | |
| 8120 | - return function (n) { | |
| 8121 | - e || (e = { | |
| 8122 | - stop: function stop() { | |
| 8123 | - return t(n.a, 2); | |
| 8124 | - }, | |
| 8125 | - "catch": function _catch() { | |
| 8126 | - return n.v; | |
| 8127 | - }, | |
| 8128 | - abrupt: function abrupt(r, e) { | |
| 8129 | - return t(n.a, o[r], e); | |
| 8130 | - }, | |
| 8131 | - delegateYield: function delegateYield(r, o, a) { | |
| 8132 | - return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 8133 | - }, | |
| 8134 | - finish: function finish(r) { | |
| 8135 | - return t(n.f, r); | |
| 8136 | - } | |
| 8137 | - }, t = function t(r, _t, o) { | |
| 8138 | - n.p = e.prev, n.n = e.next; | |
| 8139 | - try { | |
| 8140 | - return r(_t, o); | |
| 8141 | - } finally { | |
| 8142 | - e.next = n.n; | |
| 8143 | - } | |
| 8144 | - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 8145 | - try { | |
| 8146 | - return r.call(this, e); | |
| 8147 | - } finally { | |
| 8148 | - n.p = e.prev, n.n = e.next; | |
| 8149 | - } | |
| 11123 | + function doneResult() { | |
| 11124 | + return { | |
| 11125 | + value: undefined, | |
| 11126 | + done: !0 | |
| 8150 | 11127 | }; |
| 8151 | 11128 | } |
| 8152 | - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 11129 | + return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { | |
| 11130 | + var ctor = "function" == typeof genFun && genFun.constructor; | |
| 11131 | + return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); | |
| 11132 | + }, exports.mark = function (genFun) { | |
| 11133 | + return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; | |
| 11134 | + }, exports.awrap = function (arg) { | |
| 8153 | 11135 | return { |
| 8154 | - wrap: function wrap(e, t, n, o) { | |
| 8155 | - return r.w(a(e), t, n, o && o.reverse()); | |
| 8156 | - }, | |
| 8157 | - isGeneratorFunction: n, | |
| 8158 | - mark: r.m, | |
| 8159 | - awrap: function awrap(r, e) { | |
| 8160 | - return new OverloadYield(r, e); | |
| 8161 | - }, | |
| 8162 | - AsyncIterator: regeneratorAsyncIterator, | |
| 8163 | - async: function async(r, e, t, o, u) { | |
| 8164 | - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 8165 | - }, | |
| 8166 | - keys: regeneratorKeys, | |
| 8167 | - values: regeneratorValues | |
| 11136 | + __await: arg | |
| 8168 | 11137 | }; |
| 8169 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 8170 | -} | |
| 8171 | -module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 8172 | - | |
| 8173 | -/***/ }), | |
| 8174 | - | |
| 8175 | -/***/ "../node_modules/@babel/runtime/helpers/regeneratorValues.js": | |
| 8176 | -/*!*******************************************************************!*\ | |
| 8177 | - !*** ../node_modules/@babel/runtime/helpers/regeneratorValues.js ***! | |
| 8178 | - \*******************************************************************/ | |
| 8179 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8180 | - | |
| 8181 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 8182 | -function _regeneratorValues(e) { | |
| 8183 | - if (null != e) { | |
| 8184 | - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], | |
| 8185 | - r = 0; | |
| 8186 | - if (t) return t.call(e); | |
| 8187 | - if ("function" == typeof e.next) return e; | |
| 8188 | - if (!isNaN(e.length)) return { | |
| 8189 | - next: function next() { | |
| 8190 | - return e && r >= e.length && (e = void 0), { | |
| 8191 | - value: e && e[r++], | |
| 8192 | - done: !e | |
| 8193 | - }; | |
| 11138 | + }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { | |
| 11139 | + return this; | |
| 11140 | + }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { | |
| 11141 | + void 0 === PromiseImpl && (PromiseImpl = Promise); | |
| 11142 | + var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); | |
| 11143 | + return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { | |
| 11144 | + return result.done ? result.value : iter.next(); | |
| 11145 | + }); | |
| 11146 | + }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { | |
| 11147 | + return this; | |
| 11148 | + }), define(Gp, "toString", function () { | |
| 11149 | + return "[object Generator]"; | |
| 11150 | + }), exports.keys = function (object) { | |
| 11151 | + var keys = []; | |
| 11152 | + for (var key in object) { | |
| 11153 | + keys.push(key); | |
| 11154 | + } | |
| 11155 | + return keys.reverse(), function next() { | |
| 11156 | + for (; keys.length;) { | |
| 11157 | + var key = keys.pop(); | |
| 11158 | + if (key in object) return next.value = key, next.done = !1, next; | |
| 8194 | 11159 | } |
| 11160 | + return next.done = !0, next; | |
| 8195 | 11161 | }; |
| 8196 | - } | |
| 8197 | - throw new TypeError(_typeof(e) + " is not iterable"); | |
| 11162 | + }, exports.values = values, Context.prototype = { | |
| 11163 | + constructor: Context, | |
| 11164 | + reset: function reset(skipTempReset) { | |
| 11165 | + if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { | |
| 11166 | + "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); | |
| 11167 | + } | |
| 11168 | + }, | |
| 11169 | + stop: function stop() { | |
| 11170 | + this.done = !0; | |
| 11171 | + var rootRecord = this.tryEntries[0].completion; | |
| 11172 | + if ("throw" === rootRecord.type) throw rootRecord.arg; | |
| 11173 | + return this.rval; | |
| 11174 | + }, | |
| 11175 | + dispatchException: function dispatchException(exception) { | |
| 11176 | + if (this.done) throw exception; | |
| 11177 | + var context = this; | |
| 11178 | + function handle(loc, caught) { | |
| 11179 | + return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; | |
| 11180 | + } | |
| 11181 | + for (var i = this.tryEntries.length - 1; i >= 0; --i) { | |
| 11182 | + var entry = this.tryEntries[i], | |
| 11183 | + record = entry.completion; | |
| 11184 | + if ("root" === entry.tryLoc) return handle("end"); | |
| 11185 | + if (entry.tryLoc <= this.prev) { | |
| 11186 | + var hasCatch = hasOwn.call(entry, "catchLoc"), | |
| 11187 | + hasFinally = hasOwn.call(entry, "finallyLoc"); | |
| 11188 | + if (hasCatch && hasFinally) { | |
| 11189 | + if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); | |
| 11190 | + if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); | |
| 11191 | + } else if (hasCatch) { | |
| 11192 | + if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); | |
| 11193 | + } else { | |
| 11194 | + if (!hasFinally) throw new Error("try statement without catch or finally"); | |
| 11195 | + if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); | |
| 11196 | + } | |
| 11197 | + } | |
| 11198 | + } | |
| 11199 | + }, | |
| 11200 | + abrupt: function abrupt(type, arg) { | |
| 11201 | + for (var i = this.tryEntries.length - 1; i >= 0; --i) { | |
| 11202 | + var entry = this.tryEntries[i]; | |
| 11203 | + if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { | |
| 11204 | + var finallyEntry = entry; | |
| 11205 | + break; | |
| 11206 | + } | |
| 11207 | + } | |
| 11208 | + finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); | |
| 11209 | + var record = finallyEntry ? finallyEntry.completion : {}; | |
| 11210 | + return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); | |
| 11211 | + }, | |
| 11212 | + complete: function complete(record, afterLoc) { | |
| 11213 | + if ("throw" === record.type) throw record.arg; | |
| 11214 | + return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; | |
| 11215 | + }, | |
| 11216 | + finish: function finish(finallyLoc) { | |
| 11217 | + for (var i = this.tryEntries.length - 1; i >= 0; --i) { | |
| 11218 | + var entry = this.tryEntries[i]; | |
| 11219 | + if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; | |
| 11220 | + } | |
| 11221 | + }, | |
| 11222 | + "catch": function _catch(tryLoc) { | |
| 11223 | + for (var i = this.tryEntries.length - 1; i >= 0; --i) { | |
| 11224 | + var entry = this.tryEntries[i]; | |
| 11225 | + if (entry.tryLoc === tryLoc) { | |
| 11226 | + var record = entry.completion; | |
| 11227 | + if ("throw" === record.type) { | |
| 11228 | + var thrown = record.arg; | |
| 11229 | + resetTryEntry(entry); | |
| 11230 | + } | |
| 11231 | + return thrown; | |
| 11232 | + } | |
| 11233 | + } | |
| 11234 | + throw new Error("illegal catch attempt"); | |
| 11235 | + }, | |
| 11236 | + delegateYield: function delegateYield(iterable, resultName, nextLoc) { | |
| 11237 | + return this.delegate = { | |
| 11238 | + iterator: values(iterable), | |
| 11239 | + resultName: resultName, | |
| 11240 | + nextLoc: nextLoc | |
| 11241 | + }, "next" === this.method && (this.arg = undefined), ContinueSentinel; | |
| 11242 | + } | |
| 11243 | + }, exports; | |
| 8198 | 11244 | } |
| 8199 | -module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 11245 | +module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 8200 | 11246 | |
| 8201 | 11247 | /***/ }), |
| 8202 | 11248 | |
| 8203 | 11249 | /***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": |
| @@ -8205,12 +11251,14 @@ | ||
| 8205 | 11251 | !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! |
| 8206 | 11252 | \****************************************************************/ |
| 8207 | 11253 | /***/ ((module) => { |
| 8208 | 11254 | |
| 8209 | -function _setPrototypeOf(t, e) { | |
| 8210 | - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 8211 | - return t.__proto__ = e, t; | |
| 8212 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 11255 | +function _setPrototypeOf(o, p) { | |
| 11256 | + module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { | |
| 11257 | + o.__proto__ = p; | |
| 11258 | + return o; | |
| 11259 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 11260 | + return _setPrototypeOf(o, p); | |
| 8213 | 11261 | } |
| 8214 | 11262 | module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 8215 | 11263 | |
| 8216 | 11264 | /***/ }), |
| @@ -8224,10 +11272,10 @@ | ||
| 8224 | 11272 | var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); |
| 8225 | 11273 | var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); |
| 8226 | 11274 | var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); |
| 8227 | 11275 | var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); |
| 8228 | -function _slicedToArray(r, e) { | |
| 8229 | - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 11276 | +function _slicedToArray(arr, i) { | |
| 11277 | + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); | |
| 8230 | 11278 | } |
| 8231 | 11279 | module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 8232 | 11280 | |
| 8233 | 11281 | /***/ }), |
| @@ -8238,53 +11286,19 @@ | ||
| 8238 | 11286 | \***************************************************************/ |
| 8239 | 11287 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 8240 | 11288 | |
| 8241 | 11289 | var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); |
| 8242 | -function _superPropBase(t, o) { | |
| 8243 | - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); | |
| 8244 | - return t; | |
| 11290 | +function _superPropBase(object, property) { | |
| 11291 | + while (!Object.prototype.hasOwnProperty.call(object, property)) { | |
| 11292 | + object = getPrototypeOf(object); | |
| 11293 | + if (object === null) break; | |
| 11294 | + } | |
| 11295 | + return object; | |
| 8245 | 11296 | } |
| 8246 | 11297 | module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 8247 | 11298 | |
| 8248 | 11299 | /***/ }), |
| 8249 | 11300 | |
| 8250 | -/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 8251 | -/*!*************************************************************!*\ | |
| 8252 | - !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 8253 | - \*************************************************************/ | |
| 8254 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8255 | - | |
| 8256 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 8257 | -function toPrimitive(t, r) { | |
| 8258 | - if ("object" != _typeof(t) || !t) return t; | |
| 8259 | - var e = t[Symbol.toPrimitive]; | |
| 8260 | - if (void 0 !== e) { | |
| 8261 | - var i = e.call(t, r || "default"); | |
| 8262 | - if ("object" != _typeof(i)) return i; | |
| 8263 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 8264 | - } | |
| 8265 | - return ("string" === r ? String : Number)(t); | |
| 8266 | -} | |
| 8267 | -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 8268 | - | |
| 8269 | -/***/ }), | |
| 8270 | - | |
| 8271 | -/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 8272 | -/*!***************************************************************!*\ | |
| 8273 | - !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 8274 | - \***************************************************************/ | |
| 8275 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8276 | - | |
| 8277 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 8278 | -var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 8279 | -function toPropertyKey(t) { | |
| 8280 | - var i = toPrimitive(t, "string"); | |
| 8281 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 8282 | -} | |
| 8283 | -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 8284 | - | |
| 8285 | -/***/ }), | |
| 8286 | - | |
| 8287 | 11301 | /***/ "../node_modules/@babel/runtime/helpers/typeof.js": |
| 8288 | 11302 | /*!********************************************************!*\ |
| 8289 | 11303 | !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! |
| 8290 | 11304 | \********************************************************/ |
| @@ -8289,16 +11303,16 @@ | ||
| 8289 | 11303 | !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! |
| 8290 | 11304 | \********************************************************/ |
| 8291 | 11305 | /***/ ((module) => { |
| 8292 | 11306 | |
| 8293 | -function _typeof(o) { | |
| 11307 | +function _typeof(obj) { | |
| 8294 | 11308 | "@babel/helpers - typeof"; |
| 8295 | 11309 | |
| 8296 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 8297 | - return typeof o; | |
| 8298 | - } : function (o) { | |
| 8299 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 8300 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 11310 | + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { | |
| 11311 | + return typeof obj; | |
| 11312 | + } : function (obj) { | |
| 11313 | + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; | |
| 11314 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); | |
| 8301 | 11315 | } |
| 8302 | 11316 | module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 8303 | 11317 | |
| 8304 | 11318 | /***/ }), |
| @@ -8309,14 +11323,15 @@ | ||
| 8309 | 11323 | \****************************************************************************/ |
| 8310 | 11324 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 8311 | 11325 | |
| 8312 | 11326 | var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); |
| 8313 | -function _unsupportedIterableToArray(r, a) { | |
| 8314 | - if (r) { | |
| 8315 | - if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 8316 | - var t = {}.toString.call(r).slice(8, -1); | |
| 8317 | - 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; | |
| 8318 | - } | |
| 11327 | +function _unsupportedIterableToArray(o, minLen) { | |
| 11328 | + if (!o) return; | |
| 11329 | + if (typeof o === "string") return arrayLikeToArray(o, minLen); | |
| 11330 | + var n = Object.prototype.toString.call(o).slice(8, -1); | |
| 11331 | + if (n === "Object" && o.constructor) n = o.constructor.name; | |
| 11332 | + if (n === "Map" || n === "Set") return Array.from(o); | |
| 11333 | + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); | |
| 8319 | 11334 | } |
| 8320 | 11335 | module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 8321 | 11336 | |
| 8322 | 11337 | /***/ }), |
| @@ -8330,29 +11345,33 @@ | ||
| 8330 | 11345 | var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); |
| 8331 | 11346 | var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); |
| 8332 | 11347 | var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ "../node_modules/@babel/runtime/helpers/isNativeFunction.js"); |
| 8333 | 11348 | var construct = __webpack_require__(/*! ./construct.js */ "../node_modules/@babel/runtime/helpers/construct.js"); |
| 8334 | -function _wrapNativeSuper(t) { | |
| 8335 | - var r = "function" == typeof Map ? new Map() : void 0; | |
| 8336 | - return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) { | |
| 8337 | - if (null === t || !isNativeFunction(t)) return t; | |
| 8338 | - if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); | |
| 8339 | - if (void 0 !== r) { | |
| 8340 | - if (r.has(t)) return r.get(t); | |
| 8341 | - r.set(t, Wrapper); | |
| 11349 | +function _wrapNativeSuper(Class) { | |
| 11350 | + var _cache = typeof Map === "function" ? new Map() : undefined; | |
| 11351 | + module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) { | |
| 11352 | + if (Class === null || !isNativeFunction(Class)) return Class; | |
| 11353 | + if (typeof Class !== "function") { | |
| 11354 | + throw new TypeError("Super expression must either be null or a function"); | |
| 8342 | 11355 | } |
| 11356 | + if (typeof _cache !== "undefined") { | |
| 11357 | + if (_cache.has(Class)) return _cache.get(Class); | |
| 11358 | + _cache.set(Class, Wrapper); | |
| 11359 | + } | |
| 8343 | 11360 | function Wrapper() { |
| 8344 | - return construct(t, arguments, getPrototypeOf(this).constructor); | |
| 11361 | + return construct(Class, arguments, getPrototypeOf(this).constructor); | |
| 8345 | 11362 | } |
| 8346 | - return Wrapper.prototype = Object.create(t.prototype, { | |
| 11363 | + Wrapper.prototype = Object.create(Class.prototype, { | |
| 8347 | 11364 | constructor: { |
| 8348 | 11365 | value: Wrapper, |
| 8349 | - enumerable: !1, | |
| 8350 | - writable: !0, | |
| 8351 | - configurable: !0 | |
| 11366 | + enumerable: false, | |
| 11367 | + writable: true, | |
| 11368 | + configurable: true | |
| 8352 | 11369 | } |
| 8353 | - }), setPrototypeOf(Wrapper, t); | |
| 8354 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t); | |
| 11370 | + }); | |
| 11371 | + return setPrototypeOf(Wrapper, Class); | |
| 11372 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 11373 | + return _wrapNativeSuper(Class); | |
| 8355 | 11374 | } |
| 8356 | 11375 | module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 8357 | 11376 | |
| 8358 | 11377 | /***/ }), |
| @@ -8381,17 +11400,108 @@ | ||
| 8381 | 11400 | |
| 8382 | 11401 | |
| 8383 | 11402 | /***/ }), |
| 8384 | 11403 | |
| 8385 | -/***/ "@reduxjs/toolkit": | |
| 11404 | +/***/ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js": | |
| 11405 | +/*!********************************************************************!*\ | |
| 11406 | + !*** ../node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! | |
| 11407 | + \********************************************************************/ | |
| 11408 | +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 11409 | + | |
| 11410 | +"use strict"; | |
| 11411 | +__webpack_require__.r(__webpack_exports__); | |
| 11412 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 11413 | +/* harmony export */ "default": () => (/* binding */ _defineProperty) | |
| 11414 | +/* harmony export */ }); | |
| 11415 | +function _defineProperty(obj, key, value) { | |
| 11416 | + if (key in obj) { | |
| 11417 | + Object.defineProperty(obj, key, { | |
| 11418 | + value: value, | |
| 11419 | + enumerable: true, | |
| 11420 | + configurable: true, | |
| 11421 | + writable: true | |
| 11422 | + }); | |
| 11423 | + } else { | |
| 11424 | + obj[key] = value; | |
| 11425 | + } | |
| 11426 | + return obj; | |
| 11427 | +} | |
| 11428 | + | |
| 11429 | +/***/ }), | |
| 11430 | + | |
| 11431 | +/***/ "../node_modules/@babel/runtime/helpers/esm/objectSpread2.js": | |
| 11432 | +/*!*******************************************************************!*\ | |
| 11433 | + !*** ../node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***! | |
| 11434 | + \*******************************************************************/ | |
| 11435 | +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 11436 | + | |
| 11437 | +"use strict"; | |
| 11438 | +__webpack_require__.r(__webpack_exports__); | |
| 11439 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 11440 | +/* harmony export */ "default": () => (/* binding */ _objectSpread2) | |
| 11441 | +/* harmony export */ }); | |
| 11442 | +/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty.js */ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js"); | |
| 11443 | + | |
| 11444 | +function ownKeys(object, enumerableOnly) { | |
| 11445 | + var keys = Object.keys(object); | |
| 11446 | + if (Object.getOwnPropertySymbols) { | |
| 11447 | + var symbols = Object.getOwnPropertySymbols(object); | |
| 11448 | + enumerableOnly && (symbols = symbols.filter(function (sym) { | |
| 11449 | + return Object.getOwnPropertyDescriptor(object, sym).enumerable; | |
| 11450 | + })), keys.push.apply(keys, symbols); | |
| 11451 | + } | |
| 11452 | + return keys; | |
| 11453 | +} | |
| 11454 | +function _objectSpread2(target) { | |
| 11455 | + for (var i = 1; i < arguments.length; i++) { | |
| 11456 | + var source = null != arguments[i] ? arguments[i] : {}; | |
| 11457 | + i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { | |
| 11458 | + (0,_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]); | |
| 11459 | + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { | |
| 11460 | + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | |
| 11461 | + }); | |
| 11462 | + } | |
| 11463 | + return target; | |
| 11464 | +} | |
| 11465 | + | |
| 11466 | +/***/ }), | |
| 11467 | + | |
| 11468 | +/***/ "../node_modules/immer/dist/immer.esm.mjs": | |
| 8386 | 11469 | /*!************************************************!*\ |
| 8387 | - !*** external "elementorVendors.reduxToolkit" ***! | |
| 11470 | + !*** ../node_modules/immer/dist/immer.esm.mjs ***! | |
| 8388 | 11471 | \************************************************/ |
| 8389 | -/***/ ((module) => { | |
| 11472 | +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 8390 | 11473 | |
| 8391 | 11474 | "use strict"; |
| 8392 | -module.exports = elementorVendors.reduxToolkit; | |
| 11475 | +__webpack_require__.r(__webpack_exports__); | |
| 11476 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 11477 | +/* harmony export */ "Immer": () => (/* binding */ un), | |
| 11478 | +/* harmony export */ "applyPatches": () => (/* binding */ pn), | |
| 11479 | +/* harmony export */ "castDraft": () => (/* binding */ K), | |
| 11480 | +/* harmony export */ "castImmutable": () => (/* binding */ $), | |
| 11481 | +/* harmony export */ "createDraft": () => (/* binding */ ln), | |
| 11482 | +/* harmony export */ "current": () => (/* binding */ D), | |
| 11483 | +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), | |
| 11484 | +/* harmony export */ "enableAllPlugins": () => (/* binding */ J), | |
| 11485 | +/* harmony export */ "enableES5": () => (/* binding */ N), | |
| 11486 | +/* harmony export */ "enableMapSet": () => (/* binding */ C), | |
| 11487 | +/* harmony export */ "enablePatches": () => (/* binding */ T), | |
| 11488 | +/* harmony export */ "finishDraft": () => (/* binding */ dn), | |
| 11489 | +/* harmony export */ "freeze": () => (/* binding */ d), | |
| 11490 | +/* harmony export */ "immerable": () => (/* binding */ L), | |
| 11491 | +/* harmony export */ "isDraft": () => (/* binding */ r), | |
| 11492 | +/* harmony export */ "isDraftable": () => (/* binding */ t), | |
| 11493 | +/* harmony export */ "nothing": () => (/* binding */ H), | |
| 11494 | +/* harmony export */ "original": () => (/* binding */ e), | |
| 11495 | +/* harmony export */ "produce": () => (/* binding */ fn), | |
| 11496 | +/* harmony export */ "produceWithPatches": () => (/* binding */ cn), | |
| 11497 | +/* harmony export */ "setAutoFreeze": () => (/* binding */ sn), | |
| 11498 | +/* harmony export */ "setUseProxies": () => (/* binding */ vn) | |
| 11499 | +/* harmony export */ }); | |
| 11500 | +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); | |
| 11501 | +//# sourceMappingURL=immer.esm.js.map | |
| 8393 | 11502 | |
| 11503 | + | |
| 8394 | 11504 | /***/ }) |
| 8395 | 11505 | |
| 8396 | 11506 | /******/ }); |
| 8397 | 11507 | /************************************************************************/ |
| @@ -8419,10 +11529,39 @@ | ||
| 8419 | 11529 | /******/ return module.exports; |
| 8420 | 11530 | /******/ } |
| 8421 | 11531 | /******/ |
| 8422 | 11532 | /************************************************************************/ |
| 11533 | +/******/ /* webpack/runtime/define property getters */ | |
| 11534 | +/******/ (() => { | |
| 11535 | +/******/ // define getter functions for harmony exports | |
| 11536 | +/******/ __webpack_require__.d = (exports, definition) => { | |
| 11537 | +/******/ for(var key in definition) { | |
| 11538 | +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 11539 | +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 11540 | +/******/ } | |
| 11541 | +/******/ } | |
| 11542 | +/******/ }; | |
| 11543 | +/******/ })(); | |
| 11544 | +/******/ | |
| 11545 | +/******/ /* webpack/runtime/hasOwnProperty shorthand */ | |
| 11546 | +/******/ (() => { | |
| 11547 | +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) | |
| 11548 | +/******/ })(); | |
| 11549 | +/******/ | |
| 11550 | +/******/ /* webpack/runtime/make namespace object */ | |
| 11551 | +/******/ (() => { | |
| 11552 | +/******/ // define __esModule on exports | |
| 11553 | +/******/ __webpack_require__.r = (exports) => { | |
| 11554 | +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | |
| 11555 | +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | |
| 11556 | +/******/ } | |
| 11557 | +/******/ Object.defineProperty(exports, '__esModule', { value: true }); | |
| 11558 | +/******/ }; | |
| 11559 | +/******/ })(); | |
| 11560 | +/******/ | |
| 11561 | +/************************************************************************/ | |
| 8423 | 11562 | var __webpack_exports__ = {}; |
| 8424 | -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 11563 | +// This entry need to be wrapped in an IIFE because it need to be in strict mode. | |
| 8425 | 11564 | (() => { |
| 8426 | 11565 | "use strict"; |
| 8427 | 11566 | /*!*********************************************!*\ |
| 8428 | 11567 | !*** ../modules/web-cli/assets/js/index.js ***! |