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jV,EAAUjE,GAG9BkZ,GAMT,OAJAh2B,EAAOiE,YAAc6gC,EACrB9kC,EAAOwuB,SAAWA,EAClBxuB,EAAO+kC,iBAAmBN,uBAAuBK,EAAe9nB,GAEzDhd,GA+EF,SAASklC,kBACdnkB,EACAyN,EACAxR,EAAqC,CAAC,GAEtC,mBAAiB+D,EAAU,cAE3B,MAAMlE,EAAsC,iBAAbkE,IAAyB,oBAAQA,EAAU,KAAO,CAAC,EAAI,sBAAoBA,GACpG+jB,EAAqB,oBAAkB/jB,EAAUlE,EAAM2R,EAAUxR,GACjEoa,EAAUyN,gBAAgBC,EAAetW,EAAUzN,EAAU/D,GAKnE,MAJqC,SAAjC,eAAa9G,UAAUF,QAAiD,IAA7BgH,EAAQ+nB,kBACrD3N,EAAQ2N,mBAGH3N,CACT,CCpLO,SAAS+N,WACdpkB,EACAjE,EACAve,GAAsC,GAEtC,MAAMq9B,EAA2B,IAArBwJ,UAAUnjC,OAAe,GAAK8e,EACpCyN,EAAW1R,GAA4B,iBAAXA,EAAsB7V,OAAOU,KAAKmV,GAAUA,EACxEE,EAA2B,kBAAVze,EAAsB,CAAEugB,cAAevgB,GAAU,OAAD,UAAMA,GAG7E,OAFiB2mC,kBAA0BtJ,EAAKpN,EAAUxR,EAEnDoa,CAAQta,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/./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/func.render-fallback.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\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  if (ngMocksUniverse.getResolution(funcExtractForwardRef(provider.useExisting)) === 'keep') {\n    return true;\n  }\n\n  return (\n    ngMocksUniverse.flags.has('skipMock') &&\n    ngMocksUniverse.getResolution(funcExtractForwardRef(provider.useExisting)) !== 'mock'\n  );\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))","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 { getNgType } from '../../common/func.get-ng-type';\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\ntype DependencyDefs = Array<any> | Set<any>;\n\n// Collect nested dependencies for the passed declarations / modules.\n// The optional callback lets replacement logic mark discovered tokens for a\n// specific resolution while the graph is traversed only once.\nconst addDependencies = (\n  dependencies: Set<any>,\n  defs: DependencyDefs,\n  onDependency?: (dependency: any) => void,\n): void => {\n  for (const def of defs) {\n    const extractedDependencies = funcExtractDeps(def, new Set(), true);\n    for (const dependency of mapValues(extractedDependencies)) {\n      dependencies.add(dependency);\n      onDependency?.(dependency);\n    }\n  }\n};\n\nconst shouldKeepReplacementDependency = (dependency: any): boolean => {\n  const ngType = getNgType(dependency);\n\n  return ngType === undefined || ngType === 'Injectable';\n};\n\n// Replacement modules are special: their provider-like tokens should stay real.\n// Otherwise ng-mocks can replace the module itself but still mock providers from\n// the replacement, which breaks cases like HttpClientTestingModule.\nconst keepReplacementDependency = (resolutions: Map<any, string>, replacementDependency: any): void => {\n  if (shouldKeepReplacementDependency(replacementDependency) && !resolutions.has(replacementDependency)) {\n    resolutions.set(replacementDependency, 'keep');\n  }\n};\n\nconst addDefinitionsAndDependencies = (dependencies: Set<any>, defs: DependencyDefs): void => {\n  for (const dependency of mapValues(defs)) {\n    dependencies.add(dependency);\n  }\n\n  addDependencies(dependencies, defs);\n};\n\nconst applyResolution = (\n  dependency: any,\n  configDef: Map<any, any>,\n  defValue: Map<any, any>,\n  excludeDef: Set<any>,\n  keepDef: Set<any>,\n  mockDef: Set<any>,\n  replaceDef: Set<any>,\n  dependencies: Set<any>,\n  resolutions: Map<any, string>,\n): void => {\n  const resolution = ngMocksUniverse.getResolution(dependency);\n  if (resolution === 'replace') {\n    // Store the replacement and scan both sides of the pair immediately so the\n    // final resolution pass sees the replacement-provided dependencies too.\n    const replacement = ngMocksUniverse.getBuildDeclaration(dependency);\n    replaceDef.add(dependency);\n    defValue.set(dependency, replacement);\n    addDependencies(dependencies, [dependency, replacement], replacementDependency =>\n      keepReplacementDependency(resolutions, replacementDependency),\n    );\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\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  const resolutions: Map<any, string> = ngMocksUniverse.config.get('ngMocksDepsResolution');\n\n  for (const dependency of mapValues(dependencies)) {\n    ngMocksUniverse.touches.add(dependency);\n  }\n\n  // Seed the graph from explicit keep/mock inputs and everything they pull in.\n  for (const defs of [keepDef, mockDef]) {\n    addDefinitionsAndDependencies(dependencies, defs);\n  }\n\n  // Replacement dependencies need a dedicated pass because the replacement side\n  // contributes the real providers / tokens we actually want to keep.\n  for (const dependency of mapValues(replaceDef)) {\n    dependencies.add(dependency);\n    addDependencies(dependencies, [dependency, defValue.get(dependency)], replacementDependency =>\n      keepReplacementDependency(resolutions, replacementDependency),\n    );\n  }\n\n  // Global replace rules are discovered while traversing dependencies, so we need\n  // one more pass to pull replacement dependencies for entries that were not part\n  // of the initial explicit replace set.\n  for (const dependency of mapValues(dependencies)) {\n    if (ngMocksUniverse.getResolution(dependency) === 'replace') {\n      addDependencies(\n        dependencies,\n        [dependency, ngMocksUniverse.getBuildDeclaration(dependency)],\n        replacementDependency => keepReplacementDependency(resolutions, replacementDependency),\n      );\n    }\n  }\n\n  // Once the dependency graph is complete, assign the final keep/mock/exclude/replace\n  // behavior for each discovered dependency and persist it into ngMocksUniverse config.\n  for (const dependency of mapValues(dependencies)) {\n    if (configDef.has(dependency)) {\n      continue;\n    }\n\n    applyResolution(\n      dependency,\n      configDef,\n      defValue,\n      excludeDef,\n      keepDef,\n      mockDef,\n      replaceDef,\n      dependencies,\n      resolutions,\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    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(\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);\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 unwrapQueryValue = (value: any): any => {\n  if (typeof value !== 'function') {\n    return value;\n  }\n\n  try {\n    return value();\n  } catch {\n    return value;\n  }\n};\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 = unwrapQueryValue((entryPoint as any)[key]);\n    const vcr = unwrapQueryValue((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 { ElementRef, EmbeddedViewRef, TemplateRef } from '@angular/core';\n\nimport coreInjector from '../../common/core.injector';\n\ntype FallbackView = {\n  template: TemplateRef<any>;\n  view: EmbeddedViewRef<any>;\n};\n\nexport type FallbackInstance = {\n  __ngMocksConfig?: {\n    queryScanKeys?: any;\n  };\n  __ngMocksCtor?: {\n    mockOf?: {\n      ɵcmp?: any;\n    };\n  };\n  __ngMocksInjector: any;\n  __ngMocksRenderFallbackViews?: FallbackView[];\n};\n\nconst getFallbackViews = (instance: FallbackInstance): FallbackView[] => {\n  if (!instance.__ngMocksRenderFallbackViews) {\n    instance.__ngMocksRenderFallbackViews = [];\n  }\n\n  return instance.__ngMocksRenderFallbackViews;\n};\n\nconst detachView = (view: EmbeddedViewRef<any>): void => {\n  for (const node of view.rootNodes || []) {\n    if (node?.parentNode) {\n      // Compatibility with non-DOM test stubs where remove() might not exist.\n      // eslint-disable-next-line unicorn/prefer-dom-node-remove\n      node.parentNode.removeChild(node);\n    }\n  }\n  view.destroy();\n};\n\nconst clearFallbackViews = (instance: FallbackInstance, template?: TemplateRef<any>): boolean => {\n  const fallbackViews = getFallbackViews(instance);\n  let hasChanges = false;\n\n  for (let index = fallbackViews.length - 1; index >= 0; index -= 1) {\n    const fallbackView = fallbackViews[index];\n    if (template && fallbackView.template.elementRef.nativeElement !== template.elementRef.nativeElement) {\n      continue;\n    }\n\n    detachView(fallbackView.view);\n    fallbackViews.splice(index, 1);\n    hasChanges = true;\n  }\n\n  return hasChanges;\n};\n\nconst getHost = (instance: FallbackInstance): any => {\n  const injector = instance.__ngMocksInjector;\n  const elementRef = coreInjector(ElementRef, injector);\n\n  return elementRef?.nativeElement;\n};\n\nconst canUseFallback = (instance: FallbackInstance): boolean => {\n  const source = instance.__ngMocksCtor?.mockOf;\n  // Restrict fallback to mocked components only.\n  if (!source?.ɵcmp) {\n    return false;\n  }\n\n  const queryScanKeys = instance.__ngMocksConfig?.queryScanKeys;\n  // Keep legacy behavior when ng-mocks knows query paths.\n  if (!Array.isArray(queryScanKeys) || queryScanKeys.length > 0) {\n    return false;\n  }\n\n  return true;\n};\n\nexport const fallbackRender = (\n  instance: FallbackInstance,\n  template: TemplateRef<any>,\n  context: Record<keyof any, any>,\n): boolean => {\n  if (!canUseFallback(instance)) {\n    return false;\n  }\n\n  const host = getHost(instance);\n  if (!host) {\n    return false;\n  }\n\n  // Angular 20 signal queries in some libraries (for example ng-select) do not expose\n  // metadata in a shape that ng-mocks can scan via queryScanKeys. In that narrow case\n  // we render directly into the component host as a best-effort fallback.\n  clearFallbackViews(instance);\n\n  const view = template.createEmbeddedView(context);\n  view.detectChanges();\n\n  for (const node of view.rootNodes || []) {\n    // Keep appendChild to support old node stubs in compatibility tests.\n    // eslint-disable-next-line unicorn/prefer-dom-node-append\n    host.appendChild(node);\n  }\n\n  getFallbackViews(instance).push({\n    template,\n    view,\n  });\n\n  return true;\n};\n\nexport const fallbackHide = (instance: FallbackInstance, template?: TemplateRef<any>): boolean => {\n  if (!canUseFallback(instance)) {\n    return false;\n  }\n\n  return clearFallbackViews(instance, template);\n};\n","import funcFindDeep from './func.find-deep';\nimport funcParseTemplate from './func.parse-template';\nimport { fallbackHide, FallbackInstance } from './func.render-fallback';\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    result = fallbackHide(instance as FallbackInstance, template);\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';\nimport { fallbackRender, FallbackInstance } from './func.render-fallback';\n\nexport default (instance: object, param: object, $implicit?: any, variables?: Record<keyof any, any>) => {\n  const template = funcParseTemplate(param);\n\n  let 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    result = fallbackRender(instance as FallbackInstance, template, {\n      ...variables,\n      $implicit,\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\ntype MockInstanceTokenInit<T> = (\n  instance: T | undefined,\n  injector: Injector | undefined,\n) => Partial<T> | Array<Partial<T>>;\n\ninterface MockInstanceTokenConfig<T> {\n  /**\n   * @deprecated please pass the callback directly instead of config.\n   */\n  init?: MockInstanceTokenInit<T>;\n}\n\ntype MockInstanceClassInit<T> = (instance: T, injector: Injector | undefined) => void | Partial<T> | Array<Partial<T>>;\n\ninterface MockInstanceClassConfig<T> {\n  /**\n   * @deprecated please pass the callback directly instead of config.\n   */\n  init?: MockInstanceClassInit<T>;\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>(declaration: InjectionToken<T>, init?: MockInstanceTokenInit<T>): void;\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, {\n *   init: () => mockWebSocket,\n * });\n * ```\n */\nexport function MockInstance<T>(declaration: InjectionToken<T>, config?: MockInstanceTokenConfig<T>): 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>(declaration: AnyType<T>, init?: MockInstanceClassInit<T>): 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, {\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>(declaration: AnyType<T>, config?: MockInstanceClassConfig<T>): 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 { ChangeDetectorRef, 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    if (fixture.zonelessEnabled) {\n      // In zoneless mode Angular routes fixture.detectChanges through ApplicationRef.tick(),\n      // which changes follow-up MockRender change detection versus the historical zone-based path.\n      // Rebinding detectChanges to ChangeDetectorRef keeps later renders and checkNoChanges behavior\n      // aligned with what ng-mocks expects across the supported Angular versions.\n      const cdr = fixture.debugElement.injector.get(ChangeDetectorRef);\n      fixture.detectChanges = (checkNoChanges = true) => {\n        cdr.detectChanges();\n        if (checkNoChanges) {\n          fixture.checkNoChanges();\n        }\n      };\n    }\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","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","addDependencies","onDependency","extractedDependencies","shouldKeepReplacementDependency","keepReplacementDependency","replacementDependency","addDefinitionsAndDependencies","applyResolution","k","a1","a2","defaultMockValue","normaliseModule","generateProviderValue","defaultMock","MockBuilderPromise","beforeCC","stash","Symbol","toStringTag","beforeCompileComponents","build","defStack","combineParams","MockBuilder","reject","then","catch","wipe","setConfigDef","finally","keep","setDefValue","fail","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","skip","createMetaHandler","optional","createMeta","typeMap","handleModuleWithProviders","handleDeclaration","handleDestructuring","toMock","resolveMap","resolveHandler","skipDestruction","generateDataWithUniverse","generateData","protoKeep","protoMock","protoExclude","unwrapQueryValue","getValVcr","entryPoint","scanValue","scanVcr","handleDirective","isExpectedTemplate","__template","__vcr","isRightTemplate","localVcr","localValue","findDeep","getFallbackViews","__ngMocksRenderFallbackViews","detachView","removeChild","clearFallbackViews","fallbackViews","hasChanges","fallbackView","elementRef","getHost","__ngMocksInjector","canUseFallback","fallbackRender","appendChild","fallbackHide","tpl","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","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","zonelessEnabled","checkNoChanges","MockRenderFactory","MockRender","arguments"],"sourceRoot":""}