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,OAAOU,KAAKsV,GAAUA,EACxEE,EAA2B,kBAAV5e,EAAsB,CAAE0gB,cAAe1gB,GAAU,OAAD,UAAMA,GAG7E,OAFiBolC,kBAA0BtJ,EAAKrM,EAAU7Q,EAEnDyZ,CAAQ3Z,EAAQE,EAAQ8B,cACjC,Q","sources":["webpack://ng-mocks/./libs/ng-mocks/src/lib/common/core.config.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/core.define-property.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/core.helpers.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/core.reflect.parameters-resolve.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/core.tokens.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.directive-io-build.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.directive-io-parse.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.extract-forward-ref.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.get-global.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.get-name.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.get-type.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.is-ng-type.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.is-ng-def.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.is-ng-injection-token.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.is-ng-module-def-with-providers.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/ng-mocks-universe.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.stub-member.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.stub.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-instance/mock-instance-apply.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/helper.create-clone.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/helper.define-property-descriptor.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/helper.extract-methods-from-prototype.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/helper.extract-properties-from-prototype.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/helper.extract-property-descriptor.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/helper.mock.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/helper.mock-function.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/helper.replace-with-mocks.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/helper.mock-service.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/helper.create-mock-from-prototype.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/helper.resolve-provider.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/helper.use-factory.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/mock-provider.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/check.is-func.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/mock-service.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/check.is-class.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-service/check.is-inst.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.reflect-component-type.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/resolve/collect-declarations.ts","webpack://ng-mocks/external module \"@angular/core\"","webpack://ng-mocks/external module \"@angular/core/testing\"","webpack://ng-mocks/webpack/bootstrap","webpack://ng-mocks/webpack/runtime/define property getters","webpack://ng-mocks/webpack/runtime/global","webpack://ng-mocks/webpack/runtime/hasOwnProperty shorthand","webpack://ng-mocks/webpack/runtime/make namespace object","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/ng-mocks-stack.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/func.extract-tokens.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.get-ng-type.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.is-standalone.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/core.def-stack.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/mock-builder-stash.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/core.reflect.provided-in.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/add-requested-providers.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/apply-platform-modules.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/error.empty-def.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.is-jest-mock.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/error.jest-mock.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/error.missing-decorators.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/core.reflect.body-catch.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/core.reflect.directive-resolve.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/core.reflect.module-resolve.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/core.reflect.meta.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.get-source-of-mock.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock/mark-exported.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/core.form.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.is-mock.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/mock-control-value-accessor-proxy.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/mock.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/mock-control-value-accessor.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/decorate.inputs.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/decorate.mock.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/decorate.outputs.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/decorate.queries.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock/to-existing-provider.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock/to-factory-provider.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock/clone-providers.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock/decorate-declaration.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.import-exists.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.is-mock-ng-def.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/func.get-last-fixture.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock/return-cached-mock.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock/get-mock.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-component/render/generate-template.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-component/render/get-key.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-component/mock-component.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-directive/mock-directive.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/core.reflect.pipe-resolve.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-pipe/mock-pipe.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-module/mock-module.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-module/create-resolvers.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-module/mark-providers.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-module/mock-ng-def.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/get-override-def.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/skip-override.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/create-ng-mocks-overrides-token.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/create-ng-mocks-token.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/create-ng-mocks-touches-token.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/handle-entry-components.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/skip-dep.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/add-def-to-root-provider-parameters.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/check-root-provider-dependency.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/extract-dep.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/get-root-providers-data.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/handle-provided-in-dependency.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/skip-root-provider-dependency.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/get-root-provider-parameters.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/handle-root-providers.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/init-module.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/init-ng-modules.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.extract-deps.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/init-exclude-def.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/init-keep-def.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/try-mock-provider.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/init-mock-declarations.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/try-mock-declaration.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/init-modules.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/init-replace-def.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/init-universe.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/parse-mock-arguments.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/promise/parse-provider.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/mock-builder.promise.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/performance/equal-variables.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/performance/equal-render-defs.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/performance/equal-render-configs.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/performance/are-equal-config-params.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/performance/are-equal-maps.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/performance/are-equal-providers.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/performance/are-equal-sets.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/performance/get-empty-config.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/performance/required-metadata.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/mock-builder.performance.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-builder/mock-builder.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/format/is-debug-node.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/func.parse-find-args-name.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/format/is-fixture.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/find/func.parse-find-args.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/find/func.parse-find-term.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/find/mock-helper.find.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/detect-text-node.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/el-def-compare.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/el-def-get-node.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/core.injector.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/el-def-get-parent.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/nested-check-children.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/nested-check-parent.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/nested-check.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/mock-helper.crawl.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/func.parse-find-args.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/detect-attribute-in-selectors.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/func.parse-provider-tokens-directives.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/func.get-public-provider-keys.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/func.parse-inputs-and-requires-attributes.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/detect-selectors-from-node.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/crawl-by-attribute.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/func.get-from-node-injector.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/func.get-from-node-element.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/func.get-from-node-scan.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/func.get-from-node-ivy.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/func.get-from-node-standard.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/func.get-from-node.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.get.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.attributes.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/crawl-by-attribute-value.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/crawl-by-declaration.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/crawl-by-id.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/detect-tag-name-in-selectors.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/crawl-by-tag-name.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/detect-crawler.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/func.is-valid-reveal-selector.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/mock-helper.reveal.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/crawl/mock-helper.reveal-all.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.is-mock-control-value-accessor.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/format/is-html-element.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/events/mock-helper.event.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/events/mock-helper.trigger.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/cva/func.get-vca.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/cva/mock-helper.change.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/cva/mock-helper.touch.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/events/mock-helper.click.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/find/mock-helper.find-all.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/find-instance/func.is-valid-find-instance-selector.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/find-instance/mock-helper.find-instance.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/find-instance/mock-helper.find-instances.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/format/handle-array.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/format/format-handler.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/format/handle-text.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/format/is-text.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/format/mock-helper.format-html.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/format/mock-helper.format-text.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.auto-spy.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.console.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.console-ignore.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.console-throw.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.default-config.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.default-mock.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.faster-install.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.flush-test-bed.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.faster.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.iterate-declaration.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/func.global-prepare.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.global-exclude.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.global-keep.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.global-mock.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.global-replace.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.global-wipe.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.guts.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.input.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.output.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.reset.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/render/func.find-deep.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/render/func.parse-template.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/render/mock-helper.hide.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/render/mock-helper.render.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/template-ref/detect-crawler.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/template-ref/detect-template-ref.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/template-ref/func.is-valid-template-ref-selector.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/template-ref/mock-helper.find-template-ref.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/template-ref/mock-helper.find-template-refs.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.object.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-helper/mock-helper.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-provider/mock-provider.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/ng-mocks-global-overrides.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.is-mocked-ng-def-of.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.get-mocked-ng-def-of.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.is-mock-of.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/common/func.is-mock-validator.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-instance/mock-instance-forgot-reset.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-instance/mock-instance.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-declaration/mock-declaration.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-render/func.generate-template.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-render/func.create-wrapper.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-render/func.install-prop-reader.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-render/func.reflect-template.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-render/mock-render-factory.ts","webpack://ng-mocks/./libs/ng-mocks/src/lib/mock-render/mock-render.ts"],"sourcesContent":["export default {\n  flags: ['cacheModule', 'cacheComponent', 'cacheDirective', 'cacheProvider', 'correctModuleExports'],\n  mockRenderCacheSize: 25,\n  neverMockModule: [\n    'ApplicationModule',\n    'CommonModule',\n    'BrowserModule',\n\n    // Angular 16 adds underscores\n    '_ApplicationModule',\n    '_CommonModule',\n    '_BrowserModule',\n  ],\n  neverMockProvidedFunction: [\n    'DomRendererFactory2',\n    'EventManager',\n    'Injector', // ivy only\n    'RendererFactory2',\n\n    // https://github.com/help-me-mom/ng-mocks/issues/538\n    'Sanitizer',\n    'DomSanitizer',\n    'DomSanitizerImpl',\n\n    // ApplicationModule, A14 made them global at root level\n    'ApplicationInitStatus',\n    'ApplicationRef',\n    'Compiler',\n    'IterableDiffers',\n    'KeyValueDiffers',\n\n    // Angular 16 adds underscores\n    '_DomRendererFactory2',\n    '_EventManager',\n    '_Injector',\n    '_Sanitizer',\n    '_DomSanitizer',\n    '_DomSanitizerImpl',\n    '_ApplicationInitStatus',\n    '_ApplicationRef',\n    '_Compiler',\n    '_IterableDiffers',\n    '_KeyValueDiffers',\n  ],\n  neverMockToken: [\n    'InjectionToken Set Injector scope.', // INJECTOR_SCOPE // ivy only\n    'InjectionToken EventManagerPlugins', // EVENT_MANAGER_PLUGINS\n    'InjectionToken HammerGestureConfig', // HAMMER_GESTURE_CONFIG\n\n    // ApplicationModule, A14 made them global at root level\n    'InjectionToken AppId', // APP_ID\n    'InjectionToken DefaultCurrencyCode', // DEFAULT_CURRENCY_CODE\n    'InjectionToken LocaleId', // LOCALE_ID\n    'InjectionToken SCHEDULER_TOKEN', // SCHEDULER\n  ],\n  onMockBuilderMissingDependency: 'throw',\n  onMockInstanceRestoreNeed: 'warn',\n  onTestBedFlushNeed: 'warn',\n\n  dependencies: [\n    'declarations',\n    'hostDirectives',\n    'entryComponents',\n    'bootstrap',\n    'providers',\n    'viewProviders',\n    'imports',\n    'exports',\n  ] as const,\n};\n","import helperMockService from '../mock-service/helper.mock-service';\n\nexport default (instance: any, property: keyof any, value: any, enumerable = false) => {\n  helperMockService.definePropertyDescriptor(instance, property, {\n    configurable: true,\n    enumerable,\n    value,\n    writable: true,\n  });\n};\n","import { getTestBed } from '@angular/core/testing';\n\nimport coreDefineProperty from './core.define-property';\nimport coreReflectParametersResolve from './core.reflect.parameters-resolve';\nimport { AnyDeclaration, AnyType, Type } from './core.types';\nimport funcGetGlobal from './func.get-global';\nimport funcGetName from './func.get-name';\nimport ngMocksUniverse from './ng-mocks-universe';\n\n/**\n * It will be removed from public interface with the next release: A14\n * Use ngMocks.get(token) instead.\n *\n * @deprecated\n * @internal\n */\nexport const getTestBedInjection = <I>(token: AnyDeclaration<I>): I | undefined => {\n  try {\n    // istanbul ignore next\n    return getInjection(token);\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * It will be removed from public interface with the next release: A14\n *\n * @deprecated\n * @internal\n */\nexport const getInjection = <I>(token: AnyDeclaration<I>): I => {\n  const testBed: any = getTestBed();\n\n  // istanbul ignore next\n  return testBed.inject ? testBed.inject(token) : (testBed as any).get(token);\n};\n\nexport const flatten = <T>(values: T | T[] | { ɵproviders: T[] }, result: T[] = []): T[] => {\n  if (Array.isArray(values)) {\n    for (const value of values) {\n      flatten(value, result);\n    }\n  } else if (values !== null && typeof values === 'object' && Array.isArray((values as any).ɵproviders)) {\n    for (const value of (values as any).ɵproviders) {\n      flatten(value, result);\n    }\n  } else {\n    // any is needed to cover ɵproviders\n    result.push(values as any);\n  }\n\n  return result;\n};\n\nexport const mapKeys = <T>(set: Map<T, any>): T[] => {\n  const result: T[] = [];\n  // eslint-disable-next-line unicorn/no-array-for-each\n  set.forEach((_, value: T) => result.push(value));\n\n  return result;\n};\n\nexport const mapValues = <T>(set: { forEach(a1: (value: T) => void): void }, destination?: Set<T>): T[] => {\n  const result: T[] = [];\n  if (destination) {\n    // eslint-disable-next-line unicorn/no-array-for-each\n    set.forEach((value: T) => {\n      destination.add(value);\n    });\n  } else {\n    // eslint-disable-next-line unicorn/no-array-for-each\n    set.forEach((value: T) => {\n      result.push(value);\n    });\n  }\n\n  return result;\n};\n\nexport const mapEntries = <K, T>(set: Map<K, T>, destination?: Map<K, T>): Array<[K, T]> => {\n  const result: Array<[K, T]> = [];\n\n  if (destination) {\n    // eslint-disable-next-line unicorn/no-array-for-each\n    set.forEach((value: T, key: K) => destination.set(key, value));\n  } else {\n    // eslint-disable-next-line unicorn/no-array-for-each\n    set.forEach((value: T, key: K) => result.push([key, value]));\n  }\n\n  return result;\n};\n\nconst extractDependencyArray = (deps: any[], set: Set<any>): void => {\n  for (const flag of deps) {\n    const name = flag && typeof flag === 'object' ? flag.ngMetadataName : undefined;\n    if (name === 'Optional' || name === 'SkipSelf' || name === 'Self') {\n      continue;\n    }\n    set.add(flag);\n  }\n};\n\n// Accepts an array of dependencies from providers, skips injections flags,\n// and adds the providers to the set.\nexport const extractDependency = (deps: any[], set?: Set<any>): void => {\n  if (!set) {\n    return;\n  }\n  for (const dep of deps) {\n    if (!Array.isArray(dep)) {\n      set.add(dep);\n      continue;\n    }\n    extractDependencyArray(dep, set);\n  }\n};\n\nexport const extendClassicClass = <I>(base: AnyType<I>): Type<I> => {\n  let child: any;\n  const index = ngMocksUniverse.index();\n\n  const glb = funcGetGlobal();\n  glb.ngMocksParent = base;\n\n  // First we try to eval es2015 style and if it fails to use es5 transpilation in the catch block.\n  // The next step is to respect constructor parameters as the parent class via jitReflector.\n  // istanbul ignore next\n  try {\n    eval(`\n      var glb = typeof window === 'undefined' ? global : window;\n      class MockMiddleware${index} extends glb.ngMocksParent {};\n      glb.ngMocksResult = MockMiddleware${index};\n    `);\n    child = glb.ngMocksResult;\n  } catch {\n    class MockMiddleware extends glb.ngMocksParent {}\n    child = MockMiddleware;\n  } finally {\n    glb.ngMocksResult = undefined;\n    glb.ngMocksParent = undefined;\n  }\n\n  // A16: adding unique property.\n  coreDefineProperty(child.prototype, `__ngMocks_index_${index}`, undefined, false);\n\n  return child;\n};\n\nexport const extendClass = <I>(base: AnyType<I>): Type<I> => {\n  const child: Type<I> = extendClassicClass(base);\n  coreDefineProperty(child, 'name', `MockMiddleware${funcGetName(base)}`, true);\n\n  const parameters = coreReflectParametersResolve(base);\n  if (parameters.length > 0) {\n    coreDefineProperty(child, 'parameters', [...parameters]);\n  }\n\n  return child;\n};\n","import collectDeclarations from '../resolve/collect-declarations';\n\nexport default (def: any): any[] => {\n  const declaration = collectDeclarations(def);\n\n  return declaration.parameters ?? [];\n};\n","import { InjectionToken } from '@angular/core';\nimport { MetadataOverride } from '@angular/core/testing';\n\nimport { AnyType } from './core.types';\n\n/**\n * NG_MOCKS token is a map from a declaration to its mock copy.\n *\n * @internal\n *\n * ```ts\n * const MockClass = TestBed.inject(NG_MOCKS).get(RealClass);\n * ```\n */\nexport const NG_MOCKS = new InjectionToken<Map<any, any>>('NG_MOCKS');\n(NG_MOCKS as any).__ngMocksSkip = true;\n\n/**\n * NG_MOCKS_TOUCHES token is a set of all touched declarations during mock process.\n *\n * @internal\n *\n * ```ts\n * const touched = TestBed.inject(NG_MOCKS_TOUCHES).has(RealClass);\n * ```\n */\nexport const NG_MOCKS_TOUCHES = new InjectionToken<Set<any>>('NG_MOCKS_TOUCHES');\n(NG_MOCKS_TOUCHES as any).__ngMocksSkip = true;\n\n/**\n * NG_MOCKS_OVERRIDES token contains overrides for:\n * - TestBed.overrideModule\n * - TestBed.overrideComponent\n * - TestBed.overrideDirective\n * - TestBed.overrideProvider\n *\n * It is used when there is no way to provide a mock copy and an override is required.\n * For example, if we want to keep a component, but to override one of its local providers.\n *\n * @internal\n */\nexport const NG_MOCKS_OVERRIDES = new InjectionToken<Map<AnyType<any>, MetadataOverride<any>>>('NG_MOCKS_OVERRIDES');\n(NG_MOCKS_OVERRIDES as any).__ngMocksSkip = true;\n\n/**\n * NG_MOCKS_GUARDS token influences on provided guards in MockBuilder.\n * More info by the links below.\n *\n * @see https://ng-mocks.sudo.eu/api/MockBuilder#ng_mocks_guards-token\n * @see https://ng-mocks.sudo.eu/guides/routing-guard\n */\nexport const NG_MOCKS_GUARDS = new InjectionToken<void>('NG_MOCKS_GUARDS');\n(NG_MOCKS_GUARDS as any).__ngMocksSkip = true;\n\n/**\n * NG_MOCKS_RESOLVERS token influences on provided resolvers in MockBuilder.\n * More info by the links below.\n *\n * @see https://ng-mocks.sudo.eu/api/MockBuilder#ng_mocks_resolvers-token\n * @see https://ng-mocks.sudo.eu/guides/routing-resolver\n */\nexport const NG_MOCKS_RESOLVERS = new InjectionToken<void>('NG_MOCKS_RESOLVERS');\n(NG_MOCKS_RESOLVERS as any).__ngMocksSkip = true;\n\n/**\n * NG_MOCKS_INTERCEPTORS token influences on provided interceptors in MockBuilder.\n * More info by the links below.\n *\n * @see https://ng-mocks.sudo.eu/api/MockBuilder#ng_mocks_interceptors-token\n * @see https://ng-mocks.sudo.eu/guides/http-interceptor\n */\nexport const NG_MOCKS_INTERCEPTORS = new InjectionToken<void>('NG_MOCKS_INTERCEPTORS');\n(NG_MOCKS_INTERCEPTORS as any).__ngMocksSkip = true;\n\n/**\n * NG_MOCKS_ROOT_PROVIDERS token influences on root providers in MockBuilder,\n * which aren't provided in specified modules.\n * It helps to mock or keep them automatically.\n *\n * @see https://ng-mocks.sudo.eu/api/MockBuilder#ng_mocks_root_providers-token\n */\nexport const NG_MOCKS_ROOT_PROVIDERS = new InjectionToken<void>('NG_MOCKS_ROOT_PROVIDERS');\n(NG_MOCKS_ROOT_PROVIDERS as any).__ngMocksSkip = true;\n","import { DirectiveIo, DirectiveIoParsed } from './core.types';\n\nexport default function ({ name, alias, required }: DirectiveIoParsed, skipName = false): DirectiveIo {\n  if (required) {\n    return { name, alias, required };\n  }\n  if (!alias || name === alias) {\n    return skipName ? '' : name;\n  }\n\n  return skipName ? alias : `${name}:${alias}`;\n}\n","import { DirectiveIo, DirectiveIoParsed } from './core.types';\n\nexport default function (param: DirectiveIo): DirectiveIoParsed {\n  if (typeof param === 'string') {\n    const [name, alias] = param.split(':').map(v => v.trim());\n\n    if (name === alias || !alias) {\n      return { name };\n    }\n\n    return { name, alias };\n  }\n\n  return param;\n}\n","// handles forwardRef on useExisting\nexport default (provide: any): any => {\n  if (typeof provide === 'function' && provide.__forward_ref__) {\n    return provide();\n  }\n\n  return provide;\n};\n","export default (): Record<keyof any, any> => {\n  // istanbul ignore if\n  if (typeof window === 'undefined') {\n    return global;\n  }\n\n  return window;\n};\n","const badCharacters = new RegExp('[^0-9a-z]+', 'mgi');\n\nexport default (value: any): string => {\n  let result: string | undefined;\n\n  if (typeof value === 'function' && value.name) {\n    result = value.name;\n  } else if (typeof value === 'function') {\n    result = 'arrowFunction';\n  } else if (typeof value === 'object' && value && value.ngMetadataName === 'InjectionToken') {\n    result = value._desc;\n  } else if (typeof value === 'object' && value && typeof value.constructor === 'function') {\n    result = value.constructor.name;\n  }\n\n  result ||= 'unknown';\n\n  return result.replace(badCharacters, '_');\n};\n","import { isNgModuleDefWithProviders } from './func.is-ng-module-def-with-providers';\n\nexport default (provider: any): any => {\n  return provider && typeof provider === 'object' && provider.provide\n    ? provider.provide\n    : isNgModuleDefWithProviders(provider)\n      ? provider.ngModule\n      : provider && typeof provider === 'object' && provider.directive\n        ? provider.directive\n        : provider;\n};\n","import collectDeclarations from '../resolve/collect-declarations';\n\nimport { AnyType } from './core.types';\n\n/**\n * Checks whether a class has been decorated with a specific Angular decorator.\n * Due to the extension / multi decoration, we rely on the last used decorator.\n *\n * @internal\n *\n * ```ts\n * isNgType(MockModule, 'NgModule'); // returns true\n * isNgType(RealComponent, 'Component'); // returns true\n * isNgType(ArbitraryClass, 'Directive'); // returns false\n * isNgType(ArbitraryClass, 'Injectable'); // returns false\n * ```\n */\nexport const isNgType = (declaration: AnyType<any>, type: string): boolean => {\n  const { decorators } = collectDeclarations(declaration);\n  if (decorators.length === 0) {\n    return false;\n  }\n\n  let offset = 1;\n\n  // Injectable works well if the declaration is in providers.\n  if (type === 'Injectable' && decorators.indexOf('Injectable') !== -1) {\n    return true;\n  }\n\n  // Skipping Injectable.\n  while (decorators[decorators.length - offset] === 'Injectable') {\n    offset += 1;\n  }\n\n  return decorators[decorators.length - offset] === type;\n};\n","import { InjectionToken, PipeTransform } from '@angular/core';\n\nimport { Type } from './core.types';\nimport { isNgInjectionToken } from './func.is-ng-injection-token';\nimport { isNgType } from './func.is-ng-type';\n\nconst isModuleCheck = (def: any, ngType?: string): boolean => (!ngType || ngType === 'm') && isNgType(def, 'NgModule');\nconst isComponentCheck = (def: any, ngType?: string): boolean =>\n  (!ngType || ngType === 'c') && isNgType(def, 'Component');\nconst isDirectiveCheck = (def: any, ngType?: string): boolean =>\n  (!ngType || ngType === 'd') && isNgType(def, 'Directive');\nconst isPipeCheck = (def: any, ngType?: string): boolean => (!ngType || ngType === 'p') && isNgType(def, 'Pipe');\nconst isInjectableCheck = (def: any, ngType?: string): boolean =>\n  (!ngType || ngType === 'i') && isNgType(def, 'Injectable');\n\n/**\n * Checks whether a class has been decorated by @NgModule.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isNgDef\n *\n * ```ts\n * isNgDef(RealModule, 'm'); // returns true\n * isNgDef(MockModule, 'm'); // returns true\n * isNgDef(ArbitraryModule, 'm'); // returns true\n * isNgDef(ArbitraryClass, 'm'); // returns false\n * ```\n */\nexport function isNgDef(declaration: any, ngType: 'm'): declaration is Type<any>;\n\n/**\n * Checks whether a class has been decorated by @Component.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isNgDef\n *\n * ```ts\n * isNgDef(RealComponent, 'c'); // returns true\n * isNgDef(MockComponent, 'c'); // returns true\n * isNgDef(ArbitraryComponent, 'c'); // returns true\n * isNgDef(ArbitraryClass, 'c'); // returns false\n * ```\n */\nexport function isNgDef(declaration: any, ngType: 'c'): declaration is Type<any>;\n\n/**\n * Checks whether a class has been decorated by @Directive.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isNgDef\n *\n * ```ts\n * isNgDef(RealDirective, 'd'); // returns true\n * isNgDef(MockDirective, 'd'); // returns true\n * isNgDef(ArbitraryDirective, 'd'); // returns true\n * isNgDef(ArbitraryClass, 'd'); // returns false\n * ```\n */\nexport function isNgDef(declaration: any, ngType: 'd'): declaration is Type<any>;\n\n/**\n * Checks whether a class has been decorated by @Pipe.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isNgDef\n *\n * ```ts\n * isNgDef(RealPipe, 'p'); // returns true\n * isNgDef(MockPipe, 'p'); // returns true\n * isNgDef(ArbitraryPipe, 'p'); // returns true\n * isNgDef(ArbitraryClass, 'p'); // returns false\n * ```\n */\nexport function isNgDef(declaration: any, ngType: 'p'): declaration is Type<PipeTransform>;\n\n/**\n * Checks whether a class has been decorated by @Injectable.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isNgDef\n *\n * ```ts\n * isNgDef(RealService, 'i'); // returns true\n * isNgDef(MockService, 'i'); // returns true\n * isNgDef(ArbitraryService, 'i'); // returns true\n * isNgDef(ArbitraryClass, 'i'); // returns false\n * ```\n */\nexport function isNgDef(declaration: any, ngType: 'i'): declaration is Type<any>;\n\n/**\n * Checks whether a variable is a token.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isNgDef\n *\n * ```ts\n * isNgDef(realToken, 't'); // returns true\n * isNgDef(mockToken, 't'); // returns true\n * isNgDef(arbitraryToken, 't'); // returns true\n * isNgDef(arbitraryObject, 't'); // returns false\n * ```\n */\nexport function isNgDef(declaration: any, ngType: 't'): declaration is InjectionToken<any>;\n\n/**\n * Checks whether a class or variable has been decorated by a ng type.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isNgDef\n *\n * ```ts\n * isNgDef(RealModule); // returns true\n * isNgDef(MockComponent); // returns true\n * isNgDef(ArbitraryDirective); // returns true\n * isNgDef(token); // returns true\n * isNgDef(ArbitraryClass); // returns false\n * ```\n */\nexport function isNgDef(declaration: any): declaration is Type<any>;\n\nexport function isNgDef(declaration: any, ngType?: string): declaration is Type<any> {\n  if (ngType === 't') {\n    return isNgInjectionToken(declaration);\n  }\n  if (typeof declaration !== 'function') {\n    return false;\n  }\n\n  const isModule = isModuleCheck(declaration, ngType);\n  const isComponent = isComponentCheck(declaration, ngType);\n  const isDirective = isDirectiveCheck(declaration, ngType);\n  const isPipe = isPipeCheck(declaration, ngType);\n  const isInjectable = isInjectableCheck(declaration, ngType);\n\n  return isModule || isComponent || isDirective || isPipe || isInjectable;\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\n * Checks whether a variable is an Angular token.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isNgInjectionToken\n *\n * ```ts\n * isNgInjectionToken(APP_ID); // returns true\n * isNgInjectionToken(arbitraryVariable); // returns false\n * ```\n */\nexport const isNgInjectionToken = (token: any): token is InjectionToken<any> =>\n  token && typeof token === 'object' && token.ngMetadataName === 'InjectionToken';\n","import { NgModule } from '@angular/core';\n\nimport { Type } from './core.types';\n\n/**\n * NgModuleWithProviders helps to support ModuleWithProviders in all angular versions.\n * In A5 it was without the generic type.\n *\n * @internal remove after removal of A5 support\n */\nexport interface NgModuleWithProviders<T = any> {\n  ngModule: Type<T>;\n  providers?: NgModule['providers'];\n}\n\n/**\n * isNgModuleDefWithProviders checks if an object implements ModuleWithProviders.\n *\n * @internal\n */\nexport const isNgModuleDefWithProviders = (declaration: any): declaration is NgModuleWithProviders =>\n  declaration && typeof declaration === 'object' && typeof declaration.ngModule === 'function';\n","import { IMockBuilderConfig } from '../mock-builder/types';\n\nimport coreConfig from './core.config';\nimport { AnyDeclaration } from './core.types';\nimport funcGetGlobal from './func.get-global';\nimport funcGetName from './func.get-name';\n\nconst globalMap = (key: string) => () => {\n  if (!ngMocksUniverse.global.has(key)) {\n    ngMocksUniverse.global.set(key, new Map());\n  }\n\n  return ngMocksUniverse.global.get(key);\n};\n\ninterface NgMocksUniverse {\n  /**\n   * the value can be:\n   * - null - exclude\n   * - undefined - delayed initialization\n   * - value - the definition which should be used in tests: real value, replacement, mock.\n   */\n  builtDeclarations: Map<any, any>;\n  builtProviders: Map<any, any>;\n  cacheDeclarations: Map<any, any>;\n  cacheProviders: Map<any, any>;\n  config: Map<any, any>;\n  configInstance: Map<any, any>;\n  flags: Set<string>;\n  getBuildDeclaration: (def: any) => any | undefined;\n  getConfigMock: () => Map<any, IMockBuilderConfig>;\n  getDefaults: () => Map<any, ['mock' | 'keep' | 'replace' | 'exclude', any?]>;\n  getLocalMocks: () => Array<[any, any]>;\n  getOverrides: () => Map<any, any>;\n  getResolution: (def: any) => undefined | 'mock' | 'keep' | 'replace' | 'exclude';\n  global: Map<any, any>;\n  hasBuildDeclaration: (def: any) => boolean;\n  isExcludedDef: (def: any) => boolean;\n  isProvidedDef: (def: any) => boolean;\n  touches: Set<AnyDeclaration<any> | string>;\n  indexValue: number;\n  index: () => number;\n}\n\nfuncGetGlobal().ngMocksUniverse = funcGetGlobal().ngMocksUniverse || {};\nconst ngMocksUniverse: NgMocksUniverse = funcGetGlobal().ngMocksUniverse;\n\nngMocksUniverse.builtDeclarations = new Map();\nngMocksUniverse.builtProviders = new Map();\nngMocksUniverse.cacheDeclarations = new Map();\nngMocksUniverse.cacheProviders = new Map();\nngMocksUniverse.config = new Map();\nngMocksUniverse.configInstance = new Map();\nngMocksUniverse.flags = new Set(coreConfig.flags);\nngMocksUniverse.global = new Map();\nngMocksUniverse.touches = new Set();\n\nngMocksUniverse.global.set('flags', {\n  // @deprecated and will be changed in A13 to 'throw'\n  onMockBuilderMissingDependency: coreConfig.onMockBuilderMissingDependency,\n  // @deprecated and will be changed in A13 to 'throw'\n  onMockInstanceRestoreNeed: coreConfig.onMockInstanceRestoreNeed,\n  // @deprecated and will be changed in A13 to 'throw'\n  onTestBedFlushNeed: coreConfig.onTestBedFlushNeed,\n});\n\nngMocksUniverse.getOverrides = globalMap('overrides');\nngMocksUniverse.getDefaults = globalMap('defaults');\nngMocksUniverse.getConfigMock = globalMap('configMock');\n\nconst getDefaults = (def: any): [] | ['mock' | 'keep' | 'replace' | 'exclude', any?] => {\n  {\n    const defValue = ngMocksUniverse.getDefaults().get(def);\n    if (defValue) {\n      return defValue;\n    }\n  }\n\n  {\n    const defValue = typeof def === 'function' ? ngMocksUniverse.getDefaults().get(`@${funcGetName(def)}`) : undefined;\n    if (defValue) {\n      return defValue;\n    }\n  }\n\n  return [];\n};\n\nngMocksUniverse.getResolution = (def: any): undefined | 'mock' | 'keep' | 'replace' | 'exclude' => {\n  const set = ngMocksUniverse.config.get('ngMocksDepsResolution');\n  if (set?.has(def)) {\n    return set.get(def);\n  }\n  const [value] = getDefaults(def);\n\n  return value;\n};\n\nngMocksUniverse.getBuildDeclaration = (def: any): undefined | null | any => {\n  if (ngMocksUniverse.builtDeclarations.has(def)) {\n    return ngMocksUniverse.builtDeclarations.get(def);\n  }\n  const [mode, replacement] = getDefaults(def);\n\n  if (mode === 'exclude') {\n    return null;\n  }\n  if (!mode || mode === 'keep') {\n    return def;\n  }\n  if (mode === 'replace') {\n    return replacement;\n  }\n};\n\nngMocksUniverse.hasBuildDeclaration = (def: any): boolean => {\n  if (ngMocksUniverse.builtDeclarations.has(def)) {\n    // undefined means that we know about this declaration,\n    // but its initialization is postponed at the moment.\n    return ngMocksUniverse.builtDeclarations.get(def) !== undefined;\n  }\n  const [mode] = getDefaults(def);\n\n  return !!mode && mode !== 'mock';\n};\n\nconst hasBuildDeclaration = (def: any): boolean => ngMocksUniverse.hasBuildDeclaration(def);\nconst getBuildDeclaration = (def: any): any => ngMocksUniverse.getBuildDeclaration(def);\n\nngMocksUniverse.isExcludedDef = (def: any): boolean => {\n  const resolution = ngMocksUniverse.getResolution(def);\n  if (resolution && resolution !== 'exclude') {\n    return false;\n  }\n\n  return hasBuildDeclaration(def) && getBuildDeclaration(def) === null;\n};\n\nngMocksUniverse.isProvidedDef = (def: any): boolean => hasBuildDeclaration(def) && getBuildDeclaration(def) !== null;\n\n// excluding StoreDevtoolsModule by default\nngMocksUniverse.getDefaults().set('@StoreDevtoolsModule', ['exclude']);\n\nngMocksUniverse.indexValue = 0;\nngMocksUniverse.index = () => {\n  return ngMocksUniverse.indexValue++;\n};\n\nexport default ((): NgMocksUniverse => ngMocksUniverse)();\n","import helperExtractPropertyDescriptor from '../mock-service/helper.extract-property-descriptor';\n\nexport default <T extends object>(\n  instance: T & { __ngMocks__source?: object },\n  key: any,\n  value: any,\n  encapsulation?: 'get' | 'set',\n): any => {\n  const def = helperExtractPropertyDescriptor(instance, key) ?? {};\n\n  if (!encapsulation && def.set && (def.set as any).__ngMocksProxy) {\n    def.set(value);\n\n    return value;\n  }\n\n  const descriptor: PropertyDescriptor = {\n    configurable: true,\n    enumerable: true,\n  };\n  if (encapsulation === 'get' && def.set) {\n    descriptor.set = def.set;\n  } else if (encapsulation === 'set' && def.get) {\n    descriptor.get = def.get;\n  }\n  if (encapsulation) {\n    descriptor[encapsulation] = value;\n  } else {\n    descriptor.writable = true;\n    descriptor.value = value;\n  }\n\n  Object.defineProperty(instance, key, descriptor);\n\n  return value;\n};\n","import helperExtractMethodsFromPrototype from '../mock-service/helper.extract-methods-from-prototype';\nimport helperExtractPropertiesFromPrototype from '../mock-service/helper.extract-properties-from-prototype';\nimport helperExtractPropertyDescriptor from '../mock-service/helper.extract-property-descriptor';\nimport helperMockService from '../mock-service/helper.mock-service';\nimport { MockedFunction } from '../mock-service/types';\n\nexport default <T = MockedFunction>(instance: any, override: any, style?: 'get' | 'set'): T => {\n  if (typeof override === 'string') {\n    return helperMockService.mock(instance, override, style);\n  }\n\n  // if someone is giving us a function, then we should swap instance and overrides.\n  // so in the end the function can be called, but it also has all desired properties.\n  let correctInstance = instance;\n  let applyOverrides = override;\n  const skipProps = ['__zone_symbol__unconfigurables'];\n  if (typeof override === 'function') {\n    correctInstance = helperMockService.createClone(override);\n    applyOverrides = instance;\n    skipProps.push(...Object.getOwnPropertyNames(correctInstance));\n  }\n\n  const keys = [\n    ...helperExtractMethodsFromPrototype(applyOverrides),\n    ...helperExtractPropertiesFromPrototype(applyOverrides),\n  ];\n  for (const key of keys) {\n    const desc = skipProps.indexOf(key) === -1 ? helperExtractPropertyDescriptor(applyOverrides, key) : undefined;\n    if (desc && Object.prototype.hasOwnProperty.call(desc, 'value') && desc.value === undefined) {\n      continue;\n    }\n    helperMockService.definePropertyDescriptor(correctInstance, key, desc);\n  }\n\n  return correctInstance;\n};\n","import ngMocksUniverse from '../common/ng-mocks-universe';\nimport mockHelperStubMember from '../mock-helper/mock-helper.stub-member';\n\nexport default (def: any): any[] => {\n  const callbacks = [];\n\n  const config = ngMocksUniverse.configInstance.get(def);\n  if (config?.overloads) {\n    for (const [name, stub, encapsulation] of config.overloads) {\n      if (name) {\n        callbacks.push((instance: any) => {\n          mockHelperStubMember(instance, name, stub, encapsulation);\n        });\n      } else {\n        callbacks.push(stub);\n      }\n    }\n  }\n\n  return callbacks;\n};\n","import helperDefinePropertyDescriptor from './helper.define-property-descriptor';\nimport helperExtractMethodsFromPrototype from './helper.extract-methods-from-prototype';\nimport helperExtractPropertiesFromPrototype from './helper.extract-properties-from-prototype';\nimport helperExtractPropertyDescriptor from './helper.extract-property-descriptor';\n\nexport default (service: any, bindFrom?: object, bindTo?: object, mock?: any): any => {\n  const instance = function (...args: any[]) {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    return (mock || service).apply(bindFrom === this ? bindTo : this, args);\n  };\n\n  for (const prop of [\n    ...helperExtractMethodsFromPrototype(service),\n    ...helperExtractPropertiesFromPrototype(service),\n  ]) {\n    const desc = helperExtractPropertyDescriptor(service, prop);\n    helperDefinePropertyDescriptor(instance, prop, desc);\n  }\n\n  return instance;\n};\n","import helperExtractPropertyDescriptor from './helper.extract-property-descriptor';\n\nexport default (instance: any, prop: keyof any, desc?: PropertyDescriptor): boolean => {\n  if (!desc || !instance) {\n    return false;\n  }\n\n  // istanbul ignore else\n  if (Object.defineProperty) {\n    const sourceDesc = helperExtractPropertyDescriptor(instance, prop);\n    if (sourceDesc?.configurable === false) {\n      return false;\n    }\n\n    Object.defineProperty(instance, prop, {\n      ...desc,\n      configurable: true,\n      ...((desc.get === undefined && desc.set === undefined) || desc.writable === false ? { writable: true } : {}),\n    });\n  } else {\n    instance[prop] = desc.value;\n  }\n\n  return true;\n};\n","import funcGetName from '../common/func.get-name';\n\nconst sanitizerMethods = [\n  'sanitize',\n  'bypassSecurityTrustHtml',\n  'bypassSecurityTrustStyle',\n  'bypassSecurityTrustScript',\n  'bypassSecurityTrustUrl',\n  'bypassSecurityTrustResourceUrl',\n];\n\nconst extraMethods: Record<string, undefined | string[]> = {\n  DomSanitizer: sanitizerMethods,\n  Sanitizer: sanitizerMethods,\n};\n\nconst getOwnPropertyNames = (prototype: any): string[] => {\n  const result: string[] = Object.getOwnPropertyNames(prototype);\n  for (const method of extraMethods[funcGetName(prototype)] ?? []) {\n    result.push(method);\n  }\n\n  return result;\n};\n\nexport default <T>(service: T): string[] => {\n  const result: string[] = [];\n\n  let prototype = service;\n  while (prototype && Object.getPrototypeOf(prototype) !== null) {\n    for (const method of getOwnPropertyNames(prototype)) {\n      if ((method as any) === 'constructor') {\n        continue;\n      }\n\n      const descriptor = Object.getOwnPropertyDescriptor(prototype, method);\n      const isGetterSetter = descriptor && (descriptor.get || descriptor.set);\n      if (isGetterSetter || result.indexOf(method) !== -1) {\n        continue;\n      }\n      result.push(method);\n    }\n    prototype = Object.getPrototypeOf(prototype);\n  }\n\n  return result;\n};\n","export default <T>(service: T): string[] => {\n  const result: string[] = [];\n  let prototype = service;\n  while (prototype && Object.getPrototypeOf(prototype) !== null) {\n    for (const prop of Object.getOwnPropertyNames(prototype)) {\n      if ((prop as any) === 'constructor') {\n        continue;\n      }\n\n      const descriptor = Object.getOwnPropertyDescriptor(prototype, prop);\n      const isGetterSetter = descriptor && (descriptor.get || descriptor.set);\n      if (!isGetterSetter || result.indexOf(prop) !== -1) {\n        continue;\n      }\n      result.push(prop);\n    }\n    prototype = Object.getPrototypeOf(prototype);\n  }\n\n  return result;\n};\n","export default <T>(service: T, prop: keyof any): PropertyDescriptor | undefined => {\n  let prototype = service;\n  while (prototype && Object.getPrototypeOf(prototype) !== null) {\n    const descriptor = Object.getOwnPropertyDescriptor(prototype, prop);\n    if (descriptor) {\n      return descriptor;\n    }\n    prototype = Object.getPrototypeOf(prototype);\n  }\n\n  return undefined;\n};\n","import funcGetName from '../common/func.get-name';\n\nimport helperMockService from './helper.mock-service';\nimport { MockedFunction } from './types';\n\n// istanbul ignore next\nconst createName = (name: string, mockName?: string, instance?: any, accessType?: string) =>\n  `${mockName ?? (typeof instance.prototype === 'function' ? instance.prototype.name : funcGetName(instance))}.${name}${\n    accessType ?? ''\n  }`;\n\nconst generateMockDef = (def: any, mock: any, accessType?: string): PropertyDescriptor => ({\n  ...(accessType === 'get' && def && def.set\n    ? {\n        set: def.set,\n      }\n    : {}),\n\n  ...(accessType === 'set' && def && def.get\n    ? {\n        get: def.get,\n      }\n    : {}),\n\n  ...(accessType\n    ? {}\n    : {\n        writable: true,\n      }),\n\n  [accessType || 'value']: mock,\n  configurable: true,\n  enumerable: true,\n});\n\nconst parseArgs = (\n  args: any[],\n): {\n  accessType?: 'get' | 'set';\n  mockName?: string;\n} => {\n  let accessType: 'get' | 'set' | undefined;\n  let mockName: string | undefined;\n\n  if (args.length > 0 && args[0] !== 'get' && args[0] !== 'set') {\n    mockName = args[0];\n  } else if (args.length > 0 && (args[0] === 'get' || args[0] === 'set')) {\n    accessType = args[0];\n    mockName = args[1];\n  }\n\n  return { accessType, mockName };\n};\n\nexport default <T = MockedFunction>(instance: any, name: string, ...args: Array<string | undefined>): T => {\n  const { accessType, mockName } = parseArgs(args);\n\n  const def = Object.getOwnPropertyDescriptor(instance, name);\n  if (def && def[accessType || 'value']) {\n    return def[accessType || 'value'];\n  }\n\n  const detectedMockName = createName(name, mockName, instance, accessType);\n  const mock: any = helperMockService.mockFunction(detectedMockName, !!accessType);\n\n  const mockDef = generateMockDef(def, mock, accessType);\n  if (mockDef.get && mockDef.set && (mockDef.get as any).__ngMocks && (mockDef.set as any).__ngMocks) {\n    (mockDef.set as any).__ngMocksSet((val: any) => (mockDef.get as any).__ngMocksGet(val));\n  }\n\n  Object.defineProperty(instance, name, mockDef);\n\n  return mock;\n};\n","import coreDefineProperty from '../common/core.define-property';\n\nimport { CustomMockFunction, MockedFunction } from './types';\n\nconst mockFunction: {\n  (mockName: string, original?: boolean): MockedFunction;\n  customMockFunction?: CustomMockFunction;\n} = (mockName: string, original = false): MockedFunction => {\n  // eslint-disable-next-line unicorn/prefer-logical-operator-over-ternary\n  const func =\n    mockFunction.customMockFunction && !original\n      ? mockFunction.customMockFunction(mockName)\n      : (val: any) => {\n          if (setValue) {\n            setValue(val);\n          }\n\n          return value;\n        };\n\n  // magic to make getters / setters working\n\n  let value: any;\n  let setValue: any;\n\n  coreDefineProperty(func, '__ngMocks', true);\n  coreDefineProperty(func, '__ngMocksSet', (newSetValue: any) => (setValue = newSetValue));\n  coreDefineProperty(func, '__ngMocksGet', (newValue: any) => (value = newValue));\n\n  return func;\n};\n\nexport default (() => mockFunction)();\n","import { NG_MOCKS_GUARDS, NG_MOCKS_RESOLVERS } from '../common/core.tokens';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nconst handleSection = (section: any[]) => {\n  const guards: any[] = [];\n\n  for (const guard of section) {\n    if (!ngMocksUniverse.isProvidedDef(guard) && ngMocksUniverse.isExcludedDef(NG_MOCKS_GUARDS)) {\n      continue;\n    }\n\n    guards.push(guard);\n    if (!isNgDef(guard)) {\n      ngMocksUniverse.touches.add(guard);\n    }\n  }\n\n  return guards;\n};\n\nconst handleArray = (cache: Map<any, any>, value: any[], callback: any): [boolean, any[]] => {\n  const mock: Array<any> = [];\n  let updated = false;\n  cache.set(value, mock);\n\n  for (const valueItem of value) {\n    if (ngMocksUniverse.isExcludedDef(valueItem)) {\n      updated = updated || true;\n      continue;\n    }\n    mock.push(callback(valueItem, cache));\n    updated = updated || mock[mock.length - 1] !== valueItem;\n  }\n\n  return [updated, mock];\n};\n\nconst handleItemKeys = ['canActivate', 'canActivateChild', 'canDeactivate', 'canMatch', 'canLoad'];\nconst handleItemGetGuards = (mock: any, section: string) =>\n  Array.isArray(mock[section]) ? handleSection(mock[section]) : mock[section];\n\nconst handleItem = (\n  cache: Map<any, any>,\n  value: Record<keyof any, any>,\n  callback: any,\n): [boolean, Record<keyof any, any>] => {\n  let mock: Record<keyof any, any> = {};\n  let updated = false;\n  cache.set(value, mock);\n\n  for (const key of Object.keys(value)) {\n    if (ngMocksUniverse.isExcludedDef(value[key])) {\n      updated = updated || true;\n      continue;\n    }\n    mock[key] = callback(value[key], cache);\n    updated = updated || mock[key] !== value[key];\n  }\n\n  // Removal of guards.\n  for (const section of handleItemKeys) {\n    const guards: any[] = handleItemGetGuards(mock, section);\n    if (guards && mock[section].length !== guards.length) {\n      updated = updated || true;\n      mock = { ...mock, [section]: guards };\n    }\n  }\n\n  // Removal of resolvers.\n  if (typeof mock.resolve === 'object' && mock.resolve) {\n    const resolve: any = {};\n    let resolveUpdated = false;\n    for (const key of Object.keys(mock.resolve)) {\n      const resolver = mock.resolve[key];\n      if (!ngMocksUniverse.isProvidedDef(resolver) && ngMocksUniverse.isExcludedDef(NG_MOCKS_RESOLVERS)) {\n        resolveUpdated = resolveUpdated || true;\n        continue;\n      }\n      resolve[key] = resolver;\n      if (!isNgDef(resolver)) {\n        ngMocksUniverse.touches.add(resolver);\n      }\n    }\n    if (resolveUpdated) {\n      updated = updated || true;\n      mock = { ...mock, resolve };\n    }\n  }\n\n  return [updated, mock];\n};\n\nconst replaceWithMocks = (value: any, cache: Map<any, any>): any => {\n  if (ngMocksUniverse.cacheDeclarations.has(value)) {\n    return ngMocksUniverse.cacheDeclarations.get(value);\n  }\n  if (typeof value !== 'object') {\n    return value;\n  }\n  if (cache.has(value)) {\n    return value;\n  }\n\n  let mock: any;\n  let updated = false;\n\n  if (Array.isArray(value)) {\n    [updated, mock] = handleArray(cache, value, replaceWithMocks);\n  } else if (value) {\n    [updated, mock] = handleItem(cache, value, replaceWithMocks);\n  }\n\n  if (updated) {\n    Object.setPrototypeOf(mock, Object.getPrototypeOf(value));\n\n    return mock;\n  }\n\n  return value;\n};\n\nconst replaceWithMocksWrapper = (value: any) => {\n  const cache = new Map();\n  const result = replaceWithMocks(value, cache);\n  cache.clear();\n\n  return result;\n};\n\nexport default (() => replaceWithMocksWrapper)();\n","import funcGetGlobal from '../common/func.get-global';\n\nimport helperCreateClone from './helper.create-clone';\nimport helperCreateMockFromPrototype from './helper.create-mock-from-prototype';\nimport helperDefinePropertyDescriptor from './helper.define-property-descriptor';\nimport helperExtractMethodsFromPrototype from './helper.extract-methods-from-prototype';\nimport helperExtractPropertiesFromPrototype from './helper.extract-properties-from-prototype';\nimport helperExtractPropertyDescriptor from './helper.extract-property-descriptor';\nimport helperMock from './helper.mock';\nimport helperMockFunction from './helper.mock-function';\nimport helperReplaceWithMocks from './helper.replace-with-mocks';\nimport helperResolveProvider from './helper.resolve-provider';\nimport helperUseFactory from './helper.use-factory';\nimport { CustomMockFunction } from './types';\n\n// We need a single pointer to the object among all environments.\nfuncGetGlobal().ngMockshelperMockService = funcGetGlobal().ngMockshelperMockService || {\n  mockFunction: helperMockFunction,\n\n  registerMockFunction: (func: CustomMockFunction | undefined) => {\n    funcGetGlobal().ngMockshelperMockService.mockFunction.customMockFunction = func;\n  },\n\n  createClone: helperCreateClone,\n  createMockFromPrototype: helperCreateMockFromPrototype,\n  definePropertyDescriptor: helperDefinePropertyDescriptor,\n  extractMethodsFromPrototype: helperExtractMethodsFromPrototype,\n  extractPropertiesFromPrototype: helperExtractPropertiesFromPrototype,\n  extractPropertyDescriptor: helperExtractPropertyDescriptor,\n  mock: helperMock,\n  replaceWithMocks: helperReplaceWithMocks,\n  resolveProvider: helperResolveProvider,\n  useFactory: helperUseFactory,\n};\n\nexport default ((): {\n  createClone: typeof helperCreateClone;\n  createMockFromPrototype: typeof helperCreateMockFromPrototype;\n  definePropertyDescriptor: typeof helperDefinePropertyDescriptor;\n  extractMethodsFromPrototype: typeof helperExtractMethodsFromPrototype;\n  extractPropertiesFromPrototype: typeof helperExtractPropertiesFromPrototype;\n  extractPropertyDescriptor: typeof helperExtractPropertyDescriptor;\n  mock: typeof helperMock;\n  mockFunction: typeof helperMockFunction;\n  registerMockFunction: (func: CustomMockFunction | undefined) => void;\n  replaceWithMocks: typeof helperReplaceWithMocks;\n  resolveProvider: typeof helperResolveProvider;\n  useFactory: typeof helperUseFactory;\n} => funcGetGlobal().ngMockshelperMockService)();\n\nexport function registerMockFunction(func?: CustomMockFunction | undefined): void {\n  funcGetGlobal().ngMockshelperMockService.registerMockFunction(func);\n}\n","import coreDefineProperty from '../common/core.define-property';\nimport funcGetName from '../common/func.get-name';\n\nimport helperMockService from './helper.mock-service';\nimport { MockedFunction } from './types';\n\nexport default (service: any): { [key in keyof any]: MockedFunction } => {\n  const mockName = funcGetName(service);\n  const value: any = {};\n  coreDefineProperty(value, '__ngMocks', true);\n\n  const methods = helperMockService.extractMethodsFromPrototype(service);\n  for (const method of methods) {\n    helperMockService.mock(value, method, mockName);\n  }\n\n  const properties = helperMockService.extractPropertiesFromPrototype(service);\n  for (const property of properties) {\n    helperMockService.mock(value, property, 'get', mockName);\n    helperMockService.mock(value, property, 'set', mockName);\n  }\n  Object.setPrototypeOf(value, service);\n\n  return value;\n};\n","import CoreDefStack from '../common/core.def-stack';\nimport { extractDependency } from '../common/core.helpers';\nimport { NG_MOCKS_INTERCEPTORS } from '../common/core.tokens';\nimport funcExtractForwardRef from '../common/func.extract-forward-ref';\nimport funcGetType from '../common/func.get-type';\nimport { isNgInjectionToken } from '../common/func.is-ng-injection-token';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport helperMockService from './helper.mock-service';\nimport mockProvider from './mock-provider';\n\nconst anyDiffers = (a: any, b: any, ...keys: string[]): boolean => {\n  for (const key of keys) {\n    if (a[key] !== b[key]) {\n      return true;\n    }\n  }\n\n  return false;\n};\n\nconst createFromResolution = (provide: any, resolution: any) => {\n  let mockDef = resolution;\n\n  const existingMock = ngMocksUniverse.builtProviders.get(provide);\n  if (existingMock) {\n    mockDef = existingMock;\n  }\n\n  // A case when a provider is actually a component, directive, pipe.\n  if (typeof mockDef === 'function') {\n    mockDef = {\n      provide,\n      useClass: mockDef,\n    };\n  }\n\n  return mockDef;\n};\n\nconst isSuitableProvider = (provider: any, provide: any): boolean =>\n  ngMocksUniverse.builtProviders.has(NG_MOCKS_INTERCEPTORS) &&\n  ngMocksUniverse.builtProviders.get(NG_MOCKS_INTERCEPTORS) === null &&\n  isNgInjectionToken(provide) &&\n  provide.toString() === 'InjectionToken HTTP_INTERCEPTORS' &&\n  provide !== provider;\n\nconst excludeInterceptors = (provider: any, provide: any): boolean => {\n  if (isSuitableProvider(provider, provide)) {\n    if (provider.useFactory || provider.useValue) {\n      return true;\n    }\n    const interceptor = funcExtractForwardRef(provider.useExisting) || provider.useClass;\n    if (!ngMocksUniverse.builtProviders.has(interceptor) || ngMocksUniverse.builtProviders.get(interceptor) === null) {\n      return true;\n    }\n  }\n\n  return false;\n};\n\nconst parseProvider = (\n  provider: any,\n  callback: any,\n): {\n  change: () => void;\n  multi: boolean;\n  provide: any;\n} => {\n  const provide = funcGetType(provider);\n  const multi = provider !== provide && !!provider.multi;\n\n  return {\n    change: () => {\n      if (callback) {\n        callback();\n      }\n    },\n    multi,\n    provide,\n  };\n};\n\n// if the provider is a value, we need to go through the value and to replace all mock instances.\nconst replaceWithMocks = (provider: any, provide: any, mockDef: any) => {\n  if (provide !== provider && mockDef && mockDef.useValue) {\n    const useValue = helperMockService.replaceWithMocks(mockDef.useValue);\n\n    return useValue === mockDef.useValue\n      ? mockDef\n      : {\n          ...mockDef,\n          useValue,\n        };\n  }\n\n  return mockDef;\n};\n\nconst createPredefinedMockProvider = (provider: any, provide: any): any => {\n  // Then we check decisions whether we should keep or replace a provider.\n  if (ngMocksUniverse.builtProviders.has(provide)) {\n    const mockDef = ngMocksUniverse.builtProviders.get(provide);\n    if (mockDef === provide) {\n      return provider;\n    }\n\n    return mockDef;\n  }\n\n  return undefined;\n};\n\nconst createMockProvider = (provider: any, provide: any, change: () => void) => {\n  let mockDef = createPredefinedMockProvider(provider, provide);\n\n  if (!mockDef && ngMocksUniverse.flags.has('skipMock') && ngMocksUniverse.getResolution(provide) !== 'mock') {\n    ngMocksUniverse.config.get('ngMocksDepsSkip')?.add(provide);\n    mockDef = provider;\n  }\n  if (!mockDef) {\n    mockDef = mockProvider(provider);\n  }\n\n  mockDef = replaceWithMocks(provider, provide, mockDef);\n  if (!areEqualDefs(mockDef, provider, provide)) {\n    change();\n  }\n  // Touching only when we really provide a value.\n  if (mockDef) {\n    ngMocksUniverse.touches.add(provide);\n  }\n\n  return mockDef;\n};\n\nconst areEqualDefs = (mockDef: any, provider: any, provide: any): boolean => {\n  let providerDiffers = false;\n  let defDiffers = !mockDef;\n  if (provider && mockDef && !defDiffers) {\n    defDiffers = anyDiffers(provider, mockDef, 'provide', 'useValue', 'useClass', 'useExisting', 'useFactory', 'deps');\n  }\n  if (provider === provide && mockDef !== provider) {\n    providerDiffers = true;\n  } else if (provider !== provide && defDiffers) {\n    providerDiffers = true;\n  }\n\n  return !providerDiffers;\n};\n\nconst isPreconfiguredDependency = (provider: any, provide: any): boolean => {\n  //  we should not touch excluded providers.\n  if (ngMocksUniverse.builtProviders.get(provide) === null) {\n    return true;\n  }\n\n  if (provide !== provider && provider.deps) {\n    extractDependency(provider.deps, ngMocksUniverse.config.get('ngMocksDeps'));\n  }\n\n  return excludeInterceptors(provider, provide);\n};\n\nconst isPreconfiguredUseExisting = (provider: any, provide: any): boolean => {\n  //  we should not touch non-useExisting providers.\n  if (!provider || typeof provider !== 'object' || !provider.useExisting) {\n    return false;\n  }\n  if (provider.useExisting.mockOf) {\n    return true;\n  }\n\n  // skipping explicit declarations (not internally processed)\n  if (ngMocksUniverse.getResolution(provide) && !ngMocksUniverse.config.get(provide)?.__internal) {\n    return false;\n  }\n\n  return ngMocksUniverse.getResolution(funcExtractForwardRef(provider.useExisting)) === 'keep';\n};\n\n// tries to resolve a provider based on current universe state.\nexport default (provider: any, resolutions: CoreDefStack<any, any>, changed?: () => void) => {\n  const { provide, multi, change } = parseProvider(provider, changed);\n  if (isPreconfiguredDependency(provider, provide)) {\n    return change();\n  }\n  if (isPreconfiguredUseExisting(provider, provide)) {\n    ngMocksUniverse.touches.add(provide);\n\n    return provider;\n  }\n  if (resolutions.has(provide)) {\n    return createFromResolution(provide, resolutions.get(provide));\n  }\n\n  const mockDef = createMockProvider(provider, provide, change);\n\n  return multi && typeof mockDef === 'object' ? { ...mockDef, multi } : mockDef;\n};\n","import { FactoryProvider, Injector } from '@angular/core';\n\nimport { mapValues } from '../common/core.helpers';\nimport { isNgInjectionToken } from '../common/func.is-ng-injection-token';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport mockHelperStub from '../mock-helper/mock-helper.stub';\nimport mockInstanceApply from '../mock-instance/mock-instance-apply';\n\nimport { MockService } from './mock-service';\n\nconst applyCallbackToken = (def: any): boolean => isNgInjectionToken(def) || typeof def === 'string';\n\nconst applyCallback = (def: any, inst: any, callbacks: any[], injector?: Injector, overrides?: any): void => {\n  let instance: any = inst;\n\n  for (const callback of callbacks) {\n    const override = callback(instance, injector);\n    if (applyCallbackToken(def)) {\n      instance = override;\n      continue;\n    }\n\n    // overrides return real value.\n    if (callback === overrides) {\n      instance = override;\n      continue;\n    }\n\n    if (!override) {\n      continue;\n    }\n\n    instance = mockHelperStub(instance, override);\n  }\n\n  return instance;\n};\n\nexport default <D, I>(\n  def: D,\n  init?: () => I,\n  overrides?: (instance: I, injector: Injector) => I | Partial<I>,\n): FactoryProvider => ({\n  deps: [Injector],\n  provide: def,\n  useFactory: (injector?: Injector) => {\n    const instance = init ? init() : MockService(def as any);\n\n    const configGlobal: Set<any> | undefined = ngMocksUniverse.getOverrides().get(def);\n    const callbacks = configGlobal ? mapValues(configGlobal) : [];\n    if (overrides) {\n      callbacks.push(overrides);\n    }\n    callbacks.push(...mockInstanceApply(def));\n\n    return applyCallback(def, instance, callbacks, injector, overrides);\n  },\n});\n","import { Provider } from '@angular/core';\n\nimport coreConfig from '../common/core.config';\nimport { Type } from '../common/core.types';\nimport funcGetType from '../common/func.get-type';\nimport { isNgInjectionToken } from '../common/func.is-ng-injection-token';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport helperDefinePropertyDescriptor from './helper.define-property-descriptor';\nimport helperExtractPropertyDescriptor from './helper.extract-property-descriptor';\nimport helperUseFactory from './helper.use-factory';\nimport { MockService } from './mock-service';\n\nconst { neverMockProvidedFunction, neverMockToken } = coreConfig;\n\nconst applyMissingClassProperties = (instance: any, useClass: Type<any>) => {\n  const existing = Object.getOwnPropertyNames(instance);\n  const child = MockService(useClass);\n\n  for (const name of Object.getOwnPropertyNames(child)) {\n    if (existing.indexOf(name) !== -1) {\n      continue;\n    }\n    const def = helperExtractPropertyDescriptor(child, name);\n    helperDefinePropertyDescriptor(instance, name, def);\n  }\n};\n\nconst createFactoryProvider = (provider: any, provide: any) =>\n  helperUseFactory(provide, () => {\n    const instance = MockService(provide);\n    // Magic below adds missed properties to the instance to\n    // fulfill missed abstract methods.\n    if (provide !== provider && Object.keys(provider).indexOf('useClass') !== -1) {\n      applyMissingClassProperties(instance, provider.useClass);\n    }\n\n    return instance;\n  });\n\nconst normalizePrimitivesMap: Array<[(value: any) => boolean, any]> = [\n  [value => typeof value === 'boolean', false],\n  [value => typeof value === 'number', 0],\n  [value => typeof value === 'string', ''],\n  [value => value === null, null],\n];\n\nconst normalizePrimitives = (value: any): any => {\n  for (const [check, result] of normalizePrimitivesMap) {\n    if (check(value)) {\n      return result;\n    }\n  }\n\n  return undefined;\n};\n\nconst createValueProvider = (provider: any, provide: any) =>\n  helperUseFactory(provide, () =>\n    provider.useValue && typeof provider.useValue === 'object'\n      ? MockService(provider.useValue)\n      : normalizePrimitives(provider.useValue),\n  );\n\nconst createClassProvider = (provider: any, provide: any) =>\n  ngMocksUniverse.builtProviders.has(provider.useClass) &&\n  ngMocksUniverse.builtProviders.get(provider.useClass) === provider.useClass\n    ? provider\n    : helperUseFactory(provide, () => MockService(provider.useClass));\n\nconst createMockProvider = (provider: any, provide: any, cacheProviders?: Map<any, any>): Provider | undefined => {\n  let mockProvider: Provider | undefined;\n  if (typeof provide === 'function') {\n    mockProvider = createFactoryProvider(provider, provide);\n  }\n  if (provide === provider && mockProvider && cacheProviders) {\n    cacheProviders.set(provide, mockProvider);\n  }\n\n  return mockProvider;\n};\n\n// Tokens are special subject, we can skip adding them because in a mock module they are useless.\n// The main problem is that providing undefined to HTTP_INTERCEPTORS and others breaks their code.\n// If a testing module / component requires omitted tokens then they should be provided manually\n// during creation of TestBed module.\nconst handleProvider = (provider: any, provide: any, useFactory: boolean) => {\n  if (provide === provider) {\n    return useFactory ? helperUseFactory(provider, () => undefined) : undefined;\n  }\n  if (provider.multi) {\n    ngMocksUniverse.config.get('ngMocksMulti')?.add(provide);\n\n    return undefined;\n  }\n\n  let mockProvider: any;\n  // istanbul ignore else\n  if (Object.keys(provider).indexOf('useValue') !== -1) {\n    mockProvider = createValueProvider(provider, provide);\n  } else if (Object.keys(provider).indexOf('useExisting') !== -1) {\n    mockProvider = provider;\n  } else if (Object.keys(provider).indexOf('useClass') !== -1) {\n    mockProvider = createClassProvider(provider, provide);\n  } else if (Object.keys(provider).indexOf('useFactory') !== -1) {\n    mockProvider = helperUseFactory(provide, () => ({}));\n  }\n\n  return mockProvider;\n};\n\nconst isNeverMockFunction = (provide: any): boolean =>\n  typeof provide === 'function' && neverMockProvidedFunction.indexOf(provide.name) !== -1;\n\nconst isNeverMockToken = (provide: any): boolean =>\n  isNgInjectionToken(provide) && neverMockToken.indexOf(provide.toString()) !== -1;\n\nexport default (provider: any, useFactory = false): Provider | undefined => {\n  const provide = funcGetType(provider);\n\n  if (ngMocksUniverse.getResolution(provide) === 'mock') {\n    // nothing to do\n  } else if (isNeverMockFunction(provide)) {\n    return provider;\n  } else if (isNeverMockToken(provide)) {\n    return undefined;\n  }\n\n  // Only pure provides should be cached to avoid their influence on\n  // another different declarations.\n  const cacheProviders = ngMocksUniverse.flags.has('cacheProvider')\n    ? ngMocksUniverse.cacheProviders\n    : /* istanbul ignore next */ undefined;\n  if (provide === provider && cacheProviders && cacheProviders.has(provide)) {\n    return cacheProviders.get(provide);\n  }\n\n  return createMockProvider(provider, provide, cacheProviders) || handleProvider(provider, provide, useFactory);\n};\n","const isAngularClass = (value: Record<keyof any, unknown>): boolean => {\n  if (value.ɵprov) {\n    return true;\n  }\n  if (value.__annotations__) {\n    return true;\n  }\n  if (value.__parameters__) {\n    return true;\n  }\n  if (value.parameters) {\n    return true;\n  }\n\n  return false;\n};\n\nconst guessClass = (name: string, proto: string, value: any): boolean => {\n  // unnamed classes can be class_N\n  if (name.match(/^class/) !== null) {\n    return true;\n  }\n\n  // let's consider an existing 'prototype' as a class\n  if (Object.keys(value.prototype).length > 0) {\n    return true;\n  }\n\n  // let's consider a capital name and 'this' usage as a class\n  const clsCode = name.codePointAt(0);\n  if (clsCode && clsCode >= 65 && clsCode <= 90 && proto.match(/\\bthis\\./gm) !== null) {\n    return true;\n  }\n\n  // webpack es5 class\n  const regEx = new RegExp(`\\\\(this,\\\\s*${name}\\\\)`, 'mg');\n  // istanbul ignore if\n  if (proto.match(regEx) !== null) {\n    return true;\n  }\n\n  return false;\n};\n\nexport default (value: any): boolean => {\n  if (typeof value !== 'function') {\n    return false;\n  }\n  if (!value.prototype) {\n    return true;\n  }\n  if (isAngularClass(value)) {\n    return false;\n  }\n\n  const proto = value.toString();\n\n  // es2015 class\n  // istanbul ignore if\n  if (proto.match(/^class\\b/) !== null) {\n    return false;\n  }\n\n  const cls = proto.match(/^function\\s+([^\\s(]+)\\(/);\n  if (cls === null) {\n    return true;\n  }\n  if (guessClass(cls[1], proto, value)) {\n    return false;\n  }\n\n  return true;\n};\n","import { AnyType } from '../common/core.types';\nimport funcGetName from '../common/func.get-name';\nimport mockHelperStub from '../mock-helper/mock-helper.stub';\n\nimport checkIsClass from './check.is-class';\nimport checkIsFunc from './check.is-func';\nimport checkIsInst from './check.is-inst';\nimport helperMockService from './helper.mock-service';\n\ntype MockServiceHandler = (cache: Map<any, any>, service: any, prefix?: string, overrides?: any) => any;\n\nconst mockVariableMap: Array<[(def: any) => boolean, MockServiceHandler]> = [\n  [\n    checkIsClass,\n    (cache, service) => {\n      const value = helperMockService.createMockFromPrototype(service.prototype);\n      cache.set(service, value);\n\n      return value;\n    },\n  ],\n  [\n    checkIsFunc,\n    (cache, service, prefix) => {\n      const value = helperMockService.mockFunction(`func:${prefix || funcGetName(service)}`);\n      cache.set(service, value());\n\n      return value;\n    },\n  ],\n  [def => Array.isArray(def), () => []],\n  [\n    checkIsInst,\n    (cache, service, prefix, callback) => {\n      const value = helperMockService.createMockFromPrototype(service.constructor.prototype);\n      cache.set(service, value);\n      for (const property of Object.keys(service)) {\n        const mock: any = callback(cache, service[property], `${prefix || 'instance'}.${property}`);\n        if (mock !== undefined) {\n          value[property] = mock;\n        }\n      }\n      Object.setPrototypeOf(value, Object.getPrototypeOf(service));\n\n      return value;\n    },\n  ],\n];\n\nconst mockVariable = (cache: Map<any, any>, service: any, prefix: string, callback: MockServiceHandler) => {\n  for (const [check, createMock] of mockVariableMap) {\n    if (!check(service)) {\n      continue;\n    }\n\n    return cache.get(service) ?? createMock(cache, service, prefix, callback);\n  }\n};\n\n/**\n * Mocking all methods / properties of a class / object.\n */\nconst mockService: MockServiceHandler = (cache, service, prefix = '', overrides): any => {\n  const value: any = mockVariable(cache, service, prefix, mockService);\n\n  if (overrides) {\n    mockHelperStub(value, overrides);\n  }\n\n  return value;\n};\n\n/**\n * MockService creates a mock instance out of an object or a class.\n * Primitives are converted to undefined.\n *\n * @see https://ng-mocks.sudo.eu/api/MockService\n */\nexport function MockService(service: boolean | number | string | null | undefined): undefined;\n\n/**\n * MockService creates a mock instance out of an object or a class.\n *\n * @see https://ng-mocks.sudo.eu/api/MockService\n *\n * ```ts\n * const service = MockService(AuthService);\n * service.login(); // does nothing, it's dummy.\n */\nexport function MockService<T>(service: AnyType<T>, spyNamePrefix?: string): T;\n\n/**\n * MockService creates a mock instance out of an object or a class.\n *\n * @see https://ng-mocks.sudo.eu/api/MockService\n *\n * ```ts\n * const mockUser = MockService(currentUser);\n * mockUser.save(); // does nothing, it's dummy.\n */\nexport function MockService<T = any>(service: object, spyNamePrefix?: string): T;\n\n/**\n * MockService creates a mock instance out of an object or a class.\n * The second parameter can be used as overrides.\n *\n * @see https://ng-mocks.sudo.eu/api/MockService\n *\n * ```ts\n * const service = MockService(AuthService, {\n *   loggedIn: true,\n * });\n * service.login(); // does nothing, it's dummy.\n * ```\n */\nexport function MockService<T>(service: AnyType<T>, overrides?: Partial<T>, spyNamePrefix?: string): T;\n\nexport function MockService(service: any, ...args: any[]): any {\n  const prefix = args.length > 0 && typeof args[0] === 'string' ? args[0] : args[1];\n  const overrides = args.length > 0 && args[0] && typeof args[0] === 'object' ? args[0] : undefined;\n\n  const cache = new Map();\n  const result = mockService(cache, service, prefix, overrides);\n  cache.clear();\n\n  return result;\n}\n","import checkIsFunc from './check.is-func';\n\nexport default (value: any): boolean => {\n  if (typeof value !== 'function') {\n    return false;\n  }\n\n  return !checkIsFunc(value);\n};\n","export default (value: any): boolean => {\n  if (value === null) {\n    return false;\n  }\n  if (typeof value !== 'object') {\n    return false;\n  }\n  if (value.ngMetadataName === 'InjectionToken') {\n    return false;\n  }\n\n  return typeof Object.getPrototypeOf(value) === 'object';\n};\n","import * as angularCore from '@angular/core';\n\nimport funcGetGlobal from './func.get-global';\n\n/**\n * Helper function to safely access Angular's reflectComponentType API.\n * This API is available in Angular 14+ and is used for runtime reflection\n * of component metadata, particularly for signal inputs/outputs.\n */\nexport default (def: any): any => {\n  const global = funcGetGlobal();\n\n  // Use test override if present, otherwise use real API\n  const reflectApi = 'reflect' + 'ComponentType'; // Avoid build tool processing\n  const reflectComponentType = global.__ngMocksReflectComponentType ?? (angularCore as any)[reflectApi];\n\n  if (!reflectComponentType) {\n    return undefined;\n  }\n\n  return reflectComponentType(def);\n};\n","/* eslint-disable max-lines */\n\nimport { ɵReflectionCapabilities as ReflectionCapabilities } from '@angular/core';\n\nimport coreDefineProperty from '../common/core.define-property';\nimport { AnyDeclaration, DirectiveIo } from '../common/core.types';\nimport funcDirectiveIoBuild from '../common/func.directive-io-build';\nimport funcDirectiveIoParse from '../common/func.directive-io-parse';\nimport funcReflectComponentType from '../common/func.reflect-component-type';\n\ninterface Declaration {\n  host: Record<string, string | undefined>;\n  hostBindings: Array<[string, string?, ...any[]]>;\n  hostListeners: Array<[string, string?, ...any[]]>;\n  attributes: string[];\n  inputs: Array<DirectiveIo>;\n  outputs: Array<DirectiveIo>;\n  propDecorators: Record<string, any[]>;\n  queries: Record<string, any>;\n  decorators: Array<'Injectable' | 'Pipe' | 'Directive' | 'Component' | 'NgModule'>;\n  standalone?: boolean;\n  [key: string]: any;\n}\n\nconst pushDecorator = (decorators: string[], decorator: string): void => {\n  const deleteIndex = decorators.indexOf(decorator);\n  if (deleteIndex !== -1) {\n    decorators.splice(deleteIndex, 1);\n  }\n  if (\n    decorator === 'Injectable' ||\n    decorator === 'Pipe' ||\n    decorator === 'Directive' ||\n    decorator === 'Component' ||\n    decorator === 'NgModule'\n  ) {\n    decorators.push(decorator);\n  }\n};\n\nconst getAllKeys = <T extends Record<keyof any, any>>(instance: T): Array<keyof T> => {\n  const props: string[] = [];\n  for (const key of Object.keys(instance)) {\n    props.push(key);\n  }\n\n  return props as never;\n};\n\nconst createDeclarations = (parent: Partial<Declaration>): Declaration => ({\n  host: parent.host ? { ...parent.host } : {},\n  hostBindings: parent.hostBindings ? [...parent.hostBindings] : [],\n  hostListeners: parent.hostListeners ? [...parent.hostListeners] : [],\n  attributes: parent.attributes ? [...parent.attributes] : [],\n  inputs: parent.inputs ? [...parent.inputs] : [],\n  outputs: parent.outputs ? [...parent.outputs] : [],\n  propDecorators: parent.propDecorators ? { ...parent.propDecorators } : {},\n  queries: parent.queries ? { ...parent.queries } : {},\n  decorators: parent.decorators ? [...parent.decorators] : [],\n});\n\nconst parseParameters = (\n  def: {\n    __parameters__?: Array<null | Array<\n      | {\n          attributeName: string;\n          ngMetadataName: 'Attribute';\n        }\n      | {\n          token: AnyDeclaration<any>;\n          ngMetadataName: 'Inject';\n        }\n      | {\n          ngMetadataName: 'Optional';\n        }\n    >>;\n  },\n  declaration: Declaration,\n): void => {\n  if (Object.prototype.hasOwnProperty.call(def, '__parameters__') && def.__parameters__) {\n    for (const decorators of def.__parameters__) {\n      for (const decorator of decorators || []) {\n        if (\n          decorator.ngMetadataName === 'Attribute' &&\n          declaration.attributes.indexOf(decorator.attributeName) === -1\n        ) {\n          declaration.attributes.push(decorator.attributeName);\n        }\n      }\n    }\n  }\n};\n\nconst parseAnnotations = (\n  def: {\n    __annotations__?: Array<{\n      ngMetadataName?: string;\n    }>;\n  },\n  declaration: Declaration,\n): void => {\n  if (Object.prototype.hasOwnProperty.call(def, '__annotations__') && def.__annotations__) {\n    for (const annotation of def.__annotations__) {\n      const ngMetadataName = annotation?.ngMetadataName;\n      if (!ngMetadataName) {\n        continue;\n      }\n      declaration[ngMetadataName] = { ...annotation, attributes: declaration.attributes };\n      pushDecorator(declaration.decorators, ngMetadataName);\n    }\n  }\n};\n\nconst parseDecorators = (\n  def: {\n    decorators?: Array<{\n      args?: [any];\n      type?: {\n        prototype?: {\n          ngMetadataName?: string;\n        };\n      };\n    }>;\n  },\n  declaration: Declaration,\n): void => {\n  if (Object.prototype.hasOwnProperty.call(def, 'decorators') && def.decorators) {\n    for (const decorator of def.decorators) {\n      const ngMetadataName = decorator?.type?.prototype?.ngMetadataName;\n      if (!ngMetadataName) {\n        continue;\n      }\n      declaration[ngMetadataName] = decorator.args ? { ...decorator.args[0] } : {};\n      pushDecorator(declaration.decorators, ngMetadataName);\n    }\n  }\n};\n\nconst addUniqueDirectiveIo = (\n  declaration: Declaration,\n  key: 'inputs' | 'outputs',\n  name: string,\n  alias: string | undefined,\n  required: boolean | undefined,\n): void => {\n  const normalizedDef = funcDirectiveIoBuild({ name, alias, required });\n\n  for (const def of declaration[key]) {\n    if (def === normalizedDef) {\n      return;\n    }\n\n    const { name: defName, alias: defAlias } = funcDirectiveIoParse(def);\n    if (defName === name && defAlias === alias) {\n      return;\n    }\n  }\n\n  declaration[key].unshift(normalizedDef);\n};\n\nconst parsePropMetadataParserFactoryProp =\n  (key: 'inputs' | 'outputs') =>\n  (\n    _: string,\n    name: string,\n    decorator: {\n      alias?: string;\n      required?: boolean;\n      bindingPropertyName?: string;\n    },\n    declaration: Declaration,\n  ): void => {\n    const { alias, required } = funcDirectiveIoParse({\n      name,\n      alias: decorator.alias ?? decorator.bindingPropertyName,\n      required: decorator.required,\n    });\n\n    addUniqueDirectiveIo(declaration, key, name, alias, required);\n  };\nconst parsePropMetadataParserInput = parsePropMetadataParserFactoryProp('inputs');\nconst parsePropMetadataParserOutput = parsePropMetadataParserFactoryProp('outputs');\n\nconst parsePropMetadataParserFactoryQueryChild =\n  (isViewQuery: boolean) =>\n  (\n    ngMetadataName: string,\n    prop: string,\n    decorator: {\n      read?: any;\n      selector: string;\n      static?: boolean;\n    },\n    declaration: Declaration,\n  ): void => {\n    if (!declaration.queries[prop]) {\n      declaration.queries[prop] = {\n        isViewQuery,\n        ngMetadataName,\n        selector: decorator.selector,\n        ...(decorator.read === undefined ? {} : { read: decorator.read }),\n        ...(decorator.static === undefined ? {} : { static: decorator.static }),\n      };\n    }\n  };\nconst parsePropMetadataParserContentChild = parsePropMetadataParserFactoryQueryChild(false);\nconst parsePropMetadataParserViewChild = parsePropMetadataParserFactoryQueryChild(true);\n\nconst parsePropMetadataParserFactoryQueryChildren =\n  (isViewQuery: boolean) =>\n  (\n    ngMetadataName: string,\n    prop: string,\n    decorator: {\n      descendants?: any;\n      emitDistinctChangesOnly?: boolean;\n      read?: any;\n      selector: string;\n    },\n    declaration: Declaration,\n  ): void => {\n    if (!declaration.queries[prop]) {\n      declaration.queries[prop] = {\n        isViewQuery,\n        ngMetadataName,\n        selector: decorator.selector,\n        ...(decorator.descendants === undefined ? {} : { descendants: decorator.descendants }),\n        ...(decorator.emitDistinctChangesOnly === undefined\n          ? {}\n          : { emitDistinctChangesOnly: decorator.emitDistinctChangesOnly }),\n        ...(decorator.read === undefined ? {} : { read: decorator.read }),\n      };\n    }\n  };\nconst parsePropMetadataParserContentChildren = parsePropMetadataParserFactoryQueryChildren(false);\nconst parsePropMetadataParserViewChildren = parsePropMetadataParserFactoryQueryChildren(true);\n\nconst parsePropMetadataParserHostBinding = (\n  _: string,\n  prop: string,\n  decorator: {\n    args?: any;\n    hostPropertyName?: string;\n  },\n  declaration: Declaration,\n): void => {\n  const key = `[${decorator.hostPropertyName || prop}]`;\n  if (!declaration.host[key]) {\n    declaration.host[key] = prop;\n  }\n  declaration.hostBindings.push([\n    prop,\n    decorator.hostPropertyName || prop,\n    ...(decorator.args ? [decorator.args] : []),\n  ]);\n};\n\nconst parsePropMetadataParserHostListener = (\n  _: string,\n  prop: string,\n  decorator: {\n    args?: any;\n    eventName?: string;\n  },\n  declaration: Declaration,\n): void => {\n  const key = `(${decorator.eventName || prop})`;\n  if (!declaration.host[key]) {\n    declaration.host[key] = `${prop}($event)`;\n  }\n  declaration.hostListeners.push([prop, decorator.eventName || prop, ...(decorator.args ? [decorator.args] : [])]);\n};\n\nconst parsePropMetadataMap: any = {\n  ContentChild: parsePropMetadataParserContentChild,\n  ContentChildren: parsePropMetadataParserContentChildren,\n  HostBinding: parsePropMetadataParserHostBinding,\n  HostListener: parsePropMetadataParserHostListener,\n  Input: parsePropMetadataParserInput,\n  Output: parsePropMetadataParserOutput,\n  ViewChild: parsePropMetadataParserViewChild,\n  ViewChildren: parsePropMetadataParserViewChildren,\n};\n\nconst parsePropMetadata = (\n  def: {\n    __prop__metadata__?: Record<keyof any, any[]>;\n  },\n  declaration: Declaration,\n): void => {\n  if (Object.prototype.hasOwnProperty.call(def, '__prop__metadata__') && def.__prop__metadata__) {\n    for (const prop of getAllKeys(def.__prop__metadata__)) {\n      const decorators: Array<{\n        ngMetadataName?: string;\n      }> = def.__prop__metadata__[prop];\n      for (const decorator of decorators) {\n        const ngMetadataName = decorator?.ngMetadataName;\n        if (!ngMetadataName) {\n          continue;\n        }\n        parsePropMetadataMap[ngMetadataName]?.(ngMetadataName, prop, decorator, declaration);\n      }\n    }\n  }\n};\n\nconst parseNgDef = (\n  def: {\n    ɵcmp?: any;\n    ɵdir?: any;\n    ɵpipe?: any;\n  },\n  declaration: Declaration,\n): void => {\n  if (declaration.standalone === undefined && def.ɵcmp?.standalone !== undefined) {\n    declaration.standalone = def.ɵcmp.standalone;\n  }\n  if (declaration.standalone === undefined && def.ɵdir?.standalone !== undefined) {\n    declaration.standalone = def.ɵdir.standalone;\n  }\n  if (declaration.standalone === undefined && def.ɵpipe?.standalone !== undefined) {\n    declaration.standalone = def.ɵpipe.standalone;\n  }\n};\n\n/**\n * Note: This does not seem to work in every environment (e.g. the tests)\n *       and is therefore a supplementary support for signals.\n */\nconst parseReflectComponentType = (def: any, declaration: Declaration): void => {\n  // Only available in NG 14+\n  const mirror = funcReflectComponentType(def);\n  if (!mirror) {\n    return;\n  }\n\n  for (const input of mirror.inputs) {\n    const { name, alias, required } = funcDirectiveIoParse({\n      name: input.propName,\n      alias: input.templateName === input.propName ? undefined : input.templateName,\n      required: undefined, // reflectComponentType doesn't provide required info for signal inputs\n    });\n\n    addUniqueDirectiveIo(declaration, 'inputs', name, alias, required);\n  }\n\n  for (const output of mirror.outputs) {\n    const { name, alias, required } = funcDirectiveIoParse({\n      name: output.propName,\n      alias: output.templateName === output.propName ? undefined : output.templateName,\n    });\n\n    addUniqueDirectiveIo(declaration, 'outputs', name, alias, required);\n  }\n};\n\nconst parsePropDecoratorsParserFactoryProp = (key: 'inputs' | 'outputs') => {\n  const callback = parsePropMetadataParserFactoryProp(key);\n  return (\n    _: string,\n    name: string,\n    decorator: {\n      args?: [DirectiveIo];\n    },\n    declaration: Declaration,\n  ): void => {\n    const { alias = undefined, required = undefined } =\n      typeof decorator.args?.[0] === 'undefined'\n        ? {}\n        : typeof decorator.args[0] === 'string'\n          ? { alias: decorator.args[0] }\n          : decorator.args[0];\n    callback(_, name, { alias, required, bindingPropertyName: alias }, declaration);\n  };\n};\nconst parsePropDecoratorsParserInput = parsePropDecoratorsParserFactoryProp('inputs');\nconst parsePropDecoratorsParserOutput = parsePropDecoratorsParserFactoryProp('outputs');\n\nconst parsePropDecoratorsParserFactoryQuery =\n  (isViewQuery: boolean) =>\n  (\n    ngMetadataName: string,\n    prop: string,\n    decorator: {\n      args: [string] | [string, any];\n    },\n    declaration: Declaration,\n  ): void => {\n    if (!declaration.queries[prop]) {\n      declaration.queries[prop] = {\n        isViewQuery,\n        ngMetadataName,\n        selector: decorator.args[0],\n        ...decorator.args[1],\n      };\n    }\n  };\nconst parsePropDecoratorsParserContent = parsePropDecoratorsParserFactoryQuery(false);\nconst parsePropDecoratorsParserView = parsePropDecoratorsParserFactoryQuery(true);\n\nconst parsePropDecoratorsParserHostBinding = (\n  _: string,\n  prop: string,\n  decorator: {\n    args?: [string] | [string, any[]];\n  },\n  declaration: Declaration,\n): void => {\n  const key = `[${decorator.args?.[0] || prop}]`;\n  if (!declaration.host[key]) {\n    declaration.host[key] = prop;\n  }\n  declaration.hostBindings.push([prop, ...(decorator.args || [])]);\n};\n\nconst parsePropDecoratorsParserHostListener = (\n  _: string,\n  prop: string,\n  decorator: {\n    args?: any[];\n  },\n  declaration: Declaration,\n): void => {\n  const key = `(${decorator.args?.[0] || prop})`;\n  if (!declaration.host[key]) {\n    declaration.host[key] = `${prop}($event)`;\n  }\n  declaration.hostListeners.push([prop, ...(decorator.args || [])]);\n};\n\nconst parsePropDecoratorsMap: any = {\n  ContentChild: parsePropDecoratorsParserContent,\n  ContentChildren: parsePropDecoratorsParserContent,\n  HostBinding: parsePropDecoratorsParserHostBinding,\n  HostListener: parsePropDecoratorsParserHostListener,\n  Input: parsePropDecoratorsParserInput,\n  Output: parsePropDecoratorsParserOutput,\n  ViewChild: parsePropDecoratorsParserView,\n  ViewChildren: parsePropDecoratorsParserView,\n};\n\nconst parsePropDecorators = (\n  def: {\n    propDecorators?: Record<\n      string,\n      Array<{\n        args: any;\n        type?: {\n          prototype?: {\n            ngMetadataName?: string;\n          };\n        };\n      }>\n    >;\n  },\n  declaration: Declaration,\n): void => {\n  if (Object.prototype.hasOwnProperty.call(def, 'propDecorators') && def.propDecorators) {\n    for (const prop of getAllKeys(def.propDecorators)) {\n      declaration.propDecorators[prop] = [...(declaration.propDecorators[prop] || []), ...def.propDecorators[prop]];\n      for (const decorator of def.propDecorators[prop]) {\n        const ngMetadataName = decorator?.type?.prototype?.ngMetadataName;\n        if (!ngMetadataName) {\n          continue;\n        }\n        parsePropDecoratorsMap[ngMetadataName]?.(ngMetadataName, prop, decorator, declaration);\n      }\n    }\n  }\n};\n\nconst buildDeclaration = (def: any | undefined, declaration: Declaration): void => {\n  if (def) {\n    def.inputs = def.inputs || [];\n    for (const input of declaration.inputs) {\n      if (def.inputs.indexOf(input) === -1) {\n        def.inputs.push(input);\n      }\n    }\n\n    def.outputs = def.outputs || [];\n    for (const output of declaration.outputs) {\n      if (def.outputs.indexOf(output) === -1) {\n        def.outputs.push(output);\n      }\n    }\n\n    def.queries = {\n      ...(def.queries || []),\n      ...declaration.queries,\n    };\n\n    def.hostBindings = declaration.hostBindings;\n    def.hostListeners = declaration.hostListeners;\n    if (def.standalone === undefined) {\n      def.standalone = declaration.standalone;\n    }\n  }\n};\n\nconst reflectionCapabilities = new ReflectionCapabilities();\n\nconst parse = (def: any): any => {\n  if (typeof def !== 'function' && typeof def !== 'object') {\n    return {};\n  }\n\n  if (Object.prototype.hasOwnProperty.call(def, '__ngMocksParsed')) {\n    return def.__ngMocksDeclarations;\n  }\n\n  const parent = Object.getPrototypeOf(def);\n  const parentDeclarations = parent ? parse(parent) : {};\n  const declaration = createDeclarations(parentDeclarations);\n  coreDefineProperty(def, '__ngMocksParsed', true);\n  parseParameters(def, declaration);\n  parseAnnotations(def, declaration);\n  parseDecorators(def, declaration);\n  parsePropDecorators(def, declaration);\n  parsePropMetadata(def, declaration);\n  parseNgDef(def, declaration);\n  parseReflectComponentType(def, declaration);\n  buildDeclaration(declaration.Directive, declaration);\n  buildDeclaration(declaration.Component, declaration);\n  buildDeclaration(declaration.Pipe, declaration);\n\n  coreDefineProperty(def, '__ngMocksDeclarations', {\n    ...parentDeclarations,\n    ...declaration,\n    parameters: reflectionCapabilities.parameters(def),\n  });\n\n  return def.__ngMocksDeclarations;\n};\n\nexport default ((): ((def: any) => Declaration) => parse)();\n","module.exports = __WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__;","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nmodule.exports = x({ [\"TestBed\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_testing_89899de6__.TestBed), [\"getTestBed\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_testing_89899de6__.getTestBed) });","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import ngMocksUniverse from './ng-mocks-universe';\n\nexport interface NgMocksStack {\n  id: object;\n  level: 'root' | 'runtime';\n  mockInstance?: any[];\n}\n\ntype NgMocksStackCallback = (state: NgMocksStack, stack: NgMocksStack[]) => void;\n\nconst stackRoot: NgMocksStack = { id: {}, level: 'root' };\nconst stack: NgMocksStack[] = ngMocksUniverse.global.get('reporter-stack') || [{ ...stackRoot }];\nngMocksUniverse.global.set('reporter-stack', stack);\nconst current = () => stack[stack.length - 1];\n\n// istanbul ignore next\nconst listenersPush: NgMocksStackCallback[] = ngMocksUniverse.global.get('reporter-stack-push') ?? [];\nngMocksUniverse.global.set('reporter-stack-push', listenersPush);\n\n// istanbul ignore next\nconst listenersPop: NgMocksStackCallback[] = ngMocksUniverse.global.get('reporter-stack-pop') ?? [];\nngMocksUniverse.global.set('reporter-stack-pop', listenersPop);\n\nconst stackPush = () => {\n  const id = {};\n  ngMocksUniverse.global.set('reporter-stack-id', id);\n  const state: NgMocksStack = { id, level: 'runtime' };\n  stack.push(state);\n\n  for (const callback of listenersPush) {\n    callback(state, stack);\n  }\n};\nconst stackPop = () => {\n  const state = stack.pop();\n\n  // this code is actually needed for jest tests.\n  // istanbul ignore if\n  if (stack.length === 0) {\n    stack.push(state?.level === 'root' ? state : { ...stackRoot });\n  }\n\n  // istanbul ignore else\n  if (state && state.level !== 'root') {\n    for (const callback of listenersPop) {\n      callback(state, stack);\n    }\n  }\n\n  ngMocksUniverse.global.set('reporter-stack-id', stack[stack.length - 1].id);\n};\n\n// istanbul ignore next\nconst subscribePush = (callback: NgMocksStackCallback) => {\n  if (listenersPush.indexOf(callback)) {\n    listenersPush.push(callback);\n  }\n  if (stack.length > 0) {\n    callback(stack[stack.length - 1], stack);\n  }\n};\n\n// istanbul ignore next\nconst subscribePop = (callback: NgMocksStackCallback) => {\n  if (listenersPop.indexOf(callback) === -1) {\n    listenersPop.push(callback);\n  }\n};\n\n// istanbul ignore next\nconst unsubscribePush = (callback: NgMocksStackCallback) => {\n  const index = listenersPush.indexOf(callback);\n  if (index !== -1) {\n    listenersPush.splice(index, 1);\n  }\n};\n\n// istanbul ignore next\nconst unsubscribePop = (callback: NgMocksStackCallback) => {\n  const index = listenersPop.indexOf(callback);\n  if (index !== -1) {\n    listenersPop.splice(index, 1);\n  }\n};\n\nexport default {\n  current,\n  stackPop,\n  stackPush,\n  subscribePop,\n  subscribePush,\n  unsubscribePop,\n  unsubscribePush,\n};\n","import { MetadataOverride } from '@angular/core/testing';\n\nimport { flatten } from '../common/core.helpers';\nimport { NG_MOCKS, NG_MOCKS_OVERRIDES, NG_MOCKS_TOUCHES } from '../common/core.tokens';\nimport { AnyType } from '../common/core.types';\n\nexport default (\n  providers: any,\n): {\n  mocks?: Map<any, any>;\n  overrides?: Map<AnyType<any>, [MetadataOverride<any>, MetadataOverride<any>]>;\n  touches?: Set<any>;\n} => {\n  let mocks: Map<any, any> | undefined;\n  let overrides: Map<AnyType<any>, [MetadataOverride<any>, MetadataOverride<any>]> | undefined;\n  let touches: Set<any> | undefined;\n\n  for (const provide of flatten(providers || [])) {\n    if (typeof provide !== 'object') {\n      continue;\n    }\n    if (provide.provide === NG_MOCKS) {\n      mocks = provide.useValue;\n    }\n    if (provide.provide === NG_MOCKS_OVERRIDES) {\n      overrides = provide.useValue;\n    }\n    if (provide.provide === NG_MOCKS_TOUCHES) {\n      touches = provide.useValue;\n    }\n  }\n\n  return {\n    mocks,\n    overrides,\n    touches,\n  };\n};\n","import collectDeclarations from '../resolve/collect-declarations';\n\nimport { AnyDeclaration } from './core.types';\nimport { isNgInjectionToken } from './func.is-ng-injection-token';\nimport { NgModuleWithProviders } from './func.is-ng-module-def-with-providers';\n\n/**\n * Returns how the class has been decorated.\n * It doesn't work well, because multi decorations and extensions of decorated classes can bring strange behavior.\n * Because of that, we simply take the last decoration as the expected, if the decorator is not Injectable.\n * Services have the lowest priority.\n *\n * @internal\n *\n * ```ts\n * getNgType(MockModule); // returns 'NgModule' | 'Component' | 'Directive' | 'Pipe' | 'Injectable'\n * ```\n */\nexport const getNgType = (\n  declaration: AnyDeclaration<any> | NgModuleWithProviders<any>,\n): 'NgModule' | 'Component' | 'Directive' | 'Pipe' | 'Injectable' | undefined => {\n  if (typeof declaration === 'string') {\n    return undefined;\n  }\n  if (isNgInjectionToken(declaration)) {\n    return 'Injectable';\n  }\n\n  const { decorators } = collectDeclarations(declaration);\n\n  for (let index = decorators.length - 1; index >= 0; index -= 1) {\n    if (decorators[index] === 'Injectable') {\n      continue;\n    }\n\n    return decorators[index];\n  }\n\n  if (decorators.length > 0) {\n    return 'Injectable';\n  }\n\n  return undefined;\n};\n","import collectDeclarations from '../resolve/collect-declarations';\n\nimport { getNgType } from './func.get-ng-type';\n\n/**\n * Checks whether a class has been decorated with the standalone flag.\n */\nexport function isStandalone(declaration: any): boolean {\n  const type = getNgType(declaration);\n  if (!type || type === 'Injectable' || type === 'NgModule') {\n    return false;\n  }\n\n  return collectDeclarations(declaration)[type].standalone === true;\n}\n","import { mapEntries } from './core.helpers';\n\nexport default class<K, V> {\n  protected stack: Array<Map<K, V>> = [];\n\n  public constructor() {\n    this.push();\n  }\n\n  public push() {\n    this.stack.push(new Map());\n  }\n\n  public pop(): Map<V, V> {\n    return this.stack.pop() ?? new Map();\n  }\n\n  public has(key: K): ReturnType<Map<K, V>['has']> {\n    for (let i = this.stack.length - 1; i >= 0; i -= 1) {\n      if (this.stack[i].has(key)) {\n        return true;\n      }\n    }\n\n    return false;\n  }\n\n  public get(key: K): ReturnType<Map<K, V>['get']> {\n    for (let i = this.stack.length - 1; i >= 0; i -= 1) {\n      if (this.stack[i].has(key)) {\n        return this.stack[i].get(key);\n      }\n    }\n\n    return undefined;\n  }\n\n  public set(key: K, value: V): this {\n    for (let i = this.stack.length - 1; i >= 0; i -= 1) {\n      this.stack[i].set(key, value);\n    }\n\n    return this;\n  }\n\n  public merge(resolutions: Map<K, V>): this {\n    for (const [key, value] of mapEntries(resolutions)) {\n      this.set(key, value);\n    }\n\n    return this;\n  }\n}\n","import coreConfig from '../common/core.config';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nexport class MockBuilderStash {\n  protected data: Record<keyof any, any> = {};\n\n  public backup(): void {\n    this.data = {\n      builtDeclarations: ngMocksUniverse.builtDeclarations,\n      builtProviders: ngMocksUniverse.builtProviders,\n      cacheDeclarations: ngMocksUniverse.cacheDeclarations,\n      cacheProviders: ngMocksUniverse.cacheProviders,\n      config: ngMocksUniverse.config,\n      configInstance: ngMocksUniverse.configInstance,\n      flags: ngMocksUniverse.flags,\n      touches: ngMocksUniverse.touches,\n    };\n\n    ngMocksUniverse.builtDeclarations = new Map();\n    ngMocksUniverse.builtProviders = new Map();\n    ngMocksUniverse.cacheDeclarations = new Map();\n    ngMocksUniverse.cacheProviders = new Map();\n    ngMocksUniverse.config = new Map();\n    ngMocksUniverse.configInstance = new Map();\n    ngMocksUniverse.flags = new Set(coreConfig.flags);\n    ngMocksUniverse.touches = new Set();\n  }\n\n  public restore(): void {\n    for (const key of Object.keys(this.data)) {\n      (ngMocksUniverse as any)[key] = (this.data as any)[key];\n    }\n  }\n}\n","import { AnyType } from './core.types';\n\nexport default (declaration: any): undefined | AnyType<any> | string => {\n  if (!declaration || (typeof declaration !== 'object' && typeof declaration !== 'function')) {\n    return undefined;\n  }\n\n  return declaration.ɵprov?.providedIn ?? declaration.ngInjectableDef?.providedIn;\n};\n","import CoreDefStack from '../../common/core.def-stack';\nimport { extractDependency, flatten, mapValues } from '../../common/core.helpers';\nimport coreReflectProvidedIn from '../../common/core.reflect.provided-in';\nimport funcGetType from '../../common/func.get-type';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\nimport helperResolveProvider from '../../mock-service/helper.resolve-provider';\n\nimport { BuilderData, NgMeta } from './types';\n\nexport default (ngModule: NgMeta, { providerDef, mockDef }: BuilderData, resolutions: CoreDefStack<any, any>): void => {\n  // Adding requested providers to test bed.\n  for (const provider of mapValues(providerDef)) {\n    ngModule.providers.push(provider);\n  }\n\n  // Analyzing providers.\n  for (const provider of flatten(ngModule.providers)) {\n    const provide = funcGetType(provider);\n    ngMocksUniverse.touches.add(provide);\n\n    if (provide !== provider && (provider as any).deps) {\n      extractDependency((provider as any).deps, ngMocksUniverse.config.get('ngMocksDeps'));\n    }\n  }\n\n  for (const def of mapValues(mockDef)) {\n    if (ngMocksUniverse.touches.has(def) || coreReflectProvidedIn(def) !== 'root') {\n      continue;\n    }\n\n    ngModule.providers.push(helperResolveProvider(def, resolutions));\n    ngMocksUniverse.touches.add(def);\n  }\n};\n","import { getTestBed } from '@angular/core/testing';\n\nimport { flatten } from '../../common/core.helpers';\nimport funcGetType from '../../common/func.get-type';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nexport default () => {\n  const testBed = getTestBed();\n  // istanbul ignore else\n  if (testBed.ngModule) {\n    for (const def of flatten<any>(testBed.ngModule)) {\n      ngMocksUniverse.touches.add(funcGetType(def));\n    }\n  }\n};\n","export default (def: any): void => {\n  if (!def) {\n    throw new Error(\n      [\n        'undefined / null has been passed into ng-mocks as a declaration / provider.',\n        'Please ensure that the current test file has correct imports:',\n        'imported files exist and imported declarations have been exported in the file.',\n      ].join(' '),\n    );\n  }\n};\n","export default (def: any): boolean => {\n  if (!def) {\n    return false;\n  }\n\n  if (typeof def !== 'function' && typeof def !== 'object') {\n    return false;\n  }\n\n  if (def._isMockFunction && def.mockName && def.__annotations__) {\n    return true;\n  }\n\n  return false;\n};\n","import funcGetName from './func.get-name';\nimport funcIsJestMock from './func.is-jest-mock';\n\nexport default (def: any): void => {\n  if (funcIsJestMock(def)) {\n    throw new Error(\n      [\n        `ng-mocks got ${funcGetName(def)} which has been already mocked by jest.mock().`,\n        'It is not possible to produce correct mocks for it, because jest.mock() removes Angular decorators.',\n        `To fix this, please avoid jest.mock() on the file which exports ${funcGetName(\n          def,\n        )} or add jest.dontMock() on it.`,\n        'The same should be done for all related dependencies.',\n      ].join(' '),\n    );\n  }\n};\n","import funcGetName from './func.get-name';\n\nexport default (def: any): void => {\n  throw new Error(\n    [\n      `${funcGetName(def)} declaration has been passed into ng-mocks without Angular decorators.`,\n      'Therefore, it cannot be properly handled.',\n      'Highly likely,',\n      typeof jest === 'undefined' ? '' : /* istanbul ignore next */ 'jest.mock() has been used on its file, or',\n      'ng-mocks is imported in production code, or got a class without Angular decoration.',\n      'Otherwise, please create an issue on github: https://github.com/help-me-mom/ng-mocks/issues/new?title=False%20positive%20ng-mocks%20not%20in%20JIT.',\n      'Thank you in advance for support.',\n    ].join(' '),\n  );\n};\n","import errorEmptyDef from './error.empty-def';\nimport errorJestMock from './error.jest-mock';\nimport errorMissingDecorators from './error.missing-decorators';\n\nexport default (callback: any) => (def: any) => {\n  errorEmptyDef(def);\n\n  try {\n    return callback(def);\n  } catch {\n    errorJestMock(def);\n    errorMissingDecorators(def);\n  }\n};\n","import { Component, Directive, NgModule } from '@angular/core';\n\nimport collectDeclarations from '../resolve/collect-declarations';\n\nimport coreReflectBodyCatch from './core.reflect.body-catch';\n\nexport default (\n  def: any,\n): Directive &\n  Partial<Component> &\n  NgModule & {\n    hostBindings?: Array<[string, any]>;\n    hostListeners?: Array<[string, any, any]>;\n    imports?: any[];\n    standalone?: boolean;\n  } =>\n  coreReflectBodyCatch((arg: any) => {\n    const declaration = collectDeclarations(arg);\n    if (declaration.Component) {\n      return declaration.Component;\n    }\n    if (declaration.Directive) {\n      return declaration.Directive;\n    }\n\n    throw new Error('Cannot resolve declarations');\n  })(def);\n","import { NgModule } from '@angular/core';\n\nimport collectDeclarations from '../resolve/collect-declarations';\n\nimport coreReflectBodyCatch from './core.reflect.body-catch';\n\nexport default (def: any): NgModule =>\n  coreReflectBodyCatch((arg: any) => {\n    const declaration = collectDeclarations(arg);\n    if (declaration.NgModule) {\n      return declaration.NgModule;\n    }\n\n    throw new Error('Cannot resolve declarations');\n  })(def);\n","import coreReflectDirectiveResolve from './core.reflect.directive-resolve';\nimport coreReflectModuleResolve from './core.reflect.module-resolve';\nimport { isNgDef } from './func.is-ng-def';\n\nexport default (value: any): any => {\n  if (isNgDef(value, 'c')) {\n    return coreReflectDirectiveResolve(value);\n  }\n  if (isNgDef(value, 'd')) {\n    return coreReflectDirectiveResolve(value);\n  }\n  if (isNgDef(value, 'm')) {\n    return coreReflectModuleResolve(value);\n  }\n\n  return undefined;\n};\n","import { MockedComponent } from '../mock-component/types';\nimport { MockedDirective } from '../mock-directive/types';\nimport { MockedModule } from '../mock-module/types';\nimport { MockedPipe } from '../mock-pipe/types';\n\nimport { AnyType, Type } from './core.types';\n\n/**\n * Returns the original class of a mock module class.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getSourceOfMock\n *\n * ```ts\n * getSourceOfMock(MockModule); // returns RealModule\n * getSourceOfMock(RealModule); // returns RealModule\n * ```\n */\nexport function getSourceOfMock<T>(declaration: AnyType<MockedModule<T>>): Type<T>;\n\n/**\n * Returns the original class of a mock component class.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getSourceOfMock\n *\n * ```ts\n * getSourceOfMock(MockComponent); // returns RealComponent\n * getSourceOfMock(RealComponent); // returns RealComponent\n * ```\n */\nexport function getSourceOfMock<T>(declaration: AnyType<MockedComponent<T>>): Type<T>;\n\n/**\n * Returns the original class of a mock directive class.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getSourceOfMock\n *\n * ```ts\n * getSourceOfMock(MockDirective); // returns RealDirective\n * getSourceOfMock(RealDirective); // returns RealDirective\n * ```\n */\nexport function getSourceOfMock<T>(declaration: AnyType<MockedDirective<T>>): Type<T>;\n\n/**\n * Returns the original class of a mock pipe class.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getSourceOfMock\n *\n * ```ts\n * getSourceOfMock(MockPipe); // returns RealPipe\n * getSourceOfMock(RealPipe); // returns RealPipe\n * ```\n */\nexport function getSourceOfMock<T>(declaration: AnyType<MockedPipe<T>>): Type<T>;\n\n/**\n * Returns the original class of a mock class.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getSourceOfMock\n *\n * ```ts\n * getSourceOfMock(MockClass); // returns RealClass\n * getSourceOfMock(RealClass); // returns RealClass\n * ```\n */\nexport function getSourceOfMock<T>(declaration: AnyType<T>): Type<T>;\n\nexport function getSourceOfMock<T>(declaration: any): Type<T> {\n  return typeof declaration === 'function' && declaration.mockOf ? declaration.mockOf : declaration;\n}\n","import { getSourceOfMock } from '../common/func.get-source-of-mock';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nexport default (instanceDef: any, ngModuleDef?: any) => {\n  const instance = getSourceOfMock(instanceDef);\n  const configInstance = ngMocksUniverse.configInstance.get(instance) ?? { __set: true };\n  if (!configInstance.exported) {\n    configInstance.exported = new Set();\n  }\n  if (ngModuleDef) {\n    configInstance.exported.add(getSourceOfMock(ngModuleDef));\n  }\n  if (configInstance.__set) {\n    configInstance.__set = undefined;\n    ngMocksUniverse.configInstance.set(instance, configInstance);\n  }\n};\n","import * as module from '@angular/forms';\n\nconst AbstractControl = module.AbstractControl;\nconst DefaultValueAccessor = module.DefaultValueAccessor;\nconst FormControl = module.FormControl;\nconst FormControlDirective = module.FormControlDirective;\nconst NG_ASYNC_VALIDATORS = module.NG_ASYNC_VALIDATORS;\nconst NG_VALIDATORS = module.NG_VALIDATORS;\nconst NG_VALUE_ACCESSOR = module.NG_VALUE_ACCESSOR;\nconst NgControl = module.NgControl;\nconst NgModel = module.NgModel;\n\nexport default {\n  AbstractControl,\n  DefaultValueAccessor,\n  FormControl,\n  FormControlDirective,\n  NG_ASYNC_VALIDATORS,\n  NG_VALIDATORS,\n  NG_VALUE_ACCESSOR,\n  NgControl,\n  NgModel,\n};\n","import { Injector, TemplateRef, ViewContainerRef } from '@angular/core';\n\nimport { MockConfig } from './mock';\n\nexport default <T>(\n  value: T,\n): value is T &\n  MockConfig & {\n    __ngMocksInjector?: Injector;\n    __template?: TemplateRef<any>;\n    __vcr?: ViewContainerRef;\n  } => {\n  return value && typeof value === 'object' && !!(value as any).__ngMocks;\n};\n","import { AsyncValidator, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';\n\nimport { AnyType } from './core.types';\nimport { MockControlValueAccessor, MockValidator } from './mock-control-value-accessor';\n\nconst applyProxy = (proxy: any, method: string, value: any, storage?: string) => {\n  if (proxy.instance && storage) {\n    proxy.instance[storage] = value;\n  }\n  if (proxy.instance && proxy.instance[method]) {\n    return proxy.instance[method](value);\n  }\n};\n\nexport class MockControlValueAccessorProxy implements ControlValueAccessor {\n  public instance?: Partial<MockControlValueAccessor & ControlValueAccessor>;\n\n  public constructor(public readonly target?: AnyType<any>) {}\n\n  public registerOnChange(fn: any): void {\n    applyProxy(this, 'registerOnChange', fn, '__simulateChange');\n  }\n\n  public registerOnTouched(fn: any): void {\n    applyProxy(this, 'registerOnTouched', fn, '__simulateTouch');\n  }\n\n  public setDisabledState(isDisabled: boolean): void {\n    applyProxy(this, 'setDisabledState', isDisabled);\n  }\n\n  public writeValue(value: any): void {\n    applyProxy(this, 'writeValue', value);\n  }\n}\n\nexport class MockValidatorProxy implements Validator {\n  public instance?: Partial<MockValidator & Validator>;\n\n  public constructor(public readonly target?: AnyType<any>) {}\n\n  public registerOnValidatorChange(fn: any): void {\n    applyProxy(this, 'registerOnValidatorChange', fn, '__simulateValidatorChange');\n  }\n\n  public validate(control: any): ValidationErrors | null {\n    if (this.instance && this.instance.validate) {\n      return this.instance.validate(control);\n    }\n\n    return null;\n  }\n}\n\nexport class MockAsyncValidatorProxy implements AsyncValidator {\n  public instance?: Partial<MockValidator & AsyncValidator>;\n\n  public constructor(public readonly target?: AnyType<any>) {}\n\n  public registerOnValidatorChange(fn: any): void {\n    applyProxy(this, 'registerOnValidatorChange', fn, '__simulateValidatorChange');\n  }\n\n  public validate(control: any): any {\n    if (this.instance && this.instance.validate) {\n      const result: any = this.instance.validate(control);\n\n      return result === undefined ? Promise.resolve(null) : result;\n    }\n\n    return Promise.resolve(null);\n  }\n}\n","import { EventEmitter, Injector, Optional, PipeTransform, Self } from '@angular/core';\n\nimport { IMockBuilderConfig } from '../mock-builder/types';\nimport mockHelperStub from '../mock-helper/mock-helper.stub';\nimport mockInstanceApply from '../mock-instance/mock-instance-apply';\nimport helperMockService from '../mock-service/helper.mock-service';\n\nimport coreDefineProperty from './core.define-property';\nimport coreForm from './core.form';\nimport { mapValues } from './core.helpers';\nimport { AnyType, DirectiveIo } from './core.types';\nimport funcDirectiveIoParse from './func.directive-io-parse';\nimport funcIsMock from './func.is-mock';\nimport { MockControlValueAccessorProxy } from './mock-control-value-accessor-proxy';\nimport ngMocksUniverse from './ng-mocks-universe';\n\nconst setValueAccessor = (instance: any, ngControl?: any) => {\n  if (ngControl && !ngControl.valueAccessor && instance.__ngMocksConfig.setControlValueAccessor) {\n    try {\n      ngControl.valueAccessor = new MockControlValueAccessorProxy(instance.__ngMocksCtor);\n    } catch {\n      // nothing to do.\n    }\n  }\n};\n\n// connecting to NG_VALUE_ACCESSOR\nconst installValueAccessor = (ngControl: any, instance: any) => {\n  if (!ngControl.valueAccessor.instance && ngControl.valueAccessor.target === instance.__ngMocksCtor) {\n    ngControl.valueAccessor.instance = instance;\n    helperMockService.mock(instance, 'registerOnChange');\n    helperMockService.mock(instance, 'registerOnTouched');\n    helperMockService.mock(instance, 'setDisabledState');\n    helperMockService.mock(instance, 'writeValue');\n    instance.__ngMocksConfig.isControlValueAccessor = true;\n  }\n};\n\n// connecting to NG_VALIDATORS\n// connecting to NG_ASYNC_VALIDATORS\nconst installValidator = (validators: any[], instance: any) => {\n  for (const validator of validators) {\n    if (!validator.instance && validator.target === instance.__ngMocksCtor) {\n      validator.instance = instance;\n      helperMockService.mock(instance, 'registerOnValidatorChange');\n      helperMockService.mock(instance, 'validate');\n      instance.__ngMocksConfig.isValidator = true;\n    }\n  }\n};\n\nconst applyNgValueAccessor = (instance: any, ngControl: any) => {\n  setValueAccessor(instance, ngControl);\n\n  try {\n    // istanbul ignore else\n    if (ngControl) {\n      installValueAccessor(ngControl, instance);\n      installValidator(ngControl._rawValidators, instance);\n      installValidator(ngControl._rawAsyncValidators, instance);\n    }\n  } catch {\n    // nothing to do.\n  }\n};\n\nconst applyOutputs = (instance: MockConfig & Record<keyof any, any>) => {\n  const mockOutputs = [];\n  for (const output of instance.__ngMocksConfig.outputs || []) {\n    mockOutputs.push(funcDirectiveIoParse(output).name);\n  }\n\n  for (const output of mockOutputs) {\n    if (instance[output] || Object.getOwnPropertyDescriptor(instance, output)) {\n      continue;\n    }\n    instance[output] = new EventEmitter<any>();\n  }\n};\n\nconst applyPrototype = (instance: Mock, prototype: AnyType<any>) => {\n  for (const prop of [\n    ...helperMockService.extractMethodsFromPrototype(prototype),\n    ...helperMockService.extractPropertiesFromPrototype(prototype),\n  ]) {\n    const descriptor = helperMockService.extractPropertyDescriptor(prototype, prop);\n    helperMockService.definePropertyDescriptor(instance, prop, descriptor);\n  }\n};\n\nconst applyMethods = (instance: Mock & Record<keyof any, any>, prototype: AnyType<any>) => {\n  for (const method of helperMockService.extractMethodsFromPrototype(prototype)) {\n    if (instance[method] || Object.getOwnPropertyDescriptor(instance, method)) {\n      continue;\n    }\n    helperMockService.mock(instance, method);\n  }\n};\n\nconst applyProps = (instance: Mock & Record<keyof any, any>, prototype: AnyType<any>) => {\n  for (const prop of helperMockService.extractPropertiesFromPrototype(prototype)) {\n    if (instance[prop] || Object.getOwnPropertyDescriptor(instance, prop)) {\n      continue;\n    }\n    helperMockService.mock(instance, prop, 'get');\n    helperMockService.mock(instance, prop, 'set');\n  }\n};\n\nexport type ngMocksMockConfig = {\n  config?: IMockBuilderConfig;\n  hostBindings?: string[];\n  hostListeners?: string[];\n  init?: (instance: any) => void;\n  isControlValueAccessor?: boolean;\n  isValidator?: boolean;\n  outputs?: Array<DirectiveIo>;\n  queryScanKeys?: string[];\n  setControlValueAccessor?: boolean;\n  transform?: PipeTransform['transform'];\n};\n\nconst applyOverrides = (instance: any, mockOf: any, injector?: Injector): void => {\n  const configGlobal: Set<any> | undefined = ngMocksUniverse.getOverrides().get(mockOf);\n  const callbacks = configGlobal ? mapValues(configGlobal) : [];\n  if (instance.__ngMocksConfig.init) {\n    callbacks.push(instance.__ngMocksConfig.init);\n  }\n  callbacks.push(...mockInstanceApply(mockOf));\n\n  for (const callback of callbacks) {\n    const overrides = callback(instance, injector);\n    if (!overrides) {\n      continue;\n    }\n    mockHelperStub(instance, overrides);\n  }\n};\n\nexport interface MockConfig {\n  __ngMocksConfig: ngMocksMockConfig;\n}\n\n/**\n * Mock class is the base class for each mock.\n * Usually, it should not be used directly.\n */\nexport class Mock {\n  protected __ngMocksConfig!: ngMocksMockConfig;\n\n  public constructor(\n    injector: Injector | null = null,\n    ngControl: any | null = null, // NgControl\n  ) {\n    const mockOf = (this.constructor as any).mockOf;\n    coreDefineProperty(this, '__ngMocks', true);\n    coreDefineProperty(this, '__ngMocksInjector', injector);\n    coreDefineProperty(this, '__ngMocksCtor', this.constructor);\n    for (const key of this.__ngMocksConfig.queryScanKeys || /* istanbul ignore next */ []) {\n      coreDefineProperty(this, `__ngMocksVcr_${key}`, undefined);\n    }\n    for (const key of this.__ngMocksConfig.hostBindings || /* istanbul ignore next */ []) {\n      helperMockService.mock(this, key, 'get');\n      helperMockService.mock(this, key, 'set');\n    }\n    for (const key of this.__ngMocksConfig.hostListeners || /* istanbul ignore next */ []) {\n      helperMockService.mock(this, key);\n    }\n\n    // istanbul ignore else\n    if (funcIsMock(this)) {\n      applyNgValueAccessor(this, ngControl);\n      applyOutputs(this);\n      applyPrototype(this, Object.getPrototypeOf(this));\n      applyMethods(this, mockOf.prototype);\n      applyProps(this, mockOf.prototype);\n    }\n\n    // and faking prototype\n    Object.setPrototypeOf(this, mockOf.prototype);\n\n    applyOverrides(this, mockOf, injector ?? undefined);\n  }\n}\n\ncoreDefineProperty(Mock, 'parameters', [\n  [Injector, new Optional()],\n  [coreForm.NgControl || /* istanbul ignore next */ (() => undefined), new Optional(), new Self()],\n]);\n","import { Mock } from './mock';\n\n/**\n * LegacyControlValueAccessor was used to be a way to manipulate a mock ControlValueAccessor.\n *\n * @deprecated use isMockControlValueAccessor or isMockValidator instead (removing in A13)\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockControlValueAccessor\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockValidator\n */\nexport class LegacyControlValueAccessor extends Mock {\n  /**\n   * @deprecated use isMockControlValueAccessor instead (removing in A13)\n   * @see https://ng-mocks.sudo.eu/api/helpers/isMockControlValueAccessor\n   */\n  public __simulateChange(value: any): void;\n  // istanbul ignore next\n  public __simulateChange() {\n    // nothing to do.\n  }\n\n  // istanbul ignore next\n  /**\n   * @deprecated use isMockControlValueAccessor instead (removing in A13)\n   * @see https://ng-mocks.sudo.eu/api/helpers/isMockControlValueAccessor\n   */\n  public __simulateTouch() {\n    // nothing to do.\n  }\n\n  // istanbul ignore next\n  /**\n   * @deprecated use isMockValidator instead (removing in A13)\n   * @see https://ng-mocks.sudo.eu/api/helpers/isMockValidator\n   */\n  public __simulateValidatorChange() {\n    // nothing to do.\n  }\n}\n\n/**\n * MockControlValueAccessor exposes access to a mock ControlValueAccessor.\n * It should be used in a combination with isMockControlValueAccessor.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockControlValueAccessor\n */\nexport interface MockControlValueAccessor {\n  /**\n   * It simulates an external change of the value.\n   * Please consider usage of ngMocks.change().\n   *\n   * @see https://ng-mocks.sudo.eu/extra/mock-form-controls\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/change\n   */\n  __simulateChange(value: any): void;\n\n  /**\n   * It simulates an external touch.\n   * Please consider usage of ngMocks.touch().\n   *\n   * @see https://ng-mocks.sudo.eu/extra/mock-form-controls\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/touch\n   */\n  __simulateTouch(): void;\n}\n\n/**\n * MockValidator exposes access to a mock Validator.\n * It should be used in a combination with isMockValidator.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockValidator\n */\nexport interface MockValidator {\n  /**\n   * it simulates an external validation change.\n   *\n   * @see https://ng-mocks.sudo.eu/extra/mock-form-controls\n   */\n  __simulateValidatorChange(): void;\n}\n","import { Input } from '@angular/core';\n\nimport { AnyType, DirectiveIo } from './core.types';\nimport funcDirectiveIoBuild from './func.directive-io-build';\nimport funcDirectiveIoParse from './func.directive-io-parse';\n\n// Looks like an A9 bug, that queries from @Component are not processed.\n// Also, we have to pass prototype, not the class.\n// The same issue happens with outputs, but time to time\n// (when I restart tests with refreshing browser manually).\n// https://github.com/help-me-mom/ng-mocks/issues/109\nexport default (cls: AnyType<any>, inputs?: Array<DirectiveIo>, exclude?: string[]) => {\n  // istanbul ignore else\n  if (inputs) {\n    for (const input of inputs) {\n      const { name, alias, required } = funcDirectiveIoParse(input);\n      if (exclude && exclude.indexOf(name) !== -1) {\n        continue;\n      }\n      Input(funcDirectiveIoBuild({ name, alias, required }, true) as never)(cls.prototype, name);\n    }\n  }\n};\n","import coreDefineProperty from './core.define-property';\nimport { AnyType } from './core.types';\nimport funcGetName from './func.get-name';\nimport { ngMocksMockConfig } from './mock';\nimport ngMocksUniverse from './ng-mocks-universe';\n\nexport default (mock: AnyType<any>, source: AnyType<any>, configInput: ngMocksMockConfig = {}): void => {\n  coreDefineProperty(mock, 'mockOf', source);\n  coreDefineProperty(mock, 'nameConstructor', funcGetName(mock));\n  coreDefineProperty(mock, 'name', `MockOf${funcGetName(source)}`, true);\n  const config = ngMocksUniverse.getConfigMock().has(source)\n    ? {\n        ...configInput,\n        config: {\n          ...ngMocksUniverse.getConfigMock().get(source),\n          ...configInput.config,\n        },\n      }\n    : configInput;\n  coreDefineProperty(mock.prototype, '__ngMocksConfig', config);\n};\n","import { Output } from '@angular/core';\n\nimport { AnyType, DirectiveIo } from './core.types';\nimport funcDirectiveIoBuild from './func.directive-io-build';\nimport funcDirectiveIoParse from './func.directive-io-parse';\n\n// Looks like an A9 bug, that queries from @Component are not processed.\n// Also, we have to pass prototype, not the class.\n// The same issue happens with outputs, but time to time\n// (when I restart tests with refreshing browser manually).\n// https://github.com/help-me-mom/ng-mocks/issues/109\nexport default (cls: AnyType<any>, outputs?: Array<DirectiveIo>) => {\n  // istanbul ignore else\n  if (outputs) {\n    for (const output of outputs) {\n      const { name, alias, required } = funcDirectiveIoParse(output);\n      Output(funcDirectiveIoBuild({ name, alias, required }, true) as never)(cls.prototype, name);\n    }\n  }\n};\n","import { ContentChild, ContentChildren, Query, ViewChild, ViewChildren, ViewContainerRef } from '@angular/core';\n\nimport { AnyType } from './core.types';\n\nconst map: any = {\n  ContentChild,\n  ContentChildren,\n  ViewChild,\n  ViewChildren,\n};\n\nconst isInternalKey = (key: string): boolean => {\n  return key.indexOf('__mock') === 0;\n};\n\nconst cloneVcrQuery = (query: Query & { ngMetadataName?: string }) => ({\n  ...query,\n  ngMetadataName: query.ngMetadataName,\n  read: ViewContainerRef,\n});\n\nconst generateFinalQueries = (queries: {\n  [key: string]: Query;\n}): [Array<[string, Query & { ngMetadataName?: string }]>, string[]] => {\n  const final: Array<[string, Query & { ngMetadataName?: string }]> = [];\n  const scanKeys: string[] = [];\n\n  for (const key of Object.keys(queries)) {\n    const query: Query & { ngMetadataName?: string; isSignal?: boolean } = queries[key];\n\n    // istanbul ignore else @see tests-e2e/src/issue-8634\n    if (!query.isSignal) {\n      final.push([key, query]);\n    }\n\n    // istanbul ignore next @see tests-e2e/src/issue-8634\n    if (!query.isViewQuery && !query.isSignal && !isInternalKey(key)) {\n      scanKeys.push(key);\n      final.push([`__ngMocksVcr_${key}`, cloneVcrQuery(query)]);\n    }\n  }\n\n  return [final, scanKeys];\n};\n\n// Looks like an A9 bug, that queries from @Component are not processed.\n// Also, we have to pass prototype, not the class.\n// The same issue happens with outputs, but time to time\n// (when I restart tests with refreshing browser manually).\n// https://github.com/help-me-mom/ng-mocks/issues/109\nexport default (cls: AnyType<any>, queries?: { [key: string]: Query }): string[] => {\n  // istanbul ignore if\n  if (!queries) {\n    return [];\n  }\n  const [final, keys] = generateFinalQueries(queries);\n\n  for (const [key, query] of final) {\n    // istanbul ignore else\n    if (query.ngMetadataName) {\n      const decorator = map[query.ngMetadataName];\n      decorator(query.selector, query)(cls.prototype, key);\n    }\n  }\n\n  return keys;\n};\n","import { AnyType } from '../common/core.types';\n\nexport default (provide: AnyType<any>, useExisting: AnyType<any>) => ({\n  provide,\n  useExisting,\n});\n","import { AnyType } from '../common/core.types';\n\nexport default (provide: AnyType<any>, useFactory: any) => ({\n  multi: true,\n  provide,\n  useFactory,\n});\n","import { Provider } from '@angular/core';\n\nimport CoreDefStack from '../common/core.def-stack';\nimport coreForm from '../common/core.form';\nimport { flatten } from '../common/core.helpers';\nimport { AnyType } from '../common/core.types';\nimport funcExtractForwardRef from '../common/func.extract-forward-ref';\nimport funcGetType from '../common/func.get-type';\nimport {\n  MockAsyncValidatorProxy,\n  MockControlValueAccessorProxy,\n  MockValidatorProxy,\n} from '../common/mock-control-value-accessor-proxy';\nimport helperMockService from '../mock-service/helper.mock-service';\n\nimport toExistingProvider from './to-existing-provider';\nimport toFactoryProvider from './to-factory-provider';\n\nconst processTokens = (mockType: AnyType<any>, provider: any) => {\n  const provide = funcGetType(provider);\n  if (coreForm.NG_VALIDATORS && provide === coreForm.NG_VALIDATORS) {\n    return toFactoryProvider(provide, () => new MockValidatorProxy(mockType));\n  }\n  if (coreForm.NG_ASYNC_VALIDATORS && provide === coreForm.NG_ASYNC_VALIDATORS) {\n    return toFactoryProvider(provide, () => new MockAsyncValidatorProxy(mockType));\n  }\n  if (coreForm.NG_VALUE_ACCESSOR && provide === coreForm.NG_VALUE_ACCESSOR) {\n    return toFactoryProvider(provide, () => new MockControlValueAccessorProxy(mockType));\n  }\n\n  return undefined;\n};\n\nconst processOwnUseExisting = (sourceType: AnyType<any>, mockType: AnyType<any>, provider: any) => {\n  const provide = funcGetType(provider);\n\n  // Check tests/issue-302/test.spec.ts\n  if (provide === coreForm.NgControl || provide === coreForm.FormControlDirective) {\n    return undefined;\n  }\n\n  if (provider !== provide && funcExtractForwardRef(provider.useExisting) === sourceType) {\n    return toExistingProvider(provide, mockType);\n  }\n\n  return undefined;\n};\n\nconst processProvider = (\n  sourceType: AnyType<any>,\n  mockType: AnyType<any>,\n  provider: any,\n  resolutions: CoreDefStack<any, any>,\n): any => {\n  const token = processTokens(mockType, provider);\n  if (token) {\n    return token;\n  }\n\n  const ownUseExisting = processOwnUseExisting(sourceType, mockType, provider);\n  if (ownUseExisting) {\n    return ownUseExisting;\n  }\n\n  return helperMockService.resolveProvider(provider, resolutions);\n};\n\nexport default (\n  sourceType: AnyType<any>,\n  mockType: AnyType<any>,\n  providers: any[],\n  resolutions: CoreDefStack<any, any>,\n): {\n  providers: Provider[];\n  setControlValueAccessor?: boolean;\n} => {\n  const result: Provider[] = [];\n  let setControlValueAccessor: boolean | undefined;\n\n  for (const provider of flatten(providers || /* istanbul ignore next */ [])) {\n    const provide = funcGetType(provider);\n    if (provide === coreForm.NG_VALUE_ACCESSOR) {\n      setControlValueAccessor = false;\n    }\n    const mock = processProvider(sourceType, mockType, provider, resolutions);\n    if (mock) {\n      result.push(mock);\n    }\n  }\n\n  return {\n    providers: result,\n    setControlValueAccessor,\n  };\n};\n","import { Component, Directive, NgModule, ViewChild } from '@angular/core';\n\nimport CoreDefStack from '../common/core.def-stack';\nimport { AnyType, DirectiveIo } from '../common/core.types';\nimport decorateInputs from '../common/decorate.inputs';\nimport decorateMock from '../common/decorate.mock';\nimport decorateOutputs from '../common/decorate.outputs';\nimport decorateQueries from '../common/decorate.queries';\nimport { ngMocksMockConfig } from '../common/mock';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport mockNgDef from '../mock-module/mock-ng-def';\nimport helperMockService from '../mock-service/helper.mock-service';\n\nimport cloneProviders from './clone-providers';\nimport toExistingProvider from './to-existing-provider';\n\nconst buildConfig = (\n  source: AnyType<any>,\n  meta: {\n    inputs?: Array<DirectiveIo>;\n    outputs?: Array<DirectiveIo>;\n    providers?: NgModule['providers'];\n    queries?: Record<string, ViewChild>;\n  },\n  setControlValueAccessor: boolean,\n) => {\n  return {\n    config: ngMocksUniverse.config.get(source),\n    outputs: meta.outputs,\n    queryScanKeys: [],\n    setControlValueAccessor: setControlValueAccessor,\n  };\n};\n\nexport default <T extends Component & Directive>(\n  source: AnyType<any>,\n  mock: AnyType<any>,\n  meta: Component &\n    Directive &\n    NgModule & {\n      hostBindings?: Array<[string, any]>;\n      hostListeners?: Array<[string, any, any]>;\n      hostDirectives?: Array<AnyType<any> | { directive: AnyType<any> }>;\n      imports?: any[];\n      standalone?: boolean;\n    },\n  params: T,\n): Component & Directive => {\n  const hasResolver = ngMocksUniverse.config.has('mockNgDefResolver');\n  if (!hasResolver) {\n    ngMocksUniverse.config.set('mockNgDefResolver', new CoreDefStack());\n  }\n\n  const options: T & { imports?: any[]; hostDirectives?: any[]; standalone?: boolean } = {\n    ...params,\n  };\n\n  if (meta.exportAs !== undefined) {\n    options.exportAs = meta.exportAs;\n  }\n  if (meta.selector !== undefined) {\n    options.selector = meta.selector;\n  }\n  // istanbul ignore else\n  if (meta.standalone !== undefined) {\n    options.standalone = meta.standalone;\n  }\n\n  if (meta.imports) {\n    const [, { imports }] = mockNgDef({ imports: meta.imports, skipExports: true });\n    if (imports?.length) {\n      options.imports = imports as never;\n    }\n  }\n\n  if (meta.hostDirectives) {\n    const [, { hostDirectives }] = mockNgDef({ hostDirectives: meta.hostDirectives, skipExports: true });\n    if (hostDirectives?.length) {\n      options.hostDirectives = hostDirectives;\n    }\n  }\n\n  const { setControlValueAccessor, providers } = cloneProviders(\n    source,\n    mock,\n    meta.providers || [],\n    ngMocksUniverse.config.get('mockNgDefResolver'),\n  );\n  providers.push(toExistingProvider(source, mock));\n  options.providers = providers;\n\n  const { providers: viewProviders } = cloneProviders(\n    source,\n    mock,\n    meta.viewProviders || [],\n    ngMocksUniverse.config.get('mockNgDefResolver'),\n  );\n  if (viewProviders.length > 0) {\n    options.viewProviders = viewProviders;\n  }\n\n  const config: ngMocksMockConfig = buildConfig(\n    source,\n    meta,\n    setControlValueAccessor ??\n      helperMockService.extractMethodsFromPrototype(source.prototype).indexOf('writeValue') !== -1,\n  );\n  decorateMock(mock, source, config);\n\n  // istanbul ignore else\n  if (meta.queries) {\n    decorateInputs(mock, meta.inputs, Object.keys(meta.queries));\n  }\n  decorateOutputs(mock, meta.outputs);\n  config.queryScanKeys = decorateQueries(mock, meta.queries);\n\n  config.hostBindings = [];\n  for (const [key] of meta.hostBindings || /* istanbul ignore next */ []) {\n    // mock declarations should not have side effects based on host bindings.\n    // HostBinding(...args)(mock.prototype, key);\n    if (config.hostBindings.indexOf(key) === -1) {\n      config.hostBindings.push(key);\n    }\n  }\n\n  config.hostListeners = [];\n  for (const [key] of meta.hostListeners || /* istanbul ignore next */ []) {\n    // mock declarations should not have side effects based on host bindings.\n    // HostListener(...args)(mock.prototype, key);\n    if (config.hostListeners.indexOf(key) === -1) {\n      config.hostListeners.push(key);\n    }\n  }\n\n  if (!hasResolver) {\n    ngMocksUniverse.config.delete('mockNgDefResolver');\n  }\n\n  return options;\n};\n","import funcGetName from './func.get-name';\nimport { isNgDef } from './func.is-ng-def';\n\nconst getType = (value: any): string =>\n  isNgDef(value, 'p')\n    ? 'pipe'\n    : isNgDef(value, 'd')\n      ? 'directive'\n      : isNgDef(value, 'c')\n        ? 'component'\n        : isNgDef(value, 'm')\n          ? 'module'\n          : isNgDef(value, 'i')\n            ? 'service'\n            : isNgDef(value, 't')\n              ? 'token'\n              : '';\n\nexport default (value: any, funcName: string) => {\n  if (value === undefined || value === null) {\n    throw new Error(`null / undefined has been passed into ${funcName}. Please check that its import is correct.`);\n  }\n\n  if (funcName === 'MockPipe' && isNgDef(value, 'p')) {\n    return;\n  }\n  if (funcName === 'MockDirective' && isNgDef(value, 'd')) {\n    return;\n  }\n  if (funcName === 'MockComponent' && isNgDef(value, 'c')) {\n    return;\n  }\n  if (funcName === 'MockModule' && isNgDef(value, 'm')) {\n    return;\n  }\n\n  const type = getType(value);\n\n  if (type && funcName === 'MockPipe') {\n    throw new Error(`${funcName} accepts pipes, whereas ${funcGetName(value)} is a ${type}.`);\n  }\n  if (type && funcName === 'MockDirective') {\n    throw new Error(`${funcName} accepts directives, whereas ${funcGetName(value)} is a ${type}.`);\n  }\n  if (type && funcName === 'MockComponent') {\n    throw new Error(`${funcName} accepts components, whereas ${funcGetName(value)} is a ${type}.`);\n  }\n  if (type && funcName === 'MockModule') {\n    throw new Error(`${funcName} accepts modules, whereas ${funcGetName(value)} is a ${type}.`);\n  }\n};\n","import { MockedComponent } from '../mock-component/types';\nimport { MockedDirective } from '../mock-directive/types';\nimport { MockedModule } from '../mock-module/types';\nimport { MockedPipe } from '../mock-pipe/types';\n\nimport { AnyType, Type } from './core.types';\nimport { isNgDef } from './func.is-ng-def';\n\n/**\n * isMockNgDef verifies whether a class is a mock component class.\n *\n * @internal\n *\n * ```ts\n * isMockNgDef(MockComponent, 'c'); // returns true\n * isMockNgDef(RealComponent, 'c'); // returns false\n * isMockNgDef(ArbitraryClass, 'c'); // returns false\n * ```\n */\nexport function isMockNgDef<T>(component: AnyType<T>, ngType: 'c'): component is Type<MockedComponent<T>>;\n\n/**\n * isMockNgDef verifies whether a class is a mock directive class.\n *\n * @internal\n *\n * ```ts\n * isMockNgDef(MockDirective, 'd'); // returns true\n * isMockNgDef(RealDirective, 'd'); // returns false\n * isMockNgDef(ArbitraryClass, 'd'); // returns false\n * ```\n */\nexport function isMockNgDef<T>(directive: AnyType<T>, ngType: 'd'): directive is Type<MockedDirective<T>>;\n\n/**\n * isMockNgDef verifies whether a class is a mock pipe class.\n *\n * @internal\n *\n * ```ts\n * isMockNgDef(MockPipe, 'p'); // returns true\n * isMockNgDef(RealPipe, 'p'); // returns false\n * isMockNgDef(ArbitraryClass, 'p'); // returns false\n * ```\n */\nexport function isMockNgDef<T>(pipe: AnyType<T>, ngType: 'p'): pipe is Type<MockedPipe<T>>;\n\n/**\n * isMockNgDef verifies whether a class is a mock module class.\n *\n * @internal\n *\n * ```ts\n * isMockNgDef(MockModule, 'm'); // returns true\n * isMockNgDef(RealModule, 'm'); // returns false\n * isMockNgDef(ArbitraryClass, 'm'); // returns false\n * ```\n */\nexport function isMockNgDef<T>(module: AnyType<T>, ngType: 'm'): module is Type<MockedModule<T>>;\n\n/**\n * isMockNgDef verifies whether a class is a mock class.\n *\n * @internal\n *\n * ```ts\n * isMockNgDef(MockComponent); // returns true\n * isMockNgDef(RealModule); // returns false\n * isMockNgDef(ArbitraryClass); // returns false\n * ```\n */\nexport function isMockNgDef<T>(module: Type<T>): module is Type<T>;\n\nexport function isMockNgDef<TComponent>(\n  component: AnyType<TComponent> & { mockOf?: any },\n  type?: 'c' | 'd' | 'p' | 'm',\n): component is Type<TComponent> {\n  if (!(component as any).mockOf) {\n    return false;\n  }\n  if (!type) {\n    return true;\n  }\n\n  return isNgDef(component.mockOf, type as never);\n}\n","import { ComponentFixture, getTestBed } from '@angular/core/testing';\n\nexport default () => {\n  const fixtures: Array<ComponentFixture<any>> = (getTestBed() as any)._activeFixtures;\n\n  return fixtures[fixtures.length - 1];\n};\n","import { NG_MOCKS } from '../common/core.tokens';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport funcGetLastFixture from '../mock-helper/func.get-last-fixture';\n\nexport default (declaration: any) => {\n  let result: any;\n\n  try {\n    result = funcGetLastFixture().debugElement.injector.get(NG_MOCKS).get(declaration);\n  } catch {\n    // nothing to do.\n  }\n\n  if (!result) {\n    result = ngMocksUniverse.cacheDeclarations.get(declaration);\n  }\n\n  if (declaration.__ngMocksResolutions && ngMocksUniverse.config.has('mockNgDefResolver')) {\n    ngMocksUniverse.config.get('mockNgDefResolver').merge(declaration.__ngMocksResolutions);\n  }\n\n  return result;\n};\n","import { extendClass } from '../common/core.helpers';\nimport funcImportExists from '../common/func.import-exists';\nimport { isMockNgDef } from '../common/func.is-mock-ng-def';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport returnCachedMock from './return-cached-mock';\n\nexport default (def: any, type: any, func: string, cacheFlag: string, base: any, decorator: any) => {\n  funcImportExists(def, func);\n\n  if (isMockNgDef(def, type)) {\n    return def;\n  }\n\n  if (ngMocksUniverse.flags.has(cacheFlag) && ngMocksUniverse.cacheDeclarations.has(def)) {\n    return returnCachedMock(def);\n  }\n\n  const hasNgMocksDepsResolution = ngMocksUniverse.config.has('ngMocksDepsResolution');\n  if (!hasNgMocksDepsResolution) {\n    ngMocksUniverse.config.set('ngMocksDepsResolution', new Map());\n  }\n\n  const mock = extendClass(base);\n  decorator(def, mock);\n\n  // istanbul ignore else\n  if (ngMocksUniverse.flags.has(cacheFlag)) {\n    ngMocksUniverse.cacheDeclarations.set(def, mock);\n  }\n\n  if (!hasNgMocksDepsResolution) {\n    ngMocksUniverse.config.delete('ngMocksDepsResolution');\n  }\n\n  return mock as any;\n};\n","import { Query, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';\n\nconst vcrArgs: any = { read: ViewContainerRef, static: false };\nconst trArgs: any = { read: TemplateRef, static: false };\n\nconst viewChildTemplate = (selector: string, key: string): string => {\n  const content = `<div data-${key}=\"${selector}\"><ng-template #${key}_${selector}></ng-template></div>`;\n\n  return `<ng-template #ngIf_${key}_${selector}>${content}</ng-template>`;\n};\n\nconst isTemplateRefQuery = (query: Query): boolean => {\n  if (query.isViewQuery) {\n    return false; // ignoring all internal @ViewChild\n  }\n  if (query.read && query.read !== TemplateRef) {\n    return false; // ignoring read of instances\n  }\n  if (typeof query.selector !== 'string' && !query.read) {\n    return false; // ignoring class selectors if they do not read TemplateRef\n  }\n\n  return true;\n};\n\nexport default (queries?: Record<keyof any, any>): string => {\n  const parts = ['<ng-content></ng-content>'];\n  // istanbul ignore if\n  if (!queries) {\n    return parts.join('');\n  }\n\n  for (const key of Object.keys(queries)) {\n    const query: Query & { isSignal?: boolean } = queries[key];\n    if (key.indexOf('__mock') === 0) {\n      continue;\n    }\n    if (!isTemplateRefQuery(query)) {\n      continue;\n    }\n    // istanbul ignore if @see tests-e2e/src/issue-8634\n    if (query.isSignal) {\n      continue;\n    }\n    if (typeof query.selector === 'string') {\n      const selector = query.selector.replace(new RegExp('\\\\W', 'mg'), '_');\n      queries[`__vcrIf_key_${selector}`] = new ViewChild(`ngIf_key_${selector}`, vcrArgs);\n      queries[`__trIf_key_${selector}`] = new ViewChild(`ngIf_key_${selector}`, trArgs);\n      queries[`__mockView_key_${selector}`] = new ViewChild(`key_${selector}`, vcrArgs);\n      queries[`__mockTpl_key_${selector}`] = query;\n      parts.push(viewChildTemplate(selector, 'key'));\n    }\n    queries[`__vcrIf_prop_${key}`] = new ViewChild(`ngIf_prop_${key}`, vcrArgs);\n    queries[`__trIf_prop_${key}`] = new ViewChild(`ngIf_prop_${key}`, trArgs);\n    queries[`__mockView_prop_${key}`] = new ViewChild(`prop_${key}`, vcrArgs);\n    parts.push(viewChildTemplate(key, 'prop'));\n  }\n\n  return parts.join('');\n};\n","export default (\n  contentChildSelector: string | [string, ...number[]],\n): [string, string, string, undefined | number[]] => {\n  if (typeof contentChildSelector === 'string') {\n    return ['key', `__mockTpl_key_${contentChildSelector}`, contentChildSelector, undefined];\n  }\n\n  const [key, ...indices] = contentChildSelector;\n\n  return ['prop', key, key, indices.length > 0 ? indices : undefined];\n};\n","import {\n  AfterViewInit,\n  ChangeDetectorRef,\n  Component,\n  EmbeddedViewRef,\n  Injector,\n  Optional,\n  QueryList,\n  Self,\n  TemplateRef,\n  ViewContainerRef,\n} from '@angular/core';\n\nimport coreDefineProperty from '../common/core.define-property';\nimport coreForm from '../common/core.form';\nimport coreReflectDirectiveResolve from '../common/core.reflect.directive-resolve';\nimport { Type } from '../common/core.types';\nimport funcIsMock from '../common/func.is-mock';\nimport { MockConfig } from '../common/mock';\nimport { LegacyControlValueAccessor } from '../common/mock-control-value-accessor';\nimport decorateDeclaration from '../mock/decorate-declaration';\nimport getMock from '../mock/get-mock';\n\nimport generateTemplate from './render/generate-template';\nimport getKey from './render/get-key';\nimport { MockedComponent } from './types';\n\nconst mixRenderPrepareVcr = (\n  instance: MockConfig & Record<keyof any, any>,\n  type: string,\n  selector: string,\n  cdr: ChangeDetectorRef,\n): ViewContainerRef | undefined => {\n  const vcrNgIf: ViewContainerRef = instance[`__vcrIf_${type}_${selector}`];\n  const trNgIf: TemplateRef<never> = instance[`__trIf_${type}_${selector}`];\n\n  if (vcrNgIf && trNgIf && !instance[`ngMocksRender_${type}_${selector}`]) {\n    instance[`ngMocksRender_${type}_${selector}`] = vcrNgIf.createEmbeddedView(trNgIf, {});\n    cdr.detectChanges();\n  }\n\n  return instance[`__mockView_${type}_${selector}`];\n};\n\nconst mixRenderReorderViews = (\n  viewContainer: ViewContainerRef,\n  views: Array<EmbeddedViewRef<any>>,\n  index: number,\n): void => {\n  for (const view of views.splice(index + 1)) {\n    view.destroy();\n  }\n\n  let viewIndex = 0;\n  for (const view of views) {\n    if (!view) {\n      continue;\n    }\n    viewContainer.move(view, viewIndex);\n    viewIndex += 1;\n  }\n};\n\nconst mixRenderApplyContext = (view: EmbeddedViewRef<any>, context: Record<keyof any, any>): void => {\n  for (const contextKey of Object.keys(view.context)) {\n    view.context[contextKey] = undefined;\n  }\n  for (const contextKey of Object.keys(context)) {\n    view.context[contextKey] = (context as any)[contextKey];\n  }\n  view.markForCheck();\n};\n\nconst mixRenderHandleViews = (\n  vcr: ViewContainerRef,\n  cdr: ChangeDetectorRef,\n  templates: any[],\n  views: Array<EmbeddedViewRef<any>>,\n  indices: undefined | number[],\n  context: Record<keyof any, any>,\n): number => {\n  let index = -1;\n\n  for (const templateRef of templates) {\n    index += 1;\n    views[index] = views[index] || undefined;\n    if ((indices && indices.indexOf(index) === -1) || !templateRef) {\n      continue;\n    }\n    if (!(templateRef instanceof TemplateRef)) {\n      throw new Error(`Cannot find TemplateRef`);\n    }\n    if (!views[index]) {\n      views[index] = vcr.createEmbeddedView(templateRef, {});\n    }\n    mixRenderApplyContext(views[index], context);\n  }\n  cdr.detectChanges();\n\n  return index;\n};\n\nconst mixRender = (instance: MockConfig & Record<keyof any, any>, cdr: ChangeDetectorRef): void => {\n  // Providing a method to render any @ContentChild based on its selector.\n  coreDefineProperty(\n    instance,\n    '__render',\n    (contentChildSelector: string | [string, ...number[]], $implicit?: any, variables?: Record<keyof any, any>) => {\n      const [type, key, selector, indices] = getKey(contentChildSelector);\n\n      const vcr = mixRenderPrepareVcr(instance, type, selector, cdr);\n      if (!vcr) {\n        return;\n      }\n\n      const property: any = instance[key];\n      const templates = property instanceof QueryList ? property.toArray() : [property];\n\n      const views = instance[`ngMocksRender_${type}_${selector}_views`] || [];\n      const index = mixRenderHandleViews(vcr, cdr, templates, views, indices, { ...variables, $implicit });\n\n      mixRenderReorderViews(vcr, views, index);\n      instance[`ngMocksRender_${type}_${selector}_views`] = views;\n      cdr.detectChanges();\n    },\n  );\n};\n\nconst mixHideHandler = (\n  instance: MockConfig & Record<keyof any, any>,\n  type: string,\n  selector: string,\n  indices: undefined | number[],\n) => {\n  const views = instance[`ngMocksRender_${type}_${selector}_views`];\n  let index = -1;\n  for (const view of views) {\n    index += 1;\n    if ((indices && indices.indexOf(index) === -1) || !view) {\n      continue;\n    }\n    view.destroy();\n    views[index] = undefined;\n  }\n};\n\nconst mixHide = (instance: MockConfig & Record<keyof any, any>, changeDetector: ChangeDetectorRef): void => {\n  // Providing method to hide any @ContentChild based on its selector.\n  coreDefineProperty(instance, '__hide', (contentChildSelector: string | [string, ...number[]]) => {\n    const [type, , selector, indices] = getKey(contentChildSelector);\n\n    if (!instance[`ngMocksRender_${type}_${selector}`]) {\n      return;\n    }\n    mixHideHandler(instance, type, selector, indices);\n\n    if (!indices) {\n      (instance[`ngMocksRender_${type}_${selector}`] as EmbeddedViewRef<never>).destroy();\n      instance[`ngMocksRender_${type}_${selector}`] = undefined;\n    }\n    changeDetector.detectChanges();\n  });\n};\n\nclass ComponentMockBase extends LegacyControlValueAccessor implements AfterViewInit {\n  // istanbul ignore next\n  public constructor(\n    injector: Injector,\n    ngControl: any, // NgControl\n    changeDetector: ChangeDetectorRef,\n  ) {\n    super(injector, ngControl);\n    if (funcIsMock(this)) {\n      mixRender(this, changeDetector);\n      mixHide(this, changeDetector);\n    }\n  }\n\n  public ngAfterViewInit(): void {\n    const config = (this.__ngMocksConfig as any).config;\n    if (!(this as any).__rendered && config && config.render) {\n      for (const block of Object.keys(config.render)) {\n        const { $implicit, variables } =\n          config.render[block] === true\n            ? {\n                $implicit: undefined,\n                variables: {},\n              }\n            : config.render[block];\n        (this as any).__render(block, $implicit, variables);\n      }\n      (this as any).__rendered = true;\n    }\n  }\n}\n\ncoreDefineProperty(ComponentMockBase, 'parameters', [\n  [Injector],\n  [coreForm.NgControl || /* istanbul ignore next */ (() => undefined), new Optional(), new Self()],\n  [ChangeDetectorRef],\n]);\n\nconst decorateClass = (component: Type<any>, mock: Type<any>): void => {\n  const meta = coreReflectDirectiveResolve(component);\n  Component(\n    decorateDeclaration(component, mock, meta, {\n      template: generateTemplate(meta.queries),\n    }),\n  )(mock);\n};\n\n/**\n * MockComponents creates an array of mock component classes out of components passed as parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockComponent\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   declarations: MockComponents(\n *     Dep1Component,\n *     Dep2Component,\n *   ),\n * });\n * ```\n */\nexport function MockComponents(...components: Array<Type<any>>): Array<Type<MockedComponent<any>>> {\n  return components.map(MockComponent);\n}\n\n/**\n * MockComponent creates a mock component class out of an arbitrary component.\n *\n * @see https://ng-mocks.sudo.eu/api/MockComponent\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   declarations: [\n *     MockComponent(Dep1Component),\n *     MockComponent(Dep2Component),\n *   ],\n * });\n * ```\n */\nexport function MockComponent<TComponent>(component: Type<TComponent>): Type<MockedComponent<TComponent>> {\n  return getMock(component, 'c', 'MockComponent', 'cacheComponent', ComponentMockBase, decorateClass);\n}\n","import {\n  ChangeDetectorRef,\n  Directive,\n  ElementRef,\n  Injector,\n  OnInit,\n  Optional,\n  Self,\n  TemplateRef,\n  ViewContainerRef,\n} from '@angular/core';\n\nimport coreDefineProperty from '../common/core.define-property';\nimport coreForm from '../common/core.form';\nimport coreReflectDirectiveResolve from '../common/core.reflect.directive-resolve';\nimport { Type } from '../common/core.types';\nimport { LegacyControlValueAccessor } from '../common/mock-control-value-accessor';\nimport decorateDeclaration from '../mock/decorate-declaration';\nimport getMock from '../mock/get-mock';\n\nimport { MockedDirective } from './types';\n\nclass DirectiveMockBase extends LegacyControlValueAccessor implements OnInit {\n  // istanbul ignore next\n  public constructor(\n    injector: Injector,\n    ngControl: any, // NgControl\n    cdr: ChangeDetectorRef,\n    vcr: ViewContainerRef,\n    element: ElementRef | null = null,\n    template: TemplateRef<any> | null = null,\n  ) {\n    super(injector, ngControl);\n    this.__ngMocksInstall(vcr, cdr, element, template);\n  }\n\n  public ngOnInit(): void {\n    const config = (this.__ngMocksConfig as any).config;\n    if (config?.render) {\n      const { $implicit, variables } =\n        config.render === true\n          ? {\n              $implicit: undefined,\n              variables: {},\n            }\n          : config.render;\n      (this as any).__render($implicit, variables);\n    }\n  }\n\n  private __ngMocksInstall(\n    vcr: ViewContainerRef,\n    cdr: ChangeDetectorRef,\n    element: ElementRef | null,\n    template: TemplateRef<any> | null,\n  ): void {\n    // Basically any directive on ng-template is treated as structural, even it does not control render process.\n    // In our case we do not if we should render it or not and due to this we do nothing.\n    coreDefineProperty(this, '__element', element);\n    coreDefineProperty(this, '__template', template);\n    coreDefineProperty(this, '__viewContainer', vcr);\n    coreDefineProperty(this, '__vcr', vcr);\n    coreDefineProperty(this, '__cdr', cdr);\n    coreDefineProperty(this, '__isStructural', template && vcr);\n\n    // Providing method to render mock values.\n    coreDefineProperty(this, '__render', ($implicit?: any, variables?: Record<keyof any, any>) => {\n      if (vcr && template) {\n        vcr.clear();\n        vcr.createEmbeddedView(template, { ...variables, $implicit });\n        cdr.detectChanges();\n      }\n    });\n  }\n}\n\ncoreDefineProperty(DirectiveMockBase, 'parameters', [\n  [Injector],\n  [coreForm.NgControl || /* istanbul ignore next */ (() => undefined), new Optional(), new Self()],\n  [ChangeDetectorRef],\n  [ViewContainerRef],\n  [ElementRef, new Optional(), new Self()],\n  [TemplateRef, new Optional(), new Self()],\n]);\n\nconst decorateClass = (directive: Type<any>, mock: Type<any>): void => {\n  const meta = coreReflectDirectiveResolve(directive);\n  const options = decorateDeclaration(directive, mock, meta, {});\n  Directive(options)(mock);\n};\n\n/**\n * MockDirectives creates an array of mock directive classes out of directives passed as parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockDirective\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   declarations: MockDirectives(\n *     Dep1Directive,\n *     Dep2Directive,\n *   ),\n * });\n * ```\n */\nexport function MockDirectives(...directives: Array<Type<any>>): Array<Type<MockedDirective<any>>> {\n  return directives.map(MockDirective);\n}\n\n/**\n * MockDirective creates a mock directive class out of an arbitrary directive.\n *\n * @see https://ng-mocks.sudo.eu/api/MockDirective\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   declarations: [\n *     MockDirective(Dep1Directive),\n *     MockDirective(Dep2Directive),\n *   ],\n * });\n * ```\n */\nexport function MockDirective<TDirective>(directive: Type<TDirective>): Type<MockedDirective<TDirective>> {\n  return getMock(directive, 'd', 'MockDirective', 'cacheDirective', DirectiveMockBase, decorateClass);\n}\n","import { Pipe } from '@angular/core';\n\nimport collectDeclarations from '../resolve/collect-declarations';\n\nimport coreReflectBodyCatch from './core.reflect.body-catch';\n\nexport default (def: any): Pipe & { standalone?: boolean } =>\n  coreReflectBodyCatch((arg: any) => {\n    const declaration = collectDeclarations(arg);\n    if (declaration.Pipe) {\n      return declaration.Pipe;\n    }\n\n    throw new Error('Cannot resolve declarations');\n  })(def);\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { extendClass } from '../common/core.helpers';\nimport coreReflectPipeResolve from '../common/core.reflect.pipe-resolve';\nimport { Type } from '../common/core.types';\nimport decorateMock from '../common/decorate.mock';\nimport funcGetName from '../common/func.get-name';\nimport funcImportExists from '../common/func.import-exists';\nimport { isMockNgDef } from '../common/func.is-mock-ng-def';\nimport { Mock } from '../common/mock';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport returnCachedMock from '../mock/return-cached-mock';\nimport helperMockService from '../mock-service/helper.mock-service';\n\nimport { MockedPipe } from './types';\n\n/**\n * MockPipes creates an array of mock pipe classes out of pipes passed as parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockPipe\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   declarations: MockPipes(\n *     Dep1Pipe,\n *     Dep2Pipe,\n *   ),\n * });\n * ```\n */\nexport function MockPipes(...pipes: Array<Type<PipeTransform>>): Array<Type<PipeTransform>> {\n  return pipes.map(pipe => MockPipe(pipe, undefined));\n}\n\nconst getMockClass = (pipe: Type<any>, transformValue?: PipeTransform['transform']): Type<any> => {\n  const config = ngMocksUniverse.config.get(pipe);\n  const transform = transformValue ?? config?.defValue?.transform;\n  const mock = extendClass(Mock);\n  Pipe(coreReflectPipeResolve(pipe))(mock);\n  decorateMock(mock, pipe, {\n    init: (instance: PipeTransform) => {\n      if (transform) {\n        instance.transform = transform;\n      }\n      if (!instance.transform) {\n        helperMockService.mock(instance, 'transform', `${funcGetName(instance)}.transform`);\n      }\n    },\n    transform,\n  });\n\n  return mock;\n};\n\n/**\n * MockPipe creates a mock pipe class out of an arbitrary pipe.\n *\n * @see https://ng-mocks.sudo.eu/api/MockPipe\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   declarations: [\n *     MockPipe(Dep1Pipe),\n *     MockPipe(Dep2Pipe),\n *   ],\n * });\n * ```\n */\nexport function MockPipe<TPipe extends PipeTransform>(\n  pipe: Type<TPipe>,\n  transform?: TPipe['transform'],\n): Type<MockedPipe<TPipe>>;\n\nexport function MockPipe<TPipe extends PipeTransform>(\n  pipe: Type<TPipe>,\n  transform?: TPipe['transform'],\n): Type<MockedPipe<TPipe>> {\n  funcImportExists(pipe, 'MockPipe');\n\n  if (isMockNgDef(pipe, 'p')) {\n    return pipe;\n  }\n\n  // istanbul ignore next\n  if (ngMocksUniverse.flags.has('cachePipe') && ngMocksUniverse.cacheDeclarations.has(pipe)) {\n    return returnCachedMock(pipe);\n  }\n\n  const mock = getMockClass(pipe, transform);\n  if (ngMocksUniverse.flags.has('cachePipe')) {\n    ngMocksUniverse.cacheDeclarations.set(pipe, mock);\n  }\n\n  return mock as any;\n}\n","import { NgModule } from '@angular/core';\n\nimport coreConfig from '../common/core.config';\nimport coreDefineProperty from '../common/core.define-property';\nimport { extendClass } from '../common/core.helpers';\nimport coreReflectModuleResolve from '../common/core.reflect.module-resolve';\nimport { AnyType, Type } from '../common/core.types';\nimport decorateMock from '../common/decorate.mock';\nimport funcGetName from '../common/func.get-name';\nimport funcImportExists from '../common/func.import-exists';\nimport { isMockNgDef } from '../common/func.is-mock-ng-def';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport { isNgModuleDefWithProviders, NgModuleWithProviders } from '../common/func.is-ng-module-def-with-providers';\nimport { Mock } from '../common/mock';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport returnCachedMock from '../mock/return-cached-mock';\n\nimport mockNgDef from './mock-ng-def';\n\nconst flagMock = (resolution?: string): boolean => resolution === 'mock' && ngMocksUniverse.flags.has('skipMock');\n\nconst flagKeep = (resolution?: string): boolean => resolution === 'keep' && !ngMocksUniverse.flags.has('skipMock');\n\nconst flagReplace = (resolution?: string): boolean =>\n  resolution === 'replace' && !ngMocksUniverse.flags.has('skipMock');\n\nconst flagNever = (ngModule?: any): boolean =>\n  coreConfig.neverMockModule.indexOf(funcGetName(ngModule)) !== -1 && !ngMocksUniverse.flags.has('skipMock');\n\nconst preProcessFlags = (ngModule: AnyType<any>): { isRootModule: boolean; toggleSkipMockFlag: boolean } => {\n  let toggleSkipMockFlag = false;\n  let isRootModule = true;\n\n  if (ngMocksUniverse.flags.has('hasRootModule')) {\n    isRootModule = false;\n  } else {\n    ngMocksUniverse.flags.add('hasRootModule');\n  }\n\n  const resolution = ngMocksUniverse.getResolution(ngModule);\n  if (flagMock(resolution)) {\n    toggleSkipMockFlag = true;\n    ngMocksUniverse.flags.delete('skipMock');\n  }\n  if (flagNever(ngModule)) {\n    toggleSkipMockFlag = true;\n    ngMocksUniverse.flags.add('skipMock');\n  }\n  if (!isRootModule && (flagKeep(resolution) || flagReplace(resolution))) {\n    toggleSkipMockFlag = true;\n    ngMocksUniverse.flags.add('skipMock');\n  }\n\n  return {\n    isRootModule,\n    toggleSkipMockFlag,\n  };\n};\n\nconst postProcessFlags = ({\n  isRootModule,\n  toggleSkipMockFlag,\n}: {\n  isRootModule: boolean;\n  toggleSkipMockFlag: boolean;\n}): void => {\n  if (toggleSkipMockFlag && ngMocksUniverse.flags.has('skipMock')) {\n    ngMocksUniverse.flags.delete('skipMock');\n  } else if (toggleSkipMockFlag && !ngMocksUniverse.flags.has('skipMock')) {\n    ngMocksUniverse.flags.add('skipMock');\n  }\n  if (isRootModule) {\n    ngMocksUniverse.flags.delete('hasRootModule');\n  }\n};\n\nconst extractModuleAndProviders = (\n  module: any,\n): {\n  ngModule: Type<any>;\n  ngModuleProviders: NgModule['providers'];\n} => {\n  let ngModule: Type<any>;\n  let ngModuleProviders: NgModule['providers'];\n\n  if (isNgModuleDefWithProviders(module)) {\n    ngModule = module.ngModule;\n    if (module.providers) {\n      ngModuleProviders = module.providers;\n    }\n  } else {\n    ngModule = module;\n  }\n\n  return {\n    ngModule,\n    ngModuleProviders,\n  };\n};\n\nconst getExistingMockModule = (ngModule: Type<any>, isRootModule: boolean): Type<any> | undefined => {\n  if (isMockNgDef(ngModule, 'm')) {\n    return ngModule;\n  }\n\n  // Every module should be replaced with its mock copy only once to avoid errors like:\n  // Failed: Type ...Component is part of the declarations of 2 modules: ...Module and ...Module...\n  if (ngMocksUniverse.flags.has('cacheModule') && ngMocksUniverse.cacheDeclarations.has(ngModule)) {\n    return returnCachedMock(ngModule);\n  }\n\n  // Now we check if we need to keep the original module or to replace it with some other.\n  // and there is no override in its resolution.\n  if (isRootModule || ngMocksUniverse.config.get('ngMocksDepsResolution')?.get(ngModule) === 'mock') {\n    return undefined;\n  }\n  if (ngMocksUniverse.hasBuildDeclaration(ngModule)) {\n    const instance = ngMocksUniverse.getBuildDeclaration(ngModule);\n    if (isNgDef(instance, 'm') && instance !== ngModule) {\n      return instance;\n    }\n  }\n\n  return undefined;\n};\n\nconst detectMockModule = (ngModule: Type<any>, mockModule?: Type<any>): Type<any> => {\n  const [changed, ngModuleDef, resolutions] = mockModule\n    ? [false]\n    : mockNgDef(coreReflectModuleResolve(ngModule), ngModule);\n  if (resolutions) {\n    coreDefineProperty(ngModule, '__ngMocksResolutions', resolutions);\n  }\n\n  if (changed) {\n    const parent = ngMocksUniverse.flags.has('skipMock') ? ngModule : Mock;\n    const mock = extendClass(parent);\n\n    // the last thing is to apply decorators.\n    NgModule(ngModuleDef)(mock);\n    decorateMock(mock, ngModule);\n\n    return mock;\n  }\n\n  return mockModule || ngModule;\n};\n\nconst getMockProviders = (ngModuleProviders: NgModule['providers']): NgModule['providers'] => {\n  if (ngModuleProviders) {\n    const [changed, ngModuleDef] = mockNgDef({ providers: ngModuleProviders, skipExports: true });\n\n    return changed ? ngModuleDef.providers : ngModuleProviders;\n  }\n\n  return undefined;\n};\n\nconst generateReturn = (\n  module: any,\n  ngModule: AnyType<any>,\n  ngModuleProviders: NgModule['providers'],\n  mockModule: AnyType<any>,\n  mockModuleProviders: NgModule['providers'],\n): any =>\n  mockModule === ngModule && mockModuleProviders === ngModuleProviders\n    ? module\n    : isNgModuleDefWithProviders(module)\n      ? { ngModule: mockModule, ...(mockModuleProviders ? { providers: mockModuleProviders } : {}) }\n      : mockModule;\n\n/**\n * MockModule creates a mock module class out of an arbitrary module.\n * All declarations, imports, exports and providers will be mocked too.\n *\n * @see https://ng-mocks.sudo.eu/api/MockModule\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   imports: [\n *     MockModule(SharedModule),\n *   ],\n * });\n * ```\n */\nexport function MockModule<T>(ngModule: Type<T>): Type<T>;\n\n/**\n * MockModule creates a mock module class with mock provides out of an arbitrary module with providers.\n * All declarations, imports, exports and providers will be mocked too.\n *\n * @see https://ng-mocks.sudo.eu/api/MockModule\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   imports: [\n *     MockModule(StoreModule.forRoot()),\n *   ],\n * });\n * ```\n */\nexport function MockModule<T>(ngModule: NgModuleWithProviders<T>): NgModuleWithProviders<T>;\n\nexport function MockModule(def: any): any {\n  funcImportExists(def, 'MockModule');\n\n  const { ngModule, ngModuleProviders } = extractModuleAndProviders(def);\n  const flags = preProcessFlags(ngModule);\n  try {\n    const mockModule = detectMockModule(ngModule, getExistingMockModule(ngModule, flags.isRootModule));\n    // istanbul ignore else\n    if (ngMocksUniverse.flags.has('cacheModule')) {\n      ngMocksUniverse.cacheDeclarations.set(ngModule, mockModule);\n    }\n    if (ngMocksUniverse.flags.has('skipMock')) {\n      ngMocksUniverse.config.get('ngMocksDepsSkip')?.add(mockModule);\n    }\n    const mockModuleProviders = getMockProviders(ngModuleProviders);\n\n    return generateReturn(def, ngModule, ngModuleProviders, mockModule, mockModuleProviders);\n  } finally {\n    postProcessFlags(flags);\n  }\n}\n","import { Provider } from '@angular/core';\n\nimport CoreDefStack from '../common/core.def-stack';\nimport funcGetType from '../common/func.get-type';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport { isNgModuleDefWithProviders } from '../common/func.is-ng-module-def-with-providers';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport { MockComponent } from '../mock-component/mock-component';\nimport { MockDirective } from '../mock-directive/mock-directive';\nimport { MockPipe } from '../mock-pipe/mock-pipe';\nimport helperMockService from '../mock-service/helper.mock-service';\n\nimport { MockModule } from './mock-module';\n\nconst processDefMap: Array<[any, any]> = [\n  ['c', MockComponent],\n  ['d', MockDirective],\n  ['p', MockPipe],\n];\n\nconst processDef = (def: any) => {\n  if (isNgDef(def, 'm') || isNgModuleDefWithProviders(def)) {\n    return MockModule(def as any);\n  }\n  if (ngMocksUniverse.hasBuildDeclaration(def)) {\n    return ngMocksUniverse.getBuildDeclaration(def);\n  }\n  if (ngMocksUniverse.flags.has('skipMock') && ngMocksUniverse.getResolution(def) !== 'mock') {\n    return def;\n  }\n  for (const [flag, func] of processDefMap) {\n    if (isNgDef(def, flag)) {\n      return func(def);\n    }\n  }\n};\n\n// resolveProvider is a special case because of the def structure.\nconst createResolveProvider =\n  (resolutions: CoreDefStack<any, any>, change: () => void): ((def: Provider) => any) =>\n  (def: Provider) =>\n    helperMockService.resolveProvider(def, resolutions, change);\n\nconst createResolveWithProviders = (def: any, mockDef: any): boolean =>\n  isNgModuleDefWithProviders(mockDef) && isNgModuleDefWithProviders(def);\n\nconst createResolveExisting = (\n  def: any,\n  resolutions: CoreDefStack<any, any>,\n  change: (flag?: boolean) => void,\n): any => {\n  const mockDef = resolutions.get(def);\n  if (def !== mockDef) {\n    change();\n  }\n\n  return mockDef;\n};\n\nconst createResolveExcluded = (\n  def: any,\n  resolutions: CoreDefStack<any, any>,\n  change: (flag?: boolean) => void,\n): void => {\n  resolutions.set(def, undefined);\n\n  change();\n};\n\nconst createResolve =\n  (resolutions: CoreDefStack<any, any>, change: (flag?: boolean) => void): ((def: any) => any) =>\n  (def: any) => {\n    if (resolutions.has(def)) {\n      return createResolveExisting(def, resolutions, change);\n    }\n\n    const detectedDef = funcGetType(def);\n    if (ngMocksUniverse.isExcludedDef(detectedDef)) {\n      return createResolveExcluded(def, resolutions, change);\n    }\n    ngMocksUniverse.touches.add(detectedDef);\n\n    const mockDef = processDef(def);\n    if (createResolveWithProviders(def, mockDef)) {\n      resolutions.set(def.ngModule, mockDef.ngModule);\n    }\n    if (ngMocksUniverse.flags.has('skipMock')) {\n      ngMocksUniverse.config.get('ngMocksDepsSkip')?.add(mockDef);\n    }\n    resolutions.set(def, mockDef);\n    change(mockDef !== def);\n\n    return mockDef;\n  };\n\nexport default (\n  change: () => void,\n  resolutions: CoreDefStack<any, any>,\n): {\n  resolve: (def: any) => any;\n  resolveProvider: (def: Provider) => any;\n} => {\n  const resolve = createResolve(resolutions, change);\n  const resolveProvider = createResolveProvider(resolutions, change);\n\n  return {\n    resolve,\n    resolveProvider,\n  };\n};\n","import { flatten } from '../common/core.helpers';\nimport funcGetType from '../common/func.get-type';\nimport markExported from '../mock/mark-exported';\n\nexport default (providers?: any[]): void => {\n  for (const provider of flatten(providers ?? [])) {\n    const instance = funcGetType(provider);\n    markExported(instance);\n  }\n};\n","import { NgModule, Provider } from '@angular/core';\n\nimport CoreDefStack from '../common/core.def-stack';\nimport { flatten } from '../common/core.helpers';\nimport { dependencyKeys, Type } from '../common/core.types';\nimport funcGetType from '../common/func.get-type';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport markExported from '../mock/mark-exported';\n\nimport createResolvers from './create-resolvers';\nimport markProviders from './mark-providers';\n\nconst flatToExisting = <T, R>(data: T | T[], callback: (arg: T) => R | undefined): R[] =>\n  flatten(data)\n    .map(callback)\n    .filter((item): item is R => !!item);\n\nconst configureProcessMetaKeys = (\n  resolve: (def: any) => any,\n  resolveProvider: (def: Provider) => any,\n): Array<[dependencyKeys, (def: any) => any]> => [\n  ['declarations', resolve],\n  [\n    'hostDirectives',\n    <T>(data: T) => {\n      const def = funcGetType(data);\n      const directive = resolve(def);\n      return directive === def\n        ? data\n        : data == def\n          ? directive\n          : {\n              ...data,\n              directive,\n            };\n    },\n  ],\n  ['imports', resolve],\n  ['entryComponents', resolve],\n  ['bootstrap', resolve],\n  ['providers', resolveProvider],\n  ['viewProviders', resolveProvider],\n  ['exports', resolve],\n  ['schemas', v => v],\n];\n\nconst processMeta = <\n  T extends Partial<Record<dependencyKeys, any>> & {\n    skipMarkProviders?: boolean;\n  },\n>(\n  ngModule: T,\n  resolve: (def: any) => any,\n  resolveProvider: (def: Provider) => any,\n): Partial<T> => {\n  const mockModuleDef: Partial<T> = {};\n  const keys = configureProcessMetaKeys(resolve, resolveProvider);\n\n  const cachePipe = ngMocksUniverse.flags.has('cachePipe');\n  if (!cachePipe) {\n    ngMocksUniverse.flags.add('cachePipe');\n  }\n  for (const [key, callback] of keys) {\n    if (ngModule[key]?.length) {\n      mockModuleDef[key] = flatToExisting(ngModule[key], callback);\n    }\n  }\n  if (!ngModule.skipMarkProviders) {\n    markProviders(mockModuleDef.providers);\n    markProviders(mockModuleDef.viewProviders);\n  }\n\n  if (!cachePipe) {\n    ngMocksUniverse.flags.delete('cachePipe');\n  }\n\n  return mockModuleDef;\n};\n\nconst resolveDefForExport = (\n  def: any,\n  resolve: (def: any) => any,\n  correctExports: boolean,\n  ngModule?: Type<any>,\n): Type<any> | undefined => {\n  const moduleConfig = ngMocksUniverse.config.get(ngModule) || {};\n  const instance = funcGetType(def);\n  const mockDef = resolve(instance);\n  if (!mockDef) {\n    return undefined;\n  }\n\n  // If we export a declaration, then we have to export its module too.\n  const config = ngMocksUniverse.config.get(instance);\n  if (config?.export && ngModule && !moduleConfig.export) {\n    ngMocksUniverse.config.set(ngModule, {\n      ...moduleConfig,\n      export: true,\n    });\n  }\n\n  if (correctExports && !moduleConfig.exportAll && !config?.export) {\n    return undefined;\n  }\n\n  markExported(instance, ngModule);\n\n  return mockDef;\n};\n\nconst skipAddExports = (mockDef: any, mockModuleDef: NgModule): mockDef is undefined =>\n  !mockDef || (!!mockModuleDef.exports && mockModuleDef.exports.indexOf(mockDef) !== -1);\n\n// if we are in the skipMock mode we need to export only the default exports.\n// if we are in the correctModuleExports mode we need to export only default exports.\nconst addExports = (\n  resolve: (def: any) => any,\n  change: () => void,\n  ngModuleDef: NgModule,\n  mockModuleDef: NgModule,\n  ngModule?: Type<any>,\n): void => {\n  const correctExports = ngMocksUniverse.flags.has('skipMock') || ngMocksUniverse.flags.has('correctModuleExports');\n  for (const def of flatten([ngModuleDef.imports || [], ngModuleDef.declarations || []])) {\n    const mockDef = resolveDefForExport(def, resolve, correctExports, ngModule);\n    if (skipAddExports(mockDef, mockModuleDef)) {\n      continue;\n    }\n\n    change();\n    mockModuleDef.exports = mockModuleDef.exports || [];\n    mockModuleDef.exports.push(mockDef);\n  }\n};\n\nexport default <\n  T extends NgModule & {\n    hostDirectives?: Array<any>;\n    skipMarkProviders?: boolean;\n    skipExports?: boolean;\n  },\n>(\n  ngModuleDef: T,\n  ngModule?: Type<any>,\n): [boolean, Partial<T>, Map<any, any>] => {\n  const hasResolver = ngMocksUniverse.config.has('mockNgDefResolver');\n  if (!hasResolver) {\n    ngMocksUniverse.config.set('mockNgDefResolver', new CoreDefStack());\n  }\n  ngMocksUniverse.config.get('mockNgDefResolver').push();\n\n  let changed = !ngMocksUniverse.flags.has('skipMock');\n  const change = (flag = true) => {\n    changed = changed || flag;\n  };\n  const { resolve, resolveProvider } = createResolvers(change, ngMocksUniverse.config.get('mockNgDefResolver'));\n  const mockModuleDef = processMeta(ngModuleDef, resolve, resolveProvider);\n  if (!ngModuleDef.skipExports) {\n    addExports(resolve, change, ngModuleDef, mockModuleDef, ngModule);\n  }\n  for (const def of ngModule && mockModuleDef.exports ? (flatten(mockModuleDef.exports) as Array<any>) : []) {\n    markExported(def, ngModule);\n  }\n\n  const resolutions = ngMocksUniverse.config.get('mockNgDefResolver').pop();\n  if (!hasResolver) {\n    ngMocksUniverse.config.delete('mockNgDefResolver');\n  }\n\n  return [changed, mockModuleDef, resolutions];\n};\n","import { Directive, NgModule } from '@angular/core';\n\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\nimport mockNgDef from '../../mock-module/mock-ng-def';\n\nexport default (meta?: Directive | NgModule): NgModule | undefined => {\n  if (!meta) {\n    return undefined;\n  }\n\n  const skipMock = ngMocksUniverse.flags.has('skipMock');\n  // istanbul ignore else\n  if (!skipMock) {\n    ngMocksUniverse.flags.add('skipMock');\n  }\n  const [changed, def] = mockNgDef(meta);\n  // istanbul ignore else\n  if (!skipMock) {\n    ngMocksUniverse.flags.delete('skipMock');\n  }\n  if (!changed) {\n    return undefined;\n  }\n\n  return def;\n};\n","import ngMocksUniverse from '../../common/ng-mocks-universe';\n\nimport { BuilderData } from './types';\n\nexport default (\n  replaceDef: BuilderData['replaceDef'],\n  defValue: BuilderData['defValue'],\n  source: any,\n  value: any,\n): boolean => {\n  // no reason to touch mocks\n  if (ngMocksUniverse.cacheDeclarations.has(value)) {\n    return true;\n  }\n\n  // no customizations in replacements\n  if (replaceDef.has(source) && value === defValue.get(source)) {\n    return true;\n  }\n\n  return false;\n};\n","import { ValueProvider } from '@angular/core';\nimport { MetadataOverride } from '@angular/core/testing';\n\nimport { mapValues } from '../../common/core.helpers';\nimport coreReflectMeta from '../../common/core.reflect.meta';\nimport { NG_MOCKS_OVERRIDES } from '../../common/core.tokens';\nimport { Type } from '../../common/core.types';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nimport getOverrideDef from './get-override-def';\nimport skipOverride from './skip-override';\n\nexport default (replaceDef: Set<any>, defValue: Map<any, any>): ValueProvider => {\n  const overrides: Map<Type<any>, [MetadataOverride<any>, MetadataOverride<any>]> = new Map();\n  for (const proto of mapValues(ngMocksUniverse.touches)) {\n    const source: any = proto;\n    const value = ngMocksUniverse.getBuildDeclaration(source) || source;\n    if (skipOverride(replaceDef, defValue, source, value)) {\n      continue;\n    }\n\n    const original = coreReflectMeta(value);\n    const override = getOverrideDef(original);\n    if (!override) {\n      continue;\n    }\n\n    // We need to delete standalone, because Angular was too lazy to check whether it has been really changed.\n    const patchedOriginal: Partial<typeof original> = {};\n    for (const key of Object.keys(override)) {\n      patchedOriginal[key] = original[key];\n    }\n\n    overrides.set(value, [{ set: override }, { set: patchedOriginal }]);\n  }\n\n  return {\n    provide: NG_MOCKS_OVERRIDES,\n    useValue: overrides,\n  };\n};\n","import { ValueProvider } from '@angular/core';\n\nimport { mapEntries } from '../../common/core.helpers';\nimport { NG_MOCKS } from '../../common/core.tokens';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nexport default (): ValueProvider => {\n  const mocks = new Map();\n  for (const [key, value] of [\n    ...mapEntries(ngMocksUniverse.builtProviders),\n    ...mapEntries(ngMocksUniverse.builtDeclarations),\n    ...mapEntries(ngMocksUniverse.cacheDeclarations),\n    ...mapEntries(ngMocksUniverse.cacheProviders),\n  ]) {\n    if (mocks.has(key)) {\n      continue;\n    }\n    mocks.set(key, value);\n  }\n\n  return {\n    provide: NG_MOCKS,\n    useValue: mocks,\n  };\n};\n","import { ValueProvider } from '@angular/core';\n\nimport { mapValues } from '../../common/core.helpers';\nimport { NG_MOCKS_TOUCHES } from '../../common/core.tokens';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nexport default (): ValueProvider => {\n  // Redefining providers for kept declarations.\n  const touches = new Set();\n  for (const proto of mapValues(ngMocksUniverse.touches)) {\n    const source: any = proto;\n    let value = ngMocksUniverse.getBuildDeclaration(source);\n\n    // kept declarations should be based on their source.\n    if (value === undefined) {\n      value = source;\n    }\n\n    touches.add(source);\n    touches.add(value);\n  }\n\n  return {\n    provide: NG_MOCKS_TOUCHES,\n    useValue: touches,\n  };\n};\n","import { ComponentFactoryResolver, NgModule, Optional } from '@angular/core';\n\nimport coreDefineProperty from '../../common/core.define-property';\nimport { extendClass } from '../../common/core.helpers';\nimport { NG_MOCKS } from '../../common/core.tokens';\nimport { isNgDef } from '../../common/func.is-ng-def';\nimport helperCreateClone from '../../mock-service/helper.create-clone';\n\nimport { NgMeta } from './types';\n\nclass EntryComponentsModule {\n  public constructor(map: Map<any, any>, componentFactoryResolver?: ComponentFactoryResolver) {\n    // istanbul ignore if\n    if (!componentFactoryResolver) {\n      return;\n    }\n\n    const originCFR = componentFactoryResolver.resolveComponentFactory;\n    componentFactoryResolver.resolveComponentFactory = helperCreateClone(\n      originCFR,\n      undefined,\n      undefined,\n      (component: any, ...args: any[]) =>\n        originCFR.apply(componentFactoryResolver, [map.get(component) ?? component, ...args] as any),\n    );\n  }\n}\ncoreDefineProperty(EntryComponentsModule, 'parameters', [[NG_MOCKS], [ComponentFactoryResolver, new Optional()]]);\n\nclass IvyModule {}\nNgModule()(IvyModule);\n\nexport default (ngModule: NgMeta): void => {\n  const entryComponents: any[] = [];\n  for (const declaration of ngModule.declarations) {\n    if (isNgDef(declaration, 'c')) {\n      entryComponents.push(declaration);\n    }\n  }\n  // the way to cause entryComponents to do its work\n  const entryModule = extendClass(EntryComponentsModule);\n  NgModule({\n    // Ivy knows how to make any component an entry point,\n    // but we still would like to patch resolveComponentFactory in order to provide mocks.\n    // ɵmod is added only if Ivy has been enabled.\n    entryComponents: (IvyModule as any).ɵmod ? [] : /* istanbul ignore next */ entryComponents,\n  } as never)(entryModule);\n  ngModule.imports.push(entryModule);\n};\n","import { DOCUMENT } from '@angular/common';\n\nimport coreConfig from '../../common/core.config';\nimport coreReflectProvidedIn from '../../common/core.reflect.provided-in';\nimport { isNgInjectionToken } from '../../common/func.is-ng-injection-token';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nconst skipResolution = (provide: any): boolean | undefined => {\n  const resolution = ngMocksUniverse.getResolution(provide);\n  if (resolution === 'keep' || resolution === 'exclude') {\n    return true;\n  }\n  if (resolution === 'mock') {\n    return false;\n  }\n\n  return undefined;\n};\n\nconst skipSystem = (provide: any): boolean => {\n  if (!provide || provide === DOCUMENT || ngMocksUniverse.touches.has(provide)) {\n    return true;\n  }\n  const skipByResolution = skipResolution(provide);\n  if (skipByResolution !== undefined) {\n    return skipByResolution;\n  }\n\n  if (typeof provide === 'function' && coreConfig.neverMockProvidedFunction.indexOf(provide.name) !== -1) {\n    return true;\n  }\n  // istanbul ignore if because we mock BrowserModule\n  if (isNgInjectionToken(provide) && coreConfig.neverMockToken.indexOf(provide.toString()) !== -1) {\n    return true;\n  }\n\n  return false;\n};\n\n// Checks if we should avoid mocking of the provider.\nexport default (provide: any): boolean => {\n  if (skipSystem(provide)) {\n    return true;\n  }\n\n  // Empty providedIn or things for a platform have to be skipped.\n  const providedIn = coreReflectProvidedIn(provide);\n  const skip = !providedIn || providedIn === 'platform';\n  if (typeof provide === 'function' && skip) {\n    return true;\n  }\n\n  return false;\n};\n","import { NG_MOCKS_ROOT_PROVIDERS } from '../../common/core.tokens';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nimport skipDep from './skip-dep';\nimport { BuilderData } from './types';\n\nexport default (parameters: Set<any>, mockDef: BuilderData['mockDef'], def: any): void => {\n  if (\n    !skipDep(def) &&\n    (mockDef.has(NG_MOCKS_ROOT_PROVIDERS) || !ngMocksUniverse.config.get('ngMocksDepsSkip').has(def))\n  ) {\n    parameters.add(def);\n  }\n};\n","export default (provide: any, bucket: any[], touched: any[]): void => {\n  if (typeof provide === 'function' && touched.indexOf(provide) === -1) {\n    touched.push(provide);\n    bucket.push(provide);\n  }\n};\n","import funcExtractForwardRef from '../../common/func.extract-forward-ref';\n\n// Extracts dependency among flags of parameters.\nexport default (decorators?: any[]): any => {\n  if (!decorators) {\n    return;\n  }\n\n  let provide: any;\n  for (const decorator of decorators) {\n    if (decorator && typeof decorator === 'object' && decorator.token) {\n      provide = decorator.token;\n    }\n    if (!provide && decorator && (typeof decorator !== 'object' || !decorator.ngMetadataName)) {\n      provide = decorator;\n    }\n  }\n\n  return funcExtractForwardRef(provide);\n};\n","import { mapValues } from '../../common/core.helpers';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nexport default (): {\n  buckets: any[];\n  touched: any[];\n} => {\n  // We need buckets here to process first all depsSkip, then deps and only after that all other defs.\n  const buckets: any[] = [\n    mapValues(ngMocksUniverse.config.get('ngMocksDepsSkip')),\n    mapValues(ngMocksUniverse.config.get('ngMocksDeps')),\n    mapValues(ngMocksUniverse.touches),\n  ];\n\n  // Also, we need to track what has been touched to check params recursively, but avoiding duplicates.\n  const touched: any[] = [].concat(...buckets);\n\n  return {\n    buckets,\n    touched,\n  };\n};\n","import coreReflectProvidedIn from '../../common/core.reflect.provided-in';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nexport default (provide: any): void => {\n  if (ngMocksUniverse.touches.has(provide)) {\n    return;\n  }\n\n  const providedIn = coreReflectProvidedIn(provide);\n  if (!providedIn) {\n    return;\n  }\n\n  if (ngMocksUniverse.config.get('ngMocksDepsSkip').has(providedIn)) {\n    ngMocksUniverse.config.get('ngMocksDepsSkip').add(provide);\n  }\n};\n","import ngMocksUniverse from '../../common/ng-mocks-universe';\n\nimport skipDep from './skip-dep';\n\nexport default (provide: any): boolean => {\n  if (skipDep(provide)) {\n    return true;\n  }\n\n  return ngMocksUniverse.config.get('ngMocksDepsSkip').has(provide);\n};\n","import coreReflectParametersResolve from '../../common/core.reflect.parameters-resolve';\nimport { NG_MOCKS_ROOT_PROVIDERS } from '../../common/core.tokens';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nimport addDefToRootProviderParameters from './add-def-to-root-provider-parameters';\nimport checkRootProviderDependency from './check-root-provider-dependency';\nimport extractDep from './extract-dep';\nimport getRootProvidersData from './get-root-providers-data';\nimport handleProvidedInDependency from './handle-provided-in-dependency';\nimport skipRootProviderDependency from './skip-root-provider-dependency';\nimport { BuilderData } from './types';\n\nexport default (mockDef: BuilderData['mockDef']): Set<any> => {\n  const parameters = new Set();\n  const { buckets, touched } = getRootProvidersData();\n\n  for (const bucket of buckets) {\n    for (const def of bucket) {\n      addDefToRootProviderParameters(parameters, mockDef, def);\n\n      for (const decorators of coreReflectParametersResolve(def)) {\n        const provide: any = extractDep(decorators);\n        handleProvidedInDependency(provide);\n        if (skipRootProviderDependency(provide)) {\n          continue;\n        }\n        checkRootProviderDependency(provide, touched, bucket);\n        if (mockDef.has(NG_MOCKS_ROOT_PROVIDERS) || !ngMocksUniverse.config.get('ngMocksDepsSkip').has(def)) {\n          parameters.add(provide);\n        } else {\n          ngMocksUniverse.config.get('ngMocksDepsSkip').add(provide);\n        }\n      }\n    }\n  }\n\n  return parameters;\n};\n","import CoreDefStack from '../../common/core.def-stack';\nimport { mapValues } from '../../common/core.helpers';\nimport { NG_MOCKS_ROOT_PROVIDERS } from '../../common/core.tokens';\nimport { isNgInjectionToken } from '../../common/func.is-ng-injection-token';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\nimport helperResolveProvider from '../../mock-service/helper.resolve-provider';\nimport helperUseFactory from '../../mock-service/helper.use-factory';\n\nimport getRootProviderParameters from './get-root-provider-parameters';\nimport { BuilderData, NgMeta } from './types';\n\n// Mocking root providers.\nexport default (ngModule: NgMeta, { keepDef, mockDef }: BuilderData, resolutions: CoreDefStack<any, any>): void => {\n  // Adding missed providers.\n  const parameters = keepDef.has(NG_MOCKS_ROOT_PROVIDERS) ? new Set() : getRootProviderParameters(mockDef);\n  if (parameters.size > 0) {\n    for (const parameter of mapValues(parameters)) {\n      const mock = helperResolveProvider(parameter, resolutions);\n      if (mock) {\n        ngModule.providers.push(mock);\n      } else if (isNgInjectionToken(parameter)) {\n        const multi =\n          ngMocksUniverse.config.has('ngMocksMulti') && ngMocksUniverse.config.get('ngMocksMulti').has(parameter);\n        ngModule.providers.push(helperUseFactory(parameter, () => (multi ? [] : undefined)));\n      }\n    }\n  }\n};\n","import { ModuleWithProviders } from '@angular/core';\n\nimport { Type } from '../../common/core.types';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nimport { BuilderData } from './types';\n\nexport default (def: Type<any>, defProviders: BuilderData['defProviders']): Type<any> | ModuleWithProviders<any> => {\n  const loModule = ngMocksUniverse.config.get('mockNgDefResolver').get(def) ?? ngMocksUniverse.getBuildDeclaration(def);\n  const loProviders = defProviders.has(def) ? defProviders.get(def) : undefined;\n\n  return loProviders\n    ? {\n        ngModule: loModule,\n        providers: loProviders,\n      }\n    : loModule;\n};\n","import { flatten, mapValues } from '../../common/core.helpers';\nimport coreReflectProvidedIn from '../../common/core.reflect.provided-in';\nimport { AnyDeclaration, Type } from '../../common/core.types';\nimport errorJestMock from '../../common/error.jest-mock';\nimport funcGetName from '../../common/func.get-name';\nimport funcGetType from '../../common/func.get-type';\nimport { isNgDef } from '../../common/func.is-ng-def';\nimport { isNgInjectionToken } from '../../common/func.is-ng-injection-token';\nimport { isStandalone } from '../../common/func.is-standalone';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\nimport markExported from '../../mock/mark-exported';\nimport markProviders from '../../mock-module/mark-providers';\n\nimport initModule from './init-module';\nimport { BuilderData, NgMeta } from './types';\n\nconst skipDef = (def: any): boolean =>\n  ngMocksUniverse.touches.has(def) || isNgDef(def) || isNgInjectionToken(def) || typeof def === 'string';\n\nconst handleDef = ({ imports, declarations, providers }: NgMeta, def: any, defProviders: Map<any, any>): void => {\n  if (!skipDef(def)) {\n    errorJestMock(def);\n  }\n\n  let touched = false;\n\n  if (isNgDef(def, 'm')) {\n    const extendedDef = initModule(def, defProviders);\n    imports.push(extendedDef);\n    touched = true;\n\n    // adding providers to touches\n    if (typeof extendedDef === 'object' && extendedDef.providers) {\n      for (const provider of flatten(extendedDef.providers)) {\n        ngMocksUniverse.touches.add(funcGetType(provider));\n      }\n    }\n  }\n\n  if (isNgDef(def, 'c') || isNgDef(def, 'd') || isNgDef(def, 'p')) {\n    (isStandalone(def) ? imports : declarations).push(ngMocksUniverse.getBuildDeclaration(def));\n    touched = true;\n  }\n\n  if (isNgDef(def, 'i') || !isNgDef(def)) {\n    const mock = ngMocksUniverse.builtProviders.get(def);\n    if (mock && typeof mock !== 'string' && isNgDef(mock, 't') === false) {\n      providers.push(mock);\n      touched = true;\n    }\n  }\n\n  if (touched) {\n    markExported(def);\n    ngMocksUniverse.touches.add(def);\n  }\n};\n\nconst isExportedOnRoot = (\n  def: any,\n  configInstance: Map<any, { exported?: Set<any> }>,\n  configDef: Map<any, any>,\n): undefined | Type<any> => {\n  const cnfInstance = configInstance.get(def);\n  const cnfDef = configDef.get(def) || /* istanbul ignore next */ {};\n\n  if (isNgDef(def, 'm') && cnfDef.onRoot) {\n    return def;\n  }\n\n  if (!cnfInstance?.exported) {\n    return def;\n  }\n\n  for (const parent of mapValues(cnfInstance.exported)) {\n    const returnModule = isExportedOnRoot(parent, configInstance, configDef);\n    // istanbul ignore else\n    if (returnModule) {\n      return returnModule;\n    }\n  }\n\n  return undefined;\n};\n\nconst moveModulesUp = <T>(a: T, b: T) => {\n  const isA = isNgDef(a, 'm');\n  const isB = isNgDef(b, 'm');\n  if (isA && isB) {\n    return 0;\n  }\n  if (isA) {\n    return -1;\n  }\n  if (isB) {\n    return 1;\n  }\n  return 0;\n};\n\nexport default ({ configDefault, keepDef, mockDef, replaceDef }: BuilderData, defProviders: Map<any, any>): NgMeta => {\n  const meta: NgMeta = { imports: [], declarations: [], providers: [] };\n\n  const processed: AnyDeclaration<any>[] = [];\n  const forgotten: AnyDeclaration<any>[] = [];\n\n  const defs = [...mapValues(mockDef), ...mapValues(keepDef), ...mapValues(replaceDef)];\n  defs.sort(moveModulesUp);\n\n  // Adding suitable leftovers.\n  for (const originalDef of defs) {\n    const def =\n      isNgDef(originalDef, 'm') && defProviders.has(originalDef)\n        ? originalDef\n        : isExportedOnRoot(originalDef, ngMocksUniverse.configInstance, ngMocksUniverse.config);\n    if (!def || processed.indexOf(def) !== -1) {\n      continue;\n    }\n    const cnfDef = ngMocksUniverse.config.get(def) || /* istanbul ignore next */ { __set: true };\n    processed.push(def);\n    cnfDef.onRoot = cnfDef.onRoot || !cnfDef.dependency;\n    // istanbul ignore if\n    if (cnfDef.__set) {\n      cnfDef.__set = undefined;\n      ngMocksUniverse.config.set(def, cnfDef);\n    }\n\n    if (isNgDef(def, 'm') && cnfDef.onRoot) {\n      handleDef(meta, def, defProviders);\n    } else if (!cnfDef.dependency && cnfDef.export && (isNgDef(def, 'i') || !isNgDef(def))) {\n      handleDef(meta, def, defProviders);\n      markProviders([def]);\n    } else if (!cnfDef.dependency && cnfDef.export) {\n      handleDef(meta, def, defProviders);\n    } else if (!ngMocksUniverse.touches.has(def) && !cnfDef.dependency) {\n      handleDef(meta, def, defProviders);\n    } else if (\n      cnfDef.dependency &&\n      configDefault.dependency &&\n      coreReflectProvidedIn(def) !== 'root' &&\n      (typeof def !== 'object' || !(def as any).__ngMocksSkip)\n    ) {\n      forgotten.push(def);\n    }\n  }\n\n  // Checking missing dependencies\n  const globalFlags = ngMocksUniverse.global.get('flags');\n  for (const def of forgotten) {\n    if (ngMocksUniverse.touches.has(def)) {\n      continue;\n    }\n\n    const depName = funcGetName(def);\n    const errorMessages = ['Error:'];\n    const defStr = ngMocksUniverse.getResolution(def);\n\n    if (depName === 'Object') {\n      errorMessages.push(\n        `A provider object has been incorrectly passed to the`,\n        `MockerBuilder ${defStr}() method. Did you mean to use`,\n        `MockerBuilder.provide()?`,\n      );\n    } else {\n      errorMessages.push(\n        `MockBuilder has found a missing dependency: ${depName}.`,\n        'It means no module provides it.',\n        'Please, use the \"export\" flag if you want to add it explicitly.',\n        'https://ng-mocks.sudo.eu/api/MockBuilder#export-flag',\n      );\n    }\n\n    const errorMessage = errorMessages.join(' ');\n\n    if (globalFlags.onMockBuilderMissingDependency === 'warn') {\n      console.warn(errorMessage);\n    } else if (globalFlags.onMockBuilderMissingDependency === 'throw') {\n      throw new Error(errorMessage);\n    }\n  }\n\n  return meta;\n};\n","import collectDeclarations from '../resolve/collect-declarations';\n\nimport coreConfig from './core.config';\nimport { flatten } from './core.helpers';\nimport { AnyDeclaration } from './core.types';\nimport { getNgType } from './func.get-ng-type';\nimport funcGetType from './func.get-type';\n\nexport const funcExtractDeps = (\n  def: any,\n  result: Set<AnyDeclaration<any>>,\n  recursive = false,\n): Set<AnyDeclaration<any>> => {\n  const meta = collectDeclarations(def);\n  const type = getNgType(def);\n  // istanbul ignore if\n  if (!type || type === 'Injectable') {\n    return result;\n  }\n\n  const decorator = meta[type];\n  for (const field of coreConfig.dependencies) {\n    if (!decorator[field]) {\n      continue;\n    }\n\n    for (const item of flatten(decorator[field])) {\n      // istanbul ignore if: it is here for standalone things, however they don't support modules with providers.\n      const itemType = funcGetType(item);\n      if (!result.has(itemType)) {\n        result.add(itemType);\n        if (recursive) {\n          funcExtractDeps(itemType, result);\n        }\n      }\n    }\n  }\n\n  return result;\n};\n","import { mapValues } from '../../common/core.helpers';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nexport default (excludeDef: Set<any>): void => {\n  const builtDeclarations = ngMocksUniverse.builtDeclarations;\n  const builtProviders = ngMocksUniverse.builtProviders;\n  const resolutions = ngMocksUniverse.config.get('ngMocksDepsResolution');\n  for (const def of mapValues(excludeDef)) {\n    builtDeclarations.set(def, null);\n    builtProviders.set(def, null);\n    resolutions.set(def, 'exclude');\n  }\n};\n","import { mapValues } from '../../common/core.helpers';\nimport { funcExtractDeps } from '../../common/func.extract-deps';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nexport default (keepDef: Set<any>, configDef: Map<any, any>): Set<any> => {\n  const dependencies = new Set<any>();\n  const builtDeclarations = ngMocksUniverse.builtDeclarations;\n  const builtProviders = ngMocksUniverse.builtProviders;\n  const resolutions = ngMocksUniverse.config.get('ngMocksDepsResolution');\n  for (const def of mapValues(keepDef)) {\n    builtDeclarations.set(def, def);\n    builtProviders.set(def, def);\n    resolutions.set(def, 'keep');\n\n    const config = configDef.get(def);\n    if (config.shallow) {\n      funcExtractDeps(def, dependencies);\n    }\n  }\n\n  return dependencies;\n};\n","import { isNgDef } from '../../common/func.is-ng-def';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\nimport mockHelperStub from '../../mock-helper/mock-helper.stub';\nimport helperUseFactory from '../../mock-service/helper.use-factory';\nimport mockProvider from '../../mock-service/mock-provider';\nimport { IMockBuilderConfigMock } from '../types';\n\nconst createInstance = (existing: any, params: any, config: IMockBuilderConfigMock): any => {\n  if (config.precise) {\n    return params;\n  }\n\n  return mockHelperStub(existing, params);\n};\n\nexport default (def: any, defValue: Map<any, any>): void => {\n  if (isNgDef(def, 'i') && defValue.has(def)) {\n    const config: IMockBuilderConfigMock = ngMocksUniverse.config.get(def);\n    const instance = defValue.get(def);\n    ngMocksUniverse.builtProviders.set(\n      def,\n      helperUseFactory(def, undefined, existing => createInstance(existing, instance, config)),\n    );\n  } else if (isNgDef(def, 'i')) {\n    ngMocksUniverse.builtProviders.set(def, mockProvider(def, true));\n  }\n\n  if (!isNgDef(def) && defValue.has(def)) {\n    const instance = defValue.get(def);\n    ngMocksUniverse.builtProviders.set(\n      def,\n      helperUseFactory(def, undefined, () => instance),\n    );\n  } else if (!isNgDef(def)) {\n    ngMocksUniverse.builtProviders.set(def, mockProvider(def, true));\n  }\n};\n","import { mapValues } from '../../common/core.helpers';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nimport tryMockProvider from './try-mock-provider';\n\nexport default (mockDef: Set<any>, defValue: Map<any, any>): void => {\n  const builtDeclarations = ngMocksUniverse.builtDeclarations;\n  const resolutions: Map<any, string> = ngMocksUniverse.config.get('ngMocksDepsResolution');\n  for (const def of mapValues(mockDef)) {\n    const deleteTouch = !ngMocksUniverse.touches.has(def);\n\n    resolutions.set(def, 'mock');\n    builtDeclarations.set(def, undefined);\n    tryMockProvider(def, defValue);\n\n    if (deleteTouch) {\n      ngMocksUniverse.touches.delete(def);\n    }\n  }\n};\n","import { isNgDef } from '../../common/func.is-ng-def';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\nimport { MockComponent } from '../../mock-component/mock-component';\nimport { MockDirective } from '../../mock-directive/mock-directive';\nimport { MockPipe } from '../../mock-pipe/mock-pipe';\n\nexport default (def: any): void => {\n  if (ngMocksUniverse.builtDeclarations.get(def) !== undefined) {\n    return;\n  }\n\n  if (isNgDef(def, 'c')) {\n    ngMocksUniverse.builtDeclarations.set(def, MockComponent(def));\n  }\n  if (isNgDef(def, 'd')) {\n    ngMocksUniverse.builtDeclarations.set(def, MockDirective(def));\n  }\n  if (isNgDef(def, 'p')) {\n    ngMocksUniverse.builtDeclarations.set(def, MockPipe(def));\n  }\n};\n","import { mapValues } from '../../common/core.helpers';\nimport { isNgDef } from '../../common/func.is-ng-def';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\nimport { MockModule } from '../../mock-module/mock-module';\nimport mockNgDef from '../../mock-module/mock-ng-def';\nimport collectDeclarations from '../../resolve/collect-declarations';\n\nimport tryMockDeclaration from './try-mock-declaration';\n\nexport default (\n  keepDef: Set<any>,\n  mockDef: Set<any>,\n  replaceDef: Set<any>,\n  defProviders: Map<any, any>,\n): Map<any, any> => {\n  const loProviders = new Map();\n\n  for (const def of [...mapValues(keepDef), ...mapValues(mockDef), ...mapValues(replaceDef)]) {\n    const meta = collectDeclarations(def);\n    const providers = [\n      ...(defProviders.get(def) ?? []),\n      ...(meta.Component?.providers ?? []),\n      ...(meta.Directive?.providers ?? []),\n    ];\n\n    const deleteTouch = !ngMocksUniverse.touches.has(def);\n    if (!mockDef.has(def)) {\n      ngMocksUniverse.flags.add('skipMock');\n    }\n\n    const isModule = isNgDef(def, 'm');\n    if (providers.length > 0) {\n      const [, loDef] = mockNgDef({ providers, skipMarkProviders: !isModule, skipExports: true });\n      loProviders.set(def, loDef.providers);\n    }\n    if (isModule) {\n      ngMocksUniverse.builtDeclarations.set(def, MockModule(def));\n    }\n\n    ngMocksUniverse.flags.delete('skipMock');\n    if (deleteTouch) {\n      ngMocksUniverse.touches.delete(def);\n    }\n  }\n  for (const def of mapValues(mockDef)) {\n    tryMockDeclaration(def);\n  }\n\n  return loProviders;\n};\n","import { mapValues } from '../../common/core.helpers';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nexport default (replaceDef: Set<any>, defValue: Map<any, any>): void => {\n  const builtDeclarations = ngMocksUniverse.builtDeclarations;\n  const resolutions = ngMocksUniverse.config.get('ngMocksDepsResolution');\n  for (const def of mapValues(replaceDef)) {\n    builtDeclarations.set(def, defValue.get(def));\n    resolutions.set(def, 'replace');\n  }\n};\n","import { mapEntries, mapValues } from '../../common/core.helpers';\nimport { funcExtractDeps } from '../../common/func.extract-deps';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nimport initExcludeDef from './init-exclude-def';\nimport initKeepDef from './init-keep-def';\nimport initMockDeclarations from './init-mock-declarations';\nimport initModules from './init-modules';\nimport initReplaceDef from './init-replace-def';\nimport { BuilderData } from './types';\n\nexport default ({\n  configDef,\n  defProviders,\n  defValue,\n  excludeDef,\n  keepDef,\n  mockDef,\n  replaceDef,\n}: BuilderData): Map<any, any> => {\n  ngMocksUniverse.flags.add('cachePipe');\n\n  // collecting multi flags of providers.\n  ngMocksUniverse.config.set('ngMocksMulti', new Set());\n  // collecting all deps of providers.\n  ngMocksUniverse.config.set('ngMocksDeps', new Set());\n  // collecting all declarations of kept modules.\n  ngMocksUniverse.config.set('ngMocksDepsSkip', new Set());\n  // flags to understand how to mock nested declarations.\n  ngMocksUniverse.config.set('ngMocksDepsResolution', new Map());\n\n  const dependencies = initKeepDef(keepDef, configDef);\n  for (const dependency of mapValues(dependencies)) {\n    ngMocksUniverse.touches.add(dependency);\n  }\n  for (const dependency of mapValues(keepDef)) {\n    dependencies.add(dependency);\n    funcExtractDeps(dependency, dependencies, true);\n  }\n  for (const dependency of mapValues(mockDef)) {\n    dependencies.add(dependency);\n    funcExtractDeps(dependency, dependencies, true);\n  }\n  for (const dependency of mapValues(replaceDef)) {\n    dependencies.add(dependency);\n    funcExtractDeps(dependency, dependencies, true);\n  }\n  for (const dependency of mapValues(dependencies)) {\n    if (configDef.has(dependency)) {\n      continue;\n    }\n\n    // Checking global configuration for the dependency.\n    const resolution = ngMocksUniverse.getResolution(dependency);\n    if (resolution === 'replace') {\n      replaceDef.add(dependency);\n      defValue.set(dependency, ngMocksUniverse.getBuildDeclaration(dependency));\n    } else if (resolution === 'keep') {\n      keepDef.add(dependency);\n    } else if (resolution === 'exclude') {\n      excludeDef.add(dependency);\n    } else if (resolution === 'mock') {\n      mockDef.add(dependency);\n    } else if (ngMocksUniverse.touches.has(dependency)) {\n      mockDef.add(dependency);\n    }\n\n    configDef.set(\n      dependency,\n      ngMocksUniverse.touches.has(dependency)\n        ? {\n            dependency: true,\n            __internal: true,\n          }\n        : {},\n    );\n  }\n\n  for (const [k, v] of mapEntries(configDef)) {\n    ngMocksUniverse.config.set(k, {\n      ...ngMocksUniverse.getConfigMock().get(k),\n      ...v,\n      defValue: defValue.get(k),\n    });\n  }\n\n  initReplaceDef(replaceDef, defValue);\n  initExcludeDef(excludeDef);\n  initMockDeclarations(mockDef, defValue);\n\n  return initModules(keepDef, mockDef, replaceDef, defProviders);\n};\n","import { isNgDef } from '../../common/func.is-ng-def';\n\nexport default (\n  def: any,\n  a1: any,\n  a2: any,\n  defaultMockValue: any,\n): {\n  config: any;\n  mock: any;\n} => {\n  let mock: any = def === a1 ? defaultMockValue : a1;\n  let config: any = a2 ?? (a1 !== defaultMockValue && typeof a1 === 'object' ? a1 : undefined);\n  if (isNgDef(def, 'p') && typeof a1 === 'function' && a1 !== def && !isNgDef(a1, 'p')) {\n    mock = {\n      transform: a1,\n    };\n    config = a2;\n  } else if (isNgDef(def, 'i') || !isNgDef(def)) {\n    config = a2;\n  }\n  mock = mock === config ? defaultMockValue : mock;\n\n  return {\n    config,\n    mock,\n  };\n};\n","import funcGetType from '../../common/func.get-type';\n\nexport default (\n  provider: any,\n): {\n  multi: boolean;\n  provide: any;\n} => {\n  const provide = funcGetType(provider);\n  const multi = provide !== provider && provider.multi;\n\n  return {\n    multi,\n    provide,\n  };\n};\n","import { NgModule } from '@angular/core';\nimport { TestBed, TestBedStatic, TestModuleMetadata } from '@angular/core/testing';\n\nimport CoreDefStack from '../common/core.def-stack';\nimport { flatten, mapValues } from '../common/core.helpers';\nimport { Type } from '../common/core.types';\nimport funcGetName from '../common/func.get-name';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport { isNgModuleDefWithProviders } from '../common/func.is-ng-module-def-with-providers';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport { MockBuilder } from './mock-builder';\nimport { MockBuilderStash } from './mock-builder-stash';\nimport addRequestedProviders from './promise/add-requested-providers';\nimport applyPlatformModules from './promise/apply-platform-modules';\nimport createNgMocksOverridesToken from './promise/create-ng-mocks-overrides-token';\nimport createNgMocksToken from './promise/create-ng-mocks-token';\nimport createNgMocksTouchesToken from './promise/create-ng-mocks-touches-token';\nimport handleEntryComponents from './promise/handle-entry-components';\nimport handleRootProviders from './promise/handle-root-providers';\nimport initNgModules from './promise/init-ng-modules';\nimport initUniverse from './promise/init-universe';\nimport parseMockArguments from './promise/parse-mock-arguments';\nimport parseProvider from './promise/parse-provider';\nimport { BuilderData } from './promise/types';\nimport {\n  IMockBuilder,\n  IMockBuilderConfig,\n  IMockBuilderConfigAll,\n  IMockBuilderProvider,\n  IMockBuilderResult,\n} from './types';\n\nconst normaliseModule = (\n  module: any,\n): {\n  def: Type<any>;\n  providers?: NgModule['providers'];\n} =>\n  isNgModuleDefWithProviders(module)\n    ? { def: module.ngModule, providers: module.providers }\n    : { def: module, providers: undefined };\n\nconst generateProviderValue = (provider: any, existing: any, multi: boolean): any =>\n  multi ? [...(Array.isArray(existing) ? existing : /* istanbul ignore next */ []), provider] : provider;\n\nconst defaultMock = {}; // simulating Symbol\n\nexport interface MockBuilderPromise {\n  [Symbol.toStringTag]: 'Promise';\n}\n\nexport class MockBuilderPromise implements IMockBuilder {\n  protected beforeCC: Set<(testBed: TestBedStatic) => void> = new Set();\n  protected configDef: BuilderData['configDef'] = new Map();\n  protected defProviders: BuilderData['defProviders'] = new Map();\n  protected defValue: BuilderData['defValue'] = new Map();\n  protected excludeDef: BuilderData['excludeDef'] = new Set();\n  protected keepDef: BuilderData['keepDef'] = new Set();\n  protected mockDef: BuilderData['mockDef'] = new Set();\n  protected providerDef: BuilderData['providerDef'] = new Map();\n  protected replaceDef: BuilderData['replaceDef'] = new Set();\n  protected stash: MockBuilderStash = new MockBuilderStash();\n\n  public constructor(protected configDefault: IMockBuilderConfigAll) {\n    // istanbul ignore else\n    if (typeof Symbol !== 'undefined') {\n      (this as any)[Symbol.toStringTag] = 'Promise';\n    }\n  }\n\n  public beforeCompileComponents(callback: (testBed: TestBedStatic) => void): this {\n    this.beforeCC.add(callback);\n\n    return this;\n  }\n\n  public build(): TestModuleMetadata {\n    this.stash.backup();\n    const defStack = new CoreDefStack();\n    ngMocksUniverse.config.set('mockNgDefResolver', defStack);\n    ngMocksUniverse.flags.add('hasRootModule');\n\n    try {\n      const params = this.combineParams();\n\n      const ngModule = initNgModules(params, initUniverse(params));\n      addRequestedProviders(ngModule, params, defStack);\n      handleRootProviders(ngModule, params, defStack);\n      handleEntryComponents(ngModule);\n      applyPlatformModules();\n\n      ngModule.providers.push(\n        createNgMocksToken(),\n        createNgMocksTouchesToken(),\n        createNgMocksOverridesToken(this.replaceDef, this.defValue),\n        MockBuilder as never,\n      );\n\n      return ngModule;\n    } finally {\n      ngMocksUniverse.flags.delete('hasRootModule');\n      ngMocksUniverse.config.delete('mockNgDefResolver');\n      this.stash.restore();\n    }\n  }\n\n  // istanbul ignore next\n  public async catch(reject?: ((reason: any) => PromiseLike<never>) | undefined | null): Promise<IMockBuilderResult> {\n    return this.then().catch(reject);\n  }\n\n  public exclude(def: any): this {\n    this.wipe(def);\n    this.excludeDef.add(def);\n    this.setConfigDef(def);\n\n    return this;\n  }\n\n  // istanbul ignore next\n  public async finally(callback?: (() => void) | null | undefined): Promise<IMockBuilderResult> {\n    return this.then().finally(callback);\n  }\n\n  public keep(input: any, config?: IMockBuilderConfig): this {\n    const { def, providers } = normaliseModule(input);\n\n    const existing = this.keepDef.has(def) ? this.defProviders.get(def) : [];\n    this.wipe(def);\n    this.keepDef.add(def);\n\n    // a magic to support modules with providers.\n    if (providers) {\n      this.defProviders.set(def, [...(existing || /* istanbul ignore next */ []), ...providers]);\n    }\n\n    this.setConfigDef(def, config);\n\n    return this;\n  }\n\n  public mock(input: any, a1: any = defaultMock, a2?: any): this {\n    const { def, providers } = normaliseModule(input);\n\n    const { config, mock } = parseMockArguments(def, a1, a2, defaultMock);\n    if (isNgDef(mock) && isNgDef(input) && !isNgDef(input, 't')) {\n      throw new Error(\n        [\n          `MockBuilder.mock(${funcGetName(input)}) received a class when its shape is expected.`,\n          'Please try ngMocks.defaultMock instead.',\n        ].join(' '),\n      );\n    }\n\n    const existing = this.mockDef.has(def) ? this.defProviders.get(def) : [];\n    this.wipe(def);\n    this.mockDef.add(def);\n\n    // a magic to support modules with providers.\n    if (providers) {\n      this.defProviders.set(def, [...(existing || /* istanbul ignore next */ []), ...providers]);\n    }\n\n    this.setDefValue(def, mock);\n    this.setConfigDef(def, config);\n\n    return this;\n  }\n\n  public provide(def: IMockBuilderProvider): this {\n    for (const provider of flatten(def)) {\n      const { provide, multi } = parseProvider(provider);\n      const existing = this.providerDef.has(provide) ? this.providerDef.get(provide) : [];\n      this.providerDef.set(provide, generateProviderValue(provider, existing, multi));\n    }\n\n    return this;\n  }\n\n  public replace(source: Type<any>, destination: Type<any>, config?: IMockBuilderConfig): this {\n    if (!isNgDef(destination) || !isNgDef(source) || isNgDef(destination, 'i') || isNgDef(source, 'i')) {\n      throw new Error(\n        'Cannot replace the declaration, both have to be a Module, a Component, a Directive or a Pipe, for Providers use `.mock` or `.provide`',\n      );\n    }\n\n    this.wipe(source);\n    this.replaceDef.add(source);\n    this.defValue.set(source, destination);\n    this.setConfigDef(source, config);\n\n    return this;\n  }\n\n  // eslint-disable-next-line unicorn/no-thenable\n  public async then<TResult1 = IMockBuilderResult>(\n    fulfill?: ((value: IMockBuilderResult) => PromiseLike<TResult1>) | undefined | null,\n    reject?: ((reason: any) => PromiseLike<any>) | undefined | null,\n  ): Promise<TResult1> {\n    const promise = new Promise((resolve: (value: IMockBuilderResult) => void): void => {\n      const testBed: TestBedStatic = TestBed.configureTestingModule(this.build()) as never;\n      for (const callback of mapValues(this.beforeCC)) {\n        callback(testBed);\n      }\n      const testBedPromise = testBed.compileComponents();\n      testBedPromise.then(() => {\n        resolve({ testBed });\n      });\n    });\n\n    return promise.then(fulfill, reject);\n  }\n\n  private combineParams(): BuilderData {\n    return {\n      configDef: this.configDef,\n      configDefault: this.configDefault,\n      defProviders: this.defProviders,\n      defValue: this.defValue,\n      excludeDef: this.excludeDef,\n      keepDef: this.keepDef,\n      mockDef: this.mockDef,\n      providerDef: this.providerDef,\n      replaceDef: this.replaceDef,\n    };\n  }\n\n  private setConfigDef(def: any, config?: any): void {\n    if (config || !this.configDef.has(def)) {\n      this.configDef.set(def, config ?? this.configDefault);\n    }\n  }\n\n  private setDefValue(def: any, mock: any): void {\n    if (mock === defaultMock) {\n      this.defValue.delete(def);\n    } else {\n      this.defValue.set(def, mock);\n    }\n  }\n\n  private wipe(def: Type<any>): void {\n    this.defProviders.delete(def);\n    this.defValue.delete(def);\n    this.excludeDef.delete(def);\n    this.keepDef.delete(def);\n    this.mockDef.delete(def);\n    this.providerDef.delete(def);\n    this.replaceDef.delete(def);\n  }\n}\n","const objectsDiffer = (prototype: any, source: any): boolean => {\n  const prototypeKeys = Object.keys(prototype);\n  const sourceKeys = Object.keys(source);\n  if (prototypeKeys.length !== sourceKeys.length) {\n    return true;\n  }\n  for (const key of prototypeKeys) {\n    if (prototype[key] !== source[key]) {\n      return true;\n    }\n  }\n\n  return false;\n};\n\nexport default (prototype: any, source: any): boolean => {\n  if (prototype === source) {\n    return true;\n  }\n  if ((prototype && !source) || (!prototype && source)) {\n    return false;\n  }\n  if (objectsDiffer(prototype, source)) {\n    return false;\n  }\n\n  return true;\n};\n","import equalVariables from './equal-variables';\n\nexport default (prototype: any, source: any): boolean => {\n  if (prototype === source) {\n    return true;\n  }\n  if ((typeof prototype === 'boolean' || typeof source === 'boolean') && prototype !== source) {\n    return false;\n  }\n\n  return prototype.$implicit === source.$implicit && equalVariables(prototype.variables, source.variables);\n};\n","import equalRenderDefs from './equal-render-defs';\n\nconst objectsDiffer = (destination: any, source: any): boolean => {\n  if (Object.keys(destination).length !== Object.keys(source).length) {\n    return true;\n  }\n  for (const key of Object.keys(destination)) {\n    if (!equalRenderDefs(destination[key], source[key])) {\n      return true;\n    }\n  }\n\n  return false;\n};\n\nexport default (source: any, destination: any): boolean => {\n  if (!equalRenderDefs(destination, source)) {\n    return false;\n  }\n  if (typeof destination !== 'object' || typeof source !== 'object') {\n    return true;\n  }\n  if (objectsDiffer(destination, source)) {\n    return false;\n  }\n\n  return true;\n};\n","import equalRenderConfigs from './equal-render-configs';\n\nexport default (source: any, destination: any): boolean => {\n  if (destination === source) {\n    return true;\n  }\n  if (destination.dependency !== source.dependency) {\n    return false;\n  }\n  if (destination.export !== source.export) {\n    return false;\n  }\n  if (destination.exportAll !== source.exportAll) {\n    return false;\n  }\n  if (!equalRenderConfigs(source.render, destination.render)) {\n    return false;\n  }\n\n  return true;\n};\n","import { mapKeys } from '../../common/core.helpers';\n\nexport default (source: Map<any, any>, destination: Map<any, any>, compare = (a: any, b: any) => a === b): boolean => {\n  if (!destination || destination.size !== source.size) {\n    return false;\n  }\n  for (const value of mapKeys(source)) {\n    if (!destination.has(value)) {\n      return false;\n    }\n    if (!compare(destination.get(value), source.get(value))) {\n      return false;\n    }\n  }\n\n  return true;\n};\n","import { flatten } from '../../common/core.helpers';\n\nconst areEqualProviderDefs = (thisDef: any, prototypeDef: any, ...keys: string[]) => {\n  for (const key of keys) {\n    if (prototypeDef && thisDef && prototypeDef[key] && thisDef[key] && prototypeDef[key] === thisDef[key]) {\n      return true;\n    }\n  }\n\n  return prototypeDef === thisDef;\n};\n\nexport default (prototype: any, source: any): boolean => {\n  if (Array.isArray(prototype) !== Array.isArray(source)) {\n    return false;\n  }\n\n  const [prototypeDefs, thisDefs] = [flatten(prototype), flatten(source)];\n  if (prototypeDefs.length !== thisDefs.length) {\n    return false;\n  }\n\n  for (let index = 0; index < prototypeDefs.length; index += 1) {\n    const [prototypeDef, thisDef] = [prototypeDefs[index], thisDefs[index]];\n\n    if (prototypeDef && thisDef && prototypeDef.multi !== thisDef.multi) {\n      return false;\n    }\n    if (areEqualProviderDefs(thisDef, prototypeDef, 'useValue', 'useClass', 'useFactory', 'useExisting')) {\n      continue;\n    }\n\n    return false;\n  }\n\n  return true;\n};\n","import { mapValues } from '../../common/core.helpers';\n\nexport default (source: Set<any>, destination: Set<any>): boolean => {\n  if (!destination || destination.size !== source.size) {\n    return false;\n  }\n  for (const value of mapValues(source)) {\n    if (!destination.has(value)) {\n      return false;\n    }\n  }\n\n  return true;\n};\n","export default () => ({\n  beforeCC: new Set(),\n  configDef: new Map(),\n  defProviders: new Map(),\n  defValue: new Map(),\n  excludeDef: new Set(),\n  keepDef: new Set(),\n  mockDef: new Set(),\n  providerDef: new Map(),\n  replaceDef: new Set(),\n});\n","import { TestModuleMetadata } from '@angular/core/testing';\n\nexport default (\n  ngModule: TestModuleMetadata,\n): TestModuleMetadata & {\n  declarations: any[];\n  imports: any[];\n  providers: any[];\n} => ({\n  ...ngModule,\n  declarations: [...(ngModule.declarations || /* istanbul ignore next */ [])],\n  imports: [...(ngModule.imports || /* istanbul ignore next */ [])],\n  providers: [...(ngModule.providers || /* istanbul ignore next */ [])],\n});\n","import { TestBed, TestModuleMetadata } from '@angular/core/testing';\n\nimport { mapEntries, mapValues } from '../common/core.helpers';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport { MockBuilderPromise } from './mock-builder.promise';\nimport areEqualConfigParams from './performance/are-equal-config-params';\nimport areEqualMaps from './performance/are-equal-maps';\nimport areEqualProviders from './performance/are-equal-providers';\nimport areEqualSets from './performance/are-equal-sets';\nimport getEmptyConfig from './performance/get-empty-config';\nimport requiredMetadata from './performance/required-metadata';\nimport { IMockBuilderResult } from './types';\n\nexport class MockBuilderPerformance extends MockBuilderPromise {\n  public build(): TestModuleMetadata {\n    const global = ngMocksUniverse.global;\n\n    // avoiding influences on cache when users extend the testing module.\n    if (global.has('builder:module') && global.has('builder:config') && this.equalsTo(global.get('builder:config'))) {\n      return requiredMetadata(global.get('builder:module'));\n    }\n\n    // removal of cached promise in case of mismatch\n    if (global.has('builder:module')) {\n      global.delete(global.get('builder:module'));\n    }\n\n    const clone = this.cloneConfig();\n    const ngModule = super.build();\n    global.set('builder:config', clone);\n    global.set('builder:module', ngModule);\n\n    // avoiding influences on cache when users extend the testing module.\n    return requiredMetadata(ngModule);\n  }\n\n  // eslint-disable-next-line unicorn/no-thenable\n  public async then<TResult1 = IMockBuilderResult>(\n    fulfill?: ((value: IMockBuilderResult) => PromiseLike<TResult1>) | undefined | null,\n    reject?: ((reason: any) => PromiseLike<never>) | undefined | null,\n  ): Promise<TResult1> {\n    const global = ngMocksUniverse.global;\n\n    const flags = global.has('bullet') && global.has('builder:module') && global.has('builder:config');\n    if (flags && this.equalsTo(global.get('builder:config'))) {\n      return global.get(global.get('builder:module')).then(fulfill, reject);\n    }\n\n    // we need to reset testing module in case if we are in bullet mode but current module does not match.\n    if (global.has('bullet') && global.has('bullet:reset')) {\n      console.warn('ngMocks.faster has zero effect due to changes in testing module between runs');\n      global.delete('bullet');\n      TestBed.resetTestingModule();\n      global.set('bullet', true);\n    }\n\n    const promise = super.then(fulfill, reject);\n    global.set(global.get('builder:module'), promise);\n\n    return promise;\n  }\n\n  private cloneConfig() {\n    const config = getEmptyConfig();\n\n    mapValues(this.beforeCC, config.beforeCC);\n    mapValues(this.excludeDef, config.excludeDef);\n    mapValues(this.keepDef, config.keepDef);\n    mapValues(this.mockDef, config.mockDef);\n    mapValues(this.replaceDef, config.replaceDef);\n\n    mapEntries(this.configDef, config.configDef);\n    mapEntries(this.defProviders, config.defProviders);\n    mapEntries(this.defValue, config.defValue);\n    mapEntries(this.providerDef, config.providerDef);\n\n    return config;\n  }\n\n  private equalsTo(prototype: Record<keyof any, any>): boolean {\n    for (const key of ['beforeCC', 'keepDef', 'replaceDef', 'excludeDef', 'mockDef']) {\n      if (!areEqualSets((this as any)[key], prototype[key])) {\n        return false;\n      }\n    }\n    for (const key of ['defValue']) {\n      if (!areEqualMaps((this as any)[key], prototype[key])) {\n        return false;\n      }\n    }\n    for (const key of ['providerDef', 'defProviders']) {\n      if (!areEqualMaps((this as any)[key], prototype[key], areEqualProviders)) {\n        return false;\n      }\n    }\n\n    return areEqualMaps(this.configDef, prototype.configDef, areEqualConfigParams);\n  }\n}\n","import coreDefineProperty from '../common/core.define-property';\nimport { flatten, mapKeys } from '../common/core.helpers';\nimport { AnyDeclaration } from '../common/core.types';\nimport { NgModuleWithProviders } from '../common/func.is-ng-module-def-with-providers';\nimport { isStandalone } from '../common/func.is-standalone';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport helperExtractPropertyDescriptor from '../mock-service/helper.extract-property-descriptor';\n\nimport { MockBuilderPerformance } from './mock-builder.performance';\nimport { IMockBuilder, IMockBuilderExtended } from './types';\n\nexport type MockBuilderParam = string | AnyDeclaration<any> | NgModuleWithProviders;\n\n/**\n * MockBuilder provides reach and simple interfaces of chain functions\n * to build desired mock environment for tests.\n *\n * @see https://ng-mocks.sudo.eu/api/MockBuilder\n */\nexport function MockBuilder(\n  keepDeclaration?: MockBuilderParam | MockBuilderParam[] | null | undefined,\n  itsModuleAndDependenciesToMock?: MockBuilderParam | MockBuilderParam[] | null | undefined,\n): IMockBuilderExtended;\n\nexport function MockBuilder(...args: Array<MockBuilderParam | MockBuilderParam[] | null | undefined>): IMockBuilder {\n  const [keep, mock] = args;\n\n  const instance = new MockBuilderPerformance(args.length < 2 ? { export: true } : { dependency: true });\n  const extensions: Map<any, any> = ngMocksUniverse.config.get('MockBuilderExtensions');\n  for (const func of extensions ? mapKeys(extensions) : []) {\n    if (helperExtractPropertyDescriptor(instance, func)) {\n      throw new Error(`MockBuilder.${func} is a base method and cannot be customized, please use a different name.`);\n    }\n    coreDefineProperty(instance, func, (...args: Array<any>) => {\n      extensions.get(func)(instance, args);\n      return instance;\n    });\n  }\n\n  if (keep) {\n    for (const declaration of flatten(keep)) {\n      instance.keep(declaration, {\n        export: true,\n        shallow: isStandalone(declaration),\n      });\n    }\n  }\n  if (mock) {\n    for (const declaration of flatten(mock)) {\n      instance.mock(declaration, declaration, {\n        export: true,\n        exportAll: true,\n      });\n    }\n  }\n\n  return instance;\n}\n\nfunction mockBuilderExtend<K extends keyof IMockBuilderExtended & string>(\n  func: K,\n  callback?: (builder: IMockBuilderExtended, parameters: never) => void,\n): void {\n  const extensions: Map<string, typeof callback> = ngMocksUniverse.config.get('MockBuilderExtensions') ?? new Map();\n  if (callback) {\n    extensions.set(func, callback);\n    ngMocksUniverse.config.set('MockBuilderExtensions', extensions);\n  } else {\n    extensions.delete(func);\n  }\n}\n\n// istanbul ignore next: issue in istanbul https://github.com/istanbuljs/nyc/issues/1209\nexport namespace MockBuilder {\n  /**\n   * Adds a custom function to MockBuilder\n   */\n  export function extend<K extends keyof IMockBuilderExtended & string>(\n    func: K,\n    callback: (builder: IMockBuilderExtended, parameters: never) => void,\n  ): void;\n\n  /**\n   * Removes a custom function from MockBuilder\n   */\n  export function extend<K extends keyof IMockBuilderExtended & string>(func: K): void;\n\n  export function extend<K extends keyof IMockBuilderExtended & string>(\n    func: K,\n    callback?: (builder: IMockBuilderExtended, parameters: never) => void,\n  ): void {\n    mockBuilderExtend(func, callback);\n  }\n}\n","import { MockedDebugNode } from '../../mock-render/types';\n\nexport default (value: any): value is MockedDebugNode => {\n  return !!value?.nativeElement || !!value?.nativeNode;\n};\n","import { AnyType, DebugNodeSelector } from '../common/core.types';\nimport { isNgDef } from '../common/func.is-ng-def';\n\nexport default (selector: AnyType<any> | DebugNodeSelector): string => {\n  if (typeof selector === 'string') {\n    return selector;\n  }\n  if (typeof selector === 'function') {\n    return selector.name;\n  }\n  if (isNgDef(selector, 't')) {\n    return (selector as any)._desc;\n  }\n  if (Array.isArray(selector)) {\n    return selector[0];\n  }\n  if (!selector) {\n    return '<EMPTY>';\n  }\n\n  return '<UNKNOWN>';\n};\n","import { MockedDebugNode } from '../../mock-render/types';\n\nexport default (value: any): value is { debugElement: MockedDebugNode } => {\n  return !!value && typeof value === 'object' && value.debugElement !== undefined;\n};\n","import { DebugElement } from '@angular/core';\n\nimport isFixture from '../format/is-fixture';\nimport funcGetLastFixture from '../func.get-last-fixture';\n\nconst findDebugElement = (el: any): DebugElement | undefined => {\n  if (isFixture(el)) {\n    return findDebugElement(el.debugElement);\n  }\n  if (el && el.injector && el.query) {\n    return el;\n  }\n\n  return undefined;\n};\n\nexport default (args: any[], defaultNotFoundValue?: any): [any, any, any] => {\n  let el;\n  let sel;\n  let notFoundValue = defaultNotFoundValue;\n  if (args.length === 3) {\n    el = findDebugElement(args[0]);\n    sel = args[1];\n    notFoundValue = args[2];\n  } else if (args.length === 1) {\n    el = findDebugElement(funcGetLastFixture());\n    [sel] = args;\n  } else if (args[0]) {\n    el = findDebugElement(args[0]);\n    if (el) {\n      sel = args[1];\n    } else {\n      el = findDebugElement(funcGetLastFixture());\n      [sel, notFoundValue] = args;\n    }\n  } else {\n    sel = args[1];\n  }\n  sel = findDebugElement(sel) ?? sel;\n\n  return [el, sel, notFoundValue];\n};\n","import { DebugElement, Predicate } from '@angular/core';\nimport { By } from '@angular/platform-browser';\n\nimport { AnyType } from '../../common/core.types';\nimport { getSourceOfMock } from '../../common/func.get-source-of-mock';\n\nexport default (selector: string | AnyType<any> | [string] | [string, any]): Predicate<DebugElement> => {\n  return Array.isArray(selector)\n    ? By.css(selector.length === 1 ? `[${selector[0]}]` : `[${selector[0]}=\"${selector[1]}\"]`)\n    : typeof selector === 'string'\n      ? By.css(selector)\n      : By.directive(getSourceOfMock(selector));\n};\n","import { DebugElement } from '@angular/core';\n\nimport isDebugNode from '../format/is-debug-node';\nimport funcParseFindArgsName from '../func.parse-find-args-name';\n\nimport funcParseFindArgs from './func.parse-find-args';\nimport funcParseFindTerm from './func.parse-find-term';\n\nconst defaultNotFoundValue = {}; // simulating Symbol\n\nexport default (...args: any[]): DebugElement => {\n  const [el, sel, notFoundValue] = funcParseFindArgs(args, defaultNotFoundValue);\n  const result = isDebugNode(sel) ? sel : el?.query(funcParseFindTerm(sel));\n  if (result) {\n    return result;\n  }\n  if (notFoundValue !== defaultNotFoundValue) {\n    return notFoundValue;\n  }\n  throw new Error(`Cannot find an element via ngMocks.find(${funcParseFindArgsName(sel)})`);\n};\n","import { MockedDebugNode } from '../../mock-render/types';\n\nexport default (node: MockedDebugNode): boolean => {\n  return node.nativeNode.nodeName === '#text';\n};\n","export default (a: any, b: any): boolean => {\n  if (!a || !b) {\n    return false;\n  }\n\n  return a === b;\n};\n","import detectTextNode from './detect-text-node';\n\nexport default (node: any) => {\n  return detectTextNode(node)\n    ? undefined\n    : node.injector._tNode || // ivy\n        node.injector.elDef || // classic\n        undefined;\n};\n","import { Injector } from '@angular/core';\n\nimport { getTestBedInjection } from './core.helpers';\n\nconst defaultInjector: any = {};\n\nexport default (declaration: any, injector: Injector = defaultInjector): any => {\n  if (injector === defaultInjector) {\n    return getTestBedInjection(declaration);\n  }\n  try {\n    return injector.get(declaration);\n  } catch {\n    return undefined;\n  }\n};\n","import { DebugElement, ViewContainerRef } from '@angular/core';\n\nimport coreInjector from '../../common/core.injector';\n\nimport elDefGetNode from './el-def-get-node';\n\nconst getVcr = (node: any, child: any): undefined | ViewContainerRef => {\n  if (node === child) {\n    return undefined;\n  }\n  if (child.nativeNode.nodeName !== '#comment') {\n    return undefined;\n  }\n\n  return coreInjector(ViewContainerRef, child.injector);\n};\n\nconst getScanViewRefRootNodes = (node: any, child: any): Array<[number, any]> => {\n  const vcr = getVcr(node, child);\n  if (!vcr) {\n    return [];\n  }\n\n  const result: Array<[number, any]> = [];\n  for (let vrIndex = 0; vrIndex < vcr.length; vrIndex += 1) {\n    const vr = vcr.get(vrIndex);\n    if (!vr) {\n      continue;\n    }\n\n    for (let rnIndex = 0; rnIndex < (vr as any).rootNodes.length; rnIndex += 1) {\n      result.push([rnIndex, (vr as any).rootNodes[rnIndex]]);\n    }\n  }\n\n  return result;\n};\n\nconst scanViewRef = (node: DebugElement) => {\n  let result: any;\n  let index: any;\n\n  for (const child of node.parent?.childNodes || []) {\n    for (const [rnIndex, rootNode] of getScanViewRefRootNodes(node, child)) {\n      if (rootNode === node.nativeNode && (index === undefined || rnIndex < index)) {\n        result = elDefGetNode(child);\n        index = rnIndex;\n      }\n    }\n  }\n\n  return result;\n};\n\nexport default (node: any) => {\n  return (\n    node.injector._tNode?.parent || // ivy\n    node.injector.elDef?.parent || // classic\n    scanViewRef(node) ||\n    node.parent?.injector._tNode || // ivy\n    node.parent?.injector.elDef || // classic\n    undefined\n  );\n};\n","import { MockedDebugNode } from '../../mock-render/types';\n\nimport detectTextNode from './detect-text-node';\nimport elDefCompare from './el-def-compare';\nimport elDefGetNode from './el-def-get-node';\nimport elDefGetParent from './el-def-get-parent';\n\nexport default (node: MockedDebugNode): MockedDebugNode[] => {\n  const elDef = elDefGetNode(node);\n  if (!elDef || detectTextNode(node)) {\n    return [];\n  }\n\n  const isDirect = (node as any).childNodes !== undefined;\n  const children: MockedDebugNode[] = [];\n  for (const childNode of (node as any).childNodes || node.parent?.childNodes || []) {\n    const childNodeParent = elDefGetParent(childNode);\n\n    if (!isDirect && !elDefCompare(elDef, childNodeParent)) {\n      continue;\n    }\n    if (childNodeParent && !elDefCompare(elDef, childNodeParent)) {\n      continue;\n    }\n\n    children.push(childNode);\n  }\n\n  if ((node as any).parent?.name === 'BODY') {\n    const childNodes: any[] = (node as any).parent.childNodes;\n    let start = childNodes.length;\n    let end = 0;\n    for (let i = childNodes.length - 1; i >= 0; i -= 1) {\n      const childNode = childNodes[i];\n      if (childNode.nativeNode.nodeName === '#comment') {\n        end = i;\n      } else if (childNode.nativeNode === node.nativeNode) {\n        start = i + 1;\n        break;\n      }\n    }\n    for (let i = start; i < end; i += 1) {\n      children.push(childNodes[i]);\n    }\n  }\n\n  return children;\n};\n","import { MockedDebugNode } from '../../mock-render/types';\n\nimport elDefCompare from './el-def-compare';\nimport elDefGetNode from './el-def-get-node';\nimport elDefGetParent from './el-def-get-parent';\n\nconst detectParent = (node: MockedDebugNode, parent: MockedDebugNode | undefined): MockedDebugNode | undefined => {\n  if (parent) {\n    return parent;\n  }\n\n  const expected = elDefGetParent(node);\n  const currentParent = node.parent ? elDefGetNode(node.parent) : undefined;\n  if (node.parent && elDefCompare(expected, currentParent)) {\n    return node.parent;\n  }\n  for (const childNode of node.parent?.childNodes || []) {\n    const childElDef = elDefGetNode(childNode);\n    if (elDefCompare(expected, childElDef)) {\n      return childNode;\n    }\n  }\n\n  return undefined;\n};\n\nexport default ((): typeof detectParent => detectParent)();\n","import { MockedDebugNode } from '../../mock-render/types';\n\nimport detectTextNode from './detect-text-node';\nimport nestedCheckChildren from './nested-check-children';\nimport nestedCheckParent from './nested-check-parent';\n\nconst nestedCheck = (\n  node: MockedDebugNode | null | undefined,\n  parent: MockedDebugNode | undefined,\n  check: (node: MockedDebugNode, parent?: MockedDebugNode) => void | boolean,\n  includeTextNode = false,\n): boolean => {\n  if (!node) {\n    return false;\n  }\n  if (!includeTextNode && detectTextNode(node)) {\n    return false;\n  }\n  if (check(node, nestedCheckParent(node, parent))) {\n    return true;\n  }\n\n  for (const childNode of nestedCheckChildren(node)) {\n    if (nestedCheck(childNode, node, check, includeTextNode)) {\n      return true;\n    }\n  }\n\n  return false;\n};\n\nexport default ((): typeof nestedCheck => nestedCheck)();\n","import { DebugNode } from '@angular/core';\n\nimport { DebugNodeSelector } from '../../common/core.types';\nimport mockHelperFind from '../find/mock-helper.find';\nimport funcGetLastFixture from '../func.get-last-fixture';\n\nimport nestedCheck from './nested-check';\n\nexport default (\n  sel: DebugNode | DebugNodeSelector,\n  callback: (node: DebugNode, parent?: DebugNode) => void | boolean,\n  includeTextNode = false,\n): void => {\n  const el = mockHelperFind(funcGetLastFixture(), sel, undefined);\n  nestedCheck(el, undefined, callback, includeTextNode);\n};\n","import isDebugNode from './format/is-debug-node';\nimport isFixture from './format/is-fixture';\nimport funcGetLastFixture from './func.get-last-fixture';\n\nconst isSelector = (value: any): boolean => {\n  if (typeof value === 'string') {\n    return true;\n  }\n  if (Array.isArray(value) && typeof value[0] === 'string') {\n    return true;\n  }\n  if (isFixture(value)) {\n    return true;\n  }\n  if (isDebugNode(value)) {\n    return true;\n  }\n\n  return true;\n};\n\nexport default (args: any[], isValidValue: (value: any) => boolean, defaultNotFoundValue?: any): [any, any, any] => {\n  let el;\n  let sel;\n  let notFoundValue = defaultNotFoundValue;\n  if (args.length === 3) {\n    [el, sel, notFoundValue] = args;\n  } else if (args.length === 1) {\n    el = funcGetLastFixture();\n    [sel] = args;\n  } else if (isValidValue(args[1]) && isSelector(args[0])) {\n    [el, sel] = args;\n  } else {\n    el = funcGetLastFixture();\n    [sel, notFoundValue] = args;\n  }\n\n  return [el, sel, notFoundValue];\n};\n","export default (selectors: string[], query: string): boolean => {\n  for (const selector of selectors) {\n    const attributes = selector.match(/\\[([^=\\]]+)/g);\n    if (!attributes) {\n      continue;\n    }\n\n    for (const attribute of attributes) {\n      if (attribute === `[${query}`) {\n        return true;\n      }\n    }\n  }\n\n  return false;\n};\n","import { DebugNode, Directive } from '@angular/core';\n\nimport coreInjector from '../common/core.injector';\nimport coreReflectDirectiveResolve from '../common/core.reflect.directive-resolve';\nimport funcGetType from '../common/func.get-type';\n\nconst getMeta = (token: any): Directive | undefined => {\n  try {\n    return coreReflectDirectiveResolve(token);\n  } catch {\n    return undefined;\n  }\n};\n\nexport default (el: DebugNode | null | undefined, token: any): Directive | undefined => {\n  // istanbul ignore if\n  if (!el) {\n    return undefined;\n  }\n\n  try {\n    const provider = funcGetType(token);\n    const instance = coreInjector(provider, el.injector);\n\n    return getMeta(instance.constructor);\n  } catch {\n    return undefined;\n  }\n};\n","import { MockedDebugNode } from '../../mock-render/types';\n\nexport default (node: MockedDebugNode): string[] => {\n  return (node.injector as any).elDef ? Object.keys((node.injector as any).elDef.element.publicProviders) : [];\n};\n","import { DirectiveIo } from '../../common/core.types';\nimport { MockedDebugNode } from '../../mock-render/types';\nimport funcParseProviderTokensDirectives from '../func.parse-provider-tokens-directives';\n\nexport default (node: MockedDebugNode, key: string): [Array<DirectiveIo>, string[], number] => {\n  const config = (node.injector as any).elDef.element.publicProviders[key];\n  const token = config.provider.value;\n  if (!token) {\n    return [[], [], 0];\n  }\n  const meta = funcParseProviderTokensDirectives(node, token);\n\n  const requiredAttributes = config.bindings.map((binding: any) => binding.nonMinifiedName || binding.name);\n\n  return [meta?.inputs || [], requiredAttributes, config.nodeIndex];\n};\n","import funcDirectiveIoParse from '../../common/func.directive-io-parse';\nimport { MockedDebugNode } from '../../mock-render/types';\nimport funcParseProviderTokensDirectives from '../func.parse-provider-tokens-directives';\n\nimport funcGetPublicProviderKeys from './func.get-public-provider-keys';\nimport funcParseInputsAndRequiresAttributes from './func.parse-inputs-and-requires-attributes';\n\nconst collectSelectors = (node: MockedDebugNode): string[] => {\n  const selectors: string[] = [];\n\n  for (const token of node.providerTokens) {\n    const meta = funcParseProviderTokensDirectives(node, token);\n    if (meta?.selector && selectors.indexOf(meta.selector) === -1) {\n      selectors.push(meta.selector);\n    }\n  }\n\n  return selectors;\n};\n\nconst collectAttributesClassic = (node: MockedDebugNode): string[] => {\n  const result: string[] = [];\n\n  for (const key of funcGetPublicProviderKeys(node)) {\n    const [inputs, expectedAttributes] = funcParseInputsAndRequiresAttributes(node, key);\n    for (const input of inputs) {\n      const { name, alias } = funcDirectiveIoParse(input);\n      const attr = alias || name;\n      if (expectedAttributes.indexOf(name) !== -1 && result.indexOf(attr) === -1) {\n        result.push(attr);\n      }\n    }\n  }\n\n  return result;\n};\n\nconst collectAttributesIvy = (node: MockedDebugNode): string[] => {\n  const result: string[] = [];\n\n  const attrs = (node.injector as any)._tNode?.attrs || [];\n  let step = 2;\n  for (let index = 0; index < attrs.length; index += step) {\n    // 3 is a divider between static and dynamic bindings\n    if (typeof attrs[index] === 'number') {\n      step = 1;\n      continue;\n    }\n    const attr = attrs[index];\n    if ((node.injector as any)._tNode.inputs?.[attr] && result.indexOf(attr) === -1) {\n      result.push(attr);\n    }\n  }\n\n  return result;\n};\n\nexport default (node: MockedDebugNode): [string[], string[]] => {\n  const selectors = collectSelectors(node);\n  const attributes = [...collectAttributesClassic(node), ...collectAttributesIvy(node)];\n\n  return [selectors, attributes];\n};\n","import { MockedDebugNode } from '../../mock-render/types';\n\nimport detectAttributeInSelectors from './detect-attribute-in-selectors';\nimport detectSelectorsFromNode from './detect-selectors-from-node';\n\nexport default (attribute: string): ((node: MockedDebugNode) => boolean) =>\n  node => {\n    const [selectors, attributes] = detectSelectorsFromNode(node);\n\n    if (attributes.indexOf(attribute) !== -1) {\n      return true;\n    }\n\n    if (detectAttributeInSelectors(selectors, attribute)) {\n      return true;\n    }\n\n    return false;\n  };\n","import { DebugNode, Injector } from '@angular/core';\n\nimport coreInjector from '../common/core.injector';\nimport { AnyDeclaration } from '../common/core.types';\nimport { isNgDef } from '../common/func.is-ng-def';\n\nimport { Node } from './func.get-from-node';\n\nconst getParentWithInjector = (node: (DebugNode & Node) | null): Injector | undefined => {\n  let parent: DebugNode | null = node;\n  while (parent?.injector.constructor.name === 'NullInjector') {\n    parent = parent.parent;\n  }\n\n  if (parent) {\n    return parent.injector;\n  }\n\n  return undefined;\n};\n\nexport default <T>(result: T[], node: DebugNode & Node, proto: AnyDeclaration<T>): void => {\n  if (!node.injector || node.injector.constructor.name === 'NullInjector') {\n    return;\n  }\n\n  const parentInjector = getParentWithInjector(node.parent);\n  const parentInstance = parentInjector ? coreInjector(proto, parentInjector) : undefined;\n  const instance = coreInjector(proto, node.injector);\n  // a way to avoid inherited injections\n  if (parentInstance === instance) {\n    return;\n  }\n\n  if (isNgDef(proto, 't') && instance !== undefined) {\n    result.push(instance);\n  } else if (instance !== undefined && result.indexOf(instance) === -1) {\n    result.push(instance);\n  }\n};\n","import { DebugNode } from '@angular/core';\n\nexport default (node: DebugNode): DebugNode =>\n  node.nativeNode?.nodeName === '#text' && node.parent ? node.parent : node;\n","import { DebugNode } from '@angular/core';\n\nimport { AnyType } from '../common/core.types';\n\nconst detectGatherFlag = (gather: boolean, el: DebugNode | null, node: any): boolean => {\n  // LContainer for structural directives can be a trigger for pipes.\n  if (\n    el &&\n    el.nativeNode &&\n    el.nativeNode.nodeName === '#comment' &&\n    Array.isArray(node) &&\n    node[0] === el.nativeNode\n  ) {\n    return true;\n  }\n\n  // LContainer should stop the scan.\n  if (Array.isArray(node)) {\n    return false;\n  }\n\n  if (!el || !node.nodeName) {\n    return gather;\n  }\n\n  // checking if a commentNode belongs to the current element.\n  // it comes from structural directives.\n  if (node.nodeName === '#comment') {\n    return node === el.nativeNode;\n  }\n\n  // checking if a textNode belongs to the current element.\n  if (node.nodeName === '#text') {\n    return node.parentNode === el.nativeNode;\n  }\n\n  return false;\n};\n\nconst isNotObject = <T>(node: T): boolean => !node || typeof node !== 'object';\n\nconst shouldBeScanned = (scanned: any[], node: any): boolean => scanned.indexOf(node) === -1 && Array.isArray(node);\n\nconst scan = <T>(\n  {\n    result,\n    el,\n    nodes,\n    normalize,\n    proto,\n  }: {\n    el: DebugNode | null;\n    nodes: any[];\n    normalize: (item: T) => T;\n    proto: AnyType<T>;\n    result: T[];\n  },\n  gatherDefault: boolean,\n  scanned: any[] = [],\n): void => {\n  scanned.push(nodes);\n  let gather = gatherDefault;\n\n  let nodesLength = nodes.length;\n  if (nodes.length > 1 && nodes[1] && typeof nodes[1] === 'object' && nodes[1].bindingStartIndex) {\n    nodesLength = nodes[1].bindingStartIndex;\n  }\n\n  for (let index = 0; index < nodesLength; index += 1) {\n    const node = normalize(nodes[index]);\n    if (isNotObject(node)) {\n      continue;\n    }\n\n    if (shouldBeScanned(scanned, node) && Array.isArray(node)) {\n      scan({ result, el, nodes: node, normalize, proto }, gather, scanned);\n    }\n\n    gather = detectGatherFlag(gather, el, node);\n    if (!gather) {\n      continue;\n    }\n\n    if (result.indexOf(node) === -1 && node instanceof proto) {\n      result.push(node);\n    }\n  }\n};\n\nexport default (() => scan)();\n","import { DebugNode } from '@angular/core';\n\nimport { AnyType } from '../common/core.types';\n\nimport { Node } from './func.get-from-node';\nimport funcGetFromNodeElement from './func.get-from-node-element';\nimport funcGetFromNodeScan from './func.get-from-node-scan';\n\nconst detectContextByIndex = (rootView: any, index: number) => {\n  if (typeof rootView[1] === 'object' && rootView[20] === index) {\n    return rootView;\n  }\n\n  for (let i = 21; i < rootView.length; i += 1) {\n    const item = rootView[i];\n    if (Array.isArray(item) && typeof item[1] === 'object' && item[20] === index) {\n      return item;\n    }\n  }\n\n  return undefined;\n};\n\nconst detectContext = (node: DebugNode): any => {\n  let current = node;\n  let context = current.nativeNode?.__ngContext__;\n  while (context === undefined && current.parent) {\n    current = current.parent;\n    context = current.nativeNode.__ngContext__;\n  }\n  if (typeof context !== 'number') {\n    return context;\n  }\n  // welcome to A12 and its optimization\n  // https://github.com/angular/angular/pull/41358\n\n  const rootView = (current.injector as any)._lView;\n  if (Array.isArray(rootView)) {\n    return detectContextByIndex(rootView, context);\n  }\n\n  return undefined;\n};\n\nconst contextToNodes = (context: any): any => (Array.isArray(context) ? context : context?.lView);\n\nexport default <T>(result: T[], node: (DebugNode & Node) | null | undefined, proto: AnyType<T>): void => {\n  if (!node || node._debugContext) {\n    return;\n  }\n\n  const el = funcGetFromNodeElement(node);\n  funcGetFromNodeScan(\n    {\n      el,\n      nodes: contextToNodes(detectContext(node)) || [],\n      normalize: item => item,\n      proto,\n      result,\n    },\n    true,\n  );\n};\n","import { DebugNode } from '@angular/core';\n\nimport { AnyType } from '../common/core.types';\n\nimport { Node } from './func.get-from-node';\nimport funcGetFromNodeElement from './func.get-from-node-element';\nimport funcGetFromNodeScan from './func.get-from-node-scan';\n\nconst normalize = (item: any): any => {\n  if (!item || typeof item !== 'object') {\n    return item;\n  }\n\n  for (const key of ['renderElement', 'renderText', 'instance']) {\n    if (item[key]) {\n      return item[key];\n    }\n  }\n\n  return null;\n};\n\nexport default <T>(result: T[], node: (DebugNode & Node) | null | undefined, proto: AnyType<T>): void => {\n  if (!node || !node._debugContext) {\n    return;\n  }\n\n  const el = funcGetFromNodeElement(node);\n\n  funcGetFromNodeScan(\n    {\n      el,\n      nodes: node._debugContext.view.nodes,\n      normalize,\n      proto,\n      result,\n    },\n    true,\n  );\n};\n","import { DebugNode } from '@angular/core';\n\nimport { AnyDeclaration } from '../common/core.types';\nimport { isNgDef } from '../common/func.is-ng-def';\n\nimport funcGetFromNodeInjector from './func.get-from-node-injector';\nimport funcGetFromNodeIvy from './func.get-from-node-ivy';\nimport funcGetFromNodeStandard from './func.get-from-node-standard';\n\nexport interface Node {\n  _debugContext?: {\n    elDef: {\n      nodeIndex: number;\n    };\n    nodeDef: {\n      nodeIndex: number;\n    };\n    nodeIndex: number;\n    view: {\n      nodes: Array<{\n        instance?: any;\n        renderElement?: any;\n        renderText?: any;\n        value?: any;\n      }>;\n    };\n  };\n  parent?: (DebugNode & Node) | null;\n}\n\nexport default <T>(result: T[], node: DebugNode & Node, proto: AnyDeclaration<T>): T[] => {\n  funcGetFromNodeInjector(result, node, proto);\n  if (!isNgDef(proto, 't') && typeof proto !== 'string') {\n    funcGetFromNodeStandard(result, node, proto);\n    funcGetFromNodeIvy(result, node, proto);\n  }\n\n  return result;\n};\n","import { DebugElement } from '@angular/core';\nimport { TestBed } from '@angular/core/testing';\n\nimport { Type } from '../common/core.types';\nimport funcGetName from '../common/func.get-name';\nimport { getSourceOfMock } from '../common/func.get-source-of-mock';\nimport { MockedDebugElement } from '../mock-render/types';\n\nimport nestedCheckParent from './crawl/nested-check-parent';\nimport mockHelperFind from './find/mock-helper.find';\nimport funcGetFromNode from './func.get-from-node';\nimport funcGetLastFixture from './func.get-last-fixture';\nimport funcParseFindArgsName from './func.parse-find-args-name';\n\nconst defaultNotFoundValue = {}; // simulating Symbol\n\nconst parseArgs = <T>(\n  args: any[],\n): {\n  el: MockedDebugElement | null | undefined;\n  notFoundValue: any;\n  sel: Type<T>;\n} => ({\n  el: args[0],\n  notFoundValue: args.length === 3 ? args[2] : defaultNotFoundValue,\n  sel: args[1],\n});\n\nexport default <T>(...args: any[]) => {\n  if (args.length === 1) {\n    try {\n      return TestBed.inject ? TestBed.inject(args[0]) : /* istanbul ignore next */ (TestBed as any).get(args[0]);\n    } catch (error) {\n      // forwarding unexpected errors: https://github.com/help-me-mom/ng-mocks/issues/7041\n      if (!error || typeof error !== 'object' || (error as any).ngTokenPath === undefined) {\n        throw error;\n      }\n      throw new Error(`Cannot find an instance via ngMocks.get(${funcParseFindArgsName(args[0])})`);\n    }\n  }\n\n  const { el, sel, notFoundValue } = parseArgs<T>(args);\n  const root: DebugElement | undefined = mockHelperFind(funcGetLastFixture(), el, undefined);\n  const source = getSourceOfMock(sel);\n\n  // Looking in the root.\n  if (root) {\n    const result = funcGetFromNode([], root, source);\n    if (result.length > 0) {\n      return result[0];\n    }\n  }\n\n  // Looking for a related structural directive.\n  if (root) {\n    const parent = nestedCheckParent(root, undefined);\n    if (parent && parent.nativeNode.nodeName === '#comment') {\n      const result = funcGetFromNode([], parent, source);\n      if (result.length > 0) {\n        return result[0];\n      }\n    }\n  }\n\n  if (notFoundValue !== defaultNotFoundValue) {\n    return notFoundValue;\n  }\n  throw new Error(`Cannot find ${funcGetName(sel)} instance via ngMocks.get`);\n};\n","import { DirectiveIo } from '../common/core.types';\nimport funcDirectiveIoParse from '../common/func.directive-io-parse';\nimport { MockedDebugElement } from '../mock-render/types';\n\nimport mockHelperFind from './find/mock-helper.find';\nimport funcGetLastFixture from './func.get-last-fixture';\nimport funcParseProviderTokensDirectives from './func.parse-provider-tokens-directives';\nimport mockHelperGet from './mock-helper.get';\n\nconst defaultNotFoundValue = {}; // simulating Symbol\n\nconst parseArgs = (args: any[]): [MockedDebugElement | null | undefined, string, any] => [\n  args[0],\n  args[1],\n  args.length === 3 ? args[2] : defaultNotFoundValue,\n];\n\nconst attrMatches = (attribute: DirectiveIo, selector: string): string | undefined => {\n  const { name, alias = '' } = funcDirectiveIoParse(attribute);\n\n  if ((!alias && name === selector) || (!!alias && alias === selector)) {\n    return name;\n  }\n\n  return undefined;\n};\n\nconst detectAttribute = (el: MockedDebugElement | null | undefined, attr: 'inputs' | 'outputs', sel: string) => {\n  for (const token of el?.providerTokens || []) {\n    const meta = funcParseProviderTokensDirectives(el, token);\n    if (!meta) {\n      continue;\n    }\n\n    for (const attrDef of meta[attr] || /* istanbul ignore next */ []) {\n      const prop = attrMatches(attrDef, sel);\n      if (prop) {\n        return mockHelperGet(el, token)[prop];\n      }\n    }\n  }\n\n  throw new Error('Not found');\n};\n\nexport default (label: string, attr: 'inputs' | 'outputs', ...args: any[]) => {\n  const [el, sel, notFoundValue] = parseArgs(args);\n\n  try {\n    return detectAttribute(mockHelperFind(funcGetLastFixture(), el, undefined), attr, sel);\n  } catch {\n    // nothing to do\n  }\n  if (notFoundValue !== defaultNotFoundValue) {\n    return notFoundValue;\n  }\n  throw new Error(`Cannot find ${sel} ${label} via ngMocks.${label}`);\n};\n","import funcDirectiveIoParse from '../../common/func.directive-io-parse';\nimport { MockedDebugNode } from '../../mock-render/types';\nimport mockHelperAttributes from '../mock-helper.attributes';\n\nimport funcGetPublicProviderKeys from './func.get-public-provider-keys';\nimport funcParseInputsAndRequiresAttributes from './func.parse-inputs-and-requires-attributes';\n\nconst detectInClassic = (node: MockedDebugNode, attribute: string, value: any): boolean => {\n  for (const key of funcGetPublicProviderKeys(node)) {\n    const [inputs, expectedAttributes, nodeIndex] = funcParseInputsAndRequiresAttributes(node, key);\n    for (const input of inputs) {\n      const { name, alias } = funcDirectiveIoParse(input);\n      if (attribute !== (alias || name) || expectedAttributes.indexOf(name) === -1) {\n        continue;\n      }\n      if (value === (node.injector as any).view.nodes[nodeIndex].instance[name]) {\n        return true;\n      }\n    }\n  }\n\n  return false;\n};\n\nconst detectInIvy = (node: MockedDebugNode, attribute: string, value: any): boolean => {\n  const attrs = (node.injector as any)._tNode?.attrs || [];\n  let step = 2;\n  for (let index = 0; index < attrs.length; index += step) {\n    // 3 is a divider between static and dynamic bindings\n    if (typeof attrs[index] === 'number') {\n      step = 1;\n      continue;\n    }\n    const attr = attrs[index];\n    if (attr !== attribute || !(node.injector as any)._tNode.inputs?.[attr]) {\n      continue;\n    }\n    for (const attrIndex of (node.injector as any)._tNode.inputs[attr]) {\n      if (typeof attrIndex !== 'number') {\n        continue;\n      }\n\n      const lViewValue = (node.injector as any)._lView?.[attrIndex][attr];\n      const attributeValue = mockHelperAttributes('', 'inputs', node, attr, lViewValue);\n\n      if (value === attributeValue) {\n        return true;\n      }\n    }\n  }\n\n  return false;\n};\n\nexport default (attribute: string, value: any): ((node: MockedDebugNode) => boolean) =>\n  node => {\n    if (detectInIvy(node, attribute, value)) {\n      return true;\n    }\n\n    return detectInClassic(node, attribute, value);\n  };\n","import coreInjector from '../../common/core.injector';\nimport { AnyType } from '../../common/core.types';\nimport { getSourceOfMock } from '../../common/func.get-source-of-mock';\nimport { MockedDebugNode } from '../../mock-render/types';\n\nexport default (declaration: AnyType<any>): ((node: MockedDebugNode) => boolean) => {\n  const source = getSourceOfMock(declaration);\n\n  return node =>\n    !!node && node.providerTokens.indexOf(source) !== -1 && coreInjector(source, node.injector) !== undefined;\n};\n","import { MockedDebugNode } from '../../mock-render/types';\n\nexport default (id: string): ((node: MockedDebugNode) => boolean) =>\n  node => {\n    return !!node.references[id];\n  };\n","const regExp = new RegExp('\\\\[.*?\\\\]', 'g');\n\nexport default (selectors: string[], query: string): boolean => {\n  for (const selector of selectors) {\n    const attributes = selector.replace(regExp, '').split(',');\n\n    for (const attribute of attributes) {\n      if (attribute.trim() === query) {\n        return true;\n      }\n    }\n  }\n\n  return false;\n};\n","import { MockedDebugNode } from '../../mock-render/types';\n\nimport detectSelectorsFromNode from './detect-selectors-from-node';\nimport detectTagNameInSelectors from './detect-tag-name-in-selectors';\n\nexport default (attribute: string): ((node: MockedDebugNode) => boolean) =>\n  node => {\n    const [selectors] = detectSelectorsFromNode(node);\n\n    return detectTagNameInSelectors(selectors, attribute);\n  };\n","import { AnyType } from '../../common/core.types';\nimport { MockedDebugNode } from '../../mock-render/types';\n\nimport crawlByAttribute from './crawl-by-attribute';\nimport crawlByAttributeValue from './crawl-by-attribute-value';\nimport crawlByDeclaration from './crawl-by-declaration';\nimport crawlById from './crawl-by-id';\nimport crawlByTagName from './crawl-by-tag-name';\n\ntype SELECTOR = string | AnyType<any> | [any] | [any, any];\n\nconst isCrawlByAttribute = (selector: SELECTOR): selector is [string] => {\n  return Array.isArray(selector) && selector.length === 1 && typeof selector[0] === 'string';\n};\n\nconst isCrawlByAttributeValue = (selector: SELECTOR): selector is [string, any] => {\n  return Array.isArray(selector) && selector.length === 2 && typeof selector[0] === 'string';\n};\n\nconst isCrawlById = (selector: SELECTOR): selector is string => {\n  return typeof selector === 'string' && selector.indexOf('#') === 0 && selector.length > 1;\n};\n\nconst isCrawlByTagName = (selector: SELECTOR): selector is string => {\n  return typeof selector === 'string' && selector.indexOf('#') !== 0 && selector.length > 0;\n};\n\nconst isCrawlByDeclaration = (selector: SELECTOR): selector is AnyType<any> => {\n  return typeof selector === 'function';\n};\n\nexport default (selector: SELECTOR): ((node: MockedDebugNode) => boolean) => {\n  if (isCrawlByAttribute(selector)) {\n    return crawlByAttribute(selector[0]);\n  }\n  if (isCrawlByAttributeValue(selector)) {\n    return crawlByAttributeValue(selector[0], selector[1]);\n  }\n  if (isCrawlById(selector)) {\n    return crawlById(selector.slice(1));\n  }\n  if (isCrawlByTagName(selector)) {\n    return crawlByTagName(selector);\n  }\n  if (isCrawlByDeclaration(selector)) {\n    return crawlByDeclaration(selector);\n  }\n\n  throw new Error('Unknown selector');\n};\n","export default (value: any) => {\n  if (typeof value === 'string') {\n    return true;\n  }\n  if (Array.isArray(value) && typeof value[0] === 'string') {\n    return true;\n  }\n\n  return typeof value === 'function';\n};\n","import mockHelperFind from '../find/mock-helper.find';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport funcParseFindArgs from '../func.parse-find-args';\nimport funcParseFindArgsName from '../func.parse-find-args-name';\n\nimport detectCrawler from './detect-crawler';\nimport detectTextNode from './detect-text-node';\nimport funcIsValidRevealSelector from './func.is-valid-reveal-selector';\nimport mockHelperCrawl from './mock-helper.crawl';\n\nconst defaultNotFoundValue = {}; // simulating Symbol\n\nexport default (...args: any[]): any => {\n  const [el, sel, notFoundValue] = funcParseFindArgs(args, funcIsValidRevealSelector, defaultNotFoundValue);\n  const root = mockHelperFind(funcGetLastFixture(), el, undefined);\n\n  const detector = detectCrawler(sel);\n\n  let result;\n  mockHelperCrawl(root, node => {\n    if (node !== root && !detectTextNode(node) && detector(node)) {\n      result = node;\n\n      return true;\n    }\n\n    return false;\n  });\n  if (result) {\n    return result;\n  }\n  if (notFoundValue !== defaultNotFoundValue) {\n    return notFoundValue;\n  }\n\n  throw new Error(`Cannot find a DebugElement via ngMocks.reveal(${funcParseFindArgsName(sel)})`);\n};\n","import mockHelperFind from '../find/mock-helper.find';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport funcParseFindArgs from '../func.parse-find-args';\n\nimport detectCrawler from './detect-crawler';\nimport detectTextNode from './detect-text-node';\nimport funcIsValidRevealSelector from './func.is-valid-reveal-selector';\nimport mockHelperCrawl from './mock-helper.crawl';\n\nexport default (...args: any[]): any[] => {\n  const [el, sel] = funcParseFindArgs(args, funcIsValidRevealSelector);\n  const root = mockHelperFind(funcGetLastFixture(), el, undefined);\n\n  const detector = detectCrawler(sel);\n\n  const result: any[] = [];\n  mockHelperCrawl(root, node => {\n    if (node !== root && !detectTextNode(node) && detector(node)) {\n      result.push(node);\n    }\n  });\n\n  return result;\n};\n","import funcIsMock from './func.is-mock';\nimport { MockControlValueAccessor } from './mock-control-value-accessor';\n\n/**\n * isMockControlValueAccessor helps to assert that an instance is a mock ControlValueAccessor\n * to perform valueChange or touch simulations.\n * Usually, it is used in if statements.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockControlValueAccessor\n * @see https://ng-mocks.sudo.eu/api/ngMocks/change\n * @see https://ng-mocks.sudo.eu/api/ngMocks/touch\n */\nexport const isMockControlValueAccessor = <T>(value: T): value is T & MockControlValueAccessor => {\n  if (!funcIsMock(value)) {\n    return false;\n  }\n\n  return !!value.__ngMocksConfig.isControlValueAccessor;\n};\n","export default (value: any): value is HTMLElement => {\n  return !!value && typeof value === 'object' && value.innerHTML !== undefined;\n};\n","import mockHelperStub from '../mock-helper.stub';\n\n/**\n * @see https://developer.mozilla.org/de/docs/Web/Events\n */\nconst preventBubble = ['focus', 'blur', 'load', 'unload', 'change', 'reset', 'scroll'];\n\n// istanbul ignore next\nconst customEvent = (event: string, params?: EventInit) => {\n  const initParams = {\n    bubbles: false,\n    cancelable: false,\n    ...params,\n  };\n  const eventObj = document.createEvent('CustomEvent');\n  eventObj.initCustomEvent(event, initParams.bubbles, initParams.cancelable, null);\n\n  return eventObj;\n};\n\nconst eventCtor =\n  typeof (Event as any) === 'function'\n    ? (event: string, init?: EventInit): CustomEvent => new CustomEvent(event, init)\n    : /* istanbul ignore next */ customEvent;\n\nconst keyMap: Record<string, object> = {\n  alt: {\n    altKey: true,\n    code: 'AltLeft',\n    key: 'Alt',\n    location: 1,\n    which: 18,\n  },\n  arrowdown: {\n    code: 'ArrowDown',\n    key: 'ArrowDown',\n    location: 0,\n    which: 40,\n  },\n  arrowleft: {\n    code: 'ArrowLeft',\n    key: 'ArrowLeft',\n    location: 0,\n    which: 37,\n  },\n  arrowright: {\n    code: 'ArrowRight',\n    key: 'ArrowRight',\n    location: 0,\n    which: 39,\n  },\n  arrowup: {\n    code: 'ArrowUp',\n    key: 'ArrowUp',\n    location: 0,\n    which: 38,\n  },\n  backspace: {\n    code: 'Backspace',\n    key: 'Backspace',\n    location: 0,\n    which: 8,\n  },\n  control: {\n    code: 'ControlLeft',\n    ctrlKey: true,\n    key: 'Control',\n    location: 1,\n    which: 17,\n  },\n  enter: {\n    code: 'Enter',\n    key: 'Enter',\n    location: 0,\n    which: 13,\n  },\n  esc: {\n    code: 'Escape',\n    key: 'Escape',\n    location: 0,\n    which: 27,\n  },\n  meta: {\n    code: 'MetaLeft',\n    key: 'Meta',\n    location: 1,\n    metaKey: true,\n    which: 91,\n  },\n  shift: {\n    code: 'ShiftLeft',\n    key: 'Shift',\n    location: 1,\n    shiftKey: true,\n    which: 16,\n  },\n  space: {\n    code: 'Space',\n    key: ' ',\n    location: 0,\n    which: 32,\n  },\n  tab: {\n    code: 'Tab',\n    key: 'Tab',\n    location: 0,\n    which: 9,\n  },\n};\nfor (let f = 1; f <= 12; f += 1) {\n  keyMap[`f${f}`] = {\n    code: `F${f}`,\n    key: `F${f}`,\n    location: 0,\n    which: f + 111,\n  };\n}\n\nconst getCode = (char: string): string => {\n  const code = char.codePointAt(0);\n  // a-z\n  if (code && code >= 97 && code <= 122) {\n    return `Key${char.toUpperCase()}`;\n  }\n  // A-Z\n  if (code && code >= 65 && code <= 90) {\n    return `Key${char.toUpperCase()}`;\n  }\n  // A-Z\n  if (code && code >= 48 && code <= 57) {\n    return `Digit${char}`;\n  }\n\n  return 'Unknown';\n};\n\nconst applyPayload = (event: Event, payload?: string): void => {\n  const keyData: object = {};\n  for (const key of payload ? payload.split('.') : []) {\n    let map = keyMap[key];\n    if (!map && key.length === 1) {\n      map = {\n        code: getCode(key),\n        key,\n      };\n    }\n\n    if (!map) {\n      throw new Error(`Unknown event part ${key}`);\n    }\n\n    mockHelperStub(keyData, map);\n  }\n\n  if (payload) {\n    mockHelperStub(event, keyData);\n  }\n};\n\nexport default (\n  event: string,\n  init?: EventInit,\n  overrides?: Partial<UIEvent | KeyboardEvent | MouseEvent | TouchEvent | Event>,\n): CustomEvent => {\n  const dot = event.indexOf('.');\n  const [eventName, eventPayload] = dot === -1 ? [event] : [event.slice(0, Math.max(0, dot)), event.slice(dot + 1)];\n  const eventObj = eventCtor(eventName, {\n    bubbles: preventBubble.indexOf(event) === -1,\n    cancelable: true,\n    ...init,\n  });\n  applyPayload(eventObj, eventPayload);\n\n  if (overrides) {\n    mockHelperStub(eventObj, overrides);\n  }\n\n  return eventObj;\n};\n","import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\n\nimport { DebugNodeSelector } from '../../common/core.types';\nimport mockHelperFind from '../find/mock-helper.find';\nimport isDebugNode from '../format/is-debug-node';\nimport isFixture from '../format/is-fixture';\nimport isHtmlElement from '../format/is-html-element';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport mockHelperStub from '../mock-helper.stub';\n\nimport mockHelperEvent from './mock-helper.event';\n\n/**\n * @see https://developer.mozilla.org/de/docs/Web/Events\n */\nconst preventBubble = ['focus', 'blur', 'load', 'unload', 'change', 'reset', 'scroll'];\n\nconst toEventObj = (event: string | UIEvent | KeyboardEvent | MouseEvent | TouchEvent | Event): Event => {\n  return typeof event === 'string'\n    ? mockHelperEvent(event, {\n        bubbles: preventBubble.indexOf(event) === -1,\n        cancelable: true,\n      })\n    : event;\n};\n\nconst getNativeElement = (\n  debugElement: DebugElement | HTMLElement | ComponentFixture<any> | undefined | null,\n): HTMLElement | undefined => {\n  if (isDebugNode(debugElement) || isFixture(debugElement)) {\n    return debugElement.nativeElement;\n  }\n  if (isHtmlElement(debugElement)) {\n    return debugElement;\n  }\n\n  return undefined;\n};\n\nexport default (\n  selector: DebugElement | HTMLElement | ComponentFixture<any> | DebugNodeSelector,\n  eventName: string | UIEvent | KeyboardEvent | MouseEvent | TouchEvent | Event,\n  payload?: Partial<UIEvent | KeyboardEvent | MouseEvent | TouchEvent | Event>,\n) => {\n  const debugElement = isHtmlElement(selector) ? selector : mockHelperFind(funcGetLastFixture(), selector, undefined);\n  const nativeElement = getNativeElement(debugElement);\n\n  if (!nativeElement) {\n    throw new Error(\n      `Cannot trigger ${typeof eventName === 'string' ? eventName : eventName.type} event undefined element`,\n    );\n  }\n\n  // nothing to emit on disabled elements\n  if ((nativeElement as HTMLInputElement).disabled) {\n    return;\n  }\n\n  const event = toEventObj(eventName);\n  if (!event.target) {\n    mockHelperStub(event, {\n      target: nativeElement,\n    });\n  }\n  if (payload) {\n    mockHelperStub(event, payload);\n  }\n  nativeElement.dispatchEvent(event);\n};\n","import { DebugNode } from '@angular/core';\n\nimport coreForm from '../../common/core.form';\nimport coreInjector from '../../common/core.injector';\n\nconst message = [\n  'Cannot find ControlValueAccessor on the element.',\n  'If it is a mock input with [formControlName],',\n  'you need either to avoid mocking ReactiveFormsModule',\n  'or to avoid accessing the control in such a way,',\n  'because this tests ReactiveFormsModule instead of own implementation.',\n].join(' ');\n\nexport default (el: DebugNode): Record<keyof any, any> => {\n  const ngControl = coreForm && coreInjector(coreForm.NgControl, el.injector);\n  const valueAccessor = ngControl?.valueAccessor;\n  if (valueAccessor) {\n    return valueAccessor;\n  }\n\n  const formControlDirective = coreForm && coreInjector(coreForm.FormControlDirective, el.injector);\n  if (formControlDirective?.form) {\n    return formControlDirective.form;\n  }\n\n  const ngModel = coreForm && coreInjector(coreForm.NgModel, el.injector);\n  if (ngModel) {\n    return ngModel;\n  }\n\n  throw new Error(message);\n};\n","import { DebugElement } from '@angular/core';\n\nimport coreForm from '../../common/core.form';\nimport { DebugNodeSelector } from '../../common/core.types';\nimport { isMockControlValueAccessor } from '../../common/func.is-mock-control-value-accessor';\nimport helperDefinePropertyDescriptor from '../../mock-service/helper.define-property-descriptor';\nimport helperExtractMethodsFromPrototype from '../../mock-service/helper.extract-methods-from-prototype';\nimport mockHelperTrigger from '../events/mock-helper.trigger';\nimport mockHelperFind from '../find/mock-helper.find';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport funcParseFindArgsName from '../func.parse-find-args-name';\nimport mockHelperStubMember from '../mock-helper.stub-member';\n\nimport funcGetVca from './func.get-vca';\n\n// default html behavior\nconst triggerInput = (el: DebugElement, value: any): void => {\n  mockHelperTrigger(el, 'focus');\n\n  const descriptor = Object.getOwnPropertyDescriptor(el.nativeElement, 'value');\n  mockHelperStubMember(el.nativeElement, 'value', value);\n  mockHelperTrigger(el, 'input');\n  mockHelperTrigger(el, 'change');\n  if (descriptor) {\n    helperDefinePropertyDescriptor(el.nativeElement, 'value', descriptor);\n    el.nativeElement.value = value;\n  }\n\n  mockHelperTrigger(el, 'blur');\n};\n\nconst handleKnown = (valueAccessor: any, value: any): boolean => {\n  if (coreForm && valueAccessor instanceof coreForm.AbstractControl) {\n    valueAccessor.setValue(value);\n\n    return true;\n  }\n\n  if (coreForm && valueAccessor instanceof coreForm.NgModel) {\n    valueAccessor.update.emit(value);\n\n    return true;\n  }\n\n  if (isMockControlValueAccessor(valueAccessor.instance)) {\n    valueAccessor.instance.__simulateChange(value);\n\n    return true;\n  }\n\n  return false;\n};\n\nconst hasListener = (el: DebugElement): boolean =>\n  el.listeners.some(listener => listener.name === 'input' || listener.name === 'change');\n\nconst keys = [\n  'onChange',\n  'onChangeCallback',\n  'onChangeCb',\n  'onChangeClb',\n  'onChangeFn',\n\n  '_onChange',\n  '_onChangeCallback',\n  '_onChangeCb',\n  '_onChangeClb',\n  '_onChangeFn',\n\n  'changeFn',\n  '_changeFn',\n\n  'onModelChange',\n\n  'cvaOnChange',\n  'cvaOnChangeCallback',\n  'cvaOnChangeCb',\n  'cvaOnChangeClb',\n  'cvaOnChangeFn',\n\n  '_cvaOnChange',\n  '_cvaOnChangeCallback',\n  '_cvaOnChangeCb',\n  '_cvaOnChangeClb',\n  '_cvaOnChangeFn',\n];\n\nexport default (selector: DebugNodeSelector, value: any, methodName?: string): void => {\n  const el = mockHelperFind(funcGetLastFixture(), selector, undefined);\n  if (!el) {\n    throw new Error(`Cannot find an element via ngMocks.change(${funcParseFindArgsName(selector)})`);\n  }\n\n  const valueAccessor = funcGetVca(el);\n  if (handleKnown(valueAccessor, value) || hasListener(el)) {\n    triggerInput(el, value);\n\n    return;\n  }\n\n  for (const key of methodName ? [methodName] : keys) {\n    if (typeof valueAccessor[key] === 'function') {\n      valueAccessor.writeValue(value);\n      valueAccessor[key](value);\n\n      return;\n    }\n  }\n\n  const methods = helperExtractMethodsFromPrototype(valueAccessor);\n  throw new Error(\n    [\n      'Unsupported type of ControlValueAccessor,',\n      `please ensure it has '${methodName || 'onChange'}' method.`,\n      `If it is a 3rd-party library, please provide the correct name of the method in the 'methodName' parameter.`,\n      'Possible Names: ' + methods.join(', ') + '.',\n    ].join(' '),\n  );\n};\n","import { DebugElement } from '@angular/core';\n\nimport coreForm from '../../common/core.form';\nimport { DebugNodeSelector } from '../../common/core.types';\nimport { isMockControlValueAccessor } from '../../common/func.is-mock-control-value-accessor';\nimport helperExtractMethodsFromPrototype from '../../mock-service/helper.extract-methods-from-prototype';\nimport mockHelperTrigger from '../events/mock-helper.trigger';\nimport mockHelperFind from '../find/mock-helper.find';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport funcParseFindArgsName from '../func.parse-find-args-name';\n\nimport funcGetVca from './func.get-vca';\n\n// default html behavior\nconst triggerTouch = (el: DebugElement): void => {\n  mockHelperTrigger(el, 'focus');\n  mockHelperTrigger(el, 'blur');\n};\n\nconst handleKnown = (valueAccessor: any): boolean => {\n  if (coreForm && valueAccessor instanceof coreForm.AbstractControl) {\n    valueAccessor.markAsTouched();\n\n    return true;\n  }\n\n  if (isMockControlValueAccessor(valueAccessor.instance)) {\n    valueAccessor.instance.__simulateTouch();\n\n    return true;\n  }\n\n  return false;\n};\n\nconst hasListener = (el: DebugElement): boolean =>\n  el.listeners.some(listener => listener.name === 'focus' || listener.name === 'blur');\n\nconst keys = [\n  'onTouched',\n  'onTouchedCallback',\n  'onTouchedCb',\n  'onTouchedClb',\n  'onTouchedFn',\n\n  '_onTouched',\n  '_onTouchedCallback',\n  '_onTouchedCb',\n  '_onTouchedClb',\n  '_onTouchedFn',\n\n  'markAsTouched',\n  '_markAsTouched',\n\n  'onModelTouched',\n\n  'cvaOnTouch',\n  'cvaOnTouchCallback',\n  'cvaOnTouchCb',\n  'cvaOnTouchClb',\n  'cvaOnTouchFn',\n\n  '_cvaOnTouch',\n  '_cvaOnTouchCallback',\n  '_cvaOnTouchCb',\n  '_cvaOnTouchClb',\n  '_cvaOnTouchFn',\n];\n\nexport default (sel: DebugElement | DebugNodeSelector, methodName?: string): void => {\n  const el = mockHelperFind(funcGetLastFixture(), sel, undefined);\n  if (!el) {\n    throw new Error(`Cannot find an element via ngMocks.touch(${funcParseFindArgsName(sel)})`);\n  }\n\n  const valueAccessor = funcGetVca(el);\n  if (handleKnown(valueAccessor) || hasListener(el)) {\n    triggerTouch(el);\n\n    return;\n  }\n\n  for (const key of methodName ? [methodName] : keys) {\n    if (typeof valueAccessor[key] === 'function') {\n      valueAccessor[key]();\n\n      return;\n    }\n  }\n\n  const methods = helperExtractMethodsFromPrototype(valueAccessor);\n  throw new Error(\n    [\n      'Unsupported type of ControlValueAccessor,',\n      `please ensure it has '${methodName || 'onTouched'}' method.`,\n      `If it is a 3rd-party library, please provide the correct name of the method in the 'methodName' parameter.`,\n      'Possible Names: ' + methods.join(', ') + '.',\n    ].join(' '),\n  );\n};\n","import { DebugNodeSelector } from '../../common/core.types';\n\nimport mockHelperTrigger from './mock-helper.trigger';\n\nexport default (selector: DebugNodeSelector, payload?: object) => {\n  mockHelperTrigger(selector, 'click', payload);\n};\n","import { DebugElement } from '@angular/core';\n\nimport isDebugNode from '../format/is-debug-node';\n\nimport funcParseFindArgs from './func.parse-find-args';\nimport funcParseFindTerm from './func.parse-find-term';\n\nexport default (...args: any[]): DebugElement[] => {\n  const [el, sel] = funcParseFindArgs(args);\n  if (isDebugNode(sel)) {\n    return [sel as any];\n  }\n\n  return el?.queryAll(funcParseFindTerm(sel)) || [];\n};\n","import { isNgDef } from '../../common/func.is-ng-def';\n\nexport default (value: any): boolean => {\n  return typeof value === 'function' || isNgDef(value, 't');\n};\n","import { getInjection } from '../../common/core.helpers';\nimport { Type } from '../../common/core.types';\nimport { getSourceOfMock } from '../../common/func.get-source-of-mock';\nimport { isNgDef } from '../../common/func.is-ng-def';\nimport mockHelperCrawl from '../crawl/mock-helper.crawl';\nimport mockHelperFind from '../find/mock-helper.find';\nimport funcGetFromNode from '../func.get-from-node';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport funcParseFindArgs from '../func.parse-find-args';\nimport funcParseFindArgsName from '../func.parse-find-args-name';\n\nimport funcIsValidFindInstanceSelector from './func.is-valid-find-instance-selector';\n\nconst defaultNotFoundValue = {}; // simulating Symbol\n\nexport default <T>(...args: any[]): T => {\n  const [el, sel, notFoundValue] = funcParseFindArgs(args, funcIsValidFindInstanceSelector, defaultNotFoundValue);\n  if (typeof sel !== 'function' && !isNgDef(sel, 't') && typeof sel !== 'string') {\n    throw new Error('Only classes or tokens are accepted');\n  }\n\n  const declaration: Type<T> = getSourceOfMock(sel);\n  const result: T[] = [];\n  const fixture = funcGetLastFixture();\n  if (fixture) {\n    mockHelperCrawl(\n      mockHelperFind(fixture, el, undefined),\n      (node, parent) => {\n        funcGetFromNode(result, node, declaration);\n        if (result.length === 0 && parent && parent.nativeNode.nodeName === '#comment') {\n          funcGetFromNode(result, parent, declaration);\n        }\n\n        return result.length > 0;\n      },\n      true,\n    );\n  } else {\n    try {\n      result.push(getInjection(declaration));\n    } catch (error) {\n      // forwarding unexpected errors: https://github.com/help-me-mom/ng-mocks/issues/7041\n      if (!error || typeof error !== 'object' || (error as any).ngTokenPath === undefined) {\n        throw error;\n      }\n    }\n  }\n\n  if (result.length > 0) {\n    return result[0];\n  }\n  if (notFoundValue !== defaultNotFoundValue) {\n    return notFoundValue;\n  }\n  throw new Error(`Cannot find an instance via ngMocks.findInstance(${funcParseFindArgsName(sel)})`);\n};\n","import { getInjection } from '../../common/core.helpers';\nimport { Type } from '../../common/core.types';\nimport { getSourceOfMock } from '../../common/func.get-source-of-mock';\nimport { isNgDef } from '../../common/func.is-ng-def';\nimport mockHelperCrawl from '../crawl/mock-helper.crawl';\nimport mockHelperFindAll from '../find/mock-helper.find-all';\nimport funcGetFromNode from '../func.get-from-node';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport funcParseFindArgs from '../func.parse-find-args';\n\nimport funcIsValidFindInstanceSelector from './func.is-valid-find-instance-selector';\n\nexport default <T>(...args: any[]): T[] => {\n  const [el, sel] = funcParseFindArgs(args, funcIsValidFindInstanceSelector);\n  if (typeof sel !== 'function' && !isNgDef(sel, 't') && typeof sel !== 'string') {\n    throw new Error('Only classes or tokens are accepted');\n  }\n\n  const declaration: Type<T> = getSourceOfMock(sel);\n  const result: T[] = [];\n  const scanned: any[] = [];\n  const fixture = funcGetLastFixture();\n  if (fixture) {\n    const elements = mockHelperFindAll(fixture, el, undefined);\n    for (const element of elements) {\n      mockHelperCrawl(\n        element,\n        (node, parent) => {\n          if (scanned.indexOf(node) === -1) {\n            funcGetFromNode(result, node, declaration);\n            scanned.push(node);\n          }\n          if (parent && parent.nativeNode.nodeName === '#comment' && scanned.indexOf(parent) === -1) {\n            funcGetFromNode(result, parent, declaration);\n            scanned.push(parent);\n          }\n        },\n        true,\n      );\n    }\n  } else {\n    try {\n      result.push(getInjection(declaration));\n    } catch {\n      // nothing to do\n    }\n  }\n\n  return result;\n};\n","export default (format: any, html: any) => {\n  return format((html as any[]).map(item => format(item, true)).join(''));\n};\n","import nestedCheckChildren from '../crawl/nested-check-children';\n\nimport handleArray from './handle-array';\nimport isDebugNode from './is-debug-node';\nimport isFixture from './is-fixture';\nimport { FORMAT_SET, FORMAT_SINGLE } from './types';\n\nexport default (handlePrimitives: any) =>\n  (html: any, outer = false) => {\n    const format = (value: Text | Comment | FORMAT_SINGLE | FORMAT_SET, innerOuter = false): any => {\n      if (Array.isArray(value)) {\n        return handleArray(format, value);\n      }\n      if (isFixture(value)) {\n        return format(value.debugElement, outer);\n      }\n      const result = handlePrimitives(format, value, innerOuter);\n      if (result !== undefined) {\n        return result;\n      }\n\n      if (isDebugNode(value) && value.nativeNode.nodeName === '#comment') {\n        return format(nestedCheckChildren(value), true);\n      }\n\n      return isDebugNode(value) ? format(value.nativeNode, innerOuter) : '';\n    };\n\n    return Array.isArray(html) ? html.map((item: any) => format(item, outer)) : format(html, outer);\n  };\n","export default (html: Text): string => html.nodeValue ?? html.textContent ?? html.wholeText;\n","export default (value: any): value is Text => {\n  return !!value && typeof value === 'object' && value.nodeName === '#text';\n};\n","import formatHandler from './format-handler';\nimport handleText from './handle-text';\nimport isHtmlElement from './is-html-element';\nimport isText from './is-text';\n\nconst normalizeValue = (html: string | undefined): string =>\n  html\n    ? html\n        .replace(new RegExp('\\\\s+', 'mg'), ' ')\n        .replace(new RegExp('<!--(.|\\\\n|\\\\r)*?-->|<!--(.|\\\\n|\\\\r)*', 'mg'), '')\n        .replace(new RegExp('\\\\s+', 'mg'), ' ')\n        .replace(new RegExp('>\\\\s+<', 'mg'), '><')\n        .replace(new RegExp('\"\\\\s+>', 'mg'), '\">')\n    : '';\n\nconst normalizeText = (text: string): string =>\n  text\n    .replace(new RegExp('&', 'mg'), '&amp;')\n    .replace(new RegExp('\"', 'mg'), '&quot;')\n    .replace(new RegExp('<', 'mg'), '&lt;')\n    .replace(new RegExp('>', 'mg'), '&gt;')\n    .replace(new RegExp(\"'\", 'mg'), '&#39;');\n\nconst getElementValue = (element: HTMLElement, outer: boolean): string =>\n  outer ? element.outerHTML : element.innerHTML;\n\nconst handlePrimitives = (format: any, value: any, outer: boolean): string | undefined => {\n  if (typeof value === 'string' || value === undefined) {\n    const result = normalizeValue(value);\n\n    return outer ? result : result.trim();\n  }\n  if (isHtmlElement(value)) {\n    return format(getElementValue(value, outer));\n  }\n  if (isText(value)) {\n    return handlePrimitives(format, normalizeText(handleText(value)), outer);\n  }\n\n  return undefined;\n};\n\nexport default (() => formatHandler(handlePrimitives))();\n","import formatHandler from './format-handler';\nimport handleText from './handle-text';\nimport isHtmlElement from './is-html-element';\nimport isText from './is-text';\n\nconst normalizeValue = (html: string | undefined): string => (html ? html.replace(new RegExp('\\\\s+', 'mg'), ' ') : '');\n\nconst getElementValue = (element: HTMLElement, outer: boolean): string => {\n  const value = element.textContent ?? '';\n\n  return outer ? value : value.trim();\n};\n\nconst handlePrimitives = (format: any, value: any, outer: boolean): string | undefined => {\n  if (typeof value === 'string' || value === undefined) {\n    const result = normalizeValue(value);\n\n    return outer ? result : result.trim();\n  }\n  if (isHtmlElement(value)) {\n    return format(getElementValue(value, outer));\n  }\n  if (isText(value)) {\n    return handlePrimitives(format, handleText(value), outer);\n  }\n\n  return undefined;\n};\n\nexport default (() => formatHandler(handlePrimitives))();\n","import { registerMockFunction } from '../mock-service/helper.mock-service';\nimport { CustomMockFunction } from '../mock-service/types';\n\ntype param = 'jasmine' | 'jest' | 'default' | 'reset' | CustomMockFunction;\n\nconst calls: param[] = [];\n\nexport default (type: param) => {\n  if (type === 'reset') {\n    calls.pop();\n  } else {\n    calls.push(type);\n  }\n  const action: param | undefined = calls[calls.length - 1];\n\n  if (action === 'jasmine') {\n    return registerMockFunction(mockName => jasmine.createSpy(mockName));\n  }\n  // istanbul ignore if: because it is run with jasmine\n  if (action === 'jest') {\n    return registerMockFunction(name => jest.fn().mockName(name));\n  }\n  if (!action || action === 'default' || action === 'reset') {\n    return registerMockFunction();\n  }\n\n  return registerMockFunction(action);\n};\n","/* eslint-disable no-console */\n\nimport coreDefineProperty from '../common/core.define-property';\n\n// Thanks Ivy, it does not throw an error, and we have to use injector.\nexport default (defaultMethods: Array<keyof typeof console>, factory: (name: string) => any) =>\n  (...methods: Array<keyof typeof console>): void => {\n    const backup: Array<keyof typeof console> = [];\n\n    beforeEach(() => {\n      for (const method of defaultMethods) {\n        if (methods.indexOf(method) === -1) {\n          methods.push(method);\n        }\n      }\n\n      for (const method of methods) {\n        coreDefineProperty(console, `__ngMocksBackup_${method}`, (console as any)[`__ngMocksBackup_${method}`] || []);\n        (console as any)[`__ngMocksBackup_${method}`].push(console[method]);\n        backup.push(method);\n        console[method] = factory(method) as never;\n      }\n    });\n\n    afterEach(() => {\n      for (const method of backup) {\n        console[method] = (console as any)[`__ngMocksBackup_${method}`].pop();\n      }\n      backup.splice(0, backup.length);\n    });\n  };\n","import helperMockService from '../mock-service/helper.mock-service';\n\nimport mockHelperConsole from './mock-helper.console';\n\nconst factory = (propName: string) => helperMockService.mockFunction(`console.${propName}`);\n\n// Thanks Ivy, it does not throw an error, and we have to use injector.\nexport default mockHelperConsole(['log'], factory);\n","import coreDefineProperty from '../common/core.define-property';\n\nimport mockHelperConsole from './mock-helper.console';\n\nconst factory =\n  (propName: string) =>\n  (...args: any[]) => {\n    const error = new Error(args.join(' '));\n    coreDefineProperty(error, 'ngMocksConsoleCatch', propName);\n    throw error;\n  };\n\n// Thanks Ivy, it does not throw an error, and we have to use injector.\nexport default mockHelperConsole(['warn', 'error'], factory);\n","import { flatten } from '../common/core.helpers';\nimport { AnyDeclaration } from '../common/core.types';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport { IMockBuilderConfig } from '../mock-builder/types';\n\nexport default <T>(\n  def: AnyDeclaration<T> | string | Array<AnyDeclaration<T> | string>,\n  config?: IMockBuilderConfig,\n): void => {\n  const map = ngMocksUniverse.getConfigMock();\n  for (const item of flatten(def)) {\n    if (config) {\n      map.set(item, config);\n    } else {\n      map.delete(item);\n    }\n  }\n};\n","import { Injector } from '@angular/core';\n\nimport { flatten } from '../common/core.helpers';\nimport { AnyDeclaration } from '../common/core.types';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nexport default <T>(\n  def: AnyDeclaration<T> | string | Array<AnyDeclaration<T> | string>,\n  callback?: (instance: undefined | T, injector: Injector) => void | Partial<T>,\n): void => {\n  const map = ngMocksUniverse.getOverrides();\n  for (const item of flatten(def)) {\n    if (callback) {\n      const set: Set<any> = map.has(item) ? map.get(item) : new Set();\n      set.add(callback);\n      map.set(item, set);\n    } else {\n      map.delete(item);\n    }\n  }\n};\n","import { getTestBed, TestBed, TestBedStatic, TestModuleMetadata } from '@angular/core/testing';\n\nimport coreDefineProperty from '../common/core.define-property';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nconst hooks: {\n  after: Array<\n    (original: TestBedStatic['resetTestingModule'], instance: TestBedStatic) => TestBedStatic['resetTestingModule']\n  >;\n  before: Array<\n    (\n      original: TestBedStatic['configureTestingModule'],\n      instance: TestBedStatic,\n    ) => TestBedStatic['configureTestingModule']\n  >;\n} = ngMocksUniverse.global.get('faster-hooks') || {\n  after: [],\n  before: [],\n};\nngMocksUniverse.global.set('faster-hooks', hooks);\n\nconst configureTestingModule =\n  (\n    original: TestBedStatic['configureTestingModule'],\n    instance: TestBedStatic,\n  ): TestBedStatic['configureTestingModule'] =>\n  (moduleDef: TestModuleMetadata) => {\n    if ((TestBed as any).ngMocksFasterLock) {\n      return original.call(instance, moduleDef);\n    }\n\n    ngMocksUniverse.global.set('bullet:customized', true);\n\n    let final = original;\n    for (const callback of hooks.before) {\n      final = callback(final, instance);\n    }\n\n    try {\n      coreDefineProperty(TestBed, 'ngMocksFasterLock', true);\n\n      return final.call(instance, moduleDef);\n    } finally {\n      coreDefineProperty(TestBed, 'ngMocksFasterLock', undefined);\n    }\n  };\n\nconst resetTestingModule =\n  (original: TestBedStatic['resetTestingModule'], instance: TestBedStatic): TestBedStatic['resetTestingModule'] =>\n  () => {\n    if ((TestBed as any).ngMocksFasterLock) {\n      return original.call(instance);\n    }\n\n    if (ngMocksUniverse.global.has('bullet')) {\n      if (ngMocksUniverse.global.has('bullet:customized')) {\n        ngMocksUniverse.global.set('bullet:reset', true);\n      }\n\n      return instance;\n    }\n    ngMocksUniverse.global.delete('bullet:customized');\n    ngMocksUniverse.global.delete('bullet:reset');\n\n    let final = original;\n    for (const callback of hooks.after) {\n      final = callback(final, instance);\n    }\n\n    try {\n      coreDefineProperty(TestBed, 'ngMocksFasterLock', true);\n\n      return final.call(instance);\n    } finally {\n      coreDefineProperty(TestBed, 'ngMocksFasterLock', undefined);\n    }\n  };\n\nexport default () => {\n  if (!(TestBed as any).ngMocksFasterInstalled) {\n    TestBed.configureTestingModule = configureTestingModule(TestBed.configureTestingModule as never, TestBed as never);\n    TestBed.resetTestingModule = resetTestingModule(TestBed.resetTestingModule as never, TestBed as never);\n    coreDefineProperty(TestBed, 'ngMocksFasterInstalled', true);\n  }\n\n  const testBed = getTestBed();\n  if (!(testBed as any).ngMocksFasterInstalled) {\n    testBed.configureTestingModule = configureTestingModule(testBed.configureTestingModule as never, testBed as never);\n    testBed.resetTestingModule = resetTestingModule(testBed.resetTestingModule as never, testBed as never);\n    coreDefineProperty(testBed, 'ngMocksFasterInstalled', true);\n  }\n\n  return hooks;\n};\n","import { getTestBed } from '@angular/core/testing';\n\nexport default (): void => {\n  const testBed: any = getTestBed();\n  if (testBed.shouldTearDownTestingModule !== undefined && testBed.shouldTearDownTestingModule()) {\n    testBed.tearDownTestingModule();\n  }\n  testBed._instantiated = false;\n  testBed._moduleFactory = undefined;\n  testBed._testModuleRef = null;\n};\n","import { ComponentFixture, getTestBed, TestBed } from '@angular/core/testing';\n\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport mockHelperFasterInstall from './mock-helper.faster-install';\nimport mockHelperFlushTestBed from './mock-helper.flush-test-bed';\n\nconst resetFixtures = (id: never) => {\n  const activeFixtures: Array<ComponentFixture<any> & { ngMocksStackId?: any }> =\n    (getTestBed() as any)._activeFixtures || /* istanbul ignore next */ [];\n\n  let active = 0;\n  for (let i = activeFixtures.length - 1; i >= 0; i -= 1) {\n    if (!activeFixtures[i].ngMocksStackId || activeFixtures[i].ngMocksStackId === id) {\n      activeFixtures[i].ngMocksStackId = undefined;\n      activeFixtures[i].destroy();\n      activeFixtures.splice(i, 1);\n    } else {\n      active += 1;\n    }\n  }\n  if (active === 0) {\n    mockHelperFlushTestBed();\n  }\n};\n\nconst idAdd = (id: any) => {\n  const bulletStack: any[] = ngMocksUniverse.global.get('bullet:stack') ?? [];\n  bulletStack.push(id);\n  ngMocksUniverse.global.set('bullet:stack', bulletStack);\n  ngMocksUniverse.global.set('bullet:stack:id', id);\n};\nconst idRemove = (id: any) => {\n  const bulletStack: any[] = ngMocksUniverse.global.get('bullet:stack');\n  bulletStack.splice(bulletStack.indexOf(id), 1);\n  if (bulletStack.length > 0) {\n    ngMocksUniverse.global.set('bullet:stack:id', bulletStack[bulletStack.length - 1]);\n  } else {\n    ngMocksUniverse.global.delete('bullet:stack:id');\n  }\n\n  resetFixtures(id as never);\n};\n\nexport default () => {\n  mockHelperFasterInstall();\n\n  const idAll = {};\n  const idEach = {};\n\n  beforeAll(() => {\n    if (ngMocksUniverse.global.has('bullet:customized')) {\n      TestBed.resetTestingModule();\n    }\n    ngMocksUniverse.global.set('bullet', true);\n    idAdd(idAll);\n  });\n\n  beforeEach(() => {\n    idAdd(idEach);\n  });\n  afterEach(() => {\n    idRemove(idEach);\n  });\n\n  afterAll(() => {\n    idRemove(idAll);\n    ngMocksUniverse.global.delete('bullet');\n    if (ngMocksUniverse.global.has('bullet:reset')) {\n      TestBed.resetTestingModule();\n    }\n  });\n};\n","import collectDeclarations from '../resolve/collect-declarations';\n\nimport coreConfig from './core.config';\nimport { flatten } from './core.helpers';\nimport { AnyDeclaration } from './core.types';\nimport funcGetType from './func.get-type';\n\nconst iterator = <T = any>(\n  source: AnyDeclaration<T>,\n  callback: (source: AnyDeclaration<T>) => void,\n  scanned = new Set<any>(),\n): void => {\n  const meta = collectDeclarations(source);\n  for (const decorator of meta.decorators) {\n    for (const key of coreConfig.dependencies) {\n      if (!meta[decorator][key]) {\n        continue;\n      }\n      for (const def of flatten(meta[decorator][key])) {\n        const declaration = funcGetType(def);\n        if (!declaration || scanned.has(declaration)) {\n          continue;\n        }\n        scanned.add(declaration);\n        callback(declaration);\n        iterator(declaration, callback, scanned);\n      }\n    }\n  }\n};\n\nexport default iterator;\n","import ngMocksUniverse from '../common/ng-mocks-universe';\n\nexport default () => {\n  ngMocksUniverse.cacheDeclarations.clear();\n  ngMocksUniverse.config.get('ngMocksDepsSkip')?.clear();\n};\n","import { AnyDeclaration } from '../common/core.types';\nimport funcIterateDeclaration from '../common/func.iterate-declaration';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport funcGlobalPrepare from './func.global-prepare';\n\nconst action = (source: AnyDeclaration<any>): void => {\n  ngMocksUniverse.getDefaults().set(source, ['exclude']);\n};\nexport default (source: AnyDeclaration<any>, recursively = false): void => {\n  funcGlobalPrepare();\n  action(source);\n\n  if (recursively) {\n    funcIterateDeclaration(source, action);\n  }\n};\n","import { AnyDeclaration } from '../common/core.types';\nimport funcIterateDeclaration from '../common/func.iterate-declaration';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport funcGlobalPrepare from './func.global-prepare';\n\nconst action = (source: AnyDeclaration<any>): void => {\n  ngMocksUniverse.getDefaults().set(source, ['keep']);\n};\nexport default (source: AnyDeclaration<any>, recursively = false): void => {\n  funcGlobalPrepare();\n  action(source);\n\n  if (recursively) {\n    funcIterateDeclaration(source, action);\n  }\n};\n","import { AnyDeclaration } from '../common/core.types';\nimport funcIterateDeclaration from '../common/func.iterate-declaration';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport funcGlobalPrepare from './func.global-prepare';\n\nconst action = (source: AnyDeclaration<any>): void => {\n  ngMocksUniverse.getDefaults().set(source, ['mock']);\n};\nexport default (source: AnyDeclaration<any>, recursively = false): void => {\n  funcGlobalPrepare();\n  action(source);\n\n  if (recursively) {\n    funcIterateDeclaration(source, action);\n  }\n};\n","import { AnyType } from '../common/core.types';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport funcGlobalPrepare from './func.global-prepare';\n\nexport default (source: AnyType<any>, destination: AnyType<any>): void => {\n  let fail = true;\n  if (isNgDef(source, 'm') && isNgDef(destination, 'm')) {\n    fail = false;\n  } else if (isNgDef(source, 'c') && isNgDef(destination, 'c')) {\n    fail = false;\n  } else if (isNgDef(source, 'd') && isNgDef(destination, 'd')) {\n    fail = false;\n  } else if (isNgDef(source, 'p') && isNgDef(destination, 'p')) {\n    fail = false;\n  }\n\n  if (fail) {\n    throw new Error('Cannot replace the declaration, both have to be a Module, a Component, a Directive or a Pipe');\n  }\n\n  funcGlobalPrepare();\n  ngMocksUniverse.getDefaults().set(source, ['replace', destination]);\n};\n","import { AnyDeclaration } from '../common/core.types';\nimport funcIterateDeclaration from '../common/func.iterate-declaration';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport funcGlobalPrepare from './func.global-prepare';\nimport mockHelperDefaultMock from './mock-helper.default-mock';\n\nconst action = (source: AnyDeclaration<any>): void => {\n  ngMocksUniverse.getDefaults().delete(source);\n  mockHelperDefaultMock(source);\n};\n\nexport default (source: AnyDeclaration<any>, recursively = false): void => {\n  funcGlobalPrepare();\n  action(source);\n\n  if (recursively) {\n    funcIterateDeclaration(source, action);\n  }\n};\n","import { TestModuleMetadata } from '@angular/core/testing';\n\nimport CoreDefStack from '../common/core.def-stack';\nimport { flatten, mapKeys, mapValues } from '../common/core.helpers';\nimport coreReflectModuleResolve from '../common/core.reflect.module-resolve';\nimport funcGetType from '../common/func.get-type';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport { isNgInjectionToken } from '../common/func.is-ng-injection-token';\nimport { isNgModuleDefWithProviders } from '../common/func.is-ng-module-def-with-providers';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport { MockComponent } from '../mock-component/mock-component';\nimport { MockDirective } from '../mock-directive/mock-directive';\nimport { MockModule } from '../mock-module/mock-module';\nimport { MockPipe } from '../mock-pipe/mock-pipe';\nimport mockProvider from '../mock-service/mock-provider';\n\ntype Data = {\n  declarations: any[];\n  exclude: Set<any>;\n  imports: any[];\n  keep: Set<any>;\n  mock: Set<any>;\n  optional: Map<any, any>;\n  providers: any[];\n  skip: Set<any>;\n};\n\nconst skipDef = (def: any, skip: Set<any>, exclude: Set<any>): boolean => {\n  if (skip.has(def)) {\n    return true;\n  }\n  skip.add(def);\n\n  return exclude.has(def);\n};\n\nconst createMetaHandler = (\n  optional: Map<any, any>,\n  proto: any,\n  imports: any[],\n  declarations: any[],\n  providers: any[],\n): void => {\n  const def = optional.get(proto) || proto;\n\n  if (isNgDef(def, 'm')) {\n    imports.push(def);\n  } else if (isNgDef(def, 'c') || isNgDef(def, 'd')) {\n    declarations.push(def);\n  } else if (isNgDef(def, 'p')) {\n    declarations.push(def);\n    providers.push(def);\n  } else if (!isNgInjectionToken(def)) {\n    providers.push(def);\n  }\n};\n\nconst createMeta = ({ keep, skip, optional, exclude, imports, declarations, providers }: Data): TestModuleMetadata => {\n  for (const proto of keep) {\n    if (skip.has(proto) || exclude.has(proto) || optional.has(proto)) {\n      continue;\n    }\n    createMetaHandler(optional, proto, imports, declarations, providers);\n  }\n\n  return { declarations, imports, providers };\n};\n\nconst typeMap: Array<[any, string]> = [\n  ['m', 'module'],\n  ['c', 'component'],\n  ['d', 'directive'],\n  ['p', 'pipe'],\n];\n\nconst getType = (def: any, keep: Set<any>): string => {\n  if (isNgModuleDefWithProviders(def)) {\n    return 'module-with-providers';\n  }\n  for (const [flag, value] of typeMap) {\n    if (isNgDef(def, flag)) {\n      return flag === 'm' && keep.has(def) ? `${value}-keep` : value;\n    }\n  }\n\n  return '';\n};\n\nconst handleModuleWithProviders = (data: Data, def: any): void => {\n  if (data.skip.has(def.ngModule)) {\n    return;\n  }\n  data.skip.add(def.ngModule);\n  if (data.exclude.has(def.ngModule)) {\n    return;\n  }\n\n  data.imports.push(data.keep.has(def.ngModule) ? def : MockModule(def));\n};\n\nconst handleDeclaration = (data: Data, def: any, callback: any, bucket: any[]): void => {\n  if (skipDef(def, data.skip, data.exclude)) {\n    return;\n  }\n\n  bucket.push(data.keep.has(def) ? def : callback(def));\n};\n\nconst handleDestructuring = (data: Data, def: any, callback: any): void => {\n  if (skipDef(def, data.skip, data.exclude)) {\n    return;\n  }\n\n  const meta = coreReflectModuleResolve(def);\n  for (const toMock of flatten([meta.declarations, meta.imports])) {\n    callback(data, toMock);\n  }\n  for (const toMock of meta.providers ? flatten(meta.providers) : []) {\n    resolveProvider(data, toMock);\n  }\n};\n\nconst resolveProvider = ({ skip, keep, providers, exclude }: Data, def: any): void => {\n  const provider = funcGetType(def);\n  skip.add(provider);\n  if (exclude.has(provider)) {\n    return;\n  }\n\n  const providerDef = keep.has(provider) ? def : mockProvider(def);\n  if (providerDef) {\n    providers.push(providerDef);\n  }\n};\n\nconst resolveMap: Record<string, any> = {\n  component: MockComponent,\n  directive: MockDirective,\n  pipe: MockPipe,\n};\n\nconst resolveHandler = (data: Data, type: string, def: any, skipDestruction: boolean): void => {\n  if (type === 'module-with-providers') {\n    handleModuleWithProviders(data, def);\n  } else if (type === 'module-keep') {\n    handleDeclaration(data, def, MockModule, data.imports); // MockModule will not be called because the def is kept.\n  } else if (type === 'module' && skipDestruction) {\n    handleDeclaration(data, def, MockModule, data.imports);\n  } else if (type === 'module') {\n    handleDestructuring(data, def, resolve);\n  } else if (resolveMap[type]) {\n    handleDeclaration(data, def, resolveMap[type], data.declarations);\n  } else {\n    resolveProvider(data, def);\n  }\n};\n\nconst resolve = (data: Data, proto: any, skipDestruction = true): void => {\n  if (!proto) {\n    return;\n  }\n\n  const type = getType(proto, data.keep);\n  let def: any;\n\n  // an attempt to replace declarations.\n  if (type !== 'module-with-providers') {\n    const value = data.optional.get(proto);\n    if (value && value !== proto) {\n      def = value;\n      data.keep.add(def);\n    }\n  }\n  if (!def) {\n    def = proto;\n  }\n\n  resolveHandler(data, type, def, skipDestruction);\n};\n\nconst generateDataWithUniverse = (keep: Set<any>, mock: Set<any>, exclude: Set<any>, optional: Map<any, any>): void => {\n  for (const k of mapKeys(ngMocksUniverse.getDefaults())) {\n    const v = ngMocksUniverse.getBuildDeclaration(k);\n    if (keep.has(k) || mock.has(k) || exclude.has(k)) {\n      continue;\n    }\n    optional.set(k, v);\n\n    if (v === null) {\n      exclude.add(k);\n    } else if (v === undefined) {\n      mock.add(k);\n    } else if (k === v) {\n      keep.add(k);\n    }\n  }\n};\n\nconst generateData = (protoKeep: any, protoMock: any, protoExclude: any): Data => {\n  const keep = new Set(flatten(protoKeep || []));\n  const mock = new Set(flatten(protoMock || []));\n  const exclude = new Set(flatten(protoExclude || []));\n  const optional = new Map();\n  generateDataWithUniverse(keep, mock, exclude, optional);\n\n  return {\n    declarations: [],\n    exclude,\n    imports: [],\n    keep,\n    mock,\n    optional,\n    providers: [],\n    skip: new Set(),\n  };\n};\n\nexport default (keep: any, mock: any = null, exclude: any = null): TestModuleMetadata => {\n  const data: Data = generateData(keep, mock, exclude);\n\n  const resolutions = new Map();\n  ngMocksUniverse.config.set('ngMocksDepsResolution', resolutions);\n  for (const mockDef of mapValues(data.keep)) {\n    resolutions.set(mockDef, 'keep');\n  }\n  for (const mockDef of mapValues(data.exclude)) {\n    resolutions.set(mockDef, 'exclude');\n  }\n\n  ngMocksUniverse.config.set('mockNgDefResolver', new CoreDefStack());\n  for (const def of mapValues(data.mock)) {\n    resolutions.set(def, 'mock');\n    if (data.optional.has(def)) {\n      continue;\n    }\n    resolve(data, def, false);\n  }\n  const meta = createMeta(data);\n  ngMocksUniverse.config.delete('mockNgDefResolver');\n  ngMocksUniverse.config.delete('ngMocksDepsResolution');\n\n  return meta;\n};\n","import mockHelperAttributes from './mock-helper.attributes';\n\nexport default (...args: any[]) => mockHelperAttributes('input', 'inputs', ...args);\n","import mockHelperAttributes from './mock-helper.attributes';\n\nexport default (...args: any[]) => mockHelperAttributes('output', 'outputs', ...args);\n","import coreConfig from '../common/core.config';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nexport default (): void => {\n  ngMocksUniverse.builtDeclarations = new Map();\n  ngMocksUniverse.builtProviders = new Map();\n  ngMocksUniverse.cacheDeclarations = new Map();\n  ngMocksUniverse.cacheProviders = new Map();\n  ngMocksUniverse.config = new Map();\n  ngMocksUniverse.configInstance = new Map();\n  ngMocksUniverse.flags = new Set(coreConfig.flags);\n  ngMocksUniverse.touches = new Set();\n};\n","import { QueryList, TemplateRef, ViewContainerRef } from '@angular/core';\n\nimport funcIsMock from '../../common/func.is-mock';\nimport { MockConfig } from '../../common/mock';\n\nconst getValVcr = (entryPoint: MockConfig): Array<[any, ViewContainerRef]> => {\n  const result: Array<[any, ViewContainerRef]> = [];\n\n  for (const key of entryPoint.__ngMocksConfig.queryScanKeys || /* istanbul ignore next */ []) {\n    const value = (entryPoint as any)[key];\n    const vcr = (entryPoint as any)[`__ngMocksVcr_${key}`];\n\n    const scanValue = value instanceof QueryList ? value.toArray() : [value];\n    const scanVcr = vcr instanceof QueryList ? vcr.toArray() : [vcr];\n\n    for (let index = 0; index < scanValue.length; index += 1) {\n      result.push([scanValue[index], scanVcr[index]]);\n    }\n  }\n\n  return result;\n};\n\nconst handleDirective = (\n  entryPoint: {\n    __template?: TemplateRef<any>;\n    __vcr?: ViewContainerRef;\n  },\n  isExpectedTemplate: (tpl: TemplateRef<any>) => boolean,\n  callback: (vcr: ViewContainerRef, tpl: TemplateRef<any>) => boolean,\n): boolean => {\n  return (\n    !!entryPoint.__template &&\n    !!entryPoint.__vcr &&\n    isExpectedTemplate(entryPoint.__template) &&\n    callback(entryPoint.__vcr, entryPoint.__template)\n  );\n};\n\nconst isRightTemplate = (\n  localVcr: ViewContainerRef | undefined,\n  localValue: any,\n  isExpectedTemplate: (tpl: TemplateRef<any>) => boolean,\n): boolean => {\n  return !!localVcr && localValue instanceof TemplateRef && isExpectedTemplate(localValue);\n};\n\nconst findDeep = (\n  entryPoint: object,\n  isExpectedTemplate: (tpl: TemplateRef<any>) => boolean,\n  callback: (vcr: ViewContainerRef, tpl: TemplateRef<any>) => boolean,\n): boolean => {\n  if (!funcIsMock(entryPoint)) {\n    throw new Error('Only instances of mock declarations are accepted');\n  }\n\n  // structural directive\n  if (handleDirective(entryPoint, isExpectedTemplate, callback)) {\n    return true;\n  }\n\n  for (const [localValue, localVcr] of getValVcr(entryPoint)) {\n    if (funcIsMock(localValue) && findDeep(localValue, isExpectedTemplate, callback)) {\n      return true;\n    }\n    if (isRightTemplate(localVcr, localValue, isExpectedTemplate)) {\n      return callback(localVcr, localValue);\n    }\n  }\n\n  return false;\n};\n\nexport default ((): typeof findDeep => findDeep)();\n","import { TemplateRef } from '@angular/core';\n\nimport coreInjector from '../../common/core.injector';\nimport funcIsMock from '../../common/func.is-mock';\n\nexport default (param: any): TemplateRef<any> => {\n  if (param instanceof TemplateRef) {\n    return param;\n  }\n  if (funcIsMock(param) && param.__template) {\n    return param.__template;\n  }\n\n  const injector = param?.nativeNode && param.injector;\n  if (injector) {\n    const template = coreInjector(TemplateRef, injector);\n\n    if (template) {\n      return template;\n    }\n  }\n\n  const error = new Error(\n    'Unknown template has been passed, only TemplateRef or a mock structural directive are supported',\n  );\n  (error as any).param = param;\n\n  throw error;\n};\n","import funcFindDeep from './func.find-deep';\nimport funcParseTemplate from './func.parse-template';\n\nexport default (instance: object, param?: object) => {\n  const template = param ? funcParseTemplate(param) : undefined;\n\n  let result = false;\n  funcFindDeep(\n    instance,\n    tpl => {\n      if (!template) {\n        return true;\n      }\n\n      return tpl.elementRef.nativeElement === template.elementRef.nativeElement;\n    },\n    vcr => {\n      vcr.clear();\n      result = true;\n\n      return false;\n    },\n  );\n\n  if (!result) {\n    throw new Error('Cannot find path to the TemplateRef');\n  }\n};\n","import funcFindDeep from './func.find-deep';\nimport funcParseTemplate from './func.parse-template';\n\nexport default (instance: object, param: object, $implicit?: any, variables?: Record<keyof any, any>) => {\n  const template = funcParseTemplate(param);\n\n  const result = funcFindDeep(\n    instance,\n    tpl => tpl.elementRef.nativeElement === template.elementRef.nativeElement,\n    (vcr, tpl) => {\n      const context = {\n        ...variables,\n        $implicit,\n      };\n      vcr.clear();\n      vcr.createEmbeddedView(tpl, context).detectChanges();\n\n      return true;\n    },\n  );\n\n  if (!result) {\n    throw new Error('Cannot find path to the TemplateRef');\n  }\n};\n","import { Type } from '../../common/core.types';\nimport crawlByAttribute from '../crawl/crawl-by-attribute';\nimport crawlByAttributeValue from '../crawl/crawl-by-attribute-value';\nimport crawlByDeclaration from '../crawl/crawl-by-declaration';\nimport crawlById from '../crawl/crawl-by-id';\n\nexport default (selector: string | Type<any> | [string] | [string, any] | any) => {\n  if (typeof selector === 'string') {\n    return crawlById(selector);\n  }\n  if (Array.isArray(selector) && selector.length === 1 && typeof selector[0] === 'string') {\n    return crawlByAttribute(selector[0]);\n  }\n  if (Array.isArray(selector) && selector.length === 2 && typeof selector[0] === 'string') {\n    return crawlByAttributeValue(selector[0], selector[1]);\n  }\n  if (typeof selector === 'function') {\n    return crawlByDeclaration(selector);\n  }\n\n  throw new Error('Unknown selector');\n};\n","import { TemplateRef } from '@angular/core';\n\nimport coreInjector from '../../common/core.injector';\nimport { MockedDebugNode } from '../../mock-render/types';\nimport detectTextNode from '../crawl/detect-text-node';\n\nexport default (\n    result: Array<TemplateRef<any>>,\n    detector: (node: MockedDebugNode) => boolean,\n    limit = 0,\n  ): ((node: MockedDebugNode) => boolean) =>\n  node => {\n    try {\n      const instance = !detectTextNode(node) && detector(node) ? coreInjector(TemplateRef, node.injector) : undefined;\n      if (instance) {\n        result.push(instance);\n      }\n    } catch {\n      // nothing to do\n    }\n\n    return !!limit && result.length === limit;\n  };\n","export default (value: any): boolean => {\n  if (typeof value === 'string') {\n    return true;\n  }\n  if (Array.isArray(value) && typeof value[0] === 'string') {\n    return true;\n  }\n  if (typeof value === 'function') {\n    return true;\n  }\n\n  return false;\n};\n","import { TemplateRef } from '@angular/core';\n\nimport nestedCheck from '../crawl/nested-check';\nimport mockHelperFind from '../find/mock-helper.find';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport funcParseFindArgs from '../func.parse-find-args';\nimport funcParseFindArgsName from '../func.parse-find-args-name';\n\nimport detectCrawler from './detect-crawler';\nimport detectTemplateRef from './detect-template-ref';\nimport funcIsValidTemplateRefSelector from './func.is-valid-template-ref-selector';\n\nconst defaultNotFoundValue = {}; // simulating Symbol\n\nexport default (...args: any[]) => {\n  const [el, sel, notFoundValue] = funcParseFindArgs(args, funcIsValidTemplateRefSelector, defaultNotFoundValue);\n\n  const result: Array<TemplateRef<any>> = [];\n  const detector = detectCrawler(sel);\n  nestedCheck(mockHelperFind(funcGetLastFixture(), el, undefined), undefined, detectTemplateRef(result, detector, 1));\n  if (result.length > 0) {\n    return result[0];\n  }\n  if (notFoundValue !== defaultNotFoundValue) {\n    return notFoundValue;\n  }\n\n  throw new Error(`Cannot find a TemplateRef via ngMocks.findTemplateRef(${funcParseFindArgsName(sel)})`);\n};\n","import { TemplateRef } from '@angular/core';\n\nimport nestedCheck from '../crawl/nested-check';\nimport mockHelperFind from '../find/mock-helper.find';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport funcParseFindArgs from '../func.parse-find-args';\n\nimport detectCrawler from './detect-crawler';\nimport detectTemplateRef from './detect-template-ref';\nimport funcIsValidTemplateRefSelector from './func.is-valid-template-ref-selector';\n\nexport default (...args: any[]): Array<TemplateRef<any>> => {\n  const [el, sel] = funcParseFindArgs(args, funcIsValidTemplateRefSelector);\n\n  const result: Array<TemplateRef<any>> = [];\n  const detector = detectCrawler(sel);\n  nestedCheck(mockHelperFind(funcGetLastFixture(), el, undefined), undefined, detectTemplateRef(result, detector));\n\n  return result;\n};\n","import coreConfig from '../common/core.config';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport mockHelperCrawl from './crawl/mock-helper.crawl';\nimport mockHelperReveal from './crawl/mock-helper.reveal';\nimport mockHelperRevealAll from './crawl/mock-helper.reveal-all';\nimport mockHelperChange from './cva/mock-helper.change';\nimport mockHelperTouch from './cva/mock-helper.touch';\nimport mockHelperClick from './events/mock-helper.click';\nimport mockHelperEvent from './events/mock-helper.event';\nimport mockHelperTrigger from './events/mock-helper.trigger';\nimport mockHelperFind from './find/mock-helper.find';\nimport mockHelperFindAll from './find/mock-helper.find-all';\nimport mockHelperFindInstance from './find-instance/mock-helper.find-instance';\nimport mockHelperFindInstances from './find-instance/mock-helper.find-instances';\nimport mockHelperFormatHtml from './format/mock-helper.format-html';\nimport mockHelperFormatText from './format/mock-helper.format-text';\nimport mockHelperAutoSpy from './mock-helper.auto-spy';\nimport mockHelperConsoleIgnore from './mock-helper.console-ignore';\nimport mockHelperConsoleThrow from './mock-helper.console-throw';\nimport mockHelperDefaultConfig from './mock-helper.default-config';\nimport mockHelperDefaultMock from './mock-helper.default-mock';\nimport mockHelperFaster from './mock-helper.faster';\nimport mockHelperFlushTestBed from './mock-helper.flush-test-bed';\nimport mockHelperGet from './mock-helper.get';\nimport mockHelperGlobalExclude from './mock-helper.global-exclude';\nimport mockHelperGlobalKeep from './mock-helper.global-keep';\nimport mockHelperGlobalMock from './mock-helper.global-mock';\nimport mockHelperGlobalReplace from './mock-helper.global-replace';\nimport mockHelperGlobalWipe from './mock-helper.global-wipe';\nimport mockHelperGuts from './mock-helper.guts';\nimport mockHelperInput from './mock-helper.input';\nimport mockHelperOutput from './mock-helper.output';\nimport mockHelperReset from './mock-helper.reset';\nimport mockHelperStub from './mock-helper.stub';\nimport mockHelperStubMember from './mock-helper.stub-member';\nimport mockHelperHide from './render/mock-helper.hide';\nimport mockHelperRender from './render/mock-helper.render';\nimport mockHelperFindTemplateRef from './template-ref/mock-helper.find-template-ref';\nimport mockHelperFindTemplateRefs from './template-ref/mock-helper.find-template-refs';\n\nconst flagNames = ['onMockBuilderMissingDependency', 'onMockInstanceRestoreNeed', 'onTestBedFlushNeed'] as const;\n\nexport default {\n  autoSpy: mockHelperAutoSpy,\n  change: mockHelperChange,\n  click: mockHelperClick,\n  config: (config: {\n    mockRenderCacheSize?: number | null;\n    onMockBuilderMissingDependency?: 'throw' | 'warn' | 'i-know-but-disable' | null;\n    onMockInstanceRestoreNeed?: 'throw' | 'warn' | 'i-know-but-disable' | null;\n    onTestBedFlushNeed?: 'throw' | 'warn' | 'i-know-but-disable' | null;\n  }) => {\n    const flags = ngMocksUniverse.global.get('flags');\n    for (const flag of flagNames) {\n      if (config[flag] === null) {\n        flags[flag] = coreConfig[flag];\n      } else if (config[flag] !== undefined) {\n        flags[flag] = config[flag];\n      }\n    }\n    if (config.mockRenderCacheSize === null) {\n      ngMocksUniverse.global.delete('mockRenderCacheSize');\n    } else if (config.mockRenderCacheSize !== undefined) {\n      ngMocksUniverse.global.set('mockRenderCacheSize', config.mockRenderCacheSize);\n    }\n  },\n  crawl: mockHelperCrawl,\n  defaultConfig: mockHelperDefaultConfig,\n  defaultMock: mockHelperDefaultMock,\n  event: mockHelperEvent,\n  faster: mockHelperFaster,\n  find: mockHelperFind,\n  findAll: mockHelperFindAll,\n  findInstance: mockHelperFindInstance,\n  findInstances: mockHelperFindInstances,\n  findTemplateRef: mockHelperFindTemplateRef,\n  findTemplateRefs: mockHelperFindTemplateRefs,\n  flushTestBed: mockHelperFlushTestBed,\n  formatHtml: mockHelperFormatHtml,\n  formatText: mockHelperFormatText,\n  get: mockHelperGet,\n  globalExclude: mockHelperGlobalExclude,\n  globalKeep: mockHelperGlobalKeep,\n  globalMock: mockHelperGlobalMock,\n  globalReplace: mockHelperGlobalReplace,\n  globalWipe: mockHelperGlobalWipe,\n  guts: mockHelperGuts,\n  hide: mockHelperHide,\n  ignoreOnConsole: mockHelperConsoleIgnore,\n  input: mockHelperInput,\n  output: mockHelperOutput,\n  render: mockHelperRender,\n  reset: mockHelperReset,\n  reveal: mockHelperReveal,\n  revealAll: mockHelperRevealAll,\n  stub: mockHelperStub,\n  stubMember: mockHelperStubMember,\n  throwOnConsole: mockHelperConsoleThrow,\n  touch: mockHelperTouch,\n  trigger: mockHelperTrigger,\n};\n","/* eslint-disable max-lines */\n\nimport { DebugNode, EventEmitter, InjectionToken, Injector, Provider, TemplateRef } from '@angular/core';\nimport { ComponentFixture, TestModuleMetadata } from '@angular/core/testing';\n\nimport { AnyDeclaration, AnyType, DebugNodeSelector, Type } from '../common/core.types';\nimport { NgModuleWithProviders } from '../common/func.is-ng-module-def-with-providers';\nimport { IMockBuilderConfig } from '../mock-builder/types';\nimport { MockedDebugElement, MockedDebugNode } from '../mock-render/types';\nimport { CustomMockFunction, MockedFunction } from '../mock-service/types';\n\nimport { FORMAT_SET, FORMAT_SINGLE } from './format/types';\nimport mockHelperObject from './mock-helper.object';\n\n/**\n * ngMocks provides a lot of tools to simply testing.\n *\n * @see https://ng-mocks.sudo.eu/api/ngMocks\n */\nexport const ngMocks: {\n  /**\n   * ngMocks.autoSpy installs proper spies instead of empty functions.\n   *\n   * @see https://ng-mocks.sudo.eu/extra/auto-spy\n   */\n  autoSpy(type: 'jasmine' | 'jest' | 'default' | 'reset'): void;\n\n  /**\n   * ngMocks.autoSpy installs proper spies instead of empty functions.\n   *\n   * @see https://ng-mocks.sudo.eu/extra/auto-spy\n   */\n  autoSpy(type: CustomMockFunction): void;\n\n  /**\n   * ngMocks.defaultConfig sets the default config of declarations for MockBuilder.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/defaultConfig\n   */\n  defaultConfig<T>(token: string | AnyDeclaration<T>, config?: IMockBuilderConfig): void;\n\n  /**\n   * ngMocks.defaultMock sets default customizations of mock tokens.\n   * It helps to avoid repetitions from test to test.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/defaultMock\n   */\n  defaultMock<T>(\n    token: InjectionToken<T>,\n    handler?: (value: undefined | T, injector: Injector) => undefined | Partial<T>,\n    config?: IMockBuilderConfig,\n  ): void;\n\n  /**\n   * ngMocks.defaultMock sets default customizations of mock string tokens.\n   * It helps to avoid repetitions from test to test.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/defaultMock\n   */\n  defaultMock<T = any>(\n    token: string,\n    handler?: (value: undefined | T, injector: Injector) => undefined | Partial<T>,\n    config?: IMockBuilderConfig,\n  ): void;\n\n  /**\n   * ngMocks.defaultMock sets default customizations of mock declarations.\n   * It helps to avoid repetitions from test to test.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/defaultMock\n   */\n  defaultMock<T>(\n    def: AnyType<T>,\n    handler?: (value: T, injector: Injector) => void | Partial<T>,\n    config?: IMockBuilderConfig,\n  ): void;\n\n  /**\n   * ngMocks.defaultMock sets default customizations of mock declarations and tokens.\n   * It helps to avoid repetitions from test to test.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/defaultMock\n   */\n  defaultMock<T = any>(\n    defs: Array<AnyDeclaration<T>>,\n    handler?: (value: undefined | T, injector: Injector) => undefined | Partial<T>,\n    config?: IMockBuilderConfig,\n  ): void;\n\n  /**\n   * ngMocks.globalExclude configures which declarations, providers and tokens\n   * should be excluded from mocks.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/globalExclude\n   *\n   * ```ts\n   * ngMocks.globalExclude(TranslationModule);\n   * ```\n   */\n  globalExclude(source: AnyDeclaration<any>, recursively?: boolean): void;\n\n  /**\n   * ngMocks.globalKeep configures which declarations, providers and tokens\n   * should not be mocked and will stay as they are in mocks.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/globalKeep\n   *\n   * ```ts\n   * ngMocks.globalKeep(TranslationModule);\n   * ```\n   */\n  globalKeep(source: AnyDeclaration<any>, recursively?: boolean): void;\n\n  /**\n   * ngMocks.globalMock configures which declarations, providers and tokens\n   * should be mocked in kept declarations.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/globalMock\n   *\n   * ```ts\n   * ngMocks.globalMock(TranslationModule);\n   * ```\n   */\n  globalMock(source: AnyDeclaration<any>, recursively?: boolean): void;\n\n  /**\n   * ngMocks.globalReplace configures which declarations, providers and tokens\n   * should be substituted in mocks.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/globalReplace\n   *\n   * ```ts\n   * ngMocks.globalReplace(BrowserAnimationsModule, NoopAnimationsModule);\n   * ```\n   */\n  globalReplace(source: AnyType<any>, destination: AnyType<any>): void;\n\n  /**\n   * ngMocks.globalWipe resets all customizations of ngMocks.global* and mgMocks.default* functions.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/globalWipe\n   *\n   * ```ts\n   * ngMocks.globalWipe(TranslationModule);\n   * ngMocks.globalWipe(BrowserAnimationsModule);\n   * ```\n   */\n  globalWipe(source: AnyDeclaration<any>, recursively?: boolean): void;\n\n  /**\n   * ngMocks.change triggers ControlValueAccessor update.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/change\n   */\n  change(elSelector: DebugNodeSelector, value: any, methodName?: string): void;\n\n  /**\n   * ngMocks.touch triggers ControlValueAccessor touch.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/touch\n   */\n  touch(elSelector: DebugNode | DebugNodeSelector, methodName?: string): void;\n\n  /**\n   * ngMocks.click properly simulates a click on an element.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/click\n   */\n  click(elSelector: HTMLElement | DebugNodeSelector, payload?: Partial<MouseEvent>): void;\n\n  /**\n   * ngMocks.trigger lets trigger custom events on DebugElements.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/trigger\n   *\n   * ```ts\n   * ngMocks.trigger(el, new CustomEvent('my-event'));\n   * ```\n   */\n  trigger(elSelector: DebugNodeSelector, event: Event): void;\n\n  /**\n   * ngMocks.trigger lets trigger custom events on DebugElements.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/trigger\n   *\n   * ```ts\n   * ngMocks.trigger(el, 'click');\n   * ngMocks.trigger(el, 'keydown.control.shift.z');\n   * ```\n   */\n  trigger(\n    elSelector: HTMLElement | DebugNodeSelector,\n    event: string,\n    payload?: Partial<UIEvent | KeyboardEvent | MouseEvent | TouchEvent>,\n  ): void;\n\n  /**\n   * ngMocks.event builds correct event objects.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/event\n   */\n  event(\n    event: string,\n    init?: EventInit,\n    overrides?: Partial<UIEvent | KeyboardEvent | MouseEvent | TouchEvent | Event>,\n  ): Event;\n\n  /**\n   * ngMocks.render renders a templateRef or DebugElement.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/render\n   *\n   * ```ts\n   * ngMocks.header(component, headerEl);\n   * ```\n   */\n  render(\n    instance: object,\n    template: TemplateRef<any> | DebugNode,\n    $implicit?: any,\n    variables?: Record<keyof any, any>,\n  ): void;\n\n  /**\n   * ngMocks.render renders a structural directive.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/render\n   *\n   * ```ts\n   * ngMocks.render(component, directiveInstance);\n   * ```\n   */\n  render(instance: object, directive: object, $implicit?: any, variables?: Record<keyof any, any>): void;\n\n  /**\n   * ngMocks.hide hides a rendered templateRef or DebugElement.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/hide\n   *\n   * ```ts\n   * ngMocks.hide(component, headerEl);\n   * ```\n   */\n  hide(instance: object, tpl?: TemplateRef<any> | DebugNode): void;\n\n  /**\n   * ngMocks.hide hides a rendered structural directive.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/hide\n   *\n   * ```ts\n   * ngMocks.hide(component, directiveInstance);\n   * ```\n   */\n  hide(instance: object, directive: object): void;\n\n  /**\n   * ngMocks.input allows to get an input value without knowing\n   * which component / directive it belongs to.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/input\n   *\n   * ```ts\n   * const input = ngMocks.input('app-component', 'version');\n   * ```\n   */\n  input<T = any>(elSelector: DebugNodeSelector, input: string): T;\n\n  /**\n   * ngMocks.input allows to get an input value without knowing\n   * which component / directive it belongs to, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/input\n   *\n   * ```ts\n   * const input = ngMocks.input('app-component', 'version', undefined);\n   * ```\n   */\n  input<T = any, D = undefined>(elSelector: DebugNodeSelector, input: string, notFoundValue: D): D | T;\n\n  /**\n   * ngMocks.output allows to get an output emitter without knowing\n   * which component / directive it belongs to.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/output\n   *\n   * ```ts\n   * const outputEmitter = ngMocks.output('app-component', 'update');\n   * ```\n   */\n  output<T = any>(elSelector: DebugNodeSelector, output: string): EventEmitter<T>;\n\n  /**\n   * ngMocks.output allows to get an output emitter without knowing\n   * which component / directive it belongs to, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/output\n   *\n   * ```ts\n   * const outputEmitter = ngMocks.output('app-component', 'update', undefined);\n   * ```\n   */\n  output<T = any, D = undefined>(elSelector: DebugNodeSelector, output: string, notFoundValue: D): D | EventEmitter<T>;\n\n  /**\n   * ngMocks.find searches for the DebugElement of a particular component,\n   * and returns the first found.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/find\n   *\n   * ```ts\n   * const el = ngMocks.find(MyComponent);\n   * ```\n   */\n  find<T>(component: Type<T>): MockedDebugElement<T>;\n\n  /**\n   * ngMocks.find searches for the DebugElement of a particular component\n   * starting from an element, and returns the first found.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/find\n   *\n   * ```ts\n   * const el = ngMocks.find(fixture.debugElement, MyComponent);\n   * ```\n   */\n  find<T>(\n    debugElement: MockedDebugElement | ComponentFixture<any> | undefined | null,\n    component: Type<T>,\n  ): MockedDebugElement<T>;\n\n  /**\n   * ngMocks.find searches for the DebugElement of a particular component,\n   * and returns the first found, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/find\n   *\n   * ```ts\n   * const el = ngMocks.find(MyComponent, undefined);\n   * ```\n   */\n  find<T, D>(component: Type<T>, notFoundValue: D): D | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.find searches for the DebugElement of a particular component\n   * starting from an element, and returns the first found, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/find\n   *\n   * ```ts\n   * const el = ngMocks.find(fixture, MyComponent, undefined);\n   * ```\n   */\n  find<T, D>(\n    debugElement: MockedDebugElement | ComponentFixture<any> | undefined | null,\n    component: Type<T>,\n    notFoundValue: D,\n  ): D | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.find searches for the DebugElement based on css selector,\n   * and returns the first found.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/find\n   *\n   * ```ts\n   * const el = ngMocks.find('.header');\n   * const el = ngMocks.find('[data-key=5]');\n   * const el = ngMocks.find(['data-key', 5]);\n   * ```\n   */\n  find<T = any>(cssSelector: string | [string] | [string, string | number]): MockedDebugElement<T>;\n\n  /**\n   * ngMocks.find searches for the DebugElement based on css selector\n   * starting from an element, and returns the first found.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/find\n   *\n   * ```ts\n   * const el = ngMocks.find(fixture.debugElement, '.header');\n   * const el = ngMocks.find(fixture, '[data-key=5]');\n   * const el = ngMocks.find(debugElement, ['data-key', 5]);\n   * ```\n   */\n  find<T = any>(\n    debugElement: MockedDebugElement | ComponentFixture<any> | undefined | null,\n    cssSelector: string | [string] | [string, string | number],\n  ): MockedDebugElement<T>;\n\n  /**\n   * ngMocks.find searches for the DebugElement based on css selector,\n   * and returns the first found, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/find\n   *\n   * ```ts\n   * const el = ngMocks.find('.header', undefined);\n   * const el = ngMocks.find('[data-key=5]', null);\n   * const el = ngMocks.find(['data-key', 5], null);\n   * ```\n   */\n  find<T = any, D = undefined>(\n    cssSelector: string | [string] | [string, string | number],\n    notFoundValue: D,\n  ): D | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.find searches for the DebugElement based on css selector\n   * starting from an element, and returns the first found, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/find\n   *\n   * ```ts\n   * const el = ngMocks.find(fixture.debugElement, '.header', undefined);\n   * const el = ngMocks.find(fixture, '[data-key=5]', null);\n   * const el = ngMocks.find(debugElement, ['data-key', 5], null);\n   * ```\n   */\n  find<T = any, D = undefined>(\n    debugElement: MockedDebugElement | ComponentFixture<any> | undefined | null,\n    cssSelector: string | [string] | [string, string | number],\n    notFoundValue: D,\n  ): D | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.findAll searches for all DebugElements of a particular component,\n   * and returns an array of them.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findAll\n   *\n   * ```ts\n   * const all = ngMocks.findAll(MyComponent);\n   * ```\n   */\n  findAll<T>(component: Type<T>): Array<MockedDebugElement<T>>;\n\n  /**\n   * ngMocks.findAll searches for all DebugElements of a particular component\n   * starting from an element, and returns an array of them.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findAll\n   *\n   * ```ts\n   * const all = ngMocks.findAll(fixture.debugElement, MyComponent);\n   * ```\n   */\n  findAll<T>(\n    debugElement: MockedDebugElement | ComponentFixture<any> | undefined | null,\n    component: Type<T>,\n  ): Array<MockedDebugElement<T>>;\n\n  /**\n   * ngMocks.findAll searches for all DebugElements based on css selector,\n   * and returns an array of them.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findAll\n   *\n   * ```ts\n   * const all = ngMocks.findAll('.header');\n   * const all = ngMocks.findAll('[data-key=5]');\n   * const all = ngMocks.findAll(['data-key', 5]);\n   * ```\n   */\n  findAll<T = any>(cssSelector: string | [string] | [string, string | number]): Array<MockedDebugElement<T>>;\n\n  /**\n   * ngMocks.findAll searches for all DebugElements based on css selector\n   * starting from an element, and returns an array of them.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findAll\n   *\n   * ```ts\n   * const all = ngMocks.findAll(fixture.debugElement, '.header');\n   * const all = ngMocks.findAll(fixture, '[data-key=5]');\n   * const all = ngMocks.findAll(debugElement, ['data-key', 5]);\n   * ```\n   */\n  findAll<T = any>(\n    debugElement: MockedDebugElement | ComponentFixture<any> | undefined | null,\n    cssSelector: string | [string] | [string, string | number],\n  ): Array<MockedDebugElement<T>>;\n\n  /**\n   * ngMocks.reveal allows finding DebugNodes which belong to ng-container or ng-template.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reveal\n   *\n   * ```ts\n   * const ngContainer = ngMocks.reveal(HeaderComponent);\n   * ```\n   */\n  reveal<T>(selector: AnyType<T>): MockedDebugNode<T> | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.reveal allows finding DebugNodes which belong to ng-container or ng-template\n   * starting from an element.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reveal\n   *\n   * ```ts\n   * const ngContainer = ngMocks.reveal('header', HeaderComponent);\n   * ```\n   */\n  reveal<T>(elSelector: DebugNodeSelector, selector: AnyType<T>): MockedDebugNode<T> | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.reveal allows finding DebugNodes which belong to ng-container or ng-template.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reveal\n   *\n   * ```ts\n   * const ngContainer = ngMocks.reveal(['tpl', 'header']);\n   * ```\n   */\n  reveal<T = any>(selector: string | [string] | [string, any]): MockedDebugNode<T> | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.reveal allows finding DebugNodes which belong to ng-container or ng-template\n   * starting from an element.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reveal\n   *\n   * ```ts\n   * const ngContainer = ngMocks.reveal('header', ['tpl', 'header']);\n   * ```\n   */\n  reveal<T = any>(\n    elSelector: DebugNodeSelector,\n    selector: string | [string] | [string, any],\n  ): MockedDebugNode<T> | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.reveal allows finding DebugNodes which belong to ng-container or ng-template,\n   * otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reveal\n   *\n   * ```ts\n   * const ngContainer = ngMocks.reveal(HeaderComponent, undefined);\n   * ```\n   */\n  reveal<T, D>(selector: AnyType<T>, notFoundValue: D): D | MockedDebugNode<T> | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.reveal allows finding DebugNodes which belong to ng-container or ng-template\n   * starting from an element, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reveal\n   *\n   * ```ts\n   * const ngContainer = ngMocks.reveal('sidebar', HeaderComponent, undefined);\n   * ```\n   */\n  reveal<T, D>(\n    elSelector: DebugNodeSelector,\n    selector: AnyType<T>,\n    notFoundValue: D,\n  ): D | MockedDebugNode<T> | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.reveal allows finding DebugNodes which belong to ng-container or ng-template,\n   * otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reveal\n   *\n   * ```ts\n   * const ngContainer = ngMocks.reveal(['tpl', 'header'], undefined);\n   * ```\n   */\n  reveal<T = any, D = undefined>(\n    selector: string | [string] | [string, any],\n    notFoundValue: D,\n  ): D | MockedDebugNode<T> | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.reveal allows finding DebugNodes which belong to ng-container or ng-template\n   * starting from an element, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reveal\n   *\n   * ```ts\n   * const ngContainer = ngMocks.reveal('sidebar', ['tpl', 'header'], undefined);\n   * ```\n   */\n  reveal<T = any, D = undefined>(\n    elSelector: DebugNodeSelector,\n    selector: string | [string] | [string, any],\n    notFoundValue: D,\n  ): D | MockedDebugNode<T> | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.revealAll allows finding all DebugNodes which belong to ng-container or ng-template.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/revealAll\n   *\n   * ```ts\n   * const ngContainers = ngMocks.revealAll(HeaderComponent);\n   * ```\n   */\n  revealAll<T>(selector: AnyType<T>): Array<MockedDebugNode<T> | MockedDebugElement<T>>;\n\n  /**\n   * ngMocks.reveal allows finding all DebugNodes which belong to ng-container or ng-template.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/revealAll\n   *\n   * ```ts\n   * const ngContainers = ngMocks.revealAll(['tpl', 'header']);\n   * ```\n   */\n  revealAll<T = any>(selector: string | [string] | [string, any]): Array<MockedDebugNode<T> | MockedDebugElement<T>>;\n\n  /**\n   * ngMocks.reveal allows finding all DebugNodes which belong to ng-container or ng-template\n   * starting from an element.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/revealAll\n   *\n   * ```ts\n   * const ngContainers = ngMocks.revealAll('sidebar', HeaderComponent);\n   * ```\n   */\n  revealAll<T>(elSelector: DebugNodeSelector, selector: AnyType<T>): Array<MockedDebugNode<T> | MockedDebugElement<T>>;\n\n  /**\n   * ngMocks.reveal allows finding all DebugNodes which belong to ng-container or ng-template\n   * starting from an element.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/revealAll\n   *\n   * ```ts\n   * const ngContainers = ngMocks.revealAll('sidebar', ['tpl', 'header']);\n   * ```\n   */\n  revealAll<T = any>(\n    elSelector: DebugNodeSelector,\n    selector: string | [string] | [string, any],\n  ): Array<MockedDebugNode<T> | MockedDebugElement<T>>;\n\n  /**\n   * ngMocks.get tries to get an instance of declaration, provider or token\n   * from the element which is matching a selector.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/get\n   *\n   * ```ts\n   * const myComponent = ngMocks.get('my-component', MyComponent);\n   * const myDirective = ngMocks.get('my-component', MyDirective);\n   * ```\n   */\n  get<T>(elSelector: DebugNodeSelector, provider: AnyDeclaration<T>): T;\n\n  /**\n   * ngMocks.get tries to get an instance of declaration, provider or token\n   * from the element which is matching a selector, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/get\n   *\n   * ```ts\n   * const myComponent = ngMocks.get('my-component', MyComponent, undefined);\n   * const myDirective = ngMocks.get('my-component', MyDirective, null);\n   * ```\n   */\n  get<T, D>(elSelector: DebugNodeSelector, provider: AnyDeclaration<T>, notFoundValue: D): D | T;\n\n  /**\n   * ngMocks.get tries to get an instance of provider or token for TestBed.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/get\n   *\n   * ```ts\n   * const myComponent = ngMocks.get(MyComponent);\n   * const myDirective = ngMocks.get(MyDirective);\n   * ```\n   */\n  get<T>(provider: AnyDeclaration<T>): T;\n\n  /**\n   * ngMocks.findInstance searches for an instance of declaration, provider or token,\n   * and returns the first one.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findInstance\n   *\n   * ```ts\n   * const component = ngMocks.findInstance(SidebarComponent);\n   * const service = ngMocks.findInstance(AuthService);\n   * const config = ngMocks.findInstance(APP_CONFIG);\n   * ```\n   */\n  findInstance<T>(instanceClass: AnyDeclaration<T>): T;\n\n  /**\n   * ngMocks.findInstance searches for an instance of declaration, provider or token\n   * starting from an element, and returns the first one.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findInstance\n   *\n   * ```ts\n   * const component = ngMocks.findInstance(fixture, SidebarComponent);\n   * const service = ngMocks.findInstance('header', AuthService);\n   * const config = ngMocks.findInstance(debugElement, APP_CONFIG);\n   * ```\n   */\n  findInstance<T>(elSelector: DebugNodeSelector, instanceClass: AnyDeclaration<T>): T;\n\n  /**\n   * ngMocks.findInstance searches for an instance of declaration, provider or token,\n   * and returns the first one, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findInstance\n   *\n   * ```ts\n   * const component = ngMocks.findInstance(SidebarComponent, undefined);\n   * const service = ngMocks.findInstance(AuthService, null);\n   * const config = ngMocks.findInstance(APP_CONFIG, false);\n   */\n  findInstance<T, D>(instanceClass: AnyDeclaration<T>, notFoundValue: D): D | T;\n\n  /**\n   * ngMocks.findInstance searches for an instance of declaration, provider or token\n   * starting from an element, and returns the first one, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findInstance\n   *\n   * ```ts\n   * const component = ngMocks.findInstance(fixture, SidebarComponent, undefined);\n   * const service = ngMocks.findInstance('header', AuthService, null);\n   * const config = ngMocks.findInstance(debugElement, APP_CONFIG, false);\n   * ```\n   */\n  findInstance<T, D>(elSelector: DebugNodeSelector, instanceClass: AnyDeclaration<T>, notFoundValue: D): D | T;\n\n  /**\n   * ngMocks.findInstances searches for all instances of declaration, provider or token,\n   * and returns an array of them.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findInstances\n   *\n   * ```ts\n   * const components = ngMocks.findInstances(SidebarComponent);\n   * const services = ngMocks.findInstances(AuthService);\n   * const configs = ngMocks.findInstances(APP_CONFIG);\n   * ```\n   */\n  findInstances<T>(instanceClass: AnyDeclaration<T>): T[];\n\n  /**\n   * ngMocks.findInstances searches for all instances of declaration, provider or token\n   * starting from an element, and returns an array of them.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findInstances\n   *\n   * ```ts\n   * const components = ngMocks.findInstances(fixture, SidebarComponent);\n   * const services = ngMocks.findInstances('header', AuthService);\n   * const configs = ngMocks.findInstances(debugElement, APP_CONFIG);\n   * ```\n   */\n  findInstances<T>(elSelector: DebugNodeSelector, instanceClass: AnyDeclaration<T>): T[];\n\n  /**\n   * ngMocks.findTemplateRef searches for a TemplateRef which is matching the selector,\n   * and returns the first found, otherwise the notFoundValue.\n   * The TemplateRef can be rendered later on.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findTemplateRef\n   *\n   * ```ts\n   * const templateRef = ngMocks.findTemplateRef('sidebar', StructuralDirective, undefined);\n   * ```\n   */\n  findTemplateRef<T = any, D = undefined>(\n    elSelector: DebugNodeSelector,\n    selector: string | [string] | [string, any] | AnyType<any>,\n    notFoundValue: D,\n  ): D | TemplateRef<T>;\n\n  /**\n   * ngMocks.findTemplateRef searches for a TemplateRef which is matching the selector,\n   * and returns the first found.\n   * The TemplateRef can be rendered later on.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findTemplateRef\n   *\n   * ```ts\n   * const templateRef = ngMocks.findTemplateRef('sidebar', StructuralDirective);\n   * ```\n   */\n  findTemplateRef<T = any>(\n    elSelector: DebugNodeSelector,\n    selector: string | [string] | [string, any] | AnyType<any>,\n  ): TemplateRef<T>;\n\n  /**\n   * ngMocks.findTemplateRef searches for a TemplateRef which is matching the selector,\n   * and returns the first found, otherwise the notFoundValue.\n   * The TemplateRef can be rendered later on.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findTemplateRef\n   *\n   * ```ts\n   * const templateRef = ngMocks.findTemplateRef(['mat-row'], null);\n   * ```\n   */\n  findTemplateRef<T = any, D = undefined>(\n    selector: string | [string] | [string, any] | AnyType<any>,\n    notFoundValue: D,\n  ): D | TemplateRef<T>;\n\n  /**\n   * ngMocks.findTemplateRef searches for a TemplateRef which is matching the selector,\n   * and returns the first found.\n   * The TemplateRef can be rendered later on.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findTemplateRef\n   *\n   * ```ts\n   * const templateRef = ngMocks.findTemplateRef(['mat-row']);\n   * ```\n   */\n  findTemplateRef<T = any>(selector: string | [string] | [string, any] | AnyType<any>): TemplateRef<T>;\n\n  /**\n   * ngMocks.findTemplateRefs searches for all TemplateRefs which is matching the selector\n   * starting from an element, and returns an array of them.\n   * The TemplateRef can be rendered later on.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findTemplateRefs\n   *\n   * ```ts\n   * const templateRefs = ngMocks.findTemplateRefs('header', StructuralDirective);\n   * ```\n   */\n  findTemplateRefs<T = any>(\n    elSelector: DebugNodeSelector,\n    selector: string | [string] | [string, any] | AnyType<any>,\n  ): Array<TemplateRef<T>>;\n\n  /**\n   * ngMocks.findTemplateRefs searches for all TemplateRefs which is matching the selector,\n   * and returns an array of them.\n   * The TemplateRef can be rendered later on.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findTemplateRefs\n   *\n   * ```ts\n   * const templateRefs = ngMocks.findTemplateRefs(['mat-row']);\n   * ```\n   */\n  findTemplateRefs<T = any>(selector: string | [string] | [string, any] | AnyType<any>): Array<TemplateRef<T>>;\n\n  /**\n   * ngMocks.crawl correctly crawls through Angular DOM with respect of TemplateRefs and ng-containers.\n   * Usually, it's used internally.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/crawl\n   */\n  crawl(\n    elSelector: DebugNodeSelector,\n    callback: (\n      node: MockedDebugNode | MockedDebugElement,\n      parent?: MockedDebugNode | MockedDebugElement,\n    ) => boolean | void,\n    includeTextNodes?: boolean,\n  ): void;\n\n  /**\n   * ngMocks.stub lets replace a method, getter or setter with a dummy callback.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/stub\n   *\n   * ```ts\n   * ngMocks.stub(instance, 'save'); // save is an empty callback now.\n   * ngMocks.stub(instance, 'user', 'get'); // getter is an empty callback now.\n   * ngMocks.stub(instance, 'user', 'set'); // setter is an empty callback now.\n   * ```\n   */\n  stub<T = MockedFunction, I = any>(instance: I, name: keyof I, style?: 'get' | 'set'): T;\n\n  /**\n   * ngMocks.stub lets apply partial customizations to an instance.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/stub\n   *\n   * ```ts\n   * ngMocks.stub(instance, {\n   *   save: () => undefined,\n   *   user: null,\n   * });\n   * ```\n   */\n  stub<I extends object>(instance: I, overrides: Partial<I>): I;\n\n  /**\n   * ngMocks.stubMember lets inject spies it to getters of properties of an instance.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/stubMember\n   *\n   * ```ts\n   * ngMocks.stubMember(instance, 'user', jasmine.createSpy(), 'get')\n   *   .and.returnValue(null);\n   * ```\n   */\n  stubMember<T extends object, K extends keyof T, S extends () => T[K]>(\n    instance: T,\n    name: K,\n    stub: S,\n    encapsulation: 'get',\n  ): S;\n\n  /**\n   * ngMocks.stubMember lets inject spies it to setters of properties of an instance.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/stubMember\n   *\n   * ```ts\n   * ngMocks.stubMember(instance, 'user', jasmine.createSpy(), 'set')\n   *   .and.throwError('setter is forbidden');\n   * ```\n   */\n  stubMember<T extends object, K extends keyof T, S extends (value: T[K]) => void>(\n    instance: T,\n    name: K,\n    stub: S,\n    encapsulation: 'set',\n  ): S;\n\n  /**\n   * ngMocks.stubMember lets inject spies it to an instance.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/stubMember\n   *\n   * ```ts\n   * ngMocks.stubMember(instance, 'save', jasmine.createSpy());\n   * ngMocks.stubMember(instance, 'user', null);\n   * ```\n   */\n  stubMember<T extends object, K extends keyof T, S extends T[K]>(instance: T, name: K, stub: S): S;\n\n  /**\n   * ngMocks.guts provides a simple way to configure complex mocks.\n   * Please check documentation.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/guts\n   */\n  guts(\n    keep: AnyDeclaration<any> | Provider | Array<AnyDeclaration<any> | Provider> | null | undefined,\n    mock?:\n      | AnyDeclaration<any>\n      | NgModuleWithProviders\n      | Provider\n      | Array<AnyDeclaration<any> | NgModuleWithProviders | Provider>\n      | null\n      | undefined,\n    exclude?: AnyDeclaration<any> | Array<AnyDeclaration<any>> | null | undefined,\n  ): TestModuleMetadata;\n\n  /**\n   * ngMocks.faster lets reuse the same TestBed between tests instead of resetting it.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/faster\n   */\n  faster(): void;\n\n  /**\n   * ignoreOnConsole suppresses any log calls, other methods can be suppressed too.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/ignoreOnConsole\n   */\n  ignoreOnConsole(...args: Array<keyof typeof console>): void;\n\n  /**\n   * Thanks Ivy, it does not throw an error, and we have to use injector.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/throwOnConsole\n   */\n  throwOnConsole(...args: Array<keyof typeof console>): void;\n\n  /**\n   * ngMocks.formatHtml normalizes html for a DebugElement, fixture or html string.\n   * It removes redundant spaces, comments etc.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/formatHtml\n   *\n   * ```ts\n   * const html = ngMocks.formatHTML(fixture);\n   * const html = ngMocks.formatHTML(debugElement);\n   * const html = ngMocks.formatHTML('<div>   </div>');\n   * ```\n   */\n  formatHtml(html: FORMAT_SINGLE, outer?: boolean): string;\n\n  /**\n   * ngMocks.formatHtml normalizes html for an array of DebugElements, fixtures or html strings.\n   * It removes redundant spaces, comments etc.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/formatHtml\n   *\n   * const [html1, html2] = ngMocks.formatHTML([fixture1, fixture2]);\n   * const htmlStrings = ngMocks.formatHTML(debugElements);\n   */\n  formatHtml(html: FORMAT_SET, outer?: boolean): string[];\n\n  /**\n   * ngMocks.formatText normalizes text for a DebugElement, fixture or html string.\n   * It removes tags, redundant spaces, comments etc.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/formatText\n   *\n   * ```ts\n   * const txt = ngMocks.formatText(fixture);\n   * const txt = ngMocks.formatText(debugElement);\n   * const txt = ngMocks.formatText('<div>   </div>');\n   * ```\n   */\n  formatText(text: FORMAT_SINGLE, outer?: boolean): string;\n\n  /**\n   * ngMocks.formatText normalizes text for an array of DebugElements, fixtures or html strings.\n   * It removes tags, redundant spaces, comments etc.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/formatText\n   *\n   * const [txt1, txt2] = ngMocks.formatText([fixture1, fixture2]);\n   * const txtStrings = ngMocks.formatText(debugElements);\n   */\n  formatText(text: FORMAT_SET, outer?: boolean): string[];\n\n  /**\n   * ngMocks.flushTestBed resets TestBed.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/flushTestBed\n   */\n  flushTestBed(): void;\n\n  /**\n   * ngMocks.reset resets cache of ng-mocks.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reset\n   */\n  reset(): void;\n\n  /**\n   * ngMocks.config lets customize default behavior of error reporting.\n   */\n  config(config: {\n    mockRenderCacheSize?: number | null;\n    onMockBuilderMissingDependency?: 'throw' | 'warn' | 'i-know-but-disable' | null;\n    onMockInstanceRestoreNeed?: 'throw' | 'warn' | 'i-know-but-disable' | null;\n    onTestBedFlushNeed?: 'throw' | 'warn' | 'i-know-but-disable' | null;\n  }): void;\n} = mockHelperObject;\n","import {\n  ClassProvider,\n  ExistingProvider,\n  FactoryProvider,\n  InjectionToken,\n  Provider,\n  StaticClassProvider,\n  ValueProvider,\n} from '@angular/core';\n\nimport { AnyDeclaration, AnyType } from '../common/core.types';\nimport funcImportExists from '../common/func.import-exists';\nimport mockHelperStub from '../mock-helper/mock-helper.stub';\nimport helperUseFactory from '../mock-service/helper.use-factory';\nimport { MockService } from '../mock-service/mock-service';\n\nconst defaultValue = {};\n\n/**\n * MockProviders creates an array of mock providers out of passed as parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockProvider\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   providers: MockProviders(\n *     Dep1Service,\n *     Dep2Service,\n *   ),\n * });\n * ```\n */\nexport function MockProviders(...providers: Array<AnyDeclaration<any>>): FactoryProvider[] {\n  return providers.map((provider: any) => MockProvider(provider, defaultValue));\n}\n\n/**\n * MockProvider creates a mock provider out of passed an arbitrary service.\n *\n * @see https://ng-mocks.sudo.eu/api/MockProvider\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   providers: [\n *     MockProvider(Dep1Service),\n *     MockProvider(Dep2Service, {\n *       prop: true,\n *       func: () => 'mock',\n *     }),\n *   ],\n * });\n * ```\n */\nexport function MockProvider<I extends object>(instance: AnyType<I>, overrides?: Partial<I>): FactoryProvider;\n\n/**\n * MockProvider creates a mock provider out of passed an arbitrary token.\n *\n * @see https://ng-mocks.sudo.eu/api/MockProvider\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   providers: [\n *     MockProvider(APP_ID),\n *     MockProvider(WEB_SOCKET, {\n *       prop: true,\n *       func: () => 'mock',\n *     }),\n *   ],\n * });\n * ```\n */\nexport function MockProvider<I>(provider: InjectionToken<I>, useValue?: Partial<I>): FactoryProvider;\n\n/**\n * MockProvider creates a mock provider out of passed an arbitrary string token.\n *\n * @see https://ng-mocks.sudo.eu/api/MockProvider\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   providers: [\n *     MockProvider('web_socket', {\n *       prop: true,\n *       func: () => 'mock',\n *     }),\n *   ],\n * });\n * ```\n */\nexport function MockProvider<I = any>(provider: string, useValue?: Partial<I>): FactoryProvider;\n\n/**\n * MockProvider generates useValue based on passed parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockProvider#useValue\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   providers: [\n *     MockProvider(AuthService, {isLoggedIn: true}, 'useValue'),\n *     MockProvider(APP_ROUTES, 5, 'useValue', true), // multi flag\n *   ],\n * });\n * ```\n */\nexport function MockProvider<I>(\n  provider: AnyDeclaration<I>,\n  value: ValueProvider['useValue'],\n  style: 'useValue',\n  multi?: ValueProvider['multi'],\n): ValueProvider;\n\n/**\n * MockProvider generates useExisting based on passed parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockProvider#useExisting\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   providers: [\n *     MockProvider(AuthService, MockAuthService, 'useExisting', true),\n *     MockProvider(APP_ROUTES, MOCK_ROUTES, 'useExisting', true), // multi flag\n *   ],\n * });\n * ```\n */\nexport function MockProvider<I>(\n  provider: AnyDeclaration<I>,\n  value: ExistingProvider['useExisting'],\n  style: 'useExisting',\n  multi?: ExistingProvider['multi'],\n): ExistingProvider;\n\n/**\n * MockProvider generates useClass based on passed parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockProvider#useClass\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   providers: [\n *     MockProvider(AuthService, MockAuthService, 'useClass', [ctorDep1, ctorDep2]),\n *     MockProvider(UserService, MockUserService, 'useClass', {\n *       multi: true, // multi flag\n *       deps: [ctorDep1, ctorDep2],\n *     }),\n *   ],\n * });\n * ```\n */\nexport function MockProvider<I>(\n  provider: AnyDeclaration<I>,\n  value: StaticClassProvider['useClass'],\n  style: 'useClass',\n  multiDeps?:\n    | StaticClassProvider['multi']\n    | StaticClassProvider['deps']\n    | {\n        multi?: StaticClassProvider['multi'];\n        deps?: StaticClassProvider['deps'];\n      },\n): ClassProvider;\n\n/**\n * MockProvider generates useFactory based on passed parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockProvider#useFactory\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   providers: [\n *     MockProvider(AuthService, (dep1, dep2) => {\n *       // ...\n *     }, 'useFactory', [ctorDep1, ctorDep2]),\n *     MockProvider(UserService, (dep1, dep2) => {\n *       // ...\n *     }, 'useFactory', {\n *       multi: true, // multi flag\n *       deps: [ctorDep1, ctorDep2],\n *     }),\n *   ],\n * });\n * ```\n */\nexport function MockProvider<I>(\n  provider: AnyDeclaration<I>,\n  value: FactoryProvider['useFactory'],\n  style: 'useFactory',\n  multiDeps?:\n    | FactoryProvider['multi']\n    | FactoryProvider['deps']\n    | {\n        multi?: FactoryProvider['multi'];\n        deps?: FactoryProvider['deps'];\n      },\n): FactoryProvider;\n\nexport function MockProvider(\n  provide: any,\n  overrides: any = defaultValue,\n  style?: 'useValue' | 'useExisting' | 'useClass' | 'useFactory',\n  flags:\n    | boolean\n    | any[]\n    | {\n        deps?: any[];\n        multi?: boolean;\n      } = {},\n): Provider {\n  funcImportExists(provide, 'MockProvider');\n\n  const { deps, multi } =\n    typeof flags === 'boolean'\n      ? { deps: undefined, multi: flags }\n      : Array.isArray(flags)\n        ? {\n            deps: flags,\n            multi: undefined,\n          }\n        : flags;\n\n  if (style) {\n    return {\n      provide,\n      [style]: overrides,\n      deps,\n      multi,\n    };\n  }\n\n  return helperUseFactory(\n    provide,\n    () => MockService(provide),\n    value => {\n      if (overrides === defaultValue) {\n        return value;\n      }\n      if (!value) {\n        return overrides;\n      }\n\n      return mockHelperStub(value, overrides);\n    },\n  );\n}\n","import { Injector, ViewContainerRef } from '@angular/core';\nimport { getTestBed, MetadataOverride, TestBed, TestBedStatic, TestModuleMetadata } from '@angular/core/testing';\n\nimport funcExtractTokens from '../mock-builder/func.extract-tokens';\nimport { MockBuilder } from '../mock-builder/mock-builder';\nimport getOverrideDef from '../mock-builder/promise/get-override-def';\nimport { ngMocks } from '../mock-helper/mock-helper';\nimport mockHelperFasterInstall from '../mock-helper/mock-helper.faster-install';\nimport { MockProvider } from '../mock-provider/mock-provider';\nimport helperCreateClone from '../mock-service/helper.create-clone';\n\nimport coreConfig from './core.config';\nimport coreDefineProperty from './core.define-property';\nimport { flatten, mapEntries, mapValues } from './core.helpers';\nimport coreInjector from './core.injector';\nimport coreReflectMeta from './core.reflect.meta';\nimport coreReflectModuleResolve from './core.reflect.module-resolve';\nimport coreReflectProvidedIn from './core.reflect.provided-in';\nimport { NG_MOCKS, NG_MOCKS_ROOT_PROVIDERS, NG_MOCKS_TOUCHES } from './core.tokens';\nimport { AnyType, dependencyKeys } from './core.types';\nimport { getSourceOfMock } from './func.get-source-of-mock';\nimport funcGetType from './func.get-type';\nimport { isMockNgDef } from './func.is-mock-ng-def';\nimport { isNgDef } from './func.is-ng-def';\nimport { isNgModuleDefWithProviders } from './func.is-ng-module-def-with-providers';\nimport ngMocksUniverse from './ng-mocks-universe';\n\nconst applyOverride = (def: any, override: any) => {\n  if (isNgDef(def, 'c')) {\n    TestBed.overrideComponent(def, override);\n  } else if (isNgDef(def, 'd')) {\n    TestBed.overrideDirective(def, override);\n  } else if (isNgDef(def, 'm')) {\n    TestBed.overrideModule(def, override);\n  }\n  if (isNgDef(def, 't')) {\n    TestBed.overrideProvider(def, override);\n  } else if (isNgDef(def, 'i')) {\n    TestBed.overrideProvider(def, override);\n  }\n};\n\nconst applyOverrides = (overrides: Map<AnyType<any>, [MetadataOverride<any>, MetadataOverride<any>]>): void => {\n  for (const [def, [override, original]] of mapEntries(overrides)) {\n    (TestBed as any).ngMocksOverrides.set(def, {\n      ...original,\n      override,\n    });\n    applyOverride(def, override);\n  }\n};\n\n// Thanks Ivy and its TestBed.override - it does not clean up leftovers.\nconst applyNgMocksOverrides = (testBed: TestBedStatic & { ngMocksOverrides?: Map<any, any> }): void => {\n  if (testBed.ngMocksOverrides?.size) {\n    ngMocks.flushTestBed();\n    for (const [def, original] of mapEntries(testBed.ngMocksOverrides)) {\n      applyOverride(def, original);\n    }\n  }\n  testBed.ngMocksOverrides = undefined;\n};\n\nconst initTestBed = () => {\n  if (!(TestBed as any).ngMocksSelectors) {\n    coreDefineProperty(TestBed, 'ngMocksSelectors', new Map());\n  }\n  // istanbul ignore else\n  if (!(TestBed as any).ngMocksOverrides) {\n    coreDefineProperty(TestBed, 'ngMocksOverrides', new Map());\n  }\n};\n\nconst generateTouches = (moduleDef: Partial<Record<dependencyKeys, any>>, touches: Set<any>): void => {\n  for (const key of coreConfig.dependencies) {\n    for (const item of moduleDef[key] ? flatten(moduleDef[key]) : []) {\n      const def = funcGetType(item);\n      if (isNgModuleDefWithProviders(item)) {\n        generateTouches(item, touches);\n      }\n      if (touches.has(def)) {\n        continue;\n      }\n      touches.add(def);\n      if (typeof def !== 'function') {\n        continue;\n      }\n\n      if (!Object.prototype.hasOwnProperty.call(def, '__ngMocksTouches')) {\n        const local = new Set<any>();\n        const meta = coreReflectMeta(def);\n        coreDefineProperty(def, '__ngMocksTouches', local, false);\n        if (meta) {\n          generateTouches(meta, local);\n        }\n      }\n\n      mapValues(def.__ngMocksTouches, touches);\n    }\n  }\n};\n\nconst defineTouches = (testBed: TestBed, moduleDef: TestModuleMetadata, knownTouches?: Set<any>) => {\n  let touches = knownTouches;\n\n  if (!touches && ngMocksUniverse.getDefaults().size > 0) {\n    touches = funcExtractTokens(\n      (testBed as any)._providers || /* istanbul ignore next Ivy part */ (testBed as any)._compiler?.providers,\n    ).touches;\n    if (!touches) {\n      touches = new Set();\n      moduleDef.providers = moduleDef.providers || [];\n      moduleDef.providers.push({ provide: NG_MOCKS_TOUCHES, useValue: touches });\n    }\n    generateTouches(moduleDef, touches);\n  }\n\n  return touches;\n};\n\nconst applyPlatformOverrideDef = (def: any) => {\n  const ngModule = funcGetType(def);\n  if ((TestBed as any).ngMocksOverrides.has(ngModule)) {\n    return;\n  }\n\n  const original = coreReflectModuleResolve(ngModule);\n  const set = getOverrideDef(original);\n  if (set) {\n    (TestBed as any).ngMocksOverrides.set(ngModule, { set: original });\n    TestBed.overrideModule(ngModule, { set });\n  }\n};\n\nconst applyPlatformOverridesBasedOnProvidedIn = (provide: any, touches: Set<any>) => {\n  const providedIn = coreReflectProvidedIn(provide);\n  if (!providedIn) {\n    return;\n  }\n  // knownTouches present from MockBuilder and we can rely on it,\n  // otherwise we have to override the provider always.\n  if (typeof providedIn !== 'string' && !touches.has(providedIn)) {\n    return;\n  }\n  (TestBed as any).ngMocksOverrides.set(provide, {});\n  TestBed.overrideProvider(provide, MockProvider(provide as never));\n};\n\nconst applyPlatformOverridesBasedOnDefaults = (touches: Set<any>) => {\n  for (const [provide, [config]] of mapEntries(ngMocksUniverse.getDefaults())) {\n    if (config !== 'mock') {\n      continue;\n    }\n    if (!isNgDef(provide, 'i') && !isNgDef(provide, 't')) {\n      continue;\n    }\n    if (touches.has(provide)) {\n      continue;\n    }\n    if ((TestBed as any).ngMocksOverrides.has(provide)) {\n      continue;\n    }\n    applyPlatformOverridesBasedOnProvidedIn(provide, touches);\n  }\n};\n\nconst applyPlatformOverrides = (testBed: TestBed, touches: Set<any>) => {\n  // istanbul ignore else\n  if ((TestBed as any).ngMocksOverrides) {\n    const backup = ngMocksUniverse.touches;\n    ngMocksUniverse.touches = touches;\n    for (const def of flatten(testBed.ngModule || /* istanbul ignore next */ [])) {\n      applyPlatformOverrideDef(def);\n    }\n    applyPlatformOverridesBasedOnDefaults(touches);\n    ngMocksUniverse.touches = backup;\n  }\n};\n\nconst configureTestingModule =\n  (\n    original: TestBedStatic['configureTestingModule'],\n    instance: TestBedStatic,\n  ): TestBedStatic['configureTestingModule'] =>\n  (moduleDef: TestModuleMetadata) => {\n    initTestBed();\n\n    const useMockBuilder =\n      typeof moduleDef === 'object' &&\n      !!moduleDef &&\n      (!moduleDef.providers || moduleDef.providers.indexOf(MockBuilder) === -1);\n    // 0b10 - mock exist\n    // 0b01 - real exist\n    let hasMocks = 0;\n    const mockBuilder: Array<[any, any, boolean]> = [];\n    for (const key of useMockBuilder ? ['imports', 'declarations'] : []) {\n      for (const declaration of flatten(moduleDef[key as never]) as any[]) {\n        if (!declaration) {\n          continue;\n        }\n        mockBuilder.push([\n          isNgModuleDefWithProviders(declaration)\n            ? {\n                ngModule: getSourceOfMock(declaration.ngModule),\n                providers: declaration.providers,\n              }\n            : getSourceOfMock(declaration),\n          isNgModuleDefWithProviders(declaration) ? declaration.ngModule : declaration,\n          isMockNgDef(funcGetType(declaration)),\n        ]);\n        hasMocks |= mockBuilder[mockBuilder.length - 1][2] ? 0b10 : 0b01;\n      }\n    }\n    // We should do magic only then both mock and real exist.\n    let finalModuleDef = hasMocks === 0b11 ? undefined : moduleDef;\n    if (!finalModuleDef) {\n      let builder = MockBuilder(NG_MOCKS_ROOT_PROVIDERS);\n\n      for (const [source, def, isMock] of mockBuilder) {\n        const transform = def.prototype.__ngMocksConfig?.transform;\n        const options = {\n          export: !isNgDef(source, 'm'),\n          exportAll: false,\n          onRoot: true,\n        };\n        builder =\n          isMock && transform\n            ? builder.mock(source, transform, options)\n            : isMock\n              ? builder.mock(source, options)\n              : builder.keep(source, options);\n      }\n\n      finalModuleDef = builder.build();\n      finalModuleDef = {\n        ...moduleDef,\n        ...finalModuleDef,\n        providers: [...(moduleDef.providers ?? []), ...(finalModuleDef.providers as never)],\n      };\n    }\n\n    const testBed = getTestBed();\n\n    const providers = funcExtractTokens(finalModuleDef.providers);\n    const { mocks, overrides } = providers;\n    // touches are important,\n    // therefore we are trying to fetch them from the known providers.\n    const touches = defineTouches(testBed, finalModuleDef, providers.touches);\n\n    if (mocks) {\n      ngMocks.flushTestBed();\n    }\n\n    // istanbul ignore else\n    if (overrides) {\n      applyOverrides(overrides);\n    }\n    // _testModuleRef exists only after the 1st call,\n    // so we shouldn't override platform again.\n    if (touches && !(testBed as any)._instantiated && !(testBed as any)._testModuleRef) {\n      applyPlatformOverrides(testBed, touches);\n    }\n\n    return original.call(instance, finalModuleDef);\n  };\n\nconst resetTestingModule =\n  (original: TestBedStatic['resetTestingModule'], instance: TestBedStatic): TestBedStatic['resetTestingModule'] =>\n  () => {\n    ngMocksUniverse.global.delete('builder:config');\n    ngMocksUniverse.global.delete('builder:module');\n    (TestBed as any).ngMocksSelectors = undefined;\n    applyNgMocksOverrides(TestBed);\n\n    return original.call(instance);\n  };\n\n// Monkey-patching ViewContainerRef.createComponent to replace dynamic imports with mocked declarations.\nconst patchVcrInstance = (vcrInstance: ViewContainerRef) => {\n  if (!(ViewContainerRef as any).ngMocksOverridesPatched) {\n    coreDefineProperty(ViewContainerRef, 'ngMocksOverridesPatched', true);\n\n    // istanbul ignore else\n    if (vcrInstance.createComponent) {\n      const createComponent = vcrInstance.createComponent;\n      const patchedCreateComponent = helperCreateClone(\n        createComponent,\n        undefined,\n        undefined,\n        function (component: any, ...createComponentArgs: any[]) {\n          // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n          // @ts-ignore\n          const thisVrc: ViewContainerRef = this;\n          const map = coreInjector(NG_MOCKS, thisVrc.injector);\n\n          return createComponent.apply(thisVrc, [map?.get(component) ?? component, ...createComponentArgs] as any);\n        },\n      );\n\n      coreDefineProperty(vcrInstance.constructor.prototype, 'createComponent', patchedCreateComponent, true);\n      coreDefineProperty(vcrInstance, 'createComponent', patchedCreateComponent, true);\n    }\n  }\n};\n\nconst createComponent =\n  (original: TestBedStatic['createComponent'], instance: TestBedStatic): TestBedStatic['createComponent'] =>\n  (...args) => {\n    const fixture = original.call(instance, ...args);\n    try {\n      const vcr = fixture.debugElement.injector.get(ViewContainerRef);\n      patchVcrInstance(vcr);\n    } catch {\n      // nothing to do\n    }\n\n    return fixture as never;\n  };\n\nconst viewContainerInstall = () => {\n  const vcr: any = ViewContainerRef;\n\n  // istanbul ignore else\n  if (!vcr.ngMocksOverridesInstalled) {\n    const ngElementId = vcr.__NG_ELEMENT_ID__;\n\n    // istanbul ignore else\n    if (ngElementId) {\n      coreDefineProperty(\n        vcr,\n        '__NG_ELEMENT_ID__',\n        helperCreateClone(ngElementId, undefined, undefined, (...ngElementIdArgs: any[]) => {\n          const vcrInstance = ngElementId.apply(ngElementId, ngElementIdArgs);\n          patchVcrInstance(vcrInstance);\n\n          return vcrInstance;\n        }),\n        true,\n      );\n    }\n    coreDefineProperty(TestBed, 'createComponent', createComponent(TestBed.createComponent as never, TestBed as never));\n\n    coreDefineProperty(ViewContainerRef, 'ngMocksOverridesInstalled', true);\n  }\n};\n\n// this function monkey-patches Angular injectors.\nconst installInjector = (injector: Injector & { __ngMocksInjector?: any }): Injector => {\n  // skipping the matched injector\n  if (injector.constructor.prototype.__ngMocksInjector || !injector.constructor.prototype.get) {\n    return injector;\n  }\n\n  // marking the injector as patched\n  coreDefineProperty(injector.constructor.prototype, '__ngMocksInjector', true);\n  const injectorGet = injector.constructor.prototype.get;\n\n  // patch\n  injector.constructor.prototype.get = helperCreateClone(\n    injectorGet,\n    undefined,\n    undefined,\n    function (token: any, ...argsGet: any) {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-ignore\n      const binding: any = this;\n\n      // Here we can implement custom logic how to inject token,\n      // for example, replace with a provider def we need.\n\n      const result = injectorGet.call(binding, token, ...argsGet);\n      // If the result is an injector, we should patch it too.\n      if (\n        result &&\n        typeof result === 'object' &&\n        typeof result.constructor === 'function' &&\n        typeof result.constructor.name === 'string' &&\n        result.constructor.name.slice(-8) === 'Injector'\n      ) {\n        installInjector(result);\n      }\n\n      return result;\n    },\n  );\n\n  return injector;\n};\n\nconst install = () => {\n  // istanbul ignore else\n  if (!(TestBed as any).ngMocksOverridesInstalled) {\n    const hooks = mockHelperFasterInstall();\n    viewContainerInstall();\n\n    // istanbul ignore else\n    if (hooks.before.indexOf(configureTestingModule) === -1) {\n      hooks.before.push(configureTestingModule);\n    }\n    // istanbul ignore else\n    if (hooks.after.indexOf(resetTestingModule) === -1) {\n      hooks.after.push(resetTestingModule);\n    }\n\n    coreDefineProperty(TestBed, 'ngMocksOverridesInstalled', true);\n    const injectorCreate = Injector.create;\n    Injector.create = helperCreateClone(injectorCreate, undefined, undefined, (...argsCreate: any) =>\n      installInjector(injectorCreate.apply(Injector, argsCreate)),\n    );\n    try {\n      // force install of our injector.\n      Injector.create({ length: 0, providers: [] } as never);\n    } catch {\n      // nothing to do.\n    }\n  }\n};\n\ninstall();\n","import { PipeTransform } from '@angular/core';\n\nimport { MockedComponent } from '../mock-component/types';\nimport { MockedDirective } from '../mock-directive/types';\nimport { MockedModule } from '../mock-module/types';\nimport { MockedPipe } from '../mock-pipe/types';\n\nimport { Type } from './core.types';\nimport { isNgDef } from './func.is-ng-def';\n\n/**\n * Checks whether a declaration is the mock class of a module.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockedNgDefOf\n *\n * ```ts\n * isMockedNgDefOf(MockModule, RealModule, 'm'); // returns true\n * isMockedNgDefOf(MockModule, ArbitraryModule, 'm'); // returns false\n * isMockedNgDefOf(MockModule, ArbitraryClass, 'm'); // returns false\n * ```\n */\nexport function isMockedNgDefOf<T>(declaration: any, type: Type<T>, ngType: 'm'): declaration is Type<MockedModule<T>>;\n\n/**\n * Checks whether a declaration is the mock class of a component.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockedNgDefOf\n *\n * ```ts\n * isMockedNgDefOf(MockComponent, RealComponent, 'c'); // returns true\n * isMockedNgDefOf(MockComponent, ArbitraryComponent, 'c'); // returns false\n * isMockedNgDefOf(MockComponent, ArbitraryClass, 'c'); // returns false\n * ```\n */\nexport function isMockedNgDefOf<T>(\n  declaration: any,\n  type: Type<T>,\n  ngType: 'c',\n): declaration is Type<MockedComponent<T>>;\n\n/**\n * Checks whether a declaration is the mock class of a directive.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockedNgDefOf\n *\n * ```ts\n * isMockedNgDefOf(MockDirective, RealDirective, 'd'); // returns true\n * isMockedNgDefOf(MockDirective, ArbitraryDirective, 'd'); // returns false\n * isMockedNgDefOf(MockDirective, ArbitraryClass, 'd'); // returns false\n * ```\n */\nexport function isMockedNgDefOf<T>(\n  declaration: any,\n  type: Type<T>,\n  ngType: 'd',\n): declaration is Type<MockedDirective<T>>;\n\n/**\n * Checks whether a declaration is the mock class of a pipe.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockedNgDefOf\n *\n * ```ts\n * isMockedNgDefOf(MockPipe, RealPipe, 'p'); // returns true\n * isMockedNgDefOf(MockPipe, ArbitraryPipe, 'p'); // returns false\n * isMockedNgDefOf(MockPipe, ArbitraryClass, 'p'); // returns false\n * ```\n */\nexport function isMockedNgDefOf<T extends PipeTransform>(\n  declaration: any,\n  type: Type<T>,\n  ngType: 'p',\n): declaration is Type<MockedPipe<T>>;\n\n/**\n * Checks whether a declaration is the mock class of a thing.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockedNgDefOf\n *\n * ```ts\n * isMockedNgDefOf(MockPipe, RealPipe); // returns true\n * isMockedNgDefOf(MockComponent, ArbitraryComponent); // returns false\n * isMockedNgDefOf(MockPipe, ArbitraryClass); // returns false\n * ```\n */\nexport function isMockedNgDefOf<T>(declaration: any, type: Type<T>): declaration is Type<T>;\n\nexport function isMockedNgDefOf<T>(declaration: any, type: Type<T>, ngType?: any): declaration is Type<T> {\n  return (\n    typeof declaration === 'function' && declaration.mockOf === type && (ngType ? isNgDef(declaration, ngType) : true)\n  );\n}\n","import { MockedComponent } from '../mock-component/types';\nimport { MockedDirective } from '../mock-directive/types';\nimport { MockedModule } from '../mock-module/types';\nimport { MockedPipe } from '../mock-pipe/types';\n\nimport coreInjector from './core.injector';\nimport { NG_MOCKS } from './core.tokens';\nimport { AnyType, Type } from './core.types';\nimport funcGetName from './func.get-name';\nimport { isMockedNgDefOf } from './func.is-mocked-ng-def-of';\nimport ngMocksUniverse from './ng-mocks-universe';\n\nconst getMock = (declaration: any, source: any, mocks?: Map<any, any>) => {\n  if (mocks && !mocks.has(source)) {\n    throw new Error(`There is no mock for ${funcGetName(source)}`);\n  }\n  let mock = mocks ? mocks.get(source) : undefined;\n  if (mock === source) {\n    mock = undefined;\n  }\n\n  // If we are not in the MockBuilder env we can rely on the current cache.\n  if (!mock && source !== declaration) {\n    mock = declaration;\n  } else if (!mock && ngMocksUniverse.cacheDeclarations.has(source)) {\n    mock = ngMocksUniverse.cacheDeclarations.get(source);\n  }\n\n  return mock;\n};\n\n/**\n * Returns the mock class of a mock module based on a mock module or a source module.\n * It works in runtime if the module has been mocked.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getMockedNgDefOf\n *\n * ```ts\n * getMockedNgDefOf(RealModule, 'm'); // returns MockModule\n * getMockedNgDefOf(MockModule, 'm'); // returns MockModule\n * getMockedNgDefOf(ArbitraryClass, 'm'); // throws\n * ```\n */\nexport function getMockedNgDefOf<T>(declaration: AnyType<T>, type: 'm'): Type<MockedModule<T>>;\n\n/**\n * Returns the mock class of a mock component based on a mock component or a source component.\n * It works in runtime if the component has been mocked.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getMockedNgDefOf\n *\n * ```ts\n * getMockedNgDefOf(RealComponent, 'c'); // returns MockComponent\n * getMockedNgDefOf(MockComponent, 'c'); // returns MockComponent\n * getMockedNgDefOf(ArbitraryClass, 'c'); // throws\n * ```\n */\nexport function getMockedNgDefOf<T>(declaration: AnyType<T>, type: 'c'): Type<MockedComponent<T>>;\n\n/**\n * Returns the mock class of a mock directive based on a mock directive or a source directive.\n * It works in runtime if the directive has been mocked.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getMockedNgDefOf\n *\n * ```ts\n * getMockedNgDefOf(RealDirective, 'd'); // returns MockDirective\n * getMockedNgDefOf(MockDirective, 'd'); // returns MockDirective\n * getMockedNgDefOf(ArbitraryClass, 'd'); // throws\n * ```\n */\nexport function getMockedNgDefOf<T>(declaration: AnyType<T>, type: 'd'): Type<MockedDirective<T>>;\n\n/**\n * Returns the mock class of a mock pipe based on a mock pipe or a source pipe.\n * It works in runtime if the pipe has been mocked.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getMockedNgDefOf\n *\n * ```ts\n * getMockedNgDefOf(RealPipe, 'p'); // returns MockPipe\n * getMockedNgDefOf(MockPipe, 'p'); // returns MockPipe\n * getMockedNgDefOf(ArbitraryClass, 'p'); // throws\n * ```\n */\nexport function getMockedNgDefOf<T>(declaration: AnyType<T>, type: 'p'): Type<MockedPipe<T>>;\n\n/**\n * Returns the mock class of a thing based on a mock class or a source class.\n * It works in runtime if the thing has been mocked.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getMockedNgDefOf\n *\n * ```ts\n * getMockedNgDefOf(RealComponent); // returns MockComponent\n * getMockedNgDefOf(MockPipe); // returns MockPipe\n * getMockedNgDefOf(ArbitraryClass); // throws\n * ```\n */\nexport function getMockedNgDefOf<T>(declaration: AnyType<T>): Type<T>;\n\nexport function getMockedNgDefOf(declaration: any, type?: any): any {\n  const source = declaration.mockOf ?? declaration;\n  const mocks = coreInjector(NG_MOCKS);\n\n  const mock = getMock(declaration, source, mocks);\n  if (mock && !type) {\n    return mock;\n  }\n  if (mock && type && isMockedNgDefOf(mock, source, type)) {\n    return mock;\n  }\n\n  throw new Error(`There is no mock for ${funcGetName(source)}`);\n}\n","import { PipeTransform } from '@angular/core';\n\nimport { MockedComponent } from '../mock-component/types';\nimport { MockedDirective } from '../mock-directive/types';\nimport { MockedModule } from '../mock-module/types';\nimport { MockedPipe } from '../mock-pipe/types';\n\nimport { Type } from './core.types';\nimport funcIsMock from './func.is-mock';\nimport { isNgDef } from './func.is-ng-def';\n\n/**\n * Checks whether the instance derives from a mock module.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockOf\n *\n * ```ts\n * isMockOf(moduleInstance, RealModule, 'm'); // returns true\n * isMockOf(moduleInstance, ArbitraryClass, 'm'); // returns false\n * ```\n */\nexport function isMockOf<T>(instance: any, declaration: Type<T>, ngType: 'm'): instance is MockedModule<T>;\n\n/**\n * Checks whether the instance derives from a mock component.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockOf\n *\n * ```ts\n * isMockOf(componentInstance, RealComponent, 'c'); // returns true\n * isMockOf(componentInstance, ArbitraryClass, 'c'); // returns false\n * ```\n */\nexport function isMockOf<T>(instance: any, declaration: Type<T>, ngType: 'c'): instance is MockedComponent<T>;\n\n/**\n * Checks whether the instance derives from a mock directive.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockOf\n *\n * ```ts\n * isMockOf(directiveInstance, RealDirective, 'd'); // returns true\n * isMockOf(directiveInstance, ArbitraryClass, 'd'); // returns false\n * ```\n */\nexport function isMockOf<T>(instance: any, declaration: Type<T>, ngType: 'd'): instance is MockedDirective<T>;\n\n/**\n * Checks whether the instance derives from a mock pipe.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockOf\n *\n * ```ts\n * isMockOf(pipeInstance, RealPipe, 'p'); // returns true\n * isMockOf(pipeInstance, ArbitraryClass, 'p'); // returns false\n * ```\n */\nexport function isMockOf<T extends PipeTransform>(\n  instance: any,\n  declaration: Type<T>,\n  ngType: 'p',\n): instance is MockedPipe<T>;\n\n/**\n * Checks whether the instance derives from a mock type.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockOf\n *\n * ```ts\n * isMockOf(componentInstance, RealComponent); // returns true\n * isMockOf(pipeInstance, RealPipe); // returns true\n * isMockOf(pipeInstance, ArbitraryClass); // returns false\n * ```\n */\nexport function isMockOf<T>(instance: any, declaration: Type<T>): instance is T;\n\nexport function isMockOf<T>(instance: any, declaration: Type<T>, ngType?: any): instance is T {\n  return (\n    funcIsMock(instance) &&\n    instance.constructor === declaration &&\n    (ngType ? isNgDef(instance.constructor, ngType) : isNgDef(instance.constructor))\n  );\n}\n","import funcIsMock from './func.is-mock';\nimport { MockValidator } from './mock-control-value-accessor';\n\n/**\n * isMockValidator helps to assert that an instance is a mock Validator\n * to perform validationChange simulations.\n * Usually, it is used in if statements.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockValidator\n */\nexport const isMockValidator = <T>(value: T): value is T & MockValidator => {\n  if (!funcIsMock(value)) {\n    return false;\n  }\n\n  return !!(value as any).__ngMocksConfig.isValidator;\n};\n","import funcGetName from '../common/func.get-name';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nexport default (checkReset: Array<[any, any, any?]>) => {\n  const showError: string[] = [];\n\n  // istanbul ignore next: because of the installed global scope switcher we cannot test this part\n  while (checkReset.length > 0) {\n    const [declaration, config] = checkReset.pop() || /* istanbul ignore next */ [];\n    if (config === ngMocksUniverse.configInstance.get(declaration)) {\n      showError.push(typeof declaration === 'function' ? funcGetName(declaration) : declaration);\n    }\n  }\n\n  // istanbul ignore if: because of the installed global scope switcher we cannot test this part\n  if (showError.length > 0) {\n    const globalFlags = ngMocksUniverse.global.get('flags');\n    const errorMessage = [\n      `MockInstance: side effects have been detected (${showError.join(', ')}).`,\n      'Forgot to add MockInstance.scope() or to call MockInstance.restore()?',\n    ].join(' ');\n    if (globalFlags.onMockInstanceRestoreNeed === 'warn') {\n      console.warn(errorMessage);\n    } else if (globalFlags.onMockInstanceRestoreNeed === 'throw') {\n      throw new Error(errorMessage);\n    }\n  }\n};\n","import { InjectionToken, Injector } from '@angular/core';\n\nimport { AnyDeclaration, AnyType } from '../common/core.types';\nimport funcImportExists from '../common/func.import-exists';\nimport ngMocksStack, { NgMocksStack } from '../common/ng-mocks-stack';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport mockInstanceForgotReset from './mock-instance-forgot-reset';\n\nlet currentStack: NgMocksStack;\nngMocksStack.subscribePush(state => {\n  currentStack = state;\n});\nngMocksStack.subscribePop((state, stack) => {\n  for (const declaration of state.mockInstance || /* istanbul ignore next */ []) {\n    if (ngMocksUniverse.configInstance.has(declaration)) {\n      const universeConfig = ngMocksUniverse.configInstance.get(declaration);\n      universeConfig.overloads.pop();\n      ngMocksUniverse.configInstance.set(declaration, {\n        ...universeConfig,\n      });\n    }\n  }\n  currentStack = stack[stack.length - 1];\n});\n\ninterface MockInstanceArgs {\n  accessor?: 'get' | 'set';\n  data?: any;\n  key?: string;\n  value?: any;\n}\n\nconst parseMockInstanceArgs = (args: any[]): MockInstanceArgs => {\n  const set: MockInstanceArgs = {};\n\n  if (typeof args[0] === 'string') {\n    set.key = args[0];\n    set.value = args[1];\n    set.accessor = args[2];\n  } else {\n    set.value = args[0];\n    if (set.value && typeof set.value === 'object') {\n      set.value = set.value.init;\n    }\n  }\n\n  return set;\n};\n\nconst checkReset: Array<[any, any, any?]> = [];\nlet checkCollect = false;\n\n// istanbul ignore else: maybe a different runner is used\nif (typeof beforeEach !== 'undefined') {\n  beforeEach(() => (checkCollect = true));\n  beforeEach(() => mockInstanceForgotReset(checkReset));\n  afterEach(() => (checkCollect = false));\n}\n\nconst mockInstanceConfig = <T>(\n  declaration: AnyDeclaration<T>,\n  name: string | undefined,\n  stub: any,\n  encapsulation?: 'get' | 'set',\n) => {\n  const config = ngMocksUniverse.configInstance.has(declaration) ? ngMocksUniverse.configInstance.get(declaration) : {};\n  const overloads = config.overloads || [];\n  overloads.push([name, stub, encapsulation]);\n  config.overloads = overloads;\n  ngMocksUniverse.configInstance.set(declaration, {\n    ...config,\n  });\n  const mockInstances = currentStack.mockInstance ?? [];\n  mockInstances.push(declaration);\n  currentStack.mockInstance = mockInstances;\n\n  if (checkCollect) {\n    checkReset.push([declaration, ngMocksUniverse.configInstance.get(declaration), currentStack]);\n  }\n\n  return stub;\n};\n\n/**\n * This signature of MockInstance lets customize the getter of a property.\n *\n * @see https://ng-mocks.sudo.eu/api/MockInstance\n *\n * ```ts\n * MockInstance(ArbitraryComponent, 'currentUser$', () => mockUser$, 'get');\n * MockInstance(ArbitraryService, 'enabled', () => false, 'get');\n * ```\n */\nexport function MockInstance<T extends object, K extends keyof T, S extends () => T[K]>(\n  instance: AnyType<T>,\n  name: K,\n  stub: S,\n  encapsulation: 'get',\n): S;\n\n/**\n * This signature of MockInstance lets customize the setters of a property.\n *\n * @see https://ng-mocks.sudo.eu/api/MockInstance\n *\n * ```ts\n * const currentUserSetterSpy = jasmine.createSpy();\n * MockInstance(ArbitraryComponent, 'currentUser', currentUserSetterSpy, 'set');\n *\n * let relServiceEnabled: boolean;\n * MockInstance(ArbitraryService, 'enabled', value => relServiceEnabled = value, 'set');\n * ```\n */\nexport function MockInstance<T extends object, K extends keyof T, S extends (value: T[K]) => void>(\n  instance: AnyType<T>,\n  name: K,\n  stub: S,\n  encapsulation: 'set',\n): S;\n\n/**\n * This signature of MockInstance lets customize the properties and methods.\n *\n * @see https://ng-mocks.sudo.eu/api/MockInstance\n *\n * ```ts\n * MockInstance(ArbitraryComponent, 'onInit', onInitSpy);\n * MockInstance(ArbitraryDirective, 'onDestroy', () => {});\n * MockInstance(ArbitraryService, 'currentDate', new Date());\n * MockInstance(ArbitraryModule, 'currentUser', mockUser);\n * ```\n */\nexport function MockInstance<T extends object, K extends keyof T, S extends T[K]>(\n  instance: AnyType<T>,\n  name: K,\n  stub: S,\n): S;\n\n/**\n * This signature of MockInstance lets customize tokens with a callback.\n *\n * @see https://ng-mocks.sudo.eu/api/MockInstance\n *\n * ```ts\n * MockInstance(webSocketToken, () => mockWebSocket);\n * ```\n */\nexport function MockInstance<T>(\n  declaration: InjectionToken<T>,\n  init?: (instance: T | undefined, injector: Injector | undefined) => Partial<T> | Array<Partial<T>>,\n): void;\n\n/**\n * This signature of MockInstance lets customize tokens with a callback.\n *\n * @deprecated please pass the callback directly instead of config.\n * @see https://ng-mocks.sudo.eu/api/MockInstance\n *\n * ```ts\n * MockInstance(webSocketToken, {\n *   init: () => mockWebSocket,\n * });\n * ```\n */\nexport function MockInstance<T>(\n  declaration: InjectionToken<T>,\n  config?: {\n    init?: (instance: T | undefined, injector: Injector | undefined) => Partial<T> | Array<Partial<T>>;\n  },\n): void;\n\n/**\n * This signature of MockInstance lets customize the instances of mock classes with a callback.\n * You can return a shape or change the instance.\n *\n * @see https://ng-mocks.sudo.eu/api/MockInstance\n *\n * ```ts\n * MockInstance(ArbitraryComponent, (instance, injector) => {\n *   instance.enabled = true;\n *   instance.db = injector.get(DatabaseService);\n * });\n * MockInstance(ArbitraryDirective, () => {\n *   return {\n *     someProperty: true,\n *   };\n * });\n * ```\n */\nexport function MockInstance<T>(\n  declaration: AnyType<T>,\n  init?: (instance: T, injector: Injector | undefined) => void | Partial<T> | Array<Partial<T>>,\n): void;\n\n/**\n * This signature of MockInstance lets customize the instances of mock classes with a callback.\n * You can return a shape or change the instance.\n *\n * @deprecated please pass the callback directly instead of config.\n * @see https://ng-mocks.sudo.eu/api/MockInstance\n *\n * ```ts\n * MockInstance(ArbitraryComponent, {\n *   init: (instance, injector) => {\n *     instance.enabled = true;\n *     instance.db = injector.get(DatabaseService);\n *   },\n * });\n * MockInstance(ArbitraryDirective, {\n *   init: () => {\n *     return {\n *       someProperty: true,\n *     };\n *   },\n * });\n * ```\n */\nexport function MockInstance<T>(\n  declaration: AnyType<T>,\n  config?: {\n    init?: (instance: T, injector: Injector | undefined) => void | Partial<T> | Array<Partial<T>>;\n  },\n): void;\n\nexport function MockInstance<T>(declaration: AnyDeclaration<T>, ...args: any[]) {\n  funcImportExists(declaration, 'MockInstance');\n\n  if (args.length > 0) {\n    const { key, value, accessor } = parseMockInstanceArgs(args);\n\n    return mockInstanceConfig(declaration, key, value, accessor);\n  }\n\n  const config = ngMocksUniverse.configInstance.get(declaration) || /* istanbul ignore next */ {};\n\n  ngMocksUniverse.configInstance.set(declaration, {\n    ...config,\n    overloads: [],\n  });\n\n  // When we are calling MockInstance without a config we need to reset it from the checks too.\n  for (let i = checkReset.length - 1; i >= 0; i -= 1) {\n    if (checkReset[i][0] === declaration && checkReset[i][2] === currentStack) {\n      checkReset.splice(i, 1);\n    }\n  }\n}\n\n/**\n * Interface describes how to configure scopes for MockInstance.\n *\n * @see https://ng-mocks.sudo.eu/api/MockInstance#customization-scopes\n */\n// istanbul ignore next: issue in istanbul https://github.com/istanbuljs/nyc/issues/1209\nexport namespace MockInstance {\n  /**\n   * Creates a scope which remembers all future customizations of MockInstance.\n   * It allows to reset them afterwards.\n   *\n   * @see https://ng-mocks.sudo.eu/api/MockInstance#remember\n   */\n  export function remember() {\n    ngMocksStack.stackPush();\n  }\n\n  /**\n   * Resets all changes in the current scope.\n   *\n   * @see https://ng-mocks.sudo.eu/api/MockInstance#restore\n   */\n  export function restore() {\n    ngMocksStack.stackPop();\n  }\n\n  /**\n   * Creates a local scope in `beforeEach` and `afterEach`.\n   * If `suite` has been passed, then `beforeAll` and `afterAll` are used.\n   *\n   * @see https://ng-mocks.sudo.eu/api/MockInstance#scope\n   */\n  export function scope(scope: 'all' | 'suite' | 'case' = 'case') {\n    if (scope === 'all' || scope === 'suite') {\n      beforeAll(MockInstance.remember);\n      afterAll(MockInstance.restore);\n    }\n    if (scope === 'all' || scope === 'case') {\n      beforeEach(MockInstance.remember);\n      afterEach(MockInstance.restore);\n    }\n  }\n}\n\n/**\n * MockReset resets everything what has been configured in MockInstance.\n * Please consider using MockInstance.scope() instead,\n * which respects customizations between tests.\n *\n * https://ng-mocks.sudo.eu/api/MockInstance#resetting-customization\n * https://ng-mocks.sudo.eu/api/MockInstance#scope\n */\nexport function MockReset() {\n  ngMocksUniverse.configInstance.clear();\n}\n","import { Type } from '../common/core.types';\nimport errorJestMock from '../common/error.jest-mock';\nimport funcGetName from '../common/func.get-name';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport { MockComponent } from '../mock-component/mock-component';\nimport { MockedComponent } from '../mock-component/types';\nimport { MockDirective } from '../mock-directive/mock-directive';\nimport { MockedDirective } from '../mock-directive/types';\nimport { MockPipe } from '../mock-pipe/mock-pipe';\nimport { MockedPipe } from '../mock-pipe/types';\n\n/**\n * MockDeclarations creates an array of mock declaration classes out of declarations passed as parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockComponent\n * @see https://ng-mocks.sudo.eu/api/MockDirective\n * @see https://ng-mocks.sudo.eu/api/MockPipe\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   declarations: MockDeclarations(\n *     Dep1Component,\n *     Dep2Directive,\n *     Dep3Pipe,\n *   ),\n * });\n * ```\n */\nexport function MockDeclarations(...declarations: Array<Type<any>>): Array<Type<any>> {\n  return declarations.map(MockDeclaration);\n}\n\n/**\n * MockDeclaration creates a mock declaration class out of an arbitrary declaration.\n *\n * @see https://ng-mocks.sudo.eu/api/MockComponent\n * @see https://ng-mocks.sudo.eu/api/MockDirective\n * @see https://ng-mocks.sudo.eu/api/MockPipe\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   declarations: [\n *     MockDeclaration(Dep1Component),\n *     MockDeclaration(Dep2Directive),\n *     MockDeclaration(Dep3Pipe),\n *   ],\n * });\n * ```\n */\nexport function MockDeclaration<T>(declaration: Type<T>): Type<MockedPipe<T> | MockedDirective<T> | MockedComponent<T>>;\n\nexport function MockDeclaration<T>(\n  declaration: Type<T>,\n): Type<MockedPipe<T> | MockedDirective<T> | MockedComponent<T>> {\n  if (isNgDef(declaration, 'p')) {\n    return MockPipe(declaration);\n  }\n  if (isNgDef(declaration, 'c')) {\n    return MockComponent(declaration);\n  }\n  if (isNgDef(declaration, 'd')) {\n    return MockDirective(declaration);\n  }\n\n  errorJestMock(declaration);\n  throw new Error(\n    [\n      'MockDeclaration does not know how to mock',\n      typeof declaration === 'function' ? funcGetName(declaration) : declaration,\n    ].join(' '),\n  );\n}\n","import coreReflectPipeResolve from '../common/core.reflect.pipe-resolve';\nimport { DirectiveIo } from '../common/core.types';\nimport funcDirectiveIoParse from '../common/func.directive-io-parse';\nimport { isNgDef } from '../common/func.is-ng-def';\n\nconst generateTemplateAttrWrap = (prop: string, type: 'i' | 'o') => (type === 'i' ? `[${prop}]` : `(${prop})`);\n\nconst generateTemplateAttrWithParams = (prop: string, type: 'i' | 'o'): string => {\n  let tpl = ` ${generateTemplateAttrWrap(prop, type)}=\"`;\n  tpl += type === 'i' ? prop : `__ngMocksOutput('${prop}', $event)`;\n  tpl += '\"';\n\n  return tpl;\n};\n\nconst generateTemplateAttr = (bindings: null | undefined | any[], attr: Array<DirectiveIo>, type: 'i' | 'o') => {\n  // unprovided params for inputs should render empty placeholders\n  if (!bindings && type === 'o') {\n    return '';\n  }\n\n  let mockTemplate = '';\n  const keys = bindings ?? attr;\n  for (const definition of attr) {\n    const { name, alias } = funcDirectiveIoParse(definition);\n\n    mockTemplate += keys.indexOf(alias || name) === -1 ? '' : generateTemplateAttrWithParams(alias || name, type);\n  }\n\n  return mockTemplate;\n};\n\nexport default (declaration: any, { selector, bindings, inputs, outputs }: any): string => {\n  let mockTemplate = '';\n\n  // istanbul ignore else\n  if (typeof declaration === 'string') {\n    mockTemplate = declaration;\n  } else if (isNgDef(declaration, 'p') && bindings && bindings.indexOf('$implicit') !== -1) {\n    mockTemplate = `{{ $implicit | ${coreReflectPipeResolve(declaration).name} }}`;\n  } else if (selector) {\n    mockTemplate += `<${selector}`;\n    mockTemplate += generateTemplateAttr(bindings, inputs, 'i');\n    mockTemplate += generateTemplateAttr(bindings, outputs, 'o');\n    mockTemplate += `></${selector}>`;\n  }\n\n  return mockTemplate;\n};\n","import { Component, Directive } from '@angular/core';\n\nimport coreConfig from '../common/core.config';\nimport coreDefineProperty from '../common/core.define-property';\nimport { Type } from '../common/core.types';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport helperDefinePropertyDescriptor from '../mock-service/helper.define-property-descriptor';\n\nimport funcGenerateTemplate from './func.generate-template';\n\nconst generateWrapperOutput =\n  (instance: any) =>\n  (prop: keyof any, event: any): void => {\n    if (typeof instance[prop] === 'function') {\n      return instance[prop](event);\n    }\n    if (instance[prop] && typeof instance[prop] === 'object' && typeof instance[prop].emit === 'function') {\n      return instance[prop].emit(event);\n    }\n    if (instance[prop] && typeof instance[prop] === 'object' && typeof instance[prop].next === 'function') {\n      return instance[prop].next(event);\n    }\n\n    instance[prop] = event;\n  };\n\nconst generateWrapperComponent = ({ bindings, options, inputs }: any) => {\n  class MockRenderComponent {\n    public constructor() {\n      coreDefineProperty(this, '__ngMocksOutput', generateWrapperOutput(this));\n\n      // The getter helps to remove the __ngContext__ attribute from <mock-render> tag.\n      // It helps with snapshot assertions.\n      // @see https://github.com/help-me-mom/ng-mocks/issues/3811\n      let ngContext = 0;\n      helperDefinePropertyDescriptor(this, '__ngContext__', {\n        get: () => ngContext,\n        set: (newValue: any) => (ngContext = newValue),\n        enumerable: false,\n      });\n\n      if (!bindings) {\n        for (const input of inputs || []) {\n          let value: any = null;\n          helperDefinePropertyDescriptor(this, input, {\n            get: () => value,\n            set: (newValue: any) => (value = newValue),\n          });\n        }\n      }\n    }\n  }\n\n  // A16: adding unique property.\n  coreDefineProperty(MockRenderComponent.prototype, `__ngMocks_index_${ngMocksUniverse.index()}`, undefined, false);\n  Component(options)(MockRenderComponent);\n\n  return MockRenderComponent;\n};\n\nconst generateWrapperDirective = ({ selector, options }: any) => {\n  class MockRenderDirective {}\n  Directive({\n    selector,\n    standalone: false,\n    providers: options.providers,\n  })(MockRenderDirective);\n\n  return MockRenderDirective;\n};\n\nconst getCache = () => {\n  const caches: Array<Type<any> & Record<'cacheKey', any[]>> = ngMocksUniverse.config.get('MockRenderCaches') ?? [];\n  if (caches.length === 0) {\n    ngMocksUniverse.config.set('MockRenderCaches', caches);\n  }\n\n  return caches;\n};\n\nconst checkCache = (caches: Array<Type<any> & Record<'cacheKey', any[]>>, cacheKey: any[]): undefined | Type<any> => {\n  for (const cache of caches) {\n    if (cache.cacheKey.length !== cacheKey.length) {\n      continue;\n    }\n    let isValid = true;\n    for (let i = 0; i < cacheKey.length; i += 1) {\n      if (cache.cacheKey[i] !== cacheKey[i]) {\n        isValid = false;\n        break;\n      }\n    }\n    if (isValid) {\n      return cache;\n    }\n  }\n\n  return undefined;\n};\n\nexport default (\n  template: any,\n  meta: Directive,\n  bindings: undefined | null | any[],\n  flags: Record<keyof any, any>,\n): Type<any> => {\n  const caches = getCache();\n\n  // nulls help to detect defaults\n  const cacheKey = [\n    template,\n    ...(bindings ?? [null]),\n    ...(flags.providers ?? [null]),\n    ...(flags.viewProviders ?? [null]),\n  ];\n  let ctor = checkCache(caches, cacheKey);\n  if (ctor) {\n    return ctor;\n  }\n\n  const inputs = meta.inputs ? [...meta.inputs] : [];\n  const outputs = meta.outputs ? [...meta.outputs] : [];\n  if (meta.hostDirectives) {\n    for (const hostDirective of meta.hostDirectives) {\n      if (typeof hostDirective !== 'object' || !hostDirective.directive) {\n        continue;\n      }\n\n      if (hostDirective.inputs) {\n        inputs.push(...hostDirective.inputs);\n      }\n      if (hostDirective.outputs) {\n        outputs.push(...hostDirective.outputs);\n      }\n    }\n  }\n\n  const mockTemplate = funcGenerateTemplate(template, { selector: meta.selector, inputs, outputs, bindings });\n  const options: Component = {\n    providers: flags.providers,\n    selector: 'mock-render',\n    template: mockTemplate,\n    viewProviders: flags.viewProviders,\n    standalone: false,\n  };\n\n  ctor = generateWrapperComponent({ ...meta, bindings, options });\n  coreDefineProperty(ctor, 'cacheKey', cacheKey);\n  coreDefineProperty(ctor, 'tpl', mockTemplate);\n\n  if (meta.selector && options.providers) {\n    const dir = generateWrapperDirective({ ...meta, bindings, options });\n    coreDefineProperty(ctor, 'providers', dir);\n  }\n\n  caches.unshift(ctor as any);\n  caches.splice(ngMocksUniverse.global.get('mockRenderCacheSize') ?? coreConfig.mockRenderCacheSize);\n\n  return ctor;\n};\n","import coreDefineProperty from '../common/core.define-property';\nimport helperDefinePropertyDescriptor from '../mock-service/helper.define-property-descriptor';\nimport helperMockService from '../mock-service/helper.mock-service';\n\nconst createPropertyGet = (key: keyof any & string, reader: Record<keyof any, any>, source: Record<keyof any, any>) => {\n  const handler = () => {\n    if (typeof source[key] === 'function') {\n      if (reader[`__ngMocks_${key}__origin`] !== source[key]) {\n        const clone = helperMockService.createClone(source[key], reader, source);\n        coreDefineProperty(reader, `__ngMocks_${key}`, clone);\n        coreDefineProperty(reader, `__ngMocks_${key}__origin`, source[key]);\n      }\n\n      return reader[`__ngMocks_${key}`];\n    }\n\n    return source[key];\n  };\n  coreDefineProperty(handler, '__ngMocksProxy', true);\n\n  return handler;\n};\n\nconst createPropertySet = (key: keyof any & string, reader: Record<keyof any, any>, source: Record<keyof any, any>) => {\n  const handler = (newValue: any) => {\n    if (reader[`__ngMocks_${key}`]) {\n      reader[`__ngMocks_${key}`] = undefined;\n    }\n    if (reader[`__ngMocks_${key}__origin`]) {\n      reader[`__ngMocks_${key}__origin`] = undefined;\n    }\n    source[key] = newValue;\n  };\n  coreDefineProperty(handler, '__ngMocksProxy', true);\n\n  return handler;\n};\n\nconst extractAllKeys = (instance: object) => [\n  ...helperMockService.extractPropertiesFromPrototype(Object.getPrototypeOf(instance)),\n  ...helperMockService.extractMethodsFromPrototype(Object.getPrototypeOf(instance)),\n  ...Object.keys(instance),\n];\n\nconst extractOwnKeys = (instance: object) => [...Object.getOwnPropertyNames(instance), ...Object.keys(instance)];\n\nexport default (\n  reader: Record<keyof any, any>,\n  source: Record<keyof any, any> | undefined,\n  extra: string[],\n  force = false,\n): void => {\n  if (!source) {\n    return;\n  }\n  coreDefineProperty(reader, '__ngMocks__source', source);\n  const exists = extractOwnKeys(reader);\n  const fields = [...extractAllKeys(source), ...extra];\n  for (const key of fields) {\n    if (!force && exists.indexOf(key) !== -1) {\n      continue;\n    }\n    helperDefinePropertyDescriptor(reader, key, {\n      get: createPropertyGet(key, reader, source),\n      set: createPropertySet(key, reader, source),\n    });\n    exists.push(key);\n  }\n};\n","import { Component, Directive } from '@angular/core';\nimport { TestBed } from '@angular/core/testing';\n\nimport { extendClass } from '../common/core.helpers';\nimport coreReflectDirectiveResolve from '../common/core.reflect.directive-resolve';\nimport { AnyType } from '../common/core.types';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport { isStandalone } from '../common/func.is-standalone';\n\nconst registerTemplateMiddleware = (template: AnyType<any>, meta: Directive): void => {\n  const child = extendClass(template);\n\n  const alias = {\n    provide: template,\n    useExisting: child,\n  };\n  meta.providers = [...(meta.providers || []), alias];\n\n  // https://github.com/help-me-mom/ng-mocks/issues/1876\n  // We need to apply overrides to our cloned declaration.\n  let set: any = {};\n  try {\n    const ngMocksOverrides: Map<any, any> = (TestBed as any).ngMocksOverrides;\n    const { override } = ngMocksOverrides.get(template);\n    set = { ...override.set };\n    set.providers = set.providers ? [...set.providers, alias] : meta.providers;\n  } catch {\n    // nothing to do\n  }\n\n  (isNgDef(template, 'c') ? Component : Directive)({\n    ...meta,\n    ...set,\n  })(child);\n  TestBed.configureTestingModule({\n    [isStandalone(child) ? 'imports' : 'declarations']: [child],\n  });\n};\n\nexport default (template: AnyType<any>): Directive => {\n  if (!isNgDef(template, 'c') && !isNgDef(template, 'd')) {\n    return {};\n  }\n\n  const meta = coreReflectDirectiveResolve(template);\n  const override: Directive = {};\n  for (const key of Object.keys(meta)) {\n    override[key as never] = meta[key as never];\n  }\n\n  if (override.selector && /[\\s,[\\]]/.test(override.selector)) {\n    override.selector = '';\n  }\n\n  if (!override.selector) {\n    // istanbul ignore next\n    override.selector = (TestBed as any).ngMocksSelectors?.get(template) || '';\n    if (!override.selector) {\n      override.selector = `ng-mocks-${template.name}`;\n      registerTemplateMiddleware(template, override);\n      // istanbul ignore else\n      if ((TestBed as any).ngMocksSelectors) {\n        (TestBed as any).ngMocksSelectors.set(template, override.selector);\n      }\n    }\n  }\n\n  return override;\n};\n","import { DebugElement, Directive, InjectionToken } from '@angular/core';\nimport { getTestBed, ModuleTeardownOptions, TestBed, TestModuleMetadata } from '@angular/core/testing';\n\nimport coreDefineProperty from '../common/core.define-property';\nimport { getInjection } from '../common/core.helpers';\nimport { AnyDeclaration, AnyType, Type } from '../common/core.types';\nimport funcGetName from '../common/func.get-name';\nimport funcImportExists from '../common/func.import-exists';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport ngMocksStack from '../common/ng-mocks-stack';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport { ngMocks } from '../mock-helper/mock-helper';\nimport helperDefinePropertyDescriptor from '../mock-service/helper.define-property-descriptor';\nimport { MockService } from '../mock-service/mock-service';\n\nimport funcCreateWrapper from './func.create-wrapper';\nimport funcInstallPropReader from './func.install-prop-reader';\nimport funcReflectTemplate from './func.reflect-template';\nimport { IMockRenderFactoryOptions, MockedComponentFixture } from './types';\n\nexport interface MockRenderFactory<C = any, F extends keyof any = keyof C> {\n  bindings: keyof F;\n  configureTestBed: () => void;\n  declaration: AnyType<never>;\n  <T extends Record<F, any>>(params?: Partial<T>, detectChanges?: boolean): MockedComponentFixture<C, T>;\n}\n\nconst renderDeclaration = (fixture: any, template: any, params: any): void => {\n  fixture.point =\n    fixture.debugElement.children[0] &&\n    fixture.debugElement.children[0].nativeElement.nodeName !== '#text' &&\n    fixture.debugElement.children[0].nativeElement.nodeName !== '#comment'\n      ? fixture.debugElement.children[0]\n      : fixture.debugElement;\n  if (isNgDef(template, 'd')) {\n    helperDefinePropertyDescriptor(fixture.point, 'componentInstance', {\n      get: () => ngMocks.get(fixture.point, template),\n    });\n  } else if (isNgDef(template, 'p')) {\n    helperDefinePropertyDescriptor(fixture.point, 'componentInstance', {\n      get: () => ngMocks.findInstance(fixture.point, template),\n    });\n  }\n  tryWhen(!params, () => funcInstallPropReader(fixture.componentInstance, fixture.point.componentInstance, []));\n};\n\nconst renderInjection = (fixture: any, template: any, params: any): void => {\n  let instance: any;\n  try {\n    instance = getInjection(template);\n  } catch (error) {\n    if (isNgDef(template, 'p')) {\n      throw new Error(\n        [\n          `Cannot render ${funcGetName(template)}.`,\n          'Did you forget to set $implicit param, or add the pipe to providers?',\n          'https://ng-mocks.sudo.eu/guides/pipe',\n        ].join(' '),\n      );\n    }\n    throw error;\n  }\n  if (params) {\n    ngMocks.stub(instance, params);\n  }\n  fixture.point = MockService(DebugElement, {\n    childNodes: [],\n    children: [],\n    componentInstance: instance,\n    nativeElement: MockService(HTMLElement),\n  });\n  funcInstallPropReader(fixture.componentInstance, fixture.point.componentInstance, [], true);\n};\n\nconst tryWhen = (flag: boolean, callback: () => void) => {\n  if (!flag) {\n    return;\n  }\n  try {\n    // ivy throws Error: Expecting instance of DOM Element\n    callback();\n  } catch {\n    // nothing to do\n  }\n};\n\nconst fixtureMessage = [\n  'Forgot to flush TestBed?',\n  'MockRender cannot be used without a reset after TestBed.get / TestBed.inject / TestBed.createComponent and another MockRender in the same test.',\n  'If you want to mock a service before rendering, consider usage of MockRenderFactory or MockInstance.',\n  'To flush TestBed, add a call of ngMocks.flushTestBed() before the call of MockRender, or pass `reset: true` to MockRender options.',\n].join(' ');\n\nconst handleFixtureError = (e: any) => {\n  const error = new Error(fixtureMessage);\n  coreDefineProperty(error, 'parent', e);\n  throw error;\n};\n\nconst flushTestBed = (flags: Record<string, any>): void => {\n  const globalFlags = ngMocksUniverse.global.get('flags');\n  const testBed: any = getTestBed();\n  if (flags.reset || (!testBed._instantiated && !testBed._testModuleRef)) {\n    ngMocks.flushTestBed();\n  } else if (globalFlags.onTestBedFlushNeed !== 'throw' && (testBed._instantiated || testBed._testModuleRef)) {\n    if (globalFlags.onTestBedFlushNeed === 'warn') {\n      console.warn(fixtureMessage);\n    }\n    ngMocks.flushTestBed();\n  }\n};\n\nconst generateFactoryInstall =\n  (ctor: AnyType<any> & { providers?: AnyType<any> }, options: IMockRenderFactoryOptions) => () => {\n    const testBed: TestBed & {\n      _compiler?: {\n        declarations?: Array<AnyType<any>>;\n      };\n      _declarations?: Array<AnyType<any>>;\n      declarations?: Array<AnyType<any>>;\n      _instanceTeardownOptions?: ModuleTeardownOptions | undefined;\n    } = getTestBed();\n    // istanbul ignore next\n    const existing = testBed._compiler?.declarations || testBed.declarations || testBed._declarations;\n    if (!existing || existing.indexOf(ctor) === -1) {\n      flushTestBed(options);\n      try {\n        const declarations: Array<AnyType<any>> = [];\n        if (ctor.providers) {\n          declarations.push(ctor.providers);\n        }\n        declarations.push(ctor);\n        const moduleDef: TestModuleMetadata = {\n          declarations,\n        };\n        (moduleDef as any).teardown = testBed._instanceTeardownOptions;\n        TestBed.configureTestingModule(moduleDef);\n      } catch (error) {\n        handleFixtureError(error);\n      }\n    }\n  };\n\nconst generateFactory = (\n  componentCtor: Type<any> & { tpl?: string },\n  bindings: undefined | null | string[],\n  template: any,\n  options: IMockRenderFactoryOptions,\n) => {\n  const result = (params: any, detectChanges?: boolean) => {\n    result.configureTestBed();\n    const fixture: any = TestBed.createComponent(componentCtor);\n\n    funcInstallPropReader(fixture.componentInstance, params ?? {}, bindings ?? []);\n    coreDefineProperty(fixture, 'ngMocksStackId', ngMocksUniverse.global.get('bullet:stack:id'));\n\n    if (detectChanges === undefined || detectChanges) {\n      fixture.detectChanges();\n    }\n\n    if (\n      typeof template === 'string' ||\n      isNgDef(template, 'c') ||\n      isNgDef(template, 'd') ||\n      (componentCtor.tpl && isNgDef(template, 'p'))\n    ) {\n      renderDeclaration(fixture, template, params);\n    } else {\n      renderInjection(fixture, template, params);\n    }\n\n    return fixture;\n  };\n  result.declaration = componentCtor;\n  result.bindings = bindings;\n  result.configureTestBed = generateFactoryInstall(componentCtor, options);\n\n  return result;\n};\n\n/**\n * @see https://ng-mocks.sudo.eu/api/MockRender#factory\n */\nexport function MockRenderFactory<MComponent>(\n  template: InjectionToken<MComponent>,\n  bindings?: undefined | null,\n  options?: IMockRenderFactoryOptions,\n): MockRenderFactory<MComponent, never>;\n\n/**\n * MockRenderFactory is a delayed version of MockRender.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender#factory\n */\nexport function MockRenderFactory<MComponent>(\n  template: AnyType<MComponent>,\n  bindings: undefined | null,\n  options?: IMockRenderFactoryOptions,\n): MockRenderFactory<MComponent, keyof MComponent>;\n\n/**\n * MockRenderFactory is a delayed version of MockRender.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender#factory\n */\nexport function MockRenderFactory<MComponent, TKeys extends keyof any>(\n  template: AnyType<MComponent>,\n  bindings: TKeys[],\n  options?: IMockRenderFactoryOptions,\n): MockRenderFactory<MComponent, TKeys>;\n\n/**\n * MockRenderFactory is a delayed version of MockRender.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender#factory\n */\nexport function MockRenderFactory<MComponent, TKeys extends keyof any = keyof any>(\n  template: AnyType<MComponent>,\n  bindings: TKeys[],\n  options?: IMockRenderFactoryOptions,\n): MockRenderFactory<MComponent, TKeys>;\n\n/**\n * Without params we should not autocomplete any keys of any types.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender#factory\n */\nexport function MockRenderFactory<MComponent>(\n  template: AnyType<MComponent>,\n): MockRenderFactory<MComponent, keyof MComponent>;\n\n/**\n * An empty string does not have point.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender#factory\n */\nexport function MockRenderFactory(template: ''): MockRenderFactory<void, never>;\n\n/**\n * Without params we should not autocomplete any keys of any types.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender#factory\n */\nexport function MockRenderFactory<MComponent = void>(template: string): MockRenderFactory<MComponent>;\n\n/**\n * MockRenderFactory is a delayed version of MockRender.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender#factory\n */\nexport function MockRenderFactory<MComponent = void, TKeys extends keyof any = keyof any>(\n  template: string,\n  bindings: TKeys[],\n  options?: IMockRenderFactoryOptions,\n): MockRenderFactory<MComponent, TKeys>;\n\nexport function MockRenderFactory<MComponent, TKeys extends string>(\n  template: string | AnyDeclaration<MComponent>,\n  bindings?: undefined | null | TKeys[],\n  options: IMockRenderFactoryOptions = {},\n): any {\n  funcImportExists(template, 'MockRender');\n\n  const meta: Directive = typeof template === 'string' || isNgDef(template, 't') ? {} : funcReflectTemplate(template);\n  const componentCtor: any = funcCreateWrapper(template, meta, bindings, options);\n  const factory = generateFactory(componentCtor, bindings, template, options);\n  if (ngMocksStack.current().level !== 'root' && options.configureTestBed !== false) {\n    factory.configureTestBed();\n  }\n\n  return factory;\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { AnyDeclaration, AnyType } from '../common/core.types';\n\nimport { MockRenderFactory } from './mock-render-factory';\nimport { IMockRenderOptions, MockedComponentFixture } from './types';\n\n/**\n * This signature of MockRender lets create an empty fixture.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender(): MockedComponentFixture<void, void>;\n\n/**\n * This signature of MockRender lets create a fixture to access a token.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent>(\n  template: InjectionToken<MComponent>,\n  params?: undefined | null,\n  detectChangesOrOptions?: boolean | IMockRenderOptions,\n): MockedComponentFixture<MComponent, void>;\n\n/**\n * This signature of MockRender lets create a fixture to access a component without parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent>(\n  template: AnyType<MComponent>,\n  params: undefined | null,\n  detectChangesOrOptions?: boolean | IMockRenderOptions,\n): MockedComponentFixture<MComponent, MComponent>;\n\n/**\n * This signature of MockRender lets create a fixture with parameters to access a component.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent, TComponent extends object>(\n  template: AnyType<MComponent>,\n  params: TComponent,\n  detectChangesOrOptions?: boolean | IMockRenderOptions,\n): MockedComponentFixture<MComponent, TComponent>;\n\n/**\n * This signature of MockRender lets create a fixture with parameters to access a component.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent, TComponent extends object = Record<keyof any, any>>(\n  template: AnyType<MComponent>,\n  params: TComponent,\n  detectChangesOrOptions?: boolean | IMockRenderOptions,\n): MockedComponentFixture<MComponent, TComponent>;\n\n/**\n * This signature of MockRender without params should not autocomplete any keys of any types.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent>(template: AnyType<MComponent>): MockedComponentFixture<MComponent, MComponent>;\n\n/**\n * This signature of MockRender without params should not autocomplete any keys of any types.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent = void>(template: string): MockedComponentFixture<MComponent>;\n\n/**\n * This signature of MockRender lets create a fixture based on string template.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent = void>(\n  template: string,\n  params: undefined | null,\n  detectChangesOrOptions?: boolean | IMockRenderOptions,\n): MockedComponentFixture<MComponent, void>;\n\n/**\n * This signature of MockRender lets create a fixture with parameters to access a string based template.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent = void, TComponent extends Record<keyof any, any> = Record<keyof any, any>>(\n  template: string,\n  params: TComponent,\n  detectChangesOrOptions?: boolean | IMockRenderOptions,\n): MockedComponentFixture<MComponent, TComponent>;\n\n/**\n * This signature of MockRender lets create a fixture with parameters to access a string based template.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent, TComponent extends Record<keyof any, any> = Record<keyof any, any>>(\n  template: string,\n  params: TComponent,\n  detectChangesOrOptions?: boolean | IMockRenderOptions,\n): MockedComponentFixture<MComponent, TComponent>;\n\nexport function MockRender<MComponent, TComponent extends Record<keyof any, any>>(\n  template?: string | AnyDeclaration<MComponent>,\n  params?: TComponent,\n  flags: boolean | IMockRenderOptions = true,\n): any {\n  const tpl = arguments.length === 0 ? '' : template;\n  const bindings = params && typeof params === 'object' ? Object.keys(params) : params;\n  const options = typeof flags === 'boolean' ? { detectChanges: flags } : { ...flags };\n  const factory = (MockRenderFactory as any)(tpl, bindings, options);\n\n  return factory(params, options.detectChanges);\n}\n"],"names":["flags","mockRenderCacheSize","neverMockModule","neverMockProvidedFunction","neverMockToken","onMockBuilderMissingDependency","onMockInstanceRestoreNeed","onTestBedFlushNeed","dependencies","instance","property","value","enumerable","definePropertyDescriptor","configurable","writable","getTestBedInjection","token","getInjection","testBed","getTestBed","inject","get","flatten","values","result","Array","isArray","push","mapKeys","set","forEach","_","mapValues","destination","add","mapEntries","key","extractDependencyArray","deps","flag","name","ngMetadataName","undefined","extractDependency","dep","extendClassicClass","base","child","index","glb","ngMocksParent","eval","ngMocksResult","MockMiddleware","prototype","extendClass","parameters","length","def","NG_MOCKS","InjectionToken","__ngMocksSkip","NG_MOCKS_TOUCHES","NG_MOCKS_OVERRIDES","NG_MOCKS_GUARDS","NG_MOCKS_RESOLVERS","NG_MOCKS_INTERCEPTORS","NG_MOCKS_ROOT_PROVIDERS","alias","required","skipName","param","split","map","v","trim","provide","__forward_ref__","window","g","badCharacters","RegExp","_desc","constructor","replace","provider","ngModule","directive","isNgType","declaration","type","decorators","offset","indexOf","isNgDef","ngType","isModule","isModuleCheck","isComponent","isComponentCheck","isDirective","isDirectiveCheck","isPipe","isPipeCheck","isInjectable","isInjectableCheck","isNgInjectionToken","isNgModuleDefWithProviders","globalMap","ngMocksUniverse","global","has","Map","builtDeclarations","builtProviders","cacheDeclarations","cacheProviders","config","configInstance","Set","touches","getOverrides","getDefaults","getConfigMock","defValue","getResolution","getBuildDeclaration","mode","replacement","hasBuildDeclaration","isExcludedDef","resolution","isProvidedDef","indexValue","encapsulation","__ngMocksProxy","descriptor","Object","defineProperty","override","style","mock","correctInstance","applyOverrides","skipProps","createClone","getOwnPropertyNames","keys","desc","hasOwnProperty","call","callbacks","overloads","stub","service","bindFrom","bindTo","args","apply","this","prop","sourceDesc","sanitizerMethods","extraMethods","DomSanitizer","Sanitizer","method","getPrototypeOf","getOwnPropertyDescriptor","mockFunction","mockName","original","func","customMockFunction","val","setValue","newSetValue","newValue","handleItemKeys","handleItemGetGuards","section","guards","guard","handleSection","replaceWithMocks","cache","updated","callback","valueItem","handleArray","resolve","resolveUpdated","resolver","handleItem","setPrototypeOf","ngMockshelperMockService","registerMockFunction","createMockFromPrototype","methods","extractMethodsFromPrototype","properties","extractPropertiesFromPrototype","extractPropertyDescriptor","accessType","parseArgs","detectedMockName","createName","mockDef","generateMockDef","__ngMocks","__ngMocksSet","__ngMocksGet","clear","resolveProvider","useFactory","areEqualDefs","providerDiffers","defDiffers","a","b","anyDiffers","resolutions","changed","multi","change","parseProvider","toString","isSuitableProvider","useValue","interceptor","useExisting","useClass","excludeInterceptors","isPreconfiguredDependency","mockOf","__internal","isPreconfiguredUseExisting","existingMock","createFromResolution","createPredefinedMockProvider","createMockProvider","applyCallbackToken","init","overrides","Injector","injector","configGlobal","inst","applyCallback","normalizePrimitivesMap","handleProvider","mockProvider","check","normalizePrimitives","createValueProvider","createClassProvider","isNeverMockFunction","isNeverMockToken","existing","applyMissingClassProperties","createFactoryProvider","__annotations__","__parameters__","isAngularClass","proto","match","cls","clsCode","codePointAt","regEx","guessClass","mockVariableMap","prefix","mockService","createMock","mockVariable","MockService","pushDecorator","decorator","deleteIndex","splice","getAllKeys","props","addUniqueDirectiveIo","normalizedDef","defName","defAlias","unshift","parsePropMetadataParserFactoryProp","bindingPropertyName","parsePropMetadataParserInput","parsePropMetadataParserOutput","parsePropMetadataParserFactoryQueryChild","isViewQuery","queries","selector","read","static","parsePropMetadataParserContentChild","parsePropMetadataParserViewChild","parsePropMetadataParserFactoryQueryChildren","descendants","emitDistinctChangesOnly","parsePropMetadataMap","ContentChild","ContentChildren","HostBinding","hostPropertyName","host","hostBindings","HostListener","eventName","hostListeners","Input","Output","ViewChild","ViewChildren","parsePropDecoratorsParserFactoryProp","parsePropDecoratorsParserInput","parsePropDecoratorsParserOutput","parsePropDecoratorsParserFactoryQuery","parsePropDecoratorsParserContent","parsePropDecoratorsParserView","parsePropDecoratorsMap","buildDeclaration","inputs","input","outputs","output","standalone","reflectionCapabilities","parse","__ngMocksDeclarations","parent","parentDeclarations","attributes","propDecorators","createDeclarations","attributeName","parseParameters","annotation","parseAnnotations","parseDecorators","parsePropDecorators","__prop__metadata__","parsePropMetadata","parseNgDef","mirror","reflectComponentType","__ngMocksReflectComponentType","propName","templateName","parseReflectComponentType","Directive","Component","Pipe","module","exports","__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__","y","x","__WEBPACK_EXTERNAL_MODULE__angular_core_testing_89899de6__","__webpack_require__","d","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","definition","o","globalThis","Function","e","obj","r","Symbol","toStringTag","stackRoot","id","level","stack","current","listenersPush","listenersPop","stackPush","state","stackPop","pop","subscribePush","subscribePop","unsubscribePush","unsubscribePop","providers","mocks","getNgType","isStandalone","i","merge","MockBuilderStash","data","backup","restore","providedIn","ngInjectableDef","providerDef","Error","join","_isMockFunction","jest","arg","NgModule","getSourceOfMock","instanceDef","ngModuleDef","__set","exported","AbstractControl","DefaultValueAccessor","FormControl","FormControlDirective","NG_ASYNC_VALIDATORS","NG_VALIDATORS","NG_VALUE_ACCESSOR","NgControl","NgModel","applyProxy","proxy","storage","MockControlValueAccessorProxy","target","registerOnChange","fn","registerOnTouched","setDisabledState","isDisabled","writeValue","MockValidatorProxy","registerOnValidatorChange","validate","control","MockAsyncValidatorProxy","Promise","setValueAccessor","ngControl","valueAccessor","__ngMocksConfig","setControlValueAccessor","__ngMocksCtor","installValueAccessor","isControlValueAccessor","installValidator","validators","validator","isValidator","applyNgValueAccessor","_rawValidators","_rawAsyncValidators","applyOutputs","mockOutputs","EventEmitter","applyPrototype","applyMethods","applyProps","Mock","queryScanKeys","Optional","Self","LegacyControlValueAccessor","__simulateChange","__simulateTouch","__simulateValidatorChange","exclude","source","configInput","isInternalKey","cloneVcrQuery","query","ViewContainerRef","generateFinalQueries","final","scanKeys","isSignal","processTokens","mockType","processOwnUseExisting","sourceType","processProvider","buildConfig","meta","params","hasResolver","options","exportAs","imports","skipExports","hostDirectives","viewProviders","delete","getType","funcName","isMockNgDef","component","fixtures","_activeFixtures","debugElement","__ngMocksResolutions","cacheFlag","hasNgMocksDepsResolution","vcrArgs","trArgs","TemplateRef","viewChildTemplate","isTemplateRefQuery","parts","contentChildSelector","indices","mixRenderPrepareVcr","cdr","vcrNgIf","trNgIf","createEmbeddedView","detectChanges","mixRenderReorderViews","viewContainer","views","view","destroy","viewIndex","move","mixRenderApplyContext","context","contextKey","markForCheck","mixRenderHandleViews","vcr","templates","templateRef","mixRender","$implicit","variables","QueryList","toArray","mixHideHandler","mixHide","changeDetector","ComponentMockBase","super","ngAfterViewInit","__rendered","render","block","__render","ChangeDetectorRef","decorateClass","template","MockComponents","components","MockComponent","DirectiveMockBase","element","__ngMocksInstall","ngOnInit","ElementRef","MockDirectives","directives","MockDirective","MockPipes","pipes","pipe","MockPipe","getMockClass","transformValue","transform","flagMock","flagKeep","flagReplace","flagNever","preProcessFlags","toggleSkipMockFlag","isRootModule","postProcessFlags","extractModuleAndProviders","ngModuleProviders","getExistingMockModule","detectMockModule","mockModule","getMockProviders","generateReturn","mockModuleProviders","MockModule","processDefMap","processDef","createResolveProvider","createResolveWithProviders","createResolveExisting","createResolveExcluded","createResolve","detectedDef","flatToExisting","filter","item","configureProcessMetaKeys","processMeta","mockModuleDef","cachePipe","skipMarkProviders","resolveDefForExport","correctExports","moduleConfig","export","exportAll","skipAddExports","addExports","declarations","skipMock","replaceDef","patchedOriginal","EntryComponentsModule","componentFactoryResolver","originCFR","resolveComponentFactory","ComponentFactoryResolver","IvyModule","entryComponents","entryModule","skipResolution","skipSystem","skipByResolution","bucket","touched","buckets","concat","keepDef","size","parameter","defProviders","loModule","loProviders","skipDef","handleDef","extendedDef","isExportedOnRoot","configDef","cnfInstance","cnfDef","onRoot","returnModule","moveModulesUp","isA","isB","configDefault","processed","forgotten","defs","sort","originalDef","dependency","globalFlags","depName","errorMessages","defStr","errorMessage","console","warn","funcExtractDeps","recursive","field","itemType","excludeDef","shallow","createInstance","precise","deleteTouch","loDef","k","a1","a2","defaultMockValue","normaliseModule","generateProviderValue","defaultMock","MockBuilderPromise","beforeCC","stash","beforeCompileComponents","build","defStack","combineParams","MockBuilder","reject","then","catch","wipe","setConfigDef","finally","keep","setDefValue","fulfill","promise","TestBed","configureTestingModule","compileComponents","objectsDiffer","prototypeKeys","sourceKeys","compare","areEqualProviderDefs","thisDef","prototypeDef","prototypeDefs","thisDefs","MockBuilderPerformance","equalsTo","clone","cloneConfig","resetTestingModule","extensions","mockBuilderExtend","extend","nativeElement","nativeNode","findDebugElement","el","defaultNotFoundValue","sel","notFoundValue","css","node","nodeName","_tNode","elDef","defaultInjector","getVcr","getScanViewRefRootNodes","vrIndex","vr","rnIndex","rootNodes","scanViewRef","childNodes","rootNode","isDirect","children","childNode","childNodeParent","start","end","detectParent","expected","currentParent","childElDef","nestedCheck","includeTextNode","isSelector","isValidValue","selectors","attribute","getMeta","publicProviders","requiredAttributes","bindings","binding","nonMinifiedName","nodeIndex","collectSelectors","providerTokens","collectAttributesClassic","expectedAttributes","attr","collectAttributesIvy","attrs","step","getParentWithInjector","parentInjector","parentInstance","detectGatherFlag","gather","parentNode","isNotObject","shouldBeScanned","scanned","scan","nodes","normalize","gatherDefault","nodesLength","bindingStartIndex","detectContextByIndex","rootView","detectContext","__ngContext__","_lView","contextToNodes","lView","_debugContext","error","ngTokenPath","root","attrMatches","detectAttribute","attrDef","label","detectInClassic","detectInIvy","attrIndex","lViewValue","references","regExp","isCrawlByAttribute","isCrawlByAttributeValue","isCrawlById","isCrawlByTagName","isCrawlByDeclaration","slice","detector","isMockControlValueAccessor","innerHTML","preventBubble","customEvent","event","initParams","bubbles","cancelable","eventObj","document","createEvent","initCustomEvent","eventCtor","Event","CustomEvent","keyMap","alt","altKey","code","location","which","arrowdown","arrowleft","arrowright","arrowup","backspace","ctrlKey","enter","esc","metaKey","shift","shiftKey","space","tab","f","getCode","char","toUpperCase","applyPayload","payload","keyData","dot","eventPayload","Math","max","toEventObj","getNativeElement","disabled","dispatchEvent","message","formControlDirective","form","ngModel","triggerInput","handleKnown","update","emit","hasListener","listeners","some","listener","methodName","triggerTouch","markAsTouched","queryAll","fixture","elements","format","html","handlePrimitives","outer","innerOuter","nodeValue","textContent","wholeText","normalizeValue","normalizeText","text","getElementValue","outerHTML","calls","action","jasmine","createSpy","defaultMethods","factory","beforeEach","afterEach","hooks","after","before","moduleDef","ngMocksFasterLock","ngMocksFasterInstalled","shouldTearDownTestingModule","tearDownTestingModule","_instantiated","_moduleFactory","_testModuleRef","resetFixtures","activeFixtures","active","ngMocksStackId","idAdd","bulletStack","idRemove","idAll","idEach","beforeAll","afterAll","iterator","recursively","fail","skip","createMetaHandler","optional","createMeta","typeMap","handleModuleWithProviders","handleDeclaration","handleDestructuring","toMock","resolveMap","resolveHandler","skipDestruction","generateDataWithUniverse","generateData","protoKeep","protoMock","protoExclude","getValVcr","entryPoint","scanValue","scanVcr","handleDirective","isExpectedTemplate","__template","__vcr","isRightTemplate","localVcr","localValue","findDeep","tpl","elementRef","limit","flagNames","autoSpy","click","crawl","defaultConfig","faster","find","findAll","findInstance","findInstances","findTemplateRef","findTemplateRefs","flushTestBed","formatHtml","formatText","globalExclude","globalKeep","globalMock","globalReplace","globalWipe","guts","hide","ignoreOnConsole","reset","reveal","revealAll","stubMember","throwOnConsole","touch","trigger","ngMocks","defaultValue","MockProviders","MockProvider","applyOverride","overrideComponent","overrideDirective","overrideModule","overrideProvider","ngMocksOverrides","applyNgMocksOverrides","initTestBed","ngMocksSelectors","generateTouches","local","__ngMocksTouches","defineTouches","knownTouches","_providers","_compiler","applyPlatformOverrideDef","applyPlatformOverridesBasedOnProvidedIn","applyPlatformOverridesBasedOnDefaults","applyPlatformOverrides","useMockBuilder","hasMocks","mockBuilder","finalModuleDef","builder","isMock","patchVcrInstance","vcrInstance","ngMocksOverridesPatched","createComponent","patchedCreateComponent","createComponentArgs","viewContainerInstall","ngMocksOverridesInstalled","ngElementId","__NG_ELEMENT_ID__","ngElementIdArgs","installInjector","__ngMocksInjector","injectorGet","argsGet","install","injectorCreate","create","argsCreate","isMockedNgDefOf","getMock","getMockedNgDefOf","isMockOf","isMockValidator","checkReset","showError","currentStack","mockInstance","universeConfig","parseMockInstanceArgs","accessor","checkCollect","mockInstanceConfig","mockInstances","MockInstance","MockReset","MockDeclarations","MockDeclaration","remember","scope","generateTemplateAttrWrap","generateTemplateAttrWithParams","generateTemplateAttr","mockTemplate","generateWrapperOutput","next","generateWrapperComponent","MockRenderComponent","ngContext","generateWrapperDirective","MockRenderDirective","getCache","caches","checkCache","cacheKey","isValid","ctor","hostDirective","dir","createPropertyGet","reader","handler","createPropertySet","extractAllKeys","extractOwnKeys","extra","force","exists","fields","registerTemplateMiddleware","test","renderDeclaration","point","tryWhen","componentInstance","renderInjection","DebugElement","HTMLElement","fixtureMessage","handleFixtureError","generateFactoryInstall","_declarations","teardown","_instanceTeardownOptions","generateFactory","componentCtor","configureTestBed","MockRenderFactory","MockRender","arguments"],"sourceRoot":""}