@ngxs/store 3.7.3 → 3.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/bundles/ngxs-store-internals-testing.umd.js +114 -11
  2. package/bundles/ngxs-store-internals-testing.umd.js.map +1 -1
  3. package/bundles/ngxs-store-internals-testing.umd.min.js +1 -1
  4. package/bundles/ngxs-store-internals-testing.umd.min.js.map +1 -1
  5. package/bundles/ngxs-store-internals.umd.js +278 -91
  6. package/bundles/ngxs-store-internals.umd.js.map +1 -1
  7. package/bundles/ngxs-store-internals.umd.min.js +1 -1
  8. package/bundles/ngxs-store-internals.umd.min.js.map +1 -1
  9. package/bundles/ngxs-store.umd.js +457 -484
  10. package/bundles/ngxs-store.umd.js.map +1 -1
  11. package/bundles/ngxs-store.umd.min.js +1 -1
  12. package/bundles/ngxs-store.umd.min.js.map +1 -1
  13. package/esm2015/internals/angular.js +12 -32
  14. package/esm2015/internals/decorator-injector-adapter.js +204 -0
  15. package/esm2015/internals/index.js +2 -1
  16. package/esm2015/internals/ngxs-store-internals.js +2 -2
  17. package/esm2015/internals/testing/fresh-platform.js +46 -7
  18. package/esm2015/internals/testing/index.js +2 -1
  19. package/esm2015/internals/testing/ngxs-store-internals-testing.js +2 -2
  20. package/esm2015/internals/testing/skip-console-logging.js +62 -0
  21. package/esm2015/internals/testing/symbol.js +1 -1
  22. package/esm2015/ngxs-store.js +14 -18
  23. package/esm2015/src/configs/messages.config.js +74 -82
  24. package/esm2015/src/decorators/action.js +10 -6
  25. package/esm2015/src/decorators/select/select-factory.js +8 -5
  26. package/esm2015/src/decorators/select/select.js +39 -3
  27. package/esm2015/src/decorators/select/symbols.js +56 -12
  28. package/esm2015/src/decorators/selector/selector.js +10 -6
  29. package/esm2015/src/decorators/state.js +12 -4
  30. package/esm2015/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js +25 -18
  31. package/esm2015/src/execution/noop-ngxs-execution-strategy.js +4 -2
  32. package/esm2015/src/execution/symbols.js +26 -3
  33. package/esm2015/src/internal/internals.js +8 -4
  34. package/esm2015/src/internal/state-factory.js +46 -26
  35. package/esm2015/src/internal/state-operations.js +47 -39
  36. package/esm2015/src/internal/state-operators.js +4 -4
  37. package/esm2015/src/internal/state-stream.js +10 -1
  38. package/esm2015/src/ivy/ivy-enabled-in-dev-mode.js +18 -30
  39. package/esm2015/src/module.js +7 -22
  40. package/esm2015/src/modules/ngxs-root.module.js +8 -8
  41. package/esm2015/src/store.js +20 -4
  42. package/esm2015/src/symbols.js +4 -5
  43. package/esm2015/src/utils/store-validators.js +24 -29
  44. package/esm5/internals/angular.js +12 -32
  45. package/esm5/internals/decorator-injector-adapter.js +204 -0
  46. package/esm5/internals/index.js +2 -1
  47. package/esm5/internals/ngxs-store-internals.js +2 -2
  48. package/esm5/internals/testing/fresh-platform.js +53 -13
  49. package/esm5/internals/testing/index.js +2 -1
  50. package/esm5/internals/testing/ngxs-store-internals-testing.js +2 -2
  51. package/esm5/internals/testing/skip-console-logging.js +62 -0
  52. package/esm5/internals/testing/symbol.js +1 -1
  53. package/esm5/ngxs-store.js +14 -18
  54. package/esm5/src/configs/messages.config.js +75 -100
  55. package/esm5/src/decorators/action.js +10 -6
  56. package/esm5/src/decorators/select/select-factory.js +8 -5
  57. package/esm5/src/decorators/select/select.js +40 -3
  58. package/esm5/src/decorators/select/symbols.js +56 -12
  59. package/esm5/src/decorators/selector/selector.js +10 -6
  60. package/esm5/src/decorators/state.js +12 -4
  61. package/esm5/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js +25 -23
  62. package/esm5/src/execution/noop-ngxs-execution-strategy.js +4 -2
  63. package/esm5/src/execution/symbols.js +26 -3
  64. package/esm5/src/internal/internals.js +8 -4
  65. package/esm5/src/internal/state-factory.js +39 -27
  66. package/esm5/src/internal/state-operations.js +47 -43
  67. package/esm5/src/internal/state-operators.js +4 -4
  68. package/esm5/src/internal/state-stream.js +13 -1
  69. package/esm5/src/ivy/ivy-enabled-in-dev-mode.js +18 -30
  70. package/esm5/src/module.js +7 -22
  71. package/esm5/src/modules/ngxs-root.module.js +7 -7
  72. package/esm5/src/store.js +20 -4
  73. package/esm5/src/symbols.js +4 -5
  74. package/esm5/src/utils/store-validators.js +28 -36
  75. package/fesm2015/ngxs-store-internals-testing.js +108 -7
  76. package/fesm2015/ngxs-store-internals-testing.js.map +1 -1
  77. package/fesm2015/ngxs-store-internals.js +263 -79
  78. package/fesm2015/ngxs-store-internals.js.map +1 -1
  79. package/fesm2015/ngxs-store.js +429 -413
  80. package/fesm2015/ngxs-store.js.map +1 -1
  81. package/fesm5/ngxs-store-internals-testing.js +115 -13
  82. package/fesm5/ngxs-store-internals-testing.js.map +1 -1
  83. package/fesm5/ngxs-store-internals.js +277 -93
  84. package/fesm5/ngxs-store-internals.js.map +1 -1
  85. package/fesm5/ngxs-store.js +443 -465
  86. package/fesm5/ngxs-store.js.map +1 -1
  87. package/internals/angular.d.ts +1 -3
  88. package/internals/decorator-injector-adapter.d.ts +15 -0
  89. package/internals/index.d.ts +1 -0
  90. package/internals/ngxs-store-internals.metadata.json +1 -1
  91. package/internals/testing/fresh-platform.d.ts +1 -1
  92. package/internals/testing/index.d.ts +1 -0
  93. package/internals/testing/ngxs-store-internals-testing.metadata.json +1 -1
  94. package/internals/testing/skip-console-logging.d.ts +1 -0
  95. package/internals/testing/symbol.d.ts +1 -1
  96. package/ngxs-store.d.ts +14 -18
  97. package/ngxs-store.metadata.json +1 -1
  98. package/package.json +2 -2
  99. package/src/configs/messages.config.d.ts +11 -30
  100. package/src/decorators/select/select-factory.d.ts +2 -3
  101. package/src/decorators/select/symbols.d.ts +6 -2
  102. package/src/execution/dispatch-outside-zone-ngxs-execution-strategy.d.ts +0 -1
  103. package/src/execution/symbols.d.ts +5 -1
  104. package/src/internal/internals.d.ts +0 -1
  105. package/src/internal/state-factory.d.ts +2 -3
  106. package/src/internal/state-operations.d.ts +1 -3
  107. package/src/internal/state-stream.d.ts +3 -1
  108. package/src/ivy/ivy-enabled-in-dev-mode.d.ts +4 -12
  109. package/src/modules/ngxs-root.module.d.ts +2 -2
  110. package/src/store.d.ts +6 -0
  111. package/src/symbols.d.ts +4 -3
  112. package/src/utils/store-validators.d.ts +5 -6
  113. package/esm2015/src/host-environment/host-environment.js +0 -31
  114. package/esm2015/src/internal/config-validator.js +0 -67
  115. package/esm2015/src/ivy/ensure-state-class-is-injectable.js +0 -34
  116. package/esm5/src/host-environment/host-environment.js +0 -29
  117. package/esm5/src/internal/config-validator.js +0 -76
  118. package/esm5/src/ivy/ensure-state-class-is-injectable.js +0 -34
  119. package/src/host-environment/host-environment.d.ts +0 -6
  120. package/src/internal/config-validator.d.ts +0 -10
  121. package/src/ivy/ensure-state-class-is-injectable.d.ts +0 -6
