blob: 241cfa4a577a0c55ea63b4bb6218f555f9909f26 [file] [log] [blame]
/**
* @license Angular v8.1.1
* (c) 2010-2019 Google LLC. https://angular.io/
* License: MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/compiler")):"function"==typeof define&&define.amd?define("@angular/core/testing",["exports","@angular/core","@angular/compiler"],t):t(((e=e||self).ng=e.ng||{},e.ng.core=e.ng.core||{},e.ng.core.testing={}),e.ng.core,e.ng.compiler)}(this,function(e,t,r){"use strict";
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var n="undefined"==typeof window?global:window;function o(e,t,r,n){var o=Zone.current,i=Zone.AsyncTestZoneSpec;if(void 0===i)throw new Error("AsyncTestZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/dist/async-test.js");var s=Zone.ProxyZoneSpec;if(void 0===s)throw new Error("ProxyZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/dist/proxy.js");var u=s.get();s.assertPresent();var c=Zone.current.getZoneWith("ProxyZoneSpec"),l=u.getDelegate();return c.parent.run(function(){var e=new i(function(){o.run(function(){u.getDelegate()==e&&u.setDelegate(l),r()})},function(t){o.run(function(){u.getDelegate()==e&&u.setDelegate(l),n(t)})},"test");u.setDelegate(e)}),Zone.current.runGuarded(e,t)}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
var i=function(){function e(e,r,n){var o=this;this.componentRef=e,this.ngZone=r,this._autoDetect=n,this._isStable=!0,this._isDestroyed=!1,this._resolve=null,this._promise=null,this._onUnstableSubscription=null,this._onStableSubscription=null,this._onMicrotaskEmptySubscription=null,this._onErrorSubscription=null,this.changeDetectorRef=e.changeDetectorRef,this.elementRef=e.location,this.debugElement=t.getDebugNode(this.elementRef.nativeElement),this.componentInstance=e.instance,this.nativeElement=this.elementRef.nativeElement,this.componentRef=e,this.ngZone=r,r&&r.runOutsideAngular(function(){o._onUnstableSubscription=r.onUnstable.subscribe({next:function(){o._isStable=!1}}),o._onMicrotaskEmptySubscription=r.onMicrotaskEmpty.subscribe({next:function(){o._autoDetect&&o.detectChanges(!0)}}),o._onStableSubscription=r.onStable.subscribe({next:function(){o._isStable=!0,null!==o._promise&&function e(t){Zone.current.scheduleMicroTask("scheduleMicrotask",t)}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/(function(){r.hasPendingMacrotasks||null!==o._promise&&(o._resolve(!0),o._resolve=null,o._promise=null)})}}),o._onErrorSubscription=r.onError.subscribe({next:function(e){throw e}})})}return e.prototype._tick=function(e){this.changeDetectorRef.detectChanges(),e&&this.checkNoChanges()},e.prototype.detectChanges=function(e){var t=this;void 0===e&&(e=!0),null!=this.ngZone?this.ngZone.run(function(){t._tick(e)}):this._tick(e)},e.prototype.checkNoChanges=function(){this.changeDetectorRef.checkNoChanges()},e.prototype.autoDetectChanges=function(e){if(void 0===e&&(e=!0),null==this.ngZone)throw new Error("Cannot call autoDetectChanges when ComponentFixtureNoNgZone is set");this._autoDetect=e,this.detectChanges()},e.prototype.isStable=function(){return this._isStable&&!this.ngZone.hasPendingMacrotasks},e.prototype.whenStable=function(){var e=this;return this.isStable()?Promise.resolve(!1):null!==this._promise?this._promise:(this._promise=new Promise(function(t){e._resolve=t}),this._promise)},e.prototype._getRenderer=function(){return void 0===this._renderer&&(this._renderer=this.componentRef.injector.get(t.RendererFactory2,null)),this._renderer},e.prototype.whenRenderingDone=function(){var e=this._getRenderer();return e&&e.whenRenderingDone?e.whenRenderingDone():this.whenStable()},e.prototype.destroy=function(){this._isDestroyed||(this.componentRef.destroy(),null!=this._onUnstableSubscription&&(this._onUnstableSubscription.unsubscribe(),this._onUnstableSubscription=null),null!=this._onStableSubscription&&(this._onStableSubscription.unsubscribe(),this._onStableSubscription=null),null!=this._onMicrotaskEmptySubscription&&(this._onMicrotaskEmptySubscription.unsubscribe(),this._onMicrotaskEmptySubscription=null),null!=this._onErrorSubscription&&(this._onErrorSubscription.unsubscribe(),this._onErrorSubscription=null),this._isDestroyed=!0)},e}(),s="undefined"!=typeof Zone?Zone:null,u=s&&s.FakeAsyncTestZoneSpec,c=s&&s.ProxyZoneSpec,l=null;function a(){l=null,c&&c.assertPresent().resetDelegate()}var p=!1;function d(){if(null==l)throw new Error("The code should be running in the fakeAsync zone to call this function");return l}function h(){d().flushMicrotasks()}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var f="undefined"!=typeof Zone?Zone:null,v=f&&f[f.__symbol__("fakeAsyncTest")];function m(){return v?v.resetFakeAsyncZone():a()}var y=function(e,t){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function g(e,t){function r(){this.constructor=e}y(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function _(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function M(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function u(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new r(function(t){t(e.value)}).then(s,u)}c((n=n.apply(e,t||[])).next())})}function T(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function c(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}function O(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function b(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function E(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var C=function(){function e(){var e=this;this._promise=new Promise(function(t,r){e._resolve=t,e._reject=r})}return e.prototype.done=function(e){this._resolve(e)},e.prototype.fail=function(e,t){this._reject(e)},Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!0,configurable:!0}),e}(),w=function(){function e(){}return e.prototype.insertRootElement=function(e){},e}(),D=new t.InjectionToken("ComponentFixtureAutoDetect"),P=new t.InjectionToken("ComponentFixtureNoNgZone");
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function N(e){var t=[],r=new Map;function n(t){var n=r.get(t);if(!n){var o=e(t);r.set(t,n=o.then(I))}return n}return S.forEach(function(e,r){var o=[];e.templateUrl&&o.push(n(e.templateUrl).then(function(t){e.template=t}));var i=e.styleUrls,s=e.styles||(e.styles=[]),u=e.styles.length;i&&i.forEach(function(t,r){s.push(""),o.push(n(t).then(function(n){s[u+r]=n,i.splice(i.indexOf(t),1),0==i.length&&(e.styleUrls=void 0)}))});var c=Promise.all(o).then(function(){return function e(t){F.delete(t)}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/(r)});t.push(c)}),A(),Promise.all(t).then(function(){})}var S=new Map,F=new Set;function R(e){return F.has(e)}function A(){var e=S;return S=new Map,e}function I(e){return"string"==typeof e?e:e.text()}var j=0,k=function(){function e(){this._references=new Map}return e.prototype.overrideMetadata=function(e,r,n){var o={};if(r&&function i(e){var t=[];Object.keys(e).forEach(function(e){e.startsWith("_")||t.push(e)});for(var r=e;r=Object.getPrototypeOf(r);)Object.keys(r).forEach(function(e){var n=Object.getOwnPropertyDescriptor(r,e);!e.startsWith("_")&&n&&"get"in n&&t.push(e)});return t}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/(r).forEach(function(e){return o[e]=r[e]}),n.set){if(n.remove||n.add)throw new Error("Cannot set and add/remove "+tstringify(e)+" at the same time!");!function s(e,t){for(var r in t)e[r]=t[r]}(o,n.set)}return n.remove&&function u(e,t,r){var n=new Set,o=function(e){var o=t[e];o instanceof Array?o.forEach(function(t){n.add(x(e,t,r))}):n.add(x(e,o,r))};for(var i in t)o(i);var s=function(t){var o=e[t];o instanceof Array?e[t]=o.filter(function(e){return!n.has(x(t,e,r))}):n.has(x(t,o,r))&&(e[t]=void 0)};for(var i in e)s(i)}(o,n.remove,this._references),n.add&&function c(e,t){for(var r in t){var n=t[r],o=e[r];e[r]=null!=o&&o instanceof Array?o.concat(n):n}}(o,n.add),new e(o)},e}();function x(e,r,n){return e+":"+JSON.stringify(r,function(e,r){return"function"==typeof r&&(r=function o(e,r){var n=r.get(e);return n||(n=""+tstringify(e)+j++,r.set(e,n)),n}(r,n)),r})}var U,Z=new tReflectionCapabilities,L=function(){function e(){this.overrides=new Map,this.resolved=new Map}return e.prototype.addOverride=function(e,t){var r=this.overrides.get(e)||[];r.push(t),this.overrides.set(e,r),this.resolved.delete(e)},e.prototype.setOverrides=function(e){var t=this;this.overrides.clear(),e.forEach(function(e){var r=b(e,2);t.addOverride(r[0],r[1])})},e.prototype.getAnnotation=function(e){for(var r=Z.annotations(e),n=r.length-1;n>=0;n--){var o=r[n];if(o instanceof t.Directive||o instanceof t.Component||o instanceof t.Pipe||o instanceof t.NgModule)return o instanceof this.type?o:null}return null},e.prototype.resolve=function(e){var t=this,r=this.resolved.get(e)||null;if(!r){if(r=this.getAnnotation(e)){var n=this.overrides.get(e);if(n){var o=new k;n.forEach(function(e){r=o.overrideMetadata(t.type,r,e)})}}this.resolved.set(e,r)}return r},e}(),G=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return g(r,e),Object.defineProperty(r.prototype,"type",{get:function(){return t.Directive},enumerable:!0,configurable:!0}),r}(L),B=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return g(r,e),Object.defineProperty(r.prototype,"type",{get:function(){return t.Component},enumerable:!0,configurable:!0}),r}(L),V=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return g(r,e),Object.defineProperty(r.prototype,"type",{get:function(){return t.Pipe},enumerable:!0,configurable:!0}),r}(L),q=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return g(r,e),Object.defineProperty(r.prototype,"type",{get:function(){return t.NgModule},enumerable:!0,configurable:!0}),r}(L);!function(e){e[e.DECLARATION=0]="DECLARATION",e[e.OVERRIDE_TEMPLATE=1]="OVERRIDE_TEMPLATE"}(U||(U={}));var W=function(){function e(e,t){this.platform=e,this.additionalModuleTypes=t,this.originalComponentResolutionQueue=null,this.declarations=[],this.imports=[],this.providers=[],this.schemas=[],this.pendingComponents=new Set,this.pendingDirectives=new Set,this.pendingPipes=new Set,this.seenComponents=new Set,this.seenDirectives=new Set,this.existingComponentStyles=new Map,this.resolvers=function r(){return{module:new q,component:new B,directive:new G,pipe:new V}}(),this.componentToModuleScope=new Map,this.initialNgDefs=new Map,this.defCleanupOps=[],this._injector=null,this.compilerProviders=null,this.providerOverrides=[],this.rootProviderOverrides=[],this.providerOverridesByToken=new Map,this.moduleProvidersOverridden=new Set,this.testModuleRef=null,this.testModuleType=function n(){}}return e.prototype.setCompilerProviders=function(e){this.compilerProviders=e,this._injector=null},e.prototype.configureTestingModule=function(e){var t,r,n,o;void 0!==e.declarations&&(this.queueTypeArray(e.declarations,U.DECLARATION),(t=this.declarations).push.apply(t,E(e.declarations))),void 0!==e.imports&&(this.queueTypesFromModulesArray(e.imports),(r=this.imports).push.apply(r,E(e.imports))),void 0!==e.providers&&(n=this.providers).push.apply(n,E(e.providers)),void 0!==e.schemas&&(o=this.schemas).push.apply(o,E(e.schemas))},e.prototype.overrideModule=function(e,t){if(this.resolvers.module.addOverride(e,t),null===this.resolvers.module.resolve(e))throw new Error(e.name+" is not an @NgModule or is missing metadata");this.recompileNgModule(e),this.queueTypesFromModulesArray([e])},e.prototype.overrideComponent=function(e,t){this.resolvers.component.addOverride(e,t),this.pendingComponents.add(e)},e.prototype.overrideDirective=function(e,t){this.resolvers.directive.addOverride(e,t),this.pendingDirectives.add(e)},e.prototype.overridePipe=function(e,t){this.resolvers.pipe.addOverride(e,t),this.pendingPipes.add(e)},e.prototype.overrideProvider=function(e,r){var n,o=r.useFactory?{provide:e,useFactory:r.useFactory,deps:r.deps||[],multi:r.multi}:{provide:e,useValue:r.useValue,multi:r.multi};("string"!=typeof e&&(n=tgetInjectableDef(e))&&"root"===n.providedIn?this.rootProviderOverrides:this.providerOverrides).push(o),this.providerOverridesByToken.set(e,o)},e.prototype.overrideTemplateUsingTestingModule=function(e,r){var n,o=e[tNG_COMPONENT_DEF],i=!!o&&!R(e)&&!!(n=this.resolvers.component.resolve(e)).styleUrls&&n.styleUrls.length>0;this.overrideComponent(e,{set:i?{template:r,styles:[],styleUrls:[]}:{template:r}}),i&&o.styles&&o.styles.length>0&&this.existingComponentStyles.set(e,o.styles),this.componentToModuleScope.set(e,U.OVERRIDE_TEMPLATE)},e.prototype.compileComponents=function(){return M(this,void 0,void 0,function(){var e,t=this;return T(this,function(n){switch(n.label){case 0:return this.clearComponentResolutionQueue(),this.compileTypesSync()?[4,N(function(n){return e||(e=t.injector.get(r.ResourceLoader)),Promise.resolve(e.get(n))})]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.finalize=function(){this.compileTypesSync(),this.compileTestModule(),this.applyTransitiveScopes(),this.applyProviderOverrides(),this.patchComponentsWithExistingStyles(),this.componentToModuleScope.clear(),this.testModuleRef=new tRender3NgModuleRef(this.testModuleType,this.platform.injector);var e=this.testModuleRef.injector.get(t.LOCALE_ID,tDEFAULT_LOCALE_ID);return tsetLocaleId(e),this.testModuleRef.injector.get(t.ApplicationInitStatus).runInitializers(),this.testModuleRef},e.prototype._compileNgModuleSync=function(e){this.queueTypesFromModulesArray([e]),this.compileTypesSync(),this.applyProviderOverrides(),this.applyProviderOverridesToModule(e),this.applyTransitiveScopes()},e.prototype._compileNgModuleAsync=function(e){return M(this,void 0,void 0,function(){return T(this,function(t){switch(t.label){case 0:return this.queueTypesFromModulesArray([e]),[4,this.compileComponents()];case 1:return t.sent(),this.applyProviderOverrides(),this.applyProviderOverridesToModule(e),this.applyTransitiveScopes(),[2]}})})},e.prototype._getModuleResolver=function(){return this.resolvers.module},e.prototype._getComponentFactories=function(e){var r=this;return Q(e.ngModuleDef.declarations).reduce(function(e,n){var o=n.ngComponentDef;return o&&e.push(new tRender3ComponentFactory(o,r.testModuleRef)),e},[])},e.prototype.compileTypesSync=function(){var e=this,r=!1;return this.pendingComponents.forEach(function(n){r=r||R(n);var o=e.resolvers.component.resolve(n);e.maybeStoreNgDef(tNG_COMPONENT_DEF,n),tcompileComponent(n,o)}),this.pendingComponents.clear(),this.pendingDirectives.forEach(function(r){var n=e.resolvers.directive.resolve(r);e.maybeStoreNgDef(tNG_DIRECTIVE_DEF,r),tcompileDirective(r,n)}),this.pendingDirectives.clear(),this.pendingPipes.forEach(function(r){var n=e.resolvers.pipe.resolve(r);e.maybeStoreNgDef(tNG_PIPE_DEF,r),tcompilePipe(r,n)}),this.pendingPipes.clear(),r},e.prototype.applyTransitiveScopes=function(){var e=this,r=new Map;this.componentToModuleScope.forEach(function(n,o){var i=function(n){if(!r.has(n)){var o=function i(e){return e===U.DECLARATION||e===U.OVERRIDE_TEMPLATE}(n)?e.testModuleType:n;r.set(n,ttransitiveScopesFor(o))}return r.get(n)}(n);e.storeFieldOfDefOnType(o,tNG_COMPONENT_DEF,"directiveDefs"),e.storeFieldOfDefOnType(o,tNG_COMPONENT_DEF,"pipeDefs"),tpatchComponentDefWithScope(o.ngComponentDef,i)}),this.componentToModuleScope.clear()},e.prototype.applyProviderOverrides=function(){var e=this,r=function(r){return function(n){var o=(r===tNG_COMPONENT_DEF?e.resolvers.component:e.resolvers.directive).resolve(n);e.hasProviderOverrides(o.providers)&&e.patchDefWithProviderOverrides(n,r)}};this.seenComponents.forEach(r(tNG_COMPONENT_DEF)),this.seenDirectives.forEach(r(tNG_DIRECTIVE_DEF)),this.seenComponents.clear(),this.seenDirectives.clear()},e.prototype.applyProviderOverridesToModule=function(e){var r,n;if(!this.moduleProvidersOverridden.has(e)){this.moduleProvidersOverridden.add(e);var o=e[tNG_INJECTOR_DEF];if(this.providerOverridesByToken.size>0){this.hasProviderOverrides(o.providers)&&(this.maybeStoreNgDef(tNG_INJECTOR_DEF,e),this.storeFieldOfDefOnType(e,tNG_INJECTOR_DEF,"providers"),o.providers=this.getOverriddenProviders(o.providers));var i=e[tNG_MODULE_DEF];try{for(var s=O(i.imports),u=s.next();!u.done;u=s.next())this.applyProviderOverridesToModule(u.value)}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}}}},e.prototype.patchComponentsWithExistingStyles=function(){this.existingComponentStyles.forEach(function(e,r){return r[tNG_COMPONENT_DEF].styles=e}),this.existingComponentStyles.clear()},e.prototype.queueTypeArray=function(e,t){var r,n;try{for(var o=O(e),i=o.next();!i.done;i=o.next()){var s=i.value;Array.isArray(s)?this.queueTypeArray(s,t):this.queueType(s,t)}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},e.prototype.recompileNgModule=function(e){var r=this.resolvers.module.resolve(e);if(null===r)throw new Error("Unable to resolve metadata for NgModule: "+e.name);this.maybeStoreNgDef(tNG_MODULE_DEF,e),this.maybeStoreNgDef(tNG_INJECTOR_DEF,e),tcompileNgModuleDefs(e,r)},e.prototype.queueType=function(e,r){return this.resolvers.component.resolve(e)?(!R(e)&&e.hasOwnProperty(tNG_COMPONENT_DEF)||this.pendingComponents.add(e),this.seenComponents.add(e),void(this.componentToModuleScope.has(e)&&this.componentToModuleScope.get(e)!==U.DECLARATION||this.componentToModuleScope.set(e,r))):this.resolvers.directive.resolve(e)?(e.hasOwnProperty(tNG_DIRECTIVE_DEF)||this.pendingDirectives.add(e),void this.seenDirectives.add(e)):void(!this.resolvers.pipe.resolve(e)||e.hasOwnProperty(tNG_PIPE_DEF)||this.pendingPipes.add(e))},e.prototype.queueTypesFromModulesArray=function(e){var t,r;try{for(var n=O(e),o=n.next();!o.done;o=n.next()){var i=o.value;if(Array.isArray(i))this.queueTypesFromModulesArray(i);else if(z(i)){var s=i.ngModuleDef;this.queueTypeArray(Q(s.declarations),i),this.queueTypesFromModulesArray(Q(s.imports)),this.queueTypesFromModulesArray(Q(s.exports))}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.maybeStoreNgDef=function(e,t){if(!this.initialNgDefs.has(t)){var r=Object.getOwnPropertyDescriptor(t,e);this.initialNgDefs.set(t,[e,r])}},e.prototype.storeFieldOfDefOnType=function(e,t,r){var n=e[t];this.defCleanupOps.push({field:r,def:n,original:n[r]})},e.prototype.clearComponentResolutionQueue=function(){var e=this;null===this.originalComponentResolutionQueue&&(this.originalComponentResolutionQueue=new Map),A().forEach(function(t,r){return e.originalComponentResolutionQueue.set(r,t)})},e.prototype.restoreComponentResolutionQueue=function(){null!==this.originalComponentResolutionQueue&&(function e(t){F.clear(),t.forEach(function(e,t){return F.add(t)}),S=t}(this.originalComponentResolutionQueue),this.originalComponentResolutionQueue=null)},e.prototype.restoreOriginalState=function(){var e,r;try{for(var n=O(this.defCleanupOps),o=n.next();!o.done;o=n.next()){var i=o.value;i.def[i.field]=i.original}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}this.initialNgDefs.forEach(function(e,t){var r=b(e,2),n=r[0],o=r[1];o?Object.defineProperty(t,n,o):delete t[n]}),this.initialNgDefs.clear(),this.moduleProvidersOverridden.clear(),this.restoreComponentResolutionQueue(),tsetLocaleId(tDEFAULT_LOCALE_ID)},e.prototype.compileTestModule=function(){var e,r=this;tcompileNgModuleDefs(e=function e(){},{providers:E(this.rootProviderOverrides)});var n=new t.NgZone({enableLongStackTrace:!0}),o=E([{provide:t.NgZone,useValue:n},{provide:t.Compiler,useFactory:function(){return new ee(r)}}],this.providers,this.providerOverrides);tcompileNgModuleDefs(this.testModuleType,{declarations:this.declarations,imports:[e,this.additionalModuleTypes,this.imports||[]],schemas:this.schemas,providers:o},!0),this.applyProviderOverridesToModule(this.testModuleType)},Object.defineProperty(e.prototype,"injector",{get:function(){if(null!==this._injector)return this._injector;var e,r=[];this.platform.injector.get(t.COMPILER_OPTIONS).forEach(function(e){e.providers&&r.push(e.providers)}),null!==this.compilerProviders&&r.push.apply(r,E(this.compilerProviders)),tcompileNgModuleDefs(e=function e(){},{providers:r});var n=new tNgModuleFactory(e);return this._injector=n.create(this.platform.injector).injector,this._injector},enumerable:!0,configurable:!0}),e.prototype.getSingleProviderOverrides=function(e){var t=Y(e);return this.providerOverridesByToken.get(t)||null},e.prototype.getProviderOverrides=function(e){var t=this;return e&&e.length&&0!==this.providerOverridesByToken.size?J(J(e,function(e){return t.getSingleProviderOverrides(e)||[]})):[]},e.prototype.getOverriddenProviders=function(e){var t=this;if(!e||!e.length||0===this.providerOverridesByToken.size)return[];var r=this.getProviderOverrides(e),n=r.some(K),o=E(e,r);if(!n)return o;var i=[],s=new Set;return X(o,function(e){var r=Y(e);K(e)&&t.providerOverridesByToken.has(r)?s.has(r)||(s.add(r),e&&e.useValue&&Array.isArray(e.useValue)?X(e.useValue,function(e){i.unshift({provide:r,useValue:e,multi:!0})}):i.unshift(e)):i.unshift(e)}),i},e.prototype.hasProviderOverrides=function(e){return this.getProviderOverrides(e).length>0},e.prototype.patchDefWithProviderOverrides=function(e,t){var r=this,n=e[t];if(n&&n.providersResolver){this.maybeStoreNgDef(t,e);var o=n.providersResolver,i=function(e){return r.getOverriddenProviders(e)};this.storeFieldOfDefOnType(e,t,"providersResolver"),n.providersResolver=function(e){return o(e,i)}}},e}();function z(e){return e.hasOwnProperty("ngModuleDef")}function Q(e){return e instanceof Function?e():e}function J(e,t){var r=[];return e.forEach(function(e){Array.isArray(e)?r.push.apply(r,E(J(e,t))):r.push(t?t(e):e)}),r}function H(e,t){return e&&"object"==typeof e&&e[t]}function Y(e){return H(e,"provide")||e}function K(e){return!!H(e,"multi")}function X(e,t){for(var r=e.length-1;r>=0;r--)t(e[r],r)}var $,ee=function(){function e(e){this.testBed=e}return e.prototype.compileModuleSync=function(e){return this.testBed._compileNgModuleSync(e),new tNgModuleFactory(e)},e.prototype.compileModuleAsync=function(e){return M(this,void 0,void 0,function(){return T(this,function(r){switch(r.label){case 0:return[4,this.testBed._compileNgModuleAsync(e)];case 1:return r.sent(),[2,new tNgModuleFactory(e)]}})})},e.prototype.compileModuleAndAllComponentsSync=function(e){var r=this.compileModuleSync(e),n=this.testBed._getComponentFactories(e);return new t.ModuleWithComponentFactories(r,n)},e.prototype.compileModuleAndAllComponentsAsync=function(e){return M(this,void 0,void 0,function(){var r,n;return T(this,function(o){switch(o.label){case 0:return[4,this.compileModuleAsync(e)];case 1:return r=o.sent(),n=this.testBed._getComponentFactories(e),[2,new t.ModuleWithComponentFactories(r,n)]}})})},e.prototype.clearCache=function(){},e.prototype.clearCacheFor=function(e){},e.prototype.getModuleId=function(e){var t=this.testBed._getModuleResolver().resolve(e);return t&&t.id||void 0},e}(),te=0,re=Symbol("UNDEFINED"),ne=function(){function e(){this.platform=null,this.ngModule=null,this._compiler=null,this._testModuleRef=null,this._activeFixtures=[],this._globalCompilationChecked=!1}return e.initTestEnvironment=function(e,t,r){var n=oe();return n.initTestEnvironment(e,t,r),n},e.resetTestEnvironment=function(){oe().resetTestEnvironment()},e.configureCompiler=function(t){return oe().configureCompiler(t),e},e.configureTestingModule=function(t){return oe().configureTestingModule(t),e},e.compileComponents=function(){return oe().compileComponents()},e.overrideModule=function(t,r){return oe().overrideModule(t,r),e},e.overrideComponent=function(t,r){return oe().overrideComponent(t,r),e},e.overrideDirective=function(t,r){return oe().overrideDirective(t,r),e},e.overridePipe=function(t,r){return oe().overridePipe(t,r),e},e.overrideTemplate=function(t,r){return oe().overrideComponent(t,{set:{template:r,templateUrl:null}}),e},e.overrideTemplateUsingTestingModule=function(t,r){return oe().overrideTemplateUsingTestingModule(t,r),e},e.overrideProvider=function(t,r){return oe().overrideProvider(t,r),e},e.get=function(e,r,n){return void 0===r&&(r=t.Injector.THROW_IF_NOT_FOUND),void 0===n&&(n=t.InjectFlags.Default),oe().get(e,r)},e.createComponent=function(e){return oe().createComponent(e)},e.resetTestingModule=function(){return oe().resetTestingModule(),e},e.prototype.initTestEnvironment=function(e,t,r){if(this.platform||this.ngModule)throw new Error("Cannot set base providers because it has already been called");this.platform=t,this.ngModule=e,this._compiler=new W(this.platform,this.ngModule)},e.prototype.resetTestEnvironment=function(){this.resetTestingModule(),this._compiler=null,this.platform=null,this.ngModule=null},e.prototype.resetTestingModule=function(){this.checkGlobalCompilationFinished(),tresetCompiledComponents(),null!==this._compiler&&this.compiler.restoreOriginalState(),this._compiler=new W(this.platform,this.ngModule),this._testModuleRef=null,this.destroyActiveFixtures()},e.prototype.configureCompiler=function(e){if(null!=e.useJit)throw new Error("the Render3 compiler JiT mode is not configurable !");void 0!==e.providers&&this.compiler.setCompilerProviders(e.providers)},e.prototype.configureTestingModule=function(e){this.assertNotInstantiated("R3TestBed.configureTestingModule","configure the test module"),this.compiler.configureTestingModule(e)},e.prototype.compileComponents=function(){return this.compiler.compileComponents()},e.prototype.get=function(r,n,o){if(void 0===n&&(n=t.Injector.THROW_IF_NOT_FOUND),void 0===o&&(o=t.InjectFlags.Default),r===e)return this;var i=this.testModuleRef.injector.get(r,re,o);return i===re?this.compiler.injector.get(r,n,o):i},e.prototype.execute=function(e,t,r){var n=this,o=e.map(function(e){return n.get(e)});return t.apply(r,o)},e.prototype.overrideModule=function(e,t){this.assertNotInstantiated("overrideModule","override module metadata"),this.compiler.overrideModule(e,t)},e.prototype.overrideComponent=function(e,t){this.assertNotInstantiated("overrideComponent","override component metadata"),this.compiler.overrideComponent(e,t)},e.prototype.overrideTemplateUsingTestingModule=function(e,t){this.assertNotInstantiated("R3TestBed.overrideTemplateUsingTestingModule","Cannot override template when the test module has already been instantiated"),this.compiler.overrideTemplateUsingTestingModule(e,t)},e.prototype.overrideDirective=function(e,t){this.assertNotInstantiated("overrideDirective","override directive metadata"),this.compiler.overrideDirective(e,t)},e.prototype.overridePipe=function(e,t){this.assertNotInstantiated("overridePipe","override pipe metadata"),this.compiler.overridePipe(e,t)},e.prototype.overrideProvider=function(e,t){this.compiler.overrideProvider(e,t)},e.prototype.createComponent=function(e){var r=this,n=this.get(w),o="root-ng-internal-isolated-"+te++;n.insertRootElement(o);var s=e.ngComponentDef;if(!s)throw new Error("It looks like '"+tstringify(e)+"' has not been IVY compiled - it has no 'ngComponentDef' field");var u=this.get(P,!1),c=this.get(D,!1),l=u?null:this.get(t.NgZone,null),a=new tRender3ComponentFactory(s),p=function(){var e=a.create(t.Injector.NULL,[],"#"+o,r.testModuleRef);return new i(e,l,c)},d=l?l.run(p):p();return this._activeFixtures.push(d),d},Object.defineProperty(e.prototype,"compiler",{get:function(){if(null===this._compiler)throw new Error("Need to call TestBed.initTestEnvironment() first");return this._compiler},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"testModuleRef",{get:function(){return null===this._testModuleRef&&(this._testModuleRef=this.compiler.finalize()),this._testModuleRef},enumerable:!0,configurable:!0}),e.prototype.assertNotInstantiated=function(e,t){if(null!==this._testModuleRef)throw new Error("Cannot "+t+" when the test module has already been instantiated. Make sure you are not using `inject` before `"+e+"`.")},e.prototype.checkGlobalCompilationFinished=function(){this._globalCompilationChecked||null!==this._testModuleRef||tflushModuleScopingQueueAsMuchAsPossible(),this._globalCompilationChecked=!0},e.prototype.destroyActiveFixtures=function(){this._activeFixtures.forEach(function(e){try{e.destroy()}catch(t){console.error("Error during cleanup of component",{component:e.componentInstance,stacktrace:t})}}),this._activeFixtures=[]},e}();
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function oe(){return $=$||new ne}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function ie(){throw Error("unimplemented")}var se,ue=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return g(r,e),Object.defineProperty(r.prototype,"injector",{get:function(){throw ie()},enumerable:!0,configurable:!0}),r.prototype.overrideModule=function(e,t){throw ie()},r.prototype.overrideDirective=function(e,t){throw ie()},r.prototype.overrideComponent=function(e,t){throw ie()},r.prototype.overridePipe=function(e,t){throw ie()},r.prototype.loadAotSummaries=function(e){throw ie()},r.prototype.getComponentFactory=function(e){throw ie()},r.prototype.getComponentFromError=function(e){throw ie()},_([t.Injectable()],r)}(t.Compiler),ce=function ce(){},le=new Object,ae=0,pe=function(){function e(){this._instantiated=!1,this._compiler=null,this._moduleRef=null,this._moduleFactory=null,this._compilerOptions=[],this._moduleOverrides=[],this._componentOverrides=[],this._directiveOverrides=[],this._pipeOverrides=[],this._providers=[],this._declarations=[],this._imports=[],this._schemas=[],this._activeFixtures=[],this._testEnvAotSummaries=function(){return[]},this._aotSummaries=[],this._templateOverrides=[],this._isRoot=!0,this._rootProviderOverrides=[],this.platform=null,this.ngModule=null}return e.initTestEnvironment=function(e,t,r){var n=fe();return n.initTestEnvironment(e,t,r),n},e.resetTestEnvironment=function(){fe().resetTestEnvironment()},e.resetTestingModule=function(){return fe().resetTestingModule(),e},e.configureCompiler=function(t){return fe().configureCompiler(t),e},e.configureTestingModule=function(t){return fe().configureTestingModule(t),e},e.compileComponents=function(){return he().compileComponents()},e.overrideModule=function(t,r){return fe().overrideModule(t,r),e},e.overrideComponent=function(t,r){return fe().overrideComponent(t,r),e},e.overrideDirective=function(t,r){return fe().overrideDirective(t,r),e},e.overridePipe=function(t,r){return fe().overridePipe(t,r),e},e.overrideTemplate=function(t,r){return fe().overrideComponent(t,{set:{template:r,templateUrl:null}}),e},e.overrideTemplateUsingTestingModule=function(t,r){return fe().overrideTemplateUsingTestingModule(t,r),e},e.overrideProvider=function(t,r){return fe().overrideProvider(t,r),e},e.get=function(e,r,n){return void 0===r&&(r=t.Injector.THROW_IF_NOT_FOUND),void 0===n&&(n=t.InjectFlags.Default),fe().get(e,r,n)},e.createComponent=function(e){return fe().createComponent(e)},e.prototype.initTestEnvironment=function(e,t,r){if(this.platform||this.ngModule)throw new Error("Cannot set base providers because it has already been called");this.platform=t,this.ngModule=e,r&&(this._testEnvAotSummaries=r)},e.prototype.resetTestEnvironment=function(){this.resetTestingModule(),this.platform=null,this.ngModule=null,this._testEnvAotSummaries=function(){return[]}},e.prototype.resetTestingModule=function(){tclearOverrides(),this._aotSummaries=[],this._templateOverrides=[],this._compiler=null,this._moduleOverrides=[],this._componentOverrides=[],this._directiveOverrides=[],this._pipeOverrides=[],this._isRoot=!0,this._rootProviderOverrides=[],this._moduleRef=null,this._moduleFactory=null,this._compilerOptions=[],this._providers=[],this._declarations=[],this._imports=[],this._schemas=[],this._instantiated=!1,this._activeFixtures.forEach(function(e){try{e.destroy()}catch(t){console.error("Error during cleanup of component",{component:e.componentInstance,stacktrace:t})}}),this._activeFixtures=[]},e.prototype.configureCompiler=function(e){this._assertNotInstantiated("TestBed.configureCompiler","configure the compiler"),this._compilerOptions.push(e)},e.prototype.configureTestingModule=function(e){var t,r,n,o;this._assertNotInstantiated("TestBed.configureTestingModule","configure the test module"),e.providers&&(t=this._providers).push.apply(t,E(e.providers)),e.declarations&&(r=this._declarations).push.apply(r,E(e.declarations)),e.imports&&(n=this._imports).push.apply(n,E(e.imports)),e.schemas&&(o=this._schemas).push.apply(o,E(e.schemas)),e.aotSummaries&&this._aotSummaries.push(e.aotSummaries)},e.prototype.compileComponents=function(){var e=this;if(this._moduleFactory||this._instantiated)return Promise.resolve(null);var t=this._createCompilerAndModule();return this._compiler.compileModuleAndAllComponentsAsync(t).then(function(t){e._moduleFactory=t.ngModuleFactory})},e.prototype._initIfNeeded=function(){var e,r;if(!this._instantiated){if(!this._moduleFactory)try{var n=this._createCompilerAndModule();this._moduleFactory=this._compiler.compileModuleAndAllComponentsSync(n).ngModuleFactory}catch(e){var o=this._compiler.getComponentFromError(e);throw o?new Error("This test module uses the component "+tstringify(o)+' which is using a "templateUrl" or "styleUrls", but they were never compiled. Please call "TestBed.compileComponents" before your test.'):e}try{for(var i=O(this._templateOverrides),s=i.next();!s.done;s=i.next()){var u=s.value,c=u.component,l=this._compiler.getComponentFactory(u.templateOf);toverrideComponentView(c,l)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}var a=new t.NgZone({enableLongStackTrace:!0}),p=t.Injector.create({providers:[{provide:t.NgZone,useValue:a}],parent:this.platform.injector,name:this._moduleFactory.moduleType.name});this._moduleRef=this._moduleFactory.create(p),this._moduleRef.injector.get(t.ApplicationInitStatus).runInitializers(),this._instantiated=!0}},e.prototype._createCompilerAndModule=function(){var e,r,n=this,o=this._providers.concat([{provide:de,useValue:this}]),i=E(this._declarations,this._templateOverrides.map(function(e){return e.templateOf})),s=[],u=this._rootProviderOverrides;if(this._isRoot){var c=function(){return _([t.NgModule({providers:E(u),jit:!0})],function e(){})}();s.push(c)}o.push({provide:tAPP_ROOT,useValue:this._isRoot});var l=[s,this.ngModule,this._imports],a=this._schemas,p=function(){return _([t.NgModule({providers:o,declarations:i,imports:l,schemas:a,jit:!0})],function e(){})}(),d=this.platform.injector.get(ce);this._compiler=d.createTestingCompiler(this._compilerOptions);try{for(var h=O(E([this._testEnvAotSummaries],this._aotSummaries)),f=h.next();!f.done;f=h.next())this._compiler.loadAotSummaries(f.value)}catch(t){e={error:t}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(e)throw e.error}}return this._moduleOverrides.forEach(function(e){return n._compiler.overrideModule(e[0],e[1])}),this._componentOverrides.forEach(function(e){return n._compiler.overrideComponent(e[0],e[1])}),this._directiveOverrides.forEach(function(e){return n._compiler.overrideDirective(e[0],e[1])}),this._pipeOverrides.forEach(function(e){return n._compiler.overridePipe(e[0],e[1])}),p},e.prototype._assertNotInstantiated=function(e,t){if(this._instantiated)throw new Error("Cannot "+t+" when the test module has already been instantiated. Make sure you are not using `inject` before `"+e+"`.")},e.prototype.get=function(e,r,n){if(void 0===r&&(r=t.Injector.THROW_IF_NOT_FOUND),void 0===n&&(n=t.InjectFlags.Default),this._initIfNeeded(),e===de)return this;var o=this._moduleRef.injector.get(e,le,n);return o===le?this._compiler.injector.get(e,r,n):o},e.prototype.execute=function(e,t,r){var n=this;this._initIfNeeded();var o=e.map(function(e){return n.get(e)});return t.apply(r,o)},e.prototype.overrideModule=function(e,t){this._assertNotInstantiated("overrideModule","override module metadata"),this._moduleOverrides.push([e,t])},e.prototype.overrideComponent=function(e,t){this._assertNotInstantiated("overrideComponent","override component metadata"),this._componentOverrides.push([e,t])},e.prototype.overrideDirective=function(e,t){this._assertNotInstantiated("overrideDirective","override directive metadata"),this._directiveOverrides.push([e,t])},e.prototype.overridePipe=function(e,t){this._assertNotInstantiated("overridePipe","override pipe metadata"),this._pipeOverrides.push([e,t])},e.prototype.overrideProvider=function(e,t){this.overrideProviderImpl(e,t)},e.prototype.overrideProviderImpl=function(e,r,n){void 0===n&&(n=!1);var o=null;"string"!=typeof e&&(o=tgetInjectableDef(e))&&"root"===o.providedIn&&this._rootProviderOverrides.push(r.useFactory?{provide:e,useFactory:r.useFactory,deps:r.deps||[]}:{provide:e,useValue:r.useValue});var i,s=0;r.useFactory?(s|=1024,i=r.useFactory):(s|=256,i=r.useValue);var u=(r.deps||[]).map(function(e){var r,n=0;return Array.isArray(e)?e.forEach(function(e){e instanceof t.Optional?n|=2:e instanceof t.SkipSelf?n|=1:r=e}):r=e,[n,r]});toverrideProvider({token:e,flags:s,deps:u,value:i,deprecatedBehavior:n})},e.prototype.overrideTemplateUsingTestingModule=function(e,r){this._assertNotInstantiated("overrideTemplateUsingTestingModule","override template");var n=function(){return _([t.Component({selector:"empty",template:r,jit:!0})],function e(){})}();this._templateOverrides.push({component:e,templateOf:n})},e.prototype.createComponent=function(e){var r=this;this._initIfNeeded();var n=this._compiler.getComponentFactory(e);if(!n)throw new Error("Cannot create the component "+tstringify(e)+" as it was not imported into the testing module!");var o=this.get(P,!1),s=this.get(D,!1),u=o?null:this.get(t.NgZone,null),c=this.get(w),l="root"+ae++;c.insertRootElement(l);var a=function(){var e=n.create(t.Injector.NULL,[],"#"+l,r._moduleRef);return new i(e,u,s)},p=u?u.run(a):a();return this._activeFixtures.push(p),p},e}(),de=tivyEnabled?ne:pe,he=tivyEnabled?oe:fe;function fe(){return se=se||new pe}function ve(e,t){var r=he();return e.indexOf(C)>=0?function(){var n=this;return r.compileComponents().then(function(){var o=r.get(C);return r.execute(e,t,n),o.promise})}:function(){return r.execute(e,t,this)}}var me=function(){function e(e){this._moduleDef=e}return e.prototype._addModule=function(){var e=this._moduleDef();e&&he().configureTestingModule(e)},e.prototype.inject=function(e,t){var r=this;return function(){return r._addModule(),ve(e,t).call(this)}},e}(),ye="undefined"==typeof window?global:window;ye.beforeEach&&ye.beforeEach(function(){de.resetTestingModule(),m()}),
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
eangular_packages_core_testing_testing_b=ne,eangular_packages_core_testing_testing_c=oe,eangular_packages_core_testing_testing_a=pe,e.TestBed=de,e.getTestBed=he,e.inject=ve,e.InjectSetupWrapper=me,e.withModule=function ge(e,t){return t?function(){var r=he();return e&&r.configureTestingModule(e),t.apply(this)}:new me(function(){return e})}
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/,eMetadataOverrider=k,e.async=function _e(e){var t="undefined"!=typeof Zone?Zone:null;if(!t)return function(){return Promise.reject("Zone is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/dist/zone.js")};var r=t&&t[t.__symbol__("asyncTest")];return"function"==typeof r?r(e):function i(e){return n.jasmine?function(t){t||((t=function(){}).fail=function(e){throw e}),o(e,this,t,function(e){if("string"==typeof e)return t.fail(new Error(e));t.fail(e)})}:function(){var t=this;return new Promise(function(r,n){o(e,t,r,n)})}}(e)},e.ComponentFixture=i,e.resetFakeAsyncZone=m,e.fakeAsync=function Me(e){return v?v.fakeAsync(e):function t(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=c.assertPresent();if(p)throw new Error("fakeAsync() calls can not be nested");p=!0;try{if(!l){if(n.getDelegate()instanceof u)throw new Error("fakeAsync() calls can not be nested");l=new u}var o=void 0,i=n.getDelegate();n.setDelegate(l);try{o=e.apply(this,t),h()}finally{n.setDelegate(i)}if(l.pendingPeriodicTimers.length>0)throw new Error(l.pendingPeriodicTimers.length+" periodic timer(s) still in the queue.");if(l.pendingTimers.length>0)throw new Error(l.pendingTimers.length+" timer(s) still in the queue.");return o}finally{p=!1,a()}}}(e)},e.tick=function Te(e){return void 0===e&&(e=0),v?v.tick(e):function t(e){void 0===e&&(e=0),d().tick(e)}(e)},e.flush=function Oe(e){return v?v.flush(e):function t(e){return d().flush(e)}(e)},e.discardPeriodicTasks=function be(){if(v)return v.discardPeriodicTasks();!function e(){d().pendingPeriodicTimers.length=0}()},e.flushMicrotasks=function Ee(){return v?v.flushMicrotasks():h()},e.TestComponentRenderer=w,e.ComponentFixtureAutoDetect=D,e.ComponentFixtureNoNgZone=P,e.__core_private_testing_placeholder__="",eTestingCompiler=ue,eTestingCompilerFactory=ce,Object.defineProperty(e,"__esModule",{value:!0})});