UNPKG

77.1 kBJavaScriptView Raw
1(function (global, factory) {
2 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators')) :
3 typeof define === 'function' && define.amd ? define('@ngrx/store', ['exports', '@angular/core', 'rxjs', 'rxjs/operators'], factory) :
4 (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ngrx = global.ngrx || {}, global.ngrx.store = {}), global.ng.core, global.rxjs, global.rxjs.operators));
5}(this, (function (exports, ngCore, rxjs, operators) { 'use strict';
6
7 function _interopNamespace(e) {
8 if (e && e.__esModule) return e;
9 var n = Object.create(null);
10 if (e) {
11 Object.keys(e).forEach(function (k) {
12 if (k !== 'default') {
13 var d = Object.getOwnPropertyDescriptor(e, k);
14 Object.defineProperty(n, k, d.get ? d : {
15 enumerable: true,
16 get: function () {
17 return e[k];
18 }
19 });
20 }
21 });
22 }
23 n['default'] = e;
24 return Object.freeze(n);
25 }
26
27 var ngCore__namespace = /*#__PURE__*/_interopNamespace(ngCore);
28
29 /*! *****************************************************************************
30 Copyright (c) Microsoft Corporation.
31
32 Permission to use, copy, modify, and/or distribute this software for any
33 purpose with or without fee is hereby granted.
34
35 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
36 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
37 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
38 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
39 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
40 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
41 PERFORMANCE OF THIS SOFTWARE.
42 ***************************************************************************** */
43 /* global Reflect, Promise */
44 var extendStatics = function (d, b) {
45 extendStatics = Object.setPrototypeOf ||
46 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
47 function (d, b) { for (var p in b)
48 if (Object.prototype.hasOwnProperty.call(b, p))
49 d[p] = b[p]; };
50 return extendStatics(d, b);
51 };
52 function __extends(d, b) {
53 if (typeof b !== "function" && b !== null)
54 throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
55 extendStatics(d, b);
56 function __() { this.constructor = d; }
57 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
58 }
59 var __assign = function () {
60 __assign = Object.assign || function __assign(t) {
61 for (var s, i = 1, n = arguments.length; i < n; i++) {
62 s = arguments[i];
63 for (var p in s)
64 if (Object.prototype.hasOwnProperty.call(s, p))
65 t[p] = s[p];
66 }
67 return t;
68 };
69 return __assign.apply(this, arguments);
70 };
71 function __rest(s, e) {
72 var t = {};
73 for (var p in s)
74 if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
75 t[p] = s[p];
76 if (s != null && typeof Object.getOwnPropertySymbols === "function")
77 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
78 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
79 t[p[i]] = s[p[i]];
80 }
81 return t;
82 }
83 function __decorate(decorators, target, key, desc) {
84 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
85 if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
86 r = Reflect.decorate(decorators, target, key, desc);
87 else
88 for (var i = decorators.length - 1; i >= 0; i--)
89 if (d = decorators[i])
90 r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
91 return c > 3 && r && Object.defineProperty(target, key, r), r;
92 }
93 function __param(paramIndex, decorator) {
94 return function (target, key) { decorator(target, key, paramIndex); };
95 }
96 function __metadata(metadataKey, metadataValue) {
97 if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
98 return Reflect.metadata(metadataKey, metadataValue);
99 }
100 function __awaiter(thisArg, _arguments, P, generator) {
101 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
102 return new (P || (P = Promise))(function (resolve, reject) {
103 function fulfilled(value) { try {
104 step(generator.next(value));
105 }
106 catch (e) {
107 reject(e);
108 } }
109 function rejected(value) { try {
110 step(generator["throw"](value));
111 }
112 catch (e) {
113 reject(e);
114 } }
115 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
116 step((generator = generator.apply(thisArg, _arguments || [])).next());
117 });
118 }
119 function __generator(thisArg, body) {
120 var _ = { label: 0, sent: function () { if (t[0] & 1)
121 throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
122 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
123 function verb(n) { return function (v) { return step([n, v]); }; }
124 function step(op) {
125 if (f)
126 throw new TypeError("Generator is already executing.");
127 while (_)
128 try {
129 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)
130 return t;
131 if (y = 0, t)
132 op = [op[0] & 2, t.value];
133 switch (op[0]) {
134 case 0:
135 case 1:
136 t = op;
137 break;
138 case 4:
139 _.label++;
140 return { value: op[1], done: false };
141 case 5:
142 _.label++;
143 y = op[1];
144 op = [0];
145 continue;
146 case 7:
147 op = _.ops.pop();
148 _.trys.pop();
149 continue;
150 default:
151 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
152 _ = 0;
153 continue;
154 }
155 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
156 _.label = op[1];
157 break;
158 }
159 if (op[0] === 6 && _.label < t[1]) {
160 _.label = t[1];
161 t = op;
162 break;
163 }
164 if (t && _.label < t[2]) {
165 _.label = t[2];
166 _.ops.push(op);
167 break;
168 }
169 if (t[2])
170 _.ops.pop();
171 _.trys.pop();
172 continue;
173 }
174 op = body.call(thisArg, _);
175 }
176 catch (e) {
177 op = [6, e];
178 y = 0;
179 }
180 finally {
181 f = t = 0;
182 }
183 if (op[0] & 5)
184 throw op[1];
185 return { value: op[0] ? op[1] : void 0, done: true };
186 }
187 }
188 var __createBinding = Object.create ? (function (o, m, k, k2) {
189 if (k2 === undefined)
190 k2 = k;
191 Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
192 }) : (function (o, m, k, k2) {
193 if (k2 === undefined)
194 k2 = k;
195 o[k2] = m[k];
196 });
197 function __exportStar(m, o) {
198 for (var p in m)
199 if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
200 __createBinding(o, m, p);
201 }
202 function __values(o) {
203 var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
204 if (m)
205 return m.call(o);
206 if (o && typeof o.length === "number")
207 return {
208 next: function () {
209 if (o && i >= o.length)
210 o = void 0;
211 return { value: o && o[i++], done: !o };
212 }
213 };
214 throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
215 }
216 function __read(o, n) {
217 var m = typeof Symbol === "function" && o[Symbol.iterator];
218 if (!m)
219 return o;
220 var i = m.call(o), r, ar = [], e;
221 try {
222 while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
223 ar.push(r.value);
224 }
225 catch (error) {
226 e = { error: error };
227 }
228 finally {
229 try {
230 if (r && !r.done && (m = i["return"]))
231 m.call(i);
232 }
233 finally {
234 if (e)
235 throw e.error;
236 }
237 }
238 return ar;
239 }
240 /** @deprecated */
241 function __spread() {
242 for (var ar = [], i = 0; i < arguments.length; i++)
243 ar = ar.concat(__read(arguments[i]));
244 return ar;
245 }
246 /** @deprecated */
247 function __spreadArrays() {
248 for (var s = 0, i = 0, il = arguments.length; i < il; i++)
249 s += arguments[i].length;
250 for (var r = Array(s), k = 0, i = 0; i < il; i++)
251 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
252 r[k] = a[j];
253 return r;
254 }
255 function __spreadArray(to, from) {
256 for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
257 to[j] = from[i];
258 return to;
259 }
260 function __await(v) {
261 return this instanceof __await ? (this.v = v, this) : new __await(v);
262 }
263 function __asyncGenerator(thisArg, _arguments, generator) {
264 if (!Symbol.asyncIterator)
265 throw new TypeError("Symbol.asyncIterator is not defined.");
266 var g = generator.apply(thisArg, _arguments || []), i, q = [];
267 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
268 function verb(n) { if (g[n])
269 i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
270 function resume(n, v) { try {
271 step(g[n](v));
272 }
273 catch (e) {
274 settle(q[0][3], e);
275 } }
276 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
277 function fulfill(value) { resume("next", value); }
278 function reject(value) { resume("throw", value); }
279 function settle(f, v) { if (f(v), q.shift(), q.length)
280 resume(q[0][0], q[0][1]); }
281 }
282 function __asyncDelegator(o) {
283 var i, p;
284 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
285 function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
286 }
287 function __asyncValues(o) {
288 if (!Symbol.asyncIterator)
289 throw new TypeError("Symbol.asyncIterator is not defined.");
290 var m = o[Symbol.asyncIterator], i;
291 return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
292 function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
293 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
294 }
295 function __makeTemplateObject(cooked, raw) {
296 if (Object.defineProperty) {
297 Object.defineProperty(cooked, "raw", { value: raw });
298 }
299 else {
300 cooked.raw = raw;
301 }
302 return cooked;
303 }
304 ;
305 var __setModuleDefault = Object.create ? (function (o, v) {
306 Object.defineProperty(o, "default", { enumerable: true, value: v });
307 }) : function (o, v) {
308 o["default"] = v;
309 };
310 function __importStar(mod) {
311 if (mod && mod.__esModule)
312 return mod;
313 var result = {};
314 if (mod != null)
315 for (var k in mod)
316 if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
317 __createBinding(result, mod, k);
318 __setModuleDefault(result, mod);
319 return result;
320 }
321 function __importDefault(mod) {
322 return (mod && mod.__esModule) ? mod : { default: mod };
323 }
324 function __classPrivateFieldGet(receiver, state, kind, f) {
325 if (kind === "a" && !f)
326 throw new TypeError("Private accessor was defined without a getter");
327 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
328 throw new TypeError("Cannot read private member from an object whose class did not declare it");
329 return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
330 }
331 function __classPrivateFieldSet(receiver, state, value, kind, f) {
332 if (kind === "m")
333 throw new TypeError("Private method is not writable");
334 if (kind === "a" && !f)
335 throw new TypeError("Private accessor was defined without a setter");
336 if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
337 throw new TypeError("Cannot write private member to an object whose class did not declare it");
338 return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
339 }
340
341 var REGISTERED_ACTION_TYPES = {};
342 function resetRegisteredActionTypes() {
343 var e_1, _a;
344 try {
345 for (var _b = __values(Object.keys(REGISTERED_ACTION_TYPES)), _c = _b.next(); !_c.done; _c = _b.next()) {
346 var key = _c.value;
347 delete REGISTERED_ACTION_TYPES[key];
348 }
349 }
350 catch (e_1_1) { e_1 = { error: e_1_1 }; }
351 finally {
352 try {
353 if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
354 }
355 finally { if (e_1) throw e_1.error; }
356 }
357 }
358
359 /**
360 * @description
361 * Creates a configured `Creator` function that, when called, returns an object in the shape of the `Action` interface.
362 *
363 * Action creators reduce the explicitness of class-based action creators.
364 *
365 * @param type Describes the action that will be dispatched
366 * @param config Additional metadata needed for the handling of the action. See {@link createAction#usage-notes Usage Notes}.
367 *
368 * @usageNotes
369 *
370 * **Declaring an action creator**
371 *
372 * Without additional metadata:
373 * ```ts
374 * export const increment = createAction('[Counter] Increment');
375 * ```
376 * With additional metadata:
377 * ```ts
378 * export const loginSuccess = createAction(
379 * '[Auth/API] Login Success',
380 * props<{ user: User }>()
381 * );
382 * ```
383 * With a function:
384 * ```ts
385 * export const loginSuccess = createAction(
386 * '[Auth/API] Login Success',
387 * (response: Response) => response.user
388 * );
389 * ```
390 *
391 * **Dispatching an action**
392 *
393 * Without additional metadata:
394 * ```ts
395 * store.dispatch(increment());
396 * ```
397 * With additional metadata:
398 * ```ts
399 * store.dispatch(loginSuccess({ user: newUser }));
400 * ```
401 *
402 * **Referencing an action in a reducer**
403 *
404 * Using a switch statement:
405 * ```ts
406 * switch (action.type) {
407 * // ...
408 * case AuthApiActions.loginSuccess.type: {
409 * return {
410 * ...state,
411 * user: action.user
412 * };
413 * }
414 * }
415 * ```
416 * Using a reducer creator:
417 * ```ts
418 * on(AuthApiActions.loginSuccess, (state, { user }) => ({ ...state, user }))
419 * ```
420 *
421 * **Referencing an action in an effect**
422 * ```ts
423 * effectName$ = createEffect(
424 * () => this.actions$.pipe(
425 * ofType(AuthApiActions.loginSuccess),
426 * // ...
427 * )
428 * );
429 * ```
430 */
431 function createAction(type, config) {
432 REGISTERED_ACTION_TYPES[type] = (REGISTERED_ACTION_TYPES[type] || 0) + 1;
433 if (typeof config === 'function') {
434 return defineType(type, function () {
435 var args = [];
436 for (var _i = 0; _i < arguments.length; _i++) {
437 args[_i] = arguments[_i];
438 }
439 return (Object.assign(Object.assign({}, config.apply(void 0, __spreadArray([], __read(args)))), { type: type }));
440 });
441 }
442 var as = config ? config._as : 'empty';
443 switch (as) {
444 case 'empty':
445 return defineType(type, function () { return ({ type: type }); });
446 case 'props':
447 return defineType(type, function (props) { return (Object.assign(Object.assign({}, props), { type: type })); });
448 default:
449 throw new Error('Unexpected config.');
450 }
451 }
452 function props() {
453 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/naming-convention
454 return { _as: 'props', _p: undefined };
455 }
456 function union(creators) {
457 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
458 return undefined;
459 }
460 function defineType(type, creator) {
461 return Object.defineProperty(creator, 'type', {
462 value: type,
463 writable: false,
464 });
465 }
466
467 var INIT = '@ngrx/store/init';
468 var ActionsSubject = /** @class */ (function (_super) {
469 __extends(ActionsSubject, _super);
470 function ActionsSubject() {
471 return _super.call(this, { type: INIT }) || this;
472 }
473 ActionsSubject.prototype.next = function (action) {
474 if (typeof action === 'function') {
475 throw new TypeError("\n Dispatch expected an object, instead it received a function.\n If you're using the createAction function, make sure to invoke the function\n before dispatching the action. For example, someAction should be someAction().");
476 }
477 else if (typeof action === 'undefined') {
478 throw new TypeError("Actions must be objects");
479 }
480 else if (typeof action.type === 'undefined') {
481 throw new TypeError("Actions must have a type property");
482 }
483 _super.prototype.next.call(this, action);
484 };
485 ActionsSubject.prototype.complete = function () {
486 /* noop */
487 };
488 ActionsSubject.prototype.ngOnDestroy = function () {
489 _super.prototype.complete.call(this);
490 };
491 return ActionsSubject;
492 }(rxjs.BehaviorSubject));
493 ActionsSubject.decorators = [
494 { type: ngCore.Injectable }
495 ];
496 /** @nocollapse */
497 ActionsSubject.ctorParameters = function () { return []; };
498 var ACTIONS_SUBJECT_PROVIDERS = [ActionsSubject];
499
500 var _ROOT_STORE_GUARD = new ngCore.InjectionToken('@ngrx/store Internal Root Guard');
501 var _INITIAL_STATE = new ngCore.InjectionToken('@ngrx/store Internal Initial State');
502 var INITIAL_STATE = new ngCore.InjectionToken('@ngrx/store Initial State');
503 var REDUCER_FACTORY = new ngCore.InjectionToken('@ngrx/store Reducer Factory');
504 var _REDUCER_FACTORY = new ngCore.InjectionToken('@ngrx/store Internal Reducer Factory Provider');
505 var INITIAL_REDUCERS = new ngCore.InjectionToken('@ngrx/store Initial Reducers');
506 var _INITIAL_REDUCERS = new ngCore.InjectionToken('@ngrx/store Internal Initial Reducers');
507 var STORE_FEATURES = new ngCore.InjectionToken('@ngrx/store Store Features');
508 var _STORE_REDUCERS = new ngCore.InjectionToken('@ngrx/store Internal Store Reducers');
509 var _FEATURE_REDUCERS = new ngCore.InjectionToken('@ngrx/store Internal Feature Reducers');
510 var _FEATURE_CONFIGS = new ngCore.InjectionToken('@ngrx/store Internal Feature Configs');
511 var _STORE_FEATURES = new ngCore.InjectionToken('@ngrx/store Internal Store Features');
512 var _FEATURE_REDUCERS_TOKEN = new ngCore.InjectionToken('@ngrx/store Internal Feature Reducers Token');
513 var FEATURE_REDUCERS = new ngCore.InjectionToken('@ngrx/store Feature Reducers');
514 /**
515 * User-defined meta reducers from StoreModule.forRoot()
516 */
517 var USER_PROVIDED_META_REDUCERS = new ngCore.InjectionToken('@ngrx/store User Provided Meta Reducers');
518 /**
519 * Meta reducers defined either internally by @ngrx/store or by library authors
520 */
521 var META_REDUCERS = new ngCore.InjectionToken('@ngrx/store Meta Reducers');
522 /**
523 * Concats the user provided meta reducers and the meta reducers provided on the multi
524 * injection token
525 */
526 var _RESOLVED_META_REDUCERS = new ngCore.InjectionToken('@ngrx/store Internal Resolved Meta Reducers');
527 /**
528 * Runtime checks defined by the user via an InjectionToken
529 * Defaults to `_USER_RUNTIME_CHECKS`
530 */
531 var USER_RUNTIME_CHECKS = new ngCore.InjectionToken('@ngrx/store User Runtime Checks Config');
532 /**
533 * Runtime checks defined by the user via forRoot()
534 */
535 var _USER_RUNTIME_CHECKS = new ngCore.InjectionToken('@ngrx/store Internal User Runtime Checks Config');
536 /**
537 * Runtime checks currently in use
538 */
539 var ACTIVE_RUNTIME_CHECKS = new ngCore.InjectionToken('@ngrx/store Internal Runtime Checks');
540 var _ACTION_TYPE_UNIQUENESS_CHECK = new ngCore.InjectionToken('@ngrx/store Check if Action types are unique');
541
542 /**
543 * @description
544 * Combines reducers for individual features into a single reducer.
545 *
546 * You can use this function to delegate handling of state transitions to multiple reducers, each acting on their
547 * own sub-state within the root state.
548 *
549 * @param reducers An object mapping keys of the root state to their corresponding feature reducer.
550 * @param initialState Provides a state value if the current state is `undefined`, as it is initially.
551 * @returns A reducer function.
552 *
553 * @usageNotes
554 *
555 * **Example combining two feature reducers into one "root" reducer**
556 *
557 * ```ts
558 * export const reducer = combineReducers({
559 * featureA: featureAReducer,
560 * featureB: featureBReducer
561 * });
562 * ```
563 *
564 * You can also override the initial states of the sub-features:
565 * ```ts
566 * export const reducer = combineReducers({
567 * featureA: featureAReducer,
568 * featureB: featureBReducer
569 * }, {
570 * featureA: { counterA: 13 },
571 * featureB: { counterB: 37 }
572 * });
573 * ```
574 */
575 function combineReducers(reducers, initialState) {
576 if (initialState === void 0) { initialState = {}; }
577 var reducerKeys = Object.keys(reducers);
578 var finalReducers = {};
579 for (var i = 0; i < reducerKeys.length; i++) {
580 var key = reducerKeys[i];
581 if (typeof reducers[key] === 'function') {
582 finalReducers[key] = reducers[key];
583 }
584 }
585 var finalReducerKeys = Object.keys(finalReducers);
586 return function combination(state, action) {
587 state = state === undefined ? initialState : state;
588 var hasChanged = false;
589 var nextState = {};
590 for (var i = 0; i < finalReducerKeys.length; i++) {
591 var key = finalReducerKeys[i];
592 var reducer = finalReducers[key];
593 var previousStateForKey = state[key];
594 var nextStateForKey = reducer(previousStateForKey, action);
595 nextState[key] = nextStateForKey;
596 hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
597 }
598 return hasChanged ? nextState : state;
599 };
600 }
601 function omit(object, keyToRemove) {
602 return Object.keys(object)
603 .filter(function (key) { return key !== keyToRemove; })
604 .reduce(function (result, key) {
605 var _a;
606 return Object.assign(result, (_a = {}, _a[key] = object[key], _a));
607 }, {});
608 }
609 function compose() {
610 var functions = [];
611 for (var _i = 0; _i < arguments.length; _i++) {
612 functions[_i] = arguments[_i];
613 }
614 return function (arg) {
615 if (functions.length === 0) {
616 return arg;
617 }
618 var last = functions[functions.length - 1];
619 var rest = functions.slice(0, -1);
620 return rest.reduceRight(function (composed, fn) { return fn(composed); }, last(arg));
621 };
622 }
623 function createReducerFactory(reducerFactory, metaReducers) {
624 if (Array.isArray(metaReducers) && metaReducers.length > 0) {
625 reducerFactory = compose.apply(null, __spreadArray(__spreadArray([], __read(metaReducers)), [
626 reducerFactory,
627 ]));
628 }
629 return function (reducers, initialState) {
630 var reducer = reducerFactory(reducers);
631 return function (state, action) {
632 state = state === undefined ? initialState : state;
633 return reducer(state, action);
634 };
635 };
636 }
637 function createFeatureReducerFactory(metaReducers) {
638 var reducerFactory = Array.isArray(metaReducers) && metaReducers.length > 0
639 ? compose.apply(void 0, __spreadArray([], __read(metaReducers))) : function (r) { return r; };
640 return function (reducer, initialState) {
641 reducer = reducerFactory(reducer);
642 return function (state, action) {
643 state = state === undefined ? initialState : state;
644 return reducer(state, action);
645 };
646 };
647 }
648
649 var ReducerObservable = /** @class */ (function (_super) {
650 __extends(ReducerObservable, _super);
651 function ReducerObservable() {
652 return _super !== null && _super.apply(this, arguments) || this;
653 }
654 return ReducerObservable;
655 }(rxjs.Observable));
656 var ReducerManagerDispatcher = /** @class */ (function (_super) {
657 __extends(ReducerManagerDispatcher, _super);
658 function ReducerManagerDispatcher() {
659 return _super !== null && _super.apply(this, arguments) || this;
660 }
661 return ReducerManagerDispatcher;
662 }(ActionsSubject));
663 var UPDATE = '@ngrx/store/update-reducers';
664 var ReducerManager = /** @class */ (function (_super) {
665 __extends(ReducerManager, _super);
666 function ReducerManager(dispatcher, initialState, reducers, reducerFactory) {
667 var _this = _super.call(this, reducerFactory(reducers, initialState)) || this;
668 _this.dispatcher = dispatcher;
669 _this.initialState = initialState;
670 _this.reducers = reducers;
671 _this.reducerFactory = reducerFactory;
672 return _this;
673 }
674 Object.defineProperty(ReducerManager.prototype, "currentReducers", {
675 get: function () {
676 return this.reducers;
677 },
678 enumerable: false,
679 configurable: true
680 });
681 ReducerManager.prototype.addFeature = function (feature) {
682 this.addFeatures([feature]);
683 };
684 ReducerManager.prototype.addFeatures = function (features) {
685 var reducers = features.reduce(function (reducerDict, _a) {
686 var reducers = _a.reducers, reducerFactory = _a.reducerFactory, metaReducers = _a.metaReducers, initialState = _a.initialState, key = _a.key;
687 var reducer = typeof reducers === 'function'
688 ? createFeatureReducerFactory(metaReducers)(reducers, initialState)
689 : createReducerFactory(reducerFactory, metaReducers)(reducers, initialState);
690 reducerDict[key] = reducer;
691 return reducerDict;
692 }, {});
693 this.addReducers(reducers);
694 };
695 ReducerManager.prototype.removeFeature = function (feature) {
696 this.removeFeatures([feature]);
697 };
698 ReducerManager.prototype.removeFeatures = function (features) {
699 this.removeReducers(features.map(function (p) { return p.key; }));
700 };
701 ReducerManager.prototype.addReducer = function (key, reducer) {
702 var _a;
703 this.addReducers((_a = {}, _a[key] = reducer, _a));
704 };
705 ReducerManager.prototype.addReducers = function (reducers) {
706 this.reducers = Object.assign(Object.assign({}, this.reducers), reducers);
707 this.updateReducers(Object.keys(reducers));
708 };
709 ReducerManager.prototype.removeReducer = function (featureKey) {
710 this.removeReducers([featureKey]);
711 };
712 ReducerManager.prototype.removeReducers = function (featureKeys) {
713 var _this = this;
714 featureKeys.forEach(function (key) {
715 _this.reducers = omit(_this.reducers, key) /*TODO(#823)*/;
716 });
717 this.updateReducers(featureKeys);
718 };
719 ReducerManager.prototype.updateReducers = function (featureKeys) {
720 this.next(this.reducerFactory(this.reducers, this.initialState));
721 this.dispatcher.next({
722 type: UPDATE,
723 features: featureKeys,
724 });
725 };
726 ReducerManager.prototype.ngOnDestroy = function () {
727 this.complete();
728 };
729 return ReducerManager;
730 }(rxjs.BehaviorSubject));
731 ReducerManager.decorators = [
732 { type: ngCore.Injectable }
733 ];
734 /** @nocollapse */
735 ReducerManager.ctorParameters = function () { return [
736 { type: ReducerManagerDispatcher },
737 { type: undefined, decorators: [{ type: ngCore.Inject, args: [INITIAL_STATE,] }] },
738 { type: undefined, decorators: [{ type: ngCore.Inject, args: [INITIAL_REDUCERS,] }] },
739 { type: undefined, decorators: [{ type: ngCore.Inject, args: [REDUCER_FACTORY,] }] }
740 ]; };
741 var REDUCER_MANAGER_PROVIDERS = [
742 ReducerManager,
743 { provide: ReducerObservable, useExisting: ReducerManager },
744 { provide: ReducerManagerDispatcher, useExisting: ActionsSubject },
745 ];
746
747 var ScannedActionsSubject = /** @class */ (function (_super) {
748 __extends(ScannedActionsSubject, _super);
749 function ScannedActionsSubject() {
750 return _super !== null && _super.apply(this, arguments) || this;
751 }
752 ScannedActionsSubject.prototype.ngOnDestroy = function () {
753 this.complete();
754 };
755 return ScannedActionsSubject;
756 }(rxjs.Subject));
757 ScannedActionsSubject.decorators = [
758 { type: ngCore.Injectable }
759 ];
760 var SCANNED_ACTIONS_SUBJECT_PROVIDERS = [
761 ScannedActionsSubject,
762 ];
763
764 var StateObservable = /** @class */ (function (_super) {
765 __extends(StateObservable, _super);
766 function StateObservable() {
767 return _super !== null && _super.apply(this, arguments) || this;
768 }
769 return StateObservable;
770 }(rxjs.Observable));
771 var State = /** @class */ (function (_super) {
772 __extends(State, _super);
773 function State(actions$, reducer$, scannedActions, initialState) {
774 var _this = _super.call(this, initialState) || this;
775 var actionsOnQueue$ = actions$.pipe(operators.observeOn(rxjs.queueScheduler));
776 var withLatestReducer$ = actionsOnQueue$.pipe(operators.withLatestFrom(reducer$));
777 var seed = { state: initialState };
778 var stateAndAction$ = withLatestReducer$.pipe(operators.scan(reduceState, seed));
779 _this.stateSubscription = stateAndAction$.subscribe(function (_a) {
780 var state = _a.state, action = _a.action;
781 _this.next(state);
782 scannedActions.next(action);
783 });
784 return _this;
785 }
786 State.prototype.ngOnDestroy = function () {
787 this.stateSubscription.unsubscribe();
788 this.complete();
789 };
790 return State;
791 }(rxjs.BehaviorSubject));
792 State.INIT = INIT;
793 State.decorators = [
794 { type: ngCore.Injectable }
795 ];
796 /** @nocollapse */
797 State.ctorParameters = function () { return [
798 { type: ActionsSubject },
799 { type: ReducerObservable },
800 { type: ScannedActionsSubject },
801 { type: undefined, decorators: [{ type: ngCore.Inject, args: [INITIAL_STATE,] }] }
802 ]; };
803 function reduceState(stateActionPair, _a) {
804 if (stateActionPair === void 0) { stateActionPair = { state: undefined }; }
805 var _b = __read(_a, 2), action = _b[0], reducer = _b[1];
806 var state = stateActionPair.state;
807 return { state: reducer(state, action), action: action };
808 }
809 var STATE_PROVIDERS = [
810 State,
811 { provide: StateObservable, useExisting: State },
812 ];
813
814 var Store = /** @class */ (function (_super) {
815 __extends(Store, _super);
816 function Store(state$, actionsObserver, reducerManager) {
817 var _this = _super.call(this) || this;
818 _this.actionsObserver = actionsObserver;
819 _this.reducerManager = reducerManager;
820 _this.source = state$;
821 return _this;
822 }
823 Store.prototype.select = function (pathOrMapFn) {
824 var paths = [];
825 for (var _i = 1; _i < arguments.length; _i++) {
826 paths[_i - 1] = arguments[_i];
827 }
828 return select.call.apply(select, __spreadArray([null, pathOrMapFn], __read(paths)))(this);
829 };
830 Store.prototype.lift = function (operator) {
831 var store = new Store(this, this.actionsObserver, this.reducerManager);
832 store.operator = operator;
833 return store;
834 };
835 Store.prototype.dispatch = function (action) {
836 this.actionsObserver.next(action);
837 };
838 Store.prototype.next = function (action) {
839 this.actionsObserver.next(action);
840 };
841 Store.prototype.error = function (err) {
842 this.actionsObserver.error(err);
843 };
844 Store.prototype.complete = function () {
845 this.actionsObserver.complete();
846 };
847 Store.prototype.addReducer = function (key, reducer) {
848 this.reducerManager.addReducer(key, reducer);
849 };
850 Store.prototype.removeReducer = function (key) {
851 this.reducerManager.removeReducer(key);
852 };
853 return Store;
854 }(rxjs.Observable));
855 Store.decorators = [
856 { type: ngCore.Injectable }
857 ];
858 /** @nocollapse */
859 Store.ctorParameters = function () { return [
860 { type: StateObservable },
861 { type: ActionsSubject },
862 { type: ReducerManager }
863 ]; };
864 var STORE_PROVIDERS = [Store];
865 function select(pathOrMapFn, propsOrPath) {
866 var paths = [];
867 for (var _i = 2; _i < arguments.length; _i++) {
868 paths[_i - 2] = arguments[_i];
869 }
870 return function selectOperator(source$) {
871 var mapped$;
872 if (typeof pathOrMapFn === 'string') {
873 var pathSlices = __spreadArray([propsOrPath], __read(paths)).filter(Boolean);
874 mapped$ = source$.pipe(operators.pluck.apply(void 0, __spreadArray([pathOrMapFn], __read(pathSlices))));
875 }
876 else if (typeof pathOrMapFn === 'function') {
877 mapped$ = source$.pipe(operators.map(function (source) { return pathOrMapFn(source, propsOrPath); }));
878 }
879 else {
880 throw new TypeError("Unexpected type '" + typeof pathOrMapFn + "' in select operator," +
881 " expected 'string' or 'function'");
882 }
883 return mapped$.pipe(operators.distinctUntilChanged());
884 };
885 }
886
887 function capitalize(text) {
888 return (text.charAt(0).toUpperCase() + text.substr(1));
889 }
890
891 var RUNTIME_CHECK_URL = 'https://ngrx.io/guide/store/configuration/runtime-checks';
892 function isUndefined(target) {
893 return target === undefined;
894 }
895 function isNull(target) {
896 return target === null;
897 }
898 function isArray(target) {
899 return Array.isArray(target);
900 }
901 function isString(target) {
902 return typeof target === 'string';
903 }
904 function isBoolean(target) {
905 return typeof target === 'boolean';
906 }
907 function isNumber(target) {
908 return typeof target === 'number';
909 }
910 function isObjectLike(target) {
911 return typeof target === 'object' && target !== null;
912 }
913 function isObject(target) {
914 return isObjectLike(target) && !isArray(target);
915 }
916 function isPlainObject(target) {
917 if (!isObject(target)) {
918 return false;
919 }
920 var targetPrototype = Object.getPrototypeOf(target);
921 return targetPrototype === Object.prototype || targetPrototype === null;
922 }
923 function isFunction(target) {
924 return typeof target === 'function';
925 }
926 function isComponent(target) {
927 return isFunction(target) && target.hasOwnProperty('ɵcmp');
928 }
929 function hasOwnProperty(target, propertyName) {
930 return Object.prototype.hasOwnProperty.call(target, propertyName);
931 }
932
933 var _ngrxMockEnvironment = false;
934 function setNgrxMockEnvironment(value) {
935 _ngrxMockEnvironment = value;
936 }
937 function isNgrxMockEnvironment() {
938 return _ngrxMockEnvironment;
939 }
940
941 function isEqualCheck(a, b) {
942 return a === b;
943 }
944 function isArgumentsChanged(args, lastArguments, comparator) {
945 for (var i = 0; i < args.length; i++) {
946 if (!comparator(args[i], lastArguments[i])) {
947 return true;
948 }
949 }
950 return false;
951 }
952 function resultMemoize(projectionFn, isResultEqual) {
953 return defaultMemoize(projectionFn, isEqualCheck, isResultEqual);
954 }
955 function defaultMemoize(projectionFn, isArgumentsEqual, isResultEqual) {
956 if (isArgumentsEqual === void 0) { isArgumentsEqual = isEqualCheck; }
957 if (isResultEqual === void 0) { isResultEqual = isEqualCheck; }
958 var lastArguments = null;
959 // eslint-disable-next-line @typescript-eslint/no-explicit-any, , , , ,
960 var lastResult = null;
961 var overrideResult;
962 function reset() {
963 lastArguments = null;
964 lastResult = null;
965 }
966 function setResult(result) {
967 if (result === void 0) { result = undefined; }
968 overrideResult = { result: result };
969 }
970 function clearResult() {
971 overrideResult = undefined;
972 }
973 /* eslint-disable prefer-rest-params, prefer-spread */
974 // disabled because of the use of `arguments`
975 function memoized() {
976 if (overrideResult !== undefined) {
977 return overrideResult.result;
978 }
979 if (!lastArguments) {
980 lastResult = projectionFn.apply(null, arguments);
981 lastArguments = arguments;
982 return lastResult;
983 }
984 if (!isArgumentsChanged(arguments, lastArguments, isArgumentsEqual)) {
985 return lastResult;
986 }
987 var newResult = projectionFn.apply(null, arguments);
988 lastArguments = arguments;
989 if (isResultEqual(lastResult, newResult)) {
990 return lastResult;
991 }
992 lastResult = newResult;
993 return newResult;
994 }
995 return { memoized: memoized, reset: reset, setResult: setResult, clearResult: clearResult };
996 }
997 function createSelector() {
998 var input = [];
999 for (var _i = 0; _i < arguments.length; _i++) {
1000 input[_i] = arguments[_i];
1001 }
1002 return createSelectorFactory(defaultMemoize).apply(void 0, __spreadArray([], __read(input)));
1003 }
1004 function defaultStateFn(state, selectors, props, memoizedProjector) {
1005 if (props === undefined) {
1006 var args_1 = selectors.map(function (fn) { return fn(state); });
1007 return memoizedProjector.memoized.apply(null, args_1);
1008 }
1009 var args = selectors.map(function (fn) { return fn(state, props); });
1010 return memoizedProjector.memoized.apply(null, __spreadArray(__spreadArray([], __read(args)), [props]));
1011 }
1012 /**
1013 *
1014 * @param memoize The function used to memoize selectors
1015 * @param options Config Object that may include a `stateFn` function defining how to return the selector's value, given the entire `Store`'s state, parent `Selector`s, `Props`, and a `MemoizedProjection`
1016 *
1017 * @usageNotes
1018 *
1019 * **Creating a Selector Factory Where Array Order Does Not Matter**
1020 *
1021 * ```ts
1022 * function removeMatch(arr: string[], target: string): string[] {
1023 * const matchIndex = arr.indexOf(target);
1024 * return [...arr.slice(0, matchIndex), ...arr.slice(matchIndex + 1)];
1025 * }
1026 *
1027 * function orderDoesNotMatterComparer(a: any, b: any): boolean {
1028 * if (!Array.isArray(a) || !Array.isArray(b)) {
1029 * return a === b;
1030 * }
1031 * if (a.length !== b.length) {
1032 * return false;
1033 * }
1034 * let tempB = [...b];
1035 * function reduceToDetermineIfArraysContainSameContents(
1036 * previousCallResult: boolean,
1037 * arrayMember: any
1038 * ): boolean {
1039 * if (previousCallResult === false) {
1040 * return false;
1041 * }
1042 * if (tempB.includes(arrayMember)) {
1043 * tempB = removeMatch(tempB, arrayMember);
1044 * return true;
1045 * }
1046 * return false;
1047 * }
1048 * return a.reduce(reduceToDetermineIfArraysContainSameContents, true);
1049 * }
1050 *
1051 * export const creactOrderDoesNotMatterSelector = createSelectorFactory(
1052 * (projectionFun) => defaultMemoize(
1053 * projectionFun,
1054 * orderDoesNotMatterComparer,
1055 * orderDoesNotMatterComparer
1056 * )
1057 * );
1058 * ```
1059 *
1060 * **Creating an Alternative Memoization Strategy**
1061 *
1062 * ```ts
1063 * function serialize(x: any): string {
1064 * return JSON.stringify(x);
1065 * }
1066 *
1067 * export const createFullHistorySelector = createSelectorFactory(
1068 * (projectionFunction) => {
1069 * const cache = {};
1070 *
1071 * function memoized() {
1072 * const serializedArguments = serialize(...arguments);
1073 * if (cache[serializedArguments] != null) {
1074 * cache[serializedArguments] = projectionFunction.apply(null, arguments);
1075 * }
1076 * return cache[serializedArguments];
1077 * }
1078 * return {
1079 * memoized,
1080 * reset: () => {},
1081 * setResult: () => {},
1082 * clearResult: () => {},
1083 * };
1084 * }
1085 * );
1086 * ```
1087 *
1088 *
1089 */
1090 function createSelectorFactory(memoize, options) {
1091 if (options === void 0) { options = {
1092 stateFn: defaultStateFn,
1093 }; }
1094 return function () {
1095 var input = [];
1096 for (var _i = 0; _i < arguments.length; _i++) {
1097 input[_i] = arguments[_i];
1098 }
1099 var args = input;
1100 if (Array.isArray(args[0])) {
1101 var _a = __read(args), head = _a[0], tail = _a.slice(1);
1102 args = __spreadArray(__spreadArray([], __read(head)), __read(tail));
1103 }
1104 var selectors = args.slice(0, args.length - 1);
1105 var projector = args[args.length - 1];
1106 var memoizedSelectors = selectors.filter(function (selector) { return selector.release && typeof selector.release === 'function'; });
1107 var memoizedProjector = memoize(function () {
1108 var selectors = [];
1109 for (var _i = 0; _i < arguments.length; _i++) {
1110 selectors[_i] = arguments[_i];
1111 }
1112 return projector.apply(null, selectors);
1113 });
1114 var memoizedState = defaultMemoize(function (state, props) {
1115 return options.stateFn.apply(null, [
1116 state,
1117 selectors,
1118 props,
1119 memoizedProjector,
1120 ]);
1121 });
1122 function release() {
1123 memoizedState.reset();
1124 memoizedProjector.reset();
1125 memoizedSelectors.forEach(function (selector) { return selector.release(); });
1126 }
1127 return Object.assign(memoizedState.memoized, {
1128 release: release,
1129 projector: memoizedProjector.memoized,
1130 setResult: memoizedState.setResult,
1131 clearResult: memoizedState.clearResult,
1132 });
1133 };
1134 }
1135 function createFeatureSelector(featureName) {
1136 return createSelector(function (state) {
1137 var featureState = state[featureName];
1138 if (!isNgrxMockEnvironment() && ngCore.isDevMode() && !(featureName in state)) {
1139 console.warn("@ngrx/store: The feature name \"" + featureName + "\" does " +
1140 'not exist in the state, therefore createFeatureSelector ' +
1141 'cannot access it. Be sure it is imported in a loaded module ' +
1142 ("using StoreModule.forRoot('" + featureName + "', ...) or ") +
1143 ("StoreModule.forFeature('" + featureName + "', ...). If the default ") +
1144 'state is intended to be undefined, as is the case with router ' +
1145 'state, this development-only warning message can be ignored.');
1146 }
1147 return featureState;
1148 }, function (featureState) { return featureState; });
1149 }
1150
1151 /**
1152 * @description
1153 * A function that accepts a feature name and a feature reducer, and creates
1154 * a feature selector and a selector for each feature state property.
1155 *
1156 * @param featureConfig An object that contains a feature name and a feature reducer.
1157 * @returns An object that contains a feature name, a feature reducer,
1158 * a feature selector, a the selector for each feature state property.
1159 *
1160 * @usageNotes
1161 *
1162 * **With Application State**
1163 *
1164 * ```ts
1165 * interface AppState {
1166 * products: ProductsState;
1167 * }
1168 *
1169 * interface ProductsState {
1170 * products: Product[];
1171 * selectedId: string | null;
1172 * }
1173 *
1174 * const initialState: ProductsState = {
1175 * products: [],
1176 * selectedId: null,
1177 * };
1178 *
1179 * // AppState is passed as a generic argument
1180 * const productsFeature = createFeature<AppState>({
1181 * name: 'products',
1182 * reducer: createReducer(
1183 * initialState,
1184 * on(ProductsApiActions.loadSuccess(state, { products }) => ({
1185 * ...state,
1186 * products,
1187 * }),
1188 * ),
1189 * });
1190 *
1191 * const {
1192 * selectProductsState, // type: MemoizedSelector<AppState, ProductsState>
1193 * selectProducts, // type: MemoizedSelector<AppState, Product[]>
1194 * selectSelectedId, // type: MemoizedSelector<AppState, string | null>
1195 * } = productsFeature;
1196 * ```
1197 *
1198 * **Without Application State**
1199 *
1200 * ```ts
1201 * const productsFeature = createFeature({
1202 * name: 'products',
1203 * reducer: createReducer(initialState),
1204 * });
1205 *
1206 * const {
1207 * selectProductsState, // type: MemoizedSelector<Record<string, any>, ProductsState>
1208 * selectProducts, // type: MemoizedSelector<Record<string, any>, Product[]>
1209 * selectSelectedId, // type: MemoizedSelector<Record<string, any, string | null>
1210 * } = productsFeature;
1211 * ```
1212 */
1213 function createFeature(featureConfig) {
1214 var _a;
1215 var name = featureConfig.name, reducer = featureConfig.reducer;
1216 var featureSelector = createFeatureSelector(name);
1217 var nestedSelectors = createNestedSelectors(featureSelector, reducer);
1218 return Object.assign((_a = { name: name,
1219 reducer: reducer }, _a["select" + capitalize(name) + "State"] = featureSelector, _a), nestedSelectors);
1220 }
1221 function createNestedSelectors(featureSelector, reducer) {
1222 var initialState = getInitialState(reducer);
1223 var nestedKeys = (isPlainObject(initialState)
1224 ? Object.keys(initialState)
1225 : []);
1226 return nestedKeys.reduce(function (nestedSelectors, nestedKey) {
1227 var _a;
1228 return (Object.assign(Object.assign({}, nestedSelectors), (_a = {}, _a["select" + capitalize(nestedKey)] = createSelector(featureSelector, function (parentState) { return parentState === null || parentState === void 0 ? void 0 : parentState[nestedKey]; }), _a)));
1229 }, {});
1230 }
1231 function getInitialState(reducer) {
1232 return reducer(undefined, { type: '@ngrx/feature/init' });
1233 }
1234
1235 function immutabilityCheckMetaReducer(reducer, checks) {
1236 return function (state, action) {
1237 var act = checks.action(action) ? freeze(action) : action;
1238 var nextState = reducer(state, act);
1239 return checks.state() ? freeze(nextState) : nextState;
1240 };
1241 }
1242 function freeze(target) {
1243 Object.freeze(target);
1244 var targetIsFunction = isFunction(target);
1245 Object.getOwnPropertyNames(target).forEach(function (prop) {
1246 // Ignore Ivy properties, ref: https://github.com/ngrx/platform/issues/2109#issuecomment-582689060
1247 if (prop.startsWith('ɵ')) {
1248 return;
1249 }
1250 if (hasOwnProperty(target, prop) &&
1251 (targetIsFunction
1252 ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments'
1253 : true)) {
1254 var propValue = target[prop];
1255 if ((isObjectLike(propValue) || isFunction(propValue)) &&
1256 !Object.isFrozen(propValue)) {
1257 freeze(propValue);
1258 }
1259 }
1260 });
1261 return target;
1262 }
1263
1264 function serializationCheckMetaReducer(reducer, checks) {
1265 return function (state, action) {
1266 if (checks.action(action)) {
1267 var unserializableAction = getUnserializable(action);
1268 throwIfUnserializable(unserializableAction, 'action');
1269 }
1270 var nextState = reducer(state, action);
1271 if (checks.state()) {
1272 var unserializableState = getUnserializable(nextState);
1273 throwIfUnserializable(unserializableState, 'state');
1274 }
1275 return nextState;
1276 };
1277 }
1278 function getUnserializable(target, path) {
1279 if (path === void 0) { path = []; }
1280 // Guard against undefined and null, e.g. a reducer that returns undefined
1281 if ((isUndefined(target) || isNull(target)) && path.length === 0) {
1282 return {
1283 path: ['root'],
1284 value: target,
1285 };
1286 }
1287 var keys = Object.keys(target);
1288 return keys.reduce(function (result, key) {
1289 if (result) {
1290 return result;
1291 }
1292 var value = target[key];
1293 // Ignore Ivy components
1294 if (isComponent(value)) {
1295 return result;
1296 }
1297 if (isUndefined(value) ||
1298 isNull(value) ||
1299 isNumber(value) ||
1300 isBoolean(value) ||
1301 isString(value) ||
1302 isArray(value)) {
1303 return false;
1304 }
1305 if (isPlainObject(value)) {
1306 return getUnserializable(value, __spreadArray(__spreadArray([], __read(path)), [key]));
1307 }
1308 return {
1309 path: __spreadArray(__spreadArray([], __read(path)), [key]),
1310 value: value,
1311 };
1312 }, false);
1313 }
1314 function throwIfUnserializable(unserializable, context) {
1315 if (unserializable === false) {
1316 return;
1317 }
1318 var unserializablePath = unserializable.path.join('.');
1319 var error = new Error("Detected unserializable " + context + " at \"" + unserializablePath + "\". " + RUNTIME_CHECK_URL + "#strict" + context + "serializability");
1320 error.value = unserializable.value;
1321 error.unserializablePath = unserializablePath;
1322 throw error;
1323 }
1324
1325 function inNgZoneAssertMetaReducer(reducer, checks) {
1326 return function (state, action) {
1327 if (checks.action(action) && !ngCore__namespace.NgZone.isInAngularZone()) {
1328 throw new Error("Action '" + action.type + "' running outside NgZone. " + RUNTIME_CHECK_URL + "#strictactionwithinngzone");
1329 }
1330 return reducer(state, action);
1331 };
1332 }
1333
1334 function createActiveRuntimeChecks(runtimeChecks) {
1335 if (ngCore.isDevMode()) {
1336 return Object.assign({ strictStateSerializability: false, strictActionSerializability: false, strictStateImmutability: true, strictActionImmutability: true, strictActionWithinNgZone: false, strictActionTypeUniqueness: false }, runtimeChecks);
1337 }
1338 return {
1339 strictStateSerializability: false,
1340 strictActionSerializability: false,
1341 strictStateImmutability: false,
1342 strictActionImmutability: false,
1343 strictActionWithinNgZone: false,
1344 strictActionTypeUniqueness: false,
1345 };
1346 }
1347 function createSerializationCheckMetaReducer(_a) {
1348 var strictActionSerializability = _a.strictActionSerializability, strictStateSerializability = _a.strictStateSerializability;
1349 return function (reducer) { return strictActionSerializability || strictStateSerializability
1350 ? serializationCheckMetaReducer(reducer, {
1351 action: function (action) { return strictActionSerializability && !ignoreNgrxAction(action); },
1352 state: function () { return strictStateSerializability; },
1353 })
1354 : reducer; };
1355 }
1356 function createImmutabilityCheckMetaReducer(_a) {
1357 var strictActionImmutability = _a.strictActionImmutability, strictStateImmutability = _a.strictStateImmutability;
1358 return function (reducer) { return strictActionImmutability || strictStateImmutability
1359 ? immutabilityCheckMetaReducer(reducer, {
1360 action: function (action) { return strictActionImmutability && !ignoreNgrxAction(action); },
1361 state: function () { return strictStateImmutability; },
1362 })
1363 : reducer; };
1364 }
1365 function ignoreNgrxAction(action) {
1366 return action.type.startsWith('@ngrx');
1367 }
1368 function createInNgZoneCheckMetaReducer(_a) {
1369 var strictActionWithinNgZone = _a.strictActionWithinNgZone;
1370 return function (reducer) { return strictActionWithinNgZone
1371 ? inNgZoneAssertMetaReducer(reducer, {
1372 action: function (action) { return strictActionWithinNgZone && !ignoreNgrxAction(action); },
1373 })
1374 : reducer; };
1375 }
1376 function provideRuntimeChecks(runtimeChecks) {
1377 return [
1378 {
1379 provide: _USER_RUNTIME_CHECKS,
1380 useValue: runtimeChecks,
1381 },
1382 {
1383 provide: USER_RUNTIME_CHECKS,
1384 useFactory: _runtimeChecksFactory,
1385 deps: [_USER_RUNTIME_CHECKS],
1386 },
1387 {
1388 provide: ACTIVE_RUNTIME_CHECKS,
1389 deps: [USER_RUNTIME_CHECKS],
1390 useFactory: createActiveRuntimeChecks,
1391 },
1392 {
1393 provide: META_REDUCERS,
1394 multi: true,
1395 deps: [ACTIVE_RUNTIME_CHECKS],
1396 useFactory: createImmutabilityCheckMetaReducer,
1397 },
1398 {
1399 provide: META_REDUCERS,
1400 multi: true,
1401 deps: [ACTIVE_RUNTIME_CHECKS],
1402 useFactory: createSerializationCheckMetaReducer,
1403 },
1404 {
1405 provide: META_REDUCERS,
1406 multi: true,
1407 deps: [ACTIVE_RUNTIME_CHECKS],
1408 useFactory: createInNgZoneCheckMetaReducer,
1409 },
1410 ];
1411 }
1412 function checkForActionTypeUniqueness() {
1413 return [
1414 {
1415 provide: _ACTION_TYPE_UNIQUENESS_CHECK,
1416 multi: true,
1417 deps: [ACTIVE_RUNTIME_CHECKS],
1418 useFactory: _actionTypeUniquenessCheck,
1419 },
1420 ];
1421 }
1422 function _runtimeChecksFactory(runtimeChecks) {
1423 return runtimeChecks;
1424 }
1425 function _actionTypeUniquenessCheck(config) {
1426 if (!config.strictActionTypeUniqueness) {
1427 return;
1428 }
1429 var duplicates = Object.entries(REGISTERED_ACTION_TYPES)
1430 .filter(function (_a) {
1431 var _b = __read(_a, 2), registrations = _b[1];
1432 return registrations > 1;
1433 })
1434 .map(function (_a) {
1435 var _b = __read(_a, 1), type = _b[0];
1436 return type;
1437 });
1438 if (duplicates.length) {
1439 throw new Error("Action types are registered more than once, " + duplicates
1440 .map(function (type) { return "\"" + type + "\""; })
1441 .join(', ') + ". " + RUNTIME_CHECK_URL + "#strictactiontypeuniqueness");
1442 }
1443 }
1444
1445 var StoreRootModule = /** @class */ (function () {
1446 function StoreRootModule(actions$, reducer$, scannedActions$, store, guard, actionCheck) {
1447 }
1448 return StoreRootModule;
1449 }());
1450 StoreRootModule.decorators = [
1451 { type: ngCore.NgModule, args: [{},] }
1452 ];
1453 /** @nocollapse */
1454 StoreRootModule.ctorParameters = function () { return [
1455 { type: ActionsSubject },
1456 { type: ReducerObservable },
1457 { type: ScannedActionsSubject },
1458 { type: Store },
1459 { type: undefined, decorators: [{ type: ngCore.Optional }, { type: ngCore.Inject, args: [_ROOT_STORE_GUARD,] }] },
1460 { type: undefined, decorators: [{ type: ngCore.Optional }, { type: ngCore.Inject, args: [_ACTION_TYPE_UNIQUENESS_CHECK,] }] }
1461 ]; };
1462 var StoreFeatureModule = /** @class */ (function () {
1463 function StoreFeatureModule(features, featureReducers, reducerManager, root, actionCheck) {
1464 this.features = features;
1465 this.featureReducers = featureReducers;
1466 this.reducerManager = reducerManager;
1467 var feats = features.map(function (feature, index) {
1468 var featureReducerCollection = featureReducers.shift();
1469 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1470 var reducers = featureReducerCollection /*TODO(#823)*/[index];
1471 return Object.assign(Object.assign({}, feature), { reducers: reducers, initialState: _initialStateFactory(feature.initialState) });
1472 });
1473 reducerManager.addFeatures(feats);
1474 }
1475 // eslint-disable-next-line @angular-eslint/contextual-lifecycle
1476 StoreFeatureModule.prototype.ngOnDestroy = function () {
1477 this.reducerManager.removeFeatures(this.features);
1478 };
1479 return StoreFeatureModule;
1480 }());
1481 StoreFeatureModule.decorators = [
1482 { type: ngCore.NgModule, args: [{},] }
1483 ];
1484 /** @nocollapse */
1485 StoreFeatureModule.ctorParameters = function () { return [
1486 { type: Array, decorators: [{ type: ngCore.Inject, args: [_STORE_FEATURES,] }] },
1487 { type: Array, decorators: [{ type: ngCore.Inject, args: [FEATURE_REDUCERS,] }] },
1488 { type: ReducerManager },
1489 { type: StoreRootModule },
1490 { type: undefined, decorators: [{ type: ngCore.Optional }, { type: ngCore.Inject, args: [_ACTION_TYPE_UNIQUENESS_CHECK,] }] }
1491 ]; };
1492 var StoreModule = /** @class */ (function () {
1493 function StoreModule() {
1494 }
1495 StoreModule.forRoot = function (reducers, config) {
1496 if (config === void 0) { config = {}; }
1497 return {
1498 ngModule: StoreRootModule,
1499 providers: [
1500 {
1501 provide: _ROOT_STORE_GUARD,
1502 useFactory: _provideForRootGuard,
1503 deps: [[Store, new ngCore.Optional(), new ngCore.SkipSelf()]],
1504 },
1505 { provide: _INITIAL_STATE, useValue: config.initialState },
1506 {
1507 provide: INITIAL_STATE,
1508 useFactory: _initialStateFactory,
1509 deps: [_INITIAL_STATE],
1510 },
1511 { provide: _INITIAL_REDUCERS, useValue: reducers },
1512 {
1513 provide: _STORE_REDUCERS,
1514 useExisting: reducers instanceof ngCore.InjectionToken ? reducers : _INITIAL_REDUCERS,
1515 },
1516 {
1517 provide: INITIAL_REDUCERS,
1518 deps: [ngCore.Injector, _INITIAL_REDUCERS, [new ngCore.Inject(_STORE_REDUCERS)]],
1519 useFactory: _createStoreReducers,
1520 },
1521 {
1522 provide: USER_PROVIDED_META_REDUCERS,
1523 useValue: config.metaReducers ? config.metaReducers : [],
1524 },
1525 {
1526 provide: _RESOLVED_META_REDUCERS,
1527 deps: [META_REDUCERS, USER_PROVIDED_META_REDUCERS],
1528 useFactory: _concatMetaReducers,
1529 },
1530 {
1531 provide: _REDUCER_FACTORY,
1532 useValue: config.reducerFactory
1533 ? config.reducerFactory
1534 : combineReducers,
1535 },
1536 {
1537 provide: REDUCER_FACTORY,
1538 deps: [_REDUCER_FACTORY, _RESOLVED_META_REDUCERS],
1539 useFactory: createReducerFactory,
1540 },
1541 ACTIONS_SUBJECT_PROVIDERS,
1542 REDUCER_MANAGER_PROVIDERS,
1543 SCANNED_ACTIONS_SUBJECT_PROVIDERS,
1544 STATE_PROVIDERS,
1545 STORE_PROVIDERS,
1546 provideRuntimeChecks(config.runtimeChecks),
1547 checkForActionTypeUniqueness(),
1548 ],
1549 };
1550 };
1551 StoreModule.forFeature = function (featureNameOrSlice, reducersOrConfig, config) {
1552 if (config === void 0) { config = {}; }
1553 return {
1554 ngModule: StoreFeatureModule,
1555 providers: [
1556 {
1557 provide: _FEATURE_CONFIGS,
1558 multi: true,
1559 useValue: featureNameOrSlice instanceof Object ? {} : config,
1560 },
1561 {
1562 provide: STORE_FEATURES,
1563 multi: true,
1564 useValue: {
1565 key: featureNameOrSlice instanceof Object
1566 ? featureNameOrSlice.name
1567 : featureNameOrSlice,
1568 reducerFactory: !(config instanceof ngCore.InjectionToken) && config.reducerFactory
1569 ? config.reducerFactory
1570 : combineReducers,
1571 metaReducers: !(config instanceof ngCore.InjectionToken) && config.metaReducers
1572 ? config.metaReducers
1573 : [],
1574 initialState: !(config instanceof ngCore.InjectionToken) && config.initialState
1575 ? config.initialState
1576 : undefined,
1577 },
1578 },
1579 {
1580 provide: _STORE_FEATURES,
1581 deps: [ngCore.Injector, _FEATURE_CONFIGS, STORE_FEATURES],
1582 useFactory: _createFeatureStore,
1583 },
1584 {
1585 provide: _FEATURE_REDUCERS,
1586 multi: true,
1587 useValue: featureNameOrSlice instanceof Object
1588 ? featureNameOrSlice.reducer
1589 : reducersOrConfig,
1590 },
1591 {
1592 provide: _FEATURE_REDUCERS_TOKEN,
1593 multi: true,
1594 useExisting: reducersOrConfig instanceof ngCore.InjectionToken
1595 ? reducersOrConfig
1596 : _FEATURE_REDUCERS,
1597 },
1598 {
1599 provide: FEATURE_REDUCERS,
1600 multi: true,
1601 deps: [
1602 ngCore.Injector,
1603 _FEATURE_REDUCERS,
1604 [new ngCore.Inject(_FEATURE_REDUCERS_TOKEN)],
1605 ],
1606 useFactory: _createFeatureReducers,
1607 },
1608 checkForActionTypeUniqueness(),
1609 ],
1610 };
1611 };
1612 return StoreModule;
1613 }());
1614 StoreModule.decorators = [
1615 { type: ngCore.NgModule, args: [{},] }
1616 ];
1617 function _createStoreReducers(injector, reducers) {
1618 return reducers instanceof ngCore.InjectionToken ? injector.get(reducers) : reducers;
1619 }
1620 function _createFeatureStore(injector, configs, featureStores) {
1621 return featureStores.map(function (feat, index) {
1622 if (configs[index] instanceof ngCore.InjectionToken) {
1623 var conf = injector.get(configs[index]);
1624 return {
1625 key: feat.key,
1626 reducerFactory: conf.reducerFactory
1627 ? conf.reducerFactory
1628 : combineReducers,
1629 metaReducers: conf.metaReducers ? conf.metaReducers : [],
1630 initialState: conf.initialState,
1631 };
1632 }
1633 return feat;
1634 });
1635 }
1636 function _createFeatureReducers(injector, reducerCollection) {
1637 var reducers = reducerCollection.map(function (reducer) {
1638 return reducer instanceof ngCore.InjectionToken ? injector.get(reducer) : reducer;
1639 });
1640 return reducers;
1641 }
1642 function _initialStateFactory(initialState) {
1643 if (typeof initialState === 'function') {
1644 return initialState();
1645 }
1646 return initialState;
1647 }
1648 function _concatMetaReducers(metaReducers, userProvidedMetaReducers) {
1649 return metaReducers.concat(userProvidedMetaReducers);
1650 }
1651 function _provideForRootGuard(store) {
1652 if (store) {
1653 throw new TypeError("StoreModule.forRoot() called twice. Feature modules should use StoreModule.forFeature() instead.");
1654 }
1655 return 'guarded';
1656 }
1657
1658 /**
1659 * @description
1660 * Associates actions with a given state change function.
1661 * A state change function must be provided as the last parameter.
1662 *
1663 * @param args `ActionCreator`'s followed by a state change function.
1664 *
1665 * @returns an association of action types with a state change function.
1666 *
1667 * @usageNotes
1668 * ```ts
1669 * on(AuthApiActions.loginSuccess, (state, { user }) => ({ ...state, user }))
1670 * ```
1671 */
1672 function on() {
1673 var args = [];
1674 for (var _i = 0; _i < arguments.length; _i++) {
1675 args[_i] = arguments[_i];
1676 }
1677 // This could be refactored when TS releases the version with this fix:
1678 // https://github.com/microsoft/TypeScript/pull/41544
1679 var reducer = args.pop();
1680 var types = args.map(function (creator) { return creator.type; });
1681 return { reducer: reducer, types: types };
1682 }
1683 /**
1684 * @description
1685 * Creates a reducer function to handle state transitions.
1686 *
1687 * Reducer creators reduce the explicitness of reducer functions with switch statements.
1688 *
1689 * @param initialState Provides a state value if the current state is `undefined`, as it is initially.
1690 * @param ons Associations between actions and state changes.
1691 * @returns A reducer function.
1692 *
1693 * @usageNotes
1694 *
1695 * - Must be used with `ActionCreator`'s (returned by `createAction`). Cannot be used with class-based action creators.
1696 * - The returned `ActionReducer` should additionally be wrapped with another function, if you are using View Engine AOT.
1697 * In case you are using Ivy (or only JIT View Engine) the extra wrapper function is not required.
1698 *
1699 * **Declaring a reducer creator**
1700 *
1701 * ```ts
1702 * export const reducer = createReducer(
1703 * initialState,
1704 * on(
1705 * featureActions.actionOne,
1706 * featureActions.actionTwo,
1707 * (state, { updatedValue }) => ({ ...state, prop: updatedValue })
1708 * ),
1709 * on(featureActions.actionThree, () => initialState);
1710 * );
1711 * ```
1712 *
1713 * **Declaring a reducer creator using a wrapper function (Only needed if using View Engine AOT)**
1714 *
1715 * ```ts
1716 * const featureReducer = createReducer(
1717 * initialState,
1718 * on(
1719 * featureActions.actionOne,
1720 * featureActions.actionTwo,
1721 * (state, { updatedValue }) => ({ ...state, prop: updatedValue })
1722 * ),
1723 * on(featureActions.actionThree, () => initialState);
1724 * );
1725 *
1726 * export function reducer(state: State | undefined, action: Action) {
1727 * return featureReducer(state, action);
1728 * }
1729 * ```
1730 */
1731 function createReducer(initialState) {
1732 var e_1, _a;
1733 var ons = [];
1734 for (var _i = 1; _i < arguments.length; _i++) {
1735 ons[_i - 1] = arguments[_i];
1736 }
1737 var map = new Map();
1738 var _loop_1 = function (on_1) {
1739 var e_2, _b;
1740 var _loop_2 = function (type) {
1741 var existingReducer = map.get(type);
1742 if (existingReducer) {
1743 var newReducer = function (state, action) { return on_1.reducer(existingReducer(state, action), action); };
1744 map.set(type, newReducer);
1745 }
1746 else {
1747 map.set(type, on_1.reducer);
1748 }
1749 };
1750 try {
1751 for (var _c = (e_2 = void 0, __values(on_1.types)), _d = _c.next(); !_d.done; _d = _c.next()) {
1752 var type = _d.value;
1753 _loop_2(type);
1754 }
1755 }
1756 catch (e_2_1) { e_2 = { error: e_2_1 }; }
1757 finally {
1758 try {
1759 if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
1760 }
1761 finally { if (e_2) throw e_2.error; }
1762 }
1763 };
1764 try {
1765 for (var ons_1 = __values(ons), ons_1_1 = ons_1.next(); !ons_1_1.done; ons_1_1 = ons_1.next()) {
1766 var on_1 = ons_1_1.value;
1767 _loop_1(on_1);
1768 }
1769 }
1770 catch (e_1_1) { e_1 = { error: e_1_1 }; }
1771 finally {
1772 try {
1773 if (ons_1_1 && !ons_1_1.done && (_a = ons_1.return)) _a.call(ons_1);
1774 }
1775 finally { if (e_1) throw e_1.error; }
1776 }
1777 return function (state, action) {
1778 if (state === void 0) { state = initialState; }
1779 var reducer = map.get(action.type);
1780 return reducer ? reducer(state, action) : state;
1781 };
1782 }
1783
1784 /**
1785 * DO NOT EDIT
1786 *
1787 * This file is automatically generated at build
1788 */
1789
1790 /**
1791 * Generated bundle index. Do not edit.
1792 */
1793
1794 exports.ACTIVE_RUNTIME_CHECKS = ACTIVE_RUNTIME_CHECKS;
1795 exports.ActionsSubject = ActionsSubject;
1796 exports.FEATURE_REDUCERS = FEATURE_REDUCERS;
1797 exports.INIT = INIT;
1798 exports.INITIAL_REDUCERS = INITIAL_REDUCERS;
1799 exports.INITIAL_STATE = INITIAL_STATE;
1800 exports.META_REDUCERS = META_REDUCERS;
1801 exports.REDUCER_FACTORY = REDUCER_FACTORY;
1802 exports.ReducerManager = ReducerManager;
1803 exports.ReducerManagerDispatcher = ReducerManagerDispatcher;
1804 exports.ReducerObservable = ReducerObservable;
1805 exports.STORE_FEATURES = STORE_FEATURES;
1806 exports.ScannedActionsSubject = ScannedActionsSubject;
1807 exports.State = State;
1808 exports.StateObservable = StateObservable;
1809 exports.Store = Store;
1810 exports.StoreFeatureModule = StoreFeatureModule;
1811 exports.StoreModule = StoreModule;
1812 exports.StoreRootModule = StoreRootModule;
1813 exports.UPDATE = UPDATE;
1814 exports.USER_PROVIDED_META_REDUCERS = USER_PROVIDED_META_REDUCERS;
1815 exports.USER_RUNTIME_CHECKS = USER_RUNTIME_CHECKS;
1816 exports.combineReducers = combineReducers;
1817 exports.compose = compose;
1818 exports.createAction = createAction;
1819 exports.createFeature = createFeature;
1820 exports.createFeatureSelector = createFeatureSelector;
1821 exports.createReducer = createReducer;
1822 exports.createReducerFactory = createReducerFactory;
1823 exports.createSelector = createSelector;
1824 exports.createSelectorFactory = createSelectorFactory;
1825 exports.defaultMemoize = defaultMemoize;
1826 exports.defaultStateFn = defaultStateFn;
1827 exports.isNgrxMockEnvironment = isNgrxMockEnvironment;
1828 exports.on = on;
1829 exports.props = props;
1830 exports.reduceState = reduceState;
1831 exports.resultMemoize = resultMemoize;
1832 exports.select = select;
1833 exports.setNgrxMockEnvironment = setNgrxMockEnvironment;
1834 exports.union = union;
1835 exports.ɵb = STORE_PROVIDERS;
1836 exports.ɵba = createSerializationCheckMetaReducer;
1837 exports.ɵbb = createImmutabilityCheckMetaReducer;
1838 exports.ɵbc = createInNgZoneCheckMetaReducer;
1839 exports.ɵbd = provideRuntimeChecks;
1840 exports.ɵbe = checkForActionTypeUniqueness;
1841 exports.ɵbf = _runtimeChecksFactory;
1842 exports.ɵbg = _actionTypeUniquenessCheck;
1843 exports.ɵc = ACTIONS_SUBJECT_PROVIDERS;
1844 exports.ɵd = REDUCER_MANAGER_PROVIDERS;
1845 exports.ɵe = SCANNED_ACTIONS_SUBJECT_PROVIDERS;
1846 exports.ɵf = isEqualCheck;
1847 exports.ɵg = STATE_PROVIDERS;
1848 exports.ɵh = _ROOT_STORE_GUARD;
1849 exports.ɵi = _INITIAL_STATE;
1850 exports.ɵj = _REDUCER_FACTORY;
1851 exports.ɵk = _INITIAL_REDUCERS;
1852 exports.ɵl = _STORE_REDUCERS;
1853 exports.ɵm = _FEATURE_REDUCERS;
1854 exports.ɵn = _FEATURE_CONFIGS;
1855 exports.ɵo = _STORE_FEATURES;
1856 exports.ɵp = _FEATURE_REDUCERS_TOKEN;
1857 exports.ɵq = _RESOLVED_META_REDUCERS;
1858 exports.ɵr = _USER_RUNTIME_CHECKS;
1859 exports.ɵs = _ACTION_TYPE_UNIQUENESS_CHECK;
1860 exports.ɵt = _createStoreReducers;
1861 exports.ɵu = _createFeatureStore;
1862 exports.ɵv = _createFeatureReducers;
1863 exports.ɵw = _initialStateFactory;
1864 exports.ɵx = _concatMetaReducers;
1865 exports.ɵy = _provideForRootGuard;
1866 exports.ɵz = createActiveRuntimeChecks;
1867
1868 Object.defineProperty(exports, '__esModule', { value: true });
1869
1870})));
1871//# sourceMappingURL=ngrx-store.umd.js.map