@@ -1 +1 @@
1
- {"version":3,"file":"ngxs-store-internals-testing.js","sources":["ng://@ngxs/store/internals/testing/helpers/ngxs-test.component.ts","ng://@ngxs/store/internals/testing/helpers/ngxs-test.module.ts","ng://@ngxs/store/internals/testing/ngxs.setup.ts","ng://@ngxs/store/internals/testing/fresh-platform.ts"],"sourcesContent":["import { AfterViewInit, Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-root',\r\n template: ''\r\n})\r\nexport class NgxsTestComponent implements OnInit, AfterViewInit {\r\n public ngOnInit(): void {}\r\n public ngAfterViewInit(): void {}\r\n}\r\n","import { ApplicationRef, NgModule } from '@angular/core';\r\nimport { BrowserModule } from '@angular/platform-browser';\r\n\r\nimport { NgxsTestComponent } from './ngxs-test.component';\r\n\r\n@NgModule({\r\n imports: [BrowserModule],\r\n declarations: [NgxsTestComponent],\r\n entryComponents: [NgxsTestComponent]\r\n})\r\nexport class NgxsTestModule {\r\n public static ngDoBootstrap(app: ApplicationRef): void {\r\n app.bootstrap(NgxsTestComponent);\r\n }\r\n}\r\n","import { ApplicationRef } from '@angular/core';\r\nimport { TestBed, TestBedStatic } from '@angular/core/testing';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { ɵBrowserDomAdapter as BrowserDomAdapter } from '@angular/platform-browser';\r\nimport {\r\n BrowserDynamicTestingModule,\r\n platformBrowserDynamicTesting\r\n} from '@angular/platform-browser-dynamic/testing';\r\nimport { NgxsModule, Store } from '@ngxs/store';\r\n\r\nimport { NgxsTestModule } from './helpers/ngxs-test.module';\r\nimport { NgxsOptionsTesting, NgxsTesting } from './symbol';\r\n\r\nexport class NgxsTestBed {\r\n public static configureTestingStates(options: NgxsOptionsTesting): NgxsTesting {\r\n this.resetTestBed();\r\n\r\n if (options.before) {\r\n options.before();\r\n }\r\n\r\n TestBed.configureTestingModule({\r\n imports: [\r\n NgxsTestModule,\r\n NgxsModule.forRoot(options.states || [], options.ngxsOptions || {}),\r\n ...(options.imports || [])\r\n ]\r\n }).compileComponents();\r\n\r\n NgxsTestBed.ngxsBootstrap();\r\n\r\n return {\r\n get store(): Store {\r\n return TestBed.inject(Store);\r\n },\r\n get getTestBed(): TestBedStatic {\r\n return TestBed;\r\n }\r\n };\r\n }\r\n\r\n private static ngxsBootstrap(): void {\r\n NgxsTestBed.createRootNode();\r\n NgxsTestModule.ngDoBootstrap(TestBed.inject(ApplicationRef));\r\n }\r\n\r\n private static resetTestBed(): void {\r\n TestBed.resetTestEnvironment();\r\n TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());\r\n }\r\n\r\n private static createRootNode(selector = 'app-root'): void {\r\n const document = TestBed.inject(DOCUMENT);\r\n const adapter = new BrowserDomAdapter();\r\n const root = adapter.createElement(selector);\r\n document.body.appendChild(root);\r\n }\r\n}\r\n","import { TestBed } from '@angular/core/testing';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { ɵgetDOM as getDOM } from '@angular/platform-browser';\r\nimport { destroyPlatform, createPlatform } from '@angular/core';\r\n\r\nfunction createRootElement() {\r\n const document = TestBed.inject(DOCUMENT);\r\n const root = getDOM().createElement('app-root', document);\r\n document.body.appendChild(root);\r\n}\r\n\r\nfunction removeRootElement() {\r\n const root: Element = document.getElementsByTagName('app-root').item(0)!;\r\n try {\r\n document.body.removeChild(root);\r\n } catch {}\r\n}\r\n\r\nfunction destroyPlatformBeforeBootstrappingTheNewOne() {\r\n destroyPlatform();\r\n createRootElement();\r\n}\r\n\r\n// As we create our custom platform via `bootstrapModule`\r\n// we have to destroy it after assetions and revert\r\n// the previous one\r\nfunction resetPlatformAfterBootstrapping() {\r\n removeRootElement();\r\n destroyPlatform();\r\n createPlatform(TestBed);\r\n}\r\n\r\nexport function freshPlatform(fn: Function): (...args: any[]) => any {\r\n return async function testWithAFreshPlatform(this: any, ...args: any[]) {\r\n try {\r\n destroyPlatformBeforeBootstrappingTheNewOne();\r\n return await fn.apply(this, args);\r\n } finally {\r\n resetPlatformAfterBootstrapping();\r\n }\r\n };\r\n}\r\n"],"names":["BrowserDomAdapter","getDOM"],"mappings":";;;;;;;;;;;;AAAA,MAMa,iBAAiB;;;;IACrB,QAAQ,MAAW;;;;IACnB,eAAe,MAAW;;;YANlC,SAAS,SAAC;gBACT,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,EAAE;aACb;;;;;;;ACLD,MAUa,cAAc;;;;;IAClB,OAAO,aAAa,CAAC,GAAmB;QAC7C,GAAG,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;KAClC;;;YARF,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,aAAa,CAAC;gBACxB,YAAY,EAAE,CAAC,iBAAiB,CAAC;gBACjC,eAAe,EAAE,CAAC,iBAAiB,CAAC;aACrC;;;;;;;ACTD,MAaa,WAAW;;;;;IACf,OAAO,sBAAsB,CAAC,OAA2B;QAC9D,IAAI,CAAC,YAAY,EAAE,CAAC;QAEpB,IAAI,OAAO,CAAC,MAAM,EAAE;YAClB,OAAO,CAAC,MAAM,EAAE,CAAC;SAClB;QAED,OAAO,CAAC,sBAAsB,CAAC;YAC7B,OAAO,EAAE;gBACP,cAAc;gBACd,UAAU,CAAC,OAAO,CAAC,O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AAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC;IACxE,IAAI;QACF,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;KACjC;IAAC,WAAM,GAAE;CACX;;;;AAED,SAAS,2CAA2C;IAClD,eAAe,EAAE,CAAC;IAClB,iBAAiB,EAAE,CAAC;CACrB;;;;;;;AAKD,SAAS,+BAA+B;IACtC,iBAAiB,EAAE,CAAC;IACpB,eAAe,EAAE,CAAC;IAClB,cAAc,CAAC,OAAO,CAAC,CAAC;CACzB;;;;;AAED,SAAgB,aAAa,CAAC,EAAY;IACxC;;;;;IAAO,SAAe,sBAAsB,CAAY,GAAG,IAAW;;YACpE,IAAI;gBACF,2CAA2C,EAAE,CAAC;gBAC9C,OAAO,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;aACnC;oBAAS;gBACR,+BAA+B,EAAE,CAAC;aACnC;SACF;KAAA,EAAC;CACH;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ngxs-store-internals-testing.js","sources":["ng://@ngxs/store/internals/testing/helpers/ngxs-test.component.ts","ng://@ngxs/store/internals/testing/helpers/ngxs-test.module.ts","ng://@ngxs/store/internals/testing/ngxs.setup.ts","ng://@ngxs/store/internals/testing/fresh-platform.ts","ng://@ngxs/store/internals/testing/skip-console-logging.ts"],"sourcesContent":["import { AfterViewInit, Component, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-root',\r\n template: ''\r\n})\r\nexport class NgxsTestComponent implements OnInit, AfterViewInit {\r\n public ngOnInit(): void {}\r\n public ngAfterViewInit(): void {}\r\n}\r\n","import { ApplicationRef, NgModule } from '@angular/core';\r\nimport { BrowserModule } from '@angular/platform-browser';\r\n\r\nimport { NgxsTestComponent } from './ngxs-test.component';\r\n\r\n@NgModule({\r\n imports: [BrowserModule],\r\n declarations: [NgxsTestComponent],\r\n entryComponents: [NgxsTestComponent]\r\n})\r\nexport class NgxsTestModule {\r\n public static ngDoBootstrap(app: ApplicationRef): void {\r\n app.bootstrap(NgxsTestComponent);\r\n }\r\n}\r\n","import { ApplicationRef } from '@angular/core';\r\nimport { TestBed, TestBedStatic } from '@angular/core/testing';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { ɵBrowserDomAdapter as BrowserDomAdapter } from '@angular/platform-browser';\r\nimport {\r\n BrowserDynamicTestingModule,\r\n platformBrowserDynamicTesting\r\n} from '@angular/platform-browser-dynamic/testing';\r\nimport { NgxsModule, Store } from '@ngxs/store';\r\n\r\nimport { NgxsTestModule } from './helpers/ngxs-test.module';\r\nimport { NgxsOptionsTesting, NgxsTesting } from './symbol';\r\n\r\nexport class NgxsTestBed {\r\n public static configureTestingStates(options: NgxsOptionsTesting): NgxsTesting {\r\n this.resetTestBed();\r\n\r\n if (options.before) {\r\n options.before();\r\n }\r\n\r\n TestBed.configureTestingModule({\r\n imports: [\r\n NgxsTestModule,\r\n NgxsModule.forRoot(options.states || [], options.ngxsOptions || {}),\r\n ...(options.imports || [])\r\n ]\r\n }).compileComponents();\r\n\r\n NgxsTestBed.ngxsBootstrap();\r\n\r\n return {\r\n get store(): Store {\r\n return TestBed.inject(Store);\r\n },\r\n get getTestBed(): TestBedStatic {\r\n return TestBed;\r\n }\r\n };\r\n }\r\n\r\n private static ngxsBootstrap(): void {\r\n NgxsTestBed.createRootNode();\r\n NgxsTestModule.ngDoBootstrap(TestBed.inject(ApplicationRef));\r\n }\r\n\r\n private static resetTestBed(): void {\r\n TestBed.resetTestEnvironment();\r\n TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());\r\n }\r\n\r\n private static createRootNode(selector = 'app-root'): void {\r\n const document = TestBed.inject(DOCUMENT);\r\n const adapter = new BrowserDomAdapter();\r\n const root = adapter.createElement(selector);\r\n document.body.appendChild(root);\r\n }\r\n}\r\n","import { TestBed } from '@angular/core/testing';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { ɵgetDOM as getDOM } from '@angular/platform-browser';\r\nimport { VERSION, destroyPlatform, createPlatform } from '@angular/core';\r\n\r\nfunction createRootElement() {\r\n const document = TestBed.inject(DOCUMENT);\r\n const root = getDOM().createElement('app-root', document);\r\n document.body.appendChild(root);\r\n}\r\n\r\nfunction removeRootElement() {\r\n const root: Element = document.getElementsByTagName('app-root').item(0)!;\r\n try {\r\n document.body.removeChild(root);\r\n } catch {}\r\n}\r\n\r\nfunction destroyPlatformBeforeBootstrappingTheNewOne() {\r\n destroyPlatform();\r\n createRootElement();\r\n}\r\n\r\n// As we create our custom platform via `bootstrapModule`\r\n// we have to destroy it after assetions and revert\r\n// the previous one\r\nfunction resetPlatformAfterBootstrapping() {\r\n removeRootElement();\r\n destroyPlatform();\r\n const version = +VERSION.major;\r\n // https://github.com/angular/angular/commit/e250db4f261741b04ee4cbad4dec41a8908a12aa\r\n if (version < 14) {\r\n createPlatform(TestBed);\r\n }\r\n}\r\n\r\nexport function freshPlatform(fn: (done?: VoidFunction) => Promise<void>) {\r\n let resolve: VoidFunction | null = null;\r\n let reject: ((error: Error) => void) | null = null;\r\n let whenDoneIsCalledPromise: Promise<void> | null = null;\r\n\r\n const hasDoneArgument = fn.length === 1;\r\n\r\n if (hasDoneArgument) {\r\n whenDoneIsCalledPromise = new Promise<void>((_resolve, _reject) => {\r\n resolve = _resolve;\r\n reject = _reject;\r\n });\r\n }\r\n\r\n return async function testWithAFreshPlatform() {\r\n try {\r\n destroyPlatformBeforeBootstrappingTheNewOne();\r\n\r\n if (hasDoneArgument) {\r\n await fn((error?: Error) => {\r\n if (error) {\r\n reject!(error);\r\n } else {\r\n resolve!();\r\n }\r\n });\r\n await whenDoneIsCalledPromise!;\r\n } else {\r\n await fn();\r\n }\r\n } finally {\r\n resetPlatformAfterBootstrapping();\r\n }\r\n };\r\n}\r\n","/// <reference types=\"jest\" />\r\n\r\nexport function skipConsoleLogging<T extends (...args: any[]) => any>(fn: T): ReturnType<T> {\r\n const consoleSpies = [\r\n jest.spyOn(console, 'log').mockImplementation(() => {}),\r\n jest.spyOn(console, 'warn').mockImplementation(() => {}),\r\n jest.spyOn(console, 'error').mockImplementation(() => {}),\r\n jest.spyOn(console, 'info').mockImplementation(() => {})\r\n ];\r\n function restoreSpies() {\r\n consoleSpies.forEach(spy => spy.mockRestore());\r\n }\r\n let restoreSpyAsync = false;\r\n try {\r\n const returnValue = fn();\r\n if (returnValue instanceof Promise) {\r\n restoreSpyAsync = true;\r\n return returnValue.finally(() => restoreSpies()) as ReturnType<T>;\r\n }\r\n return returnValue;\r\n } finally {\r\n if (!restoreSpyAsync) {\r\n restoreSpies();\r\n }\r\n }\r\n}\r\n"],"names":["BrowserDomAdapter","getDOM"],"mappings":";;;;;;;;;;;;AAAA,MAMa,iBAAiB;;;;IACrB,QAAQ,MAAW;;;;IACnB,eAAe,MAAW;;;YANlC,SAAS,SAAC;gBACT,QAAQ,EAAE,UAAU;gBACpB,QAAQ,EAAE,EAAE;aACb;;;;;;;ACLD,MAUa,cAAc;;;;;IAClB,OAAO,aAAa,CAAC,GAAmB;QAC7C,GAAG,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;KAClC;;;YARF,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,aAAa,CAAC;gBACxB,YAAY,EAAE,CAAC,iBAAiB,CAAC;gBACjC,eAAe,EAAE,CAAC,iBAAiB,CAAC;aACrC;;;;;;;ACTD,MAaa,WAAW;;;;;IACf,OAAO,sBAAsB,CAAC,OAA2B;QAC9D,IAAI,CAAC,YAAY,EAAE,CAAC;QAEpB,IAAI,OAAO,CAAC,MAAM,EAAE;YAClB,OAAO,CAAC,MAAM,EAAE,CAAC;SAClB;QAED,OAAO,CAAC,sBAAsB,CAAC;YAC7B,OAAO,EAAE;gBACP,cAAc;gBACd,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,EAAE,OAAO,CAAC,WAAW,IAAI,EAAE,CAAC;gBACnE,IAAI,OAAO,CAAC,O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AAK,CAAC,CAAC,kBAAkB;;;QAAC,SAAQ,EAAC;QACvD,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,kBAAkB;;;QAAC,SAAQ,EAAC;QACxD,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,kBAAkB;;;QAAC,SAAQ,EAAC;QACzD,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,kBAAkB;;;QAAC,SAAQ,EAAC;KACzD;;;;IACD,SAAS,YAAY;QACnB,YAAY,CAAC,OAAO;;;;QAAC,GAAG,IAAI,GAAG,CAAC,WAAW,EAAE,EAAC,CAAC;KAChD;;QACG,eAAe,GAAG,KAAK;IAC3B,IAAI;;cACI,WAAW,GAAG,EAAE,EAAE;QACxB,IAAI,WAAW,YAAY,OAAO,EAAE;YAClC,eAAe,GAAG,IAAI,CAAC;YACvB,0BAAO,WAAW,CAAC,OAAO;;;YAAC,MAAM,YAAY,EAAE,EAAC,GAAkB;SACnE;QACD,OAAO,WAAW,CAAC;KACpB;YAAS;QACR,IAAI,CAAC,eAAe,EAAE;YACpB,YAAY,EAAE,CAAC;SAChB;KACF;CACF;;;;;;;;;;;;;;"}
@@ -1,6 +1,65 @@
1
- import { getPlatform, COMPILER_OPTIONS, Injectable, InjectionToken } from '@angular/core';
1
+ import { Injectable, InjectionToken, ɵɵdirectiveInject, INJECTOR, ɵglobal } from '@angular/core';
2
2
  import { ReplaySubject } from 'rxjs';
