| @@ -1,7 +1,2090 @@ | ||
| 1 | +/*! elementor - v3.27.0 - 13-02-2025 */ | |
| 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 */ EnhancerArray: () => (/* binding */ EnhancerArray), | |
| 15 | +/* harmony export */ MiddlewareArray: () => (/* binding */ MiddlewareArray), | |
| 16 | +/* harmony export */ SHOULD_AUTOBATCH: () => (/* binding */ SHOULD_AUTOBATCH), | |
| 17 | +/* harmony export */ TaskAbortError: () => (/* binding */ TaskAbortError), | |
| 18 | +/* harmony export */ __DO_NOT_USE__ActionTypes: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.__DO_NOT_USE__ActionTypes), | |
| 19 | +/* harmony export */ addListener: () => (/* binding */ addListener), | |
| 20 | +/* harmony export */ applyMiddleware: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware), | |
| 21 | +/* harmony export */ autoBatchEnhancer: () => (/* binding */ autoBatchEnhancer), | |
| 22 | +/* harmony export */ bindActionCreators: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.bindActionCreators), | |
| 23 | +/* harmony export */ clearAllListeners: () => (/* binding */ clearAllListeners), | |
| 24 | +/* harmony export */ combineReducers: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers), | |
| 25 | +/* harmony export */ compose: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.compose), | |
| 26 | +/* harmony export */ configureStore: () => (/* binding */ configureStore), | |
| 27 | +/* harmony export */ createAction: () => (/* binding */ createAction), | |
| 28 | +/* harmony export */ createActionCreatorInvariantMiddleware: () => (/* binding */ createActionCreatorInvariantMiddleware), | |
| 29 | +/* harmony export */ createAsyncThunk: () => (/* binding */ createAsyncThunk), | |
| 30 | +/* harmony export */ createDraftSafeSelector: () => (/* binding */ createDraftSafeSelector), | |
| 31 | +/* harmony export */ createEntityAdapter: () => (/* binding */ createEntityAdapter), | |
| 32 | +/* harmony export */ createImmutableStateInvariantMiddleware: () => (/* binding */ createImmutableStateInvariantMiddleware), | |
| 33 | +/* harmony export */ createListenerMiddleware: () => (/* binding */ createListenerMiddleware), | |
| 34 | +/* harmony export */ createNextState: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__["default"]), | |
| 35 | +/* harmony export */ createReducer: () => (/* binding */ createReducer), | |
| 36 | +/* harmony export */ createSelector: () => (/* reexport safe */ reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector), | |
| 37 | +/* harmony export */ createSerializableStateInvariantMiddleware: () => (/* binding */ createSerializableStateInvariantMiddleware), | |
| 38 | +/* harmony export */ createSlice: () => (/* binding */ createSlice), | |
| 39 | +/* harmony export */ createStore: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.createStore), | |
| 40 | +/* harmony export */ current: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.current), | |
| 41 | +/* harmony export */ findNonSerializableValue: () => (/* binding */ findNonSerializableValue), | |
| 42 | +/* harmony export */ freeze: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.freeze), | |
| 43 | +/* harmony export */ getDefaultMiddleware: () => (/* binding */ getDefaultMiddleware), | |
| 44 | +/* harmony export */ getType: () => (/* binding */ getType), | |
| 45 | +/* harmony export */ isAction: () => (/* binding */ isAction), | |
| 46 | +/* harmony export */ isActionCreator: () => (/* binding */ isActionCreator), | |
| 47 | +/* harmony export */ isAllOf: () => (/* binding */ isAllOf), | |
| 48 | +/* harmony export */ isAnyOf: () => (/* binding */ isAnyOf), | |
| 49 | +/* harmony export */ isAsyncThunkAction: () => (/* binding */ isAsyncThunkAction), | |
| 50 | +/* harmony export */ isDraft: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.isDraft), | |
| 51 | +/* harmony export */ isFluxStandardAction: () => (/* binding */ isFSA), | |
| 52 | +/* harmony export */ isFulfilled: () => (/* binding */ isFulfilled), | |
| 53 | +/* harmony export */ isImmutableDefault: () => (/* binding */ isImmutableDefault), | |
| 54 | +/* harmony export */ isPending: () => (/* binding */ isPending), | |
| 55 | +/* harmony export */ isPlain: () => (/* binding */ isPlain), | |
| 56 | +/* harmony export */ isPlainObject: () => (/* binding */ isPlainObject), | |
| 57 | +/* harmony export */ isRejected: () => (/* binding */ isRejected), | |
| 58 | +/* harmony export */ isRejectedWithValue: () => (/* binding */ isRejectedWithValue), | |
| 59 | +/* harmony export */ legacy_createStore: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.legacy_createStore), | |
| 60 | +/* harmony export */ miniSerializeError: () => (/* binding */ miniSerializeError), | |
| 61 | +/* harmony export */ nanoid: () => (/* binding */ nanoid), | |
| 62 | +/* harmony export */ original: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.original), | |
| 63 | +/* harmony export */ prepareAutoBatched: () => (/* binding */ prepareAutoBatched), | |
| 64 | +/* harmony export */ removeListener: () => (/* binding */ removeListener), | |
| 65 | +/* harmony export */ unwrapResult: () => (/* binding */ unwrapResult) | |
| 66 | +/* harmony export */ }); | |
| 67 | +/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! immer */ "../node_modules/immer/dist/immer.esm.mjs"); | |
| 68 | +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux */ "../node_modules/redux/es/redux.js"); | |
| 69 | +/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! reselect */ "../node_modules/reselect/es/index.js"); | |
| 70 | +/* harmony import */ var redux_thunk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! redux-thunk */ "../node_modules/redux-thunk/es/index.js"); | |
| 71 | +var __extends = (undefined && undefined.__extends) || (function () { | |
| 72 | + var extendStatics = function (d, b) { | |
| 73 | + extendStatics = Object.setPrototypeOf || | |
| 74 | + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | |
| 75 | + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | |
| 76 | + return extendStatics(d, b); | |
| 77 | + }; | |
| 78 | + return function (d, b) { | |
| 79 | + if (typeof b !== "function" && b !== null) | |
| 80 | + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | |
| 81 | + extendStatics(d, b); | |
| 82 | + function __() { this.constructor = d; } | |
| 83 | + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
| 84 | + }; | |
| 85 | +})(); | |
| 86 | +var __generator = (undefined && undefined.__generator) || function (thisArg, body) { | |
| 87 | + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | |
| 88 | + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | |
| 89 | + function verb(n) { return function (v) { return step([n, v]); }; } | |
| 90 | + function step(op) { | |
| 91 | + if (f) throw new TypeError("Generator is already executing."); | |
| 92 | + while (_) try { | |
| 93 | + 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; | |
| 94 | + if (y = 0, t) op = [op[0] & 2, t.value]; | |
| 95 | + switch (op[0]) { | |
| 96 | + case 0: case 1: t = op; break; | |
| 97 | + case 4: _.label++; return { value: op[1], done: false }; | |
| 98 | + case 5: _.label++; y = op[1]; op = [0]; continue; | |
| 99 | + case 7: op = _.ops.pop(); _.trys.pop(); continue; | |
| 100 | + default: | |
| 101 | + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | |
| 102 | + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | |
| 103 | + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | |
| 104 | + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | |
| 105 | + if (t[2]) _.ops.pop(); | |
| 106 | + _.trys.pop(); continue; | |
| 107 | + } | |
| 108 | + op = body.call(thisArg, _); | |
| 109 | + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | |
| 110 | + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | |
| 111 | + } | |
| 112 | +}; | |
| 113 | +var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) { | |
| 114 | + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | |
| 115 | + to[j] = from[i]; | |
| 116 | + return to; | |
| 117 | +}; | |
| 118 | +var __defProp = Object.defineProperty; | |
| 119 | +var __defProps = Object.defineProperties; | |
| 120 | +var __getOwnPropDescs = Object.getOwnPropertyDescriptors; | |
| 121 | +var __getOwnPropSymbols = Object.getOwnPropertySymbols; | |
| 122 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 123 | +var __propIsEnum = Object.prototype.propertyIsEnumerable; | |
| 124 | +var __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; }; | |
| 125 | +var __spreadValues = function (a, b) { | |
| 126 | + for (var prop in b || (b = {})) | |
| 127 | + if (__hasOwnProp.call(b, prop)) | |
| 128 | + __defNormalProp(a, prop, b[prop]); | |
| 129 | + if (__getOwnPropSymbols) | |
| 130 | + for (var _i = 0, _c = __getOwnPropSymbols(b); _i < _c.length; _i++) { | |
| 131 | + var prop = _c[_i]; | |
| 132 | + if (__propIsEnum.call(b, prop)) | |
| 133 | + __defNormalProp(a, prop, b[prop]); | |
| 134 | + } | |
| 135 | + return a; | |
| 136 | +}; | |
| 137 | +var __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); }; | |
| 138 | +var __async = function (__this, __arguments, generator) { | |
| 139 | + return new Promise(function (resolve, reject) { | |
| 140 | + var fulfilled = function (value) { | |
| 141 | + try { | |
| 142 | + step(generator.next(value)); | |
| 143 | + } | |
| 144 | + catch (e) { | |
| 145 | + reject(e); | |
| 146 | + } | |
| 147 | + }; | |
| 148 | + var rejected = function (value) { | |
| 149 | + try { | |
| 150 | + step(generator.throw(value)); | |
| 151 | + } | |
| 152 | + catch (e) { | |
| 153 | + reject(e); | |
| 154 | + } | |
| 155 | + }; | |
| 156 | + var step = function (x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); }; | |
| 157 | + step((generator = generator.apply(__this, __arguments)).next()); | |
| 158 | + }); | |
| 159 | +}; | |
| 160 | +// src/index.ts | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | +// src/createDraftSafeSelector.ts | |
| 166 | + | |
| 167 | + | |
| 168 | +var createDraftSafeSelector = function () { | |
| 169 | + var args = []; | |
| 170 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 171 | + args[_i] = arguments[_i]; | |
| 172 | + } | |
| 173 | + var selector = reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector.apply(void 0, args); | |
| 174 | + var wrappedSelector = function (value) { | |
| 175 | + var rest = []; | |
| 176 | + for (var _i = 1; _i < arguments.length; _i++) { | |
| 177 | + rest[_i - 1] = arguments[_i]; | |
| 178 | + } | |
| 179 | + return selector.apply(void 0, __spreadArray([(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(value) ? (0,immer__WEBPACK_IMPORTED_MODULE_2__.current)(value) : value], rest)); | |
| 180 | + }; | |
| 181 | + return wrappedSelector; | |
| 182 | +}; | |
| 183 | +// src/configureStore.ts | |
| 184 | + | |
| 185 | +// src/devtoolsExtension.ts | |
| 186 | + | |
| 187 | +var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () { | |
| 188 | + if (arguments.length === 0) | |
| 189 | + return void 0; | |
| 190 | + if (typeof arguments[0] === "object") | |
| 191 | + return redux__WEBPACK_IMPORTED_MODULE_0__.compose; | |
| 192 | + return redux__WEBPACK_IMPORTED_MODULE_0__.compose.apply(null, arguments); | |
| 193 | +}; | |
| 194 | +var devToolsEnhancer = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () { | |
| 195 | + return function (noop2) { | |
| 196 | + return noop2; | |
| 197 | + }; | |
| 198 | +}; | |
| 199 | +// src/isPlainObject.ts | |
| 200 | +function isPlainObject(value) { | |
| 201 | + if (typeof value !== "object" || value === null) | |
| 202 | + return false; | |
| 203 | + var proto = Object.getPrototypeOf(value); | |
| 204 | + if (proto === null) | |
| 205 | + return true; | |
| 206 | + var baseProto = proto; | |
| 207 | + while (Object.getPrototypeOf(baseProto) !== null) { | |
| 208 | + baseProto = Object.getPrototypeOf(baseProto); | |
| 209 | + } | |
| 210 | + return proto === baseProto; | |
| 211 | +} | |
| 212 | +// src/getDefaultMiddleware.ts | |
| 213 | + | |
| 214 | +// src/tsHelpers.ts | |
| 215 | +var hasMatchFunction = function (v) { | |
| 216 | + return v && typeof v.match === "function"; | |
| 217 | +}; | |
| 218 | +// src/createAction.ts | |
| 219 | +function createAction(type, prepareAction) { | |
| 220 | + function actionCreator() { | |
| 221 | + var args = []; | |
| 222 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 223 | + args[_i] = arguments[_i]; | |
| 224 | + } | |
| 225 | + if (prepareAction) { | |
| 226 | + var prepared = prepareAction.apply(void 0, args); | |
| 227 | + if (!prepared) { | |
| 228 | + throw new Error("prepareAction did not return an object"); | |
| 229 | + } | |
| 230 | + return __spreadValues(__spreadValues({ | |
| 231 | + type: type, | |
| 232 | + payload: prepared.payload | |
| 233 | + }, "meta" in prepared && { meta: prepared.meta }), "error" in prepared && { error: prepared.error }); | |
| 234 | + } | |
| 235 | + return { type: type, payload: args[0] }; | |
| 236 | + } | |
| 237 | + actionCreator.toString = function () { return "" + type; }; | |
| 238 | + actionCreator.type = type; | |
| 239 | + actionCreator.match = function (action) { return action.type === type; }; | |
| 240 | + return actionCreator; | |
| 241 | +} | |
| 242 | +function isAction(action) { | |
| 243 | + return isPlainObject(action) && "type" in action; | |
| 244 | +} | |
| 245 | +function isActionCreator(action) { | |
| 246 | + return typeof action === "function" && "type" in action && hasMatchFunction(action); | |
| 247 | +} | |
| 248 | +function isFSA(action) { | |
| 249 | + return isAction(action) && typeof action.type === "string" && Object.keys(action).every(isValidKey); | |
| 250 | +} | |
| 251 | +function isValidKey(key) { | |
| 252 | + return ["type", "payload", "error", "meta"].indexOf(key) > -1; | |
| 253 | +} | |
| 254 | +function getType(actionCreator) { | |
| 255 | + return "" + actionCreator; | |
| 256 | +} | |
| 257 | +// src/actionCreatorInvariantMiddleware.ts | |
| 258 | +function getMessage(type) { | |
| 259 | + var splitType = type ? ("" + type).split("/") : []; | |
| 260 | + var actionName = splitType[splitType.length - 1] || "actionCreator"; | |
| 261 | + return "Detected an action creator with type \"" + (type || "unknown") + "\" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. `dispatch(" + actionName + "())` instead of `dispatch(" + actionName + ")`. This is necessary even if the action has no payload."; | |
| 262 | +} | |
| 263 | +function createActionCreatorInvariantMiddleware(options) { | |
| 264 | + if (options === void 0) { options = {}; } | |
| 265 | + if (false) {} | |
| 266 | + var _c = options.isActionCreator, isActionCreator2 = _c === void 0 ? isActionCreator : _c; | |
| 267 | + return function () { return function (next) { return function (action) { | |
| 268 | + if (isActionCreator2(action)) { | |
| 269 | + console.warn(getMessage(action.type)); | |
| 270 | + } | |
| 271 | + return next(action); | |
| 272 | + }; }; }; | |
| 273 | +} | |
| 274 | +// src/utils.ts | |
| 275 | + | |
| 276 | +function getTimeMeasureUtils(maxDelay, fnName) { | |
| 277 | + var elapsed = 0; | |
| 278 | + return { | |
| 279 | + measureTime: function (fn) { | |
| 280 | + var started = Date.now(); | |
| 281 | + try { | |
| 282 | + return fn(); | |
| 283 | + } | |
| 284 | + finally { | |
| 285 | + var finished = Date.now(); | |
| 286 | + elapsed += finished - started; | |
| 287 | + } | |
| 288 | + }, | |
| 289 | + warnIfExceeded: function () { | |
| 290 | + if (elapsed > maxDelay) { | |
| 291 | + 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."); | |
| 292 | + } | |
| 293 | + } | |
| 294 | + }; | |
| 295 | +} | |
| 296 | +var MiddlewareArray = /** @class */ (function (_super) { | |
| 297 | + __extends(MiddlewareArray, _super); | |
| 298 | + function MiddlewareArray() { | |
| 299 | + var args = []; | |
| 300 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 301 | + args[_i] = arguments[_i]; | |
| 302 | + } | |
| 303 | + var _this = _super.apply(this, args) || this; | |
| 304 | + Object.setPrototypeOf(_this, MiddlewareArray.prototype); | |
| 305 | + return _this; | |
| 306 | + } | |
| 307 | + Object.defineProperty(MiddlewareArray, Symbol.species, { | |
| 308 | + get: function () { | |
| 309 | + return MiddlewareArray; | |
| 310 | + }, | |
| 311 | + enumerable: false, | |
| 312 | + configurable: true | |
| 313 | + }); | |
| 314 | + MiddlewareArray.prototype.concat = function () { | |
| 315 | + var arr = []; | |
| 316 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 317 | + arr[_i] = arguments[_i]; | |
| 318 | + } | |
| 319 | + return _super.prototype.concat.apply(this, arr); | |
| 320 | + }; | |
| 321 | + MiddlewareArray.prototype.prepend = function () { | |
| 322 | + var arr = []; | |
| 323 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 324 | + arr[_i] = arguments[_i]; | |
| 325 | + } | |
| 326 | + if (arr.length === 1 && Array.isArray(arr[0])) { | |
| 327 | + return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))(); | |
| 328 | + } | |
| 329 | + return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))(); | |
| 330 | + }; | |
| 331 | + return MiddlewareArray; | |
| 332 | +}(Array)); | |
| 333 | +var EnhancerArray = /** @class */ (function (_super) { | |
| 334 | + __extends(EnhancerArray, _super); | |
| 335 | + function EnhancerArray() { | |
| 336 | + var args = []; | |
| 337 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 338 | + args[_i] = arguments[_i]; | |
| 339 | + } | |
| 340 | + var _this = _super.apply(this, args) || this; | |
| 341 | + Object.setPrototypeOf(_this, EnhancerArray.prototype); | |
| 342 | + return _this; | |
| 343 | + } | |
| 344 | + Object.defineProperty(EnhancerArray, Symbol.species, { | |
| 345 | + get: function () { | |
| 346 | + return EnhancerArray; | |
| 347 | + }, | |
| 348 | + enumerable: false, | |
| 349 | + configurable: true | |
| 350 | + }); | |
| 351 | + EnhancerArray.prototype.concat = function () { | |
| 352 | + var arr = []; | |
| 353 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 354 | + arr[_i] = arguments[_i]; | |
| 355 | + } | |
| 356 | + return _super.prototype.concat.apply(this, arr); | |
| 357 | + }; | |
| 358 | + EnhancerArray.prototype.prepend = function () { | |
| 359 | + var arr = []; | |
| 360 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 361 | + arr[_i] = arguments[_i]; | |
| 362 | + } | |
| 363 | + if (arr.length === 1 && Array.isArray(arr[0])) { | |
| 364 | + return new (EnhancerArray.bind.apply(EnhancerArray, __spreadArray([void 0], arr[0].concat(this))))(); | |
| 365 | + } | |
| 366 | + return new (EnhancerArray.bind.apply(EnhancerArray, __spreadArray([void 0], arr.concat(this))))(); | |
| 367 | + }; | |
| 368 | + return EnhancerArray; | |
| 369 | +}(Array)); | |
| 370 | +function freezeDraftable(val) { | |
| 371 | + return (0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraftable)(val) ? (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(val, function () { | |
| 372 | + }) : val; | |
| 373 | +} | |
| 374 | +// src/immutableStateInvariantMiddleware.ts | |
| 375 | +var isProduction = "development" === "production"; | |
| 376 | +var prefix = "Invariant failed"; | |
| 377 | +function invariant(condition, message) { | |
| 378 | + if (condition) { | |
| 379 | + return; | |
| 380 | + } | |
| 381 | + if (isProduction) { | |
| 382 | + throw new Error(prefix); | |
| 383 | + } | |
| 384 | + throw new Error(prefix + ": " + (message || "")); | |
| 385 | +} | |
| 386 | +function stringify(obj, serializer, indent, decycler) { | |
| 387 | + return JSON.stringify(obj, getSerialize(serializer, decycler), indent); | |
| 388 | +} | |
| 389 | +function getSerialize(serializer, decycler) { | |
| 390 | + var stack = [], keys = []; | |
| 391 | + if (!decycler) | |
| 392 | + decycler = function (_, value) { | |
| 393 | + if (stack[0] === value) | |
| 394 | + return "[Circular ~]"; | |
| 395 | + return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"; | |
| 396 | + }; | |
| 397 | + return function (key, value) { | |
| 398 | + if (stack.length > 0) { | |
| 399 | + var thisPos = stack.indexOf(this); | |
| 400 | + ~thisPos ? stack.splice(thisPos + 1) : stack.push(this); | |
| 401 | + ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key); | |
| 402 | + if (~stack.indexOf(value)) | |
| 403 | + value = decycler.call(this, key, value); | |
| 404 | + } | |
| 405 | + else | |
| 406 | + stack.push(value); | |
| 407 | + return serializer == null ? value : serializer.call(this, key, value); | |
| 408 | + }; | |
| 409 | +} | |
| 410 | +function isImmutableDefault(value) { | |
| 411 | + return typeof value !== "object" || value == null || Object.isFrozen(value); | |
| 412 | +} | |
| 413 | +function trackForMutations(isImmutable, ignorePaths, obj) { | |
| 414 | + var trackedProperties = trackProperties(isImmutable, ignorePaths, obj); | |
| 415 | + return { | |
| 416 | + detectMutations: function () { | |
| 417 | + return detectMutations(isImmutable, ignorePaths, trackedProperties, obj); | |
| 418 | + } | |
| 419 | + }; | |
| 420 | +} | |
| 421 | +function trackProperties(isImmutable, ignorePaths, obj, path, checkedObjects) { | |
| 422 | + if (ignorePaths === void 0) { ignorePaths = []; } | |
| 423 | + if (path === void 0) { path = ""; } | |
| 424 | + if (checkedObjects === void 0) { checkedObjects = new Set(); } | |
| 425 | + var tracked = { value: obj }; | |
| 426 | + if (!isImmutable(obj) && !checkedObjects.has(obj)) { | |
| 427 | + checkedObjects.add(obj); | |
| 428 | + tracked.children = {}; | |
| 429 | + for (var key in obj) { | |
| 430 | + var childPath = path ? path + "." + key : key; | |
| 431 | + if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) { | |
| 432 | + continue; | |
| 433 | + } | |
| 434 | + tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath); | |
| 435 | + } | |
| 436 | + } | |
| 437 | + return tracked; | |
| 438 | +} | |
| 439 | +function detectMutations(isImmutable, ignoredPaths, trackedProperty, obj, sameParentRef, path) { | |
| 440 | + if (ignoredPaths === void 0) { ignoredPaths = []; } | |
| 441 | + if (sameParentRef === void 0) { sameParentRef = false; } | |
| 442 | + if (path === void 0) { path = ""; } | |
| 443 | + var prevObj = trackedProperty ? trackedProperty.value : void 0; | |
| 444 | + var sameRef = prevObj === obj; | |
| 445 | + if (sameParentRef && !sameRef && !Number.isNaN(obj)) { | |
| 446 | + return { wasMutated: true, path: path }; | |
| 447 | + } | |
| 448 | + if (isImmutable(prevObj) || isImmutable(obj)) { | |
| 449 | + return { wasMutated: false }; | |
| 450 | + } | |
| 451 | + var keysToDetect = {}; | |
| 452 | + for (var key in trackedProperty.children) { | |
| 453 | + keysToDetect[key] = true; | |
| 454 | + } | |
| 455 | + for (var key in obj) { | |
| 456 | + keysToDetect[key] = true; | |
| 457 | + } | |
| 458 | + var hasIgnoredPaths = ignoredPaths.length > 0; | |
| 459 | + var _loop_1 = function (key) { | |
| 460 | + var nestedPath = path ? path + "." + key : key; | |
| 461 | + if (hasIgnoredPaths) { | |
| 462 | + var hasMatches = ignoredPaths.some(function (ignored) { | |
| 463 | + if (ignored instanceof RegExp) { | |
| 464 | + return ignored.test(nestedPath); | |
| 465 | + } | |
| 466 | + return nestedPath === ignored; | |
| 467 | + }); | |
| 468 | + if (hasMatches) { | |
| 469 | + return "continue"; | |
| 470 | + } | |
| 471 | + } | |
| 472 | + var result = detectMutations(isImmutable, ignoredPaths, trackedProperty.children[key], obj[key], sameRef, nestedPath); | |
| 473 | + if (result.wasMutated) { | |
| 474 | + return { value: result }; | |
| 475 | + } | |
| 476 | + }; | |
| 477 | + for (var key in keysToDetect) { | |
| 478 | + var state_1 = _loop_1(key); | |
| 479 | + if (typeof state_1 === "object") | |
| 480 | + return state_1.value; | |
| 481 | + } | |
| 482 | + return { wasMutated: false }; | |
| 483 | +} | |
| 484 | +function createImmutableStateInvariantMiddleware(options) { | |
| 485 | + if (options === void 0) { options = {}; } | |
| 486 | + if (false) {} | |
| 487 | + 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; | |
| 488 | + ignoredPaths = ignoredPaths || ignore; | |
| 489 | + var track = trackForMutations.bind(null, isImmutable, ignoredPaths); | |
| 490 | + return function (_c) { | |
| 491 | + var getState = _c.getState; | |
| 492 | + var state = getState(); | |
| 493 | + var tracker = track(state); | |
| 494 | + var result; | |
| 495 | + return function (next) { return function (action) { | |
| 496 | + var measureUtils = getTimeMeasureUtils(warnAfter, "ImmutableStateInvariantMiddleware"); | |
| 497 | + measureUtils.measureTime(function () { | |
| 498 | + state = getState(); | |
| 499 | + result = tracker.detectMutations(); | |
| 500 | + tracker = track(state); | |
| 501 | + 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)"); | |
| 502 | + }); | |
| 503 | + var dispatchedAction = next(action); | |
| 504 | + measureUtils.measureTime(function () { | |
| 505 | + state = getState(); | |
| 506 | + result = tracker.detectMutations(); | |
| 507 | + tracker = track(state); | |
| 508 | + 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)"); | |
| 509 | + }); | |
| 510 | + measureUtils.warnIfExceeded(); | |
| 511 | + return dispatchedAction; | |
| 512 | + }; }; | |
| 513 | + }; | |
| 514 | +} | |
| 515 | +// src/serializableStateInvariantMiddleware.ts | |
| 516 | +function isPlain(val) { | |
| 517 | + var type = typeof val; | |
| 518 | + return val == null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val); | |
| 519 | +} | |
| 520 | +function findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths, cache) { | |
| 521 | + if (path === void 0) { path = ""; } | |
| 522 | + if (isSerializable === void 0) { isSerializable = isPlain; } | |
| 523 | + if (ignoredPaths === void 0) { ignoredPaths = []; } | |
| 524 | + var foundNestedSerializable; | |
| 525 | + if (!isSerializable(value)) { | |
| 526 | + return { | |
| 527 | + keyPath: path || "<root>", | |
| 528 | + value: value | |
| 529 | + }; | |
| 530 | + } | |
| 531 | + if (typeof value !== "object" || value === null) { | |
| 532 | + return false; | |
| 533 | + } | |
| 534 | + if (cache == null ? void 0 : cache.has(value)) | |
| 535 | + return false; | |
| 536 | + var entries = getEntries != null ? getEntries(value) : Object.entries(value); | |
| 537 | + var hasIgnoredPaths = ignoredPaths.length > 0; | |
| 538 | + var _loop_2 = function (key, nestedValue) { | |
| 539 | + var nestedPath = path ? path + "." + key : key; | |
| 540 | + if (hasIgnoredPaths) { | |
| 541 | + var hasMatches = ignoredPaths.some(function (ignored) { | |
| 542 | + if (ignored instanceof RegExp) { | |
| 543 | + return ignored.test(nestedPath); | |
| 544 | + } | |
| 545 | + return nestedPath === ignored; | |
| 546 | + }); | |
| 547 | + if (hasMatches) { | |
| 548 | + return "continue"; | |
| 549 | + } | |
| 550 | + } | |
| 551 | + if (!isSerializable(nestedValue)) { | |
| 552 | + return { value: { | |
| 553 | + keyPath: nestedPath, | |
| 554 | + value: nestedValue | |
| 555 | + } }; | |
| 556 | + } | |
| 557 | + if (typeof nestedValue === "object") { | |
| 558 | + foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths, cache); | |
| 559 | + if (foundNestedSerializable) { | |
| 560 | + return { value: foundNestedSerializable }; | |
| 561 | + } | |
| 562 | + } | |
| 563 | + }; | |
| 564 | + for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { | |
| 565 | + var _c = entries_1[_i], key = _c[0], nestedValue = _c[1]; | |
| 566 | + var state_2 = _loop_2(key, nestedValue); | |
| 567 | + if (typeof state_2 === "object") | |
| 568 | + return state_2.value; | |
| 569 | + } | |
| 570 | + if (cache && isNestedFrozen(value)) | |
| 571 | + cache.add(value); | |
| 572 | + return false; | |
| 573 | +} | |
| 574 | +function isNestedFrozen(value) { | |
| 575 | + if (!Object.isFrozen(value)) | |
| 576 | + return false; | |
| 577 | + for (var _i = 0, _c = Object.values(value); _i < _c.length; _i++) { | |
| 578 | + var nestedValue = _c[_i]; | |
| 579 | + if (typeof nestedValue !== "object" || nestedValue === null) | |
| 580 | + continue; | |
| 581 | + if (!isNestedFrozen(nestedValue)) | |
| 582 | + return false; | |
| 583 | + } | |
| 584 | + return true; | |
| 585 | +} | |
| 586 | +function createSerializableStateInvariantMiddleware(options) { | |
| 587 | + if (options === void 0) { options = {}; } | |
| 588 | + if (false) {} | |
| 589 | + var _c = options.isSerializable, isSerializable = _c === void 0 ? isPlain : _c, getEntries = options.getEntries, _d = options.ignoredActions, ignoredActions = _d === void 0 ? [] : _d, _e = options.ignoredActionPaths, ignoredActionPaths = _e === void 0 ? ["meta.arg", "meta.baseQueryMeta"] : _e, _f = options.ignoredPaths, ignoredPaths = _f === void 0 ? [] : _f, _g = options.warnAfter, warnAfter = _g === void 0 ? 32 : _g, _h = options.ignoreState, ignoreState = _h === void 0 ? false : _h, _j = options.ignoreActions, ignoreActions = _j === void 0 ? false : _j, _k = options.disableCache, disableCache = _k === void 0 ? false : _k; | |
| 590 | + var cache = !disableCache && WeakSet ? new WeakSet() : void 0; | |
| 591 | + return function (storeAPI) { return function (next) { return function (action) { | |
| 592 | + var result = next(action); | |
| 593 | + var measureUtils = getTimeMeasureUtils(warnAfter, "SerializableStateInvariantMiddleware"); | |
| 594 | + if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) { | |
| 595 | + measureUtils.measureTime(function () { | |
| 596 | + var foundActionNonSerializableValue = findNonSerializableValue(action, "", isSerializable, getEntries, ignoredActionPaths, cache); | |
| 597 | + if (foundActionNonSerializableValue) { | |
| 598 | + var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value; | |
| 599 | + 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)"); | |
| 600 | + } | |
| 601 | + }); | |
| 602 | + } | |
| 603 | + if (!ignoreState) { | |
| 604 | + measureUtils.measureTime(function () { | |
| 605 | + var state = storeAPI.getState(); | |
| 606 | + var foundStateNonSerializableValue = findNonSerializableValue(state, "", isSerializable, getEntries, ignoredPaths, cache); | |
| 607 | + if (foundStateNonSerializableValue) { | |
| 608 | + var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value; | |
| 609 | + 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)"); | |
| 610 | + } | |
| 611 | + }); | |
| 612 | + measureUtils.warnIfExceeded(); | |
| 613 | + } | |
| 614 | + return result; | |
| 615 | + }; }; }; | |
| 616 | +} | |
| 617 | +// src/getDefaultMiddleware.ts | |
| 618 | +function isBoolean(x) { | |
| 619 | + return typeof x === "boolean"; | |
| 620 | +} | |
| 621 | +function curryGetDefaultMiddleware() { | |
| 622 | + return function curriedGetDefaultMiddleware(options) { | |
| 623 | + return getDefaultMiddleware(options); | |
| 624 | + }; | |
| 625 | +} | |
| 626 | +function getDefaultMiddleware(options) { | |
| 627 | + if (options === void 0) { options = {}; } | |
| 628 | + var _c = options.thunk, thunk = _c === void 0 ? true : _c, _d = options.immutableCheck, immutableCheck = _d === void 0 ? true : _d, _e = options.serializableCheck, serializableCheck = _e === void 0 ? true : _e, _f = options.actionCreatorCheck, actionCreatorCheck = _f === void 0 ? true : _f; | |
| 629 | + var middlewareArray = new MiddlewareArray(); | |
| 630 | + if (thunk) { | |
| 631 | + if (isBoolean(thunk)) { | |
| 632 | + middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"]); | |
| 633 | + } | |
| 634 | + else { | |
| 635 | + middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"].withExtraArgument(thunk.extraArgument)); | |
| 636 | + } | |
| 637 | + } | |
| 638 | + if (true) { | |
| 639 | + if (immutableCheck) { | |
| 640 | + var immutableOptions = {}; | |
| 641 | + if (!isBoolean(immutableCheck)) { | |
| 642 | + immutableOptions = immutableCheck; | |
| 643 | + } | |
| 644 | + middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions)); | |
| 645 | + } | |
| 646 | + if (serializableCheck) { | |
| 647 | + var serializableOptions = {}; | |
| 648 | + if (!isBoolean(serializableCheck)) { | |
| 649 | + serializableOptions = serializableCheck; | |
| 650 | + } | |
| 651 | + middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions)); | |
| 652 | + } | |
| 653 | + if (actionCreatorCheck) { | |
| 654 | + var actionCreatorOptions = {}; | |
| 655 | + if (!isBoolean(actionCreatorCheck)) { | |
| 656 | + actionCreatorOptions = actionCreatorCheck; | |
| 657 | + } | |
| 658 | + middlewareArray.unshift(createActionCreatorInvariantMiddleware(actionCreatorOptions)); | |
| 659 | + } | |
| 660 | + } | |
| 661 | + return middlewareArray; | |
| 662 | +} | |
| 663 | +// src/configureStore.ts | |
| 664 | +var IS_PRODUCTION = "development" === "production"; | |
| 665 | +function configureStore(options) { | |
| 666 | + var curriedGetDefaultMiddleware = curryGetDefaultMiddleware(); | |
| 667 | + 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; | |
| 668 | + var rootReducer; | |
| 669 | + if (typeof reducer === "function") { | |
| 670 | + rootReducer = reducer; | |
| 671 | + } | |
| 672 | + else if (isPlainObject(reducer)) { | |
| 673 | + rootReducer = (0,redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers)(reducer); | |
| 674 | + } | |
| 675 | + else { | |
| 676 | + throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers'); | |
| 677 | + } | |
| 678 | + var finalMiddleware = middleware; | |
| 679 | + if (typeof finalMiddleware === "function") { | |
| 680 | + finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware); | |
| 681 | + if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) { | |
| 682 | + throw new Error("when using a middleware builder function, an array of middleware must be returned"); | |
| 683 | + } | |
| 684 | + } | |
| 685 | + if (!IS_PRODUCTION && finalMiddleware.some(function (item) { return typeof item !== "function"; })) { | |
| 686 | + throw new Error("each middleware provided to configureStore must be a function"); | |
| 687 | + } | |
| 688 | + var middlewareEnhancer = redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware.apply(void 0, finalMiddleware); | |
| 689 | + var finalCompose = redux__WEBPACK_IMPORTED_MODULE_0__.compose; | |
| 690 | + if (devTools) { | |
| 691 | + finalCompose = composeWithDevTools(__spreadValues({ | |
| 692 | + trace: !IS_PRODUCTION | |
| 693 | + }, typeof devTools === "object" && devTools)); | |
| 694 | + } | |
| 695 | + var defaultEnhancers = new EnhancerArray(middlewareEnhancer); | |
| 696 | + var storeEnhancers = defaultEnhancers; | |
| 697 | + if (Array.isArray(enhancers)) { | |
| 698 | + storeEnhancers = __spreadArray([middlewareEnhancer], enhancers); | |
| 699 | + } | |
| 700 | + else if (typeof enhancers === "function") { | |
| 701 | + storeEnhancers = enhancers(defaultEnhancers); | |
| 702 | + } | |
| 703 | + var composedEnhancer = finalCompose.apply(void 0, storeEnhancers); | |
| 704 | + return (0,redux__WEBPACK_IMPORTED_MODULE_0__.createStore)(rootReducer, preloadedState, composedEnhancer); | |
| 705 | +} | |
| 706 | +// src/createReducer.ts | |
| 707 | + | |
| 708 | +// src/mapBuilders.ts | |
| 709 | +function executeReducerBuilderCallback(builderCallback) { | |
| 710 | + var actionsMap = {}; | |
| 711 | + var actionMatchers = []; | |
| 712 | + var defaultCaseReducer; | |
| 713 | + var builder = { | |
| 714 | + addCase: function (typeOrActionCreator, reducer) { | |
| 715 | + if (true) { | |
| 716 | + if (actionMatchers.length > 0) { | |
| 717 | + throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`"); | |
| 718 | + } | |
| 719 | + if (defaultCaseReducer) { | |
| 720 | + throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`"); | |
| 721 | + } | |
| 722 | + } | |
| 723 | + var type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type; | |
| 724 | + if (!type) { | |
| 725 | + throw new Error("`builder.addCase` cannot be called with an empty action type"); | |
| 726 | + } | |
| 727 | + if (type in actionsMap) { | |
| 728 | + throw new Error("`builder.addCase` cannot be called with two reducers for the same action type"); | |
| 729 | + } | |
| 730 | + actionsMap[type] = reducer; | |
| 731 | + return builder; | |
| 732 | + }, | |
| 733 | + addMatcher: function (matcher, reducer) { | |
| 734 | + if (true) { | |
| 735 | + if (defaultCaseReducer) { | |
| 736 | + throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`"); | |
| 737 | + } | |
| 738 | + } | |
| 739 | + actionMatchers.push({ matcher: matcher, reducer: reducer }); | |
| 740 | + return builder; | |
| 741 | + }, | |
| 742 | + addDefaultCase: function (reducer) { | |
| 743 | + if (true) { | |
| 744 | + if (defaultCaseReducer) { | |
| 745 | + throw new Error("`builder.addDefaultCase` can only be called once"); | |
| 746 | + } | |
| 747 | + } | |
| 748 | + defaultCaseReducer = reducer; | |
| 749 | + return builder; | |
| 750 | + } | |
| 751 | + }; | |
| 752 | + builderCallback(builder); | |
| 753 | + return [actionsMap, actionMatchers, defaultCaseReducer]; | |
| 754 | +} | |
| 755 | +// src/createReducer.ts | |
| 756 | +function isStateFunction(x) { | |
| 757 | + return typeof x === "function"; | |
| 758 | +} | |
| 759 | +var hasWarnedAboutObjectNotation = false; | |
| 760 | +function createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) { | |
| 761 | + if (actionMatchers === void 0) { actionMatchers = []; } | |
| 762 | + if (true) { | |
| 763 | + if (typeof mapOrBuilderCallback === "object") { | |
| 764 | + if (!hasWarnedAboutObjectNotation) { | |
| 765 | + hasWarnedAboutObjectNotation = true; | |
| 766 | + console.warn("The object notation for `createReducer` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer"); | |
| 767 | + } | |
| 768 | + } | |
| 769 | + } | |
| 770 | + var _c = typeof mapOrBuilderCallback === "function" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _c[0], finalActionMatchers = _c[1], finalDefaultCaseReducer = _c[2]; | |
| 771 | + var getInitialState; | |
| 772 | + if (isStateFunction(initialState)) { | |
| 773 | + getInitialState = function () { return freezeDraftable(initialState()); }; | |
| 774 | + } | |
| 775 | + else { | |
| 776 | + var frozenInitialState_1 = freezeDraftable(initialState); | |
| 777 | + getInitialState = function () { return frozenInitialState_1; }; | |
| 778 | + } | |
| 779 | + function reducer(state, action) { | |
| 780 | + if (state === void 0) { state = getInitialState(); } | |
| 781 | + var caseReducers = __spreadArray([ | |
| 782 | + actionsMap[action.type] | |
| 783 | + ], finalActionMatchers.filter(function (_c) { | |
| 784 | + var matcher = _c.matcher; | |
| 785 | + return matcher(action); | |
| 786 | + }).map(function (_c) { | |
| 787 | + var reducer2 = _c.reducer; | |
| 788 | + return reducer2; | |
| 789 | + })); | |
| 790 | + if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) { | |
| 791 | + caseReducers = [finalDefaultCaseReducer]; | |
| 792 | + } | |
| 793 | + return caseReducers.reduce(function (previousState, caseReducer) { | |
| 794 | + if (caseReducer) { | |
| 795 | + if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(previousState)) { | |
| 796 | + var draft = previousState; | |
| 797 | + var result = caseReducer(draft, action); | |
| 798 | + if (result === void 0) { | |
| 799 | + return previousState; | |
| 800 | + } | |
| 801 | + return result; | |
| 802 | + } | |
| 803 | + else if (!(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraftable)(previousState)) { | |
| 804 | + var result = caseReducer(previousState, action); | |
| 805 | + if (result === void 0) { | |
| 806 | + if (previousState === null) { | |
| 807 | + return previousState; | |
| 808 | + } | |
| 809 | + throw Error("A case reducer on a non-draftable value must not return undefined"); | |
| 810 | + } | |
| 811 | + return result; | |
| 812 | + } | |
| 813 | + else { | |
| 814 | + return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(previousState, function (draft) { | |
| 815 | + return caseReducer(draft, action); | |
| 816 | + }); | |
| 817 | + } | |
| 818 | + } | |
| 819 | + return previousState; | |
| 820 | + }, state); | |
| 821 | + } | |
| 822 | + reducer.getInitialState = getInitialState; | |
| 823 | + return reducer; | |
| 824 | +} | |
| 825 | +// src/createSlice.ts | |
| 826 | +var hasWarnedAboutObjectNotation2 = false; | |
| 827 | +function getType2(slice, actionKey) { | |
| 828 | + return slice + "/" + actionKey; | |
| 829 | +} | |
| 830 | +function createSlice(options) { | |
| 831 | + var name = options.name; | |
| 832 | + if (!name) { | |
| 833 | + throw new Error("`name` is a required option for createSlice"); | |
| 834 | + } | |
| 835 | + if (typeof process !== "undefined" && "development" === "development") { | |
| 836 | + if (options.initialState === void 0) { | |
| 837 | + console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`"); | |
| 838 | + } | |
| 839 | + } | |
| 840 | + var initialState = typeof options.initialState == "function" ? options.initialState : freezeDraftable(options.initialState); | |
| 841 | + var reducers = options.reducers || {}; | |
| 842 | + var reducerNames = Object.keys(reducers); | |
| 843 | + var sliceCaseReducersByName = {}; | |
| 844 | + var sliceCaseReducersByType = {}; | |
| 845 | + var actionCreators = {}; | |
| 846 | + reducerNames.forEach(function (reducerName) { | |
| 847 | + var maybeReducerWithPrepare = reducers[reducerName]; | |
| 848 | + var type = getType2(name, reducerName); | |
| 849 | + var caseReducer; | |
| 850 | + var prepareCallback; | |
| 851 | + if ("reducer" in maybeReducerWithPrepare) { | |
| 852 | + caseReducer = maybeReducerWithPrepare.reducer; | |
| 853 | + prepareCallback = maybeReducerWithPrepare.prepare; | |
| 854 | + } | |
| 855 | + else { | |
| 856 | + caseReducer = maybeReducerWithPrepare; | |
| 857 | + } | |
| 858 | + sliceCaseReducersByName[reducerName] = caseReducer; | |
| 859 | + sliceCaseReducersByType[type] = caseReducer; | |
| 860 | + actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type); | |
| 861 | + }); | |
| 862 | + function buildReducer() { | |
| 863 | + if (true) { | |
| 864 | + if (typeof options.extraReducers === "object") { | |
| 865 | + if (!hasWarnedAboutObjectNotation2) { | |
| 866 | + hasWarnedAboutObjectNotation2 = true; | |
| 867 | + console.warn("The object notation for `createSlice.extraReducers` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice"); | |
| 868 | + } | |
| 869 | + } | |
| 870 | + } | |
| 871 | + 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; | |
| 872 | + var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType); | |
| 873 | + return createReducer(initialState, function (builder) { | |
| 874 | + for (var key in finalCaseReducers) { | |
| 875 | + builder.addCase(key, finalCaseReducers[key]); | |
| 876 | + } | |
| 877 | + for (var _i = 0, actionMatchers_1 = actionMatchers; _i < actionMatchers_1.length; _i++) { | |
| 878 | + var m = actionMatchers_1[_i]; | |
| 879 | + builder.addMatcher(m.matcher, m.reducer); | |
| 880 | + } | |
| 881 | + if (defaultCaseReducer) { | |
| 882 | + builder.addDefaultCase(defaultCaseReducer); | |
| 883 | + } | |
| 884 | + }); | |
| 885 | + } | |
| 886 | + var _reducer; | |
| 887 | + return { | |
| 888 | + name: name, | |
| 889 | + reducer: function (state, action) { | |
| 890 | + if (!_reducer) | |
| 891 | + _reducer = buildReducer(); | |
| 892 | + return _reducer(state, action); | |
| 893 | + }, | |
| 894 | + actions: actionCreators, | |
| 895 | + caseReducers: sliceCaseReducersByName, | |
| 896 | + getInitialState: function () { | |
| 897 | + if (!_reducer) | |
| 898 | + _reducer = buildReducer(); | |
| 899 | + return _reducer.getInitialState(); | |
| 900 | + } | |
| 901 | + }; | |
| 902 | +} | |
| 903 | +// src/entities/entity_state.ts | |
| 904 | +function getInitialEntityState() { | |
| 905 | + return { | |
| 906 | + ids: [], | |
| 907 | + entities: {} | |
| 908 | + }; | |
| 909 | +} | |
| 910 | +function createInitialStateFactory() { | |
| 911 | + function getInitialState(additionalState) { | |
| 912 | + if (additionalState === void 0) { additionalState = {}; } | |
| 913 | + return Object.assign(getInitialEntityState(), additionalState); | |
| 914 | + } | |
| 915 | + return { getInitialState: getInitialState }; | |
| 916 | +} | |
| 917 | +// src/entities/state_selectors.ts | |
| 918 | +function createSelectorsFactory() { | |
| 919 | + function getSelectors(selectState) { | |
| 920 | + var selectIds = function (state) { return state.ids; }; | |
| 921 | + var selectEntities = function (state) { return state.entities; }; | |
| 922 | + var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); }); | |
| 923 | + var selectId = function (_, id) { return id; }; | |
| 924 | + var selectById = function (entities, id) { return entities[id]; }; | |
| 925 | + var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; }); | |
| 926 | + if (!selectState) { | |
| 927 | + return { | |
| 928 | + selectIds: selectIds, | |
| 929 | + selectEntities: selectEntities, | |
| 930 | + selectAll: selectAll, | |
| 931 | + selectTotal: selectTotal, | |
| 932 | + selectById: createDraftSafeSelector(selectEntities, selectId, selectById) | |
| 933 | + }; | |
| 934 | + } | |
| 935 | + var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities); | |
| 936 | + return { | |
| 937 | + selectIds: createDraftSafeSelector(selectState, selectIds), | |
| 938 | + selectEntities: selectGlobalizedEntities, | |
| 939 | + selectAll: createDraftSafeSelector(selectState, selectAll), | |
| 940 | + selectTotal: createDraftSafeSelector(selectState, selectTotal), | |
| 941 | + selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById) | |
| 942 | + }; | |
| 943 | + } | |
| 944 | + return { getSelectors: getSelectors }; | |
| 945 | +} | |
| 946 | +// src/entities/state_adapter.ts | |
| 947 | + | |
| 948 | +function createSingleArgumentStateOperator(mutator) { | |
| 949 | + var operator = createStateOperator(function (_, state) { return mutator(state); }); | |
| 950 | + return function operation(state) { | |
| 951 | + return operator(state, void 0); | |
| 952 | + }; | |
| 953 | +} | |
| 954 | +function createStateOperator(mutator) { | |
| 955 | + return function operation(state, arg) { | |
| 956 | + function isPayloadActionArgument(arg2) { | |
| 957 | + return isFSA(arg2); | |
| 958 | + } | |
| 959 | + var runMutator = function (draft) { | |
| 960 | + if (isPayloadActionArgument(arg)) { | |
| 961 | + mutator(arg.payload, draft); | |
| 962 | + } | |
| 963 | + else { | |
| 964 | + mutator(arg, draft); | |
| 965 | + } | |
| 966 | + }; | |
| 967 | + if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(state)) { | |
| 968 | + runMutator(state); | |
| 969 | + return state; | |
| 970 | + } | |
| 971 | + else { | |
| 972 | + return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(state, runMutator); | |
| 973 | + } | |
| 974 | + }; | |
| 975 | +} | |
| 976 | +// src/entities/utils.ts | |
| 977 | +function selectIdValue(entity, selectId) { | |
| 978 | + var key = selectId(entity); | |
| 979 | + if ( true && key === void 0) { | |
| 980 | + 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()); | |
| 981 | + } | |
| 982 | + return key; | |
| 983 | +} | |
| 984 | +function ensureEntitiesArray(entities) { | |
| 985 | + if (!Array.isArray(entities)) { | |
| 986 | + entities = Object.values(entities); | |
| 987 | + } | |
| 988 | + return entities; | |
| 989 | +} | |
| 990 | +function splitAddedUpdatedEntities(newEntities, selectId, state) { | |
| 991 | + newEntities = ensureEntitiesArray(newEntities); | |
| 992 | + var added = []; | |
| 993 | + var updated = []; | |
| 994 | + for (var _i = 0, newEntities_1 = newEntities; _i < newEntities_1.length; _i++) { | |
| 995 | + var entity = newEntities_1[_i]; | |
| 996 | + var id = selectIdValue(entity, selectId); | |
| 997 | + if (id in state.entities) { | |
| 998 | + updated.push({ id: id, changes: entity }); | |
| 999 | + } | |
| 1000 | + else { | |
| 1001 | + added.push(entity); | |
| 1002 | + } | |
| 1003 | + } | |
| 1004 | + return [added, updated]; | |
| 1005 | +} | |
| 1006 | +// src/entities/unsorted_state_adapter.ts | |
| 1007 | +function createUnsortedStateAdapter(selectId) { | |
| 1008 | + function addOneMutably(entity, state) { | |
| 1009 | + var key = selectIdValue(entity, selectId); | |
| 1010 | + if (key in state.entities) { | |
| 1011 | + return; | |
| 1012 | + } | |
| 1013 | + state.ids.push(key); | |
| 1014 | + state.entities[key] = entity; | |
| 1015 | + } | |
| 1016 | + function addManyMutably(newEntities, state) { | |
| 1017 | + newEntities = ensureEntitiesArray(newEntities); | |
| 1018 | + for (var _i = 0, newEntities_2 = newEntities; _i < newEntities_2.length; _i++) { | |
| 1019 | + var entity = newEntities_2[_i]; | |
| 1020 | + addOneMutably(entity, state); | |
| 1021 | + } | |
| 1022 | + } | |
| 1023 | + function setOneMutably(entity, state) { | |
| 1024 | + var key = selectIdValue(entity, selectId); | |
| 1025 | + if (!(key in state.entities)) { | |
| 1026 | + state.ids.push(key); | |
| 1027 | + } | |
| 1028 | + state.entities[key] = entity; | |
| 1029 | + } | |
| 1030 | + function setManyMutably(newEntities, state) { | |
| 1031 | + newEntities = ensureEntitiesArray(newEntities); | |
| 1032 | + for (var _i = 0, newEntities_3 = newEntities; _i < newEntities_3.length; _i++) { | |
| 1033 | + var entity = newEntities_3[_i]; | |
| 1034 | + setOneMutably(entity, state); | |
| 1035 | + } | |
| 1036 | + } | |
| 1037 | + function setAllMutably(newEntities, state) { | |
| 1038 | + newEntities = ensureEntitiesArray(newEntities); | |
| 1039 | + state.ids = []; | |
| 1040 | + state.entities = {}; | |
| 1041 | + addManyMutably(newEntities, state); | |
| 1042 | + } | |
| 1043 | + function removeOneMutably(key, state) { | |
| 1044 | + return removeManyMutably([key], state); | |
| 1045 | + } | |
| 1046 | + function removeManyMutably(keys, state) { | |
| 1047 | + var didMutate = false; | |
| 1048 | + keys.forEach(function (key) { | |
| 1049 | + if (key in state.entities) { | |
| 1050 | + delete state.entities[key]; | |
| 1051 | + didMutate = true; | |
| 1052 | + } | |
| 1053 | + }); | |
| 1054 | + if (didMutate) { | |
| 1055 | + state.ids = state.ids.filter(function (id) { return id in state.entities; }); | |
| 1056 | + } | |
| 1057 | + } | |
| 1058 | + function removeAllMutably(state) { | |
| 1059 | + Object.assign(state, { | |
| 1060 | + ids: [], | |
| 1061 | + entities: {} | |
| 1062 | + }); | |
| 1063 | + } | |
| 1064 | + function takeNewKey(keys, update, state) { | |
| 1065 | + var original2 = state.entities[update.id]; | |
| 1066 | + var updated = Object.assign({}, original2, update.changes); | |
| 1067 | + var newKey = selectIdValue(updated, selectId); | |
| 1068 | + var hasNewKey = newKey !== update.id; | |
| 1069 | + if (hasNewKey) { | |
| 1070 | + keys[update.id] = newKey; | |
| 1071 | + delete state.entities[update.id]; | |
| 1072 | + } | |
| 1073 | + state.entities[newKey] = updated; | |
| 1074 | + return hasNewKey; | |
| 1075 | + } | |
| 1076 | + function updateOneMutably(update, state) { | |
| 1077 | + return updateManyMutably([update], state); | |
| 1078 | + } | |
| 1079 | + function updateManyMutably(updates, state) { | |
| 1080 | + var newKeys = {}; | |
| 1081 | + var updatesPerEntity = {}; | |
| 1082 | + updates.forEach(function (update) { | |
| 1083 | + if (update.id in state.entities) { | |
| 1084 | + updatesPerEntity[update.id] = { | |
| 1085 | + id: update.id, | |
| 1086 | + changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes) | |
| 1087 | + }; | |
| 1088 | + } | |
| 1089 | + }); | |
| 1090 | + updates = Object.values(updatesPerEntity); | |
| 1091 | + var didMutateEntities = updates.length > 0; | |
| 1092 | + if (didMutateEntities) { | |
| 1093 | + var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0; | |
| 1094 | + if (didMutateIds) { | |
| 1095 | + state.ids = Object.keys(state.entities); | |
| 1096 | + } | |
| 1097 | + } | |
| 1098 | + } | |
| 1099 | + function upsertOneMutably(entity, state) { | |
| 1100 | + return upsertManyMutably([entity], state); | |
| 1101 | + } | |
| 1102 | + function upsertManyMutably(newEntities, state) { | |
| 1103 | + var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1]; | |
| 1104 | + updateManyMutably(updated, state); | |
| 1105 | + addManyMutably(added, state); | |
| 1106 | + } | |
| 1107 | + return { | |
| 1108 | + removeAll: createSingleArgumentStateOperator(removeAllMutably), | |
| 1109 | + addOne: createStateOperator(addOneMutably), | |
| 1110 | + addMany: createStateOperator(addManyMutably), | |
| 1111 | + setOne: createStateOperator(setOneMutably), | |
| 1112 | + setMany: createStateOperator(setManyMutably), | |
| 1113 | + setAll: createStateOperator(setAllMutably), | |
| 1114 | + updateOne: createStateOperator(updateOneMutably), | |
| 1115 | + updateMany: createStateOperator(updateManyMutably), | |
| 1116 | + upsertOne: createStateOperator(upsertOneMutably), | |
| 1117 | + upsertMany: createStateOperator(upsertManyMutably), | |
| 1118 | + removeOne: createStateOperator(removeOneMutably), | |
| 1119 | + removeMany: createStateOperator(removeManyMutably) | |
| 1120 | + }; | |
| 1121 | +} | |
| 1122 | +// src/entities/sorted_state_adapter.ts | |
| 1123 | +function createSortedStateAdapter(selectId, sort) { | |
| 1124 | + var _c = createUnsortedStateAdapter(selectId), removeOne = _c.removeOne, removeMany = _c.removeMany, removeAll = _c.removeAll; | |
| 1125 | + function addOneMutably(entity, state) { | |
| 1126 | + return addManyMutably([entity], state); | |
| 1127 | + } | |
| 1128 | + function addManyMutably(newEntities, state) { | |
| 1129 | + newEntities = ensureEntitiesArray(newEntities); | |
| 1130 | + var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); }); | |
| 1131 | + if (models.length !== 0) { | |
| 1132 | + merge(models, state); | |
| 1133 | + } | |
| 1134 | + } | |
| 1135 | + function setOneMutably(entity, state) { | |
| 1136 | + return setManyMutably([entity], state); | |
| 1137 | + } | |
| 1138 | + function setManyMutably(newEntities, state) { | |
| 1139 | + newEntities = ensureEntitiesArray(newEntities); | |
| 1140 | + if (newEntities.length !== 0) { | |
| 1141 | + merge(newEntities, state); | |
| 1142 | + } | |
| 1143 | + } | |
| 1144 | + function setAllMutably(newEntities, state) { | |
| 1145 | + newEntities = ensureEntitiesArray(newEntities); | |
| 1146 | + state.entities = {}; | |
| 1147 | + state.ids = []; | |
| 1148 | + addManyMutably(newEntities, state); | |
| 1149 | + } | |
| 1150 | + function updateOneMutably(update, state) { | |
| 1151 | + return updateManyMutably([update], state); | |
| 1152 | + } | |
| 1153 | + function updateManyMutably(updates, state) { | |
| 1154 | + var appliedUpdates = false; | |
| 1155 | + for (var _i = 0, updates_1 = updates; _i < updates_1.length; _i++) { | |
| 1156 | + var update = updates_1[_i]; | |
| 1157 | + var entity = state.entities[update.id]; | |
| 1158 | + if (!entity) { | |
| 1159 | + continue; | |
| 1160 | + } | |
| 1161 | + appliedUpdates = true; | |
| 1162 | + Object.assign(entity, update.changes); | |
| 1163 | + var newId = selectId(entity); | |
| 1164 | + if (update.id !== newId) { | |
| 1165 | + delete state.entities[update.id]; | |
| 1166 | + state.entities[newId] = entity; | |
| 1167 | + } | |
| 1168 | + } | |
| 1169 | + if (appliedUpdates) { | |
| 1170 | + resortEntities(state); | |
| 1171 | + } | |
| 1172 | + } | |
| 1173 | + function upsertOneMutably(entity, state) { | |
| 1174 | + return upsertManyMutably([entity], state); | |
| 1175 | + } | |
| 1176 | + function upsertManyMutably(newEntities, state) { | |
| 1177 | + var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1]; | |
| 1178 | + updateManyMutably(updated, state); | |
| 1179 | + addManyMutably(added, state); | |
| 1180 | + } | |
| 1181 | + function areArraysEqual(a, b) { | |
| 1182 | + if (a.length !== b.length) { | |
| 1183 | + return false; | |
| 1184 | + } | |
| 1185 | + for (var i = 0; i < a.length && i < b.length; i++) { | |
| 1186 | + if (a[i] === b[i]) { | |
| 1187 | + continue; | |
| 1188 | + } | |
| 1189 | + return false; | |
| 1190 | + } | |
| 1191 | + return true; | |
| 1192 | + } | |
| 1193 | + function merge(models, state) { | |
| 1194 | + models.forEach(function (model) { | |
| 1195 | + state.entities[selectId(model)] = model; | |
| 1196 | + }); | |
| 1197 | + resortEntities(state); | |
| 1198 | + } | |
| 1199 | + function resortEntities(state) { | |
| 1200 | + var allEntities = Object.values(state.entities); | |
| 1201 | + allEntities.sort(sort); | |
| 1202 | + var newSortedIds = allEntities.map(selectId); | |
| 1203 | + var ids = state.ids; | |
| 1204 | + if (!areArraysEqual(ids, newSortedIds)) { | |
| 1205 | + state.ids = newSortedIds; | |
| 1206 | + } | |
| 1207 | + } | |
| 1208 | + return { | |
| 1209 | + removeOne: removeOne, | |
| 1210 | + removeMany: removeMany, | |
| 1211 | + removeAll: removeAll, | |
| 1212 | + addOne: createStateOperator(addOneMutably), | |
| 1213 | + updateOne: createStateOperator(updateOneMutably), | |
| 1214 | + upsertOne: createStateOperator(upsertOneMutably), | |
| 1215 | + setOne: createStateOperator(setOneMutably), | |
| 1216 | + setMany: createStateOperator(setManyMutably), | |
| 1217 | + setAll: createStateOperator(setAllMutably), | |
| 1218 | + addMany: createStateOperator(addManyMutably), | |
| 1219 | + updateMany: createStateOperator(updateManyMutably), | |
| 1220 | + upsertMany: createStateOperator(upsertManyMutably) | |
| 1221 | + }; | |
| 1222 | +} | |
| 1223 | +// src/entities/create_adapter.ts | |
| 1224 | +function createEntityAdapter(options) { | |
| 1225 | + if (options === void 0) { options = {}; } | |
| 1226 | + var _c = __spreadValues({ | |
| 1227 | + sortComparer: false, | |
| 1228 | + selectId: function (instance) { return instance.id; } | |
| 1229 | + }, options), selectId = _c.selectId, sortComparer = _c.sortComparer; | |
| 1230 | + var stateFactory = createInitialStateFactory(); | |
| 1231 | + var selectorsFactory = createSelectorsFactory(); | |
| 1232 | + var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId); | |
| 1233 | + return __spreadValues(__spreadValues(__spreadValues({ | |
| 1234 | + selectId: selectId, | |
| 1235 | + sortComparer: sortComparer | |
| 1236 | + }, stateFactory), selectorsFactory), stateAdapter); | |
| 1237 | +} | |
| 1238 | +// src/nanoid.ts | |
| 1239 | +var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"; | |
| 1240 | +var nanoid = function (size) { | |
| 1241 | + if (size === void 0) { size = 21; } | |
| 1242 | + var id = ""; | |
| 1243 | + var i = size; | |
| 1244 | + while (i--) { | |
| 1245 | + id += urlAlphabet[Math.random() * 64 | 0]; | |
| 1246 | + } | |
| 1247 | + return id; | |
| 1248 | +}; | |
| 1249 | +// src/createAsyncThunk.ts | |
| 1250 | +var commonProperties = [ | |
| 1251 | + "name", | |
| 1252 | + "message", | |
| 1253 | + "stack", | |
| 1254 | + "code" | |
| 1255 | +]; | |
| 1256 | +var RejectWithValue = /** @class */ (function () { | |
| 1257 | + function RejectWithValue(payload, meta) { | |
| 1258 | + this.payload = payload; | |
| 1259 | + this.meta = meta; | |
| 1260 | + } | |
| 1261 | + return RejectWithValue; | |
| 1262 | +}()); | |
| 1263 | +var FulfillWithMeta = /** @class */ (function () { | |
| 1264 | + function FulfillWithMeta(payload, meta) { | |
| 1265 | + this.payload = payload; | |
| 1266 | + this.meta = meta; | |
| 1267 | + } | |
| 1268 | + return FulfillWithMeta; | |
| 1269 | +}()); | |
| 1270 | +var miniSerializeError = function (value) { | |
| 1271 | + if (typeof value === "object" && value !== null) { | |
| 1272 | + var simpleError = {}; | |
| 1273 | + for (var _i = 0, commonProperties_1 = commonProperties; _i < commonProperties_1.length; _i++) { | |
| 1274 | + var property = commonProperties_1[_i]; | |
| 1275 | + if (typeof value[property] === "string") { | |
| 1276 | + simpleError[property] = value[property]; | |
| 1277 | + } | |
| 1278 | + } | |
| 1279 | + return simpleError; | |
| 1280 | + } | |
| 1281 | + return { message: String(value) }; | |
| 1282 | +}; | |
| 1283 | +var createAsyncThunk = (function () { | |
| 1284 | + function createAsyncThunk2(typePrefix, payloadCreator, options) { | |
| 1285 | + var fulfilled = createAction(typePrefix + "/fulfilled", function (payload, requestId, arg, meta) { return ({ | |
| 1286 | + payload: payload, | |
| 1287 | + meta: __spreadProps(__spreadValues({}, meta || {}), { | |
| 1288 | + arg: arg, | |
| 1289 | + requestId: requestId, | |
| 1290 | + requestStatus: "fulfilled" | |
| 1291 | + }) | |
| 1292 | + }); }); | |
| 1293 | + var pending = createAction(typePrefix + "/pending", function (requestId, arg, meta) { return ({ | |
| 1294 | + payload: void 0, | |
| 1295 | + meta: __spreadProps(__spreadValues({}, meta || {}), { | |
| 1296 | + arg: arg, | |
| 1297 | + requestId: requestId, | |
| 1298 | + requestStatus: "pending" | |
| 1299 | + }) | |
| 1300 | + }); }); | |
| 1301 | + var rejected = createAction(typePrefix + "/rejected", function (error, requestId, arg, payload, meta) { return ({ | |
| 1302 | + payload: payload, | |
| 1303 | + error: (options && options.serializeError || miniSerializeError)(error || "Rejected"), | |
| 1304 | + meta: __spreadProps(__spreadValues({}, meta || {}), { | |
| 1305 | + arg: arg, | |
| 1306 | + requestId: requestId, | |
| 1307 | + rejectedWithValue: !!payload, | |
| 1308 | + requestStatus: "rejected", | |
| 1309 | + aborted: (error == null ? void 0 : error.name) === "AbortError", | |
| 1310 | + condition: (error == null ? void 0 : error.name) === "ConditionError" | |
| 1311 | + }) | |
| 1312 | + }); }); | |
| 1313 | + var displayedWarning = false; | |
| 1314 | + var AC = typeof AbortController !== "undefined" ? AbortController : /** @class */ (function () { | |
| 1315 | + function class_1() { | |
| 1316 | + this.signal = { | |
| 1317 | + aborted: false, | |
| 1318 | + addEventListener: function () { | |
| 1319 | + }, | |
| 1320 | + dispatchEvent: function () { | |
| 1321 | + return false; | |
| 1322 | + }, | |
| 1323 | + onabort: function () { | |
| 1324 | + }, | |
| 1325 | + removeEventListener: function () { | |
| 1326 | + }, | |
| 1327 | + reason: void 0, | |
| 1328 | + throwIfAborted: function () { | |
| 1329 | + } | |
| 1330 | + }; | |
| 1331 | + } | |
| 1332 | + class_1.prototype.abort = function () { | |
| 1333 | + if (true) { | |
| 1334 | + if (!displayedWarning) { | |
| 1335 | + displayedWarning = true; | |
| 1336 | + 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'."); | |
| 1337 | + } | |
| 1338 | + } | |
| 1339 | + }; | |
| 1340 | + return class_1; | |
| 1341 | + }()); | |
| 1342 | + function actionCreator(arg) { | |
| 1343 | + return function (dispatch, getState, extra) { | |
| 1344 | + var requestId = (options == null ? void 0 : options.idGenerator) ? options.idGenerator(arg) : nanoid(); | |
| 1345 | + var abortController = new AC(); | |
| 1346 | + var abortReason; | |
| 1347 | + var started = false; | |
| 1348 | + function abort(reason) { | |
| 1349 | + abortReason = reason; | |
| 1350 | + abortController.abort(); | |
| 1351 | + } | |
| 1352 | + var promise2 = function () { | |
| 1353 | + return __async(this, null, function () { | |
| 1354 | + var _a, _b, finalAction, conditionResult, abortedPromise, err_1, skipDispatch; | |
| 1355 | + return __generator(this, function (_c) { | |
| 1356 | + switch (_c.label) { | |
| 1357 | + case 0: | |
| 1358 | + _c.trys.push([0, 4, , 5]); | |
| 1359 | + conditionResult = (_a = options == null ? void 0 : options.condition) == null ? void 0 : _a.call(options, arg, { getState: getState, extra: extra }); | |
| 1360 | + if (!isThenable(conditionResult)) return [3 /*break*/, 2]; | |
| 1361 | + return [4 /*yield*/, conditionResult]; | |
| 1362 | + case 1: | |
| 1363 | + conditionResult = _c.sent(); | |
| 1364 | + _c.label = 2; | |
| 1365 | + case 2: | |
| 1366 | + if (conditionResult === false || abortController.signal.aborted) { | |
| 1367 | + throw { | |
| 1368 | + name: "ConditionError", | |
| 1369 | + message: "Aborted due to condition callback returning false." | |
| 1370 | + }; | |
| 1371 | + } | |
| 1372 | + started = true; | |
| 1373 | + abortedPromise = new Promise(function (_, reject) { return abortController.signal.addEventListener("abort", function () { return reject({ | |
| 1374 | + name: "AbortError", | |
| 1375 | + message: abortReason || "Aborted" | |
| 1376 | + }); }); }); | |
| 1377 | + 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 }))); | |
| 1378 | + return [4 /*yield*/, Promise.race([ | |
| 1379 | + abortedPromise, | |
| 1380 | + Promise.resolve(payloadCreator(arg, { | |
| 1381 | + dispatch: dispatch, | |
| 1382 | + getState: getState, | |
| 1383 | + extra: extra, | |
| 1384 | + requestId: requestId, | |
| 1385 | + signal: abortController.signal, | |
| 1386 | + abort: abort, | |
| 1387 | + rejectWithValue: function (value, meta) { | |
| 1388 | + return new RejectWithValue(value, meta); | |
| 1389 | + }, | |
| 1390 | + fulfillWithValue: function (value, meta) { | |
| 1391 | + return new FulfillWithMeta(value, meta); | |
| 1392 | + } | |
| 1393 | + })).then(function (result) { | |
| 1394 | + if (result instanceof RejectWithValue) { | |
| 1395 | + throw result; | |
| 1396 | + } | |
| 1397 | + if (result instanceof FulfillWithMeta) { | |
| 1398 | + return fulfilled(result.payload, requestId, arg, result.meta); | |
| 1399 | + } | |
| 1400 | + return fulfilled(result, requestId, arg); | |
| 1401 | + }) | |
| 1402 | + ])]; | |
| 1403 | + case 3: | |
| 1404 | + finalAction = _c.sent(); | |
| 1405 | + return [3 /*break*/, 5]; | |
| 1406 | + case 4: | |
| 1407 | + err_1 = _c.sent(); | |
| 1408 | + finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg); | |
| 1409 | + return [3 /*break*/, 5]; | |
| 1410 | + case 5: | |
| 1411 | + skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition; | |
| 1412 | + if (!skipDispatch) { | |
| 1413 | + dispatch(finalAction); | |
| 1414 | + } | |
| 1415 | + return [2 /*return*/, finalAction]; | |
| 1416 | + } | |
| 1417 | + }); | |
| 1418 | + }); | |
| 1419 | + }(); | |
| 1420 | + return Object.assign(promise2, { | |
| 1421 | + abort: abort, | |
| 1422 | + requestId: requestId, | |
| 1423 | + arg: arg, | |
| 1424 | + unwrap: function () { | |
| 1425 | + return promise2.then(unwrapResult); | |
| 1426 | + } | |
| 1427 | + }); | |
| 1428 | + }; | |
| 1429 | + } | |
| 1430 | + return Object.assign(actionCreator, { | |
| 1431 | + pending: pending, | |
| 1432 | + rejected: rejected, | |
| 1433 | + fulfilled: fulfilled, | |
| 1434 | + typePrefix: typePrefix | |
| 1435 | + }); | |
| 1436 | + } | |
| 1437 | + createAsyncThunk2.withTypes = function () { return createAsyncThunk2; }; | |
| 1438 | + return createAsyncThunk2; | |
| 1439 | +})(); | |
| 1440 | +function unwrapResult(action) { | |
| 1441 | + if (action.meta && action.meta.rejectedWithValue) { | |
| 1442 | + throw action.payload; | |
| 1443 | + } | |
| 1444 | + if (action.error) { | |
| 1445 | + throw action.error; | |
| 1446 | + } | |
| 1447 | + return action.payload; | |
| 1448 | +} | |
| 1449 | +function isThenable(value) { | |
| 1450 | + return value !== null && typeof value === "object" && typeof value.then === "function"; | |
| 1451 | +} | |
| 1452 | +// src/matchers.ts | |
| 1453 | +var matches = function (matcher, action) { | |
| 1454 | + if (hasMatchFunction(matcher)) { | |
| 1455 | + return matcher.match(action); | |
| 1456 | + } | |
| 1457 | + else { | |
| 1458 | + return matcher(action); | |
| 1459 | + } | |
| 1460 | +}; | |
| 1461 | +function isAnyOf() { | |
| 1462 | + var matchers = []; | |
| 1463 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1464 | + matchers[_i] = arguments[_i]; | |
| 1465 | + } | |
| 1466 | + return function (action) { | |
| 1467 | + return matchers.some(function (matcher) { return matches(matcher, action); }); | |
| 1468 | + }; | |
| 1469 | +} | |
| 1470 | +function isAllOf() { | |
| 1471 | + var matchers = []; | |
| 1472 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1473 | + matchers[_i] = arguments[_i]; | |
| 1474 | + } | |
| 1475 | + return function (action) { | |
| 1476 | + return matchers.every(function (matcher) { return matches(matcher, action); }); | |
| 1477 | + }; | |
| 1478 | +} | |
| 1479 | +function hasExpectedRequestMetadata(action, validStatus) { | |
| 1480 | + if (!action || !action.meta) | |
| 1481 | + return false; | |
| 1482 | + var hasValidRequestId = typeof action.meta.requestId === "string"; | |
| 1483 | + var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1; | |
| 1484 | + return hasValidRequestId && hasValidRequestStatus; | |
| 1485 | +} | |
| 1486 | +function isAsyncThunkArray(a) { | |
| 1487 | + return typeof a[0] === "function" && "pending" in a[0] && "fulfilled" in a[0] && "rejected" in a[0]; | |
| 1488 | +} | |
| 1489 | +function isPending() { | |
| 1490 | + var asyncThunks = []; | |
| 1491 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1492 | + asyncThunks[_i] = arguments[_i]; | |
| 1493 | + } | |
| 1494 | + if (asyncThunks.length === 0) { | |
| 1495 | + return function (action) { return hasExpectedRequestMetadata(action, ["pending"]); }; | |
| 1496 | + } | |
| 1497 | + if (!isAsyncThunkArray(asyncThunks)) { | |
| 1498 | + return isPending()(asyncThunks[0]); | |
| 1499 | + } | |
| 1500 | + return function (action) { | |
| 1501 | + var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; }); | |
| 1502 | + var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 1503 | + return combinedMatcher(action); | |
| 1504 | + }; | |
| 1505 | +} | |
| 1506 | +function isRejected() { | |
| 1507 | + var asyncThunks = []; | |
| 1508 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1509 | + asyncThunks[_i] = arguments[_i]; | |
| 1510 | + } | |
| 1511 | + if (asyncThunks.length === 0) { | |
| 1512 | + return function (action) { return hasExpectedRequestMetadata(action, ["rejected"]); }; | |
| 1513 | + } | |
| 1514 | + if (!isAsyncThunkArray(asyncThunks)) { | |
| 1515 | + return isRejected()(asyncThunks[0]); | |
| 1516 | + } | |
| 1517 | + return function (action) { | |
| 1518 | + var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; }); | |
| 1519 | + var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 1520 | + return combinedMatcher(action); | |
| 1521 | + }; | |
| 1522 | +} | |
| 1523 | +function isRejectedWithValue() { | |
| 1524 | + var asyncThunks = []; | |
| 1525 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1526 | + asyncThunks[_i] = arguments[_i]; | |
| 1527 | + } | |
| 1528 | + var hasFlag = function (action) { | |
| 1529 | + return action && action.meta && action.meta.rejectedWithValue; | |
| 1530 | + }; | |
| 1531 | + if (asyncThunks.length === 0) { | |
| 1532 | + return function (action) { | |
| 1533 | + var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag); | |
| 1534 | + return combinedMatcher(action); | |
| 1535 | + }; | |
| 1536 | + } | |
| 1537 | + if (!isAsyncThunkArray(asyncThunks)) { | |
| 1538 | + return isRejectedWithValue()(asyncThunks[0]); | |
| 1539 | + } | |
| 1540 | + return function (action) { | |
| 1541 | + var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag); | |
| 1542 | + return combinedMatcher(action); | |
| 1543 | + }; | |
| 1544 | +} | |
| 1545 | +function isFulfilled() { | |
| 1546 | + var asyncThunks = []; | |
| 1547 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1548 | + asyncThunks[_i] = arguments[_i]; | |
| 1549 | + } | |
| 1550 | + if (asyncThunks.length === 0) { | |
| 1551 | + return function (action) { return hasExpectedRequestMetadata(action, ["fulfilled"]); }; | |
| 1552 | + } | |
| 1553 | + if (!isAsyncThunkArray(asyncThunks)) { | |
| 1554 | + return isFulfilled()(asyncThunks[0]); | |
| 1555 | + } | |
| 1556 | + return function (action) { | |
| 1557 | + var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; }); | |
| 1558 | + var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 1559 | + return combinedMatcher(action); | |
| 1560 | + }; | |
| 1561 | +} | |
| 1562 | +function isAsyncThunkAction() { | |
| 1563 | + var asyncThunks = []; | |
| 1564 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1565 | + asyncThunks[_i] = arguments[_i]; | |
| 1566 | + } | |
| 1567 | + if (asyncThunks.length === 0) { | |
| 1568 | + return function (action) { return hasExpectedRequestMetadata(action, ["pending", "fulfilled", "rejected"]); }; | |
| 1569 | + } | |
| 1570 | + if (!isAsyncThunkArray(asyncThunks)) { | |
| 1571 | + return isAsyncThunkAction()(asyncThunks[0]); | |
| 1572 | + } | |
| 1573 | + return function (action) { | |
| 1574 | + var matchers = []; | |
| 1575 | + for (var _i = 0, asyncThunks_1 = asyncThunks; _i < asyncThunks_1.length; _i++) { | |
| 1576 | + var asyncThunk = asyncThunks_1[_i]; | |
| 1577 | + matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled); | |
| 1578 | + } | |
| 1579 | + var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 1580 | + return combinedMatcher(action); | |
| 1581 | + }; | |
| 1582 | +} | |
| 1583 | +// src/listenerMiddleware/utils.ts | |
| 1584 | +var assertFunction = function (func, expected) { | |
| 1585 | + if (typeof func !== "function") { | |
| 1586 | + throw new TypeError(expected + " is not a function"); | |
| 1587 | + } | |
| 1588 | +}; | |
| 1589 | +var noop = function () { | |
| 1590 | +}; | |
| 1591 | +var catchRejection = function (promise2, onError) { | |
| 1592 | + if (onError === void 0) { onError = noop; } | |
| 1593 | + promise2.catch(onError); | |
| 1594 | + return promise2; | |
| 1595 | +}; | |
| 1596 | +var addAbortSignalListener = function (abortSignal, callback) { | |
| 1597 | + abortSignal.addEventListener("abort", callback, { once: true }); | |
| 1598 | + return function () { return abortSignal.removeEventListener("abort", callback); }; | |
| 1599 | +}; | |
| 1600 | +var abortControllerWithReason = function (abortController, reason) { | |
| 1601 | + var signal = abortController.signal; | |
| 1602 | + if (signal.aborted) { | |
| 1603 | + return; | |
| 1604 | + } | |
| 1605 | + if (!("reason" in signal)) { | |
| 1606 | + Object.defineProperty(signal, "reason", { | |
| 1607 | + enumerable: true, | |
| 1608 | + value: reason, | |
| 1609 | + configurable: true, | |
| 1610 | + writable: true | |
| 1611 | + }); | |
| 1612 | + } | |
| 1613 | + ; | |
| 1614 | + abortController.abort(reason); | |
| 1615 | +}; | |
| 1616 | +// src/listenerMiddleware/exceptions.ts | |
| 1617 | +var task = "task"; | |
| 1618 | +var listener = "listener"; | |
| 1619 | +var completed = "completed"; | |
| 1620 | +var cancelled = "cancelled"; | |
| 1621 | +var taskCancelled = "task-" + cancelled; | |
| 1622 | +var taskCompleted = "task-" + completed; | |
| 1623 | +var listenerCancelled = listener + "-" + cancelled; | |
| 1624 | +var listenerCompleted = listener + "-" + completed; | |
| 1625 | +var TaskAbortError = /** @class */ (function () { | |
| 1626 | + function TaskAbortError(code) { | |
| 1627 | + this.code = code; | |
| 1628 | + this.name = "TaskAbortError"; | |
| 1629 | + this.message = task + " " + cancelled + " (reason: " + code + ")"; | |
| 1630 | + } | |
| 1631 | + return TaskAbortError; | |
| 1632 | +}()); | |
| 1633 | +// src/listenerMiddleware/task.ts | |
| 1634 | +var validateActive = function (signal) { | |
| 1635 | + if (signal.aborted) { | |
| 1636 | + throw new TaskAbortError(signal.reason); | |
| 1637 | + } | |
| 1638 | +}; | |
| 1639 | +function raceWithSignal(signal, promise2) { | |
| 1640 | + var cleanup = noop; | |
| 1641 | + return new Promise(function (resolve, reject) { | |
| 1642 | + var notifyRejection = function () { return reject(new TaskAbortError(signal.reason)); }; | |
| 1643 | + if (signal.aborted) { | |
| 1644 | + notifyRejection(); | |
| 1645 | + return; | |
| 1646 | + } | |
| 1647 | + cleanup = addAbortSignalListener(signal, notifyRejection); | |
| 1648 | + promise2.finally(function () { return cleanup(); }).then(resolve, reject); | |
| 1649 | + }).finally(function () { | |
| 1650 | + cleanup = noop; | |
| 1651 | + }); | |
| 1652 | +} | |
| 1653 | +var runTask = function (task2, cleanUp) { return __async(void 0, null, function () { | |
| 1654 | + var value, error_1; | |
| 1655 | + return __generator(this, function (_c) { | |
| 1656 | + switch (_c.label) { | |
| 1657 | + case 0: | |
| 1658 | + _c.trys.push([0, 3, 4, 5]); | |
| 1659 | + return [4 /*yield*/, Promise.resolve()]; | |
| 1660 | + case 1: | |
| 1661 | + _c.sent(); | |
| 1662 | + return [4 /*yield*/, task2()]; | |
| 1663 | + case 2: | |
| 1664 | + value = _c.sent(); | |
| 1665 | + return [2 /*return*/, { | |
| 1666 | + status: "ok", | |
| 1667 | + value: value | |
| 1668 | + }]; | |
| 1669 | + case 3: | |
| 1670 | + error_1 = _c.sent(); | |
| 1671 | + return [2 /*return*/, { | |
| 1672 | + status: error_1 instanceof TaskAbortError ? "cancelled" : "rejected", | |
| 1673 | + error: error_1 | |
| 1674 | + }]; | |
| 1675 | + case 4: | |
| 1676 | + cleanUp == null ? void 0 : cleanUp(); | |
| 1677 | + return [7 /*endfinally*/]; | |
| 1678 | + case 5: return [2 /*return*/]; | |
| 1679 | + } | |
| 1680 | + }); | |
| 1681 | +}); }; | |
| 1682 | +var createPause = function (signal) { | |
| 1683 | + return function (promise2) { | |
| 1684 | + return catchRejection(raceWithSignal(signal, promise2).then(function (output) { | |
| 1685 | + validateActive(signal); | |
| 1686 | + return output; | |
| 1687 | + })); | |
| 1688 | + }; | |
| 1689 | +}; | |
| 1690 | +var createDelay = function (signal) { | |
| 1691 | + var pause = createPause(signal); | |
| 1692 | + return function (timeoutMs) { | |
| 1693 | + return pause(new Promise(function (resolve) { return setTimeout(resolve, timeoutMs); })); | |
| 1694 | + }; | |
| 1695 | +}; | |
| 1696 | +// src/listenerMiddleware/index.ts | |
| 1697 | +var assign = Object.assign; | |
| 1698 | +var INTERNAL_NIL_TOKEN = {}; | |
| 1699 | +var alm = "listenerMiddleware"; | |
| 1700 | +var createFork = function (parentAbortSignal, parentBlockingPromises) { | |
| 1701 | + var linkControllers = function (controller) { return addAbortSignalListener(parentAbortSignal, function () { return abortControllerWithReason(controller, parentAbortSignal.reason); }); }; | |
| 1702 | + return function (taskExecutor, opts) { | |
| 1703 | + assertFunction(taskExecutor, "taskExecutor"); | |
| 1704 | + var childAbortController = new AbortController(); | |
| 1705 | + linkControllers(childAbortController); | |
| 1706 | + var result = runTask(function () { return __async(void 0, null, function () { | |
| 1707 | + var result2; | |
| 1708 | + return __generator(this, function (_c) { | |
| 1709 | + switch (_c.label) { | |
| 1710 | + case 0: | |
| 1711 | + validateActive(parentAbortSignal); | |
| 1712 | + validateActive(childAbortController.signal); | |
| 1713 | + return [4 /*yield*/, taskExecutor({ | |
| 1714 | + pause: createPause(childAbortController.signal), | |
| 1715 | + delay: createDelay(childAbortController.signal), | |
| 1716 | + signal: childAbortController.signal | |
| 1717 | + })]; | |
| 1718 | + case 1: | |
| 1719 | + result2 = _c.sent(); | |
| 1720 | + validateActive(childAbortController.signal); | |
| 1721 | + return [2 /*return*/, result2]; | |
| 1722 | + } | |
| 1723 | + }); | |
| 1724 | + }); }, function () { return abortControllerWithReason(childAbortController, taskCompleted); }); | |
| 1725 | + if (opts == null ? void 0 : opts.autoJoin) { | |
| 1726 | + parentBlockingPromises.push(result); | |
| 1727 | + } | |
| 1728 | + return { | |
| 1729 | + result: createPause(parentAbortSignal)(result), | |
| 1730 | + cancel: function () { | |
| 1731 | + abortControllerWithReason(childAbortController, taskCancelled); | |
| 1732 | + } | |
| 1733 | + }; | |
| 1734 | + }; | |
| 1735 | +}; | |
| 1736 | +var createTakePattern = function (startListening, signal) { | |
| 1737 | + var take = function (predicate, timeout) { return __async(void 0, null, function () { | |
| 1738 | + var unsubscribe, tuplePromise, promises, output; | |
| 1739 | + return __generator(this, function (_c) { | |
| 1740 | + switch (_c.label) { | |
| 1741 | + case 0: | |
| 1742 | + validateActive(signal); | |
| 1743 | + unsubscribe = function () { | |
| 1744 | + }; | |
| 1745 | + tuplePromise = new Promise(function (resolve, reject) { | |
| 1746 | + var stopListening = startListening({ | |
| 1747 | + predicate: predicate, | |
| 1748 | + effect: function (action, listenerApi) { | |
| 1749 | + listenerApi.unsubscribe(); | |
| 1750 | + resolve([ | |
| 1751 | + action, | |
| 1752 | + listenerApi.getState(), | |
| 1753 | + listenerApi.getOriginalState() | |
| 1754 | + ]); | |
| 1755 | + } | |
| 1756 | + }); | |
| 1757 | + unsubscribe = function () { | |
| 1758 | + stopListening(); | |
| 1759 | + reject(); | |
| 1760 | + }; | |
| 1761 | + }); | |
| 1762 | + promises = [ | |
| 1763 | + tuplePromise | |
| 1764 | + ]; | |
| 1765 | + if (timeout != null) { | |
| 1766 | + promises.push(new Promise(function (resolve) { return setTimeout(resolve, timeout, null); })); | |
| 1767 | + } | |
| 1768 | + _c.label = 1; | |
| 1769 | + case 1: | |
| 1770 | + _c.trys.push([1, , 3, 4]); | |
| 1771 | + return [4 /*yield*/, raceWithSignal(signal, Promise.race(promises))]; | |
| 1772 | + case 2: | |
| 1773 | + output = _c.sent(); | |
| 1774 | + validateActive(signal); | |
| 1775 | + return [2 /*return*/, output]; | |
| 1776 | + case 3: | |
| 1777 | + unsubscribe(); | |
| 1778 | + return [7 /*endfinally*/]; | |
| 1779 | + case 4: return [2 /*return*/]; | |
| 1780 | + } | |
| 1781 | + }); | |
| 1782 | + }); }; | |
| 1783 | + return function (predicate, timeout) { return catchRejection(take(predicate, timeout)); }; | |
| 1784 | +}; | |
| 1785 | +var getListenerEntryPropsFrom = function (options) { | |
| 1786 | + var type = options.type, actionCreator = options.actionCreator, matcher = options.matcher, predicate = options.predicate, effect = options.effect; | |
| 1787 | + if (type) { | |
| 1788 | + predicate = createAction(type).match; | |
| 1789 | + } | |
| 1790 | + else if (actionCreator) { | |
| 1791 | + type = actionCreator.type; | |
| 1792 | + predicate = actionCreator.match; | |
| 1793 | + } | |
| 1794 | + else if (matcher) { | |
| 1795 | + predicate = matcher; | |
| 1796 | + } | |
| 1797 | + else if (predicate) { | |
| 1798 | + } | |
| 1799 | + else { | |
| 1800 | + throw new Error("Creating or removing a listener requires one of the known fields for matching an action"); | |
| 1801 | + } | |
| 1802 | + assertFunction(effect, "options.listener"); | |
| 1803 | + return { predicate: predicate, type: type, effect: effect }; | |
| 1804 | +}; | |
| 1805 | +var createListenerEntry = function (options) { | |
| 1806 | + var _c = getListenerEntryPropsFrom(options), type = _c.type, predicate = _c.predicate, effect = _c.effect; | |
| 1807 | + var id = nanoid(); | |
| 1808 | + var entry = { | |
| 1809 | + id: id, | |
| 1810 | + effect: effect, | |
| 1811 | + type: type, | |
| 1812 | + predicate: predicate, | |
| 1813 | + pending: new Set(), | |
| 1814 | + unsubscribe: function () { | |
| 1815 | + throw new Error("Unsubscribe not initialized"); | |
| 1816 | + } | |
| 1817 | + }; | |
| 1818 | + return entry; | |
| 1819 | +}; | |
| 1820 | +var cancelActiveListeners = function (entry) { | |
| 1821 | + entry.pending.forEach(function (controller) { | |
| 1822 | + abortControllerWithReason(controller, listenerCancelled); | |
| 1823 | + }); | |
| 1824 | +}; | |
| 1825 | +var createClearListenerMiddleware = function (listenerMap) { | |
| 1826 | + return function () { | |
| 1827 | + listenerMap.forEach(cancelActiveListeners); | |
| 1828 | + listenerMap.clear(); | |
| 1829 | + }; | |
| 1830 | +}; | |
| 1831 | +var safelyNotifyError = function (errorHandler, errorToNotify, errorInfo) { | |
| 1832 | + try { | |
| 1833 | + errorHandler(errorToNotify, errorInfo); | |
| 1834 | + } | |
| 1835 | + catch (errorHandlerError) { | |
| 1836 | + setTimeout(function () { | |
| 1837 | + throw errorHandlerError; | |
| 1838 | + }, 0); | |
| 1839 | + } | |
| 1840 | +}; | |
| 1841 | +var addListener = createAction(alm + "/add"); | |
| 1842 | +var clearAllListeners = createAction(alm + "/removeAll"); | |
| 1843 | +var removeListener = createAction(alm + "/remove"); | |
| 1844 | +var defaultErrorHandler = function () { | |
| 1845 | + var args = []; | |
| 1846 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1847 | + args[_i] = arguments[_i]; | |
| 1848 | + } | |
| 1849 | + console.error.apply(console, __spreadArray([alm + "/error"], args)); | |
| 1850 | +}; | |
| 1851 | +function createListenerMiddleware(middlewareOptions) { | |
| 1852 | + var _this = this; | |
| 1853 | + if (middlewareOptions === void 0) { middlewareOptions = {}; } | |
| 1854 | + var listenerMap = new Map(); | |
| 1855 | + var extra = middlewareOptions.extra, _c = middlewareOptions.onError, onError = _c === void 0 ? defaultErrorHandler : _c; | |
| 1856 | + assertFunction(onError, "onError"); | |
| 1857 | + var insertEntry = function (entry) { | |
| 1858 | + entry.unsubscribe = function () { return listenerMap.delete(entry.id); }; | |
| 1859 | + listenerMap.set(entry.id, entry); | |
| 1860 | + return function (cancelOptions) { | |
| 1861 | + entry.unsubscribe(); | |
| 1862 | + if (cancelOptions == null ? void 0 : cancelOptions.cancelActive) { | |
| 1863 | + cancelActiveListeners(entry); | |
| 1864 | + } | |
| 1865 | + }; | |
| 1866 | + }; | |
| 1867 | + var findListenerEntry = function (comparator) { | |
| 1868 | + for (var _i = 0, _c = Array.from(listenerMap.values()); _i < _c.length; _i++) { | |
| 1869 | + var entry = _c[_i]; | |
| 1870 | + if (comparator(entry)) { | |
| 1871 | + return entry; | |
| 1872 | + } | |
| 1873 | + } | |
| 1874 | + return void 0; | |
| 1875 | + }; | |
| 1876 | + var startListening = function (options) { | |
| 1877 | + var entry = findListenerEntry(function (existingEntry) { return existingEntry.effect === options.effect; }); | |
| 1878 | + if (!entry) { | |
| 1879 | + entry = createListenerEntry(options); | |
| 1880 | + } | |
| 1881 | + return insertEntry(entry); | |
| 1882 | + }; | |
| 1883 | + var stopListening = function (options) { | |
| 1884 | + var _c = getListenerEntryPropsFrom(options), type = _c.type, effect = _c.effect, predicate = _c.predicate; | |
| 1885 | + var entry = findListenerEntry(function (entry2) { | |
| 1886 | + var matchPredicateOrType = typeof type === "string" ? entry2.type === type : entry2.predicate === predicate; | |
| 1887 | + return matchPredicateOrType && entry2.effect === effect; | |
| 1888 | + }); | |
| 1889 | + if (entry) { | |
| 1890 | + entry.unsubscribe(); | |
| 1891 | + if (options.cancelActive) { | |
| 1892 | + cancelActiveListeners(entry); | |
| 1893 | + } | |
| 1894 | + } | |
| 1895 | + return !!entry; | |
| 1896 | + }; | |
| 1897 | + var notifyListener = function (entry, action, api, getOriginalState) { return __async(_this, null, function () { | |
| 1898 | + var internalTaskController, take, autoJoinPromises, listenerError_1; | |
| 1899 | + return __generator(this, function (_c) { | |
| 1900 | + switch (_c.label) { | |
| 1901 | + case 0: | |
| 1902 | + internalTaskController = new AbortController(); | |
| 1903 | + take = createTakePattern(startListening, internalTaskController.signal); | |
| 1904 | + autoJoinPromises = []; | |
| 1905 | + _c.label = 1; | |
| 1906 | + case 1: | |
| 1907 | + _c.trys.push([1, 3, 4, 6]); | |
| 1908 | + entry.pending.add(internalTaskController); | |
| 1909 | + return [4 /*yield*/, Promise.resolve(entry.effect(action, assign({}, api, { | |
| 1910 | + getOriginalState: getOriginalState, | |
| 1911 | + condition: function (predicate, timeout) { return take(predicate, timeout).then(Boolean); }, | |
| 1912 | + take: take, | |
| 1913 | + delay: createDelay(internalTaskController.signal), | |
| 1914 | + pause: createPause(internalTaskController.signal), | |
| 1915 | + extra: extra, | |
| 1916 | + signal: internalTaskController.signal, | |
| 1917 | + fork: createFork(internalTaskController.signal, autoJoinPromises), | |
| 1918 | + unsubscribe: entry.unsubscribe, | |
| 1919 | + subscribe: function () { | |
| 1920 | + listenerMap.set(entry.id, entry); | |
| 1921 | + }, | |
| 1922 | + cancelActiveListeners: function () { | |
| 1923 | + entry.pending.forEach(function (controller, _, set) { | |
| 1924 | + if (controller !== internalTaskController) { | |
| 1925 | + abortControllerWithReason(controller, listenerCancelled); | |
| 1926 | + set.delete(controller); | |
| 1927 | + } | |
| 1928 | + }); | |
| 1929 | + } | |
| 1930 | + })))]; | |
| 1931 | + case 2: | |
| 1932 | + _c.sent(); | |
| 1933 | + return [3 /*break*/, 6]; | |
| 1934 | + case 3: | |
| 1935 | + listenerError_1 = _c.sent(); | |
| 1936 | + if (!(listenerError_1 instanceof TaskAbortError)) { | |
| 1937 | + safelyNotifyError(onError, listenerError_1, { | |
| 1938 | + raisedBy: "effect" | |
| 1939 | + }); | |
| 1940 | + } | |
| 1941 | + return [3 /*break*/, 6]; | |
| 1942 | + case 4: return [4 /*yield*/, Promise.allSettled(autoJoinPromises)]; | |
| 1943 | + case 5: | |
| 1944 | + _c.sent(); | |
| 1945 | + abortControllerWithReason(internalTaskController, listenerCompleted); | |
| 1946 | + entry.pending.delete(internalTaskController); | |
| 1947 | + return [7 /*endfinally*/]; | |
| 1948 | + case 6: return [2 /*return*/]; | |
| 1949 | + } | |
| 1950 | + }); | |
| 1951 | + }); }; | |
| 1952 | + var clearListenerMiddleware = createClearListenerMiddleware(listenerMap); | |
| 1953 | + var middleware = function (api) { return function (next) { return function (action) { | |
| 1954 | + if (!isAction(action)) { | |
| 1955 | + return next(action); | |
| 1956 | + } | |
| 1957 | + if (addListener.match(action)) { | |
| 1958 | + return startListening(action.payload); | |
| 1959 | + } | |
| 1960 | + if (clearAllListeners.match(action)) { | |
| 1961 | + clearListenerMiddleware(); | |
| 1962 | + return; | |
| 1963 | + } | |
| 1964 | + if (removeListener.match(action)) { | |
| 1965 | + return stopListening(action.payload); | |
| 1966 | + } | |
| 1967 | + var originalState = api.getState(); | |
| 1968 | + var getOriginalState = function () { | |
| 1969 | + if (originalState === INTERNAL_NIL_TOKEN) { | |
| 1970 | + throw new Error(alm + ": getOriginalState can only be called synchronously"); | |
| 1971 | + } | |
| 1972 | + return originalState; | |
| 1973 | + }; | |
| 1974 | + var result; | |
| 1975 | + try { | |
| 1976 | + result = next(action); | |
| 1977 | + if (listenerMap.size > 0) { | |
| 1978 | + var currentState = api.getState(); | |
| 1979 | + var listenerEntries = Array.from(listenerMap.values()); | |
| 1980 | + for (var _i = 0, listenerEntries_1 = listenerEntries; _i < listenerEntries_1.length; _i++) { | |
| 1981 | + var entry = listenerEntries_1[_i]; | |
| 1982 | + var runListener = false; | |
| 1983 | + try { | |
| 1984 | + runListener = entry.predicate(action, currentState, originalState); | |
| 1985 | + } | |
| 1986 | + catch (predicateError) { | |
| 1987 | + runListener = false; | |
| 1988 | + safelyNotifyError(onError, predicateError, { | |
| 1989 | + raisedBy: "predicate" | |
| 1990 | + }); | |
| 1991 | + } | |
| 1992 | + if (!runListener) { | |
| 1993 | + continue; | |
| 1994 | + } | |
| 1995 | + notifyListener(entry, action, api, getOriginalState); | |
| 1996 | + } | |
| 1997 | + } | |
| 1998 | + } | |
| 1999 | + finally { | |
| 2000 | + originalState = INTERNAL_NIL_TOKEN; | |
| 2001 | + } | |
| 2002 | + return result; | |
| 2003 | + }; }; }; | |
| 2004 | + return { | |
| 2005 | + middleware: middleware, | |
| 2006 | + startListening: startListening, | |
| 2007 | + stopListening: stopListening, | |
| 2008 | + clearListeners: clearListenerMiddleware | |
| 2009 | + }; | |
| 2010 | +} | |
| 2011 | +// src/autoBatchEnhancer.ts | |
| 2012 | +var SHOULD_AUTOBATCH = "RTK_autoBatch"; | |
| 2013 | +var prepareAutoBatched = function () { return function (payload) { | |
| 2014 | + var _c; | |
| 2015 | + return ({ | |
| 2016 | + payload: payload, | |
| 2017 | + meta: (_c = {}, _c[SHOULD_AUTOBATCH] = true, _c) | |
| 2018 | + }); | |
| 2019 | +}; }; | |
| 2020 | +var promise; | |
| 2021 | +var queueMicrotaskShim = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : globalThis) : function (cb) { return (promise || (promise = Promise.resolve())).then(cb).catch(function (err) { return setTimeout(function () { | |
| 2022 | + throw err; | |
| 2023 | +}, 0); }); }; | |
| 2024 | +var createQueueWithTimer = function (timeout) { | |
| 2025 | + return function (notify) { | |
| 2026 | + setTimeout(notify, timeout); | |
| 2027 | + }; | |
| 2028 | +}; | |
| 2029 | +var rAF = typeof window !== "undefined" && window.requestAnimationFrame ? window.requestAnimationFrame : createQueueWithTimer(10); | |
| 2030 | +var autoBatchEnhancer = function (options) { | |
| 2031 | + if (options === void 0) { options = { type: "raf" }; } | |
| 2032 | + return function (next) { return function () { | |
| 2033 | + var args = []; | |
| 2034 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 2035 | + args[_i] = arguments[_i]; | |
| 2036 | + } | |
| 2037 | + var store = next.apply(void 0, args); | |
| 2038 | + var notifying = true; | |
| 2039 | + var shouldNotifyAtEndOfTick = false; | |
| 2040 | + var notificationQueued = false; | |
| 2041 | + var listeners = new Set(); | |
| 2042 | + var queueCallback = options.type === "tick" ? queueMicrotaskShim : options.type === "raf" ? rAF : options.type === "callback" ? options.queueNotification : createQueueWithTimer(options.timeout); | |
| 2043 | + var notifyListeners = function () { | |
| 2044 | + notificationQueued = false; | |
| 2045 | + if (shouldNotifyAtEndOfTick) { | |
| 2046 | + shouldNotifyAtEndOfTick = false; | |
| 2047 | + listeners.forEach(function (l) { return l(); }); | |
| 2048 | + } | |
| 2049 | + }; | |
| 2050 | + return Object.assign({}, store, { | |
| 2051 | + subscribe: function (listener2) { | |
| 2052 | + var wrappedListener = function () { return notifying && listener2(); }; | |
| 2053 | + var unsubscribe = store.subscribe(wrappedListener); | |
| 2054 | + listeners.add(listener2); | |
| 2055 | + return function () { | |
| 2056 | + unsubscribe(); | |
| 2057 | + listeners.delete(listener2); | |
| 2058 | + }; | |
| 2059 | + }, | |
| 2060 | + dispatch: function (action) { | |
| 2061 | + var _a; | |
| 2062 | + try { | |
| 2063 | + notifying = !((_a = action == null ? void 0 : action.meta) == null ? void 0 : _a[SHOULD_AUTOBATCH]); | |
| 2064 | + shouldNotifyAtEndOfTick = !notifying; | |
| 2065 | + if (shouldNotifyAtEndOfTick) { | |
| 2066 | + if (!notificationQueued) { | |
| 2067 | + notificationQueued = true; | |
| 2068 | + queueCallback(notifyListeners); | |
| 2069 | + } | |
| 2070 | + } | |
| 2071 | + return store.dispatch(action); | |
| 2072 | + } | |
| 2073 | + finally { | |
| 2074 | + notifying = true; | |
| 2075 | + } | |
| 2076 | + } | |
| 2077 | + }); | |
| 2078 | + }; }; | |
| 2079 | +}; | |
| 2080 | +// src/index.ts | |
| 2081 | +(0,immer__WEBPACK_IMPORTED_MODULE_2__.enableES5)(); | |
| 2082 | + | |
| 2083 | +//# sourceMappingURL=redux-toolkit.esm.js.map | |
| 2084 | + | |
| 2085 | +/***/ }), | |
| 2086 | + | |
| 4 | 2087 | /***/ "../assets/dev/js/editor/utils/is-instanceof.js": |
| 5 | 2088 | /*!******************************************************!*\ |
| 6 | 2089 | !*** ../assets/dev/js/editor/utils/is-instanceof.js ***! |
| 7 | 2090 | \******************************************************/ |
| @@ -31,10 +2114,10 @@ | ||
| 31 | 2114 | var _iterator = _createForOfIteratorHelper(constructors), |
| 32 | 2115 | _step; |
| 33 | 2116 | try { |
| 34 | 2117 | for (_iterator.s(); !(_step = _iterator.n()).done;) { |
| 35 | - var constructor = _step.value; | |
| 36 | - if (object.constructor.name === constructor.prototype[Symbol.toStringTag]) { | |
| 2118 | + var _constructor = _step.value; | |
| 2119 | + if (object.constructor.name === _constructor.prototype[Symbol.toStringTag]) { | |
| 37 | 2120 | return true; |
| 38 | 2121 | } |
| 39 | 2122 | } |
| 40 | 2123 | } catch (err) { |
| @@ -465,9 +2548,10 @@ | ||
| 465 | 2548 | var _store = _interopRequireDefault(__webpack_require__(/*! ./core/store */ "../modules/web-cli/assets/js/core/store.js")); |
| 466 | 2549 | var _uiStates = _interopRequireDefault(__webpack_require__(/*! ./core/ui-states */ "../modules/web-cli/assets/js/core/ui-states.js")); |
| 467 | 2550 | var hookData = _interopRequireWildcard(__webpack_require__(/*! ./modules/hooks/data/ */ "../modules/web-cli/assets/js/modules/hooks/data/index.js")); |
| 468 | 2551 | 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); } | |
| 2552 | +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | |
| 2553 | +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | |
| 470 | 2554 | /* Alphabetical order */ |
| 471 | 2555 | var API = exports["default"] = /*#__PURE__*/function () { |
| 472 | 2556 | /** |
| 473 | 2557 | * Function constructor(). |
| @@ -1160,11 +3244,12 @@ | ||
| 1160 | 3244 | _result.fail(function (e) { |
| 1161 | 3245 | _this3.catchApply(e, instance); |
| 1162 | 3246 | _this3.afterRun(instance.command, instance.args, e); |
| 1163 | 3247 | }); |
| 1164 | - return _result.done(function (__result) { | |
| 1165 | - return _this3.applyRunAfterAsyncResult(instance, __result); | |
| 3248 | + _result.done(function (__result) { | |
| 3249 | + _this3.applyRunAfterSync(instance, __result); | |
| 1166 | 3250 | }); |
| 3251 | + return _result; | |
| 1167 | 3252 | }; |
| 1168 | 3253 | return handleJQueryDeferred(result); |
| 1169 | 3254 | } else if (result instanceof Promise) { |
| 1170 | 3255 | return this.applyRunAfterAsync(instance, result); |
| @@ -1207,24 +3292,24 @@ | ||
| 1207 | 3292 | value: function applyRunAfterAsync(instance, result) { |
| 1208 | 3293 | var _this4 = this; |
| 1209 | 3294 | // Override initial result ( promise ) to await onAfter promises, first!. |
| 1210 | 3295 | return (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { |
| 1211 | - return _regenerator.default.wrap(function (_context) { | |
| 3296 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 1212 | 3297 | while (1) switch (_context.prev = _context.next) { |
| 1213 | 3298 | case 0: |
| 1214 | - _context.next = 1; | |
| 3299 | + _context.next = 2; | |
| 1215 | 3300 | return result.catch(function (e) { |
| 1216 | 3301 | _this4.catchApply(e, instance); |
| 1217 | 3302 | _this4.afterRun(instance.command, instance.args, e); |
| 1218 | 3303 | }); |
| 1219 | - case 1: | |
| 1220 | - _context.next = 2; | |
| 3304 | + case 2: | |
| 3305 | + _context.next = 4; | |
| 1221 | 3306 | return result.then(function (_result) { |
| 1222 | 3307 | return _this4.applyRunAfterAsyncResult(instance, _result); |
| 1223 | 3308 | }); |
| 1224 | - case 2: | |
| 3309 | + case 4: | |
| 1225 | 3310 | return _context.abrupt("return", result); |
| 1226 | - case 3: | |
| 3311 | + case 5: | |
| 1227 | 3312 | case "end": |
| 1228 | 3313 | return _context.stop(); |
| 1229 | 3314 | } |
| 1230 | 3315 | }, _callee); |
| @@ -1245,9 +3330,9 @@ | ||
| 1245 | 3330 | key: "applyRunAfterAsyncResult", |
| 1246 | 3331 | value: (function () { |
| 1247 | 3332 | var _applyRunAfterAsyncResult = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(instance, result) { |
| 1248 | 3333 | var results, promises; |
| 1249 | - return _regenerator.default.wrap(function (_context2) { | |
| 3334 | + return _regenerator.default.wrap(function _callee2$(_context2) { | |
| 1250 | 3335 | while (1) switch (_context2.prev = _context2.next) { |
| 1251 | 3336 | case 0: |
| 1252 | 3337 | // Run Data hooks. |
| 1253 | 3338 | results = instance.onAfterApply(instance.args, result), promises = Array.isArray(results) ? results.flat().filter(function (filtered) { |
| @@ -1253,18 +3338,18 @@ | ||
| 1253 | 3338 | results = instance.onAfterApply(instance.args, result), promises = Array.isArray(results) ? results.flat().filter(function (filtered) { |
| 1254 | 3339 | return filtered instanceof Promise; |
| 1255 | 3340 | }) : []; |
| 1256 | 3341 | if (!promises.length) { |
| 1257 | - _context2.next = 1; | |
| 3342 | + _context2.next = 4; | |
| 1258 | 3343 | break; |
| 1259 | 3344 | } |
| 1260 | - _context2.next = 1; | |
| 3345 | + _context2.next = 4; | |
| 1261 | 3346 | return Promise.all(promises); |
| 1262 | - case 1: | |
| 3347 | + case 4: | |
| 1263 | 3348 | // For UI hooks. |
| 1264 | 3349 | instance.onAfterRun(instance.args, result); |
| 1265 | 3350 | this.afterRun(instance.command, instance.args, result); |
| 1266 | - case 2: | |
| 3351 | + case 6: | |
| 1267 | 3352 | case "end": |
| 1268 | 3353 | return _context2.stop(); |
| 1269 | 3354 | } |
| 1270 | 3355 | }, _callee2, this); |
| @@ -1908,38 +3993,38 @@ | ||
| 1908 | 3993 | var params = this.prepareHeaders(requestData); |
| 1909 | 3994 | // eslint-disable-next-line no-async-promise-executor |
| 1910 | 3995 | return new Promise(/*#__PURE__*/function () { |
| 1911 | 3996 | 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) { | |
| 3997 | + var endpoint, request, response; | |
| 3998 | + return _regenerator.default.wrap(function _callee2$(_context2) { | |
| 1914 | 3999 | while (1) switch (_context2.prev = _context2.next) { |
| 1915 | 4000 | case 0: |
| 1916 | 4001 | _context2.prev = 0; |
| 1917 | 4002 | endpoint = _this2.prepareEndpoint(requestData); |
| 1918 | 4003 | request = fetchAPI(endpoint, params); |
| 1919 | - _context2.next = 1; | |
| 4004 | + _context2.next = 5; | |
| 1920 | 4005 | 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) { | |
| 4006 | + var _ref10 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(_response) { | |
| 4007 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 1923 | 4008 | while (1) switch (_context.prev = _context.next) { |
| 1924 | 4009 | case 0: |
| 1925 | 4010 | if (_response.ok) { |
| 1926 | - _context.next = 3; | |
| 4011 | + _context.next = 6; | |
| 1927 | 4012 | break; |
| 1928 | 4013 | } |
| 1929 | 4014 | if (!_response.headers.get('content-type').includes('application/json')) { |
| 1930 | - _context.next = 2; | |
| 4015 | + _context.next = 5; | |
| 1931 | 4016 | break; |
| 1932 | 4017 | } |
| 1933 | - _context.next = 1; | |
| 4018 | + _context.next = 4; | |
| 1934 | 4019 | return _response.json(); |
| 1935 | - case 1: | |
| 4020 | + case 4: | |
| 1936 | 4021 | _response = _context.sent; |
| 1937 | - case 2: | |
| 4022 | + case 5: | |
| 1938 | 4023 | throw _response; |
| 1939 | - case 3: | |
| 4024 | + case 6: | |
| 1940 | 4025 | return _context.abrupt("return", _response.json()); |
| 1941 | - case 4: | |
| 4026 | + case 7: | |
| 1942 | 4027 | case "end": |
| 1943 | 4028 | return _context.stop(); |
| 1944 | 4029 | } |
| 1945 | 4030 | }, _callee); |
| @@ -1944,12 +4029,12 @@ | ||
| 1944 | 4029 | } |
| 1945 | 4030 | }, _callee); |
| 1946 | 4031 | })); |
| 1947 | 4032 | return function (_x3) { |
| 1948 | - return _ref0.apply(this, arguments); | |
| 4033 | + return _ref10.apply(this, arguments); | |
| 1949 | 4034 | }; |
| 1950 | 4035 | }()); |
| 1951 | - case 1: | |
| 4036 | + case 5: | |
| 1952 | 4037 | response = _context2.sent; |
| 1953 | 4038 | // At this point, it got the resolved response from remote. |
| 1954 | 4039 | // So load cache, and resolve it. |
| 1955 | 4040 | if (saveCache) { |
| @@ -1955,19 +4040,19 @@ | ||
| 1955 | 4040 | if (saveCache) { |
| 1956 | 4041 | _this2.cache.set(requestData, response); |
| 1957 | 4042 | } |
| 1958 | 4043 | resolve(response); |
| 1959 | - _context2.next = 3; | |
| 4044 | + _context2.next = 13; | |
| 1960 | 4045 | break; |
| 1961 | - case 2: | |
| 1962 | - _context2.prev = 2; | |
| 1963 | - _t = _context2["catch"](0); | |
| 1964 | - reject(_t); | |
| 1965 | - case 3: | |
| 4046 | + case 10: | |
| 4047 | + _context2.prev = 10; | |
| 4048 | + _context2.t0 = _context2["catch"](0); | |
| 4049 | + reject(_context2.t0); | |
| 4050 | + case 13: | |
| 1966 | 4051 | case "end": |
| 1967 | 4052 | return _context2.stop(); |
| 1968 | 4053 | } |
| 1969 | - }, _callee2, null, [[0, 2]]); | |
| 4054 | + }, _callee2, null, [[0, 10]]); | |
| 1970 | 4055 | })); |
| 1971 | 4056 | return function (_x, _x2) { |
| 1972 | 4057 | return _ref9.apply(this, arguments); |
| 1973 | 4058 | }; |
| @@ -4329,9 +6414,9 @@ | ||
| 4329 | 6414 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 4330 | 6415 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 4331 | 6416 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 4332 | 6417 | 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"); | |
| 6418 | +var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"); | |
| 4334 | 6419 | 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 | 6420 | 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; } |
| 4336 | 6421 | /** |
| 4337 | 6422 | * @typedef {import('@reduxjs/toolkit').Slice} Slice |
| @@ -4832,84 +6917,82 @@ | ||
| 4832 | 6917 | _iterator2, |
| 4833 | 6918 | _step2, |
| 4834 | 6919 | _hashCommand, |
| 4835 | 6920 | _dispatcher, |
| 4836 | - _args = arguments, | |
| 4837 | - _t, | |
| 4838 | - _t2; | |
| 4839 | - return _regenerator.default.wrap(function (_context) { | |
| 6921 | + _args = arguments; | |
| 6922 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 4840 | 6923 | while (1) switch (_context.prev = _context.next) { |
| 4841 | 6924 | case 0: |
| 4842 | 6925 | commands = _args.length > 0 && _args[0] !== undefined ? _args[0] : this.commands; |
| 4843 | 6926 | // To allow validate the run first. |
| 4844 | 6927 | _iterator = _createForOfIteratorHelper(commands); |
| 4845 | - _context.prev = 1; | |
| 6928 | + _context.prev = 2; | |
| 4846 | 6929 | _iterator.s(); |
| 4847 | - case 2: | |
| 6930 | + case 4: | |
| 4848 | 6931 | if ((_step = _iterator.n()).done) { |
| 4849 | - _context.next = 5; | |
| 6932 | + _context.next = 13; | |
| 4850 | 6933 | break; |
| 4851 | 6934 | } |
| 4852 | 6935 | hashCommand = _step.value; |
| 4853 | 6936 | dispatcher = this.dispatchersList[hashCommand.method]; |
| 4854 | 6937 | if (dispatcher) { |
| 4855 | - _context.next = 3; | |
| 6938 | + _context.next = 9; | |
| 4856 | 6939 | break; |
| 4857 | 6940 | } |
| 4858 | 6941 | return _context.abrupt("return", Promise.reject(new Error("No dispatcher found for the command: `".concat(hashCommand.command, "`.")))); |
| 4859 | - case 3: | |
| 6942 | + case 9: | |
| 4860 | 6943 | if (dispatcher.isSafe(hashCommand.command)) { |
| 4861 | - _context.next = 4; | |
| 6944 | + _context.next = 11; | |
| 4862 | 6945 | break; |
| 4863 | 6946 | } |
| 4864 | 6947 | 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; | |
| 6948 | + case 11: | |
| 6949 | + _context.next = 4; | |
| 4867 | 6950 | break; |
| 4868 | - case 5: | |
| 4869 | - _context.next = 7; | |
| 6951 | + case 13: | |
| 6952 | + _context.next = 18; | |
| 4870 | 6953 | break; |
| 4871 | - case 6: | |
| 4872 | - _context.prev = 6; | |
| 4873 | - _t = _context["catch"](1); | |
| 4874 | - _iterator.e(_t); | |
| 4875 | - case 7: | |
| 4876 | - _context.prev = 7; | |
| 6954 | + case 15: | |
| 6955 | + _context.prev = 15; | |
| 6956 | + _context.t0 = _context["catch"](2); | |
| 6957 | + _iterator.e(_context.t0); | |
| 6958 | + case 18: | |
| 6959 | + _context.prev = 18; | |
| 4877 | 6960 | _iterator.f(); |
| 4878 | - return _context.finish(7); | |
| 4879 | - case 8: | |
| 6961 | + return _context.finish(18); | |
| 6962 | + case 21: | |
| 4880 | 6963 | // This logic will run the promises by sequence (will wait for dispatcher to finish, before run again). |
| 4881 | 6964 | _iterator2 = _createForOfIteratorHelper(commands); |
| 4882 | - _context.prev = 9; | |
| 6965 | + _context.prev = 22; | |
| 4883 | 6966 | _iterator2.s(); |
| 4884 | - case 10: | |
| 6967 | + case 24: | |
| 4885 | 6968 | if ((_step2 = _iterator2.n()).done) { |
| 4886 | - _context.next = 12; | |
| 6969 | + _context.next = 31; | |
| 4887 | 6970 | break; |
| 4888 | 6971 | } |
| 4889 | 6972 | _hashCommand = _step2.value; |
| 4890 | 6973 | _dispatcher = this.dispatchersList[_hashCommand.method]; |
| 4891 | - _context.next = 11; | |
| 6974 | + _context.next = 29; | |
| 4892 | 6975 | return _dispatcher.runner()(_hashCommand.command, _dispatcher.isSafeWithArgs(_hashCommand.command) ? _hashCommand.args : undefined); |
| 4893 | - case 11: | |
| 4894 | - _context.next = 10; | |
| 6976 | + case 29: | |
| 6977 | + _context.next = 24; | |
| 4895 | 6978 | break; |
| 4896 | - case 12: | |
| 4897 | - _context.next = 14; | |
| 6979 | + case 31: | |
| 6980 | + _context.next = 36; | |
| 4898 | 6981 | break; |
| 4899 | - case 13: | |
| 4900 | - _context.prev = 13; | |
| 4901 | - _t2 = _context["catch"](9); | |
| 4902 | - _iterator2.e(_t2); | |
| 4903 | - case 14: | |
| 4904 | - _context.prev = 14; | |
| 6982 | + case 33: | |
| 6983 | + _context.prev = 33; | |
| 6984 | + _context.t1 = _context["catch"](22); | |
| 6985 | + _iterator2.e(_context.t1); | |
| 6986 | + case 36: | |
| 6987 | + _context.prev = 36; | |
| 4905 | 6988 | _iterator2.f(); |
| 4906 | - return _context.finish(14); | |
| 4907 | - case 15: | |
| 6989 | + return _context.finish(36); | |
| 6990 | + case 39: | |
| 4908 | 6991 | case "end": |
| 4909 | 6992 | return _context.stop(); |
| 4910 | 6993 | } |
| 4911 | - }, _callee, this, [[1, 6, 7, 8], [9, 13, 14, 15]]); | |
| 6994 | + }, _callee, this, [[2, 15, 18, 21], [22, 33, 36, 39]]); | |
| 4912 | 6995 | })); |
| 4913 | 6996 | function run() { |
| 4914 | 6997 | return _run.apply(this, arguments); |
| 4915 | 6998 | } |
| @@ -5006,9 +7089,9 @@ | ||
| 5006 | 7089 | key: "onAfterApply", |
| 5007 | 7090 | value: function onAfterApply() { |
| 5008 | 7091 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 5009 | 7092 | var result = arguments.length > 1 ? arguments[1] : undefined; |
| 5010 | - return $e.hooks.runDataAfter(this.command, args, result); | |
| 7093 | + $e.hooks.runDataAfter(this.command, args, result); | |
| 5011 | 7094 | } |
| 5012 | 7095 | }, { |
| 5013 | 7096 | key: "onCatchApply", |
| 5014 | 7097 | value: function onCatchApply(e) { |
| @@ -5150,9 +7233,10 @@ | ||
| 5150 | 7233 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 5151 | 7234 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 5152 | 7235 | var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); |
| 5153 | 7236 | 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); } | |
| 7237 | +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | |
| 7238 | +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | |
| 5155 | 7239 | 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 | 7240 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 5157 | 7241 | /** |
| 5158 | 7242 | * @name $e.modules.CommandData |
| @@ -5903,9 +7987,9 @@ | ||
| 5903 | 7987 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 5904 | 7988 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 5905 | 7989 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 5906 | 7990 | 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"); | |
| 7991 | +var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"); | |
| 5908 | 7992 | var _module = _interopRequireDefault(__webpack_require__(/*! elementor/assets/dev/js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js")); |
| 5909 | 7993 | var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js")); |
| 5910 | 7994 | var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); |
| 5911 | 7995 | 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; } |
| @@ -5980,11 +8064,11 @@ | ||
| 5980 | 8064 | Object.values(this.getUiStates()).forEach(function (instance) { |
| 5981 | 8065 | return _this.registerUiState(instance); |
| 5982 | 8066 | }); |
| 5983 | 8067 | Object.entries(this.getStates()).forEach(function (_ref9) { |
| 5984 | - var _ref0 = (0, _slicedToArray2.default)(_ref9, 2), | |
| 5985 | - id = _ref0[0], | |
| 5986 | - state = _ref0[1]; | |
| 8068 | + var _ref10 = (0, _slicedToArray2.default)(_ref9, 2), | |
| 8069 | + id = _ref10[0], | |
| 8070 | + state = _ref10[1]; | |
| 5987 | 8071 | return _this.registerState(id, state); |
| 5988 | 8072 | }); |
| 5989 | 8073 | } |
| 5990 | 8074 | |
| @@ -6406,12 +8490,12 @@ | ||
| 6406 | 8490 | var _this5 = this; |
| 6407 | 8491 | var commands = {}; |
| 6408 | 8492 | |
| 6409 | 8493 | // 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]; | |
| 8494 | + Object.entries(commandsFromImport).forEach(function (_ref11) { | |
| 8495 | + var _ref12 = (0, _slicedToArray2.default)(_ref11, 2), | |
| 8496 | + className = _ref12[0], | |
| 8497 | + Class = _ref12[1]; | |
| 6414 | 8498 | var command = _this5.normalizeCommandName(className); |
| 6415 | 8499 | commands[command] = Class; |
| 6416 | 8500 | }); |
| 6417 | 8501 | return commands; |
| @@ -6490,9 +8574,8 @@ | ||
| 6490 | 8574 | Object.defineProperty(exports, "__esModule", ({ |
| 6491 | 8575 | value: true |
| 6492 | 8576 | })); |
| 6493 | 8577 | exports["default"] = void 0; |
| 6494 | -var _readOnlyError2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/readOnlyError */ "../node_modules/@babel/runtime/helpers/readOnlyError.js")); | |
| 6495 | 8578 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 6496 | 8579 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 6497 | 8580 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 6498 | 8581 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| @@ -6500,9 +8583,10 @@ | ||
| 6500 | 8583 | var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); |
| 6501 | 8584 | var _componentBase = _interopRequireDefault(__webpack_require__(/*! ./component-base */ "../modules/web-cli/assets/js/modules/component-base.js")); |
| 6502 | 8585 | var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../modules/web-cli/assets/js/modules/commands/index.js")); |
| 6503 | 8586 | 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); } | |
| 8587 | +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | |
| 8588 | +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | |
| 6505 | 8589 | 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 | 8590 | function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } |
| 6507 | 8591 | 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 | 8592 | var ComponentModalBase = exports["default"] = /*#__PURE__*/function (_ComponentBase) { |
| @@ -6556,10 +8640,9 @@ | ||
| 6556 | 8640 | value: function close() { |
| 6557 | 8641 | if (!_superPropGet(ComponentModalBase, "close", this, 3)([])) { |
| 6558 | 8642 | return false; |
| 6559 | 8643 | } |
| 6560 | - var close = elementor.hooks.applyFilters('component/modal/close', this.layout.getModal().hide.bind(this.layout.getModal()), this); | |
| 6561 | - close(); | |
| 8644 | + this.layout.getModal().hide(); | |
| 6562 | 8645 | return true; |
| 6563 | 8646 | } |
| 6564 | 8647 | }, { |
| 6565 | 8648 | key: "getModalLayout", |
| @@ -7512,21 +9595,1093 @@ | ||
| 7512 | 9595 | }; |
| 7513 | 9596 | |
| 7514 | 9597 | /***/ }), |
| 7515 | 9598 | |
| 7516 | -/***/ "../node_modules/@babel/runtime/helpers/OverloadYield.js": | |
| 7517 | -/*!***************************************************************!*\ | |
| 7518 | - !*** ../node_modules/@babel/runtime/helpers/OverloadYield.js ***! | |
| 7519 | - \***************************************************************/ | |
| 7520 | -/***/ ((module) => { | |
| 9599 | +/***/ "../node_modules/redux-thunk/es/index.js": | |
| 9600 | +/*!***********************************************!*\ | |
| 9601 | + !*** ../node_modules/redux-thunk/es/index.js ***! | |
| 9602 | + \***********************************************/ | |
| 9603 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 7521 | 9604 | |
| 7522 | -function _OverloadYield(e, d) { | |
| 7523 | - this.v = e, this.k = d; | |
| 9605 | +"use strict"; | |
| 9606 | +__webpack_require__.r(__webpack_exports__); | |
| 9607 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 9608 | +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 9609 | +/* harmony export */ }); | |
| 9610 | +/** A function that accepts a potential "extra argument" value to be injected later, | |
| 9611 | + * and returns an instance of the thunk middleware that uses that value | |
| 9612 | + */ | |
| 9613 | +function createThunkMiddleware(extraArgument) { | |
| 9614 | + // Standard Redux middleware definition pattern: | |
| 9615 | + // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware | |
| 9616 | + var middleware = function middleware(_ref) { | |
| 9617 | + var dispatch = _ref.dispatch, | |
| 9618 | + getState = _ref.getState; | |
| 9619 | + return function (next) { | |
| 9620 | + return function (action) { | |
| 9621 | + // The thunk middleware looks for any functions that were passed to `store.dispatch`. | |
| 9622 | + // If this "action" is really a function, call it and return the result. | |
| 9623 | + if (typeof action === 'function') { | |
| 9624 | + // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg" | |
| 9625 | + return action(dispatch, getState, extraArgument); | |
| 9626 | + } // Otherwise, pass the action down the middleware chain as usual | |
| 9627 | + | |
| 9628 | + | |
| 9629 | + return next(action); | |
| 9630 | + }; | |
| 9631 | + }; | |
| 9632 | + }; | |
| 9633 | + | |
| 9634 | + return middleware; | |
| 7524 | 9635 | } |
| 7525 | -module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 7526 | 9636 | |
| 9637 | +var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version | |
| 9638 | +// with whatever "extra arg" they want to inject into their thunks | |
| 9639 | + | |
| 9640 | +thunk.withExtraArgument = createThunkMiddleware; | |
| 9641 | +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (thunk); | |
| 9642 | + | |
| 7527 | 9643 | /***/ }), |
| 7528 | 9644 | |
| 9645 | +/***/ "../node_modules/redux/es/redux.js": | |
| 9646 | +/*!*****************************************!*\ | |
| 9647 | + !*** ../node_modules/redux/es/redux.js ***! | |
| 9648 | + \*****************************************/ | |
| 9649 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 9650 | + | |
| 9651 | +"use strict"; | |
| 9652 | +__webpack_require__.r(__webpack_exports__); | |
| 9653 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 9654 | +/* harmony export */ __DO_NOT_USE__ActionTypes: () => (/* binding */ ActionTypes), | |
| 9655 | +/* harmony export */ applyMiddleware: () => (/* binding */ applyMiddleware), | |
| 9656 | +/* harmony export */ bindActionCreators: () => (/* binding */ bindActionCreators), | |
| 9657 | +/* harmony export */ combineReducers: () => (/* binding */ combineReducers), | |
| 9658 | +/* harmony export */ compose: () => (/* binding */ compose), | |
| 9659 | +/* harmony export */ createStore: () => (/* binding */ createStore), | |
| 9660 | +/* harmony export */ legacy_createStore: () => (/* binding */ legacy_createStore) | |
| 9661 | +/* harmony export */ }); | |
| 9662 | +/* 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"); | |
| 9663 | + | |
| 9664 | + | |
| 9665 | +/** | |
| 9666 | + * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js | |
| 9667 | + * | |
| 9668 | + * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes | |
| 9669 | + * during build. | |
| 9670 | + * @param {number} code | |
| 9671 | + */ | |
| 9672 | +function formatProdErrorMessage(code) { | |
| 9673 | + 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. '; | |
| 9674 | +} | |
| 9675 | + | |
| 9676 | +// Inlined version of the `symbol-observable` polyfill | |
| 9677 | +var $$observable = (function () { | |
| 9678 | + return typeof Symbol === 'function' && Symbol.observable || '@@observable'; | |
| 9679 | +})(); | |
| 9680 | + | |
| 9681 | +/** | |
| 9682 | + * These are private action types reserved by Redux. | |
| 9683 | + * For any unknown actions, you must return the current state. | |
| 9684 | + * If the current state is undefined, you must return the initial state. | |
| 9685 | + * Do not reference these action types directly in your code. | |
| 9686 | + */ | |
| 9687 | +var randomString = function randomString() { | |
| 9688 | + return Math.random().toString(36).substring(7).split('').join('.'); | |
| 9689 | +}; | |
| 9690 | + | |
| 9691 | +var ActionTypes = { | |
| 9692 | + INIT: "@@redux/INIT" + randomString(), | |
| 9693 | + REPLACE: "@@redux/REPLACE" + randomString(), | |
| 9694 | + PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { | |
| 9695 | + return "@@redux/PROBE_UNKNOWN_ACTION" + randomString(); | |
| 9696 | + } | |
| 9697 | +}; | |
| 9698 | + | |
| 9699 | +/** | |
| 9700 | + * @param {any} obj The object to inspect. | |
| 9701 | + * @returns {boolean} True if the argument appears to be a plain object. | |
| 9702 | + */ | |
| 9703 | +function isPlainObject(obj) { | |
| 9704 | + if (typeof obj !== 'object' || obj === null) return false; | |
| 9705 | + var proto = obj; | |
| 9706 | + | |
| 9707 | + while (Object.getPrototypeOf(proto) !== null) { | |
| 9708 | + proto = Object.getPrototypeOf(proto); | |
| 9709 | + } | |
| 9710 | + | |
| 9711 | + return Object.getPrototypeOf(obj) === proto; | |
| 9712 | +} | |
| 9713 | + | |
| 9714 | +// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of | |
| 9715 | +function miniKindOf(val) { | |
| 9716 | + if (val === void 0) return 'undefined'; | |
| 9717 | + if (val === null) return 'null'; | |
| 9718 | + var type = typeof val; | |
| 9719 | + | |
| 9720 | + switch (type) { | |
| 9721 | + case 'boolean': | |
| 9722 | + case 'string': | |
| 9723 | + case 'number': | |
| 9724 | + case 'symbol': | |
| 9725 | + case 'function': | |
| 9726 | + { | |
| 9727 | + return type; | |
| 9728 | + } | |
| 9729 | + } | |
| 9730 | + | |
| 9731 | + if (Array.isArray(val)) return 'array'; | |
| 9732 | + if (isDate(val)) return 'date'; | |
| 9733 | + if (isError(val)) return 'error'; | |
| 9734 | + var constructorName = ctorName(val); | |
| 9735 | + | |
| 9736 | + switch (constructorName) { | |
| 9737 | + case 'Symbol': | |
| 9738 | + case 'Promise': | |
| 9739 | + case 'WeakMap': | |
| 9740 | + case 'WeakSet': | |
| 9741 | + case 'Map': | |
| 9742 | + case 'Set': | |
| 9743 | + return constructorName; | |
| 9744 | + } // other | |
| 9745 | + | |
| 9746 | + | |
| 9747 | + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); | |
| 9748 | +} | |
| 9749 | + | |
| 9750 | +function ctorName(val) { | |
| 9751 | + return typeof val.constructor === 'function' ? val.constructor.name : null; | |
| 9752 | +} | |
| 9753 | + | |
| 9754 | +function isError(val) { | |
| 9755 | + return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'; | |
| 9756 | +} | |
| 9757 | + | |
| 9758 | +function isDate(val) { | |
| 9759 | + if (val instanceof Date) return true; | |
| 9760 | + return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function'; | |
| 9761 | +} | |
| 9762 | + | |
| 9763 | +function kindOf(val) { | |
| 9764 | + var typeOfVal = typeof val; | |
| 9765 | + | |
| 9766 | + if (true) { | |
| 9767 | + typeOfVal = miniKindOf(val); | |
| 9768 | + } | |
| 9769 | + | |
| 9770 | + return typeOfVal; | |
| 9771 | +} | |
| 9772 | + | |
| 9773 | +/** | |
| 9774 | + * @deprecated | |
| 9775 | + * | |
| 9776 | + * **We recommend using the `configureStore` method | |
| 9777 | + * of the `@reduxjs/toolkit` package**, which replaces `createStore`. | |
| 9778 | + * | |
| 9779 | + * Redux Toolkit is our recommended approach for writing Redux logic today, | |
| 9780 | + * including store setup, reducers, data fetching, and more. | |
| 9781 | + * | |
| 9782 | + * **For more details, please read this Redux docs page:** | |
| 9783 | + * **https://redux.js.org/introduction/why-rtk-is-redux-today** | |
| 9784 | + * | |
| 9785 | + * `configureStore` from Redux Toolkit is an improved version of `createStore` that | |
| 9786 | + * simplifies setup and helps avoid common bugs. | |
| 9787 | + * | |
| 9788 | + * You should not be using the `redux` core package by itself today, except for learning purposes. | |
| 9789 | + * The `createStore` method from the core `redux` package will not be removed, but we encourage | |
| 9790 | + * all users to migrate to using Redux Toolkit for all Redux code. | |
| 9791 | + * | |
| 9792 | + * If you want to use `createStore` without this visual deprecation warning, use | |
| 9793 | + * the `legacy_createStore` import instead: | |
| 9794 | + * | |
| 9795 | + * `import { legacy_createStore as createStore} from 'redux'` | |
| 9796 | + * | |
| 9797 | + */ | |
| 9798 | + | |
| 9799 | +function createStore(reducer, preloadedState, enhancer) { | |
| 9800 | + var _ref2; | |
| 9801 | + | |
| 9802 | + if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') { | |
| 9803 | + 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.'); | |
| 9804 | + } | |
| 9805 | + | |
| 9806 | + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { | |
| 9807 | + enhancer = preloadedState; | |
| 9808 | + preloadedState = undefined; | |
| 9809 | + } | |
| 9810 | + | |
| 9811 | + if (typeof enhancer !== 'undefined') { | |
| 9812 | + if (typeof enhancer !== 'function') { | |
| 9813 | + throw new Error( false ? 0 : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'"); | |
| 9814 | + } | |
| 9815 | + | |
| 9816 | + return enhancer(createStore)(reducer, preloadedState); | |
| 9817 | + } | |
| 9818 | + | |
| 9819 | + if (typeof reducer !== 'function') { | |
| 9820 | + throw new Error( false ? 0 : "Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'"); | |
| 9821 | + } | |
| 9822 | + | |
| 9823 | + var currentReducer = reducer; | |
| 9824 | + var currentState = preloadedState; | |
| 9825 | + var currentListeners = []; | |
| 9826 | + var nextListeners = currentListeners; | |
| 9827 | + var isDispatching = false; | |
| 9828 | + /** | |
| 9829 | + * This makes a shallow copy of currentListeners so we can use | |
| 9830 | + * nextListeners as a temporary list while dispatching. | |
| 9831 | + * | |
| 9832 | + * This prevents any bugs around consumers calling | |
| 9833 | + * subscribe/unsubscribe in the middle of a dispatch. | |
| 9834 | + */ | |
| 9835 | + | |
| 9836 | + function ensureCanMutateNextListeners() { | |
| 9837 | + if (nextListeners === currentListeners) { | |
| 9838 | + nextListeners = currentListeners.slice(); | |
| 9839 | + } | |
| 9840 | + } | |
| 9841 | + /** | |
| 9842 | + * Reads the state tree managed by the store. | |
| 9843 | + * | |
| 9844 | + * @returns {any} The current state tree of your application. | |
| 9845 | + */ | |
| 9846 | + | |
| 9847 | + | |
| 9848 | + function getState() { | |
| 9849 | + if (isDispatching) { | |
| 9850 | + 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.'); | |
| 9851 | + } | |
| 9852 | + | |
| 9853 | + return currentState; | |
| 9854 | + } | |
| 9855 | + /** | |
| 9856 | + * Adds a change listener. It will be called any time an action is dispatched, | |
| 9857 | + * and some part of the state tree may potentially have changed. You may then | |
| 9858 | + * call `getState()` to read the current state tree inside the callback. | |
| 9859 | + * | |
| 9860 | + * You may call `dispatch()` from a change listener, with the following | |
| 9861 | + * caveats: | |
| 9862 | + * | |
| 9863 | + * 1. The subscriptions are snapshotted just before every `dispatch()` call. | |
| 9864 | + * If you subscribe or unsubscribe while the listeners are being invoked, this | |
| 9865 | + * will not have any effect on the `dispatch()` that is currently in progress. | |
| 9866 | + * However, the next `dispatch()` call, whether nested or not, will use a more | |
| 9867 | + * recent snapshot of the subscription list. | |
| 9868 | + * | |
| 9869 | + * 2. The listener should not expect to see all state changes, as the state | |
| 9870 | + * might have been updated multiple times during a nested `dispatch()` before | |
| 9871 | + * the listener is called. It is, however, guaranteed that all subscribers | |
| 9872 | + * registered before the `dispatch()` started will be called with the latest | |
| 9873 | + * state by the time it exits. | |
| 9874 | + * | |
| 9875 | + * @param {Function} listener A callback to be invoked on every dispatch. | |
| 9876 | + * @returns {Function} A function to remove this change listener. | |
| 9877 | + */ | |
| 9878 | + | |
| 9879 | + | |
| 9880 | + function subscribe(listener) { | |
| 9881 | + if (typeof listener !== 'function') { | |
| 9882 | + throw new Error( false ? 0 : "Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'"); | |
| 9883 | + } | |
| 9884 | + | |
| 9885 | + if (isDispatching) { | |
| 9886 | + 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.'); | |
| 9887 | + } | |
| 9888 | + | |
| 9889 | + var isSubscribed = true; | |
| 9890 | + ensureCanMutateNextListeners(); | |
| 9891 | + nextListeners.push(listener); | |
| 9892 | + return function unsubscribe() { | |
| 9893 | + if (!isSubscribed) { | |
| 9894 | + return; | |
| 9895 | + } | |
| 9896 | + | |
| 9897 | + if (isDispatching) { | |
| 9898 | + 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.'); | |
| 9899 | + } | |
| 9900 | + | |
| 9901 | + isSubscribed = false; | |
| 9902 | + ensureCanMutateNextListeners(); | |
| 9903 | + var index = nextListeners.indexOf(listener); | |
| 9904 | + nextListeners.splice(index, 1); | |
| 9905 | + currentListeners = null; | |
| 9906 | + }; | |
| 9907 | + } | |
| 9908 | + /** | |
| 9909 | + * Dispatches an action. It is the only way to trigger a state change. | |
| 9910 | + * | |
| 9911 | + * The `reducer` function, used to create the store, will be called with the | |
| 9912 | + * current state tree and the given `action`. Its return value will | |
| 9913 | + * be considered the **next** state of the tree, and the change listeners | |
| 9914 | + * will be notified. | |
| 9915 | + * | |
| 9916 | + * The base implementation only supports plain object actions. If you want to | |
| 9917 | + * dispatch a Promise, an Observable, a thunk, or something else, you need to | |
| 9918 | + * wrap your store creating function into the corresponding middleware. For | |
| 9919 | + * example, see the documentation for the `redux-thunk` package. Even the | |
| 9920 | + * middleware will eventually dispatch plain object actions using this method. | |
| 9921 | + * | |
| 9922 | + * @param {Object} action A plain object representing “what changed”. It is | |
| 9923 | + * a good idea to keep actions serializable so you can record and replay user | |
| 9924 | + * sessions, or use the time travelling `redux-devtools`. An action must have | |
| 9925 | + * a `type` property which may not be `undefined`. It is a good idea to use | |
| 9926 | + * string constants for action types. | |
| 9927 | + * | |
| 9928 | + * @returns {Object} For convenience, the same action object you dispatched. | |
| 9929 | + * | |
| 9930 | + * Note that, if you use a custom middleware, it may wrap `dispatch()` to | |
| 9931 | + * return something else (for example, a Promise you can await). | |
| 9932 | + */ | |
| 9933 | + | |
| 9934 | + | |
| 9935 | + function dispatch(action) { | |
| 9936 | + if (!isPlainObject(action)) { | |
| 9937 | + 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."); | |
| 9938 | + } | |
| 9939 | + | |
| 9940 | + if (typeof action.type === 'undefined') { | |
| 9941 | + throw new Error( false ? 0 : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.'); | |
| 9942 | + } | |
| 9943 | + | |
| 9944 | + if (isDispatching) { | |
| 9945 | + throw new Error( false ? 0 : 'Reducers may not dispatch actions.'); | |
| 9946 | + } | |
| 9947 | + | |
| 9948 | + try { | |
| 9949 | + isDispatching = true; | |
| 9950 | + currentState = currentReducer(currentState, action); | |
| 9951 | + } finally { | |
| 9952 | + isDispatching = false; | |
| 9953 | + } | |
| 9954 | + | |
| 9955 | + var listeners = currentListeners = nextListeners; | |
| 9956 | + | |
| 9957 | + for (var i = 0; i < listeners.length; i++) { | |
| 9958 | + var listener = listeners[i]; | |
| 9959 | + listener(); | |
| 9960 | + } | |
| 9961 | + | |
| 9962 | + return action; | |
| 9963 | + } | |
| 9964 | + /** | |
| 9965 | + * Replaces the reducer currently used by the store to calculate the state. | |
| 9966 | + * | |
| 9967 | + * You might need this if your app implements code splitting and you want to | |
| 9968 | + * load some of the reducers dynamically. You might also need this if you | |
| 9969 | + * implement a hot reloading mechanism for Redux. | |
| 9970 | + * | |
| 9971 | + * @param {Function} nextReducer The reducer for the store to use instead. | |
| 9972 | + * @returns {void} | |
| 9973 | + */ | |
| 9974 | + | |
| 9975 | + | |
| 9976 | + function replaceReducer(nextReducer) { | |
| 9977 | + if (typeof nextReducer !== 'function') { | |
| 9978 | + throw new Error( false ? 0 : "Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer)); | |
| 9979 | + } | |
| 9980 | + | |
| 9981 | + currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT. | |
| 9982 | + // Any reducers that existed in both the new and old rootReducer | |
| 9983 | + // will receive the previous state. This effectively populates | |
| 9984 | + // the new state tree with any relevant data from the old one. | |
| 9985 | + | |
| 9986 | + dispatch({ | |
| 9987 | + type: ActionTypes.REPLACE | |
| 9988 | + }); | |
| 9989 | + } | |
| 9990 | + /** | |
| 9991 | + * Interoperability point for observable/reactive libraries. | |
| 9992 | + * @returns {observable} A minimal observable of state changes. | |
| 9993 | + * For more information, see the observable proposal: | |
| 9994 | + * https://github.com/tc39/proposal-observable | |
| 9995 | + */ | |
| 9996 | + | |
| 9997 | + | |
| 9998 | + function observable() { | |
| 9999 | + var _ref; | |
| 10000 | + | |
| 10001 | + var outerSubscribe = subscribe; | |
| 10002 | + return _ref = { | |
| 10003 | + /** | |
| 10004 | + * The minimal observable subscription method. | |
| 10005 | + * @param {Object} observer Any object that can be used as an observer. | |
| 10006 | + * The observer object should have a `next` method. | |
| 10007 | + * @returns {subscription} An object with an `unsubscribe` method that can | |
| 10008 | + * be used to unsubscribe the observable from the store, and prevent further | |
| 10009 | + * emission of values from the observable. | |
| 10010 | + */ | |
| 10011 | + subscribe: function subscribe(observer) { | |
| 10012 | + if (typeof observer !== 'object' || observer === null) { | |
| 10013 | + throw new Error( false ? 0 : "Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'"); | |
| 10014 | + } | |
| 10015 | + | |
| 10016 | + function observeState() { | |
| 10017 | + if (observer.next) { | |
| 10018 | + observer.next(getState()); | |
| 10019 | + } | |
| 10020 | + } | |
| 10021 | + | |
| 10022 | + observeState(); | |
| 10023 | + var unsubscribe = outerSubscribe(observeState); | |
| 10024 | + return { | |
| 10025 | + unsubscribe: unsubscribe | |
| 10026 | + }; | |
| 10027 | + } | |
| 10028 | + }, _ref[$$observable] = function () { | |
| 10029 | + return this; | |
| 10030 | + }, _ref; | |
| 10031 | + } // When a store is created, an "INIT" action is dispatched so that every | |
| 10032 | + // reducer returns their initial state. This effectively populates | |
| 10033 | + // the initial state tree. | |
| 10034 | + | |
| 10035 | + | |
| 10036 | + dispatch({ | |
| 10037 | + type: ActionTypes.INIT | |
| 10038 | + }); | |
| 10039 | + return _ref2 = { | |
| 10040 | + dispatch: dispatch, | |
| 10041 | + subscribe: subscribe, | |
| 10042 | + getState: getState, | |
| 10043 | + replaceReducer: replaceReducer | |
| 10044 | + }, _ref2[$$observable] = observable, _ref2; | |
| 10045 | +} | |
| 10046 | +/** | |
| 10047 | + * Creates a Redux store that holds the state tree. | |
| 10048 | + * | |
| 10049 | + * **We recommend using `configureStore` from the | |
| 10050 | + * `@reduxjs/toolkit` package**, which replaces `createStore`: | |
| 10051 | + * **https://redux.js.org/introduction/why-rtk-is-redux-today** | |
| 10052 | + * | |
| 10053 | + * The only way to change the data in the store is to call `dispatch()` on it. | |
| 10054 | + * | |
| 10055 | + * There should only be a single store in your app. To specify how different | |
| 10056 | + * parts of the state tree respond to actions, you may combine several reducers | |
| 10057 | + * into a single reducer function by using `combineReducers`. | |
| 10058 | + * | |
| 10059 | + * @param {Function} reducer A function that returns the next state tree, given | |
| 10060 | + * the current state tree and the action to handle. | |
| 10061 | + * | |
| 10062 | + * @param {any} [preloadedState] The initial state. You may optionally specify it | |
| 10063 | + * to hydrate the state from the server in universal apps, or to restore a | |
| 10064 | + * previously serialized user session. | |
| 10065 | + * If you use `combineReducers` to produce the root reducer function, this must be | |
| 10066 | + * an object with the same shape as `combineReducers` keys. | |
| 10067 | + * | |
| 10068 | + * @param {Function} [enhancer] The store enhancer. You may optionally specify it | |
| 10069 | + * to enhance the store with third-party capabilities such as middleware, | |
| 10070 | + * time travel, persistence, etc. The only store enhancer that ships with Redux | |
| 10071 | + * is `applyMiddleware()`. | |
| 10072 | + * | |
| 10073 | + * @returns {Store} A Redux store that lets you read the state, dispatch actions | |
| 10074 | + * and subscribe to changes. | |
| 10075 | + */ | |
| 10076 | + | |
| 10077 | +var legacy_createStore = createStore; | |
| 10078 | + | |
| 10079 | +/** | |
| 10080 | + * Prints a warning in the console if it exists. | |
| 10081 | + * | |
| 10082 | + * @param {String} message The warning message. | |
| 10083 | + * @returns {void} | |
| 10084 | + */ | |
| 10085 | +function warning(message) { | |
| 10086 | + /* eslint-disable no-console */ | |
| 10087 | + if (typeof console !== 'undefined' && typeof console.error === 'function') { | |
| 10088 | + console.error(message); | |
| 10089 | + } | |
| 10090 | + /* eslint-enable no-console */ | |
| 10091 | + | |
| 10092 | + | |
| 10093 | + try { | |
| 10094 | + // This error was thrown as a convenience so that if you enable | |
| 10095 | + // "break on all exceptions" in your console, | |
| 10096 | + // it would pause the execution at this line. | |
| 10097 | + throw new Error(message); | |
| 10098 | + } catch (e) {} // eslint-disable-line no-empty | |
| 10099 | + | |
| 10100 | +} | |
| 10101 | + | |
| 10102 | +function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { | |
| 10103 | + var reducerKeys = Object.keys(reducers); | |
| 10104 | + var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; | |
| 10105 | + | |
| 10106 | + if (reducerKeys.length === 0) { | |
| 10107 | + return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; | |
| 10108 | + } | |
| 10109 | + | |
| 10110 | + if (!isPlainObject(inputState)) { | |
| 10111 | + return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\""); | |
| 10112 | + } | |
| 10113 | + | |
| 10114 | + var unexpectedKeys = Object.keys(inputState).filter(function (key) { | |
| 10115 | + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; | |
| 10116 | + }); | |
| 10117 | + unexpectedKeys.forEach(function (key) { | |
| 10118 | + unexpectedKeyCache[key] = true; | |
| 10119 | + }); | |
| 10120 | + if (action && action.type === ActionTypes.REPLACE) return; | |
| 10121 | + | |
| 10122 | + if (unexpectedKeys.length > 0) { | |
| 10123 | + 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."); | |
| 10124 | + } | |
| 10125 | +} | |
| 10126 | + | |
| 10127 | +function assertReducerShape(reducers) { | |
| 10128 | + Object.keys(reducers).forEach(function (key) { | |
| 10129 | + var reducer = reducers[key]; | |
| 10130 | + var initialState = reducer(undefined, { | |
| 10131 | + type: ActionTypes.INIT | |
| 10132 | + }); | |
| 10133 | + | |
| 10134 | + if (typeof initialState === 'undefined') { | |
| 10135 | + 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."); | |
| 10136 | + } | |
| 10137 | + | |
| 10138 | + if (typeof reducer(undefined, { | |
| 10139 | + type: ActionTypes.PROBE_UNKNOWN_ACTION() | |
| 10140 | + }) === 'undefined') { | |
| 10141 | + 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."); | |
| 10142 | + } | |
| 10143 | + }); | |
| 10144 | +} | |
| 10145 | +/** | |
| 10146 | + * Turns an object whose values are different reducer functions, into a single | |
| 10147 | + * reducer function. It will call every child reducer, and gather their results | |
| 10148 | + * into a single state object, whose keys correspond to the keys of the passed | |
| 10149 | + * reducer functions. | |
| 10150 | + * | |
| 10151 | + * @param {Object} reducers An object whose values correspond to different | |
| 10152 | + * reducer functions that need to be combined into one. One handy way to obtain | |
| 10153 | + * it is to use ES6 `import * as reducers` syntax. The reducers may never return | |
| 10154 | + * undefined for any action. Instead, they should return their initial state | |
| 10155 | + * if the state passed to them was undefined, and the current state for any | |
| 10156 | + * unrecognized action. | |
| 10157 | + * | |
| 10158 | + * @returns {Function} A reducer function that invokes every reducer inside the | |
| 10159 | + * passed object, and builds a state object with the same shape. | |
| 10160 | + */ | |
| 10161 | + | |
| 10162 | + | |
| 10163 | +function combineReducers(reducers) { | |
| 10164 | + var reducerKeys = Object.keys(reducers); | |
| 10165 | + var finalReducers = {}; | |
| 10166 | + | |
| 10167 | + for (var i = 0; i < reducerKeys.length; i++) { | |
| 10168 | + var key = reducerKeys[i]; | |
| 10169 | + | |
| 10170 | + if (true) { | |
| 10171 | + if (typeof reducers[key] === 'undefined') { | |
| 10172 | + warning("No reducer provided for key \"" + key + "\""); | |
| 10173 | + } | |
| 10174 | + } | |
| 10175 | + | |
| 10176 | + if (typeof reducers[key] === 'function') { | |
| 10177 | + finalReducers[key] = reducers[key]; | |
| 10178 | + } | |
| 10179 | + } | |
| 10180 | + | |
| 10181 | + var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same | |
| 10182 | + // keys multiple times. | |
| 10183 | + | |
| 10184 | + var unexpectedKeyCache; | |
| 10185 | + | |
| 10186 | + if (true) { | |
| 10187 | + unexpectedKeyCache = {}; | |
| 10188 | + } | |
| 10189 | + | |
| 10190 | + var shapeAssertionError; | |
| 10191 | + | |
| 10192 | + try { | |
| 10193 | + assertReducerShape(finalReducers); | |
| 10194 | + } catch (e) { | |
| 10195 | + shapeAssertionError = e; | |
| 10196 | + } | |
| 10197 | + | |
| 10198 | + return function combination(state, action) { | |
| 10199 | + if (state === void 0) { | |
| 10200 | + state = {}; | |
| 10201 | + } | |
| 10202 | + | |
| 10203 | + if (shapeAssertionError) { | |
| 10204 | + throw shapeAssertionError; | |
| 10205 | + } | |
| 10206 | + | |
| 10207 | + if (true) { | |
| 10208 | + var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); | |
| 10209 | + | |
| 10210 | + if (warningMessage) { | |
| 10211 | + warning(warningMessage); | |
| 10212 | + } | |
| 10213 | + } | |
| 10214 | + | |
| 10215 | + var hasChanged = false; | |
| 10216 | + var nextState = {}; | |
| 10217 | + | |
| 10218 | + for (var _i = 0; _i < finalReducerKeys.length; _i++) { | |
| 10219 | + var _key = finalReducerKeys[_i]; | |
| 10220 | + var reducer = finalReducers[_key]; | |
| 10221 | + var previousStateForKey = state[_key]; | |
| 10222 | + var nextStateForKey = reducer(previousStateForKey, action); | |
| 10223 | + | |
| 10224 | + if (typeof nextStateForKey === 'undefined') { | |
| 10225 | + var actionType = action && action.type; | |
| 10226 | + 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."); | |
| 10227 | + } | |
| 10228 | + | |
| 10229 | + nextState[_key] = nextStateForKey; | |
| 10230 | + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; | |
| 10231 | + } | |
| 10232 | + | |
| 10233 | + hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length; | |
| 10234 | + return hasChanged ? nextState : state; | |
| 10235 | + }; | |
| 10236 | +} | |
| 10237 | + | |
| 10238 | +function bindActionCreator(actionCreator, dispatch) { | |
| 10239 | + return function () { | |
| 10240 | + return dispatch(actionCreator.apply(this, arguments)); | |
| 10241 | + }; | |
| 10242 | +} | |
| 10243 | +/** | |
| 10244 | + * Turns an object whose values are action creators, into an object with the | |
| 10245 | + * same keys, but with every function wrapped into a `dispatch` call so they | |
| 10246 | + * may be invoked directly. This is just a convenience method, as you can call | |
| 10247 | + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. | |
| 10248 | + * | |
| 10249 | + * For convenience, you can also pass an action creator as the first argument, | |
| 10250 | + * and get a dispatch wrapped function in return. | |
| 10251 | + * | |
| 10252 | + * @param {Function|Object} actionCreators An object whose values are action | |
| 10253 | + * creator functions. One handy way to obtain it is to use ES6 `import * as` | |
| 10254 | + * syntax. You may also pass a single function. | |
| 10255 | + * | |
| 10256 | + * @param {Function} dispatch The `dispatch` function available on your Redux | |
| 10257 | + * store. | |
| 10258 | + * | |
| 10259 | + * @returns {Function|Object} The object mimicking the original object, but with | |
| 10260 | + * every action creator wrapped into the `dispatch` call. If you passed a | |
| 10261 | + * function as `actionCreators`, the return value will also be a single | |
| 10262 | + * function. | |
| 10263 | + */ | |
| 10264 | + | |
| 10265 | + | |
| 10266 | +function bindActionCreators(actionCreators, dispatch) { | |
| 10267 | + if (typeof actionCreators === 'function') { | |
| 10268 | + return bindActionCreator(actionCreators, dispatch); | |
| 10269 | + } | |
| 10270 | + | |
| 10271 | + if (typeof actionCreators !== 'object' || actionCreators === null) { | |
| 10272 | + 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\"?"); | |
| 10273 | + } | |
| 10274 | + | |
| 10275 | + var boundActionCreators = {}; | |
| 10276 | + | |
| 10277 | + for (var key in actionCreators) { | |
| 10278 | + var actionCreator = actionCreators[key]; | |
| 10279 | + | |
| 10280 | + if (typeof actionCreator === 'function') { | |
| 10281 | + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); | |
| 10282 | + } | |
| 10283 | + } | |
| 10284 | + | |
| 10285 | + return boundActionCreators; | |
| 10286 | +} | |
| 10287 | + | |
| 10288 | +/** | |
| 10289 | + * Composes single-argument functions from right to left. The rightmost | |
| 10290 | + * function can take multiple arguments as it provides the signature for | |
| 10291 | + * the resulting composite function. | |
| 10292 | + * | |
| 10293 | + * @param {...Function} funcs The functions to compose. | |
| 10294 | + * @returns {Function} A function obtained by composing the argument functions | |
| 10295 | + * from right to left. For example, compose(f, g, h) is identical to doing | |
| 10296 | + * (...args) => f(g(h(...args))). | |
| 10297 | + */ | |
| 10298 | +function compose() { | |
| 10299 | + for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 10300 | + funcs[_key] = arguments[_key]; | |
| 10301 | + } | |
| 10302 | + | |
| 10303 | + if (funcs.length === 0) { | |
| 10304 | + return function (arg) { | |
| 10305 | + return arg; | |
| 10306 | + }; | |
| 10307 | + } | |
| 10308 | + | |
| 10309 | + if (funcs.length === 1) { | |
| 10310 | + return funcs[0]; | |
| 10311 | + } | |
| 10312 | + | |
| 10313 | + return funcs.reduce(function (a, b) { | |
| 10314 | + return function () { | |
| 10315 | + return a(b.apply(void 0, arguments)); | |
| 10316 | + }; | |
| 10317 | + }); | |
| 10318 | +} | |
| 10319 | + | |
| 10320 | +/** | |
| 10321 | + * Creates a store enhancer that applies middleware to the dispatch method | |
| 10322 | + * of the Redux store. This is handy for a variety of tasks, such as expressing | |
| 10323 | + * asynchronous actions in a concise manner, or logging every action payload. | |
| 10324 | + * | |
| 10325 | + * See `redux-thunk` package as an example of the Redux middleware. | |
| 10326 | + * | |
| 10327 | + * Because middleware is potentially asynchronous, this should be the first | |
| 10328 | + * store enhancer in the composition chain. | |
| 10329 | + * | |
| 10330 | + * Note that each middleware will be given the `dispatch` and `getState` functions | |
| 10331 | + * as named arguments. | |
| 10332 | + * | |
| 10333 | + * @param {...Function} middlewares The middleware chain to be applied. | |
| 10334 | + * @returns {Function} A store enhancer applying the middleware. | |
| 10335 | + */ | |
| 10336 | + | |
| 10337 | +function applyMiddleware() { | |
| 10338 | + for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 10339 | + middlewares[_key] = arguments[_key]; | |
| 10340 | + } | |
| 10341 | + | |
| 10342 | + return function (createStore) { | |
| 10343 | + return function () { | |
| 10344 | + var store = createStore.apply(void 0, arguments); | |
| 10345 | + | |
| 10346 | + var _dispatch = function dispatch() { | |
| 10347 | + throw new Error( false ? 0 : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.'); | |
| 10348 | + }; | |
| 10349 | + | |
| 10350 | + var middlewareAPI = { | |
| 10351 | + getState: store.getState, | |
| 10352 | + dispatch: function dispatch() { | |
| 10353 | + return _dispatch.apply(void 0, arguments); | |
| 10354 | + } | |
| 10355 | + }; | |
| 10356 | + var chain = middlewares.map(function (middleware) { | |
| 10357 | + return middleware(middlewareAPI); | |
| 10358 | + }); | |
| 10359 | + _dispatch = compose.apply(void 0, chain)(store.dispatch); | |
| 10360 | + return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, store), {}, { | |
| 10361 | + dispatch: _dispatch | |
| 10362 | + }); | |
| 10363 | + }; | |
| 10364 | + }; | |
| 10365 | +} | |
| 10366 | + | |
| 10367 | + | |
| 10368 | + | |
| 10369 | + | |
| 10370 | +/***/ }), | |
| 10371 | + | |
| 10372 | +/***/ "../node_modules/reselect/es/defaultMemoize.js": | |
| 10373 | +/*!*****************************************************!*\ | |
| 10374 | + !*** ../node_modules/reselect/es/defaultMemoize.js ***! | |
| 10375 | + \*****************************************************/ | |
| 10376 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 10377 | + | |
| 10378 | +"use strict"; | |
| 10379 | +__webpack_require__.r(__webpack_exports__); | |
| 10380 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 10381 | +/* harmony export */ createCacheKeyComparator: () => (/* binding */ createCacheKeyComparator), | |
| 10382 | +/* harmony export */ defaultEqualityCheck: () => (/* binding */ defaultEqualityCheck), | |
| 10383 | +/* harmony export */ defaultMemoize: () => (/* binding */ defaultMemoize) | |
| 10384 | +/* harmony export */ }); | |
| 10385 | +// Cache implementation based on Erik Rasmussen's `lru-memoize`: | |
| 10386 | +// https://github.com/erikras/lru-memoize | |
| 10387 | +var NOT_FOUND = 'NOT_FOUND'; | |
| 10388 | + | |
| 10389 | +function createSingletonCache(equals) { | |
| 10390 | + var entry; | |
| 10391 | + return { | |
| 10392 | + get: function get(key) { | |
| 10393 | + if (entry && equals(entry.key, key)) { | |
| 10394 | + return entry.value; | |
| 10395 | + } | |
| 10396 | + | |
| 10397 | + return NOT_FOUND; | |
| 10398 | + }, | |
| 10399 | + put: function put(key, value) { | |
| 10400 | + entry = { | |
| 10401 | + key: key, | |
| 10402 | + value: value | |
| 10403 | + }; | |
| 10404 | + }, | |
| 10405 | + getEntries: function getEntries() { | |
| 10406 | + return entry ? [entry] : []; | |
| 10407 | + }, | |
| 10408 | + clear: function clear() { | |
| 10409 | + entry = undefined; | |
| 10410 | + } | |
| 10411 | + }; | |
| 10412 | +} | |
| 10413 | + | |
| 10414 | +function createLruCache(maxSize, equals) { | |
| 10415 | + var entries = []; | |
| 10416 | + | |
| 10417 | + function get(key) { | |
| 10418 | + var cacheIndex = entries.findIndex(function (entry) { | |
| 10419 | + return equals(key, entry.key); | |
| 10420 | + }); // We found a cached entry | |
| 10421 | + | |
| 10422 | + if (cacheIndex > -1) { | |
| 10423 | + var entry = entries[cacheIndex]; // Cached entry not at top of cache, move it to the top | |
| 10424 | + | |
| 10425 | + if (cacheIndex > 0) { | |
| 10426 | + entries.splice(cacheIndex, 1); | |
| 10427 | + entries.unshift(entry); | |
| 10428 | + } | |
| 10429 | + | |
| 10430 | + return entry.value; | |
| 10431 | + } // No entry found in cache, return sentinel | |
| 10432 | + | |
| 10433 | + | |
| 10434 | + return NOT_FOUND; | |
| 10435 | + } | |
| 10436 | + | |
| 10437 | + function put(key, value) { | |
| 10438 | + if (get(key) === NOT_FOUND) { | |
| 10439 | + // TODO Is unshift slow? | |
| 10440 | + entries.unshift({ | |
| 10441 | + key: key, | |
| 10442 | + value: value | |
| 10443 | + }); | |
| 10444 | + | |
| 10445 | + if (entries.length > maxSize) { | |
| 10446 | + entries.pop(); | |
| 10447 | + } | |
| 10448 | + } | |
| 10449 | + } | |
| 10450 | + | |
| 10451 | + function getEntries() { | |
| 10452 | + return entries; | |
| 10453 | + } | |
| 10454 | + | |
| 10455 | + function clear() { | |
| 10456 | + entries = []; | |
| 10457 | + } | |
| 10458 | + | |
| 10459 | + return { | |
| 10460 | + get: get, | |
| 10461 | + put: put, | |
| 10462 | + getEntries: getEntries, | |
| 10463 | + clear: clear | |
| 10464 | + }; | |
| 10465 | +} | |
| 10466 | + | |
| 10467 | +var defaultEqualityCheck = function defaultEqualityCheck(a, b) { | |
| 10468 | + return a === b; | |
| 10469 | +}; | |
| 10470 | +function createCacheKeyComparator(equalityCheck) { | |
| 10471 | + return function areArgumentsShallowlyEqual(prev, next) { | |
| 10472 | + if (prev === null || next === null || prev.length !== next.length) { | |
| 10473 | + return false; | |
| 10474 | + } // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible. | |
| 10475 | + | |
| 10476 | + | |
| 10477 | + var length = prev.length; | |
| 10478 | + | |
| 10479 | + for (var i = 0; i < length; i++) { | |
| 10480 | + if (!equalityCheck(prev[i], next[i])) { | |
| 10481 | + return false; | |
| 10482 | + } | |
| 10483 | + } | |
| 10484 | + | |
| 10485 | + return true; | |
| 10486 | + }; | |
| 10487 | +} | |
| 10488 | +// defaultMemoize now supports a configurable cache size with LRU behavior, | |
| 10489 | +// and optional comparison of the result value with existing values | |
| 10490 | +function defaultMemoize(func, equalityCheckOrOptions) { | |
| 10491 | + var providedOptions = typeof equalityCheckOrOptions === 'object' ? equalityCheckOrOptions : { | |
| 10492 | + equalityCheck: equalityCheckOrOptions | |
| 10493 | + }; | |
| 10494 | + var _providedOptions$equa = providedOptions.equalityCheck, | |
| 10495 | + equalityCheck = _providedOptions$equa === void 0 ? defaultEqualityCheck : _providedOptions$equa, | |
| 10496 | + _providedOptions$maxS = providedOptions.maxSize, | |
| 10497 | + maxSize = _providedOptions$maxS === void 0 ? 1 : _providedOptions$maxS, | |
| 10498 | + resultEqualityCheck = providedOptions.resultEqualityCheck; | |
| 10499 | + var comparator = createCacheKeyComparator(equalityCheck); | |
| 10500 | + var cache = maxSize === 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator); // we reference arguments instead of spreading them for performance reasons | |
| 10501 | + | |
| 10502 | + function memoized() { | |
| 10503 | + var value = cache.get(arguments); | |
| 10504 | + | |
| 10505 | + if (value === NOT_FOUND) { | |
| 10506 | + // @ts-ignore | |
| 10507 | + value = func.apply(null, arguments); | |
| 10508 | + | |
| 10509 | + if (resultEqualityCheck) { | |
| 10510 | + var entries = cache.getEntries(); | |
| 10511 | + var matchingEntry = entries.find(function (entry) { | |
| 10512 | + return resultEqualityCheck(entry.value, value); | |
| 10513 | + }); | |
| 10514 | + | |
| 10515 | + if (matchingEntry) { | |
| 10516 | + value = matchingEntry.value; | |
| 10517 | + } | |
| 10518 | + } | |
| 10519 | + | |
| 10520 | + cache.put(arguments, value); | |
| 10521 | + } | |
| 10522 | + | |
| 10523 | + return value; | |
| 10524 | + } | |
| 10525 | + | |
| 10526 | + memoized.clearCache = function () { | |
| 10527 | + return cache.clear(); | |
| 10528 | + }; | |
| 10529 | + | |
| 10530 | + return memoized; | |
| 10531 | +} | |
| 10532 | + | |
| 10533 | +/***/ }), | |
| 10534 | + | |
| 10535 | +/***/ "../node_modules/reselect/es/index.js": | |
| 10536 | +/*!********************************************!*\ | |
| 10537 | + !*** ../node_modules/reselect/es/index.js ***! | |
| 10538 | + \********************************************/ | |
| 10539 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 10540 | + | |
| 10541 | +"use strict"; | |
| 10542 | +__webpack_require__.r(__webpack_exports__); | |
| 10543 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 10544 | +/* harmony export */ createSelector: () => (/* binding */ createSelector), | |
| 10545 | +/* harmony export */ createSelectorCreator: () => (/* binding */ createSelectorCreator), | |
| 10546 | +/* harmony export */ createStructuredSelector: () => (/* binding */ createStructuredSelector), | |
| 10547 | +/* harmony export */ defaultEqualityCheck: () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultEqualityCheck), | |
| 10548 | +/* harmony export */ defaultMemoize: () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize) | |
| 10549 | +/* harmony export */ }); | |
| 10550 | +/* harmony import */ var _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultMemoize */ "../node_modules/reselect/es/defaultMemoize.js"); | |
| 10551 | + | |
| 10552 | + | |
| 10553 | + | |
| 10554 | +function getDependencies(funcs) { | |
| 10555 | + var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs; | |
| 10556 | + | |
| 10557 | + if (!dependencies.every(function (dep) { | |
| 10558 | + return typeof dep === 'function'; | |
| 10559 | + })) { | |
| 10560 | + var dependencyTypes = dependencies.map(function (dep) { | |
| 10561 | + return typeof dep === 'function' ? "function " + (dep.name || 'unnamed') + "()" : typeof dep; | |
| 10562 | + }).join(', '); | |
| 10563 | + throw new Error("createSelector expects all input-selectors to be functions, but received the following types: [" + dependencyTypes + "]"); | |
| 10564 | + } | |
| 10565 | + | |
| 10566 | + return dependencies; | |
| 10567 | +} | |
| 10568 | + | |
| 10569 | +function createSelectorCreator(memoize) { | |
| 10570 | + for (var _len = arguments.length, memoizeOptionsFromArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
| 10571 | + memoizeOptionsFromArgs[_key - 1] = arguments[_key]; | |
| 10572 | + } | |
| 10573 | + | |
| 10574 | + var createSelector = function createSelector() { | |
| 10575 | + for (var _len2 = arguments.length, funcs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | |
| 10576 | + funcs[_key2] = arguments[_key2]; | |
| 10577 | + } | |
| 10578 | + | |
| 10579 | + var _recomputations = 0; | |
| 10580 | + | |
| 10581 | + var _lastResult; // Due to the intricacies of rest params, we can't do an optional arg after `...funcs`. | |
| 10582 | + // So, start by declaring the default value here. | |
| 10583 | + // (And yes, the words 'memoize' and 'options' appear too many times in this next sequence.) | |
| 10584 | + | |
| 10585 | + | |
| 10586 | + var directlyPassedOptions = { | |
| 10587 | + memoizeOptions: undefined | |
| 10588 | + }; // Normally, the result func or "output selector" is the last arg | |
| 10589 | + | |
| 10590 | + var resultFunc = funcs.pop(); // If the result func is actually an _object_, assume it's our options object | |
| 10591 | + | |
| 10592 | + if (typeof resultFunc === 'object') { | |
| 10593 | + directlyPassedOptions = resultFunc; // and pop the real result func off | |
| 10594 | + | |
| 10595 | + resultFunc = funcs.pop(); | |
| 10596 | + } | |
| 10597 | + | |
| 10598 | + if (typeof resultFunc !== 'function') { | |
| 10599 | + throw new Error("createSelector expects an output function after the inputs, but received: [" + typeof resultFunc + "]"); | |
| 10600 | + } // Determine which set of options we're using. Prefer options passed directly, | |
| 10601 | + // but fall back to options given to createSelectorCreator. | |
| 10602 | + | |
| 10603 | + | |
| 10604 | + var _directlyPassedOption = directlyPassedOptions, | |
| 10605 | + _directlyPassedOption2 = _directlyPassedOption.memoizeOptions, | |
| 10606 | + memoizeOptions = _directlyPassedOption2 === void 0 ? memoizeOptionsFromArgs : _directlyPassedOption2; // Simplifying assumption: it's unlikely that the first options arg of the provided memoizer | |
| 10607 | + // is an array. In most libs I've looked at, it's an equality function or options object. | |
| 10608 | + // Based on that, if `memoizeOptions` _is_ an array, we assume it's a full | |
| 10609 | + // user-provided array of options. Otherwise, it must be just the _first_ arg, and so | |
| 10610 | + // we wrap it in an array so we can apply it. | |
| 10611 | + | |
| 10612 | + var finalMemoizeOptions = Array.isArray(memoizeOptions) ? memoizeOptions : [memoizeOptions]; | |
| 10613 | + var dependencies = getDependencies(funcs); | |
| 10614 | + var memoizedResultFunc = memoize.apply(void 0, [function recomputationWrapper() { | |
| 10615 | + _recomputations++; // apply arguments instead of spreading for performance. | |
| 10616 | + | |
| 10617 | + return resultFunc.apply(null, arguments); | |
| 10618 | + }].concat(finalMemoizeOptions)); // If a selector is called with the exact same arguments we don't need to traverse our dependencies again. | |
| 10619 | + | |
| 10620 | + var selector = memoize(function dependenciesChecker() { | |
| 10621 | + var params = []; | |
| 10622 | + var length = dependencies.length; | |
| 10623 | + | |
| 10624 | + for (var i = 0; i < length; i++) { | |
| 10625 | + // apply arguments instead of spreading and mutate a local list of params for performance. | |
| 10626 | + // @ts-ignore | |
| 10627 | + params.push(dependencies[i].apply(null, arguments)); | |
| 10628 | + } // apply arguments instead of spreading for performance. | |
| 10629 | + | |
| 10630 | + | |
| 10631 | + _lastResult = memoizedResultFunc.apply(null, params); | |
| 10632 | + return _lastResult; | |
| 10633 | + }); | |
| 10634 | + Object.assign(selector, { | |
| 10635 | + resultFunc: resultFunc, | |
| 10636 | + memoizedResultFunc: memoizedResultFunc, | |
| 10637 | + dependencies: dependencies, | |
| 10638 | + lastResult: function lastResult() { | |
| 10639 | + return _lastResult; | |
| 10640 | + }, | |
| 10641 | + recomputations: function recomputations() { | |
| 10642 | + return _recomputations; | |
| 10643 | + }, | |
| 10644 | + resetRecomputations: function resetRecomputations() { | |
| 10645 | + return _recomputations = 0; | |
| 10646 | + } | |
| 10647 | + }); | |
| 10648 | + return selector; | |
| 10649 | + }; // @ts-ignore | |
| 10650 | + | |
| 10651 | + | |
| 10652 | + return createSelector; | |
| 10653 | +} | |
| 10654 | +var createSelector = /* #__PURE__ */createSelectorCreator(_defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize); | |
| 10655 | +// Manual definition of state and output arguments | |
| 10656 | +var createStructuredSelector = function createStructuredSelector(selectors, selectorCreator) { | |
| 10657 | + if (selectorCreator === void 0) { | |
| 10658 | + selectorCreator = createSelector; | |
| 10659 | + } | |
| 10660 | + | |
| 10661 | + if (typeof selectors !== 'object') { | |
| 10662 | + throw new Error('createStructuredSelector expects first argument to be an object ' + ("where each property is a selector, instead received a " + typeof selectors)); | |
| 10663 | + } | |
| 10664 | + | |
| 10665 | + var objectKeys = Object.keys(selectors); | |
| 10666 | + var resultSelector = selectorCreator( // @ts-ignore | |
| 10667 | + objectKeys.map(function (key) { | |
| 10668 | + return selectors[key]; | |
| 10669 | + }), function () { | |
| 10670 | + for (var _len3 = arguments.length, values = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | |
| 10671 | + values[_key3] = arguments[_key3]; | |
| 10672 | + } | |
| 10673 | + | |
| 10674 | + return values.reduce(function (composition, value, index) { | |
| 10675 | + composition[objectKeys[index]] = value; | |
| 10676 | + return composition; | |
| 10677 | + }, {}); | |
| 10678 | + }); | |
| 10679 | + return resultSelector; | |
| 10680 | +}; | |
| 10681 | + | |
| 10682 | +/***/ }), | |
| 10683 | + | |
| 7529 | 10684 | /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": |
| 7530 | 10685 | /*!******************************************************************!*\ |
| 7531 | 10686 | !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! |
| 7532 | 10687 | \******************************************************************/ |
| @@ -7850,354 +11005,318 @@ | ||
| 7850 | 11005 | module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 7851 | 11006 | |
| 7852 | 11007 | /***/ }), |
| 7853 | 11008 | |
| 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 | - \*************************************************************/ | |
| 11009 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 11010 | +/*!********************************************************************!*\ | |
| 11011 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 11012 | + \********************************************************************/ | |
| 7871 | 11013 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 7872 | 11014 | |
| 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; | |
| 7899 | - } | |
| 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; | |
| 7929 | - } | |
| 7930 | - } | |
| 7931 | - return { | |
| 7932 | - value: t, | |
| 7933 | - done: y | |
| 7934 | - }; | |
| 11015 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 11016 | +function _regeneratorRuntime() { | |
| 11017 | + "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ | |
| 11018 | + module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 11019 | + return e; | |
| 11020 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 11021 | + var t, | |
| 11022 | + e = {}, | |
| 11023 | + r = Object.prototype, | |
| 11024 | + n = r.hasOwnProperty, | |
| 11025 | + o = Object.defineProperty || function (t, e, r) { | |
| 11026 | + t[e] = r.value; | |
| 11027 | + }, | |
| 11028 | + i = "function" == typeof Symbol ? Symbol : {}, | |
| 11029 | + a = i.iterator || "@@iterator", | |
| 11030 | + c = i.asyncIterator || "@@asyncIterator", | |
| 11031 | + u = i.toStringTag || "@@toStringTag"; | |
| 11032 | + function define(t, e, r) { | |
| 11033 | + return Object.defineProperty(t, e, { | |
| 11034 | + value: r, | |
| 11035 | + enumerable: !0, | |
| 11036 | + configurable: !0, | |
| 11037 | + writable: !0 | |
| 11038 | + }), t[e]; | |
| 11039 | + } | |
| 11040 | + try { | |
| 11041 | + define({}, ""); | |
| 11042 | + } catch (t) { | |
| 11043 | + define = function define(t, e, r) { | |
| 11044 | + return t[e] = r; | |
| 11045 | + }; | |
| 11046 | + } | |
| 11047 | + function wrap(t, e, r, n) { | |
| 11048 | + var i = e && e.prototype instanceof Generator ? e : Generator, | |
| 11049 | + a = Object.create(i.prototype), | |
| 11050 | + c = new Context(n || []); | |
| 11051 | + return o(a, "_invoke", { | |
| 11052 | + value: makeInvokeMethod(t, r, c) | |
| 11053 | + }), a; | |
| 11054 | + } | |
| 11055 | + function tryCatch(t, e, r) { | |
| 11056 | + try { | |
| 11057 | + return { | |
| 11058 | + type: "normal", | |
| 11059 | + arg: t.call(e, r) | |
| 7935 | 11060 | }; |
| 7936 | - }(r, o, i), !0), u; | |
| 11061 | + } catch (t) { | |
| 11062 | + return { | |
| 11063 | + type: "throw", | |
| 11064 | + arg: t | |
| 11065 | + }; | |
| 11066 | + } | |
| 7937 | 11067 | } |
| 7938 | - var a = {}; | |
| 11068 | + e.wrap = wrap; | |
| 11069 | + var h = "suspendedStart", | |
| 11070 | + l = "suspendedYield", | |
| 11071 | + f = "executing", | |
| 11072 | + s = "completed", | |
| 11073 | + y = {}; | |
| 7939 | 11074 | function Generator() {} |
| 7940 | 11075 | function GeneratorFunction() {} |
| 7941 | 11076 | 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 () { | |
| 11077 | + var p = {}; | |
| 11078 | + define(p, a, function () { | |
| 7951 | 11079 | 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 | 11080 | }); |
| 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); | |
| 11081 | + var d = Object.getPrototypeOf, | |
| 11082 | + v = d && d(d(values([]))); | |
| 11083 | + v && v !== r && n.call(v, a) && (p = v); | |
| 11084 | + var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); | |
| 11085 | + function defineIteratorMethods(t) { | |
| 11086 | + ["next", "throw", "return"].forEach(function (e) { | |
| 11087 | + define(t, e, function (t) { | |
| 11088 | + return this._invoke(e, t); | |
| 8018 | 11089 | }); |
| 8019 | - } catch (t) { | |
| 8020 | - f(t); | |
| 8021 | - } | |
| 11090 | + }); | |
| 8022 | 11091 | } |
| 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 | - }); | |
| 11092 | + function AsyncIterator(t, e) { | |
| 11093 | + function invoke(r, o, i, a) { | |
| 11094 | + var c = tryCatch(t[r], t, o); | |
| 11095 | + if ("throw" !== c.type) { | |
| 11096 | + var u = c.arg, | |
| 11097 | + h = u.value; | |
| 11098 | + return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { | |
| 11099 | + invoke("next", t, i, a); | |
| 11100 | + }, function (t) { | |
| 11101 | + invoke("throw", t, i, a); | |
| 11102 | + }) : e.resolve(h).then(function (t) { | |
| 11103 | + u.value = t, i(u); | |
| 11104 | + }, function (t) { | |
| 11105 | + return invoke("throw", t, i, a); | |
| 11106 | + }); | |
| 11107 | + } | |
| 11108 | + a(c.arg); | |
| 8031 | 11109 | } |
| 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; | |
| 11110 | + var r; | |
| 11111 | + o(this, "_invoke", { | |
| 11112 | + value: function value(t, n) { | |
| 11113 | + function callInvokeWithMethodAndArg() { | |
| 11114 | + return new e(function (e, r) { | |
| 11115 | + invoke(t, n, e, r); | |
| 11116 | + }); | |
| 11117 | + } | |
| 11118 | + return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); | |
| 11119 | + } | |
| 11120 | + }); | |
| 8051 | 11121 | } |
| 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 | - }); | |
| 8057 | - } | |
| 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)); | |
| 8111 | - } | |
| 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); | |
| 11122 | + function makeInvokeMethod(e, r, n) { | |
| 11123 | + var o = h; | |
| 11124 | + return function (i, a) { | |
| 11125 | + if (o === f) throw Error("Generator is already running"); | |
| 11126 | + if (o === s) { | |
| 11127 | + if ("throw" === i) throw a; | |
| 11128 | + return { | |
| 11129 | + value: t, | |
| 11130 | + done: !0 | |
| 11131 | + }; | |
| 11132 | + } | |
| 11133 | + for (n.method = i, n.arg = a;;) { | |
| 11134 | + var c = n.delegate; | |
| 11135 | + if (c) { | |
| 11136 | + var u = maybeInvokeDelegate(c, n); | |
| 11137 | + if (u) { | |
| 11138 | + if (u === y) continue; | |
| 11139 | + return u; | |
| 11140 | + } | |
| 8136 | 11141 | } |
| 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; | |
| 11142 | + if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { | |
| 11143 | + if (o === h) throw o = s, n.arg; | |
| 11144 | + n.dispatchException(n.arg); | |
| 11145 | + } else "return" === n.method && n.abrupt("return", n.arg); | |
| 11146 | + o = f; | |
| 11147 | + var p = tryCatch(e, r, n); | |
| 11148 | + if ("normal" === p.type) { | |
| 11149 | + if (o = n.done ? s : l, p.arg === y) continue; | |
| 11150 | + return { | |
| 11151 | + value: p.arg, | |
| 11152 | + done: n.done | |
| 11153 | + }; | |
| 8143 | 11154 | } |
| 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; | |
| 11155 | + "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); | |
| 8149 | 11156 | } |
| 8150 | 11157 | }; |
| 8151 | 11158 | } |
| 8152 | - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 11159 | + function maybeInvokeDelegate(e, r) { | |
| 11160 | + var n = r.method, | |
| 11161 | + o = e.iterator[n]; | |
| 11162 | + if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; | |
| 11163 | + var i = tryCatch(o, e.iterator, r.arg); | |
| 11164 | + if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; | |
| 11165 | + var a = i.arg; | |
| 11166 | + return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); | |
| 11167 | + } | |
| 11168 | + function pushTryEntry(t) { | |
| 11169 | + var e = { | |
| 11170 | + tryLoc: t[0] | |
| 11171 | + }; | |
| 11172 | + 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); | |
| 11173 | + } | |
| 11174 | + function resetTryEntry(t) { | |
| 11175 | + var e = t.completion || {}; | |
| 11176 | + e.type = "normal", delete e.arg, t.completion = e; | |
| 11177 | + } | |
| 11178 | + function Context(t) { | |
| 11179 | + this.tryEntries = [{ | |
| 11180 | + tryLoc: "root" | |
| 11181 | + }], t.forEach(pushTryEntry, this), this.reset(!0); | |
| 11182 | + } | |
| 11183 | + function values(e) { | |
| 11184 | + if (e || "" === e) { | |
| 11185 | + var r = e[a]; | |
| 11186 | + if (r) return r.call(e); | |
| 11187 | + if ("function" == typeof e.next) return e; | |
| 11188 | + if (!isNaN(e.length)) { | |
| 11189 | + var o = -1, | |
| 11190 | + i = function next() { | |
| 11191 | + for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; | |
| 11192 | + return next.value = t, next.done = !0, next; | |
| 11193 | + }; | |
| 11194 | + return i.next = i; | |
| 11195 | + } | |
| 11196 | + } | |
| 11197 | + throw new TypeError(_typeof(e) + " is not iterable"); | |
| 11198 | + } | |
| 11199 | + return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { | |
| 11200 | + value: GeneratorFunctionPrototype, | |
| 11201 | + configurable: !0 | |
| 11202 | + }), o(GeneratorFunctionPrototype, "constructor", { | |
| 11203 | + value: GeneratorFunction, | |
| 11204 | + configurable: !0 | |
| 11205 | + }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { | |
| 11206 | + var e = "function" == typeof t && t.constructor; | |
| 11207 | + return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); | |
| 11208 | + }, e.mark = function (t) { | |
| 11209 | + return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; | |
| 11210 | + }, e.awrap = function (t) { | |
| 8153 | 11211 | 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 | |
| 11212 | + __await: t | |
| 8168 | 11213 | }; |
| 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 | - }; | |
| 11214 | + }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { | |
| 11215 | + return this; | |
| 11216 | + }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { | |
| 11217 | + void 0 === i && (i = Promise); | |
| 11218 | + var a = new AsyncIterator(wrap(t, r, n, o), i); | |
| 11219 | + return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { | |
| 11220 | + return t.done ? t.value : a.next(); | |
| 11221 | + }); | |
| 11222 | + }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { | |
| 11223 | + return this; | |
| 11224 | + }), define(g, "toString", function () { | |
| 11225 | + return "[object Generator]"; | |
| 11226 | + }), e.keys = function (t) { | |
| 11227 | + var e = Object(t), | |
| 11228 | + r = []; | |
| 11229 | + for (var n in e) r.push(n); | |
| 11230 | + return r.reverse(), function next() { | |
| 11231 | + for (; r.length;) { | |
| 11232 | + var t = r.pop(); | |
| 11233 | + if (t in e) return next.value = t, next.done = !1, next; | |
| 8194 | 11234 | } |
| 11235 | + return next.done = !0, next; | |
| 8195 | 11236 | }; |
| 8196 | - } | |
| 8197 | - throw new TypeError(_typeof(e) + " is not iterable"); | |
| 11237 | + }, e.values = values, Context.prototype = { | |
| 11238 | + constructor: Context, | |
| 11239 | + reset: function reset(e) { | |
| 11240 | + if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); | |
| 11241 | + }, | |
| 11242 | + stop: function stop() { | |
| 11243 | + this.done = !0; | |
| 11244 | + var t = this.tryEntries[0].completion; | |
| 11245 | + if ("throw" === t.type) throw t.arg; | |
| 11246 | + return this.rval; | |
| 11247 | + }, | |
| 11248 | + dispatchException: function dispatchException(e) { | |
| 11249 | + if (this.done) throw e; | |
| 11250 | + var r = this; | |
| 11251 | + function handle(n, o) { | |
| 11252 | + return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; | |
| 11253 | + } | |
| 11254 | + for (var o = this.tryEntries.length - 1; o >= 0; --o) { | |
| 11255 | + var i = this.tryEntries[o], | |
| 11256 | + a = i.completion; | |
| 11257 | + if ("root" === i.tryLoc) return handle("end"); | |
| 11258 | + if (i.tryLoc <= this.prev) { | |
| 11259 | + var c = n.call(i, "catchLoc"), | |
| 11260 | + u = n.call(i, "finallyLoc"); | |
| 11261 | + if (c && u) { | |
| 11262 | + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); | |
| 11263 | + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); | |
| 11264 | + } else if (c) { | |
| 11265 | + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); | |
| 11266 | + } else { | |
| 11267 | + if (!u) throw Error("try statement without catch or finally"); | |
| 11268 | + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); | |
| 11269 | + } | |
| 11270 | + } | |
| 11271 | + } | |
| 11272 | + }, | |
| 11273 | + abrupt: function abrupt(t, e) { | |
| 11274 | + for (var r = this.tryEntries.length - 1; r >= 0; --r) { | |
| 11275 | + var o = this.tryEntries[r]; | |
| 11276 | + if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { | |
| 11277 | + var i = o; | |
| 11278 | + break; | |
| 11279 | + } | |
| 11280 | + } | |
| 11281 | + i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); | |
| 11282 | + var a = i ? i.completion : {}; | |
| 11283 | + return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); | |
| 11284 | + }, | |
| 11285 | + complete: function complete(t, e) { | |
| 11286 | + if ("throw" === t.type) throw t.arg; | |
| 11287 | + return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; | |
| 11288 | + }, | |
| 11289 | + finish: function finish(t) { | |
| 11290 | + for (var e = this.tryEntries.length - 1; e >= 0; --e) { | |
| 11291 | + var r = this.tryEntries[e]; | |
| 11292 | + if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; | |
| 11293 | + } | |
| 11294 | + }, | |
| 11295 | + "catch": function _catch(t) { | |
| 11296 | + for (var e = this.tryEntries.length - 1; e >= 0; --e) { | |
| 11297 | + var r = this.tryEntries[e]; | |
| 11298 | + if (r.tryLoc === t) { | |
| 11299 | + var n = r.completion; | |
| 11300 | + if ("throw" === n.type) { | |
| 11301 | + var o = n.arg; | |
| 11302 | + resetTryEntry(r); | |
| 11303 | + } | |
| 11304 | + return o; | |
| 11305 | + } | |
| 11306 | + } | |
| 11307 | + throw Error("illegal catch attempt"); | |
| 11308 | + }, | |
| 11309 | + delegateYield: function delegateYield(e, r, n) { | |
| 11310 | + return this.delegate = { | |
| 11311 | + iterator: values(e), | |
| 11312 | + resultName: r, | |
| 11313 | + nextLoc: n | |
| 11314 | + }, "next" === this.method && (this.arg = t), y; | |
| 11315 | + } | |
| 11316 | + }, e; | |
| 8198 | 11317 | } |
| 8199 | -module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 11318 | +module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 8200 | 11319 | |
| 8201 | 11320 | /***/ }), |
| 8202 | 11321 | |
| 8203 | 11322 | /***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": |
| @@ -8381,17 +11500,181 @@ | ||
| 8381 | 11500 | |
| 8382 | 11501 | |
| 8383 | 11502 | /***/ }), |
| 8384 | 11503 | |
| 8385 | -/***/ "@reduxjs/toolkit": | |
| 11504 | +/***/ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js": | |
| 11505 | +/*!********************************************************************!*\ | |
| 11506 | + !*** ../node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! | |
| 11507 | + \********************************************************************/ | |
| 11508 | +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 11509 | + | |
| 11510 | +"use strict"; | |
| 11511 | +__webpack_require__.r(__webpack_exports__); | |
| 11512 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 11513 | +/* harmony export */ "default": () => (/* binding */ _defineProperty) | |
| 11514 | +/* harmony export */ }); | |
| 11515 | +/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js"); | |
| 11516 | + | |
| 11517 | +function _defineProperty(e, r, t) { | |
| 11518 | + return (r = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r)) in e ? Object.defineProperty(e, r, { | |
| 11519 | + value: t, | |
| 11520 | + enumerable: !0, | |
| 11521 | + configurable: !0, | |
| 11522 | + writable: !0 | |
| 11523 | + }) : e[r] = t, e; | |
| 11524 | +} | |
| 11525 | + | |
| 11526 | + | |
| 11527 | +/***/ }), | |
| 11528 | + | |
| 11529 | +/***/ "../node_modules/@babel/runtime/helpers/esm/objectSpread2.js": | |
| 11530 | +/*!*******************************************************************!*\ | |
| 11531 | + !*** ../node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***! | |
| 11532 | + \*******************************************************************/ | |
| 11533 | +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 11534 | + | |
| 11535 | +"use strict"; | |
| 11536 | +__webpack_require__.r(__webpack_exports__); | |
| 11537 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 11538 | +/* harmony export */ "default": () => (/* binding */ _objectSpread2) | |
| 11539 | +/* harmony export */ }); | |
| 11540 | +/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty.js */ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js"); | |
| 11541 | + | |
| 11542 | +function ownKeys(e, r) { | |
| 11543 | + var t = Object.keys(e); | |
| 11544 | + if (Object.getOwnPropertySymbols) { | |
| 11545 | + var o = Object.getOwnPropertySymbols(e); | |
| 11546 | + r && (o = o.filter(function (r) { | |
| 11547 | + return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 11548 | + })), t.push.apply(t, o); | |
| 11549 | + } | |
| 11550 | + return t; | |
| 11551 | +} | |
| 11552 | +function _objectSpread2(e) { | |
| 11553 | + for (var r = 1; r < arguments.length; r++) { | |
| 11554 | + var t = null != arguments[r] ? arguments[r] : {}; | |
| 11555 | + r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { | |
| 11556 | + (0,_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__["default"])(e, r, t[r]); | |
| 11557 | + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { | |
| 11558 | + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 11559 | + }); | |
| 11560 | + } | |
| 11561 | + return e; | |
| 11562 | +} | |
| 11563 | + | |
| 11564 | + | |
| 11565 | +/***/ }), | |
| 11566 | + | |
| 11567 | +/***/ "../node_modules/@babel/runtime/helpers/esm/toPrimitive.js": | |
| 11568 | +/*!*****************************************************************!*\ | |
| 11569 | + !*** ../node_modules/@babel/runtime/helpers/esm/toPrimitive.js ***! | |
| 11570 | + \*****************************************************************/ | |
| 11571 | +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 11572 | + | |
| 11573 | +"use strict"; | |
| 11574 | +__webpack_require__.r(__webpack_exports__); | |
| 11575 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 11576 | +/* harmony export */ "default": () => (/* binding */ toPrimitive) | |
| 11577 | +/* harmony export */ }); | |
| 11578 | +/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/esm/typeof.js"); | |
| 11579 | + | |
| 11580 | +function toPrimitive(t, r) { | |
| 11581 | + if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t) || !t) return t; | |
| 11582 | + var e = t[Symbol.toPrimitive]; | |
| 11583 | + if (void 0 !== e) { | |
| 11584 | + var i = e.call(t, r || "default"); | |
| 11585 | + if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i)) return i; | |
| 11586 | + throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 11587 | + } | |
| 11588 | + return ("string" === r ? String : Number)(t); | |
| 11589 | +} | |
| 11590 | + | |
| 11591 | + | |
| 11592 | +/***/ }), | |
| 11593 | + | |
| 11594 | +/***/ "../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js": | |
| 11595 | +/*!*******************************************************************!*\ | |
| 11596 | + !*** ../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js ***! | |
| 11597 | + \*******************************************************************/ | |
| 11598 | +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 11599 | + | |
| 11600 | +"use strict"; | |
| 11601 | +__webpack_require__.r(__webpack_exports__); | |
| 11602 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 11603 | +/* harmony export */ "default": () => (/* binding */ toPropertyKey) | |
| 11604 | +/* harmony export */ }); | |
| 11605 | +/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/esm/typeof.js"); | |
| 11606 | +/* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/esm/toPrimitive.js"); | |
| 11607 | + | |
| 11608 | + | |
| 11609 | +function toPropertyKey(t) { | |
| 11610 | + var i = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__["default"])(t, "string"); | |
| 11611 | + return "symbol" == (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i) ? i : i + ""; | |
| 11612 | +} | |
| 11613 | + | |
| 11614 | + | |
| 11615 | +/***/ }), | |
| 11616 | + | |
| 11617 | +/***/ "../node_modules/@babel/runtime/helpers/esm/typeof.js": | |
| 11618 | +/*!************************************************************!*\ | |
| 11619 | + !*** ../node_modules/@babel/runtime/helpers/esm/typeof.js ***! | |
| 11620 | + \************************************************************/ | |
| 11621 | +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 11622 | + | |
| 11623 | +"use strict"; | |
| 11624 | +__webpack_require__.r(__webpack_exports__); | |
| 11625 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 11626 | +/* harmony export */ "default": () => (/* binding */ _typeof) | |
| 11627 | +/* harmony export */ }); | |
| 11628 | +function _typeof(o) { | |
| 11629 | + "@babel/helpers - typeof"; | |
| 11630 | + | |
| 11631 | + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 11632 | + return typeof o; | |
| 11633 | + } : function (o) { | |
| 11634 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 11635 | + }, _typeof(o); | |
| 11636 | +} | |
| 11637 | + | |
| 11638 | + | |
| 11639 | +/***/ }), | |
| 11640 | + | |
| 11641 | +/***/ "../node_modules/immer/dist/immer.esm.mjs": | |
| 8386 | 11642 | /*!************************************************!*\ |
| 8387 | - !*** external "elementorVendors.reduxToolkit" ***! | |
| 11643 | + !*** ../node_modules/immer/dist/immer.esm.mjs ***! | |
| 8388 | 11644 | \************************************************/ |
| 8389 | -/***/ ((module) => { | |
| 11645 | +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 8390 | 11646 | |
| 8391 | 11647 | "use strict"; |
| 8392 | -module.exports = elementorVendors.reduxToolkit; | |
| 11648 | +__webpack_require__.r(__webpack_exports__); | |
| 11649 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 11650 | +/* harmony export */ Immer: () => (/* binding */ un), | |
| 11651 | +/* harmony export */ applyPatches: () => (/* binding */ pn), | |
| 11652 | +/* harmony export */ castDraft: () => (/* binding */ K), | |
| 11653 | +/* harmony export */ castImmutable: () => (/* binding */ $), | |
| 11654 | +/* harmony export */ createDraft: () => (/* binding */ ln), | |
| 11655 | +/* harmony export */ current: () => (/* binding */ R), | |
| 11656 | +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), | |
| 11657 | +/* harmony export */ enableAllPlugins: () => (/* binding */ J), | |
| 11658 | +/* harmony export */ enableES5: () => (/* binding */ F), | |
| 11659 | +/* harmony export */ enableMapSet: () => (/* binding */ C), | |
| 11660 | +/* harmony export */ enablePatches: () => (/* binding */ T), | |
| 11661 | +/* harmony export */ finishDraft: () => (/* binding */ dn), | |
| 11662 | +/* harmony export */ freeze: () => (/* binding */ d), | |
| 11663 | +/* harmony export */ immerable: () => (/* binding */ L), | |
| 11664 | +/* harmony export */ isDraft: () => (/* binding */ r), | |
| 11665 | +/* harmony export */ isDraftable: () => (/* binding */ t), | |
| 11666 | +/* harmony export */ nothing: () => (/* binding */ H), | |
| 11667 | +/* harmony export */ original: () => (/* binding */ e), | |
| 11668 | +/* harmony export */ produce: () => (/* binding */ fn), | |
| 11669 | +/* harmony export */ produceWithPatches: () => (/* binding */ cn), | |
| 11670 | +/* harmony export */ setAutoFreeze: () => (/* binding */ sn), | |
| 11671 | +/* harmony export */ setUseProxies: () => (/* binding */ vn) | |
| 11672 | +/* harmony export */ }); | |
| 11673 | +function n(n){for(var r=arguments.length,t=Array(r>1?r-1:0),e=1;e<r;e++)t[e-1]=arguments[e];if(true){var i=Y[n],o=i?"function"==typeof i?i.apply(null,t):i:"unknown error nr: "+n;throw Error("[Immer] "+o)}throw Error("[Immer] minified error nr: "+n+(t.length?" "+t.map((function(n){return"'"+n+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function r(n){return!!n&&!!n[Q]}function t(n){var r;return!!n&&(function(n){if(!n||"object"!=typeof n)return!1;var r=Object.getPrototypeOf(n);if(null===r)return!0;var t=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return t===Object||"function"==typeof t&&Function.toString.call(t)===Z}(n)||Array.isArray(n)||!!n[L]||!!(null===(r=n.constructor)||void 0===r?void 0:r[L])||s(n)||v(n))}function e(t){return r(t)||n(23,t),t[Q].t}function i(n,r,t){void 0===t&&(t=!1),0===o(n)?(t?Object.keys:nn)(n).forEach((function(e){t&&"symbol"==typeof e||r(e,n[e],n)})):n.forEach((function(t,e){return r(e,t,n)}))}function o(n){var r=n[Q];return r?r.i>3?r.i-4:r.i:Array.isArray(n)?1:s(n)?2:v(n)?3:0}function u(n,r){return 2===o(n)?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function a(n,r){return 2===o(n)?n.get(r):n[r]}function f(n,r,t){var e=o(n);2===e?n.set(r,t):3===e?n.add(t):n[r]=t}function c(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r}function s(n){return X&&n instanceof Map}function v(n){return q&&n instanceof Set}function p(n){return n.o||n.t}function l(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var r=rn(n);delete r[Q];for(var t=nn(r),e=0;e<t.length;e++){var i=t[e],o=r[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(r[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:n[i]})}return Object.create(Object.getPrototypeOf(n),r)}function d(n,e){return void 0===e&&(e=!1),y(n)||r(n)||!t(n)||(o(n)>1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,r){return d(r,!0)}),!0)),n}function h(){n(2)}function y(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function b(r){var t=tn[r];return t||n(18,r),t}function m(n,r){tn[n]||(tn[n]=r)}function _(){return false||U||n(0),U}function j(n,r){r&&(b("Patches"),n.u=[],n.s=[],n.v=r)}function g(n){O(n),n.p.forEach(S),n.p=null}function O(n){n===U&&(U=n.l)}function w(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var r=n[Q];0===r.i||1===r.i?r.j():r.g=!0}function P(r,e){e._=e.p.length;var i=e.p[0],o=void 0!==r&&r!==i;return e.h.O||b("ES5").S(e,r,o),o?(i[Q].P&&(g(e),n(4)),t(r)&&(r=M(e,r),e.l||x(e,r)),e.u&&b("Patches").M(i[Q].t,r,e.u,e.s)):r=M(e,i,[]),g(e),e.u&&e.v(e.u,e.s),r!==H?r:void 0}function M(n,r,t){if(y(r))return r;var e=r[Q];if(!e)return i(r,(function(i,o){return A(n,e,r,i,o,t)}),!0),r;if(e.A!==n)return r;if(!e.P)return x(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l(e.k):e.o,u=o,a=!1;3===e.i&&(u=new Set(o),o.clear(),a=!0),i(u,(function(r,i){return A(n,e,o,r,i,t,a)})),x(n,o,!1),t&&n.u&&b("Patches").N(e,t,n.u,n.s)}return e.o}function A(e,i,o,a,c,s,v){if( true&&c===o&&n(5),r(c)){var p=M(e,c,s&&i&&3!==i.i&&!u(i.R,a)?s.concat(a):void 0);if(f(o,a,p),!r(p))return;e.m=!1}else v&&o.add(c);if(t(c)&&!y(c)){if(!e.h.D&&e._<1)return;M(e,c),i&&i.A.l||x(e,c)}}function x(n,r,t){void 0===t&&(t=!1),!n.l&&n.h.D&&n.m&&d(r,t)}function z(n,r){var t=n[Q];return(t?p(t):n)[r]}function I(n,r){if(r in n)for(var t=Object.getPrototypeOf(n);t;){var e=Object.getOwnPropertyDescriptor(t,r);if(e)return e;t=Object.getPrototypeOf(t)}}function k(n){n.P||(n.P=!0,n.l&&k(n.l))}function E(n){n.o||(n.o=l(n.t))}function N(n,r,t){var e=s(r)?b("MapSet").F(r,t):v(r)?b("MapSet").T(r,t):n.O?function(n,r){var t=Array.isArray(n),e={i:t?1:0,A:r?r.A:_(),P:!1,I:!1,R:{},l:r,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;t&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(r,t):b("ES5").J(r,t);return(t?t.A:_()).p.push(e),e}function R(e){return r(e)||n(22,e),function n(r){if(!t(r))return r;var e,u=r[Q],c=o(r);if(u){if(!u.P&&(u.i<4||!b("ES5").K(u)))return u.t;u.I=!0,e=D(r,c),u.I=!1}else e=D(r,c);return i(e,(function(r,t){u&&a(u.t,r)===t||f(e,r,n(t))})),3===c?new Set(e):e}(e)}function D(n,r){switch(r){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}function F(){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.g&&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,R:{},l:r,t:n,k:i,o:null,g:!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.R,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];"string"!=typeof p&&"number"!=typeof p&&(p=""+p),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},N: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.R,(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.R,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.R=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=N(n.A.h,r,n);n.p.set(r,e),n.o.add(e)}else n.o.add(r)})))}function u(r){r.g&&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,R:void 0,t:n,k:this,C:!1,g:!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.R.set(n,!0),t.o.set(n,r),t.R.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.R.set(n,!1):r.R.delete(n),r.o.delete(n),!0},o.clear=function(){var n=this[Q];u(n),p(n).size&&(e(n),k(n),n.R=new Map,i(n.t,(function(r){n.R.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=N(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,g:!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",{F:function(n,r){return new f(n,r)},T:function(n,r){return new c(n,r)}})}function J(){F(),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]=N(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.R[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&&(void 0!==t||r in n.o)||Number.isNaN(t)&&Number.isNaN(n.o[r])||(n.o[r]=t,n.R[r]=!0),!0},deleteProperty:function(n,r){return void 0!==z(n.t,r)||r in n.t?(n.R[r]=!1,E(n),k(n)):delete n.R[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.O=B,this.D=!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=N(e,r,void 0),v=!0;try{f=i(s),v=!1}finally{v?g(c):O(c)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw g(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.D&&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=R(e));var i=w(this),o=N(this,e,void 0);return o[Q].C=!0,O(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.D=n},i.setUseProxies=function(r){r&&!B&&n(20),this.O=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); | |
| 11674 | +//# sourceMappingURL=immer.esm.js.map | |
| 8393 | 11675 | |
| 11676 | + | |
| 8394 | 11677 | /***/ }) |
| 8395 | 11678 | |
| 8396 | 11679 | /******/ }); |
| 8397 | 11680 | /************************************************************************/ |
| @@ -8417,8 +11700,49 @@ | ||
| 8417 | 11700 | /******/ |
| 8418 | 11701 | /******/ // Return the exports of the module |
| 8419 | 11702 | /******/ return module.exports; |
| 8420 | 11703 | /******/ } |
| 11704 | +/******/ | |
| 11705 | +/************************************************************************/ | |
| 11706 | +/******/ /* webpack/runtime/define property getters */ | |
| 11707 | +/******/ (() => { | |
| 11708 | +/******/ // define getter functions for harmony exports | |
| 11709 | +/******/ __webpack_require__.d = (exports, definition) => { | |
| 11710 | +/******/ for(var key in definition) { | |
| 11711 | +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 11712 | +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 11713 | +/******/ } | |
| 11714 | +/******/ } | |
| 11715 | +/******/ }; | |
| 11716 | +/******/ })(); | |
| 11717 | +/******/ | |
| 11718 | +/******/ /* webpack/runtime/global */ | |
| 11719 | +/******/ (() => { | |
| 11720 | +/******/ __webpack_require__.g = (function() { | |
| 11721 | +/******/ if (typeof globalThis === 'object') return globalThis; | |
| 11722 | +/******/ try { | |
| 11723 | +/******/ return this || new Function('return this')(); | |
| 11724 | +/******/ } catch (e) { | |
| 11725 | +/******/ if (typeof window === 'object') return window; | |
| 11726 | +/******/ } | |
| 11727 | +/******/ })(); | |
| 11728 | +/******/ })(); | |
| 11729 | +/******/ | |
| 11730 | +/******/ /* webpack/runtime/hasOwnProperty shorthand */ | |
| 11731 | +/******/ (() => { | |
| 11732 | +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) | |
| 11733 | +/******/ })(); | |
| 11734 | +/******/ | |
| 11735 | +/******/ /* webpack/runtime/make namespace object */ | |
| 11736 | +/******/ (() => { | |
| 11737 | +/******/ // define __esModule on exports | |
| 11738 | +/******/ __webpack_require__.r = (exports) => { | |
| 11739 | +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | |
| 11740 | +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | |
| 11741 | +/******/ } | |
| 11742 | +/******/ Object.defineProperty(exports, '__esModule', { value: true }); | |
| 11743 | +/******/ }; | |
| 11744 | +/******/ })(); | |
| 8421 | 11745 | /******/ |
| 8422 | 11746 | /************************************************************************/ |
| 8423 | 11747 | var __webpack_exports__ = {}; |
| 8424 | 11748 | // This entry needs to be wrapped in an IIFE because it needs to be in strict mode. |