3
3
 
4
+ /**
5
+ * @fileoverview added by tsickle
6
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
7
+ */
8
+ /**
9
+ * @return {?}
10
+ */
11
+ function isAngularInTestMode() {
12
+ // This is safe to check for these properties in the following way since `typeof` does not
13
+ // throw an exception if the value does not exist in the scope.
14
+ // We should not try to read these values from the global scope (e.g. `ɵglobal` from the `@angular/core`).
15
+ // This is related to how these frameworks compile and execute modules. E.g. Jest wraps the module into
16
+ // its internal code where `jest` variable exists in the scope. It cannot be read from the global scope, e.g.
17
+ // this will return undefined `global.jest`, but `jest` will not equal undefined.
18
+ return (typeof __karma__ !== 'undefined' ||
19
+ typeof jasmine !== 'undefined' ||
20
+ typeof jest !== 'undefined' ||
21
+ typeof Mocha !== 'undefined');
22
+ }
23
+
24
+ /**
25
+ * @fileoverview added by tsickle
26
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
27
+ */
28
+ class NgxsBootstrapper {
29
+ constructor() {
30
+ /**
31
+ * Use `ReplaySubject`, thus we can get cached value even if the stream is completed
32
+ */
33
+ this.bootstrap$ = new ReplaySubject(1);
34
+ }
35
+ /**
36
+ * @return {?}
37
+ */
38
+ get appBootstrapped$() {
39
+ return this.bootstrap$.asObservable();
40
+ }
41
+ /**
42
+ * This event will be emitted after attaching `ComponentRef` of the root component
43
+ * to the tree of views, that's a signal that application has been fully rendered
44
+ * @return {?}
45
+ */
46
+ bootstrap() {
47
+ this.bootstrap$.next(true);
48
+ this.bootstrap$.complete();
49
+ }
50
+ }
51
+ NgxsBootstrapper.decorators = [
52
+ { type: Injectable }
53
+ ];
54
+ if (false) {
55
+ /**
56
+ * Use `ReplaySubject`, thus we can get cached value even if the stream is completed
57
+ * @type {?}
58
+ * @private
59
+ */
60
+ NgxsBootstrapper.prototype.bootstrap$;
61
+ }
62
+
4
63
  /**
5
64
  * @fileoverview added by tsickle
6
65
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -71,83 +130,6 @@ function memoize(func, equalityCheck = defaultEqualityCheck) {
71
130
  return (/** @type {?} */ (memoized));
72
131
  }
73
132
 
74
- /**
75
- * @fileoverview added by tsickle
76
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
77
- */
78
- /**
79
- * @return {?}
80
- */
81
- function _isAngularInTestMode() {
82
- /** @type {?} */
83
- const platformRef = getPlatform();
84
- if (!platformRef)
85
- return false;
86
- /** @type {?} */
87
- const compilerOptions = platformRef.injector.get(COMPILER_OPTIONS, null);
88
- if (!compilerOptions)
89
- return false;
90
- /** @type {?} */
91
- const isInTestMode = compilerOptions.some((/**
92
- * @param {?} item
93
- * @return {?}
94
- */
95
- (item) => {
96
- /** @type {?} */
97
- const providers = (item && item.providers) || [];
98
- return providers.some((/**
99
- * @param {?} provider
100
- * @return {?}
101
- */
102
- (provider) => {
103
- return ((provider && provider.provide && provider.provide.name === 'MockNgModuleResolver') ||
104
- false);
105
- }));
106
- }));
107
- return isInTestMode;
108
- }
109
- /** @type {?} */
110
- const isAngularInTestMode = memoize(_isAngularInTestMode);
111
-
112
- /**
113
- * @fileoverview added by tsickle
114
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
115
- */
116
- class NgxsBootstrapper {
117
- constructor() {
118
- /**
119
- * Use `ReplaySubject`, thus we can get cached value even if the stream is completed
120
- */
121
- this.bootstrap$ = new ReplaySubject(1);
122
- }
123
- /**
124
- * @return {?}
125
- */
126
- get appBootstrapped$() {
127
- return this.bootstrap$.asObservable();
128
- }
129
- /**
130
- * This event will be emitted after attaching `ComponentRef` of the root component
131
- * to the tree of views, that's a signal that application has been fully rendered
132
- * @return {?}
133
- */
134
- bootstrap() {
135
- this.bootstrap$.next(true);
136
- this.bootstrap$.complete();
137
- }
138
- }
139
- NgxsBootstrapper.decorators = [
140
- { type: Injectable }
141
- ];
142
- if (false) {
143
- /**
144
- * Use `ReplaySubject`, thus we can get cached value even if the stream is completed
145
- * @type {?}
146
- * @private
147
- */
148
- NgxsBootstrapper.prototype.bootstrap$;
149
- }
150
-
151
133
  /**
152
134
  * @fileoverview added by tsickle
153
135
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -196,6 +178,208 @@ const NGXS_STATE_CONTEXT_FACTORY = new InjectionToken('Internals.StateContextFac
196
178
  */
197
179
  const NGXS_STATE_FACTORY = new InjectionToken('Internals.StateFactory');
198
180
 
181
+ /**
182
+ * @fileoverview added by tsickle
183
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
184
+ */
185
+ // Angular doesn't export `NG_FACTORY_DEF`.
186
+ /** @type {?} */
187
+ const NG_FACTORY_DEF = 'ɵfac';
188
+ // A `Symbol` which is used to save the `Injector` onto the class instance.
189
+ /** @type {?} */
190
+ const InjectorInstance = Symbol('InjectorInstance');
191
+ // A `Symbol` which is used to determine if factory has been decorated previously or not.
192
+ /** @type {?} */
193
+ const FactoryHasBeenDecorated = Symbol('FactoryHasBeenDecorated');
194
+ // A `Symbol` which is used to save the notifier on the class instance. The `InjectorInstance` cannot
195
+ // be retrieved within the `constructor` since it's set after the `factory()` is called.
196
+ /** @type {?} */
197
+ const InjectorNotifier = Symbol('InjectorNotifier');
198
+ /**
199
+ * @record
200
+ */
201
+ function PrototypeWithInjectorNotifier() { }
202
+ if (false) {
203
+ /* Skipping unnamed member:
204
+ [InjectorNotifier]?: ReplaySubject<boolean>;*/
205
+ }
206
+ /**
207
+ * @param {?} target
208
+ * @return {?}
209
+ */
210
+ function ensureInjectorNotifierIsCaptured(target) {
211
+ if (target[InjectorNotifier]) {
212
+ return (/** @type {?} */ (target[InjectorNotifier]));
213
+ }
214
+ else {
215
+ /** @type {?} */
216
+ const injectorNotifier$ = new ReplaySubject(1);
217
+ Object.defineProperty(target, InjectorNotifier, {
218
+ get: (/**
219
+ * @return {?}
220
+ */
221
+ () => injectorNotifier$)
222
+ });
223
+ return injectorNotifier$;
224
+ }
225
+ }
226
+ // eslint-disable-next-line @typescript-eslint/ban-types
227
+ /**
228
+ * @param {?} target
229
+ * @return {?}
230
+ */
231
+ function ensureLocalInjectorCaptured(target) {
232
+ if (FactoryHasBeenDecorated in target.constructor.prototype) {
233
+ return;
234
+ }
235
+ /** @type {?} */
236
+ const constructor = target.constructor;
237
+ // Means we're in AOT mode.
238
+ if (typeof constructor[NG_FACTORY_DEF] === 'function') {
239
+ decorateFactory(constructor);
240
+ }
241
+ else if (ngDevMode) {
242
+ // We're running in JIT mode and that means we're not able to get the compiled definition
243
+ // on the class inside the property decorator during the current message loop tick. We have
244
+ // to wait for the next message loop tick. Note that this is safe since this Promise will be
245
+ // resolved even before the `APP_INITIALIZER` is resolved.
246
+ // The below code also will be executed only in development mode, since it's never recommended
247
+ // to use the JIT compiler in production mode (by setting "aot: false").
248
+ decorateFactoryLater(constructor);
249
+ }
250
+ target.constructor.prototype[FactoryHasBeenDecorated] = true;
251
+ }
252
+ /**
253
+ * @template T
254
+ * @param {?} instance
255
+ * @param {?} token
256
+ * @return {?}
257
+ */
258
+ function localInject(instance, token) {
259
+ /** @type {?} */
260
+ const injector = instance[InjectorInstance];
261
+ return injector ? injector.get(token) : null;
262
+ }
263
+ /**
264
+ * @param {?} constructor
265
+ * @return {?}
266
+ */
267
+ function decorateFactory(constructor) {
268
+ /** @type {?} */
269
+ const factory = constructor[NG_FACTORY_DEF];
270
+ if (typeof factory !== 'function') {
271
+ return;
272
+ }
273
+ // Let's try to get any definition.
274
+ // Caretaker note: this will be compatible only with Angular 9+, since Angular 9 is the first
275
+ // Ivy-stable version. Previously definition properties were named differently (e.g. `ngComponentDef`).
276
+ /** @type {?} */
277
+ const def = constructor.ɵprov || constructor.ɵpipe || constructor.ɵcmp || constructor.ɵdir;
278
+ /** @type {?} */
279
+ const decoratedFactory = (/**
280
+ * @return {?}
281
+ */
282
+ () => {
283
+ /** @type {?} */
284
+ const instance = factory();
285
+ // Caretaker note: `inject()` won't work here.
286
+ // We can use the `directiveInject` only during the component
287
+ // construction, since Angular captures the currently active injector.
288
+ // We're not able to use this function inside the getter (when the `selectorId` property is
289
+ // requested for the first time), since the currently active injector will be null.
290
+ instance[InjectorInstance] = ɵɵdirectiveInject(
291
+ // We're using `INJECTOR` token except of the `Injector` class since the compiler
292
+ // throws: `Cannot assign an abstract constructor type to a non-abstract constructor type.`.
293
+ // Caretaker note: that this is the same way of getting the injector.
294
+ INJECTOR);
295
+ // Caretaker note: the notifier will be available only if consumers call the `ensureInjectorNotifierIsCaptured()`.
296
+ /** @type {?} */
297
+ const injectorNotifier$ = instance[InjectorNotifier];
298
+ if (injectorNotifier$) {
299
+ injectorNotifier$.next(true);
300
+ injectorNotifier$.complete();
301
+ }
302
+ return instance;
303
+ });
304
+ // If we've found any definition then it's enough to override the `def.factory` since Angular
305
+ // code uses the `def.factory` and then fallbacks to `ɵfac`.
306
+ if (def) {
307
+ def.factory = decoratedFactory;
308
+ }
309
+ // `@NgModule()` doesn't doesn't have definition factory, also providers have definitions but Angular
310
+ // still uses the `ɵfac`.
311
+ Object.defineProperty(constructor, NG_FACTORY_DEF, {
312
+ get: (/**
313
+ * @return {?}
314
+ */
315
+ () => decoratedFactory)
316
+ });
317
+ }
318
+ /**
319
+ * @param {?} constructor
320
+ * @return {?}
321
+ */
322
+ function decorateFactoryLater(constructor) {
323
+ // This function actually will be tree-shaken away when building for production since it's guarded with `ngDevMode`.
324
+ // We're having the `try-catch` here because of the `SyncTestZoneSpec`, which throws
325
+ // an error when micro or macrotask is used within a synchronous test. E.g. `Cannot call
326
+ // Promise.then from within a sync test`.
327
+ try {
328
+ Promise.resolve().then((/**
329
+ * @return {?}
330
+ */
331
+ () => {
332
+ decorateFactory(constructor);
333
+ }));
334
+ }
335
+ catch (_a) {
336
+ // This is kind of a "hack", but we try to be backwards-compatible,
337
+ // tho this `catch` block will only be executed when tests are run with Jasmine or Jest.
338
+ ɵglobal.process &&
339
+ ɵglobal.process.nextTick &&
340
+ ɵglobal.process.nextTick((/**
341
+ * @return {?}
342
+ */
343
+ () => {
344
+ decorateFactory(constructor);
345
+ }));
346
+ }
347
+ }
348
+ /**
349
+ * @record
350
+ */
351
+ function Definition() { }
352
+ if (false) {
353
+ /** @type {?} */
354
+ Definition.prototype.factory;
355
+ }
356
+ /**
357
+ * @record
358
+ */
359
+ function ConstructorWithDefinitionAndFactory() { }
360
+ if (false) {
361
+ /** @type {?|undefined} */
362
+ ConstructorWithDefinitionAndFactory.prototype.ɵprov;
363
+ /** @type {?|undefined} */
364
+ ConstructorWithDefinitionAndFactory.prototype.ɵpipe;
365
+ /** @type {?|undefined} */
366
+ ConstructorWithDefinitionAndFactory.prototype.ɵcmp;
367
+ /** @type {?|undefined} */
368
+ ConstructorWithDefinitionAndFactory.prototype.ɵdir;
369
+ /* Skipping unnamed member:
370
+ [NG_FACTORY_DEF]?: Factory;*/
371
+ }
372
+ /**
373
+ * @record
374
+ */
375
+ function PrivateInstance() { }
376
+ if (false) {
377
+ /* Skipping unnamed member:
378
+ [InjectorInstance]?: Injector;*/
379
+ /* Skipping unnamed member:
380
+ [InjectorNotifier]?: ReplaySubject<boolean>;*/
381
+ }
382
+
199
383
  /**
200
384
  * @fileoverview added by tsickle
201
385
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
@@ -206,5 +390,5 @@ const NGXS_STATE_FACTORY = new InjectionToken('Internals.StateFactory');
206
390
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
207
391
  */
208
392
 
209
- export { INITIAL_STATE_TOKEN, InitialState, NGXS_STATE_CONTEXT_FACTORY, NGXS_STATE_FACTORY, NgxsBootstrapper, isAngularInTestMode, memoize };
393
+ export { INITIAL_STATE_TOKEN, InitialState, NGXS_STATE_CONTEXT_FACTORY, NGXS_STATE_FACTORY, NgxsBootstrapper, ensureInjectorNotifierIsCaptured, ensureLocalInjectorCaptured, isAngularInTestMode, localInject, memoize };
210
394
  //# sourceMappingURL=ngxs-store-internals.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngxs-store-internals.js","sources":["ng://@ngxs/store/internals/memoize.ts","ng://@ngxs/store/internals/angular.ts","ng://@ngxs/store/internals/ngxs-bootstrapper.ts","ng://@ngxs/store/internals/initial-state.ts","ng://@ngxs/store/internals/internal-tokens.ts"],"sourcesContent":["function defaultEqualityCheck(a: any, b: any) {\r\n return a === b;\r\n}\r\n\r\nfunction areArgumentsShallowlyEqual(\r\n equalityCheck: (a: any, b: any) => boolean,\r\n prev: IArguments | null,\r\n next: IArguments | null\r\n) {\r\n if (prev === null || next === null || prev.length !== next.length) {\r\n return false;\r\n }\r\n\r\n // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.\r\n const length = prev.length;\r\n for (let i = 0; i < length; i++) {\r\n if (!equalityCheck(prev[i], next[i])) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n}\r\n\r\n/**\r\n * Memoize a function on its last inputs only.\r\n * Originally from: https://github.com/reduxjs/reselect/blob/master/src/index.js\r\n *\r\n * @ignore\r\n */\r\nexport function memoize<T extends (...args: any[]) => any>(\r\n func: T,\r\n equalityCheck = defaultEqualityCheck\r\n): T {\r\n let lastArgs: IArguments | null = null;\r\n let lastResult: any = null;\r\n // we reference arguments instead of spreading them for performance reasons\r\n function memoized() {\r\n if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {\r\n // apply arguments instead of spreading for performance.\r\n lastResult = (<Function>func).apply(null, arguments);\r\n }\r\n\r\n lastArgs = arguments;\r\n return lastResult;\r\n }\r\n (<any>memoized).reset = function() {\r\n // The hidden (for now) ability to reset the memoization\r\n lastArgs = null;\r\n lastResult = null;\r\n };\r\n return memoized as T;\r\n}\r\n","import { getPlatform, COMPILER_OPTIONS, CompilerOptions, PlatformRef } from '@angular/core';\r\nimport { memoize } from './memoize';\r\n\r\nfunction _isAngularInTestMode() {\r\n const platformRef: PlatformRef | null = getPlatform();\r\n if (!platformRef) return false;\r\n const compilerOptions = platformRef.injector.get<any>(COMPILER_OPTIONS, null);\r\n if (!compilerOptions) return false;\r\n const isInTestMode = compilerOptions.some((item: CompilerOptions) => {\r\n const providers = (item && item.providers) || [];\r\n return providers.some((provider: any) => {\r\n return (\r\n (provider && provider.provide && provider.provide.name === 'MockNgModuleResolver') ||\r\n false\r\n );\r\n });\r\n });\r\n return isInTestMode;\r\n}\r\n\r\nexport const isAngularInTestMode = memoize(_isAngularInTestMode);\r\n","import { Injectable } from '@angular/core';\r\nimport { Observable, ReplaySubject } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class NgxsBootstrapper {\r\n /**\r\n * Use `ReplaySubject`, thus we can get cached value even if the stream is completed\r\n */\r\n private bootstrap$ = new ReplaySubject<boolean>(1);\r\n\r\n get appBootstrapped$(): Observable<boolean> {\r\n return this.bootstrap$.asObservable();\r\n }\r\n\r\n /**\r\n * This event will be emitted after attaching `ComponentRef` of the root component\r\n * to the tree of views, that's a signal that application has been fully rendered\r\n */\r\n bootstrap(): void {\r\n this.bootstrap$.next(true);\r\n this.bootstrap$.complete();\r\n }\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\nimport { PlainObject } from './symbols';\r\n\r\nexport const INITIAL_STATE_TOKEN = new InjectionToken<any>('INITIAL_STATE_TOKEN');\r\n\r\nexport class InitialState {\r\n private static value: PlainObject = {};\r\n\r\n public static set(state: PlainObject) {\r\n this.value = state;\r\n }\r\n\r\n public static pop(): PlainObject {\r\n const state: PlainObject = this.value;\r\n this.value = {};\r\n return state;\r\n }\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\n\r\n/**\r\n * @see StateContextFactory as it's referenced by this token to be accessed by plugins internally\r\n */\r\nexport const NGXS_STATE_CONTEXT_FACTORY: InjectionToken<any> = new InjectionToken(\r\n 'Internals.StateContextFactory'\r\n);\r\n\r\n/**\r\n * @see StateFactory as it's referenced by this token to be accessed by plugins internally\r\n */\r\nexport const NGXS_STATE_FACTORY: InjectionToken<any> = new InjectionToken(\r\n 'Internals.StateFactory'\r\n);\r\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA,SAAS,oBAAoB,CAAC,CAAM,EAAE,CAAM;IAC1C,OAAO,CAAC,KAAK,CAAC,CAAC;CAChB;;;;;;;AAED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;;;AAKD,MAAa,kBAAkB,GAAwB,IAAI,cAAc,CACvE,wBAAwB,CACzB;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ngxs-store-internals.js","sources":["ng://@ngxs/store/internals/angular.ts","ng://@ngxs/store/internals/ngxs-bootstrapper.ts","ng://@ngxs/store/internals/memoize.ts","ng://@ngxs/store/internals/initial-state.ts","ng://@ngxs/store/internals/internal-tokens.ts","ng://@ngxs/store/internals/decorator-injector-adapter.ts"],"sourcesContent":["declare const __karma__: unknown;\r\ndeclare const jasmine: unknown;\r\ndeclare const jest: unknown;\r\ndeclare const Mocha: unknown;\r\n\r\nexport function isAngularInTestMode(): boolean {\r\n // This is safe to check for these properties in the following way since `typeof` does not\r\n // throw an exception if the value does not exist in the scope.\r\n // We should not try to read these values from the global scope (e.g. `ɵglobal` from the `@angular/core`).\r\n // This is related to how these frameworks compile and execute modules. E.g. Jest wraps the module into\r\n // its internal code where `jest` variable exists in the scope. It cannot be read from the global scope, e.g.\r\n // this will return undefined `global.jest`, but `jest` will not equal undefined.\r\n return (\r\n typeof __karma__ !== 'undefined' ||\r\n typeof jasmine !== 'undefined' ||\r\n typeof jest !== 'undefined' ||\r\n typeof Mocha !== 'undefined'\r\n );\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Observable, ReplaySubject } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class NgxsBootstrapper {\r\n /**\r\n * Use `ReplaySubject`, thus we can get cached value even if the stream is completed\r\n */\r\n private bootstrap$ = new ReplaySubject<boolean>(1);\r\n\r\n get appBootstrapped$(): Observable<boolean> {\r\n return this.bootstrap$.asObservable();\r\n }\r\n\r\n /**\r\n * This event will be emitted after attaching `ComponentRef` of the root component\r\n * to the tree of views, that's a signal that application has been fully rendered\r\n */\r\n bootstrap(): void {\r\n this.bootstrap$.next(true);\r\n this.bootstrap$.complete();\r\n }\r\n}\r\n","function defaultEqualityCheck(a: any, b: any) {\r\n return a === b;\r\n}\r\n\r\nfunction areArgumentsShallowlyEqual(\r\n equalityCheck: (a: any, b: any) => boolean,\r\n prev: IArguments | null,\r\n next: IArguments | null\r\n) {\r\n if (prev === null || next === null || prev.length !== next.length) {\r\n return false;\r\n }\r\n\r\n // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.\r\n const length = prev.length;\r\n for (let i = 0; i < length; i++) {\r\n if (!equalityCheck(prev[i], next[i])) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n}\r\n\r\n/**\r\n * Memoize a function on its last inputs only.\r\n * Originally from: https://github.com/reduxjs/reselect/blob/master/src/index.js\r\n *\r\n * @ignore\r\n */\r\nexport function memoize<T extends (...args: any[]) => any>(\r\n func: T,\r\n equalityCheck = defaultEqualityCheck\r\n): T {\r\n let lastArgs: IArguments | null = null;\r\n let lastResult: any = null;\r\n // we reference arguments instead of spreading them for performance reasons\r\n function memoized() {\r\n if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {\r\n // apply arguments instead of spreading for performance.\r\n lastResult = (<Function>func).apply(null, arguments);\r\n }\r\n\r\n lastArgs = arguments;\r\n return lastResult;\r\n }\r\n (<any>memoized).reset = function() {\r\n // The hidden (for now) ability to reset the memoization\r\n lastArgs = null;\r\n lastResult = null;\r\n };\r\n return memoized as T;\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\nimport { PlainObject } from './symbols';\r\n\r\nexport const INITIAL_STATE_TOKEN = new InjectionToken<any>('INITIAL_STATE_TOKEN');\r\n\r\nexport class InitialState {\r\n private static value: PlainObject = {};\r\n\r\n public static set(state: PlainObject) {\r\n this.value = state;\r\n }\r\n\r\n public static pop(): PlainObject {\r\n const state: PlainObject = this.value;\r\n this.value = {};\r\n return state;\r\n }\r\n}\r\n","import { InjectionToken } from '@angular/core';\r\n\r\n/**\r\n * @see StateContextFactory as it's referenced by this token to be accessed by plugins internally\r\n */\r\nexport const NGXS_STATE_CONTEXT_FACTORY: InjectionToken<any> = new InjectionToken(\r\n 'Internals.StateContextFactory'\r\n);\r\n\r\n/**\r\n * @see StateFactory as it's referenced by this token to be accessed by plugins internally\r\n */\r\nexport const NGXS_STATE_FACTORY: InjectionToken<any> = new InjectionToken(\r\n 'Internals.StateFactory'\r\n);\r\n","import {\r\n InjectionToken,\r\n Injector,\r\n INJECTOR,\r\n Type,\r\n ɵɵdirectiveInject,\r\n ɵglobal\r\n} from '@angular/core';\r\nimport { ReplaySubject } from 'rxjs';\r\n\r\n// Will be provided through Terser global definitions by Angular CLI\r\n// during the production build. This is how Angular does tree-shaking internally.\r\ndeclare const ngDevMode: boolean;\r\n\r\n// Angular doesn't export `NG_FACTORY_DEF`.\r\nconst NG_FACTORY_DEF = 'ɵfac';\r\n\r\n// A `Symbol` which is used to save the `Injector` onto the class instance.\r\nconst InjectorInstance: unique symbol = Symbol('InjectorInstance');\r\n\r\n// A `Symbol` which is used to determine if factory has been decorated previously or not.\r\nconst FactoryHasBeenDecorated: unique symbol = Symbol('FactoryHasBeenDecorated');\r\n\r\n// A `Symbol` which is used to save the notifier on the class instance. The `InjectorInstance` cannot\r\n// be retrieved within the `constructor` since it's set after the `factory()` is called.\r\nconst InjectorNotifier: unique symbol = Symbol('InjectorNotifier');\r\n\r\ninterface PrototypeWithInjectorNotifier extends Object {\r\n [InjectorNotifier]?: ReplaySubject<boolean>;\r\n}\r\n\r\nexport function ensureInjectorNotifierIsCaptured(\r\n target: PrototypeWithInjectorNotifier | PrivateInstance\r\n): ReplaySubject<boolean> {\r\n if (target[InjectorNotifier]) {\r\n return target[InjectorNotifier]!;\r\n } else {\r\n const injectorNotifier$ = new ReplaySubject<boolean>(1);\r\n Object.defineProperty(target, InjectorNotifier, {\r\n get: () => injectorNotifier$\r\n });\r\n return injectorNotifier$;\r\n }\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/ban-types\r\nexport function ensureLocalInjectorCaptured(target: Object): void {\r\n if (FactoryHasBeenDecorated in target.constructor.prototype) {\r\n return;\r\n }\r\n\r\n const constructor: ConstructorWithDefinitionAndFactory = target.constructor;\r\n // Means we're in AOT mode.\r\n if (typeof constructor[NG_FACTORY_DEF] === 'function') {\r\n decorateFactory(constructor);\r\n } else if (ngDevMode) {\r\n // We're running in JIT mode and that means we're not able to get the compiled definition\r\n // on the class inside the property decorator during the current message loop tick. We have\r\n // to wait for the next message loop tick. Note that this is safe since this Promise will be\r\n // resolved even before the `APP_INITIALIZER` is resolved.\r\n // The below code also will be executed only in development mode, since it's never recommended\r\n // to use the JIT compiler in production mode (by setting \"aot: false\").\r\n decorateFactoryLater(constructor);\r\n }\r\n\r\n target.constructor.prototype[FactoryHasBeenDecorated] = true;\r\n}\r\n\r\nexport function localInject<T>(\r\n instance: PrivateInstance,\r\n token: InjectionToken<T> | Type<T>\r\n): T | null {\r\n const injector: Injector | undefined = instance[InjectorInstance];\r\n return injector ? injector.get(token) : null;\r\n}\r\n\r\nfunction decorateFactory(constructor: ConstructorWithDefinitionAndFactory): void {\r\n const factory = constructor[NG_FACTORY_DEF];\r\n\r\n if (typeof factory !== 'function') {\r\n return;\r\n }\r\n\r\n // Let's try to get any definition.\r\n // Caretaker note: this will be compatible only with Angular 9+, since Angular 9 is the first\r\n // Ivy-stable version. Previously definition properties were named differently (e.g. `ngComponentDef`).\r\n const def = constructor.ɵprov || constructor.ɵpipe || constructor.ɵcmp || constructor.ɵdir;\r\n\r\n const decoratedFactory = () => {\r\n const instance = factory();\r\n // Caretaker note: `inject()` won't work here.\r\n // We can use the `directiveInject` only during the component\r\n // construction, since Angular captures the currently active injector.\r\n // We're not able to use this function inside the getter (when the `selectorId` property is\r\n // requested for the first time), since the currently active injector will be null.\r\n instance[InjectorInstance] = ɵɵdirectiveInject(\r\n // We're using `INJECTOR` token except of the `Injector` class since the compiler\r\n // throws: `Cannot assign an abstract constructor type to a non-abstract constructor type.`.\r\n // Caretaker note: that this is the same way of getting the injector.\r\n INJECTOR\r\n );\r\n\r\n // Caretaker note: the notifier will be available only if consumers call the `ensureInjectorNotifierIsCaptured()`.\r\n const injectorNotifier$ = instance[InjectorNotifier];\r\n if (injectorNotifier$) {\r\n injectorNotifier$.next(true);\r\n injectorNotifier$.complete();\r\n }\r\n\r\n return instance;\r\n };\r\n\r\n // If we've found any definition then it's enough to override the `def.factory` since Angular\r\n // code uses the `def.factory` and then fallbacks to `ɵfac`.\r\n if (def) {\r\n def.factory = decoratedFactory;\r\n }\r\n\r\n // `@NgModule()` doesn't doesn't have definition factory, also providers have definitions but Angular\r\n // still uses the `ɵfac`.\r\n Object.defineProperty(constructor, NG_FACTORY_DEF, {\r\n get: () => decoratedFactory\r\n });\r\n}\r\n\r\nfunction decorateFactoryLater(constructor: ConstructorWithDefinitionAndFactory): void {\r\n // This function actually will be tree-shaken away when building for production since it's guarded with `ngDevMode`.\r\n // We're having the `try-catch` here because of the `SyncTestZoneSpec`, which throws\r\n // an error when micro or macrotask is used within a synchronous test. E.g. `Cannot call\r\n // Promise.then from within a sync test`.\r\n try {\r\n Promise.resolve().then(() => {\r\n decorateFactory(constructor);\r\n });\r\n } catch {\r\n // This is kind of a \"hack\", but we try to be backwards-compatible,\r\n // tho this `catch` block will only be executed when tests are run with Jasmine or Jest.\r\n ɵglobal.process &&\r\n ɵglobal.process.nextTick &&\r\n ɵglobal.process.nextTick(() => {\r\n decorateFactory(constructor);\r\n });\r\n }\r\n}\r\n\r\n// We could've used `ɵɵFactoryDef` but we try to be backwards-compatible,\r\n// since it's not exported in older Angular versions.\r\ntype Factory = () => PrivateInstance;\r\n\r\n// We could've used `ɵɵInjectableDef`, `ɵɵPipeDef`, etc. We try to be backwards-compatible\r\n// since they're not exported in older Angular versions.\r\ninterface Definition {\r\n factory: Factory | null;\r\n}\r\n\r\ninterface ConstructorWithDefinitionAndFactory extends Function {\r\n // Provider definition for the `@Injectable()` class.\r\n ɵprov?: Definition;\r\n // Pipe definition for the `@Pipe()` class.\r\n ɵpipe?: Definition;\r\n // Component definition for the `@Component()` class.\r\n ɵcmp?: Definition;\r\n // Directive definition for the `@Directive()` class.\r\n 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