blob: 9be6c98fdca25ff6ac00ae2e88a088fafe182c3f [file] [log] [blame]
{"version":3,"sources":["packages/core/core.umd.js"],"names":["global","factory","exports","module","require","define","amd","self","ng","core","rxjs","operators","this","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","constructor","prototype","create","__assign","assign","t","s","i","n","arguments","length","call","apply","__decorate","decorators","target","key","desc","c","r","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","__param","paramIndex","decorator","__metadata","metadataKey","metadataValue","metadata","__values","o","m","Symbol","iterator","next","value","done","__read","e","ar","push","error","__spread","concat","ANNOTATIONS","PARAMETERS","PROP_METADATA","makeDecorator","name","props","parentClass","additionalProcessing","typeFn","metaCtor","makeMetadataCtor","DecoratorFactory","_a","args","_i","annotationInstance","bind","TypeDecorator","cls","ngMetadataName","annotationCls","ctor","values","propName","makeParamDecorator","ParamDecoratorFactory","ParamDecorator","annotation","unusedKey","index","parameters","makePropDecorator","PropDecoratorFactory","decoratorInstance","PropDecorator","meta","unshift","InjectFlags","ɵ0","token","Inject","Optional","Self","SkipSelf","Host","ɵ1","attributeName","Attribute","getClosureSafeProperty","objWithPropertyToExtract","Error","fillProperties","source","ɵɵdefineInjectable","opts","providedIn","undefined","defineInjectable","ɵɵdefineInjector","options","providers","imports","getInjectableDef","type","def","NG_INJECTABLE_DEF","getInjectorDef","NG_INJECTOR_DEF","ngInjectableDef","ngInjectorDef","stringify","map","join","overriddenName","res","toString","newLineIndex","indexOf","substring","__forward_ref__","forwardRef","forwardRefFn","resolveForwardRef","fn","R3ResolvedDependencyType","__globalThis","globalThis","__window","window","__self","WorkerGlobalScope","__global","_global","getCompilerFacade","globalNg","ɵcompilerFacade","_injectImplementation","InjectionToken","_desc","__NG_ELEMENT_ID__","INJECTOR","THROW_IF_NOT_FOUND","NG_TEMP_TOKEN_PATH","NG_TOKEN_PATH","NEW_LINE","NO_NEW_LINE","SOURCE","USE_VALUE","provide","String","useValue","_currentInjector","setCurrentInjector","injector","former","setInjectImplementation","impl","previous","injectInjectorOnly","flags","Default","injectRootLimpMode","get","ɵɵinject","inject","notFoundValue","injectableDef","injectArgs","types","arg","isArray","j","NullInjector","catchInjectorError","injectorErrorName","tokenPath","message","formatError","text","obj","charAt","substr","context","parts","JSON","replace","angularCoreDiEnv","ɵɵgetFactoryOf","getFactoryOf","typeAny","Type","Function","isType","v","DELEGATE_CTOR","INHERITED_CLASS","INHERITED_CLASS_WITH_CTOR","INHERITED_CLASS_WITH_DELEGATE_CTOR","ReflectionCapabilities","reflect","_reflect","isReflectionEnabled","_zipTypesAndAnnotations","paramTypes","paramAnnotations","result","_ownParameters","parentCtor","isDelegateCtor","typeStr","test","tsickleCtorParams","ctorParameters","paramTypes_1","ctorParam","paramAnnotations_1","convertTsickleDecoratorIntoMetadata","getOwnMetadata","fill","getParentCtor","_ownAnnotations","typeOrFunc","annotations","ownAnnotations","_ownPropMetadata","propMetadata","propDecorators","propDecorators_1","propMetadata_1","keys","forEach","prop","parentPropMetadata_1","ownPropMetadata","hasLifecycleHook","lcProperty","guards","getter","setter","method","importUri","resourceUri","resolveIdentifier","moduleUrl","members","runtime","resolveEnum","enumIdentifier","decoratorInvocations","decoratorInvocation","parentProto","getPrototypeOf","getReflect","reflectDependencies","convertDependencies","deps","compiler","dep","reflectDependency","host","optional","resolved","Token","skipSelf","setTokenAndResolvedType","param","compileInjectable","srcMeta","hasAProvider","isUseClassProvider","isUseFactoryProvider","isUseValueProvider","isUseExistingProvider","compilerMeta","typeArgumentCount","ctorDeps","userDeps","useClass","useFactory","useExisting","USE_VALUE$1","USE_VALUE$2","EMPTY_ARRAY","convertInjectableProviderToFactory","provider","deps_1","reflectionCapabilities","valueProvider_1","existingProvider_1","factoryProvider_1","classProvider_1","deps_2","deps_3","Injectable","SWITCH_COMPILE_INJECTABLE","SWITCH_COMPILE_INJECTABLE__POST_R3__","render2CompileInjectable","injectableType","throwMultipleComponentError","tNode","tagName","throwMixedMultiProviderError","APP_ROOT","NOT_YET","CIRCULAR","EMPTY_ARRAY$1","NULL_INJECTOR","getNullInjector","createInjector","defType","parent","additionalProviders","R3Injector","_this","records","Map","injectorDefTypes","Set","onDestroy","_destroyed","dedupStack","deepForEach","injectorDef","processInjectorType","processProvider","set","makeRecord","isRootInjector","has","enumerable","configurable","destroy","assertNotDestroyed","service","ngOnDestroy","clear","previousInjector","record","couldBeInjectableType","injectableDefInScope","injectableDefOrInjectorDefFactory","hydrate","tokens","defOrWrappedDef","parents","ngModule","isDuplicate","add","importTypesWithProviders_1","imported","_loop_1","ngModule_1","defProviders","injectorType_1","ngModuleType","isTypeProvider","providerToRecord","providerToFactory","isValueProvider","multi","existing","multiRecord_1","throwCyclicDependencyError","hasOnDestroy","getUndecoratedInjectableFactory","paramLength","inheritedInjectableDef","getInheritedInjectableDef","console","warn","isExistingProvider","isFactoryProvider","classRef_1","throwInvalidProviderError","ngModuleDetail","hasDeps","input","INJECTOR_IMPL","INJECTOR_IMPL__PRE_R3__","StaticInjector","Injector","NULL","IDENT","EMPTY","CIRCULAR$1","MULTI_PROVIDER_FN","slice","_records","useNew","recursivelyProcessProviders","staticError","resolvedProvider","resolveProvider","computeDeps","providerDeps","multiProvider","multiProviderMixError","tryResolveToken","resolveToken","NO_NEW_LINE$1","depRecords","depRecord","childRecord","ERROR_DEBUG_CONTEXT","ERROR_ORIGINAL_ERROR","ERROR_LOGGER","constructResolvingPath","findFirstClosedCycle","reverse","k","injectionError","constructResolvingMessage","originalError","errMsg","wrappedError","msg","addKey","injectors","noAnnotationError","params","signature","ii","parameter","ReflectiveKey","id","displayName","_globalKeyRegistry","numberOfKeys","KeyRegistry","_allKeys","newKey","size","reflector","Reflector","updateCapabilities","caps","identifier","ReflectiveDependency","visibility","fromKey","_EMPTY_LIST","ResolvedReflectiveProvider_","resolvedFactories","resolvedFactory","ResolvedReflectiveFactory","dependencies","resolveReflectiveFactory","factoryFn","resolvedDeps","_dependenciesFor","aliasInstance","constructDependencies","params_1","_extractToken","resolveReflectiveProvider","resolveReflectiveProviders","resolvedProviderMap","mergeResolvedReflectiveProviders","normalizedProvidersMap","_normalizeProviders","invalidProviderError","from","some","_createDependency","paramMetadata","ChangeDetectionStrategy","ChangeDetectorStatus","Query","UNDEFINED","ReflectiveInjector","resolve","resolveAndCreate","ResolvedReflectiveProviders","fromResolvedProviders","ReflectiveInjector_","_providers","_parent","_constructionCounter","len","keyIds","objs","_getByKey","resolveAndCreateChild","createChildFromResolved","inj","resolveAndInstantiate","instantiateResolved","_instantiateProvider","getProviderAtIndex","outOfBoundsError","_new","_getMaxNumberOfObjects","cyclicDependencyError","_instantiate","_getByReflectiveDependency","instantiationError","originalException","originalStack","first","INJECTOR_KEY","_getByKeySelf","_getByKeyDefault","_getObjByKeyId","keyId","_throwOrNull","noProviderError","inj_","_mapProviders","ANALYZE_FOR_ENTRY_COMPONENTS","ContentChildren","selector","data","isViewQuery","descendants","ContentChild","ViewChildren","ViewChild","resolveComponentResources","resourceResolver","componentResolved","urlMap","cachedResourceResolve","url","promise","resp","then","unwrapResponse","componentResourceResolutionQueue","component","promises","templateUrl","template","styleUrls","styles","styleOffset","styleUrl","style","splice","fullyResolved","Promise","all","componentDefResolved","componentDefPendingResolution","delete","clearResolutionOfComponentResourcesQueue","ɵChangeDetectorStatus","ViewEncapsulation","componentNeedsResolution","old","response","noSideEffects","EMPTY_OBJ","EMPTY_ARRAY$2","NG_COMPONENT_DEF","ngComponentDef","NG_DIRECTIVE_DEF","ngDirectiveDef","NG_PIPE_DEF","ngPipeDef","NG_MODULE_DEF","ngModuleDef","NG_LOCALE_ID_DEF","ngLocaleIdDef","NG_BASE_DEF","ngBaseDef","NG_ELEMENT_ID","_renderCompCount","ɵɵdefineComponent","componentDefinition","typePrototype","declaredInputs","providersResolver","consts","vars","ngContentSelectors","hostBindings","contentQueries","inputs","outputs","exportAs","onChanges","onInit","ngOnInit","doCheck","ngDoCheck","afterContentInit","ngAfterContentInit","afterContentChecked","ngAfterContentChecked","afterViewInit","ngAfterViewInit","afterViewChecked","ngAfterViewChecked","onPush","changeDetection","OnPush","directiveDefs","pipeDefs","selectors","viewQuery","features","encapsulation","Emulated","_","setInput","schemas","tView","directiveTypes","directives","feature","pipeTypes","pipes","invertObject","extractDirectiveDef","extractPipeDef","ɵɵsetComponentScope","getComponentDef","getDirectiveDef","getPipeDef","ɵɵdefineNgModule","bootstrap","declarations","transitiveCompileScopes","ɵɵsetNgModuleScope","scope","getNgModuleDef","secondary","newLookup","minifiedKey","publicName","declaredName","ɵɵdefineBase","baseDefinition","ɵɵdefineDirective","ɵɵdefinePipe","pipeDef","pure","getBaseDef","throwNotFound","renderStringify","stringifyForError","defaultScheduler","requestAnimationFrame","setTimeout","ɵɵresolveWindow","element","ownerDocument","defaultView","ɵɵresolveDocument","ɵɵresolveBody","body","INTERPOLATION_DELIMITER","isPropMetadataString","str","maybeUnwrapFn","HOST","TVIEW","FLAGS","PARENT","NEXT","QUERIES","T_HOST","BINDING_INDEX","CLEANUP","CONTEXT","INJECTOR$1","RENDERER_FACTORY","RENDERER","SANITIZER","CHILD_HEAD","CHILD_TAIL","CONTENT_QUERIES","DECLARATION_VIEW","PREORDER_HOOK_FLAGS","HEADER_OFFSET","throwError","TYPE","ACTIVE_INDEX","NATIVE","CONTAINER_HEADER_OFFSET","MONKEY_PATCH_KEY_NAME","unwrapRNode","isLView","isLContainer","isStylingContext","getNativeByIndex","lView","getNativeByTNode","hostView","getTNode","view","loadInternal","getComponentViewByIndex","nodeIndex","slotValue","isContentQueryHost","isComponent","isComponentDef","isRootView","readPatchedData","readPatchedLView","viewAttachedToContainer","resetPreOrderHookFlags","registerPreOrderHooks","directiveIndex","directiveDef","initialPreOrderHooksLength","initialPreOrderCheckHooksLength","preOrderHooks","preOrderCheckHooks","registerPostOrderHooks","firstTemplatePass","directiveStart","end","directiveEnd","contentHooks","contentCheckHooks","viewHooks","viewCheckHooks","destroyHooks","executePreOrderHooks","currentView","checkNoChangesMode","currentNodeIndex","executeHooks","firstPassHooks","checkHooks","initPhaseState","hooksToCall","callHooks","arr","initPhase","nodeIndexLimit","lastNodeIndexFound","callHook","isInitHook","hook","directive","elementDepthCount","stylingContext","setCachedStylingContext","bindingsEnabled","currentDirectiveDef","setCurrentDirectiveDef","ɵɵenableBindings","ɵɵdisableBindings","getLView","previousOrParentTNode","isParent","MIN_DIRECTIVE_ID","activeDirectiveId","activeDirectiveSuperClassDepthPosition","activeDirectiveSuperClassHeight","setActiveHostElement","elementIndex","_selectedIndex","setSelectedIndex","getActiveDirectiveId","incrementActiveDirectiveId","adjustActiveDirectiveSuperClassDepthPosition","delta","Math","max","getActiveDirectiveSuperClassHeight","getActiveDirectiveSuperClassDepth","ɵɵrestoreView","viewToRestore","contextLView","getPreviousOrParentTNode","setPreviousOrParentTNode","_isParent","setTNodeAndViewData","getIsParent","setIsNotParent","isCreationMode","getCheckNoChangesMode","setCheckNoChangesMode","mode","bindingRootIndex","getBindingRoot","setBindingRoot","currentQueryIndex","getCurrentQueryIndex","setCurrentQueryIndex","enterView","newView","hostTNode","oldView","bindingStartIndex","nextContextImpl","level","walkUpViews","nestingLevel","leaveView","safeToRunHooks","getSelectedIndex","_currentNamespace","ɵɵnamespaceSVG","ɵɵnamespaceMathML","ɵɵnamespaceHTML","BRAND","allowSanitizationBypass","bypassSanitizationTrustString","trustedString","trusted","_devMode","_runModeLocked","isDevMode","InertBodyHelper","defaultDoc","inertDocument","implementation","createHTMLDocument","inertBodyElement","inertHtml","createElement","appendChild","innerHTML","querySelector","getInertBodyElement","isDOMParserAvailable","DOMParser","getInertBodyElement_DOMParser","getInertBodyElement_InertDocument","getInertBodyElement_XHR","html","encodeURI","xhr","XMLHttpRequest","responseType","open","send","removeChild","firstChild","parseFromString","templateEl","documentMode","stripCustomNsAttrs","el","elAttrs","attributes","attrName","item","removeAttribute","childNode","nodeType","Node","ELEMENT_NODE","nextSibling","SAFE_URL_PATTERN","DATA_URL_PATTERN","_sanitizeUrl","match","sanitizeSrcset","srcset","split","trim","tagSet","tags","e_1","_b","_c","e_1_1","return","merge","e_2","sets","sets_1","sets_1_1","e_2_1","inertBodyHelper","SecurityContext","VOID_ELEMENTS","OPTIONAL_END_TAG_BLOCK_ELEMENTS","OPTIONAL_END_TAG_INLINE_ELEMENTS","OPTIONAL_END_TAG_ELEMENTS","BLOCK_ELEMENTS","INLINE_ELEMENTS","VALID_ELEMENTS","URI_ATTRS","SRCSET_ATTRS","HTML_ATTRS","ARIA_ATTRS","VALID_ATTRS","SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS","SanitizingHtmlSerializer","sanitizedSomething","buf","sanitizeChildren","current","traverseContent","startElement","TEXT_NODE","chars","nodeValue","endElement","checkClobberedElement","parentNode","nodeName","toLowerCase","elAttr","lower","encodeEntities","node","nextNode","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","outerHTML","SURROGATE_PAIR_REGEXP","NON_ALPHANUMERIC_REGEXP","charCodeAt","_sanitizeHtml","unsafeHtmlInput","unsafeHtml","mXSSAttempts","parsedHtml","sanitizer","safeHtml","getTemplateContent","parent_1","isTemplateElement","content","Sanitizer","SAFE_STYLE_VALUE","RegExp","URL_RE","_sanitizeStyle","urlMatch","hasBalancedQuotes","outsideSingle","outsideDouble","ɵɵsanitizeHtml","getSanitizer","sanitize","HTML","document","ɵɵsanitizeStyle","unsafeStyle","STYLE","ɵɵsanitizeUrl","unsafeUrl","URL","ɵɵsanitizeResourceUrl","unsafeResourceUrl","RESOURCE_URL","ɵɵsanitizeScript","unsafeScript","SCRIPT","getUrlSanitizer","tag","ɵɵsanitizeUrlOrResourceUrl","ɵɵdefaultStyleSanitizer","doSanitizeValue","RendererStyleFlags3","TNODE","PARENT_INJECTOR","INJECTOR_BLOOM_PARENT_SIZE","NO_PARENT_INJECTOR","NodeInjectorFactory","isViewProvider","injectImplementation","resolving","canSeeViewProviders","injectImpl","isProceduralRenderer","renderer","domRendererFactory3","createRenderer","hostElement","rendererType","getLContext","mpValue","isComponentInstance","instance","findViaComponent","isDirectiveInstance","findViaDirective","directiveInstance","directiveIndexEnd","traverseNextElement","getDirectivesAtNodeIndex","findViaNativeElement","existingCtx","native","createLContext","attachPatchData","rElement","parentContext","localRefs","getComponentViewByInstance","componentInstance","child","componentIndices","components","elementComponentIndex","includeComponents","directiveStartIndex","CorePlayerHandler","_players","flushPlayers","player","state","play","queuePlayer","DEFAULT_TEMPLATE_DIRECTIVE_INDEX","ANIMATION_PROP_PREFIX","createEmptyStylingContext","wrappedElement","initialStyles","initialClasses","allocateOrUpdateDirectiveIntoContext","singlePropValuesIndex","styleSanitizer","directiveRegistry","limit","propValuesStartPosition","getStylingContextFromLView","viewData","storageIndex","wrapper","stylingTemplate","allocStylingContext","templateStyleContext","isAnimationProp","hasClassInput","hasStyleInput","addPlayerInternal","playerContext","rootContext","playerContextIndex","ref","addEventListener","playerHandler","getPlayerContext","allocPlayerContext","setUpAttributes","attrs","isProc","namespaceURI","attrVal","setAttribute","setAttributeNS","setProperty","attrsStylingIndexOf","startIndex","val","isNameOnlyAttributeMarker","marker","hasParentInjector","parentLocation","getParentInjectorIndex","getParentInjectorViewOffset","getParentInjectorView","location","startView","viewOffset","parentView","getLViewParent","findComponentView","rootTNode","getRootContext","viewOrComponent","getRootView","componentOrLView","includeViewProviders","setIncludeViewProviders","oldValue","BLOOM_MASK","BLOOM_SIZE","nextNgElementId","getOrCreateNodeInjectorForNode","existingInjectorIndex","getInjectorIndex","injectorIndex","insertBloom","blueprint","parentLoc","getParentInjectorLocation","parentIndex","parentLView","parentData","footer","diPublicInInjector","bloomAdd","bloomBit","mask","b6","b5","tData","injectAttributeImpl","attrNameToInject","attrsLength","accumulatedClasses","accumulatedStyles","getOrCreateInjectable","bloomHash","bloomHashBitOrFactory","tokenId","savePreviousOrParentTNode","saveLView","NodeInjector","previousTView","hostTElementNode","shouldSearchParent","bloomHasToken","searchTokensOnInjector","NOT_FOUND","moduleInjector","previousInjectImplementation","currentTView","injectableIdx","locateDirectiveOrProvider","getNodeInjectable","canAccessViewProviders","isHostSpecialCase","nodeProviderIndexes","providerIndexes","tInjectables","injectablesStart","directivesStart","cptViewProvidersCount","endIndex","providerTokenOrDef","dirDef","lData","isFactory","previousIncludeViewProviders","injectorView","isFirstHostTNode","_tNode","_lView","ɵɵgetInheritedFactory","getDebugContext","getOriginalError","defaultErrorLogger","ErrorHandler","_console","handleError","_findOriginalError","_findContext","errorLogger","getErrorLogger","CAMEL_CASE_REGEXP","normalizeDebugBindingValue","NO_CHANGE","enqueueHostInstruction","priority","instructionFn","instructionFnArgs","buffer","findNextInsertionIndex","BoundPlayerFactory","initializeStaticContext","stylingStartIndex","patchContextWithStaticAttrs","attrsStylingStartIndex","attr","patchInitialStylingValue","initialStyling","directiveOwnerIndex","allowValueChange","addOrUpdateStaticStyle","renderInitialClasses","setClass","renderInitialStyles","setStyle","getMatchingBindingIndex","bindingName","start","getProp","updateClassMap","classesInput","updateStylingMap","updateStyleMap","stylesInput","entryIsClassBased","isMultiValueCacheHit","newValue","readCachedMapValue","propNames","playerBuilder","ClassAndStylePlayerBuilder","rawValue","playerBuilderPosition","playerBuilderIndex","playerBuildersAreDirty","hasPlayerBuilderChanged","setPlayerBuilder","applyAll","getMultiClassesStartIndex","getMultiStylesStartIndex","patchStylingMapIntoContext","ctxStart","ctxEnd","cacheValue","dirty","cacheIndex","cachedValues","ownershipValuesStartIndex","existingCachedValueCount","valuesEntryShapeChange","totalUniqueValues","totalNewAllocatedSlots","applyAllProps","ctxIndex","totalRemainingProperties","currentProp","normalizedProp","mapProp","hyphenate","currentValue","getValue","currentDirectiveIndex","getDirectiveIndexFromEntry","currentFlag","getPointers","hasValueChanged","setValue","setPlayerBuilderIndex","hasInitialValueChanged","setDirty","getStyleSanitizer","propertiesLoop","isInsideOwnershipArea","distantCtxDirectiveIndex","distantCtxPlayerBuilderIndex","getPlayerBuilderIndex","distantCtxValue","distantCtxFlag","swapMultiContextEntries","insertNewMultiProperty","prepareInitialFlag","ctxValue","ctxFlag","updateCachedMapValue","startPosition","endPosition","totalValues","dirtyFutureValues","nextStartPosition","totalStylingEntries","classCache","diffInStartPosition","setContextDirty","setContextPlayersDirty","updateClassProp","offset","forceOverride","updateSingleStylingValue","updateStyleProp","isClassBased","singleIndex","getSinglePropIndexValue","currValue","currFlag","currDirective","value_1","currPlayerIndex","newIndex","setSanitizeFlag","sanitizeYes","indexForMulti","getMultiOrSingleIndex","valueForMulti","multiDirty","singleDirty","valueExists","store","DashCase","removeStyle","removeProperty","className","addClass","removeClass","remove","isDirtyYes","adjustedIndex","isDirty","isClassBasedValue","isSanitizable","pointers","configFlag","staticIndex","dynamicIndex","getInitialValue","flag","getInitialIndex","setProp","builder","insertionIndex","directiveOwnerPointers","playerIndex","getPlayerBuilder","setFlag","indexA","indexB","tmpValue","tmpProp","tmpFlag","tmpPlayerBuilderIndex","tmpDirectiveIndex","flagA","flagB","singleIndexA","_flag","singleIndexB","classBased","doShift","updateSinglePointerValues","indexStartPosition","initialIndexForSingle","initialIndex","getInitialStylingValuesIndexOf","initialValue","a","_element","_type","_values","_dirty","_factory","buildPlayer","currentPlayer","isFirstRender","keyValues","singlePropOffsetRegistryIndex","offsets","dirs","currentDirectiveOwner","newDirectiveOwner","getInitialClassNameValue","initialClassValues","registerMultiMapEntry","count","staticStyles","NG_TEMPLATE_SELECTOR","isCssClassMatching","nodeClassAttrVal","cssClassToMatch","nodeClassesLen","matchIndex","matchEndIdx","hasTagAndTypeMatch","currentSelector","isProjectionMode","isNodeMatchingSelector","nodeAttrs","nameOnlyMarkerIdx","getNameOnlyMarkerIndex","skipToNextSelector","isPositive","selectorAttrValue","readClassValueFromTNode","attrIndexInNode","findAttrIndexInNode","nodeAttrValue","compareAgainstClassName","isInlineTemplate","bindingsMode","maybeAttrName","matchTemplateAttribute","isNodeMatchingSelectorList","isSelectorInSelectorList","list","selectorListLoop","currentSelectorInList","_currentSanitizer","ELEMENT_MARKER","COMMENT_MARKER","_stylingMode","runtimeIsNewStylingInUse","setCurrentStyleSanitizer","getCurrentStyleSanitizer","MAP_BASED_ENTRY_PROP_NAME","getBindingNameFromIndex","updateContextDirectiveIndex","getConfig","getProp$1","getPropConfig","isSanitizationRequired","getGuardMask","setGuardMask","maskValue","config","getValuesCount","getBindingValue","getDefaultValue","allowStylingFlush","lockContext","setConfig","isContextLocked","getPropValuesStartPosition","hasValueChanged$1","isStylingValueDefined","getCurrentOrLViewSanitizer","sanitizeUsingSanitizerObject","DEFAULT_BINDING_VALUE","DEFAULT_SIZE_VALUE","DEFAULT_GUARD_MASK_VALUE","STYLING_INDEX_FOR_MAP_BINDING","STYLING_INDEX_START_VALUE","currentStyleIndex","currentClassIndex","stylesBitMask","classesBitMask","deferredBindingQueue","updateClassBinding","bindingIndex","deferRegistration","forceUpdate","updateBindingData","updateStyleBinding","isMapBased","counterIndex","sanitizationRequired","deferBindingRegistration","flushDeferredBindings","registerBinding","changed","countId","bindingValue","found","valuesCount","allocateNewContextEntry","addBindingIntoContext","lastValueIndex","applyStyling","bindingData","bitMaskValue","applyStylingFn","bitMask","normalizeBitMaskValue","stylingMapsSyncFn","getStylingMapsSyncFn","_activeStylingMapApplyFn","mapsMode","valueApplied","valuesCountUpToDefault","defaultValue","valueAppliedWithinMap","setStyle$1","setClass$1","classList","syncStylingMap","targetProp","targetPropValueWasApplied","runTheSyncAlgorithm","loopUntilEnd","innerSyncStylingMap","currentMapIndex","lStylingMap","cursor","getCurrentSyncCursor","mapIndex","MAP_CURSORS","getMapProp","iteratedTooFar","isTargetPropMatched","valueIsDefined","resolveInnerMapMode","isValueAllowedToBeApplied","useDefault","valueToApply","bindingIndexToApply","setCurrentSyncCursor","indexValue","resetSyncCursors","activeStylingMapFeature","setStylingMapsSyncFn","currentMode","isExactMatch","innerMode","doApplyValue","setMapValue","TStylingContextDebug","entries","guardMask","bindingsStartPosition","sources","NodeStylingDebug","_data","_isClassBased","_sanitizer","overrideSanitizer","_mapValues","toDebug","debug","assertDefined","actual","toHtml","includeChildren","isTextNode","textContent","readLViewValue","LViewDebug","_raw_lView","__raw__flags__","creationMode","firstViewPass","checkAlways","attached","destroyed","isRoot","indexWithinInitPhase","toDebugNodes","debugNodes","tNodeCursor","componentLViewDebug","classes","newStyles","newClasses","nodes","cleanup","rendererFactory","childHead","childTail","declarationView","queries","tHost","childViews","__other__","LContainerDebug","_raw_lContainer","I18NDebugItem","__raw_opCode","ɵɵselect","selectInternal","I18nMutateOpCodesDebug","__raw_opCodes","__lView","results","opCode","commentValue","code","I18nUpdateOpCodesDebug","icus","checkBit","skipCodes","tIcuIndex","tIcu","sanitizeFn","attrValue","_CLEAN_PROMISE","refreshDescendantViews","refreshDynamicEmbeddedViews","dynamicViewData","renderEmbeddedTemplate","refreshContentQueries","setHostBindings","selectedIndex","expandoInstructions","expandoStartIndex","currentElementIndex","instruction","providerCount","staticContentQueries","refreshChildComponents","viewAttachedToChangeDetector","syncViewWithBlueprint","componentView","componentTView","checkView","directiveDefIdx","elementCreate","overriddenRenderer","rendererToUse","namespace","getNamespace","createElementNS","createLView","tHostNode","getOrCreateTNode","createTNodeAtIndex","createTNode","assignTViewNodeToLView","tParentNode","viewToRender","_previousOrParentTNode","tickRootContext","executeTemplate","getRenderFlags","renderComponentOrTemplate","templateFn","normalExecutionPath","creationModeIsActive","begin","rf","prevSelectedIndex","setNodeStylingTemplate","attrsStartIndex","stylingAttrsStartIndex","executeContentQueries","createDirectivesAndLocals","localRefExtractor","getBindingsEnabled","resolveDirectives","exportsMap","","initNodeFlags","generateExpandoInstructionBlock","baseResolveDirective","saveNameToExportMap","cacheMatchingLocalNames","localNames","findDirectiveMatches","registry","matches","instantiateAllDirectives","addComponentLogic","postProcessDirective","invokeDirectivesHostBindings","expando","invokeHostBindingsInCreationMode","saveResolvedLocalsInData","localIndex","getOrCreateTView","createTView","viewIndex","initialViewLength","createViewBlueprint","viewQueryStartIndex","staticViewQueries","pipeRegistry","locateHostElement","elementOrSelector","defaultRenderer","selectRootElement","tParent","propertyMetadataStartIndex","propertyMetadataEndIndex","initialInputs","tViews","projectionNext","projection","onElementCreationFns","generatePropertyAliases","direction","propStore","isInput","defs","propertyAliasMap","internalName","ATTR_TO_PROP","class","for","formaction","innerHtml","readonly","tabindex","elementPropertyInternal","nativeOnly","loadRendererFn","inputData","dataValue","initializeTNodeInputs","setInputsForProperty","markDirtyIfOnPush","childComponentLView","savePropertyDebugData","lastBindingIndex","bindingMetadata","previousExpandoLength","directiveCount","postProcessBaseDirective","setInputsFromAttrs","initialInputData","generateInitialInputs","i_1","minifiedInputName","privateName","queueComponentIndexForCheck","numberOfDirectives","directiveFactory","nodeInjectorFactory","addToViewTree","elementAttributeInternal","strValue","createLContainer","hostNative","isForViewContainerRef","lViewOrLContainer","markViewDirty","scheduleTick","res_1","nothingScheduled","clean","scheduler","rootComponent","detectChangesInternal","detectChangesInRootView","hostTView","executeViewQueryFn","storeBindingMetadata","prefix","suffix","CLEAN_PROMISE","getCleanup","getTViewCleanup","loadComponentRenderer","errorHandler","textBindingInternal","applyOnCreateInstructions","fns","ɵɵallocHostVars","queueHostBindingForCheck","hostVars","getCurrentDirectiveDef","prefillHostVars","totalHostVars","_symbolIterator","getSymbolIterator","Symbol_1","getOwnPropertyNames","looseIdentical","isNaN","devModeEqual","isListLikeIterableA","isListLikeIterable","isListLikeIterableB","areIterablesEqual","comparator","iterator1","iterator2","item1","item2","WrappedValue","wrapped","wrap","unwrap","isWrapped","isJsObject","updateBinding","getBinding","bindingUpdated","isDifferent","bindingUpdated2","exp1","exp2","different","bindingUpdated3","exp3","bindingUpdated4","exp4","ɵɵproperty","bindReconciledValue","ɵɵupdateSyntheticHostBinding","bound","ɵɵattribute","ɵɵinterpolationV","isBindingUpdated","ɵɵinterpolation1","v0","ɵɵinterpolation2","i0","v1","ɵɵinterpolation3","i1","v2","ɵɵinterpolation4","i2","v3","ɵɵinterpolation5","i3","v4","ɵɵinterpolation6","i4","v5","ɵɵinterpolation7","i5","v6","ɵɵinterpolation8","i6","v7","ɵɵattributeInterpolate1","interpolatedValue","ɵɵattributeInterpolate2","ɵɵattributeInterpolate3","ɵɵattributeInterpolate4","ɵɵattributeInterpolate5","ɵɵattributeInterpolate6","ɵɵattributeInterpolate7","ɵɵattributeInterpolate8","ɵɵattributeInterpolateV","interpolated","markDirty","getLContainer","embeddedView","container","getContainerRenderParent","tViewNode","nativeParentNode","executeActionOnElementOrContainer","action","lNodeToHandle","beforeNode","lContainer","rNode","nativeInsertBefore","nativeRemoveNode","destroyNode","executeActionOnContainer","renderParent","anchor","executeActionOnView","createTextNode","createText","addRemoveViewFromContainer","insertMode","insertView","indexInContainer","containerLength","detachView","removeIndex","viewToDetach","removeView","detachedView","destroyLView","destroyViewTree","rootView","cleanUpView","firstView","getParentState","executeOnDestroys","removeListeners","tCleanup","lCleanup","idxOrTargetGetter","useCaptureOrSubIdx","removeEventListener","unsubscribe","insertBefore","nativeAppendOrInsertBefore","nativeAppendChild","childEl","childTNode","getRenderParent","getHighestElementOrICUContainer","getHostNative","isIcuCase","ShadowDom","Native","anchorNode","getNativeAnchorNode","parentTNode","getBeforeNodeForView","childEl_1","childEl_1_1","viewIndexInContainer","nextViewIndex","tViewNodeChild","isHostElement","nativeParent","nativeRemoveChild","appendProjectedNodes","tProjectionNode","selectorIndex","projectedView","nodeToProject","appendProjectedNode","appendProjectedChildren","ngContainerChildTNode","projectionView","projectedTNode","nodeOrContainer","viewRootTNode","executeActionOnNode","elementContainerRootTNodeType","executeActionOnElementContainer","tElementContainerNode","executeActionOnProjection","componentLView","projectionTNode","projectedComponentLView","ɵɵcontainer","containerInternal","addTContainerToQueries","ɵɵtemplate","tContainerNode","ɵɵcontainerRefreshStart","ɵɵcontainerRefreshEnd","nextIndex","insertNodeBeforeViews","addNode","comment","createComment","ɵɵreference","getContextLView","ɵɵload","ɵɵdirectiveInject","ɵɵinjectAttribute","_stylingProp","defer","getClassesContext","getStylesContext","_stylingMap","valueHasChanged","normalizeIntoStylingMap","newValues","allValuesTrue","outer","propAtIndex","getActiveDirectiveStylingIndex","getContext","allocTStylingContext","ɵɵstyling","classBindingNames","styleBindingNames","directiveStylingIndex","getActiveDirectiveStylingIndex$1","stylingInit","updateLastDirectiveIndex","initStyling","registerHostDirective","updateContextWithBindings","findOrPatchDirectiveIntoRegistry","staticModeOnly","hyphenateEntries","newEntries","singlePropOffsetValues","totalCurrentClassBindings","totalCurrentStyleBindings","cachedClassMapValues","cachedStyleMapValues","stylesOffset","singleClassesStartIndex","multiStylesStartIndex","multiClassesStartIndex","currentSinglePropsLength","insertionOffset","filteredStyleBindingNames","name_1","singlePropIndex","filteredClassBindingNames","i_2","name_2","totalStyles","totalClasses","totalNewEntries","i_3","isMultiBased","singleOrMultiIndex","i_4","i_5","i_6","multiIndex","initialValuesToLookup","indexForInitial","initialFlag","newStylesSpaceAllocationSize","newClassesSpaceAllocationSize","cachedStyleMapIndex","i_7","cachedClassMapIndex","i_8","ɵɵstyleProp","styleIndex","valueToAdd","resolveStylePropValue$1","getStylingContext","styleProp","resolveStylePropValue","resolvedValue","ɵɵclassProp","classIndex","booleanOrNull","classProp","ɵɵstyleMap","styleInputVal","forceStylesAsString","styleMap","ɵɵclassMap","classInputVal","forceClassesAsString","classMap","ɵɵstylingApply","runtimeAllowOldStyling","renderStyling","rootOrView","classesStore","stylesStore","totalPlayersQueued","allowFlush","flushQueue","isContextDirty","flushPlayerBuilders","multiStartIndex","directiveIndex_1","playersStartIndex","playerInsertionIndex","oldPlayer","stylingApply","getRenderer","getNativeFromLView","applyClasses","applyStyles","getCachedStylingContext","ɵɵelementStart","initialStylesIndex","initialClassesIndex","lastAttrIndex","getElementDepthCount","increaseElementDepthCount","registerInitialStylingIntoContext","classesContext","stylesContext","currentQueries","clone","ɵɵelementEnd","decreaseElementDepthCount","getInitialStyleStringValue","initialStyleValues","styleString","ɵɵelement","ɵɵelementHostAttrs","hostElementIndex","ɵɵelementContainerStart","ɵɵelementContainerEnd","ɵɵembeddedViewStart","viewBlockId","containerTNode","scanForView","startIdx","viewAtPositionId","setIsParent","getOrCreateEmbeddedTView","containerTViews","createView","ɵɵembeddedViewEnd","viewHost","ɵɵgetCurrentView","isPromise","isObservable","subscribe","ɵɵlistener","eventName","listenerFn","useCapture","eventTargetResolver","listenerInternal","ɵɵcomponentHostSyntheticListener","processOutputs","lCleanupIndex","existingListener","hasDirectives","findExistingListener","tNodeIdx","cleanupEventName","listenerIdxInLCleanup","__ngNextListenerFn__","wrapListener","cleanupFn","listen","propsLength","subscription","idx","executeListenerWithErrorHandling","wrapWithPreventDefault","wrapListenerIn_markDirtyAndPreventDefault","nextListenerFn","preventDefault","returnValue","ɵɵnextContext","matchingProjectionSlotIndex","projectionSlots","wildcardNgContentIndex","ngProjectAsAttrVal","getProjectAsAttrValue","ngProjectAsAttrIdx","ɵɵprojectionDef","componentNode","projectionHeads","tails","componentChild","slotIndex","delayProjection","setDelayProjection","ɵɵprojection","ɵɵpropertyInterpolate","ɵɵpropertyInterpolate1","ɵɵpropertyInterpolate2","ɵɵpropertyInterpolate3","ɵɵpropertyInterpolate4","ɵɵpropertyInterpolate5","ɵɵpropertyInterpolate6","ɵɵpropertyInterpolate7","ɵɵpropertyInterpolate8","ɵɵpropertyInterpolateV","ɵɵtext","textNative","ɵɵtextBinding","ɵɵtextInterpolate","ɵɵtextInterpolate1","ɵɵtextInterpolate2","ɵɵtextInterpolate3","ɵɵtextInterpolate4","ɵɵtextInterpolate5","ɵɵtextInterpolate6","ɵɵtextInterpolate7","ɵɵtextInterpolate8","ɵɵtextInterpolateV","getPlayers","getPlayersInternal","players","nonFactoryPlayersStart","getComponent","loadLContextFromNode","getComponentAtNodeIndex","getContext$1","getViewComponent","loadLContext","getRootComponents","getInjector","getDirectives","throwOnNotFound","getHostElement","isBrowserEvents","listener","getListeners","listeners","firstParam","secondParam","listenerElement","callback","useCaptureOrIndx","sort","sortListeners","GLOBAL_PUBLISH_EXPANDO_KEY","_published","publishGlobalUtil","createRootComponentView","resetComponentState","createRootComponent","componentDef","hostFeatures","instantiateRootComponent","createRootContext","LifecycleHooksFeature","rootTView","dirIndex","SimpleChange","previousValue","firstChange","isFirstChange","ɵɵNgOnChangesFeature","NgOnChangesFeatureImpl","ngInherit","definition","ngOnChanges","ngOnChangesSetInput","wrapOnChanges","wrapOnChangesHook_inPreviousChangesStorage","simpleChangesStore","getSimpleChangesStore","setSimpleChangesStore","SIMPLE_CHANGES_STORE","previousChange","ɵɵInheritDefinitionFeature","superType","getSuperType","superDef","baseDef","writeableDef","maybeUnwrapEmpty","baseViewQuery","baseContentQueries","baseHostBindings","inheritHostBindings","inheritViewQuery","inheritContentQueries","superHostBindings","superViewQuery","superContentQueries","features_1","features_1_1","superPrototype","prevViewQuery","ctx","prevContentQueries","prevHostBindings","resolveProvider$1","lInjectablesBlueprint","providerFactory","beginIndex","isClassProvider","existingFactoryIndex","existingProvidersFactoryIndex","existingViewProvidersFactoryIndex","doesViewProvidersFactoryExist","multiFactory","f","componentProviders","multiFactoryAdd","multiViewProvidersFactoryResolver","multiProvidersFactoryResolver","isComponentProvider","multiResolve","factories","componentCount","multiProviders","ɵɵProvidersFeature","viewProviders","processProvidersFn","ComponentRef","ComponentFactory","noComponentFactoryError","ERROR_COMPONENT","R3ElementRef","R3TemplateRef","R3ViewContainerRef","_NullComponentFactoryResolver","resolveComponentFactory","ComponentFactoryResolver","CodegenComponentFactoryResolver","_ngModule","_factories","componentType","ComponentFactoryBoundToModule","_super","projectableNodes","rootSelectorOrNode","NgModuleRef","NgModuleFactory","ViewRef","_context","_componentIndex","_appRef","_viewContainerRef","_tViewNode","collectNativeNodes","tNodeChild","nativeNode","componentHost","currentProjectedNode","_lookUpContext","detach","storeCleanupFn","markForCheck","reattach","detectChanges","checkNoChanges","checkNoChangesInternal","attachToViewContainerRef","vcRef","detachFromAppRef","renderDetachView","attachToAppRef","appRef","RootViewRef","_view","checkNoChangesInRootView","createElementRef","ElementRefToken","ElementRef_","createTemplateRef","TemplateRefToken","TemplateRef_","_declarationParentView","elementRef","_tView","_hostLContainer","_injectorIndex","createEmbeddedView","createEmbeddedViewAndNode","viewRef","hostContainer","createViewRef","componentIndex","hostComponentView","noop","RendererStyleFlags2","ElementRef","nativeElement","SWITCH_ELEMENT_REF_FACTORY","RenderComponentType","slotCount","animations","RenderDebugInfo","Renderer","RootRenderer","RendererFactory2","Version","Renderer2","SWITCH_RENDERER2_FACTORY","VERSION","full","major","minor","patch","DefaultIterableDifferFactory","supports","trackByFn","DefaultIterableDiffer","trackByIdentity","_linkedRecords","_unlinkedRecords","_previousItHead","_itHead","_itTail","_additionsHead","_additionsTail","_movesHead","_movesTail","_removalsHead","_removalsTail","_identityChangesHead","_identityChangesTail","_trackByFn","forEachItem","_next","forEachOperation","nextIt","nextRemove","addRemoveOffset","moveOffsets","currentIndex","getPreviousIndex","adjPreviousIndex","_nextRemoved","previousIndex","localMovePreviousIndex","localCurrentIndex","forEachPreviousItem","_nextPrevious","forEachAddedItem","_nextAdded","forEachMovedItem","_nextMoved","forEachRemovedItem","forEachIdentityChange","_nextIdentityChange","diff","collection","check","_reset","itemTrackBy","mayBeDirty","index_1","trackById","_verifyReinsertion","_addIdentityChange","_mismatch","iterateListLike","_truncate","nextRecord","previousRecord","_prev","_remove","_moveAfter","_reinsertAfter","_addAfter","IterableChangeRecord_","reinsertRecord","_addToMoves","_addToRemovals","_unlink","prevRecord","prev","_prevRemoved","_insertAfter","_DuplicateMap","put","toIndex","_prevDup","_nextDup","_DuplicateItemRecordList","_head","_tail","atOrAfterIndex","duplicates","recordList","moveOffset","DefaultKeyValueDifferFactory","DefaultKeyValueDiffer","_mapHead","_appendAfter","_previousMapHead","_changesHead","_changesTail","forEachChangedItem","_nextChanged","_forEach","_maybeAddToChanges","_getOrCreateRecordForKey","_insertBeforeOrAppend","before","record_1","KeyValueChangeRecord_","_addToAdditions","_addToChanges","IterableDiffers","copied","extend","find","iterable","getTypeNameForDebugging","KeyValueDiffers","kv","ChangeDetectorRef","SWITCH_CHANGE_DETECTOR_REF_FACTORY","keyValDiff","defaultIterableDiffers","defaultKeyValueDiffers","TemplateRef","SWITCH_TEMPLATE_REF_FACTORY","ViewContainerRef","SWITCH_VIEW_CONTAINER_REF_FACTORY","expressionChangedAfterItHasBeenCheckedError","isFirstCheck","viewDebugError","err","_addDebugContext","logError","viewDestroyedError","shiftInitState","priorInitState","newInitState","initState","initIndex","shouldCallLifecycleInitHook","asTextData","asElementData","asProviderData","asPureExpressionData","asQueryList","DebugContext","Services","setCurrentNode","createRootView","createComponentView","createNgModuleRef","overrideProvider","overrideComponentView","clearOverrides","checkAndUpdateView","checkNoChangesView","destroyView","resolveDep","createDebugContext","handleEvent","updateDirectives","updateRenderer","dirtyParentQueries","NOOP","_tokenKeyCache","tokenKey","_renderCompCount$1","checkBinding","bindingIdx","oldValues","checkAndUpdateBinding","checkBindingNoChanges","bindings","markParentViewsForCheck","currView","viewContainerParent","markParentViewsForCheckProjectedViews","endView","dispatchEvent","event","root","declaredViewContainer","parentNodeDef","viewParentEl","renderNode","renderElement","renderText","isComponentView","isEmbeddedView","filterQueryId","queryId","splitMatchedQueriesDsl","matchedQueriesDsl","matchedQueries","matchedQueryIds","references","valueType","splitDepsDsl","sourceName","getParentRenderElement","renderHost","componentRendererType","DEFINITION_CACHE","WeakMap","resolveDefinition","visitRootRenderNodes","lastRenderRootNode","visitSiblingRenderNodes","nodeDef","visitRenderNode","childCount","visitProjectedRenderNodes","ngContentIndex","compView","hostElDef","projectedNodes","execRenderNodeAction","ngContent","rn","bindingFlags","embeddedViews","viewContainer","_embeddedViews","NS_PREFIX_RE","splitNamespace","calcBindingFlags","_toStringWithNull","UNDEFINED_VALUE","InjectorRefTokenKey","INJECTORRefTokenKey","NgModuleRefTokenKey","resolveNgModuleDep","depDef","tokenKey_1","providerDef","_def","providersByKey","providerInstance","_createProviderInstance","targetsModule","moduleTransitivelyPresent","modules","injectable","_createClass","depValues","_callFactory","detachEmbeddedView","elementData","removeFromArray","renderDetachView$1","renderAttachEmbeddedView","prevView","prevRenderNode","addToArray","pop","EMPTY_CONTEXT","getComponentViewDefinitionFactory","componentFactory","viewDefFactory","ComponentFactory_","_inputs","_outputs","inputsArr","templateName","outputsArr","viewDef","componentNodeIndex","componentProvider","ComponentRef_","ViewRef_","_viewRef","_component","_elDef","changeDetectorRef","Injector_","createViewContainerData","elDef","elData","ViewContainerRef_","templateRef","insert","createComponent","ngModuleRef","contextInjector","parentInjector","componentRef","viewRef_","attachEmbeddedView","attachProjectedView","vcElementData","dvcElementData","projectedViews","_projectedViews","markNodeAsProjectedTemplate","nodeFlags","childFlags","move","moveEmbeddedView","oldViewIndex","newViewIndex","createChangeDetectorRef","rootRenderNodes","renderNodes","fs","disposables","createTemplateData","_parentView","createInjector$1","createRendererV1","RendererAdapter","delegate","selectorOrNode","namespaceAndName","createViewRoot","createTemplateAnchor","parentElement","projectNodes","attachViewAfter","viewRootNodes","viewAllNodes","listenGlobal","setElementProperty","propertyName","propertyValue","setElementAttribute","attributeValue","ns","setBindingDebugInfo","setElementClass","isAdd","setElementStyle","styleName","styleValue","invokeElementMethod","methodName","setText","animate","moduleType","bootstrapComponents","NgModuleRef_","_moduleType","_bootstrapComponents","_destroyListeners","initNgModule","provDef","injectFlags","callNgModuleLifecycle","lifecycles","RendererV1TokenKey","Renderer2TokenKey","ElementRefTokenKey","ViewContainerRefTokenKey","TemplateRefTokenKey","ChangeDetectorRefTokenKey","InjectorRefTokenKey$1","INJECTORRefTokenKey$1","checkIndex","depDefs","outputIndex","directChildFlags","childMatchedQueries","query","createProviderInstance","_createProviderInstance$1","createPipeInstance","createClass","createDirectiveInstance","output","outputObservable","eventHandlerClosure","allowPrivateServices","callFactory","NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","searchView","findCompView","providerDef_1","allProviders","publicProviders","providerData","updateProp","changes","nonMinifiedName","callLifecycleHooksChildrenFirst","callProviderLifecycles","callElementProvidersLifecycles","ComponentFactoryResolver$1","ComponentFactory$1","toRefArray","array","nonMinified","LocaleDataIndex","ROOT_CONTEXT","SCHEDULER","isBoundToModule","isInternalRootView","rootViewInjector","createChainedInjector","hostRNode","rootFlags","isIsolated","tElementNode","rootLView","oldLView","nodesforSlot","ComponentRef$1","_rootLView","destroyCbs","LOCALE_DATA","ɵLocaleDataIndex","u","localeEn","plural","floor","abs","getLocalePluralCase","locale","findLocaleData","PluralCase","normalizedLocale","parentLocale","addAllToArray","items","flatten","dst","MARKER","ICU_BLOCK_REGEXP","SUBTEMPLATE_REGEXP","PH_REGEXP","BINDING_REGEXP","ICU_REGEXP","ROOT_TEMPLATE_ID","PP_MULTI_VALUE_PLACEHOLDERS_REGEXP","PP_PLACEHOLDERS_REGEXP","PP_ICU_VARS_REGEXP","PP_ICUS_REGEXP","PP_CLOSE_TEMPLATE_REGEXP","PP_TEMPLATE_ID_REGEXP","extractParts","pattern","prevPos","braceStack","braces","lastIndex","exec","pos","block","parseICUBlock","substring_1","cases","icuType","mainBinding","binding","parseInt","blocks","assertGreaterThan","expected","removeInnerTemplateTranslation","tagMatched","inTemplate","generateBindingUpdateOpCodes","destinationNode","updateOpCodes","textParts","textValue","toMaskBit","getBindingMask","icuExpression","valueArr","i18nIndexStack","i18nIndexStackPointer","min","i18nVarsCount","parentIndexStack","ɵɵi18nStart","subTemplateIndex","i18nStartFirstPass","parentIndexPointer","createOpCodes","icuExpressions","msgParts","getTranslationForTemplate","search","phIndex","icuNodeIndex","icuStart","hasBinding","textNodeIndex","allocExpando","numSlotsToAlloc","update","appendI18nNode","previousTNode","ɵɵi18nPostprocess","replacements","matches_1","templateIdsStack_1","phs","tmpl","placeholders","placeholder","templateId","isCloseTemplateTag","currentTemplateId","_idx","shift","ɵɵi18nEnd","i18nEndFirstPass","rootIndex","tI18n","lastCreatedNode","visitedNodes","readCreateOpCodes","removeNode","createDynamicNodeAtIndex","currentTNode","textRNode","destinationNodeIndex","elementNodeIndex","commentNodeIndex","commentRNode","activeCaseIndex","tagNameValue","removedPhTNode","removedPhRNode","ɵɵi18n","ɵɵi18nAttributes","i18nAttributesFirstPass","previousElementIndex","changeMask","shiftsCounter","ɵɵi18nExp","ɵɵi18nApply","readUpdateOpCodes","bindingsStartIndex","bypassCheckBit","caseCreated","icuTNode","removeCodes","removeOpCode","activeIndex","caseIndex","getCaseIndex","resolvedCase","getPluralCase","getLocaleId","LOCALE_ID","tIcus","createCodes","updateCodes","childIcus","nestedIcus","icuIndex","icuCase","parseIcuCase","opCodes","parseNodes","currentNode","nestedIcusToCreate","lowerAttrName","COMMENT_NODE","NESTED_ICU","nestedIcuIndex","ngDevMode","nestedIcu","nestedIcuNodeIndex","nestTIcuIndex","TRANSLATIONS","LOCALIZE_PH_REGEXP","ɵɵi18nLocalize","setLocaleId","localeId","assertSameOrNotExisting","incoming","registerNgModuleType","getRegisteredNgModuleType","COMPONENT_FACTORY_RESOLVER","NgModuleRef$1","getNgLocaleIdDef","_r3Injector","NgModuleFactory$1","ɵɵpureFunction0","slotOffset","pureFn","thisArg","ɵɵpureFunction1","exp","ɵɵpureFunction2","ɵɵpureFunction3","ɵɵpureFunction4","ɵɵpureFunction5","exp5","ɵɵpureFunction6","exp6","ɵɵpureFunction7","exp7","ɵɵpureFunction8","exp8","ɵɵpureFunctionV","exps","ɵɵpipe","pipeName","getPipeDef$1","pipeInstance","ɵɵpipeBind1","unwrapValue$1","isPure","transform","ɵɵpipeBind2","ɵɵpipeBind3","ɵɵpipeBind4","ɵɵpipeBindV","EventEmitter","isAsync","__isAsync","emit","generatorOrNext","complete","schedulerFn","errorFn","completeFn","sink","Subscription","Subject","symbolIterator","_results","QueryList","symbol","proto","filter","reduce","init","toArray","reset","resultsTree","last","notifyOnChanges","LQuery","predicate","containerValues","LQueries_","shallow","deep","track","queryList","descend","read","createLQuery","shallowResults","copyQueriesToContainer","deepResults","copyQueriesToView","insertView$1","removeView$1","viewValuesIdx","getIdxOfMatchingSelector","queryByReadToken","matchingIdx","queryByTemplateRef","templateRefToken","templateRefResult","queryRead","queryByTNodeType","insertBeforeContainer","addMatch","matchingValue","insertBeforeViewMatches","createPredicate","_valuesTree","createQueryListInLView","isStatic","_static","storeCleanupWithContext","ɵɵqueryRefresh","queryListImpl","ɵɵstaticViewQuery","viewQueryInternal","ɵɵviewQuery","ɵɵloadViewQuery","ɵɵcontentQuery","contentQueryInternal","contentQuery","tViewContentQueries","ɵɵstaticContentQuery","ɵɵloadContentQuery","ɵɵtemplateRefExtractor","angularCoreEnv","ɵɵstyleSanitizer","EMPTY_ARRAY$4","moduleQueue","flushingModuleQueue","flushModuleScopingQueueAsMuchAsPossible","every","isResolvedDeclaration","setScopeOnDeclaredComponents","declaration","compileNgModule","compileNgModuleDefs","enqueueModuleForDelayedScoping","allowDuplicateDeclarationsInRoot","expandModuleWithProviders","emitInline","compileInjector","transitiveScopes","transitiveScopesFor","patchComponentDefWithScope","ngSelectorScope","compilation","dir","pipe","processNgModuleFn","isNgModule","scopes","exported","declared","importedType","importedScope","entry","exportedType","exportedScope","isModuleWithProviders","compileComponent","maybeQueueResolutionOfComponentResources","directiveMetadata","typeSourceSpan","createParseSourceSpan","preserveWhitespaces","interpolation","usesInheritance","addBaseDefToUndecoratedParents","hasSelectorScope","compileDirective","sourceMapUrl","facade","extendsDirectlyFromObject","extractQueriesMetadata","isContentQuery","lifecycle","usesOnChanges","part","viewQueries","objPrototype","extractBaseDefMetadata","compileBase","hasHostDecorators","field","ann","metadataName","bindingPropertyName","isQueryAnn","queriesMeta","_loop_2","annotations_1","isInputAnn","convertToR3QueryMetadata","splitByComma","piece","static","compilePipe","typeName","Directive","SWITCH_COMPILE_DIRECTIVE","Component","SWITCH_COMPILE_COMPONENT","Pipe","SWITCH_COMPILE_PIPE","Input","Output","HostBinding","hostPropertyName","HostListener","SWITCH_COMPILE_COMPONENT__POST_R3__","SWITCH_COMPILE_DIRECTIVE__POST_R3__","SWITCH_COMPILE_PIPE__POST_R3__","NgModule","SWITCH_COMPILE_NGMODULE","SWITCH_COMPILE_NGMODULE__POST_R3__","preR3NgModuleCompile","APP_INITIALIZER","ApplicationInitStatus","appInits","initialized","donePromise","rej","reject","runInitializers","asyncInitPromises","initResult","catch","APP_ID","_appIdRandomProviderFactory","_randomChar","APP_ID_RANDOM_PROVIDER","fromCharCode","random","MissingTranslationStrategy","PLATFORM_INITIALIZER","PLATFORM_ID","APP_BOOTSTRAP_LISTENER","PACKAGE_ROOT_URL","Console","log","LOCALE_ID$1","TRANSLATIONS$1","TRANSLATIONS_FORMAT","ModuleWithComponentFactories","ngModuleFactory","componentFactories","_throwError","trace","events","Compiler_compileModuleSync__POST_R3__","Compiler_compileModuleSync","Compiler_compileModuleAsync","Compiler_compileModuleAndAllComponentsSync__POST_R3__","Compiler_compileModuleAndAllComponentsSync","Compiler_compileModuleAndAllComponentsAsync","Compiler","compileModuleSync","compileModuleAsync","compileModuleAndAllComponentsSync","compileModuleAndAllComponentsAsync","clearCache","clearCacheFor","getModuleId","COMPILER_OPTIONS","CompilerFactory","detectWTF","wtf","createScope","leave","leaveScope","startTimeRange","rangeType","beginTimeRange","endTimeRange","range","wtfEnabled","noopScope","arg0","arg1","wtfCreateScope","wtfLeave","wtfStartTimeRange","wtfEndTimeRange","scheduleMicroTask","Zone","NgZone","enableLongStackTrace","hasPendingMicrotasks","hasPendingMacrotasks","isStable","onUnstable","onMicrotaskEmpty","onStable","onError","assertZonePatched","_nesting","_outer","_inner","fork","forkInnerZoneWithAngularBehavior","zone","properties","isAngularZone","onInvokeTask","task","applyThis","applyArgs","onEnter","invokeTask","onLeave","onInvoke","invoke","onHasTask","hasTaskState","hasTask","change","microTask","checkStable","macroTask","onHandleError","runOutsideAngular","isInAngularZone","assertInAngularZone","assertNotInAngularZone","run","runTask","scheduleEventTask","EMPTY_PAYLOAD","noop$1","cancelTask","runGuarded","_platform","NoopNgZone","Testability","_ngZone","_pendingCount","_isZoneStable","_didWork","_callbacks","taskTrackingZone","_watchAngularEvents","_runCallbacksIfReady","increasePendingRequestCount","decreasePendingRequestCount","cb","clearTimeout","timeoutId","doneCb","pending_1","getPendingTasks","updateCb","macroTasks","creationLocation","addCallback","timeout","whenStable","getPendingRequestCount","findProviders","using","exactMatch","TestabilityRegistry","_applications","_testabilityGetter","addToWindow","registerApplication","testability","unregisterApplication","unregisterAllApplications","getTestability","elem","getAllTestabilities","getAllRootElements","findTestabilityInTree","findInAncestors","_NoopGetTestability","ALLOW_MULTIPLE_PLATFORMS","NgProbeToken","createPlatform","PlatformRef","inits","createPlatformFactory","parentPlatformFactory","extraProviders","platform","getPlatform","injectedProviders","assertPlatform","requiredToken","_injector","_modules","bootstrapModuleFactory","moduleFactory","ngZone","getNgZone","ngZoneOption","ngZoneInjector","moduleRef","exceptionHandler","_callAndReportToErrorHandler","initStatus","_moduleDoBootstrap","bootstrapModule","compilerOptions","optionsReducer","compileNgModuleFactory__PRE_R3__","createCompiler","compileNgModuleFactory","ApplicationRef","ngDoBootstrap","_zone","_exceptionHandler","_componentFactoryResolver","_initStatus","_bootstrapListeners","_views","_runningTick","_enforceNoNewChanges","_stable","componentTypes","tick","isCurrentlyStable","Observable","observer","stableSub","unstableSub","share","ApplicationRef_1","componentOrFactory","isBoundToModule__PRE_R3__","cf","compRef","_unloadComponent","_loadComponent","_tickScope","_d","_e","_f","attachView","NgModuleFactoryLoader","getModuleFactory__PRE_R3__","noModuleError","getModuleFactory","SystemJsNgModuleLoaderConfig","DEFAULT_CONFIG","factoryPathPrefix","factoryPathSuffix","SystemJsNgModuleLoader","_compiler","_config","load","path","loadFactory","loadAndCompile","exportName","System","import","checkNotEmpty","factoryClassSuffix","modulePath","ViewRef$1","EmbeddedViewRef","DebugEventListener","DebugNode__PRE_R3__","_debugContext","DebugElement__PRE_R3__","addChild","providerTokens","childNodes","childIndex","insertChildrenAfter","newChildren","siblingIndex","refChild","newChild","refIndex","queryAll","_queryElementChildren","queryAllNodes","_queryNodeChildren","triggerEventHandler","eventObj","DebugNode__POST_R3__","DebugElement__POST_R3__","getLocalRefs","discoverLocalRefs","getInjectionTokens","collectPropertyBindings","getFirstBindingIndex","metadataIndex","currentBindingIndex","metadataParts","hostProperties","collectHostPropertyBindings","hostPropIndex","collectClassNames","debugElement","tNodeAttrs","lowercaseTNodeAttrs","eAttrs","lContext","eClasses","eStyles","getPropertyValue","children","getDebugNode__POST_R3__","_queryAllR3","elementsOnly","_queryNodeChildrenR3","rootNativeNode","_addQueryMatchR3","_queryNodeChildrenInContainerR3","head","head_1","head_1_1","nextTNode","nextLView","childView","debugNode","getDebugNode","_nativeNodeToDebugNode","NG_DEBUG_PROPERTY","getDebugNode__PRE_R3__","indexDebugNode","DebugNode","DebugElement","platformCore","_iterableDiffersFactory","_keyValueDiffersFactory","_localeFactory","APPLICATION_MODULE_PROVIDERS","zoneSchedulerFactory","queue","ViewAction","ApplicationModule","parentEl","listenToElementOutputs","handleEventClosure","renderEventHandlerClosure","listenTarget","listenerView","disposable","checkAndUpdateElementValue","securityContext","renderValue","unit","queryIds","nodeMatchedQueries","tplDef","filterId","checkAndUpdateQuery","elementDef","calcQueryValues","notify","boundValue","bindingType","queryDef","getQueryValue","dvc","queryValueType","appendNgContent","_pureExpressionDef","propertyNames","_addInterpolationPart","isNgContainer","validateNode","nodeCount","parentEnd","anchorDef","initView","createViewNodes","compRenderer","outputCount","bindingCount","nodeData","compViewDef","execComponentViewsAction","CreateViewNodes","execQueriesAction","markProjectedViewsForCheck","execEmbeddedViewsAction","CheckNoChanges","CheckAndUpdate","callInit","checkAndUpdateNode","argStyle","v8","v9","checkAndUpdateNodeInline","checkAndUpdateElementInline","bindLen","checkAndUpdateTextInline","checkAndUpdateDirectiveInline","checkAndUpdatePureExpressionInline","checkAndUpdateNodeDynamic","checkAndUpdateElementDynamic","checkAndUpdateTextDynamic","checkAndUpdateDirectiveDynamic","checkAndUpdatePureExpressionDynamic","checkNoChangesNode","checkNoChangesNodeInline","checkNoChangesNodeDynamic","checkNoChangesQuery","Destroy","detachProjectedView","destroyViewNodes","callViewAction","viewState","execProjectedViewsAction","CheckNoChangesProjectedViews","CheckAndUpdateProjectedViews","queryFlags","staticDynamicQueryFlag","checkType","initServicesIfNeeded","services","createDebugServices","debugSetCurrentNode","debugCreateRootView","debugCreateEmbeddedView","debugCreateComponentView","debugCreateNgModuleRef","debugOverrideProvider","debugOverrideComponentView","debugClearOverrides","debugCheckAndUpdateView","debugCheckNoChangesView","debugDestroyView","DebugContext_","debugHandleEvent","debugUpdateDirectives","debugUpdateRenderer","createProdServices","createProdRootView","prodCheckAndUpdateNode","prodCheckNoChangesNode","elInjector","createRootData","DebugRendererFactory2","defWithOverride","applyProviderOverridesToView","callWithDebugContext","DebugAction","viewDefOverrides","applyProviderOverridesToNgModule","calcHasOverrides","hasOverrides","hasDeprecatedOverrides","providerOverrides","override","deprecatedBehavior","providerOverridesWithScope","applyProviderOverrides","moduleSet_1","_currentAction","_currentView","_currentNodeIndex","comp","compFactory","hostViewDef","elementIndicesWithOverwrittenProviders","findElementIndicesWithOverwrittenProviders","elIndicesWithOverwrittenProviders","lastElementDef","applyProviderOverridesToElement","elIndex","nextDirectiveWithBinding","debugCheckDirectivesFn","debugCheckAndUpdateNode","debugCheckNoChangesNode","nextRenderNodeWithBinding","debugCheckRenderNodeFn","givenValues","bindingValues","camelCaseToDashCase","elView","elOrCompView","childDef","collectReferences","findHostElement","logViewDef","logNodeIndex","renderNodeIndex","getRenderNodeIndex","currRenderNodeIndex","refName","oldAction","oldNodeIndex","isViewDebugError","viewWrappedDebugError","getCurrentDebugContext","renderData","DebugRenderer2","whenRenderingDone","debugContextFactory","removeDebugNodeFromIndex","debugCtx","debugEl","debugChildEl","debugRefEl","oldChild","preserveContent","NgModuleFactory_","_ngModuleDefFactory","cloneNgModuleDefinition","ɵangular_packages_core_core_r","ɵangular_packages_core_core_o","ɵangular_packages_core_core_p","ɵangular_packages_core_core_q","ɵangular_packages_core_core_s","ɵangular_packages_core_core_f","ɵangular_packages_core_core_m","ɵangular_packages_core_core_n","ɵangular_packages_core_core_l","ɵangular_packages_core_core_k","ɵangular_packages_core_core_b","ɵangular_packages_core_core_a","ɵangular_packages_core_core_c","ɵangular_packages_core_core_d","ɵangular_packages_core_core_e","ɵangular_packages_core_core_j","ɵangular_packages_core_core_t","ɵangular_packages_core_core_v","ɵangular_packages_core_core_u","ɵangular_packages_core_core_y","ɵangular_packages_core_core_w","ɵangular_packages_core_core_x","ɵangular_packages_core_core_bb","ɵangular_packages_core_core_bc","ɵangular_packages_core_core_bd","ɵangular_packages_core_core_be","ɵangular_packages_core_core_bf","ɵangular_packages_core_core_bj","ɵangular_packages_core_core_bp","ɵangular_packages_core_core_bo","ɵangular_packages_core_core_g","ɵangular_packages_core_core_h","ɵangular_packages_core_core_i","ɵangular_packages_core_core_bh","ɵangular_packages_core_core_bn","ɵangular_packages_core_core_bk","ɵangular_packages_core_core_bl","ɵangular_packages_core_core_bq","ɵangular_packages_core_core_z","ɵangular_packages_core_core_ba","destroyPlatform","enableProdMode","asNativeElements","debugEls","setTestabilityGetter","CUSTOM_ELEMENTS_SCHEMA","NO_ERRORS_SCHEMA","ɵNoopNgZone","ɵComponentFactory","ɵALLOW_MULTIPLE_PLATFORMS","ɵAPP_ID_RANDOM_PROVIDER","ɵdefaultIterableDiffers","ɵdefaultKeyValueDiffers","ɵdevModeEqual","ɵisListLikeIterable","ɵisDefaultChangeDetectionStrategy","isDefaultChangeDetectionStrategy","changeDetectionStrategy","ɵConsole","ɵsetCurrentInjector","ɵgetInjectableDef","ɵAPP_ROOT","ɵivyEnabled","ɵCodegenComponentFactoryResolver","ɵclearResolutionOfComponentResourcesQueue","ɵresolveComponentResources","ɵReflectionCapabilities","ɵRenderDebugInfo","ɵ_sanitizeHtml","ɵ_sanitizeStyle","ɵ_sanitizeUrl","ɵglobal","ɵlooseIdentical","ɵstringify","ɵmakeDecorator","ɵisObservable","ɵisPromise","ɵclearOverrides","ɵinitServicesIfNeeded","ɵoverrideComponentView","ɵoverrideProvider","ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","ɵgetLocalePluralCase","ɵfindLocaleData","ɵLOCALE_DATA","ɵdetectChanges","ɵrenderComponent","renderComponent","ɵRender3ComponentFactory","ɵRender3ComponentRef","ɵLifecycleHooksFeature","ɵRender3NgModuleRef","ɵmarkDirty","ɵNgModuleFactory","ɵNO_CHANGE","ɵgetDirectives","ɵgetHostElement","ɵstore","ɵwhenRendered","whenRendered","ɵi18nConfigureLocalize","i18nConfigureLocalize","translations","ɵsetLocaleId","ɵDEFAULT_LOCALE_ID","ɵsetClassMetadata","setClassMetadata","clazz","parentPrototype","parentConstructor","ɵcompileComponent","ɵcompileDirective","ɵcompileNgModule","ɵcompileNgModuleDefs","ɵpatchComponentDefWithScope","ɵresetCompiledComponents","resetCompiledComponents","ɵflushModuleScopingQueueAsMuchAsPossible","ɵtransitiveScopesFor","ɵcompilePipe","ɵbypassSanitizationTrustHtml","bypassSanitizationTrustHtml","trustedHtml","ɵbypassSanitizationTrustStyle","bypassSanitizationTrustStyle","trustedStyle","ɵbypassSanitizationTrustScript","bypassSanitizationTrustScript","trustedScript","ɵbypassSanitizationTrustUrl","bypassSanitizationTrustUrl","trustedUrl","ɵbypassSanitizationTrustResourceUrl","bypassSanitizationTrustResourceUrl","trustedResourceUrl","ɵgetLContext","ɵNG_ELEMENT_ID","ɵNG_COMPONENT_DEF","ɵNG_DIRECTIVE_DEF","ɵNG_PIPE_DEF","ɵNG_MODULE_DEF","ɵNG_BASE_DEF","ɵNG_INJECTABLE_DEF","ɵNG_INJECTOR_DEF","ɵbindPlayerFactory","bindPlayerFactory","ɵaddPlayer","addPlayer","getOrCreatePlayerContext","ɵgetPlayers","ɵcompileNgModuleFactory__POST_R3__","compileNgModuleFactory__POST_R3__","isComponentResourceResolutionQueueEmpty","compilerProviders","_mergeArrays","resourceLoader","ResourceLoader","ɵisBoundToModule__POST_R3__","isBoundToModule__POST_R3__","ɵSWITCH_COMPILE_COMPONENT__POST_R3__","ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__","ɵSWITCH_COMPILE_PIPE__POST_R3__","ɵSWITCH_COMPILE_NGMODULE__POST_R3__","ɵgetDebugNode__POST_R3__","ɵSWITCH_COMPILE_INJECTABLE__POST_R3__","ɵSWITCH_IVY_ENABLED__POST_R3__","ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__","injectChangeDetectorRef","ɵCompiler_compileModuleSync__POST_R3__","ɵCompiler_compileModuleAsync__POST_R3__","ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__","ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__","ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__","injectElementRef","ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__","injectTemplateRef","ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__","injectViewContainerRef","ViewContainerRefToken","createContainerRef","_lContainer","_hostTNode","_hostView","getParentInjectorTNode","startTNode","parentTNode_1","viewAmount","allocateContainerIfNeeded","adjustedIdx","_adjustIndex","commentNode","nativeNextSibling","ɵSWITCH_RENDERER2_FACTORY__POST_R3__","injectRenderer2","nodeAtIndex","getOrCreateRenderer2","ɵgetModuleFactory__POST_R3__","getModuleFactory__POST_R3__","ɵregisterNgModuleType","ɵpublishGlobalUtil","ɵpublishDefaultGlobalUtils","publishDefaultGlobalUtils","ɵcreateInjector","ɵINJECTOR_IMPL__POST_R3__","INJECTOR_IMPL__POST_R3__","ɵregisterModuleFactory","registerModuleFactory","ɵEMPTY_ARRAY","ɵEMPTY_MAP","ɵand","templateFactory","ɵccf","createComponentFactory","ɵcmf","createNgModuleFactory","defFactory","ɵcrt","createRendererType2","ɵdid","outputDefs","ɵeld","fixedAttrs","bindingDefs","suffixOrSecurityContext","ns_1","resolveRendererType2","isFilled","None","ɵgetComponentViewDefinitionFactory","ɵinlineInterpolate","inlineInterpolate","valueCount","c0","a1","c1","a2","c2","a3","c3","a4","c4","a5","c5","a6","c6","a7","c7","a8","c8","a9","c9","ɵinterpolate","interpolate","constAndInterp","ɵmod","moduleDef","ɵmpd","moduleProvideDef","ɵncd","ngContentDef","ɵnov","ɵpid","ɵprd","ɵpad","pureArrayDef","argCount","ɵpod","pureObjectDef","propToIndex","nbKeys","ɵppd","purePipeDef","ɵqud","ɵted","textDef","staticText","ɵunv","unwrapValue","nodeIdx","globalBindingIdx","ɵvid","viewBindingCount","viewDisposableCount","viewNodeFlags","viewRootNodeFlags","viewMatchedQueries","currentParent","currentRenderParent","currentElementHasPublicProviders","currentElementHasPrivateProviders","newParent","rootNodeFlags"],"mappings":";;;;;CAMC,SAAUA,EAAQC,GACI,iBAAZC,SAA0C,oBAAXC,OAAyBF,EAAQC,QAASE,QAAQ,QAASA,QAAQ,mBACvF,mBAAXC,QAAyBA,OAAOC,IAAMD,OAAO,gBAAiB,CAAC,UAAW,OAAQ,kBAAmBJ,GAClFA,IAAzBD,EAASA,GAAUO,MAAsBC,GAAKR,EAAOQ,IAAM,GAAIR,EAAOQ,GAAGC,KAAO,IAAKT,EAAOU,KAAMV,EAAOU,KAAKC,WAHnH,CAIEC,KAAM,SAAUV,EAASQ,EAAMC,GAAa,aAkB1C,IAAIE,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,IAG5B,SAASO,EAAUR,EAAGC,GAElB,SAASQ,IAAOX,KAAKY,YAAcV,EADnCD,EAAcC,EAAGC,GAEjBD,EAAEW,UAAkB,OAANV,EAAaC,OAAOU,OAAOX,IAAMQ,EAAGE,UAAYV,EAAEU,UAAW,IAAIF,GAGnF,IAAII,EAAW,WAQX,OAPAA,EAAWX,OAAOY,QAAU,SAASD,EAASE,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAIX,KADTU,EAAIG,UAAUF,GACOf,OAAOS,UAAUJ,eA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BI,IAEK/a,GAAc2a,GACTA,EAAc7+D,aAGd6+D,GAQtC,MAAO,CAEHlxH,QAAS,KACTyiF,UAAWsuC,EACXQ,cAAeP,EACf1b,mBAAoB2b,EAAoBrlH,MAAOA,EAC/Cu0C,MAAOA,EACPg6B,iBAAkBA,GAAoBG,GACtCF,eAAgBA,GAAkBE,GAAMJ,YAX1B,SAAUntD,EAAMG,EAAW4zC,EAAWwa,GACpD,OAAOn7B,EAAMjzB,GAAWhD,QAAQgwD,YAAYntD,EAAM+zC,EAAWwa,IAW7D07B,aAAc6Z,EACd9Z,YAAa+Z,EAAqB7zC,mBAAoBA,IAkvD9Dl8E,OAAO+B,eAAe7C,EAAS,aAAc,CAAE2D,OAAO","sourcesContent":["/**\n * @license Angular v8.1.1\n * (c) 2010-2019 Google LLC. https://angular.io/\n * License: MIT\n */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('rxjs/operators')) :\n typeof define === 'function' && define.amd ? define('@angular/core', ['exports', 'rxjs', 'rxjs/operators'], factory) :\n (global = global || self, factory((global.ng = global.ng || {}, global.ng.core = {}), global.rxjs, global.rxjs.operators));\n}(this, function (exports, rxjs, operators) { 'use strict';\n\n /*! *****************************************************************************\r\n Copyright (c) Microsoft Corporation. All rights reserved.\r\n Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\n this file except in compliance with the License. You may obtain a copy of the\r\n License at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\n WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\n MERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\n See the Apache Version 2.0 License for specific language governing permissions\r\n and limitations under the License.\r\n ***************************************************************************** */\r\n /* global Reflect, Promise */\r\n\r\n var extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n\r\n function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n }\r\n\r\n var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n };\r\n\r\n function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n }\r\n\r\n function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n }\r\n\r\n function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n }\r\n\r\n function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n }\r\n\r\n function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n }\r\n\r\n function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var ANNOTATIONS = '__annotations__';\n var PARAMETERS = '__parameters__';\n var PROP_METADATA = '__prop__metadata__';\n /**\n * @suppress {globalThis}\n */\n function makeDecorator(name, props, parentClass, additionalProcessing, typeFn) {\n var metaCtor = makeMetadataCtor(props);\n function DecoratorFactory() {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this instanceof DecoratorFactory) {\n metaCtor.call.apply(metaCtor, __spread([this], args));\n return this;\n }\n var annotationInstance = new ((_a = DecoratorFactory).bind.apply(_a, __spread([void 0], args)))();\n return function TypeDecorator(cls) {\n if (typeFn)\n typeFn.apply(void 0, __spread([cls], args));\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n var annotations = cls.hasOwnProperty(ANNOTATIONS) ?\n cls[ANNOTATIONS] :\n Object.defineProperty(cls, ANNOTATIONS, { value: [] })[ANNOTATIONS];\n annotations.push(annotationInstance);\n if (additionalProcessing)\n additionalProcessing(cls);\n return cls;\n };\n }\n if (parentClass) {\n DecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n DecoratorFactory.prototype.ngMetadataName = name;\n DecoratorFactory.annotationCls = DecoratorFactory;\n return DecoratorFactory;\n }\n function makeMetadataCtor(props) {\n return function ctor() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (props) {\n var values = props.apply(void 0, __spread(args));\n for (var propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n }\n function makeParamDecorator(name, props, parentClass) {\n var metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory() {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n var annotationInstance = new ((_a = ParamDecoratorFactory).bind.apply(_a, __spread([void 0], args)))();\n ParamDecorator.annotation = annotationInstance;\n return ParamDecorator;\n function ParamDecorator(cls, unusedKey, index) {\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n var parameters = cls.hasOwnProperty(PARAMETERS) ?\n cls[PARAMETERS] :\n Object.defineProperty(cls, PARAMETERS, { value: [] })[PARAMETERS];\n // there might be gaps if some in between parameters do not have annotations.\n // we pad with nulls.\n while (parameters.length <= index) {\n parameters.push(null);\n }\n (parameters[index] = parameters[index] || []).push(annotationInstance);\n return cls;\n }\n }\n if (parentClass) {\n ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n ParamDecoratorFactory.prototype.ngMetadataName = name;\n ParamDecoratorFactory.annotationCls = ParamDecoratorFactory;\n return ParamDecoratorFactory;\n }\n function makePropDecorator(name, props, parentClass, additionalProcessing) {\n var metaCtor = makeMetadataCtor(props);\n function PropDecoratorFactory() {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n var decoratorInstance = new ((_a = PropDecoratorFactory).bind.apply(_a, __spread([void 0], args)))();\n function PropDecorator(target, name) {\n var constructor = target.constructor;\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n var meta = constructor.hasOwnProperty(PROP_METADATA) ?\n constructor[PROP_METADATA] :\n Object.defineProperty(constructor, PROP_METADATA, { value: {} })[PROP_METADATA];\n meta[name] = meta.hasOwnProperty(name) && meta[name] || [];\n meta[name].unshift(decoratorInstance);\n if (additionalProcessing)\n additionalProcessing.apply(void 0, __spread([target, name], args));\n }\n return PropDecorator;\n }\n if (parentClass) {\n PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n PropDecoratorFactory.prototype.ngMetadataName = name;\n PropDecoratorFactory.annotationCls = PropDecoratorFactory;\n return PropDecoratorFactory;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var ɵ0 = function (token) { return ({ token: token }); };\n /**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var Inject = makeParamDecorator('Inject', ɵ0);\n /**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var Optional = makeParamDecorator('Optional');\n /**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var Self = makeParamDecorator('Self');\n /**\n * SkipSelf decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var SkipSelf = makeParamDecorator('SkipSelf');\n /**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var Host = makeParamDecorator('Host');\n var ɵ1 = function (attributeName) { return ({ attributeName: attributeName }); };\n /**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var Attribute = makeParamDecorator('Attribute', ɵ1);\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n (function (InjectFlags) {\n // TODO(alxhub): make this 'const' when ngc no longer writes exports of it into ngfactory files.\n /** Check self and check parent injector if needed */\n InjectFlags[InjectFlags[\"Default\"] = 0] = \"Default\";\n /**\n * Specifies that an injector should retrieve a dependency from any injector until reaching the\n * host element of the current component. (Only used with Element Injector)\n */\n InjectFlags[InjectFlags[\"Host\"] = 1] = \"Host\";\n /** Don't ascend to ancestors of the node requesting injection. */\n InjectFlags[InjectFlags[\"Self\"] = 2] = \"Self\";\n /** Skip the node that is requesting injection. */\n InjectFlags[InjectFlags[\"SkipSelf\"] = 4] = \"SkipSelf\";\n /** Inject `defaultValue` instead if token not found. */\n InjectFlags[InjectFlags[\"Optional\"] = 8] = \"Optional\";\n })(exports.InjectFlags || (exports.InjectFlags = {}));\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function getClosureSafeProperty(objWithPropertyToExtract) {\n for (var key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === getClosureSafeProperty) {\n return key;\n }\n }\n throw Error('Could not find renamed property on target object.');\n }\n /**\n * Sets properties on a target object from a source object, but only if\n * the property doesn't already exist on the target object.\n * @param target The target to set properties on\n * @param source The source of the property keys and values to set\n */\n function fillProperties(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Construct an `InjectableDef` which defines how a token will be constructed by the DI system, and\n * in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ngInjectableDef` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n * provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n * The factory can call `inject` to access the `Injector` and request injection of dependencies.\n *\n * @codeGenApi\n */\n function ɵɵdefineInjectable(opts) {\n return {\n token: opts.token, providedIn: opts.providedIn || null, factory: opts.factory,\n value: undefined,\n };\n }\n /**\n * @deprecated in v8, delete after v10. This API should be used only be generated code, and that\n * code should now use ɵɵdefineInjectable instead.\n * @publicApi\n */\n var defineInjectable = ɵɵdefineInjectable;\n /**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static `ngInjectorDef` field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `factory`: an `InjectorType` is an instantiable type, so a zero argument `factory` function to\n * create the type must be provided. If that factory function needs to inject arguments, it can\n * use the `inject` function.\n * * `providers`: an optional array of providers to add to the injector. Each provider must\n * either have a factory or point to a type which has an `ngInjectableDef` static property (the\n * type must be an `InjectableType`).\n * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s\n * whose providers will also be added to the injector. Locally provided types will override\n * providers from imports.\n *\n * @publicApi\n */\n function ɵɵdefineInjector(options) {\n return {\n factory: options.factory, providers: options.providers || [], imports: options.imports || [],\n };\n }\n /**\n * Read the `ngInjectableDef` for `type` in a way which is immune to accidentally reading inherited\n * value.\n *\n * @param type A type which may have its own (non-inherited) `ngInjectableDef`.\n */\n function getInjectableDef(type) {\n var def = type[NG_INJECTABLE_DEF];\n // The definition read above may come from a base class. `hasOwnProperty` is not sufficient to\n // distinguish this case, as in older browsers (e.g. IE10) static property inheritance is\n // implemented by copying the properties.\n //\n // Instead, the ngInjectableDef's token is compared to the type, and if they don't match then the\n // property was not defined directly on the type itself, and was likely inherited. The definition\n // is only returned if the type matches the def.token.\n return def && def.token === type ? def : null;\n }\n /**\n * Read the `ngInjectableDef` for `type` or read the `ngInjectableDef` from one of its ancestors.\n *\n * @param type A type which may have `ngInjectableDef`, via inheritance.\n *\n * @deprecated Will be removed in v10, where an error will occur in the scenario if we find the\n * `ngInjectableDef` on an ancestor only.\n */\n function getInheritedInjectableDef(type) {\n if (type && type[NG_INJECTABLE_DEF]) {\n // TODO(FW-1307): Re-add ngDevMode when closure can handle it\n // ngDevMode &&\n console.warn(\"DEPRECATED: DI is instantiating a token \\\"\" + type.name + \"\\\" that inherits its @Injectable decorator but does not provide one itself.\\n\" +\n (\"This will become an error in v10. Please add @Injectable() to the \\\"\" + type.name + \"\\\" class.\"));\n return type[NG_INJECTABLE_DEF];\n }\n else {\n return null;\n }\n }\n /**\n * Read the `ngInjectorDef` type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have `ngInjectorDef`\n */\n function getInjectorDef(type) {\n return type && type.hasOwnProperty(NG_INJECTOR_DEF) ? type[NG_INJECTOR_DEF] : null;\n }\n var NG_INJECTABLE_DEF = getClosureSafeProperty({ ngInjectableDef: getClosureSafeProperty });\n var NG_INJECTOR_DEF = getClosureSafeProperty({ ngInjectorDef: getClosureSafeProperty });\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n if (token instanceof Array) {\n return '[' + token.map(stringify).join(', ') + ']';\n }\n if (token == null) {\n return '' + token;\n }\n if (token.overriddenName) {\n return \"\" + token.overriddenName;\n }\n if (token.name) {\n return \"\" + token.name;\n }\n var res = token.toString();\n if (res == null) {\n return '' + res;\n }\n var newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var __forward_ref__ = getClosureSafeProperty({ __forward_ref__: getClosureSafeProperty });\n /**\n * Allows to refer to references which are not yet defined.\n *\n * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of\n * DI is declared, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * @usageNotes\n * ### Example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n * @publicApi\n */\n function forwardRef(forwardRefFn) {\n forwardRefFn.__forward_ref__ = forwardRef;\n forwardRefFn.toString = function () { return stringify(this()); };\n return forwardRefFn;\n }\n /**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see `forwardRef`\n * @publicApi\n */\n function resolveForwardRef(type) {\n var fn = type;\n if (typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) &&\n fn.__forward_ref__ === forwardRef) {\n return fn();\n }\n else {\n return type;\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var __globalThis = typeof globalThis !== 'undefined' && globalThis;\n var __window = typeof window !== 'undefined' && window;\n var __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self;\n var __global = typeof global !== 'undefined' && global;\n // Always use __globalThis if available, which is the spec-defined global variable across all\n // environments, then fallback to __global first, because in Node tests both __global and\n // __window may be defined and _global should be __global in that case.\n var _global = __globalThis || __global || __window || __self;\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var R3ResolvedDependencyType;\n (function (R3ResolvedDependencyType) {\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"Token\"] = 0] = \"Token\";\n R3ResolvedDependencyType[R3ResolvedDependencyType[\"Attribute\"] = 1] = \"Attribute\";\n })(R3ResolvedDependencyType || (R3ResolvedDependencyType = {}));\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function getCompilerFacade() {\n var globalNg = _global['ng'];\n if (!globalNg || !globalNg.ɵcompilerFacade) {\n throw new Error(\"Angular JIT compilation failed: '@angular/compiler' not loaded!\\n\" +\n \" - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\\n\" +\n \" - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\\n\" +\n \" - Alternatively provide the compiler with 'import \\\"@angular/compiler\\\";' before bootstrapping.\");\n }\n return globalNg.ɵcompilerFacade;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parameterized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides additional level of type safety.\n *\n * ```\n * interface MyInterface {...}\n * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));\n * // myInterface is inferred to be MyInterface.\n * ```\n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the `inject` function. See below for an example.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As\n * mentioned above, `'root'` is the default value for `providedIn`.\n *\n * @usageNotes\n * ### Basic Example\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n *\n * @publicApi\n */\n var InjectionToken = /** @class */ (function () {\n function InjectionToken(_desc, options) {\n this._desc = _desc;\n /** @internal */\n this.ngMetadataName = 'InjectionToken';\n this.ngInjectableDef = undefined;\n if (typeof options == 'number') {\n // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n // __NG_ELEMENT_ID__ is Used by Ivy to determine bloom filter id.\n // We are using it to assign `-1` which is used to identify `Injector`.\n this.__NG_ELEMENT_ID__ = options;\n }\n else if (options !== undefined) {\n this.ngInjectableDef = ɵɵdefineInjectable({\n token: this,\n providedIn: options.providedIn || 'root',\n factory: options.factory,\n });\n }\n }\n InjectionToken.prototype.toString = function () { return \"InjectionToken \" + this._desc; };\n return InjectionToken;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.\n *\n * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a\n * project.\n *\n * @publicApi\n */\n var INJECTOR = new InjectionToken('INJECTOR', -1 // `-1` is used by Ivy DI system as special value to recognize it as `Injector`.\n );\n var _THROW_IF_NOT_FOUND = new Object();\n var THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n var NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\n var NG_TOKEN_PATH = 'ngTokenPath';\n var NEW_LINE = /\\n/gm;\n var NO_NEW_LINE = 'ɵ';\n var SOURCE = '__source';\n var ɵ0$1 = getClosureSafeProperty;\n var USE_VALUE = getClosureSafeProperty({ provide: String, useValue: ɵ0$1 });\n /**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\n var _currentInjector = undefined;\n function setCurrentInjector(injector) {\n var former = _currentInjector;\n _currentInjector = injector;\n return former;\n }\n /**\n * Current implementation of inject.\n *\n * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed\n * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this\n * way for two reasons:\n * 1. `Injector` should not depend on ivy logic.\n * 2. To maintain tree shake-ability we don't want to bring in unnecessary code.\n */\n var _injectImplementation;\n /**\n * Sets the current inject implementation.\n */\n function setInjectImplementation(impl) {\n var previous = _injectImplementation;\n _injectImplementation = impl;\n return previous;\n }\n function injectInjectorOnly(token, flags) {\n if (flags === void 0) { flags = exports.InjectFlags.Default; }\n if (_currentInjector === undefined) {\n throw new Error(\"inject() must be called from an injection context\");\n }\n else if (_currentInjector === null) {\n return injectRootLimpMode(token, undefined, flags);\n }\n else {\n return _currentInjector.get(token, flags & exports.InjectFlags.Optional ? null : undefined, flags);\n }\n }\n function ɵɵinject(token, flags) {\n if (flags === void 0) { flags = exports.InjectFlags.Default; }\n return (_injectImplementation || injectInjectorOnly)(token, flags);\n }\n /**\n * Injects a token from the currently active injector.\n *\n * Must be used in the context of a factory function such as one defined for an\n * `InjectionToken`. Throws an error if not called from such a context.\n *\n * Within such a factory function, using this function to request injection of a dependency\n * is faster and more type-safe than providing an additional array of dependencies\n * (as has been common with `useFactory` providers).\n *\n * @param token The injection token for the dependency to be injected.\n * @param flags Optional flags that control how injection is executed.\n * The flags correspond to injection strategies that can be specified with\n * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.\n * @returns True if injection is successful, null otherwise.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n * @publicApi\n */\n var inject = ɵɵinject;\n /**\n * Injects `root` tokens in limp mode.\n *\n * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to\n * `\"root\"`. This is known as the limp mode injection. In such case the value is stored in the\n * `InjectableDef`.\n */\n function injectRootLimpMode(token, notFoundValue, flags) {\n var injectableDef = getInjectableDef(token);\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :\n injectableDef.value;\n }\n if (flags & exports.InjectFlags.Optional)\n return null;\n if (notFoundValue !== undefined)\n return notFoundValue;\n throw new Error(\"Injector: NOT_FOUND [\" + stringify(token) + \"]\");\n }\n function injectArgs(types) {\n var args = [];\n for (var i = 0; i < types.length; i++) {\n var arg = resolveForwardRef(types[i]);\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new Error('Arguments array must have arguments.');\n }\n var type = undefined;\n var flags = exports.InjectFlags.Default;\n for (var j = 0; j < arg.length; j++) {\n var meta = arg[j];\n if (meta instanceof Optional || meta.ngMetadataName === 'Optional' || meta === Optional) {\n flags |= exports.InjectFlags.Optional;\n }\n else if (meta instanceof SkipSelf || meta.ngMetadataName === 'SkipSelf' || meta === SkipSelf) {\n flags |= exports.InjectFlags.SkipSelf;\n }\n else if (meta instanceof Self || meta.ngMetadataName === 'Self' || meta === Self) {\n flags |= exports.InjectFlags.Self;\n }\n else if (meta instanceof Inject || meta === Inject) {\n type = meta.token;\n }\n else {\n type = meta;\n }\n }\n args.push(ɵɵinject(type, flags));\n }\n else {\n args.push(ɵɵinject(arg));\n }\n }\n return args;\n }\n var NullInjector = /** @class */ (function () {\n function NullInjector() {\n }\n NullInjector.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }\n if (notFoundValue === THROW_IF_NOT_FOUND) {\n // Intentionally left behind: With dev tools open the debugger will stop here. There is no\n // reason why correctly written application should cause this exception.\n // TODO(misko): uncomment the next line once `ngDevMode` works with closure.\n // if(ngDevMode) debugger;\n var error = new Error(\"NullInjectorError: No provider for \" + stringify(token) + \"!\");\n error.name = 'NullInjectorError';\n throw error;\n }\n return notFoundValue;\n };\n return NullInjector;\n }());\n function catchInjectorError(e, token, injectorErrorName, source) {\n var tokenPath = e[NG_TEMP_TOKEN_PATH];\n if (token[SOURCE]) {\n tokenPath.unshift(token[SOURCE]);\n }\n e.message = formatError('\\n' + e.message, tokenPath, injectorErrorName, source);\n e[NG_TOKEN_PATH] = tokenPath;\n e[NG_TEMP_TOKEN_PATH] = null;\n throw e;\n }\n function formatError(text, obj, injectorErrorName, source) {\n if (source === void 0) { source = null; }\n text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;\n var context = stringify(obj);\n if (obj instanceof Array) {\n context = obj.map(stringify).join(' -> ');\n }\n else if (typeof obj === 'object') {\n var parts = [];\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n var value = obj[key];\n parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n }\n }\n context = \"{\" + parts.join(', ') + \"}\";\n }\n return \"\" + injectorErrorName + (source ? '(' + source + ')' : '') + \"[\" + context + \"]: \" + text.replace(NEW_LINE, '\\n ');\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\n var angularCoreDiEnv = {\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵgetFactoryOf': getFactoryOf,\n };\n function getFactoryOf(type) {\n var typeAny = type;\n var def = getInjectableDef(typeAny) || getInjectorDef(typeAny);\n if (!def || def.factory === undefined) {\n return null;\n }\n return def.factory;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by\n * the `MyCustomComponent` constructor function.\n *\n * @publicApi\n */\n var Type = Function;\n function isType(v) {\n return typeof v === 'function';\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Attention: These regex has to hold even if the code is minified!\n */\n var DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*arguments\\)/;\n var INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\n var INHERITED_CLASS_WITH_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\n var INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\s*{\\s+super\\(\\.\\.\\.arguments\\)/;\n /**\n * Determine whether a stringified type is a class which delegates its constructor\n * to its parent.\n *\n * This is not trivial since compiled code can actually contain a constructor function\n * even if the original source code did not. For instance, when the child class contains\n * an initialized instance property.\n */\n function isDelegateCtor(typeStr) {\n return DELEGATE_CTOR.test(typeStr) || INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) ||\n (INHERITED_CLASS.test(typeStr) && !INHERITED_CLASS_WITH_CTOR.test(typeStr));\n }\n var ReflectionCapabilities = /** @class */ (function () {\n function ReflectionCapabilities(reflect) {\n this._reflect = reflect || _global['Reflect'];\n }\n ReflectionCapabilities.prototype.isReflectionEnabled = function () { return true; };\n ReflectionCapabilities.prototype.factory = function (t) { return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new (t.bind.apply(t, __spread([void 0], args)))();\n }; };\n /** @internal */\n ReflectionCapabilities.prototype._zipTypesAndAnnotations = function (paramTypes, paramAnnotations) {\n var result;\n if (typeof paramTypes === 'undefined') {\n result = new Array(paramAnnotations.length);\n }\n else {\n result = new Array(paramTypes.length);\n }\n for (var i = 0; i < result.length; i++) {\n // TS outputs Object for parameters without types, while Traceur omits\n // the annotations. For now we preserve the Traceur behavior to aid\n // migration, but this can be revisited.\n if (typeof paramTypes === 'undefined') {\n result[i] = [];\n }\n else if (paramTypes[i] && paramTypes[i] != Object) {\n result[i] = [paramTypes[i]];\n }\n else {\n result[i] = [];\n }\n if (paramAnnotations && paramAnnotations[i] != null) {\n result[i] = result[i].concat(paramAnnotations[i]);\n }\n }\n return result;\n };\n ReflectionCapabilities.prototype._ownParameters = function (type, parentCtor) {\n var typeStr = type.toString();\n // If we have no decorators, we only have function.length as metadata.\n // In that case, to detect whether a child class declared an own constructor or not,\n // we need to look inside of that constructor to check whether it is\n // just calling the parent.\n // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439\n // that sets 'design:paramtypes' to []\n // if a class inherits from another class but has no ctor declared itself.\n if (isDelegateCtor(typeStr)) {\n return null;\n }\n // Prefer the direct API.\n if (type.parameters && type.parameters !== parentCtor.parameters) {\n return type.parameters;\n }\n // API of tsickle for lowering decorators to properties on the class.\n var tsickleCtorParams = type.ctorParameters;\n if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n // Newer tsickle uses a function closure\n // Retain the non-function case for compatibility with older tsickle\n var ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n var paramTypes_1 = ctorParameters.map(function (ctorParam) { return ctorParam && ctorParam.type; });\n var paramAnnotations_1 = ctorParameters.map(function (ctorParam) {\n return ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators);\n });\n return this._zipTypesAndAnnotations(paramTypes_1, paramAnnotations_1);\n }\n // API for metadata created by invoking the decorators.\n var paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];\n var paramTypes = this._reflect && this._reflect.getOwnMetadata &&\n this._reflect.getOwnMetadata('design:paramtypes', type);\n if (paramTypes || paramAnnotations) {\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n // If a class has no decorators, at least create metadata\n // based on function.length.\n // Note: We know that this is a real constructor as we checked\n // the content of the constructor above.\n return new Array(type.length).fill(undefined);\n };\n ReflectionCapabilities.prototype.parameters = function (type) {\n // Note: only report metadata if we have at least one class decorator\n // to stay in sync with the static reflector.\n if (!isType(type)) {\n return [];\n }\n var parentCtor = getParentCtor(type);\n var parameters = this._ownParameters(type, parentCtor);\n if (!parameters && parentCtor !== Object) {\n parameters = this.parameters(parentCtor);\n }\n return parameters || [];\n };\n ReflectionCapabilities.prototype._ownAnnotations = function (typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {\n var annotations = typeOrFunc.annotations;\n if (typeof annotations === 'function' && annotations.annotations) {\n annotations = annotations.annotations;\n }\n return annotations;\n }\n // API of tsickle for lowering decorators to properties on the class.\n if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) {\n return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);\n }\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n return typeOrFunc[ANNOTATIONS];\n }\n return null;\n };\n ReflectionCapabilities.prototype.annotations = function (typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return [];\n }\n var parentCtor = getParentCtor(typeOrFunc);\n var ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n var parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n return parentAnnotations.concat(ownAnnotations);\n };\n ReflectionCapabilities.prototype._ownPropMetadata = function (typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.propMetadata &&\n typeOrFunc.propMetadata !== parentCtor.propMetadata) {\n var propMetadata = typeOrFunc.propMetadata;\n if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n propMetadata = propMetadata.propMetadata;\n }\n return propMetadata;\n }\n // API of tsickle for lowering decorators to properties on the class.\n if (typeOrFunc.propDecorators &&\n typeOrFunc.propDecorators !== parentCtor.propDecorators) {\n var propDecorators_1 = typeOrFunc.propDecorators;\n var propMetadata_1 = {};\n Object.keys(propDecorators_1).forEach(function (prop) {\n propMetadata_1[prop] = convertTsickleDecoratorIntoMetadata(propDecorators_1[prop]);\n });\n return propMetadata_1;\n }\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n return typeOrFunc[PROP_METADATA];\n }\n return null;\n };\n ReflectionCapabilities.prototype.propMetadata = function (typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n var parentCtor = getParentCtor(typeOrFunc);\n var propMetadata = {};\n if (parentCtor !== Object) {\n var parentPropMetadata_1 = this.propMetadata(parentCtor);\n Object.keys(parentPropMetadata_1).forEach(function (propName) {\n propMetadata[propName] = parentPropMetadata_1[propName];\n });\n }\n var ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n if (ownPropMetadata) {\n Object.keys(ownPropMetadata).forEach(function (propName) {\n var decorators = [];\n if (propMetadata.hasOwnProperty(propName)) {\n decorators.push.apply(decorators, __spread(propMetadata[propName]));\n }\n decorators.push.apply(decorators, __spread(ownPropMetadata[propName]));\n propMetadata[propName] = decorators;\n });\n }\n return propMetadata;\n };\n ReflectionCapabilities.prototype.ownPropMetadata = function (typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n };\n ReflectionCapabilities.prototype.hasLifecycleHook = function (type, lcProperty) {\n return type instanceof Type && lcProperty in type.prototype;\n };\n ReflectionCapabilities.prototype.guards = function (type) { return {}; };\n ReflectionCapabilities.prototype.getter = function (name) { return new Function('o', 'return o.' + name + ';'); };\n ReflectionCapabilities.prototype.setter = function (name) {\n return new Function('o', 'v', 'return o.' + name + ' = v;');\n };\n ReflectionCapabilities.prototype.method = function (name) {\n var functionBody = \"if (!o.\" + name + \") throw new Error('\\\"\" + name + \"\\\" is undefined');\\n return o.\" + name + \".apply(o, args);\";\n return new Function('o', 'args', functionBody);\n };\n // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n ReflectionCapabilities.prototype.importUri = function (type) {\n // StaticSymbol\n if (typeof type === 'object' && type['filePath']) {\n return type['filePath'];\n }\n // Runtime type\n return \"./\" + stringify(type);\n };\n ReflectionCapabilities.prototype.resourceUri = function (type) { return \"./\" + stringify(type); };\n ReflectionCapabilities.prototype.resolveIdentifier = function (name, moduleUrl, members, runtime) {\n return runtime;\n };\n ReflectionCapabilities.prototype.resolveEnum = function (enumIdentifier, name) { return enumIdentifier[name]; };\n return ReflectionCapabilities;\n }());\n function convertTsickleDecoratorIntoMetadata(decoratorInvocations) {\n if (!decoratorInvocations) {\n return [];\n }\n return decoratorInvocations.map(function (decoratorInvocation) {\n var decoratorType = decoratorInvocation.type;\n var annotationCls = decoratorType.annotationCls;\n var annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n return new (annotationCls.bind.apply(annotationCls, __spread([void 0], annotationArgs)))();\n });\n }\n function getParentCtor(ctor) {\n var parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n var parentCtor = parentProto ? parentProto.constructor : null;\n // Note: We always use `Object` as the null value\n // to simplify checking later on.\n return parentCtor || Object;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var _reflect = null;\n function getReflect() {\n return (_reflect = _reflect || new ReflectionCapabilities());\n }\n function reflectDependencies(type) {\n return convertDependencies(getReflect().parameters(type));\n }\n function convertDependencies(deps) {\n var compiler = getCompilerFacade();\n return deps.map(function (dep) { return reflectDependency(compiler, dep); });\n }\n function reflectDependency(compiler, dep) {\n var meta = {\n token: null,\n host: false,\n optional: false,\n resolved: compiler.R3ResolvedDependencyType.Token,\n self: false,\n skipSelf: false,\n };\n function setTokenAndResolvedType(token) {\n meta.resolved = compiler.R3ResolvedDependencyType.Token;\n meta.token = token;\n }\n if (Array.isArray(dep)) {\n if (dep.length === 0) {\n throw new Error('Dependency array must have arguments.');\n }\n for (var j = 0; j < dep.length; j++) {\n var param = dep[j];\n if (param === undefined) {\n // param may be undefined if type of dep is not set by ngtsc\n continue;\n }\n else if (param instanceof Optional || param.__proto__.ngMetadataName === 'Optional') {\n meta.optional = true;\n }\n else if (param instanceof SkipSelf || param.__proto__.ngMetadataName === 'SkipSelf') {\n meta.skipSelf = true;\n }\n else if (param instanceof Self || param.__proto__.ngMetadataName === 'Self') {\n meta.self = true;\n }\n else if (param instanceof Host || param.__proto__.ngMetadataName === 'Host') {\n meta.host = true;\n }\n else if (param instanceof Inject) {\n meta.token = param.token;\n }\n else if (param instanceof Attribute) {\n if (param.attributeName === undefined) {\n throw new Error(\"Attribute name must be defined.\");\n }\n meta.token = param.attributeName;\n meta.resolved = compiler.R3ResolvedDependencyType.Attribute;\n }\n else {\n setTokenAndResolvedType(param);\n }\n }\n }\n else {\n setTokenAndResolvedType(dep);\n }\n return meta;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting\n * `ngInjectableDef` onto the injectable type.\n */\n function compileInjectable(type, srcMeta) {\n var def = null;\n // if NG_INJECTABLE_DEF is already defined on this class then don't overwrite it\n if (type.hasOwnProperty(NG_INJECTABLE_DEF))\n return;\n Object.defineProperty(type, NG_INJECTABLE_DEF, {\n get: function () {\n if (def === null) {\n // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n var meta = srcMeta || { providedIn: null };\n var hasAProvider = isUseClassProvider(meta) || isUseFactoryProvider(meta) ||\n isUseValueProvider(meta) || isUseExistingProvider(meta);\n var compilerMeta = {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n providedIn: meta.providedIn,\n ctorDeps: reflectDependencies(type),\n userDeps: undefined,\n };\n if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n compilerMeta.userDeps = convertDependencies(meta.deps);\n }\n if (!hasAProvider) {\n // In the case the user specifies a type provider, treat it as {provide: X, useClass: X}.\n // The deps will have been reflected above, causing the factory to create the class by\n // calling\n // its constructor with injected deps.\n compilerMeta.useClass = type;\n }\n else if (isUseClassProvider(meta)) {\n // The user explicitly specified useClass, and may or may not have provided deps.\n compilerMeta.useClass = meta.useClass;\n }\n else if (isUseValueProvider(meta)) {\n // The user explicitly specified useValue.\n compilerMeta.useValue = meta.useValue;\n }\n else if (isUseFactoryProvider(meta)) {\n // The user explicitly specified useFactory.\n compilerMeta.useFactory = meta.useFactory;\n }\n else if (isUseExistingProvider(meta)) {\n // The user explicitly specified useExisting.\n compilerMeta.useExisting = meta.useExisting;\n }\n else {\n // Can't happen - either hasAProvider will be false, or one of the providers will be set.\n throw new Error(\"Unreachable state.\");\n }\n def = getCompilerFacade().compileInjectable(angularCoreDiEnv, \"ng:///\" + type.name + \"/ngInjectableDef.js\", compilerMeta);\n }\n return def;\n },\n });\n }\n var ɵ0$2 = getClosureSafeProperty;\n var USE_VALUE$1 = getClosureSafeProperty({ provide: String, useValue: ɵ0$2 });\n function isUseClassProvider(meta) {\n return meta.useClass !== undefined;\n }\n function isUseValueProvider(meta) {\n return USE_VALUE$1 in meta;\n }\n function isUseFactoryProvider(meta) {\n return meta.useFactory !== undefined;\n }\n function isUseExistingProvider(meta) {\n return meta.useExisting !== undefined;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var ɵ0$3 = getClosureSafeProperty;\n var USE_VALUE$2 = getClosureSafeProperty({ provide: String, useValue: ɵ0$3 });\n var EMPTY_ARRAY = [];\n function convertInjectableProviderToFactory(type, provider) {\n if (!provider) {\n var reflectionCapabilities = new ReflectionCapabilities();\n var deps_1 = reflectionCapabilities.parameters(type);\n // TODO - convert to flags.\n return function () { return new (type.bind.apply(type, __spread([void 0], injectArgs(deps_1))))(); };\n }\n if (USE_VALUE$2 in provider) {\n var valueProvider_1 = provider;\n return function () { return valueProvider_1.useValue; };\n }\n else if (provider.useExisting) {\n var existingProvider_1 = provider;\n return function () { return ɵɵinject(existingProvider_1.useExisting); };\n }\n else if (provider.useFactory) {\n var factoryProvider_1 = provider;\n return function () { return factoryProvider_1.useFactory.apply(factoryProvider_1, __spread(injectArgs(factoryProvider_1.deps || EMPTY_ARRAY))); };\n }\n else if (provider.useClass) {\n var classProvider_1 = provider;\n var deps_2 = provider.deps;\n if (!deps_2) {\n var reflectionCapabilities = new ReflectionCapabilities();\n deps_2 = reflectionCapabilities.parameters(type);\n }\n return function () {\n var _a;\n return new ((_a = classProvider_1.useClass).bind.apply(_a, __spread([void 0], injectArgs(deps_2))))();\n };\n }\n else {\n var deps_3 = provider.deps;\n if (!deps_3) {\n var reflectionCapabilities = new ReflectionCapabilities();\n deps_3 = reflectionCapabilities.parameters(type);\n }\n return function () { return new (type.bind.apply(type, __spread([void 0], injectArgs(deps_3))))(); };\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var ɵ0$4 = function (type, meta) { return SWITCH_COMPILE_INJECTABLE(type, meta); };\n /**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var Injectable = makeDecorator('Injectable', undefined, undefined, undefined, ɵ0$4);\n /**\n * Supports @Injectable() in JIT mode for Render2.\n */\n function render2CompileInjectable(injectableType, options) {\n if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {\n injectableType.ngInjectableDef = ɵɵdefineInjectable({\n token: injectableType,\n providedIn: options.providedIn,\n factory: convertInjectableProviderToFactory(injectableType, options),\n });\n }\n }\n var SWITCH_COMPILE_INJECTABLE__POST_R3__ = compileInjectable;\n var SWITCH_COMPILE_INJECTABLE__PRE_R3__ = render2CompileInjectable;\n var SWITCH_COMPILE_INJECTABLE = SWITCH_COMPILE_INJECTABLE__PRE_R3__;\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function ngDevModeResetPerfCounters() {\n var locationString = typeof location !== 'undefined' ? location.toString() : '';\n var newCounters = {\n namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1,\n firstTemplatePass: 0,\n tNode: 0,\n tView: 0,\n rendererCreateTextNode: 0,\n rendererSetText: 0,\n rendererCreateElement: 0,\n rendererAddEventListener: 0,\n rendererSetAttribute: 0,\n rendererRemoveAttribute: 0,\n rendererSetProperty: 0,\n rendererSetClassName: 0,\n rendererAddClass: 0,\n rendererRemoveClass: 0,\n rendererSetStyle: 0,\n rendererRemoveStyle: 0,\n rendererDestroy: 0,\n rendererDestroyNode: 0,\n rendererMoveNode: 0,\n rendererRemoveNode: 0,\n rendererAppendChild: 0,\n rendererInsertBefore: 0,\n rendererCreateComment: 0,\n styleMap: 0,\n styleMapCacheMiss: 0,\n classMap: 0,\n classMapCacheMiss: 0,\n stylingProp: 0,\n stylingPropCacheMiss: 0,\n stylingApply: 0,\n stylingApplyCacheMiss: 0,\n };\n // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n var allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n _global['ngDevMode'] = allowNgDevModeTrue && newCounters;\n return newCounters;\n }\n /**\n * This checks to see if the `ngDevMode` has been set. If yes,\n * then we honor it, otherwise we default to dev mode with additional checks.\n *\n * The idea is that unless we are doing production build where we explicitly\n * set `ngDevMode == false` we should be helping the developer by providing\n * as much early warning and errors as possible.\n *\n * NOTE: changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n ngDevModeResetPerfCounters();\n }\n\n /** Called when directives inject each other (creating a circular dependency) */\n function throwCyclicDependencyError(token) {\n throw new Error(\"Cannot instantiate cyclic dependency! \" + token);\n }\n /** Called when there are multiple component selectors that match a given node */\n function throwMultipleComponentError(tNode) {\n throw new Error(\"Multiple components match node with tagname \" + tNode.tagName);\n }\n /** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\n function throwErrorIfNoChangesMode(creationMode, oldValue, currValue) {\n var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '\" + oldValue + \"'. Current value: '\" + currValue + \"'.\";\n if (creationMode) {\n msg +=\n \" It seems like the view has been created after its parent and its children have been dirty checked.\" +\n \" Has it been created in a change detection hook ?\";\n }\n // TODO: include debug context\n throw new Error(msg);\n }\n function throwMixedMultiProviderError() {\n throw new Error(\"Cannot mix multi providers and regular providers\");\n }\n function throwInvalidProviderError(ngModuleType, providers, provider) {\n var ngModuleDetail = '';\n if (ngModuleType && providers) {\n var providerDetail = providers.map(function (v) { return v == provider ? '?' + provider + '?' : '...'; });\n ngModuleDetail =\n \" - only instances of Provider and Type are allowed, got: [\" + providerDetail.join(', ') + \"]\";\n }\n throw new Error(\"Invalid provider for the NgModule '\" + stringify(ngModuleType) + \"'\" + ngModuleDetail);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * An internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\n var APP_ROOT = new InjectionToken('The presence of this token marks an injector as being the root injector.');\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\n var NOT_YET = {};\n /**\n * Marker which indicates that the factory function for a token is in the process of being called.\n *\n * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates\n * injection of a dependency has recursively attempted to inject the original token, and there is\n * a circular dependency among the providers.\n */\n var CIRCULAR = {};\n var EMPTY_ARRAY$1 = [];\n /**\n * A lazily initialized NullInjector.\n */\n var NULL_INJECTOR = undefined;\n function getNullInjector() {\n if (NULL_INJECTOR === undefined) {\n NULL_INJECTOR = new NullInjector();\n }\n return NULL_INJECTOR;\n }\n /**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.\n *\n * @publicApi\n */\n function createInjector(defType, parent, additionalProviders, name) {\n if (parent === void 0) { parent = null; }\n if (additionalProviders === void 0) { additionalProviders = null; }\n parent = parent || getNullInjector();\n return new R3Injector(defType, additionalProviders, parent, name);\n }\n var R3Injector = /** @class */ (function () {\n function R3Injector(def, additionalProviders, parent, source) {\n var _this = this;\n if (source === void 0) { source = null; }\n this.parent = parent;\n /**\n * Map of tokens to records which contain the instances of those tokens.\n */\n this.records = new Map();\n /**\n * The transitive set of `InjectorType`s which define this injector.\n */\n this.injectorDefTypes = new Set();\n /**\n * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n */\n this.onDestroy = new Set();\n this._destroyed = false;\n // Start off by creating Records for every provider declared in every InjectorType\n // included transitively in `def`.\n var dedupStack = [];\n deepForEach([def], function (injectorDef) { return _this.processInjectorType(injectorDef, [], dedupStack); });\n additionalProviders && deepForEach(additionalProviders, function (provider) { return _this.processProvider(provider, def, additionalProviders); });\n // Make sure the INJECTOR token provides this injector.\n this.records.set(INJECTOR, makeRecord(undefined, this));\n // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n // any injectable scoped to APP_ROOT_SCOPE.\n this.isRootInjector = this.records.has(APP_ROOT);\n // Eagerly instantiate the InjectorType classes themselves.\n this.injectorDefTypes.forEach(function (defType) { return _this.get(defType); });\n // Source name, used for debugging\n this.source = source || (typeof def === 'object' ? null : stringify(def));\n }\n Object.defineProperty(R3Injector.prototype, \"destroyed\", {\n /**\n * Flag indicating that this injector was previously destroyed.\n */\n get: function () { return this._destroyed; },\n enumerable: true,\n configurable: true\n });\n /**\n * Destroy the injector and release references to every instance or provider associated with it.\n *\n * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n * hook was found.\n */\n R3Injector.prototype.destroy = function () {\n this.assertNotDestroyed();\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n try {\n // Call all the lifecycle hooks.\n this.onDestroy.forEach(function (service) { return service.ngOnDestroy(); });\n }\n finally {\n // Release all references.\n this.records.clear();\n this.onDestroy.clear();\n this.injectorDefTypes.clear();\n }\n };\n R3Injector.prototype.get = function (token, notFoundValue, flags) {\n if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }\n if (flags === void 0) { flags = exports.InjectFlags.Default; }\n this.assertNotDestroyed();\n // Set the injection context.\n var previousInjector = setCurrentInjector(this);\n try {\n // Check for the SkipSelf flag.\n if (!(flags & exports.InjectFlags.SkipSelf)) {\n // SkipSelf isn't set, check if the record belongs to this injector.\n var record = this.records.get(token);\n if (record === undefined) {\n // No record, but maybe the token is scoped to this injector. Look for an ngInjectableDef\n // with a scope matching this injector.\n var def = couldBeInjectableType(token) && getInjectableDef(token);\n if (def && this.injectableDefInScope(def)) {\n // Found an ngInjectableDef and it's scoped to this injector. Pretend as if it was here\n // all along.\n record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n this.records.set(token, record);\n }\n }\n // If a record was found, get the instance for it and return it.\n if (record !== undefined) {\n return this.hydrate(token, record);\n }\n }\n // Select the next injector based on the Self flag - if self is set, the next injector is\n // the NullInjector, otherwise it's the parent.\n var nextInjector = !(flags & exports.InjectFlags.Self) ? this.parent : getNullInjector();\n return nextInjector.get(token, flags & exports.InjectFlags.Optional ? null : notFoundValue);\n }\n catch (e) {\n if (e.name === 'NullInjectorError') {\n var path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(stringify(token));\n if (previousInjector) {\n // We still have a parent injector, keep throwing\n throw e;\n }\n else {\n // Format & throw the final error message when we don't have any previous injector\n return catchInjectorError(e, token, 'R3InjectorError', this.source);\n }\n }\n else {\n throw e;\n }\n }\n finally {\n // Lastly, clean up the state by restoring the previous injector.\n setCurrentInjector(previousInjector);\n }\n };\n R3Injector.prototype.toString = function () {\n var tokens = [], records = this.records;\n records.forEach(function (v, token) { return tokens.push(stringify(token)); });\n return \"R3Injector[\" + tokens.join(', ') + \"]\";\n };\n R3Injector.prototype.assertNotDestroyed = function () {\n if (this._destroyed) {\n throw new Error('Injector has already been destroyed.');\n }\n };\n /**\n * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers\n * to this injector.\n *\n * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,\n * the function will return \"true\" to indicate that the providers of the type definition need\n * to be processed. This allows us to process providers of injector types after all imports of\n * an injector definition are processed. (following View Engine semantics: see FW-1349)\n */\n R3Injector.prototype.processInjectorType = function (defOrWrappedDef, parents, dedupStack) {\n var _this = this;\n defOrWrappedDef = resolveForwardRef(defOrWrappedDef);\n if (!defOrWrappedDef)\n return false;\n // Either the defOrWrappedDef is an InjectorType (with ngInjectorDef) or an\n // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic\n // read, so care is taken to only do the read once.\n // First attempt to read the ngInjectorDef.\n var def = getInjectorDef(defOrWrappedDef);\n // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.\n var ngModule = (def == null) && defOrWrappedDef.ngModule || undefined;\n // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,\n // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type\n // is the `ngModule`.\n var defType = (ngModule === undefined) ? defOrWrappedDef : ngModule;\n // Check for circular dependencies.\n if (ngDevMode && parents.indexOf(defType) !== -1) {\n var defName = stringify(defType);\n throw new Error(\"Circular dependency in DI detected for type \" + defName + \". Dependency path: \" + parents.map(function (defType) { return stringify(defType); }).join(' > ') + \" > \" + defName + \".\");\n }\n // Check for multiple imports of the same module\n var isDuplicate = dedupStack.indexOf(defType) !== -1;\n // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual\n // `InjectorDef` is on its `ngModule`.\n if (ngModule !== undefined) {\n def = getInjectorDef(ngModule);\n }\n // If no definition was found, it might be from exports. Remove it.\n if (def == null) {\n return false;\n }\n // Track the InjectorType and add a provider for it.\n this.injectorDefTypes.add(defType);\n this.records.set(defType, makeRecord(def.factory, NOT_YET));\n // Add providers in the same way that @NgModule resolution did:\n // First, include providers from any imports.\n if (def.imports != null && !isDuplicate) {\n // Before processing defType's imports, add it to the set of parents. This way, if it ends\n // up deeply importing itself, this can be detected.\n ngDevMode && parents.push(defType);\n // Add it to the set of dedups. This way we can detect multiple imports of the same module\n dedupStack.push(defType);\n var importTypesWithProviders_1;\n try {\n deepForEach(def.imports, function (imported) {\n if (_this.processInjectorType(imported, parents, dedupStack)) {\n if (importTypesWithProviders_1 === undefined)\n importTypesWithProviders_1 = [];\n // If the processed import is an injector type with providers, we store it in the\n // list of import types with providers, so that we can process those afterwards.\n importTypesWithProviders_1.push(imported);\n }\n });\n }\n finally {\n // Remove it from the parents set when finished.\n ngDevMode && parents.pop();\n }\n // Imports which are declared with providers (TypeWithProviders) need to be processed\n // after all imported modules are processed. This is similar to how View Engine\n // processes/merges module imports in the metadata resolver. See: FW-1349.\n if (importTypesWithProviders_1 !== undefined) {\n var _loop_1 = function (i) {\n var _a = importTypesWithProviders_1[i], ngModule_1 = _a.ngModule, providers = _a.providers;\n deepForEach(providers, function (provider) { return _this.processProvider(provider, ngModule_1, providers || EMPTY_ARRAY$1); });\n };\n for (var i = 0; i < importTypesWithProviders_1.length; i++) {\n _loop_1(i);\n }\n }\n }\n // Next, include providers listed on the definition itself.\n var defProviders = def.providers;\n if (defProviders != null && !isDuplicate) {\n var injectorType_1 = defOrWrappedDef;\n deepForEach(defProviders, function (provider) { return _this.processProvider(provider, injectorType_1, defProviders); });\n }\n return (ngModule !== undefined &&\n defOrWrappedDef.providers !== undefined);\n };\n /**\n * Process a `SingleProvider` and add it.\n */\n R3Injector.prototype.processProvider = function (provider, ngModuleType, providers) {\n // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n // property.\n provider = resolveForwardRef(provider);\n var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);\n // Construct a `Record` for the provider.\n var record = providerToRecord(provider, ngModuleType, providers);\n if (!isTypeProvider(provider) && provider.multi === true) {\n // If the provider indicates that it's a multi-provider, process it specially.\n // First check whether it's been defined already.\n var multiRecord_1 = this.records.get(token);\n if (multiRecord_1) {\n // It has. Throw a nice error if\n if (multiRecord_1.multi === undefined) {\n throwMixedMultiProviderError();\n }\n }\n else {\n multiRecord_1 = makeRecord(undefined, NOT_YET, true);\n multiRecord_1.factory = function () { return injectArgs(multiRecord_1.multi); };\n this.records.set(token, multiRecord_1);\n }\n token = provider;\n multiRecord_1.multi.push(provider);\n }\n else {\n var existing = this.records.get(token);\n if (existing && existing.multi !== undefined) {\n throwMixedMultiProviderError();\n }\n }\n this.records.set(token, record);\n };\n R3Injector.prototype.hydrate = function (token, record) {\n if (record.value === CIRCULAR) {\n throwCyclicDependencyError(stringify(token));\n }\n else if (record.value === NOT_YET) {\n record.value = CIRCULAR;\n record.value = record.factory();\n }\n if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n this.onDestroy.add(record.value);\n }\n return record.value;\n };\n R3Injector.prototype.injectableDefInScope = function (def) {\n if (!def.providedIn) {\n return false;\n }\n else if (typeof def.providedIn === 'string') {\n return def.providedIn === 'any' || (def.providedIn === 'root' && this.isRootInjector);\n }\n else {\n return this.injectorDefTypes.has(def.providedIn);\n }\n };\n return R3Injector;\n }());\n function injectableDefOrInjectorDefFactory(token) {\n // Most tokens will have an ngInjectableDef directly on them, which specifies a factory directly.\n var injectableDef = getInjectableDef(token);\n if (injectableDef !== null) {\n return injectableDef.factory;\n }\n // If the token is an NgModule, it's also injectable but the factory is on its ngInjectorDef.\n var injectorDef = getInjectorDef(token);\n if (injectorDef !== null) {\n return injectorDef.factory;\n }\n // InjectionTokens should have an ngInjectableDef and thus should be handled above.\n // If it's missing that, it's an error.\n if (token instanceof InjectionToken) {\n throw new Error(\"Token \" + stringify(token) + \" is missing an ngInjectableDef definition.\");\n }\n // Undecorated types can sometimes be created if they have no constructor arguments.\n if (token instanceof Function) {\n return getUndecoratedInjectableFactory(token);\n }\n // There was no way to resolve a factory for this token.\n throw new Error('unreachable');\n }\n function getUndecoratedInjectableFactory(token) {\n // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n var paramLength = token.length;\n if (paramLength > 0) {\n var args = new Array(paramLength).fill('?');\n throw new Error(\"Can't resolve all parameters for \" + stringify(token) + \": (\" + args.join(', ') + \").\");\n }\n // The constructor function appears to have no parameters.\n // This might be because it inherits from a super-class. In which case, use an ngInjectableDef\n // from an ancestor if there is one.\n // Otherwise this really is a simple class with no dependencies, so return a factory that\n // just instantiates the zero-arg constructor.\n var inheritedInjectableDef = getInheritedInjectableDef(token);\n if (inheritedInjectableDef !== null) {\n return function () { return inheritedInjectableDef.factory(token); };\n }\n else {\n return function () { return new token(); };\n }\n }\n function providerToRecord(provider, ngModuleType, providers) {\n var factory = providerToFactory(provider, ngModuleType, providers);\n if (isValueProvider(provider)) {\n return makeRecord(undefined, provider.useValue);\n }\n else {\n return makeRecord(factory, NOT_YET);\n }\n }\n /**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\n function providerToFactory(provider, ngModuleType, providers) {\n var factory = undefined;\n if (isTypeProvider(provider)) {\n return injectableDefOrInjectorDefFactory(resolveForwardRef(provider));\n }\n else {\n if (isValueProvider(provider)) {\n factory = function () { return resolveForwardRef(provider.useValue); };\n }\n else if (isExistingProvider(provider)) {\n factory = function () { return ɵɵinject(resolveForwardRef(provider.useExisting)); };\n }\n else if (isFactoryProvider(provider)) {\n factory = function () { return provider.useFactory.apply(provider, __spread(injectArgs(provider.deps || []))); };\n }\n else {\n var classRef_1 = resolveForwardRef(provider &&\n (provider.useClass || provider.provide));\n if (!classRef_1) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = function () { return new ((classRef_1).bind.apply((classRef_1), __spread([void 0], injectArgs(provider.deps))))(); };\n }\n else {\n return injectableDefOrInjectorDefFactory(classRef_1);\n }\n }\n }\n return factory;\n }\n function makeRecord(factory, value, multi) {\n if (multi === void 0) { multi = false; }\n return {\n factory: factory,\n value: value,\n multi: multi ? [] : undefined,\n };\n }\n function deepForEach(input, fn) {\n input.forEach(function (value) { return Array.isArray(value) ? deepForEach(value, fn) : fn(value); });\n }\n function isValueProvider(value) {\n return value !== null && typeof value == 'object' && USE_VALUE in value;\n }\n function isExistingProvider(value) {\n return !!(value && value.useExisting);\n }\n function isFactoryProvider(value) {\n return !!(value && value.useFactory);\n }\n function isTypeProvider(value) {\n return typeof value === 'function';\n }\n function isClassProvider(value) {\n return !!value.useClass;\n }\n function hasDeps(value) {\n return !!value.deps;\n }\n function hasOnDestroy(value) {\n return value !== null && typeof value === 'object' &&\n typeof value.ngOnDestroy === 'function';\n }\n function couldBeInjectableType(value) {\n return (typeof value === 'function') ||\n (typeof value === 'object' && value instanceof InjectionToken);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function INJECTOR_IMPL__PRE_R3__(providers, parent, name) {\n return new StaticInjector(providers, parent, name);\n }\n function INJECTOR_IMPL__POST_R3__(providers, parent, name) {\n return createInjector({ name: name }, parent, providers, name);\n }\n var INJECTOR_IMPL = INJECTOR_IMPL__PRE_R3__;\n /**\n * Concrete injectors implement this interface.\n *\n * For more details, see the [\"Dependency Injection Guide\"](guide/dependency-injection).\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n *\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n * @publicApi\n */\n var Injector = /** @class */ (function () {\n function Injector() {\n }\n /**\n * Create a new Injector which is configure using `StaticProvider`s.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n */\n Injector.create = function (options, parent) {\n if (Array.isArray(options)) {\n return INJECTOR_IMPL(options, parent, '');\n }\n else {\n return INJECTOR_IMPL(options.providers, options.parent, options.name || '');\n }\n };\n Injector.THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\n Injector.NULL = new NullInjector();\n /** @nocollapse */\n Injector.ngInjectableDef = ɵɵdefineInjectable({\n token: Injector,\n providedIn: 'any',\n factory: function () { return ɵɵinject(INJECTOR); },\n });\n /**\n * @internal\n * @nocollapse\n */\n Injector.__NG_ELEMENT_ID__ = -1;\n return Injector;\n }());\n var IDENT = function (value) {\n return value;\n };\n var EMPTY = [];\n var CIRCULAR$1 = IDENT;\n var MULTI_PROVIDER_FN = function () {\n return Array.prototype.slice.call(arguments);\n };\n var NO_NEW_LINE$1 = 'ɵ';\n var StaticInjector = /** @class */ (function () {\n function StaticInjector(providers, parent, source) {\n if (parent === void 0) { parent = Injector.NULL; }\n if (source === void 0) { source = null; }\n this.parent = parent;\n this.source = source;\n var records = this._records = new Map();\n records.set(Injector, { token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false });\n records.set(INJECTOR, { token: INJECTOR, fn: IDENT, deps: EMPTY, value: this, useNew: false });\n recursivelyProcessProviders(records, providers);\n }\n StaticInjector.prototype.get = function (token, notFoundValue, flags) {\n if (flags === void 0) { flags = exports.InjectFlags.Default; }\n var record = this._records.get(token);\n try {\n return tryResolveToken(token, record, this._records, this.parent, notFoundValue, flags);\n }\n catch (e) {\n return catchInjectorError(e, token, 'StaticInjectorError', this.source);\n }\n };\n StaticInjector.prototype.toString = function () {\n var tokens = [], records = this._records;\n records.forEach(function (v, token) { return tokens.push(stringify(token)); });\n return \"StaticInjector[\" + tokens.join(', ') + \"]\";\n };\n return StaticInjector;\n }());\n function resolveProvider(provider) {\n var deps = computeDeps(provider);\n var fn = IDENT;\n var value = EMPTY;\n var useNew = false;\n var provide = resolveForwardRef(provider.provide);\n if (USE_VALUE in provider) {\n // We need to use USE_VALUE in provider since provider.useValue could be defined as undefined.\n value = provider.useValue;\n }\n else if (provider.useFactory) {\n fn = provider.useFactory;\n }\n else if (provider.useExisting) ;\n else if (provider.useClass) {\n useNew = true;\n fn = resolveForwardRef(provider.useClass);\n }\n else if (typeof provide == 'function') {\n useNew = true;\n fn = provide;\n }\n else {\n throw staticError('StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable', provider);\n }\n return { deps: deps, fn: fn, useNew: useNew, value: value };\n }\n function multiProviderMixError(token) {\n return staticError('Cannot mix multi providers and regular providers', token);\n }\n function recursivelyProcessProviders(records, provider) {\n if (provider) {\n provider = resolveForwardRef(provider);\n if (provider instanceof Array) {\n // if we have an array recurse into the array\n for (var i = 0; i < provider.length; i++) {\n recursivelyProcessProviders(records, provider[i]);\n }\n }\n else if (typeof provider === 'function') {\n // Functions were supported in ReflectiveInjector, but are not here. For safety give useful\n // error messages\n throw staticError('Function/Class not supported', provider);\n }\n else if (provider && typeof provider === 'object' && provider.provide) {\n // At this point we have what looks like a provider: {provide: ?, ....}\n var token = resolveForwardRef(provider.provide);\n var resolvedProvider = resolveProvider(provider);\n if (provider.multi === true) {\n // This is a multi provider.\n var multiProvider = records.get(token);\n if (multiProvider) {\n if (multiProvider.fn !== MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n }\n else {\n // Create a placeholder factory which will look up the constituents of the multi provider.\n records.set(token, multiProvider = {\n token: provider.provide,\n deps: [],\n useNew: false,\n fn: MULTI_PROVIDER_FN,\n value: EMPTY\n });\n }\n // Treat the provider as the token.\n token = provider;\n multiProvider.deps.push({ token: token, options: 6 /* Default */ });\n }\n var record = records.get(token);\n if (record && record.fn == MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n records.set(token, resolvedProvider);\n }\n else {\n throw staticError('Unexpected provider', provider);\n }\n }\n }\n function tryResolveToken(token, record, records, parent, notFoundValue, flags) {\n try {\n return resolveToken(token, record, records, parent, notFoundValue, flags);\n }\n catch (e) {\n // ensure that 'e' is of type Error.\n if (!(e instanceof Error)) {\n e = new Error(e);\n }\n var path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(token);\n if (record && record.value == CIRCULAR$1) {\n // Reset the Circular flag.\n record.value = EMPTY;\n }\n throw e;\n }\n }\n function resolveToken(token, record, records, parent, notFoundValue, flags) {\n var _a;\n var value;\n if (record && !(flags & exports.InjectFlags.SkipSelf)) {\n // If we don't have a record, this implies that we don't own the provider hence don't know how\n // to resolve it.\n value = record.value;\n if (value == CIRCULAR$1) {\n throw Error(NO_NEW_LINE$1 + 'Circular dependency');\n }\n else if (value === EMPTY) {\n record.value = CIRCULAR$1;\n var obj = undefined;\n var useNew = record.useNew;\n var fn = record.fn;\n var depRecords = record.deps;\n var deps = EMPTY;\n if (depRecords.length) {\n deps = [];\n for (var i = 0; i < depRecords.length; i++) {\n var depRecord = depRecords[i];\n var options = depRecord.options;\n var childRecord = options & 2 /* CheckSelf */ ? records.get(depRecord.token) : undefined;\n deps.push(tryResolveToken(\n // Current Token to resolve\n depRecord.token, \n // A record which describes how to resolve the token.\n // If undefined, this means we don't have such a record\n childRecord, \n // Other records we know about.\n records, \n // If we don't know how to resolve dependency and we should not check parent for it,\n // than pass in Null injector.\n !childRecord && !(options & 4 /* CheckParent */) ? Injector.NULL : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, exports.InjectFlags.Default));\n }\n }\n record.value = value = useNew ? new ((_a = fn).bind.apply(_a, __spread([void 0], deps)))() : fn.apply(obj, deps);\n }\n }\n else if (!(flags & exports.InjectFlags.Self)) {\n value = parent.get(token, notFoundValue, exports.InjectFlags.Default);\n }\n return value;\n }\n function computeDeps(provider) {\n var deps = EMPTY;\n var providerDeps = provider.deps;\n if (providerDeps && providerDeps.length) {\n deps = [];\n for (var i = 0; i < providerDeps.length; i++) {\n var options = 6 /* Default */;\n var token = resolveForwardRef(providerDeps[i]);\n if (token instanceof Array) {\n for (var j = 0, annotations = token; j < annotations.length; j++) {\n var annotation = annotations[j];\n if (annotation instanceof Optional || annotation == Optional) {\n options = options | 1 /* Optional */;\n }\n else if (annotation instanceof SkipSelf || annotation == SkipSelf) {\n options = options & ~2 /* CheckSelf */;\n }\n else if (annotation instanceof Self || annotation == Self) {\n options = options & ~4 /* CheckParent */;\n }\n else if (annotation instanceof Inject) {\n token = annotation.token;\n }\n else {\n token = resolveForwardRef(annotation);\n }\n }\n }\n deps.push({ token: token, options: options });\n }\n }\n else if (provider.useExisting) {\n var token = resolveForwardRef(provider.useExisting);\n deps = [{ token: token, options: 6 /* Default */ }];\n }\n else if (!providerDeps && !(USE_VALUE in provider)) {\n // useValue & useExisting are the only ones which are exempt from deps all others need it.\n throw staticError('\\'deps\\' required', provider);\n }\n return deps;\n }\n function staticError(text, obj) {\n return new Error(formatError(text, obj, 'StaticInjectorError'));\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var ERROR_DEBUG_CONTEXT = 'ngDebugContext';\n var ERROR_ORIGINAL_ERROR = 'ngOriginalError';\n var ERROR_LOGGER = 'ngErrorLogger';\n function wrappedError(message, originalError) {\n var msg = message + \" caused by: \" + (originalError instanceof Error ? originalError.message : originalError);\n var error = Error(msg);\n error[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function findFirstClosedCycle(keys) {\n var res = [];\n for (var i = 0; i < keys.length; ++i) {\n if (res.indexOf(keys[i]) > -1) {\n res.push(keys[i]);\n return res;\n }\n res.push(keys[i]);\n }\n return res;\n }\n function constructResolvingPath(keys) {\n if (keys.length > 1) {\n var reversed = findFirstClosedCycle(keys.slice().reverse());\n var tokenStrs = reversed.map(function (k) { return stringify(k.token); });\n return ' (' + tokenStrs.join(' -> ') + ')';\n }\n return '';\n }\n function injectionError(injector, key, constructResolvingMessage, originalError) {\n var keys = [key];\n var errMsg = constructResolvingMessage(keys);\n var error = (originalError ? wrappedError(errMsg, originalError) : Error(errMsg));\n error.addKey = addKey;\n error.keys = keys;\n error.injectors = [injector];\n error.constructResolvingMessage = constructResolvingMessage;\n error[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n }\n function addKey(injector, key) {\n this.injectors.push(injector);\n this.keys.push(key);\n // Note: This updated message won't be reflected in the `.stack` property\n this.message = this.constructResolvingMessage(this.keys);\n }\n /**\n * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the\n * {@link Injector} does not have a {@link Provider} for the given key.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b:B) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n */\n function noProviderError(injector, key) {\n return injectionError(injector, key, function (keys) {\n var first = stringify(keys[0].token);\n return \"No provider for \" + first + \"!\" + constructResolvingPath(keys);\n });\n }\n /**\n * Thrown when dependencies form a cycle.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * var injector = Injector.resolveAndCreate([\n * {provide: \"one\", useFactory: (two) => \"two\", deps: [[new Inject(\"two\")]]},\n * {provide: \"two\", useFactory: (one) => \"one\", deps: [[new Inject(\"one\")]]}\n * ]);\n *\n * expect(() => injector.get(\"one\")).toThrowError();\n * ```\n *\n * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.\n */\n function cyclicDependencyError(injector, key) {\n return injectionError(injector, key, function (keys) {\n return \"Cannot instantiate cyclic dependency!\" + constructResolvingPath(keys);\n });\n }\n /**\n * Thrown when a constructing type returns with an Error.\n *\n * The `InstantiationError` class contains the original error plus the dependency graph which caused\n * this object to be instantiated.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor() {\n * throw new Error('message');\n * }\n * }\n *\n * var injector = Injector.resolveAndCreate([A]);\n\n * try {\n * injector.get(A);\n * } catch (e) {\n * expect(e instanceof InstantiationError).toBe(true);\n * expect(e.originalException.message).toEqual(\"message\");\n * expect(e.originalStack).toBeDefined();\n * }\n * ```\n */\n function instantiationError(injector, originalException, originalStack, key) {\n return injectionError(injector, key, function (keys) {\n var first = stringify(keys[0].token);\n return originalException.message + \": Error during instantiation of \" + first + \"!\" + constructResolvingPath(keys) + \".\";\n }, originalException);\n }\n /**\n * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}\n * creation.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\"not a type\"])).toThrowError();\n * ```\n */\n function invalidProviderError(provider) {\n return Error(\"Invalid provider - only instances of Provider and Type are allowed, got: \" + provider);\n }\n /**\n * Thrown when the class has no annotation information.\n *\n * Lack of annotation information prevents the {@link Injector} from determining which dependencies\n * need to be injected into the constructor.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n * constructor(b) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n *\n * This error is also thrown when the class not marked with {@link Injectable} has parameter types.\n *\n * ```typescript\n * class B {}\n *\n * class A {\n * constructor(b:B) {} // no information about the parameter types of A is available at runtime.\n * }\n *\n * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();\n * ```\n *\n */\n function noAnnotationError(typeOrFunc, params) {\n var signature = [];\n for (var i = 0, ii = params.length; i < ii; i++) {\n var parameter = params[i];\n if (!parameter || parameter.length == 0) {\n signature.push('?');\n }\n else {\n signature.push(parameter.map(stringify).join(' '));\n }\n }\n return Error('Cannot resolve all parameters for \\'' + stringify(typeOrFunc) + '\\'(' +\n signature.join(', ') + '). ' +\n 'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \\'' +\n stringify(typeOrFunc) + '\\' is decorated with Injectable.');\n }\n /**\n * Thrown when getting an object by index.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {}\n *\n * var injector = Injector.resolveAndCreate([A]);\n *\n * expect(() => injector.getAt(100)).toThrowError();\n * ```\n *\n */\n function outOfBoundsError(index) {\n return Error(\"Index \" + index + \" is out-of-bounds.\");\n }\n // TODO: add a working example after alpha38 is released\n /**\n * Thrown when a multi provider and a regular provider are bound to the same token.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\n * { provide: \"Strings\", useValue: \"string1\", multi: true},\n * { provide: \"Strings\", useValue: \"string2\", multi: false}\n * ])).toThrowError();\n * ```\n */\n function mixingMultiProvidersWithRegularProvidersError(provider1, provider2) {\n return Error(\"Cannot mix multi providers and regular providers, got: \" + provider1 + \" \" + provider2);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * A unique object used for retrieving items from the {@link ReflectiveInjector}.\n *\n * Keys have:\n * - a system-wide unique `id`.\n * - a `token`.\n *\n * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows\n * the\n * injector to store created objects in a more efficient way.\n *\n * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when\n * resolving\n * providers.\n *\n * @deprecated No replacement\n * @publicApi\n */\n var ReflectiveKey = /** @class */ (function () {\n /**\n * Private\n */\n function ReflectiveKey(token, id) {\n this.token = token;\n this.id = id;\n if (!token) {\n throw new Error('Token must be defined!');\n }\n this.displayName = stringify(this.token);\n }\n /**\n * Retrieves a `Key` for a token.\n */\n ReflectiveKey.get = function (token) {\n return _globalKeyRegistry.get(resolveForwardRef(token));\n };\n Object.defineProperty(ReflectiveKey, \"numberOfKeys\", {\n /**\n * @returns the number of keys registered in the system.\n */\n get: function () { return _globalKeyRegistry.numberOfKeys; },\n enumerable: true,\n configurable: true\n });\n return ReflectiveKey;\n }());\n var KeyRegistry = /** @class */ (function () {\n function KeyRegistry() {\n this._allKeys = new Map();\n }\n KeyRegistry.prototype.get = function (token) {\n if (token instanceof ReflectiveKey)\n return token;\n if (this._allKeys.has(token)) {\n return this._allKeys.get(token);\n }\n var newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);\n this._allKeys.set(token, newKey);\n return newKey;\n };\n Object.defineProperty(KeyRegistry.prototype, \"numberOfKeys\", {\n get: function () { return this._allKeys.size; },\n enumerable: true,\n configurable: true\n });\n return KeyRegistry;\n }());\n var _globalKeyRegistry = new KeyRegistry();\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Provides access to reflection data about symbols. Used internally by Angular\n * to power dependency injection and compilation.\n */\n var Reflector = /** @class */ (function () {\n function Reflector(reflectionCapabilities) {\n this.reflectionCapabilities = reflectionCapabilities;\n }\n Reflector.prototype.updateCapabilities = function (caps) { this.reflectionCapabilities = caps; };\n Reflector.prototype.factory = function (type) { return this.reflectionCapabilities.factory(type); };\n Reflector.prototype.parameters = function (typeOrFunc) {\n return this.reflectionCapabilities.parameters(typeOrFunc);\n };\n Reflector.prototype.annotations = function (typeOrFunc) {\n return this.reflectionCapabilities.annotations(typeOrFunc);\n };\n Reflector.prototype.propMetadata = function (typeOrFunc) {\n return this.reflectionCapabilities.propMetadata(typeOrFunc);\n };\n Reflector.prototype.hasLifecycleHook = function (type, lcProperty) {\n return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);\n };\n Reflector.prototype.getter = function (name) { return this.reflectionCapabilities.getter(name); };\n Reflector.prototype.setter = function (name) { return this.reflectionCapabilities.setter(name); };\n Reflector.prototype.method = function (name) { return this.reflectionCapabilities.method(name); };\n Reflector.prototype.importUri = function (type) { return this.reflectionCapabilities.importUri(type); };\n Reflector.prototype.resourceUri = function (type) { return this.reflectionCapabilities.resourceUri(type); };\n Reflector.prototype.resolveIdentifier = function (name, moduleUrl, members, runtime) {\n return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);\n };\n Reflector.prototype.resolveEnum = function (identifier, name) {\n return this.reflectionCapabilities.resolveEnum(identifier, name);\n };\n return Reflector;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * The {@link Reflector} used internally in Angular to access metadata\n * about symbols.\n */\n var reflector = new Reflector(new ReflectionCapabilities());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * `Dependency` is used by the framework to extend DI.\n * This is internal to Angular and should not be used directly.\n */\n var ReflectiveDependency = /** @class */ (function () {\n function ReflectiveDependency(key, optional, visibility) {\n this.key = key;\n this.optional = optional;\n this.visibility = visibility;\n }\n ReflectiveDependency.fromKey = function (key) {\n return new ReflectiveDependency(key, false, null);\n };\n return ReflectiveDependency;\n }());\n var _EMPTY_LIST = [];\n var ResolvedReflectiveProvider_ = /** @class */ (function () {\n function ResolvedReflectiveProvider_(key, resolvedFactories, multiProvider) {\n this.key = key;\n this.resolvedFactories = resolvedFactories;\n this.multiProvider = multiProvider;\n this.resolvedFactory = this.resolvedFactories[0];\n }\n return ResolvedReflectiveProvider_;\n }());\n /**\n * An internal resolved representation of a factory function created by resolving `Provider`.\n * @publicApi\n */\n var ResolvedReflectiveFactory = /** @class */ (function () {\n function ResolvedReflectiveFactory(\n /**\n * Factory function which can return an instance of an object represented by a key.\n */\n factory, \n /**\n * Arguments (dependencies) to the `factory` function.\n */\n dependencies) {\n this.factory = factory;\n this.dependencies = dependencies;\n }\n return ResolvedReflectiveFactory;\n }());\n /**\n * Resolve a single provider.\n */\n function resolveReflectiveFactory(provider) {\n var factoryFn;\n var resolvedDeps;\n if (provider.useClass) {\n var useClass = resolveForwardRef(provider.useClass);\n factoryFn = reflector.factory(useClass);\n resolvedDeps = _dependenciesFor(useClass);\n }\n else if (provider.useExisting) {\n factoryFn = function (aliasInstance) { return aliasInstance; };\n resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];\n }\n else if (provider.useFactory) {\n factoryFn = provider.useFactory;\n resolvedDeps = constructDependencies(provider.useFactory, provider.deps);\n }\n else {\n factoryFn = function () { return provider.useValue; };\n resolvedDeps = _EMPTY_LIST;\n }\n return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);\n }\n /**\n * Converts the `Provider` into `ResolvedProvider`.\n *\n * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider\n * syntax.\n */\n function resolveReflectiveProvider(provider) {\n return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n }\n /**\n * Resolve a list of Providers.\n */\n function resolveReflectiveProviders(providers) {\n var normalized = _normalizeProviders(providers, []);\n var resolved = normalized.map(resolveReflectiveProvider);\n var resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n }\n /**\n * Merges a list of ResolvedProviders into a list where each key is contained exactly once and\n * multi providers have been merged.\n */\n function mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var existing = normalizedProvidersMap.get(provider.key.id);\n if (existing) {\n if (provider.multiProvider !== existing.multiProvider) {\n throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n }\n if (provider.multiProvider) {\n for (var j = 0; j < provider.resolvedFactories.length; j++) {\n existing.resolvedFactories.push(provider.resolvedFactories[j]);\n }\n }\n else {\n normalizedProvidersMap.set(provider.key.id, provider);\n }\n }\n else {\n var resolvedProvider = void 0;\n if (provider.multiProvider) {\n resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n }\n else {\n resolvedProvider = provider;\n }\n normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n }\n }\n return normalizedProvidersMap;\n }\n function _normalizeProviders(providers, res) {\n providers.forEach(function (b) {\n if (b instanceof Type) {\n res.push({ provide: b, useClass: b });\n }\n else if (b && typeof b == 'object' && b.provide !== undefined) {\n res.push(b);\n }\n else if (b instanceof Array) {\n _normalizeProviders(b, res);\n }\n else {\n throw invalidProviderError(b);\n }\n });\n return res;\n }\n function constructDependencies(typeOrFunc, dependencies) {\n if (!dependencies) {\n return _dependenciesFor(typeOrFunc);\n }\n else {\n var params_1 = dependencies.map(function (t) { return [t]; });\n return dependencies.map(function (t) { return _extractToken(typeOrFunc, t, params_1); });\n }\n }\n function _dependenciesFor(typeOrFunc) {\n var params = reflector.parameters(typeOrFunc);\n if (!params)\n return [];\n if (params.some(function (p) { return p == null; })) {\n throw noAnnotationError(typeOrFunc, params);\n }\n return params.map(function (p) { return _extractToken(typeOrFunc, p, params); });\n }\n function _extractToken(typeOrFunc, metadata, params) {\n var token = null;\n var optional = false;\n if (!Array.isArray(metadata)) {\n if (metadata instanceof Inject) {\n return _createDependency(metadata.token, optional, null);\n }\n else {\n return _createDependency(metadata, optional, null);\n }\n }\n var visibility = null;\n for (var i = 0; i < metadata.length; ++i) {\n var paramMetadata = metadata[i];\n if (paramMetadata instanceof Type) {\n token = paramMetadata;\n }\n else if (paramMetadata instanceof Inject) {\n token = paramMetadata.token;\n }\n else if (paramMetadata instanceof Optional) {\n optional = true;\n }\n else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) {\n visibility = paramMetadata;\n }\n else if (paramMetadata instanceof InjectionToken) {\n token = paramMetadata;\n }\n }\n token = resolveForwardRef(token);\n if (token != null) {\n return _createDependency(token, optional, visibility);\n }\n else {\n throw noAnnotationError(typeOrFunc, params);\n }\n }\n function _createDependency(token, optional, visibility) {\n return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // Threshold for the dynamic version\n var UNDEFINED = new Object();\n /**\n * A ReflectiveDependency injection container used for instantiating objects and resolving\n * dependencies.\n *\n * An `Injector` is a replacement for a `new` operator, which can automatically resolve the\n * constructor dependencies.\n *\n * In typical use, application code asks for the dependencies in the constructor and they are\n * resolved by the `Injector`.\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates an `Injector` configured to create `Engine` and `Car`.\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * var car = injector.get(Car);\n * expect(car instanceof Car).toBe(true);\n * expect(car.engine instanceof Engine).toBe(true);\n * ```\n *\n * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`\n * resolve all of the object's dependencies automatically.\n *\n * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.\n * @publicApi\n */\n var ReflectiveInjector = /** @class */ (function () {\n function ReflectiveInjector() {\n }\n /**\n * Turns an array of provider definitions into an array of resolved providers.\n *\n * A resolution is a process of flattening multiple nested arrays and converting individual\n * providers into an array of `ResolvedReflectiveProvider`s.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);\n *\n * expect(providers.length).toEqual(2);\n *\n * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);\n * expect(providers[0].key.displayName).toBe(\"Car\");\n * expect(providers[0].dependencies.length).toEqual(1);\n * expect(providers[0].factory).toBeDefined();\n *\n * expect(providers[1].key.displayName).toBe(\"Engine\");\n * });\n * ```\n *\n */\n ReflectiveInjector.resolve = function (providers) {\n return resolveReflectiveProviders(providers);\n };\n /**\n * Resolves an array of providers and creates an injector from those providers.\n *\n * The passed-in providers can be an array of `Type`, `Provider`,\n * or a recursive array of more providers.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n */\n ReflectiveInjector.resolveAndCreate = function (providers, parent) {\n var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);\n };\n /**\n * Creates an injector from previously resolved providers.\n *\n * This API is the recommended way to construct injectors in performance-sensitive parts.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n * constructor(public engine:Engine) {}\n * }\n *\n * var providers = ReflectiveInjector.resolve([Car, Engine]);\n * var injector = ReflectiveInjector.fromResolvedProviders(providers);\n * expect(injector.get(Car) instanceof Car).toBe(true);\n * ```\n */\n ReflectiveInjector.fromResolvedProviders = function (providers, parent) {\n return new ReflectiveInjector_(providers, parent);\n };\n return ReflectiveInjector;\n }());\n var ReflectiveInjector_ = /** @class */ (function () {\n /**\n * Private\n */\n function ReflectiveInjector_(_providers, _parent) {\n /** @internal */\n this._constructionCounter = 0;\n this._providers = _providers;\n this.parent = _parent || null;\n var len = _providers.length;\n this.keyIds = new Array(len);\n this.objs = new Array(len);\n for (var i = 0; i < len; i++) {\n this.keyIds[i] = _providers[i].key.id;\n this.objs[i] = UNDEFINED;\n }\n }\n ReflectiveInjector_.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }\n return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);\n };\n ReflectiveInjector_.prototype.resolveAndCreateChild = function (providers) {\n var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return this.createChildFromResolved(ResolvedReflectiveProviders);\n };\n ReflectiveInjector_.prototype.createChildFromResolved = function (providers) {\n var inj = new ReflectiveInjector_(providers);\n inj.parent = this;\n return inj;\n };\n ReflectiveInjector_.prototype.resolveAndInstantiate = function (provider) {\n return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);\n };\n ReflectiveInjector_.prototype.instantiateResolved = function (provider) {\n return this._instantiateProvider(provider);\n };\n ReflectiveInjector_.prototype.getProviderAtIndex = function (index) {\n if (index < 0 || index >= this._providers.length) {\n throw outOfBoundsError(index);\n }\n return this._providers[index];\n };\n /** @internal */\n ReflectiveInjector_.prototype._new = function (provider) {\n if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {\n throw cyclicDependencyError(this, provider.key);\n }\n return this._instantiateProvider(provider);\n };\n ReflectiveInjector_.prototype._getMaxNumberOfObjects = function () { return this.objs.length; };\n ReflectiveInjector_.prototype._instantiateProvider = function (provider) {\n if (provider.multiProvider) {\n var res = new Array(provider.resolvedFactories.length);\n for (var i = 0; i < provider.resolvedFactories.length; ++i) {\n res[i] = this._instantiate(provider, provider.resolvedFactories[i]);\n }\n return res;\n }\n else {\n return this._instantiate(provider, provider.resolvedFactories[0]);\n }\n };\n ReflectiveInjector_.prototype._instantiate = function (provider, ResolvedReflectiveFactory) {\n var _this = this;\n var factory = ResolvedReflectiveFactory.factory;\n var deps;\n try {\n deps =\n ResolvedReflectiveFactory.dependencies.map(function (dep) { return _this._getByReflectiveDependency(dep); });\n }\n catch (e) {\n if (e.addKey) {\n e.addKey(this, provider.key);\n }\n throw e;\n }\n var obj;\n try {\n obj = factory.apply(void 0, __spread(deps));\n }\n catch (e) {\n throw instantiationError(this, e, e.stack, provider.key);\n }\n return obj;\n };\n ReflectiveInjector_.prototype._getByReflectiveDependency = function (dep) {\n return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);\n };\n ReflectiveInjector_.prototype._getByKey = function (key, visibility, notFoundValue) {\n if (key === ReflectiveInjector_.INJECTOR_KEY) {\n return this;\n }\n if (visibility instanceof Self) {\n return this._getByKeySelf(key, notFoundValue);\n }\n else {\n return this._getByKeyDefault(key, notFoundValue, visibility);\n }\n };\n ReflectiveInjector_.prototype._getObjByKeyId = function (keyId) {\n for (var i = 0; i < this.keyIds.length; i++) {\n if (this.keyIds[i] === keyId) {\n if (this.objs[i] === UNDEFINED) {\n this.objs[i] = this._new(this._providers[i]);\n }\n return this.objs[i];\n }\n }\n return UNDEFINED;\n };\n /** @internal */\n ReflectiveInjector_.prototype._throwOrNull = function (key, notFoundValue) {\n if (notFoundValue !== THROW_IF_NOT_FOUND) {\n return notFoundValue;\n }\n else {\n throw noProviderError(this, key);\n }\n };\n /** @internal */\n ReflectiveInjector_.prototype._getByKeySelf = function (key, notFoundValue) {\n var obj = this._getObjByKeyId(key.id);\n return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);\n };\n /** @internal */\n ReflectiveInjector_.prototype._getByKeyDefault = function (key, notFoundValue, visibility) {\n var inj;\n if (visibility instanceof SkipSelf) {\n inj = this.parent;\n }\n else {\n inj = this;\n }\n while (inj instanceof ReflectiveInjector_) {\n var inj_ = inj;\n var obj = inj_._getObjByKeyId(key.id);\n if (obj !== UNDEFINED)\n return obj;\n inj = inj_.parent;\n }\n if (inj !== null) {\n return inj.get(key.token, notFoundValue);\n }\n else {\n return this._throwOrNull(key, notFoundValue);\n }\n };\n Object.defineProperty(ReflectiveInjector_.prototype, \"displayName\", {\n get: function () {\n var providers = _mapProviders(this, function (b) { return ' \"' + b.key.displayName + '\" '; })\n .join(', ');\n return \"ReflectiveInjector(providers: [\" + providers + \"])\";\n },\n enumerable: true,\n configurable: true\n });\n ReflectiveInjector_.prototype.toString = function () { return this.displayName; };\n ReflectiveInjector_.INJECTOR_KEY = ReflectiveKey.get(Injector);\n return ReflectiveInjector_;\n }());\n function _mapProviders(injector, fn) {\n var res = new Array(injector._providers.length);\n for (var i = 0; i < injector._providers.length; ++i) {\n res[i] = fn(injector.getProviderAtIndex(i));\n }\n return res;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * A DI token that you can use to create a virtual [provider](guide/glossary#provider)\n * that will populate the `entryComponents` field of components and NgModules\n * based on its `useValue` property value.\n * All components that are referenced in the `useValue` value (either directly\n * or in a nested array or map) are added to the `entryComponents` property.\n *\n * @usageNotes\n *\n * The following example shows how the router can populate the `entryComponents`\n * field of an NgModule based on a router configuration that refers\n * to components.\n *\n * ```typescript\n * // helper function inside the router\n * function provideRoutes(routes) {\n * return [\n * {provide: ROUTES, useValue: routes},\n * {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}\n * ];\n * }\n *\n * // user code\n * let routes = [\n * {path: '/root', component: RootComp},\n * {path: '/teams', component: TeamsComp}\n * ];\n *\n * @NgModule({\n * providers: [provideRoutes(routes)]\n * })\n * class ModuleWithRoutes {}\n * ```\n *\n * @publicApi\n */\n var ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents');\n /**\n * Base class for query metadata.\n *\n * @see `ContentChildren`.\n * @see `ContentChild`.\n * @see `ViewChildren`.\n * @see `ViewChild`.\n *\n * @publicApi\n */\n var Query = /** @class */ (function () {\n function Query() {\n }\n return Query;\n }());\n var ɵ0$5 = function (selector, data) {\n if (data === void 0) { data = {}; }\n return (__assign({ selector: selector, first: false, isViewQuery: false, descendants: false }, data));\n };\n /**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\n var ContentChildren = makePropDecorator('ContentChildren', ɵ0$5, Query);\n var ɵ1$1 = function (selector, data) {\n if (data === void 0) { data = {}; }\n return (__assign({ selector: selector, first: true, isViewQuery: false, descendants: true }, data));\n };\n /**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\n var ContentChild = makePropDecorator('ContentChild', ɵ1$1, Query);\n var ɵ2 = function (selector, data) {\n if (data === void 0) { data = {}; }\n return (__assign({ selector: selector, first: false, isViewQuery: true, descendants: true }, data));\n };\n /**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var ViewChildren = makePropDecorator('ViewChildren', ɵ2, Query);\n var ɵ3 = function (selector, data) {\n return (__assign({ selector: selector, first: true, isViewQuery: true, descendants: true }, data));\n };\n /**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var ViewChild = makePropDecorator('ViewChild', ɵ3, Query);\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n (function (ChangeDetectionStrategy) {\n /**\n * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated\n * until reactivated by setting the strategy to `Default` (`CheckAlways`).\n * Change detection can still be explicitly invoked.\n * This strategy applies to all child directives and cannot be overridden.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n /**\n * Use the default `CheckAlways` strategy, in which change detection is automatic until\n * explicitly deactivated.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n })(exports.ChangeDetectionStrategy || (exports.ChangeDetectionStrategy = {}));\n (function (ChangeDetectorStatus) {\n /**\n * A state in which, after calling `detectChanges()`, the change detector\n * state becomes `Checked`, and must be explicitly invoked or reactivated.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckOnce\"] = 0] = \"CheckOnce\";\n /**\n * A state in which change detection is skipped until the change detector mode\n * becomes `CheckOnce`.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Checked\"] = 1] = \"Checked\";\n /**\n * A state in which change detection continues automatically until explicitly\n * deactivated.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckAlways\"] = 2] = \"CheckAlways\";\n /**\n * A state in which a change detector sub tree is not a part of the main tree and\n * should be skipped.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Detached\"] = 3] = \"Detached\";\n /**\n * Indicates that the change detector encountered an error checking a binding\n * or calling a directive lifecycle method and is now in an inconsistent state. Change\n * detectors in this state do not detect changes.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Errored\"] = 4] = \"Errored\";\n /**\n * Indicates that the change detector has been destroyed.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Destroyed\"] = 5] = \"Destroyed\";\n })(exports.ɵChangeDetectorStatus || (exports.ɵChangeDetectorStatus = {}));\n /**\n * Reports whether a given strategy is currently the default for change detection.\n * @param changeDetectionStrategy The strategy to check.\n * @returns True if the given strategy is the current default, false otherwise.\n * @see `ChangeDetectorStatus`\n * @see `ChangeDetectorRef`\n */\n function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {\n return changeDetectionStrategy == null ||\n changeDetectionStrategy === exports.ChangeDetectionStrategy.Default;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```\n * @Component({\n * selector: 'my-comp',\n * templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponent{\n * }\n *\n * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process\n * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.\n *\n * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into\n * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.\n *\n * // Use browser's `fetch()` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n * // After resolution all URLs have been converted into `template` strings.\n * renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible for returning a `Promise` to the\n * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.\n */\n function resolveComponentResources(resourceResolver) {\n // Store all promises which are fetching the resources.\n var componentResolved = [];\n // Cache so that we don't fetch the same resource more than once.\n var urlMap = new Map();\n function cachedResourceResolve(url) {\n var promise = urlMap.get(url);\n if (!promise) {\n var resp = resourceResolver(url);\n urlMap.set(url, promise = resp.then(unwrapResponse));\n }\n return promise;\n }\n componentResourceResolutionQueue.forEach(function (component, type) {\n var promises = [];\n if (component.templateUrl) {\n promises.push(cachedResourceResolve(component.templateUrl).then(function (template) {\n component.template = template;\n }));\n }\n var styleUrls = component.styleUrls;\n var styles = component.styles || (component.styles = []);\n var styleOffset = component.styles.length;\n styleUrls && styleUrls.forEach(function (styleUrl, index) {\n styles.push(''); // pre-allocate array.\n promises.push(cachedResourceResolve(styleUrl).then(function (style) {\n styles[styleOffset + index] = style;\n styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n if (styleUrls.length == 0) {\n component.styleUrls = undefined;\n }\n }));\n });\n var fullyResolved = Promise.all(promises).then(function () { return componentDefResolved(type); });\n componentResolved.push(fullyResolved);\n });\n clearResolutionOfComponentResourcesQueue();\n return Promise.all(componentResolved).then(function () { return undefined; });\n }\n var componentResourceResolutionQueue = new Map();\n // Track when existing ngComponentDef for a Type is waiting on resources.\n var componentDefPendingResolution = new Set();\n function maybeQueueResolutionOfComponentResources(type, metadata) {\n if (componentNeedsResolution(metadata)) {\n componentResourceResolutionQueue.set(type, metadata);\n componentDefPendingResolution.add(type);\n }\n }\n function componentNeedsResolution(component) {\n return !!((component.templateUrl && !component.hasOwnProperty('template')) ||\n component.styleUrls && component.styleUrls.length);\n }\n function clearResolutionOfComponentResourcesQueue() {\n var old = componentResourceResolutionQueue;\n componentResourceResolutionQueue = new Map();\n return old;\n }\n function isComponentResourceResolutionQueueEmpty() {\n return componentResourceResolutionQueue.size === 0;\n }\n function unwrapResponse(response) {\n return typeof response == 'string' ? response : response.text();\n }\n function componentDefResolved(type) {\n componentDefPendingResolution.delete(type);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n (function (ViewEncapsulation) {\n /**\n * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host\n * Element and pre-processing the style rules provided via {@link Component#styles styles} or\n * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all\n * selectors.\n *\n * This is the default option.\n */\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n /**\n * @deprecated v6.1.0 - use {ViewEncapsulation.ShadowDom} instead.\n * Use the native encapsulation mechanism of the renderer.\n *\n * For the DOM this means using the deprecated [Shadow DOM\n * v0](https://w3c.github.io/webcomponents/spec/shadow/) and\n * creating a ShadowRoot for Component's Host Element.\n */\n ViewEncapsulation[ViewEncapsulation[\"Native\"] = 1] = \"Native\";\n /**\n * Don't provide any template or style encapsulation.\n */\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n /**\n * Use Shadow DOM to encapsulate styles.\n *\n * For the DOM this means using modern [Shadow\n * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n * creating a ShadowRoot for Component's Host Element.\n */\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n })(exports.ViewEncapsulation || (exports.ViewEncapsulation = {}));\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Convince closure compiler that the wrapped function has no side-effects.\n *\n * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to\n * allow us to execute a function but have closure compiler mark the call as no-side-effects.\n * It is important that the return value for the `noSideEffects` function be assigned\n * to something which is retained otherwise the call to `noSideEffects` will be removed by closure\n * compiler.\n */\n function noSideEffects(fn) {\n return '' + { toString: fn };\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * This file contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\n var EMPTY_OBJ = {};\n var EMPTY_ARRAY$2 = [];\n // freezing the values prevents any code from accidentally inserting new values in\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n // These property accesses can be ignored because ngDevMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_OBJ);\n // tslint:disable-next-line:no-toplevel-property-access\n Object.freeze(EMPTY_ARRAY$2);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var NG_COMPONENT_DEF = getClosureSafeProperty({ ngComponentDef: getClosureSafeProperty });\n var NG_DIRECTIVE_DEF = getClosureSafeProperty({ ngDirectiveDef: getClosureSafeProperty });\n var NG_PIPE_DEF = getClosureSafeProperty({ ngPipeDef: getClosureSafeProperty });\n var NG_MODULE_DEF = getClosureSafeProperty({ ngModuleDef: getClosureSafeProperty });\n var NG_LOCALE_ID_DEF = getClosureSafeProperty({ ngLocaleIdDef: getClosureSafeProperty });\n var NG_BASE_DEF = getClosureSafeProperty({ ngBaseDef: getClosureSafeProperty });\n /**\n * If a directive is diPublic, bloomAdd sets a property on the type with this constant as\n * the key and the directive's unique ID as the value. This allows us to map directives to their\n * bloom filter bit for DI.\n */\n // TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.\n var NG_ELEMENT_ID = getClosureSafeProperty({ __NG_ELEMENT_ID__: getClosureSafeProperty });\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var _renderCompCount = 0;\n /**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ngComponentDef = defineComponent({\n * ...\n * });\n * }\n * ```\n * @codeGenApi\n */\n function ɵɵdefineComponent(componentDefinition) {\n var type = componentDefinition.type;\n var typePrototype = type.prototype;\n var declaredInputs = {};\n var def = {\n type: type,\n providersResolver: null,\n consts: componentDefinition.consts,\n vars: componentDefinition.vars,\n factory: componentDefinition.factory,\n template: componentDefinition.template || null,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n hostBindings: componentDefinition.hostBindings || null,\n contentQueries: componentDefinition.contentQueries || null,\n declaredInputs: declaredInputs,\n inputs: null,\n outputs: null,\n exportAs: componentDefinition.exportAs || null,\n onChanges: null,\n onInit: typePrototype.ngOnInit || null,\n doCheck: typePrototype.ngDoCheck || null,\n afterContentInit: typePrototype.ngAfterContentInit || null,\n afterContentChecked: typePrototype.ngAfterContentChecked || null,\n afterViewInit: typePrototype.ngAfterViewInit || null,\n afterViewChecked: typePrototype.ngAfterViewChecked || null,\n onDestroy: typePrototype.ngOnDestroy || null,\n onPush: componentDefinition.changeDetection === exports.ChangeDetectionStrategy.OnPush,\n directiveDefs: null,\n pipeDefs: null,\n selectors: componentDefinition.selectors,\n viewQuery: componentDefinition.viewQuery || null,\n features: componentDefinition.features || null,\n data: componentDefinition.data || {},\n // TODO(misko): convert ViewEncapsulation into const enum so that it can be used directly in the\n // next line. Also `None` should be 0 not 2.\n encapsulation: componentDefinition.encapsulation || exports.ViewEncapsulation.Emulated,\n id: 'c',\n styles: componentDefinition.styles || EMPTY_ARRAY$2,\n _: null,\n setInput: null,\n schemas: componentDefinition.schemas || null,\n tView: null,\n };\n def._ = noSideEffects(function () {\n var directiveTypes = componentDefinition.directives;\n var feature = componentDefinition.features;\n var pipeTypes = componentDefinition.pipes;\n def.id += _renderCompCount++;\n def.inputs = invertObject(componentDefinition.inputs, declaredInputs),\n def.outputs = invertObject(componentDefinition.outputs),\n feature && feature.forEach(function (fn) { return fn(def); });\n def.directiveDefs = directiveTypes ?\n function () { return (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)\n .map(extractDirectiveDef); } :\n null;\n def.pipeDefs = pipeTypes ?\n function () { return (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef); } :\n null;\n // Add ngInjectableDef so components are reachable through the module injector by default\n // (unless it has already been set by the @Injectable decorator). This is mostly to\n // support injecting components in tests. In real application code, components should\n // be retrieved through the node injector, so this isn't a problem.\n if (!type.hasOwnProperty(NG_INJECTABLE_DEF)) {\n type[NG_INJECTABLE_DEF] =\n ɵɵdefineInjectable({ token: type, factory: componentDefinition.factory });\n }\n });\n return def;\n }\n /**\n * @codeGenApi\n */\n function ɵɵsetComponentScope(type, directives, pipes) {\n var def = type.ngComponentDef;\n def.directiveDefs = function () { return directives.map(extractDirectiveDef); };\n def.pipeDefs = function () { return pipes.map(extractPipeDef); };\n }\n function extractDirectiveDef(type) {\n var def = getComponentDef(type) || getDirectiveDef(type);\n if (ngDevMode && !def) {\n throw new Error(\"'\" + type.name + \"' is neither 'ComponentType' or 'DirectiveType'.\");\n }\n return def;\n }\n function extractPipeDef(type) {\n var def = getPipeDef(type);\n if (ngDevMode && !def) {\n throw new Error(\"'\" + type.name + \"' is not a 'PipeType'.\");\n }\n return def;\n }\n /**\n * @codeGenApi\n */\n function ɵɵdefineNgModule(def) {\n var res = {\n type: def.type,\n bootstrap: def.bootstrap || EMPTY_ARRAY$2,\n declarations: def.declarations || EMPTY_ARRAY$2,\n imports: def.imports || EMPTY_ARRAY$2,\n exports: def.exports || EMPTY_ARRAY$2,\n transitiveCompileScopes: null,\n schemas: def.schemas || null,\n id: def.id || null,\n };\n return res;\n }\n /**\n * Adds the module metadata that is necessary to compute the module's transitive scope to an\n * existing module definition.\n *\n * Scope metadata of modules is not used in production builds, so calls to this function can be\n * marked pure to tree-shake it from the bundle, allowing for all referenced declarations\n * to become eligible for tree-shaking as well.\n *\n * @codeGenApi\n */\n function ɵɵsetNgModuleScope(type, scope) {\n return noSideEffects(function () {\n var ngModuleDef = getNgModuleDef(type, true);\n ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY$2;\n ngModuleDef.imports = scope.imports || EMPTY_ARRAY$2;\n ngModuleDef.exports = scope.exports || EMPTY_ARRAY$2;\n });\n }\n /**\n * Inverts an inputs or outputs lookup such that the keys, which were the\n * minified keys, are part of the values, and the values are parsed so that\n * the publicName of the property is the new key\n *\n * e.g. for\n *\n * ```\n * class Comp {\n * @Input()\n * propName1: string;\n *\n * @Input('publicName2')\n * declaredPropName2: number;\n * }\n * ```\n *\n * will be serialized as\n *\n * ```\n * {\n * propName1: 'propName1',\n * declaredPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * which is than translated by the minifier as:\n *\n * ```\n * {\n * minifiedPropName1: 'propName1',\n * minifiedPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * becomes: (public name => minifiedName)\n *\n * ```\n * {\n * 'propName1': 'minifiedPropName1',\n * 'publicName2': 'minifiedPropName2',\n * }\n * ```\n *\n * Optionally the function can take `secondary` which will result in: (public name => declared name)\n *\n * ```\n * {\n * 'propName1': 'propName1',\n * 'publicName2': 'declaredPropName2',\n * }\n * ```\n *\n\n */\n function invertObject(obj, secondary) {\n if (obj == null)\n return EMPTY_OBJ;\n var newLookup = {};\n for (var minifiedKey in obj) {\n if (obj.hasOwnProperty(minifiedKey)) {\n var publicName = obj[minifiedKey];\n var declaredName = publicName;\n if (Array.isArray(publicName)) {\n declaredName = publicName[1];\n publicName = publicName[0];\n }\n newLookup[publicName] = minifiedKey;\n if (secondary) {\n (secondary[publicName] = declaredName);\n }\n }\n }\n return newLookup;\n }\n /**\n * Create a base definition\n *\n * # Example\n * ```ts\n * class ShouldBeInherited {\n * static ngBaseDef = ɵɵdefineBase({\n * ...\n * })\n * }\n * ```\n *\n * @param baseDefinition The base definition parameters\n *\n * @codeGenApi\n */\n function ɵɵdefineBase(baseDefinition) {\n var declaredInputs = {};\n return {\n inputs: invertObject(baseDefinition.inputs, declaredInputs),\n declaredInputs: declaredInputs,\n outputs: invertObject(baseDefinition.outputs),\n viewQuery: baseDefinition.viewQuery || null,\n contentQueries: baseDefinition.contentQueries || null,\n hostBindings: baseDefinition.hostBindings || null\n };\n }\n /**\n * Create a directive definition object.\n *\n * # Example\n * ```ts\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ngDirectiveDef = ɵɵdefineDirective({\n * ...\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\n var ɵɵdefineDirective = ɵɵdefineComponent;\n /**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n * // Generated by Angular Template Compiler\n * static ngPipeDef = definePipe({\n * ...\n * });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\n function ɵɵdefinePipe(pipeDef) {\n return {\n name: pipeDef.name,\n factory: pipeDef.factory,\n pure: pipeDef.pure !== false,\n onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n };\n }\n /**\n * The following getter methods retrieve the definition form the type. Currently the retrieval\n * honors inheritance, but in the future we may change the rule to require that definitions are\n * explicit. This would require some sort of migration strategy.\n */\n function getComponentDef(type) {\n return type[NG_COMPONENT_DEF] || null;\n }\n function getDirectiveDef(type) {\n return type[NG_DIRECTIVE_DEF] || null;\n }\n function getPipeDef(type) {\n return type[NG_PIPE_DEF] || null;\n }\n function getBaseDef(type) {\n return type[NG_BASE_DEF] || null;\n }\n function getNgModuleDef(type, throwNotFound) {\n var ngModuleDef = type[NG_MODULE_DEF] || null;\n if (!ngModuleDef && throwNotFound === true) {\n throw new Error(\"Type \" + stringify(type) + \" does not have 'ngModuleDef' property.\");\n }\n return ngModuleDef;\n }\n function getNgLocaleIdDef(type) {\n return type[NG_LOCALE_ID_DEF] || null;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Returns whether the values are different from a change detection stand point.\n *\n * Constraints are relaxed in checkNoChanges mode. See `devModeEqual` for details.\n */\n function isDifferent(a, b) {\n // NaN is the only value that is not equal to itself so the first\n // test checks if both a and b are not NaN\n return !(a !== a && b !== b) && a !== b;\n }\n /**\n * Used for stringify render output in Ivy.\n * Important! This function is very performance-sensitive and we should\n * be extra careful not to introduce megamorphic reads in it.\n */\n function renderStringify(value) {\n if (typeof value === 'string')\n return value;\n if (value == null)\n return '';\n return '' + value;\n }\n /**\n * Used to stringify a value so that it can be displayed in an error message.\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\n function stringifyForError(value) {\n if (typeof value === 'function')\n return value.name || value.toString();\n if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n return value.type.name || value.type.toString();\n }\n return renderStringify(value);\n }\n var ɵ0$6 = function () {\n return (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame || // browser only\n setTimeout // everything else\n ).bind(_global);\n };\n var defaultScheduler = (ɵ0$6)();\n /**\n *\n * @codeGenApi\n */\n function ɵɵresolveWindow(element) {\n return { name: 'window', target: element.ownerDocument.defaultView };\n }\n /**\n *\n * @codeGenApi\n */\n function ɵɵresolveDocument(element) {\n return { name: 'document', target: element.ownerDocument };\n }\n /**\n *\n * @codeGenApi\n */\n function ɵɵresolveBody(element) {\n return { name: 'body', target: element.ownerDocument.body };\n }\n /**\n * The special delimiter we use to separate property names, prefixes, and suffixes\n * in property binding metadata. See storeBindingMetadata().\n *\n * We intentionally use the Unicode \"REPLACEMENT CHARACTER\" (U+FFFD) as a delimiter\n * because it is a very uncommon character that is unlikely to be part of a user's\n * property names or interpolation strings. If it is in fact used in a property\n * binding, DebugElement.properties will not return the correct value for that\n * binding. However, there should be no runtime effect for real applications.\n *\n * This character is typically rendered as a question mark inside of a diamond.\n * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)\n *\n */\n var INTERPOLATION_DELIMITER = \"\\uFFFD\";\n /**\n * Determines whether or not the given string is a property metadata string.\n * See storeBindingMetadata().\n */\n function isPropMetadataString(str) {\n return str.indexOf(INTERPOLATION_DELIMITER) >= 0;\n }\n /**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\n function maybeUnwrapFn(value) {\n if (value instanceof Function) {\n return value();\n }\n else {\n return value;\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // Below are constants for LView indices to help us look up LView members\n // without having to remember the specific indices.\n // Uglify will inline these when minifying so there shouldn't be a cost.\n var HOST = 0;\n var TVIEW = 1;\n var FLAGS = 2;\n var PARENT = 3;\n var NEXT = 4;\n var QUERIES = 5;\n var T_HOST = 6;\n var BINDING_INDEX = 7;\n var CLEANUP = 8;\n var CONTEXT = 9;\n var INJECTOR$1 = 10;\n var RENDERER_FACTORY = 11;\n var RENDERER = 12;\n var SANITIZER = 13;\n var CHILD_HEAD = 14;\n var CHILD_TAIL = 15;\n var CONTENT_QUERIES = 16;\n var DECLARATION_VIEW = 17;\n var PREORDER_HOOK_FLAGS = 18;\n /** Size of LView's header. Necessary to adjust for it when setting slots. */\n var HEADER_OFFSET = 20;\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function assertEqual(actual, expected, msg) {\n if (actual != expected) {\n throwError(msg);\n }\n }\n function assertNotEqual(actual, expected, msg) {\n if (actual == expected) {\n throwError(msg);\n }\n }\n function assertNotSame(actual, expected, msg) {\n if (actual === expected) {\n throwError(msg);\n }\n }\n function assertLessThan(actual, expected, msg) {\n if (actual >= expected) {\n throwError(msg);\n }\n }\n function assertGreaterThan(actual, expected, msg) {\n if (actual <= expected) {\n throwError(msg);\n }\n }\n function assertDefined(actual, msg) {\n if (actual == null) {\n throwError(msg);\n }\n }\n function throwError(msg) {\n // tslint:disable-next-line\n debugger; // Left intentionally for better debugger experience.\n throw new Error(\"ASSERTION ERROR: \" + msg);\n }\n function assertDomNode(node) {\n // If we're in a worker, `Node` will not be defined.\n assertEqual((typeof Node !== 'undefined' && node instanceof Node) ||\n (typeof node === 'object' && node.constructor.name === 'WebWorkerRenderNode'), true, \"The provided value must be an instance of a DOM Node but got \" + stringify(node));\n }\n function assertDataInRange(arr, index) {\n var maxLen = arr ? arr.length : 0;\n assertLessThan(index, maxLen, \"Index expected to be less than \" + maxLen + \" but got \" + index);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Special location which allows easy identification of type. If we have an array which was\n * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is\n * `LContainer`.\n */\n var TYPE = 1;\n /**\n * Below are constants for LContainer indices to help us look up LContainer members\n * without having to remember the specific indices.\n * Uglify will inline these when minifying so there shouldn't be a cost.\n */\n var ACTIVE_INDEX = 2;\n // PARENT, NEXT, QUERIES and T_HOST are indices 3, 4, 5 and 6.\n // As we already have these constants in LView, we don't need to re-create them.\n var NATIVE = 7;\n var VIEW_REFS = 8;\n /**\n * Size of LContainer's header. Represents the index after which all views in the\n * container will be inserted. We need to keep a record of current views so we know\n * which views are already in the DOM (and don't need to be re-added) and so we can\n * remove views from the DOM when they are no longer required.\n */\n var CONTAINER_HEADER_OFFSET = 9;\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * This property will be monkey-patched on elements, components and directives\n */\n var MONKEY_PATCH_KEY_NAME = '__ngContext__';\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`,\n * `StylingContext`) in same location in `LView`. This is because we don't want to pre-allocate\n * space for it because the storage is sparse. This file contains utilities for dealing with such\n * data types.\n *\n * How do we know what is stored at a given location in `LView`.\n * - `Array.isArray(value) === false` => `RNode` (The normal storage value)\n * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value.\n * - `typeof value[TYPE] === 'object'` => `LView`\n * - This happens when we have a component at a given location\n * - `typeof value[TYPE] === 'number'` => `StylingContext`\n * - This happens when we have style/class binding at a given location.\n * - `typeof value[TYPE] === true` => `LContainer`\n * - This happens when we have `LContainer` binding at a given location.\n *\n *\n * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient.\n */\n /**\n * Returns `RNode`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\n function unwrapRNode(value) {\n while (Array.isArray(value)) {\n value = value[HOST];\n }\n return value;\n }\n /**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\n function isLView(value) {\n return Array.isArray(value) && typeof value[TYPE] === 'object';\n }\n /**\n * True if `value` is `LContainer`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\n function isLContainer(value) {\n return Array.isArray(value) && value[TYPE] === true;\n }\n /**\n * True if `value` is `StylingContext`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`, `StylingContext`\n */\n function isStylingContext(value) {\n return Array.isArray(value) && typeof value[TYPE] === 'number';\n }\n /**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\n function getNativeByIndex(index, lView) {\n return unwrapRNode(lView[index + HEADER_OFFSET]);\n }\n function getNativeByTNode(tNode, hostView) {\n return unwrapRNode(hostView[tNode.index]);\n }\n /**\n * A helper function that returns `true` if a given `TNode` has any matching directives.\n */\n function hasDirectives(tNode) {\n return tNode.directiveEnd > tNode.directiveStart;\n }\n function getTNode(index, view) {\n ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n ngDevMode && assertLessThan(index, view[TVIEW].data.length, 'wrong index for TNode');\n return view[TVIEW].data[index + HEADER_OFFSET];\n }\n /** Retrieves a value from any `LView` or `TData`. */\n function loadInternal(view, index) {\n ngDevMode && assertDataInRange(view, index + HEADER_OFFSET);\n return view[index + HEADER_OFFSET];\n }\n function getComponentViewByIndex(nodeIndex, hostView) {\n // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n var slotValue = hostView[nodeIndex];\n var lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n return lView;\n }\n function isContentQueryHost(tNode) {\n return (tNode.flags & 4 /* hasContentQuery */) !== 0;\n }\n function isComponent(tNode) {\n return (tNode.flags & 1 /* isComponent */) === 1 /* isComponent */;\n }\n function isComponentDef(def) {\n return def.template !== null;\n }\n function isRootView(target) {\n return (target[FLAGS] & 512 /* IsRoot */) !== 0;\n }\n /**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\n function readPatchedData(target) {\n ngDevMode && assertDefined(target, 'Target expected');\n return target[MONKEY_PATCH_KEY_NAME];\n }\n function readPatchedLView(target) {\n var value = readPatchedData(target);\n if (value) {\n return Array.isArray(value) ? value : value.lView;\n }\n return null;\n }\n /**\n * Returns a boolean for whether the view is attached to the change detection tree.\n *\n * Note: This determines whether a view should be checked, not whether it's inserted\n * into a container. For that, you'll want `viewAttachedToContainer` below.\n */\n function viewAttachedToChangeDetector(view) {\n return (view[FLAGS] & 128 /* Attached */) === 128 /* Attached */;\n }\n /** Returns a boolean for whether the view is attached to a container. */\n function viewAttachedToContainer(view) {\n return isLContainer(view[PARENT]);\n }\n /**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\n function resetPreOrderHookFlags(lView) {\n lView[PREORDER_HOOK_FLAGS] = 0;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function assertComponentType(actual, msg) {\n if (msg === void 0) { msg = 'Type passed in is not ComponentType, it does not have \\'ngComponentDef\\' property.'; }\n if (!getComponentDef(actual)) {\n throwError(msg);\n }\n }\n function assertNgModuleType(actual, msg) {\n if (msg === void 0) { msg = 'Type passed in is not NgModuleType, it does not have \\'ngModuleDef\\' property.'; }\n if (!getNgModuleDef(actual)) {\n throwError(msg);\n }\n }\n function assertPreviousIsParent(isParent) {\n assertEqual(isParent, true, 'previousOrParentTNode should be a parent');\n }\n function assertHasParent(tNode) {\n assertDefined(tNode, 'previousOrParentTNode should exist!');\n assertDefined(tNode.parent, 'previousOrParentTNode should have a parent');\n }\n function assertLContainerOrUndefined(value) {\n value && assertEqual(isLContainer(value), true, 'Expecting LContainer or undefined or null');\n }\n function assertLContainer(value) {\n assertDefined(value, 'LContainer must be defined');\n assertEqual(isLContainer(value), true, 'Expecting LContainer');\n }\n function assertLViewOrUndefined(value) {\n value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n }\n function assertLView(value) {\n assertDefined(value, 'LView must be defined');\n assertEqual(isLView(value), true, 'Expecting LView');\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`.\n *\n * Must be run *only* on the first template pass.\n *\n * Sets up the pre-order hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * @param directiveIndex The index of the directive in LView\n * @param directiveDef The definition containing the hooks to setup in tView\n * @param tView The current TView\n * @param nodeIndex The index of the node to which the directive is attached\n * @param initialPreOrderHooksLength the number of pre-order hooks already registered before the\n * current process, used to know if the node index has to be added to the array. If it is -1,\n * the node index is never added.\n * @param initialPreOrderCheckHooksLength same as previous for pre-order check hooks\n */\n function registerPreOrderHooks(directiveIndex, directiveDef, tView, nodeIndex, initialPreOrderHooksLength, initialPreOrderCheckHooksLength) {\n ngDevMode &&\n assertEqual(tView.firstTemplatePass, true, 'Should only be called on first template pass');\n var onChanges = directiveDef.onChanges, onInit = directiveDef.onInit, doCheck = directiveDef.doCheck;\n if (initialPreOrderHooksLength >= 0 &&\n (!tView.preOrderHooks || initialPreOrderHooksLength === tView.preOrderHooks.length) &&\n (onChanges || onInit || doCheck)) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(nodeIndex);\n }\n if (initialPreOrderCheckHooksLength >= 0 &&\n (!tView.preOrderCheckHooks ||\n initialPreOrderCheckHooksLength === tView.preOrderCheckHooks.length) &&\n (onChanges || doCheck)) {\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(nodeIndex);\n }\n if (onChanges) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, onChanges);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, onChanges);\n }\n if (onInit) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(-directiveIndex, onInit);\n }\n if (doCheck) {\n (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, doCheck);\n (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, doCheck);\n }\n }\n /**\n *\n * Loops through the directives on the provided `tNode` and queues hooks to be\n * run that are not initialization hooks.\n *\n * Should be executed during `elementEnd()` and similar to\n * preserve hook execution order. Content, view, and destroy hooks for projected\n * components and directives must be called *before* their hosts.\n *\n * Sets up the content, view, and destroy hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up\n * separately at `elementStart`.\n *\n * @param tView The current TView\n * @param tNode The TNode whose directives are to be searched for hooks to queue\n */\n function registerPostOrderHooks(tView, tNode) {\n if (tView.firstTemplatePass) {\n // It's necessary to loop through the directives at elementEnd() (rather than processing in\n // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n // hooks for projected components and directives must be called *before* their hosts.\n for (var i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n var directiveDef = tView.data[i];\n if (directiveDef.afterContentInit) {\n (tView.contentHooks || (tView.contentHooks = [])).push(-i, directiveDef.afterContentInit);\n }\n if (directiveDef.afterContentChecked) {\n (tView.contentHooks || (tView.contentHooks = [])).push(i, directiveDef.afterContentChecked);\n (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, directiveDef.afterContentChecked);\n }\n if (directiveDef.afterViewInit) {\n (tView.viewHooks || (tView.viewHooks = [])).push(-i, directiveDef.afterViewInit);\n }\n if (directiveDef.afterViewChecked) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, directiveDef.afterViewChecked);\n (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, directiveDef.afterViewChecked);\n }\n if (directiveDef.onDestroy != null) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(i, directiveDef.onDestroy);\n }\n }\n }\n }\n /**\n * Executing hooks requires complex logic as we need to deal with 2 constraints.\n *\n * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only\n * once, across many change detection cycles. This must be true even if some hooks throw, or if\n * some recursively trigger a change detection cycle.\n * To solve that, it is required to track the state of the execution of these init hooks.\n * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},\n * and the index within that phase. They can be seen as a cursor in the following structure:\n * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]\n * They are are stored as flags in LView[FLAGS].\n *\n * 2. Pre-order hooks can be executed in batches, because of the select instruction.\n * To be able to pause and resume their execution, we also need some state about the hook's array\n * that is being processed:\n * - the index of the next hook to be executed\n * - the number of init hooks already found in the processed part of the array\n * They are are stored as flags in LView[PREORDER_HOOK_FLAGS].\n */\n /**\n * Executes necessary hooks at the start of executing a template.\n *\n * Executes hooks that are to be run during the initialization of a directive such\n * as `onChanges`, `onInit`, and `doCheck`.\n *\n * @param lView The current view\n * @param tView Static data for the view containing the hooks to be executed\n * @param checkNoChangesMode Whether or not we're in checkNoChanges mode.\n * @param @param currentNodeIndex 2 cases depending the the value:\n * - undefined: execute hooks only from the saved index until the end of the array (pre-order case,\n * when flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\n function executePreOrderHooks(currentView, tView, checkNoChangesMode, currentNodeIndex) {\n if (!checkNoChangesMode) {\n executeHooks(currentView, tView.preOrderHooks, tView.preOrderCheckHooks, checkNoChangesMode, 0 /* OnInitHooksToBeRun */, currentNodeIndex !== undefined ? currentNodeIndex : null);\n }\n }\n /**\n * Executes hooks against the given `LView` based off of whether or not\n * This is the first pass.\n *\n * @param currentView The view instance data to run the hooks against\n * @param firstPassHooks An array of hooks to run if we're in the first view pass\n * @param checkHooks An Array of hooks to run if we're not in the first view pass.\n * @param checkNoChangesMode Whether or not we're in no changes mode.\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending the the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\n function executeHooks(currentView, firstPassHooks, checkHooks, checkNoChangesMode, initPhaseState, currentNodeIndex) {\n if (checkNoChangesMode)\n return;\n var hooksToCall = (currentView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhaseState ?\n firstPassHooks :\n checkHooks;\n if (hooksToCall) {\n callHooks(currentView, hooksToCall, initPhaseState, currentNodeIndex);\n }\n // The init phase state must be always checked here as it may have been recursively updated\n if (currentNodeIndex == null &&\n (currentView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhaseState &&\n initPhaseState !== 3 /* InitPhaseCompleted */) {\n currentView[FLAGS] &= 1023 /* IndexWithinInitPhaseReset */;\n currentView[FLAGS] += 1 /* InitPhaseStateIncrementer */;\n }\n }\n /**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * the first LView pass\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending the the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\n function callHooks(currentView, arr, initPhase, currentNodeIndex) {\n var startIndex = currentNodeIndex !== undefined ?\n (currentView[PREORDER_HOOK_FLAGS] & 65535 /* IndexOfTheNextPreOrderHookMaskMask */) :\n 0;\n var nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n var lastNodeIndexFound = 0;\n for (var i = startIndex; i < arr.length; i++) {\n var hook = arr[i + 1];\n if (typeof hook === 'number') {\n lastNodeIndexFound = arr[i];\n if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n break;\n }\n }\n else {\n var isInitHook = arr[i] < 0;\n if (isInitHook)\n currentView[PREORDER_HOOK_FLAGS] += 65536 /* NumberOfInitHooksCalledIncrementer */;\n if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n callHook(currentView, initPhase, arr, i);\n currentView[PREORDER_HOOK_FLAGS] =\n (currentView[PREORDER_HOOK_FLAGS] & 4294901760 /* NumberOfInitHooksCalledMask */) + i +\n 2;\n }\n i++;\n }\n }\n }\n /**\n * Execute one hook against the current `LView`.\n *\n * @param currentView The current view\n * @param initPhaseState the current state of the init phase\n * @param arr The array in which the hooks are found\n * @param i The current index within the hook data array\n */\n function callHook(currentView, initPhase, arr, i) {\n var isInitHook = arr[i] < 0;\n var hook = arr[i + 1];\n var directiveIndex = isInitHook ? -arr[i] : arr[i];\n var directive = currentView[directiveIndex];\n if (isInitHook) {\n var indexWithintInitPhase = currentView[FLAGS] >> 10 /* IndexWithinInitPhaseShift */;\n // The init phase state must be always checked here as it may have been recursively\n // updated\n if (indexWithintInitPhase <\n (currentView[PREORDER_HOOK_FLAGS] >> 16 /* NumberOfInitHooksCalledShift */) &&\n (currentView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) {\n currentView[FLAGS] += 1024 /* IndexWithinInitPhaseIncrementer */;\n hook.call(directive);\n }\n }\n else {\n hook.call(directive);\n }\n }\n\n var stylingContext = null;\n /**\n * Gets the most recent styling context value.\n *\n * Note that only one styling context is stored at a given time.\n */\n function getCachedStylingContext() {\n return stylingContext;\n }\n /**\n * Sets the most recent styling context value.\n *\n * Note that only one styling context is stored at a given time.\n *\n * @param context The styling context value that will be stored\n */\n function setCachedStylingContext(context) {\n stylingContext = context;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Store the element depth count. This is used to identify the root elements of the template\n * so that we can than attach `LView` to only those elements.\n */\n var elementDepthCount;\n function getElementDepthCount() {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return elementDepthCount;\n }\n function increaseElementDepthCount() {\n elementDepthCount++;\n }\n function decreaseElementDepthCount() {\n elementDepthCount--;\n }\n var currentDirectiveDef = null;\n function getCurrentDirectiveDef() {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return currentDirectiveDef;\n }\n function setCurrentDirectiveDef(def) {\n currentDirectiveDef = def;\n }\n /**\n * Stores whether directives should be matched to elements.\n *\n * When template contains `ngNonBindable` than we need to prevent the runtime form matching\n * directives on children of that element.\n *\n * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * </div>\n * ```\n */\n var bindingsEnabled;\n function getBindingsEnabled() {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return bindingsEnabled;\n }\n /**\n * Enables directive matching on elements.\n *\n * * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\n function ɵɵenableBindings() {\n bindingsEnabled = true;\n }\n /**\n * Disables directive matching on element.\n *\n * * Example:\n * ```\n * <my-comp my-directive>\n * Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n * <!-- ɵɵdisableBindings() -->\n * <my-comp my-directive>\n * Should not match component / directive because we are in ngNonBindable.\n * </my-comp>\n * <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\n function ɵɵdisableBindings() {\n bindingsEnabled = false;\n }\n function getLView() {\n return lView;\n }\n /**\n * Used as the starting directive id value.\n *\n * All subsequent directives are incremented from this value onwards.\n * The reason why this value is `1` instead of `0` is because the `0`\n * value is reserved for the template.\n */\n var MIN_DIRECTIVE_ID = 1;\n var activeDirectiveId = MIN_DIRECTIVE_ID;\n /**\n * Position depth (with respect from leaf to root) in a directive sub-class inheritance chain.\n */\n var activeDirectiveSuperClassDepthPosition = 0;\n /**\n * Total count of how many directives are a part of an inheritance chain.\n *\n * When directives are sub-classed (extended) from one to another, Angular\n * needs to keep track of exactly how many were encountered so it can accurately\n * generate the next directive id (once the next directive id is visited).\n * Normally the next directive id just a single incremented value from the\n * previous one, however, if the previous directive is a part of an inheritance\n * chain (a series of sub-classed directives) then the incremented value must\n * also take into account the total amount of sub-classed values.\n *\n * Note that this value resets back to zero once the next directive is\n * visited (when `incrementActiveDirectiveId` or `setActiveHostElement`\n * is called).\n */\n var activeDirectiveSuperClassHeight = 0;\n /**\n * Sets the active directive host element and resets the directive id value\n * (when the provided elementIndex value has changed).\n *\n * @param elementIndex the element index value for the host element where\n * the directive/component instance lives\n */\n function setActiveHostElement(elementIndex) {\n if (elementIndex === void 0) { elementIndex = null; }\n if (_selectedIndex !== elementIndex) {\n setSelectedIndex(elementIndex == null ? -1 : elementIndex);\n activeDirectiveId = elementIndex == null ? 0 : MIN_DIRECTIVE_ID;\n activeDirectiveSuperClassDepthPosition = 0;\n activeDirectiveSuperClassHeight = 0;\n }\n }\n /**\n * Returns the current id value of the current directive.\n *\n * For example we have an element that has two directives on it:\n * <div dir-one dir-two></div>\n *\n * dirOne->hostBindings() (id == 1)\n * dirTwo->hostBindings() (id == 2)\n *\n * Note that this is only active when `hostBinding` functions are being processed.\n *\n * Note that directive id values are specific to an element (this means that\n * the same id value could be present on another element with a completely\n * different set of directives).\n */\n function getActiveDirectiveId() {\n return activeDirectiveId;\n }\n /**\n * Increments the current directive id value.\n *\n * For example we have an element that has two directives on it:\n * <div dir-one dir-two></div>\n *\n * dirOne->hostBindings() (index = 1)\n * // increment\n * dirTwo->hostBindings() (index = 2)\n *\n * Depending on whether or not a previous directive had any inherited\n * directives present, that value will be incremented in addition\n * to the id jumping up by one.\n *\n * Note that this is only active when `hostBinding` functions are being processed.\n *\n * Note that directive id values are specific to an element (this means that\n * the same id value could be present on another element with a completely\n * different set of directives).\n */\n function incrementActiveDirectiveId() {\n activeDirectiveId += 1 + activeDirectiveSuperClassHeight;\n // because we are dealing with a new directive this\n // means we have exited out of the inheritance chain\n activeDirectiveSuperClassDepthPosition = 0;\n activeDirectiveSuperClassHeight = 0;\n }\n /**\n * Set the current super class (reverse inheritance) position depth for a directive.\n *\n * For example we have two directives: Child and Other (but Child is a sub-class of Parent)\n * <div child-dir other-dir></div>\n *\n * // increment\n * parentInstance->hostBindings() (depth = 1)\n * // decrement\n * childInstance->hostBindings() (depth = 0)\n * otherInstance->hostBindings() (depth = 0 b/c it's a different directive)\n *\n * Note that this is only active when `hostBinding` functions are being processed.\n */\n function adjustActiveDirectiveSuperClassDepthPosition(delta) {\n activeDirectiveSuperClassDepthPosition += delta;\n // we keep track of the height value so that when the next directive is visited\n // then Angular knows to generate a new directive id value which has taken into\n // account how many sub-class directives were a part of the previous directive.\n activeDirectiveSuperClassHeight =\n Math.max(activeDirectiveSuperClassHeight, activeDirectiveSuperClassDepthPosition);\n }\n /**\n * Returns he current depth of the super/sub class inheritance chain.\n *\n * This will return how many inherited directive/component classes\n * exist in the current chain.\n *\n * ```typescript\n * @Directive({ selector: '[super-dir]' })\n * class SuperDir {}\n *\n * @Directive({ selector: '[sub-dir]' })\n * class SubDir extends SuperDir {}\n *\n * // if `<div sub-dir>` is used then the super class height is `1`\n * // if `<div super-dir>` is used then the super class height is `0`\n * ```\n */\n function getActiveDirectiveSuperClassHeight() {\n return activeDirectiveSuperClassHeight;\n }\n /**\n * Returns the current super class (reverse inheritance) depth for a directive.\n *\n * This is designed to help instruction code distinguish different hostBindings\n * calls from each other when a directive has extended from another directive.\n * Normally using the directive id value is enough, but with the case\n * of parent/sub-class directive inheritance more information is required.\n *\n * Note that this is only active when `hostBinding` functions are being processed.\n */\n function getActiveDirectiveSuperClassDepth() {\n return activeDirectiveSuperClassDepthPosition;\n }\n /**\n * Restores `contextViewData` to the given OpaqueViewState instance.\n *\n * Used in conjunction with the getCurrentView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @param viewToRestore The OpaqueViewState instance to restore.\n *\n * @codeGenApi\n */\n function ɵɵrestoreView(viewToRestore) {\n contextLView = viewToRestore;\n }\n /** Used to set the parent property when nodes are created and track query results. */\n var previousOrParentTNode;\n function getPreviousOrParentTNode() {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return previousOrParentTNode;\n }\n function setPreviousOrParentTNode(tNode, _isParent) {\n previousOrParentTNode = tNode;\n isParent = _isParent;\n }\n function setTNodeAndViewData(tNode, view) {\n ngDevMode && assertLViewOrUndefined(view);\n previousOrParentTNode = tNode;\n lView = view;\n }\n /**\n * If `isParent` is:\n * - `true`: then `previousOrParentTNode` points to a parent node.\n * - `false`: then `previousOrParentTNode` points to previous node (sibling).\n */\n var isParent;\n function getIsParent() {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return isParent;\n }\n function setIsNotParent() {\n isParent = false;\n }\n function setIsParent() {\n isParent = true;\n }\n /** Checks whether a given view is in creation mode */\n function isCreationMode(view) {\n if (view === void 0) { view = lView; }\n return (view[FLAGS] & 4 /* CreationMode */) === 4 /* CreationMode */;\n }\n /**\n * State of the current view being processed.\n *\n * An array of nodes (text, element, container, etc), pipes, their bindings, and\n * any local variables that need to be stored between invocations.\n */\n var lView;\n /**\n * The last viewData retrieved by nextContext().\n * Allows building nextContext() and reference() calls.\n *\n * e.g. const inner = x().$implicit; const outer = x().$implicit;\n */\n var contextLView = null;\n function getContextLView() {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return contextLView;\n }\n /**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n */\n var checkNoChangesMode = false;\n function getCheckNoChangesMode() {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return checkNoChangesMode;\n }\n function setCheckNoChangesMode(mode) {\n checkNoChangesMode = mode;\n }\n /**\n * The root index from which pure function instructions should calculate their binding\n * indices. In component views, this is TView.bindingStartIndex. In a host binding\n * context, this is the TView.expandoStartIndex + any dirs/hostVars before the given dir.\n */\n var bindingRootIndex = -1;\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n function getBindingRoot() {\n return bindingRootIndex;\n }\n function setBindingRoot(value) {\n bindingRootIndex = value;\n }\n /**\n * Current index of a View or Content Query which needs to be processed next.\n * We iterate over the list of Queries and increment current query index at every step.\n */\n var currentQueryIndex = 0;\n function getCurrentQueryIndex() {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return currentQueryIndex;\n }\n function setCurrentQueryIndex(value) {\n currentQueryIndex = value;\n }\n /**\n * Swap the current state with a new state.\n *\n * For performance reasons we store the state in the top level of the module.\n * This way we minimize the number of properties to read. Whenever a new view\n * is entered we have to store the state for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New state to become active\n * @param host Element to which the View is a child of\n * @returns the previous state;\n */\n function enterView(newView, hostTNode) {\n ngDevMode && assertLViewOrUndefined(newView);\n var oldView = lView;\n if (newView) {\n var tView = newView[TVIEW];\n bindingRootIndex = tView.bindingStartIndex;\n }\n previousOrParentTNode = hostTNode;\n isParent = true;\n lView = contextLView = newView;\n return oldView;\n }\n function nextContextImpl(level) {\n if (level === void 0) { level = 1; }\n contextLView = walkUpViews(level, contextLView);\n return contextLView[CONTEXT];\n }\n function walkUpViews(nestingLevel, currentView) {\n while (nestingLevel > 0) {\n ngDevMode && assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.');\n currentView = currentView[DECLARATION_VIEW];\n nestingLevel--;\n }\n return currentView;\n }\n /**\n * Resets the application state.\n */\n function resetComponentState() {\n isParent = false;\n previousOrParentTNode = null;\n elementDepthCount = 0;\n bindingsEnabled = true;\n }\n /**\n * Used in lieu of enterView to make it clear when we are exiting a child view. This makes\n * the direction of traversal (up or down the view tree) a bit clearer.\n *\n * @param newView New state to become active\n * @param safeToRunHooks Whether the runtime is in a state where running lifecycle hooks is valid.\n * This is not always the case (for example, the application may have crashed and `leaveView` is\n * being executed while unwinding the call stack).\n */\n function leaveView(newView, safeToRunHooks) {\n var tView = lView[TVIEW];\n if (isCreationMode(lView)) {\n lView[FLAGS] &= ~4 /* CreationMode */;\n }\n else {\n try {\n resetPreOrderHookFlags(lView);\n safeToRunHooks && executeHooks(lView, tView.viewHooks, tView.viewCheckHooks, checkNoChangesMode, 2 /* AfterViewInitHooksToBeRun */, undefined);\n }\n finally {\n // Views are clean and in update mode after being checked, so these bits are cleared\n lView[FLAGS] &= ~(64 /* Dirty */ | 8 /* FirstLViewPass */);\n lView[BINDING_INDEX] = tView.bindingStartIndex;\n }\n }\n setCachedStylingContext(null);\n enterView(newView, null);\n }\n var _selectedIndex = -1;\n /**\n * Gets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\n function getSelectedIndex() {\n return _selectedIndex;\n }\n /**\n * Sets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\n function setSelectedIndex(index) {\n _selectedIndex = index;\n // remove the styling context from the cache\n // because we are now on a different element\n setCachedStylingContext(null);\n }\n var _currentNamespace = null;\n /**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\n function ɵɵnamespaceSVG() {\n _currentNamespace = 'http://www.w3.org/2000/svg';\n }\n /**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\n function ɵɵnamespaceMathML() {\n _currentNamespace = 'http://www.w3.org/1998/MathML/';\n }\n /**\n * Sets the namespace used to create elements no `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\n function ɵɵnamespaceHTML() {\n _currentNamespace = null;\n }\n function getNamespace() {\n return _currentNamespace;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var BRAND = '__SANITIZER_TRUSTED_BRAND__';\n function allowSanitizationBypass(value, type) {\n return (value instanceof String && value[BRAND] === type);\n }\n /**\n * Mark `html` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link htmlSanitizer} to be trusted implicitly.\n *\n * @param trustedHtml `html` string which needs to be implicitly trusted.\n * @returns a `html` `String` which has been branded to be implicitly trusted.\n */\n function bypassSanitizationTrustHtml(trustedHtml) {\n return bypassSanitizationTrustString(trustedHtml, \"Html\" /* Html */);\n }\n /**\n * Mark `style` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link styleSanitizer} to be trusted implicitly.\n *\n * @param trustedStyle `style` string which needs to be implicitly trusted.\n * @returns a `style` `String` which has been branded to be implicitly trusted.\n */\n function bypassSanitizationTrustStyle(trustedStyle) {\n return bypassSanitizationTrustString(trustedStyle, \"Style\" /* Style */);\n }\n /**\n * Mark `script` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link scriptSanitizer} to be trusted implicitly.\n *\n * @param trustedScript `script` string which needs to be implicitly trusted.\n * @returns a `script` `String` which has been branded to be implicitly trusted.\n */\n function bypassSanitizationTrustScript(trustedScript) {\n return bypassSanitizationTrustString(trustedScript, \"Script\" /* Script */);\n }\n /**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link urlSanitizer} to be trusted implicitly.\n *\n * @param trustedUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` `String` which has been branded to be implicitly trusted.\n */\n function bypassSanitizationTrustUrl(trustedUrl) {\n return bypassSanitizationTrustString(trustedUrl, \"Url\" /* Url */);\n }\n /**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.\n *\n * @param trustedResourceUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` `String` which has been branded to be implicitly trusted.\n */\n function bypassSanitizationTrustResourceUrl(trustedResourceUrl) {\n return bypassSanitizationTrustString(trustedResourceUrl, \"ResourceUrl\" /* ResourceUrl */);\n }\n function bypassSanitizationTrustString(trustedString, mode) {\n var trusted = new String(trustedString);\n trusted[BRAND] = mode;\n return trusted;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * This file is used to control if the default rendering pipeline should be `ViewEngine` or `Ivy`.\n *\n * For more information on how to run and debug tests with either Ivy or View Engine (legacy),\n * please see [BAZEL.md](./docs/BAZEL.md).\n */\n var _devMode = true;\n var _runModeLocked = false;\n /**\n * Returns whether Angular is in development mode. After called once,\n * the value is locked and won't change any more.\n *\n * By default, this is true, unless a user calls `enableProdMode` before calling this.\n *\n * @publicApi\n */\n function isDevMode() {\n _runModeLocked = true;\n return _devMode;\n }\n /**\n * Disable Angular's development mode, which turns off assertions and other\n * checks within the framework.\n *\n * One important assertion this disables verifies that a change detection pass\n * does not result in additional changes to any bindings (also known as\n * unidirectional data flow).\n *\n * @publicApi\n */\n function enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n _devMode = false;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * This helper class is used to get hold of an inert tree of DOM elements containing dirty HTML\n * that needs sanitizing.\n * Depending upon browser support we must use one of three strategies for doing this.\n * Support: Safari 10.x -> XHR strategy\n * Support: Firefox -> DomParser strategy\n * Default: InertDocument strategy\n */\n var InertBodyHelper = /** @class */ (function () {\n function InertBodyHelper(defaultDoc) {\n this.defaultDoc = defaultDoc;\n this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n this.inertBodyElement = this.inertDocument.body;\n if (this.inertBodyElement == null) {\n // usually there should be only one body element in the document, but IE doesn't have any, so\n // we need to create one.\n var inertHtml = this.inertDocument.createElement('html');\n this.inertDocument.appendChild(inertHtml);\n this.inertBodyElement = this.inertDocument.createElement('body');\n inertHtml.appendChild(this.inertBodyElement);\n }\n this.inertBodyElement.innerHTML = '<svg><g onload=\"this.parentNode.remove()\"></g></svg>';\n if (this.inertBodyElement.querySelector && !this.inertBodyElement.querySelector('svg')) {\n // We just hit the Safari 10.1 bug - which allows JS to run inside the SVG G element\n // so use the XHR strategy.\n this.getInertBodyElement = this.getInertBodyElement_XHR;\n return;\n }\n this.inertBodyElement.innerHTML =\n '<svg><p><style><img src=\"</style><img src=x onerror=alert(1)//\">';\n if (this.inertBodyElement.querySelector && this.inertBodyElement.querySelector('svg img')) {\n // We just hit the Firefox bug - which prevents the inner img JS from being sanitized\n // so use the DOMParser strategy, if it is available.\n // If the DOMParser is not available then we are not in Firefox (Server/WebWorker?) so we\n // fall through to the default strategy below.\n if (isDOMParserAvailable()) {\n this.getInertBodyElement = this.getInertBodyElement_DOMParser;\n return;\n }\n }\n // None of the bugs were hit so it is safe for us to use the default InertDocument strategy\n this.getInertBodyElement = this.getInertBodyElement_InertDocument;\n }\n /**\n * Use XHR to create and fill an inert body element (on Safari 10.1)\n * See\n * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449\n */\n InertBodyHelper.prototype.getInertBodyElement_XHR = function (html) {\n // We add these extra elements to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n // `<head>` tag.\n html = '<body><remove></remove>' + html + '</body>';\n try {\n html = encodeURI(html);\n }\n catch (_a) {\n return null;\n }\n var xhr = new XMLHttpRequest();\n xhr.responseType = 'document';\n xhr.open('GET', 'data:text/html;charset=utf-8,' + html, false);\n xhr.send(undefined);\n var body = xhr.response.body;\n body.removeChild(body.firstChild);\n return body;\n };\n /**\n * Use DOMParser to create and fill an inert body element (on Firefox)\n * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7\n *\n */\n InertBodyHelper.prototype.getInertBodyElement_DOMParser = function (html) {\n // We add these extra elements to ensure that the rest of the content is parsed as expected\n // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n // `<head>` tag.\n html = '<body><remove></remove>' + html + '</body>';\n try {\n var body = new window\n .DOMParser()\n .parseFromString(html, 'text/html')\n .body;\n body.removeChild(body.firstChild);\n return body;\n }\n catch (_a) {\n return null;\n }\n };\n /**\n * Use an HTML5 `template` element, if supported, or an inert body element created via\n * `createHtmlDocument` to create and fill an inert DOM element.\n * This is the default sane strategy to use if the browser does not require one of the specialised\n * strategies above.\n */\n InertBodyHelper.prototype.getInertBodyElement_InertDocument = function (html) {\n // Prefer using <template> element if supported.\n var templateEl = this.inertDocument.createElement('template');\n if ('content' in templateEl) {\n templateEl.innerHTML = html;\n return templateEl;\n }\n this.inertBodyElement.innerHTML = html;\n // Support: IE 9-11 only\n // strip custom-namespaced attributes on IE<=11\n if (this.defaultDoc.documentMode) {\n this.stripCustomNsAttrs(this.inertBodyElement);\n }\n return this.inertBodyElement;\n };\n /**\n * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'\n * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.\n * 'ns1:xlink:foo').\n *\n * This is undesirable since we don't want to allow any of these custom attributes. This method\n * strips them all.\n */\n InertBodyHelper.prototype.stripCustomNsAttrs = function (el) {\n var elAttrs = el.attributes;\n // loop backwards so that we can support removals.\n for (var i = elAttrs.length - 1; 0 < i; i--) {\n var attrib = elAttrs.item(i);\n var attrName = attrib.name;\n if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n el.removeAttribute(attrName);\n }\n }\n var childNode = el.firstChild;\n while (childNode) {\n if (childNode.nodeType === Node.ELEMENT_NODE)\n this.stripCustomNsAttrs(childNode);\n childNode = childNode.nextSibling;\n }\n };\n return InertBodyHelper;\n }());\n /**\n * We need to determine whether the DOMParser exists in the global context.\n * The try-catch is because, on some browsers, trying to access this property\n * on window can actually throw an error.\n *\n * @suppress {uselessCode}\n */\n function isDOMParserAvailable() {\n try {\n return !!window.DOMParser;\n }\n catch (_a) {\n return false;\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if (comment from here on and regex copied from\n * Soy's EscapingConventions):\n * (1) Either an allowed protocol (http, https, mailto or ftp).\n * (2) or no protocol. A protocol must be followed by a colon. The below\n * allows that by allowing colons only after one of the characters [/?#].\n * A colon after a hash (#) must be in the fragment.\n * Otherwise, a colon after a (?) must be in a query.\n * Otherwise, a colon after a single solidus (/) must be in a path.\n * Otherwise, a colon after a double solidus (//) must be in the authority\n * (before port).\n *\n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"h&#116;tp\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo&lt;bar/baz\". Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript&#58;...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\n var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n /** A pattern that matches safe data URLs. Only matches image, video and audio types. */\n var DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\\/]+=*$/i;\n function _sanitizeUrl(url) {\n url = String(url);\n if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN))\n return url;\n if (isDevMode()) {\n console.warn(\"WARNING: sanitizing unsafe URL value \" + url + \" (see http://g.co/ng/security#xss)\");\n }\n return 'unsafe:' + url;\n }\n function sanitizeSrcset(srcset) {\n srcset = String(srcset);\n return srcset.split(',').map(function (srcset) { return _sanitizeUrl(srcset.trim()); }).join(', ');\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function tagSet(tags) {\n var e_1, _a;\n var res = {};\n try {\n for (var _b = __values(tags.split(',')), _c = _b.next(); !_c.done; _c = _b.next()) {\n var t = _c.value;\n res[t] = true;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return res;\n }\n function merge() {\n var e_2, _a;\n var sets = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sets[_i] = arguments[_i];\n }\n var res = {};\n try {\n for (var sets_1 = __values(sets), sets_1_1 = sets_1.next(); !sets_1_1.done; sets_1_1 = sets_1.next()) {\n var s = sets_1_1.value;\n for (var v in s) {\n if (s.hasOwnProperty(v))\n res[v] = true;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (sets_1_1 && !sets_1_1.done && (_a = sets_1.return)) _a.call(sets_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return res;\n }\n // Good source of info about elements and attributes\n // http://dev.w3.org/html5/spec/Overview.html#semantics\n // http://simon.html5.org/html-elements\n // Safe Void Elements - HTML5\n // http://dev.w3.org/html5/spec/Overview.html#void-elements\n var VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr');\n // Elements that you can, intentionally, leave open (and which close themselves)\n // http://dev.w3.org/html5/spec/Overview.html#optional-tags\n var OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\n var OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\n var OPTIONAL_END_TAG_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\n // Safe Block Elements - HTML5\n var BLOCK_ELEMENTS = merge(OPTIONAL_END_TAG_BLOCK_ELEMENTS, tagSet('address,article,' +\n 'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +\n 'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul'));\n // Inline Elements - HTML5\n var INLINE_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, tagSet('a,abbr,acronym,audio,b,' +\n 'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' +\n 'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video'));\n var VALID_ELEMENTS = merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\n // Attributes that have href and hence need to be sanitized\n var URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\n // Attributes that have special href set hence need to be sanitized\n var SRCSET_ATTRS = tagSet('srcset');\n var HTML_ATTRS = tagSet('abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' +\n 'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' +\n 'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' +\n 'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' +\n 'valign,value,vspace,width');\n // Accessibility attributes as per WAI-ARIA 1.1 (W3C Working Draft 14 December 2018)\n var ARIA_ATTRS = tagSet('aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' +\n 'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' +\n 'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' +\n 'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' +\n 'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' +\n 'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' +\n 'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext');\n // NB: This currently consciously doesn't support SVG. SVG sanitization has had several security\n // issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via\n // innerHTML is required, SVG attributes should be added here.\n // NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those\n // can be sanitized, but they increase security surface area without a legitimate use case, so they\n // are left out here.\n var VALID_ATTRS = merge(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS, ARIA_ATTRS);\n // Elements whose content should not be traversed/preserved, if the elements themselves are invalid.\n //\n // Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve)\n // `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we\n // don't want to preserve the content, if the elements themselves are going to be removed.\n var SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template');\n /**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\n var SanitizingHtmlSerializer = /** @class */ (function () {\n function SanitizingHtmlSerializer() {\n // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n // because characters were re-encoded.\n this.sanitizedSomething = false;\n this.buf = [];\n }\n SanitizingHtmlSerializer.prototype.sanitizeChildren = function (el) {\n // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.\n // However this code never accesses properties off of `document` before deleting its contents\n // again, so it shouldn't be vulnerable to DOM clobbering.\n var current = el.firstChild;\n var traverseContent = true;\n while (current) {\n if (current.nodeType === Node.ELEMENT_NODE) {\n traverseContent = this.startElement(current);\n }\n else if (current.nodeType === Node.TEXT_NODE) {\n this.chars(current.nodeValue);\n }\n else {\n // Strip non-element, non-text nodes.\n this.sanitizedSomething = true;\n }\n if (traverseContent && current.firstChild) {\n current = current.firstChild;\n continue;\n }\n while (current) {\n // Leaving the element. Walk up and to the right, closing tags as we go.\n if (current.nodeType === Node.ELEMENT_NODE) {\n this.endElement(current);\n }\n var next = this.checkClobberedElement(current, current.nextSibling);\n if (next) {\n current = next;\n break;\n }\n current = this.checkClobberedElement(current, current.parentNode);\n }\n }\n return this.buf.join('');\n };\n /**\n * Sanitizes an opening element tag (if valid) and returns whether the element's contents should\n * be traversed. Element content must always be traversed (even if the element itself is not\n * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`.\n *\n * @param element The element to sanitize.\n * @return True if the element's contents should be traversed.\n */\n SanitizingHtmlSerializer.prototype.startElement = function (element) {\n var tagName = element.nodeName.toLowerCase();\n if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n this.sanitizedSomething = true;\n return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName);\n }\n this.buf.push('<');\n this.buf.push(tagName);\n var elAttrs = element.attributes;\n for (var i = 0; i < elAttrs.length; i++) {\n var elAttr = elAttrs.item(i);\n var attrName = elAttr.name;\n var lower = attrName.toLowerCase();\n if (!VALID_ATTRS.hasOwnProperty(lower)) {\n this.sanitizedSomething = true;\n continue;\n }\n var value = elAttr.value;\n // TODO(martinprobst): Special case image URIs for data:image/...\n if (URI_ATTRS[lower])\n value = _sanitizeUrl(value);\n if (SRCSET_ATTRS[lower])\n value = sanitizeSrcset(value);\n this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n }\n this.buf.push('>');\n return true;\n };\n SanitizingHtmlSerializer.prototype.endElement = function (current) {\n var tagName = current.nodeName.toLowerCase();\n if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {\n this.buf.push('</');\n this.buf.push(tagName);\n this.buf.push('>');\n }\n };\n SanitizingHtmlSerializer.prototype.chars = function (chars) { this.buf.push(encodeEntities(chars)); };\n SanitizingHtmlSerializer.prototype.checkClobberedElement = function (node, nextNode) {\n if (nextNode &&\n (node.compareDocumentPosition(nextNode) &\n Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) {\n throw new Error(\"Failed to sanitize html because the element is clobbered: \" + node.outerHTML);\n }\n return nextNode;\n };\n return SanitizingHtmlSerializer;\n }());\n // Regular Expressions for parsing tags and attributes\n var SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n // ! to ~ is the ASCII range.\n var NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\n /**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n */\n function encodeEntities(value) {\n return value.replace(/&/g, '&amp;')\n .replace(SURROGATE_PAIR_REGEXP, function (match) {\n var hi = match.charCodeAt(0);\n var low = match.charCodeAt(1);\n return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n })\n .replace(NON_ALPHANUMERIC_REGEXP, function (match) { return '&#' + match.charCodeAt(0) + ';'; })\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;');\n }\n var inertBodyHelper;\n /**\n * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to\n * the DOM in a browser environment.\n */\n function _sanitizeHtml(defaultDoc, unsafeHtmlInput) {\n var inertBodyElement = null;\n try {\n inertBodyHelper = inertBodyHelper || new InertBodyHelper(defaultDoc);\n // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n var unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser\n // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.\n var mXSSAttempts = 5;\n var parsedHtml = unsafeHtml;\n do {\n if (mXSSAttempts === 0) {\n throw new Error('Failed to sanitize html because the input is unstable');\n }\n mXSSAttempts--;\n unsafeHtml = parsedHtml;\n parsedHtml = inertBodyElement.innerHTML;\n inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n } while (unsafeHtml !== parsedHtml);\n var sanitizer = new SanitizingHtmlSerializer();\n var safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement);\n if (isDevMode() && sanitizer.sanitizedSomething) {\n console.warn('WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss');\n }\n return safeHtml;\n }\n finally {\n // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.\n if (inertBodyElement) {\n var parent_1 = getTemplateContent(inertBodyElement) || inertBodyElement;\n while (parent_1.firstChild) {\n parent_1.removeChild(parent_1.firstChild);\n }\n }\n }\n }\n function getTemplateContent(el) {\n return 'content' in el /** Microsoft/TypeScript#21517 */ && isTemplateElement(el) ?\n el.content :\n null;\n }\n function isTemplateElement(el) {\n return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n (function (SecurityContext) {\n SecurityContext[SecurityContext[\"NONE\"] = 0] = \"NONE\";\n SecurityContext[SecurityContext[\"HTML\"] = 1] = \"HTML\";\n SecurityContext[SecurityContext[\"STYLE\"] = 2] = \"STYLE\";\n SecurityContext[SecurityContext[\"SCRIPT\"] = 3] = \"SCRIPT\";\n SecurityContext[SecurityContext[\"URL\"] = 4] = \"URL\";\n SecurityContext[SecurityContext[\"RESOURCE_URL\"] = 5] = \"RESOURCE_URL\";\n })(exports.SecurityContext || (exports.SecurityContext = {}));\n /**\n * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n * @publicApi\n */\n var Sanitizer = /** @class */ (function () {\n function Sanitizer() {\n }\n return Sanitizer;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Regular expression for safe style values.\n *\n * Quotes (\" and ') are allowed, but a check must be done elsewhere to ensure they're balanced.\n *\n * ',' allows multiple values to be assigned to the same property (e.g. background-attachment or\n * font-family) and hence could allow multiple values to get injected, but that should pose no risk\n * of XSS.\n *\n * The function expression checks only for XSS safety, not for CSS validity.\n *\n * This regular expression was taken from the Closure sanitization library, and augmented for\n * transformation values.\n */\n var VALUES = '[-,.\"\\'%_!# a-zA-Z0-9]+';\n var TRANSFORMATION_FNS = '(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?';\n var COLOR_FNS = '(?:rgb|hsl)a?';\n var GRADIENTS = '(?:repeating-)?(?:linear|radial)-gradient';\n var CSS3_FNS = '(?:calc|attr)';\n var FN_ARGS = '\\\\([-0-9.%, #a-zA-Z]+\\\\)';\n var SAFE_STYLE_VALUE = new RegExp(\"^(\" + VALUES + \"|\" +\n (\"(?:\" + TRANSFORMATION_FNS + \"|\" + COLOR_FNS + \"|\" + GRADIENTS + \"|\" + CSS3_FNS + \")\") +\n (FN_ARGS + \")$\"), 'g');\n /**\n * Matches a `url(...)` value with an arbitrary argument as long as it does\n * not contain parentheses.\n *\n * The URL value still needs to be sanitized separately.\n *\n * `url(...)` values are a very common use case, e.g. for `background-image`. With carefully crafted\n * CSS style rules, it is possible to construct an information leak with `url` values in CSS, e.g.\n * by observing whether scroll bars are displayed, or character ranges used by a font face\n * definition.\n *\n * Angular only allows binding CSS values (as opposed to entire CSS rules), so it is unlikely that\n * binding a URL value without further cooperation from the page will cause an information leak, and\n * if so, it is just a leak, not a full blown XSS vulnerability.\n *\n * Given the common use case, low likelihood of attack vector, and low impact of an attack, this\n * code is permissive and allows URLs that sanitize otherwise.\n */\n var URL_RE = /^url\\(([^)]+)\\)$/;\n /**\n * Checks that quotes (\" and ') are properly balanced inside a string. Assumes\n * that neither escape (\\) nor any other character that could result in\n * breaking out of a string parsing context are allowed;\n * see http://www.w3.org/TR/css3-syntax/#string-token-diagram.\n *\n * This code was taken from the Closure sanitization library.\n */\n function hasBalancedQuotes(value) {\n var outsideSingle = true;\n var outsideDouble = true;\n for (var i = 0; i < value.length; i++) {\n var c = value.charAt(i);\n if (c === '\\'' && outsideDouble) {\n outsideSingle = !outsideSingle;\n }\n else if (c === '\"' && outsideSingle) {\n outsideDouble = !outsideDouble;\n }\n }\n return outsideSingle && outsideDouble;\n }\n /**\n * Sanitizes the given untrusted CSS style property value (i.e. not an entire object, just a single\n * value) and returns a value that is safe to use in a browser environment.\n */\n function _sanitizeStyle(value) {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value)\n return '';\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n var urlMatch = value.match(URL_RE);\n if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||\n value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n return value; // Safe style values.\n }\n if (isDevMode()) {\n console.warn(\"WARNING: sanitizing unsafe style value \" + value + \" (see http://g.co/ng/security#xss).\");\n }\n return 'unsafe';\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `html` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.\n *\n * @param unsafeHtml untrusted `html`, typically from the user.\n * @returns `html` string which is safe to display to user, because all of the dangerous javascript\n * and urls have been removed.\n *\n * @publicApi\n */\n function ɵɵsanitizeHtml(unsafeHtml) {\n var sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(exports.SecurityContext.HTML, unsafeHtml) || '';\n }\n if (allowSanitizationBypass(unsafeHtml, \"Html\" /* Html */)) {\n return unsafeHtml.toString();\n }\n return _sanitizeHtml(document, renderStringify(unsafeHtml));\n }\n /**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `style` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.\n *\n * @param unsafeStyle untrusted `style`, typically from the user.\n * @returns `style` string which is safe to bind to the `style` properties, because all of the\n * dangerous javascript and urls have been removed.\n *\n * @publicApi\n */\n function ɵɵsanitizeStyle(unsafeStyle) {\n var sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(exports.SecurityContext.STYLE, unsafeStyle) || '';\n }\n if (allowSanitizationBypass(unsafeStyle, \"Style\" /* Style */)) {\n return unsafeStyle.toString();\n }\n return _sanitizeStyle(renderStringify(unsafeStyle));\n }\n /**\n * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing\n * dangerous\n * content.\n *\n * This method parses the `url` and locates potentially dangerous content (such as javascript) and\n * removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * all of the dangerous javascript has been removed.\n *\n * @publicApi\n */\n function ɵɵsanitizeUrl(unsafeUrl) {\n var sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(exports.SecurityContext.URL, unsafeUrl) || '';\n }\n if (allowSanitizationBypass(unsafeUrl, \"Url\" /* Url */)) {\n return unsafeUrl.toString();\n }\n return _sanitizeUrl(renderStringify(unsafeUrl));\n }\n /**\n * A `url` sanitizer which only lets trusted `url`s through.\n *\n * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.\n *\n * @param unsafeResourceUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * only trusted `url`s have been allowed to pass.\n *\n * @publicApi\n */\n function ɵɵsanitizeResourceUrl(unsafeResourceUrl) {\n var sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(exports.SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '';\n }\n if (allowSanitizationBypass(unsafeResourceUrl, \"ResourceUrl\" /* ResourceUrl */)) {\n return unsafeResourceUrl.toString();\n }\n throw new Error('unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');\n }\n /**\n * A `script` sanitizer which only lets trusted javascript through.\n *\n * This passes only `script`s marked trusted by calling {@link\n * bypassSanitizationTrustScript}.\n *\n * @param unsafeScript untrusted `script`, typically from the user.\n * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,\n * because only trusted `scripts` have been allowed to pass.\n *\n * @publicApi\n */\n function ɵɵsanitizeScript(unsafeScript) {\n var sanitizer = getSanitizer();\n if (sanitizer) {\n return sanitizer.sanitize(exports.SecurityContext.SCRIPT, unsafeScript) || '';\n }\n if (allowSanitizationBypass(unsafeScript, \"Script\" /* Script */)) {\n return unsafeScript.toString();\n }\n throw new Error('unsafe value used in a script context');\n }\n /**\n * Detects which sanitizer to use for URL property, based on tag name and prop name.\n *\n * The rules are based on the RESOURCE_URL context config from\n * `packages/compiler/src/schema/dom_security_schema.ts`.\n * If tag and prop names don't match Resource URL schema, use URL sanitizer.\n */\n function getUrlSanitizer(tag, prop) {\n if ((prop === 'src' && (tag === 'embed' || tag === 'frame' || tag === 'iframe' ||\n tag === 'media' || tag === 'script')) ||\n (prop === 'href' && (tag === 'base' || tag === 'link'))) {\n return ɵɵsanitizeResourceUrl;\n }\n return ɵɵsanitizeUrl;\n }\n /**\n * Sanitizes URL, selecting sanitizer function based on tag and property names.\n *\n * This function is used in case we can't define security context at compile time, when only prop\n * name is available. This happens when we generate host bindings for Directives/Components. The\n * host element is unknown at compile time, so we defer calculation of specific sanitizer to\n * runtime.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @param tag target element tag name.\n * @param prop name of the property that contains the value.\n * @returns `url` string which is safe to bind.\n *\n * @publicApi\n */\n function ɵɵsanitizeUrlOrResourceUrl(unsafeUrl, tag, prop) {\n return getUrlSanitizer(tag, prop)(unsafeUrl);\n }\n /**\n * The default style sanitizer will handle sanitization for style properties by\n * sanitizing any CSS property that can include a `url` value (usually image-based properties)\n *\n * @publicApi\n */\n var ɵɵdefaultStyleSanitizer = function (prop, value, mode) {\n mode = mode || 3 /* ValidateAndSanitize */;\n var doSanitizeValue = true;\n if (mode & 1 /* ValidateProperty */) {\n doSanitizeValue = prop === 'background-image' || prop === 'background' ||\n prop === 'border-image' || prop === 'filter' || prop === 'list-style' ||\n prop === 'list-style-image' || prop === 'clip-path';\n }\n if (mode & 2 /* SanitizeOnly */) {\n return doSanitizeValue ? ɵɵsanitizeStyle(value) : value;\n }\n else {\n return doSanitizeValue;\n }\n };\n function validateAgainstEventProperties(name) {\n if (name.toLowerCase().startsWith('on')) {\n var msg = \"Binding to event property '\" + name + \"' is disallowed for security reasons, \" +\n (\"please use (\" + name.slice(2) + \")=...\") +\n (\"\\nIf '\" + name + \"' is a directive input, make sure the directive is imported by the\") +\n \" current module.\";\n throw new Error(msg);\n }\n }\n function validateAgainstEventAttributes(name) {\n if (name.toLowerCase().startsWith('on')) {\n var msg = \"Binding to event attribute '\" + name + \"' is disallowed for security reasons, \" +\n (\"please use (\" + name.slice(2) + \")=...\");\n throw new Error(msg);\n }\n }\n function getSanitizer() {\n var lView = getLView();\n return lView && lView[SANITIZER];\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var TNODE = 8;\n var PARENT_INJECTOR = 8;\n var INJECTOR_BLOOM_PARENT_SIZE = 9;\n var NO_PARENT_INJECTOR = -1;\n /**\n * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in\n * `TView.data`. This allows us to store information about the current node's tokens (which\n * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be\n * shared, so they live in `LView`).\n *\n * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter\n * determines whether a directive is available on the associated node or not. This prevents us\n * from searching the directives array at this level unless it's probable the directive is in it.\n *\n * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters.\n *\n * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed\n * using interfaces as they were previously. The start index of each `LInjector` and `TInjector`\n * will differ based on where it is flattened into the main array, so it's not possible to know\n * the indices ahead of time and save their types here. The interfaces are still included here\n * for documentation purposes.\n *\n * export interface LInjector extends Array<any> {\n *\n * // Cumulative bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Cumulative bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Cumulative bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Cumulative bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Cumulative bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Cumulative bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Cumulative bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Cumulative bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // We need to store a reference to the injector's parent so DI can keep looking up\n * // the injector tree until it finds the dependency it's looking for.\n * [PARENT_INJECTOR]: number;\n * }\n *\n * export interface TInjector extends Array<any> {\n *\n * // Shared node bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Shared node bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Shared node bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Shared node bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Shared node bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Shared node bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Shared node bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Shared node bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // Necessary to find directive indices for a particular node.\n * [TNODE]: TElementNode|TElementContainerNode|TContainerNode;\n * }\n */\n /**\n * Factory for creating instances of injectors in the NodeInjector.\n *\n * This factory is complicated by the fact that it can resolve `multi` factories as well.\n *\n * NOTE: Some of the fields are optional which means that this class has two hidden classes.\n * - One without `multi` support (most common)\n * - One with `multi` values, (rare).\n *\n * Since VMs can cache up to 4 inline hidden classes this is OK.\n *\n * - Single factory: Only `resolving` and `factory` is defined.\n * - `providers` factory: `componentProviders` is a number and `index = -1`.\n * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`.\n */\n var NodeInjectorFactory = /** @class */ (function () {\n function NodeInjectorFactory(\n /**\n * Factory to invoke in order to create a new instance.\n */\n factory, \n /**\n * Set to `true` if the token is declared in `viewProviders` (or if it is component).\n */\n isViewProvider, injectImplementation) {\n this.factory = factory;\n /**\n * Marker set to true during factory invocation to see if we get into recursive loop.\n * Recursive loop causes an error to be displayed.\n */\n this.resolving = false;\n this.canSeeViewProviders = isViewProvider;\n this.injectImpl = injectImplementation;\n }\n return NodeInjectorFactory;\n }());\n function isFactory(obj) {\n // See: https://jsperf.com/instanceof-vs-getprototypeof\n return obj !== null && typeof obj == 'object' &&\n Object.getPrototypeOf(obj) == NodeInjectorFactory.prototype;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function assertNodeType(tNode, type) {\n assertDefined(tNode, 'should be called with a TNode');\n assertEqual(tNode.type, type, \"should be a \" + typeName(type));\n }\n function assertNodeOfPossibleTypes(tNode) {\n var types = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n types[_i - 1] = arguments[_i];\n }\n assertDefined(tNode, 'should be called with a TNode');\n var found = types.some(function (type) { return tNode.type === type; });\n assertEqual(found, true, \"Should be one of \" + types.map(typeName).join(', ') + \" but got \" + typeName(tNode.type));\n }\n function typeName(type) {\n if (type == 1 /* Projection */)\n return 'Projection';\n if (type == 0 /* Container */)\n return 'Container';\n if (type == 2 /* View */)\n return 'View';\n if (type == 3 /* Element */)\n return 'Element';\n if (type == 4 /* ElementContainer */)\n return 'ElementContainer';\n return '<unknown>';\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // TODO: cleanup once the code is merged in angular/angular\n var RendererStyleFlags3;\n (function (RendererStyleFlags3) {\n RendererStyleFlags3[RendererStyleFlags3[\"Important\"] = 1] = \"Important\";\n RendererStyleFlags3[RendererStyleFlags3[\"DashCase\"] = 2] = \"DashCase\";\n })(RendererStyleFlags3 || (RendererStyleFlags3 = {}));\n /** Returns whether the `renderer` is a `ProceduralRenderer3` */\n function isProceduralRenderer(renderer) {\n return !!(renderer.listen);\n }\n var ɵ0$7 = function (hostElement, rendererType) { return document; };\n var domRendererFactory3 = {\n createRenderer: ɵ0$7\n };\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /** Returns the matching `LContext` data for a given DOM node, directive or component instance.\n *\n * This function will examine the provided DOM element, component, or directive instance\\'s\n * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched\n * value will be that of the newly created `LContext`.\n *\n * If the monkey-patched value is the `LView` instance then the context value for that\n * target will be created and the monkey-patch reference will be updated. Therefore when this\n * function is called it may mutate the provided element\\'s, component\\'s or any of the associated\n * directive\\'s monkey-patch values.\n *\n * If the monkey-patch value is not detected then the code will walk up the DOM until an element\n * is found which contains a monkey-patch reference. When that occurs then the provided element\n * will be updated with a new context (which is then returned). If the monkey-patch value is not\n * detected for a component/directive instance then it will throw an error (all components and\n * directives should be automatically monkey-patched by ivy).\n *\n * @param target Component, Directive or DOM Node.\n */\n function getLContext(target) {\n var mpValue = readPatchedData(target);\n if (mpValue) {\n // only when it's an array is it considered an LView instance\n // ... otherwise it's an already constructed LContext instance\n if (Array.isArray(mpValue)) {\n var lView = mpValue;\n var nodeIndex = void 0;\n var component = undefined;\n var directives = undefined;\n if (isComponentInstance(target)) {\n nodeIndex = findViaComponent(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided component was not found in the application');\n }\n component = target;\n }\n else if (isDirectiveInstance(target)) {\n nodeIndex = findViaDirective(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided directive was not found in the application');\n }\n directives = getDirectivesAtNodeIndex(nodeIndex, lView, false);\n }\n else {\n nodeIndex = findViaNativeElement(lView, target);\n if (nodeIndex == -1) {\n return null;\n }\n }\n // the goal is not to fill the entire context full of data because the lookups\n // are expensive. Instead, only the target data (the element, component, container, ICU\n // expression or directive details) are filled into the context. If called multiple times\n // with different target values then the missing target data will be filled in.\n var native = unwrapRNode(lView[nodeIndex]);\n var existingCtx = readPatchedData(native);\n var context = (existingCtx && !Array.isArray(existingCtx)) ?\n existingCtx :\n createLContext(lView, nodeIndex, native);\n // only when the component has been discovered then update the monkey-patch\n if (component && context.component === undefined) {\n context.component = component;\n attachPatchData(context.component, context);\n }\n // only when the directives have been discovered then update the monkey-patch\n if (directives && context.directives === undefined) {\n context.directives = directives;\n for (var i = 0; i < directives.length; i++) {\n attachPatchData(directives[i], context);\n }\n }\n attachPatchData(context.native, context);\n mpValue = context;\n }\n }\n else {\n var rElement = target;\n ngDevMode && assertDomNode(rElement);\n // if the context is not found then we need to traverse upwards up the DOM\n // to find the nearest element that has already been monkey patched with data\n var parent_1 = rElement;\n while (parent_1 = parent_1.parentNode) {\n var parentContext = readPatchedData(parent_1);\n if (parentContext) {\n var lView = void 0;\n if (Array.isArray(parentContext)) {\n lView = parentContext;\n }\n else {\n lView = parentContext.lView;\n }\n // the edge of the app was also reached here through another means\n // (maybe because the DOM was changed manually).\n if (!lView) {\n return null;\n }\n var index = findViaNativeElement(lView, rElement);\n if (index >= 0) {\n var native = unwrapRNode(lView[index]);\n var context = createLContext(lView, index, native);\n attachPatchData(native, context);\n mpValue = context;\n break;\n }\n }\n }\n }\n return mpValue || null;\n }\n /**\n * Creates an empty instance of a `LContext` context\n */\n function createLContext(lView, nodeIndex, native) {\n return {\n lView: lView,\n nodeIndex: nodeIndex,\n native: native,\n component: undefined,\n directives: undefined,\n localRefs: undefined,\n };\n }\n /**\n * Takes a component instance and returns the view for that component.\n *\n * @param componentInstance\n * @returns The component's view\n */\n function getComponentViewByInstance(componentInstance) {\n var lView = readPatchedData(componentInstance);\n var view;\n if (Array.isArray(lView)) {\n var nodeIndex = findViaComponent(lView, componentInstance);\n view = getComponentViewByIndex(nodeIndex, lView);\n var context = createLContext(lView, nodeIndex, view[HOST]);\n context.component = componentInstance;\n attachPatchData(componentInstance, context);\n attachPatchData(context.native, context);\n }\n else {\n var context = lView;\n view = getComponentViewByIndex(context.nodeIndex, context.lView);\n }\n return view;\n }\n /**\n * Assigns the given data to the given target (which could be a component,\n * directive or DOM node instance) using monkey-patching.\n */\n function attachPatchData(target, data) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n }\n function isComponentInstance(instance) {\n return instance && instance.constructor && instance.constructor.ngComponentDef;\n }\n function isDirectiveInstance(instance) {\n return instance && instance.constructor && instance.constructor.ngDirectiveDef;\n }\n /**\n * Locates the element within the given LView and returns the matching index\n */\n function findViaNativeElement(lView, target) {\n var tNode = lView[TVIEW].firstChild;\n while (tNode) {\n var native = getNativeByTNode(tNode, lView);\n if (native === target) {\n return tNode.index;\n }\n tNode = traverseNextElement(tNode);\n }\n return -1;\n }\n /**\n * Locates the next tNode (child, sibling or parent).\n */\n function traverseNextElement(tNode) {\n if (tNode.child) {\n return tNode.child;\n }\n else if (tNode.next) {\n return tNode.next;\n }\n else {\n // Let's take the following template: <div><span>text</span></div><component/>\n // After checking the text node, we need to find the next parent that has a \"next\" TNode,\n // in this case the parent `div`, so that we can find the component.\n while (tNode.parent && !tNode.parent.next) {\n tNode = tNode.parent;\n }\n return tNode.parent && tNode.parent.next;\n }\n }\n /**\n * Locates the component within the given LView and returns the matching index\n */\n function findViaComponent(lView, componentInstance) {\n var componentIndices = lView[TVIEW].components;\n if (componentIndices) {\n for (var i = 0; i < componentIndices.length; i++) {\n var elementComponentIndex = componentIndices[i];\n var componentView = getComponentViewByIndex(elementComponentIndex, lView);\n if (componentView[CONTEXT] === componentInstance) {\n return elementComponentIndex;\n }\n }\n }\n else {\n var rootComponentView = getComponentViewByIndex(HEADER_OFFSET, lView);\n var rootComponent = rootComponentView[CONTEXT];\n if (rootComponent === componentInstance) {\n // we are dealing with the root element here therefore we know that the\n // element is the very first element after the HEADER data in the lView\n return HEADER_OFFSET;\n }\n }\n return -1;\n }\n /**\n * Locates the directive within the given LView and returns the matching index\n */\n function findViaDirective(lView, directiveInstance) {\n // if a directive is monkey patched then it will (by default)\n // have a reference to the LView of the current view. The\n // element bound to the directive being search lives somewhere\n // in the view data. We loop through the nodes and check their\n // list of directives for the instance.\n var tNode = lView[TVIEW].firstChild;\n while (tNode) {\n var directiveIndexStart = tNode.directiveStart;\n var directiveIndexEnd = tNode.directiveEnd;\n for (var i = directiveIndexStart; i < directiveIndexEnd; i++) {\n if (lView[i] === directiveInstance) {\n return tNode.index;\n }\n }\n tNode = traverseNextElement(tNode);\n }\n return -1;\n }\n /**\n * Returns a list of directives extracted from the given view based on the\n * provided list of directive index values.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n * @param includeComponents Whether or not to include components in returned directives\n */\n function getDirectivesAtNodeIndex(nodeIndex, lView, includeComponents) {\n var tNode = lView[TVIEW].data[nodeIndex];\n var directiveStartIndex = tNode.directiveStart;\n if (directiveStartIndex == 0)\n return EMPTY_ARRAY$2;\n var directiveEndIndex = tNode.directiveEnd;\n if (!includeComponents && tNode.flags & 1 /* isComponent */)\n directiveStartIndex++;\n return lView.slice(directiveStartIndex, directiveEndIndex);\n }\n function getComponentAtNodeIndex(nodeIndex, lView) {\n var tNode = lView[TVIEW].data[nodeIndex];\n var directiveStartIndex = tNode.directiveStart;\n return tNode.flags & 1 /* isComponent */ ? lView[directiveStartIndex] : null;\n }\n /**\n * Returns a map of local references (local reference name => element or directive instance) that\n * exist on a given element.\n */\n function discoverLocalRefs(lView, nodeIndex) {\n var tNode = lView[TVIEW].data[nodeIndex];\n if (tNode && tNode.localNames) {\n var result = {};\n var localIndex = tNode.index + 1;\n for (var i = 0; i < tNode.localNames.length; i += 2) {\n result[tNode.localNames[i]] = lView[localIndex];\n localIndex++;\n }\n return result;\n }\n return null;\n }\n\n var CorePlayerHandler = /** @class */ (function () {\n function CorePlayerHandler() {\n this._players = [];\n }\n CorePlayerHandler.prototype.flushPlayers = function () {\n for (var i = 0; i < this._players.length; i++) {\n var player = this._players[i];\n if (!player.parent && player.state === 0 /* Pending */) {\n player.play();\n }\n }\n this._players.length = 0;\n };\n CorePlayerHandler.prototype.queuePlayer = function (player) { this._players.push(player); };\n return CorePlayerHandler;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * The default directive styling index value for template-based bindings.\n *\n * All host-level bindings (e.g. `hostStyleProp` and `hostStyleMap`) are\n * assigned a directive styling index value based on the current directive\n * uniqueId and the directive super-class inheritance depth. But for template\n * bindings they always have the same directive styling index value.\n */\n var DEFAULT_TEMPLATE_DIRECTIVE_INDEX = 0;\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var ANIMATION_PROP_PREFIX = '@';\n function createEmptyStylingContext(wrappedElement, sanitizer, initialStyles, initialClasses) {\n var context = [\n wrappedElement || null,\n 0,\n [],\n initialStyles || [null, null],\n initialClasses || [null, null],\n [0, 0],\n [0],\n [0],\n null,\n null,\n ];\n // whenever a context is created there is always a `null` directive\n // that is registered (which is a placeholder for the \"template\").\n allocateOrUpdateDirectiveIntoContext(context, DEFAULT_TEMPLATE_DIRECTIVE_INDEX);\n return context;\n }\n /**\n * Allocates (registers) a directive into the directive registry within the provided styling\n * context.\n *\n * For each and every `[style]`, `[style.prop]`, `[class]`, `[class.name]` binding\n * (as well as static style and class attributes) a directive, component or template\n * is marked as the owner. When an owner is determined (this happens when the template\n * is first passed over) the directive owner is allocated into the styling context. When\n * this happens, each owner gets its own index value. This then ensures that once any\n * style and/or class binding are assigned into the context then they are marked to\n * that directive's index value.\n *\n * @param context the target StylingContext\n * @param directiveRef the directive that will be allocated into the context\n * @returns the index where the directive was inserted into\n */\n function allocateOrUpdateDirectiveIntoContext(context, directiveIndex, singlePropValuesIndex, styleSanitizer) {\n if (singlePropValuesIndex === void 0) { singlePropValuesIndex = -1; }\n var directiveRegistry = context[2 /* DirectiveRegistryPosition */];\n var index = directiveIndex * 2 /* Size */;\n // we preemptively make space into the directives array and then\n // assign values slot-by-slot to ensure that if the directive ordering\n // changes then it will still function\n var limit = index + 2 /* Size */;\n for (var i = directiveRegistry.length; i < limit; i += 2 /* Size */) {\n // -1 is used to signal that the directive has been allocated, but\n // no actual style or class bindings have been registered yet...\n directiveRegistry.push(-1, null);\n }\n var propValuesStartPosition = index + 0 /* SinglePropValuesIndexOffset */;\n if (singlePropValuesIndex >= 0 && directiveRegistry[propValuesStartPosition] === -1) {\n directiveRegistry[propValuesStartPosition] = singlePropValuesIndex;\n directiveRegistry[index + 1 /* StyleSanitizerOffset */] =\n styleSanitizer || null;\n }\n }\n /**\n * Used clone a copy of a pre-computed template of a styling context.\n *\n * A pre-computed template is designed to be computed once for a given element\n * (instructions.ts has logic for caching this).\n */\n function allocStylingContext(element, templateStyleContext) {\n // each instance gets a copy\n var context = templateStyleContext.slice();\n // the HEADER values contain arrays which also need\n // to be copied over into the new context\n for (var i = 0; i < 10 /* SingleStylesStartPosition */; i++) {\n var value = templateStyleContext[i];\n if (Array.isArray(value)) {\n context[i] = value.slice();\n }\n }\n context[0 /* ElementPosition */] = element;\n // this will prevent any other directives from extending the context\n context[1 /* MasterFlagPosition */] |= 16 /* BindingAllocationLocked */;\n return context;\n }\n /**\n * Retrieve the `StylingContext` at a given index.\n *\n * This method lazily creates the `StylingContext`. This is because in most cases\n * we have styling without any bindings. Creating `StylingContext` eagerly would mean that\n * every style declaration such as `<div style=\"color: red\">` would result `StyleContext`\n * which would create unnecessary memory pressure.\n *\n * @param index Index of the style allocation. See: `styling`.\n * @param viewData The view to search for the styling context\n */\n function getStylingContextFromLView(index, viewData) {\n var storageIndex = index;\n var slotValue = viewData[storageIndex];\n var wrapper = viewData;\n while (Array.isArray(slotValue)) {\n wrapper = slotValue;\n slotValue = slotValue[HOST];\n }\n if (isStylingContext(wrapper)) {\n return wrapper;\n }\n else {\n // This is an LView or an LContainer\n var stylingTemplate = getTNode(index - HEADER_OFFSET, viewData).stylingTemplate;\n if (wrapper !== viewData) {\n storageIndex = HOST;\n }\n return wrapper[storageIndex] = stylingTemplate ?\n allocStylingContext(slotValue, stylingTemplate) :\n createEmptyStylingContext(slotValue);\n }\n }\n function isAnimationProp(name) {\n return name[0] === ANIMATION_PROP_PREFIX;\n }\n function hasClassInput(tNode) {\n return (tNode.flags & 8 /* hasClassInput */) !== 0;\n }\n function hasStyleInput(tNode) {\n return (tNode.flags & 16 /* hasStyleInput */) !== 0;\n }\n function forceClassesAsString(classes) {\n if (classes && typeof classes !== 'string') {\n classes = Object.keys(classes).join(' ');\n }\n return classes || '';\n }\n function forceStylesAsString(styles) {\n var str = '';\n if (styles) {\n var props = Object.keys(styles);\n for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n str += (i ? ';' : '') + (prop + \":\" + styles[prop]);\n }\n }\n return str;\n }\n function addPlayerInternal(playerContext, rootContext, element, player, playerContextIndex, ref) {\n ref = ref || element;\n if (playerContextIndex) {\n playerContext[playerContextIndex] = player;\n }\n else {\n playerContext.push(player);\n }\n if (player) {\n player.addEventListener(200 /* Destroyed */, function () {\n var index = playerContext.indexOf(player);\n var nonFactoryPlayerIndex = playerContext[0 /* NonBuilderPlayersStart */];\n // if the player is being removed from the factory side of the context\n // (which is where the [style] and [class] bindings do their thing) then\n // that side of the array cannot be resized since the respective bindings\n // have pointer index values that point to the associated factory instance\n if (index) {\n if (index < nonFactoryPlayerIndex) {\n playerContext[index] = null;\n }\n else {\n playerContext.splice(index, 1);\n }\n }\n player.destroy();\n });\n var playerHandler = rootContext.playerHandler || (rootContext.playerHandler = new CorePlayerHandler());\n playerHandler.queuePlayer(player, ref);\n return true;\n }\n return false;\n }\n function getPlayersInternal(playerContext) {\n var players = [];\n var nonFactoryPlayersStart = playerContext[0 /* NonBuilderPlayersStart */];\n // add all factory-based players (which are apart of [style] and [class] bindings)\n for (var i = 1 /* PlayerBuildersStartPosition */ + 1 /* PlayerOffsetPosition */; i < nonFactoryPlayersStart; i += 2 /* PlayerAndPlayerBuildersTupleSize */) {\n var player = playerContext[i];\n if (player) {\n players.push(player);\n }\n }\n // add all custom players (not apart of [style] and [class] bindings)\n for (var i = nonFactoryPlayersStart; i < playerContext.length; i++) {\n players.push(playerContext[i]);\n }\n return players;\n }\n function getOrCreatePlayerContext(target, context) {\n context = context || getLContext(target);\n if (!context) {\n ngDevMode && throwInvalidRefError();\n return null;\n }\n var lView = context.lView, nodeIndex = context.nodeIndex;\n var stylingContext = getStylingContextFromLView(nodeIndex, lView);\n return getPlayerContext(stylingContext) || allocPlayerContext(stylingContext);\n }\n function getPlayerContext(stylingContext) {\n return stylingContext[9 /* PlayerContext */];\n }\n function allocPlayerContext(data) {\n return data[9 /* PlayerContext */] =\n [5 /* SinglePlayerBuildersStartPosition */, null, null, null, null];\n }\n function throwInvalidRefError() {\n throw new Error('Only elements that exist in an Angular application can be used for animations');\n }\n\n /**\n * Assigns all attribute values to the provided element via the inferred renderer.\n *\n * This function accepts two forms of attribute entries:\n *\n * default: (key, value):\n * attrs = [key1, value1, key2, value2]\n *\n * namespaced: (NAMESPACE_MARKER, uri, name, value)\n * attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value]\n *\n * The `attrs` array can contain a mix of both the default and namespaced entries.\n * The \"default\" values are set without a marker, but if the function comes across\n * a marker value then it will attempt to set a namespaced value. If the marker is\n * not of a namespaced value then the function will quit and return the index value\n * where it stopped during the iteration of the attrs array.\n *\n * See [AttributeMarker] to understand what the namespace marker value is.\n *\n * Note that this instruction does not support assigning style and class values to\n * an element. See `elementStart` and `elementHostAttrs` to learn how styling values\n * are applied to an element.\n *\n * @param native The element that the attributes will be assigned to\n * @param attrs The attribute array of values that will be assigned to the element\n * @returns the index value that was last accessed in the attributes array\n */\n function setUpAttributes(native, attrs) {\n var renderer = getLView()[RENDERER];\n var isProc = isProceduralRenderer(renderer);\n var i = 0;\n while (i < attrs.length) {\n var value = attrs[i];\n if (typeof value === 'number') {\n // only namespaces are supported. Other value types (such as style/class\n // entries) are not supported in this function.\n if (value !== 0 /* NamespaceURI */) {\n break;\n }\n // we just landed on the marker value ... therefore\n // we should skip to the next entry\n i++;\n var namespaceURI = attrs[i++];\n var attrName = attrs[i++];\n var attrVal = attrs[i++];\n ngDevMode && ngDevMode.rendererSetAttribute++;\n isProc ?\n renderer.setAttribute(native, attrName, attrVal, namespaceURI) :\n native.setAttributeNS(namespaceURI, attrName, attrVal);\n }\n else {\n // attrName is string;\n var attrName = value;\n var attrVal = attrs[++i];\n // Standard attributes\n ngDevMode && ngDevMode.rendererSetAttribute++;\n if (isAnimationProp(attrName)) {\n if (isProc) {\n renderer.setProperty(native, attrName, attrVal);\n }\n }\n else {\n isProc ?\n renderer\n .setAttribute(native, attrName, attrVal) :\n native.setAttribute(attrName, attrVal);\n }\n i++;\n }\n }\n // another piece of code may iterate over the same attributes array. Therefore\n // it may be helpful to return the exact spot where the attributes array exited\n // whether by running into an unsupported marker or if all the static values were\n // iterated over.\n return i;\n }\n function attrsStylingIndexOf(attrs, startIndex) {\n for (var i = startIndex; i < attrs.length; i++) {\n var val = attrs[i];\n if (val === 1 /* Classes */ || val === 2 /* Styles */) {\n return i;\n }\n }\n return -1;\n }\n /**\n * Test whether the given value is a marker that indicates that the following\n * attribute values in a `TAttributes` array are only the names of attributes,\n * and not name-value pairs.\n * @param marker The attribute marker to test.\n * @returns true if the marker is a \"name-only\" marker (e.g. `Bindings`, `Template` or `I18n`).\n */\n function isNameOnlyAttributeMarker(marker) {\n return marker === 3 /* Bindings */ || marker === 4 /* Template */ ||\n marker === 6 /* I18n */;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /// Parent Injector Utils ///////////////////////////////////////////////////////////////\n function hasParentInjector(parentLocation) {\n return parentLocation !== NO_PARENT_INJECTOR;\n }\n function getParentInjectorIndex(parentLocation) {\n return parentLocation & 32767 /* InjectorIndexMask */;\n }\n function getParentInjectorViewOffset(parentLocation) {\n return parentLocation >> 16 /* ViewOffsetShift */;\n }\n /**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the view is found that contains the parent\n * injector.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @returns The LView instance that contains the parent injector\n */\n function getParentInjectorView(location, startView) {\n var viewOffset = getParentInjectorViewOffset(location);\n var parentView = startView;\n // For most cases, the parent injector can be found on the host node (e.g. for component\n // or container), but we must keep the loop here to support the rarer case of deeply nested\n // <ng-template> tags or inline views, where the parent injector might live many views\n // above the child injector.\n while (viewOffset > 0) {\n parentView = parentView[DECLARATION_VIEW];\n viewOffset--;\n }\n return parentView;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of\n * that LContainer, which is an LView\n * @param lView the lView whose parent to get\n */\n function getLViewParent(lView) {\n ngDevMode && assertLView(lView);\n var parent = lView[PARENT];\n return isLContainer(parent) ? parent[PARENT] : parent;\n }\n /**\n * Retrieve the root view from any component or `LView` by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param componentOrLView any component or `LView`\n */\n function getRootView(componentOrLView) {\n ngDevMode && assertDefined(componentOrLView, 'component');\n var lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);\n while (lView && !(lView[FLAGS] & 512 /* IsRoot */)) {\n lView = getLViewParent(lView);\n }\n ngDevMode && assertLView(lView);\n return lView;\n }\n /**\n * Given an `LView`, find the closest declaration view which is not an embedded view.\n *\n * This method searches for the `LView` associated with the component which declared the `LView`.\n *\n * This function may return itself if the `LView` passed in is not an embedded `LView`. Otherwise\n * it walks the declaration parents until it finds a component view (non-embedded-view.)\n *\n * @param lView LView for which we want a host element node\n * @returns The host node\n */\n function findComponentView(lView) {\n var rootTNode = lView[T_HOST];\n while (rootTNode !== null && rootTNode.type === 2 /* View */) {\n ngDevMode && assertDefined(lView[DECLARATION_VIEW], 'lView[DECLARATION_VIEW]');\n lView = lView[DECLARATION_VIEW];\n rootTNode = lView[T_HOST];\n }\n ngDevMode && assertLView(lView);\n return lView;\n }\n /**\n * Returns the `RootContext` instance that is associated with\n * the application where the target is situated. It does this by walking the parent views until it\n * gets to the root view, then getting the context off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\n function getRootContext(viewOrComponent) {\n var rootView = getRootView(viewOrComponent);\n ngDevMode &&\n assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT];\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Defines if the call to `inject` should include `viewProviders` in its resolution.\n *\n * This is set to true when we try to instantiate a component. This value is reset in\n * `getNodeInjectable` to a value which matches the declaration location of the token about to be\n * instantiated. This is done so that if we are injecting a token which was declared outside of\n * `viewProviders` we don't accidentally pull `viewProviders` in.\n *\n * Example:\n *\n * ```\n * @Injectable()\n * class MyService {\n * constructor(public value: String) {}\n * }\n *\n * @Component({\n * providers: [\n * MyService,\n * {provide: String, value: 'providers' }\n * ]\n * viewProviders: [\n * {provide: String, value: 'viewProviders'}\n * ]\n * })\n * class MyComponent {\n * constructor(myService: MyService, value: String) {\n * // We expect that Component can see into `viewProviders`.\n * expect(value).toEqual('viewProviders');\n * // `MyService` was not declared in `viewProviders` hence it can't see it.\n * expect(myService.value).toEqual('providers');\n * }\n * }\n *\n * ```\n */\n var includeViewProviders = true;\n function setIncludeViewProviders(v) {\n var oldValue = includeViewProviders;\n includeViewProviders = v;\n return oldValue;\n }\n /**\n * The number of slots in each bloom filter (used by DI). The larger this number, the fewer\n * directives that will share slots, and thus, the fewer false positives when checking for\n * the existence of a directive.\n */\n var BLOOM_SIZE = 256;\n var BLOOM_MASK = BLOOM_SIZE - 1;\n /** Counter used to generate unique IDs for directives. */\n var nextNgElementId = 0;\n /**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injectorIndex The index of the node injector where this token should be registered\n * @param tView The TView for the injector's bloom filters\n * @param type The directive token to register\n */\n function bloomAdd(injectorIndex, tView, type) {\n ngDevMode && assertEqual(tView.firstTemplatePass, true, 'expected firstTemplatePass to be true');\n var id = typeof type !== 'string' ? type[NG_ELEMENT_ID] : type.charCodeAt(0) || 0;\n // Set a unique ID on the directive type, so if something tries to inject the directive,\n // we can easily retrieve the ID and hash it into the bloom bit that should be checked.\n if (id == null) {\n id = type[NG_ELEMENT_ID] = nextNgElementId++;\n }\n // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),\n // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.\n var bloomBit = id & BLOOM_MASK;\n // Create a mask that targets the specific bit associated with the directive.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n var mask = 1 << bloomBit;\n // Use the raw bloomBit number to determine which bloom filter bucket we should check\n // e.g: bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc\n var b7 = bloomBit & 0x80;\n var b6 = bloomBit & 0x40;\n var b5 = bloomBit & 0x20;\n var tData = tView.data;\n if (b7) {\n b6 ? (b5 ? (tData[injectorIndex + 7] |= mask) : (tData[injectorIndex + 6] |= mask)) :\n (b5 ? (tData[injectorIndex + 5] |= mask) : (tData[injectorIndex + 4] |= mask));\n }\n else {\n b6 ? (b5 ? (tData[injectorIndex + 3] |= mask) : (tData[injectorIndex + 2] |= mask)) :\n (b5 ? (tData[injectorIndex + 1] |= mask) : (tData[injectorIndex] |= mask));\n }\n }\n /**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param tNode for which an injector should be retrieved / created.\n * @param hostView View where the node is stored\n * @returns Node injector\n */\n function getOrCreateNodeInjectorForNode(tNode, hostView) {\n var existingInjectorIndex = getInjectorIndex(tNode, hostView);\n if (existingInjectorIndex !== -1) {\n return existingInjectorIndex;\n }\n var tView = hostView[TVIEW];\n if (tView.firstTemplatePass) {\n tNode.injectorIndex = hostView.length;\n insertBloom(tView.data, tNode); // foundation for node bloom\n insertBloom(hostView, null); // foundation for cumulative bloom\n insertBloom(tView.blueprint, null);\n ngDevMode && assertEqual(tNode.flags === 0 || tNode.flags === 1 /* isComponent */, true, 'expected tNode.flags to not be initialized');\n }\n var parentLoc = getParentInjectorLocation(tNode, hostView);\n var parentIndex = getParentInjectorIndex(parentLoc);\n var parentLView = getParentInjectorView(parentLoc, hostView);\n var injectorIndex = tNode.injectorIndex;\n // If a parent injector can't be found, its location is set to -1.\n // In that case, we don't need to set up a cumulative bloom\n if (hasParentInjector(parentLoc)) {\n var parentData = parentLView[TVIEW].data;\n // Creates a cumulative bloom filter that merges the parent's bloom filter\n // and its own cumulative bloom (which contains tokens for all ancestors)\n for (var i = 0; i < 8; i++) {\n hostView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n }\n }\n hostView[injectorIndex + PARENT_INJECTOR] = parentLoc;\n return injectorIndex;\n }\n function insertBloom(arr, footer) {\n arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n }\n function getInjectorIndex(tNode, hostView) {\n if (tNode.injectorIndex === -1 ||\n // If the injector index is the same as its parent's injector index, then the index has been\n // copied down from the parent node. No injector has been created yet on this node.\n (tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex) ||\n // After the first template pass, the injector index might exist but the parent values\n // might not have been calculated yet for this instance\n hostView[tNode.injectorIndex + PARENT_INJECTOR] == null) {\n return -1;\n }\n else {\n return tNode.injectorIndex;\n }\n }\n /**\n * Finds the index of the parent injector, with a view offset if applicable. Used to set the\n * parent injector initially.\n *\n * Returns a combination of number of `ViewData` we have to go up and index in that `Viewdata`\n */\n function getParentInjectorLocation(tNode, view) {\n if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n return tNode.parent.injectorIndex; // ViewOffset is 0\n }\n // For most cases, the parent injector index can be found on the host node (e.g. for component\n // or container), so this loop will be skipped, but we must keep the loop here to support\n // the rarer case of deeply nested <ng-template> tags or inline views.\n var hostTNode = view[T_HOST];\n var viewOffset = 1;\n while (hostTNode && hostTNode.injectorIndex === -1) {\n view = view[DECLARATION_VIEW];\n hostTNode = view ? view[T_HOST] : null;\n viewOffset++;\n }\n return hostTNode ?\n hostTNode.injectorIndex | (viewOffset << 16 /* ViewOffsetShift */) :\n -1;\n }\n /**\n * Makes a type or an injection token public to the DI system by adding it to an\n * injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param token The type or the injection token to be made public\n */\n function diPublicInInjector(injectorIndex, view, token) {\n bloomAdd(injectorIndex, view[TVIEW], token);\n }\n /**\n * Inject static attribute value into directive constructor.\n *\n * This method is used with `factory` functions which are generated as part of\n * `defineDirective` or `defineComponent`. The method retrieves the static value\n * of an attribute. (Dynamic attributes are not supported since they are not resolved\n * at the time of injection and can change over time.)\n *\n * # Example\n * Given:\n * ```\n * @Component(...)\n * class MyComponent {\n * constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```\n * <my-component title=\"Hello\"></my-component>\n * ```\n *\n * Then factory method generated is:\n * ```\n * MyComponent.ngComponentDef = defineComponent({\n * factory: () => new MyComponent(injectAttribute('title'))\n * ...\n * })\n * ```\n *\n * @publicApi\n */\n function injectAttributeImpl(tNode, attrNameToInject) {\n ngDevMode && assertNodeOfPossibleTypes(tNode, 0 /* Container */, 3 /* Element */, 4 /* ElementContainer */);\n ngDevMode && assertDefined(tNode, 'expecting tNode');\n var attrs = tNode.attrs;\n if (attrs) {\n var attrsLength = attrs.length;\n var i = 0;\n while (i < attrsLength) {\n var value = attrs[i];\n // If we hit a `Bindings` or `Template` marker then we are done.\n if (isNameOnlyAttributeMarker(value))\n break;\n // Skip namespaced attributes\n if (value === 0 /* NamespaceURI */) {\n // we skip the next two values\n // as namespaced attributes looks like\n // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist',\n // 'existValue', ...]\n i = i + 2;\n }\n else if (typeof value === 'number') {\n // Skip to the first value of the marked attribute.\n i++;\n if (value === 1 /* Classes */ && attrNameToInject === 'class') {\n var accumulatedClasses = '';\n while (i < attrsLength && typeof attrs[i] === 'string') {\n accumulatedClasses += ' ' + attrs[i++];\n }\n return accumulatedClasses.trim();\n }\n else if (value === 2 /* Styles */ && attrNameToInject === 'style') {\n var accumulatedStyles = '';\n while (i < attrsLength && typeof attrs[i] === 'string') {\n accumulatedStyles += attrs[i++] + \": \" + attrs[i++] + \"; \";\n }\n return accumulatedStyles.trim();\n }\n else {\n while (i < attrsLength && typeof attrs[i] === 'string') {\n i++;\n }\n }\n }\n else if (value === attrNameToInject) {\n return attrs[i + 1];\n }\n else {\n i = i + 2;\n }\n }\n }\n return null;\n }\n /**\n * Returns the value associated to the given token from the NodeInjectors => ModuleInjector.\n *\n * Look for the injector providing the token by walking up the node injector tree and then\n * the module injector tree.\n *\n * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom\n * filter. Negative values are reserved for special objects.\n * - `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\n function getOrCreateInjectable(tNode, lView, token, flags, notFoundValue) {\n if (flags === void 0) { flags = exports.InjectFlags.Default; }\n if (tNode) {\n var bloomHash = bloomHashBitOrFactory(token);\n // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef\n // so just call the factory function to create it.\n if (typeof bloomHash === 'function') {\n var savePreviousOrParentTNode = getPreviousOrParentTNode();\n var saveLView = getLView();\n setTNodeAndViewData(tNode, lView);\n try {\n var value = bloomHash();\n if (value == null && !(flags & exports.InjectFlags.Optional)) {\n throw new Error(\"No provider for \" + stringifyForError(token) + \"!\");\n }\n else {\n return value;\n }\n }\n finally {\n setTNodeAndViewData(savePreviousOrParentTNode, saveLView);\n }\n }\n else if (typeof bloomHash == 'number') {\n if (bloomHash === -1) {\n // `-1` is a special value used to identify `Injector` types.\n return new NodeInjector(tNode, lView);\n }\n // If the token has a bloom hash, then it is a token which could be in NodeInjector.\n // A reference to the previous injector TView that was found while climbing the element\n // injector tree. This is used to know if viewProviders can be accessed on the current\n // injector.\n var previousTView = null;\n var injectorIndex = getInjectorIndex(tNode, lView);\n var parentLocation = NO_PARENT_INJECTOR;\n var hostTElementNode = flags & exports.InjectFlags.Host ? findComponentView(lView)[T_HOST] : null;\n // If we should skip this injector, or if there is no injector on this node, start by\n // searching\n // the parent injector.\n if (injectorIndex === -1 || flags & exports.InjectFlags.SkipSelf) {\n parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :\n lView[injectorIndex + PARENT_INJECTOR];\n if (!shouldSearchParent(flags, false)) {\n injectorIndex = -1;\n }\n else {\n previousTView = lView[TVIEW];\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n }\n // Traverse up the injector tree until we find a potential match or until we know there\n // *isn't* a match.\n while (injectorIndex !== -1) {\n parentLocation = lView[injectorIndex + PARENT_INJECTOR];\n // Check the current injector. If it matches, see if it contains token.\n var tView = lView[TVIEW];\n if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {\n // At this point, we have an injector which *may* contain the token, so we step through\n // the providers and directives associated with the injector's corresponding node to get\n // the instance.\n var instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n if (instance !== NOT_FOUND) {\n return instance;\n }\n }\n if (shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + TNODE] === hostTElementNode) &&\n bloomHasToken(bloomHash, injectorIndex, lView)) {\n // The def wasn't found anywhere on this node, so it was a false positive.\n // Traverse up the tree and continue searching.\n previousTView = tView;\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n else {\n // If we should not search parent OR If the ancestor bloom filter value does not have the\n // bit corresponding to the directive we can give up on traversing up to find the specific\n // injector.\n injectorIndex = -1;\n }\n }\n }\n }\n if (flags & exports.InjectFlags.Optional && notFoundValue === undefined) {\n // This must be set or the NullInjector will throw for optional deps\n notFoundValue = null;\n }\n if ((flags & (exports.InjectFlags.Self | exports.InjectFlags.Host)) === 0) {\n var moduleInjector = lView[INJECTOR$1];\n // switch to `injectInjectorOnly` implementation for module injector, since module injector\n // should not have access to Component/Directive DI scope (that may happen through\n // `directiveInject` implementation)\n var previousInjectImplementation = setInjectImplementation(undefined);\n try {\n if (moduleInjector) {\n return moduleInjector.get(token, notFoundValue, flags & exports.InjectFlags.Optional);\n }\n else {\n return injectRootLimpMode(token, notFoundValue, flags & exports.InjectFlags.Optional);\n }\n }\n finally {\n setInjectImplementation(previousInjectImplementation);\n }\n }\n if (flags & exports.InjectFlags.Optional) {\n return notFoundValue;\n }\n else {\n throw new Error(\"NodeInjector: NOT_FOUND [\" + stringifyForError(token) + \"]\");\n }\n }\n var NOT_FOUND = {};\n function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {\n var currentTView = lView[TVIEW];\n var tNode = currentTView.data[injectorIndex + TNODE];\n // First, we need to determine if view providers can be accessed by the starting element.\n // There are two possibities\n var canAccessViewProviders = previousTView == null ?\n // 1) This is the first invocation `previousTView == null` which means that we are at the\n // `TNode` of where injector is starting to look. In such a case the only time we are allowed\n // to look into the ViewProviders is if:\n // - we are on a component\n // - AND the injector set `includeViewProviders` to true (implying that the token can see\n // ViewProviders because it is the Component or a Service which itself was declared in\n // ViewProviders)\n (isComponent(tNode) && includeViewProviders) :\n // 2) `previousTView != null` which means that we are now walking across the parent nodes.\n // In such a case we are only allowed to look into the ViewProviders if:\n // - We just crossed from child View to Parent View `previousTView != currentTView`\n // - AND the parent TNode is an Element.\n // This means that we just came from the Component's View and therefore are allowed to see\n // into the ViewProviders.\n (previousTView != currentTView && (tNode.type === 3 /* Element */));\n // This special case happens when there is a @host on the inject and when we are searching\n // on the host element node.\n var isHostSpecialCase = (flags & exports.InjectFlags.Host) && hostTElementNode === tNode;\n var injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n if (injectableIdx !== null) {\n return getNodeInjectable(currentTView.data, lView, injectableIdx, tNode);\n }\n else {\n return NOT_FOUND;\n }\n }\n /**\n * Searches for the given token among the node's directives and providers.\n *\n * @param tNode TNode on which directives are present.\n * @param tView The tView we are currently processing\n * @param token Provider token or type of a directive to look for.\n * @param canAccessViewProviders Whether view providers should be considered.\n * @param isHostSpecialCase Whether the host special case applies.\n * @returns Index of a found directive or provider, or null when none found.\n */\n function locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {\n var nodeProviderIndexes = tNode.providerIndexes;\n var tInjectables = tView.data;\n var injectablesStart = nodeProviderIndexes & 65535 /* ProvidersStartIndexMask */;\n var directivesStart = tNode.directiveStart;\n var directiveEnd = tNode.directiveEnd;\n var cptViewProvidersCount = nodeProviderIndexes >> 16 /* CptViewProvidersCountShift */;\n var startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;\n // When the host special case applies, only the viewProviders and the component are visible\n var endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n for (var i = startingIndex; i < endIndex; i++) {\n var providerTokenOrDef = tInjectables[i];\n if (i < directivesStart && token === providerTokenOrDef ||\n i >= directivesStart && providerTokenOrDef.type === token) {\n return i;\n }\n }\n if (isHostSpecialCase) {\n var dirDef = tInjectables[directivesStart];\n if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n return directivesStart;\n }\n }\n return null;\n }\n /**\n * Retrieve or instantiate the injectable from the `lData` at particular `index`.\n *\n * This function checks to see if the value has already been instantiated and if so returns the\n * cached `injectable`. Otherwise if it detects that the value is still a factory it\n * instantiates the `injectable` and caches the value.\n */\n function getNodeInjectable(tData, lData, index, tNode) {\n var value = lData[index];\n if (isFactory(value)) {\n var factory = value;\n if (factory.resolving) {\n throw new Error(\"Circular dep for \" + stringifyForError(tData[index]));\n }\n var previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n factory.resolving = true;\n var previousInjectImplementation = void 0;\n if (factory.injectImpl) {\n previousInjectImplementation = setInjectImplementation(factory.injectImpl);\n }\n var savePreviousOrParentTNode = getPreviousOrParentTNode();\n var saveLView = getLView();\n setTNodeAndViewData(tNode, lData);\n try {\n value = lData[index] = factory.factory(null, tData, lData, tNode);\n }\n finally {\n if (factory.injectImpl)\n setInjectImplementation(previousInjectImplementation);\n setIncludeViewProviders(previousIncludeViewProviders);\n factory.resolving = false;\n setTNodeAndViewData(savePreviousOrParentTNode, saveLView);\n }\n }\n return value;\n }\n /**\n * Returns the bit in an injector's bloom filter that should be used to determine whether or not\n * the directive might be provided by the injector.\n *\n * When a directive is public, it is added to the bloom filter and given a unique ID that can be\n * retrieved on the Type. When the directive isn't public or the token is not a directive `null`\n * is returned as the node injector can not possibly provide that token.\n *\n * @param token the injection token\n * @returns the matching bit to check in the bloom filter or `null` if the token is not known.\n * When the returned value is negative then it represents special values such as `Injector`.\n */\n function bloomHashBitOrFactory(token) {\n ngDevMode && assertDefined(token, 'token must be defined');\n if (typeof token === 'string') {\n return token.charCodeAt(0) || 0;\n }\n var tokenId = token[NG_ELEMENT_ID];\n // Negative token IDs are used for special objects such as `Injector`\n return (typeof tokenId === 'number' && tokenId > 0) ? tokenId & BLOOM_MASK : tokenId;\n }\n function bloomHasToken(bloomHash, injectorIndex, injectorView) {\n // Create a mask that targets the specific bit associated with the directive we're looking for.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n var mask = 1 << bloomHash;\n var b7 = bloomHash & 0x80;\n var b6 = bloomHash & 0x40;\n var b5 = bloomHash & 0x20;\n // Our bloom filter size is 256 bits, which is eight 32-bit bloom filter buckets:\n // bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc.\n // Get the bloom filter value from the appropriate bucket based on the directive's bloomBit.\n var value;\n if (b7) {\n value = b6 ? (b5 ? injectorView[injectorIndex + 7] : injectorView[injectorIndex + 6]) :\n (b5 ? injectorView[injectorIndex + 5] : injectorView[injectorIndex + 4]);\n }\n else {\n value = b6 ? (b5 ? injectorView[injectorIndex + 3] : injectorView[injectorIndex + 2]) :\n (b5 ? injectorView[injectorIndex + 1] : injectorView[injectorIndex]);\n }\n // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n // this injector is a potential match.\n return !!(value & mask);\n }\n /** Returns true if flags prevent parent injector from being searched for tokens */\n function shouldSearchParent(flags, isFirstHostTNode) {\n return !(flags & exports.InjectFlags.Self) && !(flags & exports.InjectFlags.Host && isFirstHostTNode);\n }\n var NodeInjector = /** @class */ (function () {\n function NodeInjector(_tNode, _lView) {\n this._tNode = _tNode;\n this._lView = _lView;\n }\n NodeInjector.prototype.get = function (token, notFoundValue) {\n return getOrCreateInjectable(this._tNode, this._lView, token, undefined, notFoundValue);\n };\n return NodeInjector;\n }());\n /**\n * @codeGenApi\n */\n function ɵɵgetFactoryOf(type) {\n var typeAny = type;\n var def = getComponentDef(typeAny) || getDirectiveDef(typeAny) ||\n getPipeDef(typeAny) || getInjectableDef(typeAny) || getInjectorDef(typeAny);\n if (!def || def.factory === undefined) {\n return null;\n }\n return def.factory;\n }\n /**\n * @codeGenApi\n */\n function ɵɵgetInheritedFactory(type) {\n var proto = Object.getPrototypeOf(type.prototype).constructor;\n var factory = ɵɵgetFactoryOf(proto);\n if (factory !== null) {\n return factory;\n }\n else {\n // There is no factory defined. Either this was improper usage of inheritance\n // (no Angular decorator on the superclass) or there is no constructor at all\n // in the inheritance chain. Since the two cases cannot be distinguished, the\n // latter has to be assumed.\n return function (t) { return new t(); };\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function getDebugContext(error) {\n return error[ERROR_DEBUG_CONTEXT];\n }\n function getOriginalError(error) {\n return error[ERROR_ORIGINAL_ERROR];\n }\n function getErrorLogger(error) {\n return error[ERROR_LOGGER] || defaultErrorLogger;\n }\n function defaultErrorLogger(console) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n console.error.apply(console, __spread(values));\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Provides a hook for centralized exception handling.\n *\n * The default implementation of `ErrorHandler` prints error messages to the `console`. To\n * intercept error handling, write a custom exception handler that replaces this default as\n * appropriate for your app.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * class MyErrorHandler implements ErrorHandler {\n * handleError(error) {\n * // do something with the exception\n * }\n * }\n *\n * @NgModule({\n * providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n *\n * @publicApi\n */\n var ErrorHandler = /** @class */ (function () {\n function ErrorHandler() {\n /**\n * @internal\n */\n this._console = console;\n }\n ErrorHandler.prototype.handleError = function (error) {\n var originalError = this._findOriginalError(error);\n var context = this._findContext(error);\n // Note: Browser consoles show the place from where console.error was called.\n // We can use this to give users additional information about the error.\n var errorLogger = getErrorLogger(error);\n errorLogger(this._console, \"ERROR\", error);\n if (originalError) {\n errorLogger(this._console, \"ORIGINAL ERROR\", originalError);\n }\n if (context) {\n errorLogger(this._console, 'ERROR CONTEXT', context);\n }\n };\n /** @internal */\n ErrorHandler.prototype._findContext = function (error) {\n if (error) {\n return getDebugContext(error) ? getDebugContext(error) :\n this._findContext(getOriginalError(error));\n }\n return null;\n };\n /** @internal */\n ErrorHandler.prototype._findOriginalError = function (error) {\n var e = getOriginalError(error);\n while (e && getOriginalError(e)) {\n e = getOriginalError(e);\n }\n return e;\n };\n return ErrorHandler;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Defines a schema that allows an NgModule to contain the following:\n * - Non-Angular elements named with dash case (`-`).\n * - Element properties named with dash case (`-`).\n * Dash case is the naming convention for custom elements.\n *\n * @publicApi\n */\n var CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n };\n /**\n * Defines a schema that allows any property on any element.\n *\n * @publicApi\n */\n var NO_ERRORS_SCHEMA = {\n name: 'no-errors-schema'\n };\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!\n */\n /**\n * Creates an `Array` construction with a given name. This is useful when\n * looking for memory consumption to see what time of array it is.\n *\n *\n * @param name Name to give to the constructor\n * @returns A subclass of `Array` if possible. This can only be done in\n * environments which support `class` construct.\n */\n function createNamedArrayType(name) {\n // This should never be called in prod mode, so let's verify that is the case.\n if (ngDevMode) {\n try {\n // We need to do it this way so that TypeScript does not down-level the below code.\n var FunctionConstructor = createNamedArrayType.constructor;\n return (new FunctionConstructor('Array', \"return class ABC extends Array{}\"))(Array);\n }\n catch (e) {\n // If it does not work just give up and fall back to regular Array.\n return Array;\n }\n }\n else {\n throw new Error('Looks like we are in \\'prod mode\\', but we are creating a named Array type, which is wrong! Check your code');\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function normalizeDebugBindingName(name) {\n // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers\n name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));\n return \"ng-reflect-\" + name;\n }\n var CAMEL_CASE_REGEXP = /([A-Z])/g;\n function camelCaseToDashCase(input) {\n return input.replace(CAMEL_CASE_REGEXP, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n return '-' + m[1].toLowerCase();\n });\n }\n function normalizeDebugBindingValue(value) {\n try {\n // Limit the size of the value as otherwise the DOM just gets polluted.\n return value != null ? value.toString().slice(0, 30) : value;\n }\n catch (e) {\n return '[ERROR] Exception while trying to serialize the value';\n }\n }\n\n // Note: This hack is necessary so we don't erroneously get a circular dependency\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /** A special value which designates that a value has not changed. */\n var NO_CHANGE = {};\n\n /*\n * This file contains the logic to defer all hostBindings-related styling code to run\n * at a later point, instead of immediately (as is the case with how template-level\n * styling instructions are run).\n *\n * Certain styling instructions, present within directives, components and sub-classed\n * directives, are evaluated at different points (depending on priority) and will therefore\n * not be applied to the styling context of an element immediately. They are instead\n * designed to be applied just before styling is applied to an element.\n *\n * (The priority for when certain host-related styling operations are executed is discussed\n * more within `interfaces/styling.ts`.)\n */\n function registerHostDirective(context, directiveIndex) {\n var buffer = context[8 /* HostInstructionsQueue */];\n if (!buffer) {\n buffer = context[8 /* HostInstructionsQueue */] = [DEFAULT_TEMPLATE_DIRECTIVE_INDEX];\n }\n buffer[0 /* LastRegisteredDirectiveIndexPosition */] = directiveIndex;\n }\n /**\n * Queues a styling instruction to be run just before `renderStyling()` is executed.\n */\n function enqueueHostInstruction(context, priority, instructionFn, instructionFnArgs) {\n var buffer = context[8 /* HostInstructionsQueue */];\n // Buffer may be null if host element is a template node. In this case, just ignore the style.\n if (buffer != null) {\n var index = findNextInsertionIndex(buffer, priority);\n buffer.splice(index, 0, priority, instructionFn, instructionFnArgs);\n }\n }\n /**\n * Figures out where exactly to to insert the next host instruction queue entry.\n */\n function findNextInsertionIndex(buffer, priority) {\n for (var i = 1 /* ValuesStartPosition */; i < buffer.length; i += 3 /* Size */) {\n var p = buffer[i + 0 /* DirectiveIndexOffset */];\n if (p > priority) {\n return i;\n }\n }\n return buffer.length;\n }\n /**\n * Iterates through the host instructions queue (if present within the provided\n * context) and executes each queued instruction entry.\n */\n function flushQueue(context) {\n var buffer = context[8 /* HostInstructionsQueue */];\n if (buffer) {\n for (var i = 1 /* ValuesStartPosition */; i < buffer.length; i += 3 /* Size */) {\n var fn = buffer[i + 1 /* InstructionFnOffset */];\n var args = buffer[i + 2 /* ParamsOffset */];\n fn.apply(this, args);\n }\n buffer.length = 1 /* ValuesStartPosition */;\n }\n }\n /**\n * Determines whether or not to allow the host instructions queue to be flushed or not.\n *\n * Because the hostBindings function code is unaware of the presence of other host bindings\n * (as well as the template function) then styling is evaluated multiple times per element.\n * To prevent style and class values from being applied to the element multiple times, a\n * flush is only allowed when the last directive (the directive that was registered into\n * the styling context) attempts to render its styling.\n */\n function allowFlush(context, directiveIndex) {\n var buffer = context[8 /* HostInstructionsQueue */];\n if (buffer) {\n return buffer[0 /* LastRegisteredDirectiveIndexPosition */] ===\n directiveIndex;\n }\n return true;\n }\n\n /**\n * Combines the binding value and a factory for an animation player.\n *\n * Used to bind a player to an element template binding (currently only\n * `[style]`, `[style.prop]`, `[class]` and `[class.name]` bindings\n * supported). The provided `factoryFn` function will be run once all\n * the associated bindings have been evaluated on the element and is\n * designed to return a player which will then be placed on the element.\n *\n * @param factoryFn The function that is used to create a player\n * once all the rendering-related (styling values) have been\n * processed for the element binding.\n * @param value The raw value that will be exposed to the binding\n * so that the binding can update its internal values when\n * any changes are evaluated.\n */\n function bindPlayerFactory(factoryFn, value) {\n return new BoundPlayerFactory(factoryFn, value);\n }\n var BoundPlayerFactory = /** @class */ (function () {\n function BoundPlayerFactory(fn, value) {\n this.fn = fn;\n this.value = value;\n }\n return BoundPlayerFactory;\n }());\n\n /**\n * This file includes the code to power all styling-binding operations in Angular.\n *\n * These include:\n * [style]=\"myStyleObj\"\n * [class]=\"myClassObj\"\n * [style.prop]=\"myPropValue\"\n * [class.name]=\"myClassValue\"\n *\n * It also includes code that will allow style binding code to operate within host\n * bindings for components/directives.\n *\n * There are many different ways in which these functions below are called. Please see\n * `render3/interfaces/styling.ts` to get a better idea of how the styling algorithm works.\n */\n /**\n * Creates a new StylingContext an fills it with the provided static styling attribute values.\n */\n function initializeStaticContext(attrs, stylingStartIndex, directiveIndex) {\n if (directiveIndex === void 0) { directiveIndex = 0; }\n var context = createEmptyStylingContext();\n patchContextWithStaticAttrs(context, attrs, stylingStartIndex, directiveIndex);\n return context;\n }\n /**\n * Designed to update an existing styling context with new static styling\n * data (classes and styles).\n *\n * @param context the existing styling context\n * @param attrs an array of new static styling attributes that will be\n * assigned to the context\n * @param attrsStylingStartIndex what index to start iterating within the\n * provided `attrs` array to start reading style and class values\n */\n function patchContextWithStaticAttrs(context, attrs, attrsStylingStartIndex, directiveIndex) {\n // this means the context has already been set and instantiated\n if (context[1 /* MasterFlagPosition */] & 16 /* BindingAllocationLocked */)\n return;\n allocateOrUpdateDirectiveIntoContext(context, directiveIndex);\n var initialClasses = null;\n var initialStyles = null;\n var mode = -1;\n for (var i = attrsStylingStartIndex; i < attrs.length; i++) {\n var attr = attrs[i];\n if (typeof attr == 'number') {\n mode = attr;\n }\n else if (mode == 1 /* Classes */) {\n initialClasses = initialClasses || context[4 /* InitialClassValuesPosition */];\n patchInitialStylingValue(initialClasses, attr, true, directiveIndex);\n }\n else if (mode == 2 /* Styles */) {\n initialStyles = initialStyles || context[3 /* InitialStyleValuesPosition */];\n patchInitialStylingValue(initialStyles, attr, attrs[++i], directiveIndex);\n }\n }\n }\n /**\n * Designed to add a style or class value into the existing set of initial styles.\n *\n * The function will search and figure out if a style/class value is already present\n * within the provided initial styling array. If and when a style/class value is\n * present (allocated) then the code below will set the new value depending on the\n * following cases:\n *\n * 1) if the existing value is falsy (this happens because a `[class.prop]` or\n * `[style.prop]` binding was set, but there wasn't a matching static style\n * or class present on the context)\n * 2) if the value was set already by the template, component or directive, but the\n * new value is set on a higher level (i.e. a sub component which extends a parent\n * component sets its value after the parent has already set the same one)\n * 3) if the same directive provides a new set of styling values to set\n *\n * @param initialStyling the initial styling array where the new styling entry will be added to\n * @param prop the property value of the new entry (e.g. `width` (styles) or `foo` (classes))\n * @param value the styling value of the new entry (e.g. `absolute` (styles) or `true` (classes))\n * @param directiveOwnerIndex the directive owner index value of the styling source responsible\n * for these styles (see `interfaces/styling.ts#directives` for more info)\n */\n function patchInitialStylingValue(initialStyling, prop, value, directiveOwnerIndex) {\n for (var i = 2 /* KeyValueStartPosition */; i < initialStyling.length; i += 3 /* Size */) {\n var key = initialStyling[i + 0 /* PropOffset */];\n if (key === prop) {\n var existingValue = initialStyling[i + 1 /* ValueOffset */];\n var existingOwner = initialStyling[i + 2 /* DirectiveOwnerOffset */];\n if (allowValueChange(existingValue, value, existingOwner, directiveOwnerIndex)) {\n addOrUpdateStaticStyle(i, initialStyling, prop, value, directiveOwnerIndex);\n }\n return;\n }\n }\n // We did not find existing key, add a new one.\n addOrUpdateStaticStyle(null, initialStyling, prop, value, directiveOwnerIndex);\n }\n /**\n * Runs through the initial class values present in the provided\n * context and renders them via the provided renderer on the element.\n *\n * @param element the element the styling will be applied to\n * @param context the source styling context which contains the initial class values\n * @param renderer the renderer instance that will be used to apply the class\n * @returns the index that the classes were applied up until\n */\n function renderInitialClasses(element, context, renderer, startIndex) {\n var initialClasses = context[4 /* InitialClassValuesPosition */];\n var i = startIndex || 2 /* KeyValueStartPosition */;\n while (i < initialClasses.length) {\n var value = initialClasses[i + 1 /* ValueOffset */];\n if (value) {\n setClass(element, initialClasses[i + 0 /* PropOffset */], true, renderer, null);\n }\n i += 3 /* Size */;\n }\n return i;\n }\n /**\n * Runs through the initial styles values present in the provided\n * context and renders them via the provided renderer on the element.\n *\n * @param element the element the styling will be applied to\n * @param context the source styling context which contains the initial class values\n * @param renderer the renderer instance that will be used to apply the class\n * @returns the index that the styles were applied up until\n */\n function renderInitialStyles(element, context, renderer, startIndex) {\n var initialStyles = context[3 /* InitialStyleValuesPosition */];\n var i = startIndex || 2 /* KeyValueStartPosition */;\n while (i < initialStyles.length) {\n var value = initialStyles[i + 1 /* ValueOffset */];\n if (value) {\n setStyle(element, initialStyles[i + 0 /* PropOffset */], value, renderer, null);\n }\n i += 3 /* Size */;\n }\n return i;\n }\n /**\n * Adds in new binding values to a styling context.\n *\n * If a directive value is provided then all provided class/style binding names will\n * reference the provided directive.\n *\n * @param context the existing styling context\n * @param classBindingNames an array of class binding names that will be added to the context\n * @param styleBindingNames an array of style binding names that will be added to the context\n * @param styleSanitizer an optional sanitizer that handle all sanitization on for each of\n * the bindings added to the context. Note that if a directive is provided then the sanitizer\n * instance will only be active if and when the directive updates the bindings that it owns.\n */\n function updateContextWithBindings(context, directiveIndex, classBindingNames, styleBindingNames, styleSanitizer) {\n if (context[1 /* MasterFlagPosition */] & 16 /* BindingAllocationLocked */)\n return;\n // this means the context has already been patched with the directive's bindings\n var isNewDirective = findOrPatchDirectiveIntoRegistry(context, directiveIndex, false, styleSanitizer);\n if (!isNewDirective) {\n // this means the directive has already been patched in ... No point in doing anything\n return;\n }\n if (styleBindingNames) {\n styleBindingNames = hyphenateEntries(styleBindingNames);\n }\n // there are alot of variables being used below to track where in the context the new\n // binding values will be placed. Because the context consists of multiple types of\n // entries (single classes/styles and multi classes/styles) alot of the index positions\n // need to be computed ahead of time and the context needs to be extended before the values\n // are inserted in.\n var singlePropOffsetValues = context[5 /* SinglePropOffsetPositions */];\n var totalCurrentClassBindings = singlePropOffsetValues[1 /* ClassesCountPosition */];\n var totalCurrentStyleBindings = singlePropOffsetValues[0 /* StylesCountPosition */];\n var cachedClassMapValues = context[6 /* CachedMultiClasses */];\n var cachedStyleMapValues = context[7 /* CachedMultiStyles */];\n var classesOffset = totalCurrentClassBindings * 4 /* Size */;\n var stylesOffset = totalCurrentStyleBindings * 4 /* Size */;\n var singleStylesStartIndex = 10 /* SingleStylesStartPosition */;\n var singleClassesStartIndex = singleStylesStartIndex + stylesOffset;\n var multiStylesStartIndex = singleClassesStartIndex + classesOffset;\n var multiClassesStartIndex = multiStylesStartIndex + stylesOffset;\n // because we're inserting more bindings into the context, this means that the\n // binding values need to be referenced the singlePropOffsetValues array so that\n // the template/directive can easily find them inside of the `styleProp`\n // and the `classProp` functions without iterating through the entire context.\n // The first step to setting up these reference points is to mark how many bindings\n // are being added. Even if these bindings already exist in the context, the directive\n // or template code will still call them unknowingly. Therefore the total values need\n // to be registered so that we know how many bindings are assigned to each directive.\n var currentSinglePropsLength = singlePropOffsetValues.length;\n singlePropOffsetValues.push(styleBindingNames ? styleBindingNames.length : 0, classBindingNames ? classBindingNames.length : 0);\n // the code below will check to see if a new style binding already exists in the context\n // if so then there is no point in inserting it into the context again. Whether or not it\n // exists the styling offset code will now know exactly where it is\n var insertionOffset = 0;\n var filteredStyleBindingNames = [];\n if (styleBindingNames && styleBindingNames.length) {\n for (var i_1 = 0; i_1 < styleBindingNames.length; i_1++) {\n var name_1 = styleBindingNames[i_1];\n var singlePropIndex = getMatchingBindingIndex(context, name_1, singleStylesStartIndex, singleClassesStartIndex);\n if (singlePropIndex == -1) {\n singlePropIndex = singleClassesStartIndex + insertionOffset;\n insertionOffset += 4 /* Size */;\n filteredStyleBindingNames.push(name_1);\n }\n singlePropOffsetValues.push(singlePropIndex);\n }\n }\n // just like with the style binding loop above, the new class bindings get the same treatment...\n var filteredClassBindingNames = [];\n if (classBindingNames && classBindingNames.length) {\n for (var i_2 = 0; i_2 < classBindingNames.length; i_2++) {\n var name_2 = classBindingNames[i_2];\n var singlePropIndex = getMatchingBindingIndex(context, name_2, singleClassesStartIndex, multiStylesStartIndex);\n if (singlePropIndex == -1) {\n singlePropIndex = multiStylesStartIndex + insertionOffset;\n insertionOffset += 4 /* Size */;\n filteredClassBindingNames.push(name_2);\n }\n else {\n singlePropIndex += filteredStyleBindingNames.length * 4 /* Size */;\n }\n singlePropOffsetValues.push(singlePropIndex);\n }\n }\n // because new styles are being inserted, this means the existing collection of style offset\n // index values are incorrect (they point to the wrong values). The code below will run through\n // the entire offset array and update the existing set of index values to point to their new\n // locations while taking the new binding values into consideration.\n var i = 2 /* ValueStartPosition */;\n if (filteredStyleBindingNames.length) {\n while (i < currentSinglePropsLength) {\n var totalStyles = singlePropOffsetValues[i + 0 /* StylesCountPosition */];\n var totalClasses = singlePropOffsetValues[i + 1 /* ClassesCountPosition */];\n if (totalClasses) {\n var start = i + 2 /* ValueStartPosition */ + totalStyles;\n for (var j = start; j < start + totalClasses; j++) {\n singlePropOffsetValues[j] += filteredStyleBindingNames.length * 4 /* Size */;\n }\n }\n var total = totalStyles + totalClasses;\n i += 2 /* ValueStartPosition */ + total;\n }\n }\n var totalNewEntries = filteredClassBindingNames.length + filteredStyleBindingNames.length;\n // in the event that there are new style values being inserted, all existing class and style\n // bindings need to have their pointer values offsetted with the new amount of space that is\n // used for the new style/class bindings.\n for (var i_3 = singleStylesStartIndex; i_3 < context.length; i_3 += 4 /* Size */) {\n var isMultiBased = i_3 >= multiStylesStartIndex;\n var isClassBased = i_3 >= (isMultiBased ? multiClassesStartIndex : singleClassesStartIndex);\n var flag = getPointers(context, i_3);\n var staticIndex = getInitialIndex(flag);\n var singleOrMultiIndex = getMultiOrSingleIndex(flag);\n if (isMultiBased) {\n singleOrMultiIndex +=\n isClassBased ? (filteredStyleBindingNames.length * 4 /* Size */) : 0;\n }\n else {\n singleOrMultiIndex += (totalNewEntries * 4 /* Size */) +\n ((isClassBased ? filteredStyleBindingNames.length : 0) * 4 /* Size */);\n }\n setFlag(context, i_3, pointers(flag, staticIndex, singleOrMultiIndex));\n }\n // this is where we make space in the context for the new style bindings\n for (var i_4 = 0; i_4 < filteredStyleBindingNames.length * 4 /* Size */; i_4++) {\n context.splice(multiClassesStartIndex, 0, null);\n context.splice(singleClassesStartIndex, 0, null);\n singleClassesStartIndex++;\n multiStylesStartIndex++;\n multiClassesStartIndex += 2; // both single + multi slots were inserted\n }\n // this is where we make space in the context for the new class bindings\n for (var i_5 = 0; i_5 < filteredClassBindingNames.length * 4 /* Size */; i_5++) {\n context.splice(multiStylesStartIndex, 0, null);\n context.push(null);\n multiStylesStartIndex++;\n multiClassesStartIndex++;\n }\n var initialClasses = context[4 /* InitialClassValuesPosition */];\n var initialStyles = context[3 /* InitialStyleValuesPosition */];\n // the code below will insert each new entry into the context and assign the appropriate\n // flags and index values to them. It's important this runs at the end of this function\n // because the context, property offset and index values have all been computed just before.\n for (var i_6 = 0; i_6 < totalNewEntries; i_6++) {\n var entryIsClassBased = i_6 >= filteredStyleBindingNames.length;\n var adjustedIndex = entryIsClassBased ? (i_6 - filteredStyleBindingNames.length) : i_6;\n var propName = entryIsClassBased ? filteredClassBindingNames[adjustedIndex] :\n filteredStyleBindingNames[adjustedIndex];\n var multiIndex = void 0, singleIndex = void 0;\n if (entryIsClassBased) {\n multiIndex = multiClassesStartIndex +\n ((totalCurrentClassBindings + adjustedIndex) * 4 /* Size */);\n singleIndex = singleClassesStartIndex +\n ((totalCurrentClassBindings + adjustedIndex) * 4 /* Size */);\n }\n else {\n multiIndex =\n multiStylesStartIndex + ((totalCurrentStyleBindings + adjustedIndex) * 4 /* Size */);\n singleIndex = singleStylesStartIndex +\n ((totalCurrentStyleBindings + adjustedIndex) * 4 /* Size */);\n }\n // if a property is not found in the initial style values list then it\n // is ALWAYS added in case a follow-up directive introduces the same initial\n // style/class value later on.\n var initialValuesToLookup = entryIsClassBased ? initialClasses : initialStyles;\n var indexForInitial = getInitialStylingValuesIndexOf(initialValuesToLookup, propName);\n if (indexForInitial === -1) {\n indexForInitial = addOrUpdateStaticStyle(null, initialValuesToLookup, propName, entryIsClassBased ? false : null, directiveIndex) +\n 1 /* ValueOffset */;\n }\n else {\n indexForInitial += 1 /* ValueOffset */;\n }\n var initialFlag = prepareInitialFlag(context, propName, entryIsClassBased, styleSanitizer || null);\n setFlag(context, singleIndex, pointers(initialFlag, indexForInitial, multiIndex));\n setProp(context, singleIndex, propName);\n setValue(context, singleIndex, null);\n setPlayerBuilderIndex(context, singleIndex, 0, directiveIndex);\n setFlag(context, multiIndex, pointers(initialFlag, indexForInitial, singleIndex));\n setProp(context, multiIndex, propName);\n setValue(context, multiIndex, null);\n setPlayerBuilderIndex(context, multiIndex, 0, directiveIndex);\n }\n // the total classes/style values are updated so the next time the context is patched\n // additional style/class bindings from another directive then it knows exactly where\n // to insert them in the context\n singlePropOffsetValues[1 /* ClassesCountPosition */] =\n totalCurrentClassBindings + filteredClassBindingNames.length;\n singlePropOffsetValues[0 /* StylesCountPosition */] =\n totalCurrentStyleBindings + filteredStyleBindingNames.length;\n // the map-based values also need to know how many entries got inserted\n cachedClassMapValues[0 /* EntriesCountPosition */] +=\n filteredClassBindingNames.length;\n cachedStyleMapValues[0 /* EntriesCountPosition */] +=\n filteredStyleBindingNames.length;\n var newStylesSpaceAllocationSize = filteredStyleBindingNames.length * 4 /* Size */;\n var newClassesSpaceAllocationSize = filteredClassBindingNames.length * 4 /* Size */;\n // update the multi styles cache with a reference for the directive that was just inserted\n var directiveMultiStylesStartIndex = multiStylesStartIndex + totalCurrentStyleBindings * 4 /* Size */;\n var cachedStyleMapIndex = cachedStyleMapValues.length;\n registerMultiMapEntry(context, directiveIndex, false, directiveMultiStylesStartIndex, filteredStyleBindingNames.length);\n for (var i_7 = 1 /* ValuesStartPosition */; i_7 < cachedStyleMapIndex; i_7 += 4 /* Size */) {\n // multi values start after all the single values (which is also where classes are) in the\n // context therefore the new class allocation size should be taken into account\n cachedStyleMapValues[i_7 + 1 /* PositionStartOffset */] +=\n newClassesSpaceAllocationSize + newStylesSpaceAllocationSize;\n }\n // update the multi classes cache with a reference for the directive that was just inserted\n var directiveMultiClassesStartIndex = multiClassesStartIndex + totalCurrentClassBindings * 4 /* Size */;\n var cachedClassMapIndex = cachedClassMapValues.length;\n registerMultiMapEntry(context, directiveIndex, true, directiveMultiClassesStartIndex, filteredClassBindingNames.length);\n for (var i_8 = 1 /* ValuesStartPosition */; i_8 < cachedClassMapIndex; i_8 += 4 /* Size */) {\n // the reason why both the styles + classes space is allocated to the existing offsets is\n // because the styles show up before the classes in the context and any new inserted\n // styles will offset any existing class entries in the context (even if there are no\n // new class entries added) also the reason why it's *2 is because both single + multi\n // entries for each new style have been added in the context before the multi class values\n // actually start\n cachedClassMapValues[i_8 + 1 /* PositionStartOffset */] +=\n (newStylesSpaceAllocationSize * 2) + newClassesSpaceAllocationSize;\n }\n // there is no initial value flag for the master index since it doesn't\n // reference an initial style value\n var masterFlag = pointers(0, 0, multiStylesStartIndex);\n setFlag(context, 1 /* MasterFlagPosition */, masterFlag);\n }\n /**\n * Searches through the existing registry of directives\n */\n function findOrPatchDirectiveIntoRegistry(context, directiveIndex, staticModeOnly, styleSanitizer) {\n var directiveRegistry = context[2 /* DirectiveRegistryPosition */];\n var index = directiveIndex * 2 /* Size */;\n var singlePropStartPosition = index + 0 /* SinglePropValuesIndexOffset */;\n // this means that the directive has already been registered into the registry\n if (index < directiveRegistry.length &&\n directiveRegistry[singlePropStartPosition] >= 0)\n return false;\n var singlePropsStartIndex = staticModeOnly ? -1 : context[5 /* SinglePropOffsetPositions */].length;\n allocateOrUpdateDirectiveIntoContext(context, directiveIndex, singlePropsStartIndex, styleSanitizer);\n return true;\n }\n function getMatchingBindingIndex(context, bindingName, start, end) {\n for (var j = start; j < end; j += 4 /* Size */) {\n if (getProp(context, j) === bindingName)\n return j;\n }\n return -1;\n }\n /**\n * Registers the provided multi class values to the context.\n *\n * This function will iterate over the provided `classesInput` values and\n * insert/update or remove them from the context at exactly the right spot.\n *\n * This function also takes in a directive which implies that the styling values will\n * be evaluated for that directive with respect to any other styling that already exists\n * on the context. When there are styles that conflict (e.g. say `ngClass` and `[class]`\n * both update the `foo` className value at the same time) then the styling algorithm code below\n * will decide which one wins based on the directive styling prioritization mechanism. (This\n * mechanism is better explained in render3/interfaces/styling.ts#directives).\n *\n * This function will not render any styling values on screen, but is rather designed to\n * prepare the context for that. `renderStyling` must be called afterwards to render any\n * styling data that was set in this function (note that `updateClassProp` and\n * `updateStyleProp` are designed to be run after this function is run).\n *\n * @param context The styling context that will be updated with the\n * newly provided style values.\n * @param classesInput The key/value map of CSS class names that will be used for the update.\n * @param stylesInput The key/value map of CSS styles that will be used for the update.\n */\n function updateClassMap(context, classesInput, directiveIndex) {\n if (directiveIndex === void 0) { directiveIndex = 0; }\n updateStylingMap(context, classesInput, true, directiveIndex);\n }\n /**\n * Registers the provided multi style values to the context.\n *\n * This function will iterate over the provided `stylesInput` values and\n * insert/update or remove them from the context at exactly the right spot.\n *\n * This function also takes in a directive which implies that the styling values will\n * be evaluated for that directive with respect to any other styling that already exists\n * on the context. When there are styles that conflict (e.g. say `ngStyle` and `[style]`\n * both update the `width` property at the same time) then the styling algorithm code below\n * will decide which one wins based on the directive styling prioritization mechanism. (This\n * mechanism is better explained in render3/interfaces/styling.ts#directives).\n *\n * This function will not render any styling values on screen, but is rather designed to\n * prepare the context for that. `renderStyling` must be called afterwards to render any\n * styling data that was set in this function (note that `updateClassProp` and\n * `updateStyleProp` are designed to be run after this function is run).\n *\n * @param context The styling context that will be updated with the\n * newly provided style values.\n * @param stylesInput The key/value map of CSS styles that will be used for the update.\n */\n function updateStyleMap(context, stylesInput, directiveIndex) {\n if (directiveIndex === void 0) { directiveIndex = 0; }\n updateStylingMap(context, stylesInput, false, directiveIndex);\n }\n function updateStylingMap(context, input, entryIsClassBased, directiveIndex) {\n if (directiveIndex === void 0) { directiveIndex = 0; }\n ngDevMode && (entryIsClassBased ? ngDevMode.classMap++ : ngDevMode.styleMap++);\n ngDevMode && assertValidDirectiveIndex(context, directiveIndex);\n // early exit (this is what's done to avoid using ctx.bind() to cache the value)\n if (isMultiValueCacheHit(context, entryIsClassBased, directiveIndex, input))\n return;\n input =\n input === NO_CHANGE ? readCachedMapValue(context, entryIsClassBased, directiveIndex) : input;\n var element = context[0 /* ElementPosition */];\n var playerBuilder = input instanceof BoundPlayerFactory ?\n new ClassAndStylePlayerBuilder(input, element, entryIsClassBased ? 1 /* Class */ : 2 /* Style */) :\n null;\n var rawValue = playerBuilder ? input.value : input;\n // the position is always the same, but whether the player builder gets set\n // at all (depending if its set) will be reflected in the index value below...\n var playerBuilderPosition = entryIsClassBased ? 1 /* ClassMapPlayerBuilderPosition */ :\n 3 /* StyleMapPlayerBuilderPosition */;\n var playerBuilderIndex = playerBuilder ? playerBuilderPosition : 0;\n var playerBuildersAreDirty = false;\n if (hasPlayerBuilderChanged(context, playerBuilder, playerBuilderPosition)) {\n setPlayerBuilder(context, playerBuilder, playerBuilderPosition);\n playerBuildersAreDirty = true;\n }\n // each time a string-based value pops up then it shouldn't require a deep\n // check of what's changed.\n var startIndex;\n var endIndex;\n var propNames;\n var applyAll = false;\n if (entryIsClassBased) {\n if (typeof rawValue == 'string') {\n propNames = rawValue.split(/\\s+/);\n // this boolean is used to avoid having to create a key/value map of `true` values\n // since a className string implies that all those classes are added\n applyAll = true;\n }\n else {\n propNames = rawValue ? Object.keys(rawValue) : EMPTY_ARRAY$2;\n }\n startIndex = getMultiClassesStartIndex(context);\n endIndex = context.length;\n }\n else {\n startIndex = getMultiStylesStartIndex(context);\n endIndex = getMultiClassesStartIndex(context);\n propNames = rawValue ? Object.keys(rawValue) : EMPTY_ARRAY$2;\n }\n var values = (rawValue || EMPTY_OBJ);\n patchStylingMapIntoContext(context, directiveIndex, playerBuilderIndex, startIndex, endIndex, propNames, applyAll || values, input, entryIsClassBased);\n if (playerBuildersAreDirty) {\n setContextPlayersDirty(context, true);\n }\n ngDevMode && (entryIsClassBased ? ngDevMode.classMapCacheMiss++ : ngDevMode.styleMapCacheMiss++);\n }\n /**\n * Applies the given multi styling (styles or classes) values to the context.\n *\n * The styling algorithm code that applies multi-level styling (things like `[style]` and `[class]`\n * values) resides here.\n *\n * Because this function understands that multiple directives may all write to the `[style]` and\n * `[class]` bindings (through host bindings), it relies of each directive applying its binding\n * value in order. This means that a directive like `classADirective` will always fire before\n * `classBDirective` and therefore its styling values (classes and styles) will always be evaluated\n * in the same order. Because of this consistent ordering, the first directive has a higher priority\n * than the second one. It is with this prioritzation mechanism that the styling algorithm knows how\n * to merge and apply redudant styling properties.\n *\n * The function itself applies the key/value entries (or an array of keys) to\n * the context in the following steps.\n *\n * STEP 1:\n * First check to see what properties are already set and in use by another directive in the\n * context (e.g. `ngClass` set the `width` value and `[style.width]=\"w\"` in a directive is\n * attempting to set it as well).\n *\n * STEP 2:\n * All remaining properties (that were not set prior to this directive) are now updated in\n * the context. Any new properties are inserted exactly at their spot in the context and any\n * previously set properties are shifted to exactly where the cursor sits while iterating over\n * the context. The end result is a balanced context that includes the exact ordering of the\n * styling properties/values for the provided input from the directive.\n *\n * STEP 3:\n * Any unmatched properties in the context that belong to the directive are set to null\n *\n * Once the updating phase is done, then the algorithm will decide whether or not to flag the\n * follow-up directives (the directives that will pass in their styling values) depending on if\n * the \"shape\" of the multi-value map has changed (either if any keys are removed or added or\n * if there are any new `null` values). If any follow-up directives are flagged as dirty then the\n * algorithm will run again for them. Otherwise if the shape did not change then any follow-up\n * directives will not run (so long as their binding values stay the same).\n *\n * @returns the total amount of new slots that were allocated into the context due to new styling\n * properties that were detected.\n */\n function patchStylingMapIntoContext(context, directiveIndex, playerBuilderIndex, ctxStart, ctxEnd, props, values, cacheValue, entryIsClassBased) {\n var dirty = false;\n var cacheIndex = 1 /* ValuesStartPosition */ +\n directiveIndex * 4 /* Size */;\n // the cachedValues array is the registry of all multi style values (map values). Each\n // value is stored (cached) each time is updated.\n var cachedValues = context[entryIsClassBased ? 6 /* CachedMultiClasses */ : 7 /* CachedMultiStyles */];\n // this is the index in which this directive has ownership access to write to this\n // value (anything before is owned by a previous directive that is more important)\n var ownershipValuesStartIndex = cachedValues[cacheIndex + 1 /* PositionStartOffset */];\n var existingCachedValue = cachedValues[cacheIndex + 2 /* ValueOffset */];\n var existingCachedValueCount = cachedValues[cacheIndex + 3 /* ValueCountOffset */];\n var existingCachedValueIsDirty = cachedValues[cacheIndex + 0 /* DirtyFlagOffset */] === 1;\n // A shape change means the provided map value has either removed or added new properties\n // compared to what were in the last time. If a shape change occurs then it means that all\n // follow-up multi-styling entries are obsolete and will be examined again when CD runs\n // them. If a shape change has not occurred then there is no reason to check any other\n // directive values if their identity has not changed. If a previous directive set this\n // value as dirty (because its own shape changed) then this means that the object has been\n // offset to a different area in the context. Because its value has been offset then it\n // can't write to a region that it wrote to before (which may have been apart of another\n // directive) and therefore its shape changes too.\n var valuesEntryShapeChange = existingCachedValueIsDirty || ((!existingCachedValue && cacheValue) ? true : false);\n var totalUniqueValues = 0;\n var totalNewAllocatedSlots = 0;\n // this is a trick to avoid building {key:value} map where all the values\n // are `true` (this happens when a className string is provided instead of a\n // map as an input value to this styling algorithm)\n var applyAllProps = values === true;\n // STEP 1:\n // loop through the earlier directives and figure out if any properties here will be placed\n // in their area (this happens when the value is null because the earlier directive erased it).\n var ctxIndex = ctxStart;\n var totalRemainingProperties = props.length;\n while (ctxIndex < ownershipValuesStartIndex) {\n var currentProp = getProp(context, ctxIndex);\n if (totalRemainingProperties) {\n for (var i = 0; i < props.length; i++) {\n var mapProp = props[i];\n var normalizedProp = mapProp ? (entryIsClassBased ? mapProp : hyphenate(mapProp)) : null;\n if (normalizedProp && currentProp === normalizedProp) {\n var currentValue = getValue(context, ctxIndex);\n var currentDirectiveIndex = getDirectiveIndexFromEntry(context, ctxIndex);\n var value = applyAllProps ? true : values[normalizedProp];\n var currentFlag = getPointers(context, ctxIndex);\n if (hasValueChanged(currentFlag, currentValue, value) &&\n allowValueChange(currentValue, value, currentDirectiveIndex, directiveIndex)) {\n setValue(context, ctxIndex, value);\n setPlayerBuilderIndex(context, ctxIndex, playerBuilderIndex, directiveIndex);\n if (hasInitialValueChanged(context, currentFlag, value)) {\n setDirty(context, ctxIndex, true);\n dirty = true;\n }\n }\n props[i] = null;\n totalRemainingProperties--;\n break;\n }\n }\n }\n ctxIndex += 4 /* Size */;\n }\n // STEP 2:\n // apply the left over properties to the context in the correct order.\n if (totalRemainingProperties) {\n var sanitizer = entryIsClassBased ? null : getStyleSanitizer(context, directiveIndex);\n propertiesLoop: for (var i = 0; i < props.length; i++) {\n var mapProp = props[i];\n if (!mapProp) {\n // this is an early exit in case a value was already encountered above in the\n // previous loop (which means that the property was applied or rejected)\n continue;\n }\n var value = applyAllProps ? true : values[mapProp];\n var normalizedProp = entryIsClassBased ? mapProp : hyphenate(mapProp);\n var isInsideOwnershipArea = ctxIndex >= ownershipValuesStartIndex;\n for (var j = ctxIndex; j < ctxEnd; j += 4 /* Size */) {\n var distantCtxProp = getProp(context, j);\n if (distantCtxProp === normalizedProp) {\n var distantCtxDirectiveIndex = getDirectiveIndexFromEntry(context, j);\n var distantCtxPlayerBuilderIndex = getPlayerBuilderIndex(context, j);\n var distantCtxValue = getValue(context, j);\n var distantCtxFlag = getPointers(context, j);\n if (allowValueChange(distantCtxValue, value, distantCtxDirectiveIndex, directiveIndex)) {\n // even if the entry isn't updated (by value or directiveIndex) then\n // it should still be moved over to the correct spot in the array so\n // the iteration loop is tighter.\n if (isInsideOwnershipArea) {\n swapMultiContextEntries(context, ctxIndex, j);\n totalUniqueValues++;\n }\n if (hasValueChanged(distantCtxFlag, distantCtxValue, value)) {\n if (value === null || value === undefined && value !== distantCtxValue) {\n valuesEntryShapeChange = true;\n }\n setValue(context, ctxIndex, value);\n // SKIP IF INITIAL CHECK\n // If the former `value` is `null` then it means that an initial value\n // could be being rendered on screen. If that is the case then there is\n // no point in updating the value in case it matches. In other words if the\n // new value is the exact same as the previously rendered value (which\n // happens to be the initial value) then do nothing.\n if (distantCtxValue !== null ||\n hasInitialValueChanged(context, distantCtxFlag, value)) {\n setDirty(context, ctxIndex, true);\n dirty = true;\n }\n }\n if (distantCtxDirectiveIndex !== directiveIndex ||\n playerBuilderIndex !== distantCtxPlayerBuilderIndex) {\n setPlayerBuilderIndex(context, ctxIndex, playerBuilderIndex, directiveIndex);\n }\n }\n ctxIndex += 4 /* Size */;\n continue propertiesLoop;\n }\n }\n // fallback case ... value not found at all in the context\n if (value != null) {\n valuesEntryShapeChange = true;\n totalUniqueValues++;\n var flag = prepareInitialFlag(context, normalizedProp, entryIsClassBased, sanitizer) |\n 1 /* Dirty */;\n var insertionIndex = isInsideOwnershipArea ?\n ctxIndex :\n (ownershipValuesStartIndex + totalNewAllocatedSlots * 4 /* Size */);\n insertNewMultiProperty(context, insertionIndex, entryIsClassBased, normalizedProp, flag, value, directiveIndex, playerBuilderIndex);\n totalNewAllocatedSlots++;\n ctxEnd += 4 /* Size */;\n ctxIndex += 4 /* Size */;\n dirty = true;\n }\n }\n }\n // STEP 3:\n // Remove (nullify) any existing entries in the context that were not apart of the\n // map input value that was passed into this algorithm for this directive.\n while (ctxIndex < ctxEnd) {\n valuesEntryShapeChange = true; // some values are missing\n var ctxValue = getValue(context, ctxIndex);\n var ctxFlag = getPointers(context, ctxIndex);\n var ctxDirective = getDirectiveIndexFromEntry(context, ctxIndex);\n if (ctxValue != null) {\n valuesEntryShapeChange = true;\n }\n if (hasValueChanged(ctxFlag, ctxValue, null)) {\n setValue(context, ctxIndex, null);\n // only if the initial value is falsy then\n if (hasInitialValueChanged(context, ctxFlag, ctxValue)) {\n setDirty(context, ctxIndex, true);\n dirty = true;\n }\n setPlayerBuilderIndex(context, ctxIndex, playerBuilderIndex, directiveIndex);\n }\n ctxIndex += 4 /* Size */;\n }\n // Because the object shape has changed, this means that all follow-up directives will need to\n // reapply their values into the object. For this to happen, the cached array needs to be updated\n // with dirty flags so that follow-up calls to `updateStylingMap` will reapply their styling code.\n // the reapplication of styling code within the context will reshape it and update the offset\n // values (also follow-up directives can write new values in case earlier directives set anything\n // to null due to removals or falsy values).\n valuesEntryShapeChange = valuesEntryShapeChange || existingCachedValueCount !== totalUniqueValues;\n updateCachedMapValue(context, directiveIndex, entryIsClassBased, cacheValue, ownershipValuesStartIndex, ctxEnd, totalUniqueValues, valuesEntryShapeChange);\n if (dirty) {\n setContextDirty(context, true);\n }\n return totalNewAllocatedSlots;\n }\n /**\n * Sets and resolves a single class value on the provided `StylingContext` so\n * that they can be applied to the element once `renderStyling` is called.\n *\n * @param context The styling context that will be updated with the\n * newly provided class value.\n * @param offset The index of the CSS class which is being updated.\n * @param addOrRemove Whether or not to add or remove the CSS class\n * @param forceOverride whether or not to skip all directive prioritization\n * and just apply the value regardless.\n */\n function updateClassProp(context, offset, input, directiveIndex, forceOverride) {\n if (directiveIndex === void 0) { directiveIndex = 0; }\n updateSingleStylingValue(context, offset, input, true, directiveIndex, forceOverride);\n }\n /**\n * Sets and resolves a single style value on the provided `StylingContext` so\n * that they can be applied to the element once `renderStyling` is called.\n *\n * Note that prop-level styling values are considered higher priority than any styling that\n * has been applied using `updateStylingMap`, therefore, when styling values are rendered\n * then any styles/classes that have been applied using this function will be considered first\n * (then multi values second and then initial values as a backup).\n *\n * @param context The styling context that will be updated with the\n * newly provided style value.\n * @param offset The index of the property which is being updated.\n * @param value The CSS style value that will be assigned\n * @param forceOverride whether or not to skip all directive prioritization\n * and just apply the value regardless.\n */\n function updateStyleProp(context, offset, input, directiveIndex, forceOverride) {\n if (directiveIndex === void 0) { directiveIndex = 0; }\n updateSingleStylingValue(context, offset, input, false, directiveIndex, forceOverride);\n }\n function updateSingleStylingValue(context, offset, input, isClassBased, directiveIndex, forceOverride) {\n ngDevMode && assertValidDirectiveIndex(context, directiveIndex);\n var singleIndex = getSinglePropIndexValue(context, directiveIndex, offset, isClassBased);\n var currValue = getValue(context, singleIndex);\n var currFlag = getPointers(context, singleIndex);\n var currDirective = getDirectiveIndexFromEntry(context, singleIndex);\n var value = (input instanceof BoundPlayerFactory) ? input.value : input;\n ngDevMode && ngDevMode.stylingProp++;\n if (hasValueChanged(currFlag, currValue, value) &&\n (forceOverride || allowValueChange(currValue, value, currDirective, directiveIndex))) {\n var isClassBased_1 = (currFlag & 2 /* Class */) === 2 /* Class */;\n var element = context[0 /* ElementPosition */];\n var playerBuilder = input instanceof BoundPlayerFactory ?\n new ClassAndStylePlayerBuilder(input, element, isClassBased_1 ? 1 /* Class */ : 2 /* Style */) :\n null;\n var value_1 = (playerBuilder ? input.value : input);\n var currPlayerIndex = getPlayerBuilderIndex(context, singleIndex);\n var playerBuildersAreDirty = false;\n var playerBuilderIndex = playerBuilder ? currPlayerIndex : 0;\n if (hasPlayerBuilderChanged(context, playerBuilder, currPlayerIndex)) {\n var newIndex = setPlayerBuilder(context, playerBuilder, currPlayerIndex);\n playerBuilderIndex = playerBuilder ? newIndex : 0;\n playerBuildersAreDirty = true;\n }\n if (playerBuildersAreDirty || currDirective !== directiveIndex) {\n setPlayerBuilderIndex(context, singleIndex, playerBuilderIndex, directiveIndex);\n }\n if (currDirective !== directiveIndex) {\n var prop = getProp(context, singleIndex);\n var sanitizer = getStyleSanitizer(context, directiveIndex);\n setSanitizeFlag(context, singleIndex, (sanitizer && sanitizer(prop, null, 1 /* ValidateProperty */)) ? true : false);\n }\n // the value will always get updated (even if the dirty flag is skipped)\n setValue(context, singleIndex, value_1);\n var indexForMulti = getMultiOrSingleIndex(currFlag);\n // if the value is the same in the multi-area then there's no point in re-assembling\n var valueForMulti = getValue(context, indexForMulti);\n if (!valueForMulti || hasValueChanged(currFlag, valueForMulti, value_1)) {\n var multiDirty = false;\n var singleDirty = true;\n // only when the value is set to `null` should the multi-value get flagged\n if (!valueExists(value_1, isClassBased_1) && valueExists(valueForMulti, isClassBased_1)) {\n multiDirty = true;\n singleDirty = false;\n }\n setDirty(context, indexForMulti, multiDirty);\n setDirty(context, singleIndex, singleDirty);\n setContextDirty(context, true);\n }\n if (playerBuildersAreDirty) {\n setContextPlayersDirty(context, true);\n }\n ngDevMode && ngDevMode.stylingPropCacheMiss++;\n }\n }\n /**\n * Renders all queued styling using a renderer onto the given element.\n *\n * This function works by rendering any styles (that have been applied\n * using `updateStylingMap`) and any classes (that have been applied using\n * `updateStyleProp`) onto the provided element using the provided renderer.\n * Just before the styles/classes are rendered a final key/value style map\n * will be assembled (if `styleStore` or `classStore` are provided).\n *\n * @param lElement the element that the styles will be rendered on\n * @param context The styling context that will be used to determine\n * what styles will be rendered\n * @param renderer the renderer that will be used to apply the styling\n * @param classesStore if provided, the updated class values will be applied\n * to this key/value map instead of being renderered via the renderer.\n * @param stylesStore if provided, the updated style values will be applied\n * to this key/value map instead of being renderered via the renderer.\n * @returns number the total amount of players that got queued for animation (if any)\n */\n function renderStyling(context, renderer, rootOrView, isFirstRender, classesStore, stylesStore, directiveIndex) {\n if (directiveIndex === void 0) { directiveIndex = 0; }\n var totalPlayersQueued = 0;\n ngDevMode && ngDevMode.stylingApply++;\n // this prevents multiple attempts to render style/class values on\n // the same element...\n if (allowFlush(context, directiveIndex)) {\n // all styling instructions present within any hostBindings functions\n // do not update the context immediately when called. They are instead\n // queued up and applied to the context right at this point. Why? This\n // is because Angular evaluates component/directive and directive\n // sub-class code at different points and it's important that the\n // styling values are applied to the context in the right order\n // (see `interfaces/styling.ts` for more information).\n flushQueue(context);\n if (isContextDirty(context)) {\n ngDevMode && ngDevMode.stylingApplyCacheMiss++;\n // this is here to prevent things like <ng-container [style] [class]>...</ng-container>\n // or if there are any host style or class bindings present in a directive set on\n // a container node\n var native = context[0 /* ElementPosition */];\n var flushPlayerBuilders = context[1 /* MasterFlagPosition */] & 8 /* PlayerBuildersDirty */;\n var multiStartIndex = getMultiStylesStartIndex(context);\n for (var i = 10 /* SingleStylesStartPosition */; i < context.length; i += 4 /* Size */) {\n // there is no point in rendering styles that have not changed on screen\n if (isDirty(context, i)) {\n var flag = getPointers(context, i);\n var directiveIndex_1 = getDirectiveIndexFromEntry(context, i);\n var prop = getProp(context, i);\n var value = getValue(context, i);\n var styleSanitizer = (flag & 4 /* Sanitize */) ? getStyleSanitizer(context, directiveIndex_1) : null;\n var playerBuilder = getPlayerBuilder(context, i);\n var isClassBased = flag & 2 /* Class */ ? true : false;\n var isInSingleRegion = i < multiStartIndex;\n var valueToApply = value;\n // VALUE DEFER CASE 1: Use a multi value instead of a null single value\n // this check implies that a single value was removed and we\n // should now defer to a multi value and use that (if set).\n if (isInSingleRegion && !valueExists(valueToApply, isClassBased)) {\n // single values ALWAYS have a reference to a multi index\n var multiIndex = getMultiOrSingleIndex(flag);\n valueToApply = getValue(context, multiIndex);\n }\n // VALUE DEFER CASE 2: Use the initial value if all else fails (is falsy)\n // the initial value will always be a string or null,\n // therefore we can safely adopt it in case there's nothing else\n // note that this should always be a falsy check since `false` is used\n // for both class and style comparisons (styles can't be false and false\n // classes are turned off and should therefore defer to their initial values)\n // Note that we ignore class-based deferals because otherwise a class can never\n // be removed in the case that it exists as true in the initial classes list...\n if (!valueExists(valueToApply, isClassBased)) {\n valueToApply = getInitialValue(context, flag);\n }\n // if the first render is true then we do not want to start applying falsy\n // values to the DOM element's styling. Otherwise then we know there has\n // been a change and even if it's falsy then it's removing something that\n // was truthy before.\n var doApplyValue = renderer && (isFirstRender ? valueToApply : true);\n if (doApplyValue) {\n if (isClassBased) {\n setClass(native, prop, valueToApply ? true : false, renderer, classesStore, playerBuilder);\n }\n else {\n setStyle(native, prop, valueToApply, renderer, styleSanitizer, stylesStore, playerBuilder);\n }\n }\n setDirty(context, i, false);\n }\n }\n if (flushPlayerBuilders) {\n var rootContext = Array.isArray(rootOrView) ? getRootContext(rootOrView) : rootOrView;\n var playerContext = getPlayerContext(context);\n var playersStartIndex = playerContext[0 /* NonBuilderPlayersStart */];\n for (var i = 1 /* PlayerBuildersStartPosition */; i < playersStartIndex; i += 2 /* PlayerAndPlayerBuildersTupleSize */) {\n var builder = playerContext[i];\n var playerInsertionIndex = i + 1 /* PlayerOffsetPosition */;\n var oldPlayer = playerContext[playerInsertionIndex];\n if (builder) {\n var player = builder.buildPlayer(oldPlayer, isFirstRender);\n if (player !== undefined) {\n if (player != null) {\n var wasQueued = addPlayerInternal(playerContext, rootContext, native, player, playerInsertionIndex);\n wasQueued && totalPlayersQueued++;\n }\n if (oldPlayer) {\n oldPlayer.destroy();\n }\n }\n }\n else if (oldPlayer) {\n // the player builder has been removed ... therefore we should delete the associated\n // player\n oldPlayer.destroy();\n }\n }\n setContextPlayersDirty(context, false);\n }\n setContextDirty(context, false);\n }\n }\n return totalPlayersQueued;\n }\n /**\n * Assigns a style value to a style property for the given element.\n *\n * This function renders a given CSS prop/value entry using the\n * provided renderer. If a `store` value is provided then\n * that will be used a render context instead of the provided\n * renderer.\n *\n * @param native the DOM Element\n * @param prop the CSS style property that will be rendered\n * @param value the CSS style value that will be rendered\n * @param renderer\n * @param store an optional key/value map that will be used as a context to render styles on\n */\n function setStyle(native, prop, value, renderer, sanitizer, store, playerBuilder) {\n value =\n sanitizer && value ? sanitizer(prop, value, 3 /* ValidateAndSanitize */) : value;\n if (store || playerBuilder) {\n if (store) {\n store.setValue(prop, value);\n }\n if (playerBuilder) {\n playerBuilder.setValue(prop, value);\n }\n }\n else if (value) {\n value = value.toString(); // opacity, z-index and flexbox all have number values which may not\n // assign as numbers\n ngDevMode && ngDevMode.rendererSetStyle++;\n isProceduralRenderer(renderer) ?\n renderer.setStyle(native, prop, value, RendererStyleFlags3.DashCase) :\n native.style.setProperty(prop, value);\n }\n else {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n isProceduralRenderer(renderer) ?\n renderer.removeStyle(native, prop, RendererStyleFlags3.DashCase) :\n native.style.removeProperty(prop);\n }\n }\n /**\n * Adds/removes the provided className value to the provided element.\n *\n * This function renders a given CSS class value using the provided\n * renderer (by adding or removing it from the provided element).\n * If a `store` value is provided then that will be used a render\n * context instead of the provided renderer.\n *\n * @param native the DOM Element\n * @param prop the CSS style property that will be rendered\n * @param value the CSS style value that will be rendered\n * @param renderer\n * @param store an optional key/value map that will be used as a context to render styles on\n */\n function setClass(native, className, add, renderer, store, playerBuilder) {\n if (store || playerBuilder) {\n if (store) {\n store.setValue(className, add);\n }\n if (playerBuilder) {\n playerBuilder.setValue(className, add);\n }\n // DOMTokenList will throw if we try to add or remove an empty string.\n }\n else if (className !== '') {\n if (add) {\n ngDevMode && ngDevMode.rendererAddClass++;\n isProceduralRenderer(renderer) ? renderer.addClass(native, className) :\n native['classList'].add(className);\n }\n else {\n ngDevMode && ngDevMode.rendererRemoveClass++;\n isProceduralRenderer(renderer) ? renderer.removeClass(native, className) :\n native['classList'].remove(className);\n }\n }\n }\n function setSanitizeFlag(context, index, sanitizeYes) {\n if (sanitizeYes) {\n context[index] |= 4 /* Sanitize */;\n }\n else {\n context[index] &= ~4 /* Sanitize */;\n }\n }\n function setDirty(context, index, isDirtyYes) {\n var adjustedIndex = index >= 10 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;\n if (isDirtyYes) {\n context[adjustedIndex] |= 1 /* Dirty */;\n }\n else {\n context[adjustedIndex] &= ~1 /* Dirty */;\n }\n }\n function isDirty(context, index) {\n var adjustedIndex = index >= 10 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;\n return (context[adjustedIndex] & 1 /* Dirty */) == 1 /* Dirty */;\n }\n function isClassBasedValue(context, index) {\n var adjustedIndex = index >= 10 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;\n return (context[adjustedIndex] & 2 /* Class */) == 2 /* Class */;\n }\n function isSanitizable(context, index) {\n var adjustedIndex = index >= 10 /* SingleStylesStartPosition */ ? (index + 0 /* FlagsOffset */) : index;\n return (context[adjustedIndex] & 4 /* Sanitize */) == 4 /* Sanitize */;\n }\n function pointers(configFlag, staticIndex, dynamicIndex) {\n return (configFlag & 31 /* BitMask */) | (staticIndex << 5 /* BitCountSize */) |\n (dynamicIndex << (14 /* BitCountSize */ + 5 /* BitCountSize */));\n }\n function getInitialValue(context, flag) {\n var index = getInitialIndex(flag);\n var entryIsClassBased = flag & 2 /* Class */;\n var initialValues = entryIsClassBased ? context[4 /* InitialClassValuesPosition */] :\n context[3 /* InitialStyleValuesPosition */];\n return initialValues[index];\n }\n function getInitialIndex(flag) {\n return (flag >> 5 /* BitCountSize */) & 16383 /* BitMask */;\n }\n function getMultiOrSingleIndex(flag) {\n var index = (flag >> (14 /* BitCountSize */ + 5 /* BitCountSize */)) & 16383 /* BitMask */;\n return index >= 10 /* SingleStylesStartPosition */ ? index : -1;\n }\n function getMultiClassesStartIndex(context) {\n var classCache = context[6 /* CachedMultiClasses */];\n return classCache[1 /* ValuesStartPosition */ +\n 1 /* PositionStartOffset */];\n }\n function getMultiStylesStartIndex(context) {\n var stylesCache = context[7 /* CachedMultiStyles */];\n return stylesCache[1 /* ValuesStartPosition */ +\n 1 /* PositionStartOffset */];\n }\n function setProp(context, index, prop) {\n context[index + 1 /* PropertyOffset */] = prop;\n }\n function setValue(context, index, value) {\n context[index + 2 /* ValueOffset */] = value;\n }\n function hasPlayerBuilderChanged(context, builder, index) {\n var playerContext = context[9 /* PlayerContext */];\n if (builder) {\n if (!playerContext || index === 0) {\n return true;\n }\n }\n else if (!playerContext) {\n return false;\n }\n return playerContext[index] !== builder;\n }\n function setPlayerBuilder(context, builder, insertionIndex) {\n var playerContext = context[9 /* PlayerContext */] || allocPlayerContext(context);\n if (insertionIndex > 0) {\n playerContext[insertionIndex] = builder;\n }\n else {\n insertionIndex = playerContext[0 /* NonBuilderPlayersStart */];\n playerContext.splice(insertionIndex, 0, builder, null);\n playerContext[0 /* NonBuilderPlayersStart */] +=\n 2 /* PlayerAndPlayerBuildersTupleSize */;\n }\n return insertionIndex;\n }\n function directiveOwnerPointers(directiveIndex, playerIndex) {\n return (playerIndex << 16 /* BitCountSize */) | directiveIndex;\n }\n function setPlayerBuilderIndex(context, index, playerBuilderIndex, directiveIndex) {\n var value = directiveOwnerPointers(directiveIndex, playerBuilderIndex);\n context[index + 3 /* PlayerBuilderIndexOffset */] = value;\n }\n function getPlayerBuilderIndex(context, index) {\n var flag = context[index + 3 /* PlayerBuilderIndexOffset */];\n var playerBuilderIndex = (flag >> 16 /* BitCountSize */) &\n 65535 /* BitMask */;\n return playerBuilderIndex;\n }\n function getPlayerBuilder(context, index) {\n var playerBuilderIndex = getPlayerBuilderIndex(context, index);\n if (playerBuilderIndex) {\n var playerContext = context[9 /* PlayerContext */];\n if (playerContext) {\n return playerContext[playerBuilderIndex];\n }\n }\n return null;\n }\n function setFlag(context, index, flag) {\n var adjustedIndex = index === 1 /* MasterFlagPosition */ ? index : (index + 0 /* FlagsOffset */);\n context[adjustedIndex] = flag;\n }\n function getPointers(context, index) {\n var adjustedIndex = index === 1 /* MasterFlagPosition */ ? index : (index + 0 /* FlagsOffset */);\n return context[adjustedIndex];\n }\n function getValue(context, index) {\n return context[index + 2 /* ValueOffset */];\n }\n function getProp(context, index) {\n return context[index + 1 /* PropertyOffset */];\n }\n function isContextDirty(context) {\n return isDirty(context, 1 /* MasterFlagPosition */);\n }\n function setContextDirty(context, isDirtyYes) {\n setDirty(context, 1 /* MasterFlagPosition */, isDirtyYes);\n }\n function setContextPlayersDirty(context, isDirtyYes) {\n if (isDirtyYes) {\n context[1 /* MasterFlagPosition */] |= 8 /* PlayerBuildersDirty */;\n }\n else {\n context[1 /* MasterFlagPosition */] &= ~8 /* PlayerBuildersDirty */;\n }\n }\n function swapMultiContextEntries(context, indexA, indexB) {\n if (indexA === indexB)\n return;\n var tmpValue = getValue(context, indexA);\n var tmpProp = getProp(context, indexA);\n var tmpFlag = getPointers(context, indexA);\n var tmpPlayerBuilderIndex = getPlayerBuilderIndex(context, indexA);\n var tmpDirectiveIndex = getDirectiveIndexFromEntry(context, indexA);\n var flagA = tmpFlag;\n var flagB = getPointers(context, indexB);\n var singleIndexA = getMultiOrSingleIndex(flagA);\n if (singleIndexA >= 0) {\n var _flag = getPointers(context, singleIndexA);\n var _initial = getInitialIndex(_flag);\n setFlag(context, singleIndexA, pointers(_flag, _initial, indexB));\n }\n var singleIndexB = getMultiOrSingleIndex(flagB);\n if (singleIndexB >= 0) {\n var _flag = getPointers(context, singleIndexB);\n var _initial = getInitialIndex(_flag);\n setFlag(context, singleIndexB, pointers(_flag, _initial, indexA));\n }\n setValue(context, indexA, getValue(context, indexB));\n setProp(context, indexA, getProp(context, indexB));\n setFlag(context, indexA, getPointers(context, indexB));\n var playerIndexA = getPlayerBuilderIndex(context, indexB);\n var directiveIndexA = getDirectiveIndexFromEntry(context, indexB);\n setPlayerBuilderIndex(context, indexA, playerIndexA, directiveIndexA);\n setValue(context, indexB, tmpValue);\n setProp(context, indexB, tmpProp);\n setFlag(context, indexB, tmpFlag);\n setPlayerBuilderIndex(context, indexB, tmpPlayerBuilderIndex, tmpDirectiveIndex);\n }\n function updateSinglePointerValues(context, indexStartPosition) {\n for (var i = indexStartPosition; i < context.length; i += 4 /* Size */) {\n var multiFlag = getPointers(context, i);\n var singleIndex = getMultiOrSingleIndex(multiFlag);\n if (singleIndex > 0) {\n var singleFlag = getPointers(context, singleIndex);\n var initialIndexForSingle = getInitialIndex(singleFlag);\n var flagValue = (isDirty(context, singleIndex) ? 1 /* Dirty */ : 0 /* None */) |\n (isClassBasedValue(context, singleIndex) ? 2 /* Class */ : 0 /* None */) |\n (isSanitizable(context, singleIndex) ? 4 /* Sanitize */ : 0 /* None */);\n var updatedFlag = pointers(flagValue, initialIndexForSingle, i);\n setFlag(context, singleIndex, updatedFlag);\n }\n }\n }\n function insertNewMultiProperty(context, index, classBased, name, flag, value, directiveIndex, playerIndex) {\n var doShift = index < context.length;\n // prop does not exist in the list, add it in\n context.splice(index, 0, flag | 1 /* Dirty */ | (classBased ? 2 /* Class */ : 0 /* None */), name, value, 0);\n setPlayerBuilderIndex(context, index, playerIndex, directiveIndex);\n if (doShift) {\n // because the value was inserted midway into the array then we\n // need to update all the shifted multi values' single value\n // pointers to point to the newly shifted location\n updateSinglePointerValues(context, index + 4 /* Size */);\n }\n }\n function valueExists(value, isClassBased) {\n return value !== null;\n }\n function prepareInitialFlag(context, prop, entryIsClassBased, sanitizer) {\n var flag = (sanitizer && sanitizer(prop, null, 1 /* ValidateProperty */)) ?\n 4 /* Sanitize */ :\n 0 /* None */;\n var initialIndex;\n if (entryIsClassBased) {\n flag |= 2 /* Class */;\n initialIndex =\n getInitialStylingValuesIndexOf(context[4 /* InitialClassValuesPosition */], prop);\n }\n else {\n initialIndex =\n getInitialStylingValuesIndexOf(context[3 /* InitialStyleValuesPosition */], prop);\n }\n initialIndex = initialIndex > 0 ? (initialIndex + 1 /* ValueOffset */) : 0;\n return pointers(flag, initialIndex, 0);\n }\n function hasInitialValueChanged(context, flag, newValue) {\n var initialValue = getInitialValue(context, flag);\n return !initialValue || hasValueChanged(flag, initialValue, newValue);\n }\n function hasValueChanged(flag, a, b) {\n var isClassBased = flag & 2 /* Class */;\n var hasValues = a && b;\n var usesSanitizer = flag & 4 /* Sanitize */;\n // the toString() comparison ensures that a value is checked\n // ... otherwise (during sanitization bypassing) the === comparsion\n // would fail since a new String() instance is created\n if (!isClassBased && hasValues && usesSanitizer) {\n // we know for sure we're dealing with strings at this point\n return a.toString() !== b.toString();\n }\n // everything else is safe to check with a normal equality check\n return a !== b;\n }\n var ClassAndStylePlayerBuilder = /** @class */ (function () {\n function ClassAndStylePlayerBuilder(factory, _element, _type) {\n this._element = _element;\n this._type = _type;\n this._values = {};\n this._dirty = false;\n this._factory = factory;\n }\n ClassAndStylePlayerBuilder.prototype.setValue = function (prop, value) {\n if (this._values[prop] !== value) {\n this._values[prop] = value;\n this._dirty = true;\n }\n };\n ClassAndStylePlayerBuilder.prototype.buildPlayer = function (currentPlayer, isFirstRender) {\n // if no values have been set here then this means the binding didn't\n // change and therefore the binding values were not updated through\n // `setValue` which means no new player will be provided.\n if (this._dirty) {\n var player = this._factory.fn(this._element, this._type, this._values, isFirstRender, currentPlayer || null);\n this._values = {};\n this._dirty = false;\n return player;\n }\n return undefined;\n };\n return ClassAndStylePlayerBuilder;\n }());\n function getDirectiveIndexFromEntry(context, index) {\n var value = context[index + 3 /* PlayerBuilderIndexOffset */];\n return value & 65535 /* BitMask */;\n }\n function getInitialStylingValuesIndexOf(keyValues, key) {\n for (var i = 2 /* KeyValueStartPosition */; i < keyValues.length; i += 3 /* Size */) {\n if (keyValues[i] === key)\n return i;\n }\n return -1;\n }\n function getSinglePropIndexValue(context, directiveIndex, offset, isClassBased) {\n var singlePropOffsetRegistryIndex = context[2 /* DirectiveRegistryPosition */][(directiveIndex * 2 /* Size */) +\n 0 /* SinglePropValuesIndexOffset */];\n var offsets = context[5 /* SinglePropOffsetPositions */];\n var indexForOffset = singlePropOffsetRegistryIndex +\n 2 /* ValueStartPosition */ +\n (isClassBased ?\n offsets[singlePropOffsetRegistryIndex + 0 /* StylesCountPosition */] :\n 0) +\n offset;\n return offsets[indexForOffset];\n }\n function getStyleSanitizer(context, directiveIndex) {\n var dirs = context[2 /* DirectiveRegistryPosition */];\n var value = dirs[directiveIndex * 2 /* Size */ +\n 1 /* StyleSanitizerOffset */] ||\n dirs[1 /* StyleSanitizerOffset */] || null;\n return value;\n }\n function allowValueChange(currentValue, newValue, currentDirectiveOwner, newDirectiveOwner) {\n // the code below relies the importance of directive's being tied to their\n // index value. The index values for each directive are derived from being\n // registered into the styling context directive registry. The most important\n // directive is the parent component directive (the template) and each directive\n // that is added after is considered less important than the previous entry. This\n // prioritization of directives enables the styling algorithm to decide if a style\n // or class should be allowed to be updated/replaced in case an earlier directive\n // already wrote to the exact same style-property or className value. In other words\n // this decides what to do if and when there is a collision.\n if (currentValue != null) {\n if (newValue != null) {\n // if a directive index is lower than it always has priority over the\n // previous directive's value...\n return newDirectiveOwner <= currentDirectiveOwner;\n }\n else {\n // only write a null value in case it's the same owner writing it.\n // this avoids having a higher-priority directive write to null\n // only to have a lesser-priority directive change right to a\n // non-null value immediately afterwards.\n return currentDirectiveOwner === newDirectiveOwner;\n }\n }\n return true;\n }\n /**\n * Returns the className string of all the initial classes for the element.\n *\n * This function is designed to populate and cache all the static class\n * values into a className string. The caching mechanism works by placing\n * the completed className string into the initial values array into a\n * dedicated slot. This will prevent the function from having to populate\n * the string each time an element is created or matched.\n *\n * @returns the className string (e.g. `on active red`)\n */\n function getInitialClassNameValue(context) {\n var initialClassValues = context[4 /* InitialClassValuesPosition */];\n var className = initialClassValues[1 /* CachedStringValuePosition */];\n if (className === null) {\n className = '';\n for (var i = 2 /* KeyValueStartPosition */; i < initialClassValues.length; i += 3 /* Size */) {\n var isPresent = initialClassValues[i + 1];\n if (isPresent) {\n className += (className.length ? ' ' : '') + initialClassValues[i];\n }\n }\n initialClassValues[1 /* CachedStringValuePosition */] = className;\n }\n return className;\n }\n /**\n * Returns the style string of all the initial styles for the element.\n *\n * This function is designed to populate and cache all the static style\n * values into a style string. The caching mechanism works by placing\n * the completed style string into the initial values array into a\n * dedicated slot. This will prevent the function from having to populate\n * the string each time an element is created or matched.\n *\n * @returns the style string (e.g. `width:100px;height:200px`)\n */\n function getInitialStyleStringValue(context) {\n var initialStyleValues = context[3 /* InitialStyleValuesPosition */];\n var styleString = initialStyleValues[1 /* CachedStringValuePosition */];\n if (styleString === null) {\n styleString = '';\n for (var i = 2 /* KeyValueStartPosition */; i < initialStyleValues.length; i += 3 /* Size */) {\n var value = initialStyleValues[i + 1];\n if (value !== null) {\n styleString += (styleString.length ? ';' : '') + (initialStyleValues[i] + \":\" + value);\n }\n }\n initialStyleValues[1 /* CachedStringValuePosition */] = styleString;\n }\n return styleString;\n }\n /**\n * Returns the current cached multi-value for a given directiveIndex within the provided context.\n */\n function readCachedMapValue(context, entryIsClassBased, directiveIndex) {\n var values = context[entryIsClassBased ? 6 /* CachedMultiClasses */ : 7 /* CachedMultiStyles */];\n var index = 1 /* ValuesStartPosition */ +\n directiveIndex * 4 /* Size */;\n return values[index + 2 /* ValueOffset */] || null;\n }\n /**\n * Determines whether the provided multi styling value should be updated or not.\n *\n * Because `[style]` and `[class]` bindings rely on an identity change to occur before\n * applying new values, the styling algorithm may not update an existing entry into\n * the context if a previous directive's entry changed shape.\n *\n * This function will decide whether or not a value should be applied (if there is a\n * cache miss) to the context based on the following rules:\n *\n * - If there is an identity change between the existing value and new value\n * - If there is no existing value cached (first write)\n * - If a previous directive flagged the existing cached value as dirty\n */\n function isMultiValueCacheHit(context, entryIsClassBased, directiveIndex, newValue) {\n var indexOfCachedValues = entryIsClassBased ? 6 /* CachedMultiClasses */ : 7 /* CachedMultiStyles */;\n var cachedValues = context[indexOfCachedValues];\n var index = 1 /* ValuesStartPosition */ +\n directiveIndex * 4 /* Size */;\n if (cachedValues[index + 0 /* DirtyFlagOffset */])\n return false;\n return newValue === NO_CHANGE ||\n readCachedMapValue(context, entryIsClassBased, directiveIndex) === newValue;\n }\n /**\n * Updates the cached status of a multi-styling value in the context.\n *\n * The cached map array (which exists in the context) contains a manifest of\n * each multi-styling entry (`[style]` and `[class]` entries) for the template\n * as well as all directives.\n *\n * This function will update the cached status of the provided multi-style\n * entry within the cache.\n *\n * When called, this function will update the following information:\n * - The actual cached value (the raw value that was passed into `[style]` or `[class]`)\n * - The total amount of unique styling entries that this value has written into the context\n * - The exact position of where the multi styling entries start in the context for this binding\n * - The dirty flag will be set to true\n *\n * If the `dirtyFutureValues` param is provided then it will update all future entries (binding\n * entries that exist as apart of other directives) to be dirty as well. This will force the\n * styling algorithm to reapply those values once change detection checks them (which will in\n * turn cause the styling context to update itself and the correct styling values will be\n * rendered on screen).\n */\n function updateCachedMapValue(context, directiveIndex, entryIsClassBased, cacheValue, startPosition, endPosition, totalValues, dirtyFutureValues) {\n var values = context[entryIsClassBased ? 6 /* CachedMultiClasses */ : 7 /* CachedMultiStyles */];\n var index = 1 /* ValuesStartPosition */ +\n directiveIndex * 4 /* Size */;\n // in the event that this is true we assume that future values are dirty and therefore\n // will be checked again in the next CD cycle\n if (dirtyFutureValues) {\n var nextStartPosition = startPosition + totalValues * 4 /* Size */;\n for (var i = index + 4 /* Size */; i < values.length; i += 4 /* Size */) {\n values[i + 1 /* PositionStartOffset */] = nextStartPosition;\n values[i + 0 /* DirtyFlagOffset */] = 1;\n }\n }\n values[index + 0 /* DirtyFlagOffset */] = 0;\n values[index + 1 /* PositionStartOffset */] = startPosition;\n values[index + 2 /* ValueOffset */] = cacheValue;\n values[index + 3 /* ValueCountOffset */] = totalValues;\n // the code below counts the total amount of styling values that exist in\n // the context up until this directive. This value will be later used to\n // update the cached value map's total counter value.\n var totalStylingEntries = totalValues;\n for (var i = 1 /* ValuesStartPosition */; i < index; i += 4 /* Size */) {\n totalStylingEntries += values[i + 3 /* ValueCountOffset */];\n }\n // because style values come before class values in the context this means\n // that if any new values were inserted then the cache values array for\n // classes is out of sync. The code below will update the offsets to point\n // to their new values.\n if (!entryIsClassBased) {\n var classCache = context[6 /* CachedMultiClasses */];\n var classesStartPosition = classCache[1 /* ValuesStartPosition */ +\n 1 /* PositionStartOffset */];\n var diffInStartPosition = endPosition - classesStartPosition;\n for (var i = 1 /* ValuesStartPosition */; i < classCache.length; i += 4 /* Size */) {\n classCache[i + 1 /* PositionStartOffset */] += diffInStartPosition;\n }\n }\n values[0 /* EntriesCountPosition */] = totalStylingEntries;\n }\n function hyphenateEntries(entries) {\n var newEntries = [];\n for (var i = 0; i < entries.length; i++) {\n newEntries.push(hyphenate(entries[i]));\n }\n return newEntries;\n }\n function hyphenate(value) {\n return value.replace(/[a-z][A-Z]/g, function (match) { return match.charAt(0) + \"-\" + match.charAt(1).toLowerCase(); });\n }\n function registerMultiMapEntry(context, directiveIndex, entryIsClassBased, startPosition, count) {\n if (count === void 0) { count = 0; }\n var cachedValues = context[entryIsClassBased ? 6 /* CachedMultiClasses */ : 7 /* CachedMultiStyles */];\n if (directiveIndex > 0) {\n var limit = 1 /* ValuesStartPosition */ +\n (directiveIndex * 4 /* Size */);\n while (cachedValues.length < limit) {\n // this means that ONLY directive class styling (like ngClass) was used\n // therefore the root directive will still need to be filled in as well\n // as any other directive spaces in case they only used static values\n cachedValues.push(0, startPosition, null, 0);\n }\n }\n cachedValues.push(0, startPosition, null, count);\n }\n /**\n * Inserts or updates an existing entry in the provided `staticStyles` collection.\n *\n * @param index the index representing an existing styling entry in the collection:\n * if provided (numeric): then it will update the existing entry at the given position\n * if null: then it will insert a new entry within the collection\n * @param staticStyles a collection of style or class entries where the value will\n * be inserted or patched\n * @param prop the property value of the entry (e.g. `width` (styles) or `foo` (classes))\n * @param value the styling value of the entry (e.g. `absolute` (styles) or `true` (classes))\n * @param directiveOwnerIndex the directive owner index value of the styling source responsible\n * for these styles (see `interfaces/styling.ts#directives` for more info)\n * @returns the index of the updated or new entry within the collection\n */\n function addOrUpdateStaticStyle(index, staticStyles, prop, value, directiveOwnerIndex) {\n if (index === null) {\n index = staticStyles.length;\n staticStyles.push(null, null, null);\n staticStyles[index + 0 /* PropOffset */] = prop;\n }\n staticStyles[index + 1 /* ValueOffset */] = value;\n staticStyles[index + 2 /* DirectiveOwnerOffset */] = directiveOwnerIndex;\n return index;\n }\n function assertValidDirectiveIndex(context, directiveIndex) {\n var dirs = context[2 /* DirectiveRegistryPosition */];\n var index = directiveIndex * 2 /* Size */;\n if (index >= dirs.length ||\n dirs[index + 0 /* SinglePropValuesIndexOffset */] === -1) {\n throw new Error('The provided directive is not registered with the styling context');\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var NG_TEMPLATE_SELECTOR = 'ng-template';\n function isCssClassMatching(nodeClassAttrVal, cssClassToMatch) {\n var nodeClassesLen = nodeClassAttrVal.length;\n var matchIndex = nodeClassAttrVal.indexOf(cssClassToMatch);\n var matchEndIdx = matchIndex + cssClassToMatch.length;\n if (matchIndex === -1 // no match\n || (matchIndex > 0 && nodeClassAttrVal[matchIndex - 1] !== ' ') // no space before\n ||\n (matchEndIdx < nodeClassesLen && nodeClassAttrVal[matchEndIdx] !== ' ')) // no space after\n {\n return false;\n }\n return true;\n }\n /**\n * Function that checks whether a given tNode matches tag-based selector and has a valid type.\n *\n * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular\n * directive matching mode:\n * - in the \"directive matching\" mode we do _not_ take TContainer's tagName into account if it is\n * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a\n * tag name was extracted from * syntax so we would match the same directive twice);\n * - in the \"projection\" mode, we use a tag name potentially extracted from the * syntax processing\n * (applicable to TNodeType.Container only).\n */\n function hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) {\n var tagNameToCompare = tNode.type === 0 /* Container */ && !isProjectionMode ?\n NG_TEMPLATE_SELECTOR :\n tNode.tagName;\n return currentSelector === tagNameToCompare;\n }\n /**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data of the node to match\n * @param selector The selector to try matching against the node.\n * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing\n * directive matching.\n * @returns true if node matches the selector.\n */\n function isNodeMatchingSelector(tNode, selector, isProjectionMode) {\n ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n var mode = 4 /* ELEMENT */;\n var nodeAttrs = tNode.attrs || [];\n // Find the index of first attribute that has no value, only a name.\n var nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs);\n // When processing \":not\" selectors, we skip to the next \":not\" if the\n // current one doesn't match\n var skipToNextSelector = false;\n for (var i = 0; i < selector.length; i++) {\n var current = selector[i];\n if (typeof current === 'number') {\n // If we finish processing a :not selector and it hasn't failed, return false\n if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {\n return false;\n }\n // If we are skipping to the next :not() and this mode flag is positive,\n // it's a part of the current :not() selector, and we should keep skipping\n if (skipToNextSelector && isPositive(current))\n continue;\n skipToNextSelector = false;\n mode = current | (mode & 1 /* NOT */);\n continue;\n }\n if (skipToNextSelector)\n continue;\n if (mode & 4 /* ELEMENT */) {\n mode = 2 /* ATTRIBUTE */ | mode & 1 /* NOT */;\n if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) ||\n current === '' && selector.length === 1) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n }\n else {\n var selectorAttrValue = mode & 8 /* CLASS */ ? current : selector[++i];\n // special case for matching against classes when a tNode has been instantiated with\n // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo'])\n if ((mode & 8 /* CLASS */) && tNode.stylingTemplate) {\n if (!isCssClassMatching(readClassValueFromTNode(tNode), selectorAttrValue)) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n continue;\n }\n var isInlineTemplate = tNode.type == 0 /* Container */ && tNode.tagName !== NG_TEMPLATE_SELECTOR;\n var attrName = (mode & 8 /* CLASS */) ? 'class' : current;\n var attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate, isProjectionMode);\n if (attrIndexInNode === -1) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n continue;\n }\n if (selectorAttrValue !== '') {\n var nodeAttrValue = void 0;\n if (attrIndexInNode > nameOnlyMarkerIdx) {\n nodeAttrValue = '';\n }\n else {\n ngDevMode && assertNotEqual(nodeAttrs[attrIndexInNode], 0 /* NamespaceURI */, 'We do not match directives on namespaced attributes');\n nodeAttrValue = nodeAttrs[attrIndexInNode + 1];\n }\n var compareAgainstClassName = mode & 8 /* CLASS */ ? nodeAttrValue : null;\n if (compareAgainstClassName &&\n !isCssClassMatching(compareAgainstClassName, selectorAttrValue) ||\n mode & 2 /* ATTRIBUTE */ && selectorAttrValue !== nodeAttrValue) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n }\n }\n }\n return isPositive(mode) || skipToNextSelector;\n }\n function isPositive(mode) {\n return (mode & 1 /* NOT */) === 0;\n }\n function readClassValueFromTNode(tNode) {\n // comparing against CSS class values is complex because the compiler doesn't place them as\n // regular attributes when an element is created. Instead, the classes (and styles for\n // that matter) are placed in a special styling context that is used for resolving all\n // class/style values across static attributes, [style]/[class] and [style.prop]/[class.name]\n // bindings. Therefore if and when the styling context exists then the class values are to be\n // extracted by the context helper code below...\n return tNode.stylingTemplate ? getInitialClassNameValue(tNode.stylingTemplate) : '';\n }\n /**\n * Examines the attribute's definition array for a node to find the index of the\n * attribute that matches the given `name`.\n *\n * NOTE: This will not match namespaced attributes.\n *\n * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.\n * The following table summarizes which types of attributes we attempt to match:\n *\n * ===========================================================================================================\n * Modes | Normal Attributes | Bindings Attributes | Template Attributes | I18n\n * Attributes\n * ===========================================================================================================\n * Inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Inline + Directive | NO | NO | YES | NO\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Directive | YES | YES | NO | YES\n * ===========================================================================================================\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)\n * rather than a manually expanded template node (e.g `<ng-template>`).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\n function findAttrIndexInNode(name, attrs, isInlineTemplate, isProjectionMode) {\n if (attrs === null)\n return -1;\n var i = 0;\n if (isProjectionMode || !isInlineTemplate) {\n var bindingsMode = false;\n while (i < attrs.length) {\n var maybeAttrName = attrs[i];\n if (maybeAttrName === name) {\n return i;\n }\n else if (maybeAttrName === 3 /* Bindings */ || maybeAttrName === 6 /* I18n */) {\n bindingsMode = true;\n }\n else if (maybeAttrName === 1 /* Classes */) {\n var value = attrs[++i];\n // We should skip classes here because we have a separate mechanism for\n // matching classes in projection mode.\n while (typeof value === 'string') {\n value = attrs[++i];\n }\n continue;\n }\n else if (maybeAttrName === 4 /* Template */) {\n // We do not care about Template attributes in this scenario.\n break;\n }\n else if (maybeAttrName === 0 /* NamespaceURI */) {\n // Skip the whole namespaced attribute and value. This is by design.\n i += 4;\n continue;\n }\n // In binding mode there are only names, rather than name-value pairs.\n i += bindingsMode ? 1 : 2;\n }\n // We did not match the attribute\n return -1;\n }\n else {\n return matchTemplateAttribute(attrs, name);\n }\n }\n function isNodeMatchingSelectorList(tNode, selector, isProjectionMode) {\n if (isProjectionMode === void 0) { isProjectionMode = false; }\n for (var i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n return true;\n }\n }\n return false;\n }\n function getProjectAsAttrValue(tNode) {\n var nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n var ngProjectAsAttrIdx = nodeAttrs.indexOf(5 /* ProjectAs */);\n // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n // (attribute names are stored at even indexes)\n if ((ngProjectAsAttrIdx & 1) === 0) {\n return nodeAttrs[ngProjectAsAttrIdx + 1];\n }\n }\n return null;\n }\n function getNameOnlyMarkerIndex(nodeAttrs) {\n for (var i = 0; i < nodeAttrs.length; i++) {\n var nodeAttr = nodeAttrs[i];\n if (isNameOnlyAttributeMarker(nodeAttr)) {\n return i;\n }\n }\n return nodeAttrs.length;\n }\n function matchTemplateAttribute(attrs, name) {\n var i = attrs.indexOf(4 /* Template */);\n if (i > -1) {\n i++;\n while (i < attrs.length) {\n if (attrs[i] === name)\n return i;\n i++;\n }\n }\n return -1;\n }\n /**\n * Checks whether a selector is inside a CssSelectorList\n * @param selector Selector to be checked.\n * @param list List in which to look for the selector.\n */\n function isSelectorInSelectorList(selector, list) {\n selectorListLoop: for (var i = 0; i < list.length; i++) {\n var currentSelectorInList = list[i];\n if (selector.length !== currentSelectorInList.length) {\n continue;\n }\n for (var j = 0; j < selector.length; j++) {\n if (selector[j] !== currentSelectorInList[j]) {\n continue selectorListLoop;\n }\n }\n return true;\n }\n return false;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Marks that the next string is for element.\n *\n * See `I18nMutateOpCodes` documentation.\n */\n var ELEMENT_MARKER = {\n marker: 'element'\n };\n /**\n * Marks that the next string is for comment.\n *\n * See `I18nMutateOpCodes` documentation.\n */\n var COMMENT_MARKER = {\n marker: 'comment'\n };\n\n var _stylingMode = 0;\n function runtimeIsNewStylingInUse() {\n return _stylingMode > 0 /* UseOld */;\n }\n function runtimeAllowOldStyling() {\n return _stylingMode < 2 /* UseNew */;\n }\n var _currentSanitizer;\n function setCurrentStyleSanitizer(sanitizer) {\n _currentSanitizer = sanitizer;\n }\n function getCurrentStyleSanitizer() {\n return _currentSanitizer;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function attachDebugObject(obj, debug) {\n Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var MAP_BASED_ENTRY_PROP_NAME = '--MAP--';\n /**\n * Creates a new instance of the `TStylingContext`.\n *\n * This function will also pre-fill the context with data\n * for map-based bindings.\n */\n function allocTStylingContext() {\n // because map-based bindings deal with a dynamic set of values, there\n // is no way to know ahead of time whether or not sanitization is required.\n // For this reason the configuration will always mark sanitization as active\n // (this means that when map-based values are applied then sanitization will\n // be checked against each property).\n var mapBasedConfig = 1 /* SanitizationRequired */;\n return [0 /* Initial */, 0, mapBasedConfig, 0, MAP_BASED_ENTRY_PROP_NAME];\n }\n /**\n * Temporary function that allows for a string-based property name to be\n * obtained from an index-based property identifier.\n *\n * This function will be removed once the new styling refactor code (which\n * lives inside of `render3/styling_next/`) replaces the existing styling\n * implementation.\n */\n function getBindingNameFromIndex(stylingContext, offset, directiveIndex, isClassBased) {\n var singleIndex = getSinglePropIndexValue(stylingContext, directiveIndex, offset, isClassBased);\n return getProp(stylingContext, singleIndex);\n }\n function updateContextDirectiveIndex(context, index) {\n context[1 /* MaxDirectiveIndexPosition */] = index;\n }\n function getConfig(context) {\n return context[0 /* ConfigPosition */];\n }\n function setConfig(context, value) {\n context[0 /* ConfigPosition */] = value;\n }\n function getProp$1(context, index) {\n return context[index + 2 /* PropOffset */];\n }\n function getPropConfig(context, index) {\n return context[index + 0 /* ConfigAndGuardOffset */] &\n 1 /* Mask */;\n }\n function isSanitizationRequired(context, index) {\n return (getPropConfig(context, index) & 1 /* SanitizationRequired */) > 0;\n }\n function getGuardMask(context, index) {\n var configGuardValue = context[index + 0 /* ConfigAndGuardOffset */];\n return configGuardValue >> 1 /* TotalBits */;\n }\n function setGuardMask(context, index, maskValue) {\n var config = getPropConfig(context, index);\n var guardMask = maskValue << 1 /* TotalBits */;\n context[index + 0 /* ConfigAndGuardOffset */] = config | guardMask;\n }\n function getValuesCount(context, index) {\n return context[index + 1 /* ValuesCountOffset */];\n }\n function getBindingValue(context, index, offset) {\n return context[index + 3 /* BindingsStartOffset */ + offset];\n }\n function getDefaultValue(context, index) {\n var valuesCount = getValuesCount(context, index);\n return context[index + 3 /* BindingsStartOffset */ + valuesCount - 1];\n }\n /**\n * Temporary function which determines whether or not a context is\n * allowed to be flushed based on the provided directive index.\n */\n function allowStylingFlush(context, index) {\n return index === context[1 /* MaxDirectiveIndexPosition */];\n }\n function lockContext(context) {\n setConfig(context, getConfig(context) | 1 /* Locked */);\n }\n function isContextLocked(context) {\n return (getConfig(context) & 1 /* Locked */) > 0;\n }\n function getPropValuesStartPosition(context) {\n return 5 /* MapBindingsBindingsStartPosition */ +\n context[3 /* MapBindingsValuesCountPosition */];\n }\n function hasValueChanged$1(a, b) {\n var compareValueA = Array.isArray(a) ? a[0 /* RawValuePosition */] : a;\n var compareValueB = Array.isArray(b) ? b[0 /* RawValuePosition */] : b;\n return compareValueA !== compareValueB;\n }\n /**\n * Determines whether the provided styling value is truthy or falsy.\n */\n function isStylingValueDefined(value) {\n // the reason why null is compared against is because\n // a CSS class value that is set to `false` must be\n // respected (otherwise it would be treated as falsy).\n // Empty string values are because developers usually\n // set a value to an empty string to remove it.\n return value != null && value !== '';\n }\n /**\n * Returns the current style sanitizer function for the given view.\n *\n * The default style sanitizer (which lives inside of `LView`) will\n * be returned depending on whether the `styleSanitizer` instruction\n * was called or not prior to any styling instructions running.\n */\n function getCurrentOrLViewSanitizer(lView) {\n var sanitizer = (getCurrentStyleSanitizer() || lView[SANITIZER]);\n if (sanitizer && typeof sanitizer !== 'function') {\n setCurrentStyleSanitizer(sanitizer);\n return sanitizeUsingSanitizerObject;\n }\n return sanitizer;\n }\n /**\n * Style sanitization function that internally uses a `Sanitizer` instance to handle style\n * sanitization.\n */\n var sanitizeUsingSanitizerObject = function (prop, value, mode) {\n var sanitizer = getCurrentStyleSanitizer();\n if (sanitizer) {\n if (mode & 2 /* SanitizeOnly */) {\n return sanitizer.sanitize(exports.SecurityContext.STYLE, value);\n }\n else {\n return true;\n }\n }\n return value;\n };\n\n /**\n * --------\n *\n * This file contains the core logic for styling in Angular.\n *\n * All styling bindings (i.e. `[style]`, `[style.prop]`, `[class]` and `[class.name]`)\n * will have their values be applied through the logic in this file.\n *\n * When a binding is encountered (e.g. `<div [style.width]=\"w\">`) then\n * the binding data will be populated into a `TStylingContext` data-structure.\n * There is only one `TStylingContext` per `TNode` and each element instance\n * will update its style/class binding values in concert with the styling\n * context.\n *\n * To learn more about the algorithm see `TStylingContext`.\n *\n * --------\n */\n var DEFAULT_BINDING_VALUE = null;\n var DEFAULT_SIZE_VALUE = 1;\n // The first bit value reflects a map-based binding value's bit.\n // The reason why it's always activated for every entry in the map\n // is so that if any map-binding values update then all other prop\n // based bindings will pass the guard check automatically without\n // any extra code or flags.\n var DEFAULT_GUARD_MASK_VALUE = 1;\n var STYLING_INDEX_FOR_MAP_BINDING = 0;\n var STYLING_INDEX_START_VALUE = 1;\n // the values below are global to all styling code below. Each value\n // will either increment or mutate each time a styling instruction is\n // executed. Do not modify the values below.\n var currentStyleIndex = STYLING_INDEX_START_VALUE;\n var currentClassIndex = STYLING_INDEX_START_VALUE;\n var stylesBitMask = 0;\n var classesBitMask = 0;\n var deferredBindingQueue = [];\n /**\n * Visits a class-based binding and updates the new value (if changed).\n *\n * This function is called each time a class-based styling instruction\n * is executed. It's important that it's always called (even if the value\n * has not changed) so that the inner counter index value is incremented.\n * This way, each instruction is always guaranteed to get the same counter\n * state each time it's called (which then allows the `TStylingContext`\n * and the bit mask values to be in sync).\n */\n function updateClassBinding(context, data, prop, bindingIndex, value, deferRegistration, forceUpdate) {\n var isMapBased = !prop;\n var index = isMapBased ? STYLING_INDEX_FOR_MAP_BINDING : currentClassIndex++;\n var updated = updateBindingData(context, data, index, prop, bindingIndex, value, deferRegistration, forceUpdate, false);\n if (updated || forceUpdate) {\n classesBitMask |= 1 << index;\n }\n }\n /**\n * Visits a style-based binding and updates the new value (if changed).\n *\n * This function is called each time a style-based styling instruction\n * is executed. It's important that it's always called (even if the value\n * has not changed) so that the inner counter index value is incremented.\n * This way, each instruction is always guaranteed to get the same counter\n * state each time it's called (which then allows the `TStylingContext`\n * and the bit mask values to be in sync).\n */\n function updateStyleBinding(context, data, prop, bindingIndex, value, sanitizer, deferRegistration, forceUpdate) {\n var isMapBased = !prop;\n var index = isMapBased ? STYLING_INDEX_FOR_MAP_BINDING : currentStyleIndex++;\n var sanitizationRequired = isMapBased ?\n true :\n (sanitizer ? sanitizer(prop, null, 1 /* ValidateProperty */) : false);\n var updated = updateBindingData(context, data, index, prop, bindingIndex, value, deferRegistration, forceUpdate, sanitizationRequired);\n if (updated || forceUpdate) {\n stylesBitMask |= 1 << index;\n }\n }\n /**\n * Called each time a binding value has changed within the provided `TStylingContext`.\n *\n * This function is designed to be called from `updateStyleBinding` and `updateClassBinding`.\n * If called during the first update pass, the binding will be registered in the context.\n * If the binding does get registered and the `deferRegistration` flag is true then the\n * binding data will be queued up until the context is later flushed in `applyStyling`.\n *\n * This function will also update binding slot in the provided `LStylingData` with the\n * new binding entry (if it has changed).\n *\n * @returns whether or not the binding value was updated in the `LStylingData`.\n */\n function updateBindingData(context, data, counterIndex, prop, bindingIndex, value, deferRegistration, forceUpdate, sanitizationRequired) {\n if (!isContextLocked(context)) {\n if (deferRegistration) {\n deferBindingRegistration(context, counterIndex, prop, bindingIndex, sanitizationRequired);\n }\n else {\n deferredBindingQueue.length && flushDeferredBindings();\n // this will only happen during the first update pass of the\n // context. The reason why we can't use `tNode.firstTemplatePass`\n // here is because its not guaranteed to be true when the first\n // update pass is executed (remember that all styling instructions\n // are run in the update phase, and, as a result, are no more\n // styling instructions that are run in the creation phase).\n registerBinding(context, counterIndex, prop, bindingIndex, sanitizationRequired);\n }\n }\n var changed = forceUpdate || hasValueChanged$1(data[bindingIndex], value);\n if (changed) {\n data[bindingIndex] = value;\n }\n return changed;\n }\n /**\n * Schedules a binding registration to be run at a later point.\n *\n * The reasoning for this feature is to ensure that styling\n * bindings are registered in the correct order for when\n * directives/components have a super/sub class inheritance\n * chains. Each directive's styling bindings must be\n * registered into the context in reverse order. Therefore all\n * bindings will be buffered in reverse order and then applied\n * after the inheritance chain exits.\n */\n function deferBindingRegistration(context, counterIndex, prop, bindingIndex, sanitizationRequired) {\n deferredBindingQueue.unshift(context, counterIndex, prop, bindingIndex, sanitizationRequired);\n }\n /**\n * Flushes the collection of deferred bindings and causes each entry\n * to be registered into the context.\n */\n function flushDeferredBindings() {\n var i = 0;\n while (i < deferredBindingQueue.length) {\n var context = deferredBindingQueue[i++];\n var count = deferredBindingQueue[i++];\n var prop = deferredBindingQueue[i++];\n var bindingIndex = deferredBindingQueue[i++];\n var sanitizationRequired = deferredBindingQueue[i++];\n registerBinding(context, count, prop, bindingIndex, sanitizationRequired);\n }\n deferredBindingQueue.length = 0;\n }\n /**\n * Registers the provided binding (prop + bindingIndex) into the context.\n *\n * This function is shared between bindings that are assigned immediately\n * (via `updateBindingData`) and at a deferred stage. When called, it will\n * figure out exactly where to place the binding data in the context.\n *\n * It is needed because it will either update or insert a styling property\n * into the context at the correct spot.\n *\n * When called, one of two things will happen:\n *\n * 1) If the property already exists in the context then it will just add\n * the provided `bindingValue` to the end of the binding sources region\n * for that particular property.\n *\n * - If the binding value is a number then it will be added as a new\n * binding index source next to the other binding sources for the property.\n *\n * - Otherwise, if the binding value is a string/boolean/null type then it will\n * replace the default value for the property if the default value is `null`.\n *\n * 2) If the property does not exist then it will be inserted into the context.\n * The styling context relies on all properties being stored in alphabetical\n * order, so it knows exactly where to store it.\n *\n * When inserted, a default `null` value is created for the property which exists\n * as the default value for the binding. If the bindingValue property is inserted\n * and it is either a string, number or null value then that will replace the default\n * value.\n *\n * Note that this function is also used for map-based styling bindings. They are treated\n * much the same as prop-based bindings, but, because they do not have a property value\n * (since it's a map), all map-based entries are stored in an already populated area of\n * the context at the top (which is reserved for map-based entries).\n */\n function registerBinding(context, countId, prop, bindingValue, sanitizationRequired) {\n // prop-based bindings (e.g `<div [style.width]=\"w\" [class.foo]=\"f\">`)\n if (prop) {\n var found = false;\n var i = getPropValuesStartPosition(context);\n while (i < context.length) {\n var valuesCount = getValuesCount(context, i);\n var p = getProp$1(context, i);\n found = prop <= p;\n if (found) {\n // all style/class bindings are sorted by property name\n if (prop < p) {\n allocateNewContextEntry(context, i, prop, sanitizationRequired);\n }\n addBindingIntoContext(context, false, i, bindingValue, countId);\n break;\n }\n i += 3 /* BindingsStartOffset */ + valuesCount;\n }\n if (!found) {\n allocateNewContextEntry(context, context.length, prop, sanitizationRequired);\n addBindingIntoContext(context, false, i, bindingValue, countId);\n }\n }\n else {\n // map-based bindings (e.g `<div [style]=\"s\" [class]=\"{className:true}\">`)\n // there is no need to allocate the map-based binding region into the context\n // since it is already there when the context is first created.\n addBindingIntoContext(context, true, 2 /* MapBindingsPosition */, bindingValue, countId);\n }\n }\n function allocateNewContextEntry(context, index, prop, sanitizationRequired) {\n // 1,2: splice index locations\n // 3: each entry gets a config value (guard mask + flags)\n // 4. each entry gets a size value (which is always one because there is always a default binding\n // value)\n // 5. the property that is getting allocated into the context\n // 6. the default binding value (usually `null`)\n var config = sanitizationRequired ? 1 /* SanitizationRequired */ :\n 0 /* Default */;\n context.splice(index, 0, config, DEFAULT_SIZE_VALUE, prop, DEFAULT_BINDING_VALUE);\n setGuardMask(context, index, DEFAULT_GUARD_MASK_VALUE);\n }\n /**\n * Inserts a new binding value into a styling property tuple in the `TStylingContext`.\n *\n * A bindingValue is inserted into a context during the first update pass\n * of a template or host bindings function. When this occurs, two things\n * happen:\n *\n * - If the bindingValue value is a number then it is treated as a bindingIndex\n * value (a index in the `LView`) and it will be inserted next to the other\n * binding index entries.\n *\n * - Otherwise the binding value will update the default value for the property\n * and this will only happen if the default value is `null`.\n *\n * Note that this function also handles map-based bindings and will insert them\n * at the top of the context.\n */\n function addBindingIntoContext(context, isMapBased, index, bindingValue, countId) {\n var valuesCount = getValuesCount(context, index);\n var lastValueIndex = index + 3 /* BindingsStartOffset */ + valuesCount;\n if (!isMapBased) {\n // prop-based values all have default values, but map-based entries do not.\n // we want to access the index for the default value in this case and not just\n // the bindings...\n lastValueIndex--;\n }\n if (typeof bindingValue === 'number') {\n context.splice(lastValueIndex, 0, bindingValue);\n context[index + 1 /* ValuesCountOffset */]++;\n // now that a new binding index has been added to the property\n // the guard mask bit value (at the `countId` position) needs\n // to be included into the existing mask value.\n var guardMask = getGuardMask(context, index) | (1 << countId);\n setGuardMask(context, index, guardMask);\n }\n else if (typeof bindingValue === 'string' && context[lastValueIndex] == null) {\n context[lastValueIndex] = bindingValue;\n }\n }\n /**\n * Applies all class entries in the provided context to the provided element and resets\n * any counter and/or bitMask values associated with class bindings.\n *\n * @returns whether or not the classes were flushed to the element.\n */\n function applyClasses(renderer, data, context, element, directiveIndex) {\n var classesFlushed = false;\n if (allowStylingFlush(context, directiveIndex)) {\n var isFirstPass = !isContextLocked(context);\n isFirstPass && lockContext(context);\n if (classesBitMask) {\n // there is no way to sanitize a class value therefore `sanitizer=null`\n applyStyling(context, renderer, element, data, classesBitMask, setClass$1, null);\n classesBitMask = 0;\n classesFlushed = true;\n }\n currentClassIndex = STYLING_INDEX_START_VALUE;\n }\n return classesFlushed;\n }\n /**\n * Applies all style entries in the provided context to the provided element and resets\n * any counter and/or bitMask values associated with style bindings.\n *\n * @returns whether or not the styles were flushed to the element.\n */\n function applyStyles(renderer, data, context, element, directiveIndex, sanitizer) {\n var stylesFlushed = false;\n if (allowStylingFlush(context, directiveIndex)) {\n var isFirstPass = !isContextLocked(context);\n isFirstPass && lockContext(context);\n if (stylesBitMask) {\n applyStyling(context, renderer, element, data, stylesBitMask, setStyle$1, sanitizer);\n stylesBitMask = 0;\n stylesFlushed = true;\n }\n currentStyleIndex = STYLING_INDEX_START_VALUE;\n return true;\n }\n return stylesFlushed;\n }\n /**\n * Runs through the provided styling context and applies each value to\n * the provided element (via the renderer) if one or more values are present.\n *\n * This function will iterate over all entries present in the provided\n * `TStylingContext` array (both prop-based and map-based bindings).-\n *\n * Each entry, within the `TStylingContext` array, is stored alphabetically\n * and this means that each prop/value entry will be applied in order\n * (so long as it is marked dirty in the provided `bitMask` value).\n *\n * If there are any map-based entries present (which are applied to the\n * element via the `[style]` and `[class]` bindings) then those entries\n * will be applied as well. However, the code for that is not apart of\n * this function. Instead, each time a property is visited, then the\n * code below will call an external function called `stylingMapsSyncFn`\n * and, if present, it will keep the application of styling values in\n * map-based bindings up to sync with the application of prop-based\n * bindings.\n *\n * Visit `styling_next/map_based_bindings.ts` to learn more about how the\n * algorithm works for map-based styling bindings.\n *\n * Note that this function is not designed to be called in isolation (use\n * `applyClasses` and `applyStyles` to actually apply styling values).\n */\n function applyStyling(context, renderer, element, bindingData, bitMaskValue, applyStylingFn, sanitizer) {\n deferredBindingQueue.length && flushDeferredBindings();\n var bitMask = normalizeBitMaskValue(bitMaskValue);\n var stylingMapsSyncFn = getStylingMapsSyncFn();\n var mapsGuardMask = getGuardMask(context, 2 /* MapBindingsPosition */);\n var applyAllValues = (bitMask & mapsGuardMask) > 0;\n var mapsMode = applyAllValues ? 1 /* ApplyAllValues */ : 0 /* TraverseValues */;\n var i = getPropValuesStartPosition(context);\n while (i < context.length) {\n var valuesCount = getValuesCount(context, i);\n var guardMask = getGuardMask(context, i);\n if (bitMask & guardMask) {\n var valueApplied = false;\n var prop = getProp$1(context, i);\n var valuesCountUpToDefault = valuesCount - 1;\n var defaultValue = getBindingValue(context, i, valuesCountUpToDefault);\n // case 1: apply prop-based values\n // try to apply the binding values and see if a non-null\n // value gets set for the styling binding\n for (var j = 0; j < valuesCountUpToDefault; j++) {\n var bindingIndex = getBindingValue(context, i, j);\n var value = bindingData[bindingIndex];\n if (isStylingValueDefined(value)) {\n var finalValue = sanitizer && isSanitizationRequired(context, i) ?\n sanitizer(prop, value, 2 /* SanitizeOnly */) :\n value;\n applyStylingFn(renderer, element, prop, finalValue, bindingIndex);\n valueApplied = true;\n break;\n }\n }\n // case 2: apply map-based values\n // traverse through each map-based styling binding and update all values up to\n // the provided `prop` value. If the property was not applied in the loop above\n // then it will be attempted to be applied in the maps sync code below.\n if (stylingMapsSyncFn) {\n // determine whether or not to apply the target property or to skip it\n var mode = mapsMode | (valueApplied ? 4 /* SkipTargetProp */ :\n 2 /* ApplyTargetProp */);\n var valueAppliedWithinMap = stylingMapsSyncFn(context, renderer, element, bindingData, applyStylingFn, sanitizer, mode, prop, defaultValue);\n valueApplied = valueApplied || valueAppliedWithinMap;\n }\n // case 3: apply the default value\n // if the value has not yet been applied then a truthy value does not exist in the\n // prop-based or map-based bindings code. If and when this happens, just apply the\n // default value (even if the default value is `null`).\n if (!valueApplied) {\n applyStylingFn(renderer, element, prop, defaultValue);\n }\n }\n i += 3 /* BindingsStartOffset */ + valuesCount;\n }\n // the map-based styling entries may have not applied all their\n // values. For this reason, one more call to the sync function\n // needs to be issued at the end.\n if (stylingMapsSyncFn) {\n stylingMapsSyncFn(context, renderer, element, bindingData, applyStylingFn, sanitizer, mapsMode);\n }\n }\n function normalizeBitMaskValue(value) {\n // if pass => apply all values (-1 implies that all bits are flipped to true)\n if (value === true)\n return -1;\n // if pass => skip all values\n if (value === false)\n return 0;\n // return the bit mask value as is\n return value;\n }\n var _activeStylingMapApplyFn = null;\n function getStylingMapsSyncFn() {\n return _activeStylingMapApplyFn;\n }\n function setStylingMapsSyncFn(fn) {\n _activeStylingMapApplyFn = fn;\n }\n /**\n * Assigns a style value to a style property for the given element.\n */\n var setStyle$1 = function (renderer, native, prop, value) {\n if (value) {\n // opacity, z-index and flexbox all have number values\n // and these need to be converted into strings so that\n // they can be assigned properly.\n value = value.toString();\n ngDevMode && ngDevMode.rendererSetStyle++;\n renderer && isProceduralRenderer(renderer) ?\n renderer.setStyle(native, prop, value, RendererStyleFlags3.DashCase) :\n native.style.setProperty(prop, value);\n }\n else {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n renderer && isProceduralRenderer(renderer) ?\n renderer.removeStyle(native, prop, RendererStyleFlags3.DashCase) :\n native.style.removeProperty(prop);\n }\n };\n /**\n * Adds/removes the provided className value to the provided element.\n */\n var setClass$1 = function (renderer, native, className, value) {\n if (className !== '') {\n if (value) {\n ngDevMode && ngDevMode.rendererAddClass++;\n renderer && isProceduralRenderer(renderer) ? renderer.addClass(native, className) :\n native.classList.add(className);\n }\n else {\n ngDevMode && ngDevMode.rendererRemoveClass++;\n renderer && isProceduralRenderer(renderer) ? renderer.removeClass(native, className) :\n native.classList.remove(className);\n }\n }\n };\n\n /**\n * --------\n *\n * This file contains the algorithm logic for applying map-based bindings\n * such as `[style]` and `[class]`.\n *\n * --------\n */\n /**\n * Used to apply styling values presently within any map-based bindings on an element.\n *\n * Angular supports map-based styling bindings which can be applied via the\n * `[style]` and `[class]` bindings which can be placed on any HTML element.\n * These bindings can work independently, together or alongside prop-based\n * styling bindings (e.g. `<div [style]=\"x\" [style.width]=\"w\">`).\n *\n * If a map-based styling binding is detected by the compiler, the following\n * AOT code is produced:\n *\n * ```typescript\n * styleMap(ctx.styles); // styles = {key:value}\n * classMap(ctx.classes); // classes = {key:value}|string\n * ```\n *\n * If and when either of the instructions above are evaluated, then the code\n * present in this file is included into the bundle. The mechanism used, to\n * activate support for map-based bindings at runtime is possible via the\n * `activeStylingMapFeature` function (which is also present in this file).\n *\n * # The Algorithm\n * Whenever a map-based binding updates (which is when the identity of the\n * map-value changes) then the map is iterated over and a `LStylingMap` array\n * is produced. The `LStylingMap` instance is stored in the binding location\n * where the `BINDING_INDEX` is situated when the `styleMap()` or `classMap()`\n * instruction were called. Once the binding changes, then the internal `bitMask`\n * value is marked as dirty.\n *\n * Styling values are applied once CD exits the element (which happens when\n * the `select(n)` instruction is called or the template function exits). When\n * this occurs, all prop-based bindings are applied. If a map-based binding is\n * present then a special flushing function (called a sync function) is made\n * available and it will be called each time a styling property is flushed.\n *\n * The flushing algorithm is designed to apply styling for a property (which is\n * a CSS property or a className value) one by one. If map-based bindings\n * are present, then the flushing algorithm will keep calling the maps styling\n * sync function each time a property is visited. This way, the flushing\n * behavior of map-based bindings will always be at the same property level\n * as the current prop-based property being iterated over (because everything\n * is alphabetically sorted).\n *\n * Let's imagine we have the following HTML template code:\n *\n * ```html\n * <div [style]=\"{width:'100px', height:'200px', 'z-index':'10'}\"\n * [style.width.px]=\"200\">...</div>\n * ```\n *\n * When CD occurs, both the `[style]` and `[style.width]` bindings\n * are evaluated. Then when the styles are flushed on screen, the\n * following operations happen:\n *\n * 1. `[style.width]` is attempted to be written to the element.\n *\n * 2. Once that happens, the algorithm instructs the map-based\n * entries (`[style]` in this case) to \"catch up\" and apply\n * all values up to the `width` value. When this happens the\n * `height` value is applied to the element (since it is\n * alphabetically situated before the `width` property).\n *\n * 3. Since there are no more prop-based entries anymore, the\n * loop exits and then, just before the flushing ends, it\n * instructs all map-based bindings to \"finish up\" applying\n * their values.\n *\n * 4. The only remaining value within the map-based entries is\n * the `z-index` value (`width` got skipped because it was\n * successfully applied via the prop-based `[style.width]`\n * binding). Since all map-based entries are told to \"finish up\",\n * the `z-index` value is iterated over and it is then applied\n * to the element.\n *\n * The most important thing to take note of here is that prop-based\n * bindings are evaluated in order alongside map-based bindings.\n * This allows all styling across an element to be applied in O(n)\n * time (a similar algorithm is that of the array merge algorithm\n * in merge sort).\n */\n var syncStylingMap = function (context, renderer, element, data, applyStylingFn, sanitizer, mode, targetProp, defaultValue) {\n var targetPropValueWasApplied = false;\n // once the map-based styling code is activate it is never deactivated. For this reason a\n // check to see if the current styling context has any map based bindings is required.\n var totalMaps = getValuesCount(context, 2 /* MapBindingsPosition */);\n if (totalMaps) {\n var runTheSyncAlgorithm = true;\n var loopUntilEnd = !targetProp;\n // If the code is told to finish up (run until the end), but the mode\n // hasn't been flagged to apply values (it only traverses values) then\n // there is no point in iterating over the array because nothing will\n // be applied to the element.\n if (loopUntilEnd && (mode & ~1 /* ApplyAllValues */)) {\n runTheSyncAlgorithm = false;\n targetPropValueWasApplied = true;\n }\n if (runTheSyncAlgorithm) {\n targetPropValueWasApplied = innerSyncStylingMap(context, renderer, element, data, applyStylingFn, sanitizer, mode, targetProp || null, 0, defaultValue || null);\n }\n if (loopUntilEnd) {\n resetSyncCursors();\n }\n }\n return targetPropValueWasApplied;\n };\n /**\n * Recursive function designed to apply map-based styling to an element one map at a time.\n *\n * This function is designed to be called from the `syncStylingMap` function and will\n * apply map-based styling data one map at a time to the provided `element`.\n *\n * This function is recursive and it will call itself if a follow-up map value is to be\n * processed. To learn more about how the algorithm works, see `syncStylingMap`.\n */\n function innerSyncStylingMap(context, renderer, element, data, applyStylingFn, sanitizer, mode, targetProp, currentMapIndex, defaultValue) {\n var targetPropValueWasApplied = false;\n var totalMaps = getValuesCount(context, 2 /* MapBindingsPosition */);\n if (currentMapIndex < totalMaps) {\n var bindingIndex = getBindingValue(context, 2 /* MapBindingsPosition */, currentMapIndex);\n var lStylingMap = data[bindingIndex];\n var cursor = getCurrentSyncCursor(currentMapIndex);\n while (cursor < lStylingMap.length) {\n var prop = getMapProp(lStylingMap, cursor);\n var iteratedTooFar = targetProp && prop > targetProp;\n var isTargetPropMatched = !iteratedTooFar && prop === targetProp;\n var value = getMapValue(lStylingMap, cursor);\n var valueIsDefined = isStylingValueDefined(value);\n // the recursive code is designed to keep applying until\n // it reaches or goes past the target prop. If and when\n // this happens then it will stop processing values, but\n // all other map values must also catch up to the same\n // point. This is why a recursive call is still issued\n // even if the code has iterated too far.\n var innerMode = iteratedTooFar ? mode : resolveInnerMapMode(mode, valueIsDefined, isTargetPropMatched);\n var innerProp = iteratedTooFar ? targetProp : prop;\n var valueApplied = innerSyncStylingMap(context, renderer, element, data, applyStylingFn, sanitizer, innerMode, innerProp, currentMapIndex + 1, defaultValue);\n if (iteratedTooFar) {\n break;\n }\n if (!valueApplied && isValueAllowedToBeApplied(mode, isTargetPropMatched)) {\n var useDefault = isTargetPropMatched && !valueIsDefined;\n var valueToApply = useDefault ? defaultValue : value;\n var bindingIndexToApply = useDefault ? bindingIndex : null;\n var finalValue = sanitizer ?\n sanitizer(prop, valueToApply, 3 /* ValidateAndSanitize */) :\n valueToApply;\n applyStylingFn(renderer, element, prop, finalValue, bindingIndexToApply);\n valueApplied = true;\n }\n targetPropValueWasApplied = valueApplied && isTargetPropMatched;\n cursor += 2 /* TupleSize */;\n }\n setCurrentSyncCursor(currentMapIndex, cursor);\n }\n return targetPropValueWasApplied;\n }\n /**\n * Enables support for map-based styling bindings (e.g. `[style]` and `[class]` bindings).\n */\n function activeStylingMapFeature() {\n setStylingMapsSyncFn(syncStylingMap);\n }\n /**\n * Used to determine the mode for the inner recursive call.\n *\n * If an inner map is iterated on then this is done so for one\n * of two reasons:\n *\n * - The target property was detected and the inner map\n * must now \"catch up\" (pointer-wise) up to where the current\n * map's cursor is situated.\n *\n * - The target property was not detected in the current map\n * and must be found in an inner map. This can only be allowed\n * if the current map iteration is not set to skip the target\n * property.\n */\n function resolveInnerMapMode(currentMode, valueIsDefined, isExactMatch) {\n var innerMode = currentMode;\n if (!valueIsDefined && isExactMatch && !(currentMode & 4 /* SkipTargetProp */)) {\n // case 1: set the mode to apply the targeted prop value if it\n // ends up being encountered in another map value\n innerMode |= 2 /* ApplyTargetProp */;\n innerMode &= ~4 /* SkipTargetProp */;\n }\n else {\n // case 2: set the mode to skip the targeted prop value if it\n // ends up being encountered in another map value\n innerMode |= 4 /* SkipTargetProp */;\n innerMode &= ~2 /* ApplyTargetProp */;\n }\n return innerMode;\n }\n /**\n * Decides whether or not a prop/value entry will be applied to an element.\n *\n * To determine whether or not a value is to be applied,\n * the following procedure is evaluated:\n *\n * First check to see the current `mode` status:\n * 1. If the mode value permits all props to be applied then allow.\n * - But do not allow if the current prop is set to be skipped.\n * 2. Otherwise if the current prop is permitted then allow.\n */\n function isValueAllowedToBeApplied(mode, isTargetPropMatched) {\n var doApplyValue = (mode & 1 /* ApplyAllValues */) > 0;\n if (!doApplyValue) {\n if (mode & 2 /* ApplyTargetProp */) {\n doApplyValue = isTargetPropMatched;\n }\n }\n else if ((mode & 4 /* SkipTargetProp */) && isTargetPropMatched) {\n doApplyValue = false;\n }\n return doApplyValue;\n }\n /**\n * Used to keep track of concurrent cursor values for multiple map-based styling bindings present on\n * an element.\n */\n var MAP_CURSORS = [];\n /**\n * Used to reset the state of each cursor value being used to iterate over map-based styling\n * bindings.\n */\n function resetSyncCursors() {\n for (var i = 0; i < MAP_CURSORS.length; i++) {\n MAP_CURSORS[i] = 1 /* ValuesStartPosition */;\n }\n }\n /**\n * Returns an active cursor value at a given mapIndex location.\n */\n function getCurrentSyncCursor(mapIndex) {\n if (mapIndex >= MAP_CURSORS.length) {\n MAP_CURSORS.push(1 /* ValuesStartPosition */);\n }\n return MAP_CURSORS[mapIndex];\n }\n /**\n * Sets a cursor value at a given mapIndex location.\n */\n function setCurrentSyncCursor(mapIndex, indexValue) {\n MAP_CURSORS[mapIndex] = indexValue;\n }\n /**\n * Used to convert a {key:value} map into a `LStylingMap` array.\n *\n * This function will either generate a new `LStylingMap` instance\n * or it will patch the provided `newValues` map value into an\n * existing `LStylingMap` value (this only happens if `bindingValue`\n * is an instance of `LStylingMap`).\n *\n * If a new key/value map is provided with an old `LStylingMap`\n * value then all properties will be overwritten with their new\n * values or with `null`. This means that the array will never\n * shrink in size (but it will also not be created and thrown\n * away whenever the {key:value} map entries change).\n */\n function normalizeIntoStylingMap(bindingValue, newValues) {\n var lStylingMap = Array.isArray(bindingValue) ? bindingValue : [null];\n lStylingMap[0 /* RawValuePosition */] = newValues || null;\n // because the new values may not include all the properties\n // that the old ones had, all values are set to `null` before\n // the new values are applied. This way, when flushed, the\n // styling algorithm knows exactly what style/class values\n // to remove from the element (since they are `null`).\n for (var j = 1 /* ValuesStartPosition */; j < lStylingMap.length; j += 2 /* TupleSize */) {\n setMapValue(lStylingMap, j, null);\n }\n var props = null;\n var map;\n var allValuesTrue = false;\n if (typeof newValues === 'string') { // [class] bindings allow string values\n if (newValues.length) {\n props = newValues.split(/\\s+/);\n allValuesTrue = true;\n }\n }\n else {\n props = newValues ? Object.keys(newValues) : null;\n map = newValues;\n }\n if (props) {\n outer: for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n var value = allValuesTrue ? true : map[prop];\n for (var j = 1 /* ValuesStartPosition */; j < lStylingMap.length; j += 2 /* TupleSize */) {\n var propAtIndex = getMapProp(lStylingMap, j);\n if (prop <= propAtIndex) {\n if (propAtIndex === prop) {\n setMapValue(lStylingMap, j, value);\n }\n else {\n lStylingMap.splice(j, 0, prop, value);\n }\n continue outer;\n }\n }\n lStylingMap.push(prop, value);\n }\n }\n return lStylingMap;\n }\n function getMapProp(map, index) {\n return map[index + 0 /* PropOffset */];\n }\n function setMapValue(map, index, value) {\n map[index + 1 /* ValueOffset */] = value;\n }\n function getMapValue(map, index) {\n return map[index + 1 /* ValueOffset */];\n }\n\n /**\n * Instantiates and attaches an instance of `TStylingContextDebug` to the provided context.\n */\n function attachStylingDebugObject(context) {\n var debug = new TStylingContextDebug(context);\n attachDebugObject(context, debug);\n return debug;\n }\n /**\n * A human-readable debug summary of the styling data present within `TStylingContext`.\n *\n * This class is designed to be used within testing code or when an\n * application has `ngDevMode` activated.\n */\n var TStylingContextDebug = /** @class */ (function () {\n function TStylingContextDebug(context) {\n this.context = context;\n }\n Object.defineProperty(TStylingContextDebug.prototype, \"isLocked\", {\n get: function () { return isContextLocked(this.context); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TStylingContextDebug.prototype, \"entries\", {\n /**\n * Returns a detailed summary of each styling entry in the context.\n *\n * See `TStylingTupleSummary`.\n */\n get: function () {\n var context = this.context;\n var entries = {};\n var start = 2 /* MapBindingsPosition */;\n var i = start;\n while (i < context.length) {\n var valuesCount = getValuesCount(context, i);\n // the context may contain placeholder values which are populated ahead of time,\n // but contain no actual binding values. In this situation there is no point in\n // classifying this as an \"entry\" since no real data is stored here yet.\n if (valuesCount) {\n var prop = getProp$1(context, i);\n var guardMask = getGuardMask(context, i);\n var defaultValue = getDefaultValue(context, i);\n var sanitizationRequired = isSanitizationRequired(context, i);\n var bindingsStartPosition = i + 3 /* BindingsStartOffset */;\n var sources = [];\n for (var j = 0; j < valuesCount; j++) {\n sources.push(context[bindingsStartPosition + j]);\n }\n entries[prop] = { prop: prop, guardMask: guardMask, sanitizationRequired: sanitizationRequired, valuesCount: valuesCount, defaultValue: defaultValue, sources: sources };\n }\n i += 3 /* BindingsStartOffset */ + valuesCount;\n }\n return entries;\n },\n enumerable: true,\n configurable: true\n });\n return TStylingContextDebug;\n }());\n /**\n * A human-readable debug summary of the styling data present for a `DebugNode` instance.\n *\n * This class is designed to be used within testing code or when an\n * application has `ngDevMode` activated.\n */\n var NodeStylingDebug = /** @class */ (function () {\n function NodeStylingDebug(context, _data, _isClassBased) {\n this.context = context;\n this._data = _data;\n this._isClassBased = _isClassBased;\n this._sanitizer = null;\n }\n /**\n * Overrides the sanitizer used to process styles.\n */\n NodeStylingDebug.prototype.overrideSanitizer = function (sanitizer) { this._sanitizer = sanitizer; };\n Object.defineProperty(NodeStylingDebug.prototype, \"summary\", {\n /**\n * Returns a detailed summary of each styling entry in the context and\n * what their runtime representation is.\n *\n * See `LStylingSummary`.\n */\n get: function () {\n var entries = {};\n this._mapValues(function (prop, value, bindingIndex) {\n entries[prop] = { prop: prop, value: value, bindingIndex: bindingIndex };\n });\n return entries;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NodeStylingDebug.prototype, \"values\", {\n /**\n * Returns a key/value map of all the styles/classes that were last applied to the element.\n */\n get: function () {\n var entries = {};\n this._mapValues(function (prop, value) { entries[prop] = value; });\n return entries;\n },\n enumerable: true,\n configurable: true\n });\n NodeStylingDebug.prototype._mapValues = function (fn) {\n // there is no need to store/track an element instance. The\n // element is only used when the styling algorithm attempts to\n // style the value (and we mock out the stylingApplyFn anyway).\n var mockElement = {};\n var hasMaps = getValuesCount(this.context, 2 /* MapBindingsPosition */) > 0;\n if (hasMaps) {\n activeStylingMapFeature();\n }\n var mapFn = function (renderer, element, prop, value, bindingIndex) {\n fn(prop, value, bindingIndex || null);\n };\n var sanitizer = this._isClassBased ? null : (this._sanitizer ||\n getCurrentOrLViewSanitizer(this._data));\n applyStyling(this.context, null, mockElement, this._data, true, mapFn, sanitizer);\n };\n return NodeStylingDebug;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /*\n * This file contains conditionally attached classes which provide human readable (debug) level\n * information for `LView`, `LContainer` and other internal data structures. These data structures\n * are stored internally as array which makes it very difficult during debugging to reason about the\n * current state of the system.\n *\n * Patching the array with extra property does change the array's hidden class' but it does not\n * change the cost of access, therefore this patching should not have significant if any impact in\n * `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)\n *\n * So instead of seeing:\n * ```\n * Array(30) [Object, 659, null, …]\n * ```\n *\n * You get to see:\n * ```\n * LViewDebug {\n * views: [...],\n * flags: {attached: true, ...}\n * nodes: [\n * {html: '<div id=\"123\">', ..., nodes: [\n * {html: '<span>', ..., nodes: null}\n * ]}\n * ]\n * }\n * ```\n */\n var LViewArray = ngDevMode && createNamedArrayType('LView');\n var LVIEW_EMPTY; // can't initialize here or it will not be tree shaken, because `LView`\n // constructor could have side-effects.\n /**\n * This function clones a blueprint and creates LView.\n *\n * Simple slice will keep the same type, and we need it to be LView\n */\n function cloneToLView(list) {\n if (LVIEW_EMPTY === undefined)\n LVIEW_EMPTY = new LViewArray();\n return LVIEW_EMPTY.concat(list);\n }\n /**\n * This class is a debug version of Object literal so that we can have constructor name show up in\n * debug tools in ngDevMode.\n */\n var TViewConstructor = /** @class */ (function () {\n function TView(id, //\n blueprint, //\n template, //\n viewQuery, //\n node, //\n data, //\n bindingStartIndex, //\n viewQueryStartIndex, //\n expandoStartIndex, //\n expandoInstructions, //\n firstTemplatePass, //\n staticViewQueries, //\n staticContentQueries, //\n preOrderHooks, //\n preOrderCheckHooks, //\n contentHooks, //\n contentCheckHooks, //\n viewHooks, //\n viewCheckHooks, //\n destroyHooks, //\n cleanup, //\n contentQueries, //\n components, //\n directiveRegistry, //\n pipeRegistry, //\n firstChild, //\n schemas) {\n this.id = id;\n this.blueprint = blueprint;\n this.template = template;\n this.viewQuery = viewQuery;\n this.node = node;\n this.data = data;\n this.bindingStartIndex = bindingStartIndex;\n this.viewQueryStartIndex = viewQueryStartIndex;\n this.expandoStartIndex = expandoStartIndex;\n this.expandoInstructions = expandoInstructions;\n this.firstTemplatePass = firstTemplatePass;\n this.staticViewQueries = staticViewQueries;\n this.staticContentQueries = staticContentQueries;\n this.preOrderHooks = preOrderHooks;\n this.preOrderCheckHooks = preOrderCheckHooks;\n this.contentHooks = contentHooks;\n this.contentCheckHooks = contentCheckHooks;\n this.viewHooks = viewHooks;\n this.viewCheckHooks = viewCheckHooks;\n this.destroyHooks = destroyHooks;\n this.cleanup = cleanup;\n this.contentQueries = contentQueries;\n this.components = components;\n this.directiveRegistry = directiveRegistry;\n this.pipeRegistry = pipeRegistry;\n this.firstChild = firstChild;\n this.schemas = schemas;\n }\n return TView;\n }());\n var TViewData = ngDevMode && createNamedArrayType('TViewData');\n var TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because `LView`\n // constructor could have side-effects.\n /**\n * This function clones a blueprint and creates TData.\n *\n * Simple slice will keep the same type, and we need it to be TData\n */\n function cloneToTViewData(list) {\n if (TVIEWDATA_EMPTY === undefined)\n TVIEWDATA_EMPTY = new TViewData();\n return TVIEWDATA_EMPTY.concat(list);\n }\n var LViewBlueprint = ngDevMode && createNamedArrayType('LViewBlueprint');\n var MatchesArray = ngDevMode && createNamedArrayType('MatchesArray');\n var TViewComponents = ngDevMode && createNamedArrayType('TViewComponents');\n var TNodeLocalNames = ngDevMode && createNamedArrayType('TNodeLocalNames');\n var TNodeInitialInputs = ngDevMode && createNamedArrayType('TNodeInitialInputs');\n var TNodeInitialData = ngDevMode && createNamedArrayType('TNodeInitialData');\n var LCleanup = ngDevMode && createNamedArrayType('LCleanup');\n var TCleanup = ngDevMode && createNamedArrayType('TCleanup');\n function attachLViewDebug(lView) {\n attachDebugObject(lView, new LViewDebug(lView));\n }\n function attachLContainerDebug(lContainer) {\n attachDebugObject(lContainer, new LContainerDebug(lContainer));\n }\n function toDebug(obj) {\n if (obj) {\n var debug = obj.debug;\n assertDefined(debug, 'Object does not have a debug representation.');\n return debug;\n }\n else {\n return obj;\n }\n }\n /**\n * Use this method to unwrap a native element in `LView` and convert it into HTML for easier\n * reading.\n *\n * @param value possibly wrapped native DOM node.\n * @param includeChildren If `true` then the serialized HTML form will include child elements (same\n * as `outerHTML`). If `false` then the serialized HTML form will only contain the element itself\n * (will not serialize child elements).\n */\n function toHtml(value, includeChildren) {\n if (includeChildren === void 0) { includeChildren = false; }\n var node = unwrapRNode(value);\n if (node) {\n var isTextNode = node.nodeType === Node.TEXT_NODE;\n var outerHTML = (isTextNode ? node.textContent : node.outerHTML) || '';\n if (includeChildren || isTextNode) {\n return outerHTML;\n }\n else {\n var innerHTML = node.innerHTML;\n return outerHTML.split(innerHTML)[0] || null;\n }\n }\n else {\n return null;\n }\n }\n var LViewDebug = /** @class */ (function () {\n function LViewDebug(_raw_lView) {\n this._raw_lView = _raw_lView;\n }\n Object.defineProperty(LViewDebug.prototype, \"flags\", {\n /**\n * Flags associated with the `LView` unpacked into a more readable state.\n */\n get: function () {\n var flags = this._raw_lView[FLAGS];\n return {\n __raw__flags__: flags,\n initPhaseState: flags & 3 /* InitPhaseStateMask */,\n creationMode: !!(flags & 4 /* CreationMode */),\n firstViewPass: !!(flags & 8 /* FirstLViewPass */),\n checkAlways: !!(flags & 16 /* CheckAlways */),\n dirty: !!(flags & 64 /* Dirty */),\n attached: !!(flags & 128 /* Attached */),\n destroyed: !!(flags & 256 /* Destroyed */),\n isRoot: !!(flags & 512 /* IsRoot */),\n indexWithinInitPhase: flags >> 10 /* IndexWithinInitPhaseShift */,\n };\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"parent\", {\n get: function () { return toDebug(this._raw_lView[PARENT]); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"host\", {\n get: function () { return toHtml(this._raw_lView[HOST], true); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"context\", {\n get: function () { return this._raw_lView[CONTEXT]; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"nodes\", {\n /**\n * The tree of nodes associated with the current `LView`. The nodes have been normalized into a\n * tree structure with relevant details pulled out for readability.\n */\n get: function () {\n var lView = this._raw_lView;\n var tNode = lView[TVIEW].firstChild;\n return toDebugNodes(tNode, lView);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"__other__\", {\n /**\n * Additional information which is hidden behind a property. The extra level of indirection is\n * done so that the debug view would not be cluttered with properties which are only rarely\n * relevant to the developer.\n */\n get: function () {\n return {\n tView: this._raw_lView[TVIEW],\n cleanup: this._raw_lView[CLEANUP],\n injector: this._raw_lView[INJECTOR$1],\n rendererFactory: this._raw_lView[RENDERER_FACTORY],\n renderer: this._raw_lView[RENDERER],\n sanitizer: this._raw_lView[SANITIZER],\n childHead: toDebug(this._raw_lView[CHILD_HEAD]),\n next: toDebug(this._raw_lView[NEXT]),\n childTail: toDebug(this._raw_lView[CHILD_TAIL]),\n declarationView: toDebug(this._raw_lView[DECLARATION_VIEW]),\n contentQueries: this._raw_lView[CONTENT_QUERIES],\n queries: this._raw_lView[QUERIES],\n tHost: this._raw_lView[T_HOST],\n bindingIndex: this._raw_lView[BINDING_INDEX],\n };\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LViewDebug.prototype, \"childViews\", {\n /**\n * Normalized view of child views (and containers) attached at this location.\n */\n get: function () {\n var childViews = [];\n var child = this.__other__.childHead;\n while (child) {\n childViews.push(child);\n child = child.__other__.next;\n }\n return childViews;\n },\n enumerable: true,\n configurable: true\n });\n return LViewDebug;\n }());\n /**\n * Turns a flat list of nodes into a tree by walking the associated `TNode` tree.\n *\n * @param tNode\n * @param lView\n */\n function toDebugNodes(tNode, lView) {\n if (tNode) {\n var debugNodes = [];\n var tNodeCursor = tNode;\n while (tNodeCursor) {\n var rawValue = lView[tNode.index];\n var native = unwrapRNode(rawValue);\n var componentLViewDebug = isStylingContext(rawValue) ? null : toDebug(readLViewValue(rawValue));\n var styles = null;\n var classes = null;\n if (runtimeIsNewStylingInUse()) {\n styles = tNode.newStyles ? new NodeStylingDebug(tNode.newStyles, lView, false) : null;\n classes = tNode.newClasses ? new NodeStylingDebug(tNode.newClasses, lView, true) : null;\n }\n debugNodes.push({\n html: toHtml(native),\n native: native, styles: styles, classes: classes,\n nodes: toDebugNodes(tNode.child, lView),\n component: componentLViewDebug,\n });\n tNodeCursor = tNodeCursor.next;\n }\n return debugNodes;\n }\n else {\n return null;\n }\n }\n var LContainerDebug = /** @class */ (function () {\n function LContainerDebug(_raw_lContainer) {\n this._raw_lContainer = _raw_lContainer;\n }\n Object.defineProperty(LContainerDebug.prototype, \"activeIndex\", {\n get: function () { return this._raw_lContainer[ACTIVE_INDEX]; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LContainerDebug.prototype, \"views\", {\n get: function () {\n return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET)\n .map(toDebug);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LContainerDebug.prototype, \"parent\", {\n get: function () { return toDebug(this._raw_lContainer[PARENT]); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LContainerDebug.prototype, \"queries\", {\n get: function () { return this._raw_lContainer[QUERIES]; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LContainerDebug.prototype, \"host\", {\n get: function () { return this._raw_lContainer[HOST]; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LContainerDebug.prototype, \"native\", {\n get: function () { return this._raw_lContainer[NATIVE]; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(LContainerDebug.prototype, \"__other__\", {\n get: function () {\n return {\n next: toDebug(this._raw_lContainer[NEXT]),\n };\n },\n enumerable: true,\n configurable: true\n });\n return LContainerDebug;\n }());\n /**\n * Return an `LView` value if found.\n *\n * @param value `LView` if any\n */\n function readLViewValue(value) {\n while (Array.isArray(value)) {\n // This check is not quite right, as it does not take into account `StylingContext`\n // This is why it is in debug, not in util.ts\n if (value.length >= HEADER_OFFSET - 1)\n return value;\n value = value[HOST];\n }\n return null;\n }\n var I18NDebugItem = /** @class */ (function () {\n function I18NDebugItem(__raw_opCode, _lView, nodeIndex, type) {\n this.__raw_opCode = __raw_opCode;\n this._lView = _lView;\n this.nodeIndex = nodeIndex;\n this.type = type;\n }\n Object.defineProperty(I18NDebugItem.prototype, \"tNode\", {\n get: function () { return getTNode(this.nodeIndex, this._lView); },\n enumerable: true,\n configurable: true\n });\n return I18NDebugItem;\n }());\n /**\n * Turns a list of \"Create\" & \"Update\" OpCodes into a human-readable list of operations for\n * debugging purposes.\n * @param mutateOpCodes mutation opCodes to read\n * @param updateOpCodes update opCodes to read\n * @param icus list of ICU expressions\n * @param lView The view the opCodes are acting on\n */\n function attachI18nOpCodesDebug(mutateOpCodes, updateOpCodes, icus, lView) {\n attachDebugObject(mutateOpCodes, new I18nMutateOpCodesDebug(mutateOpCodes, lView));\n attachDebugObject(updateOpCodes, new I18nUpdateOpCodesDebug(updateOpCodes, icus, lView));\n if (icus) {\n icus.forEach(function (icu) {\n icu.create.forEach(function (icuCase) { attachDebugObject(icuCase, new I18nMutateOpCodesDebug(icuCase, lView)); });\n icu.update.forEach(function (icuCase) {\n attachDebugObject(icuCase, new I18nUpdateOpCodesDebug(icuCase, icus, lView));\n });\n });\n }\n }\n var I18nMutateOpCodesDebug = /** @class */ (function () {\n function I18nMutateOpCodesDebug(__raw_opCodes, __lView) {\n this.__raw_opCodes = __raw_opCodes;\n this.__lView = __lView;\n }\n Object.defineProperty(I18nMutateOpCodesDebug.prototype, \"operations\", {\n /**\n * A list of operation information about how the OpCodes will act on the view.\n */\n get: function () {\n var _a = this, __lView = _a.__lView, __raw_opCodes = _a.__raw_opCodes;\n var results = [];\n for (var i = 0; i < __raw_opCodes.length; i++) {\n var opCode = __raw_opCodes[i];\n var result = void 0;\n if (typeof opCode === 'string') {\n result = {\n __raw_opCode: opCode,\n type: 'Create Text Node',\n nodeIndex: __raw_opCodes[++i],\n text: opCode,\n };\n }\n if (typeof opCode === 'number') {\n switch (opCode & 7 /* MASK_OPCODE */) {\n case 1 /* AppendChild */:\n var destinationNodeIndex = opCode >>> 17 /* SHIFT_PARENT */;\n result = new I18NDebugItem(opCode, __lView, destinationNodeIndex, 'AppendChild');\n break;\n case 0 /* Select */:\n var nodeIndex = opCode >>> 3 /* SHIFT_REF */;\n result = new I18NDebugItem(opCode, __lView, nodeIndex, 'Select');\n break;\n case 5 /* ElementEnd */:\n var elementIndex = opCode >>> 3 /* SHIFT_REF */;\n result = new I18NDebugItem(opCode, __lView, elementIndex, 'ElementEnd');\n break;\n case 4 /* Attr */:\n elementIndex = opCode >>> 3 /* SHIFT_REF */;\n result = new I18NDebugItem(opCode, __lView, elementIndex, 'Attr');\n result['attrName'] = __raw_opCodes[++i];\n result['attrValue'] = __raw_opCodes[++i];\n break;\n }\n }\n if (!result) {\n switch (opCode) {\n case COMMENT_MARKER:\n result = {\n __raw_opCode: opCode,\n type: 'COMMENT_MARKER',\n commentValue: __raw_opCodes[++i],\n nodeIndex: __raw_opCodes[++i],\n };\n break;\n case ELEMENT_MARKER:\n result = {\n __raw_opCode: opCode,\n type: 'ELEMENT_MARKER',\n };\n break;\n }\n }\n if (!result) {\n result = {\n __raw_opCode: opCode,\n type: 'Unknown Op Code',\n code: opCode,\n };\n }\n results.push(result);\n }\n return results;\n },\n enumerable: true,\n configurable: true\n });\n return I18nMutateOpCodesDebug;\n }());\n var I18nUpdateOpCodesDebug = /** @class */ (function () {\n function I18nUpdateOpCodesDebug(__raw_opCodes, icus, __lView) {\n this.__raw_opCodes = __raw_opCodes;\n this.icus = icus;\n this.__lView = __lView;\n }\n Object.defineProperty(I18nUpdateOpCodesDebug.prototype, \"operations\", {\n /**\n * A list of operation information about how the OpCodes will act on the view.\n */\n get: function () {\n var _a = this, __lView = _a.__lView, __raw_opCodes = _a.__raw_opCodes, icus = _a.icus;\n var results = [];\n for (var i = 0; i < __raw_opCodes.length; i++) {\n // bit code to check if we should apply the next update\n var checkBit = __raw_opCodes[i];\n // Number of opCodes to skip until next set of update codes\n var skipCodes = __raw_opCodes[++i];\n var value = '';\n for (var j = i + 1; j <= (i + skipCodes); j++) {\n var opCode = __raw_opCodes[j];\n if (typeof opCode === 'string') {\n value += opCode;\n }\n else if (typeof opCode == 'number') {\n if (opCode < 0) {\n // It's a binding index whose value is negative\n // We cannot know the value of the binding so we only show the index\n value += \"\\uFFFD\" + (-opCode - 1) + \"\\uFFFD\";\n }\n else {\n var nodeIndex = opCode >>> 2 /* SHIFT_REF */;\n var tIcuIndex = void 0;\n var tIcu = void 0;\n switch (opCode & 3 /* MASK_OPCODE */) {\n case 1 /* Attr */:\n var attrName = __raw_opCodes[++j];\n var sanitizeFn = __raw_opCodes[++j];\n results.push({\n __raw_opCode: opCode,\n checkBit: checkBit,\n type: 'Attr',\n attrValue: value, attrName: attrName, sanitizeFn: sanitizeFn,\n });\n break;\n case 0 /* Text */:\n results.push({\n __raw_opCode: opCode,\n checkBit: checkBit,\n type: 'Text', nodeIndex: nodeIndex,\n text: value,\n });\n break;\n case 2 /* IcuSwitch */:\n tIcuIndex = __raw_opCodes[++j];\n tIcu = icus[tIcuIndex];\n var result = new I18NDebugItem(opCode, __lView, nodeIndex, 'IcuSwitch');\n result['tIcuIndex'] = tIcuIndex;\n result['checkBit'] = checkBit;\n result['mainBinding'] = value;\n result['tIcu'] = tIcu;\n results.push(result);\n break;\n case 3 /* IcuUpdate */:\n tIcuIndex = __raw_opCodes[++j];\n tIcu = icus[tIcuIndex];\n result = new I18NDebugItem(opCode, __lView, nodeIndex, 'IcuUpdate');\n result['tIcuIndex'] = tIcuIndex;\n result['checkBit'] = checkBit;\n result['tIcu'] = tIcu;\n results.push(result);\n break;\n }\n }\n }\n }\n i += skipCodes;\n }\n return results;\n },\n enumerable: true,\n configurable: true\n });\n return I18nUpdateOpCodesDebug;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Selects an element for later binding instructions.\n *\n * Used in conjunction with instructions like {@link property} to act on elements with specified\n * indices, for example those created with {@link element} or {@link elementStart}.\n *\n * ```ts\n * (rf: RenderFlags, ctx: any) => {\n * if (rf & 1) {\n * element(0, 'div');\n * }\n * if (rf & 2) {\n * select(0); // Select the <div/> created above.\n * property('title', 'test');\n * }\n * }\n * ```\n * @param index the index of the item to act on with the following instructions\n *\n * @codeGenApi\n */\n function ɵɵselect(index) {\n ngDevMode && assertGreaterThan(index, -1, 'Invalid index');\n ngDevMode &&\n assertLessThan(index, getLView().length - HEADER_OFFSET, 'Should be within range for the view data');\n var lView = getLView();\n selectInternal(lView, index);\n }\n function selectInternal(lView, index) {\n // Flush the initial hooks for elements in the view that have been added up to this point.\n executePreOrderHooks(lView, lView[TVIEW], getCheckNoChangesMode(), index);\n // We must set the selected index *after* running the hooks, because hooks may have side-effects\n // that cause other template functions to run, thus updating the selected index, which is global\n // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index\n // will be altered by the time we leave the `ɵɵselect` instruction.\n setSelectedIndex(index);\n }\n\n var ɵ0$8 = function () { return Promise.resolve(null); };\n /**\n * A permanent marker promise which signifies that the current CD tree is\n * clean.\n */\n var _CLEAN_PROMISE = (ɵ0$8)();\n /**\n * Refreshes the view, executing the following steps in that order:\n * triggers init hooks, refreshes dynamic embedded views, triggers content hooks, sets host\n * bindings, refreshes child components.\n * Note: view hooks are triggered later when leaving the view.\n */\n function refreshDescendantViews(lView) {\n var tView = lView[TVIEW];\n var creationMode = isCreationMode(lView);\n // This needs to be set before children are processed to support recursive components\n tView.firstTemplatePass = false;\n // Resetting the bindingIndex of the current LView as the next steps may trigger change detection.\n lView[BINDING_INDEX] = tView.bindingStartIndex;\n // If this is a creation pass, we should not call lifecycle hooks or evaluate bindings.\n // This will be done in the update pass.\n if (!creationMode) {\n var checkNoChangesMode = getCheckNoChangesMode();\n executePreOrderHooks(lView, tView, checkNoChangesMode, undefined);\n refreshDynamicEmbeddedViews(lView);\n // Content query results must be refreshed before content hooks are called.\n refreshContentQueries(tView, lView);\n resetPreOrderHookFlags(lView);\n executeHooks(lView, tView.contentHooks, tView.contentCheckHooks, checkNoChangesMode, 1 /* AfterContentInitHooksToBeRun */, undefined);\n setHostBindings(tView, lView);\n }\n // We resolve content queries specifically marked as `static` in creation mode. Dynamic\n // content queries are resolved during change detection (i.e. update mode), after embedded\n // views are refreshed (see block above).\n if (creationMode && tView.staticContentQueries) {\n refreshContentQueries(tView, lView);\n }\n refreshChildComponents(tView.components);\n }\n /** Sets the host bindings for the current view. */\n function setHostBindings(tView, viewData) {\n var selectedIndex = getSelectedIndex();\n try {\n if (tView.expandoInstructions) {\n var bindingRootIndex = viewData[BINDING_INDEX] = tView.expandoStartIndex;\n setBindingRoot(bindingRootIndex);\n var currentDirectiveIndex = -1;\n var currentElementIndex = -1;\n for (var i = 0; i < tView.expandoInstructions.length; i++) {\n var instruction = tView.expandoInstructions[i];\n if (typeof instruction === 'number') {\n if (instruction <= 0) {\n // Negative numbers mean that we are starting new EXPANDO block and need to update\n // the current element and directive index.\n currentElementIndex = -instruction;\n setActiveHostElement(currentElementIndex);\n // Injector block and providers are taken into account.\n var providerCount = tView.expandoInstructions[++i];\n bindingRootIndex += INJECTOR_BLOOM_PARENT_SIZE + providerCount;\n currentDirectiveIndex = bindingRootIndex;\n }\n else {\n // This is either the injector size (so the binding root can skip over directives\n // and get to the first set of host bindings on this node) or the host var count\n // (to get to the next set of host bindings on this node).\n bindingRootIndex += instruction;\n }\n setBindingRoot(bindingRootIndex);\n }\n else {\n // If it's not a number, it's a host binding function that needs to be executed.\n if (instruction !== null) {\n viewData[BINDING_INDEX] = bindingRootIndex;\n var hostCtx = unwrapRNode(viewData[currentDirectiveIndex]);\n instruction(2 /* Update */, hostCtx, currentElementIndex);\n // Each directive gets a uniqueId value that is the same for both\n // create and update calls when the hostBindings function is called. The\n // directive uniqueId is not set anywhere--it is just incremented between\n // each hostBindings call and is useful for helping instruction code\n // uniquely determine which directive is currently active when executed.\n incrementActiveDirectiveId();\n }\n currentDirectiveIndex++;\n }\n }\n }\n }\n finally {\n setActiveHostElement(selectedIndex);\n }\n }\n /** Refreshes content queries for all directives in the given view. */\n function refreshContentQueries(tView, lView) {\n if (tView.contentQueries != null) {\n setCurrentQueryIndex(0);\n for (var i = 0; i < tView.contentQueries.length; i++) {\n var directiveDefIdx = tView.contentQueries[i];\n var directiveDef = tView.data[directiveDefIdx];\n ngDevMode &&\n assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n directiveDef.contentQueries(2 /* Update */, lView[directiveDefIdx], directiveDefIdx);\n }\n }\n }\n /** Refreshes child components in the current view. */\n function refreshChildComponents(components) {\n if (components != null) {\n for (var i = 0; i < components.length; i++) {\n componentRefresh(components[i]);\n }\n }\n }\n /**\n * Creates a native element from a tag name, using a renderer.\n * @param name the tag name\n * @param overriddenRenderer Optional A renderer to override the default one\n * @returns the element created\n */\n function elementCreate(name, overriddenRenderer) {\n var native;\n var rendererToUse = overriddenRenderer || getLView()[RENDERER];\n var namespace = getNamespace();\n if (isProceduralRenderer(rendererToUse)) {\n native = rendererToUse.createElement(name, namespace);\n }\n else {\n if (namespace === null) {\n native = rendererToUse.createElement(name);\n }\n else {\n native = rendererToUse.createElementNS(namespace, name);\n }\n }\n return native;\n }\n function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector) {\n var lView = ngDevMode ? cloneToLView(tView.blueprint) : tView.blueprint.slice();\n lView[HOST] = host;\n lView[FLAGS] = flags | 4 /* CreationMode */ | 128 /* Attached */ | 8 /* FirstLViewPass */;\n resetPreOrderHookFlags(lView);\n lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;\n lView[CONTEXT] = context;\n lView[RENDERER_FACTORY] = (rendererFactory || parentLView && parentLView[RENDERER_FACTORY]);\n ngDevMode && assertDefined(lView[RENDERER_FACTORY], 'RendererFactory is required');\n lView[RENDERER] = (renderer || parentLView && parentLView[RENDERER]);\n ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');\n lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null;\n lView[INJECTOR$1] = injector || parentLView && parentLView[INJECTOR$1] || null;\n lView[T_HOST] = tHostNode;\n ngDevMode && attachLViewDebug(lView);\n return lView;\n }\n function getOrCreateTNode(tView, tHostNode, index, type, name, attrs) {\n // Keep this function short, so that the VM will inline it.\n var adjustedIndex = index + HEADER_OFFSET;\n var tNode = tView.data[adjustedIndex] ||\n createTNodeAtIndex(tView, tHostNode, adjustedIndex, type, name, attrs, index);\n setPreviousOrParentTNode(tNode, true);\n return tNode;\n }\n function createTNodeAtIndex(tView, tHostNode, adjustedIndex, type, name, attrs, index) {\n var previousOrParentTNode = getPreviousOrParentTNode();\n var isParent = getIsParent();\n var parent = isParent ? previousOrParentTNode : previousOrParentTNode && previousOrParentTNode.parent;\n // Parents cannot cross component boundaries because components will be used in multiple places,\n // so it's only set if the view is the same.\n var parentInSameView = parent && parent !== tHostNode;\n var tParentNode = parentInSameView ? parent : null;\n var tNode = tView.data[adjustedIndex] =\n createTNode(tParentNode, type, adjustedIndex, name, attrs);\n // The first node is not always the one at index 0, in case of i18n, index 0 can be the\n // instruction `i18nStart` and the first node has the index 1 or more\n if (index === 0 || !tView.firstChild) {\n tView.firstChild = tNode;\n }\n // Now link ourselves into the tree.\n if (previousOrParentTNode) {\n if (isParent && previousOrParentTNode.child == null &&\n (tNode.parent !== null || previousOrParentTNode.type === 2 /* View */)) {\n // We are in the same view, which means we are adding content node to the parent view.\n previousOrParentTNode.child = tNode;\n }\n else if (!isParent) {\n previousOrParentTNode.next = tNode;\n }\n }\n return tNode;\n }\n function assignTViewNodeToLView(tView, tParentNode, index, lView) {\n // View nodes are not stored in data because they can be added / removed at runtime (which\n // would cause indices to change). Their TNodes are instead stored in tView.node.\n var tNode = tView.node;\n if (tNode == null) {\n ngDevMode && tParentNode &&\n assertNodeOfPossibleTypes(tParentNode, 3 /* Element */, 0 /* Container */);\n tView.node = tNode = createTNode(tParentNode, //\n 2 /* View */, index, null, null);\n }\n return lView[T_HOST] = tNode;\n }\n /**\n * When elements are created dynamically after a view blueprint is created (e.g. through\n * i18nApply() or ComponentFactory.create), we need to adjust the blueprint for future\n * template passes.\n */\n function allocExpando(view, numSlotsToAlloc) {\n var tView = view[TVIEW];\n if (tView.firstTemplatePass) {\n for (var i = 0; i < numSlotsToAlloc; i++) {\n tView.blueprint.push(null);\n tView.data.push(null);\n view.push(null);\n }\n // We should only increment the expando start index if there aren't already directives\n // and injectors saved in the \"expando\" section\n if (!tView.expandoInstructions) {\n tView.expandoStartIndex += numSlotsToAlloc;\n }\n else {\n // Since we're adding the dynamic nodes into the expando section, we need to let the host\n // bindings know that they should skip x slots\n tView.expandoInstructions.push(numSlotsToAlloc);\n }\n }\n }\n //////////////////////////\n //// Render\n //////////////////////////\n /**\n * Used for creating the LViewNode of a dynamic embedded view,\n * either through ViewContainerRef.createEmbeddedView() or TemplateRef.createEmbeddedView().\n * Such lViewNode will then be renderer with renderEmbeddedTemplate() (see below).\n */\n function createEmbeddedViewAndNode(tView, context, declarationView, queries, injectorIndex) {\n var _isParent = getIsParent();\n var _previousOrParentTNode = getPreviousOrParentTNode();\n setPreviousOrParentTNode(null, true);\n var lView = createLView(declarationView, tView, context, 16 /* CheckAlways */, null, null);\n lView[DECLARATION_VIEW] = declarationView;\n if (queries) {\n lView[QUERIES] = queries.createView();\n }\n assignTViewNodeToLView(tView, null, -1, lView);\n if (tView.firstTemplatePass) {\n tView.node.injectorIndex = injectorIndex;\n }\n setPreviousOrParentTNode(_previousOrParentTNode, _isParent);\n return lView;\n }\n /**\n * Used for rendering embedded views (e.g. dynamically created views)\n *\n * Dynamically created views must store/retrieve their TViews differently from component views\n * because their template functions are nested in the template functions of their hosts, creating\n * closures. If their host template happens to be an embedded template in a loop (e.g. ngFor\n * inside\n * an ngFor), the nesting would mean we'd have multiple instances of the template function, so we\n * can't store TViews in the template function itself (as we do for comps). Instead, we store the\n * TView for dynamically created views on their host TNode, which only has one instance.\n */\n function renderEmbeddedTemplate(viewToRender, tView, context) {\n var _isParent = getIsParent();\n var _previousOrParentTNode = getPreviousOrParentTNode();\n var oldView;\n if (viewToRender[FLAGS] & 512 /* IsRoot */) {\n // This is a root view inside the view tree\n tickRootContext(getRootContext(viewToRender));\n }\n else {\n // Will become true if the `try` block executes with no errors.\n var safeToRunHooks = false;\n try {\n setPreviousOrParentTNode(null, true);\n oldView = enterView(viewToRender, viewToRender[T_HOST]);\n resetPreOrderHookFlags(viewToRender);\n executeTemplate(viewToRender, tView.template, getRenderFlags(viewToRender), context);\n // This must be set to false immediately after the first creation run because in an\n // ngFor loop, all the views will be created together before update mode runs and turns\n // off firstTemplatePass. If we don't set it here, instances will perform directive\n // matching, etc again and again.\n viewToRender[TVIEW].firstTemplatePass = false;\n refreshDescendantViews(viewToRender);\n safeToRunHooks = true;\n }\n finally {\n leaveView(oldView, safeToRunHooks);\n setPreviousOrParentTNode(_previousOrParentTNode, _isParent);\n }\n }\n }\n function renderComponentOrTemplate(hostView, context, templateFn) {\n var rendererFactory = hostView[RENDERER_FACTORY];\n var oldView = enterView(hostView, hostView[T_HOST]);\n var normalExecutionPath = !getCheckNoChangesMode();\n var creationModeIsActive = isCreationMode(hostView);\n // Will become true if the `try` block executes with no errors.\n var safeToRunHooks = false;\n try {\n if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {\n rendererFactory.begin();\n }\n if (creationModeIsActive) {\n // creation mode pass\n templateFn && executeTemplate(hostView, templateFn, 1 /* Create */, context);\n refreshDescendantViews(hostView);\n hostView[FLAGS] &= ~4 /* CreationMode */;\n }\n // update mode pass\n resetPreOrderHookFlags(hostView);\n templateFn && executeTemplate(hostView, templateFn, 2 /* Update */, context);\n refreshDescendantViews(hostView);\n safeToRunHooks = true;\n }\n finally {\n if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) {\n rendererFactory.end();\n }\n leaveView(oldView, safeToRunHooks);\n }\n }\n function executeTemplate(lView, templateFn, rf, context) {\n ɵɵnamespaceHTML();\n var prevSelectedIndex = getSelectedIndex();\n try {\n setActiveHostElement(null);\n if (rf & 2 /* Update */) {\n // When we're updating, have an inherent ɵɵselect(0) so we don't have to generate that\n // instruction for most update blocks\n selectInternal(lView, 0);\n }\n templateFn(rf, context);\n }\n finally {\n setSelectedIndex(prevSelectedIndex);\n }\n }\n /**\n * This function returns the default configuration of rendering flags depending on when the\n * template is in creation mode or update mode. Update block and create block are\n * always run separately.\n */\n function getRenderFlags(view) {\n return isCreationMode(view) ? 1 /* Create */ : 2 /* Update */;\n }\n //////////////////////////\n //// Element\n //////////////////////////\n /**\n * Appropriately sets `stylingTemplate` on a TNode\n *\n * Does not apply styles to DOM nodes\n *\n * @param tNode The node whose `stylingTemplate` to set\n * @param attrs The attribute array source to set the attributes from\n * @param attrsStartIndex Optional start index to start processing the `attrs` from\n */\n function setNodeStylingTemplate(tView, tNode, attrs, attrsStartIndex) {\n if (tView.firstTemplatePass && !tNode.stylingTemplate) {\n var stylingAttrsStartIndex = attrsStylingIndexOf(attrs, attrsStartIndex);\n if (stylingAttrsStartIndex >= 0) {\n tNode.stylingTemplate = initializeStaticContext(attrs, stylingAttrsStartIndex);\n }\n }\n }\n function executeContentQueries(tView, tNode, lView) {\n if (isContentQueryHost(tNode)) {\n var start = tNode.directiveStart;\n var end = tNode.directiveEnd;\n for (var directiveIndex = start; directiveIndex < end; directiveIndex++) {\n var def = tView.data[directiveIndex];\n if (def.contentQueries) {\n def.contentQueries(1 /* Create */, lView[directiveIndex], directiveIndex);\n }\n }\n }\n }\n /**\n * Creates directive instances and populates local refs.\n *\n * @param localRefs Local refs of the node in question\n * @param localRefExtractor mapping function that extracts local ref value from TNode\n */\n function createDirectivesAndLocals(tView, lView, localRefs, localRefExtractor) {\n if (localRefExtractor === void 0) { localRefExtractor = getNativeByTNode; }\n if (!getBindingsEnabled())\n return;\n var previousOrParentTNode = getPreviousOrParentTNode();\n if (tView.firstTemplatePass) {\n ngDevMode && ngDevMode.firstTemplatePass++;\n resolveDirectives(tView, lView, findDirectiveMatches(tView, lView, previousOrParentTNode), previousOrParentTNode, localRefs || null);\n }\n instantiateAllDirectives(tView, lView, previousOrParentTNode);\n invokeDirectivesHostBindings(tView, lView, previousOrParentTNode);\n saveResolvedLocalsInData(lView, previousOrParentTNode, localRefExtractor);\n setActiveHostElement(null);\n }\n /**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to LView in the same order as they are loaded in the template with load().\n */\n function saveResolvedLocalsInData(viewData, tNode, localRefExtractor) {\n var localNames = tNode.localNames;\n if (localNames) {\n var localIndex = tNode.index + 1;\n for (var i = 0; i < localNames.length; i += 2) {\n var index = localNames[i + 1];\n var value = index === -1 ?\n localRefExtractor(tNode, viewData) :\n viewData[index];\n viewData[localIndex++] = value;\n }\n }\n }\n /**\n * Gets TView from a template function or creates a new TView\n * if it doesn't already exist.\n *\n * @param def ComponentDef\n * @returns TView\n */\n function getOrCreateTView(def) {\n return def.tView || (def.tView = createTView(-1, def.template, def.consts, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas));\n }\n /**\n * Creates a TView instance\n *\n * @param viewIndex The viewBlockId for inline views, or -1 if it's a component/dynamic\n * @param templateFn Template function\n * @param consts The number of nodes, local refs, and pipes in this template\n * @param directives Registry of directives for this view\n * @param pipes Registry of pipes for this view\n * @param viewQuery View queries for this view\n * @param schemas Schemas for this view\n */\n function createTView(viewIndex, templateFn, consts, vars, directives, pipes, viewQuery, schemas) {\n ngDevMode && ngDevMode.tView++;\n var bindingStartIndex = HEADER_OFFSET + consts;\n // This length does not yet contain host bindings from child directives because at this point,\n // we don't know which directives are active on this template. As soon as a directive is matched\n // that has a host binding, we will update the blueprint with that def's hostVars count.\n var initialViewLength = bindingStartIndex + vars;\n var blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n return blueprint[TVIEW] = ngDevMode ?\n new TViewConstructor(viewIndex, // id: number,\n blueprint, // blueprint: LView,\n templateFn, // template: ComponentTemplate<{}>|null,\n viewQuery, // viewQuery: ViewQueriesFunction<{}>|null,\n null, // node: TViewNode|TElementNode|null,\n cloneToTViewData(blueprint).fill(null, bindingStartIndex), // data: TData,\n bindingStartIndex, // bindingStartIndex: number,\n initialViewLength, // viewQueryStartIndex: number,\n initialViewLength, // expandoStartIndex: number,\n null, // expandoInstructions: ExpandoInstructions|null,\n true, // firstTemplatePass: boolean,\n false, // staticViewQueries: boolean,\n false, // staticContentQueries: boolean,\n null, // preOrderHooks: HookData|null,\n null, // preOrderCheckHooks: HookData|null,\n null, // contentHooks: HookData|null,\n null, // contentCheckHooks: HookData|null,\n null, // viewHooks: HookData|null,\n null, // viewCheckHooks: HookData|null,\n null, // destroyHooks: HookData|null,\n null, // cleanup: any[]|null,\n null, // contentQueries: number[]|null,\n null, // components: number[]|null,\n typeof directives === 'function' ?\n directives() :\n directives, // directiveRegistry: DirectiveDefList|null,\n typeof pipes === 'function' ? pipes() : pipes, // pipeRegistry: PipeDefList|null,\n null, // firstChild: TNode|null,\n schemas) :\n {\n id: viewIndex,\n blueprint: blueprint,\n template: templateFn,\n viewQuery: viewQuery,\n node: null,\n data: blueprint.slice().fill(null, bindingStartIndex),\n bindingStartIndex: bindingStartIndex,\n viewQueryStartIndex: initialViewLength,\n expandoStartIndex: initialViewLength,\n expandoInstructions: null,\n firstTemplatePass: true,\n staticViewQueries: false,\n staticContentQueries: false,\n preOrderHooks: null,\n preOrderCheckHooks: null,\n contentHooks: null,\n contentCheckHooks: null,\n viewHooks: null,\n viewCheckHooks: null,\n destroyHooks: null,\n cleanup: null,\n contentQueries: null,\n components: null,\n directiveRegistry: typeof directives === 'function' ? directives() : directives,\n pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n firstChild: null,\n schemas: schemas,\n };\n }\n function createViewBlueprint(bindingStartIndex, initialViewLength) {\n var blueprint = new (ngDevMode ? LViewBlueprint : Array)(initialViewLength)\n .fill(null, 0, bindingStartIndex)\n .fill(NO_CHANGE, bindingStartIndex);\n blueprint[BINDING_INDEX] = bindingStartIndex;\n return blueprint;\n }\n function createError(text, token) {\n return new Error(\"Renderer: \" + text + \" [\" + stringifyForError(token) + \"]\");\n }\n /**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param elementOrSelector Render element or CSS selector to locate the element.\n */\n function locateHostElement(factory, elementOrSelector) {\n var defaultRenderer = factory.createRenderer(null, null);\n var rNode = typeof elementOrSelector === 'string' ?\n (isProceduralRenderer(defaultRenderer) ?\n defaultRenderer.selectRootElement(elementOrSelector) :\n defaultRenderer.querySelector(elementOrSelector)) :\n elementOrSelector;\n if (ngDevMode && !rNode) {\n if (typeof elementOrSelector === 'string') {\n throw createError('Host node with selector not found:', elementOrSelector);\n }\n else {\n throw createError('Host node is required:', elementOrSelector);\n }\n }\n return rNode;\n }\n /**\n * Saves context for this cleanup function in LView.cleanupInstances.\n *\n * On the first template pass, saves in TView:\n * - Cleanup function\n * - Index of context we just saved in LView.cleanupInstances\n */\n function storeCleanupWithContext(lView, context, cleanupFn) {\n var lCleanup = getCleanup(lView);\n lCleanup.push(context);\n if (lView[TVIEW].firstTemplatePass) {\n getTViewCleanup(lView).push(cleanupFn, lCleanup.length - 1);\n }\n }\n /**\n * Saves the cleanup function itself in LView.cleanupInstances.\n *\n * This is necessary for functions that are wrapped with their contexts, like in renderer2\n * listeners.\n *\n * On the first template pass, the index of the cleanup function is saved in TView.\n */\n function storeCleanupFn(view, cleanupFn) {\n getCleanup(view).push(cleanupFn);\n if (view[TVIEW].firstTemplatePass) {\n getTViewCleanup(view).push(view[CLEANUP].length - 1, null);\n }\n }\n /**\n * Constructs a TNode object from the arguments.\n *\n * @param type The type of the node\n * @param adjustedIndex The index of the TNode in TView.data, adjusted for HEADER_OFFSET\n * @param tagName The tag name of the node\n * @param attrs The attributes defined on this node\n * @param tViews Any TViews attached to this node\n * @returns the TNode object\n */\n function createTNode(tParent, type, adjustedIndex, tagName, attrs) {\n ngDevMode && ngDevMode.tNode++;\n return {\n type: type,\n index: adjustedIndex,\n injectorIndex: tParent ? tParent.injectorIndex : -1,\n directiveStart: -1,\n directiveEnd: -1,\n propertyMetadataStartIndex: -1,\n propertyMetadataEndIndex: -1,\n flags: 0,\n providerIndexes: 0,\n tagName: tagName,\n attrs: attrs,\n localNames: null,\n initialInputs: undefined,\n inputs: undefined,\n outputs: undefined,\n tViews: null,\n next: null,\n projectionNext: null,\n child: null,\n parent: tParent,\n stylingTemplate: null,\n projection: null,\n onElementCreationFns: null,\n // TODO (matsko): rename this to `styles` once the old styling impl is gone\n newStyles: null,\n // TODO (matsko): rename this to `classes` once the old styling impl is gone\n newClasses: null,\n };\n }\n /**\n * Consolidates all inputs or outputs of all directives on this logical node.\n *\n * @param tNode\n * @param direction whether to consider inputs or outputs\n * @returns PropertyAliases|null aggregate of all properties if any, `null` otherwise\n */\n function generatePropertyAliases(tNode, direction) {\n var tView = getLView()[TVIEW];\n var propStore = null;\n var start = tNode.directiveStart;\n var end = tNode.directiveEnd;\n if (end > start) {\n var isInput = direction === 0 /* Input */;\n var defs = tView.data;\n for (var i = start; i < end; i++) {\n var directiveDef = defs[i];\n var propertyAliasMap = isInput ? directiveDef.inputs : directiveDef.outputs;\n for (var publicName in propertyAliasMap) {\n if (propertyAliasMap.hasOwnProperty(publicName)) {\n propStore = propStore || {};\n var internalName = propertyAliasMap[publicName];\n var hasProperty = propStore.hasOwnProperty(publicName);\n hasProperty ? propStore[publicName].push(i, publicName, internalName) :\n (propStore[publicName] = [i, publicName, internalName]);\n }\n }\n }\n }\n return propStore;\n }\n /**\n * Mapping between attributes names that don't correspond to their element property names.\n * Note: this mapping has to be kept in sync with the equally named mapping in the template\n * type-checking machinery of ngtsc.\n */\n var ATTR_TO_PROP = {\n 'class': 'className',\n 'for': 'htmlFor',\n 'formaction': 'formAction',\n 'innerHtml': 'innerHTML',\n 'readonly': 'readOnly',\n 'tabindex': 'tabIndex',\n };\n function elementPropertyInternal(index, propName, value, sanitizer, nativeOnly, loadRendererFn) {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n var lView = getLView();\n var element = getNativeByIndex(index, lView);\n var tNode = getTNode(index, lView);\n var inputData;\n var dataValue;\n if (!nativeOnly && (inputData = initializeTNodeInputs(tNode)) &&\n (dataValue = inputData[propName])) {\n setInputsForProperty(lView, dataValue, value);\n if (isComponent(tNode))\n markDirtyIfOnPush(lView, index + HEADER_OFFSET);\n if (ngDevMode) {\n if (tNode.type === 3 /* Element */ || tNode.type === 0 /* Container */) {\n /**\n * dataValue is an array containing runtime input or output names for the directives:\n * i+0: directive instance index\n * i+1: publicName\n * i+2: privateName\n *\n * e.g. [0, 'change', 'change-minified']\n * we want to set the reflected property with the privateName: dataValue[i+2]\n */\n for (var i = 0; i < dataValue.length; i += 3) {\n setNgReflectProperty(lView, element, tNode.type, dataValue[i + 2], value);\n }\n }\n }\n }\n else if (tNode.type === 3 /* Element */) {\n propName = ATTR_TO_PROP[propName] || propName;\n if (ngDevMode) {\n validateAgainstEventProperties(propName);\n validateAgainstUnknownProperties(lView, element, propName, tNode);\n ngDevMode.rendererSetProperty++;\n }\n savePropertyDebugData(tNode, lView, propName, lView[TVIEW].data, nativeOnly);\n var renderer = loadRendererFn ? loadRendererFn(tNode, lView) : lView[RENDERER];\n // It is assumed that the sanitizer is only added when the compiler determines that the\n // property\n // is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? sanitizer(value, tNode.tagName || '', propName) : value;\n if (isProceduralRenderer(renderer)) {\n renderer.setProperty(element, propName, value);\n }\n else if (!isAnimationProp(propName)) {\n element.setProperty ? element.setProperty(propName, value) :\n element[propName] = value;\n }\n }\n else if (tNode.type === 0 /* Container */) {\n // If the node is a container and the property didn't\n // match any of the inputs or schemas we should throw.\n if (ngDevMode && !matchingSchemas(lView, tNode.tagName)) {\n throw createUnknownPropertyError(propName, tNode);\n }\n }\n }\n /** If node is an OnPush component, marks its LView dirty. */\n function markDirtyIfOnPush(lView, viewIndex) {\n ngDevMode && assertLView(lView);\n var childComponentLView = getComponentViewByIndex(viewIndex, lView);\n if (!(childComponentLView[FLAGS] & 16 /* CheckAlways */)) {\n childComponentLView[FLAGS] |= 64 /* Dirty */;\n }\n }\n function setNgReflectProperty(lView, element, type, attrName, value) {\n var _a;\n var renderer = lView[RENDERER];\n attrName = normalizeDebugBindingName(attrName);\n var debugValue = normalizeDebugBindingValue(value);\n if (type === 3 /* Element */) {\n if (value == null) {\n isProceduralRenderer(renderer) ? renderer.removeAttribute(element, attrName) :\n element.removeAttribute(attrName);\n }\n else {\n isProceduralRenderer(renderer) ?\n renderer.setAttribute(element, attrName, debugValue) :\n element.setAttribute(attrName, debugValue);\n }\n }\n else {\n var textContent = \"bindings=\" + JSON.stringify((_a = {}, _a[attrName] = debugValue, _a), null, 2);\n if (isProceduralRenderer(renderer)) {\n renderer.setValue(element, textContent);\n }\n else {\n element.textContent = textContent;\n }\n }\n }\n function validateAgainstUnknownProperties(hostView, element, propName, tNode) {\n // If the tag matches any of the schemas we shouldn't throw.\n if (matchingSchemas(hostView, tNode.tagName)) {\n return;\n }\n // If prop is not a known property of the HTML element...\n if (!(propName in element) &&\n // and we are in a browser context... (web worker nodes should be skipped)\n typeof Node === 'function' && element instanceof Node &&\n // and isn't a synthetic animation property...\n propName[0] !== ANIMATION_PROP_PREFIX) {\n // ... it is probably a user error and we should throw.\n throw createUnknownPropertyError(propName, tNode);\n }\n }\n function matchingSchemas(hostView, tagName) {\n var schemas = hostView[TVIEW].schemas;\n if (schemas !== null) {\n for (var i = 0; i < schemas.length; i++) {\n var schema = schemas[i];\n if (schema === NO_ERRORS_SCHEMA ||\n schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {\n return true;\n }\n }\n }\n return false;\n }\n /**\n * Stores debugging data for this property binding on first template pass.\n * This enables features like DebugElement.properties.\n */\n function savePropertyDebugData(tNode, lView, propName, tData, nativeOnly) {\n var lastBindingIndex = lView[BINDING_INDEX] - 1;\n // Bind/interpolation functions save binding metadata in the last binding index,\n // but leave the property name blank. If the interpolation delimiter is at the 0\n // index, we know that this is our first pass and the property name still needs to\n // be set.\n var bindingMetadata = tData[lastBindingIndex];\n if (bindingMetadata[0] == INTERPOLATION_DELIMITER) {\n tData[lastBindingIndex] = propName + bindingMetadata;\n // We don't want to store indices for host bindings because they are stored in a\n // different part of LView (the expando section).\n if (!nativeOnly) {\n if (tNode.propertyMetadataStartIndex == -1) {\n tNode.propertyMetadataStartIndex = lastBindingIndex;\n }\n tNode.propertyMetadataEndIndex = lastBindingIndex + 1;\n }\n }\n }\n /**\n * Creates an error that should be thrown when encountering an unknown property on an element.\n * @param propName Name of the invalid property.\n * @param tNode Node on which we encountered the error.\n */\n function createUnknownPropertyError(propName, tNode) {\n return new Error(\"Template error: Can't bind to '\" + propName + \"' since it isn't a known property of '\" + tNode.tagName + \"'.\");\n }\n /**\n * Instantiate a root component.\n */\n function instantiateRootComponent(tView, viewData, def) {\n var rootTNode = getPreviousOrParentTNode();\n if (tView.firstTemplatePass) {\n if (def.providersResolver)\n def.providersResolver(def);\n generateExpandoInstructionBlock(tView, rootTNode, 1);\n baseResolveDirective(tView, viewData, def, def.factory);\n }\n var directive = getNodeInjectable(tView.data, viewData, viewData.length - 1, rootTNode);\n postProcessBaseDirective(viewData, rootTNode, directive);\n return directive;\n }\n /**\n * Resolve the matched directives on a node.\n */\n function resolveDirectives(tView, viewData, directives, tNode, localRefs) {\n // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in\n // tsickle.\n ngDevMode && assertEqual(tView.firstTemplatePass, true, 'should run on first template pass only');\n var exportsMap = localRefs ? { '': -1 } : null;\n if (directives) {\n initNodeFlags(tNode, tView.data.length, directives.length);\n // When the same token is provided by several directives on the same node, some rules apply in\n // the viewEngine:\n // - viewProviders have priority over providers\n // - the last directive in NgModule.declarations has priority over the previous one\n // So to match these rules, the order in which providers are added in the arrays is very\n // important.\n for (var i = 0; i < directives.length; i++) {\n var def = directives[i];\n if (def.providersResolver)\n def.providersResolver(def);\n }\n generateExpandoInstructionBlock(tView, tNode, directives.length);\n var initialPreOrderHooksLength = (tView.preOrderHooks && tView.preOrderHooks.length) || 0;\n var initialPreOrderCheckHooksLength = (tView.preOrderCheckHooks && tView.preOrderCheckHooks.length) || 0;\n var nodeIndex = tNode.index - HEADER_OFFSET;\n for (var i = 0; i < directives.length; i++) {\n var def = directives[i];\n var directiveDefIdx = tView.data.length;\n baseResolveDirective(tView, viewData, def, def.factory);\n saveNameToExportMap(tView.data.length - 1, def, exportsMap);\n // Init hooks are queued now so ngOnInit is called in host components before\n // any projected components.\n registerPreOrderHooks(directiveDefIdx, def, tView, nodeIndex, initialPreOrderHooksLength, initialPreOrderCheckHooksLength);\n }\n }\n if (exportsMap)\n cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n }\n /**\n * Instantiate all the directives that were previously resolved on the current node.\n */\n function instantiateAllDirectives(tView, lView, tNode) {\n var start = tNode.directiveStart;\n var end = tNode.directiveEnd;\n if (!tView.firstTemplatePass && start < end) {\n getOrCreateNodeInjectorForNode(tNode, lView);\n }\n for (var i = start; i < end; i++) {\n var def = tView.data[i];\n if (isComponentDef(def)) {\n addComponentLogic(lView, tNode, def);\n }\n var directive = getNodeInjectable(tView.data, lView, i, tNode);\n postProcessDirective(lView, directive, def, i);\n }\n }\n function invokeDirectivesHostBindings(tView, viewData, tNode) {\n var start = tNode.directiveStart;\n var end = tNode.directiveEnd;\n var expando = tView.expandoInstructions;\n var firstTemplatePass = tView.firstTemplatePass;\n var elementIndex = tNode.index - HEADER_OFFSET;\n var selectedIndex = getSelectedIndex();\n try {\n setActiveHostElement(elementIndex);\n for (var i = start; i < end; i++) {\n var def = tView.data[i];\n var directive = viewData[i];\n if (def.hostBindings) {\n invokeHostBindingsInCreationMode(def, expando, directive, tNode, firstTemplatePass);\n // Each directive gets a uniqueId value that is the same for both\n // create and update calls when the hostBindings function is called. The\n // directive uniqueId is not set anywhere--it is just incremented between\n // each hostBindings call and is useful for helping instruction code\n // uniquely determine which directive is currently active when executed.\n incrementActiveDirectiveId();\n }\n else if (firstTemplatePass) {\n expando.push(null);\n }\n }\n }\n finally {\n setActiveHostElement(selectedIndex);\n }\n }\n function invokeHostBindingsInCreationMode(def, expando, directive, tNode, firstTemplatePass) {\n var previousExpandoLength = expando.length;\n setCurrentDirectiveDef(def);\n var elementIndex = tNode.index - HEADER_OFFSET;\n def.hostBindings(1 /* Create */, directive, elementIndex);\n setCurrentDirectiveDef(null);\n // `hostBindings` function may or may not contain `allocHostVars` call\n // (e.g. it may not if it only contains host listeners), so we need to check whether\n // `expandoInstructions` has changed and if not - we still push `hostBindings` to\n // expando block, to make sure we execute it for DI cycle\n if (previousExpandoLength === expando.length && firstTemplatePass) {\n expando.push(def.hostBindings);\n }\n }\n /**\n * Generates a new block in TView.expandoInstructions for this node.\n *\n * Each expando block starts with the element index (turned negative so we can distinguish\n * it from the hostVar count) and the directive count. See more in VIEW_DATA.md.\n */\n function generateExpandoInstructionBlock(tView, tNode, directiveCount) {\n ngDevMode && assertEqual(tView.firstTemplatePass, true, 'Expando block should only be generated on first template pass.');\n var elementIndex = -(tNode.index - HEADER_OFFSET);\n var providerStartIndex = tNode.providerIndexes & 65535 /* ProvidersStartIndexMask */;\n var providerCount = tView.data.length - providerStartIndex;\n (tView.expandoInstructions || (tView.expandoInstructions = [])).push(elementIndex, providerCount, directiveCount);\n }\n /**\n * Process a directive on the current node after its creation.\n */\n function postProcessDirective(viewData, directive, def, directiveDefIdx) {\n var previousOrParentTNode = getPreviousOrParentTNode();\n postProcessBaseDirective(viewData, previousOrParentTNode, directive);\n ngDevMode && assertDefined(previousOrParentTNode, 'previousOrParentTNode');\n if (previousOrParentTNode && previousOrParentTNode.attrs) {\n setInputsFromAttrs(directiveDefIdx, directive, def, previousOrParentTNode);\n }\n if (viewData[TVIEW].firstTemplatePass && def.contentQueries) {\n previousOrParentTNode.flags |= 4 /* hasContentQuery */;\n }\n if (isComponentDef(def)) {\n var componentView = getComponentViewByIndex(previousOrParentTNode.index, viewData);\n componentView[CONTEXT] = directive;\n }\n }\n /**\n * A lighter version of postProcessDirective() that is used for the root component.\n */\n function postProcessBaseDirective(lView, previousOrParentTNode, directive) {\n var native = getNativeByTNode(previousOrParentTNode, lView);\n ngDevMode && assertEqual(lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex, 'directives should be created before any bindings');\n ngDevMode && assertPreviousIsParent(getIsParent());\n attachPatchData(directive, lView);\n if (native) {\n attachPatchData(native, lView);\n }\n }\n /**\n * Matches the current node against all available selectors.\n * If a component is matched (at most one), it is returned in first position in the array.\n */\n function findDirectiveMatches(tView, viewData, tNode) {\n ngDevMode && assertEqual(tView.firstTemplatePass, true, 'should run on first template pass only');\n var registry = tView.directiveRegistry;\n var matches = null;\n if (registry) {\n for (var i = 0; i < registry.length; i++) {\n var def = registry[i];\n if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {\n matches || (matches = ngDevMode ? new MatchesArray() : []);\n diPublicInInjector(getOrCreateNodeInjectorForNode(getPreviousOrParentTNode(), viewData), viewData, def.type);\n if (isComponentDef(def)) {\n if (tNode.flags & 1 /* isComponent */)\n throwMultipleComponentError(tNode);\n tNode.flags = 1 /* isComponent */;\n // The component is always stored first with directives after.\n matches.unshift(def);\n }\n else {\n matches.push(def);\n }\n }\n }\n }\n return matches;\n }\n /** Stores index of component's host element so it will be queued for view refresh during CD. */\n function queueComponentIndexForCheck(previousOrParentTNode) {\n var tView = getLView()[TVIEW];\n ngDevMode &&\n assertEqual(tView.firstTemplatePass, true, 'Should only be called in first template pass.');\n (tView.components || (tView.components = ngDevMode ? new TViewComponents() : [])).push(previousOrParentTNode.index);\n }\n /** Caches local names and their matching directive indices for query and template lookups. */\n function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {\n if (localRefs) {\n var localNames = tNode.localNames =\n ngDevMode ? new TNodeLocalNames() : [];\n // Local names must be stored in tNode in the same order that localRefs are defined\n // in the template to ensure the data is loaded in the same slots as their refs\n // in the template (for template queries).\n for (var i = 0; i < localRefs.length; i += 2) {\n var index = exportsMap[localRefs[i + 1]];\n if (index == null)\n throw new Error(\"Export of name '\" + localRefs[i + 1] + \"' not found!\");\n localNames.push(localRefs[i], index);\n }\n }\n }\n /**\n * Builds up an export map as directives are created, so local refs can be quickly mapped\n * to their directive instances.\n */\n function saveNameToExportMap(index, def, exportsMap) {\n if (exportsMap) {\n if (def.exportAs) {\n for (var i = 0; i < def.exportAs.length; i++) {\n exportsMap[def.exportAs[i]] = index;\n }\n }\n if (def.template)\n exportsMap[''] = index;\n }\n }\n /**\n * Initializes the flags on the current node, setting all indices to the initial index,\n * the directive count to 0, and adding the isComponent flag.\n * @param index the initial index\n */\n function initNodeFlags(tNode, index, numberOfDirectives) {\n var flags = tNode.flags;\n ngDevMode && assertEqual(flags === 0 || flags === 1 /* isComponent */, true, 'expected node flags to not be initialized');\n ngDevMode && assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, 'Reached the max number of directives');\n // When the first directive is created on a node, save the index\n tNode.flags = flags & 1 /* isComponent */;\n tNode.directiveStart = index;\n tNode.directiveEnd = index + numberOfDirectives;\n tNode.providerIndexes = index;\n }\n function baseResolveDirective(tView, viewData, def, directiveFactory) {\n tView.data.push(def);\n var nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), null);\n tView.blueprint.push(nodeInjectorFactory);\n viewData.push(nodeInjectorFactory);\n }\n function addComponentLogic(lView, previousOrParentTNode, def) {\n var native = getNativeByTNode(previousOrParentTNode, lView);\n var tView = getOrCreateTView(def);\n // Only component views should be added to the view tree directly. Embedded views are\n // accessed through their containers because they may be removed / re-added later.\n var rendererFactory = lView[RENDERER_FACTORY];\n var componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, lView[previousOrParentTNode.index], previousOrParentTNode, rendererFactory, rendererFactory.createRenderer(native, def)));\n componentView[T_HOST] = previousOrParentTNode;\n // Component view will always be created before any injected LContainers,\n // so this is a regular element, wrap it with the component view\n lView[previousOrParentTNode.index] = componentView;\n if (lView[TVIEW].firstTemplatePass) {\n queueComponentIndexForCheck(previousOrParentTNode);\n }\n }\n function elementAttributeInternal(index, name, value, lView, sanitizer, namespace) {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n ngDevMode && validateAgainstEventAttributes(name);\n var element = getNativeByIndex(index, lView);\n var renderer = lView[RENDERER];\n if (value == null) {\n ngDevMode && ngDevMode.rendererRemoveAttribute++;\n isProceduralRenderer(renderer) ? renderer.removeAttribute(element, name, namespace) :\n element.removeAttribute(name);\n }\n else {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n var tNode = getTNode(index, lView);\n var strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tNode.tagName || '', name);\n if (isProceduralRenderer(renderer)) {\n renderer.setAttribute(element, name, strValue, namespace);\n }\n else {\n namespace ? element.setAttributeNS(namespace, name, strValue) :\n element.setAttribute(name, strValue);\n }\n }\n }\n /**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param directiveIndex Index of the directive in directives array\n * @param instance Instance of the directive on which to set the initial inputs\n * @param def The directive def that contains the list of inputs\n * @param tNode The static data for this node\n */\n function setInputsFromAttrs(directiveIndex, instance, def, tNode) {\n var initialInputData = tNode.initialInputs;\n if (initialInputData === undefined || directiveIndex >= initialInputData.length) {\n initialInputData = generateInitialInputs(directiveIndex, def.inputs, tNode);\n }\n var initialInputs = initialInputData[directiveIndex];\n if (initialInputs) {\n var setInput = def.setInput;\n for (var i = 0; i < initialInputs.length;) {\n var publicName = initialInputs[i++];\n var privateName = initialInputs[i++];\n var value = initialInputs[i++];\n if (setInput) {\n def.setInput(instance, value, publicName, privateName);\n }\n else {\n instance[privateName] = value;\n }\n if (ngDevMode) {\n var lView = getLView();\n var nativeElement = getNativeByTNode(tNode, lView);\n setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value);\n }\n }\n }\n }\n /**\n * Generates initialInputData for a node and stores it in the template's static storage\n * so subsequent template invocations don't have to recalculate it.\n *\n * initialInputData is an array containing values that need to be set as input properties\n * for directives on this node, but only once on creation. We need this array to support\n * the case where you set an @Input property of a directive using attribute-like syntax.\n * e.g. if you have a `name` @Input, you can set it once like this:\n *\n * <my-component name=\"Bess\"></my-component>\n *\n * @param directiveIndex Index to store the initial input data\n * @param inputs The list of inputs from the directive def\n * @param tNode The static data on this node\n */\n function generateInitialInputs(directiveIndex, inputs, tNode) {\n var initialInputData = tNode.initialInputs || (tNode.initialInputs = ngDevMode ? new TNodeInitialInputs() : []);\n // Ensure that we don't create sparse arrays\n for (var i_1 = initialInputData.length; i_1 <= directiveIndex; i_1++) {\n initialInputData.push(null);\n }\n var attrs = tNode.attrs;\n var i = 0;\n while (i < attrs.length) {\n var attrName = attrs[i];\n if (attrName === 0 /* NamespaceURI */) {\n // We do not allow inputs on namespaced attributes.\n i += 4;\n continue;\n }\n else if (attrName === 5 /* ProjectAs */) {\n // Skip over the `ngProjectAs` value.\n i += 2;\n continue;\n }\n // If we hit any other attribute markers, we're done anyway. None of those are valid inputs.\n if (typeof attrName === 'number')\n break;\n var minifiedInputName = inputs[attrName];\n var attrValue = attrs[i + 1];\n if (minifiedInputName !== undefined) {\n var inputsToStore = initialInputData[directiveIndex] ||\n (initialInputData[directiveIndex] = ngDevMode ? new TNodeInitialData() : []);\n inputsToStore.push(attrName, minifiedInputName, attrValue);\n }\n i += 2;\n }\n return initialInputData;\n }\n //////////////////////////\n //// ViewContainer & View\n //////////////////////////\n // Not sure why I need to do `any` here but TS complains later.\n var LContainerArray = ngDevMode && createNamedArrayType('LContainer');\n /**\n * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.\n *\n * @param hostNative The host element for the LContainer\n * @param hostTNode The host TNode for the LContainer\n * @param currentView The parent view of the LContainer\n * @param native The native comment element\n * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case\n * @returns LContainer\n */\n function createLContainer(hostNative, currentView, native, tNode, isForViewContainerRef) {\n ngDevMode && assertDomNode(native);\n ngDevMode && assertLView(currentView);\n // https://jsperf.com/array-literal-vs-new-array-really\n var lContainer = new (ngDevMode ? LContainerArray : Array)(hostNative, // host native\n true, // Boolean `true` in this position signifies that this is an `LContainer`\n isForViewContainerRef ? -1 : 0, // active index\n currentView, // parent\n null, // next\n null, // queries\n tNode, // t_host\n native, // native,\n null);\n ngDevMode && attachLContainerDebug(lContainer);\n return lContainer;\n }\n /**\n * Goes over dynamic embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them\n * by executing an associated template function.\n */\n function refreshDynamicEmbeddedViews(lView) {\n for (var current = lView[CHILD_HEAD]; current !== null; current = current[NEXT]) {\n // Note: current can be an LView or an LContainer instance, but here we are only interested\n // in LContainer. We can tell it's an LContainer because its length is less than the LView\n // header.\n if (current[ACTIVE_INDEX] === -1 && isLContainer(current)) {\n for (var i = CONTAINER_HEADER_OFFSET; i < current.length; i++) {\n var dynamicViewData = current[i];\n // The directives and pipes are not needed here as an existing view is only being\n // refreshed.\n ngDevMode && assertDefined(dynamicViewData[TVIEW], 'TView must be allocated');\n renderEmbeddedTemplate(dynamicViewData, dynamicViewData[TVIEW], dynamicViewData[CONTEXT]);\n }\n }\n }\n }\n /////////////\n /**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param adjustedElementIndex Element index in LView[] (adjusted for HEADER_OFFSET)\n */\n function componentRefresh(adjustedElementIndex) {\n var lView = getLView();\n ngDevMode && assertDataInRange(lView, adjustedElementIndex);\n var hostView = getComponentViewByIndex(adjustedElementIndex, lView);\n ngDevMode && assertNodeType(lView[TVIEW].data[adjustedElementIndex], 3 /* Element */);\n // Only components in creation mode, attached CheckAlways\n // components or attached, dirty OnPush components should be checked\n if ((viewAttachedToChangeDetector(hostView) || isCreationMode(lView)) &&\n hostView[FLAGS] & (16 /* CheckAlways */ | 64 /* Dirty */)) {\n syncViewWithBlueprint(hostView);\n checkView(hostView, hostView[CONTEXT]);\n }\n }\n /**\n * Syncs an LView instance with its blueprint if they have gotten out of sync.\n *\n * Typically, blueprints and their view instances should always be in sync, so the loop here\n * will be skipped. However, consider this case of two components side-by-side:\n *\n * App template:\n * ```\n * <comp></comp>\n * <comp></comp>\n * ```\n *\n * The following will happen:\n * 1. App template begins processing.\n * 2. First <comp> is matched as a component and its LView is created.\n * 3. Second <comp> is matched as a component and its LView is created.\n * 4. App template completes processing, so it's time to check child templates.\n * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint.\n * 6. Second <comp> template is checked. Its blueprint has been updated by the first\n * <comp> template, but its LView was created before this update, so it is out of sync.\n *\n * Note that embedded views inside ngFor loops will never be out of sync because these views\n * are processed as soon as they are created.\n *\n * @param componentView The view to sync\n */\n function syncViewWithBlueprint(componentView) {\n var componentTView = componentView[TVIEW];\n for (var i = componentView.length; i < componentTView.blueprint.length; i++) {\n componentView[i] = componentTView.blueprint[i];\n }\n }\n /**\n * Adds LView or LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param lView The view where LView or LContainer should be added\n * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header\n * @param lViewOrLContainer The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\n function addToViewTree(lView, lViewOrLContainer) {\n // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer\n // to\n // the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n // of\n // order, the change detection will run out of order, as the act of retrieving the the\n // LContainer\n // from the RNode is what adds it to the queue.\n if (lView[CHILD_HEAD]) {\n lView[CHILD_TAIL][NEXT] = lViewOrLContainer;\n }\n else {\n lView[CHILD_HEAD] = lViewOrLContainer;\n }\n lView[CHILD_TAIL] = lViewOrLContainer;\n return lViewOrLContainer;\n }\n ///////////////////////////////\n //// Change detection\n ///////////////////////////////\n /**\n * Marks current view and all ancestors dirty.\n *\n * Returns the root view because it is found as a byproduct of marking the view tree\n * dirty, and can be used by methods that consume markViewDirty() to easily schedule\n * change detection. Otherwise, such methods would need to traverse up the view tree\n * an additional time to get the root view and schedule a tick on it.\n *\n * @param lView The starting LView to mark dirty\n * @returns the root LView\n */\n function markViewDirty(lView) {\n while (lView) {\n lView[FLAGS] |= 64 /* Dirty */;\n var parent_1 = getLViewParent(lView);\n // Stop traversing up as soon as you find a root view that wasn't attached to any container\n if (isRootView(lView) && !parent_1) {\n return lView;\n }\n // continue otherwise\n lView = parent_1;\n }\n return null;\n }\n /**\n * Used to schedule change detection on the whole application.\n *\n * Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run.\n * It is usually called indirectly by calling `markDirty` when the view needs to be\n * re-rendered.\n *\n * Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple\n * `scheduleTick` requests. The scheduling function can be overridden in\n * `renderComponent`'s `scheduler` option.\n */\n function scheduleTick(rootContext, flags) {\n var nothingScheduled = rootContext.flags === 0 /* Empty */;\n rootContext.flags |= flags;\n if (nothingScheduled && rootContext.clean == _CLEAN_PROMISE) {\n var res_1;\n rootContext.clean = new Promise(function (r) { return res_1 = r; });\n rootContext.scheduler(function () {\n if (rootContext.flags & 1 /* DetectChanges */) {\n rootContext.flags &= ~1 /* DetectChanges */;\n tickRootContext(rootContext);\n }\n if (rootContext.flags & 2 /* FlushPlayers */) {\n rootContext.flags &= ~2 /* FlushPlayers */;\n var playerHandler = rootContext.playerHandler;\n if (playerHandler) {\n playerHandler.flushPlayers();\n }\n }\n rootContext.clean = _CLEAN_PROMISE;\n res_1(null);\n });\n }\n }\n function tickRootContext(rootContext) {\n for (var i = 0; i < rootContext.components.length; i++) {\n var rootComponent = rootContext.components[i];\n renderComponentOrTemplate(readPatchedLView(rootComponent), rootComponent);\n }\n }\n function detectChangesInternal(view, context) {\n var rendererFactory = view[RENDERER_FACTORY];\n if (rendererFactory.begin)\n rendererFactory.begin();\n try {\n if (isCreationMode(view)) {\n checkView(view, context); // creation mode pass\n }\n checkView(view, context); // update mode pass\n }\n catch (error) {\n handleError(view, error);\n throw error;\n }\n finally {\n if (rendererFactory.end)\n rendererFactory.end();\n }\n }\n /**\n * Synchronously perform change detection on a root view and its components.\n *\n * @param lView The view which the change detection should be performed on.\n */\n function detectChangesInRootView(lView) {\n tickRootContext(lView[CONTEXT]);\n }\n function checkNoChangesInternal(view, context) {\n setCheckNoChangesMode(true);\n try {\n detectChangesInternal(view, context);\n }\n finally {\n setCheckNoChangesMode(false);\n }\n }\n /**\n * Checks the change detector on a root view and its components, and throws if any changes are\n * detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n *\n * @param lView The view which the change detection should be checked on.\n */\n function checkNoChangesInRootView(lView) {\n setCheckNoChangesMode(true);\n try {\n detectChangesInRootView(lView);\n }\n finally {\n setCheckNoChangesMode(false);\n }\n }\n /** Checks the view of the component provided. Does not gate on dirty checks or execute doCheck.\n */\n function checkView(hostView, component) {\n var hostTView = hostView[TVIEW];\n var oldView = enterView(hostView, hostView[T_HOST]);\n var templateFn = hostTView.template;\n var creationMode = isCreationMode(hostView);\n // Will become true if the `try` block executes with no errors.\n var safeToRunHooks = false;\n try {\n resetPreOrderHookFlags(hostView);\n creationMode && executeViewQueryFn(1 /* Create */, hostTView, component);\n executeTemplate(hostView, templateFn, getRenderFlags(hostView), component);\n refreshDescendantViews(hostView);\n // Only check view queries again in creation mode if there are static view queries\n if (!creationMode || hostTView.staticViewQueries) {\n executeViewQueryFn(2 /* Update */, hostTView, component);\n }\n safeToRunHooks = true;\n }\n finally {\n leaveView(oldView, safeToRunHooks);\n }\n }\n function executeViewQueryFn(flags, tView, component) {\n var viewQuery = tView.viewQuery;\n if (viewQuery) {\n setCurrentQueryIndex(tView.viewQueryStartIndex);\n viewQuery(flags, component);\n }\n }\n ///////////////////////////////\n //// Bindings & interpolations\n ///////////////////////////////\n /**\n * Creates binding metadata for a particular binding and stores it in\n * TView.data. These are generated in order to support DebugElement.properties.\n *\n * Each binding / interpolation will have one (including attribute bindings)\n * because at the time of binding, we don't know to which instruction the binding\n * belongs. It is always stored in TView.data at the index of the last binding\n * value in LView (e.g. for interpolation8, it would be stored at the index of\n * the 8th value).\n *\n * @param lView The LView that contains the current binding index.\n * @param prefix The static prefix string\n * @param suffix The static suffix string\n *\n * @returns Newly created binding metadata string for this binding or null\n */\n function storeBindingMetadata(lView, prefix, suffix) {\n if (prefix === void 0) { prefix = ''; }\n if (suffix === void 0) { suffix = ''; }\n var tData = lView[TVIEW].data;\n var lastBindingIndex = lView[BINDING_INDEX] - 1;\n var value = INTERPOLATION_DELIMITER + prefix + INTERPOLATION_DELIMITER + suffix;\n return tData[lastBindingIndex] == null ? (tData[lastBindingIndex] = value) : null;\n }\n var CLEAN_PROMISE = _CLEAN_PROMISE;\n function initializeTNodeInputs(tNode) {\n // If tNode.inputs is undefined, a listener has created outputs, but inputs haven't\n // yet been checked.\n if (tNode.inputs === undefined) {\n // mark inputs as checked\n tNode.inputs = generatePropertyAliases(tNode, 0 /* Input */);\n }\n return tNode.inputs;\n }\n function getCleanup(view) {\n // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n return view[CLEANUP] || (view[CLEANUP] = ngDevMode ? new LCleanup() : []);\n }\n function getTViewCleanup(view) {\n return view[TVIEW].cleanup || (view[TVIEW].cleanup = ngDevMode ? new TCleanup() : []);\n }\n /**\n * There are cases where the sub component's renderer needs to be included\n * instead of the current renderer (see the componentSyntheticHost* instructions).\n */\n function loadComponentRenderer(tNode, lView) {\n var componentLView = lView[tNode.index];\n return componentLView[RENDERER];\n }\n /** Handles an error thrown in an LView. */\n function handleError(lView, error) {\n var injector = lView[INJECTOR$1];\n var errorHandler = injector ? injector.get(ErrorHandler, null) : null;\n errorHandler && errorHandler.handleError(error);\n }\n /**\n * Set the inputs of directives at the current node to corresponding value.\n *\n * @param lView the `LView` which contains the directives.\n * @param inputs mapping between the public \"input\" name and privately-known,\n * possibly minified, property names to write to.\n * @param value Value to set.\n */\n function setInputsForProperty(lView, inputs, value) {\n var tView = lView[TVIEW];\n for (var i = 0; i < inputs.length;) {\n var index = inputs[i++];\n var publicName = inputs[i++];\n var privateName = inputs[i++];\n var instance = lView[index];\n ngDevMode && assertDataInRange(lView, index);\n var def = tView.data[index];\n var setInput = def.setInput;\n if (setInput) {\n def.setInput(instance, value, publicName, privateName);\n }\n else {\n instance[privateName] = value;\n }\n }\n }\n /**\n * Updates a text binding at a given index in a given LView.\n */\n function textBindingInternal(lView, index, value) {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'value should not be NO_CHANGE');\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n var element = getNativeByIndex(index, lView);\n ngDevMode && assertDefined(element, 'native element should exist');\n ngDevMode && ngDevMode.rendererSetText++;\n var renderer = lView[RENDERER];\n isProceduralRenderer(renderer) ? renderer.setValue(element, value) : element.textContent = value;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function applyOnCreateInstructions(tNode) {\n // there may be some instructions that need to run in a specific\n // order because the CREATE block in a directive runs before the\n // CREATE block in a template. To work around this instructions\n // can get access to the function array below and defer any code\n // to run after the element is created.\n var fns;\n if (fns = tNode.onElementCreationFns) {\n for (var i = 0; i < fns.length; i++) {\n fns[i]();\n }\n tNode.onElementCreationFns = null;\n }\n }\n /**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the TNode of the parent injector is found.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @param startTNode The TNode instance of the starting element\n * @returns The TNode of the parent injector\n */\n function getParentInjectorTNode(location, startView, startTNode) {\n if (startTNode.parent && startTNode.parent.injectorIndex !== -1) {\n // view offset is 0\n var injectorIndex = startTNode.parent.injectorIndex;\n var parentTNode_1 = startTNode.parent;\n while (parentTNode_1.parent != null && injectorIndex == parentTNode_1.injectorIndex) {\n parentTNode_1 = parentTNode_1.parent;\n }\n return parentTNode_1;\n }\n var viewOffset = getParentInjectorViewOffset(location);\n // view offset is 1\n var parentView = startView;\n var parentTNode = startView[T_HOST];\n // view offset is superior to 1\n while (viewOffset > 1) {\n parentView = parentView[DECLARATION_VIEW];\n parentTNode = parentView[T_HOST];\n viewOffset--;\n }\n return parentTNode;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Allocates the necessary amount of slots for host vars.\n *\n * @param count Amount of vars to be allocated\n *\n * @codeGenApi\n */\n function ɵɵallocHostVars(count) {\n var lView = getLView();\n var tView = lView[TVIEW];\n if (!tView.firstTemplatePass)\n return;\n queueHostBindingForCheck(tView, getCurrentDirectiveDef(), count);\n prefillHostVars(tView, lView, count);\n }\n /**\n * Stores host binding fn and number of host vars so it will be queued for binding refresh during\n * CD.\n */\n function queueHostBindingForCheck(tView, def, hostVars) {\n ngDevMode &&\n assertEqual(tView.firstTemplatePass, true, 'Should only be called in first template pass.');\n var expando = tView.expandoInstructions;\n var length = expando.length;\n // Check whether a given `hostBindings` function already exists in expandoInstructions,\n // which can happen in case directive definition was extended from base definition (as a part of\n // the `InheritDefinitionFeature` logic). If we found the same `hostBindings` function in the\n // list, we just increase the number of host vars associated with that function, but do not add it\n // into the list again.\n if (length >= 2 && expando[length - 2] === def.hostBindings) {\n expando[length - 1] = expando[length - 1] + hostVars;\n }\n else {\n expando.push(def.hostBindings, hostVars);\n }\n }\n /**\n * On the first template pass, we need to reserve space for host binding values\n * after directives are matched (so all directives are saved, then bindings).\n * Because we are updating the blueprint, we only need to do this once.\n */\n function prefillHostVars(tView, lView, totalHostVars) {\n ngDevMode &&\n assertEqual(tView.firstTemplatePass, true, 'Should only be called in first template pass.');\n for (var i = 0; i < totalHostVars; i++) {\n lView.push(NO_CHANGE);\n tView.blueprint.push(NO_CHANGE);\n tView.data.push(null);\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var _symbolIterator = null;\n function getSymbolIterator() {\n if (!_symbolIterator) {\n var Symbol_1 = _global['Symbol'];\n if (Symbol_1 && Symbol_1.iterator) {\n _symbolIterator = Symbol_1.iterator;\n }\n else {\n // es6-shim specific logic\n var keys = Object.getOwnPropertyNames(Map.prototype);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (key !== 'entries' && key !== 'size' &&\n Map.prototype[key] === Map.prototype['entries']) {\n _symbolIterator = key;\n }\n }\n }\n }\n return _symbolIterator;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // JS has NaN !== NaN\n function looseIdentical(a, b) {\n return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function devModeEqual(a, b) {\n var isListLikeIterableA = isListLikeIterable(a);\n var isListLikeIterableB = isListLikeIterable(b);\n if (isListLikeIterableA && isListLikeIterableB) {\n return areIterablesEqual(a, b, devModeEqual);\n }\n else {\n var isAObject = a && (typeof a === 'object' || typeof a === 'function');\n var isBObject = b && (typeof b === 'object' || typeof b === 'function');\n if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n return true;\n }\n else {\n return looseIdentical(a, b);\n }\n }\n }\n /**\n * Indicates that the result of a {@link Pipe} transformation has changed even though the\n * reference has not changed.\n *\n * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value\n * is stored.\n *\n * Example:\n *\n * ```\n * if (this._latestValue === this._latestReturnedValue) {\n * return this._latestReturnedValue;\n * } else {\n * this._latestReturnedValue = this._latestValue;\n * return WrappedValue.wrap(this._latestValue); // this will force update\n * }\n * ```\n *\n * @publicApi\n */\n var WrappedValue = /** @class */ (function () {\n function WrappedValue(value) {\n this.wrapped = value;\n }\n /** Creates a wrapped value. */\n WrappedValue.wrap = function (value) { return new WrappedValue(value); };\n /**\n * Returns the underlying value of a wrapped value.\n * Returns the given `value` when it is not wrapped.\n **/\n WrappedValue.unwrap = function (value) { return WrappedValue.isWrapped(value) ? value.wrapped : value; };\n /** Returns true if `value` is a wrapped value. */\n WrappedValue.isWrapped = function (value) { return value instanceof WrappedValue; };\n return WrappedValue;\n }());\n function isListLikeIterable(obj) {\n if (!isJsObject(obj))\n return false;\n return Array.isArray(obj) ||\n (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop\n }\n function areIterablesEqual(a, b, comparator) {\n var iterator1 = a[getSymbolIterator()]();\n var iterator2 = b[getSymbolIterator()]();\n while (true) {\n var item1 = iterator1.next();\n var item2 = iterator2.next();\n if (item1.done && item2.done)\n return true;\n if (item1.done || item2.done)\n return false;\n if (!comparator(item1.value, item2.value))\n return false;\n }\n }\n function iterateListLike(obj, fn) {\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n fn(obj[i]);\n }\n }\n else {\n var iterator = obj[getSymbolIterator()]();\n var item = void 0;\n while (!((item = iterator.next()).done)) {\n fn(item.value);\n }\n }\n }\n function isJsObject(o) {\n return o !== null && (typeof o === 'function' || typeof o === 'object');\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // TODO(misko): consider inlining\n /** Updates binding and returns the value. */\n function updateBinding(lView, bindingIndex, value) {\n return lView[bindingIndex] = value;\n }\n /** Gets the current binding value. */\n function getBinding(lView, bindingIndex) {\n ngDevMode && assertDataInRange(lView, bindingIndex);\n ngDevMode &&\n assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n return lView[bindingIndex];\n }\n /** Updates binding if changed, then returns whether it was updated. */\n function bindingUpdated(lView, bindingIndex, value) {\n ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n ngDevMode &&\n assertLessThan(bindingIndex, lView.length, \"Slot should have been initialized to NO_CHANGE\");\n var oldValue = lView[bindingIndex];\n if (isDifferent(oldValue, value)) {\n if (ngDevMode && getCheckNoChangesMode()) {\n // View engine didn't report undefined values as changed on the first checkNoChanges pass\n // (before the change detection was run).\n var oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;\n if (!devModeEqual(oldValueToCompare, value)) {\n throwErrorIfNoChangesMode(oldValue === NO_CHANGE, oldValueToCompare, value);\n }\n }\n lView[bindingIndex] = value;\n return true;\n }\n return false;\n }\n /** Updates 2 bindings if changed, then returns whether either was updated. */\n function bindingUpdated2(lView, bindingIndex, exp1, exp2) {\n var different = bindingUpdated(lView, bindingIndex, exp1);\n return bindingUpdated(lView, bindingIndex + 1, exp2) || different;\n }\n /** Updates 3 bindings if changed, then returns whether any was updated. */\n function bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) {\n var different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated(lView, bindingIndex + 2, exp3) || different;\n }\n /** Updates 4 bindings if changed, then returns whether any was updated. */\n function bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) {\n var different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Update a property on a selected element.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @param nativeOnly Whether or not we should only set native properties and skip input check\n * (this is necessary for host property bindings)\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\n function ɵɵproperty(propName, value, sanitizer, nativeOnly) {\n var index = getSelectedIndex();\n ngDevMode && assertNotEqual(index, -1, 'selected index cannot be -1');\n var lView = getLView();\n var bindReconciledValue = bind(lView, value);\n if (bindReconciledValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, bindReconciledValue, sanitizer, nativeOnly);\n }\n return ɵɵproperty;\n }\n /**\n * Creates a single value binding.\n *\n * @param lView Current view\n * @param value Value to diff\n */\n function bind(lView, value) {\n var bindingIndex = lView[BINDING_INDEX]++;\n storeBindingMetadata(lView);\n return bindingUpdated(lView, bindingIndex, value) ? value : NO_CHANGE;\n }\n /**\n * Updates a synthetic host binding (e.g. `[@foo]`) on a component.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in\n * the component's renderer. Normally all host bindings are evaluated with the parent\n * component's renderer, but, in the case of animation @triggers, they need to be\n * evaluated with the sub component's renderer (because that's where the animation\n * triggers are defined).\n *\n * Do not use this instruction as a replacement for `elementProperty`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param index The index of the element to update in the data array\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @param nativeOnly Whether or not we should only set native properties and skip input check\n * (this is necessary for host property bindings)\n *\n * @codeGenApi\n */\n function ɵɵupdateSyntheticHostBinding(propName, value, sanitizer, nativeOnly) {\n var index = getSelectedIndex();\n var lView = getLView();\n // TODO(benlesh): remove bind call here.\n var bound = bind(lView, value);\n if (bound !== NO_CHANGE) {\n elementPropertyInternal(index, propName, bound, sanitizer, nativeOnly, loadComponentRenderer);\n }\n }\n\n /**\n * Updates the value of or removes a bound attribute on an Element.\n *\n * Used in the case of `[attr.title]=\"value\"`\n *\n * @param name name The name of the attribute.\n * @param value value The attribute is removed when value is `null` or `undefined`.\n * Otherwise the attribute value is set to the stringified value.\n * @param sanitizer An optional function used to sanitize the value.\n * @param namespace Optional namespace to use when setting the attribute.\n *\n * @codeGenApi\n */\n function ɵɵattribute(name, value, sanitizer, namespace) {\n var index = getSelectedIndex();\n var lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n var bound = bind(lView, value);\n if (bound !== NO_CHANGE) {\n elementAttributeInternal(index, name, bound, lView, sanitizer, namespace);\n }\n return ɵɵattribute;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Create interpolation bindings with a variable number of expressions.\n *\n * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.\n * Those are faster because there is no need to create an array of expressions and iterate over it.\n *\n * `values`:\n * - has static text at even indexes,\n * - has evaluated expressions at odd indexes.\n *\n * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n *\n * @codeGenApi\n */\n function ɵɵinterpolationV(values) {\n ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');\n ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');\n var isBindingUpdated = false;\n var lView = getLView();\n var tData = lView[TVIEW].data;\n var bindingIndex = lView[BINDING_INDEX];\n if (tData[bindingIndex] == null) {\n // 2 is the index of the first static interstitial value (ie. not prefix)\n for (var i = 2; i < values.length; i += 2) {\n tData[bindingIndex++] = values[i];\n }\n bindingIndex = lView[BINDING_INDEX];\n }\n for (var i = 1; i < values.length; i += 2) {\n // Check if bindings (odd indexes) have changed\n isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated;\n }\n lView[BINDING_INDEX] = bindingIndex;\n storeBindingMetadata(lView, values[0], values[values.length - 1]);\n if (!isBindingUpdated) {\n return NO_CHANGE;\n }\n // Build the updated content\n var content = values[0];\n for (var i = 1; i < values.length; i += 2) {\n content += renderStringify(values[i]) + values[i + 1];\n }\n return content;\n }\n /**\n * Creates an interpolation binding with 1 expression.\n *\n * @param prefix static value used for concatenation only.\n * @param v0 value checked for change.\n * @param suffix static value used for concatenation only.\n *\n * @codeGenApi\n */\n function ɵɵinterpolation1(prefix, v0, suffix) {\n var lView = getLView();\n var different = bindingUpdated(lView, lView[BINDING_INDEX]++, v0);\n storeBindingMetadata(lView, prefix, suffix);\n return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n }\n /**\n * Creates an interpolation binding with 2 expressions.\n *\n * @codeGenApi\n */\n function ɵɵinterpolation2(prefix, v0, i0, v1, suffix) {\n var lView = getLView();\n var bindingIndex = lView[BINDING_INDEX];\n var different = bindingUpdated2(lView, bindingIndex, v0, v1);\n lView[BINDING_INDEX] += 2;\n // Only set static strings the first time (data will be null subsequent runs).\n var data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n lView[TVIEW].data[bindingIndex] = i0;\n }\n return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;\n }\n /**\n * Creates an interpolation binding with 3 expressions.\n *\n * @codeGenApi\n */\n function ɵɵinterpolation3(prefix, v0, i0, v1, i1, v2, suffix) {\n var lView = getLView();\n var bindingIndex = lView[BINDING_INDEX];\n var different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);\n lView[BINDING_INDEX] += 3;\n // Only set static strings the first time (data will be null subsequent runs).\n var data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n var tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n }\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix :\n NO_CHANGE;\n }\n /**\n * Create an interpolation binding with 4 expressions.\n *\n * @codeGenApi\n */\n function ɵɵinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n var lView = getLView();\n var bindingIndex = lView[BINDING_INDEX];\n var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n lView[BINDING_INDEX] += 4;\n // Only set static strings the first time (data will be null subsequent runs).\n var data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n var tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n tData[bindingIndex + 2] = i2;\n }\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + suffix :\n NO_CHANGE;\n }\n /**\n * Creates an interpolation binding with 5 expressions.\n *\n * @codeGenApi\n */\n function ɵɵinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n var lView = getLView();\n var bindingIndex = lView[BINDING_INDEX];\n var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n lView[BINDING_INDEX] += 5;\n // Only set static strings the first time (data will be null subsequent runs).\n var data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n var tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n tData[bindingIndex + 2] = i2;\n tData[bindingIndex + 3] = i3;\n }\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + i3 + renderStringify(v4) + suffix :\n NO_CHANGE;\n }\n /**\n * Creates an interpolation binding with 6 expressions.\n *\n * @codeGenApi\n */\n function ɵɵinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n var lView = getLView();\n var bindingIndex = lView[BINDING_INDEX];\n var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;\n lView[BINDING_INDEX] += 6;\n // Only set static strings the first time (data will be null subsequent runs).\n var data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n var tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n tData[bindingIndex + 2] = i2;\n tData[bindingIndex + 3] = i3;\n tData[bindingIndex + 4] = i4;\n }\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + suffix :\n NO_CHANGE;\n }\n /**\n * Creates an interpolation binding with 7 expressions.\n *\n * @codeGenApi\n */\n function ɵɵinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n var lView = getLView();\n var bindingIndex = lView[BINDING_INDEX];\n var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n lView[BINDING_INDEX] += 7;\n // Only set static strings the first time (data will be null subsequent runs).\n var data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n var tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n tData[bindingIndex + 2] = i2;\n tData[bindingIndex + 3] = i3;\n tData[bindingIndex + 4] = i4;\n tData[bindingIndex + 5] = i5;\n }\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 +\n renderStringify(v6) + suffix :\n NO_CHANGE;\n }\n /**\n * Creates an interpolation binding with 8 expressions.\n *\n * @codeGenApi\n */\n function ɵɵinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n var lView = getLView();\n var bindingIndex = lView[BINDING_INDEX];\n var different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;\n lView[BINDING_INDEX] += 8;\n // Only set static strings the first time (data will be null subsequent runs).\n var data = storeBindingMetadata(lView, prefix, suffix);\n if (data) {\n var tData = lView[TVIEW].data;\n tData[bindingIndex] = i0;\n tData[bindingIndex + 1] = i1;\n tData[bindingIndex + 2] = i2;\n tData[bindingIndex + 3] = i3;\n tData[bindingIndex + 4] = i4;\n tData[bindingIndex + 5] = i5;\n tData[bindingIndex + 6] = i6;\n }\n return different ?\n prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + i5 +\n renderStringify(v6) + i6 + renderStringify(v7) + suffix :\n NO_CHANGE;\n }\n\n /**\n *\n * Update an interpolated attribute on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolate1(attrName, prefix, v0, suffix, sanitizer, namespace) {\n var index = getSelectedIndex();\n var lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n var interpolatedValue = ɵɵinterpolation1(prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate1;\n }\n /**\n *\n * Update an interpolated attribute on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolate2(attrName, prefix, v0, i0, v1, suffix, sanitizer, namespace) {\n var index = getSelectedIndex();\n var lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n var interpolatedValue = ɵɵinterpolation2(prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate2;\n }\n /**\n *\n * Update an interpolated attribute on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolate3(attrName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer, namespace) {\n var index = getSelectedIndex();\n var lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n var interpolatedValue = ɵɵinterpolation3(prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate3;\n }\n /**\n *\n * Update an interpolated attribute on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolate4(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer, namespace) {\n var index = getSelectedIndex();\n var lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n var interpolatedValue = ɵɵinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate4;\n }\n /**\n *\n * Update an interpolated attribute on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolate5(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer, namespace) {\n var index = getSelectedIndex();\n var lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n var interpolatedValue = ɵɵinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate5;\n }\n /**\n *\n * Update an interpolated attribute on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolate6(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer, namespace) {\n var index = getSelectedIndex();\n var lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n var interpolatedValue = ɵɵinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate6;\n }\n /**\n *\n * Update an interpolated attribute on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolate7(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer, namespace) {\n var index = getSelectedIndex();\n var lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n var interpolatedValue = ɵɵinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate7;\n }\n /**\n *\n * Update an interpolated attribute on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolate8(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer, namespace) {\n var index = getSelectedIndex();\n var lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n var interpolatedValue = ɵɵinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolatedValue, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolate8;\n }\n /**\n * Update an interpolated attribute on an element with 8 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 7.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * @param attrName The name of the attribute to update.\n * @param values The a collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵattributeInterpolateV(attrName, values, sanitizer, namespace) {\n var index = getSelectedIndex();\n var lView = getLView();\n // TODO(FW-1340): Refactor to remove the use of other instructions here.\n var interpolated = ɵɵinterpolationV(values);\n if (interpolated !== NO_CHANGE) {\n elementAttributeInternal(index, attrName, interpolated, lView, sanitizer, namespace);\n }\n return ɵɵattributeInterpolateV;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Synchronously perform change detection on a component (and possibly its sub-components).\n *\n * This function triggers change detection in a synchronous way on a component. There should\n * be very little reason to call this function directly since a preferred way to do change\n * detection is to {@link markDirty} the component and wait for the scheduler to call this method\n * at some future point in time. This is because a single user action often results in many\n * components being invalidated and calling change detection on each component synchronously\n * would be inefficient. It is better to wait until all components are marked as dirty and\n * then perform single change detection across all of the components\n *\n * @param component The component which the change detection should be performed on.\n */\n function detectChanges(component) {\n var view = getComponentViewByInstance(component);\n detectChangesInternal(view, component);\n }\n /**\n * Mark the component as dirty (needing change detection).\n *\n * Marking a component dirty will schedule a change detection on this\n * component at some point in the future. Marking an already dirty\n * component as dirty is a noop. Only one outstanding change detection\n * can be scheduled per component tree. (Two components bootstrapped with\n * separate `renderComponent` will have separate schedulers)\n *\n * When the root component is bootstrapped with `renderComponent`, a scheduler\n * can be provided.\n *\n * @param component Component to mark as dirty.\n *\n * @publicApi\n */\n function markDirty(component) {\n ngDevMode && assertDefined(component, 'component');\n var rootView = markViewDirty(getComponentViewByInstance(component));\n ngDevMode && assertDefined(rootView[CONTEXT], 'rootContext should be defined');\n scheduleTick(rootView[CONTEXT], 1 /* DetectChanges */);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function getLContainer(tNode, embeddedView) {\n ngDevMode && assertLView(embeddedView);\n var container = embeddedView[PARENT];\n if (tNode.index === -1) {\n // This is a dynamically created view inside a dynamic container.\n // The parent isn't an LContainer if the embedded view hasn't been attached yet.\n return isLContainer(container) ? container : null;\n }\n else {\n ngDevMode && assertLContainer(container);\n // This is a inline view node (e.g. embeddedViewStart)\n return container;\n }\n }\n /**\n * Retrieves render parent for a given view.\n * Might be null if a view is not yet attached to any container.\n */\n function getContainerRenderParent(tViewNode, view) {\n var container = getLContainer(tViewNode, view);\n return container ? nativeParentNode(view[RENDERER], container[NATIVE]) : null;\n }\n /**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\n function executeActionOnElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) {\n ngDevMode && assertDefined(lNodeToHandle, '\\'lNodeToHandle\\' is undefined');\n var lContainer;\n var isComponent = false;\n // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is wrapped\n // in an array which needs to be unwrapped. We need to know if it is a component and if\n // it has LContainer so that we can process all of those cases appropriately.\n if (isLContainer(lNodeToHandle)) {\n lContainer = lNodeToHandle;\n }\n else if (isLView(lNodeToHandle)) {\n isComponent = true;\n ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');\n lNodeToHandle = lNodeToHandle[HOST];\n }\n var rNode = unwrapRNode(lNodeToHandle);\n ngDevMode && assertDomNode(rNode);\n if (action === 0 /* Insert */) {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null);\n }\n else if (action === 1 /* Detach */) {\n nativeRemoveNode(renderer, rNode, isComponent);\n }\n else if (action === 2 /* Destroy */) {\n ngDevMode && ngDevMode.rendererDestroyNode++;\n renderer.destroyNode(rNode);\n }\n if (lContainer != null) {\n executeActionOnContainer(renderer, action, lContainer, parent, beforeNode);\n }\n }\n function createTextNode(value, renderer) {\n return isProceduralRenderer(renderer) ? renderer.createText(renderStringify(value)) :\n renderer.createTextNode(renderStringify(value));\n }\n function addRemoveViewFromContainer(lView, insertMode, beforeNode) {\n var renderParent = getContainerRenderParent(lView[TVIEW].node, lView);\n ngDevMode && assertNodeType(lView[TVIEW].node, 2 /* View */);\n if (renderParent) {\n var renderer = lView[RENDERER];\n var action = insertMode ? 0 /* Insert */ : 1 /* Detach */;\n executeActionOnView(renderer, action, lView, renderParent, beforeNode);\n }\n }\n /**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param lView the `LView` to be detached.\n */\n function renderDetachView(lView) {\n executeActionOnView(lView[RENDERER], 1 /* Detach */, lView, null, null);\n }\n /**\n * Traverses down and up the tree of views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n * - Because it's used for onDestroy calls, it needs to be bottom-up.\n * - Must process containers instead of their views to avoid splicing\n * when views are destroyed and re-added.\n * - Using a while loop because it's faster than recursion\n * - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n * @param rootView The view to destroy\n */\n function destroyViewTree(rootView) {\n // If the view has no children, we can clean it up and return early.\n var lViewOrLContainer = rootView[CHILD_HEAD];\n if (!lViewOrLContainer) {\n return cleanUpView(rootView);\n }\n while (lViewOrLContainer) {\n var next = null;\n if (isLView(lViewOrLContainer)) {\n // If LView, traverse down to child.\n next = lViewOrLContainer[CHILD_HEAD];\n }\n else {\n ngDevMode && assertLContainer(lViewOrLContainer);\n // If container, traverse down to its first LView.\n var firstView = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n if (firstView)\n next = firstView;\n }\n if (!next) {\n // Only clean up view when moving to the side or up, as destroy hooks\n // should be called in order from the bottom up.\n while (lViewOrLContainer && !lViewOrLContainer[NEXT] && lViewOrLContainer !== rootView) {\n cleanUpView(lViewOrLContainer);\n lViewOrLContainer = getParentState(lViewOrLContainer, rootView);\n }\n cleanUpView(lViewOrLContainer || rootView);\n next = lViewOrLContainer && lViewOrLContainer[NEXT];\n }\n lViewOrLContainer = next;\n }\n }\n /**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param lView The view to insert\n * @param lContainer The container into which the view should be inserted\n * @param index Which index in the container to insert the child view into\n */\n function insertView(lView, lContainer, index) {\n ngDevMode && assertLView(lView);\n ngDevMode && assertLContainer(lContainer);\n var indexInContainer = CONTAINER_HEADER_OFFSET + index;\n var containerLength = lContainer.length;\n if (index > 0) {\n // This is a new view, we need to add it to the children.\n lContainer[indexInContainer - 1][NEXT] = lView;\n }\n if (index < containerLength - CONTAINER_HEADER_OFFSET) {\n lView[NEXT] = lContainer[indexInContainer];\n lContainer.splice(CONTAINER_HEADER_OFFSET + index, 0, lView);\n }\n else {\n lContainer.push(lView);\n lView[NEXT] = null;\n }\n lView[PARENT] = lContainer;\n // Notify query that a new view has been added\n if (lView[QUERIES]) {\n lView[QUERIES].insertView(index);\n }\n // Sets the attached flag\n lView[FLAGS] |= 128 /* Attached */;\n }\n /**\n * Detaches a view from a container.\n *\n * This method splices the view from the container's array of active views. It also\n * removes the view's elements from the DOM.\n *\n * @param lContainer The container from which to detach a view\n * @param removeIndex The index of the view to detach\n * @returns Detached LView instance.\n */\n function detachView(lContainer, removeIndex) {\n if (lContainer.length <= CONTAINER_HEADER_OFFSET)\n return;\n var indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n var viewToDetach = lContainer[indexInContainer];\n if (viewToDetach) {\n if (removeIndex > 0) {\n lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT];\n }\n lContainer.splice(CONTAINER_HEADER_OFFSET + removeIndex, 1);\n addRemoveViewFromContainer(viewToDetach, false);\n if ((viewToDetach[FLAGS] & 128 /* Attached */) &&\n !(viewToDetach[FLAGS] & 256 /* Destroyed */) && viewToDetach[QUERIES]) {\n viewToDetach[QUERIES].removeView();\n }\n viewToDetach[PARENT] = null;\n viewToDetach[NEXT] = null;\n // Unsets the attached flag\n viewToDetach[FLAGS] &= ~128 /* Attached */;\n }\n return viewToDetach;\n }\n /**\n * Removes a view from a container, i.e. detaches it and then destroys the underlying LView.\n *\n * @param lContainer The container from which to remove a view\n * @param removeIndex The index of the view to remove\n */\n function removeView(lContainer, removeIndex) {\n var detachedView = detachView(lContainer, removeIndex);\n detachedView && destroyLView(detachedView);\n }\n /**\n * A standalone function which destroys an LView,\n * conducting cleanup (e.g. removing listeners, calling onDestroys).\n *\n * @param lView The view to be destroyed.\n */\n function destroyLView(lView) {\n if (!(lView[FLAGS] & 256 /* Destroyed */)) {\n var renderer = lView[RENDERER];\n if (isProceduralRenderer(renderer) && renderer.destroyNode) {\n executeActionOnView(renderer, 2 /* Destroy */, lView, null, null);\n }\n destroyViewTree(lView);\n }\n }\n /**\n * Determines which LViewOrLContainer to jump to when traversing back up the\n * tree in destroyViewTree.\n *\n * Normally, the view's parent LView should be checked, but in the case of\n * embedded views, the container (which is the view node's parent, but not the\n * LView's parent) needs to be checked for a possible next property.\n *\n * @param lViewOrLContainer The LViewOrLContainer for which we need a parent state\n * @param rootView The rootView, so we don't propagate too far up the view tree\n * @returns The correct parent LViewOrLContainer\n */\n function getParentState(lViewOrLContainer, rootView) {\n var tNode;\n if (isLView(lViewOrLContainer) && (tNode = lViewOrLContainer[T_HOST]) &&\n tNode.type === 2 /* View */) {\n // if it's an embedded view, the state needs to go up to the container, in case the\n // container has a next\n return getLContainer(tNode, lViewOrLContainer);\n }\n else {\n // otherwise, use parent view for containers or component views\n return lViewOrLContainer[PARENT] === rootView ? null : lViewOrLContainer[PARENT];\n }\n }\n /**\n * Calls onDestroys hooks for all directives and pipes in a given view and then removes all\n * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks\n * can be propagated to @Output listeners.\n *\n * @param view The LView to clean up\n */\n function cleanUpView(view) {\n if (isLView(view) && !(view[FLAGS] & 256 /* Destroyed */)) {\n // Usually the Attached flag is removed when the view is detached from its parent, however\n // if it's a root view, the flag won't be unset hence why we're also removing on destroy.\n view[FLAGS] &= ~128 /* Attached */;\n // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook\n // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If\n // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop.\n // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is\n // really more of an \"afterDestroy\" hook if you think about it.\n view[FLAGS] |= 256 /* Destroyed */;\n executeOnDestroys(view);\n removeListeners(view);\n var hostTNode = view[T_HOST];\n // For component views only, the local renderer is destroyed as clean up time.\n if (hostTNode && hostTNode.type === 3 /* Element */ && isProceduralRenderer(view[RENDERER])) {\n ngDevMode && ngDevMode.rendererDestroy++;\n view[RENDERER].destroy();\n }\n // For embedded views still attached to a container: remove query result from this view.\n if (viewAttachedToContainer(view) && view[QUERIES]) {\n view[QUERIES].removeView();\n }\n }\n }\n /** Removes listeners and unsubscribes from output subscriptions */\n function removeListeners(lView) {\n var tCleanup = lView[TVIEW].cleanup;\n if (tCleanup !== null) {\n var lCleanup = lView[CLEANUP];\n for (var i = 0; i < tCleanup.length - 1; i += 2) {\n if (typeof tCleanup[i] === 'string') {\n // This is a native DOM listener\n var idxOrTargetGetter = tCleanup[i + 1];\n var target = typeof idxOrTargetGetter === 'function' ?\n idxOrTargetGetter(lView) :\n unwrapRNode(lView[idxOrTargetGetter]);\n var listener = lCleanup[tCleanup[i + 2]];\n var useCaptureOrSubIdx = tCleanup[i + 3];\n if (typeof useCaptureOrSubIdx === 'boolean') {\n // native DOM listener registered with Renderer3\n target.removeEventListener(tCleanup[i], listener, useCaptureOrSubIdx);\n }\n else {\n if (useCaptureOrSubIdx >= 0) {\n // unregister\n lCleanup[useCaptureOrSubIdx]();\n }\n else {\n // Subscription\n lCleanup[-useCaptureOrSubIdx].unsubscribe();\n }\n }\n i += 2;\n }\n else {\n // This is a cleanup function that is grouped with the index of its context\n var context = lCleanup[tCleanup[i + 1]];\n tCleanup[i].call(context);\n }\n }\n lView[CLEANUP] = null;\n }\n }\n /** Calls onDestroy hooks for this view */\n function executeOnDestroys(view) {\n var tView = view[TVIEW];\n var destroyHooks;\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n for (var i = 0; i < destroyHooks.length; i += 2) {\n var context = view[destroyHooks[i]];\n // Only call the destroy hook if the context has been requested.\n if (!(context instanceof NodeInjectorFactory)) {\n destroyHooks[i + 1].call(context);\n }\n }\n }\n }\n /**\n * Returns a native element if a node can be inserted into the given parent.\n *\n * There are two reasons why we may not be able to insert a element immediately.\n * - Projection: When creating a child content element of a component, we have to skip the\n * insertion because the content of a component will be projected.\n * `<component><content>delayed due to projection</content></component>`\n * - Parent container is disconnected: This can happen when we are inserting a view into\n * parent container, which itself is disconnected. For example the parent container is part\n * of a View which has not be inserted or is made for projection but has not been inserted\n * into destination.\n */\n function getRenderParent(tNode, currentView) {\n // Nodes of the top-most view can be inserted eagerly.\n if (isRootView(currentView)) {\n return nativeParentNode(currentView[RENDERER], getNativeByTNode(tNode, currentView));\n }\n // Skip over element and ICU containers as those are represented by a comment node and\n // can't be used as a render parent.\n var parent = getHighestElementOrICUContainer(tNode);\n var renderParent = parent.parent;\n // If the parent is null, then we are inserting across views: either into an embedded view or a\n // component view.\n if (renderParent == null) {\n var hostTNode = currentView[T_HOST];\n if (hostTNode.type === 2 /* View */) {\n // We are inserting a root element of an embedded view We might delay insertion of children\n // for a given view if it is disconnected. This might happen for 2 main reasons:\n // - view is not inserted into any container(view was created but not inserted yet)\n // - view is inserted into a container but the container itself is not inserted into the DOM\n // (container might be part of projection or child of a view that is not inserted yet).\n // In other words we can insert children of a given view if this view was inserted into a\n // container and the container itself has its render parent determined.\n return getContainerRenderParent(hostTNode, currentView);\n }\n else {\n // We are inserting a root element of the component view into the component host element and\n // it should always be eager.\n return getHostNative(currentView);\n }\n }\n else {\n var isIcuCase = parent && parent.type === 5 /* IcuContainer */;\n // If the parent of this node is an ICU container, then it is represented by comment node and we\n // need to use it as an anchor. If it is projected then its direct parent node is the renderer.\n if (isIcuCase && parent.flags & 2 /* isProjected */) {\n return getNativeByTNode(parent, currentView).parentNode;\n }\n ngDevMode && assertNodeType(renderParent, 3 /* Element */);\n if (renderParent.flags & 1 /* isComponent */ && !isIcuCase) {\n var tData = currentView[TVIEW].data;\n var tNode_1 = tData[renderParent.index];\n var encapsulation = tData[tNode_1.directiveStart].encapsulation;\n // We've got a parent which is an element in the current view. We just need to verify if the\n // parent element is not a component. Component's content nodes are not inserted immediately\n // because they will be projected, and so doing insert at this point would be wasteful.\n // Since the projection would then move it to its final destination. Note that we can't\n // make this assumption when using the Shadow DOM, because the native projection placeholders\n // (<content> or <slot>) have to be in place as elements are being inserted.\n if (encapsulation !== exports.ViewEncapsulation.ShadowDom &&\n encapsulation !== exports.ViewEncapsulation.Native) {\n return null;\n }\n }\n return getNativeByTNode(renderParent, currentView);\n }\n }\n /**\n * Gets the native host element for a given view. Will return null if the current view does not have\n * a host element.\n */\n function getHostNative(currentView) {\n ngDevMode && assertLView(currentView);\n var hostTNode = currentView[T_HOST];\n return hostTNode && hostTNode.type === 3 /* Element */ ?\n getNativeByTNode(hostTNode, getLViewParent(currentView)) :\n null;\n }\n /**\n * Inserts a native node before another native node for a given parent using {@link Renderer3}.\n * This is a utility function that can be used when native nodes were determined - it abstracts an\n * actual renderer being used.\n */\n function nativeInsertBefore(renderer, parent, child, beforeNode) {\n ngDevMode && ngDevMode.rendererInsertBefore++;\n if (isProceduralRenderer(renderer)) {\n renderer.insertBefore(parent, child, beforeNode);\n }\n else {\n parent.insertBefore(child, beforeNode, true);\n }\n }\n function nativeAppendChild(renderer, parent, child) {\n ngDevMode && ngDevMode.rendererAppendChild++;\n if (isProceduralRenderer(renderer)) {\n renderer.appendChild(parent, child);\n }\n else {\n parent.appendChild(child);\n }\n }\n function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode) {\n if (beforeNode !== null) {\n nativeInsertBefore(renderer, parent, child, beforeNode);\n }\n else {\n nativeAppendChild(renderer, parent, child);\n }\n }\n /** Removes a node from the DOM given its native parent. */\n function nativeRemoveChild(renderer, parent, child, isHostElement) {\n if (isProceduralRenderer(renderer)) {\n renderer.removeChild(parent, child, isHostElement);\n }\n else {\n parent.removeChild(child);\n }\n }\n /**\n * Returns a native parent of a given native node.\n */\n function nativeParentNode(renderer, node) {\n return (isProceduralRenderer(renderer) ? renderer.parentNode(node) : node.parentNode);\n }\n /**\n * Returns a native sibling of a given native node.\n */\n function nativeNextSibling(renderer, node) {\n return isProceduralRenderer(renderer) ? renderer.nextSibling(node) : node.nextSibling;\n }\n /**\n * Finds a native \"anchor\" node for cases where we can't append a native child directly\n * (`appendChild`) and need to use a reference (anchor) node for the `insertBefore` operation.\n * @param parentTNode\n * @param lView\n */\n function getNativeAnchorNode(parentTNode, lView) {\n if (parentTNode.type === 2 /* View */) {\n var lContainer = getLContainer(parentTNode, lView);\n var index = lContainer.indexOf(lView, CONTAINER_HEADER_OFFSET) - CONTAINER_HEADER_OFFSET;\n return getBeforeNodeForView(index, lContainer);\n }\n else if (parentTNode.type === 4 /* ElementContainer */ ||\n parentTNode.type === 5 /* IcuContainer */) {\n return getNativeByTNode(parentTNode, lView);\n }\n return null;\n }\n /**\n * Appends the `child` native node (or a collection of nodes) to the `parent`.\n *\n * The element insertion might be delayed {@link canInsertNativeNode}.\n *\n * @param childEl The native child (or children) that should be appended\n * @param childTNode The TNode of the child element\n * @param currentView The current LView\n * @returns Whether or not the child was appended\n */\n function appendChild(childEl, childTNode, currentView) {\n var e_1, _a;\n var renderParent = getRenderParent(childTNode, currentView);\n if (renderParent != null) {\n var renderer = currentView[RENDERER];\n var parentTNode = childTNode.parent || currentView[T_HOST];\n var anchorNode = getNativeAnchorNode(parentTNode, currentView);\n if (Array.isArray(childEl)) {\n try {\n for (var childEl_1 = __values(childEl), childEl_1_1 = childEl_1.next(); !childEl_1_1.done; childEl_1_1 = childEl_1.next()) {\n var nativeNode = childEl_1_1.value;\n nativeAppendOrInsertBefore(renderer, renderParent, nativeNode, anchorNode);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (childEl_1_1 && !childEl_1_1.done && (_a = childEl_1.return)) _a.call(childEl_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else {\n nativeAppendOrInsertBefore(renderer, renderParent, childEl, anchorNode);\n }\n }\n }\n /**\n * Gets the top-level element or an ICU container if those containers are nested.\n *\n * @param tNode The starting TNode for which we should skip element and ICU containers\n * @returns The TNode of the highest level ICU container or element container\n */\n function getHighestElementOrICUContainer(tNode) {\n while (tNode.parent != null && (tNode.parent.type === 4 /* ElementContainer */ ||\n tNode.parent.type === 5 /* IcuContainer */)) {\n tNode = tNode.parent;\n }\n return tNode;\n }\n function getBeforeNodeForView(viewIndexInContainer, lContainer) {\n var nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n if (nextViewIndex < lContainer.length) {\n var lView = lContainer[nextViewIndex];\n ngDevMode && assertDefined(lView[T_HOST], 'Missing Host TNode');\n var tViewNodeChild = lView[T_HOST].child;\n return tViewNodeChild !== null ? getNativeByTNode(tViewNodeChild, lView) : lContainer[NATIVE];\n }\n else {\n return lContainer[NATIVE];\n }\n }\n /**\n * Removes a native node itself using a given renderer. To remove the node we are looking up its\n * parent from the native tree as not all platforms / browsers support the equivalent of\n * node.remove().\n *\n * @param renderer A renderer to be used\n * @param rNode The native node that should be removed\n * @param isHostElement A flag indicating if a node to be removed is a host of a component.\n */\n function nativeRemoveNode(renderer, rNode, isHostElement) {\n var nativeParent = nativeParentNode(renderer, rNode);\n if (nativeParent) {\n nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);\n }\n }\n /**\n * Appends nodes to a target projection place. Nodes to insert were previously re-distribution and\n * stored on a component host level.\n * @param lView A LView where nodes are inserted (target LView)\n * @param tProjectionNode A projection node where previously re-distribution should be appended\n * (target insertion place)\n * @param selectorIndex A bucket from where nodes to project should be taken\n * @param componentView A where projectable nodes were initially created (source view)\n */\n function appendProjectedNodes(lView, tProjectionNode, selectorIndex, componentView) {\n var projectedView = componentView[PARENT];\n var componentNode = componentView[T_HOST];\n var nodeToProject = componentNode.projection[selectorIndex];\n if (Array.isArray(nodeToProject)) {\n appendChild(nodeToProject, tProjectionNode, lView);\n }\n else {\n while (nodeToProject) {\n if (!(nodeToProject.flags & 32 /* isDetached */)) {\n if (nodeToProject.type === 1 /* Projection */) {\n appendProjectedNodes(lView, tProjectionNode, nodeToProject.projection, findComponentView(projectedView));\n }\n else {\n // This flag must be set now or we won't know that this node is projected\n // if the nodes are inserted into a container later.\n nodeToProject.flags |= 2 /* isProjected */;\n appendProjectedNode(nodeToProject, tProjectionNode, lView, projectedView);\n }\n }\n nodeToProject = nodeToProject.projectionNext;\n }\n }\n }\n /**\n * Loops over all children of a TNode container and appends them to the DOM\n *\n * @param ngContainerChildTNode The first child of the TNode container\n * @param tProjectionNode The projection (ng-content) TNode\n * @param currentView Current LView\n * @param projectionView Projection view (view above current)\n */\n function appendProjectedChildren(ngContainerChildTNode, tProjectionNode, currentView, projectionView) {\n while (ngContainerChildTNode) {\n appendProjectedNode(ngContainerChildTNode, tProjectionNode, currentView, projectionView);\n ngContainerChildTNode = ngContainerChildTNode.next;\n }\n }\n /**\n * Appends a projected node to the DOM, or in the case of a projected container,\n * appends the nodes from all of the container's active views to the DOM.\n *\n * @param projectedTNode The TNode to be projected\n * @param tProjectionNode The projection (ng-content) TNode\n * @param currentView Current LView\n * @param projectionView Projection view (view above current)\n */\n function appendProjectedNode(projectedTNode, tProjectionNode, currentView, projectionView) {\n var native = getNativeByTNode(projectedTNode, projectionView);\n appendChild(native, tProjectionNode, currentView);\n // the projected contents are processed while in the shadow view (which is the currentView)\n // therefore we need to extract the view where the host element lives since it's the\n // logical container of the content projected views\n attachPatchData(native, projectionView);\n var nodeOrContainer = projectionView[projectedTNode.index];\n if (projectedTNode.type === 0 /* Container */) {\n // The node we are adding is a container and we are adding it to an element which\n // is not a component (no more re-projection).\n // Alternatively a container is projected at the root of a component's template\n // and can't be re-projected (as not content of any component).\n // Assign the final projection location in those cases.\n for (var i = CONTAINER_HEADER_OFFSET; i < nodeOrContainer.length; i++) {\n addRemoveViewFromContainer(nodeOrContainer[i], true, nodeOrContainer[NATIVE]);\n }\n }\n else if (projectedTNode.type === 5 /* IcuContainer */) {\n // The node we are adding is an ICU container which is why we also need to project all the\n // children nodes that might have been created previously and are linked to this anchor\n var ngContainerChildTNode = projectedTNode.child;\n appendProjectedChildren(ngContainerChildTNode, ngContainerChildTNode, projectionView, projectionView);\n }\n else {\n if (projectedTNode.type === 4 /* ElementContainer */) {\n appendProjectedChildren(projectedTNode.child, tProjectionNode, currentView, projectionView);\n }\n if (isLContainer(nodeOrContainer)) {\n appendChild(nodeOrContainer[NATIVE], tProjectionNode, currentView);\n }\n }\n }\n /**\n * `executeActionOnView` performs an operation on the view as specified in `action` (insert, detach,\n * destroy)\n *\n * Inserting a view without projection or containers at top level is simple. Just iterate over the\n * root nodes of the View, and for each node perform the `action`.\n *\n * Things get more complicated with containers and projections. That is because coming across:\n * - Container: implies that we have to insert/remove/destroy the views of that container as well\n * which in turn can have their own Containers at the View roots.\n * - Projection: implies that we have to insert/remove/destroy the nodes of the projection. The\n * complication is that the nodes we are projecting can themselves have Containers\n * or other Projections.\n *\n * As you can see this is a very recursive problem. While the recursive implementation is not the\n * most efficient one, trying to unroll the nodes non-recursively results in very complex code that\n * is very hard (to maintain). We are sacrificing a bit of performance for readability using a\n * recursive implementation.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\n function executeActionOnView(renderer, action, lView, renderParent, beforeNode) {\n var tView = lView[TVIEW];\n ngDevMode && assertNodeType(tView.node, 2 /* View */);\n var viewRootTNode = tView.node.child;\n while (viewRootTNode !== null) {\n executeActionOnNode(renderer, action, lView, viewRootTNode, renderParent, beforeNode);\n viewRootTNode = viewRootTNode.next;\n }\n }\n /**\n * `executeActionOnProjection` performs an operation on the projection specified by `action`\n * (insert, detach, destroy).\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\n function executeActionOnProjection(renderer, action, lView, tProjectionNode, renderParent, beforeNode) {\n var componentLView = findComponentView(lView);\n var componentNode = componentLView[T_HOST];\n var nodeToProject = componentNode.projection[tProjectionNode.projection];\n if (Array.isArray(nodeToProject)) {\n for (var i = 0; i < nodeToProject.length; i++) {\n var rNode = nodeToProject[i];\n ngDevMode && assertDomNode(rNode);\n executeActionOnElementOrContainer(action, renderer, renderParent, rNode, beforeNode);\n }\n }\n else {\n var projectionTNode = nodeToProject;\n var projectedComponentLView = componentLView[PARENT];\n while (projectionTNode !== null) {\n executeActionOnNode(renderer, action, projectedComponentLView, projectionTNode, renderParent, beforeNode);\n projectionTNode = projectionTNode.projectionNext;\n }\n }\n }\n /**\n * `executeActionOnContainer` performs an operation on the container and its views as specified by\n * `action` (insert, detach, destroy)\n *\n * Inserting a Container is complicated by the fact that the container may have Views which\n * themselves have containers or projections.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lContainer The LContainer which needs to be inserted, detached, destroyed.\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\n function executeActionOnContainer(renderer, action, lContainer, renderParent, beforeNode) {\n ngDevMode && assertLContainer(lContainer);\n var anchor = lContainer[NATIVE]; // LContainer has its own before node.\n var native = unwrapRNode(lContainer);\n // An LContainer can be created dynamically on any node by injecting ViewContainerRef.\n // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor node\n // (comment in the DOM) that will be different from the LContainer's host node. In this particular\n // case we need to execute action on 2 nodes:\n // - container's host node (this is done in the executeNodeAction)\n // - container's host node (this is done here)\n if (anchor !== native) {\n executeActionOnElementOrContainer(action, renderer, renderParent, anchor, beforeNode);\n }\n for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n var lView = lContainer[i];\n executeActionOnView(renderer, action, lView, renderParent, anchor);\n }\n }\n /**\n * `executeActionOnElementContainer` performs an operation on the ng-container node and its child\n * nodes as specified by the `action` (insert, detach, destroy).\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param tElementContainerNode The TNode associated with the ElementContainer.\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\n function executeActionOnElementContainer(renderer, action, lView, tElementContainerNode, renderParent, beforeNode) {\n var node = lView[tElementContainerNode.index];\n executeActionOnElementOrContainer(action, renderer, renderParent, node, beforeNode);\n var childTNode = tElementContainerNode.child;\n while (childTNode) {\n executeActionOnNode(renderer, action, lView, childTNode, renderParent, beforeNode);\n childTNode = childTNode.next;\n }\n }\n function executeActionOnNode(renderer, action, lView, tNode, renderParent, beforeNode) {\n var elementContainerRootTNodeType = tNode.type;\n if (elementContainerRootTNodeType === 4 /* ElementContainer */) {\n executeActionOnElementContainer(renderer, action, lView, tNode, renderParent, beforeNode);\n }\n else if (elementContainerRootTNodeType === 1 /* Projection */) {\n executeActionOnProjection(renderer, action, lView, tNode, renderParent, beforeNode);\n }\n else {\n ngDevMode && assertNodeOfPossibleTypes(tNode, 3 /* Element */, 0 /* Container */);\n executeActionOnElementOrContainer(action, renderer, renderParent, lView[tNode.index], beforeNode);\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Creates an LContainer for inline views, e.g.\n *\n * % if (showing) {\n * <div></div>\n * % }\n *\n * @param index The index of the container in the data array\n *\n * @codeGenApi\n */\n function ɵɵcontainer(index) {\n var tNode = containerInternal(index, null, null);\n var lView = getLView();\n if (lView[TVIEW].firstTemplatePass) {\n tNode.tViews = [];\n }\n addTContainerToQueries(lView, tNode);\n setIsNotParent();\n }\n /**\n * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.\n *\n * <ng-template #foo>\n * <div></div>\n * </ng-template>\n *\n * @param index The index of the container in the data array\n * @param templateFn Inline template\n * @param consts The number of nodes, local refs, and pipes for this template\n * @param vars The number of bindings for this template\n * @param tagName The name of the container element, if applicable\n * @param attrs The attrs attached to the container, if applicable\n * @param localRefs A set of local reference bindings on the element.\n * @param localRefExtractor A function which extracts local-refs values from the template.\n * Defaults to the current element associated with the local-ref.\n *\n * @codeGenApi\n */\n function ɵɵtemplate(index, templateFn, consts, vars, tagName, attrs, localRefs, localRefExtractor) {\n var lView = getLView();\n var tView = lView[TVIEW];\n // TODO: consider a separate node type for templates\n var tContainerNode = containerInternal(index, tagName || null, attrs || null);\n if (tView.firstTemplatePass) {\n tContainerNode.tViews = createTView(-1, templateFn, consts, vars, tView.directiveRegistry, tView.pipeRegistry, null, null);\n }\n createDirectivesAndLocals(tView, lView, localRefs, localRefExtractor);\n addTContainerToQueries(lView, tContainerNode);\n attachPatchData(getNativeByTNode(tContainerNode, lView), lView);\n registerPostOrderHooks(tView, tContainerNode);\n setIsNotParent();\n }\n /**\n * Sets a container up to receive views.\n *\n * @param index The index of the container in the data array\n *\n * @codeGenApi\n */\n function ɵɵcontainerRefreshStart(index) {\n var lView = getLView();\n var tView = lView[TVIEW];\n var previousOrParentTNode = loadInternal(tView.data, index);\n ngDevMode && assertNodeType(previousOrParentTNode, 0 /* Container */);\n setPreviousOrParentTNode(previousOrParentTNode, true);\n lView[index + HEADER_OFFSET][ACTIVE_INDEX] = 0;\n // We need to execute init hooks here so ngOnInit hooks are called in top level views\n // before they are called in embedded views (for backwards compatibility).\n executePreOrderHooks(lView, tView, getCheckNoChangesMode(), undefined);\n }\n /**\n * Marks the end of the LContainer.\n *\n * Marking the end of LContainer is the time when to child views get inserted or removed.\n *\n * @codeGenApi\n */\n function ɵɵcontainerRefreshEnd() {\n var previousOrParentTNode = getPreviousOrParentTNode();\n if (getIsParent()) {\n setIsNotParent();\n }\n else {\n ngDevMode && assertNodeType(previousOrParentTNode, 2 /* View */);\n ngDevMode && assertHasParent(previousOrParentTNode);\n previousOrParentTNode = previousOrParentTNode.parent;\n setPreviousOrParentTNode(previousOrParentTNode, false);\n }\n ngDevMode && assertNodeType(previousOrParentTNode, 0 /* Container */);\n var lContainer = getLView()[previousOrParentTNode.index];\n var nextIndex = lContainer[ACTIVE_INDEX];\n // remove extra views at the end of the container\n while (nextIndex < lContainer.length - CONTAINER_HEADER_OFFSET) {\n removeView(lContainer, nextIndex);\n }\n }\n /**\n * Reporting a TContainer node queries is a 2-step process as we need to:\n * - check if the container node itself is matching (query might match a <ng-template> node);\n * - prepare room for nodes from views that might be created based on the TemplateRef linked to this\n * container.\n *\n * Those 2 operations need to happen in the specific order (match the container node itself, then\n * prepare space for nodes from views).\n */\n function addTContainerToQueries(lView, tContainerNode) {\n var queries = lView[QUERIES];\n if (queries) {\n var lContainer = lView[tContainerNode.index];\n if (lContainer[QUERIES]) {\n // Query container should only exist if it was created through a dynamic view\n // in a directive constructor. In this case, we must splice the template\n // matches in before the view matches to ensure query results in embedded views\n // don't clobber query results on the template node itself.\n queries.insertNodeBeforeViews(tContainerNode);\n }\n else {\n queries.addNode(tContainerNode);\n lContainer[QUERIES] = queries.container();\n }\n }\n }\n function containerInternal(index, tagName, attrs) {\n var lView = getLView();\n ngDevMode && assertEqual(lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex, 'container nodes should be created before any bindings');\n var adjustedIndex = index + HEADER_OFFSET;\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n ngDevMode && ngDevMode.rendererCreateComment++;\n var comment = lView[index + HEADER_OFFSET] =\n lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n var tNode = getOrCreateTNode(lView[TVIEW], lView[T_HOST], index, 0 /* Container */, tagName, attrs);\n var lContainer = lView[adjustedIndex] =\n createLContainer(lView[adjustedIndex], lView, comment, tNode);\n appendChild(comment, tNode, lView);\n // Containers are added to the current view tree instead of their embedded views\n // because views can be removed and re-inserted.\n addToViewTree(lView, lContainer);\n ngDevMode && assertNodeType(getPreviousOrParentTNode(), 0 /* Container */);\n return tNode;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /** Store a value in the `data` at a given `index`. */\n function store(index, value) {\n var lView = getLView();\n var tView = lView[TVIEW];\n // We don't store any static data for local variables, so the first time\n // we see the template, we should store as null to avoid a sparse array\n var adjustedIndex = index + HEADER_OFFSET;\n if (adjustedIndex >= tView.data.length) {\n tView.data[adjustedIndex] = null;\n tView.blueprint[adjustedIndex] = null;\n }\n lView[adjustedIndex] = value;\n }\n /**\n * Retrieves a local reference from the current contextViewData.\n *\n * If the reference to retrieve is in a parent view, this instruction is used in conjunction\n * with a nextContext() call, which walks up the tree and updates the contextViewData instance.\n *\n * @param index The index of the local ref in contextViewData.\n *\n * @codeGenApi\n */\n function ɵɵreference(index) {\n var contextLView = getContextLView();\n return loadInternal(contextLView, index);\n }\n /**\n * Retrieves a value from current `viewData`.\n *\n * @codeGenApi\n */\n function ɵɵload(index) {\n return loadInternal(getLView(), index);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function ɵɵdirectiveInject(token, flags) {\n if (flags === void 0) { flags = exports.InjectFlags.Default; }\n token = resolveForwardRef(token);\n var lView = getLView();\n // Fall back to inject() if view hasn't been created. This situation can happen in tests\n // if inject utilities are used before bootstrapping.\n if (lView == null)\n return ɵɵinject(token, flags);\n return getOrCreateInjectable(getPreviousOrParentTNode(), lView, token, flags);\n }\n /**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\n function ɵɵinjectAttribute(attrNameToInject) {\n return injectAttributeImpl(getPreviousOrParentTNode(), attrNameToInject);\n }\n\n /**\n * --------\n *\n * This file contains the core logic for how styling instructions are processed in Angular.\n *\n * To learn more about the algorithm see `TStylingContext`.\n *\n * --------\n */\n /**\n * Temporary function to bridge styling functionality between this new\n * refactor (which is here inside of `styling_next/`) and the old\n * implementation (which lives inside of `styling/`).\n *\n * This function is executed during the creation block of an element.\n * Because the existing styling implementation issues a call to the\n * `styling()` instruction, this instruction will also get run. The\n * central idea here is that the directive index values are bound\n * into the context. The directive index is temporary and is only\n * required until the `select(n)` instruction is fully functional.\n */\n function stylingInit() {\n var lView = getLView();\n var index = getSelectedIndex();\n var tNode = getTNode(index, lView);\n updateLastDirectiveIndex(tNode, getActiveDirectiveStylingIndex());\n }\n /**\n * Sets the current style sanitizer function which will then be used\n * within all follow-up prop and map-based style binding instructions\n * for the given element.\n *\n * Note that once styling has been applied to the element (i.e. once\n * `select(n)` is executed or the hostBindings/template function exits)\n * then the active `sanitizerFn` will be set to `null`. This means that\n * once styling is applied to another element then a another call to\n * `styleSanitizer` will need to be made.\n *\n * @param sanitizerFn The sanitization function that will be used to\n * process style prop/value entries.\n *\n * @codeGenApi\n */\n function styleSanitizer(sanitizer) {\n setCurrentStyleSanitizer(sanitizer);\n }\n /**\n * Mirror implementation of the `styleProp()` instruction (found in `instructions/styling.ts`).\n */\n function styleProp(prop, value, suffix) {\n _stylingProp(prop, resolveStylePropValue(value, suffix), false);\n }\n /**\n * Mirror implementation of the `classProp()` instruction (found in `instructions/styling.ts`).\n */\n function classProp(className, value) {\n _stylingProp(className, value, true);\n }\n /**\n * Shared function used to update a prop-based styling binding for an element.\n */\n function _stylingProp(prop, value, isClassBased) {\n var index = getSelectedIndex();\n var lView = getLView();\n var bindingIndex = lView[BINDING_INDEX]++;\n var tNode = getTNode(index, lView);\n var defer = getActiveDirectiveSuperClassHeight() > 0;\n if (isClassBased) {\n updateClassBinding(getClassesContext(tNode), lView, prop, bindingIndex, value, defer, false);\n }\n else {\n var sanitizer = getCurrentOrLViewSanitizer(lView);\n updateStyleBinding(getStylesContext(tNode), lView, prop, bindingIndex, value, sanitizer, defer, false);\n }\n }\n /**\n * Mirror implementation of the `styleMap()` instruction (found in `instructions/styling.ts`).\n */\n function styleMap(styles) {\n _stylingMap(styles, false);\n }\n /**\n * Mirror implementation of the `classMap()` instruction (found in `instructions/styling.ts`).\n */\n function classMap(classes) {\n _stylingMap(classes, true);\n }\n /**\n * Shared function used to update a map-based styling binding for an element.\n *\n * When this function is called it will activate support for `[style]` and\n * `[class]` bindings in Angular.\n */\n function _stylingMap(value, isClassBased) {\n activeStylingMapFeature();\n var index = getSelectedIndex();\n var lView = getLView();\n var bindingIndex = lView[BINDING_INDEX]++;\n if (value !== NO_CHANGE) {\n var tNode = getTNode(index, lView);\n var defer = getActiveDirectiveSuperClassHeight() > 0;\n var oldValue = lView[bindingIndex];\n var valueHasChanged = hasValueChanged$1(oldValue, value);\n var lStylingMap = normalizeIntoStylingMap(oldValue, value);\n if (isClassBased) {\n updateClassBinding(getClassesContext(tNode), lView, null, bindingIndex, lStylingMap, defer, valueHasChanged);\n }\n else {\n var sanitizer = getCurrentOrLViewSanitizer(lView);\n updateStyleBinding(getStylesContext(tNode), lView, null, bindingIndex, lStylingMap, sanitizer, defer, valueHasChanged);\n }\n }\n }\n /**\n * Temporary function to bridge styling functionality between this new\n * refactor (which is here inside of `styling_next/`) and the old\n * implementation (which lives inside of `styling/`).\n *\n * The new styling refactor ensures that styling flushing is called\n * automatically when a template function exits or a follow-up element\n * is visited (i.e. when `select(n)` is called). Because the `select(n)`\n * instruction is not fully implemented yet (it doesn't actually execute\n * host binding instruction code at the right time), this means that a\n * styling apply function is still needed.\n *\n * This function is a mirror implementation of the `stylingApply()`\n * instruction (found in `instructions/styling.ts`).\n */\n function stylingApply() {\n var index = getSelectedIndex();\n var lView = getLView();\n var tNode = getTNode(index, lView);\n var renderer = getRenderer(tNode, lView);\n var native = getNativeFromLView(index, lView);\n var directiveIndex = getActiveDirectiveStylingIndex();\n applyClasses(renderer, lView, getClassesContext(tNode), native, directiveIndex);\n var sanitizer = getCurrentOrLViewSanitizer(lView);\n applyStyles(renderer, lView, getStylesContext(tNode), native, directiveIndex, sanitizer);\n setCurrentStyleSanitizer(null);\n }\n /**\n * Temporary function to bridge styling functionality between this new\n * refactor (which is here inside of `styling_next/`) and the old\n * implementation (which lives inside of `styling/`).\n *\n * The purpose of this function is to traverse through the LView data\n * for a specific element index and return the native node. Because the\n * current implementation relies on there being a styling context array,\n * the code below will need to loop through these array values until it\n * gets a native element node.\n *\n * Note that this code is temporary and will disappear once the new\n * styling refactor lands in its entirety.\n */\n function getNativeFromLView(index, viewData) {\n var storageIndex = index + HEADER_OFFSET;\n var slotValue = viewData[storageIndex];\n var wrapper = viewData;\n while (Array.isArray(slotValue)) {\n wrapper = slotValue;\n slotValue = slotValue[HOST];\n }\n if (isStylingContext(wrapper)) {\n return wrapper[0 /* ElementPosition */];\n }\n else {\n return slotValue;\n }\n }\n function getRenderer(tNode, lView) {\n return tNode.type === 3 /* Element */ ? lView[RENDERER] : null;\n }\n /**\n * Searches and assigns provided all static style/class entries (found in the `attrs` value)\n * and registers them in their respective styling contexts.\n */\n function registerInitialStylingIntoContext(tNode, attrs, startIndex) {\n var classesContext;\n var stylesContext;\n var mode = -1;\n for (var i = startIndex; i < attrs.length; i++) {\n var attr = attrs[i];\n if (typeof attr == 'number') {\n mode = attr;\n }\n else if (mode == 1 /* Classes */) {\n classesContext = classesContext || getClassesContext(tNode);\n registerBinding(classesContext, -1, attr, true, false);\n }\n else if (mode == 2 /* Styles */) {\n stylesContext = stylesContext || getStylesContext(tNode);\n registerBinding(stylesContext, -1, attr, attrs[++i], false);\n }\n }\n }\n /**\n * Mirror implementation of the same function found in `instructions/styling.ts`.\n */\n function getActiveDirectiveStylingIndex() {\n // whenever a directive's hostBindings function is called a uniqueId value\n // is assigned. Normally this is enough to help distinguish one directive\n // from another for the styling context, but there are situations where a\n // sub-class directive could inherit and assign styling in concert with a\n // parent directive. To help the styling code distinguish between a parent\n // sub-classed directive the inheritance depth is taken into account as well.\n return getActiveDirectiveId() + getActiveDirectiveSuperClassDepth();\n }\n /**\n * Temporary function that will update the max directive index value in\n * both the classes and styles contexts present on the provided `tNode`.\n *\n * This code is only used because the `select(n)` code functionality is not\n * yet 100% functional. The `select(n)` instruction cannot yet evaluate host\n * bindings function code in sync with the associated template function code.\n * For this reason the styling algorithm needs to track the last directive index\n * value so that it knows exactly when to render styling to the element since\n * `stylingApply()` is called multiple times per CD (`stylingApply` will be\n * removed once `select(n)` is fixed).\n */\n function updateLastDirectiveIndex(tNode, directiveIndex) {\n updateContextDirectiveIndex(getClassesContext(tNode), directiveIndex);\n updateContextDirectiveIndex(getStylesContext(tNode), directiveIndex);\n }\n function getStylesContext(tNode) {\n return getContext(tNode, false);\n }\n function getClassesContext(tNode) {\n return getContext(tNode, true);\n }\n /**\n * Returns/instantiates a styling context from/to a `tNode` instance.\n */\n function getContext(tNode, isClassBased) {\n var context = isClassBased ? tNode.newClasses : tNode.newStyles;\n if (!context) {\n context = allocTStylingContext();\n if (ngDevMode) {\n attachStylingDebugObject(context);\n }\n if (isClassBased) {\n tNode.newClasses = context;\n }\n else {\n tNode.newStyles = context;\n }\n }\n return context;\n }\n function resolveStylePropValue(value, suffix) {\n var resolvedValue = null;\n if (value !== null) {\n if (suffix) {\n // when a suffix is applied then it will bypass\n // sanitization entirely (b/c a new string is created)\n resolvedValue = renderStringify(value) + suffix;\n }\n else {\n // sanitization happens by dealing with a String value\n // this means that the string value will be passed through\n // into the style rendering later (which is where the value\n // will be sanitized before it is applied)\n resolvedValue = value;\n }\n }\n return resolvedValue;\n }\n\n /*\n * The contents of this file include the instructions for all styling-related\n * operations in Angular.\n *\n * The instructions present in this file are:\n *\n * Template level styling instructions:\n * - styling\n * - styleMap\n * - classMap\n * - styleProp\n * - classProp\n * - stylingApply\n */\n /**\n * Allocates style and class binding properties on the element during creation mode.\n *\n * This instruction is meant to be called during creation mode to register all\n * dynamic style and class bindings on the element. Note that this is only used\n * for binding values (see `elementStart` to learn how to assign static styling\n * values to an element).\n *\n * @param classBindingNames An array containing bindable class names.\n * The `classProp` instruction refers to the class name by index in\n * this array (i.e. `['foo', 'bar']` means `foo=0` and `bar=1`).\n * @param styleBindingNames An array containing bindable style properties.\n * The `styleProp` instruction refers to the class name by index in\n * this array (i.e. `['width', 'height']` means `width=0` and `height=1`).\n * @param styleSanitizer An optional sanitizer function that will be used to sanitize any CSS\n * style values that are applied to the element (during rendering).\n *\n * Note that this will allocate the provided style/class bindings to the host element if\n * this function is called within a host binding.\n *\n * @codeGenApi\n */\n function ɵɵstyling(classBindingNames, styleBindingNames, styleSanitizer) {\n var tNode = getPreviousOrParentTNode();\n if (!tNode.stylingTemplate) {\n tNode.stylingTemplate = createEmptyStylingContext();\n }\n var directiveStylingIndex = getActiveDirectiveStylingIndex$1();\n if (directiveStylingIndex) {\n // this is temporary hack to get the existing styling instructions to\n // play ball with the new refactored implementation.\n // TODO (matsko): remove this once the old implementation is not needed.\n if (runtimeIsNewStylingInUse()) {\n stylingInit();\n }\n // despite the binding being applied in a queue (below), the allocation\n // of the directive into the context happens right away. The reason for\n // this is to retain the ordering of the directives (which is important\n // for the prioritization of bindings).\n allocateOrUpdateDirectiveIntoContext(tNode.stylingTemplate, directiveStylingIndex);\n var fns = tNode.onElementCreationFns = tNode.onElementCreationFns || [];\n fns.push(function () {\n initStyling(tNode, classBindingNames, styleBindingNames, styleSanitizer, directiveStylingIndex);\n registerHostDirective(tNode.stylingTemplate, directiveStylingIndex);\n });\n }\n else {\n // calling the function below ensures that the template's binding values\n // are applied as the first set of bindings into the context. If any other\n // styling bindings are set on the same element (by directives and/or\n // components) then they will be applied at the end of the `elementEnd`\n // instruction (because directives are created first before styling is\n // executed for a new element).\n initStyling(tNode, classBindingNames, styleBindingNames, styleSanitizer, DEFAULT_TEMPLATE_DIRECTIVE_INDEX);\n }\n }\n function initStyling(tNode, classBindingNames, styleBindingNames, styleSanitizer, directiveStylingIndex) {\n updateContextWithBindings(tNode.stylingTemplate, directiveStylingIndex, classBindingNames, styleBindingNames, styleSanitizer);\n }\n /**\n * Update a style binding on an element with the provided value.\n *\n * If the style value is falsy then it will be removed from the element\n * (or assigned a different value depending if there are any styles placed\n * on the element with `styleMap` or any static styles that are\n * present from when the element was created with `styling`).\n *\n * Note that the styling element is updated as part of `stylingApply`.\n *\n * @param styleIndex Index of style to update. This index value refers to the\n * index of the style in the style bindings array that was passed into\n * `styling`.\n * @param value New value to write (falsy to remove).\n * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.\n * Note that when a suffix is provided then the underlying sanitizer will\n * be ignored.\n * @param forceOverride Whether or not to update the styling value immediately\n * (despite the other bindings possibly having priority)\n *\n * Note that this will apply the provided style value to the host element if this function is called\n * within a host binding.\n *\n * @codeGenApi\n */\n function ɵɵstyleProp(styleIndex, value, suffix, forceOverride) {\n var index = getSelectedIndex();\n var valueToAdd = resolveStylePropValue$1(value, suffix);\n var stylingContext = getStylingContext(index, getLView());\n var directiveStylingIndex = getActiveDirectiveStylingIndex$1();\n if (directiveStylingIndex) {\n var args = [stylingContext, styleIndex, valueToAdd, directiveStylingIndex, forceOverride];\n enqueueHostInstruction(stylingContext, directiveStylingIndex, updateStyleProp, args);\n }\n else {\n updateStyleProp(stylingContext, styleIndex, valueToAdd, DEFAULT_TEMPLATE_DIRECTIVE_INDEX, forceOverride);\n }\n if (runtimeIsNewStylingInUse()) {\n var prop = getBindingNameFromIndex(stylingContext, styleIndex, directiveStylingIndex, false);\n // the reason why we cast the value as `boolean` is\n // because the new styling refactor does not yet support\n // sanitization or animation players.\n styleProp(prop, value, suffix);\n }\n }\n function resolveStylePropValue$1(value, suffix) {\n var valueToAdd = null;\n if (value !== null) {\n if (suffix) {\n // when a suffix is applied then it will bypass\n // sanitization entirely (b/c a new string is created)\n valueToAdd = renderStringify(value) + suffix;\n }\n else {\n // sanitization happens by dealing with a String value\n // this means that the string value will be passed through\n // into the style rendering later (which is where the value\n // will be sanitized before it is applied)\n valueToAdd = value;\n }\n }\n return valueToAdd;\n }\n /**\n * Update a class binding on an element with the provided value.\n *\n * This instruction is meant to handle the `[class.foo]=\"exp\"` case and,\n * therefore, the class binding itself must already be allocated using\n * `styling` within the creation block.\n *\n * @param classIndex Index of class to toggle. This index value refers to the\n * index of the class in the class bindings array that was passed into\n * `styling` (which is meant to be called before this\n * function is).\n * @param value A true/false value which will turn the class on or off.\n * @param forceOverride Whether or not this value will be applied regardless\n * of where it is being set within the styling priority structure.\n *\n * Note that this will apply the provided class value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\n function ɵɵclassProp(classIndex, value, forceOverride) {\n var index = getSelectedIndex();\n var input = (value instanceof BoundPlayerFactory) ?\n value :\n booleanOrNull(value);\n var directiveStylingIndex = getActiveDirectiveStylingIndex$1();\n var stylingContext = getStylingContext(index, getLView());\n if (directiveStylingIndex) {\n var args = [stylingContext, classIndex, input, directiveStylingIndex, forceOverride];\n enqueueHostInstruction(stylingContext, directiveStylingIndex, updateClassProp, args);\n }\n else {\n updateClassProp(stylingContext, classIndex, input, DEFAULT_TEMPLATE_DIRECTIVE_INDEX, forceOverride);\n }\n if (runtimeIsNewStylingInUse()) {\n var prop = getBindingNameFromIndex(stylingContext, classIndex, directiveStylingIndex, true);\n // the reason why we cast the value as `boolean` is\n // because the new styling refactor does not yet support\n // sanitization or animation players.\n classProp(prop, input);\n }\n }\n function booleanOrNull(value) {\n if (typeof value === 'boolean')\n return value;\n return value ? true : null;\n }\n /**\n * Update style bindings using an object literal on an element.\n *\n * This instruction is meant to apply styling via the `[style]=\"exp\"` template bindings.\n * When styles are applied to the element they will then be updated with respect to\n * any styles/classes set via `styleProp`. If any styles are set to falsy\n * then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n *\n * @param styles A key/value style map of the styles that will be applied to the given element.\n * Any missing styles (that have already been applied to the element beforehand) will be\n * removed (unset) from the element's styling.\n *\n * Note that this will apply the provided styleMap value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\n function ɵɵstyleMap(styles) {\n var index = getSelectedIndex();\n var lView = getLView();\n var stylingContext = getStylingContext(index, lView);\n var directiveStylingIndex = getActiveDirectiveStylingIndex$1();\n if (directiveStylingIndex) {\n var args = [stylingContext, styles, directiveStylingIndex];\n enqueueHostInstruction(stylingContext, directiveStylingIndex, updateStyleMap, args);\n }\n else {\n var tNode = getTNode(index, lView);\n // inputs are only evaluated from a template binding into a directive, therefore,\n // there should not be a situation where a directive host bindings function\n // evaluates the inputs (this should only happen in the template function)\n if (hasStyleInput(tNode) && styles !== NO_CHANGE) {\n var initialStyles = getInitialClassNameValue(stylingContext);\n var styleInputVal = (initialStyles.length ? (initialStyles + ' ') : '') + forceStylesAsString(styles);\n setInputsForProperty(lView, tNode.inputs['style'], styleInputVal);\n styles = NO_CHANGE;\n }\n updateStyleMap(stylingContext, styles);\n }\n if (runtimeIsNewStylingInUse()) {\n styleMap(styles);\n }\n }\n /**\n * Update class bindings using an object literal or class-string on an element.\n *\n * This instruction is meant to apply styling via the `[class]=\"exp\"` template bindings.\n * When classes are applied to the element they will then be updated with\n * respect to any styles/classes set via `classProp`. If any\n * classes are set to falsy then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n * Note that this will the provided classMap value to the host element if this function is called\n * within a host binding.\n *\n * @param classes A key/value map or string of CSS classes that will be added to the\n * given element. Any missing classes (that have already been applied to the element\n * beforehand) will be removed (unset) from the element's list of CSS classes.\n *\n * @codeGenApi\n */\n function ɵɵclassMap(classes) {\n var index = getSelectedIndex();\n var lView = getLView();\n var stylingContext = getStylingContext(index, lView);\n var directiveStylingIndex = getActiveDirectiveStylingIndex$1();\n if (directiveStylingIndex) {\n var args = [stylingContext, classes, directiveStylingIndex];\n enqueueHostInstruction(stylingContext, directiveStylingIndex, updateClassMap, args);\n }\n else {\n var tNode = getTNode(index, lView);\n // inputs are only evaluated from a template binding into a directive, therefore,\n // there should not be a situation where a directive host bindings function\n // evaluates the inputs (this should only happen in the template function)\n if (hasClassInput(tNode) && classes !== NO_CHANGE) {\n var initialClasses = getInitialClassNameValue(stylingContext);\n var classInputVal = (initialClasses.length ? (initialClasses + ' ') : '') + forceClassesAsString(classes);\n setInputsForProperty(lView, tNode.inputs['class'], classInputVal);\n classes = NO_CHANGE;\n }\n updateClassMap(stylingContext, classes);\n }\n if (runtimeIsNewStylingInUse()) {\n classMap(classes);\n }\n }\n /**\n * Apply all style and class binding values to the element.\n *\n * This instruction is meant to be run after `styleMap`, `classMap`,\n * `styleProp` or `classProp` instructions have been run and will\n * only apply styling to the element if any styling bindings have been updated.\n *\n * @codeGenApi\n */\n function ɵɵstylingApply() {\n var index = getSelectedIndex();\n var directiveStylingIndex = getActiveDirectiveStylingIndex$1() || DEFAULT_TEMPLATE_DIRECTIVE_INDEX;\n var lView = getLView();\n var tNode = getTNode(index, lView);\n // if a non-element value is being processed then we can't render values\n // on the element at all therefore by setting the renderer to null then\n // the styling apply code knows not to actually apply the values...\n var renderer = tNode.type === 3 /* Element */ ? lView[RENDERER] : null;\n var isFirstRender = (lView[FLAGS] & 8 /* FirstLViewPass */) !== 0;\n var stylingContext = getStylingContext(index, lView);\n if (runtimeAllowOldStyling()) {\n var totalPlayersQueued = renderStyling(stylingContext, renderer, lView, isFirstRender, null, null, directiveStylingIndex);\n if (totalPlayersQueued > 0) {\n var rootContext = getRootContext(lView);\n scheduleTick(rootContext, 2 /* FlushPlayers */);\n }\n }\n // because select(n) may not run between every instruction, the cached styling\n // context may not get cleared between elements. The reason for this is because\n // styling bindings (like `[style]` and `[class]`) are not recognized as property\n // bindings by default so a select(n) instruction is not generated. To ensure the\n // context is loaded correctly for the next element the cache below is pre-emptively\n // cleared because there is no code in Angular that applies more styling code after a\n // styling flush has occurred. Note that this will be fixed once FW-1254 lands.\n setCachedStylingContext(null);\n if (runtimeIsNewStylingInUse()) {\n stylingApply();\n }\n }\n function getActiveDirectiveStylingIndex$1() {\n // whenever a directive's hostBindings function is called a uniqueId value\n // is assigned. Normally this is enough to help distinguish one directive\n // from another for the styling context, but there are situations where a\n // sub-class directive could inherit and assign styling in concert with a\n // parent directive. To help the styling code distinguish between a parent\n // sub-classed directive the inheritance depth is taken into account as well.\n return getActiveDirectiveId() + getActiveDirectiveSuperClassDepth();\n }\n function getStylingContext(index, lView) {\n var context = getCachedStylingContext();\n if (!context) {\n context = getStylingContextFromLView(index + HEADER_OFFSET, lView);\n setCachedStylingContext(context);\n }\n else if (ngDevMode) {\n var actualContext = getStylingContextFromLView(index + HEADER_OFFSET, lView);\n assertEqual(context, actualContext, 'The cached styling context is invalid');\n }\n return context;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Create DOM element. The instruction must later be followed by `elementEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param name Name of the DOM Node\n * @param attrs Statically bound set of attributes, classes, and styles to be written into the DOM\n * element on creation. Use [AttributeMarker] to denote the meaning of this array.\n * @param localRefs A set of local reference bindings on the element.\n *\n * Attributes and localRefs are passed as an array of strings where elements with an even index\n * hold an attribute name and elements with an odd index hold an attribute value, ex.:\n * ['id', 'warning5', 'class', 'alert']\n *\n * @codeGenApi\n */\n function ɵɵelementStart(index, name, attrs, localRefs) {\n var lView = getLView();\n var tView = lView[TVIEW];\n ngDevMode && assertEqual(lView[BINDING_INDEX], tView.bindingStartIndex, 'elements should be created before any bindings ');\n ngDevMode && ngDevMode.rendererCreateElement++;\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n var native = lView[index + HEADER_OFFSET] = elementCreate(name);\n var renderer = lView[RENDERER];\n var tNode = getOrCreateTNode(tView, lView[T_HOST], index, 3 /* Element */, name, attrs || null);\n var initialStylesIndex = 0;\n var initialClassesIndex = 0;\n var lastAttrIndex = -1;\n if (attrs) {\n lastAttrIndex = setUpAttributes(native, attrs);\n // it's important to only prepare styling-related datastructures once for a given\n // tNode and not each time an element is created. Also, the styling code is designed\n // to be patched and constructed at various points, but only up until the styling\n // template is first allocated (which happens when the very first style/class binding\n // value is evaluated). When the template is allocated (when it turns into a context)\n // then the styling template is locked and cannot be further extended (it can only be\n // instantiated into a context per element)\n setNodeStylingTemplate(tView, tNode, attrs, lastAttrIndex);\n var stylingTemplate = tNode.stylingTemplate;\n if (stylingTemplate) {\n // the initial style/class values are rendered immediately after having been\n // initialized into the context so the element styling is ready when directives\n // are initialized (since they may read style/class values in their constructor)\n initialStylesIndex = renderInitialStyles(native, stylingTemplate, renderer);\n initialClassesIndex = renderInitialClasses(native, stylingTemplate, renderer);\n }\n }\n appendChild(native, tNode, lView);\n createDirectivesAndLocals(tView, lView, localRefs);\n // any immediate children of a component or template container must be pre-emptively\n // monkey-patched with the component view data so that the element can be inspected\n // later on using any element discovery utility methods (see `element_discovery.ts`)\n if (getElementDepthCount() === 0) {\n attachPatchData(native, lView);\n }\n increaseElementDepthCount();\n // if a directive contains a host binding for \"class\" then all class-based data will\n // flow through that (except for `[class.prop]` bindings). This also includes initial\n // static class values as well. (Note that this will be fixed once map-based `[style]`\n // and `[class]` bindings work for multiple directives.)\n if (tView.firstTemplatePass) {\n var inputData = initializeTNodeInputs(tNode);\n if (inputData && inputData.hasOwnProperty('class')) {\n tNode.flags |= 8 /* hasClassInput */;\n }\n if (inputData && inputData.hasOwnProperty('style')) {\n tNode.flags |= 16 /* hasStyleInput */;\n }\n }\n // we render the styling again below in case any directives have set any `style` and/or\n // `class` host attribute values...\n if (tNode.stylingTemplate) {\n renderInitialClasses(native, tNode.stylingTemplate, renderer, initialClassesIndex);\n renderInitialStyles(native, tNode.stylingTemplate, renderer, initialStylesIndex);\n }\n if (runtimeIsNewStylingInUse() && lastAttrIndex >= 0) {\n registerInitialStylingIntoContext(tNode, attrs, lastAttrIndex);\n }\n var currentQueries = lView[QUERIES];\n if (currentQueries) {\n currentQueries.addNode(tNode);\n lView[QUERIES] = currentQueries.clone(tNode);\n }\n executeContentQueries(tView, tNode, lView);\n }\n /**\n * Mark the end of the element.\n *\n * @codeGenApi\n */\n function ɵɵelementEnd() {\n var previousOrParentTNode = getPreviousOrParentTNode();\n ngDevMode && assertDefined(previousOrParentTNode, 'No parent node to close.');\n if (getIsParent()) {\n setIsNotParent();\n }\n else {\n ngDevMode && assertHasParent(getPreviousOrParentTNode());\n previousOrParentTNode = previousOrParentTNode.parent;\n setPreviousOrParentTNode(previousOrParentTNode, false);\n }\n // this is required for all host-level styling-related instructions to run\n // in the correct order\n previousOrParentTNode.onElementCreationFns && applyOnCreateInstructions(previousOrParentTNode);\n ngDevMode && assertNodeType(previousOrParentTNode, 3 /* Element */);\n var lView = getLView();\n var currentQueries = lView[QUERIES];\n // Go back up to parent queries only if queries have been cloned on this element.\n if (currentQueries && previousOrParentTNode.index === currentQueries.nodeIndex) {\n lView[QUERIES] = currentQueries.parent;\n }\n registerPostOrderHooks(lView[TVIEW], previousOrParentTNode);\n decreaseElementDepthCount();\n // this is fired at the end of elementEnd because ALL of the stylingBindings code\n // (for directives and the template) have now executed which means the styling\n // context can be instantiated properly.\n var stylingContext = null;\n if (hasClassInput(previousOrParentTNode)) {\n stylingContext = getStylingContextFromLView(previousOrParentTNode.index, lView);\n setInputsForProperty(lView, previousOrParentTNode.inputs['class'], getInitialClassNameValue(stylingContext));\n }\n if (hasStyleInput(previousOrParentTNode)) {\n stylingContext =\n stylingContext || getStylingContextFromLView(previousOrParentTNode.index, lView);\n setInputsForProperty(lView, previousOrParentTNode.inputs['style'], getInitialStyleStringValue(stylingContext));\n }\n }\n /**\n * Creates an empty element using {@link elementStart} and {@link elementEnd}\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param attrs Statically bound set of attributes, classes, and styles to be written into the DOM\n * element on creation. Use [AttributeMarker] to denote the meaning of this array.\n * @param localRefs A set of local reference bindings on the element.\n *\n * @codeGenApi\n */\n function ɵɵelement(index, name, attrs, localRefs) {\n ɵɵelementStart(index, name, attrs, localRefs);\n ɵɵelementEnd();\n }\n /**\n * Assign static attribute values to a host element.\n *\n * This instruction will assign static attribute values as well as class and style\n * values to an element within the host bindings function. Since attribute values\n * can consist of different types of values, the `attrs` array must include the values in\n * the following format:\n *\n * attrs = [\n * // static attributes (like `title`, `name`, `id`...)\n * attr1, value1, attr2, value,\n *\n * // a single namespace value (like `x:id`)\n * NAMESPACE_MARKER, namespaceUri1, name1, value1,\n *\n * // another single namespace value (like `x:name`)\n * NAMESPACE_MARKER, namespaceUri2, name2, value2,\n *\n * // a series of CSS classes that will be applied to the element (no spaces)\n * CLASSES_MARKER, class1, class2, class3,\n *\n * // a series of CSS styles (property + value) that will be applied to the element\n * STYLES_MARKER, prop1, value1, prop2, value2\n * ]\n *\n * All non-class and non-style attributes must be defined at the start of the list\n * first before all class and style values are set. When there is a change in value\n * type (like when classes and styles are introduced) a marker must be used to separate\n * the entries. The marker values themselves are set via entries found in the\n * [AttributeMarker] enum.\n *\n * NOTE: This instruction is meant to used from `hostBindings` function only.\n *\n * @param directive A directive instance the styling is associated with.\n * @param attrs An array of static values (attributes, classes and styles) with the correct marker\n * values.\n *\n * @codeGenApi\n */\n function ɵɵelementHostAttrs(attrs) {\n var hostElementIndex = getSelectedIndex();\n var lView = getLView();\n var tNode = getTNode(hostElementIndex, lView);\n // non-element nodes (e.g. `<ng-container>`) are not rendered as actual\n // element nodes and adding styles/classes on to them will cause runtime\n // errors...\n if (tNode.type === 3 /* Element */) {\n var native = getNativeByTNode(tNode, lView);\n var lastAttrIndex = setUpAttributes(native, attrs);\n var stylingAttrsStartIndex = attrsStylingIndexOf(attrs, lastAttrIndex);\n if (stylingAttrsStartIndex >= 0) {\n var directiveStylingIndex = getActiveDirectiveStylingIndex$1();\n if (tNode.stylingTemplate) {\n patchContextWithStaticAttrs(tNode.stylingTemplate, attrs, stylingAttrsStartIndex, directiveStylingIndex);\n }\n else {\n tNode.stylingTemplate =\n initializeStaticContext(attrs, stylingAttrsStartIndex, directiveStylingIndex);\n }\n }\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.\n * The instruction must later be followed by `elementContainerEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param attrs Set of attributes to be used when matching directives.\n * @param localRefs A set of local reference bindings on the element.\n *\n * Even if this instruction accepts a set of attributes no actual attribute values are propagated to\n * the DOM (as a comment node can't have attributes). Attributes are here only for directive\n * matching purposes and setting initial inputs of directives.\n *\n * @codeGenApi\n */\n function ɵɵelementContainerStart(index, attrs, localRefs) {\n var lView = getLView();\n var tView = lView[TVIEW];\n var renderer = lView[RENDERER];\n var tagName = 'ng-container';\n ngDevMode && assertEqual(lView[BINDING_INDEX], tView.bindingStartIndex, 'element containers should be created before any bindings');\n ngDevMode && ngDevMode.rendererCreateComment++;\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n var native = lView[index + HEADER_OFFSET] = renderer.createComment(ngDevMode ? tagName : '');\n ngDevMode && assertDataInRange(lView, index - 1);\n var tNode = getOrCreateTNode(tView, lView[T_HOST], index, 4 /* ElementContainer */, tagName, attrs || null);\n if (attrs) {\n // While ng-container doesn't necessarily support styling, we use the style context to identify\n // and execute directives on the ng-container.\n setNodeStylingTemplate(tView, tNode, attrs, 0);\n }\n appendChild(native, tNode, lView);\n createDirectivesAndLocals(tView, lView, localRefs);\n attachPatchData(native, lView);\n var currentQueries = lView[QUERIES];\n if (currentQueries) {\n currentQueries.addNode(tNode);\n lView[QUERIES] = currentQueries.clone(tNode);\n }\n executeContentQueries(tView, tNode, lView);\n }\n /**\n * Mark the end of the <ng-container>.\n *\n * @codeGenApi\n */\n function ɵɵelementContainerEnd() {\n var previousOrParentTNode = getPreviousOrParentTNode();\n var lView = getLView();\n var tView = lView[TVIEW];\n if (getIsParent()) {\n setIsNotParent();\n }\n else {\n ngDevMode && assertHasParent(previousOrParentTNode);\n previousOrParentTNode = previousOrParentTNode.parent;\n setPreviousOrParentTNode(previousOrParentTNode, false);\n }\n ngDevMode && assertNodeType(previousOrParentTNode, 4 /* ElementContainer */);\n var currentQueries = lView[QUERIES];\n // Go back up to parent queries only if queries have been cloned on this element.\n if (currentQueries && previousOrParentTNode.index === currentQueries.nodeIndex) {\n lView[QUERIES] = currentQueries.parent;\n }\n // this is required for all host-level styling-related instructions to run\n // in the correct order\n previousOrParentTNode.onElementCreationFns && applyOnCreateInstructions(previousOrParentTNode);\n registerPostOrderHooks(tView, previousOrParentTNode);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Marks the start of an embedded view.\n *\n * @param viewBlockId The ID of this view\n * @return boolean Whether or not this view is in creation mode\n *\n * @codeGenApi\n */\n function ɵɵembeddedViewStart(viewBlockId, consts, vars) {\n var lView = getLView();\n var previousOrParentTNode = getPreviousOrParentTNode();\n // The previous node can be a view node if we are processing an inline for loop\n var containerTNode = previousOrParentTNode.type === 2 /* View */ ?\n previousOrParentTNode.parent :\n previousOrParentTNode;\n var lContainer = lView[containerTNode.index];\n ngDevMode && assertNodeType(containerTNode, 0 /* Container */);\n var viewToRender = scanForView(lContainer, lContainer[ACTIVE_INDEX], viewBlockId);\n if (viewToRender) {\n setIsParent();\n enterView(viewToRender, viewToRender[TVIEW].node);\n }\n else {\n // When we create a new LView, we always reset the state of the instructions.\n viewToRender = createLView(lView, getOrCreateEmbeddedTView(viewBlockId, consts, vars, containerTNode), null, 16 /* CheckAlways */, null, null);\n if (lContainer[QUERIES]) {\n viewToRender[QUERIES] = lContainer[QUERIES].createView();\n }\n var tParentNode = getIsParent() ? previousOrParentTNode :\n previousOrParentTNode && previousOrParentTNode.parent;\n assignTViewNodeToLView(viewToRender[TVIEW], tParentNode, viewBlockId, viewToRender);\n enterView(viewToRender, viewToRender[TVIEW].node);\n }\n if (lContainer) {\n if (isCreationMode(viewToRender)) {\n // it is a new view, insert it into collection of views for a given container\n insertView(viewToRender, lContainer, lContainer[ACTIVE_INDEX]);\n }\n lContainer[ACTIVE_INDEX]++;\n }\n return isCreationMode(viewToRender) ? 1 /* Create */ | 2 /* Update */ :\n 2 /* Update */;\n }\n /**\n * Initialize the TView (e.g. static data) for the active embedded view.\n *\n * Each embedded view block must create or retrieve its own TView. Otherwise, the embedded view's\n * static data for a particular node would overwrite the static data for a node in the view above\n * it with the same index (since it's in the same template).\n *\n * @param viewIndex The index of the TView in TNode.tViews\n * @param consts The number of nodes, local refs, and pipes in this template\n * @param vars The number of bindings and pure function bindings in this template\n * @param container The parent container in which to look for the view's static data\n * @returns TView\n */\n function getOrCreateEmbeddedTView(viewIndex, consts, vars, parent) {\n var tView = getLView()[TVIEW];\n ngDevMode && assertNodeType(parent, 0 /* Container */);\n var containerTViews = parent.tViews;\n ngDevMode && assertDefined(containerTViews, 'TView expected');\n ngDevMode && assertEqual(Array.isArray(containerTViews), true, 'TViews should be in an array');\n if (viewIndex >= containerTViews.length || containerTViews[viewIndex] == null) {\n containerTViews[viewIndex] = createTView(viewIndex, null, consts, vars, tView.directiveRegistry, tView.pipeRegistry, null, null);\n }\n return containerTViews[viewIndex];\n }\n /**\n * Looks for a view with a given view block id inside a provided LContainer.\n * Removes views that need to be deleted in the process.\n *\n * @param lContainer to search for views\n * @param startIdx starting index in the views array to search from\n * @param viewBlockId exact view block id to look for\n */\n function scanForView(lContainer, startIdx, viewBlockId) {\n for (var i = startIdx + CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n var viewAtPositionId = lContainer[i][TVIEW].id;\n if (viewAtPositionId === viewBlockId) {\n return lContainer[i];\n }\n else if (viewAtPositionId < viewBlockId) {\n // found a view that should not be at this position - remove\n removeView(lContainer, i - CONTAINER_HEADER_OFFSET);\n }\n else {\n // found a view with id greater than the one we are searching for\n // which means that required view doesn't exist and can't be found at\n // later positions in the views array - stop the searchdef.cont here\n break;\n }\n }\n return null;\n }\n /**\n * Marks the end of an embedded view.\n *\n * @codeGenApi\n */\n function ɵɵembeddedViewEnd() {\n var lView = getLView();\n var viewHost = lView[T_HOST];\n if (isCreationMode(lView)) {\n refreshDescendantViews(lView); // creation mode pass\n lView[FLAGS] &= ~4 /* CreationMode */;\n }\n resetPreOrderHookFlags(lView);\n refreshDescendantViews(lView); // update mode pass\n var lContainer = lView[PARENT];\n ngDevMode && assertLContainerOrUndefined(lContainer);\n // It's always safe to run hooks here, as `leaveView` is not called during the 'finally' block\n // of a try-catch-finally statement, so it can never be reached while unwinding the stack due to\n // an error being thrown.\n leaveView(lContainer[PARENT], /* safeToRunHooks */ true);\n setPreviousOrParentTNode(viewHost, false);\n }\n\n /**\n * Returns the current OpaqueViewState instance.\n *\n * Used in conjunction with the restoreView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @codeGenApi\n */\n function ɵɵgetCurrentView() {\n return getLView();\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Determine if the argument is shaped like a Promise\n */\n function isPromise(obj) {\n // allow any Promise/A+ compliant thenable.\n // It's up to the caller to ensure that obj.then conforms to the spec\n return !!obj && typeof obj.then === 'function';\n }\n /**\n * Determine if the argument is an Observable\n */\n function isObservable(obj) {\n // TODO: use isObservable once we update pass rxjs 6.1\n // https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md#610-2018-05-03\n return !!obj && typeof obj.subscribe === 'function';\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Adds an event listener to the current node.\n *\n * If an output exists on one of the node's directives, it also subscribes to the output\n * and saves the subscription for later cleanup.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\n function ɵɵlistener(eventName, listenerFn, useCapture, eventTargetResolver) {\n if (useCapture === void 0) { useCapture = false; }\n listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver);\n }\n /**\n * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered\n * in the component's renderer. Normally all host listeners are evaluated with the\n * parent component's renderer, but, in the case of animation @triggers, they need\n * to be evaluated with the sub component's renderer (because that's where the\n * animation triggers are defined).\n *\n * Do not use this instruction as a replacement for `listener`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\n function ɵɵcomponentHostSyntheticListener(eventName, listenerFn, useCapture, eventTargetResolver) {\n if (useCapture === void 0) { useCapture = false; }\n listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver, loadComponentRenderer);\n }\n /**\n * A utility function that checks if a given element has already an event handler registered for an\n * event with a specified name. The TView.cleanup data structure is used to find out which events\n * are registered for a given element.\n */\n function findExistingListener(lView, eventName, tNodeIdx) {\n var tView = lView[TVIEW];\n var tCleanup = tView.cleanup;\n if (tCleanup != null) {\n for (var i = 0; i < tCleanup.length - 1; i += 2) {\n var cleanupEventName = tCleanup[i];\n if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIdx) {\n // We have found a matching event name on the same node but it might not have been\n // registered yet, so we must explicitly verify entries in the LView cleanup data\n // structures.\n var lCleanup = lView[CLEANUP];\n var listenerIdxInLCleanup = tCleanup[i + 2];\n return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;\n }\n // TView.cleanup can have a mix of 4-elements entries (for event handler cleanups) or\n // 2-element entries (for directive and queries destroy hooks). As such we can encounter\n // blocks of 4 or 2 items in the tView.cleanup and this is why we iterate over 2 elements\n // first and jump another 2 elements if we detect listeners cleanup (4 elements). Also check\n // documentation of TView.cleanup for more details of this data structure layout.\n if (typeof cleanupEventName === 'string') {\n i += 2;\n }\n }\n }\n return null;\n }\n function listenerInternal(eventName, listenerFn, useCapture, eventTargetResolver, loadRendererFn) {\n if (useCapture === void 0) { useCapture = false; }\n var lView = getLView();\n var tNode = getPreviousOrParentTNode();\n var tView = lView[TVIEW];\n var firstTemplatePass = tView.firstTemplatePass;\n var tCleanup = firstTemplatePass && (tView.cleanup || (tView.cleanup = []));\n ngDevMode && assertNodeOfPossibleTypes(tNode, 3 /* Element */, 0 /* Container */, 4 /* ElementContainer */);\n var processOutputs = true;\n // add native event listener - applicable to elements only\n if (tNode.type === 3 /* Element */) {\n var native = getNativeByTNode(tNode, lView);\n var resolved = eventTargetResolver ? eventTargetResolver(native) : EMPTY_OBJ;\n var target = resolved.target || native;\n var renderer = loadRendererFn ? loadRendererFn(tNode, lView) : lView[RENDERER];\n var lCleanup = getCleanup(lView);\n var lCleanupIndex = lCleanup.length;\n var idxOrTargetGetter = eventTargetResolver ?\n function (_lView) { return eventTargetResolver(unwrapRNode(_lView[tNode.index])).target; } :\n tNode.index;\n // In order to match current behavior, native DOM event listeners must be added for all\n // events (including outputs).\n if (isProceduralRenderer(renderer)) {\n // There might be cases where multiple directives on the same element try to register an event\n // handler function for the same event. In this situation we want to avoid registration of\n // several native listeners as each registration would be intercepted by NgZone and\n // trigger change detection. This would mean that a single user action would result in several\n // change detections being invoked. To avoid this situation we want to have only one call to\n // native handler registration (for the same element and same type of event).\n //\n // In order to have just one native event handler in presence of multiple handler functions,\n // we just register a first handler function as a native event listener and then chain\n // (coalesce) other handler functions on top of the first native handler function.\n var existingListener = null;\n // Please note that the coalescing described here doesn't happen for events specifying an\n // alternative target (ex. (document:click)) - this is to keep backward compatibility with the\n // view engine.\n // Also, we don't have to search for existing listeners is there are no directives\n // matching on a given node as we can't register multiple event handlers for the same event in\n // a template (this would mean having duplicate attributes).\n if (!eventTargetResolver && hasDirectives(tNode)) {\n existingListener = findExistingListener(lView, eventName, tNode.index);\n }\n if (existingListener !== null) {\n // Attach a new listener at the head of the coalesced listeners list.\n listenerFn.__ngNextListenerFn__ = existingListener.__ngNextListenerFn__;\n existingListener.__ngNextListenerFn__ = listenerFn;\n processOutputs = false;\n }\n else {\n // The first argument of `listen` function in Procedural Renderer is:\n // - either a target name (as a string) in case of global target (window, document, body)\n // - or element reference (in all other cases)\n listenerFn = wrapListener(tNode, lView, listenerFn, false /** preventDefault */);\n var cleanupFn = renderer.listen(resolved.name || target, eventName, listenerFn);\n ngDevMode && ngDevMode.rendererAddEventListener++;\n lCleanup.push(listenerFn, cleanupFn);\n tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1);\n }\n }\n else {\n listenerFn = wrapListener(tNode, lView, listenerFn, true /** preventDefault */);\n target.addEventListener(eventName, listenerFn, useCapture);\n ngDevMode && ngDevMode.rendererAddEventListener++;\n lCleanup.push(listenerFn);\n tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, useCapture);\n }\n }\n // subscribe to directive outputs\n if (tNode.outputs === undefined) {\n // if we create TNode here, inputs must be undefined so we know they still need to be\n // checked\n tNode.outputs = generatePropertyAliases(tNode, 1 /* Output */);\n }\n var outputs = tNode.outputs;\n var props;\n if (processOutputs && outputs && (props = outputs[eventName])) {\n var propsLength = props.length;\n if (propsLength) {\n var lCleanup = getCleanup(lView);\n for (var i = 0; i < propsLength; i += 3) {\n var index = props[i];\n ngDevMode && assertDataInRange(lView, index);\n var minifiedName = props[i + 2];\n var directiveInstance = lView[index];\n var output = directiveInstance[minifiedName];\n if (ngDevMode && !isObservable(output)) {\n throw new Error(\"@Output \" + minifiedName + \" not initialized in '\" + directiveInstance.constructor.name + \"'.\");\n }\n var subscription = output.subscribe(listenerFn);\n var idx = lCleanup.length;\n lCleanup.push(listenerFn, subscription);\n tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1));\n }\n }\n }\n }\n function executeListenerWithErrorHandling(lView, listenerFn, e) {\n try {\n // Only explicitly returning false from a listener should preventDefault\n return listenerFn(e) !== false;\n }\n catch (error) {\n handleError(lView, error);\n return false;\n }\n }\n /**\n * Wraps an event listener with a function that marks ancestors dirty and prevents default behavior,\n * if applicable.\n *\n * @param tNode The TNode associated with this listener\n * @param lView The LView that contains this listener\n * @param listenerFn The listener function to call\n * @param wrapWithPreventDefault Whether or not to prevent default behavior\n * (the procedural renderer does this already, so in those cases, we should skip)\n */\n function wrapListener(tNode, lView, listenerFn, wrapWithPreventDefault) {\n // Note: we are performing most of the work in the listener function itself\n // to optimize listener registration.\n return function wrapListenerIn_markDirtyAndPreventDefault(e) {\n // In order to be backwards compatible with View Engine, events on component host nodes\n // must also mark the component view itself dirty (i.e. the view that it owns).\n var startView = tNode.flags & 1 /* isComponent */ ? getComponentViewByIndex(tNode.index, lView) : lView;\n // See interfaces/view.ts for more on LViewFlags.ManualOnPush\n if ((lView[FLAGS] & 32 /* ManualOnPush */) === 0) {\n markViewDirty(startView);\n }\n var result = executeListenerWithErrorHandling(lView, listenerFn, e);\n // A just-invoked listener function might have coalesced listeners so we need to check for\n // their presence and invoke as needed.\n var nextListenerFn = wrapListenerIn_markDirtyAndPreventDefault.__ngNextListenerFn__;\n while (nextListenerFn) {\n // We should prevent default if any of the listeners explicitly return false\n result = executeListenerWithErrorHandling(lView, nextListenerFn, e) && result;\n nextListenerFn = nextListenerFn.__ngNextListenerFn__;\n }\n if (wrapWithPreventDefault && result === false) {\n e.preventDefault();\n // Necessary for legacy browsers that don't support preventDefault (e.g. IE)\n e.returnValue = false;\n }\n return result;\n };\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Retrieves a context at the level specified and saves it as the global, contextViewData.\n * Will get the next level up if level is not specified.\n *\n * This is used to save contexts of parent views so they can be bound in embedded views, or\n * in conjunction with reference() to bind a ref from a parent view.\n *\n * @param level The relative level of the view from which to grab context compared to contextVewData\n * @returns context\n *\n * @codeGenApi\n */\n function ɵɵnextContext(level) {\n if (level === void 0) { level = 1; }\n return nextContextImpl(level);\n }\n\n /**\n * Checks a given node against matching projection slots and returns the\n * determined slot index. Returns \"null\" if no slot matched the given node.\n *\n * This function takes into account the parsed ngProjectAs selector from the\n * node's attributes. If present, it will check whether the ngProjectAs selector\n * matches any of the projection slot selectors.\n */\n function matchingProjectionSlotIndex(tNode, projectionSlots) {\n var wildcardNgContentIndex = null;\n var ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n for (var i = 0; i < projectionSlots.length; i++) {\n var slotValue = projectionSlots[i];\n // The last wildcard projection slot should match all nodes which aren't matching\n // any selector. This is necessary to be backwards compatible with view engine.\n if (slotValue === '*') {\n wildcardNgContentIndex = i;\n continue;\n }\n // If we ran into an `ngProjectAs` attribute, we should match its parsed selector\n // to the list of selectors, otherwise we fall back to matching against the node.\n if (ngProjectAsAttrVal === null ?\n isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */ true) :\n isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) {\n return i; // first matching selector \"captures\" a given node\n }\n }\n return wildcardNgContentIndex;\n }\n /**\n * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.\n * It takes all the selectors from the entire component's template and decides where\n * each projected node belongs (it re-distributes nodes among \"buckets\" where each \"bucket\" is\n * backed by a selector).\n *\n * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,\n * un-parsed form.\n *\n * The parsed form is needed for efficient matching of a node against a given CSS selector.\n * The un-parsed, textual form is needed for support of the ngProjectAs attribute.\n *\n * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more\n * drawbacks:\n * - having only a textual form would require runtime parsing of CSS selectors;\n * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a\n * template author).\n *\n * @param projectionSlots? A collection of projection slots. A projection slot can be based\n * on a parsed CSS selectors or set to the wildcard selector (\"*\") in order to match\n * all nodes which do not match any selector. If not specified, a single wildcard\n * selector projection slot will be defined.\n *\n * @codeGenApi\n */\n function ɵɵprojectionDef(projectionSlots) {\n var componentNode = findComponentView(getLView())[T_HOST];\n if (!componentNode.projection) {\n // If no explicit projection slots are defined, fall back to a single\n // projection slot with the wildcard selector.\n var numProjectionSlots = projectionSlots ? projectionSlots.length : 1;\n var projectionHeads = componentNode.projection =\n new Array(numProjectionSlots).fill(null);\n var tails = projectionHeads.slice();\n var componentChild = componentNode.child;\n while (componentChild !== null) {\n var slotIndex = projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0;\n if (slotIndex !== null) {\n if (tails[slotIndex]) {\n tails[slotIndex].projectionNext = componentChild;\n }\n else {\n projectionHeads[slotIndex] = componentChild;\n }\n tails[slotIndex] = componentChild;\n }\n componentChild = componentChild.next;\n }\n }\n }\n var delayProjection = false;\n function setDelayProjection(value) {\n delayProjection = value;\n }\n /**\n * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call\n * to the projectionDef instruction.\n *\n * @param nodeIndex\n * @param selectorIndex:\n * - 0 when the selector is `*` (or unspecified as this is the default value),\n * - 1 based index of the selector from the {@link projectionDef}\n *\n * @codeGenApi\n */\n function ɵɵprojection(nodeIndex, selectorIndex, attrs) {\n if (selectorIndex === void 0) { selectorIndex = 0; }\n var lView = getLView();\n var tProjectionNode = getOrCreateTNode(lView[TVIEW], lView[T_HOST], nodeIndex, 1 /* Projection */, null, attrs || null);\n // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views.\n if (tProjectionNode.projection === null)\n tProjectionNode.projection = selectorIndex;\n // `<ng-content>` has no content\n setIsNotParent();\n // We might need to delay the projection of nodes if they are in the middle of an i18n block\n if (!delayProjection) {\n // re-distribution of projectable nodes is stored on a component's view level\n appendProjectedNodes(lView, tProjectionNode, selectorIndex, findComponentView(lView));\n }\n }\n\n /**\n *\n * Update an interpolated property on an element with a lone bound value\n *\n * Used when the value passed to a property has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div title=\"{{v0}}\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate('title', v0);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate(propName, v0, sanitizer) {\n ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer);\n return ɵɵpropertyInterpolate;\n }\n /**\n *\n * Update an interpolated property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate1(propName, prefix, v0, suffix, sanitizer) {\n var index = getSelectedIndex();\n var interpolatedValue = ɵɵinterpolation1(prefix, v0, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate1;\n }\n /**\n *\n * Update an interpolated property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate2(propName, prefix, v0, i0, v1, suffix, sanitizer) {\n var index = getSelectedIndex();\n var interpolatedValue = ɵɵinterpolation2(prefix, v0, i0, v1, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate2;\n }\n /**\n *\n * Update an interpolated property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate3(propName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer) {\n var index = getSelectedIndex();\n var interpolatedValue = ɵɵinterpolation3(prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate3;\n }\n /**\n *\n * Update an interpolated property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate4(propName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer) {\n var index = getSelectedIndex();\n var interpolatedValue = ɵɵinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate4;\n }\n /**\n *\n * Update an interpolated property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate5(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer) {\n var index = getSelectedIndex();\n var interpolatedValue = ɵɵinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate5;\n }\n /**\n *\n * Update an interpolated property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate6(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate6(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer) {\n var index = getSelectedIndex();\n var interpolatedValue = ɵɵinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate6;\n }\n /**\n *\n * Update an interpolated property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate7(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate7(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer) {\n var index = getSelectedIndex();\n var interpolatedValue = ɵɵinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate7;\n }\n /**\n *\n * Update an interpolated property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate8(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolate8(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer) {\n var index = getSelectedIndex();\n var interpolatedValue = ɵɵinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolate8;\n }\n /**\n * Update an interpolated property on an element with 8 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 7.\n *\n * ```html\n * <div\n * title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolateV(\n * 'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update.\n * @param values The a collection of values and the strings inbetween those values, beginning with a\n * string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵpropertyInterpolateV(propName, values, sanitizer) {\n var index = getSelectedIndex();\n var interpolatedValue = ɵɵinterpolationV(values);\n if (interpolatedValue !== NO_CHANGE) {\n elementPropertyInternal(index, propName, interpolatedValue, sanitizer);\n }\n return ɵɵpropertyInterpolateV;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Create static text node\n *\n * @param index Index of the node in the data array\n * @param value Value to write. This value will be stringified.\n *\n * @codeGenApi\n */\n function ɵɵtext(index, value) {\n var lView = getLView();\n ngDevMode && assertEqual(lView[BINDING_INDEX], lView[TVIEW].bindingStartIndex, 'text nodes should be created before any bindings');\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n var textNative = lView[index + HEADER_OFFSET] = createTextNode(value, lView[RENDERER]);\n ngDevMode && ngDevMode.rendererSetText++;\n var tNode = getOrCreateTNode(lView[TVIEW], lView[T_HOST], index, 3 /* Element */, null, null);\n // Text nodes are self closing.\n setIsNotParent();\n appendChild(textNative, tNode, lView);\n }\n /**\n * Create text node with binding\n * Bindings should be handled externally with the proper interpolation(1-8) method\n *\n * @param value Stringified value to write.\n *\n * @codeGenApi\n */\n function ɵɵtextBinding(value) {\n var lView = getLView();\n var index = getSelectedIndex();\n var bound = bind(lView, value);\n if (bound !== NO_CHANGE) {\n textBindingInternal(lView, index, renderStringify(bound));\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n *\n * Update text content with a lone bound value\n *\n * Used when a text node has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div>{{v0}}</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate(v0);\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate(v0) {\n ɵɵtextInterpolate1('', v0, '');\n return ɵɵtextInterpolate;\n }\n /**\n *\n * Update text content with single bound value surrounded by other text.\n *\n * Used when a text node has 1 interpolated value in it:\n *\n * ```html\n * <div>prefix{{v0}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate1('prefix', v0, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate1(prefix, v0, suffix) {\n var index = getSelectedIndex();\n var lView = getLView();\n var interpolated = ɵɵinterpolation1(prefix, v0, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated);\n }\n return ɵɵtextInterpolate1;\n }\n /**\n *\n * Update text content with 2 bound values surrounded by other text.\n *\n * Used when a text node has 2 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate2(prefix, v0, i0, v1, suffix) {\n var index = getSelectedIndex();\n var lView = getLView();\n var interpolated = ɵɵinterpolation2(prefix, v0, i0, v1, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated);\n }\n return ɵɵtextInterpolate2;\n }\n /**\n *\n * Update text content with 3 bound values surrounded by other text.\n *\n * Used when a text node has 3 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n var index = getSelectedIndex();\n var lView = getLView();\n var interpolated = ɵɵinterpolation3(prefix, v0, i0, v1, i1, v2, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated);\n }\n return ɵɵtextInterpolate3;\n }\n /**\n *\n * Update text content with 4 bound values surrounded by other text.\n *\n * Used when a text node has 4 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see ɵɵtextInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n var index = getSelectedIndex();\n var lView = getLView();\n var interpolated = ɵɵinterpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated);\n }\n return ɵɵtextInterpolate4;\n }\n /**\n *\n * Update text content with 5 bound values surrounded by other text.\n *\n * Used when a text node has 5 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n var index = getSelectedIndex();\n var lView = getLView();\n var interpolated = ɵɵinterpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated);\n }\n return ɵɵtextInterpolate5;\n }\n /**\n *\n * Update text content with 6 bound values surrounded by other text.\n *\n * Used when a text node has 6 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate6(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change. @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n var index = getSelectedIndex();\n var lView = getLView();\n var interpolated = ɵɵinterpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated);\n }\n return ɵɵtextInterpolate6;\n }\n /**\n *\n * Update text content with 7 bound values surrounded by other text.\n *\n * Used when a text node has 7 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate7(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n var index = getSelectedIndex();\n var lView = getLView();\n var interpolated = ɵɵinterpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated);\n }\n return ɵɵtextInterpolate7;\n }\n /**\n *\n * Update text content with 8 bound values surrounded by other text.\n *\n * Used when a text node has 8 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate8(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\n function ɵɵtextInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n var index = getSelectedIndex();\n var lView = getLView();\n var interpolated = ɵɵinterpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated);\n }\n return ɵɵtextInterpolate8;\n }\n /**\n * Update text content with 9 or more bound values other surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolateV(\n * ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n * 'suffix']);\n * ```\n *.\n * @param values The a collection of values and the strings in between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n *\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\n function ɵɵtextInterpolateV(values) {\n var index = getSelectedIndex();\n var lView = getLView();\n var interpolated = ɵɵinterpolationV(values);\n if (interpolated !== NO_CHANGE) {\n textBindingInternal(lView, index, interpolated);\n }\n return ɵɵtextInterpolateV;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Adds a player to an element, directive or component instance that will later be\n * animated once change detection has passed.\n *\n * When a player is added to a reference it will stay active until `player.destroy()`\n * is called. Once called then the player will be removed from the active players\n * present on the associated ref instance.\n *\n * To get a list of all the active players on an element see [getPlayers].\n *\n * @param ref The element, directive or component that the player will be placed on.\n * @param player The player that will be triggered to play once change detection has run.\n */\n function addPlayer(ref, player) {\n var context = getLContext(ref);\n if (!context) {\n ngDevMode && throwInvalidRefError();\n return;\n }\n var element = context.native;\n var lView = context.lView;\n var playerContext = getOrCreatePlayerContext(element, context);\n var rootContext = getRootContext(lView);\n addPlayerInternal(playerContext, rootContext, element, player, 0, ref);\n scheduleTick(rootContext, 2 /* FlushPlayers */);\n }\n /**\n * Returns a list of all the active players present on the provided ref instance (which can\n * be an instance of a directive, component or element).\n *\n * This function will only return players that have been added to the ref instance using\n * `addPlayer` or any players that are active through any template styling bindings\n * (`[style]`, `[style.prop]`, `[class]` and `[class.name]`).\n *\n * @publicApi\n */\n function getPlayers(ref) {\n var context = getLContext(ref);\n if (!context) {\n ngDevMode && throwInvalidRefError();\n return [];\n }\n var stylingContext = getStylingContextFromLView(context.nodeIndex, context.lView);\n var playerContext = stylingContext ? getPlayerContext(stylingContext) : null;\n return playerContext ? getPlayersInternal(playerContext) : [];\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Returns the component instance associated with a given DOM host element.\n * Elements which don't represent components return `null`.\n *\n * @param element Host DOM element from which the component should be retrieved.\n *\n * ```\n * <my-app>\n * #VIEW\n * <div>\n * <child-comp></child-comp>\n * </div>\n * </mp-app>\n *\n * expect(getComponent(<child-comp>) instanceof ChildComponent).toBeTruthy();\n * expect(getComponent(<my-app>) instanceof MyApp).toBeTruthy();\n * ```\n *\n * @publicApi\n */\n function getComponent(element) {\n var context = loadLContextFromNode(element);\n if (context.component === undefined) {\n context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView);\n }\n return context.component;\n }\n /**\n * Returns the component instance associated with a given DOM host element.\n * Elements which don't represent components return `null`.\n *\n * @param element Host DOM element from which the component should be retrieved.\n *\n * ```\n * <my-app>\n * #VIEW\n * <div>\n * <child-comp></child-comp>\n * </div>\n * </mp-app>\n *\n * expect(getComponent(<child-comp>) instanceof ChildComponent).toBeTruthy();\n * expect(getComponent(<my-app>) instanceof MyApp).toBeTruthy();\n * ```\n *\n * @publicApi\n */\n function getContext$1(element) {\n var context = loadLContextFromNode(element);\n return context.lView[CONTEXT];\n }\n /**\n * Returns the component instance associated with view which owns the DOM element (`null`\n * otherwise).\n *\n * @param element DOM element which is owned by an existing component's view.\n *\n * ```\n * <my-app>\n * #VIEW\n * <div>\n * <child-comp></child-comp>\n * </div>\n * </mp-app>\n *\n * expect(getViewComponent(<child-comp>) instanceof MyApp).toBeTruthy();\n * expect(getViewComponent(<my-app>)).toEqual(null);\n * ```\n *\n * @publicApi\n */\n function getViewComponent(element) {\n var context = loadLContext(element);\n var lView = context.lView;\n var parent;\n ngDevMode && assertLView(lView);\n while (lView[HOST] === null && (parent = getLViewParent(lView))) {\n // As long as lView[HOST] is null we know we are part of sub-template such as `*ngIf`\n lView = parent;\n }\n return lView[FLAGS] & 512 /* IsRoot */ ? null : lView[CONTEXT];\n }\n /**\n * Retrieve all root components.\n *\n * Root components are those which have been bootstrapped by Angular.\n *\n * @param target A DOM element, component or directive instance.\n *\n * @publicApi\n */\n function getRootComponents(target) {\n return __spread(getRootContext(target).components);\n }\n /**\n * Retrieves an `Injector` associated with the element, component or directive.\n *\n * @param target A DOM element, component or directive instance.\n *\n * @publicApi\n */\n function getInjector(target) {\n var context = loadLContext(target);\n var tNode = context.lView[TVIEW].data[context.nodeIndex];\n return new NodeInjector(tNode, context.lView);\n }\n /**\n * Retrieve a set of injection tokens at a given DOM node.\n *\n * @param element Element for which the injection tokens should be retrieved.\n * @publicApi\n */\n function getInjectionTokens(element) {\n var context = loadLContext(element, false);\n if (!context)\n return [];\n var lView = context.lView;\n var tView = lView[TVIEW];\n var tNode = tView.data[context.nodeIndex];\n var providerTokens = [];\n var startIndex = tNode.providerIndexes & 65535 /* ProvidersStartIndexMask */;\n var endIndex = tNode.directiveEnd;\n for (var i = startIndex; i < endIndex; i++) {\n var value = tView.data[i];\n if (isDirectiveDefHack(value)) {\n // The fact that we sometimes store Type and sometimes DirectiveDef in this location is a\n // design flaw. We should always store same type so that we can be monomorphic. The issue\n // is that for Components/Directives we store the def instead the type. The correct behavior\n // is that we should always be storing injectable type in this location.\n value = value.type;\n }\n providerTokens.push(value);\n }\n return providerTokens;\n }\n /**\n * Retrieves directives associated with a given DOM host element.\n *\n * @param target A DOM element, component or directive instance.\n *\n * @publicApi\n */\n function getDirectives(target) {\n var context = loadLContext(target);\n if (context.directives === undefined) {\n context.directives = getDirectivesAtNodeIndex(context.nodeIndex, context.lView, false);\n }\n return context.directives || [];\n }\n function loadLContext(target, throwOnNotFound) {\n if (throwOnNotFound === void 0) { throwOnNotFound = true; }\n var context = getLContext(target);\n if (!context && throwOnNotFound) {\n throw new Error(ngDevMode ? \"Unable to find context associated with \" + stringifyForError(target) :\n 'Invalid ng target');\n }\n return context;\n }\n /**\n * Retrieve map of local references.\n *\n * The references are retrieved as a map of local reference name to element or directive instance.\n *\n * @param target A DOM element, component or directive instance.\n *\n * @publicApi\n */\n function getLocalRefs(target) {\n var context = loadLContext(target);\n if (context.localRefs === undefined) {\n context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex);\n }\n return context.localRefs || {};\n }\n /**\n * Retrieve the host element of the component.\n *\n * Use this function to retrieve the host element of the component. The host\n * element is the element which the component is associated with.\n *\n * @param directive Component or Directive for which the host element should be retrieved.\n *\n * @publicApi\n */\n function getHostElement(directive) {\n return getLContext(directive).native;\n }\n function loadLContextFromNode(node) {\n if (!(node instanceof Node))\n throw new Error('Expecting instance of DOM Node');\n return loadLContext(node);\n }\n function isBrowserEvents(listener) {\n // Browser events are those which don't have `useCapture` as boolean.\n return typeof listener.useCapture === 'boolean';\n }\n /**\n * Retrieves a list of DOM listeners.\n *\n * ```\n * <my-app>\n * #VIEW\n * <div (click)=\"doSomething()\">\n * </div>\n * </mp-app>\n *\n * expect(getListeners(<div>)).toEqual({\n * name: 'click',\n * element: <div>,\n * callback: () => doSomething(),\n * useCapture: false\n * });\n * ```\n *\n * @param element Element for which the DOM listeners should be retrieved.\n * @publicApi\n */\n function getListeners(element) {\n var lContext = loadLContextFromNode(element);\n var lView = lContext.lView;\n var tView = lView[TVIEW];\n var lCleanup = lView[CLEANUP];\n var tCleanup = tView.cleanup;\n var listeners = [];\n if (tCleanup && lCleanup) {\n for (var i = 0; i < tCleanup.length;) {\n var firstParam = tCleanup[i++];\n var secondParam = tCleanup[i++];\n if (typeof firstParam === 'string') {\n var name_1 = firstParam;\n var listenerElement = unwrapRNode(lView[secondParam]);\n var callback = lCleanup[tCleanup[i++]];\n var useCaptureOrIndx = tCleanup[i++];\n // if useCaptureOrIndx is boolean then report it as is.\n // if useCaptureOrIndx is positive number then it in unsubscribe method\n // if useCaptureOrIndx is negative number then it is a Subscription\n var useCapture = typeof useCaptureOrIndx === 'boolean' ?\n useCaptureOrIndx :\n (useCaptureOrIndx >= 0 ? false : null);\n if (element == listenerElement) {\n listeners.push({ element: element, name: name_1, callback: callback, useCapture: useCapture });\n }\n }\n }\n }\n listeners.sort(sortListeners);\n return listeners;\n }\n function sortListeners(a, b) {\n if (a.name == b.name)\n return 0;\n return a.name < b.name ? -1 : 1;\n }\n /**\n * This function should not exist because it is megamorphic and only mostly correct.\n *\n * See call site for more info.\n */\n function isDirectiveDefHack(obj) {\n return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * This file introduces series of globally accessible debug tools\n * to allow for the Angular debugging story to function.\n *\n * To see this in action run the following command:\n *\n * bazel run --define=compile=aot\n * //packages/core/test/bundling/todo:devserver\n *\n * Then load `localhost:5432` and start using the console tools.\n */\n /**\n * This value reflects the property on the window where the dev\n * tools are patched (window.ng).\n * */\n var GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';\n var _published = false;\n /**\n * Publishes a collection of default debug tools onto`window.ng`.\n *\n * These functions are available globally when Angular is in development\n * mode and are automatically stripped away from prod mode is on.\n */\n function publishDefaultGlobalUtils() {\n if (!_published) {\n _published = true;\n publishGlobalUtil('getComponent', getComponent);\n publishGlobalUtil('getContext', getContext$1);\n publishGlobalUtil('getListeners', getListeners);\n publishGlobalUtil('getViewComponent', getViewComponent);\n publishGlobalUtil('getHostElement', getHostElement);\n publishGlobalUtil('getInjector', getInjector);\n publishGlobalUtil('getRootComponents', getRootComponents);\n publishGlobalUtil('getDirectives', getDirectives);\n publishGlobalUtil('getPlayers', getPlayers);\n publishGlobalUtil('markDirty', markDirty);\n }\n }\n /**\n * Publishes the given function to `window.ng` so that it can be\n * used from the browser console when an application is not in production.\n */\n function publishGlobalUtil(name, fn) {\n var w = _global;\n ngDevMode && assertDefined(fn, 'function not defined');\n if (w) {\n var container = w[GLOBAL_PUBLISH_EXPANDO_KEY];\n if (!container) {\n container = w[GLOBAL_PUBLISH_EXPANDO_KEY] = {};\n }\n container[name] = fn;\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Bootstraps a Component into an existing host element and returns an instance\n * of the component.\n *\n * Use this function to bootstrap a component into the DOM tree. Each invocation\n * of this function will create a separate tree of components, injectors and\n * change detection cycles and lifetimes. To dynamically insert a new component\n * into an existing tree such that it shares the same injection, change detection\n * and object lifetime, use {@link ViewContainer#createComponent}.\n *\n * @param componentType Component to bootstrap\n * @param options Optional parameters which control bootstrapping\n */\n function renderComponent(componentType /* Type as workaround for: Microsoft/TypeScript/issues/4881 */, opts) {\n if (opts === void 0) { opts = {}; }\n ngDevMode && publishDefaultGlobalUtils();\n ngDevMode && assertComponentType(componentType);\n // this is preemptively set to avoid having test and debug code accidentally\n // read data from a previous application state...\n setActiveHostElement(null);\n var rendererFactory = opts.rendererFactory || domRendererFactory3;\n var sanitizer = opts.sanitizer || null;\n var componentDef = getComponentDef(componentType);\n if (componentDef.type != componentType)\n componentDef.type = componentType;\n // The first index of the first selector is the tag name.\n var componentTag = componentDef.selectors[0][0];\n var hostRNode = locateHostElement(rendererFactory, opts.host || componentTag);\n var rootFlags = componentDef.onPush ? 64 /* Dirty */ | 512 /* IsRoot */ :\n 16 /* CheckAlways */ | 512 /* IsRoot */;\n var rootContext = createRootContext(opts.scheduler, opts.playerHandler);\n var renderer = rendererFactory.createRenderer(hostRNode, componentDef);\n var rootView = createLView(null, createTView(-1, null, 1, 0, null, null, null, null), rootContext, rootFlags, null, null, rendererFactory, renderer, undefined, opts.injector || null);\n var oldView = enterView(rootView, null);\n var component;\n // Will become true if the `try` block executes with no errors.\n var safeToRunHooks = false;\n try {\n if (rendererFactory.begin)\n rendererFactory.begin();\n var componentView = createRootComponentView(hostRNode, componentDef, rootView, rendererFactory, renderer, sanitizer);\n component = createRootComponent(componentView, componentDef, rootView, rootContext, opts.hostFeatures || null);\n addToViewTree(rootView, componentView);\n refreshDescendantViews(rootView); // creation mode pass\n rootView[FLAGS] &= ~4 /* CreationMode */;\n resetPreOrderHookFlags(rootView);\n refreshDescendantViews(rootView); // update mode pass\n safeToRunHooks = true;\n }\n finally {\n leaveView(oldView, safeToRunHooks);\n if (rendererFactory.end)\n rendererFactory.end();\n }\n return component;\n }\n /**\n * Creates the root component view and the root component node.\n *\n * @param rNode Render host element.\n * @param def ComponentDef\n * @param rootView The parent view where the host node is stored\n * @param renderer The current renderer\n * @param sanitizer The sanitizer, if provided\n *\n * @returns Component view created\n */\n function createRootComponentView(rNode, def, rootView, rendererFactory, renderer, sanitizer) {\n resetComponentState();\n var tView = rootView[TVIEW];\n ngDevMode && assertDataInRange(rootView, 0 + HEADER_OFFSET);\n rootView[0 + HEADER_OFFSET] = rNode;\n var tNode = getOrCreateTNode(tView, null, 0, 3 /* Element */, null, null);\n var componentView = createLView(rootView, getOrCreateTView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[HEADER_OFFSET], tNode, rendererFactory, renderer, sanitizer);\n if (tView.firstTemplatePass) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), rootView, def.type);\n tNode.flags = 1 /* isComponent */;\n initNodeFlags(tNode, rootView.length, 1);\n queueComponentIndexForCheck(tNode);\n }\n // Store component view at node index, with node as the HOST\n return rootView[HEADER_OFFSET] = componentView;\n }\n /**\n * Creates a root component and sets it up with features and host bindings. Shared by\n * renderComponent() and ViewContainerRef.createComponent().\n */\n function createRootComponent(componentView, componentDef, rootView, rootContext, hostFeatures) {\n var tView = rootView[TVIEW];\n // Create directive instance with factory() and store at next index in viewData\n var component = instantiateRootComponent(tView, rootView, componentDef);\n rootContext.components.push(component);\n componentView[CONTEXT] = component;\n hostFeatures && hostFeatures.forEach(function (feature) { return feature(component, componentDef); });\n // We want to generate an empty QueryList for root content queries for backwards\n // compatibility with ViewEngine.\n if (componentDef.contentQueries) {\n componentDef.contentQueries(1 /* Create */, component, rootView.length - 1);\n }\n var rootTNode = getPreviousOrParentTNode();\n if (tView.firstTemplatePass && componentDef.hostBindings) {\n var elementIndex = rootTNode.index - HEADER_OFFSET;\n setActiveHostElement(elementIndex);\n var expando = tView.expandoInstructions;\n invokeHostBindingsInCreationMode(componentDef, expando, component, rootTNode, tView.firstTemplatePass);\n rootTNode.onElementCreationFns && applyOnCreateInstructions(rootTNode);\n setActiveHostElement(null);\n }\n if (rootTNode.stylingTemplate) {\n var native = componentView[HOST];\n renderInitialClasses(native, rootTNode.stylingTemplate, componentView[RENDERER]);\n renderInitialStyles(native, rootTNode.stylingTemplate, componentView[RENDERER]);\n }\n return component;\n }\n function createRootContext(scheduler, playerHandler) {\n return {\n components: [],\n scheduler: scheduler || defaultScheduler,\n clean: CLEAN_PROMISE,\n playerHandler: playerHandler || null,\n flags: 0 /* Empty */\n };\n }\n /**\n * Used to enable lifecycle hooks on the root component.\n *\n * Include this feature when calling `renderComponent` if the root component\n * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't\n * be called properly.\n *\n * Example:\n *\n * ```\n * renderComponent(AppComponent, {features: [RootLifecycleHooks]});\n * ```\n */\n function LifecycleHooksFeature(component, def) {\n var rootTView = readPatchedLView(component)[TVIEW];\n var dirIndex = rootTView.data.length - 1;\n registerPreOrderHooks(dirIndex, def, rootTView, -1, -1, -1);\n // TODO(misko): replace `as TNode` with createTNode call. (needs refactoring to lose dep on\n // LNode).\n registerPostOrderHooks(rootTView, { directiveStart: dirIndex, directiveEnd: dirIndex + 1 });\n }\n /**\n * Wait on component until it is rendered.\n *\n * This function returns a `Promise` which is resolved when the component's\n * change detection is executed. This is determined by finding the scheduler\n * associated with the `component`'s render tree and waiting until the scheduler\n * flushes. If nothing is scheduled, the function returns a resolved promise.\n *\n * Example:\n * ```\n * await whenRendered(myComponent);\n * ```\n *\n * @param component Component to wait upon\n * @returns Promise which resolves when the component is rendered.\n */\n function whenRendered(component) {\n return getRootContext(component).clean;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Represents a basic change from a previous to a new value for a single\n * property on a directive instance. Passed as a value in a\n * {@link SimpleChanges} object to the `ngOnChanges` hook.\n *\n * @see `OnChanges`\n *\n * @publicApi\n */\n var SimpleChange = /** @class */ (function () {\n function SimpleChange(previousValue, currentValue, firstChange) {\n this.previousValue = previousValue;\n this.currentValue = currentValue;\n this.firstChange = firstChange;\n }\n /**\n * Check whether the new value is the first value assigned.\n */\n SimpleChange.prototype.isFirstChange = function () { return this.firstChange; };\n return SimpleChange;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * The NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```\n * static ngComponentDef = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature()]\n * });\n * ```\n *\n * @codeGenApi\n */\n function ɵɵNgOnChangesFeature() {\n // This option ensures that the ngOnChanges lifecycle hook will be inherited\n // from superclasses (in InheritDefinitionFeature).\n NgOnChangesFeatureImpl.ngInherit = true;\n return NgOnChangesFeatureImpl;\n }\n function NgOnChangesFeatureImpl(definition) {\n if (definition.type.prototype.ngOnChanges) {\n definition.setInput = ngOnChangesSetInput;\n definition.onChanges = wrapOnChanges();\n }\n }\n function wrapOnChanges() {\n return function wrapOnChangesHook_inPreviousChangesStorage() {\n var simpleChangesStore = getSimpleChangesStore(this);\n var current = simpleChangesStore && simpleChangesStore.current;\n if (current) {\n var previous = simpleChangesStore.previous;\n if (previous === EMPTY_OBJ) {\n simpleChangesStore.previous = current;\n }\n else {\n // New changes are copied to the previous store, so that we don't lose history for inputs\n // which were not changed this time\n for (var key in current) {\n previous[key] = current[key];\n }\n }\n simpleChangesStore.current = null;\n this.ngOnChanges(current);\n }\n };\n }\n function ngOnChangesSetInput(instance, value, publicName, privateName) {\n var simpleChangesStore = getSimpleChangesStore(instance) ||\n setSimpleChangesStore(instance, { previous: EMPTY_OBJ, current: null });\n var current = simpleChangesStore.current || (simpleChangesStore.current = {});\n var previous = simpleChangesStore.previous;\n var declaredName = this.declaredInputs[publicName];\n var previousChange = previous[declaredName];\n current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n instance[privateName] = value;\n }\n var SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\n function getSimpleChangesStore(instance) {\n return instance[SIMPLE_CHANGES_STORE] || null;\n }\n function setSimpleChangesStore(instance, store) {\n return instance[SIMPLE_CHANGES_STORE] = store;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function getSuperType(type) {\n return Object.getPrototypeOf(type.prototype).constructor;\n }\n /**\n * Merges the definition from a super class to a sub class.\n * @param definition The definition that is a SubClass of another directive of component\n *\n * @codeGenApi\n */\n function ɵɵInheritDefinitionFeature(definition) {\n var e_1, _a;\n var superType = getSuperType(definition.type);\n while (superType) {\n var superDef = undefined;\n if (isComponentDef(definition)) {\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ngComponentDef || superType.ngDirectiveDef;\n }\n else {\n if (superType.ngComponentDef) {\n throw new Error('Directives cannot inherit Components');\n }\n // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n superDef = superType.ngDirectiveDef;\n }\n var baseDef = superType.ngBaseDef;\n // Some fields in the definition may be empty, if there were no values to put in them that\n // would've justified object creation. Unwrap them if necessary.\n if (baseDef || superDef) {\n var writeableDef = definition;\n writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);\n }\n if (baseDef) {\n var baseViewQuery = baseDef.viewQuery;\n var baseContentQueries = baseDef.contentQueries;\n var baseHostBindings = baseDef.hostBindings;\n baseHostBindings && inheritHostBindings(definition, baseHostBindings);\n baseViewQuery && inheritViewQuery(definition, baseViewQuery);\n baseContentQueries && inheritContentQueries(definition, baseContentQueries);\n fillProperties(definition.inputs, baseDef.inputs);\n fillProperties(definition.declaredInputs, baseDef.declaredInputs);\n fillProperties(definition.outputs, baseDef.outputs);\n }\n if (superDef) {\n // Merge hostBindings\n var superHostBindings = superDef.hostBindings;\n superHostBindings && inheritHostBindings(definition, superHostBindings);\n // Merge queries\n var superViewQuery = superDef.viewQuery;\n var superContentQueries = superDef.contentQueries;\n superViewQuery && inheritViewQuery(definition, superViewQuery);\n superContentQueries && inheritContentQueries(definition, superContentQueries);\n // Merge inputs and outputs\n fillProperties(definition.inputs, superDef.inputs);\n fillProperties(definition.declaredInputs, superDef.declaredInputs);\n fillProperties(definition.outputs, superDef.outputs);\n // Inherit hooks\n // Assume super class inheritance feature has already run.\n definition.afterContentChecked =\n definition.afterContentChecked || superDef.afterContentChecked;\n definition.afterContentInit = definition.afterContentInit || superDef.afterContentInit;\n definition.afterViewChecked = definition.afterViewChecked || superDef.afterViewChecked;\n definition.afterViewInit = definition.afterViewInit || superDef.afterViewInit;\n definition.doCheck = definition.doCheck || superDef.doCheck;\n definition.onDestroy = definition.onDestroy || superDef.onDestroy;\n definition.onInit = definition.onInit || superDef.onInit;\n // Run parent features\n var features = superDef.features;\n if (features) {\n try {\n for (var features_1 = __values(features), features_1_1 = features_1.next(); !features_1_1.done; features_1_1 = features_1.next()) {\n var feature = features_1_1.value;\n if (feature && feature.ngInherit) {\n feature(definition);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (features_1_1 && !features_1_1.done && (_a = features_1.return)) _a.call(features_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n }\n else {\n // Even if we don't have a definition, check the type for the hooks and use those if need be\n var superPrototype = superType.prototype;\n if (superPrototype) {\n definition.afterContentChecked =\n definition.afterContentChecked || superPrototype.ngAfterContentChecked;\n definition.afterContentInit =\n definition.afterContentInit || superPrototype.ngAfterContentInit;\n definition.afterViewChecked =\n definition.afterViewChecked || superPrototype.ngAfterViewChecked;\n definition.afterViewInit = definition.afterViewInit || superPrototype.ngAfterViewInit;\n definition.doCheck = definition.doCheck || superPrototype.ngDoCheck;\n definition.onDestroy = definition.onDestroy || superPrototype.ngOnDestroy;\n definition.onInit = definition.onInit || superPrototype.ngOnInit;\n if (superPrototype.ngOnChanges) {\n ɵɵNgOnChangesFeature()(definition);\n }\n }\n }\n superType = Object.getPrototypeOf(superType);\n }\n }\n function maybeUnwrapEmpty(value) {\n if (value === EMPTY_OBJ) {\n return {};\n }\n else if (value === EMPTY_ARRAY$2) {\n return [];\n }\n else {\n return value;\n }\n }\n function inheritViewQuery(definition, superViewQuery) {\n var prevViewQuery = definition.viewQuery;\n if (prevViewQuery) {\n definition.viewQuery = function (rf, ctx) {\n superViewQuery(rf, ctx);\n prevViewQuery(rf, ctx);\n };\n }\n else {\n definition.viewQuery = superViewQuery;\n }\n }\n function inheritContentQueries(definition, superContentQueries) {\n var prevContentQueries = definition.contentQueries;\n if (prevContentQueries) {\n definition.contentQueries = function (rf, ctx, directiveIndex) {\n superContentQueries(rf, ctx, directiveIndex);\n prevContentQueries(rf, ctx, directiveIndex);\n };\n }\n else {\n definition.contentQueries = superContentQueries;\n }\n }\n function inheritHostBindings(definition, superHostBindings) {\n var prevHostBindings = definition.hostBindings;\n // If the subclass does not have a host bindings function, we set the subclass host binding\n // function to be the superclass's (in this feature). We should check if they're the same here\n // to ensure we don't inherit it twice.\n if (superHostBindings !== prevHostBindings) {\n if (prevHostBindings) {\n // because inheritance is unknown during compile time, the runtime code\n // needs to be informed of the super-class depth so that instruction code\n // can distinguish one host bindings function from another. The reason why\n // relying on the directive uniqueId exclusively is not enough is because the\n // uniqueId value and the directive instance stay the same between hostBindings\n // calls throughout the directive inheritance chain. This means that without\n // a super-class depth value, there is no way to know whether a parent or\n // sub-class host bindings function is currently being executed.\n definition.hostBindings = function (rf, ctx, elementIndex) {\n // The reason why we increment first and then decrement is so that parent\n // hostBindings calls have a higher id value compared to sub-class hostBindings\n // calls (this way the leaf directive is always at a super-class depth of 0).\n adjustActiveDirectiveSuperClassDepthPosition(1);\n try {\n superHostBindings(rf, ctx, elementIndex);\n }\n finally {\n adjustActiveDirectiveSuperClassDepthPosition(-1);\n }\n prevHostBindings(rf, ctx, elementIndex);\n };\n }\n else {\n definition.hostBindings = superHostBindings;\n }\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Resolves the providers which are defined in the DirectiveDef.\n *\n * When inserting the tokens and the factories in their respective arrays, we can assume that\n * this method is called first for the component (if any), and then for other directives on the same\n * node.\n * As a consequence,the providers are always processed in that order:\n * 1) The view providers of the component\n * 2) The providers of the component\n * 3) The providers of the other directives\n * This matches the structure of the injectables arrays of a view (for each node).\n * So the tokens and the factories can be pushed at the end of the arrays, except\n * in one case for multi providers.\n *\n * @param def the directive definition\n * @param providers: Array of `providers`.\n * @param viewProviders: Array of `viewProviders`.\n */\n function providersResolver(def, providers, viewProviders) {\n var lView = getLView();\n var tView = lView[TVIEW];\n if (tView.firstTemplatePass) {\n var isComponent = isComponentDef(def);\n // The list of view providers is processed first, and the flags are updated\n resolveProvider$1(viewProviders, tView.data, tView.blueprint, isComponent, true);\n // Then, the list of providers is processed, and the flags are updated\n resolveProvider$1(providers, tView.data, tView.blueprint, isComponent, false);\n }\n }\n /**\n * Resolves a provider and publishes it to the DI system.\n */\n function resolveProvider$1(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) {\n provider = resolveForwardRef(provider);\n if (Array.isArray(provider)) {\n // Recursively call `resolveProvider`\n // Recursion is OK in this case because this code will not be in hot-path once we implement\n // cloning of the initial state.\n for (var i = 0; i < provider.length; i++) {\n resolveProvider$1(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n }\n }\n else {\n var lView = getLView();\n var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n var providerFactory = providerToFactory(provider);\n var tNode = getPreviousOrParentTNode();\n var beginIndex = tNode.providerIndexes & 65535 /* ProvidersStartIndexMask */;\n var endIndex = tNode.directiveStart;\n var cptViewProvidersCount = tNode.providerIndexes >> 16 /* CptViewProvidersCountShift */;\n if (isClassProvider(provider) || isTypeProvider(provider)) {\n var prototype = (provider.useClass || provider).prototype;\n var ngOnDestroy = prototype.ngOnDestroy;\n if (ngOnDestroy) {\n var tView = lView[TVIEW];\n (tView.destroyHooks || (tView.destroyHooks = [])).push(tInjectables.length, ngOnDestroy);\n }\n }\n if (isTypeProvider(provider) || !provider.multi) {\n // Single provider case: the factory is created and pushed immediately\n var factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n var existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);\n if (existingFactoryIndex == -1) {\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), lView, token);\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += 65536 /* CptViewProvidersCountShifter */;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n }\n else {\n lInjectablesBlueprint[existingFactoryIndex] = factory;\n lView[existingFactoryIndex] = factory;\n }\n }\n else {\n // Multi provider case:\n // We create a multi factory which is going to aggregate all the values.\n // Since the output of such a factory depends on content or view injection,\n // we create two of them, which are linked together.\n //\n // The first one (for view providers) is always in the first block of the injectables array,\n // and the second one (for providers) is always in the second block.\n // This is important because view providers have higher priority. When a multi token\n // is being looked up, the view providers should be found first.\n // Note that it is not possible to have a multi factory in the third block (directive block).\n //\n // The algorithm to process multi providers is as follows:\n // 1) If the multi provider comes from the `viewProviders` of the component:\n // a) If the special view providers factory doesn't exist, it is created and pushed.\n // b) Else, the multi provider is added to the existing multi factory.\n // 2) If the multi provider comes from the `providers` of the component or of another\n // directive:\n // a) If the multi factory doesn't exist, it is created and provider pushed into it.\n // It is also linked to the multi factory for view providers, if it exists.\n // b) Else, the multi provider is added to the existing multi factory.\n var existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n var existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n var doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingProvidersFactoryIndex];\n var doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 &&\n lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n if (isViewProvider && !doesViewProvidersFactoryExist ||\n !isViewProvider && !doesProvidersFactoryExist) {\n // Cases 1.a and 2.a\n diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), lView, token);\n var factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n if (!isViewProvider && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n }\n tInjectables.push(token);\n tNode.directiveStart++;\n tNode.directiveEnd++;\n if (isViewProvider) {\n tNode.providerIndexes += 65536 /* CptViewProvidersCountShifter */;\n }\n lInjectablesBlueprint.push(factory);\n lView.push(factory);\n }\n else {\n // Cases 1.b and 2.b\n multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex : existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);\n }\n if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;\n }\n }\n }\n }\n /**\n * Add a factory in a multi factory.\n */\n function multiFactoryAdd(multiFactory, factory, isComponentProvider) {\n multiFactory.multi.push(factory);\n if (isComponentProvider) {\n multiFactory.componentProviders++;\n }\n }\n /**\n * Returns the index of item in the array, but only in the begin to end range.\n */\n function indexOf(item, arr, begin, end) {\n for (var i = begin; i < end; i++) {\n if (arr[i] === item)\n return i;\n }\n return -1;\n }\n /**\n * Use this with `multi` `providers`.\n */\n function multiProvidersFactoryResolver(_, tData, lData, tNode) {\n return multiResolve(this.multi, []);\n }\n /**\n * Use this with `multi` `viewProviders`.\n *\n * This factory knows how to concatenate itself with the existing `multi` `providers`.\n */\n function multiViewProvidersFactoryResolver(_, tData, lData, tNode) {\n var factories = this.multi;\n var result;\n if (this.providerFactory) {\n var componentCount = this.providerFactory.componentProviders;\n var multiProviders = getNodeInjectable(tData, lData, this.providerFactory.index, tNode);\n // Copy the section of the array which contains `multi` `providers` from the component\n result = multiProviders.slice(0, componentCount);\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n // Copy the section of the array which contains `multi` `providers` from other directives\n for (var i = componentCount; i < multiProviders.length; i++) {\n result.push(multiProviders[i]);\n }\n }\n else {\n result = [];\n // Insert the `viewProvider` instances.\n multiResolve(factories, result);\n }\n return result;\n }\n /**\n * Maps an array of factories into an array of values.\n */\n function multiResolve(factories, result) {\n for (var i = 0; i < factories.length; i++) {\n var factory = factories[i];\n result.push(factory());\n }\n return result;\n }\n /**\n * Creates a multi factory.\n */\n function multiFactory(factoryFn, index, isViewProvider, isComponent, f) {\n var factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject);\n factory.multi = [];\n factory.index = index;\n factory.componentProviders = 0;\n multiFactoryAdd(factory, f, isComponent && !isViewProvider);\n return factory;\n }\n\n /**\n * This feature resolves the providers of a directive (or component),\n * and publish them into the DI system, making it visible to others for injection.\n *\n * For example:\n * ```ts\n * class ComponentWithProviders {\n * constructor(private greeter: GreeterDE) {}\n *\n * static ngComponentDef = defineComponent({\n * type: ComponentWithProviders,\n * selectors: [['component-with-providers']],\n * factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),\n * consts: 1,\n * vars: 1,\n * template: function(fs: RenderFlags, ctx: ComponentWithProviders) {\n * if (fs & RenderFlags.Create) {\n * ɵɵtext(0);\n * }\n * if (fs & RenderFlags.Update) {\n * ɵɵselect(0);\n * ɵɵtextBinding(ctx.greeter.greet());\n * }\n * },\n * features: [ProvidersFeature([GreeterDE])]\n * });\n * }\n * ```\n *\n * @param definition\n *\n * @codeGenApi\n */\n function ɵɵProvidersFeature(providers, viewProviders) {\n if (viewProviders === void 0) { viewProviders = []; }\n return function (definition) {\n definition.providersResolver =\n function (def, processProvidersFn) {\n return providersResolver(def, //\n processProvidersFn ? processProvidersFn(providers) : providers, //\n viewProviders);\n };\n };\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Represents a component created by a `ComponentFactory`.\n * Provides access to the component instance and related objects,\n * and provides the means of destroying the instance.\n *\n * @publicApi\n */\n var ComponentRef = /** @class */ (function () {\n function ComponentRef() {\n }\n return ComponentRef;\n }());\n /**\n * Base class for a factory that can create a component dynamically.\n * Instantiate a factory for a given type of component with `resolveComponentFactory()`.\n * Use the resulting `ComponentFactory.create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n *\n * @publicApi\n */\n var ComponentFactory = /** @class */ (function () {\n function ComponentFactory() {\n }\n return ComponentFactory;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function noComponentFactoryError(component) {\n var error = Error(\"No component factory found for \" + stringify(component) + \". Did you add it to @NgModule.entryComponents?\");\n error[ERROR_COMPONENT] = component;\n return error;\n }\n var ERROR_COMPONENT = 'ngComponent';\n var _NullComponentFactoryResolver = /** @class */ (function () {\n function _NullComponentFactoryResolver() {\n }\n _NullComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {\n throw noComponentFactoryError(component);\n };\n return _NullComponentFactoryResolver;\n }());\n /**\n * A simple registry that maps `Components` to generated `ComponentFactory` classes\n * that can be used to create instances of components.\n * Use to obtain the factory for a given component type,\n * then use the factory's `create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n * @publicApi\n */\n var ComponentFactoryResolver = /** @class */ (function () {\n function ComponentFactoryResolver() {\n }\n ComponentFactoryResolver.NULL = new _NullComponentFactoryResolver();\n return ComponentFactoryResolver;\n }());\n var CodegenComponentFactoryResolver = /** @class */ (function () {\n function CodegenComponentFactoryResolver(factories, _parent, _ngModule) {\n this._parent = _parent;\n this._ngModule = _ngModule;\n this._factories = new Map();\n for (var i = 0; i < factories.length; i++) {\n var factory = factories[i];\n this._factories.set(factory.componentType, factory);\n }\n }\n CodegenComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {\n var factory = this._factories.get(component);\n if (!factory && this._parent) {\n factory = this._parent.resolveComponentFactory(component);\n }\n if (!factory) {\n throw noComponentFactoryError(component);\n }\n return new ComponentFactoryBoundToModule(factory, this._ngModule);\n };\n return CodegenComponentFactoryResolver;\n }());\n var ComponentFactoryBoundToModule = /** @class */ (function (_super) {\n __extends(ComponentFactoryBoundToModule, _super);\n function ComponentFactoryBoundToModule(factory, ngModule) {\n var _this = _super.call(this) || this;\n _this.factory = factory;\n _this.ngModule = ngModule;\n _this.selector = factory.selector;\n _this.componentType = factory.componentType;\n _this.ngContentSelectors = factory.ngContentSelectors;\n _this.inputs = factory.inputs;\n _this.outputs = factory.outputs;\n return _this;\n }\n ComponentFactoryBoundToModule.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {\n return this.factory.create(injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);\n };\n return ComponentFactoryBoundToModule;\n }(ComponentFactory));\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Represents an instance of an NgModule created via a {@link NgModuleFactory}.\n *\n * `NgModuleRef` provides access to the NgModule Instance as well other objects related to this\n * NgModule Instance.\n *\n * @publicApi\n */\n var NgModuleRef = /** @class */ (function () {\n function NgModuleRef() {\n }\n return NgModuleRef;\n }());\n /**\n * @publicApi\n */\n var NgModuleFactory = /** @class */ (function () {\n function NgModuleFactory() {\n }\n return NgModuleFactory;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var ViewRef = /** @class */ (function () {\n function ViewRef(_lView, _context, _componentIndex) {\n this._context = _context;\n this._componentIndex = _componentIndex;\n this._appRef = null;\n this._viewContainerRef = null;\n /**\n * @internal\n */\n this._tViewNode = null;\n this._lView = _lView;\n }\n Object.defineProperty(ViewRef.prototype, \"rootNodes\", {\n get: function () {\n if (this._lView[HOST] == null) {\n var tView = this._lView[T_HOST];\n return collectNativeNodes(this._lView, tView, []);\n }\n return [];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewRef.prototype, \"context\", {\n get: function () { return this._context ? this._context : this._lookUpContext(); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewRef.prototype, \"destroyed\", {\n get: function () {\n return (this._lView[FLAGS] & 256 /* Destroyed */) === 256 /* Destroyed */;\n },\n enumerable: true,\n configurable: true\n });\n ViewRef.prototype.destroy = function () {\n if (this._appRef) {\n this._appRef.detachView(this);\n }\n else if (this._viewContainerRef) {\n var index = this._viewContainerRef.indexOf(this);\n if (index > -1) {\n this._viewContainerRef.detach(index);\n }\n this._viewContainerRef = null;\n }\n destroyLView(this._lView);\n };\n ViewRef.prototype.onDestroy = function (callback) { storeCleanupFn(this._lView, callback); };\n /**\n * Marks a view and all of its ancestors dirty.\n *\n * It also triggers change detection by calling `scheduleTick` internally, which coalesces\n * multiple `markForCheck` calls to into one change detection run.\n *\n * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is\n * checked when it needs to be re-rendered but the two normal triggers haven't marked it\n * dirty (i.e. inputs haven't changed and events haven't fired in the view).\n *\n * <!-- TODO: Add a link to a chapter on OnPush components -->\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * @Component({\n * selector: 'my-app',\n * template: `Number of ticks: {{numberOfTicks}}`\n * changeDetection: ChangeDetectionStrategy.OnPush,\n * })\n * class AppComponent {\n * numberOfTicks = 0;\n *\n * constructor(private ref: ChangeDetectorRef) {\n * setInterval(() => {\n * this.numberOfTicks++;\n * // the following is required, otherwise the view will not be updated\n * this.ref.markForCheck();\n * }, 1000);\n * }\n * }\n * ```\n */\n ViewRef.prototype.markForCheck = function () { markViewDirty(this._lView); };\n /**\n * Detaches the view from the change detection tree.\n *\n * Detached views will not be checked during change detection runs until they are\n * re-attached, even if they are dirty. `detach` can be used in combination with\n * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change\n * detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds. We can do that by detaching\n * the component's change detector and doing a local check every five seconds.\n *\n * ```typescript\n * class DataProvider {\n * // in a real application the returned data will be different every time\n * get data() {\n * return [1,2,3,4,5];\n * }\n * }\n *\n * @Component({\n * selector: 'giant-list',\n * template: `\n * <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n * `,\n * })\n * class GiantList {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n * ref.detach();\n * setInterval(() => {\n * this.ref.detectChanges();\n * }, 5000);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * providers: [DataProvider],\n * template: `\n * <giant-list><giant-list>\n * `,\n * })\n * class App {\n * }\n * ```\n */\n ViewRef.prototype.detach = function () { this._lView[FLAGS] &= ~128 /* Attached */; };\n /**\n * Re-attaches a view to the change detection tree.\n *\n * This can be used to re-attach views that were previously detached from the tree\n * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates a component displaying `live` data. The component will detach\n * its change detector from the main change detector tree when the component's live property\n * is set to false.\n *\n * ```typescript\n * class DataProvider {\n * data = 1;\n *\n * constructor() {\n * setInterval(() => {\n * this.data = this.data * 2;\n * }, 500);\n * }\n * }\n *\n * @Component({\n * selector: 'live-data',\n * inputs: ['live'],\n * template: 'Data: {{dataProvider.data}}'\n * })\n * class LiveData {\n * constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n *\n * set live(value) {\n * if (value) {\n * this.ref.reattach();\n * } else {\n * this.ref.detach();\n * }\n * }\n * }\n *\n * @Component({\n * selector: 'my-app',\n * providers: [DataProvider],\n * template: `\n * Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n * <live-data [live]=\"live\"><live-data>\n * `,\n * })\n * class AppComponent {\n * live = true;\n * }\n * ```\n */\n ViewRef.prototype.reattach = function () { this._lView[FLAGS] |= 128 /* Attached */; };\n /**\n * Checks the view and its children.\n *\n * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement\n * local change detection checks.\n *\n * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n *\n * @usageNotes\n * ### Example\n *\n * The following example defines a component with a large list of readonly data.\n * Imagine, the data changes constantly, many times per second. For performance reasons,\n * we want to check and update the list every five seconds.\n *\n * We can do that by detaching the component's change detector and doing a local change detection\n * check every five seconds.\n *\n * See {@link ChangeDetectorRef#detach detach} for more information.\n */\n ViewRef.prototype.detectChanges = function () { detectChangesInternal(this._lView, this.context); };\n /**\n * Checks the change detector and its children, and throws if any changes are detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n */\n ViewRef.prototype.checkNoChanges = function () { checkNoChangesInternal(this._lView, this.context); };\n ViewRef.prototype.attachToViewContainerRef = function (vcRef) {\n if (this._appRef) {\n throw new Error('This view is already attached directly to the ApplicationRef!');\n }\n this._viewContainerRef = vcRef;\n };\n ViewRef.prototype.detachFromAppRef = function () {\n this._appRef = null;\n renderDetachView(this._lView);\n };\n ViewRef.prototype.attachToAppRef = function (appRef) {\n if (this._viewContainerRef) {\n throw new Error('This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n };\n ViewRef.prototype._lookUpContext = function () {\n return this._context = getLViewParent(this._lView)[this._componentIndex];\n };\n return ViewRef;\n }());\n /** @internal */\n var RootViewRef = /** @class */ (function (_super) {\n __extends(RootViewRef, _super);\n function RootViewRef(_view) {\n var _this = _super.call(this, _view, null, -1) || this;\n _this._view = _view;\n return _this;\n }\n RootViewRef.prototype.detectChanges = function () { detectChangesInRootView(this._view); };\n RootViewRef.prototype.checkNoChanges = function () { checkNoChangesInRootView(this._view); };\n Object.defineProperty(RootViewRef.prototype, \"context\", {\n get: function () { return null; },\n enumerable: true,\n configurable: true\n });\n return RootViewRef;\n }(ViewRef));\n function collectNativeNodes(lView, parentTNode, result) {\n var tNodeChild = parentTNode.child;\n while (tNodeChild) {\n var nativeNode = getNativeByTNode(tNodeChild, lView);\n nativeNode && result.push(nativeNode);\n if (tNodeChild.type === 4 /* ElementContainer */) {\n collectNativeNodes(lView, tNodeChild, result);\n }\n else if (tNodeChild.type === 1 /* Projection */) {\n var componentView = findComponentView(lView);\n var componentHost = componentView[T_HOST];\n var parentView = getLViewParent(componentView);\n var currentProjectedNode = componentHost.projection[tNodeChild.projection];\n while (currentProjectedNode && parentView) {\n result.push(getNativeByTNode(currentProjectedNode, parentView));\n currentProjectedNode = currentProjectedNode.next;\n }\n }\n tNodeChild = tNodeChild.next;\n }\n return result;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Creates an ElementRef from the most recent node.\n *\n * @returns The ElementRef instance to use\n */\n function injectElementRef(ElementRefToken) {\n return createElementRef(ElementRefToken, getPreviousOrParentTNode(), getLView());\n }\n var R3ElementRef;\n /**\n * Creates an ElementRef given a node.\n *\n * @param ElementRefToken The ElementRef type\n * @param tNode The node for which you'd like an ElementRef\n * @param view The view to which the node belongs\n * @returns The ElementRef instance to use\n */\n function createElementRef(ElementRefToken, tNode, view) {\n if (!R3ElementRef) {\n // TODO: Fix class name, should be ElementRef, but there appears to be a rollup bug\n R3ElementRef = /** @class */ (function (_super) {\n __extends(ElementRef_, _super);\n function ElementRef_() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ElementRef_;\n }(ElementRefToken));\n }\n return new R3ElementRef(getNativeByTNode(tNode, view));\n }\n var R3TemplateRef;\n /**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\n function injectTemplateRef(TemplateRefToken, ElementRefToken) {\n return createTemplateRef(TemplateRefToken, ElementRefToken, getPreviousOrParentTNode(), getLView());\n }\n /**\n * Creates a TemplateRef and stores it on the injector.\n *\n * @param TemplateRefToken The TemplateRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node that is requesting a TemplateRef\n * @param hostView The view to which the node belongs\n * @returns The TemplateRef instance to use\n */\n function createTemplateRef(TemplateRefToken, ElementRefToken, hostTNode, hostView) {\n if (!R3TemplateRef) {\n // TODO: Fix class name, should be TemplateRef, but there appears to be a rollup bug\n R3TemplateRef = /** @class */ (function (_super) {\n __extends(TemplateRef_, _super);\n function TemplateRef_(_declarationParentView, elementRef, _tView, _hostLContainer, _injectorIndex) {\n var _this = _super.call(this) || this;\n _this._declarationParentView = _declarationParentView;\n _this.elementRef = elementRef;\n _this._tView = _tView;\n _this._hostLContainer = _hostLContainer;\n _this._injectorIndex = _injectorIndex;\n return _this;\n }\n TemplateRef_.prototype.createEmbeddedView = function (context, container, index) {\n var currentQueries = this._declarationParentView[QUERIES];\n // Query container may be missing if this view was created in a directive\n // constructor. Create it now to avoid losing results in embedded views.\n if (currentQueries && this._hostLContainer[QUERIES] == null) {\n this._hostLContainer[QUERIES] = currentQueries.container();\n }\n var lView = createEmbeddedViewAndNode(this._tView, context, this._declarationParentView, this._hostLContainer[QUERIES], this._injectorIndex);\n if (container) {\n insertView(lView, container, index);\n }\n renderEmbeddedTemplate(lView, this._tView, context);\n var viewRef = new ViewRef(lView, context, -1);\n viewRef._tViewNode = lView[T_HOST];\n return viewRef;\n };\n return TemplateRef_;\n }(TemplateRefToken));\n }\n if (hostTNode.type === 0 /* Container */) {\n var hostContainer = hostView[hostTNode.index];\n ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');\n return new R3TemplateRef(hostView, createElementRef(ElementRefToken, hostTNode, hostView), hostTNode.tViews, hostContainer, hostTNode.injectorIndex);\n }\n else {\n return null;\n }\n }\n var R3ViewContainerRef;\n /**\n * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n * already exists, retrieves the existing ViewContainerRef.\n *\n * @returns The ViewContainerRef instance to use\n */\n function injectViewContainerRef(ViewContainerRefToken, ElementRefToken) {\n var previousTNode = getPreviousOrParentTNode();\n return createContainerRef(ViewContainerRefToken, ElementRefToken, previousTNode, getLView());\n }\n /**\n * Creates a ViewContainerRef and stores it on the injector.\n *\n * @param ViewContainerRefToken The ViewContainerRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node that is requesting a ViewContainerRef\n * @param hostView The view to which the node belongs\n * @returns The ViewContainerRef instance to use\n */\n function createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, hostView) {\n if (!R3ViewContainerRef) {\n // TODO: Fix class name, should be ViewContainerRef, but there appears to be a rollup bug\n R3ViewContainerRef = /** @class */ (function (_super) {\n __extends(ViewContainerRef_, _super);\n function ViewContainerRef_(_lContainer, _hostTNode, _hostView) {\n var _this = _super.call(this) || this;\n _this._lContainer = _lContainer;\n _this._hostTNode = _hostTNode;\n _this._hostView = _hostView;\n return _this;\n }\n Object.defineProperty(ViewContainerRef_.prototype, \"element\", {\n get: function () {\n return createElementRef(ElementRefToken, this._hostTNode, this._hostView);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewContainerRef_.prototype, \"injector\", {\n get: function () { return new NodeInjector(this._hostTNode, this._hostView); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewContainerRef_.prototype, \"parentInjector\", {\n /** @deprecated No replacement */\n get: function () {\n var parentLocation = getParentInjectorLocation(this._hostTNode, this._hostView);\n var parentView = getParentInjectorView(parentLocation, this._hostView);\n var parentTNode = getParentInjectorTNode(parentLocation, this._hostView, this._hostTNode);\n return !hasParentInjector(parentLocation) || parentTNode == null ?\n new NodeInjector(null, this._hostView) :\n new NodeInjector(parentTNode, parentView);\n },\n enumerable: true,\n configurable: true\n });\n ViewContainerRef_.prototype.clear = function () {\n while (this.length) {\n this.remove(0);\n }\n };\n ViewContainerRef_.prototype.get = function (index) {\n return this._lContainer[VIEW_REFS] !== null && this._lContainer[VIEW_REFS][index] || null;\n };\n Object.defineProperty(ViewContainerRef_.prototype, \"length\", {\n get: function () {\n // Note that if there are no views, the container\n // length will be smaller than the header offset.\n var viewAmount = this._lContainer.length - CONTAINER_HEADER_OFFSET;\n return viewAmount > 0 ? viewAmount : 0;\n },\n enumerable: true,\n configurable: true\n });\n ViewContainerRef_.prototype.createEmbeddedView = function (templateRef, context, index) {\n this.allocateContainerIfNeeded();\n var adjustedIdx = this._adjustIndex(index);\n var viewRef = templateRef\n .createEmbeddedView(context || {}, this._lContainer, adjustedIdx);\n viewRef.attachToViewContainerRef(this);\n this._lContainer[VIEW_REFS].splice(adjustedIdx, 0, viewRef);\n return viewRef;\n };\n ViewContainerRef_.prototype.createComponent = function (componentFactory, index, injector, projectableNodes, ngModuleRef) {\n var contextInjector = injector || this.parentInjector;\n if (!ngModuleRef && componentFactory.ngModule == null && contextInjector) {\n ngModuleRef = contextInjector.get(NgModuleRef, null);\n }\n var componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n this.insert(componentRef.hostView, index);\n return componentRef;\n };\n ViewContainerRef_.prototype.insert = function (viewRef, index) {\n if (viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n this.allocateContainerIfNeeded();\n var lView = viewRef._lView;\n var adjustedIdx = this._adjustIndex(index);\n if (viewAttachedToContainer(lView)) {\n // If view is already attached, fall back to move() so we clean up\n // references appropriately.\n return this.move(viewRef, adjustedIdx);\n }\n insertView(lView, this._lContainer, adjustedIdx);\n var beforeNode = getBeforeNodeForView(adjustedIdx, this._lContainer);\n addRemoveViewFromContainer(lView, true, beforeNode);\n viewRef.attachToViewContainerRef(this);\n this._lContainer[VIEW_REFS].splice(adjustedIdx, 0, viewRef);\n return viewRef;\n };\n ViewContainerRef_.prototype.move = function (viewRef, newIndex) {\n if (viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n var index = this.indexOf(viewRef);\n if (index !== -1)\n this.detach(index);\n this.insert(viewRef, newIndex);\n return viewRef;\n };\n ViewContainerRef_.prototype.indexOf = function (viewRef) {\n return this._lContainer[VIEW_REFS] !== null ?\n this._lContainer[VIEW_REFS].indexOf(viewRef) :\n 0;\n };\n ViewContainerRef_.prototype.remove = function (index) {\n this.allocateContainerIfNeeded();\n var adjustedIdx = this._adjustIndex(index, -1);\n removeView(this._lContainer, adjustedIdx);\n this._lContainer[VIEW_REFS].splice(adjustedIdx, 1);\n };\n ViewContainerRef_.prototype.detach = function (index) {\n this.allocateContainerIfNeeded();\n var adjustedIdx = this._adjustIndex(index, -1);\n var view = detachView(this._lContainer, adjustedIdx);\n var wasDetached = view && this._lContainer[VIEW_REFS].splice(adjustedIdx, 1)[0] != null;\n return wasDetached ? new ViewRef(view, view[CONTEXT], -1) : null;\n };\n ViewContainerRef_.prototype._adjustIndex = function (index, shift) {\n if (shift === void 0) { shift = 0; }\n if (index == null) {\n return this.length + shift;\n }\n if (ngDevMode) {\n assertGreaterThan(index, -1, 'index must be positive');\n // +1 because it's legal to insert at the end.\n assertLessThan(index, this.length + 1 + shift, 'index');\n }\n return index;\n };\n ViewContainerRef_.prototype.allocateContainerIfNeeded = function () {\n if (this._lContainer[VIEW_REFS] === null) {\n this._lContainer[VIEW_REFS] = [];\n }\n };\n return ViewContainerRef_;\n }(ViewContainerRefToken));\n }\n ngDevMode && assertNodeOfPossibleTypes(hostTNode, 0 /* Container */, 3 /* Element */, 4 /* ElementContainer */);\n var lContainer;\n var slotValue = hostView[hostTNode.index];\n if (isLContainer(slotValue)) {\n // If the host is a container, we don't need to create a new LContainer\n lContainer = slotValue;\n lContainer[ACTIVE_INDEX] = -1;\n }\n else {\n var commentNode = void 0;\n // If the host is an element container, the native host element is guaranteed to be a\n // comment and we can reuse that comment as anchor element for the new LContainer.\n if (hostTNode.type === 4 /* ElementContainer */) {\n commentNode = unwrapRNode(slotValue);\n }\n else {\n ngDevMode && ngDevMode.rendererCreateComment++;\n commentNode = hostView[RENDERER].createComment(ngDevMode ? 'container' : '');\n }\n // A container can be created on the root (topmost / bootstrapped) component and in this case we\n // can't use LTree to insert container's marker node (both parent of a comment node and the\n // commend node itself is located outside of elements hold by LTree). In this specific case we\n // use low-level DOM manipulation to insert container's marker (comment) node.\n if (isRootView(hostView)) {\n var renderer = hostView[RENDERER];\n var hostNative = getNativeByTNode(hostTNode, hostView);\n var parentOfHostNative = nativeParentNode(renderer, hostNative);\n nativeInsertBefore(renderer, parentOfHostNative, commentNode, nativeNextSibling(renderer, hostNative));\n }\n else {\n appendChild(commentNode, hostTNode, hostView);\n }\n hostView[hostTNode.index] = lContainer =\n createLContainer(slotValue, hostView, commentNode, hostTNode, true);\n addToViewTree(hostView, lContainer);\n }\n return new R3ViewContainerRef(lContainer, hostTNode, hostView);\n }\n /** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\n function injectChangeDetectorRef() {\n return createViewRef(getPreviousOrParentTNode(), getLView(), null);\n }\n /**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n *\n * @param hostTNode The node that is requesting a ChangeDetectorRef\n * @param hostView The view to which the node belongs\n * @param context The context for this change detector ref\n * @returns The ChangeDetectorRef to use\n */\n function createViewRef(hostTNode, hostView, context) {\n if (isComponent(hostTNode)) {\n var componentIndex = hostTNode.directiveStart;\n var componentView = getComponentViewByIndex(hostTNode.index, hostView);\n return new ViewRef(componentView, context, componentIndex);\n }\n else if (hostTNode.type === 3 /* Element */ || hostTNode.type === 0 /* Container */ ||\n hostTNode.type === 4 /* ElementContainer */) {\n var hostComponentView = findComponentView(hostView);\n return new ViewRef(hostComponentView, hostComponentView[CONTEXT], -1);\n }\n return null;\n }\n /** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */\n function getOrCreateRenderer2(view) {\n var renderer = view[RENDERER];\n if (isProceduralRenderer(renderer)) {\n return renderer;\n }\n else {\n throw new Error('Cannot inject Renderer2 when the application uses Renderer3!');\n }\n }\n /** Injects a Renderer2 for the current component. */\n function injectRenderer2() {\n // We need the Renderer to be based on the component that it's being injected into, however since\n // DI happens before we've entered its view, `getLView` will return the parent view instead.\n var lView = getLView();\n var tNode = getPreviousOrParentTNode();\n var nodeAtIndex = getComponentViewByIndex(tNode.index, lView);\n return getOrCreateRenderer2(isLView(nodeAtIndex) ? nodeAtIndex : lView);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function noop() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // Do nothing.\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * A wrapper around a native element inside of a View.\n *\n * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM\n * element.\n *\n * @security Permitting direct access to the DOM can make your application more vulnerable to\n * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the\n * [Security Guide](http://g.co/ng/security).\n *\n * @publicApi\n */\n // Note: We don't expose things like `Injector`, `ViewContainer`, ... here,\n // i.e. users have to ask for what they need. With that, we can build better analysis tools\n // and could do better codegen in the future.\n var ElementRef = /** @class */ (function () {\n function ElementRef(nativeElement) {\n this.nativeElement = nativeElement;\n }\n /**\n * @internal\n * @nocollapse\n */\n ElementRef.__NG_ELEMENT_ID__ = function () { return SWITCH_ELEMENT_REF_FACTORY(ElementRef); };\n return ElementRef;\n }());\n var SWITCH_ELEMENT_REF_FACTORY__POST_R3__ = injectElementRef;\n var SWITCH_ELEMENT_REF_FACTORY__PRE_R3__ = noop;\n var SWITCH_ELEMENT_REF_FACTORY = SWITCH_ELEMENT_REF_FACTORY__PRE_R3__;\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @deprecated Use `RendererType2` (and `Renderer2`) instead.\n * @publicApi\n */\n var RenderComponentType = /** @class */ (function () {\n function RenderComponentType(id, templateUrl, slotCount, encapsulation, styles, animations) {\n this.id = id;\n this.templateUrl = templateUrl;\n this.slotCount = slotCount;\n this.encapsulation = encapsulation;\n this.styles = styles;\n this.animations = animations;\n }\n return RenderComponentType;\n }());\n /**\n * @deprecated Debug info is handled internally in the view engine now.\n */\n var RenderDebugInfo = /** @class */ (function () {\n function RenderDebugInfo() {\n }\n return RenderDebugInfo;\n }());\n /**\n * @deprecated Use the `Renderer2` instead.\n * @publicApi\n */\n var Renderer = /** @class */ (function () {\n function Renderer() {\n }\n return Renderer;\n }());\n var Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');\n /**\n * Injectable service that provides a low-level interface for modifying the UI.\n *\n * Use this service to bypass Angular's templating and make custom UI changes that can't be\n * expressed declaratively. For example if you need to set a property or an attribute whose name is\n * not statically known, use {@link Renderer#setElementProperty setElementProperty} or\n * {@link Renderer#setElementAttribute setElementAttribute} respectively.\n *\n * If you are implementing a custom renderer, you must implement this interface.\n *\n * The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`.\n *\n * @deprecated Use `RendererFactory2` instead.\n * @publicApi\n */\n var RootRenderer = /** @class */ (function () {\n function RootRenderer() {\n }\n return RootRenderer;\n }());\n /**\n * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @publicApi\n */\n var RendererFactory2 = /** @class */ (function () {\n function RendererFactory2() {\n }\n return RendererFactory2;\n }());\n (function (RendererStyleFlags2) {\n /**\n * Marks a style as important.\n */\n RendererStyleFlags2[RendererStyleFlags2[\"Important\"] = 1] = \"Important\";\n /**\n * Marks a style as using dash case naming (this-is-dash-case).\n */\n RendererStyleFlags2[RendererStyleFlags2[\"DashCase\"] = 2] = \"DashCase\";\n })(exports.RendererStyleFlags2 || (exports.RendererStyleFlags2 = {}));\n /**\n * Extend this base class to implement custom rendering. By default, Angular\n * renders a template into DOM. You can use custom rendering to intercept\n * rendering calls, or to render to something other than DOM.\n *\n * Create your custom renderer using `RendererFactory2`.\n *\n * Use a custom renderer to bypass Angular's templating and\n * make custom UI changes that can't be expressed declaratively.\n * For example if you need to set a property or an attribute whose name is\n * not statically known, use the `setProperty()` or\n * `setAttribute()` method.\n *\n * @publicApi\n */\n var Renderer2 = /** @class */ (function () {\n function Renderer2() {\n }\n /**\n * @internal\n * @nocollapse\n */\n Renderer2.__NG_ELEMENT_ID__ = function () { return SWITCH_RENDERER2_FACTORY(); };\n return Renderer2;\n }());\n var SWITCH_RENDERER2_FACTORY__POST_R3__ = injectRenderer2;\n var SWITCH_RENDERER2_FACTORY__PRE_R3__ = noop;\n var SWITCH_RENDERER2_FACTORY = SWITCH_RENDERER2_FACTORY__PRE_R3__;\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @description Represents the version of Angular\n *\n * @publicApi\n */\n var Version = /** @class */ (function () {\n function Version(full) {\n this.full = full;\n this.major = full.split('.')[0];\n this.minor = full.split('.')[1];\n this.patch = full.split('.').slice(2).join('.');\n }\n return Version;\n }());\n /**\n * @publicApi\n */\n var VERSION = new Version('8.1.1');\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var DefaultIterableDifferFactory = /** @class */ (function () {\n function DefaultIterableDifferFactory() {\n }\n DefaultIterableDifferFactory.prototype.supports = function (obj) { return isListLikeIterable(obj); };\n DefaultIterableDifferFactory.prototype.create = function (trackByFn) {\n return new DefaultIterableDiffer(trackByFn);\n };\n return DefaultIterableDifferFactory;\n }());\n var trackByIdentity = function (index, item) { return item; };\n /**\n * @deprecated v4.0.0 - Should not be part of public API.\n * @publicApi\n */\n var DefaultIterableDiffer = /** @class */ (function () {\n function DefaultIterableDiffer(trackByFn) {\n this.length = 0;\n // Keeps track of the used records at any point in time (during & across `_check()` calls)\n this._linkedRecords = null;\n // Keeps track of the removed records at any point in time during `_check()` calls.\n this._unlinkedRecords = null;\n this._previousItHead = null;\n this._itHead = null;\n this._itTail = null;\n this._additionsHead = null;\n this._additionsTail = null;\n this._movesHead = null;\n this._movesTail = null;\n this._removalsHead = null;\n this._removalsTail = null;\n // Keeps track of records where custom track by is the same, but item identity has changed\n this._identityChangesHead = null;\n this._identityChangesTail = null;\n this._trackByFn = trackByFn || trackByIdentity;\n }\n DefaultIterableDiffer.prototype.forEachItem = function (fn) {\n var record;\n for (record = this._itHead; record !== null; record = record._next) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachOperation = function (fn) {\n var nextIt = this._itHead;\n var nextRemove = this._removalsHead;\n var addRemoveOffset = 0;\n var moveOffsets = null;\n while (nextIt || nextRemove) {\n // Figure out which is the next record to process\n // Order: remove, add, move\n var record = !nextRemove ||\n nextIt &&\n nextIt.currentIndex <\n getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?\n nextIt :\n nextRemove;\n var adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n var currentIndex = record.currentIndex;\n // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary\n if (record === nextRemove) {\n addRemoveOffset--;\n nextRemove = nextRemove._nextRemoved;\n }\n else {\n nextIt = nextIt._next;\n if (record.previousIndex == null) {\n addRemoveOffset++;\n }\n else {\n // INVARIANT: currentIndex < previousIndex\n if (!moveOffsets)\n moveOffsets = [];\n var localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n var localCurrentIndex = currentIndex - addRemoveOffset;\n if (localMovePreviousIndex != localCurrentIndex) {\n for (var i = 0; i < localMovePreviousIndex; i++) {\n var offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);\n var index = offset + i;\n if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n moveOffsets[i] = offset + 1;\n }\n }\n var previousIndex = record.previousIndex;\n moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n }\n }\n }\n if (adjPreviousIndex !== currentIndex) {\n fn(record, adjPreviousIndex, currentIndex);\n }\n }\n };\n DefaultIterableDiffer.prototype.forEachPreviousItem = function (fn) {\n var record;\n for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachAddedItem = function (fn) {\n var record;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachMovedItem = function (fn) {\n var record;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachRemovedItem = function (fn) {\n var record;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachIdentityChange = function (fn) {\n var record;\n for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.diff = function (collection) {\n if (collection == null)\n collection = [];\n if (!isListLikeIterable(collection)) {\n throw new Error(\"Error trying to diff '\" + stringify(collection) + \"'. Only arrays and iterables are allowed\");\n }\n if (this.check(collection)) {\n return this;\n }\n else {\n return null;\n }\n };\n DefaultIterableDiffer.prototype.onDestroy = function () { };\n DefaultIterableDiffer.prototype.check = function (collection) {\n var _this = this;\n this._reset();\n var record = this._itHead;\n var mayBeDirty = false;\n var index;\n var item;\n var itemTrackBy;\n if (Array.isArray(collection)) {\n this.length = collection.length;\n for (var index_1 = 0; index_1 < this.length; index_1++) {\n item = collection[index_1];\n itemTrackBy = this._trackByFn(index_1, item);\n if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index_1);\n mayBeDirty = true;\n }\n else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = this._verifyReinsertion(record, item, itemTrackBy, index_1);\n }\n if (!looseIdentical(record.item, item))\n this._addIdentityChange(record, item);\n }\n record = record._next;\n }\n }\n else {\n index = 0;\n iterateListLike(collection, function (item) {\n itemTrackBy = _this._trackByFn(index, item);\n if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {\n record = _this._mismatch(record, item, itemTrackBy, index);\n mayBeDirty = true;\n }\n else {\n if (mayBeDirty) {\n // TODO(misko): can we limit this to duplicates only?\n record = _this._verifyReinsertion(record, item, itemTrackBy, index);\n }\n if (!looseIdentical(record.item, item))\n _this._addIdentityChange(record, item);\n }\n record = record._next;\n index++;\n });\n this.length = index;\n }\n this._truncate(record);\n this.collection = collection;\n return this.isDirty;\n };\n Object.defineProperty(DefaultIterableDiffer.prototype, \"isDirty\", {\n /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n * changes.\n */\n get: function () {\n return this._additionsHead !== null || this._movesHead !== null ||\n this._removalsHead !== null || this._identityChangesHead !== null;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Reset the state of the change objects to show no changes. This means set previousKey to\n * currentKey, and clear all of the queues (additions, moves, removals).\n * Set the previousIndexes of moved and added items to their currentIndexes\n * Reset the list of additions, moves and removals\n *\n * @internal\n */\n DefaultIterableDiffer.prototype._reset = function () {\n if (this.isDirty) {\n var record = void 0;\n var nextRecord = void 0;\n for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n record.previousIndex = record.currentIndex;\n }\n this._additionsHead = this._additionsTail = null;\n for (record = this._movesHead; record !== null; record = nextRecord) {\n record.previousIndex = record.currentIndex;\n nextRecord = record._nextMoved;\n }\n this._movesHead = this._movesTail = null;\n this._removalsHead = this._removalsTail = null;\n this._identityChangesHead = this._identityChangesTail = null;\n // TODO(vicb): when assert gets supported\n // assert(!this.isDirty);\n }\n };\n /**\n * This is the core function which handles differences between collections.\n *\n * - `record` is the record which we saw at this position last time. If null then it is a new\n * item.\n * - `item` is the current item in the collection\n * - `index` is the position of the item in the collection\n *\n * @internal\n */\n DefaultIterableDiffer.prototype._mismatch = function (record, item, itemTrackBy, index) {\n // The previous record after which we will append the current one.\n var previousRecord;\n if (record === null) {\n previousRecord = this._itTail;\n }\n else {\n previousRecord = record._prev;\n // Remove the record from the collection since we know it does not match the item.\n this._remove(record);\n }\n // Attempt to see if we have seen the item before.\n record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);\n if (record !== null) {\n // We have seen this before, we need to move it forward in the collection.\n // But first we need to check if identity changed, so we can update in view if necessary\n if (!looseIdentical(record.item, item))\n this._addIdentityChange(record, item);\n this._moveAfter(record, previousRecord, index);\n }\n else {\n // Never seen it, check evicted list.\n record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (record !== null) {\n // It is an item which we have evicted earlier: reinsert it back into the list.\n // But first we need to check if identity changed, so we can update in view if necessary\n if (!looseIdentical(record.item, item))\n this._addIdentityChange(record, item);\n this._reinsertAfter(record, previousRecord, index);\n }\n else {\n // It is a new item: add it.\n record =\n this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);\n }\n }\n return record;\n };\n /**\n * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)\n *\n * Use case: `[a, a]` => `[b, a, a]`\n *\n * If we did not have this check then the insertion of `b` would:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) leave `a` at index `1` as is. <-- this is wrong!\n * 3) reinsert `a` at index 2. <-- this is wrong!\n *\n * The correct behavior is:\n * 1) evict first `a`\n * 2) insert `b` at `0` index.\n * 3) reinsert `a` at index 1.\n * 3) move `a` at from `1` to `2`.\n *\n *\n * Double check that we have not evicted a duplicate item. We need to check if the item type may\n * have already been removed:\n * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted\n * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a\n * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'\n * at the end.\n *\n * @internal\n */\n DefaultIterableDiffer.prototype._verifyReinsertion = function (record, item, itemTrackBy, index) {\n var reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n if (reinsertRecord !== null) {\n record = this._reinsertAfter(reinsertRecord, record._prev, index);\n }\n else if (record.currentIndex != index) {\n record.currentIndex = index;\n this._addToMoves(record, index);\n }\n return record;\n };\n /**\n * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection\n *\n * - `record` The first excess {@link IterableChangeRecord_}.\n *\n * @internal\n */\n DefaultIterableDiffer.prototype._truncate = function (record) {\n // Anything after that needs to be removed;\n while (record !== null) {\n var nextRecord = record._next;\n this._addToRemovals(this._unlink(record));\n record = nextRecord;\n }\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.clear();\n }\n if (this._additionsTail !== null) {\n this._additionsTail._nextAdded = null;\n }\n if (this._movesTail !== null) {\n this._movesTail._nextMoved = null;\n }\n if (this._itTail !== null) {\n this._itTail._next = null;\n }\n if (this._removalsTail !== null) {\n this._removalsTail._nextRemoved = null;\n }\n if (this._identityChangesTail !== null) {\n this._identityChangesTail._nextIdentityChange = null;\n }\n };\n /** @internal */\n DefaultIterableDiffer.prototype._reinsertAfter = function (record, prevRecord, index) {\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.remove(record);\n }\n var prev = record._prevRemoved;\n var next = record._nextRemoved;\n if (prev === null) {\n this._removalsHead = next;\n }\n else {\n prev._nextRemoved = next;\n }\n if (next === null) {\n this._removalsTail = prev;\n }\n else {\n next._prevRemoved = prev;\n }\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._moveAfter = function (record, prevRecord, index) {\n this._unlink(record);\n this._insertAfter(record, prevRecord, index);\n this._addToMoves(record, index);\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._addAfter = function (record, prevRecord, index) {\n this._insertAfter(record, prevRecord, index);\n if (this._additionsTail === null) {\n // TODO(vicb):\n // assert(this._additionsHead === null);\n this._additionsTail = this._additionsHead = record;\n }\n else {\n // TODO(vicb):\n // assert(_additionsTail._nextAdded === null);\n // assert(record._nextAdded === null);\n this._additionsTail = this._additionsTail._nextAdded = record;\n }\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._insertAfter = function (record, prevRecord, index) {\n // TODO(vicb):\n // assert(record != prevRecord);\n // assert(record._next === null);\n // assert(record._prev === null);\n var next = prevRecord === null ? this._itHead : prevRecord._next;\n // TODO(vicb):\n // assert(next != record);\n // assert(prevRecord != record);\n record._next = next;\n record._prev = prevRecord;\n if (next === null) {\n this._itTail = record;\n }\n else {\n next._prev = record;\n }\n if (prevRecord === null) {\n this._itHead = record;\n }\n else {\n prevRecord._next = record;\n }\n if (this._linkedRecords === null) {\n this._linkedRecords = new _DuplicateMap();\n }\n this._linkedRecords.put(record);\n record.currentIndex = index;\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._remove = function (record) {\n return this._addToRemovals(this._unlink(record));\n };\n /** @internal */\n DefaultIterableDiffer.prototype._unlink = function (record) {\n if (this._linkedRecords !== null) {\n this._linkedRecords.remove(record);\n }\n var prev = record._prev;\n var next = record._next;\n // TODO(vicb):\n // assert((record._prev = null) === null);\n // assert((record._next = null) === null);\n if (prev === null) {\n this._itHead = next;\n }\n else {\n prev._next = next;\n }\n if (next === null) {\n this._itTail = prev;\n }\n else {\n next._prev = prev;\n }\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._addToMoves = function (record, toIndex) {\n // TODO(vicb):\n // assert(record._nextMoved === null);\n if (record.previousIndex === toIndex) {\n return record;\n }\n if (this._movesTail === null) {\n // TODO(vicb):\n // assert(_movesHead === null);\n this._movesTail = this._movesHead = record;\n }\n else {\n // TODO(vicb):\n // assert(_movesTail._nextMoved === null);\n this._movesTail = this._movesTail._nextMoved = record;\n }\n return record;\n };\n DefaultIterableDiffer.prototype._addToRemovals = function (record) {\n if (this._unlinkedRecords === null) {\n this._unlinkedRecords = new _DuplicateMap();\n }\n this._unlinkedRecords.put(record);\n record.currentIndex = null;\n record._nextRemoved = null;\n if (this._removalsTail === null) {\n // TODO(vicb):\n // assert(_removalsHead === null);\n this._removalsTail = this._removalsHead = record;\n record._prevRemoved = null;\n }\n else {\n // TODO(vicb):\n // assert(_removalsTail._nextRemoved === null);\n // assert(record._nextRemoved === null);\n record._prevRemoved = this._removalsTail;\n this._removalsTail = this._removalsTail._nextRemoved = record;\n }\n return record;\n };\n /** @internal */\n DefaultIterableDiffer.prototype._addIdentityChange = function (record, item) {\n record.item = item;\n if (this._identityChangesTail === null) {\n this._identityChangesTail = this._identityChangesHead = record;\n }\n else {\n this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;\n }\n return record;\n };\n return DefaultIterableDiffer;\n }());\n var IterableChangeRecord_ = /** @class */ (function () {\n function IterableChangeRecord_(item, trackById) {\n this.item = item;\n this.trackById = trackById;\n this.currentIndex = null;\n this.previousIndex = null;\n /** @internal */\n this._nextPrevious = null;\n /** @internal */\n this._prev = null;\n /** @internal */\n this._next = null;\n /** @internal */\n this._prevDup = null;\n /** @internal */\n this._nextDup = null;\n /** @internal */\n this._prevRemoved = null;\n /** @internal */\n this._nextRemoved = null;\n /** @internal */\n this._nextAdded = null;\n /** @internal */\n this._nextMoved = null;\n /** @internal */\n this._nextIdentityChange = null;\n }\n return IterableChangeRecord_;\n }());\n // A linked list of CollectionChangeRecords with the same IterableChangeRecord_.item\n var _DuplicateItemRecordList = /** @class */ (function () {\n function _DuplicateItemRecordList() {\n /** @internal */\n this._head = null;\n /** @internal */\n this._tail = null;\n }\n /**\n * Append the record to the list of duplicates.\n *\n * Note: by design all records in the list of duplicates hold the same value in record.item.\n */\n _DuplicateItemRecordList.prototype.add = function (record) {\n if (this._head === null) {\n this._head = this._tail = record;\n record._nextDup = null;\n record._prevDup = null;\n }\n else {\n // TODO(vicb):\n // assert(record.item == _head.item ||\n // record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);\n this._tail._nextDup = record;\n record._prevDup = this._tail;\n record._nextDup = null;\n this._tail = record;\n }\n };\n // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n _DuplicateItemRecordList.prototype.get = function (trackById, atOrAfterIndex) {\n var record;\n for (record = this._head; record !== null; record = record._nextDup) {\n if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) &&\n looseIdentical(record.trackById, trackById)) {\n return record;\n }\n }\n return null;\n };\n /**\n * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n *\n * Returns whether the list of duplicates is empty.\n */\n _DuplicateItemRecordList.prototype.remove = function (record) {\n // TODO(vicb):\n // assert(() {\n // // verify that the record being removed is in the list.\n // for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {\n // if (identical(cursor, record)) return true;\n // }\n // return false;\n //});\n var prev = record._prevDup;\n var next = record._nextDup;\n if (prev === null) {\n this._head = next;\n }\n else {\n prev._nextDup = next;\n }\n if (next === null) {\n this._tail = prev;\n }\n else {\n next._prevDup = prev;\n }\n return this._head === null;\n };\n return _DuplicateItemRecordList;\n }());\n var _DuplicateMap = /** @class */ (function () {\n function _DuplicateMap() {\n this.map = new Map();\n }\n _DuplicateMap.prototype.put = function (record) {\n var key = record.trackById;\n var duplicates = this.map.get(key);\n if (!duplicates) {\n duplicates = new _DuplicateItemRecordList();\n this.map.set(key, duplicates);\n }\n duplicates.add(record);\n };\n /**\n * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we\n * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.\n *\n * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we\n * have any more `a`s needs to return the second `a`.\n */\n _DuplicateMap.prototype.get = function (trackById, atOrAfterIndex) {\n var key = trackById;\n var recordList = this.map.get(key);\n return recordList ? recordList.get(trackById, atOrAfterIndex) : null;\n };\n /**\n * Removes a {@link IterableChangeRecord_} from the list of duplicates.\n *\n * The list of duplicates also is removed from the map if it gets empty.\n */\n _DuplicateMap.prototype.remove = function (record) {\n var key = record.trackById;\n var recordList = this.map.get(key);\n // Remove the list of duplicates when it gets empty\n if (recordList.remove(record)) {\n this.map.delete(key);\n }\n return record;\n };\n Object.defineProperty(_DuplicateMap.prototype, \"isEmpty\", {\n get: function () { return this.map.size === 0; },\n enumerable: true,\n configurable: true\n });\n _DuplicateMap.prototype.clear = function () { this.map.clear(); };\n return _DuplicateMap;\n }());\n function getPreviousIndex(item, addRemoveOffset, moveOffsets) {\n var previousIndex = item.previousIndex;\n if (previousIndex === null)\n return previousIndex;\n var moveOffset = 0;\n if (moveOffsets && previousIndex < moveOffsets.length) {\n moveOffset = moveOffsets[previousIndex];\n }\n return previousIndex + addRemoveOffset + moveOffset;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var DefaultKeyValueDifferFactory = /** @class */ (function () {\n function DefaultKeyValueDifferFactory() {\n }\n DefaultKeyValueDifferFactory.prototype.supports = function (obj) { return obj instanceof Map || isJsObject(obj); };\n DefaultKeyValueDifferFactory.prototype.create = function () { return new DefaultKeyValueDiffer(); };\n return DefaultKeyValueDifferFactory;\n }());\n var DefaultKeyValueDiffer = /** @class */ (function () {\n function DefaultKeyValueDiffer() {\n this._records = new Map();\n this._mapHead = null;\n // _appendAfter is used in the check loop\n this._appendAfter = null;\n this._previousMapHead = null;\n this._changesHead = null;\n this._changesTail = null;\n this._additionsHead = null;\n this._additionsTail = null;\n this._removalsHead = null;\n this._removalsTail = null;\n }\n Object.defineProperty(DefaultKeyValueDiffer.prototype, \"isDirty\", {\n get: function () {\n return this._additionsHead !== null || this._changesHead !== null ||\n this._removalsHead !== null;\n },\n enumerable: true,\n configurable: true\n });\n DefaultKeyValueDiffer.prototype.forEachItem = function (fn) {\n var record;\n for (record = this._mapHead; record !== null; record = record._next) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachPreviousItem = function (fn) {\n var record;\n for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachChangedItem = function (fn) {\n var record;\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachAddedItem = function (fn) {\n var record;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachRemovedItem = function (fn) {\n var record;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.diff = function (map) {\n if (!map) {\n map = new Map();\n }\n else if (!(map instanceof Map || isJsObject(map))) {\n throw new Error(\"Error trying to diff '\" + stringify(map) + \"'. Only maps and objects are allowed\");\n }\n return this.check(map) ? this : null;\n };\n DefaultKeyValueDiffer.prototype.onDestroy = function () { };\n /**\n * Check the current state of the map vs the previous.\n * The algorithm is optimised for when the keys do no change.\n */\n DefaultKeyValueDiffer.prototype.check = function (map) {\n var _this = this;\n this._reset();\n var insertBefore = this._mapHead;\n this._appendAfter = null;\n this._forEach(map, function (value, key) {\n if (insertBefore && insertBefore.key === key) {\n _this._maybeAddToChanges(insertBefore, value);\n _this._appendAfter = insertBefore;\n insertBefore = insertBefore._next;\n }\n else {\n var record = _this._getOrCreateRecordForKey(key, value);\n insertBefore = _this._insertBeforeOrAppend(insertBefore, record);\n }\n });\n // Items remaining at the end of the list have been deleted\n if (insertBefore) {\n if (insertBefore._prev) {\n insertBefore._prev._next = null;\n }\n this._removalsHead = insertBefore;\n for (var record = insertBefore; record !== null; record = record._nextRemoved) {\n if (record === this._mapHead) {\n this._mapHead = null;\n }\n this._records.delete(record.key);\n record._nextRemoved = record._next;\n record.previousValue = record.currentValue;\n record.currentValue = null;\n record._prev = null;\n record._next = null;\n }\n }\n // Make sure tails have no next records from previous runs\n if (this._changesTail)\n this._changesTail._nextChanged = null;\n if (this._additionsTail)\n this._additionsTail._nextAdded = null;\n return this.isDirty;\n };\n /**\n * Inserts a record before `before` or append at the end of the list when `before` is null.\n *\n * Notes:\n * - This method appends at `this._appendAfter`,\n * - This method updates `this._appendAfter`,\n * - The return value is the new value for the insertion pointer.\n */\n DefaultKeyValueDiffer.prototype._insertBeforeOrAppend = function (before, record) {\n if (before) {\n var prev = before._prev;\n record._next = before;\n record._prev = prev;\n before._prev = record;\n if (prev) {\n prev._next = record;\n }\n if (before === this._mapHead) {\n this._mapHead = record;\n }\n this._appendAfter = before;\n return before;\n }\n if (this._appendAfter) {\n this._appendAfter._next = record;\n record._prev = this._appendAfter;\n }\n else {\n this._mapHead = record;\n }\n this._appendAfter = record;\n return null;\n };\n DefaultKeyValueDiffer.prototype._getOrCreateRecordForKey = function (key, value) {\n if (this._records.has(key)) {\n var record_1 = this._records.get(key);\n this._maybeAddToChanges(record_1, value);\n var prev = record_1._prev;\n var next = record_1._next;\n if (prev) {\n prev._next = next;\n }\n if (next) {\n next._prev = prev;\n }\n record_1._next = null;\n record_1._prev = null;\n return record_1;\n }\n var record = new KeyValueChangeRecord_(key);\n this._records.set(key, record);\n record.currentValue = value;\n this._addToAdditions(record);\n return record;\n };\n /** @internal */\n DefaultKeyValueDiffer.prototype._reset = function () {\n if (this.isDirty) {\n var record = void 0;\n // let `_previousMapHead` contain the state of the map before the changes\n this._previousMapHead = this._mapHead;\n for (record = this._previousMapHead; record !== null; record = record._next) {\n record._nextPrevious = record._next;\n }\n // Update `record.previousValue` with the value of the item before the changes\n // We need to update all changed items (that's those which have been added and changed)\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n record.previousValue = record.currentValue;\n }\n for (record = this._additionsHead; record != null; record = record._nextAdded) {\n record.previousValue = record.currentValue;\n }\n this._changesHead = this._changesTail = null;\n this._additionsHead = this._additionsTail = null;\n this._removalsHead = null;\n }\n };\n // Add the record or a given key to the list of changes only when the value has actually changed\n DefaultKeyValueDiffer.prototype._maybeAddToChanges = function (record, newValue) {\n if (!looseIdentical(newValue, record.currentValue)) {\n record.previousValue = record.currentValue;\n record.currentValue = newValue;\n this._addToChanges(record);\n }\n };\n DefaultKeyValueDiffer.prototype._addToAdditions = function (record) {\n if (this._additionsHead === null) {\n this._additionsHead = this._additionsTail = record;\n }\n else {\n this._additionsTail._nextAdded = record;\n this._additionsTail = record;\n }\n };\n DefaultKeyValueDiffer.prototype._addToChanges = function (record) {\n if (this._changesHead === null) {\n this._changesHead = this._changesTail = record;\n }\n else {\n this._changesTail._nextChanged = record;\n this._changesTail = record;\n }\n };\n /** @internal */\n DefaultKeyValueDiffer.prototype._forEach = function (obj, fn) {\n if (obj instanceof Map) {\n obj.forEach(fn);\n }\n else {\n Object.keys(obj).forEach(function (k) { return fn(obj[k], k); });\n }\n };\n return DefaultKeyValueDiffer;\n }());\n var KeyValueChangeRecord_ = /** @class */ (function () {\n function KeyValueChangeRecord_(key) {\n this.key = key;\n this.previousValue = null;\n this.currentValue = null;\n /** @internal */\n this._nextPrevious = null;\n /** @internal */\n this._next = null;\n /** @internal */\n this._prev = null;\n /** @internal */\n this._nextAdded = null;\n /** @internal */\n this._nextRemoved = null;\n /** @internal */\n this._nextChanged = null;\n }\n return KeyValueChangeRecord_;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.\n *\n * @publicApi\n */\n var IterableDiffers = /** @class */ (function () {\n function IterableDiffers(factories) {\n this.factories = factories;\n }\n IterableDiffers.create = function (factories, parent) {\n if (parent != null) {\n var copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n return new IterableDiffers(factories);\n };\n /**\n * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the\n * inherited {@link IterableDiffers} instance with the provided factories and return a new\n * {@link IterableDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link IterableDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\n */\n IterableDiffers.extend = function (factories) {\n return {\n provide: IterableDiffers,\n useFactory: function (parent) {\n if (!parent) {\n // Typically would occur when calling IterableDiffers.extend inside of dependencies passed\n // to\n // bootstrap(), which would override default pipes instead of extending them.\n throw new Error('Cannot extend IterableDiffers without a parent injector');\n }\n return IterableDiffers.create(factories, parent);\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[IterableDiffers, new SkipSelf(), new Optional()]]\n };\n };\n IterableDiffers.prototype.find = function (iterable) {\n var factory = this.factories.find(function (f) { return f.supports(iterable); });\n if (factory != null) {\n return factory;\n }\n else {\n throw new Error(\"Cannot find a differ supporting object '\" + iterable + \"' of type '\" + getTypeNameForDebugging(iterable) + \"'\");\n }\n };\n /** @nocollapse */\n IterableDiffers.ngInjectableDef = ɵɵdefineInjectable({\n token: IterableDiffers,\n providedIn: 'root',\n factory: function () { return new IterableDiffers([new DefaultIterableDifferFactory()]); }\n });\n return IterableDiffers;\n }());\n function getTypeNameForDebugging(type) {\n return type['name'] || typeof type;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.\n *\n * @publicApi\n */\n var KeyValueDiffers = /** @class */ (function () {\n function KeyValueDiffers(factories) {\n this.factories = factories;\n }\n KeyValueDiffers.create = function (factories, parent) {\n if (parent) {\n var copied = parent.factories.slice();\n factories = factories.concat(copied);\n }\n return new KeyValueDiffers(factories);\n };\n /**\n * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the\n * inherited {@link KeyValueDiffers} instance with the provided factories and return a new\n * {@link KeyValueDiffers} instance.\n *\n * @usageNotes\n * ### Example\n *\n * The following example shows how to extend an existing list of factories,\n * which will only be applied to the injector for this component and its children.\n * This step is all that's required to make a new {@link KeyValueDiffer} available.\n *\n * ```\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\n */\n KeyValueDiffers.extend = function (factories) {\n return {\n provide: KeyValueDiffers,\n useFactory: function (parent) {\n if (!parent) {\n // Typically would occur when calling KeyValueDiffers.extend inside of dependencies passed\n // to bootstrap(), which would override default pipes instead of extending them.\n throw new Error('Cannot extend KeyValueDiffers without a parent injector');\n }\n return KeyValueDiffers.create(factories, parent);\n },\n // Dependency technically isn't optional, but we can provide a better error message this way.\n deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]\n };\n };\n KeyValueDiffers.prototype.find = function (kv) {\n var factory = this.factories.find(function (f) { return f.supports(kv); });\n if (factory) {\n return factory;\n }\n throw new Error(\"Cannot find a differ supporting object '\" + kv + \"'\");\n };\n /** @nocollapse */\n KeyValueDiffers.ngInjectableDef = ɵɵdefineInjectable({\n token: KeyValueDiffers,\n providedIn: 'root',\n factory: function () { return new KeyValueDiffers([new DefaultKeyValueDifferFactory()]); }\n });\n return KeyValueDiffers;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Base class for Angular Views, provides change detection functionality.\n * A change-detection tree collects all views that are to be checked for changes.\n * Use the methods to add and remove views from the tree, initiate change-detection,\n * and explicitly mark views as _dirty_, meaning that they have changed and need to be rerendered.\n *\n * @usageNotes\n *\n * The following examples demonstrate how to modify default change-detection behavior\n * to perform explicit detection when needed.\n *\n * ### Use `markForCheck()` with `CheckOnce` strategy\n *\n * The following example sets the `OnPush` change-detection strategy for a component\n * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check\n * after an interval. See [live demo](http://plnkr.co/edit/GC512b?p=preview).\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\"\n * region=\"mark-for-check\"></code-example>\n *\n * ### Detach change detector to limit how often check occurs\n *\n * The following example defines a component with a large list of read-only data\n * that is expected to change constantly, many times per second.\n * To improve performance, we want to check and update the list\n * less often than the changes actually occur. To do that, we detach\n * the component's change detector and perform an explicit local check every five seconds.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"detach\"></code-example>\n *\n *\n * ### Reattaching a detached component\n *\n * The following example creates a component displaying live data.\n * The component detaches its change detector from the main change detector tree\n * when the `live` property is set to false, and reattaches it when the property\n * becomes true.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"reattach\"></code-example>\n *\n * @publicApi\n */\n var ChangeDetectorRef = /** @class */ (function () {\n function ChangeDetectorRef() {\n }\n /**\n * @internal\n * @nocollapse\n */\n ChangeDetectorRef.__NG_ELEMENT_ID__ = function () { return SWITCH_CHANGE_DETECTOR_REF_FACTORY(); };\n return ChangeDetectorRef;\n }());\n var SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = injectChangeDetectorRef;\n var SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__ = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n };\n var SWITCH_CHANGE_DETECTOR_REF_FACTORY = SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__;\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Structural diffing for `Object`s and `Map`s.\n */\n var keyValDiff = [new DefaultKeyValueDifferFactory()];\n /**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\n var iterableDiff = [new DefaultIterableDifferFactory()];\n var defaultIterableDiffers = new IterableDiffers(iterableDiff);\n var defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Represents an embedded template that can be used to instantiate embedded views.\n * To instantiate embedded views based on a template, use the `ViewContainerRef`\n * method `createEmbeddedView()`.\n *\n * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`\n * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view\n * is injected into the constructor of the directive,\n * using the `TemplateRef` token.\n *\n * You can also use a `Query` to find a `TemplateRef` associated with\n * a component or a directive.\n *\n * @see `ViewContainerRef`\n * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)\n *\n * @publicApi\n */\n var TemplateRef = /** @class */ (function () {\n function TemplateRef() {\n }\n /**\n * @internal\n * @nocollapse\n */\n TemplateRef.__NG_ELEMENT_ID__ = function () { return SWITCH_TEMPLATE_REF_FACTORY(TemplateRef, ElementRef); };\n return TemplateRef;\n }());\n var SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = injectTemplateRef;\n var SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__ = noop;\n var SWITCH_TEMPLATE_REF_FACTORY = SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__;\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Represents a container where one or more views can be attached to a component.\n *\n * Can contain *host views* (created by instantiating a\n * component with the `createComponent()` method), and *embedded views*\n * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).\n *\n * A view container instance can contain other view containers,\n * creating a [view hierarchy](guide/glossary#view-tree).\n *\n * @see `ComponentRef`\n * @see `EmbeddedViewRef`\n *\n * @publicApi\n */\n var ViewContainerRef = /** @class */ (function () {\n function ViewContainerRef() {\n }\n /**\n * @internal\n * @nocollapse\n */\n ViewContainerRef.__NG_ELEMENT_ID__ = function () { return SWITCH_VIEW_CONTAINER_REF_FACTORY(ViewContainerRef, ElementRef); };\n return ViewContainerRef;\n }());\n var SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = injectViewContainerRef;\n var SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__ = noop;\n var SWITCH_VIEW_CONTAINER_REF_FACTORY = SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__;\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function expressionChangedAfterItHasBeenCheckedError(context, oldValue, currValue, isFirstCheck) {\n var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '\" + oldValue + \"'. Current value: '\" + currValue + \"'.\";\n if (isFirstCheck) {\n msg +=\n \" It seems like the view has been created after its parent and its children have been dirty checked.\" +\n \" Has it been created in a change detection hook ?\";\n }\n return viewDebugError(msg, context);\n }\n function viewWrappedDebugError(err, context) {\n if (!(err instanceof Error)) {\n // errors that are not Error instances don't have a stack,\n // so it is ok to wrap them into a new Error object...\n err = new Error(err.toString());\n }\n _addDebugContext(err, context);\n return err;\n }\n function viewDebugError(msg, context) {\n var err = new Error(msg);\n _addDebugContext(err, context);\n return err;\n }\n function _addDebugContext(err, context) {\n err[ERROR_DEBUG_CONTEXT] = context;\n err[ERROR_LOGGER] = context.logError.bind(context);\n }\n function isViewDebugError(err) {\n return !!getDebugContext(err);\n }\n function viewDestroyedError(action) {\n return new Error(\"ViewDestroyedError: Attempt to use a destroyed view: \" + action);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // Called before each cycle of a view's check to detect whether this is in the\n // initState for which we need to call ngOnInit, ngAfterContentInit or ngAfterViewInit\n // lifecycle methods. Returns true if this check cycle should call lifecycle\n // methods.\n function shiftInitState(view, priorInitState, newInitState) {\n // Only update the InitState if we are currently in the prior state.\n // For example, only move into CallingInit if we are in BeforeInit. Only\n // move into CallingContentInit if we are in CallingInit. Normally this will\n // always be true because of how checkCycle is called in checkAndUpdateView.\n // However, if checkAndUpdateView is called recursively or if an exception is\n // thrown while checkAndUpdateView is running, checkAndUpdateView starts over\n // from the beginning. This ensures the state is monotonically increasing,\n // terminating in the AfterInit state, which ensures the Init methods are called\n // at least once and only once.\n var state = view.state;\n var initState = state & 1792 /* InitState_Mask */;\n if (initState === priorInitState) {\n view.state = (state & ~1792 /* InitState_Mask */) | newInitState;\n view.initIndex = -1;\n return true;\n }\n return initState === newInitState;\n }\n // Returns true if the lifecycle init method should be called for the node with\n // the given init index.\n function shouldCallLifecycleInitHook(view, initState, index) {\n if ((view.state & 1792 /* InitState_Mask */) === initState && view.initIndex <= index) {\n view.initIndex = index + 1;\n return true;\n }\n return false;\n }\n /**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\n function asTextData(view, index) {\n return view.nodes[index];\n }\n /**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\n function asElementData(view, index) {\n return view.nodes[index];\n }\n /**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\n function asProviderData(view, index) {\n return view.nodes[index];\n }\n /**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\n function asPureExpressionData(view, index) {\n return view.nodes[index];\n }\n /**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\n function asQueryList(view, index) {\n return view.nodes[index];\n }\n var DebugContext = /** @class */ (function () {\n function DebugContext() {\n }\n return DebugContext;\n }());\n /**\n * This object is used to prevent cycles in the source files and to have a place where\n * debug mode can hook it. It is lazily filled when `isDevMode` is known.\n */\n var Services = {\n setCurrentNode: undefined,\n createRootView: undefined,\n createEmbeddedView: undefined,\n createComponentView: undefined,\n createNgModuleRef: undefined,\n overrideProvider: undefined,\n overrideComponentView: undefined,\n clearOverrides: undefined,\n checkAndUpdateView: undefined,\n checkNoChangesView: undefined,\n destroyView: undefined,\n resolveDep: undefined,\n createDebugContext: undefined,\n handleEvent: undefined,\n updateDirectives: undefined,\n updateRenderer: undefined,\n dirtyParentQueries: undefined,\n };\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var NOOP = function () { };\n var _tokenKeyCache = new Map();\n function tokenKey(token) {\n var key = _tokenKeyCache.get(token);\n if (!key) {\n key = stringify(token) + '_' + _tokenKeyCache.size;\n _tokenKeyCache.set(token, key);\n }\n return key;\n }\n function unwrapValue(view, nodeIdx, bindingIdx, value) {\n if (WrappedValue.isWrapped(value)) {\n value = WrappedValue.unwrap(value);\n var globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;\n var oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);\n view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);\n }\n return value;\n }\n var UNDEFINED_RENDERER_TYPE_ID = '$$undefined';\n var EMPTY_RENDERER_TYPE_ID = '$$empty';\n // Attention: this function is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n function createRendererType2(values) {\n return {\n id: UNDEFINED_RENDERER_TYPE_ID,\n styles: values.styles,\n encapsulation: values.encapsulation,\n data: values.data\n };\n }\n var _renderCompCount$1 = 0;\n function resolveRendererType2(type) {\n if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {\n // first time we see this RendererType2. Initialize it...\n var isFilled = ((type.encapsulation != null && type.encapsulation !== exports.ViewEncapsulation.None) ||\n type.styles.length || Object.keys(type.data).length);\n if (isFilled) {\n type.id = \"c\" + _renderCompCount$1++;\n }\n else {\n type.id = EMPTY_RENDERER_TYPE_ID;\n }\n }\n if (type && type.id === EMPTY_RENDERER_TYPE_ID) {\n type = null;\n }\n return type || null;\n }\n function checkBinding(view, def, bindingIdx, value) {\n var oldValues = view.oldValues;\n if ((view.state & 2 /* FirstCheck */) ||\n !looseIdentical(oldValues[def.bindingIndex + bindingIdx], value)) {\n return true;\n }\n return false;\n }\n function checkAndUpdateBinding(view, def, bindingIdx, value) {\n if (checkBinding(view, def, bindingIdx, value)) {\n view.oldValues[def.bindingIndex + bindingIdx] = value;\n return true;\n }\n return false;\n }\n function checkBindingNoChanges(view, def, bindingIdx, value) {\n var oldValue = view.oldValues[def.bindingIndex + bindingIdx];\n if ((view.state & 1 /* BeforeFirstCheck */) || !devModeEqual(oldValue, value)) {\n var bindingName = def.bindings[bindingIdx].name;\n throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, def.nodeIndex), bindingName + \": \" + oldValue, bindingName + \": \" + value, (view.state & 1 /* BeforeFirstCheck */) !== 0);\n }\n }\n function markParentViewsForCheck(view) {\n var currView = view;\n while (currView) {\n if (currView.def.flags & 2 /* OnPush */) {\n currView.state |= 8 /* ChecksEnabled */;\n }\n currView = currView.viewContainerParent || currView.parent;\n }\n }\n function markParentViewsForCheckProjectedViews(view, endView) {\n var currView = view;\n while (currView && currView !== endView) {\n currView.state |= 64 /* CheckProjectedViews */;\n currView = currView.viewContainerParent || currView.parent;\n }\n }\n function dispatchEvent(view, nodeIndex, eventName, event) {\n try {\n var nodeDef = view.def.nodes[nodeIndex];\n var startView = nodeDef.flags & 33554432 /* ComponentView */ ?\n asElementData(view, nodeIndex).componentView :\n view;\n markParentViewsForCheck(startView);\n return Services.handleEvent(view, nodeIndex, eventName, event);\n }\n catch (e) {\n // Attention: Don't rethrow, as it would cancel Observable subscriptions!\n view.root.errorHandler.handleError(e);\n }\n }\n function declaredViewContainer(view) {\n if (view.parent) {\n var parentView = view.parent;\n return asElementData(parentView, view.parentNodeDef.nodeIndex);\n }\n return null;\n }\n /**\n * for component views, this is the host element.\n * for embedded views, this is the index of the parent node\n * that contains the view container.\n */\n function viewParentEl(view) {\n var parentView = view.parent;\n if (parentView) {\n return view.parentNodeDef.parent;\n }\n else {\n return null;\n }\n }\n function renderNode(view, def) {\n switch (def.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n return asElementData(view, def.nodeIndex).renderElement;\n case 2 /* TypeText */:\n return asTextData(view, def.nodeIndex).renderText;\n }\n }\n function elementEventFullName(target, name) {\n return target ? target + \":\" + name : name;\n }\n function isComponentView(view) {\n return !!view.parent && !!(view.parentNodeDef.flags & 32768 /* Component */);\n }\n function isEmbeddedView(view) {\n return !!view.parent && !(view.parentNodeDef.flags & 32768 /* Component */);\n }\n function filterQueryId(queryId) {\n return 1 << (queryId % 32);\n }\n function splitMatchedQueriesDsl(matchedQueriesDsl) {\n var matchedQueries = {};\n var matchedQueryIds = 0;\n var references = {};\n if (matchedQueriesDsl) {\n matchedQueriesDsl.forEach(function (_a) {\n var _b = __read(_a, 2), queryId = _b[0], valueType = _b[1];\n if (typeof queryId === 'number') {\n matchedQueries[queryId] = valueType;\n matchedQueryIds |= filterQueryId(queryId);\n }\n else {\n references[queryId] = valueType;\n }\n });\n }\n return { matchedQueries: matchedQueries, references: references, matchedQueryIds: matchedQueryIds };\n }\n function splitDepsDsl(deps, sourceName) {\n return deps.map(function (value) {\n var _a;\n var token;\n var flags;\n if (Array.isArray(value)) {\n _a = __read(value, 2), flags = _a[0], token = _a[1];\n }\n else {\n flags = 0 /* None */;\n token = value;\n }\n if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) {\n Object.defineProperty(token, SOURCE, { value: sourceName, configurable: true });\n }\n return { flags: flags, token: token, tokenKey: tokenKey(token) };\n });\n }\n function getParentRenderElement(view, renderHost, def) {\n var renderParent = def.renderParent;\n if (renderParent) {\n if ((renderParent.flags & 1 /* TypeElement */) === 0 ||\n (renderParent.flags & 33554432 /* ComponentView */) === 0 ||\n (renderParent.element.componentRendererType &&\n renderParent.element.componentRendererType.encapsulation ===\n exports.ViewEncapsulation.Native)) {\n // only children of non components, or children of components with native encapsulation should\n // be attached.\n return asElementData(view, def.renderParent.nodeIndex).renderElement;\n }\n }\n else {\n return renderHost;\n }\n }\n var DEFINITION_CACHE = new WeakMap();\n function resolveDefinition(factory) {\n var value = DEFINITION_CACHE.get(factory);\n if (!value) {\n value = factory(function () { return NOOP; });\n value.factory = factory;\n DEFINITION_CACHE.set(factory, value);\n }\n return value;\n }\n function rootRenderNodes(view) {\n var renderNodes = [];\n visitRootRenderNodes(view, 0 /* Collect */, undefined, undefined, renderNodes);\n return renderNodes;\n }\n function visitRootRenderNodes(view, action, parentNode, nextSibling, target) {\n // We need to re-compute the parent node in case the nodes have been moved around manually\n if (action === 3 /* RemoveChild */) {\n parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode));\n }\n visitSiblingRenderNodes(view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);\n }\n function visitSiblingRenderNodes(view, action, startIndex, endIndex, parentNode, nextSibling, target) {\n for (var i = startIndex; i <= endIndex; i++) {\n var nodeDef = view.def.nodes[i];\n if (nodeDef.flags & (1 /* TypeElement */ | 2 /* TypeText */ | 8 /* TypeNgContent */)) {\n visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target);\n }\n // jump to next sibling\n i += nodeDef.childCount;\n }\n }\n function visitProjectedRenderNodes(view, ngContentIndex, action, parentNode, nextSibling, target) {\n var compView = view;\n while (compView && !isComponentView(compView)) {\n compView = compView.parent;\n }\n var hostView = compView.parent;\n var hostElDef = viewParentEl(compView);\n var startIndex = hostElDef.nodeIndex + 1;\n var endIndex = hostElDef.nodeIndex + hostElDef.childCount;\n for (var i = startIndex; i <= endIndex; i++) {\n var nodeDef = hostView.def.nodes[i];\n if (nodeDef.ngContentIndex === ngContentIndex) {\n visitRenderNode(hostView, nodeDef, action, parentNode, nextSibling, target);\n }\n // jump to next sibling\n i += nodeDef.childCount;\n }\n if (!hostView.parent) {\n // a root view\n var projectedNodes = view.root.projectableNodes[ngContentIndex];\n if (projectedNodes) {\n for (var i = 0; i < projectedNodes.length; i++) {\n execRenderNodeAction(view, projectedNodes[i], action, parentNode, nextSibling, target);\n }\n }\n }\n }\n function visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target) {\n if (nodeDef.flags & 8 /* TypeNgContent */) {\n visitProjectedRenderNodes(view, nodeDef.ngContent.index, action, parentNode, nextSibling, target);\n }\n else {\n var rn = renderNode(view, nodeDef);\n if (action === 3 /* RemoveChild */ && (nodeDef.flags & 33554432 /* ComponentView */) &&\n (nodeDef.bindingFlags & 48 /* CatSyntheticProperty */)) {\n // Note: we might need to do both actions.\n if (nodeDef.bindingFlags & (16 /* SyntheticProperty */)) {\n execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n }\n if (nodeDef.bindingFlags & (32 /* SyntheticHostProperty */)) {\n var compView = asElementData(view, nodeDef.nodeIndex).componentView;\n execRenderNodeAction(compView, rn, action, parentNode, nextSibling, target);\n }\n }\n else {\n execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n }\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n var embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer._embeddedViews;\n for (var k = 0; k < embeddedViews.length; k++) {\n visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target);\n }\n }\n if (nodeDef.flags & 1 /* TypeElement */ && !nodeDef.element.name) {\n visitSiblingRenderNodes(view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode, nextSibling, target);\n }\n }\n }\n function execRenderNodeAction(view, renderNode, action, parentNode, nextSibling, target) {\n var renderer = view.renderer;\n switch (action) {\n case 1 /* AppendChild */:\n renderer.appendChild(parentNode, renderNode);\n break;\n case 2 /* InsertBefore */:\n renderer.insertBefore(parentNode, renderNode, nextSibling);\n break;\n case 3 /* RemoveChild */:\n renderer.removeChild(parentNode, renderNode);\n break;\n case 0 /* Collect */:\n target.push(renderNode);\n break;\n }\n }\n var NS_PREFIX_RE = /^:([^:]+):(.+)$/;\n function splitNamespace(name) {\n if (name[0] === ':') {\n var match = name.match(NS_PREFIX_RE);\n return [match[1], match[2]];\n }\n return ['', name];\n }\n function calcBindingFlags(bindings) {\n var flags = 0;\n for (var i = 0; i < bindings.length; i++) {\n flags |= bindings[i].flags;\n }\n return flags;\n }\n function interpolate(valueCount, constAndInterp) {\n var result = '';\n for (var i = 0; i < valueCount * 2; i = i + 2) {\n result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]);\n }\n return result + constAndInterp[valueCount * 2];\n }\n function inlineInterpolate(valueCount, c0, a1, c1, a2, c2, a3, c3, a4, c4, a5, c5, a6, c6, a7, c7, a8, c8, a9, c9) {\n switch (valueCount) {\n case 1:\n return c0 + _toStringWithNull(a1) + c1;\n case 2:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2;\n case 3:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3;\n case 4:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4;\n case 5:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5;\n case 6:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6;\n case 7:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7;\n case 8:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8;\n case 9:\n return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8 + _toStringWithNull(a9) + c9;\n default:\n throw new Error(\"Does not support more than 9 expressions\");\n }\n }\n function _toStringWithNull(v) {\n return v != null ? v.toString() : '';\n }\n var EMPTY_ARRAY$3 = [];\n var EMPTY_MAP = {};\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var UNDEFINED_VALUE = new Object();\n var InjectorRefTokenKey = tokenKey(Injector);\n var INJECTORRefTokenKey = tokenKey(INJECTOR);\n var NgModuleRefTokenKey = tokenKey(NgModuleRef);\n function moduleProvideDef(flags, token, value, deps) {\n // Need to resolve forwardRefs as e.g. for `useValue` we\n // lowered the expression and then stopped evaluating it,\n // i.e. also didn't unwrap it.\n value = resolveForwardRef(value);\n var depDefs = splitDepsDsl(deps, stringify(token));\n return {\n // will bet set by the module definition\n index: -1,\n deps: depDefs, flags: flags, token: token, value: value\n };\n }\n function moduleDef(providers) {\n var providersByKey = {};\n var modules = [];\n var isRoot = false;\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n if (provider.token === APP_ROOT && provider.value === true) {\n isRoot = true;\n }\n if (provider.flags & 1073741824 /* TypeNgModule */) {\n modules.push(provider.token);\n }\n provider.index = i;\n providersByKey[tokenKey(provider.token)] = provider;\n }\n return {\n // Will be filled later...\n factory: null,\n providersByKey: providersByKey,\n providers: providers,\n modules: modules,\n isRoot: isRoot,\n };\n }\n function initNgModule(data) {\n var def = data._def;\n var providers = data._providers = new Array(def.providers.length);\n for (var i = 0; i < def.providers.length; i++) {\n var provDef = def.providers[i];\n if (!(provDef.flags & 4096 /* LazyProvider */)) {\n // Make sure the provider has not been already initialized outside this loop.\n if (providers[i] === undefined) {\n providers[i] = _createProviderInstance(data, provDef);\n }\n }\n }\n }\n function resolveNgModuleDep(data, depDef, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n var former = setCurrentInjector(data);\n try {\n if (depDef.flags & 8 /* Value */) {\n return depDef.token;\n }\n if (depDef.flags & 2 /* Optional */) {\n notFoundValue = null;\n }\n if (depDef.flags & 1 /* SkipSelf */) {\n return data._parent.get(depDef.token, notFoundValue);\n }\n var tokenKey_1 = depDef.tokenKey;\n switch (tokenKey_1) {\n case InjectorRefTokenKey:\n case INJECTORRefTokenKey:\n case NgModuleRefTokenKey:\n return data;\n }\n var providerDef = data._def.providersByKey[tokenKey_1];\n var injectableDef = void 0;\n if (providerDef) {\n var providerInstance = data._providers[providerDef.index];\n if (providerInstance === undefined) {\n providerInstance = data._providers[providerDef.index] =\n _createProviderInstance(data, providerDef);\n }\n return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance;\n }\n else if ((injectableDef = getInjectableDef(depDef.token)) && targetsModule(data, injectableDef)) {\n var index = data._providers.length;\n data._def.providers[index] = data._def.providersByKey[depDef.tokenKey] = {\n flags: 1024 /* TypeFactoryProvider */ | 4096 /* LazyProvider */,\n value: injectableDef.factory,\n deps: [], index: index,\n token: depDef.token,\n };\n data._providers[index] = UNDEFINED_VALUE;\n return (data._providers[index] =\n _createProviderInstance(data, data._def.providersByKey[depDef.tokenKey]));\n }\n else if (depDef.flags & 4 /* Self */) {\n return notFoundValue;\n }\n return data._parent.get(depDef.token, notFoundValue);\n }\n finally {\n setCurrentInjector(former);\n }\n }\n function moduleTransitivelyPresent(ngModule, scope) {\n return ngModule._def.modules.indexOf(scope) > -1;\n }\n function targetsModule(ngModule, def) {\n return def.providedIn != null && (moduleTransitivelyPresent(ngModule, def.providedIn) ||\n def.providedIn === 'root' && ngModule._def.isRoot);\n }\n function _createProviderInstance(ngModule, providerDef) {\n var injectable;\n switch (providerDef.flags & 201347067 /* Types */) {\n case 512 /* TypeClassProvider */:\n injectable = _createClass(ngModule, providerDef.value, providerDef.deps);\n break;\n case 1024 /* TypeFactoryProvider */:\n injectable = _callFactory(ngModule, providerDef.value, providerDef.deps);\n break;\n case 2048 /* TypeUseExistingProvider */:\n injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]);\n break;\n case 256 /* TypeValueProvider */:\n injectable = providerDef.value;\n break;\n }\n // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be\n // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be\n // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already\n // set (ngOnDestroy was detected statically).\n if (injectable !== UNDEFINED_VALUE && injectable !== null && typeof injectable === 'object' &&\n !(providerDef.flags & 131072 /* OnDestroy */) && typeof injectable.ngOnDestroy === 'function') {\n providerDef.flags |= 131072 /* OnDestroy */;\n }\n return injectable === undefined ? UNDEFINED_VALUE : injectable;\n }\n function _createClass(ngModule, ctor, deps) {\n var len = deps.length;\n switch (len) {\n case 0:\n return new ctor();\n case 1:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]));\n case 2:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n case 3:\n return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));\n default:\n var depValues = new Array(len);\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return new (ctor.bind.apply(ctor, __spread([void 0], depValues)))();\n }\n }\n function _callFactory(ngModule, factory, deps) {\n var len = deps.length;\n switch (len) {\n case 0:\n return factory();\n case 1:\n return factory(resolveNgModuleDep(ngModule, deps[0]));\n case 2:\n return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n case 3:\n return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));\n default:\n var depValues = Array(len);\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return factory.apply(void 0, __spread(depValues));\n }\n }\n function callNgModuleLifecycle(ngModule, lifecycles) {\n var def = ngModule._def;\n var destroyed = new Set();\n for (var i = 0; i < def.providers.length; i++) {\n var provDef = def.providers[i];\n if (provDef.flags & 131072 /* OnDestroy */) {\n var instance = ngModule._providers[i];\n if (instance && instance !== UNDEFINED_VALUE) {\n var onDestroy = instance.ngOnDestroy;\n if (typeof onDestroy === 'function' && !destroyed.has(instance)) {\n onDestroy.apply(instance);\n destroyed.add(instance);\n }\n }\n }\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function attachEmbeddedView(parentView, elementData, viewIndex, view) {\n var embeddedViews = elementData.viewContainer._embeddedViews;\n if (viewIndex === null || viewIndex === undefined) {\n viewIndex = embeddedViews.length;\n }\n view.viewContainerParent = parentView;\n addToArray(embeddedViews, viewIndex, view);\n attachProjectedView(elementData, view);\n Services.dirtyParentQueries(view);\n var prevView = viewIndex > 0 ? embeddedViews[viewIndex - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n }\n function attachProjectedView(vcElementData, view) {\n var dvcElementData = declaredViewContainer(view);\n if (!dvcElementData || dvcElementData === vcElementData ||\n view.state & 16 /* IsProjectedView */) {\n return;\n }\n // Note: For performance reasons, we\n // - add a view to template._projectedViews only 1x throughout its lifetime,\n // and remove it not until the view is destroyed.\n // (hard, as when a parent view is attached/detached we would need to attach/detach all\n // nested projected views as well, even across component boundaries).\n // - don't track the insertion order of views in the projected views array\n // (hard, as when the views of the same template are inserted different view containers)\n view.state |= 16 /* IsProjectedView */;\n var projectedViews = dvcElementData.template._projectedViews;\n if (!projectedViews) {\n projectedViews = dvcElementData.template._projectedViews = [];\n }\n projectedViews.push(view);\n // Note: we are changing the NodeDef here as we cannot calculate\n // the fact whether a template is used for projection during compilation.\n markNodeAsProjectedTemplate(view.parent.def, view.parentNodeDef);\n }\n function markNodeAsProjectedTemplate(viewDef, nodeDef) {\n if (nodeDef.flags & 4 /* ProjectedTemplate */) {\n return;\n }\n viewDef.nodeFlags |= 4 /* ProjectedTemplate */;\n nodeDef.flags |= 4 /* ProjectedTemplate */;\n var parentNodeDef = nodeDef.parent;\n while (parentNodeDef) {\n parentNodeDef.childFlags |= 4 /* ProjectedTemplate */;\n parentNodeDef = parentNodeDef.parent;\n }\n }\n function detachEmbeddedView(elementData, viewIndex) {\n var embeddedViews = elementData.viewContainer._embeddedViews;\n if (viewIndex == null || viewIndex >= embeddedViews.length) {\n viewIndex = embeddedViews.length - 1;\n }\n if (viewIndex < 0) {\n return null;\n }\n var view = embeddedViews[viewIndex];\n view.viewContainerParent = null;\n removeFromArray(embeddedViews, viewIndex);\n // See attachProjectedView for why we don't update projectedViews here.\n Services.dirtyParentQueries(view);\n renderDetachView$1(view);\n return view;\n }\n function detachProjectedView(view) {\n if (!(view.state & 16 /* IsProjectedView */)) {\n return;\n }\n var dvcElementData = declaredViewContainer(view);\n if (dvcElementData) {\n var projectedViews = dvcElementData.template._projectedViews;\n if (projectedViews) {\n removeFromArray(projectedViews, projectedViews.indexOf(view));\n Services.dirtyParentQueries(view);\n }\n }\n }\n function moveEmbeddedView(elementData, oldViewIndex, newViewIndex) {\n var embeddedViews = elementData.viewContainer._embeddedViews;\n var view = embeddedViews[oldViewIndex];\n removeFromArray(embeddedViews, oldViewIndex);\n if (newViewIndex == null) {\n newViewIndex = embeddedViews.length;\n }\n addToArray(embeddedViews, newViewIndex, view);\n // Note: Don't need to change projectedViews as the order in there\n // as always invalid...\n Services.dirtyParentQueries(view);\n renderDetachView$1(view);\n var prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n return view;\n }\n function renderAttachEmbeddedView(elementData, prevView, view) {\n var prevRenderNode = prevView ? renderNode(prevView, prevView.def.lastRenderRootNode) :\n elementData.renderElement;\n var parentNode = view.renderer.parentNode(prevRenderNode);\n var nextSibling = view.renderer.nextSibling(prevRenderNode);\n // Note: We can't check if `nextSibling` is present, as on WebWorkers it will always be!\n // However, browsers automatically do `appendChild` when there is no `nextSibling`.\n visitRootRenderNodes(view, 2 /* InsertBefore */, parentNode, nextSibling, undefined);\n }\n function renderDetachView$1(view) {\n visitRootRenderNodes(view, 3 /* RemoveChild */, null, null, undefined);\n }\n function addToArray(arr, index, value) {\n // perf: array.push is faster than array.splice!\n if (index >= arr.length) {\n arr.push(value);\n }\n else {\n arr.splice(index, 0, value);\n }\n }\n function removeFromArray(arr, index) {\n // perf: array.pop is faster than array.splice!\n if (index >= arr.length - 1) {\n arr.pop();\n }\n else {\n arr.splice(index, 1);\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var EMPTY_CONTEXT = new Object();\n // Attention: this function is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n function createComponentFactory(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors) {\n return new ComponentFactory_(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);\n }\n function getComponentViewDefinitionFactory(componentFactory) {\n return componentFactory.viewDefFactory;\n }\n var ComponentFactory_ = /** @class */ (function (_super) {\n __extends(ComponentFactory_, _super);\n function ComponentFactory_(selector, componentType, viewDefFactory, _inputs, _outputs, ngContentSelectors) {\n var _this = \n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n _super.call(this) || this;\n _this.selector = selector;\n _this.componentType = componentType;\n _this._inputs = _inputs;\n _this._outputs = _outputs;\n _this.ngContentSelectors = ngContentSelectors;\n _this.viewDefFactory = viewDefFactory;\n return _this;\n }\n Object.defineProperty(ComponentFactory_.prototype, \"inputs\", {\n get: function () {\n var inputsArr = [];\n var inputs = this._inputs;\n for (var propName in inputs) {\n var templateName = inputs[propName];\n inputsArr.push({ propName: propName, templateName: templateName });\n }\n return inputsArr;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ComponentFactory_.prototype, \"outputs\", {\n get: function () {\n var outputsArr = [];\n for (var propName in this._outputs) {\n var templateName = this._outputs[propName];\n outputsArr.push({ propName: propName, templateName: templateName });\n }\n return outputsArr;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates a new component.\n */\n ComponentFactory_.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {\n if (!ngModule) {\n throw new Error('ngModule should be provided');\n }\n var viewDef = resolveDefinition(this.viewDefFactory);\n var componentNodeIndex = viewDef.nodes[0].element.componentProvider.nodeIndex;\n var view = Services.createRootView(injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);\n var component = asProviderData(view, componentNodeIndex).instance;\n if (rootSelectorOrNode) {\n view.renderer.setAttribute(asElementData(view, 0).renderElement, 'ng-version', VERSION.full);\n }\n return new ComponentRef_(view, new ViewRef_(view), component);\n };\n return ComponentFactory_;\n }(ComponentFactory));\n var ComponentRef_ = /** @class */ (function (_super) {\n __extends(ComponentRef_, _super);\n function ComponentRef_(_view, _viewRef, _component) {\n var _this = _super.call(this) || this;\n _this._view = _view;\n _this._viewRef = _viewRef;\n _this._component = _component;\n _this._elDef = _this._view.def.nodes[0];\n _this.hostView = _viewRef;\n _this.changeDetectorRef = _viewRef;\n _this.instance = _component;\n return _this;\n }\n Object.defineProperty(ComponentRef_.prototype, \"location\", {\n get: function () {\n return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ComponentRef_.prototype, \"injector\", {\n get: function () { return new Injector_(this._view, this._elDef); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ComponentRef_.prototype, \"componentType\", {\n get: function () { return this._component.constructor; },\n enumerable: true,\n configurable: true\n });\n ComponentRef_.prototype.destroy = function () { this._viewRef.destroy(); };\n ComponentRef_.prototype.onDestroy = function (callback) { this._viewRef.onDestroy(callback); };\n return ComponentRef_;\n }(ComponentRef));\n function createViewContainerData(view, elDef, elData) {\n return new ViewContainerRef_(view, elDef, elData);\n }\n var ViewContainerRef_ = /** @class */ (function () {\n function ViewContainerRef_(_view, _elDef, _data) {\n this._view = _view;\n this._elDef = _elDef;\n this._data = _data;\n /**\n * @internal\n */\n this._embeddedViews = [];\n }\n Object.defineProperty(ViewContainerRef_.prototype, \"element\", {\n get: function () { return new ElementRef(this._data.renderElement); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewContainerRef_.prototype, \"injector\", {\n get: function () { return new Injector_(this._view, this._elDef); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewContainerRef_.prototype, \"parentInjector\", {\n /** @deprecated No replacement */\n get: function () {\n var view = this._view;\n var elDef = this._elDef.parent;\n while (!elDef && view) {\n elDef = viewParentEl(view);\n view = view.parent;\n }\n return view ? new Injector_(view, elDef) : new Injector_(this._view, null);\n },\n enumerable: true,\n configurable: true\n });\n ViewContainerRef_.prototype.clear = function () {\n var len = this._embeddedViews.length;\n for (var i = len - 1; i >= 0; i--) {\n var view = detachEmbeddedView(this._data, i);\n Services.destroyView(view);\n }\n };\n ViewContainerRef_.prototype.get = function (index) {\n var view = this._embeddedViews[index];\n if (view) {\n var ref = new ViewRef_(view);\n ref.attachToViewContainerRef(this);\n return ref;\n }\n return null;\n };\n Object.defineProperty(ViewContainerRef_.prototype, \"length\", {\n get: function () { return this._embeddedViews.length; },\n enumerable: true,\n configurable: true\n });\n ViewContainerRef_.prototype.createEmbeddedView = function (templateRef, context, index) {\n var viewRef = templateRef.createEmbeddedView(context || {});\n this.insert(viewRef, index);\n return viewRef;\n };\n ViewContainerRef_.prototype.createComponent = function (componentFactory, index, injector, projectableNodes, ngModuleRef) {\n var contextInjector = injector || this.parentInjector;\n if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {\n ngModuleRef = contextInjector.get(NgModuleRef);\n }\n var componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n this.insert(componentRef.hostView, index);\n return componentRef;\n };\n ViewContainerRef_.prototype.insert = function (viewRef, index) {\n if (viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n var viewRef_ = viewRef;\n var viewData = viewRef_._view;\n attachEmbeddedView(this._view, this._data, index, viewData);\n viewRef_.attachToViewContainerRef(this);\n return viewRef;\n };\n ViewContainerRef_.prototype.move = function (viewRef, currentIndex) {\n if (viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n var previousIndex = this._embeddedViews.indexOf(viewRef._view);\n moveEmbeddedView(this._data, previousIndex, currentIndex);\n return viewRef;\n };\n ViewContainerRef_.prototype.indexOf = function (viewRef) {\n return this._embeddedViews.indexOf(viewRef._view);\n };\n ViewContainerRef_.prototype.remove = function (index) {\n var viewData = detachEmbeddedView(this._data, index);\n if (viewData) {\n Services.destroyView(viewData);\n }\n };\n ViewContainerRef_.prototype.detach = function (index) {\n var view = detachEmbeddedView(this._data, index);\n return view ? new ViewRef_(view) : null;\n };\n return ViewContainerRef_;\n }());\n function createChangeDetectorRef(view) {\n return new ViewRef_(view);\n }\n var ViewRef_ = /** @class */ (function () {\n function ViewRef_(_view) {\n this._view = _view;\n this._viewContainerRef = null;\n this._appRef = null;\n }\n Object.defineProperty(ViewRef_.prototype, \"rootNodes\", {\n get: function () { return rootRenderNodes(this._view); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewRef_.prototype, \"context\", {\n get: function () { return this._view.context; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewRef_.prototype, \"destroyed\", {\n get: function () { return (this._view.state & 128 /* Destroyed */) !== 0; },\n enumerable: true,\n configurable: true\n });\n ViewRef_.prototype.markForCheck = function () { markParentViewsForCheck(this._view); };\n ViewRef_.prototype.detach = function () { this._view.state &= ~4 /* Attached */; };\n ViewRef_.prototype.detectChanges = function () {\n var fs = this._view.root.rendererFactory;\n if (fs.begin) {\n fs.begin();\n }\n try {\n Services.checkAndUpdateView(this._view);\n }\n finally {\n if (fs.end) {\n fs.end();\n }\n }\n };\n ViewRef_.prototype.checkNoChanges = function () { Services.checkNoChangesView(this._view); };\n ViewRef_.prototype.reattach = function () { this._view.state |= 4 /* Attached */; };\n ViewRef_.prototype.onDestroy = function (callback) {\n if (!this._view.disposables) {\n this._view.disposables = [];\n }\n this._view.disposables.push(callback);\n };\n ViewRef_.prototype.destroy = function () {\n if (this._appRef) {\n this._appRef.detachView(this);\n }\n else if (this._viewContainerRef) {\n this._viewContainerRef.detach(this._viewContainerRef.indexOf(this));\n }\n Services.destroyView(this._view);\n };\n ViewRef_.prototype.detachFromAppRef = function () {\n this._appRef = null;\n renderDetachView$1(this._view);\n Services.dirtyParentQueries(this._view);\n };\n ViewRef_.prototype.attachToAppRef = function (appRef) {\n if (this._viewContainerRef) {\n throw new Error('This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n };\n ViewRef_.prototype.attachToViewContainerRef = function (vcRef) {\n if (this._appRef) {\n throw new Error('This view is already attached directly to the ApplicationRef!');\n }\n this._viewContainerRef = vcRef;\n };\n return ViewRef_;\n }());\n function createTemplateData(view, def) {\n return new TemplateRef_(view, def);\n }\n var TemplateRef_ = /** @class */ (function (_super) {\n __extends(TemplateRef_, _super);\n function TemplateRef_(_parentView, _def) {\n var _this = _super.call(this) || this;\n _this._parentView = _parentView;\n _this._def = _def;\n return _this;\n }\n TemplateRef_.prototype.createEmbeddedView = function (context) {\n return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def, this._def.element.template, context));\n };\n Object.defineProperty(TemplateRef_.prototype, \"elementRef\", {\n get: function () {\n return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);\n },\n enumerable: true,\n configurable: true\n });\n return TemplateRef_;\n }(TemplateRef));\n function createInjector$1(view, elDef) {\n return new Injector_(view, elDef);\n }\n var Injector_ = /** @class */ (function () {\n function Injector_(view, elDef) {\n this.view = view;\n this.elDef = elDef;\n }\n Injector_.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n var allowPrivateServices = this.elDef ? (this.elDef.flags & 33554432 /* ComponentView */) !== 0 : false;\n return Services.resolveDep(this.view, this.elDef, allowPrivateServices, { flags: 0 /* None */, token: token, tokenKey: tokenKey(token) }, notFoundValue);\n };\n return Injector_;\n }());\n function nodeValue(view, index) {\n var def = view.def.nodes[index];\n if (def.flags & 1 /* TypeElement */) {\n var elData = asElementData(view, def.nodeIndex);\n return def.element.template ? elData.template : elData.renderElement;\n }\n else if (def.flags & 2 /* TypeText */) {\n return asTextData(view, def.nodeIndex).renderText;\n }\n else if (def.flags & (20224 /* CatProvider */ | 16 /* TypePipe */)) {\n return asProviderData(view, def.nodeIndex).instance;\n }\n throw new Error(\"Illegal state: read nodeValue for node index \" + index);\n }\n function createRendererV1(view) {\n return new RendererAdapter(view.renderer);\n }\n var RendererAdapter = /** @class */ (function () {\n function RendererAdapter(delegate) {\n this.delegate = delegate;\n }\n RendererAdapter.prototype.selectRootElement = function (selectorOrNode) {\n return this.delegate.selectRootElement(selectorOrNode);\n };\n RendererAdapter.prototype.createElement = function (parent, namespaceAndName) {\n var _a = __read(splitNamespace(namespaceAndName), 2), ns = _a[0], name = _a[1];\n var el = this.delegate.createElement(name, ns);\n if (parent) {\n this.delegate.appendChild(parent, el);\n }\n return el;\n };\n RendererAdapter.prototype.createViewRoot = function (hostElement) { return hostElement; };\n RendererAdapter.prototype.createTemplateAnchor = function (parentElement) {\n var comment = this.delegate.createComment('');\n if (parentElement) {\n this.delegate.appendChild(parentElement, comment);\n }\n return comment;\n };\n RendererAdapter.prototype.createText = function (parentElement, value) {\n var node = this.delegate.createText(value);\n if (parentElement) {\n this.delegate.appendChild(parentElement, node);\n }\n return node;\n };\n RendererAdapter.prototype.projectNodes = function (parentElement, nodes) {\n for (var i = 0; i < nodes.length; i++) {\n this.delegate.appendChild(parentElement, nodes[i]);\n }\n };\n RendererAdapter.prototype.attachViewAfter = function (node, viewRootNodes) {\n var parentElement = this.delegate.parentNode(node);\n var nextSibling = this.delegate.nextSibling(node);\n for (var i = 0; i < viewRootNodes.length; i++) {\n this.delegate.insertBefore(parentElement, viewRootNodes[i], nextSibling);\n }\n };\n RendererAdapter.prototype.detachView = function (viewRootNodes) {\n for (var i = 0; i < viewRootNodes.length; i++) {\n var node = viewRootNodes[i];\n var parentElement = this.delegate.parentNode(node);\n this.delegate.removeChild(parentElement, node);\n }\n };\n RendererAdapter.prototype.destroyView = function (hostElement, viewAllNodes) {\n for (var i = 0; i < viewAllNodes.length; i++) {\n this.delegate.destroyNode(viewAllNodes[i]);\n }\n };\n RendererAdapter.prototype.listen = function (renderElement, name, callback) {\n return this.delegate.listen(renderElement, name, callback);\n };\n RendererAdapter.prototype.listenGlobal = function (target, name, callback) {\n return this.delegate.listen(target, name, callback);\n };\n RendererAdapter.prototype.setElementProperty = function (renderElement, propertyName, propertyValue) {\n this.delegate.setProperty(renderElement, propertyName, propertyValue);\n };\n RendererAdapter.prototype.setElementAttribute = function (renderElement, namespaceAndName, attributeValue) {\n var _a = __read(splitNamespace(namespaceAndName), 2), ns = _a[0], name = _a[1];\n if (attributeValue != null) {\n this.delegate.setAttribute(renderElement, name, attributeValue, ns);\n }\n else {\n this.delegate.removeAttribute(renderElement, name, ns);\n }\n };\n RendererAdapter.prototype.setBindingDebugInfo = function (renderElement, propertyName, propertyValue) { };\n RendererAdapter.prototype.setElementClass = function (renderElement, className, isAdd) {\n if (isAdd) {\n this.delegate.addClass(renderElement, className);\n }\n else {\n this.delegate.removeClass(renderElement, className);\n }\n };\n RendererAdapter.prototype.setElementStyle = function (renderElement, styleName, styleValue) {\n if (styleValue != null) {\n this.delegate.setStyle(renderElement, styleName, styleValue);\n }\n else {\n this.delegate.removeStyle(renderElement, styleName);\n }\n };\n RendererAdapter.prototype.invokeElementMethod = function (renderElement, methodName, args) {\n renderElement[methodName].apply(renderElement, args);\n };\n RendererAdapter.prototype.setText = function (renderNode, text) { this.delegate.setValue(renderNode, text); };\n RendererAdapter.prototype.animate = function () { throw new Error('Renderer.animate is no longer supported!'); };\n return RendererAdapter;\n }());\n function createNgModuleRef(moduleType, parent, bootstrapComponents, def) {\n return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);\n }\n var NgModuleRef_ = /** @class */ (function () {\n function NgModuleRef_(_moduleType, _parent, _bootstrapComponents, _def) {\n this._moduleType = _moduleType;\n this._parent = _parent;\n this._bootstrapComponents = _bootstrapComponents;\n this._def = _def;\n this._destroyListeners = [];\n this._destroyed = false;\n this.injector = this;\n initNgModule(this);\n }\n NgModuleRef_.prototype.get = function (token, notFoundValue, injectFlags) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n if (injectFlags === void 0) { injectFlags = exports.InjectFlags.Default; }\n var flags = 0 /* None */;\n if (injectFlags & exports.InjectFlags.SkipSelf) {\n flags |= 1 /* SkipSelf */;\n }\n else if (injectFlags & exports.InjectFlags.Self) {\n flags |= 4 /* Self */;\n }\n return resolveNgModuleDep(this, { token: token, tokenKey: tokenKey(token), flags: flags }, notFoundValue);\n };\n Object.defineProperty(NgModuleRef_.prototype, \"instance\", {\n get: function () { return this.get(this._moduleType); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgModuleRef_.prototype, \"componentFactoryResolver\", {\n get: function () { return this.get(ComponentFactoryResolver); },\n enumerable: true,\n configurable: true\n });\n NgModuleRef_.prototype.destroy = function () {\n if (this._destroyed) {\n throw new Error(\"The ng module \" + stringify(this.instance.constructor) + \" has already been destroyed.\");\n }\n this._destroyed = true;\n callNgModuleLifecycle(this, 131072 /* OnDestroy */);\n this._destroyListeners.forEach(function (listener) { return listener(); });\n };\n NgModuleRef_.prototype.onDestroy = function (callback) { this._destroyListeners.push(callback); };\n return NgModuleRef_;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var RendererV1TokenKey = tokenKey(Renderer);\n var Renderer2TokenKey = tokenKey(Renderer2);\n var ElementRefTokenKey = tokenKey(ElementRef);\n var ViewContainerRefTokenKey = tokenKey(ViewContainerRef);\n var TemplateRefTokenKey = tokenKey(TemplateRef);\n var ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);\n var InjectorRefTokenKey$1 = tokenKey(Injector);\n var INJECTORRefTokenKey$1 = tokenKey(INJECTOR);\n function directiveDef(checkIndex, flags, matchedQueries, childCount, ctor, deps, props, outputs) {\n var bindings = [];\n if (props) {\n for (var prop in props) {\n var _a = __read(props[prop], 2), bindingIndex = _a[0], nonMinifiedName = _a[1];\n bindings[bindingIndex] = {\n flags: 8 /* TypeProperty */,\n name: prop, nonMinifiedName: nonMinifiedName,\n ns: null,\n securityContext: null,\n suffix: null\n };\n }\n }\n var outputDefs = [];\n if (outputs) {\n for (var propName in outputs) {\n outputDefs.push({ type: 1 /* DirectiveOutput */, propName: propName, target: null, eventName: outputs[propName] });\n }\n }\n flags |= 16384 /* TypeDirective */;\n return _def(checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs);\n }\n function pipeDef(flags, ctor, deps) {\n flags |= 16 /* TypePipe */;\n return _def(-1, flags, null, 0, ctor, ctor, deps);\n }\n function providerDef(flags, matchedQueries, token, value, deps) {\n return _def(-1, flags, matchedQueries, 0, token, value, deps);\n }\n function _def(checkIndex, flags, matchedQueriesDsl, childCount, token, value, deps, bindings, outputs) {\n var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;\n if (!outputs) {\n outputs = [];\n }\n if (!bindings) {\n bindings = [];\n }\n // Need to resolve forwardRefs as e.g. for `useValue` we\n // lowered the expression and then stopped evaluating it,\n // i.e. also didn't unwrap it.\n value = resolveForwardRef(value);\n var depDefs = splitDepsDsl(deps, stringify(token));\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: checkIndex,\n flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references,\n ngContentIndex: -1, childCount: childCount, bindings: bindings,\n bindingFlags: calcBindingFlags(bindings), outputs: outputs,\n element: null,\n provider: { token: token, value: value, deps: depDefs },\n text: null,\n query: null,\n ngContent: null\n };\n }\n function createProviderInstance(view, def) {\n return _createProviderInstance$1(view, def);\n }\n function createPipeInstance(view, def) {\n // deps are looked up from component.\n var compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n // pipes can see the private services of the component\n var allowPrivateServices = true;\n // pipes are always eager and classes!\n return createClass(compView.parent, viewParentEl(compView), allowPrivateServices, def.provider.value, def.provider.deps);\n }\n function createDirectiveInstance(view, def) {\n // components can see other private services, other directives can't.\n var allowPrivateServices = (def.flags & 32768 /* Component */) > 0;\n // directives are always eager and classes!\n var instance = createClass(view, def.parent, allowPrivateServices, def.provider.value, def.provider.deps);\n if (def.outputs.length) {\n for (var i = 0; i < def.outputs.length; i++) {\n var output = def.outputs[i];\n var outputObservable = instance[output.propName];\n if (isObservable(outputObservable)) {\n var subscription = outputObservable.subscribe(eventHandlerClosure(view, def.parent.nodeIndex, output.eventName));\n view.disposables[def.outputIndex + i] = subscription.unsubscribe.bind(subscription);\n }\n else {\n throw new Error(\"@Output \" + output.propName + \" not initialized in '\" + instance.constructor.name + \"'.\");\n }\n }\n }\n return instance;\n }\n function eventHandlerClosure(view, index, eventName) {\n return function (event) { return dispatchEvent(view, index, eventName, event); };\n }\n function checkAndUpdateDirectiveInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var providerData = asProviderData(view, def.nodeIndex);\n var directive = providerData.instance;\n var changed = false;\n var changes = undefined;\n var bindLen = def.bindings.length;\n if (bindLen > 0 && checkBinding(view, def, 0, v0)) {\n changed = true;\n changes = updateProp(view, providerData, def, 0, v0, changes);\n }\n if (bindLen > 1 && checkBinding(view, def, 1, v1)) {\n changed = true;\n changes = updateProp(view, providerData, def, 1, v1, changes);\n }\n if (bindLen > 2 && checkBinding(view, def, 2, v2)) {\n changed = true;\n changes = updateProp(view, providerData, def, 2, v2, changes);\n }\n if (bindLen > 3 && checkBinding(view, def, 3, v3)) {\n changed = true;\n changes = updateProp(view, providerData, def, 3, v3, changes);\n }\n if (bindLen > 4 && checkBinding(view, def, 4, v4)) {\n changed = true;\n changes = updateProp(view, providerData, def, 4, v4, changes);\n }\n if (bindLen > 5 && checkBinding(view, def, 5, v5)) {\n changed = true;\n changes = updateProp(view, providerData, def, 5, v5, changes);\n }\n if (bindLen > 6 && checkBinding(view, def, 6, v6)) {\n changed = true;\n changes = updateProp(view, providerData, def, 6, v6, changes);\n }\n if (bindLen > 7 && checkBinding(view, def, 7, v7)) {\n changed = true;\n changes = updateProp(view, providerData, def, 7, v7, changes);\n }\n if (bindLen > 8 && checkBinding(view, def, 8, v8)) {\n changed = true;\n changes = updateProp(view, providerData, def, 8, v8, changes);\n }\n if (bindLen > 9 && checkBinding(view, def, 9, v9)) {\n changed = true;\n changes = updateProp(view, providerData, def, 9, v9, changes);\n }\n if (changes) {\n directive.ngOnChanges(changes);\n }\n if ((def.flags & 65536 /* OnInit */) &&\n shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) {\n directive.ngOnInit();\n }\n if (def.flags & 262144 /* DoCheck */) {\n directive.ngDoCheck();\n }\n return changed;\n }\n function checkAndUpdateDirectiveDynamic(view, def, values) {\n var providerData = asProviderData(view, def.nodeIndex);\n var directive = providerData.instance;\n var changed = false;\n var changes = undefined;\n for (var i = 0; i < values.length; i++) {\n if (checkBinding(view, def, i, values[i])) {\n changed = true;\n changes = updateProp(view, providerData, def, i, values[i], changes);\n }\n }\n if (changes) {\n directive.ngOnChanges(changes);\n }\n if ((def.flags & 65536 /* OnInit */) &&\n shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) {\n directive.ngOnInit();\n }\n if (def.flags & 262144 /* DoCheck */) {\n directive.ngDoCheck();\n }\n return changed;\n }\n function _createProviderInstance$1(view, def) {\n // private services can see other private services\n var allowPrivateServices = (def.flags & 8192 /* PrivateProvider */) > 0;\n var providerDef = def.provider;\n switch (def.flags & 201347067 /* Types */) {\n case 512 /* TypeClassProvider */:\n return createClass(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);\n case 1024 /* TypeFactoryProvider */:\n return callFactory(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);\n case 2048 /* TypeUseExistingProvider */:\n return resolveDep(view, def.parent, allowPrivateServices, providerDef.deps[0]);\n case 256 /* TypeValueProvider */:\n return providerDef.value;\n }\n }\n function createClass(view, elDef, allowPrivateServices, ctor, deps) {\n var len = deps.length;\n switch (len) {\n case 0:\n return new ctor();\n case 1:\n return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n case 2:\n return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));\n case 3:\n return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));\n default:\n var depValues = new Array(len);\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);\n }\n return new (ctor.bind.apply(ctor, __spread([void 0], depValues)))();\n }\n }\n function callFactory(view, elDef, allowPrivateServices, factory, deps) {\n var len = deps.length;\n switch (len) {\n case 0:\n return factory();\n case 1:\n return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n case 2:\n return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));\n case 3:\n return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));\n default:\n var depValues = Array(len);\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);\n }\n return factory.apply(void 0, __spread(depValues));\n }\n }\n // This default value is when checking the hierarchy for a token.\n //\n // It means both:\n // - the token is not provided by the current injector,\n // - only the element injectors should be checked (ie do not check module injectors\n //\n // mod1\n // /\n // el1 mod2\n // \\ /\n // el2\n //\n // When requesting el2.injector.get(token), we should check in the following order and return the\n // first found value:\n // - el2.injector.get(token, default)\n // - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module\n // - mod2.injector.get(token, default)\n var NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\n function resolveDep(view, elDef, allowPrivateServices, depDef, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n if (depDef.flags & 8 /* Value */) {\n return depDef.token;\n }\n var startView = view;\n if (depDef.flags & 2 /* Optional */) {\n notFoundValue = null;\n }\n var tokenKey = depDef.tokenKey;\n if (tokenKey === ChangeDetectorRefTokenKey) {\n // directives on the same element as a component should be able to control the change detector\n // of that component as well.\n allowPrivateServices = !!(elDef && elDef.element.componentView);\n }\n if (elDef && (depDef.flags & 1 /* SkipSelf */)) {\n allowPrivateServices = false;\n elDef = elDef.parent;\n }\n var searchView = view;\n while (searchView) {\n if (elDef) {\n switch (tokenKey) {\n case RendererV1TokenKey: {\n var compView = findCompView(searchView, elDef, allowPrivateServices);\n return createRendererV1(compView);\n }\n case Renderer2TokenKey: {\n var compView = findCompView(searchView, elDef, allowPrivateServices);\n return compView.renderer;\n }\n case ElementRefTokenKey:\n return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement);\n case ViewContainerRefTokenKey:\n return asElementData(searchView, elDef.nodeIndex).viewContainer;\n case TemplateRefTokenKey: {\n if (elDef.element.template) {\n return asElementData(searchView, elDef.nodeIndex).template;\n }\n break;\n }\n case ChangeDetectorRefTokenKey: {\n var cdView = findCompView(searchView, elDef, allowPrivateServices);\n return createChangeDetectorRef(cdView);\n }\n case InjectorRefTokenKey$1:\n case INJECTORRefTokenKey$1:\n return createInjector$1(searchView, elDef);\n default:\n var providerDef_1 = (allowPrivateServices ? elDef.element.allProviders :\n elDef.element.publicProviders)[tokenKey];\n if (providerDef_1) {\n var providerData = asProviderData(searchView, providerDef_1.nodeIndex);\n if (!providerData) {\n providerData = { instance: _createProviderInstance$1(searchView, providerDef_1) };\n searchView.nodes[providerDef_1.nodeIndex] = providerData;\n }\n return providerData.instance;\n }\n }\n }\n allowPrivateServices = isComponentView(searchView);\n elDef = viewParentEl(searchView);\n searchView = searchView.parent;\n if (depDef.flags & 4 /* Self */) {\n searchView = null;\n }\n }\n var value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR);\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n // Return the value from the root element injector when\n // - it provides it\n // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n // - the module injector should not be checked\n // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n return value;\n }\n return startView.root.ngModule.injector.get(depDef.token, notFoundValue);\n }\n function findCompView(view, elDef, allowPrivateServices) {\n var compView;\n if (allowPrivateServices) {\n compView = asElementData(view, elDef.nodeIndex).componentView;\n }\n else {\n compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n }\n return compView;\n }\n function updateProp(view, providerData, def, bindingIdx, value, changes) {\n if (def.flags & 32768 /* Component */) {\n var compView = asElementData(view, def.parent.nodeIndex).componentView;\n if (compView.def.flags & 2 /* OnPush */) {\n compView.state |= 8 /* ChecksEnabled */;\n }\n }\n var binding = def.bindings[bindingIdx];\n var propName = binding.name;\n // Note: This is still safe with Closure Compiler as\n // the user passed in the property name as an object has to `providerDef`,\n // so Closure Compiler will have renamed the property correctly already.\n providerData.instance[propName] = value;\n if (def.flags & 524288 /* OnChanges */) {\n changes = changes || {};\n var oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);\n var binding_1 = def.bindings[bindingIdx];\n changes[binding_1.nonMinifiedName] =\n new SimpleChange(oldValue, value, (view.state & 2 /* FirstCheck */) !== 0);\n }\n view.oldValues[def.bindingIndex + bindingIdx] = value;\n return changes;\n }\n // This function calls the ngAfterContentCheck, ngAfterContentInit,\n // ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node\n // flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are\n // called during a pre-order traversal of the view tree (that is calling the\n // parent hooks before the child hooks) these events are sent in using a\n // post-order traversal of the tree (children before parents). This changes the\n // meaning of initIndex in the view state. For ngOnInit, initIndex tracks the\n // expected nodeIndex which a ngOnInit should be called. When sending\n // ngAfterContentInit and ngAfterViewInit it is the expected count of\n // ngAfterContentInit or ngAfterViewInit methods that have been called. This\n // ensure that despite being called recursively or after picking up after an\n // exception, the ngAfterContentInit or ngAfterViewInit will be called on the\n // correct nodes. Consider for example, the following (where E is an element\n // and D is a directive)\n // Tree: pre-order index post-order index\n // E1 0 6\n // E2 1 1\n // D3 2 0\n // E4 3 5\n // E5 4 4\n // E6 5 2\n // E7 6 3\n // As can be seen, the post-order index has an unclear relationship to the\n // pre-order index (postOrderIndex === preOrderIndex - parentCount +\n // childCount). Since number of calls to ngAfterContentInit and ngAfterViewInit\n // are stable (will be the same for the same view regardless of exceptions or\n // recursion) we just need to count them which will roughly correspond to the\n // post-order index (it skips elements and directives that do not have\n // lifecycle hooks).\n //\n // For example, if an exception is raised in the E6.onAfterViewInit() the\n // initIndex is left at 3 (by shouldCallLifecycleInitHook() which set it to\n // initIndex + 1). When checkAndUpdateView() is called again D3, E2 and E6 will\n // not have their ngAfterViewInit() called but, starting with E7, the rest of\n // the view will begin getting ngAfterViewInit() called until a check and\n // pass is complete.\n //\n // This algorthim also handles recursion. Consider if E4's ngAfterViewInit()\n // indirectly calls E1's ChangeDetectorRef.detectChanges(). The expected\n // initIndex is set to 6, the recusive checkAndUpdateView() starts walk again.\n // D3, E2, E6, E7, E5 and E4 are skipped, ngAfterViewInit() is called on E1.\n // When the recursion returns the initIndex will be 7 so E1 is skipped as it\n // has already been called in the recursively called checkAnUpdateView().\n function callLifecycleHooksChildrenFirst(view, lifecycles) {\n if (!(view.def.nodeFlags & lifecycles)) {\n return;\n }\n var nodes = view.def.nodes;\n var initIndex = 0;\n for (var i = 0; i < nodes.length; i++) {\n var nodeDef = nodes[i];\n var parent_1 = nodeDef.parent;\n if (!parent_1 && nodeDef.flags & lifecycles) {\n // matching root node (e.g. a pipe)\n callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n }\n if ((nodeDef.childFlags & lifecycles) === 0) {\n // no child matches one of the lifecycles\n i += nodeDef.childCount;\n }\n while (parent_1 && (parent_1.flags & 1 /* TypeElement */) &&\n i === parent_1.nodeIndex + parent_1.childCount) {\n // last child of an element\n if (parent_1.directChildFlags & lifecycles) {\n initIndex = callElementProvidersLifecycles(view, parent_1, lifecycles, initIndex);\n }\n parent_1 = parent_1.parent;\n }\n }\n }\n function callElementProvidersLifecycles(view, elDef, lifecycles, initIndex) {\n for (var i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {\n var nodeDef = view.def.nodes[i];\n if (nodeDef.flags & lifecycles) {\n callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n }\n // only visit direct children\n i += nodeDef.childCount;\n }\n return initIndex;\n }\n function callProviderLifecycles(view, index, lifecycles, initIndex) {\n var providerData = asProviderData(view, index);\n if (!providerData) {\n return;\n }\n var provider = providerData.instance;\n if (!provider) {\n return;\n }\n Services.setCurrentNode(view, index);\n if (lifecycles & 1048576 /* AfterContentInit */ &&\n shouldCallLifecycleInitHook(view, 512 /* InitState_CallingAfterContentInit */, initIndex)) {\n provider.ngAfterContentInit();\n }\n if (lifecycles & 2097152 /* AfterContentChecked */) {\n provider.ngAfterContentChecked();\n }\n if (lifecycles & 4194304 /* AfterViewInit */ &&\n shouldCallLifecycleInitHook(view, 768 /* InitState_CallingAfterViewInit */, initIndex)) {\n provider.ngAfterViewInit();\n }\n if (lifecycles & 8388608 /* AfterViewChecked */) {\n provider.ngAfterViewChecked();\n }\n if (lifecycles & 131072 /* OnDestroy */) {\n provider.ngOnDestroy();\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var ComponentFactoryResolver$1 = /** @class */ (function (_super) {\n __extends(ComponentFactoryResolver, _super);\n /**\n * @param ngModule The NgModuleRef to which all resolved factories are bound.\n */\n function ComponentFactoryResolver(ngModule) {\n var _this = _super.call(this) || this;\n _this.ngModule = ngModule;\n return _this;\n }\n ComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {\n ngDevMode && assertComponentType(component);\n var componentDef = getComponentDef(component);\n return new ComponentFactory$1(componentDef, this.ngModule);\n };\n return ComponentFactoryResolver;\n }(ComponentFactoryResolver));\n function toRefArray(map) {\n var array = [];\n for (var nonMinified in map) {\n if (map.hasOwnProperty(nonMinified)) {\n var minified = map[nonMinified];\n array.push({ propName: minified, templateName: nonMinified });\n }\n }\n return array;\n }\n /**\n * Default {@link RootContext} for all components rendered with {@link renderComponent}.\n */\n var ROOT_CONTEXT = new InjectionToken('ROOT_CONTEXT_TOKEN', { providedIn: 'root', factory: function () { return createRootContext(ɵɵinject(SCHEDULER)); } });\n /**\n * A change detection scheduler token for {@link RootContext}. This token is the default value used\n * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.\n */\n var SCHEDULER = new InjectionToken('SCHEDULER_TOKEN', {\n providedIn: 'root',\n factory: function () { return defaultScheduler; },\n });\n function createChainedInjector(rootViewInjector, moduleInjector) {\n return {\n get: function (token, notFoundValue, flags) {\n var value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);\n if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n // Return the value from the root element injector when\n // - it provides it\n // (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n // - the module injector should not be checked\n // (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n return value;\n }\n return moduleInjector.get(token, notFoundValue, flags);\n }\n };\n }\n /**\n * Render3 implementation of {@link viewEngine_ComponentFactory}.\n */\n var ComponentFactory$1 = /** @class */ (function (_super) {\n __extends(ComponentFactory, _super);\n /**\n * @param componentDef The component definition.\n * @param ngModule The NgModuleRef to which the factory is bound.\n */\n function ComponentFactory(componentDef, ngModule) {\n var _this = _super.call(this) || this;\n _this.componentDef = componentDef;\n _this.ngModule = ngModule;\n _this.componentType = componentDef.type;\n _this.selector = componentDef.selectors[0][0];\n _this.ngContentSelectors =\n componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];\n _this.isBoundToModule = !!ngModule;\n return _this;\n }\n Object.defineProperty(ComponentFactory.prototype, \"inputs\", {\n get: function () {\n return toRefArray(this.componentDef.inputs);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ComponentFactory.prototype, \"outputs\", {\n get: function () {\n return toRefArray(this.componentDef.outputs);\n },\n enumerable: true,\n configurable: true\n });\n ComponentFactory.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {\n var isInternalRootView = rootSelectorOrNode === undefined;\n ngModule = ngModule || this.ngModule;\n var rootViewInjector = ngModule ? createChainedInjector(injector, ngModule.injector) : injector;\n var rendererFactory = rootViewInjector.get(RendererFactory2, domRendererFactory3);\n var sanitizer = rootViewInjector.get(Sanitizer, null);\n var hostRNode = isInternalRootView ?\n elementCreate(this.selector, rendererFactory.createRenderer(null, this.componentDef)) :\n locateHostElement(rendererFactory, rootSelectorOrNode);\n var rootFlags = this.componentDef.onPush ? 64 /* Dirty */ | 512 /* IsRoot */ :\n 16 /* CheckAlways */ | 512 /* IsRoot */;\n // Check whether this Component needs to be isolated from other components, i.e. whether it\n // should be placed into its own (empty) root context or existing root context should be used.\n // Note: this is internal-only convention and might change in the future, so it should not be\n // relied upon externally.\n var isIsolated = typeof rootSelectorOrNode === 'string' &&\n /^#root-ng-internal-isolated-\\d+/.test(rootSelectorOrNode);\n var rootContext = (isInternalRootView || isIsolated) ?\n createRootContext() :\n rootViewInjector.get(ROOT_CONTEXT);\n var renderer = rendererFactory.createRenderer(hostRNode, this.componentDef);\n if (rootSelectorOrNode && hostRNode) {\n ngDevMode && ngDevMode.rendererSetAttribute++;\n isProceduralRenderer(renderer) ?\n renderer.setAttribute(hostRNode, 'ng-version', VERSION.full) :\n hostRNode.setAttribute('ng-version', VERSION.full);\n }\n // Create the root view. Uses empty TView and ContentTemplate.\n var rootLView = createLView(null, createTView(-1, null, 1, 0, null, null, null, null), rootContext, rootFlags, null, null, rendererFactory, renderer, sanitizer, rootViewInjector);\n // rootView is the parent when bootstrapping\n var oldLView = enterView(rootLView, null);\n var component;\n var tElementNode;\n // Will become true if the `try` block executes with no errors.\n var safeToRunHooks = false;\n try {\n var componentView = createRootComponentView(hostRNode, this.componentDef, rootLView, rendererFactory, renderer);\n tElementNode = getTNode(0, rootLView);\n if (projectableNodes) {\n // projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade\n // case). Here we do normalize passed data structure to be an array of arrays to avoid\n // complex checks down the line.\n tElementNode.projection =\n projectableNodes.map(function (nodesforSlot) { return Array.from(nodesforSlot); });\n }\n // TODO: should LifecycleHooksFeature and other host features be generated by the compiler and\n // executed here?\n // Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref\n component = createRootComponent(componentView, this.componentDef, rootLView, rootContext, [LifecycleHooksFeature]);\n addToViewTree(rootLView, componentView);\n refreshDescendantViews(rootLView);\n safeToRunHooks = true;\n }\n finally {\n leaveView(oldLView, safeToRunHooks);\n }\n var componentRef = new ComponentRef$1(this.componentType, component, createElementRef(ElementRef, tElementNode, rootLView), rootLView, tElementNode);\n if (isInternalRootView) {\n // The host element of the internal root view is attached to the component's host view node\n componentRef.hostView._tViewNode.child = tElementNode;\n }\n return componentRef;\n };\n return ComponentFactory;\n }(ComponentFactory));\n var componentFactoryResolver = new ComponentFactoryResolver$1();\n /**\n * Represents an instance of a Component created via a {@link ComponentFactory}.\n *\n * `ComponentRef` provides access to the Component Instance as well other objects related to this\n * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}\n * method.\n *\n */\n var ComponentRef$1 = /** @class */ (function (_super) {\n __extends(ComponentRef, _super);\n function ComponentRef(componentType, instance, location, _rootLView, _tNode) {\n var _this = _super.call(this) || this;\n _this.location = location;\n _this._rootLView = _rootLView;\n _this._tNode = _tNode;\n _this.destroyCbs = [];\n _this.instance = instance;\n _this.hostView = _this.changeDetectorRef = new RootViewRef(_rootLView);\n _this.hostView._tViewNode = assignTViewNodeToLView(_rootLView[TVIEW], null, -1, _rootLView);\n _this.componentType = componentType;\n return _this;\n }\n Object.defineProperty(ComponentRef.prototype, \"injector\", {\n get: function () { return new NodeInjector(this._tNode, this._rootLView); },\n enumerable: true,\n configurable: true\n });\n ComponentRef.prototype.destroy = function () {\n if (this.destroyCbs) {\n this.destroyCbs.forEach(function (fn) { return fn(); });\n this.destroyCbs = null;\n !this.hostView.destroyed && this.hostView.destroy();\n }\n };\n ComponentRef.prototype.onDestroy = function (callback) {\n if (this.destroyCbs) {\n this.destroyCbs.push(callback);\n }\n };\n return ComponentRef;\n }(ComponentRef));\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\n if (typeof ngI18nClosureMode === 'undefined') {\n // These property accesses can be ignored because ngI18nClosureMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.\n // NOTE: we need to have it in IIFE so that the tree-shaker is happy.\n (function () {\n // tslint:disable-next-line:no-toplevel-property-access\n _global['ngI18nClosureMode'] =\n // TODO(FW-1250): validate that this actually, you know, works.\n // tslint:disable-next-line:no-toplevel-property-access\n typeof goog !== 'undefined' && typeof goog.getMsg === 'function';\n })();\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * This const is used to store the locale data registered with `registerLocaleData`\n */\n var LOCALE_DATA = {};\n (function (LocaleDataIndex) {\n LocaleDataIndex[LocaleDataIndex[\"LocaleId\"] = 0] = \"LocaleId\";\n LocaleDataIndex[LocaleDataIndex[\"DayPeriodsFormat\"] = 1] = \"DayPeriodsFormat\";\n LocaleDataIndex[LocaleDataIndex[\"DayPeriodsStandalone\"] = 2] = \"DayPeriodsStandalone\";\n LocaleDataIndex[LocaleDataIndex[\"DaysFormat\"] = 3] = \"DaysFormat\";\n LocaleDataIndex[LocaleDataIndex[\"DaysStandalone\"] = 4] = \"DaysStandalone\";\n LocaleDataIndex[LocaleDataIndex[\"MonthsFormat\"] = 5] = \"MonthsFormat\";\n LocaleDataIndex[LocaleDataIndex[\"MonthsStandalone\"] = 6] = \"MonthsStandalone\";\n LocaleDataIndex[LocaleDataIndex[\"Eras\"] = 7] = \"Eras\";\n LocaleDataIndex[LocaleDataIndex[\"FirstDayOfWeek\"] = 8] = \"FirstDayOfWeek\";\n LocaleDataIndex[LocaleDataIndex[\"WeekendRange\"] = 9] = \"WeekendRange\";\n LocaleDataIndex[LocaleDataIndex[\"DateFormat\"] = 10] = \"DateFormat\";\n LocaleDataIndex[LocaleDataIndex[\"TimeFormat\"] = 11] = \"TimeFormat\";\n LocaleDataIndex[LocaleDataIndex[\"DateTimeFormat\"] = 12] = \"DateTimeFormat\";\n LocaleDataIndex[LocaleDataIndex[\"NumberSymbols\"] = 13] = \"NumberSymbols\";\n LocaleDataIndex[LocaleDataIndex[\"NumberFormats\"] = 14] = \"NumberFormats\";\n LocaleDataIndex[LocaleDataIndex[\"CurrencySymbol\"] = 15] = \"CurrencySymbol\";\n LocaleDataIndex[LocaleDataIndex[\"CurrencyName\"] = 16] = \"CurrencyName\";\n LocaleDataIndex[LocaleDataIndex[\"Currencies\"] = 17] = \"Currencies\";\n LocaleDataIndex[LocaleDataIndex[\"PluralCase\"] = 18] = \"PluralCase\";\n LocaleDataIndex[LocaleDataIndex[\"ExtraData\"] = 19] = \"ExtraData\";\n })(exports.ɵLocaleDataIndex || (exports.ɵLocaleDataIndex = {}));\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // THIS CODE IS GENERATED - DO NOT MODIFY\n // See angular/tools/gulp-tasks/cldr/extract.js\n var u = undefined;\n function plural(n) {\n var i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\\.?/, '').length;\n if (i === 1 && v === 0)\n return 1;\n return 5;\n }\n var localeEn = [\n 'en', [['a', 'p'], ['AM', 'PM'], u], [['AM', 'PM'], u, u],\n [\n ['S', 'M', 'T', 'W', 'T', 'F', 'S'], ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']\n ],\n u,\n [\n ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n [\n 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September',\n 'October', 'November', 'December'\n ]\n ],\n u, [['B', 'A'], ['BC', 'AD'], ['Before Christ', 'Anno Domini']], 0, [6, 0],\n ['M/d/yy', 'MMM d, y', 'MMMM d, y', 'EEEE, MMMM d, y'],\n ['h:mm a', 'h:mm:ss a', 'h:mm:ss a z', 'h:mm:ss a zzzz'], ['{1}, {0}', u, '{1} \\'at\\' {0}', u],\n ['.', ',', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'],\n ['#,##0.###', '#,##0%', '¤#,##0.00', '#E0'], '$', 'US Dollar', {}, plural\n ];\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Retrieves the plural function used by ICU expressions to determine the plural case to use\n * for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The plural function for the locale.\n * @see `NgPlural`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\n function getLocalePluralCase(locale) {\n var data = findLocaleData(locale);\n return data[exports.ɵLocaleDataIndex.PluralCase];\n }\n /**\n * Finds the locale data for a given locale.\n *\n * @param locale The locale code.\n * @returns The locale data.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\n function findLocaleData(locale) {\n var normalizedLocale = locale.toLowerCase().replace(/_/g, '-');\n var match = LOCALE_DATA[normalizedLocale];\n if (match) {\n return match;\n }\n // let's try to find a parent locale\n var parentLocale = normalizedLocale.split('-')[0];\n match = LOCALE_DATA[parentLocale];\n if (match) {\n return match;\n }\n if (parentLocale === 'en') {\n return localeEn;\n }\n throw new Error(\"Missing locale data for the locale \\\"\" + locale + \"\\\".\");\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Returns the plural case based on the locale\n */\n function getPluralCase(value, locale) {\n var plural = getLocalePluralCase(locale)(value);\n switch (plural) {\n case 0:\n return 'zero';\n case 1:\n return 'one';\n case 2:\n return 'two';\n case 3:\n return 'few';\n case 4:\n return 'many';\n default:\n return 'other';\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Equivalent to ES6 spread, add each item to an array.\n *\n * @param items The items to add\n * @param arr The array to which you want to add the items\n */\n function addAllToArray(items, arr) {\n for (var i = 0; i < items.length; i++) {\n arr.push(items[i]);\n }\n }\n /**\n * Flattens an array.\n */\n function flatten(list, dst) {\n if (dst === undefined)\n dst = list;\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n if (Array.isArray(item)) {\n // we need to inline it.\n if (dst === list) {\n // Our assumption that the list was already flat was wrong and\n // we need to clone flat since we need to write to it.\n dst = list.slice(0, i);\n }\n flatten(item, dst);\n }\n else if (dst !== list) {\n dst.push(item);\n }\n }\n return dst;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var MARKER = \"\\uFFFD\";\n var ICU_BLOCK_REGEXP = /^\\s*(�\\d+:?\\d*�)\\s*,\\s*(select|plural)\\s*,/;\n var SUBTEMPLATE_REGEXP = /�\\/?\\*(\\d+:\\d+)�/gi;\n var PH_REGEXP = /�(\\/?[#*!]\\d+):?\\d*�/gi;\n var BINDING_REGEXP = /�(\\d+):?\\d*�/gi;\n var ICU_REGEXP = /({\\s*�\\d+:?\\d*�\\s*,\\s*\\S{6}\\s*,[\\s\\S]*})/gi;\n // i18nPostprocess consts\n var ROOT_TEMPLATE_ID = 0;\n var PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]/;\n var PP_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]|(�\\/?\\*\\d+:\\d+�)/g;\n var PP_ICU_VARS_REGEXP = /({\\s*)(VAR_(PLURAL|SELECT)(_\\d+)?)(\\s*,)/g;\n var PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\\d+)?)�/g;\n var PP_CLOSE_TEMPLATE_REGEXP = /\\/\\*/;\n var PP_TEMPLATE_ID_REGEXP = /\\d+\\:(\\d+)/;\n /**\n * Breaks pattern into strings and top level {...} blocks.\n * Can be used to break a message into text and ICU expressions, or to break an ICU expression into\n * keys and cases.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern (sub)Pattern to be broken.\n *\n */\n function extractParts(pattern) {\n if (!pattern) {\n return [];\n }\n var prevPos = 0;\n var braceStack = [];\n var results = [];\n var braces = /[{}]/g;\n // lastIndex doesn't get set to 0 so we have to.\n braces.lastIndex = 0;\n var match;\n while (match = braces.exec(pattern)) {\n var pos = match.index;\n if (match[0] == '}') {\n braceStack.pop();\n if (braceStack.length == 0) {\n // End of the block.\n var block = pattern.substring(prevPos, pos);\n if (ICU_BLOCK_REGEXP.test(block)) {\n results.push(parseICUBlock(block));\n }\n else {\n results.push(block);\n }\n prevPos = pos + 1;\n }\n }\n else {\n if (braceStack.length == 0) {\n var substring_1 = pattern.substring(prevPos, pos);\n results.push(substring_1);\n prevPos = pos + 1;\n }\n braceStack.push('{');\n }\n }\n var substring = pattern.substring(prevPos);\n results.push(substring);\n return results;\n }\n /**\n * Parses text containing an ICU expression and produces a JSON object for it.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern Text containing an ICU expression that needs to be parsed.\n *\n */\n function parseICUBlock(pattern) {\n var cases = [];\n var values = [];\n var icuType = 1 /* plural */;\n var mainBinding = 0;\n pattern = pattern.replace(ICU_BLOCK_REGEXP, function (str, binding, type) {\n if (type === 'select') {\n icuType = 0 /* select */;\n }\n else {\n icuType = 1 /* plural */;\n }\n mainBinding = parseInt(binding.substr(1), 10);\n return '';\n });\n var parts = extractParts(pattern);\n // Looking for (key block)+ sequence. One of the keys has to be \"other\".\n for (var pos = 0; pos < parts.length;) {\n var key = parts[pos++].trim();\n if (icuType === 1 /* plural */) {\n // Key can be \"=x\", we just want \"x\"\n key = key.replace(/\\s*(?:=)?(\\w+)\\s*/, '$1');\n }\n if (key.length) {\n cases.push(key);\n }\n var blocks = extractParts(parts[pos++]);\n if (cases.length > values.length) {\n values.push(blocks);\n }\n }\n assertGreaterThan(cases.indexOf('other'), -1, 'Missing key \"other\" in ICU statement.');\n // TODO(ocombe): support ICU expressions in attributes, see #21615\n return { type: icuType, mainBinding: mainBinding, cases: cases, values: values };\n }\n /**\n * Removes everything inside the sub-templates of a message.\n */\n function removeInnerTemplateTranslation(message) {\n var match;\n var res = '';\n var index = 0;\n var inTemplate = false;\n var tagMatched;\n while ((match = SUBTEMPLATE_REGEXP.exec(message)) !== null) {\n if (!inTemplate) {\n res += message.substring(index, match.index + match[0].length);\n tagMatched = match[1];\n inTemplate = true;\n }\n else {\n if (match[0] === MARKER + \"/*\" + tagMatched + MARKER) {\n index = match.index;\n inTemplate = false;\n }\n }\n }\n ngDevMode &&\n assertEqual(inTemplate, false, \"Tag mismatch: unable to find the end of the sub-template in the translation \\\"\" + message + \"\\\"\");\n res += message.substr(index);\n return res;\n }\n /**\n * Extracts a part of a message and removes the rest.\n *\n * This method is used for extracting a part of the message associated with a template. A translated\n * message can span multiple templates.\n *\n * Example:\n * ```\n * <div i18n>Translate <span *ngIf>me</span>!</div>\n * ```\n *\n * @param message The message to crop\n * @param subTemplateIndex Index of the sub-template to extract. If undefined it returns the\n * external template and removes all sub-templates.\n */\n function getTranslationForTemplate(message, subTemplateIndex) {\n if (typeof subTemplateIndex !== 'number') {\n // We want the root template message, ignore all sub-templates\n return removeInnerTemplateTranslation(message);\n }\n else {\n // We want a specific sub-template\n var start = message.indexOf(\":\" + subTemplateIndex + MARKER) + 2 + subTemplateIndex.toString().length;\n var end = message.search(new RegExp(MARKER + \"\\\\/\\\\*\\\\d+:\" + subTemplateIndex + MARKER));\n return removeInnerTemplateTranslation(message.substring(start, end));\n }\n }\n /**\n * Generate the OpCodes to update the bindings of a string.\n *\n * @param str The string containing the bindings.\n * @param destinationNode Index of the destination node which will receive the binding.\n * @param attrName Name of the attribute, if the string belongs to an attribute.\n * @param sanitizeFn Sanitization function used to sanitize the string after update, if necessary.\n */\n function generateBindingUpdateOpCodes(str, destinationNode, attrName, sanitizeFn) {\n if (sanitizeFn === void 0) { sanitizeFn = null; }\n var updateOpCodes = [null, null]; // Alloc space for mask and size\n var textParts = str.split(BINDING_REGEXP);\n var mask = 0;\n for (var j = 0; j < textParts.length; j++) {\n var textValue = textParts[j];\n if (j & 1) {\n // Odd indexes are bindings\n var bindingIndex = parseInt(textValue, 10);\n updateOpCodes.push(-1 - bindingIndex);\n mask = mask | toMaskBit(bindingIndex);\n }\n else if (textValue !== '') {\n // Even indexes are text\n updateOpCodes.push(textValue);\n }\n }\n updateOpCodes.push(destinationNode << 2 /* SHIFT_REF */ |\n (attrName ? 1 /* Attr */ : 0 /* Text */));\n if (attrName) {\n updateOpCodes.push(attrName, sanitizeFn);\n }\n updateOpCodes[0] = mask;\n updateOpCodes[1] = updateOpCodes.length - 2;\n return updateOpCodes;\n }\n function getBindingMask(icuExpression, mask) {\n if (mask === void 0) { mask = 0; }\n mask = mask | toMaskBit(icuExpression.mainBinding);\n var match;\n for (var i = 0; i < icuExpression.values.length; i++) {\n var valueArr = icuExpression.values[i];\n for (var j = 0; j < valueArr.length; j++) {\n var value = valueArr[j];\n if (typeof value === 'string') {\n while (match = BINDING_REGEXP.exec(value)) {\n mask = mask | toMaskBit(parseInt(match[1], 10));\n }\n }\n else {\n mask = getBindingMask(value, mask);\n }\n }\n }\n return mask;\n }\n var i18nIndexStack = [];\n var i18nIndexStackPointer = -1;\n /**\n * Convert binding index to mask bit.\n *\n * Each index represents a single bit on the bit-mask. Because bit-mask only has 32 bits, we make\n * the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to have\n * more than 32 bindings this will be hit very rarely. The downside of hitting this corner case is\n * that we will execute binding code more often than necessary. (penalty of performance)\n */\n function toMaskBit(bindingIndex) {\n return 1 << Math.min(bindingIndex, 31);\n }\n var parentIndexStack = [];\n /**\n * Marks a block of text as translatable.\n *\n * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n * interpolated into. The placeholder `index` points to the expression binding index. An optional\n * `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning\n * and end of DOM element that were embedded in the original translation block. The placeholder\n * `index` points to the element index in the template instructions set. An optional `block` that\n * matches the sub-template in which it was declared.\n * - `�!{index}(:{block})�`/`�/!{index}(:{block})�`: *Projection Placeholder*: Marks the\n * beginning and end of <ng-content> that was embedded in the original translation block.\n * The placeholder `index` points to the element index in the template instructions set.\n * An optional `block` that matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n * split up and translated separately in each angular template function. The `index` points to the\n * `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param message The translation message.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\n function ɵɵi18nStart(index, message, subTemplateIndex) {\n var tView = getLView()[TVIEW];\n ngDevMode && assertDefined(tView, \"tView should be defined\");\n i18nIndexStack[++i18nIndexStackPointer] = index;\n // We need to delay projections until `i18nEnd`\n setDelayProjection(true);\n if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {\n i18nStartFirstPass(tView, index, message, subTemplateIndex);\n }\n }\n // Count for the number of vars that will be allocated for each i18n block.\n // It is global because this is used in multiple functions that include loops and recursive calls.\n // This is reset to 0 when `i18nStartFirstPass` is called.\n var i18nVarsCount;\n /**\n * See `i18nStart` above.\n */\n function i18nStartFirstPass(tView, index, message, subTemplateIndex) {\n var viewData = getLView();\n var startIndex = tView.blueprint.length - HEADER_OFFSET;\n i18nVarsCount = 0;\n var previousOrParentTNode = getPreviousOrParentTNode();\n var parentTNode = getIsParent() ? getPreviousOrParentTNode() :\n previousOrParentTNode && previousOrParentTNode.parent;\n var parentIndex = parentTNode && parentTNode !== viewData[T_HOST] ? parentTNode.index - HEADER_OFFSET : index;\n var parentIndexPointer = 0;\n parentIndexStack[parentIndexPointer] = parentIndex;\n var createOpCodes = [];\n // If the previous node wasn't the direct parent then we have a translation without top level\n // element and we need to keep a reference of the previous element if there is one\n if (index > 0 && previousOrParentTNode !== parentTNode) {\n // Create an OpCode to select the previous TNode\n createOpCodes.push(previousOrParentTNode.index << 3 /* SHIFT_REF */ | 0 /* Select */);\n }\n var updateOpCodes = [];\n var icuExpressions = [];\n var templateTranslation = getTranslationForTemplate(message, subTemplateIndex);\n var msgParts = templateTranslation.split(PH_REGEXP);\n for (var i = 0; i < msgParts.length; i++) {\n var value = msgParts[i];\n if (i & 1) {\n // Odd indexes are placeholders (elements and sub-templates)\n if (value.charAt(0) === '/') {\n // It is a closing tag\n if (value.charAt(1) === \"#\" /* ELEMENT */) {\n var phIndex = parseInt(value.substr(2), 10);\n parentIndex = parentIndexStack[--parentIndexPointer];\n createOpCodes.push(phIndex << 3 /* SHIFT_REF */ | 5 /* ElementEnd */);\n }\n }\n else {\n var phIndex = parseInt(value.substr(1), 10);\n // The value represents a placeholder that we move to the designated index\n createOpCodes.push(phIndex << 3 /* SHIFT_REF */ | 0 /* Select */, parentIndex << 17 /* SHIFT_PARENT */ | 1 /* AppendChild */);\n if (value.charAt(0) === \"#\" /* ELEMENT */) {\n parentIndexStack[++parentIndexPointer] = parentIndex = phIndex;\n }\n }\n }\n else {\n // Even indexes are text (including bindings & ICU expressions)\n var parts = extractParts(value);\n for (var j = 0; j < parts.length; j++) {\n if (j & 1) {\n // Odd indexes are ICU expressions\n // Create the comment node that will anchor the ICU expression\n var icuNodeIndex = startIndex + i18nVarsCount++;\n createOpCodes.push(COMMENT_MARKER, ngDevMode ? \"ICU \" + icuNodeIndex : '', icuNodeIndex, parentIndex << 17 /* SHIFT_PARENT */ | 1 /* AppendChild */);\n // Update codes for the ICU expression\n var icuExpression = parts[j];\n var mask = getBindingMask(icuExpression);\n icuStart(icuExpressions, icuExpression, icuNodeIndex, icuNodeIndex);\n // Since this is recursive, the last TIcu that was pushed is the one we want\n var tIcuIndex = icuExpressions.length - 1;\n updateOpCodes.push(toMaskBit(icuExpression.mainBinding), // mask of the main binding\n 3, // skip 3 opCodes if not changed\n -1 - icuExpression.mainBinding, icuNodeIndex << 2 /* SHIFT_REF */ | 2 /* IcuSwitch */, tIcuIndex, mask, // mask of all the bindings of this ICU expression\n 2, // skip 2 opCodes if not changed\n icuNodeIndex << 2 /* SHIFT_REF */ | 3 /* IcuUpdate */, tIcuIndex);\n }\n else if (parts[j] !== '') {\n var text = parts[j];\n // Even indexes are text (including bindings)\n var hasBinding = text.match(BINDING_REGEXP);\n // Create text nodes\n var textNodeIndex = startIndex + i18nVarsCount++;\n createOpCodes.push(\n // If there is a binding, the value will be set during update\n hasBinding ? '' : text, textNodeIndex, parentIndex << 17 /* SHIFT_PARENT */ | 1 /* AppendChild */);\n if (hasBinding) {\n addAllToArray(generateBindingUpdateOpCodes(text, textNodeIndex), updateOpCodes);\n }\n }\n }\n }\n }\n allocExpando(viewData, i18nVarsCount);\n ngDevMode &&\n attachI18nOpCodesDebug(createOpCodes, updateOpCodes, icuExpressions.length ? icuExpressions : null, viewData);\n // NOTE: local var needed to properly assert the type of `TI18n`.\n var tI18n = {\n vars: i18nVarsCount,\n create: createOpCodes,\n update: updateOpCodes,\n icus: icuExpressions.length ? icuExpressions : null,\n };\n tView.data[index + HEADER_OFFSET] = tI18n;\n }\n function appendI18nNode(tNode, parentTNode, previousTNode, viewData) {\n ngDevMode && ngDevMode.rendererMoveNode++;\n var nextNode = tNode.next;\n if (!previousTNode) {\n previousTNode = parentTNode;\n }\n // Re-organize node tree to put this node in the correct position.\n if (previousTNode === parentTNode && tNode !== parentTNode.child) {\n tNode.next = parentTNode.child;\n parentTNode.child = tNode;\n }\n else if (previousTNode !== parentTNode && tNode !== previousTNode.next) {\n tNode.next = previousTNode.next;\n previousTNode.next = tNode;\n }\n else {\n tNode.next = null;\n }\n if (parentTNode !== viewData[T_HOST]) {\n tNode.parent = parentTNode;\n }\n // If tNode was moved around, we might need to fix a broken link.\n var cursor = tNode.next;\n while (cursor) {\n if (cursor.next === tNode) {\n cursor.next = nextNode;\n }\n cursor = cursor.next;\n }\n // If the placeholder to append is a projection, we need to move the projected nodes instead\n if (tNode.type === 1 /* Projection */) {\n var tProjectionNode = tNode;\n appendProjectedNodes(viewData, tProjectionNode, tProjectionNode.projection, findComponentView(viewData));\n return tNode;\n }\n appendChild(getNativeByTNode(tNode, viewData), tNode, viewData);\n var slotValue = viewData[tNode.index];\n if (tNode.type !== 0 /* Container */ && isLContainer(slotValue)) {\n // Nodes that inject ViewContainerRef also have a comment node that should be moved\n appendChild(slotValue[NATIVE], tNode, viewData);\n }\n return tNode;\n }\n /**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n * in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\n function ɵɵi18nPostprocess(message, replacements) {\n if (replacements === void 0) { replacements = {}; }\n /**\n * Step 1: resolve all multi-value placeholders like [�#5�|�*1:1��#2:1�|�#4:1�]\n *\n * Note: due to the way we process nested templates (BFS), multi-value placeholders are typically\n * grouped by templates, for example: [�#5�|�#6�|�#1:1�|�#3:2�] where �#5� and �#6� belong to root\n * template, �#1:1� belong to nested template with index 1 and �#1:2� - nested template with index\n * 3. However in real templates the order might be different: i.e. �#1:1� and/or �#3:2� may go in\n * front of �#6�. The post processing step restores the right order by keeping track of the\n * template id stack and looks for placeholders that belong to the currently active template.\n */\n var result = message;\n if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {\n var matches_1 = {};\n var templateIdsStack_1 = [ROOT_TEMPLATE_ID];\n result = result.replace(PP_PLACEHOLDERS_REGEXP, function (m, phs, tmpl) {\n var content = phs || tmpl;\n var placeholders = matches_1[content] || [];\n if (!placeholders.length) {\n content.split('|').forEach(function (placeholder) {\n var match = placeholder.match(PP_TEMPLATE_ID_REGEXP);\n var templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;\n var isCloseTemplateTag = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder);\n placeholders.push([templateId, isCloseTemplateTag, placeholder]);\n });\n matches_1[content] = placeholders;\n }\n if (!placeholders.length) {\n throw new Error(\"i18n postprocess: unmatched placeholder - \" + content);\n }\n var currentTemplateId = templateIdsStack_1[templateIdsStack_1.length - 1];\n var idx = 0;\n // find placeholder index that matches current template id\n for (var i = 0; i < placeholders.length; i++) {\n if (placeholders[i][0] === currentTemplateId) {\n idx = i;\n break;\n }\n }\n // update template id stack based on the current tag extracted\n var _a = __read(placeholders[idx], 3), templateId = _a[0], isCloseTemplateTag = _a[1], placeholder = _a[2];\n if (isCloseTemplateTag) {\n templateIdsStack_1.pop();\n }\n else if (currentTemplateId !== templateId) {\n templateIdsStack_1.push(templateId);\n }\n // remove processed tag from the list\n placeholders.splice(idx, 1);\n return placeholder;\n });\n }\n // return current result if no replacements specified\n if (!Object.keys(replacements).length) {\n return result;\n }\n /**\n * Step 2: replace all ICU vars (like \"VAR_PLURAL\")\n */\n result = result.replace(PP_ICU_VARS_REGEXP, function (match, start, key, _type, _idx, end) {\n return replacements.hasOwnProperty(key) ? \"\" + start + replacements[key] + end : match;\n });\n /**\n * Step 3: replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) in case\n * multiple ICUs have the same placeholder name\n */\n result = result.replace(PP_ICUS_REGEXP, function (match, key) {\n if (replacements.hasOwnProperty(key)) {\n var list = replacements[key];\n if (!list.length) {\n throw new Error(\"i18n postprocess: unmatched ICU - \" + match + \" with key: \" + key);\n }\n return list.shift();\n }\n return match;\n });\n return result;\n }\n /**\n * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes\n * into the render tree, moves the placeholder nodes and removes the deleted nodes.\n *\n * @codeGenApi\n */\n function ɵɵi18nEnd() {\n var tView = getLView()[TVIEW];\n ngDevMode && assertDefined(tView, \"tView should be defined\");\n i18nEndFirstPass(tView);\n // Stop delaying projections\n setDelayProjection(false);\n }\n /**\n * See `i18nEnd` above.\n */\n function i18nEndFirstPass(tView) {\n var viewData = getLView();\n ngDevMode && assertEqual(viewData[BINDING_INDEX], viewData[TVIEW].bindingStartIndex, 'i18nEnd should be called before any binding');\n var rootIndex = i18nIndexStack[i18nIndexStackPointer--];\n var tI18n = tView.data[rootIndex + HEADER_OFFSET];\n ngDevMode && assertDefined(tI18n, \"You should call i18nStart before i18nEnd\");\n // Find the last node that was added before `i18nEnd`\n var lastCreatedNode = getPreviousOrParentTNode();\n // Read the instructions to insert/move/remove DOM elements\n var visitedNodes = readCreateOpCodes(rootIndex, tI18n.create, tI18n.icus, viewData);\n // Remove deleted nodes\n for (var i = rootIndex + 1; i <= lastCreatedNode.index - HEADER_OFFSET; i++) {\n if (visitedNodes.indexOf(i) === -1) {\n removeNode(i, viewData);\n }\n }\n }\n /**\n * Creates and stores the dynamic TNode, and unhooks it from the tree for now.\n */\n function createDynamicNodeAtIndex(lView, index, type, native, name) {\n var previousOrParentTNode = getPreviousOrParentTNode();\n ngDevMode && assertDataInRange(lView, index + HEADER_OFFSET);\n lView[index + HEADER_OFFSET] = native;\n var tNode = getOrCreateTNode(lView[TVIEW], lView[T_HOST], index, type, name, null);\n // We are creating a dynamic node, the previous tNode might not be pointing at this node.\n // We will link ourselves into the tree later with `appendI18nNode`.\n if (previousOrParentTNode.next === tNode) {\n previousOrParentTNode.next = null;\n }\n return tNode;\n }\n function readCreateOpCodes(index, createOpCodes, icus, viewData) {\n var renderer = getLView()[RENDERER];\n var currentTNode = null;\n var previousTNode = null;\n var visitedNodes = [];\n for (var i = 0; i < createOpCodes.length; i++) {\n var opCode = createOpCodes[i];\n if (typeof opCode == 'string') {\n var textRNode = createTextNode(opCode, renderer);\n var textNodeIndex = createOpCodes[++i];\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n previousTNode = currentTNode;\n currentTNode =\n createDynamicNodeAtIndex(viewData, textNodeIndex, 3 /* Element */, textRNode, null);\n visitedNodes.push(textNodeIndex);\n setIsNotParent();\n }\n else if (typeof opCode == 'number') {\n switch (opCode & 7 /* MASK_OPCODE */) {\n case 1 /* AppendChild */:\n var destinationNodeIndex = opCode >>> 17 /* SHIFT_PARENT */;\n var destinationTNode = void 0;\n if (destinationNodeIndex === index) {\n // If the destination node is `i18nStart`, we don't have a\n // top-level node and we should use the host node instead\n destinationTNode = viewData[T_HOST];\n }\n else {\n destinationTNode = getTNode(destinationNodeIndex, viewData);\n }\n ngDevMode &&\n assertDefined(currentTNode, \"You need to create or select a node before you can insert it into the DOM\");\n previousTNode = appendI18nNode(currentTNode, destinationTNode, previousTNode, viewData);\n break;\n case 0 /* Select */:\n var nodeIndex = opCode >>> 3 /* SHIFT_REF */;\n visitedNodes.push(nodeIndex);\n previousTNode = currentTNode;\n currentTNode = getTNode(nodeIndex, viewData);\n if (currentTNode) {\n setPreviousOrParentTNode(currentTNode, currentTNode.type === 3 /* Element */);\n }\n break;\n case 5 /* ElementEnd */:\n var elementIndex = opCode >>> 3 /* SHIFT_REF */;\n previousTNode = currentTNode = getTNode(elementIndex, viewData);\n setPreviousOrParentTNode(currentTNode, false);\n break;\n case 4 /* Attr */:\n var elementNodeIndex = opCode >>> 3 /* SHIFT_REF */;\n var attrName = createOpCodes[++i];\n var attrValue = createOpCodes[++i];\n // This code is used for ICU expressions only, since we don't support\n // directives/components in ICUs, we don't need to worry about inputs here\n elementAttributeInternal(elementNodeIndex, attrName, attrValue, viewData);\n break;\n default:\n throw new Error(\"Unable to determine the type of mutate operation for \\\"\" + opCode + \"\\\"\");\n }\n }\n else {\n switch (opCode) {\n case COMMENT_MARKER:\n var commentValue = createOpCodes[++i];\n var commentNodeIndex = createOpCodes[++i];\n ngDevMode && assertEqual(typeof commentValue, 'string', \"Expected \\\"\" + commentValue + \"\\\" to be a comment node value\");\n var commentRNode = renderer.createComment(commentValue);\n ngDevMode && ngDevMode.rendererCreateComment++;\n previousTNode = currentTNode;\n currentTNode = createDynamicNodeAtIndex(viewData, commentNodeIndex, 5 /* IcuContainer */, commentRNode, null);\n visitedNodes.push(commentNodeIndex);\n attachPatchData(commentRNode, viewData);\n currentTNode.activeCaseIndex = null;\n // We will add the case nodes later, during the update phase\n setIsNotParent();\n break;\n case ELEMENT_MARKER:\n var tagNameValue = createOpCodes[++i];\n var elementNodeIndex = createOpCodes[++i];\n ngDevMode && assertEqual(typeof tagNameValue, 'string', \"Expected \\\"\" + tagNameValue + \"\\\" to be an element node tag name\");\n var elementRNode = renderer.createElement(tagNameValue);\n ngDevMode && ngDevMode.rendererCreateElement++;\n previousTNode = currentTNode;\n currentTNode = createDynamicNodeAtIndex(viewData, elementNodeIndex, 3 /* Element */, elementRNode, tagNameValue);\n visitedNodes.push(elementNodeIndex);\n break;\n default:\n throw new Error(\"Unable to determine the type of mutate operation for \\\"\" + opCode + \"\\\"\");\n }\n }\n }\n setIsNotParent();\n return visitedNodes;\n }\n function readUpdateOpCodes(updateOpCodes, icus, bindingsStartIndex, changeMask, viewData, bypassCheckBit) {\n if (bypassCheckBit === void 0) { bypassCheckBit = false; }\n var caseCreated = false;\n for (var i = 0; i < updateOpCodes.length; i++) {\n // bit code to check if we should apply the next update\n var checkBit = updateOpCodes[i];\n // Number of opCodes to skip until next set of update codes\n var skipCodes = updateOpCodes[++i];\n if (bypassCheckBit || (checkBit & changeMask)) {\n // The value has been updated since last checked\n var value = '';\n for (var j = i + 1; j <= (i + skipCodes); j++) {\n var opCode = updateOpCodes[j];\n if (typeof opCode == 'string') {\n value += opCode;\n }\n else if (typeof opCode == 'number') {\n if (opCode < 0) {\n // It's a binding index whose value is negative\n value += renderStringify(viewData[bindingsStartIndex - opCode]);\n }\n else {\n var nodeIndex = opCode >>> 2 /* SHIFT_REF */;\n var tIcuIndex = void 0;\n var tIcu = void 0;\n var icuTNode = void 0;\n switch (opCode & 3 /* MASK_OPCODE */) {\n case 1 /* Attr */:\n var propName = updateOpCodes[++j];\n var sanitizeFn = updateOpCodes[++j];\n elementPropertyInternal(nodeIndex, propName, value, sanitizeFn);\n break;\n case 0 /* Text */:\n textBindingInternal(viewData, nodeIndex, value);\n break;\n case 2 /* IcuSwitch */:\n tIcuIndex = updateOpCodes[++j];\n tIcu = icus[tIcuIndex];\n icuTNode = getTNode(nodeIndex, viewData);\n // If there is an active case, delete the old nodes\n if (icuTNode.activeCaseIndex !== null) {\n var removeCodes = tIcu.remove[icuTNode.activeCaseIndex];\n for (var k = 0; k < removeCodes.length; k++) {\n var removeOpCode = removeCodes[k];\n switch (removeOpCode & 7 /* MASK_OPCODE */) {\n case 3 /* Remove */:\n var nodeIndex_1 = removeOpCode >>> 3 /* SHIFT_REF */;\n removeNode(nodeIndex_1, viewData);\n break;\n case 6 /* RemoveNestedIcu */:\n var nestedIcuNodeIndex = removeCodes[k + 1] >>> 3 /* SHIFT_REF */;\n var nestedIcuTNode = getTNode(nestedIcuNodeIndex, viewData);\n var activeIndex = nestedIcuTNode.activeCaseIndex;\n if (activeIndex !== null) {\n var nestedIcuTIndex = removeOpCode >>> 3 /* SHIFT_REF */;\n var nestedTIcu = icus[nestedIcuTIndex];\n addAllToArray(nestedTIcu.remove[activeIndex], removeCodes);\n }\n break;\n }\n }\n }\n // Update the active caseIndex\n var caseIndex = getCaseIndex(tIcu, value);\n icuTNode.activeCaseIndex = caseIndex !== -1 ? caseIndex : null;\n // Add the nodes for the new case\n readCreateOpCodes(-1, tIcu.create[caseIndex], icus, viewData);\n caseCreated = true;\n break;\n case 3 /* IcuUpdate */:\n tIcuIndex = updateOpCodes[++j];\n tIcu = icus[tIcuIndex];\n icuTNode = getTNode(nodeIndex, viewData);\n readUpdateOpCodes(tIcu.update[icuTNode.activeCaseIndex], icus, bindingsStartIndex, changeMask, viewData, caseCreated);\n break;\n }\n }\n }\n }\n }\n i += skipCodes;\n }\n }\n function removeNode(index, viewData) {\n var removedPhTNode = getTNode(index, viewData);\n var removedPhRNode = getNativeByIndex(index, viewData);\n if (removedPhRNode) {\n nativeRemoveNode(viewData[RENDERER], removedPhRNode);\n }\n var slotValue = ɵɵload(index);\n if (isLContainer(slotValue)) {\n var lContainer = slotValue;\n if (removedPhTNode.type !== 0 /* Container */) {\n nativeRemoveNode(viewData[RENDERER], lContainer[NATIVE]);\n }\n }\n // Define this node as detached so that we don't risk projecting it\n removedPhTNode.flags |= 32 /* isDetached */;\n ngDevMode && ngDevMode.rendererRemoveNode++;\n }\n /**\n *\n * Use this instruction to create a translation block that doesn't contain any placeholder.\n * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.\n *\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n * interpolated into. The placeholder `index` points to the expression binding index. An optional\n * `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*: Marks the beginning\n * and end of DOM element that were embedded in the original translation block. The placeholder\n * `index` points to the element index in the template instructions set. An optional `block` that\n * matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n * split up and translated separately in each angular template function. The `index` points to the\n * `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param message The translation message.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\n function ɵɵi18n(index, message, subTemplateIndex) {\n ɵɵi18nStart(index, message, subTemplateIndex);\n ɵɵi18nEnd();\n }\n /**\n * Marks a list of attributes as translatable.\n *\n * @param index A unique index in the static block\n * @param values\n *\n * @codeGenApi\n */\n function ɵɵi18nAttributes(index, values) {\n var tView = getLView()[TVIEW];\n ngDevMode && assertDefined(tView, \"tView should be defined\");\n i18nAttributesFirstPass(tView, index, values);\n }\n /**\n * See `i18nAttributes` above.\n */\n function i18nAttributesFirstPass(tView, index, values) {\n var previousElement = getPreviousOrParentTNode();\n var previousElementIndex = previousElement.index - HEADER_OFFSET;\n var updateOpCodes = [];\n for (var i = 0; i < values.length; i += 2) {\n var attrName = values[i];\n var message = values[i + 1];\n var parts = message.split(ICU_REGEXP);\n for (var j = 0; j < parts.length; j++) {\n var value = parts[j];\n if (j & 1) {\n // Odd indexes are ICU expressions\n // TODO(ocombe): support ICU expressions in attributes\n throw new Error('ICU expressions are not yet supported in attributes');\n }\n else if (value !== '') {\n // Even indexes are text (including bindings)\n var hasBinding = !!value.match(BINDING_REGEXP);\n if (hasBinding) {\n if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {\n addAllToArray(generateBindingUpdateOpCodes(value, previousElementIndex, attrName), updateOpCodes);\n }\n }\n else {\n var lView = getLView();\n elementAttributeInternal(previousElementIndex, attrName, value, lView);\n // Check if that attribute is a directive input\n var tNode = getTNode(previousElementIndex, lView);\n var dataValue = tNode.inputs && tNode.inputs[attrName];\n if (dataValue) {\n setInputsForProperty(lView, dataValue, value);\n }\n }\n }\n }\n }\n if (tView.firstTemplatePass && tView.data[index + HEADER_OFFSET] === null) {\n tView.data[index + HEADER_OFFSET] = updateOpCodes;\n }\n }\n var changeMask = 0;\n var shiftsCounter = 0;\n /**\n * Stores the values of the bindings during each update cycle in order to determine if we need to\n * update the translated nodes.\n *\n * @param value The binding's value\n * @returns This function returns itself so that it may be chained\n * (e.g. `i18nExp(ctx.name)(ctx.title)`)\n *\n * @codeGenApi\n */\n function ɵɵi18nExp(value) {\n var lView = getLView();\n var expression = bind(lView, value);\n if (expression !== NO_CHANGE) {\n changeMask = changeMask | (1 << shiftsCounter);\n }\n shiftsCounter++;\n return ɵɵi18nExp;\n }\n /**\n * Updates a translation block or an i18n attribute when the bindings have changed.\n *\n * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}\n * (i18n attribute) on which it should update the content.\n *\n * @codeGenApi\n */\n function ɵɵi18nApply(index) {\n if (shiftsCounter) {\n var lView = getLView();\n var tView = lView[TVIEW];\n ngDevMode && assertDefined(tView, \"tView should be defined\");\n var tI18n = tView.data[index + HEADER_OFFSET];\n var updateOpCodes = void 0;\n var icus = null;\n if (Array.isArray(tI18n)) {\n updateOpCodes = tI18n;\n }\n else {\n updateOpCodes = tI18n.update;\n icus = tI18n.icus;\n }\n var bindingsStartIndex = lView[BINDING_INDEX] - shiftsCounter - 1;\n readUpdateOpCodes(updateOpCodes, icus, bindingsStartIndex, changeMask, lView);\n // Reset changeMask & maskBit to default for the next update cycle\n changeMask = 0;\n shiftsCounter = 0;\n }\n }\n /**\n * Returns the index of the current case of an ICU expression depending on the main binding value\n *\n * @param icuExpression\n * @param bindingValue The value of the main binding used by this ICU expression\n */\n function getCaseIndex(icuExpression, bindingValue) {\n var index = icuExpression.cases.indexOf(bindingValue);\n if (index === -1) {\n switch (icuExpression.type) {\n case 1 /* plural */: {\n var resolvedCase = getPluralCase(bindingValue, getLocaleId());\n index = icuExpression.cases.indexOf(resolvedCase);\n if (index === -1 && resolvedCase !== 'other') {\n index = icuExpression.cases.indexOf('other');\n }\n break;\n }\n case 0 /* select */: {\n index = icuExpression.cases.indexOf('other');\n break;\n }\n }\n }\n return index;\n }\n /**\n * Generate the OpCodes for ICU expressions.\n *\n * @param tIcus\n * @param icuExpression\n * @param startIndex\n * @param expandoStartIndex\n */\n function icuStart(tIcus, icuExpression, startIndex, expandoStartIndex) {\n var createCodes = [];\n var removeCodes = [];\n var updateCodes = [];\n var vars = [];\n var childIcus = [];\n for (var i = 0; i < icuExpression.values.length; i++) {\n // Each value is an array of strings & other ICU expressions\n var valueArr = icuExpression.values[i];\n var nestedIcus = [];\n for (var j = 0; j < valueArr.length; j++) {\n var value = valueArr[j];\n if (typeof value !== 'string') {\n // It is an nested ICU expression\n var icuIndex = nestedIcus.push(value) - 1;\n // Replace nested ICU expression by a comment node\n valueArr[j] = \"<!--\\uFFFD\" + icuIndex + \"\\uFFFD-->\";\n }\n }\n var icuCase = parseIcuCase(valueArr.join(''), startIndex, nestedIcus, tIcus, expandoStartIndex);\n createCodes.push(icuCase.create);\n removeCodes.push(icuCase.remove);\n updateCodes.push(icuCase.update);\n vars.push(icuCase.vars);\n childIcus.push(icuCase.childIcus);\n }\n var tIcu = {\n type: icuExpression.type,\n vars: vars,\n childIcus: childIcus,\n cases: icuExpression.cases,\n create: createCodes,\n remove: removeCodes,\n update: updateCodes\n };\n tIcus.push(tIcu);\n // Adding the maximum possible of vars needed (based on the cases with the most vars)\n i18nVarsCount += Math.max.apply(Math, __spread(vars));\n }\n /**\n * Transforms a string template into an HTML template and a list of instructions used to update\n * attributes or nodes that contain bindings.\n *\n * @param unsafeHtml The string to parse\n * @param parentIndex\n * @param nestedIcus\n * @param tIcus\n * @param expandoStartIndex\n */\n function parseIcuCase(unsafeHtml, parentIndex, nestedIcus, tIcus, expandoStartIndex) {\n var inertBodyHelper = new InertBodyHelper(document);\n var inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n if (!inertBodyElement) {\n throw new Error('Unable to generate inert body element');\n }\n var wrapper = getTemplateContent(inertBodyElement) || inertBodyElement;\n var opCodes = { vars: 0, childIcus: [], create: [], remove: [], update: [] };\n parseNodes(wrapper.firstChild, opCodes, parentIndex, nestedIcus, tIcus, expandoStartIndex);\n return opCodes;\n }\n var NESTED_ICU = /�(\\d+)�/;\n /**\n * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.\n *\n * @param currentNode The first node to parse\n * @param icuCase The data for the ICU expression case that contains those nodes\n * @param parentIndex Index of the current node's parent\n * @param nestedIcus Data for the nested ICU expressions that this case contains\n * @param tIcus Data for all ICU expressions of the current message\n * @param expandoStartIndex Expando start index for the current ICU expression\n */\n function parseNodes(currentNode, icuCase, parentIndex, nestedIcus, tIcus, expandoStartIndex) {\n if (currentNode) {\n var nestedIcusToCreate = [];\n while (currentNode) {\n var nextNode = currentNode.nextSibling;\n var newIndex = expandoStartIndex + ++icuCase.vars;\n switch (currentNode.nodeType) {\n case Node.ELEMENT_NODE:\n var element = currentNode;\n var tagName = element.tagName.toLowerCase();\n if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n // This isn't a valid element, we won't create an element for it\n icuCase.vars--;\n }\n else {\n icuCase.create.push(ELEMENT_MARKER, tagName, newIndex, parentIndex << 17 /* SHIFT_PARENT */ | 1 /* AppendChild */);\n var elAttrs = element.attributes;\n for (var i = 0; i < elAttrs.length; i++) {\n var attr = elAttrs.item(i);\n var lowerAttrName = attr.name.toLowerCase();\n var hasBinding_1 = !!attr.value.match(BINDING_REGEXP);\n // we assume the input string is safe, unless it's using a binding\n if (hasBinding_1) {\n if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {\n if (URI_ATTRS[lowerAttrName]) {\n addAllToArray(generateBindingUpdateOpCodes(attr.value, newIndex, attr.name, _sanitizeUrl), icuCase.update);\n }\n else if (SRCSET_ATTRS[lowerAttrName]) {\n addAllToArray(generateBindingUpdateOpCodes(attr.value, newIndex, attr.name, sanitizeSrcset), icuCase.update);\n }\n else {\n addAllToArray(generateBindingUpdateOpCodes(attr.value, newIndex, attr.name), icuCase.update);\n }\n }\n else {\n ngDevMode &&\n console.warn(\"WARNING: ignoring unsafe attribute value \" + lowerAttrName + \" on element \" + tagName + \" (see http://g.co/ng/security#xss)\");\n }\n }\n else {\n icuCase.create.push(newIndex << 3 /* SHIFT_REF */ | 4 /* Attr */, attr.name, attr.value);\n }\n }\n // Parse the children of this node (if any)\n parseNodes(currentNode.firstChild, icuCase, newIndex, nestedIcus, tIcus, expandoStartIndex);\n // Remove the parent node after the children\n icuCase.remove.push(newIndex << 3 /* SHIFT_REF */ | 3 /* Remove */);\n }\n break;\n case Node.TEXT_NODE:\n var value = currentNode.textContent || '';\n var hasBinding = value.match(BINDING_REGEXP);\n icuCase.create.push(hasBinding ? '' : value, newIndex, parentIndex << 17 /* SHIFT_PARENT */ | 1 /* AppendChild */);\n icuCase.remove.push(newIndex << 3 /* SHIFT_REF */ | 3 /* Remove */);\n if (hasBinding) {\n addAllToArray(generateBindingUpdateOpCodes(value, newIndex), icuCase.update);\n }\n break;\n case Node.COMMENT_NODE:\n // Check if the comment node is a placeholder for a nested ICU\n var match = NESTED_ICU.exec(currentNode.textContent || '');\n if (match) {\n var nestedIcuIndex = parseInt(match[1], 10);\n var newLocal = ngDevMode ? \"nested ICU \" + nestedIcuIndex : '';\n // Create the comment node that will anchor the ICU expression\n icuCase.create.push(COMMENT_MARKER, newLocal, newIndex, parentIndex << 17 /* SHIFT_PARENT */ | 1 /* AppendChild */);\n var nestedIcu = nestedIcus[nestedIcuIndex];\n nestedIcusToCreate.push([nestedIcu, newIndex]);\n }\n else {\n // We do not handle any other type of comment\n icuCase.vars--;\n }\n break;\n default:\n // We do not handle any other type of element\n icuCase.vars--;\n }\n currentNode = nextNode;\n }\n for (var i = 0; i < nestedIcusToCreate.length; i++) {\n var nestedIcu = nestedIcusToCreate[i][0];\n var nestedIcuNodeIndex = nestedIcusToCreate[i][1];\n icuStart(tIcus, nestedIcu, nestedIcuNodeIndex, expandoStartIndex + icuCase.vars);\n // Since this is recursive, the last TIcu that was pushed is the one we want\n var nestTIcuIndex = tIcus.length - 1;\n icuCase.vars += Math.max.apply(Math, __spread(tIcus[nestTIcuIndex].vars));\n icuCase.childIcus.push(nestTIcuIndex);\n var mask = getBindingMask(nestedIcu);\n icuCase.update.push(toMaskBit(nestedIcu.mainBinding), // mask of the main binding\n 3, // skip 3 opCodes if not changed\n -1 - nestedIcu.mainBinding, nestedIcuNodeIndex << 2 /* SHIFT_REF */ | 2 /* IcuSwitch */, nestTIcuIndex, mask, // mask of all the bindings of this ICU expression\n 2, // skip 2 opCodes if not changed\n nestedIcuNodeIndex << 2 /* SHIFT_REF */ | 3 /* IcuUpdate */, nestTIcuIndex);\n icuCase.remove.push(nestTIcuIndex << 3 /* SHIFT_REF */ | 6 /* RemoveNestedIcu */, nestedIcuNodeIndex << 3 /* SHIFT_REF */ | 3 /* Remove */);\n }\n }\n }\n var TRANSLATIONS = {};\n /**\n * Set the configuration for `i18nLocalize`.\n *\n * @deprecated this method is temporary & should not be used as it will be removed soon\n */\n function i18nConfigureLocalize(options) {\n if (options === void 0) { options = {\n translations: {}\n }; }\n TRANSLATIONS = options.translations;\n }\n var LOCALIZE_PH_REGEXP = /\\{\\$(.*?)\\}/g;\n /**\n * A goog.getMsg-like function for users that do not use Closure.\n *\n * This method is required as a *temporary* measure to prevent i18n tests from being blocked while\n * running outside of Closure Compiler. This method will not be needed once runtime translation\n * service support is introduced.\n *\n * @codeGenApi\n * @deprecated this method is temporary & should not be used as it will be removed soon\n */\n function ɵɵi18nLocalize(input, placeholders) {\n if (typeof TRANSLATIONS[input] !== 'undefined') { // to account for empty string\n input = TRANSLATIONS[input];\n }\n if (placeholders !== undefined && Object.keys(placeholders).length) {\n return input.replace(LOCALIZE_PH_REGEXP, function (_, key) { return placeholders[key] || ''; });\n }\n return input;\n }\n /**\n * The locale id that the application is currently using (for translations and ICU expressions).\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\n var DEFAULT_LOCALE_ID = 'en-US';\n var LOCALE_ID = DEFAULT_LOCALE_ID;\n /**\n * Sets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n *\n * @param localeId\n */\n function setLocaleId(localeId) {\n LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');\n }\n /**\n * Gets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\n function getLocaleId() {\n return LOCALE_ID;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Map of module-id to the corresponding NgModule.\n * - In pre Ivy we track NgModuleFactory,\n * - In post Ivy we track the NgModuleType\n */\n var modules = new Map();\n /**\n * Registers a loaded module. Should only be called from generated NgModuleFactory code.\n * @publicApi\n */\n function registerModuleFactory(id, factory) {\n var existing = modules.get(id);\n assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);\n modules.set(id, factory);\n }\n function assertSameOrNotExisting(id, type, incoming) {\n if (type && type !== incoming) {\n throw new Error(\"Duplicate module registered for \" + id + \" - \" + stringify(type) + \" vs \" + stringify(type.name));\n }\n }\n function registerNgModuleType(ngModuleType) {\n if (ngModuleType.ngModuleDef.id !== null) {\n var id = ngModuleType.ngModuleDef.id;\n var existing = modules.get(id);\n assertSameOrNotExisting(id, existing, ngModuleType);\n modules.set(id, ngModuleType);\n }\n var imports = ngModuleType.ngModuleDef.imports;\n if (imports instanceof Function) {\n imports = imports();\n }\n if (imports) {\n imports.forEach(function (i) { return registerNgModuleType(i); });\n }\n }\n function getRegisteredNgModuleType(id) {\n return modules.get(id);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var COMPONENT_FACTORY_RESOLVER = {\n provide: ComponentFactoryResolver,\n useClass: ComponentFactoryResolver$1,\n deps: [NgModuleRef],\n };\n var NgModuleRef$1 = /** @class */ (function (_super) {\n __extends(NgModuleRef$1, _super);\n function NgModuleRef$1(ngModuleType, _parent) {\n var _this = _super.call(this) || this;\n _this._parent = _parent;\n // tslint:disable-next-line:require-internal-with-underscore\n _this._bootstrapComponents = [];\n _this.injector = _this;\n _this.destroyCbs = [];\n var ngModuleDef = getNgModuleDef(ngModuleType);\n ngDevMode && assertDefined(ngModuleDef, \"NgModule '\" + stringify(ngModuleType) + \"' is not a subtype of 'NgModuleType'.\");\n var ngLocaleIdDef = getNgLocaleIdDef(ngModuleType);\n if (ngLocaleIdDef) {\n setLocaleId(ngLocaleIdDef);\n }\n _this._bootstrapComponents = maybeUnwrapFn(ngModuleDef.bootstrap);\n var additionalProviders = [\n {\n provide: NgModuleRef,\n useValue: _this,\n },\n COMPONENT_FACTORY_RESOLVER\n ];\n _this._r3Injector = createInjector(ngModuleType, _parent, additionalProviders, stringify(ngModuleType));\n _this.instance = _this.get(ngModuleType);\n return _this;\n }\n NgModuleRef$1.prototype.get = function (token, notFoundValue, injectFlags) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n if (injectFlags === void 0) { injectFlags = exports.InjectFlags.Default; }\n if (token === Injector || token === NgModuleRef || token === INJECTOR) {\n return this;\n }\n return this._r3Injector.get(token, notFoundValue, injectFlags);\n };\n Object.defineProperty(NgModuleRef$1.prototype, \"componentFactoryResolver\", {\n get: function () {\n return this.get(ComponentFactoryResolver);\n },\n enumerable: true,\n configurable: true\n });\n NgModuleRef$1.prototype.destroy = function () {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n var injector = this._r3Injector;\n !injector.destroyed && injector.destroy();\n this.destroyCbs.forEach(function (fn) { return fn(); });\n this.destroyCbs = null;\n };\n NgModuleRef$1.prototype.onDestroy = function (callback) {\n ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n this.destroyCbs.push(callback);\n };\n return NgModuleRef$1;\n }(NgModuleRef));\n var NgModuleFactory$1 = /** @class */ (function (_super) {\n __extends(NgModuleFactory, _super);\n function NgModuleFactory(moduleType) {\n var _this = _super.call(this) || this;\n _this.moduleType = moduleType;\n var ngModuleDef = getNgModuleDef(moduleType);\n if (ngModuleDef !== null) {\n // Register the NgModule with Angular's module registry. The location (and hence timing) of\n // this call is critical to ensure this works correctly (modules get registered when expected)\n // without bloating bundles (modules are registered when otherwise not referenced).\n //\n // In View Engine, registration occurs in the .ngfactory.js file as a side effect. This has\n // several practical consequences:\n //\n // - If an .ngfactory file is not imported from, the module won't be registered (and can be\n // tree shaken).\n // - If an .ngfactory file is imported from, the module will be registered even if an instance\n // is not actually created (via `create` below).\n // - Since an .ngfactory file in View Engine references the .ngfactory files of the NgModule's\n // imports,\n //\n // In Ivy, things are a bit different. .ngfactory files still exist for compatibility, but are\n // not a required API to use - there are other ways to obtain an NgModuleFactory for a given\n // NgModule. Thus, relying on a side effect in the .ngfactory file is not sufficient. Instead,\n // the side effect of registration is added here, in the constructor of NgModuleFactory,\n // ensuring no matter how a factory is created, the module is registered correctly.\n //\n // An alternative would be to include the registration side effect inline following the actual\n // NgModule definition. This also has the correct timing, but breaks tree-shaking - modules\n // will be registered and retained even if they're otherwise never referenced.\n registerNgModuleType(moduleType);\n }\n return _this;\n }\n NgModuleFactory.prototype.create = function (parentInjector) {\n return new NgModuleRef$1(this.moduleType, parentInjector);\n };\n return NgModuleFactory;\n }(NgModuleFactory));\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Adds decorator, constructor, and property metadata to a given type via static metadata fields\n * on the type.\n *\n * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.\n *\n * Calls to `setClassMetadata` can be marked as pure, resulting in the metadata assignments being\n * tree-shaken away during production builds.\n */\n function setClassMetadata(type, decorators, ctorParameters, propDecorators) {\n return noSideEffects(function () {\n var _a;\n var clazz = type;\n // We determine whether a class has its own metadata by taking the metadata from the parent\n // constructor and checking whether it's the same as the subclass metadata below. We can't use\n // `hasOwnProperty` here because it doesn't work correctly in IE10 for static fields that are\n // defined by TS. See https://github.com/angular/angular/pull/28439#issuecomment-459349218.\n var parentPrototype = clazz.prototype ? Object.getPrototypeOf(clazz.prototype) : null;\n var parentConstructor = parentPrototype && parentPrototype.constructor;\n if (decorators !== null) {\n if (clazz.decorators !== undefined &&\n (!parentConstructor || parentConstructor.decorators !== clazz.decorators)) {\n (_a = clazz.decorators).push.apply(_a, __spread(decorators));\n }\n else {\n clazz.decorators = decorators;\n }\n }\n if (ctorParameters !== null) {\n // Rather than merging, clobber the existing parameters. If other projects exist which use\n // tsickle-style annotations and reflect over them in the same way, this could cause issues,\n // but that is vanishingly unlikely.\n clazz.ctorParameters = ctorParameters;\n }\n if (propDecorators !== null) {\n // The property decorator objects are merged as it is possible different fields have different\n // decorator types. Decorators on individual fields are not merged, as it's also incredibly\n // unlikely that a field will be decorated both with an Angular decorator and a non-Angular\n // decorator that's also been downleveled.\n if (clazz.propDecorators !== undefined &&\n (!parentConstructor || parentConstructor.propDecorators !== clazz.propDecorators)) {\n clazz.propDecorators = __assign({}, clazz.propDecorators, propDecorators);\n }\n else {\n clazz.propDecorators = propDecorators;\n }\n }\n });\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Bindings for pure functions are stored after regular bindings.\n *\n * |------consts------|---------vars---------| |----- hostVars (dir1) ------|\n * ------------------------------------------------------------------------------------------\n * | nodes/refs/pipes | bindings | fn slots | injector | dir1 | host bindings | host slots |\n * ------------------------------------------------------------------------------------------\n * ^ ^\n * TView.bindingStartIndex TView.expandoStartIndex\n *\n * Pure function instructions are given an offset from the binding root. Adding the offset to the\n * binding root gives the first index where the bindings are stored. In component views, the binding\n * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +\n * any directive instances + any hostVars in directives evaluated before it.\n *\n * See VIEW_DATA.md for more information about host binding resolution.\n */\n /**\n * If the value hasn't been saved, calls the pure function to store and return the\n * value. If it has been saved, returns the saved value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns a value\n * @param thisArg Optional calling context of pureFn\n * @returns value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction0(slotOffset, pureFn, thisArg) {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n var bindingIndex = getBindingRoot() + slotOffset;\n var lView = getLView();\n return isCreationMode() ?\n updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) :\n getBinding(lView, bindingIndex);\n }\n /**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction1(slotOffset, pureFn, exp, thisArg) {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n var lView = getLView();\n var bindingIndex = getBindingRoot() + slotOffset;\n return bindingUpdated(lView, bindingIndex, exp) ?\n updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :\n getBinding(lView, bindingIndex + 1);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction2(slotOffset, pureFn, exp1, exp2, thisArg) {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n var bindingIndex = getBindingRoot() + slotOffset;\n var lView = getLView();\n return bindingUpdated2(lView, bindingIndex, exp1, exp2) ?\n updateBinding(lView, bindingIndex + 2, thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :\n getBinding(lView, bindingIndex + 2);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction3(slotOffset, pureFn, exp1, exp2, exp3, thisArg) {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n var bindingIndex = getBindingRoot() + slotOffset;\n var lView = getLView();\n return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) ?\n updateBinding(lView, bindingIndex + 3, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) :\n getBinding(lView, bindingIndex + 3);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction4(slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n var bindingIndex = getBindingRoot() + slotOffset;\n var lView = getLView();\n return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) ?\n updateBinding(lView, bindingIndex + 4, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) :\n getBinding(lView, bindingIndex + 4);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction5(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n var bindingIndex = getBindingRoot() + slotOffset;\n var lView = getLView();\n var different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated(lView, bindingIndex + 4, exp5) || different ?\n updateBinding(lView, bindingIndex + 5, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) :\n pureFn(exp1, exp2, exp3, exp4, exp5)) :\n getBinding(lView, bindingIndex + 5);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction6(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n var bindingIndex = getBindingRoot() + slotOffset;\n var lView = getLView();\n var different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different ?\n updateBinding(lView, bindingIndex + 6, thisArg ?\n pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) :\n getBinding(lView, bindingIndex + 6);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction7(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n var bindingIndex = getBindingRoot() + slotOffset;\n var lView = getLView();\n var different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different ?\n updateBinding(lView, bindingIndex + 7, thisArg ?\n pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) :\n getBinding(lView, bindingIndex + 7);\n }\n /**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunction8(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n var bindingIndex = getBindingRoot() + slotOffset;\n var lView = getLView();\n var different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different ?\n updateBinding(lView, bindingIndex + 8, thisArg ?\n pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) :\n getBinding(lView, bindingIndex + 8);\n }\n /**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\n function ɵɵpureFunctionV(slotOffset, pureFn, exps, thisArg) {\n // TODO(kara): use bindingRoot instead of bindingStartIndex when implementing host bindings\n var bindingIndex = getBindingRoot() + slotOffset;\n var different = false;\n var lView = getLView();\n for (var i = 0; i < exps.length; i++) {\n bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);\n }\n return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) :\n getBinding(lView, bindingIndex);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Create a pipe.\n *\n * @param index Pipe index where the pipe will be stored.\n * @param pipeName The name of the pipe\n * @returns T the instance of the pipe.\n *\n * @codeGenApi\n */\n function ɵɵpipe(index, pipeName) {\n var tView = getLView()[TVIEW];\n var pipeDef;\n var adjustedIndex = index + HEADER_OFFSET;\n if (tView.firstTemplatePass) {\n pipeDef = getPipeDef$1(pipeName, tView.pipeRegistry);\n tView.data[adjustedIndex] = pipeDef;\n if (pipeDef.onDestroy) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);\n }\n }\n else {\n pipeDef = tView.data[adjustedIndex];\n }\n var pipeInstance = pipeDef.factory();\n store(index, pipeInstance);\n return pipeInstance;\n }\n /**\n * Searches the pipe registry for a pipe with the given name. If one is found,\n * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.\n *\n * @param name Name of pipe to resolve\n * @param registry Full list of available pipes\n * @returns Matching PipeDef\n *\n * @publicApi\n */\n function getPipeDef$1(name, registry) {\n if (registry) {\n for (var i = registry.length - 1; i >= 0; i--) {\n var pipeDef = registry[i];\n if (name === pipeDef.name) {\n return pipeDef;\n }\n }\n }\n throw new Error(\"The pipe '\" + name + \"' could not be found!\");\n }\n /**\n * Invokes a pipe with 1 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\n function ɵɵpipeBind1(index, slotOffset, v1) {\n var pipeInstance = ɵɵload(index);\n return unwrapValue$1(isPure(index) ? ɵɵpureFunction1(slotOffset, pipeInstance.transform, v1, pipeInstance) :\n pipeInstance.transform(v1));\n }\n /**\n * Invokes a pipe with 2 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\n function ɵɵpipeBind2(index, slotOffset, v1, v2) {\n var pipeInstance = ɵɵload(index);\n return unwrapValue$1(isPure(index) ? ɵɵpureFunction2(slotOffset, pipeInstance.transform, v1, v2, pipeInstance) :\n pipeInstance.transform(v1, v2));\n }\n /**\n * Invokes a pipe with 3 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 4rd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\n function ɵɵpipeBind3(index, slotOffset, v1, v2, v3) {\n var pipeInstance = ɵɵload(index);\n return unwrapValue$1(isPure(index) ?\n ɵɵpureFunction3(slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) :\n pipeInstance.transform(v1, v2, v3));\n }\n /**\n * Invokes a pipe with 4 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 3rd argument to {@link PipeTransform#transform}.\n * @param v4 4th argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\n function ɵɵpipeBind4(index, slotOffset, v1, v2, v3, v4) {\n var pipeInstance = ɵɵload(index);\n return unwrapValue$1(isPure(index) ?\n ɵɵpureFunction4(slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :\n pipeInstance.transform(v1, v2, v3, v4));\n }\n /**\n * Invokes a pipe with variable number of arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param values Array of arguments to pass to {@link PipeTransform#transform} method.\n *\n * @codeGenApi\n */\n function ɵɵpipeBindV(index, slotOffset, values) {\n var pipeInstance = ɵɵload(index);\n return unwrapValue$1(isPure(index) ? ɵɵpureFunctionV(slotOffset, pipeInstance.transform, values, pipeInstance) :\n pipeInstance.transform.apply(pipeInstance, values));\n }\n function isPure(index) {\n return getLView()[TVIEW].data[index + HEADER_OFFSET].pure;\n }\n /**\n * Unwrap the output of a pipe transformation.\n * In order to trick change detection into considering that the new value is always different from\n * the old one, the old value is overwritten by NO_CHANGE.\n *\n * @param newValue the pipe transformation output.\n */\n function unwrapValue$1(newValue) {\n if (WrappedValue.isWrapped(newValue)) {\n newValue = WrappedValue.unwrap(newValue);\n var lView = getLView();\n // The NO_CHANGE value needs to be written at the index where the impacted binding value is\n // stored\n var bindingToInvalidateIdx = lView[BINDING_INDEX];\n lView[bindingToInvalidateIdx] = NO_CHANGE;\n }\n return newValue;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Use in directives and components to emit custom events synchronously\n * or asynchronously, and register handlers for those events by subscribing\n * to an instance.\n *\n * @usageNotes\n *\n * In the following example, a component defines two output properties\n * that create event emitters. When the title is clicked, the emitter\n * emits an open or close event to toggle the current visibility state.\n *\n * ```html\n * @Component({\n * selector: 'zippy',\n * template: `\n * <div class=\"zippy\">\n * <div (click)=\"toggle()\">Toggle</div>\n * <div [hidden]=\"!visible\">\n * <ng-content></ng-content>\n * </div>\n * </div>`})\n * export class Zippy {\n * visible: boolean = true;\n * @Output() open: EventEmitter<any> = new EventEmitter();\n * @Output() close: EventEmitter<any> = new EventEmitter();\n *\n * toggle() {\n * this.visible = !this.visible;\n * if (this.visible) {\n * this.open.emit(null);\n * } else {\n * this.close.emit(null);\n * }\n * }\n * }\n * ```\n *\n * Access the event object with the `$event` argument passed to the output event\n * handler:\n *\n * ```html\n * <zippy (open)=\"onOpen($event)\" (close)=\"onClose($event)\"></zippy>\n * ```\n *\n * @publicApi\n */\n var EventEmitter = /** @class */ (function (_super) {\n __extends(EventEmitter, _super);\n /**\n * Creates an instance of this class that can\n * deliver events synchronously or asynchronously.\n *\n * @param isAsync When true, deliver events asynchronously.\n *\n */\n function EventEmitter(isAsync) {\n if (isAsync === void 0) { isAsync = false; }\n var _this = _super.call(this) || this;\n _this.__isAsync = isAsync;\n return _this;\n }\n /**\n * Emits an event containing a given value.\n * @param value The value to emit.\n */\n EventEmitter.prototype.emit = function (value) { _super.prototype.next.call(this, value); };\n /**\n * Registers handlers for events emitted by this instance.\n * @param generatorOrNext When supplied, a custom handler for emitted events.\n * @param error When supplied, a custom handler for an error notification\n * from this emitter.\n * @param complete When supplied, a custom handler for a completion\n * notification from this emitter.\n */\n EventEmitter.prototype.subscribe = function (generatorOrNext, error, complete) {\n var schedulerFn;\n var errorFn = function (err) { return null; };\n var completeFn = function () { return null; };\n if (generatorOrNext && typeof generatorOrNext === 'object') {\n schedulerFn = this.__isAsync ? function (value) {\n setTimeout(function () { return generatorOrNext.next(value); });\n } : function (value) { generatorOrNext.next(value); };\n if (generatorOrNext.error) {\n errorFn = this.__isAsync ? function (err) { setTimeout(function () { return generatorOrNext.error(err); }); } :\n function (err) { generatorOrNext.error(err); };\n }\n if (generatorOrNext.complete) {\n completeFn = this.__isAsync ? function () { setTimeout(function () { return generatorOrNext.complete(); }); } :\n function () { generatorOrNext.complete(); };\n }\n }\n else {\n schedulerFn = this.__isAsync ? function (value) { setTimeout(function () { return generatorOrNext(value); }); } :\n function (value) { generatorOrNext(value); };\n if (error) {\n errorFn =\n this.__isAsync ? function (err) { setTimeout(function () { return error(err); }); } : function (err) { error(err); };\n }\n if (complete) {\n completeFn =\n this.__isAsync ? function () { setTimeout(function () { return complete(); }); } : function () { complete(); };\n }\n }\n var sink = _super.prototype.subscribe.call(this, schedulerFn, errorFn, completeFn);\n if (generatorOrNext instanceof rxjs.Subscription) {\n generatorOrNext.add(sink);\n }\n return sink;\n };\n return EventEmitter;\n }(rxjs.Subject));\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function symbolIterator() {\n return this._results[getSymbolIterator()]();\n }\n /**\n * An unmodifiable list of items that Angular keeps up to date when the state\n * of the application changes.\n *\n * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}\n * provide.\n *\n * Implements an iterable interface, therefore it can be used in both ES6\n * javascript `for (var i of items)` loops as well as in Angular templates with\n * `*ngFor=\"let i of myList\"`.\n *\n * Changes can be observed by subscribing to the changes `Observable`.\n *\n * NOTE: In the future this class will implement an `Observable` interface.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * @Component({...})\n * class Container {\n * @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n * @publicApi\n */\n var QueryList = /** @class */ (function () {\n function QueryList() {\n this.dirty = true;\n this._results = [];\n this.changes = new EventEmitter();\n this.length = 0;\n // This function should be declared on the prototype, but doing so there will cause the class\n // declaration to have side-effects and become not tree-shakable. For this reason we do it in\n // the constructor.\n // [getSymbolIterator()](): Iterator<T> { ... }\n var symbol = getSymbolIterator();\n var proto = QueryList.prototype;\n if (!proto[symbol])\n proto[symbol] = symbolIterator;\n }\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n QueryList.prototype.map = function (fn) { return this._results.map(fn); };\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n QueryList.prototype.filter = function (fn) {\n return this._results.filter(fn);\n };\n /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n QueryList.prototype.find = function (fn) {\n return this._results.find(fn);\n };\n /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n QueryList.prototype.reduce = function (fn, init) {\n return this._results.reduce(fn, init);\n };\n /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n QueryList.prototype.forEach = function (fn) { this._results.forEach(fn); };\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n QueryList.prototype.some = function (fn) {\n return this._results.some(fn);\n };\n /**\n * Returns a copy of the internal results list as an Array.\n */\n QueryList.prototype.toArray = function () { return this._results.slice(); };\n QueryList.prototype.toString = function () { return this._results.toString(); };\n /**\n * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that\n * on change detection, it will not notify of changes to the queries, unless a new change\n * occurs.\n *\n * @param resultsTree The results tree to store\n */\n QueryList.prototype.reset = function (resultsTree) {\n this._results = flatten(resultsTree);\n this.dirty = false;\n this.length = this._results.length;\n this.last = this._results[this.length - 1];\n this.first = this._results[0];\n };\n /**\n * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n */\n QueryList.prototype.notifyOnChanges = function () { this.changes.emit(this); };\n /** internal */\n QueryList.prototype.setDirty = function () { this.dirty = true; };\n /** internal */\n QueryList.prototype.destroy = function () {\n this.changes.complete();\n this.changes.unsubscribe();\n };\n return QueryList;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * An object representing a query, which is a combination of:\n * - query predicate to determines if a given element/directive should be included in the query\n * - values collected based on a predicate\n * - `QueryList` to which collected values should be reported\n */\n var LQuery = /** @class */ (function () {\n function LQuery(\n /**\n * Next query. Used when queries are stored as a linked list in `LQueries`.\n */\n next, \n /**\n * Destination to which the value should be added.\n */\n list, \n /**\n * A predicate which determines if a given element/directive should be included in the query\n * results.\n */\n predicate, \n /**\n * Values which have been located.\n * This is what builds up the `QueryList._valuesTree`.\n */\n values, \n /**\n * A pointer to an array that stores collected values from views. This is necessary so we\n * know a container into which to insert nodes collected from views.\n */\n containerValues) {\n this.next = next;\n this.list = list;\n this.predicate = predicate;\n this.values = values;\n this.containerValues = containerValues;\n }\n return LQuery;\n }());\n var LQueries_ = /** @class */ (function () {\n function LQueries_(parent, shallow, deep, nodeIndex) {\n if (nodeIndex === void 0) { nodeIndex = -1; }\n this.parent = parent;\n this.shallow = shallow;\n this.deep = deep;\n this.nodeIndex = nodeIndex;\n }\n LQueries_.prototype.track = function (queryList, predicate, descend, read) {\n if (descend) {\n this.deep = createLQuery(this.deep, queryList, predicate, read != null ? read : null);\n }\n else {\n this.shallow = createLQuery(this.shallow, queryList, predicate, read != null ? read : null);\n }\n };\n LQueries_.prototype.clone = function (tNode) {\n return this.shallow !== null || isContentQueryHost(tNode) ?\n new LQueries_(this, null, this.deep, tNode.index) :\n this;\n };\n LQueries_.prototype.container = function () {\n var shallowResults = copyQueriesToContainer(this.shallow);\n var deepResults = copyQueriesToContainer(this.deep);\n return shallowResults || deepResults ? new LQueries_(this, shallowResults, deepResults) : null;\n };\n LQueries_.prototype.createView = function () {\n var shallowResults = copyQueriesToView(this.shallow);\n var deepResults = copyQueriesToView(this.deep);\n return shallowResults || deepResults ? new LQueries_(this, shallowResults, deepResults) : null;\n };\n LQueries_.prototype.insertView = function (index) {\n insertView$1(index, this.shallow);\n insertView$1(index, this.deep);\n };\n LQueries_.prototype.addNode = function (tNode) {\n add(this.deep, tNode, false);\n add(this.shallow, tNode, false);\n };\n LQueries_.prototype.insertNodeBeforeViews = function (tNode) {\n add(this.deep, tNode, true);\n add(this.shallow, tNode, true);\n };\n LQueries_.prototype.removeView = function () {\n removeView$1(this.shallow);\n removeView$1(this.deep);\n };\n return LQueries_;\n }());\n function copyQueriesToContainer(query) {\n var result = null;\n while (query) {\n var containerValues = []; // prepare room for views\n query.values.push(containerValues);\n result = new LQuery(result, query.list, query.predicate, containerValues, null);\n query = query.next;\n }\n return result;\n }\n function copyQueriesToView(query) {\n var result = null;\n while (query) {\n result = new LQuery(result, query.list, query.predicate, [], query.values);\n query = query.next;\n }\n return result;\n }\n function insertView$1(index, query) {\n while (query) {\n ngDevMode && assertViewQueryhasPointerToDeclarationContainer(query);\n query.containerValues.splice(index, 0, query.values);\n // mark a query as dirty only when inserted view had matching modes\n if (query.values.length) {\n query.list.setDirty();\n }\n query = query.next;\n }\n }\n function removeView$1(query) {\n while (query) {\n ngDevMode && assertViewQueryhasPointerToDeclarationContainer(query);\n var containerValues = query.containerValues;\n var viewValuesIdx = containerValues.indexOf(query.values);\n var removed = containerValues.splice(viewValuesIdx, 1);\n // mark a query as dirty only when removed view had matching modes\n ngDevMode && assertEqual(removed.length, 1, 'removed.length');\n if (removed[0].length) {\n query.list.setDirty();\n }\n query = query.next;\n }\n }\n function assertViewQueryhasPointerToDeclarationContainer(query) {\n assertDefined(query.containerValues, 'View queries need to have a pointer to container values.');\n }\n /**\n * Iterates over local names for a given node and returns directive index\n * (or -1 if a local name points to an element).\n *\n * @param tNode static data of a node to check\n * @param selector selector to match\n * @returns directive index, -1 or null if a selector didn't match any of the local names\n */\n function getIdxOfMatchingSelector(tNode, selector) {\n var localNames = tNode.localNames;\n if (localNames) {\n for (var i = 0; i < localNames.length; i += 2) {\n if (localNames[i] === selector) {\n return localNames[i + 1];\n }\n }\n }\n return null;\n }\n // TODO: \"read\" should be an AbstractType (FW-486)\n function queryByReadToken(read, tNode, currentView) {\n var factoryFn = read[NG_ELEMENT_ID];\n if (typeof factoryFn === 'function') {\n return factoryFn();\n }\n else {\n var tView = currentView[TVIEW];\n var matchingIdx = locateDirectiveOrProvider(tNode, tView, read, false, false);\n if (matchingIdx !== null) {\n return getNodeInjectable(tView.data, currentView, matchingIdx, tNode);\n }\n }\n return null;\n }\n function queryByTNodeType(tNode, currentView) {\n if (tNode.type === 3 /* Element */ || tNode.type === 4 /* ElementContainer */) {\n return createElementRef(ElementRef, tNode, currentView);\n }\n if (tNode.type === 0 /* Container */) {\n return createTemplateRef(TemplateRef, ElementRef, tNode, currentView);\n }\n return null;\n }\n function queryByTemplateRef(templateRefToken, tNode, currentView, read) {\n var templateRefResult = templateRefToken[NG_ELEMENT_ID]();\n if (read) {\n return templateRefResult ? queryByReadToken(read, tNode, currentView) : null;\n }\n return templateRefResult;\n }\n function queryRead(tNode, currentView, read, matchingIdx) {\n if (read) {\n return queryByReadToken(read, tNode, currentView);\n }\n if (matchingIdx > -1) {\n return getNodeInjectable(currentView[TVIEW].data, currentView, matchingIdx, tNode);\n }\n // if read token and / or strategy is not specified,\n // detect it using appropriate tNode type\n return queryByTNodeType(tNode, currentView);\n }\n /**\n * Add query matches for a given node.\n *\n * @param query The first query in the linked list\n * @param tNode The TNode to match against queries\n * @param insertBeforeContainer Whether or not we should add matches before the last\n * container array. This mode is necessary if the query container had to be created\n * out of order (e.g. a view was created in a constructor)\n */\n function add(query, tNode, insertBeforeContainer) {\n var lView = getLView();\n var tView = lView[TVIEW];\n while (query) {\n var predicate = query.predicate;\n var type = predicate.type;\n if (type) {\n var result = null;\n if (type === TemplateRef) {\n result = queryByTemplateRef(type, tNode, lView, predicate.read);\n }\n else {\n var matchingIdx = locateDirectiveOrProvider(tNode, tView, type, false, false);\n if (matchingIdx !== null) {\n result = queryRead(tNode, lView, predicate.read, matchingIdx);\n }\n }\n if (result !== null) {\n addMatch(query, result, insertBeforeContainer);\n }\n }\n else {\n var selector = predicate.selector;\n for (var i = 0; i < selector.length; i++) {\n var matchingIdx = getIdxOfMatchingSelector(tNode, selector[i]);\n if (matchingIdx !== null) {\n var result = queryRead(tNode, lView, predicate.read, matchingIdx);\n if (result !== null) {\n addMatch(query, result, insertBeforeContainer);\n }\n }\n }\n }\n query = query.next;\n }\n }\n function addMatch(query, matchingValue, insertBeforeViewMatches) {\n // Views created in constructors may have their container values created too early. In this case,\n // ensure template node results are unshifted before container results. Otherwise, results inside\n // embedded views will appear before results on parent template nodes when flattened.\n insertBeforeViewMatches ? query.values.unshift(matchingValue) : query.values.push(matchingValue);\n query.list.setDirty();\n }\n function createPredicate(predicate, read) {\n var isArray = Array.isArray(predicate);\n return {\n type: isArray ? null : predicate,\n selector: isArray ? predicate : null,\n read: read\n };\n }\n function createLQuery(previous, queryList, predicate, read) {\n return new LQuery(previous, queryList, createPredicate(predicate, read), queryList._valuesTree, null);\n }\n /**\n * Creates a QueryList and stores it in LView's collection of active queries (LQueries).\n *\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n */\n function createQueryListInLView(\n // TODO: \"read\" should be an AbstractType (FW-486)\n lView, predicate, descend, read, isStatic, nodeIndex) {\n ngDevMode && assertPreviousIsParent(getIsParent());\n var queryList = new QueryList();\n var queries = lView[QUERIES] || (lView[QUERIES] = new LQueries_(null, null, null, nodeIndex));\n queryList._valuesTree = [];\n queryList._static = isStatic;\n queries.track(queryList, predicate, descend, read);\n storeCleanupWithContext(lView, queryList, queryList.destroy);\n return queryList;\n }\n /**\n * Refreshes a query by combining matches from all active views and removing matches from deleted\n * views.\n *\n * @returns `true` if a query got dirty during change detection or if this is a static query\n * resolving in creation mode, `false` otherwise.\n *\n * @codeGenApi\n */\n function ɵɵqueryRefresh(queryList) {\n var queryListImpl = queryList;\n var creationMode = isCreationMode();\n // if creation mode and static or update mode and not static\n if (queryList.dirty && creationMode === queryListImpl._static) {\n queryList.reset(queryListImpl._valuesTree || []);\n queryList.notifyOnChanges();\n return true;\n }\n return false;\n }\n /**\n * Creates new QueryList for a static view query.\n *\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n *\n * @codeGenApi\n */\n function ɵɵstaticViewQuery(\n // TODO(FW-486): \"read\" should be an AbstractType\n predicate, descend, read) {\n var lView = getLView();\n var tView = lView[TVIEW];\n viewQueryInternal(lView, tView, predicate, descend, read, true);\n tView.staticViewQueries = true;\n }\n /**\n * Creates new QueryList, stores the reference in LView and returns QueryList.\n *\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\n function ɵɵviewQuery(\n // TODO(FW-486): \"read\" should be an AbstractType\n predicate, descend, read) {\n var lView = getLView();\n var tView = lView[TVIEW];\n return viewQueryInternal(lView, tView, predicate, descend, read, false);\n }\n function viewQueryInternal(lView, tView, predicate, descend, read, isStatic) {\n if (tView.firstTemplatePass) {\n tView.expandoStartIndex++;\n }\n var index = getCurrentQueryIndex();\n var queryList = createQueryListInLView(lView, predicate, descend, read, isStatic, -1);\n store(index - HEADER_OFFSET, queryList);\n setCurrentQueryIndex(index + 1);\n return queryList;\n }\n /**\n * Loads current View Query and moves the pointer/index to the next View Query in LView.\n *\n * @codeGenApi\n */\n function ɵɵloadViewQuery() {\n var index = getCurrentQueryIndex();\n setCurrentQueryIndex(index + 1);\n return loadInternal(getLView(), index - HEADER_OFFSET);\n }\n /**\n * Registers a QueryList, associated with a content query, for later refresh (part of a view\n * refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\n function ɵɵcontentQuery(directiveIndex, predicate, descend, \n // TODO(FW-486): \"read\" should be an AbstractType\n read) {\n var lView = getLView();\n var tView = lView[TVIEW];\n var tNode = getPreviousOrParentTNode();\n return contentQueryInternal(lView, tView, directiveIndex, predicate, descend, read, false, tNode.index);\n }\n function contentQueryInternal(lView, tView, directiveIndex, predicate, descend, \n // TODO(FW-486): \"read\" should be an AbstractType\n read, isStatic, nodeIndex) {\n var contentQuery = createQueryListInLView(lView, predicate, descend, read, isStatic, nodeIndex);\n (lView[CONTENT_QUERIES] || (lView[CONTENT_QUERIES] = [])).push(contentQuery);\n if (tView.firstTemplatePass) {\n var tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n var lastSavedDirectiveIndex = tView.contentQueries.length ? tView.contentQueries[tView.contentQueries.length - 1] : -1;\n if (directiveIndex !== lastSavedDirectiveIndex) {\n tViewContentQueries.push(directiveIndex);\n }\n }\n return contentQuery;\n }\n /**\n * Registers a QueryList, associated with a static content query, for later refresh\n * (part of a view refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\n function ɵɵstaticContentQuery(directiveIndex, predicate, descend, \n // TODO(FW-486): \"read\" should be an AbstractType\n read) {\n var lView = getLView();\n var tView = lView[TVIEW];\n var tNode = getPreviousOrParentTNode();\n contentQueryInternal(lView, tView, directiveIndex, predicate, descend, read, true, tNode.index);\n tView.staticContentQueries = true;\n }\n /**\n *\n * @codeGenApi\n */\n function ɵɵloadContentQuery() {\n var lView = getLView();\n ngDevMode &&\n assertDefined(lView[CONTENT_QUERIES], 'Content QueryList array should be defined if reading a query.');\n var index = getCurrentQueryIndex();\n ngDevMode && assertDataInRange(lView[CONTENT_QUERIES], index);\n setCurrentQueryIndex(index + 1);\n return lView[CONTENT_QUERIES][index];\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the\n * `<ng-template>` element.\n *\n * @codeGenApi\n */\n function ɵɵtemplateRefExtractor(tNode, currentView) {\n return createTemplateRef(TemplateRef, ElementRef, tNode, currentView);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var ɵ0$9 = function () { return ({\n 'ɵɵattribute': ɵɵattribute,\n 'ɵɵattributeInterpolate1': ɵɵattributeInterpolate1,\n 'ɵɵattributeInterpolate2': ɵɵattributeInterpolate2,\n 'ɵɵattributeInterpolate3': ɵɵattributeInterpolate3,\n 'ɵɵattributeInterpolate4': ɵɵattributeInterpolate4,\n 'ɵɵattributeInterpolate5': ɵɵattributeInterpolate5,\n 'ɵɵattributeInterpolate6': ɵɵattributeInterpolate6,\n 'ɵɵattributeInterpolate7': ɵɵattributeInterpolate7,\n 'ɵɵattributeInterpolate8': ɵɵattributeInterpolate8,\n 'ɵɵattributeInterpolateV': ɵɵattributeInterpolateV,\n 'ɵɵdefineBase': ɵɵdefineBase,\n 'ɵɵdefineComponent': ɵɵdefineComponent,\n 'ɵɵdefineDirective': ɵɵdefineDirective,\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵdefineNgModule': ɵɵdefineNgModule,\n 'ɵɵdefinePipe': ɵɵdefinePipe,\n 'ɵɵdirectiveInject': ɵɵdirectiveInject,\n 'ɵɵgetFactoryOf': ɵɵgetFactoryOf,\n 'ɵɵgetInheritedFactory': ɵɵgetInheritedFactory,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinjectAttribute': ɵɵinjectAttribute,\n 'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor,\n 'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,\n 'ɵɵProvidersFeature': ɵɵProvidersFeature,\n 'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,\n 'ɵɵcontainer': ɵɵcontainer,\n 'ɵɵnextContext': ɵɵnextContext,\n 'ɵɵcontainerRefreshStart': ɵɵcontainerRefreshStart,\n 'ɵɵcontainerRefreshEnd': ɵɵcontainerRefreshEnd,\n 'ɵɵnamespaceHTML': ɵɵnamespaceHTML,\n 'ɵɵnamespaceMathML': ɵɵnamespaceMathML,\n 'ɵɵnamespaceSVG': ɵɵnamespaceSVG,\n 'ɵɵenableBindings': ɵɵenableBindings,\n 'ɵɵdisableBindings': ɵɵdisableBindings,\n 'ɵɵallocHostVars': ɵɵallocHostVars,\n 'ɵɵelementStart': ɵɵelementStart,\n 'ɵɵelementEnd': ɵɵelementEnd,\n 'ɵɵelement': ɵɵelement,\n 'ɵɵelementContainerStart': ɵɵelementContainerStart,\n 'ɵɵelementContainerEnd': ɵɵelementContainerEnd,\n 'ɵɵpureFunction0': ɵɵpureFunction0,\n 'ɵɵpureFunction1': ɵɵpureFunction1,\n 'ɵɵpureFunction2': ɵɵpureFunction2,\n 'ɵɵpureFunction3': ɵɵpureFunction3,\n 'ɵɵpureFunction4': ɵɵpureFunction4,\n 'ɵɵpureFunction5': ɵɵpureFunction5,\n 'ɵɵpureFunction6': ɵɵpureFunction6,\n 'ɵɵpureFunction7': ɵɵpureFunction7,\n 'ɵɵpureFunction8': ɵɵpureFunction8,\n 'ɵɵpureFunctionV': ɵɵpureFunctionV,\n 'ɵɵgetCurrentView': ɵɵgetCurrentView,\n 'ɵɵrestoreView': ɵɵrestoreView,\n 'ɵɵinterpolation1': ɵɵinterpolation1,\n 'ɵɵinterpolation2': ɵɵinterpolation2,\n 'ɵɵinterpolation3': ɵɵinterpolation3,\n 'ɵɵinterpolation4': ɵɵinterpolation4,\n 'ɵɵinterpolation5': ɵɵinterpolation5,\n 'ɵɵinterpolation6': ɵɵinterpolation6,\n 'ɵɵinterpolation7': ɵɵinterpolation7,\n 'ɵɵinterpolation8': ɵɵinterpolation8,\n 'ɵɵinterpolationV': ɵɵinterpolationV,\n 'ɵɵlistener': ɵɵlistener,\n 'ɵɵload': ɵɵload,\n 'ɵɵprojection': ɵɵprojection,\n 'ɵɵupdateSyntheticHostBinding': ɵɵupdateSyntheticHostBinding,\n 'ɵɵcomponentHostSyntheticListener': ɵɵcomponentHostSyntheticListener,\n 'ɵɵpipeBind1': ɵɵpipeBind1,\n 'ɵɵpipeBind2': ɵɵpipeBind2,\n 'ɵɵpipeBind3': ɵɵpipeBind3,\n 'ɵɵpipeBind4': ɵɵpipeBind4,\n 'ɵɵpipeBindV': ɵɵpipeBindV,\n 'ɵɵprojectionDef': ɵɵprojectionDef,\n 'ɵɵproperty': ɵɵproperty,\n 'ɵɵpropertyInterpolate': ɵɵpropertyInterpolate,\n 'ɵɵpropertyInterpolate1': ɵɵpropertyInterpolate1,\n 'ɵɵpropertyInterpolate2': ɵɵpropertyInterpolate2,\n 'ɵɵpropertyInterpolate3': ɵɵpropertyInterpolate3,\n 'ɵɵpropertyInterpolate4': ɵɵpropertyInterpolate4,\n 'ɵɵpropertyInterpolate5': ɵɵpropertyInterpolate5,\n 'ɵɵpropertyInterpolate6': ɵɵpropertyInterpolate6,\n 'ɵɵpropertyInterpolate7': ɵɵpropertyInterpolate7,\n 'ɵɵpropertyInterpolate8': ɵɵpropertyInterpolate8,\n 'ɵɵpropertyInterpolateV': ɵɵpropertyInterpolateV,\n 'ɵɵpipe': ɵɵpipe,\n 'ɵɵqueryRefresh': ɵɵqueryRefresh,\n 'ɵɵviewQuery': ɵɵviewQuery,\n 'ɵɵstaticViewQuery': ɵɵstaticViewQuery,\n 'ɵɵstaticContentQuery': ɵɵstaticContentQuery,\n 'ɵɵloadViewQuery': ɵɵloadViewQuery,\n 'ɵɵcontentQuery': ɵɵcontentQuery,\n 'ɵɵloadContentQuery': ɵɵloadContentQuery,\n 'ɵɵreference': ɵɵreference,\n 'ɵɵelementHostAttrs': ɵɵelementHostAttrs,\n 'ɵɵclassMap': ɵɵclassMap,\n 'ɵɵstyling': ɵɵstyling,\n 'ɵɵstyleMap': ɵɵstyleMap,\n 'ɵɵstyleProp': ɵɵstyleProp,\n 'ɵɵstyleSanitizer': styleSanitizer,\n 'ɵɵstylingApply': ɵɵstylingApply,\n 'ɵɵclassProp': ɵɵclassProp,\n 'ɵɵselect': ɵɵselect,\n 'ɵɵtemplate': ɵɵtemplate,\n 'ɵɵtext': ɵɵtext,\n 'ɵɵtextBinding': ɵɵtextBinding,\n 'ɵɵtextInterpolate': ɵɵtextInterpolate,\n 'ɵɵtextInterpolate1': ɵɵtextInterpolate1,\n 'ɵɵtextInterpolate2': ɵɵtextInterpolate2,\n 'ɵɵtextInterpolate3': ɵɵtextInterpolate3,\n 'ɵɵtextInterpolate4': ɵɵtextInterpolate4,\n 'ɵɵtextInterpolate5': ɵɵtextInterpolate5,\n 'ɵɵtextInterpolate6': ɵɵtextInterpolate6,\n 'ɵɵtextInterpolate7': ɵɵtextInterpolate7,\n 'ɵɵtextInterpolate8': ɵɵtextInterpolate8,\n 'ɵɵtextInterpolateV': ɵɵtextInterpolateV,\n 'ɵɵembeddedViewStart': ɵɵembeddedViewStart,\n 'ɵɵembeddedViewEnd': ɵɵembeddedViewEnd,\n 'ɵɵi18n': ɵɵi18n,\n 'ɵɵi18nAttributes': ɵɵi18nAttributes,\n 'ɵɵi18nExp': ɵɵi18nExp,\n 'ɵɵi18nStart': ɵɵi18nStart,\n 'ɵɵi18nEnd': ɵɵi18nEnd,\n 'ɵɵi18nApply': ɵɵi18nApply,\n 'ɵɵi18nPostprocess': ɵɵi18nPostprocess,\n 'ɵɵi18nLocalize': ɵɵi18nLocalize,\n 'ɵɵresolveWindow': ɵɵresolveWindow,\n 'ɵɵresolveDocument': ɵɵresolveDocument,\n 'ɵɵresolveBody': ɵɵresolveBody,\n 'ɵɵsetComponentScope': ɵɵsetComponentScope,\n 'ɵɵsetNgModuleScope': ɵɵsetNgModuleScope,\n 'ɵɵsanitizeHtml': ɵɵsanitizeHtml,\n 'ɵɵsanitizeStyle': ɵɵsanitizeStyle,\n 'ɵɵdefaultStyleSanitizer': ɵɵdefaultStyleSanitizer,\n 'ɵɵsanitizeResourceUrl': ɵɵsanitizeResourceUrl,\n 'ɵɵsanitizeScript': ɵɵsanitizeScript,\n 'ɵɵsanitizeUrl': ɵɵsanitizeUrl,\n 'ɵɵsanitizeUrlOrResourceUrl': ɵɵsanitizeUrlOrResourceUrl,\n }); };\n /**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\n var angularCoreEnv = (ɵ0$9)();\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var EMPTY_ARRAY$4 = [];\n var moduleQueue = [];\n /**\n * Enqueues moduleDef to be checked later to see if scope can be set on its\n * component declarations.\n */\n function enqueueModuleForDelayedScoping(moduleType, ngModule) {\n moduleQueue.push({ moduleType: moduleType, ngModule: ngModule });\n }\n var flushingModuleQueue = false;\n /**\n * Loops over queued module definitions, if a given module definition has all of its\n * declarations resolved, it dequeues that module definition and sets the scope on\n * its declarations.\n */\n function flushModuleScopingQueueAsMuchAsPossible() {\n if (!flushingModuleQueue) {\n flushingModuleQueue = true;\n try {\n for (var i = moduleQueue.length - 1; i >= 0; i--) {\n var _a = moduleQueue[i], moduleType = _a.moduleType, ngModule = _a.ngModule;\n if (ngModule.declarations && ngModule.declarations.every(isResolvedDeclaration)) {\n // dequeue\n moduleQueue.splice(i, 1);\n setScopeOnDeclaredComponents(moduleType, ngModule);\n }\n }\n }\n finally {\n flushingModuleQueue = false;\n }\n }\n }\n /**\n * Returns truthy if a declaration has resolved. If the declaration happens to be\n * an array of declarations, it will recurse to check each declaration in that array\n * (which may also be arrays).\n */\n function isResolvedDeclaration(declaration) {\n if (Array.isArray(declaration)) {\n return declaration.every(isResolvedDeclaration);\n }\n return !!resolveForwardRef(declaration);\n }\n /**\n * Compiles a module in JIT mode.\n *\n * This function automatically gets called when a class has a `@NgModule` decorator.\n */\n function compileNgModule(moduleType, ngModule) {\n if (ngModule === void 0) { ngModule = {}; }\n compileNgModuleDefs(moduleType, ngModule);\n // Because we don't know if all declarations have resolved yet at the moment the\n // NgModule decorator is executing, we're enqueueing the setting of module scope\n // on its declarations to be run at a later time when all declarations for the module,\n // including forward refs, have resolved.\n enqueueModuleForDelayedScoping(moduleType, ngModule);\n }\n /**\n * Compiles and adds the `ngModuleDef` and `ngInjectorDef` properties to the module class.\n *\n * It's possible to compile a module via this API which will allow duplicate declarations in its\n * root.\n */\n function compileNgModuleDefs(moduleType, ngModule, allowDuplicateDeclarationsInRoot) {\n if (allowDuplicateDeclarationsInRoot === void 0) { allowDuplicateDeclarationsInRoot = false; }\n ngDevMode && assertDefined(moduleType, 'Required value moduleType');\n ngDevMode && assertDefined(ngModule, 'Required value ngModule');\n var declarations = flatten(ngModule.declarations || EMPTY_ARRAY$4);\n var ngModuleDef = null;\n Object.defineProperty(moduleType, NG_MODULE_DEF, {\n configurable: true,\n get: function () {\n if (ngModuleDef === null) {\n ngModuleDef = getCompilerFacade().compileNgModule(angularCoreEnv, \"ng:///\" + moduleType.name + \"/ngModuleDef.js\", {\n type: moduleType,\n bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY$4).map(resolveForwardRef),\n declarations: declarations.map(resolveForwardRef),\n imports: flatten(ngModule.imports || EMPTY_ARRAY$4)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n exports: flatten(ngModule.exports || EMPTY_ARRAY$4)\n .map(resolveForwardRef)\n .map(expandModuleWithProviders),\n emitInline: true,\n schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,\n id: ngModule.id || null,\n });\n }\n return ngModuleDef;\n }\n });\n var ngInjectorDef = null;\n Object.defineProperty(moduleType, NG_INJECTOR_DEF, {\n get: function () {\n if (ngInjectorDef === null) {\n ngDevMode && verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot);\n var meta = {\n name: moduleType.name,\n type: moduleType,\n deps: reflectDependencies(moduleType),\n providers: ngModule.providers || EMPTY_ARRAY$4,\n imports: [\n (ngModule.imports || EMPTY_ARRAY$4).map(resolveForwardRef),\n (ngModule.exports || EMPTY_ARRAY$4).map(resolveForwardRef),\n ],\n };\n ngInjectorDef = getCompilerFacade().compileInjector(angularCoreEnv, \"ng:///\" + moduleType.name + \"/ngInjectorDef.js\", meta);\n }\n return ngInjectorDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n }\n function verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot) {\n if (verifiedNgModule.get(moduleType))\n return;\n verifiedNgModule.set(moduleType, true);\n moduleType = resolveForwardRef(moduleType);\n var ngModuleDef = getNgModuleDef(moduleType, true);\n var errors = [];\n var declarations = maybeUnwrapFn(ngModuleDef.declarations);\n var imports = maybeUnwrapFn(ngModuleDef.imports);\n flatten(imports)\n .map(unwrapModuleWithProvidersImports)\n .forEach(function (mod) { return verifySemanticsOfNgModuleDef(mod, false); });\n var exports = maybeUnwrapFn(ngModuleDef.exports);\n declarations.forEach(verifyDeclarationsHaveDefinitions);\n var combinedDeclarations = __spread(declarations.map(resolveForwardRef), flatten(imports.map(computeCombinedExports)).map(resolveForwardRef));\n exports.forEach(verifyExportsAreDeclaredOrReExported);\n declarations.forEach(function (decl) { return verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot); });\n declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule);\n var ngModule = getAnnotation(moduleType, 'NgModule');\n if (ngModule) {\n ngModule.imports &&\n flatten(ngModule.imports)\n .map(unwrapModuleWithProvidersImports)\n .forEach(function (mod) { return verifySemanticsOfNgModuleDef(mod, false); });\n ngModule.bootstrap && ngModule.bootstrap.forEach(verifyCorrectBootstrapType);\n ngModule.bootstrap && ngModule.bootstrap.forEach(verifyComponentIsPartOfNgModule);\n ngModule.entryComponents && ngModule.entryComponents.forEach(verifyComponentIsPartOfNgModule);\n }\n // Throw Error if any errors were detected.\n if (errors.length) {\n throw new Error(errors.join('\\n'));\n }\n ////////////////////////////////////////////////////////////////////////////////////////////////\n function verifyDeclarationsHaveDefinitions(type) {\n type = resolveForwardRef(type);\n var def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n if (!def) {\n errors.push(\"Unexpected value '\" + stringifyForError(type) + \"' declared by the module '\" + stringifyForError(moduleType) + \"'. Please add a @Pipe/@Directive/@Component annotation.\");\n }\n }\n function verifyExportsAreDeclaredOrReExported(type) {\n type = resolveForwardRef(type);\n var kind = getComponentDef(type) && 'component' || getDirectiveDef(type) && 'directive' ||\n getPipeDef(type) && 'pipe';\n if (kind) {\n // only checked if we are declared as Component, Directive, or Pipe\n // Modules don't need to be declared or imported.\n if (combinedDeclarations.lastIndexOf(type) === -1) {\n // We are exporting something which we don't explicitly declare or import.\n errors.push(\"Can't export \" + kind + \" \" + stringifyForError(type) + \" from \" + stringifyForError(moduleType) + \" as it was neither declared nor imported!\");\n }\n }\n }\n function verifyDeclarationIsUnique(type, suppressErrors) {\n type = resolveForwardRef(type);\n var existingModule = ownerNgModule.get(type);\n if (existingModule && existingModule !== moduleType) {\n if (!suppressErrors) {\n var modules = [existingModule, moduleType].map(stringifyForError).sort();\n errors.push(\"Type \" + stringifyForError(type) + \" is part of the declarations of 2 modules: \" + modules[0] + \" and \" + modules[1] + \"! \" +\n (\"Please consider moving \" + stringifyForError(type) + \" to a higher module that imports \" + modules[0] + \" and \" + modules[1] + \". \") +\n (\"You can also create a new NgModule that exports and includes \" + stringifyForError(type) + \" then import that NgModule in \" + modules[0] + \" and \" + modules[1] + \".\"));\n }\n }\n else {\n // Mark type as having owner.\n ownerNgModule.set(type, moduleType);\n }\n }\n function verifyComponentIsPartOfNgModule(type) {\n type = resolveForwardRef(type);\n var existingModule = ownerNgModule.get(type);\n if (!existingModule) {\n errors.push(\"Component \" + stringifyForError(type) + \" is not part of any NgModule or the module has not been imported into your module.\");\n }\n }\n function verifyCorrectBootstrapType(type) {\n type = resolveForwardRef(type);\n if (!getComponentDef(type)) {\n errors.push(stringifyForError(type) + \" cannot be used as an entry component.\");\n }\n }\n function verifyComponentEntryComponentsIsPartOfNgModule(type) {\n type = resolveForwardRef(type);\n if (getComponentDef(type)) {\n // We know we are component\n var component = getAnnotation(type, 'Component');\n if (component && component.entryComponents) {\n component.entryComponents.forEach(verifyComponentIsPartOfNgModule);\n }\n }\n }\n }\n function unwrapModuleWithProvidersImports(typeOrWithProviders) {\n typeOrWithProviders = resolveForwardRef(typeOrWithProviders);\n return typeOrWithProviders.ngModule || typeOrWithProviders;\n }\n function getAnnotation(type, name) {\n var annotation = null;\n collect(type.__annotations__);\n collect(type.decorators);\n return annotation;\n function collect(annotations) {\n if (annotations) {\n annotations.forEach(readAnnotation);\n }\n }\n function readAnnotation(decorator) {\n if (!annotation) {\n var proto = Object.getPrototypeOf(decorator);\n if (proto.ngMetadataName == name) {\n annotation = decorator;\n }\n else if (decorator.type) {\n var proto_1 = Object.getPrototypeOf(decorator.type);\n if (proto_1.ngMetadataName == name) {\n annotation = decorator.args[0];\n }\n }\n }\n }\n }\n /**\n * Keep track of compiled components. This is needed because in tests we often want to compile the\n * same component with more than one NgModule. This would cause an error unless we reset which\n * NgModule the component belongs to. We keep the list of compiled components here so that the\n * TestBed can reset it later.\n */\n var ownerNgModule = new Map();\n var verifiedNgModule = new Map();\n function resetCompiledComponents() {\n ownerNgModule = new Map();\n verifiedNgModule = new Map();\n moduleQueue.length = 0;\n }\n /**\n * Computes the combined declarations of explicit declarations, as well as declarations inherited by\n * traversing the exports of imported modules.\n * @param type\n */\n function computeCombinedExports(type) {\n type = resolveForwardRef(type);\n var ngModuleDef = getNgModuleDef(type, true);\n return __spread(flatten(maybeUnwrapFn(ngModuleDef.exports).map(function (type) {\n var ngModuleDef = getNgModuleDef(type);\n if (ngModuleDef) {\n verifySemanticsOfNgModuleDef(type, false);\n return computeCombinedExports(type);\n }\n else {\n return type;\n }\n })));\n }\n /**\n * Some declared components may be compiled asynchronously, and thus may not have their\n * ngComponentDef set yet. If this is the case, then a reference to the module is written into\n * the `ngSelectorScope` property of the declared type.\n */\n function setScopeOnDeclaredComponents(moduleType, ngModule) {\n var declarations = flatten(ngModule.declarations || EMPTY_ARRAY$4);\n var transitiveScopes = transitiveScopesFor(moduleType);\n declarations.forEach(function (declaration) {\n if (declaration.hasOwnProperty(NG_COMPONENT_DEF)) {\n // An `ngComponentDef` field exists - go ahead and patch the component directly.\n var component = declaration;\n var componentDef = getComponentDef(component);\n patchComponentDefWithScope(componentDef, transitiveScopes);\n }\n else if (!declaration.hasOwnProperty(NG_DIRECTIVE_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) {\n // Set `ngSelectorScope` for future reference when the component compilation finishes.\n declaration.ngSelectorScope = moduleType;\n }\n });\n }\n /**\n * Patch the definition of a component with directives and pipes from the compilation scope of\n * a given module.\n */\n function patchComponentDefWithScope(componentDef, transitiveScopes) {\n componentDef.directiveDefs = function () {\n return Array.from(transitiveScopes.compilation.directives)\n .map(function (dir) { return dir.hasOwnProperty(NG_COMPONENT_DEF) ? getComponentDef(dir) :\n getDirectiveDef(dir); })\n .filter(function (def) { return !!def; });\n };\n componentDef.pipeDefs = function () {\n return Array.from(transitiveScopes.compilation.pipes).map(function (pipe) { return getPipeDef(pipe); });\n };\n componentDef.schemas = transitiveScopes.schemas;\n // Since we avoid Components/Directives/Pipes recompiling in case there are no overrides, we\n // may face a problem where previously compiled defs available to a given Component/Directive\n // are cached in TView and may become stale (in case any of these defs gets recompiled). In\n // order to avoid this problem, we force fresh TView to be created.\n componentDef.tView = null;\n }\n /**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.\n *\n * This operation is memoized and the result is cached on the module's definition. It can be called\n * on modules with components that have not fully compiled yet, but the result should not be used\n * until they have.\n */\n function transitiveScopesFor(moduleType, processNgModuleFn) {\n if (!isNgModule(moduleType)) {\n throw new Error(moduleType.name + \" does not have an ngModuleDef\");\n }\n var def = getNgModuleDef(moduleType);\n if (def.transitiveCompileScopes !== null) {\n return def.transitiveCompileScopes;\n }\n var scopes = {\n schemas: def.schemas || null,\n compilation: {\n directives: new Set(),\n pipes: new Set(),\n },\n exported: {\n directives: new Set(),\n pipes: new Set(),\n },\n };\n maybeUnwrapFn(def.declarations).forEach(function (declared) {\n var declaredWithDefs = declared;\n if (getPipeDef(declaredWithDefs)) {\n scopes.compilation.pipes.add(declared);\n }\n else {\n // Either declared has an ngComponentDef or ngDirectiveDef, or it's a component which hasn't\n // had its template compiled yet. In either case, it gets added to the compilation's\n // directives.\n scopes.compilation.directives.add(declared);\n }\n });\n maybeUnwrapFn(def.imports).forEach(function (imported) {\n var importedType = imported;\n if (!isNgModule(importedType)) {\n throw new Error(\"Importing \" + importedType.name + \" which does not have an ngModuleDef\");\n }\n if (processNgModuleFn) {\n processNgModuleFn(importedType);\n }\n // When this module imports another, the imported module's exported directives and pipes are\n // added to the compilation scope of this module.\n var importedScope = transitiveScopesFor(importedType, processNgModuleFn);\n importedScope.exported.directives.forEach(function (entry) { return scopes.compilation.directives.add(entry); });\n importedScope.exported.pipes.forEach(function (entry) { return scopes.compilation.pipes.add(entry); });\n });\n maybeUnwrapFn(def.exports).forEach(function (exported) {\n var exportedType = exported;\n // Either the type is a module, a pipe, or a component/directive (which may not have an\n // ngComponentDef as it might be compiled asynchronously).\n if (isNgModule(exportedType)) {\n // When this module exports another, the exported module's exported directives and pipes are\n // added to both the compilation and exported scopes of this module.\n var exportedScope = transitiveScopesFor(exportedType, processNgModuleFn);\n exportedScope.exported.directives.forEach(function (entry) {\n scopes.compilation.directives.add(entry);\n scopes.exported.directives.add(entry);\n });\n exportedScope.exported.pipes.forEach(function (entry) {\n scopes.compilation.pipes.add(entry);\n scopes.exported.pipes.add(entry);\n });\n }\n else if (getPipeDef(exportedType)) {\n scopes.exported.pipes.add(exportedType);\n }\n else {\n scopes.exported.directives.add(exportedType);\n }\n });\n def.transitiveCompileScopes = scopes;\n return scopes;\n }\n function expandModuleWithProviders(value) {\n if (isModuleWithProviders(value)) {\n return value.ngModule;\n }\n return value;\n }\n function isModuleWithProviders(value) {\n return value.ngModule !== undefined;\n }\n function isNgModule(value) {\n return !!getNgModuleDef(value);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Compile an Angular component according to its decorator metadata, and patch the resulting\n * ngComponentDef onto the component type.\n *\n * Compilation may be asynchronous (due to the need to resolve URLs for the component template or\n * other resources, for example). In the event that compilation is not immediate, `compileComponent`\n * will enqueue resource resolution into a global queue and will fail to return the `ngComponentDef`\n * until the global queue has been resolved with a call to `resolveComponentResources`.\n */\n function compileComponent(type, metadata) {\n var ngComponentDef = null;\n // Metadata may have resources which need to be resolved.\n maybeQueueResolutionOfComponentResources(type, metadata);\n Object.defineProperty(type, NG_COMPONENT_DEF, {\n get: function () {\n var compiler = getCompilerFacade();\n if (ngComponentDef === null) {\n if (componentNeedsResolution(metadata)) {\n var error = [\"Component '\" + type.name + \"' is not resolved:\"];\n if (metadata.templateUrl) {\n error.push(\" - templateUrl: \" + metadata.templateUrl);\n }\n if (metadata.styleUrls && metadata.styleUrls.length) {\n error.push(\" - styleUrls: \" + JSON.stringify(metadata.styleUrls));\n }\n error.push(\"Did you run and wait for 'resolveComponentResources()'?\");\n throw new Error(error.join('\\n'));\n }\n var templateUrl = metadata.templateUrl || \"ng:///\" + type.name + \"/template.html\";\n var meta = __assign({}, directiveMetadata(type, metadata), { typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl), template: metadata.template || '', preserveWhitespaces: metadata.preserveWhitespaces || false, styles: metadata.styles || EMPTY_ARRAY$2, animations: metadata.animations, directives: [], changeDetection: metadata.changeDetection, pipes: new Map(), encapsulation: metadata.encapsulation || exports.ViewEncapsulation.Emulated, interpolation: metadata.interpolation, viewProviders: metadata.viewProviders || null });\n if (meta.usesInheritance) {\n addBaseDefToUndecoratedParents(type);\n }\n ngComponentDef = compiler.compileComponent(angularCoreEnv, templateUrl, meta);\n // When NgModule decorator executed, we enqueued the module definition such that\n // it would only dequeue and add itself as module scope to all of its declarations,\n // but only if if all of its declarations had resolved. This call runs the check\n // to see if any modules that are in the queue can be dequeued and add scope to\n // their declarations.\n flushModuleScopingQueueAsMuchAsPossible();\n // If component compilation is async, then the @NgModule annotation which declares the\n // component may execute and set an ngSelectorScope property on the component type. This\n // allows the component to patch itself with directiveDefs from the module after it\n // finishes compiling.\n if (hasSelectorScope(type)) {\n var scopes = transitiveScopesFor(type.ngSelectorScope);\n patchComponentDefWithScope(ngComponentDef, scopes);\n }\n }\n return ngComponentDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n // Add ngInjectableDef so components are reachable through the module injector by default\n // This is mostly to support injecting components in tests. In real application code,\n // components should be retrieved through the node injector, so this isn't a problem.\n compileInjectable(type);\n }\n function hasSelectorScope(component) {\n return component.ngSelectorScope !== undefined;\n }\n /**\n * Compile an Angular directive according to its decorator metadata, and patch the resulting\n * ngDirectiveDef onto the component type.\n *\n * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which\n * will resolve when compilation completes and the directive becomes usable.\n */\n function compileDirective(type, directive) {\n var ngDirectiveDef = null;\n Object.defineProperty(type, NG_DIRECTIVE_DEF, {\n get: function () {\n if (ngDirectiveDef === null) {\n var name_1 = type && type.name;\n var sourceMapUrl = \"ng:///\" + name_1 + \"/ngDirectiveDef.js\";\n var compiler = getCompilerFacade();\n var facade = directiveMetadata(type, directive);\n facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name_1, sourceMapUrl);\n if (facade.usesInheritance) {\n addBaseDefToUndecoratedParents(type);\n }\n ngDirectiveDef = compiler.compileDirective(angularCoreEnv, sourceMapUrl, facade);\n }\n return ngDirectiveDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n // Add ngInjectableDef so directives are reachable through the module injector by default\n // This is mostly to support injecting directives in tests. In real application code,\n // directives should be retrieved through the node injector, so this isn't a problem.\n compileInjectable(type);\n }\n function extendsDirectlyFromObject(type) {\n return Object.getPrototypeOf(type.prototype) === Object.prototype;\n }\n /**\n * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a\n * `Component`).\n */\n function directiveMetadata(type, metadata) {\n // Reflect inputs and outputs.\n var propMetadata = getReflect().ownPropMetadata(type);\n return {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n selector: metadata.selector,\n deps: reflectDependencies(type),\n host: metadata.host || EMPTY_OBJ,\n propMetadata: propMetadata,\n inputs: metadata.inputs || EMPTY_ARRAY$2,\n outputs: metadata.outputs || EMPTY_ARRAY$2,\n queries: extractQueriesMetadata(type, propMetadata, isContentQuery),\n lifecycle: { usesOnChanges: type.prototype.hasOwnProperty('ngOnChanges') },\n typeSourceSpan: null,\n usesInheritance: !extendsDirectlyFromObject(type),\n exportAs: extractExportAs(metadata.exportAs),\n providers: metadata.providers || null,\n viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery),\n };\n }\n /**\n * Adds an `ngBaseDef` to all parent classes of a type that don't have an Angular decorator.\n */\n function addBaseDefToUndecoratedParents(type) {\n var objPrototype = Object.prototype;\n var parent = Object.getPrototypeOf(type);\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objPrototype) {\n // Since inheritance works if the class was annotated already, we only need to add\n // the base def if there are no annotations and the base def hasn't been created already.\n if (!getDirectiveDef(parent) && !getComponentDef(parent) && !getBaseDef(parent)) {\n var facade = extractBaseDefMetadata(parent);\n facade && compileBase(parent, facade);\n }\n parent = Object.getPrototypeOf(parent);\n }\n }\n /** Compiles the base metadata into a base definition. */\n function compileBase(type, facade) {\n var ngBaseDef = null;\n Object.defineProperty(type, NG_BASE_DEF, {\n get: function () {\n if (ngBaseDef === null) {\n var name_2 = type && type.name;\n var sourceMapUrl = \"ng://\" + name_2 + \"/ngBaseDef.js\";\n var compiler = getCompilerFacade();\n ngBaseDef = compiler.compileBase(angularCoreEnv, sourceMapUrl, facade);\n }\n return ngBaseDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n }\n /** Extracts the metadata necessary to construct an `ngBaseDef` from a class. */\n function extractBaseDefMetadata(type) {\n var propMetadata = getReflect().ownPropMetadata(type);\n var viewQueries = extractQueriesMetadata(type, propMetadata, isViewQuery);\n var queries = extractQueriesMetadata(type, propMetadata, isContentQuery);\n var inputs;\n var outputs;\n // We only need to know whether there are any HostListener or HostBinding\n // decorators present, the parsing logic is in the compiler already.\n var hasHostDecorators = false;\n var _loop_1 = function (field) {\n propMetadata[field].forEach(function (ann) {\n var metadataName = ann.ngMetadataName;\n if (metadataName === 'Input') {\n inputs = inputs || {};\n inputs[field] = ann.bindingPropertyName ? [ann.bindingPropertyName, field] : field;\n }\n else if (metadataName === 'Output') {\n outputs = outputs || {};\n outputs[field] = ann.bindingPropertyName || field;\n }\n else if (metadataName === 'HostBinding' || metadataName === 'HostListener') {\n hasHostDecorators = true;\n }\n });\n };\n for (var field in propMetadata) {\n _loop_1(field);\n }\n // Only generate the base def if there's any info inside it.\n if (inputs || outputs || viewQueries.length || queries.length || hasHostDecorators) {\n return { name: type.name, inputs: inputs, outputs: outputs, viewQueries: viewQueries, queries: queries, propMetadata: propMetadata };\n }\n return null;\n }\n function convertToR3QueryPredicate(selector) {\n return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);\n }\n function convertToR3QueryMetadata(propertyName, ann) {\n return {\n propertyName: propertyName,\n predicate: convertToR3QueryPredicate(ann.selector),\n descendants: ann.descendants,\n first: ann.first,\n read: ann.read ? ann.read : null,\n static: !!ann.static\n };\n }\n function extractQueriesMetadata(type, propMetadata, isQueryAnn) {\n var queriesMeta = [];\n var _loop_2 = function (field) {\n if (propMetadata.hasOwnProperty(field)) {\n var annotations_1 = propMetadata[field];\n annotations_1.forEach(function (ann) {\n if (isQueryAnn(ann)) {\n if (!ann.selector) {\n throw new Error(\"Can't construct a query for the property \\\"\" + field + \"\\\" of \" +\n (\"\\\"\" + stringifyForError(type) + \"\\\" since the query selector wasn't defined.\"));\n }\n if (annotations_1.some(isInputAnn)) {\n throw new Error(\"Cannot combine @Input decorators with query decorators\");\n }\n queriesMeta.push(convertToR3QueryMetadata(field, ann));\n }\n });\n }\n };\n for (var field in propMetadata) {\n _loop_2(field);\n }\n return queriesMeta;\n }\n function extractExportAs(exportAs) {\n if (exportAs === undefined) {\n return null;\n }\n return exportAs.split(',').map(function (part) { return part.trim(); });\n }\n function isContentQuery(value) {\n var name = value.ngMetadataName;\n return name === 'ContentChild' || name === 'ContentChildren';\n }\n function isViewQuery(value) {\n var name = value.ngMetadataName;\n return name === 'ViewChild' || name === 'ViewChildren';\n }\n function isInputAnn(value) {\n return value.ngMetadataName === 'Input';\n }\n function splitByComma(value) {\n return value.split(',').map(function (piece) { return piece.trim(); });\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function compilePipe(type, meta) {\n var ngPipeDef = null;\n Object.defineProperty(type, NG_PIPE_DEF, {\n get: function () {\n if (ngPipeDef === null) {\n var typeName = type.name;\n ngPipeDef =\n getCompilerFacade().compilePipe(angularCoreEnv, \"ng:///\" + typeName + \"/ngPipeDef.js\", {\n type: type,\n typeArgumentCount: 0,\n name: typeName,\n deps: reflectDependencies(type),\n pipeName: meta.name,\n pure: meta.pure !== undefined ? meta.pure : true\n });\n }\n return ngPipeDef;\n },\n // Make the property configurable in dev mode to allow overriding in tests\n configurable: !!ngDevMode,\n });\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var ɵ0$a = function (dir) {\n if (dir === void 0) { dir = {}; }\n return dir;\n }, ɵ1$2 = function (type, meta) { return SWITCH_COMPILE_DIRECTIVE(type, meta); };\n /**\n * Type of the Directive metadata.\n *\n * @publicApi\n */\n var Directive = makeDecorator('Directive', ɵ0$a, undefined, undefined, ɵ1$2);\n var ɵ2$1 = function (c) {\n if (c === void 0) { c = {}; }\n return (__assign({ changeDetection: exports.ChangeDetectionStrategy.Default }, c));\n }, ɵ3$1 = function (type, meta) { return SWITCH_COMPILE_COMPONENT(type, meta); };\n /**\n * Component decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\n var Component = makeDecorator('Component', ɵ2$1, Directive, undefined, ɵ3$1);\n var ɵ4 = function (p) { return (__assign({ pure: true }, p)); }, ɵ5 = function (type, meta) { return SWITCH_COMPILE_PIPE(type, meta); };\n /**\n * @Annotation\n * @publicApi\n */\n var Pipe = makeDecorator('Pipe', ɵ4, undefined, undefined, ɵ5);\n var ɵ6 = function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); };\n /**\n * @Annotation\n * @publicApi\n */\n var Input = makePropDecorator('Input', ɵ6);\n var ɵ7 = function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); };\n /**\n * @Annotation\n * @publicApi\n */\n var Output = makePropDecorator('Output', ɵ7);\n var ɵ8 = function (hostPropertyName) { return ({ hostPropertyName: hostPropertyName }); };\n /**\n * @Annotation\n * @publicApi\n */\n var HostBinding = makePropDecorator('HostBinding', ɵ8);\n var ɵ9 = function (eventName, args) { return ({ eventName: eventName, args: args }); };\n /**\n * Decorator that binds a DOM event to a host listener and supplies configuration metadata.\n * Angular invokes the supplied handler method when the host element emits the specified event,\n * and updates the bound element with the result.\n *\n * If the handler method returns false, applies `preventDefault` on the bound element.\n *\n * @usageNotes\n *\n * The following example declares a directive\n * that attaches a click listener to a button and counts clicks.\n *\n * ```ts\n * @Directive({selector: 'button[counting]'})\n * class CountClicks {\n * numberOfClicks = 0;\n *\n * @HostListener('click', ['$event.target'])\n * onClick(btn) {\n * console.log('button', btn, 'number of clicks:', this.numberOfClicks++);\n * }\n * }\n *\n * @Component({\n * selector: 'app',\n * template: '<button counting>Increment</button>',\n * })\n * class App {}\n * ```\n *\n * @Annotation\n * @publicApi\n */\n var HostListener = makePropDecorator('HostListener', ɵ9);\n var SWITCH_COMPILE_COMPONENT__POST_R3__ = compileComponent;\n var SWITCH_COMPILE_DIRECTIVE__POST_R3__ = compileDirective;\n var SWITCH_COMPILE_PIPE__POST_R3__ = compilePipe;\n var SWITCH_COMPILE_COMPONENT__PRE_R3__ = noop;\n var SWITCH_COMPILE_DIRECTIVE__PRE_R3__ = noop;\n var SWITCH_COMPILE_PIPE__PRE_R3__ = noop;\n var SWITCH_COMPILE_COMPONENT = SWITCH_COMPILE_COMPONENT__PRE_R3__;\n var SWITCH_COMPILE_DIRECTIVE = SWITCH_COMPILE_DIRECTIVE__PRE_R3__;\n var SWITCH_COMPILE_PIPE = SWITCH_COMPILE_PIPE__PRE_R3__;\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var ɵ0$b = function (ngModule) { return ngModule; }, ɵ1$3 = \n /**\n * Decorator that marks the following class as an NgModule, and supplies\n * configuration metadata for it.\n *\n * * The `declarations` and `entryComponents` options configure the compiler\n * with information about what belongs to the NgModule.\n * * The `providers` options configures the NgModule's injector to provide\n * dependencies the NgModule members.\n * * The `imports` and `exports` options bring in members from other modules, and make\n * this module's members available to others.\n */\n function (type, meta) { return SWITCH_COMPILE_NGMODULE(type, meta); };\n /**\n * @Annotation\n * @publicApi\n */\n var NgModule = makeDecorator('NgModule', ɵ0$b, undefined, undefined, ɵ1$3);\n function preR3NgModuleCompile(moduleType, metadata) {\n var imports = (metadata && metadata.imports) || [];\n if (metadata && metadata.exports) {\n imports = __spread(imports, [metadata.exports]);\n }\n moduleType.ngInjectorDef = ɵɵdefineInjector({\n factory: convertInjectableProviderToFactory(moduleType, { useClass: moduleType }),\n providers: metadata && metadata.providers,\n imports: imports,\n });\n }\n var SWITCH_COMPILE_NGMODULE__POST_R3__ = compileNgModule;\n var SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile;\n var SWITCH_COMPILE_NGMODULE = SWITCH_COMPILE_NGMODULE__PRE_R3__;\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * A function that will be executed when an application is initialized.\n *\n * @publicApi\n */\n var APP_INITIALIZER = new InjectionToken('Application Initializer');\n /**\n * A class that reflects the state of running {@link APP_INITIALIZER}s.\n *\n * @publicApi\n */\n var ApplicationInitStatus = /** @class */ (function () {\n function ApplicationInitStatus(appInits) {\n var _this = this;\n this.appInits = appInits;\n this.initialized = false;\n this.done = false;\n this.donePromise = new Promise(function (res, rej) {\n _this.resolve = res;\n _this.reject = rej;\n });\n }\n /** @internal */\n ApplicationInitStatus.prototype.runInitializers = function () {\n var _this = this;\n if (this.initialized) {\n return;\n }\n var asyncInitPromises = [];\n var complete = function () {\n _this.done = true;\n _this.resolve();\n };\n if (this.appInits) {\n for (var i = 0; i < this.appInits.length; i++) {\n var initResult = this.appInits[i]();\n if (isPromise(initResult)) {\n asyncInitPromises.push(initResult);\n }\n }\n }\n Promise.all(asyncInitPromises).then(function () { complete(); }).catch(function (e) { _this.reject(e); });\n if (asyncInitPromises.length === 0) {\n complete();\n }\n this.initialized = true;\n };\n ApplicationInitStatus = __decorate([\n Injectable(),\n __param(0, Inject(APP_INITIALIZER)), __param(0, Optional()),\n __metadata(\"design:paramtypes\", [Array])\n ], ApplicationInitStatus);\n return ApplicationInitStatus;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * A DI Token representing a unique string id assigned to the application by Angular and used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.\n *\n * If you need to avoid randomly generated value to be used as an application id, you can provide\n * a custom value via a DI provider <!-- TODO: provider --> configuring the root {@link Injector}\n * using this token.\n * @publicApi\n */\n var APP_ID = new InjectionToken('AppId');\n function _appIdRandomProviderFactory() {\n return \"\" + _randomChar() + _randomChar() + _randomChar();\n }\n /**\n * Providers that will generate a random APP_ID_TOKEN.\n * @publicApi\n */\n var APP_ID_RANDOM_PROVIDER = {\n provide: APP_ID,\n useFactory: _appIdRandomProviderFactory,\n deps: [],\n };\n function _randomChar() {\n return String.fromCharCode(97 + Math.floor(Math.random() * 25));\n }\n /**\n * A function that will be executed when a platform is initialized.\n * @publicApi\n */\n var PLATFORM_INITIALIZER = new InjectionToken('Platform Initializer');\n /**\n * A token that indicates an opaque platform id.\n * @publicApi\n */\n var PLATFORM_ID = new InjectionToken('Platform ID');\n /**\n * All callbacks provided via this token will be called for every component that is bootstrapped.\n * Signature of the callback:\n *\n * `(componentRef: ComponentRef) => void`.\n *\n * @publicApi\n */\n var APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');\n /**\n * A token which indicates the root directory of the application\n * @publicApi\n */\n var PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var Console = /** @class */ (function () {\n function Console() {\n }\n Console.prototype.log = function (message) {\n // tslint:disable-next-line:no-console\n console.log(message);\n };\n // Note: for reporting errors use `DOM.logError()` as it is platform specific\n Console.prototype.warn = function (message) {\n // tslint:disable-next-line:no-console\n console.warn(message);\n };\n Console = __decorate([\n Injectable()\n ], Console);\n return Console;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Provide this token to set the locale of your application.\n * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,\n * DecimalPipe and PercentPipe) and by ICU expressions.\n *\n * See the [i18n guide](guide/i18n#setting-up-locale) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { LOCALE_ID } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: LOCALE_ID, useValue: 'en-US' }]\n * });\n * ```\n *\n * @publicApi\n */\n var LOCALE_ID$1 = new InjectionToken('LocaleId');\n /**\n * Use this token at bootstrap to provide the content of your translation file (`xtb`,\n * `xlf` or `xlf2`) when you want to translate your application in another language.\n *\n * See the [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * // content of your translation file\n * const translations = '....';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS, useValue: translations }]\n * });\n * ```\n *\n * @publicApi\n */\n var TRANSLATIONS$1 = new InjectionToken('Translations');\n /**\n * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,\n * `xlf` or `xlf2`.\n *\n * See the [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS_FORMAT } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n * providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]\n * });\n * ```\n *\n * @publicApi\n */\n var TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat');\n (function (MissingTranslationStrategy) {\n MissingTranslationStrategy[MissingTranslationStrategy[\"Error\"] = 0] = \"Error\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Warning\"] = 1] = \"Warning\";\n MissingTranslationStrategy[MissingTranslationStrategy[\"Ignore\"] = 2] = \"Ignore\";\n })(exports.MissingTranslationStrategy || (exports.MissingTranslationStrategy = {}));\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Combination of NgModuleFactory and ComponentFactorys.\n *\n * @publicApi\n */\n var ModuleWithComponentFactories = /** @class */ (function () {\n function ModuleWithComponentFactories(ngModuleFactory, componentFactories) {\n this.ngModuleFactory = ngModuleFactory;\n this.componentFactories = componentFactories;\n }\n return ModuleWithComponentFactories;\n }());\n function _throwError() {\n throw new Error(\"Runtime compiler is not loaded\");\n }\n var Compiler_compileModuleSync__PRE_R3__ = _throwError;\n var Compiler_compileModuleSync__POST_R3__ = function (moduleType) {\n return new NgModuleFactory$1(moduleType);\n };\n var Compiler_compileModuleSync = Compiler_compileModuleSync__PRE_R3__;\n var Compiler_compileModuleAsync__PRE_R3__ = _throwError;\n var Compiler_compileModuleAsync__POST_R3__ = function (moduleType) {\n return Promise.resolve(Compiler_compileModuleSync__POST_R3__(moduleType));\n };\n var Compiler_compileModuleAsync = Compiler_compileModuleAsync__PRE_R3__;\n var Compiler_compileModuleAndAllComponentsSync__PRE_R3__ = _throwError;\n var Compiler_compileModuleAndAllComponentsSync__POST_R3__ = function (moduleType) {\n var ngModuleFactory = Compiler_compileModuleSync__POST_R3__(moduleType);\n var moduleDef = getNgModuleDef(moduleType);\n var componentFactories = maybeUnwrapFn(moduleDef.declarations)\n .reduce(function (factories, declaration) {\n var componentDef = getComponentDef(declaration);\n componentDef && factories.push(new ComponentFactory$1(componentDef));\n return factories;\n }, []);\n return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n };\n var Compiler_compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync__PRE_R3__;\n var Compiler_compileModuleAndAllComponentsAsync__PRE_R3__ = _throwError;\n var Compiler_compileModuleAndAllComponentsAsync__POST_R3__ = function (moduleType) {\n return Promise.resolve(Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType));\n };\n var Compiler_compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync__PRE_R3__;\n /**\n * Low-level service for running the angular compiler during runtime\n * to create {@link ComponentFactory}s, which\n * can later be used to create and render a Component instance.\n *\n * Each `@NgModule` provides an own `Compiler` to its injector,\n * that will use the directives/pipes of the ng module for compilation\n * of components.\n *\n * @publicApi\n */\n var Compiler = /** @class */ (function () {\n function Compiler() {\n /**\n * Compiles the given NgModule and all of its components. All templates of the components listed\n * in `entryComponents` have to be inlined.\n */\n this.compileModuleSync = Compiler_compileModuleSync;\n /**\n * Compiles the given NgModule and all of its components\n */\n this.compileModuleAsync = Compiler_compileModuleAsync;\n /**\n * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n */\n this.compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync;\n /**\n * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n */\n this.compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync;\n }\n /**\n * Clears all caches.\n */\n Compiler.prototype.clearCache = function () { };\n /**\n * Clears the cache for the given component/ngModule.\n */\n Compiler.prototype.clearCacheFor = function (type) { };\n /**\n * Returns the id for a given NgModule, if one is defined and known to the compiler.\n */\n Compiler.prototype.getModuleId = function (moduleType) { return undefined; };\n Compiler = __decorate([\n Injectable()\n ], Compiler);\n return Compiler;\n }());\n /**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @publicApi\n */\n var COMPILER_OPTIONS = new InjectionToken('compilerOptions');\n /**\n * A factory for creating a Compiler\n *\n * @publicApi\n */\n var CompilerFactory = /** @class */ (function () {\n function CompilerFactory() {\n }\n return CompilerFactory;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var trace;\n var events;\n function detectWTF() {\n var wtf = _global /** TODO #9100 */['wtf'];\n if (wtf) {\n trace = wtf['trace'];\n if (trace) {\n events = trace['events'];\n return true;\n }\n }\n return false;\n }\n function createScope(signature, flags) {\n if (flags === void 0) { flags = null; }\n return events.createScope(signature, flags);\n }\n function leave(scope, returnValue) {\n trace.leaveScope(scope, returnValue);\n return returnValue;\n }\n function startTimeRange(rangeType, action) {\n return trace.beginTimeRange(rangeType, action);\n }\n function endTimeRange(range) {\n trace.endTimeRange(range);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * True if WTF is enabled.\n */\n var wtfEnabled = detectWTF();\n function noopScope(arg0, arg1) {\n return null;\n }\n /**\n * Create trace scope.\n *\n * Scopes must be strictly nested and are analogous to stack frames, but\n * do not have to follow the stack frames. Instead it is recommended that they follow logical\n * nesting. You may want to use\n * [Event\n * Signatures](http://google.github.io/tracing-framework/instrumenting-code.html#custom-events)\n * as they are defined in WTF.\n *\n * Used to mark scope entry. The return value is used to leave the scope.\n *\n * var myScope = wtfCreateScope('MyClass#myMethod(ascii someVal)');\n *\n * someMethod() {\n * var s = myScope('Foo'); // 'Foo' gets stored in tracing UI\n * // DO SOME WORK HERE\n * return wtfLeave(s, 123); // Return value 123\n * }\n *\n * Note, adding try-finally block around the work to ensure that `wtfLeave` gets called can\n * negatively impact the performance of your application. For this reason we recommend that\n * you don't add them to ensure that `wtfLeave` gets called. In production `wtfLeave` is a noop and\n * so try-finally block has no value. When debugging perf issues, skipping `wtfLeave`, do to\n * exception, will produce incorrect trace, but presence of exception signifies logic error which\n * needs to be fixed before the app should be profiled. Add try-finally only when you expect that\n * an exception is expected during normal execution while profiling.\n *\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\n var wtfCreateScope = wtfEnabled ? createScope : function (signature, flags) { return noopScope; };\n /**\n * Used to mark end of Scope.\n *\n * - `scope` to end.\n * - `returnValue` (optional) to be passed to the WTF.\n *\n * Returns the `returnValue for easy chaining.\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\n var wtfLeave = wtfEnabled ? leave : function (s, r) { return r; };\n /**\n * Used to mark Async start. Async are similar to scope but they don't have to be strictly nested.\n * The return value is used in the call to [endAsync]. Async ranges only work if WTF has been\n * enabled.\n *\n * someMethod() {\n * var s = wtfStartTimeRange('HTTP:GET', 'some.url');\n * var future = new Future.delay(5).then((_) {\n * wtfEndTimeRange(s);\n * });\n * }\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\n var wtfStartTimeRange = wtfEnabled ? startTimeRange : function (rangeType, action) { return null; };\n /**\n * Ends a async time range operation.\n * [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been\n * enabled.\n * @publicApi\n * @deprecated the Web Tracing Framework is no longer supported in Angular\n */\n var wtfEndTimeRange = wtfEnabled ? endTimeRange : function (r) { return null; };\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var promise = (function () { return Promise.resolve(0); })();\n function scheduleMicroTask(fn) {\n if (typeof Zone === 'undefined') {\n // use promise to schedule microTask instead of use Zone\n promise.then(function () { fn && fn.apply(null, null); });\n }\n else {\n Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n * - docs explaining zones and the use of zones in Angular and change-detection\n * - link to runOutsideAngular/run (throughout this file!)\n * -->\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n * selector: 'ng-zone-demo',\n * template: `\n * <h2>Demo: NgZone</h2>\n *\n * <p>Progress: {{progress}}%</p>\n * <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n * <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n * <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n * `,\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => { console.log('Outside Done!'); });\n * });\n * });\n * }\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n *\n * @publicApi\n */\n var NgZone = /** @class */ (function () {\n function NgZone(_a) {\n var _b = _a.enableLongStackTrace, enableLongStackTrace = _b === void 0 ? false : _b;\n this.hasPendingMicrotasks = false;\n this.hasPendingMacrotasks = false;\n /**\n * Whether there are no outstanding microtasks or macrotasks.\n */\n this.isStable = true;\n /**\n * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n */\n this.onUnstable = new EventEmitter(false);\n /**\n * Notifies when there is no more microtasks enqueued in the current VM Turn.\n * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n * For this reason this event can fire multiple times per VM Turn.\n */\n this.onMicrotaskEmpty = new EventEmitter(false);\n /**\n * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n * implies we are about to relinquish VM turn.\n * This event gets called just once.\n */\n this.onStable = new EventEmitter(false);\n /**\n * Notifies that an error has been delivered.\n */\n this.onError = new EventEmitter(false);\n if (typeof Zone == 'undefined') {\n throw new Error(\"In this configuration Angular requires Zone.js\");\n }\n Zone.assertZonePatched();\n var self = this;\n self._nesting = 0;\n self._outer = self._inner = Zone.current;\n if (Zone['wtfZoneSpec']) {\n self._inner = self._inner.fork(Zone['wtfZoneSpec']);\n }\n if (Zone['TaskTrackingZoneSpec']) {\n self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']);\n }\n if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {\n self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']);\n }\n forkInnerZoneWithAngularBehavior(self);\n }\n NgZone.isInAngularZone = function () { return Zone.current.get('isAngularZone') === true; };\n NgZone.assertInAngularZone = function () {\n if (!NgZone.isInAngularZone()) {\n throw new Error('Expected to be in Angular Zone, but it is not!');\n }\n };\n NgZone.assertNotInAngularZone = function () {\n if (NgZone.isInAngularZone()) {\n throw new Error('Expected to not be in Angular Zone, but it is!');\n }\n };\n /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n NgZone.prototype.run = function (fn, applyThis, applyArgs) {\n return this._inner.run(fn, applyThis, applyArgs);\n };\n /**\n * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n * returned by the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n NgZone.prototype.runTask = function (fn, applyThis, applyArgs, name) {\n var zone = this._inner;\n var task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop$1, noop$1);\n try {\n return zone.runTask(task, applyThis, applyArgs);\n }\n finally {\n zone.cancelTask(task);\n }\n };\n /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n NgZone.prototype.runGuarded = function (fn, applyThis, applyArgs) {\n return this._inner.runGuarded(fn, applyThis, applyArgs);\n };\n /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n * work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n */\n NgZone.prototype.runOutsideAngular = function (fn) {\n return this._outer.run(fn);\n };\n return NgZone;\n }());\n function noop$1() { }\n var EMPTY_PAYLOAD = {};\n function checkStable(zone) {\n if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n try {\n zone._nesting++;\n zone.onMicrotaskEmpty.emit(null);\n }\n finally {\n zone._nesting--;\n if (!zone.hasPendingMicrotasks) {\n try {\n zone.runOutsideAngular(function () { return zone.onStable.emit(null); });\n }\n finally {\n zone.isStable = true;\n }\n }\n }\n }\n }\n function forkInnerZoneWithAngularBehavior(zone) {\n zone._inner = zone._inner.fork({\n name: 'angular',\n properties: { 'isAngularZone': true },\n onInvokeTask: function (delegate, current, target, task, applyThis, applyArgs) {\n try {\n onEnter(zone);\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n }\n finally {\n onLeave(zone);\n }\n },\n onInvoke: function (delegate, current, target, callback, applyThis, applyArgs, source) {\n try {\n onEnter(zone);\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n }\n finally {\n onLeave(zone);\n }\n },\n onHasTask: function (delegate, current, target, hasTaskState) {\n delegate.hasTask(target, hasTaskState);\n if (current === target) {\n // We are only interested in hasTask events which originate from our zone\n // (A child hasTask event is not interesting to us)\n if (hasTaskState.change == 'microTask') {\n zone.hasPendingMicrotasks = hasTaskState.microTask;\n checkStable(zone);\n }\n else if (hasTaskState.change == 'macroTask') {\n zone.hasPendingMacrotasks = hasTaskState.macroTask;\n }\n }\n },\n onHandleError: function (delegate, current, target, error) {\n delegate.handleError(target, error);\n zone.runOutsideAngular(function () { return zone.onError.emit(error); });\n return false;\n }\n });\n }\n function onEnter(zone) {\n zone._nesting++;\n if (zone.isStable) {\n zone.isStable = false;\n zone.onUnstable.emit(null);\n }\n }\n function onLeave(zone) {\n zone._nesting--;\n checkStable(zone);\n }\n /**\n * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls\n * to framework to perform rendering.\n */\n var NoopNgZone = /** @class */ (function () {\n function NoopNgZone() {\n this.hasPendingMicrotasks = false;\n this.hasPendingMacrotasks = false;\n this.isStable = true;\n this.onUnstable = new EventEmitter();\n this.onMicrotaskEmpty = new EventEmitter();\n this.onStable = new EventEmitter();\n this.onError = new EventEmitter();\n }\n NoopNgZone.prototype.run = function (fn) { return fn(); };\n NoopNgZone.prototype.runGuarded = function (fn) { return fn(); };\n NoopNgZone.prototype.runOutsideAngular = function (fn) { return fn(); };\n NoopNgZone.prototype.runTask = function (fn) { return fn(); };\n return NoopNgZone;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * The Testability service provides testing hooks that can be accessed from\n * the browser and by services such as Protractor. Each bootstrapped Angular\n * application on the page will have an instance of Testability.\n * @publicApi\n */\n var Testability = /** @class */ (function () {\n function Testability(_ngZone) {\n var _this = this;\n this._ngZone = _ngZone;\n this._pendingCount = 0;\n this._isZoneStable = true;\n /**\n * Whether any work was done since the last 'whenStable' callback. This is\n * useful to detect if this could have potentially destabilized another\n * component while it is stabilizing.\n * @internal\n */\n this._didWork = false;\n this._callbacks = [];\n this.taskTrackingZone = null;\n this._watchAngularEvents();\n _ngZone.run(function () {\n _this.taskTrackingZone =\n typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');\n });\n }\n Testability.prototype._watchAngularEvents = function () {\n var _this = this;\n this._ngZone.onUnstable.subscribe({\n next: function () {\n _this._didWork = true;\n _this._isZoneStable = false;\n }\n });\n this._ngZone.runOutsideAngular(function () {\n _this._ngZone.onStable.subscribe({\n next: function () {\n NgZone.assertNotInAngularZone();\n scheduleMicroTask(function () {\n _this._isZoneStable = true;\n _this._runCallbacksIfReady();\n });\n }\n });\n });\n };\n /**\n * Increases the number of pending request\n * @deprecated pending requests are now tracked with zones.\n */\n Testability.prototype.increasePendingRequestCount = function () {\n this._pendingCount += 1;\n this._didWork = true;\n return this._pendingCount;\n };\n /**\n * Decreases the number of pending request\n * @deprecated pending requests are now tracked with zones\n */\n Testability.prototype.decreasePendingRequestCount = function () {\n this._pendingCount -= 1;\n if (this._pendingCount < 0) {\n throw new Error('pending async requests below zero');\n }\n this._runCallbacksIfReady();\n return this._pendingCount;\n };\n /**\n * Whether an associated application is stable\n */\n Testability.prototype.isStable = function () {\n return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;\n };\n Testability.prototype._runCallbacksIfReady = function () {\n var _this = this;\n if (this.isStable()) {\n // Schedules the call backs in a new frame so that it is always async.\n scheduleMicroTask(function () {\n while (_this._callbacks.length !== 0) {\n var cb = _this._callbacks.pop();\n clearTimeout(cb.timeoutId);\n cb.doneCb(_this._didWork);\n }\n _this._didWork = false;\n });\n }\n else {\n // Still not stable, send updates.\n var pending_1 = this.getPendingTasks();\n this._callbacks = this._callbacks.filter(function (cb) {\n if (cb.updateCb && cb.updateCb(pending_1)) {\n clearTimeout(cb.timeoutId);\n return false;\n }\n return true;\n });\n this._didWork = true;\n }\n };\n Testability.prototype.getPendingTasks = function () {\n if (!this.taskTrackingZone) {\n return [];\n }\n // Copy the tasks data so that we don't leak tasks.\n return this.taskTrackingZone.macroTasks.map(function (t) {\n return {\n source: t.source,\n // From TaskTrackingZone:\n // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40\n creationLocation: t.creationLocation,\n data: t.data\n };\n });\n };\n Testability.prototype.addCallback = function (cb, timeout, updateCb) {\n var _this = this;\n var timeoutId = -1;\n if (timeout && timeout > 0) {\n timeoutId = setTimeout(function () {\n _this._callbacks = _this._callbacks.filter(function (cb) { return cb.timeoutId !== timeoutId; });\n cb(_this._didWork, _this.getPendingTasks());\n }, timeout);\n }\n this._callbacks.push({ doneCb: cb, timeoutId: timeoutId, updateCb: updateCb });\n };\n /**\n * Wait for the application to be stable with a timeout. If the timeout is reached before that\n * happens, the callback receives a list of the macro tasks that were pending, otherwise null.\n *\n * @param doneCb The callback to invoke when Angular is stable or the timeout expires\n * whichever comes first.\n * @param timeout Optional. The maximum time to wait for Angular to become stable. If not\n * specified, whenStable() will wait forever.\n * @param updateCb Optional. If specified, this callback will be invoked whenever the set of\n * pending macrotasks changes. If this callback returns true doneCb will not be invoked\n * and no further updates will be issued.\n */\n Testability.prototype.whenStable = function (doneCb, timeout, updateCb) {\n if (updateCb && !this.taskTrackingZone) {\n throw new Error('Task tracking zone is required when passing an update callback to ' +\n 'whenStable(). Is \"zone.js/dist/task-tracking.js\" loaded?');\n }\n // These arguments are 'Function' above to keep the public API simple.\n this.addCallback(doneCb, timeout, updateCb);\n this._runCallbacksIfReady();\n };\n /**\n * Get the number of pending requests\n * @deprecated pending requests are now tracked with zones\n */\n Testability.prototype.getPendingRequestCount = function () { return this._pendingCount; };\n /**\n * Find providers by name\n * @param using The root element to search from\n * @param provider The name of binding variable\n * @param exactMatch Whether using exactMatch\n */\n Testability.prototype.findProviders = function (using, provider, exactMatch) {\n // TODO(juliemr): implement.\n return [];\n };\n Testability = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [NgZone])\n ], Testability);\n return Testability;\n }());\n /**\n * A global registry of {@link Testability} instances for specific elements.\n * @publicApi\n */\n var TestabilityRegistry = /** @class */ (function () {\n function TestabilityRegistry() {\n /** @internal */\n this._applications = new Map();\n _testabilityGetter.addToWindow(this);\n }\n /**\n * Registers an application with a testability hook so that it can be tracked\n * @param token token of application, root element\n * @param testability Testability hook\n */\n TestabilityRegistry.prototype.registerApplication = function (token, testability) {\n this._applications.set(token, testability);\n };\n /**\n * Unregisters an application.\n * @param token token of application, root element\n */\n TestabilityRegistry.prototype.unregisterApplication = function (token) { this._applications.delete(token); };\n /**\n * Unregisters all applications\n */\n TestabilityRegistry.prototype.unregisterAllApplications = function () { this._applications.clear(); };\n /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n TestabilityRegistry.prototype.getTestability = function (elem) { return this._applications.get(elem) || null; };\n /**\n * Get all registered testabilities\n */\n TestabilityRegistry.prototype.getAllTestabilities = function () { return Array.from(this._applications.values()); };\n /**\n * Get all registered applications(root elements)\n */\n TestabilityRegistry.prototype.getAllRootElements = function () { return Array.from(this._applications.keys()); };\n /**\n * Find testability of a node in the Tree\n * @param elem node\n * @param findInAncestors whether finding testability in ancestors if testability was not found in\n * current node\n */\n TestabilityRegistry.prototype.findTestabilityInTree = function (elem, findInAncestors) {\n if (findInAncestors === void 0) { findInAncestors = true; }\n return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);\n };\n TestabilityRegistry = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [])\n ], TestabilityRegistry);\n return TestabilityRegistry;\n }());\n var _NoopGetTestability = /** @class */ (function () {\n function _NoopGetTestability() {\n }\n _NoopGetTestability.prototype.addToWindow = function (registry) { };\n _NoopGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {\n return null;\n };\n return _NoopGetTestability;\n }());\n /**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @publicApi\n */\n function setTestabilityGetter(getter) {\n _testabilityGetter = getter;\n }\n var _testabilityGetter = new _NoopGetTestability();\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var _platform;\n var compileNgModuleFactory = compileNgModuleFactory__PRE_R3__;\n function compileNgModuleFactory__PRE_R3__(injector, options, moduleType) {\n var compilerFactory = injector.get(CompilerFactory);\n var compiler = compilerFactory.createCompiler([options]);\n return compiler.compileModuleAsync(moduleType);\n }\n function compileNgModuleFactory__POST_R3__(injector, options, moduleType) {\n ngDevMode && assertNgModuleType(moduleType);\n var moduleFactory = new NgModuleFactory$1(moduleType);\n if (isComponentResourceResolutionQueueEmpty()) {\n return Promise.resolve(moduleFactory);\n }\n var compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);\n var compilerProviders = _mergeArrays(compilerOptions.map(function (o) { return o.providers; }));\n // In case there are no compiler providers, we just return the module factory as\n // there won't be any resource loader. This can happen with Ivy, because AOT compiled\n // modules can be still passed through \"bootstrapModule\". In that case we shouldn't\n // unnecessarily require the JIT compiler.\n if (compilerProviders.length === 0) {\n return Promise.resolve(moduleFactory);\n }\n var compiler = getCompilerFacade();\n var compilerInjector = Injector.create({ providers: compilerProviders });\n var resourceLoader = compilerInjector.get(compiler.ResourceLoader);\n // The resource loader can also return a string while the \"resolveComponentResources\"\n // always expects a promise. Therefore we need to wrap the returned value in a promise.\n return resolveComponentResources(function (url) { return Promise.resolve(resourceLoader.get(url)); })\n .then(function () { return moduleFactory; });\n }\n var isBoundToModule = isBoundToModule__PRE_R3__;\n function isBoundToModule__PRE_R3__(cf) {\n return cf instanceof ComponentFactoryBoundToModule;\n }\n function isBoundToModule__POST_R3__(cf) {\n return cf.isBoundToModule;\n }\n var ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');\n /**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @publicApi\n */\n var NgProbeToken = /** @class */ (function () {\n function NgProbeToken(name, token) {\n this.name = name;\n this.token = token;\n }\n return NgProbeToken;\n }());\n /**\n * Creates a platform.\n * Platforms have to be eagerly created via this function.\n *\n * @publicApi\n */\n function createPlatform(injector) {\n if (_platform && !_platform.destroyed &&\n !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n throw new Error('There can be only one platform. Destroy the previous one to create a new one.');\n }\n _platform = injector.get(PlatformRef);\n var inits = injector.get(PLATFORM_INITIALIZER, null);\n if (inits)\n inits.forEach(function (init) { return init(); });\n return _platform;\n }\n /**\n * Creates a factory for a platform\n *\n * @publicApi\n */\n function createPlatformFactory(parentPlatformFactory, name, providers) {\n if (providers === void 0) { providers = []; }\n var desc = \"Platform: \" + name;\n var marker = new InjectionToken(desc);\n return function (extraProviders) {\n if (extraProviders === void 0) { extraProviders = []; }\n var platform = getPlatform();\n if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n if (parentPlatformFactory) {\n parentPlatformFactory(providers.concat(extraProviders).concat({ provide: marker, useValue: true }));\n }\n else {\n var injectedProviders = providers.concat(extraProviders).concat({ provide: marker, useValue: true });\n createPlatform(Injector.create({ providers: injectedProviders, name: desc }));\n }\n }\n return assertPlatform(marker);\n };\n }\n /**\n * Checks that there currently is a platform which contains the given token as a provider.\n *\n * @publicApi\n */\n function assertPlatform(requiredToken) {\n var platform = getPlatform();\n if (!platform) {\n throw new Error('No platform exists!');\n }\n if (!platform.injector.get(requiredToken, null)) {\n throw new Error('A platform with a different configuration has been created. Please destroy it first.');\n }\n return platform;\n }\n /**\n * Destroy the existing platform.\n *\n * @publicApi\n */\n function destroyPlatform() {\n if (_platform && !_platform.destroyed) {\n _platform.destroy();\n }\n }\n /**\n * Returns the current platform.\n *\n * @publicApi\n */\n function getPlatform() {\n return _platform && !_platform.destroyed ? _platform : null;\n }\n /**\n * The Angular platform is the entry point for Angular on a web page. Each page\n * has exactly one platform, and services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n *\n * A page's platform is initialized implicitly when a platform is created via a platform factory\n * (e.g. {@link platformBrowser}), or explicitly by calling the {@link createPlatform} function.\n *\n * @publicApi\n */\n var PlatformRef = /** @class */ (function () {\n /** @internal */\n function PlatformRef(_injector) {\n this._injector = _injector;\n this._modules = [];\n this._destroyListeners = [];\n this._destroyed = false;\n }\n /**\n * Creates an instance of an `@NgModule` for the given platform\n * for offline compilation.\n *\n * @usageNotes\n * ### Simple Example\n *\n * ```typescript\n * my_module.ts:\n *\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * main.ts:\n * import {MyModuleNgFactory} from './my_module.ngfactory';\n * import {platformBrowser} from '@angular/platform-browser';\n *\n * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);\n * ```\n */\n PlatformRef.prototype.bootstrapModuleFactory = function (moduleFactory, options) {\n var _this = this;\n // Note: We need to create the NgZone _before_ we instantiate the module,\n // as instantiating the module creates some providers eagerly.\n // So we create a mini parent injector that just contains the new NgZone and\n // pass that as parent to the NgModuleFactory.\n var ngZoneOption = options ? options.ngZone : undefined;\n var ngZone = getNgZone(ngZoneOption);\n var providers = [{ provide: NgZone, useValue: ngZone }];\n // Attention: Don't use ApplicationRef.run here,\n // as we want to be sure that all possible constructor calls are inside `ngZone.run`!\n return ngZone.run(function () {\n var ngZoneInjector = Injector.create({ providers: providers, parent: _this.injector, name: moduleFactory.moduleType.name });\n var moduleRef = moduleFactory.create(ngZoneInjector);\n var exceptionHandler = moduleRef.injector.get(ErrorHandler, null);\n if (!exceptionHandler) {\n throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');\n }\n // If the `LOCALE_ID` provider is defined at bootstrap we set the value for runtime i18n (ivy)\n var localeId = moduleRef.injector.get(LOCALE_ID$1, DEFAULT_LOCALE_ID);\n setLocaleId(localeId);\n moduleRef.onDestroy(function () { return remove(_this._modules, moduleRef); });\n ngZone.runOutsideAngular(function () { return ngZone.onError.subscribe({ next: function (error) { exceptionHandler.handleError(error); } }); });\n return _callAndReportToErrorHandler(exceptionHandler, ngZone, function () {\n var initStatus = moduleRef.injector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n return initStatus.donePromise.then(function () {\n _this._moduleDoBootstrap(moduleRef);\n return moduleRef;\n });\n });\n });\n };\n /**\n * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.\n *\n * @usageNotes\n * ### Simple Example\n *\n * ```typescript\n * @NgModule({\n * imports: [BrowserModule]\n * })\n * class MyModule {}\n *\n * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n * ```\n *\n */\n PlatformRef.prototype.bootstrapModule = function (moduleType, compilerOptions) {\n var _this = this;\n if (compilerOptions === void 0) { compilerOptions = []; }\n var options = optionsReducer({}, compilerOptions);\n return compileNgModuleFactory(this.injector, options, moduleType)\n .then(function (moduleFactory) { return _this.bootstrapModuleFactory(moduleFactory, options); });\n };\n PlatformRef.prototype._moduleDoBootstrap = function (moduleRef) {\n var appRef = moduleRef.injector.get(ApplicationRef);\n if (moduleRef._bootstrapComponents.length > 0) {\n moduleRef._bootstrapComponents.forEach(function (f) { return appRef.bootstrap(f); });\n }\n else if (moduleRef.instance.ngDoBootstrap) {\n moduleRef.instance.ngDoBootstrap(appRef);\n }\n else {\n throw new Error(\"The module \" + stringify(moduleRef.instance.constructor) + \" was bootstrapped, but it does not declare \\\"@NgModule.bootstrap\\\" components nor a \\\"ngDoBootstrap\\\" method. \" +\n \"Please define one of these.\");\n }\n this._modules.push(moduleRef);\n };\n /**\n * Register a listener to be called when the platform is disposed.\n */\n PlatformRef.prototype.onDestroy = function (callback) { this._destroyListeners.push(callback); };\n Object.defineProperty(PlatformRef.prototype, \"injector\", {\n /**\n * Retrieve the platform {@link Injector}, which is the parent injector for\n * every Angular application on the page and provides singleton providers.\n */\n get: function () { return this._injector; },\n enumerable: true,\n configurable: true\n });\n /**\n * Destroy the Angular platform and all Angular applications on the page.\n */\n PlatformRef.prototype.destroy = function () {\n if (this._destroyed) {\n throw new Error('The platform has already been destroyed!');\n }\n this._modules.slice().forEach(function (module) { return module.destroy(); });\n this._destroyListeners.forEach(function (listener) { return listener(); });\n this._destroyed = true;\n };\n Object.defineProperty(PlatformRef.prototype, \"destroyed\", {\n get: function () { return this._destroyed; },\n enumerable: true,\n configurable: true\n });\n PlatformRef = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [Injector])\n ], PlatformRef);\n return PlatformRef;\n }());\n function getNgZone(ngZoneOption) {\n var ngZone;\n if (ngZoneOption === 'noop') {\n ngZone = new NoopNgZone();\n }\n else {\n ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) ||\n new NgZone({ enableLongStackTrace: isDevMode() });\n }\n return ngZone;\n }\n function _callAndReportToErrorHandler(errorHandler, ngZone, callback) {\n try {\n var result = callback();\n if (isPromise(result)) {\n return result.catch(function (e) {\n ngZone.runOutsideAngular(function () { return errorHandler.handleError(e); });\n // rethrow as the exception handler might not do it\n throw e;\n });\n }\n return result;\n }\n catch (e) {\n ngZone.runOutsideAngular(function () { return errorHandler.handleError(e); });\n // rethrow as the exception handler might not do it\n throw e;\n }\n }\n function optionsReducer(dst, objs) {\n if (Array.isArray(objs)) {\n dst = objs.reduce(optionsReducer, dst);\n }\n else {\n dst = __assign({}, dst, objs);\n }\n return dst;\n }\n /**\n * A reference to an Angular application running on a page.\n *\n * @usageNotes\n *\n * {@a is-stable-examples}\n * ### isStable examples and caveats\n *\n * Note two important points about `isStable`, demonstrated in the examples below:\n * - the application will never be stable if you start any kind\n * of recurrent asynchronous task when the application starts\n * (for example for a polling process, started with a `setInterval`, a `setTimeout`\n * or using RxJS operators like `interval`);\n * - the `isStable` Observable runs outside of the Angular zone.\n *\n * Let's imagine that you start a recurrent task\n * (here incrementing a counter, using RxJS `interval`),\n * and at the same time subscribe to `isStable`.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * filter(stable => stable)\n * ).subscribe(() => console.log('App is stable now');\n * interval(1000).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, `isStable` will never emit `true`,\n * and the trace \"App is stable now\" will never get logged.\n *\n * If you want to execute something when the app is stable,\n * you have to wait for the application to be stable\n * before starting your polling process.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * tap(stable => console.log('App is stable now')),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, the trace \"App is stable now\" will be logged\n * and then the counter starts incrementing every second.\n *\n * Note also that this Observable runs outside of the Angular zone,\n * which means that the code in the subscription\n * to this Observable will not trigger the change detection.\n *\n * Let's imagine that instead of logging the counter value,\n * you update a field of your component\n * and display it in its template.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => this.value = counter);\n * }\n * ```\n * As the `isStable` Observable runs outside the zone,\n * the `value` field will be updated properly,\n * but the template will not be refreshed!\n *\n * You'll have to manually trigger the change detection to update the template.\n *\n * ```\n * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => {\n * this.value = counter;\n * cd.detectChanges();\n * });\n * }\n * ```\n *\n * Or make the subscription callback run inside the zone.\n *\n * ```\n * constructor(appRef: ApplicationRef, zone: NgZone) {\n * appRef.isStable.pipe(\n * first(stable => stable),\n * switchMap(() => interval(1000))\n * ).subscribe(counter => zone.run(() => this.value = counter));\n * }\n * ```\n *\n * @publicApi\n */\n var ApplicationRef = /** @class */ (function () {\n /** @internal */\n function ApplicationRef(_zone, _console, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {\n var _this = this;\n this._zone = _zone;\n this._console = _console;\n this._injector = _injector;\n this._exceptionHandler = _exceptionHandler;\n this._componentFactoryResolver = _componentFactoryResolver;\n this._initStatus = _initStatus;\n this._bootstrapListeners = [];\n this._views = [];\n this._runningTick = false;\n this._enforceNoNewChanges = false;\n this._stable = true;\n /**\n * Get a list of component types registered to this application.\n * This list is populated even before the component is created.\n */\n this.componentTypes = [];\n /**\n * Get a list of components registered to this application.\n */\n this.components = [];\n this._enforceNoNewChanges = isDevMode();\n this._zone.onMicrotaskEmpty.subscribe({ next: function () { _this._zone.run(function () { _this.tick(); }); } });\n var isCurrentlyStable = new rxjs.Observable(function (observer) {\n _this._stable = _this._zone.isStable && !_this._zone.hasPendingMacrotasks &&\n !_this._zone.hasPendingMicrotasks;\n _this._zone.runOutsideAngular(function () {\n observer.next(_this._stable);\n observer.complete();\n });\n });\n var isStable = new rxjs.Observable(function (observer) {\n // Create the subscription to onStable outside the Angular Zone so that\n // the callback is run outside the Angular Zone.\n var stableSub;\n _this._zone.runOutsideAngular(function () {\n stableSub = _this._zone.onStable.subscribe(function () {\n NgZone.assertNotInAngularZone();\n // Check whether there are no pending macro/micro tasks in the next tick\n // to allow for NgZone to update the state.\n scheduleMicroTask(function () {\n if (!_this._stable && !_this._zone.hasPendingMacrotasks &&\n !_this._zone.hasPendingMicrotasks) {\n _this._stable = true;\n observer.next(true);\n }\n });\n });\n });\n var unstableSub = _this._zone.onUnstable.subscribe(function () {\n NgZone.assertInAngularZone();\n if (_this._stable) {\n _this._stable = false;\n _this._zone.runOutsideAngular(function () { observer.next(false); });\n }\n });\n return function () {\n stableSub.unsubscribe();\n unstableSub.unsubscribe();\n };\n });\n this.isStable =\n rxjs.merge(isCurrentlyStable, isStable.pipe(operators.share()));\n }\n ApplicationRef_1 = ApplicationRef;\n /**\n * Bootstrap a new component at the root level of the application.\n *\n * @usageNotes\n * ### Bootstrap process\n *\n * When bootstrapping a new root component into an application, Angular mounts the\n * specified application component onto DOM elements identified by the componentType's\n * selector and kicks off automatic change detection to finish initializing the component.\n *\n * Optionally, a component can be mounted onto a DOM element that does not match the\n * componentType's selector.\n *\n * ### Example\n * {@example core/ts/platform/platform.ts region='longform'}\n */\n ApplicationRef.prototype.bootstrap = function (componentOrFactory, rootSelectorOrNode) {\n var _this = this;\n if (!this._initStatus.done) {\n throw new Error('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');\n }\n var componentFactory;\n if (componentOrFactory instanceof ComponentFactory) {\n componentFactory = componentOrFactory;\n }\n else {\n componentFactory =\n this._componentFactoryResolver.resolveComponentFactory(componentOrFactory);\n }\n this.componentTypes.push(componentFactory.componentType);\n // Create a factory associated with the current module if it's not bound to some other\n var ngModule = isBoundToModule(componentFactory) ? null : this._injector.get(NgModuleRef);\n var selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n var compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n compRef.onDestroy(function () { _this._unloadComponent(compRef); });\n var testability = compRef.injector.get(Testability, null);\n if (testability) {\n compRef.injector.get(TestabilityRegistry)\n .registerApplication(compRef.location.nativeElement, testability);\n }\n this._loadComponent(compRef);\n if (isDevMode()) {\n this._console.log(\"Angular is running in the development mode. Call enableProdMode() to enable the production mode.\");\n }\n return compRef;\n };\n /**\n * Invoke this method to explicitly process change detection and its side-effects.\n *\n * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n * further changes are detected. If additional changes are picked up during this second cycle,\n * bindings in the app have side-effects that cannot be resolved in a single change detection\n * pass.\n * In this case, Angular throws an error, since an Angular application can only have one change\n * detection pass during which all change detection must complete.\n */\n ApplicationRef.prototype.tick = function () {\n var _this = this;\n var e_1, _a, e_2, _b;\n if (this._runningTick) {\n throw new Error('ApplicationRef.tick is called recursively');\n }\n var scope = ApplicationRef_1._tickScope();\n try {\n this._runningTick = true;\n try {\n for (var _c = __values(this._views), _d = _c.next(); !_d.done; _d = _c.next()) {\n var view = _d.value;\n view.detectChanges();\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (this._enforceNoNewChanges) {\n try {\n for (var _e = __values(this._views), _f = _e.next(); !_f.done; _f = _e.next()) {\n var view = _f.value;\n view.checkNoChanges();\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_b = _e.return)) _b.call(_e);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }\n catch (e) {\n // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n this._zone.runOutsideAngular(function () { return _this._exceptionHandler.handleError(e); });\n }\n finally {\n this._runningTick = false;\n wtfLeave(scope);\n }\n };\n /**\n * Attaches a view so that it will be dirty checked.\n * The view will be automatically detached when it is destroyed.\n * This will throw if the view is already attached to a ViewContainer.\n */\n ApplicationRef.prototype.attachView = function (viewRef) {\n var view = viewRef;\n this._views.push(view);\n view.attachToAppRef(this);\n };\n /**\n * Detaches a view from dirty checking again.\n */\n ApplicationRef.prototype.detachView = function (viewRef) {\n var view = viewRef;\n remove(this._views, view);\n view.detachFromAppRef();\n };\n ApplicationRef.prototype._loadComponent = function (componentRef) {\n this.attachView(componentRef.hostView);\n this.tick();\n this.components.push(componentRef);\n // Get the listeners lazily to prevent DI cycles.\n var listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);\n listeners.forEach(function (listener) { return listener(componentRef); });\n };\n ApplicationRef.prototype._unloadComponent = function (componentRef) {\n this.detachView(componentRef.hostView);\n remove(this.components, componentRef);\n };\n /** @internal */\n ApplicationRef.prototype.ngOnDestroy = function () {\n // TODO(alxhub): Dispose of the NgZone.\n this._views.slice().forEach(function (view) { return view.destroy(); });\n };\n Object.defineProperty(ApplicationRef.prototype, \"viewCount\", {\n /**\n * Returns the number of attached views.\n */\n get: function () { return this._views.length; },\n enumerable: true,\n configurable: true\n });\n var ApplicationRef_1;\n /** @internal */\n ApplicationRef._tickScope = wtfCreateScope('ApplicationRef#tick()');\n ApplicationRef = ApplicationRef_1 = __decorate([\n Injectable(),\n __metadata(\"design:paramtypes\", [NgZone, Console, Injector,\n ErrorHandler,\n ComponentFactoryResolver,\n ApplicationInitStatus])\n ], ApplicationRef);\n return ApplicationRef;\n }());\n function remove(list, el) {\n var index = list.indexOf(el);\n if (index > -1) {\n list.splice(index, 1);\n }\n }\n function _mergeArrays(parts) {\n var result = [];\n parts.forEach(function (part) { return part && result.push.apply(result, __spread(part)); });\n return result;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Used to load ng module factories.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `NgModuleFactoryLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\n var NgModuleFactoryLoader = /** @class */ (function () {\n function NgModuleFactoryLoader() {\n }\n return NgModuleFactoryLoader;\n }());\n function getModuleFactory__PRE_R3__(id) {\n var factory = getRegisteredNgModuleType(id);\n if (!factory)\n throw noModuleError(id);\n return factory;\n }\n function getModuleFactory__POST_R3__(id) {\n var type = getRegisteredNgModuleType(id);\n if (!type)\n throw noModuleError(id);\n return new NgModuleFactory$1(type);\n }\n /**\n * Returns the NgModuleFactory with the given id, if it exists and has been loaded.\n * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module\n * cannot be found.\n * @publicApi\n */\n var getModuleFactory = getModuleFactory__PRE_R3__;\n function noModuleError(id) {\n return new Error(\"No module with ID \" + id + \" loaded\");\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var SWITCH_IVY_ENABLED__POST_R3__ = true;\n var SWITCH_IVY_ENABLED__PRE_R3__ = false;\n var ivyEnabled = SWITCH_IVY_ENABLED__PRE_R3__;\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var _SEPARATOR = '#';\n var FACTORY_CLASS_SUFFIX = 'NgFactory';\n /**\n * Configuration for SystemJsNgModuleLoader.\n * token.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoaderConfig`\n * is part of its implementation. See `LoadChildren` for more details.\n */\n var SystemJsNgModuleLoaderConfig = /** @class */ (function () {\n function SystemJsNgModuleLoaderConfig() {\n }\n return SystemJsNgModuleLoaderConfig;\n }());\n var DEFAULT_CONFIG = {\n factoryPathPrefix: '',\n factoryPathSuffix: '.ngfactory',\n };\n /**\n * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\n var SystemJsNgModuleLoader = /** @class */ (function () {\n function SystemJsNgModuleLoader(_compiler, config) {\n this._compiler = _compiler;\n this._config = config || DEFAULT_CONFIG;\n }\n SystemJsNgModuleLoader.prototype.load = function (path) {\n var legacyOfflineMode = !ivyEnabled && this._compiler instanceof Compiler;\n return legacyOfflineMode ? this.loadFactory(path) : this.loadAndCompile(path);\n };\n SystemJsNgModuleLoader.prototype.loadAndCompile = function (path) {\n var _this = this;\n var _a = __read(path.split(_SEPARATOR), 2), module = _a[0], exportName = _a[1];\n if (exportName === undefined) {\n exportName = 'default';\n }\n return System.import(module)\n .then(function (module) { return module[exportName]; })\n .then(function (type) { return checkNotEmpty(type, module, exportName); })\n .then(function (type) { return _this._compiler.compileModuleAsync(type); });\n };\n SystemJsNgModuleLoader.prototype.loadFactory = function (path) {\n var _a = __read(path.split(_SEPARATOR), 2), module = _a[0], exportName = _a[1];\n var factoryClassSuffix = FACTORY_CLASS_SUFFIX;\n if (exportName === undefined) {\n exportName = 'default';\n factoryClassSuffix = '';\n }\n return System.import(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix)\n .then(function (module) { return module[exportName + factoryClassSuffix]; })\n .then(function (factory) { return checkNotEmpty(factory, module, exportName); });\n };\n SystemJsNgModuleLoader = __decorate([\n Injectable(),\n __param(1, Optional()),\n __metadata(\"design:paramtypes\", [Compiler, SystemJsNgModuleLoaderConfig])\n ], SystemJsNgModuleLoader);\n return SystemJsNgModuleLoader;\n }());\n function checkNotEmpty(value, modulePath, exportName) {\n if (!value) {\n throw new Error(\"Cannot find '\" + exportName + \"' in '\" + modulePath + \"'\");\n }\n return value;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * Represents an Angular [view](guide/glossary#view),\n * specifically the [host view](guide/glossary#view-tree) that is defined by a component.\n * Also serves as the base class\n * that adds destroy methods for [embedded views](guide/glossary#view-tree).\n *\n * @see `EmbeddedViewRef`\n *\n * @publicApi\n */\n var ViewRef$1 = /** @class */ (function (_super) {\n __extends(ViewRef, _super);\n function ViewRef() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ViewRef;\n }(ChangeDetectorRef));\n /**\n * Represents an Angular [view](guide/glossary#view) in a view container.\n * An [embedded view](guide/glossary#view-tree) can be referenced from a component\n * other than the hosting component whose template defines it, or it can be defined\n * independently by a `TemplateRef`.\n *\n * Properties of elements in a view can change, but the structure (number and order) of elements in\n * a view cannot. Change the structure of elements by inserting, moving, or\n * removing nested views in a view container.\n *\n * @see `ViewContainerRef`\n *\n * @usageNotes\n *\n * The following template breaks down into two separate `TemplateRef` instances,\n * an outer one and an inner one.\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <li *ngFor=\"let item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * This is the outer `TemplateRef`:\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * This is the inner `TemplateRef`:\n *\n * ```\n * <li>{{item}}</li>\n * ```\n *\n * The outer and inner `TemplateRef` instances are assembled into views as follows:\n *\n * ```\n * <!-- ViewRef: outer-0 -->\n * Count: 2\n * <ul>\n * <ng-template view-container-ref></ng-template>\n * <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->\n * <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->\n * </ul>\n * <!-- /ViewRef: outer-0 -->\n * ```\n * @publicApi\n */\n var EmbeddedViewRef = /** @class */ (function (_super) {\n __extends(EmbeddedViewRef, _super);\n function EmbeddedViewRef() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return EmbeddedViewRef;\n }(ViewRef$1));\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n /**\n * @publicApi\n */\n var DebugEventListener = /** @class */ (function () {\n function DebugEventListener(name, callback) {\n this.name = name;\n this.callback = callback;\n }\n return DebugEventListener;\n }());\n var DebugNode__PRE_R3__ = /** @class */ (function () {\n function DebugNode__PRE_R3__(nativeNode, parent, _debugContext) {\n this.listeners = [];\n this.parent = null;\n this._debugContext = _debugContext;\n this.nativeNode = nativeNode;\n if (parent && parent instanceof DebugElement__PRE_R3__) {\n parent.addChild(this);\n }\n }\n Object.defineProperty(DebugNode__PRE_R3__.prototype, \"injector\", {\n get: function () { return this._debugContext.injector; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__PRE_R3__.prototype, \"componentInstance\", {\n get: function () { return this._debugContext.component; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__PRE_R3__.prototype, \"context\", {\n get: function () { return this._debugContext.context; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__PRE_R3__.prototype, \"references\", {\n get: function () { return this._debugContext.references; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__PRE_R3__.prototype, \"providerTokens\", {\n get: function () { return this._debugContext.providerTokens; },\n enumerable: true,\n configurable: true\n });\n return DebugNode__PRE_R3__;\n }());\n var DebugElement__PRE_R3__ = /** @class */ (function (_super) {\n __extends(DebugElement__PRE_R3__, _super);\n function DebugElement__PRE_R3__(nativeNode, parent, _debugContext) {\n var _this = _super.call(this, nativeNode, parent, _debugContext) || this;\n _this.properties = {};\n _this.attributes = {};\n _this.classes = {};\n _this.styles = {};\n _this.childNodes = [];\n _this.nativeElement = nativeNode;\n return _this;\n }\n DebugElement__PRE_R3__.prototype.addChild = function (child) {\n if (child) {\n this.childNodes.push(child);\n child.parent = this;\n }\n };\n DebugElement__PRE_R3__.prototype.removeChild = function (child) {\n var childIndex = this.childNodes.indexOf(child);\n if (childIndex !== -1) {\n child.parent = null;\n this.childNodes.splice(childIndex, 1);\n }\n };\n DebugElement__PRE_R3__.prototype.insertChildrenAfter = function (child, newChildren) {\n var _this = this;\n var _a;\n var siblingIndex = this.childNodes.indexOf(child);\n if (siblingIndex !== -1) {\n (_a = this.childNodes).splice.apply(_a, __spread([siblingIndex + 1, 0], newChildren));\n newChildren.forEach(function (c) {\n if (c.parent) {\n c.parent.removeChild(c);\n }\n child.parent = _this;\n });\n }\n };\n DebugElement__PRE_R3__.prototype.insertBefore = function (refChild, newChild) {\n var refIndex = this.childNodes.indexOf(refChild);\n if (refIndex === -1) {\n this.addChild(newChild);\n }\n else {\n if (newChild.parent) {\n newChild.parent.removeChild(newChild);\n }\n newChild.parent = this;\n this.childNodes.splice(refIndex, 0, newChild);\n }\n };\n DebugElement__PRE_R3__.prototype.query = function (predicate) {\n var results = this.queryAll(predicate);\n return results[0] || null;\n };\n DebugElement__PRE_R3__.prototype.queryAll = function (predicate) {\n var matches = [];\n _queryElementChildren(this, predicate, matches);\n return matches;\n };\n DebugElement__PRE_R3__.prototype.queryAllNodes = function (predicate) {\n var matches = [];\n _queryNodeChildren(this, predicate, matches);\n return matches;\n };\n Object.defineProperty(DebugElement__PRE_R3__.prototype, \"children\", {\n get: function () {\n return this\n .childNodes //\n .filter(function (node) { return node instanceof DebugElement__PRE_R3__; });\n },\n enumerable: true,\n configurable: true\n });\n DebugElement__PRE_R3__.prototype.triggerEventHandler = function (eventName, eventObj) {\n this.listeners.forEach(function (listener) {\n if (listener.name == eventName) {\n listener.callback(eventObj);\n }\n });\n };\n return DebugElement__PRE_R3__;\n }(DebugNode__PRE_R3__));\n /**\n * @publicApi\n */\n function asNativeElements(debugEls) {\n return debugEls.map(function (el) { return el.nativeElement; });\n }\n function _queryElementChildren(element, predicate, matches) {\n element.childNodes.forEach(function (node) {\n if (node instanceof DebugElement__PRE_R3__) {\n if (predicate(node)) {\n matches.push(node);\n }\n _queryElementChildren(node, predicate, matches);\n }\n });\n }\n function _queryNodeChildren(parentNode, predicate, matches) {\n if (parentNode instanceof DebugElement__PRE_R3__) {\n parentNode.childNodes.forEach(function (node) {\n if (predicate(node)) {\n matches.push(node);\n }\n if (node instanceof DebugElement__PRE_R3__) {\n _queryNodeChildren(node, predicate, matches);\n }\n });\n }\n }\n var DebugNode__POST_R3__ = /** @class */ (function () {\n function DebugNode__POST_R3__(nativeNode) {\n this.nativeNode = nativeNode;\n }\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"parent\", {\n get: function () {\n var parent = this.nativeNode.parentNode;\n return parent ? new DebugElement__POST_R3__(parent) : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"injector\", {\n get: function () { return getInjector(this.nativeNode); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"componentInstance\", {\n get: function () {\n var nativeElement = this.nativeNode;\n return nativeElement &&\n (getComponent(nativeElement) || getViewComponent(nativeElement));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"context\", {\n get: function () { return getContext$1(this.nativeNode); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"listeners\", {\n get: function () {\n return getListeners(this.nativeNode).filter(isBrowserEvents);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"references\", {\n get: function () { return getLocalRefs(this.nativeNode); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode__POST_R3__.prototype, \"providerTokens\", {\n get: function () { return getInjectionTokens(this.nativeNode); },\n enumerable: true,\n configurable: true\n });\n return DebugNode__POST_R3__;\n }());\n var DebugElement__POST_R3__ = /** @class */ (function (_super) {\n __extends(DebugElement__POST_R3__, _super);\n function DebugElement__POST_R3__(nativeNode) {\n var _this = this;\n ngDevMode && assertDomNode(nativeNode);\n _this = _super.call(this, nativeNode) || this;\n return _this;\n }\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"nativeElement\", {\n get: function () {\n return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"name\", {\n get: function () { return this.nativeElement.nodeName; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"properties\", {\n /**\n * Gets a map of property names to property values for an element.\n *\n * This map includes:\n * - Regular property bindings (e.g. `[id]=\"id\"`)\n * - Host property bindings (e.g. `host: { '[id]': \"id\" }`)\n * - Interpolated property bindings (e.g. `id=\"{{ value }}\")\n *\n * It does not include:\n * - input property bindings (e.g. `[myCustomInput]=\"value\"`)\n * - attribute bindings (e.g. `[attr.role]=\"menu\"`)\n */\n get: function () {\n var context = loadLContext(this.nativeNode);\n var lView = context.lView;\n var tData = lView[TVIEW].data;\n var tNode = tData[context.nodeIndex];\n var properties = collectPropertyBindings(tNode, lView, tData);\n var hostProperties = collectHostPropertyBindings(tNode, lView, tData);\n var className = collectClassNames(this);\n var output = __assign({}, properties, hostProperties);\n if (className) {\n output['className'] = output['className'] ? output['className'] + (\" \" + className) : className;\n }\n return output;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"attributes\", {\n get: function () {\n var attributes = {};\n var element = this.nativeElement;\n if (!element) {\n return attributes;\n }\n var context = loadLContext(element);\n var lView = context.lView;\n var tNodeAttrs = lView[TVIEW].data[context.nodeIndex].attrs;\n var lowercaseTNodeAttrs = [];\n // For debug nodes we take the element's attribute directly from the DOM since it allows us\n // to account for ones that weren't set via bindings (e.g. ViewEngine keeps track of the ones\n // that are set through `Renderer2`). The problem is that the browser will lowercase all names,\n // however since we have the attributes already on the TNode, we can preserve the case by going\n // through them once, adding them to the `attributes` map and putting their lower-cased name\n // into an array. Afterwards when we're going through the native DOM attributes, we can check\n // whether we haven't run into an attribute already through the TNode.\n if (tNodeAttrs) {\n var i = 0;\n while (i < tNodeAttrs.length) {\n var attrName = tNodeAttrs[i];\n // Stop as soon as we hit a marker. We only care about the regular attributes. Everything\n // else will be handled below when we read the final attributes off the DOM.\n if (typeof attrName !== 'string')\n break;\n var attrValue = tNodeAttrs[i + 1];\n attributes[attrName] = attrValue;\n lowercaseTNodeAttrs.push(attrName.toLowerCase());\n i += 2;\n }\n }\n var eAttrs = element.attributes;\n for (var i = 0; i < eAttrs.length; i++) {\n var attr = eAttrs[i];\n // Make sure that we don't assign the same attribute both in its\n // case-sensitive form and the lower-cased one from the browser.\n if (lowercaseTNodeAttrs.indexOf(attr.name) === -1) {\n attributes[attr.name] = attr.value;\n }\n }\n return attributes;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"classes\", {\n get: function () {\n var classes = {};\n var element = this.nativeElement;\n if (element) {\n var lContext = loadLContextFromNode(element);\n var stylingContext = getStylingContextFromLView(lContext.nodeIndex, lContext.lView);\n if (stylingContext) {\n for (var i = 10 /* SingleStylesStartPosition */; i < stylingContext.length; i += 4 /* Size */) {\n if (isClassBasedValue(stylingContext, i)) {\n var className = getProp(stylingContext, i);\n var value = getValue(stylingContext, i);\n if (typeof value == 'boolean') {\n // we want to ignore `null` since those don't overwrite the values.\n classes[className] = value;\n }\n }\n }\n }\n else {\n // Fallback, just read DOM.\n var eClasses = element.classList;\n for (var i = 0; i < eClasses.length; i++) {\n classes[eClasses[i]] = true;\n }\n }\n }\n return classes;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"styles\", {\n get: function () {\n var styles = {};\n var element = this.nativeElement;\n if (element) {\n var lContext = loadLContextFromNode(element);\n var stylingContext = getStylingContextFromLView(lContext.nodeIndex, lContext.lView);\n if (stylingContext) {\n for (var i = 10 /* SingleStylesStartPosition */; i < stylingContext.length; i += 4 /* Size */) {\n if (!isClassBasedValue(stylingContext, i)) {\n var styleName = getProp(stylingContext, i);\n var value = getValue(stylingContext, i);\n if (value !== null) {\n // we want to ignore `null` since those don't overwrite the values.\n styles[styleName] = value;\n }\n }\n }\n }\n else {\n // Fallback, just read DOM.\n var eStyles = element.style;\n for (var i = 0; i < eStyles.length; i++) {\n var name_1 = eStyles.item(i);\n styles[name_1] = eStyles.getPropertyValue(name_1);\n }\n }\n }\n return styles;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"childNodes\", {\n get: function () {\n var childNodes = this.nativeNode.childNodes;\n var children = [];\n for (var i = 0; i < childNodes.length; i++) {\n var element = childNodes[i];\n children.push(getDebugNode__POST_R3__(element));\n }\n return children;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugElement__POST_R3__.prototype, \"children\", {\n get: function () {\n var nativeElement = this.nativeElement;\n if (!nativeElement)\n return [];\n var childNodes = nativeElement.children;\n var children = [];\n for (var i = 0; i < childNodes.length; i++) {\n var element = childNodes[i];\n children.push(getDebugNode__POST_R3__(element));\n }\n return children;\n },\n enumerable: true,\n configurable: true\n });\n DebugElement__POST_R3__.prototype.query = function (predicate) {\n var results = this.queryAll(predicate);\n return results[0] || null;\n };\n DebugElement__POST_R3__.prototype.queryAll = function (predicate) {\n var matches = [];\n _queryAllR3(this, predicate, matches, true);\n return matches;\n };\n DebugElement__POST_R3__.prototype.queryAllNodes = function (predicate) {\n var matches = [];\n _queryAllR3(this, predicate, matches, false);\n return matches;\n };\n DebugElement__POST_R3__.prototype.triggerEventHandler = function (eventName, eventObj) {\n this.listeners.forEach(function (listener) {\n if (listener.name === eventName) {\n listener.callback(eventObj);\n }\n });\n };\n return DebugElement__POST_R3__;\n }(DebugNode__POST_R3__));\n /**\n * Walk the TNode tree to find matches for the predicate.\n *\n * @param parentElement the element from which the walk is started\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n */\n function _queryAllR3(parentElement, predicate, matches, elementsOnly) {\n var context = loadLContext(parentElement.nativeNode);\n var parentTNode = context.lView[TVIEW].data[context.nodeIndex];\n _queryNodeChildrenR3(parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);\n }\n /**\n * Recursively match the current TNode against the predicate, and goes on with the next ones.\n *\n * @param tNode the current TNode\n * @param lView the LView of this TNode\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which prediccate shouold not be matched\n */\n function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {\n var e_1, _a;\n var nativeNode = getNativeByTNode(tNode, lView);\n // For each type of TNode, specific logic is executed.\n if (tNode.type === 3 /* Element */ || tNode.type === 4 /* ElementContainer */) {\n // Case 1: the TNode is an element\n // The native node has to be checked.\n _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n if (isComponent(tNode)) {\n // If the element is the host of a component, then all nodes in its view have to be processed.\n // Note: the component's content (tNode.child) will be processed from the insertion points.\n var componentView = getComponentViewByIndex(tNode.index, lView);\n if (componentView && componentView[TVIEW].firstChild) {\n _queryNodeChildrenR3(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else if (tNode.child) {\n // Otherwise, its children have to be processed.\n _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n // In all cases, if a dynamic container exists for this node, each view inside it has to be\n // processed.\n var nodeOrContainer = lView[tNode.index];\n if (isLContainer(nodeOrContainer)) {\n _queryNodeChildrenInContainerR3(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else if (tNode.type === 0 /* Container */) {\n // Case 2: the TNode is a container\n // The native node has to be checked.\n var lContainer = lView[tNode.index];\n _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);\n // Each view inside the container has to be processed.\n _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode);\n }\n else if (tNode.type === 1 /* Projection */) {\n // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).\n // The nodes projected at this location all need to be processed.\n var componentView = findComponentView(lView);\n var componentHost = componentView[T_HOST];\n var head = componentHost.projection[tNode.projection];\n if (Array.isArray(head)) {\n try {\n for (var head_1 = __values(head), head_1_1 = head_1.next(); !head_1_1.done; head_1_1 = head_1.next()) {\n var nativeNode_1 = head_1_1.value;\n _addQueryMatchR3(nativeNode_1, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (head_1_1 && !head_1_1.done && (_a = head_1.return)) _a.call(head_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else if (head) {\n var nextLView = componentView[PARENT];\n var nextTNode = nextLView[TVIEW].data[head.index];\n _queryNodeChildrenR3(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n else if (tNode.child) {\n // Case 4: the TNode is a view.\n _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n // We don't want to go to the next sibling of the root node.\n if (rootNativeNode !== nativeNode) {\n // To determine the next node to be processed, we need to use the next or the projectionNext\n // link, depending on whether the current node has been projected.\n var nextTNode = (tNode.flags & 2 /* isProjected */) ? tNode.projectionNext : tNode.next;\n if (nextTNode) {\n _queryNodeChildrenR3(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n }\n /**\n * Process all TNodes in a given container.\n *\n * @param lContainer the container to be processed\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which prediccate shouold not be matched\n */\n function _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode) {\n for (var i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n var childView = lContainer[i];\n _queryNodeChildrenR3(childView[TVIEW].node, childView, predicate, matches, elementsOnly, rootNativeNode);\n }\n }\n /**\n * Match the current native node against the predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which prediccate shouold not be matched\n */\n function _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {\n if (rootNativeNode !== nativeNode) {\n var debugNode = getDebugNode(nativeNode);\n if (debugNode && (elementsOnly ? debugNode instanceof DebugElement__POST_R3__ : true) &&\n predicate(debugNode)) {\n matches.push(debugNode);\n }\n }\n }\n /**\n * Iterates through the property bindings for a given node and generates\n * a map of property names to values. This map only contains property bindings\n * defined in templates, not in host bindings.\n */\n function collectPropertyBindings(tNode, lView, tData) {\n var properties = {};\n var bindingIndex = getFirstBindingIndex(tNode.propertyMetadataStartIndex, tData);\n while (bindingIndex < tNode.propertyMetadataEndIndex) {\n var value = void 0;\n var propMetadata = tData[bindingIndex];\n while (!isPropMetadataString(propMetadata)) {\n // This is the first value for an interpolation. We need to build up\n // the full interpolation by combining runtime values in LView with\n // the static interstitial values stored in TData.\n value = (value || '') + renderStringify(lView[bindingIndex]) + tData[bindingIndex];\n propMetadata = tData[++bindingIndex];\n }\n value = value === undefined ? lView[bindingIndex] : value += lView[bindingIndex];\n // Property metadata string has 3 parts: property name, prefix, and suffix\n var metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n var propertyName = metadataParts[0];\n // Attr bindings don't have property names and should be skipped\n if (propertyName) {\n // Wrap value with prefix and suffix (will be '' for normal bindings), if they're defined.\n // Avoid wrapping for normal bindings so that the value doesn't get cast to a string.\n properties[propertyName] = (metadataParts[1] && metadataParts[2]) ?\n metadataParts[1] + value + metadataParts[2] :\n value;\n }\n bindingIndex++;\n }\n return properties;\n }\n /**\n * Retrieves the first binding index that holds values for this property\n * binding.\n *\n * For normal bindings (e.g. `[id]=\"id\"`), the binding index is the\n * same as the metadata index. For interpolations (e.g. `id=\"{{id}}-{{name}}\"`),\n * there can be multiple binding values, so we might have to loop backwards\n * from the metadata index until we find the first one.\n *\n * @param metadataIndex The index of the first property metadata string for\n * this node.\n * @param tData The data array for the current TView\n * @returns The first binding index for this binding\n */\n function getFirstBindingIndex(metadataIndex, tData) {\n var currentBindingIndex = metadataIndex - 1;\n // If the slot before the metadata holds a string, we know that this\n // metadata applies to an interpolation with at least 2 bindings, and\n // we need to search further to access the first binding value.\n var currentValue = tData[currentBindingIndex];\n // We need to iterate until we hit either a:\n // - TNode (it is an element slot marking the end of `consts` section), OR a\n // - metadata string (slot is attribute metadata or a previous node's property metadata)\n while (typeof currentValue === 'string' && !isPropMetadataString(currentValue)) {\n currentValue = tData[--currentBindingIndex];\n }\n return currentBindingIndex + 1;\n }\n function collectHostPropertyBindings(tNode, lView, tData) {\n var properties = {};\n // Host binding values for a node are stored after directives on that node\n var hostPropIndex = tNode.directiveEnd;\n var propMetadata = tData[hostPropIndex];\n // When we reach a value in TView.data that is not a string, we know we've\n // hit the next node's providers and directives and should stop copying data.\n while (typeof propMetadata === 'string') {\n var propertyName = propMetadata.split(INTERPOLATION_DELIMITER)[0];\n properties[propertyName] = lView[hostPropIndex];\n propMetadata = tData[++hostPropIndex];\n }\n return properties;\n }\n function collectClassNames(debugElement) {\n var e_2, _a;\n var classes = debugElement.classes;\n var output = '';\n try {\n for (var _b = __values(Object.keys(classes)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var className = _c.value;\n if (classes[className]) {\n output = output ? output + (\" \" + className) : className;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return output;\n }\n // Need to keep the nodes in a global Map so that multiple angular apps are supported.\n var _nativeNodeToDebugNode = new Map();\n function getDebugNode__PRE_R3__(nativeNode) {\n return _nativeNodeToDebugNode.get(nativeNode) || null;\n }\n var NG_DEBUG_PROPERTY = '__ng_debug__';\n function getDebugNode__POST_R3__(nativeNode) {\n if (nativeNode instanceof Node) {\n if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {\n nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?\n new DebugElement__POST_R3__(nativeNode) :\n new DebugNode__POST_R3__(nativeNode);\n }\n return nativeNode[NG_DEBUG_PROPERTY];\n }\n return null;\n }\n /**\n * @publicApi\n */\n var getDebugNode = getDebugNode__PRE_R3__;\n function indexDebugNode(node) {\n _nativeNodeToDebugNode.set(node.nativeNode, node);\n }\n function removeDebugNodeFromIndex(node) {\n _nativeNodeToDebugNode.delete(node.nativeNode);\n }\n /**\n * @publicApi\n */\n var DebugNode = DebugNode__PRE_R3__;\n /**\n * @publicApi\n */\n var DebugElement = DebugElement__PRE_R3__;\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var _CORE_PLATFORM_PROVIDERS = [\n // Set a default platform name for platforms that don't set it explicitly.\n { provide: PLATFORM_ID, useValue: 'unknown' },\n { provide: PlatformRef, deps: [Injector] },\n { provide: TestabilityRegistry, deps: [] },\n { provide: Console, deps: [] },\n ];\n /**\n * This platform has to be included in any other platform\n *\n * @publicApi\n */\n var platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function _iterableDiffersFactory() {\n return defaultIterableDiffers;\n }\n function _keyValueDiffersFactory() {\n return defaultKeyValueDiffers;\n }\n function _localeFactory(locale) {\n return locale || 'en-US';\n }\n /**\n * A built-in [dependency injection token](guide/glossary#di-token)\n * that is used to configure the root injector for bootstrapping.\n */\n var APPLICATION_MODULE_PROVIDERS = [\n {\n provide: ApplicationRef,\n useClass: ApplicationRef,\n deps: [NgZone, Console, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus]\n },\n { provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory },\n {\n provide: ApplicationInitStatus,\n useClass: ApplicationInitStatus,\n deps: [[new Optional(), APP_INITIALIZER]]\n },\n { provide: Compiler, useClass: Compiler, deps: [] },\n APP_ID_RANDOM_PROVIDER,\n { provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: [] },\n { provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: [] },\n {\n provide: LOCALE_ID$1,\n useFactory: _localeFactory,\n deps: [[new Inject(LOCALE_ID$1), new Optional(), new SkipSelf()]]\n },\n ];\n /**\n * Schedule work at next available slot.\n *\n * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped\n * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.\n * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.\n *\n * @param ngZone NgZone to use for scheduling.\n */\n function zoneSchedulerFactory(ngZone) {\n var queue = [];\n ngZone.onStable.subscribe(function () {\n while (queue.length) {\n queue.pop()();\n }\n });\n return function (fn) { queue.push(fn); };\n }\n /**\n * Configures the root injector for an app with\n * providers of `@angular/core` dependencies that `ApplicationRef` needs\n * to bootstrap components.\n *\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * @publicApi\n */\n var ApplicationModule = /** @class */ (function () {\n // Inject ApplicationRef to make it eager...\n function ApplicationModule(appRef) {\n }\n ApplicationModule = __decorate([\n NgModule({ providers: APPLICATION_MODULE_PROVIDERS }),\n __metadata(\"design:paramtypes\", [ApplicationRef])\n ], ApplicationModule);\n return ApplicationModule;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function anchorDef(flags, matchedQueriesDsl, ngContentIndex, childCount, handleEvent, templateFactory) {\n flags |= 1 /* TypeElement */;\n var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;\n var template = templateFactory ? resolveDefinition(templateFactory) : null;\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n flags: flags,\n checkIndex: -1,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references, ngContentIndex: ngContentIndex, childCount: childCount,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: {\n ns: null,\n name: null,\n attrs: null, template: template,\n componentProvider: null,\n componentView: null,\n componentRendererType: null,\n publicProviders: null,\n allProviders: null,\n handleEvent: handleEvent || NOOP\n },\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n }\n function elementDef(checkIndex, flags, matchedQueriesDsl, ngContentIndex, childCount, namespaceAndName, fixedAttrs, bindings, outputs, handleEvent, componentView, componentRendererType) {\n var _a;\n if (fixedAttrs === void 0) { fixedAttrs = []; }\n if (!handleEvent) {\n handleEvent = NOOP;\n }\n var _b = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _b.matchedQueries, references = _b.references, matchedQueryIds = _b.matchedQueryIds;\n var ns = null;\n var name = null;\n if (namespaceAndName) {\n _a = __read(splitNamespace(namespaceAndName), 2), ns = _a[0], name = _a[1];\n }\n bindings = bindings || [];\n var bindingDefs = new Array(bindings.length);\n for (var i = 0; i < bindings.length; i++) {\n var _c = __read(bindings[i], 3), bindingFlags = _c[0], namespaceAndName_1 = _c[1], suffixOrSecurityContext = _c[2];\n var _d = __read(splitNamespace(namespaceAndName_1), 2), ns_1 = _d[0], name_1 = _d[1];\n var securityContext = undefined;\n var suffix = undefined;\n switch (bindingFlags & 15 /* Types */) {\n case 4 /* TypeElementStyle */:\n suffix = suffixOrSecurityContext;\n break;\n case 1 /* TypeElementAttribute */:\n case 8 /* TypeProperty */:\n securityContext = suffixOrSecurityContext;\n break;\n }\n bindingDefs[i] =\n { flags: bindingFlags, ns: ns_1, name: name_1, nonMinifiedName: name_1, securityContext: securityContext, suffix: suffix };\n }\n outputs = outputs || [];\n var outputDefs = new Array(outputs.length);\n for (var i = 0; i < outputs.length; i++) {\n var _e = __read(outputs[i], 2), target = _e[0], eventName = _e[1];\n outputDefs[i] = {\n type: 0 /* ElementOutput */,\n target: target, eventName: eventName,\n propName: null\n };\n }\n fixedAttrs = fixedAttrs || [];\n var attrs = fixedAttrs.map(function (_a) {\n var _b = __read(_a, 2), namespaceAndName = _b[0], value = _b[1];\n var _c = __read(splitNamespace(namespaceAndName), 2), ns = _c[0], name = _c[1];\n return [ns, name, value];\n });\n componentRendererType = resolveRendererType2(componentRendererType);\n if (componentView) {\n flags |= 33554432 /* ComponentView */;\n }\n flags |= 1 /* TypeElement */;\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: checkIndex,\n flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references, ngContentIndex: ngContentIndex, childCount: childCount,\n bindings: bindingDefs,\n bindingFlags: calcBindingFlags(bindingDefs),\n outputs: outputDefs,\n element: {\n ns: ns,\n name: name,\n attrs: attrs,\n template: null,\n // will bet set by the view definition\n componentProvider: null,\n componentView: componentView || null,\n componentRendererType: componentRendererType,\n publicProviders: null,\n allProviders: null,\n handleEvent: handleEvent || NOOP,\n },\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n }\n function createElement(view, renderHost, def) {\n var elDef = def.element;\n var rootSelectorOrNode = view.root.selectorOrNode;\n var renderer = view.renderer;\n var el;\n if (view.parent || !rootSelectorOrNode) {\n if (elDef.name) {\n el = renderer.createElement(elDef.name, elDef.ns);\n }\n else {\n el = renderer.createComment('');\n }\n var parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, el);\n }\n }\n else {\n // when using native Shadow DOM, do not clear the root element contents to allow slot projection\n var preserveContent = (!!elDef.componentRendererType &&\n elDef.componentRendererType.encapsulation === exports.ViewEncapsulation.ShadowDom);\n el = renderer.selectRootElement(rootSelectorOrNode, preserveContent);\n }\n if (elDef.attrs) {\n for (var i = 0; i < elDef.attrs.length; i++) {\n var _a = __read(elDef.attrs[i], 3), ns = _a[0], name_2 = _a[1], value = _a[2];\n renderer.setAttribute(el, name_2, value, ns);\n }\n }\n return el;\n }\n function listenToElementOutputs(view, compView, def, el) {\n for (var i = 0; i < def.outputs.length; i++) {\n var output = def.outputs[i];\n var handleEventClosure = renderEventHandlerClosure(view, def.nodeIndex, elementEventFullName(output.target, output.eventName));\n var listenTarget = output.target;\n var listenerView = view;\n if (output.target === 'component') {\n listenTarget = null;\n listenerView = compView;\n }\n var disposable = listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure);\n view.disposables[def.outputIndex + i] = disposable;\n }\n }\n function renderEventHandlerClosure(view, index, eventName) {\n return function (event) { return dispatchEvent(view, index, eventName, event); };\n }\n function checkAndUpdateElementInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var bindLen = def.bindings.length;\n var changed = false;\n if (bindLen > 0 && checkAndUpdateElementValue(view, def, 0, v0))\n changed = true;\n if (bindLen > 1 && checkAndUpdateElementValue(view, def, 1, v1))\n changed = true;\n if (bindLen > 2 && checkAndUpdateElementValue(view, def, 2, v2))\n changed = true;\n if (bindLen > 3 && checkAndUpdateElementValue(view, def, 3, v3))\n changed = true;\n if (bindLen > 4 && checkAndUpdateElementValue(view, def, 4, v4))\n changed = true;\n if (bindLen > 5 && checkAndUpdateElementValue(view, def, 5, v5))\n changed = true;\n if (bindLen > 6 && checkAndUpdateElementValue(view, def, 6, v6))\n changed = true;\n if (bindLen > 7 && checkAndUpdateElementValue(view, def, 7, v7))\n changed = true;\n if (bindLen > 8 && checkAndUpdateElementValue(view, def, 8, v8))\n changed = true;\n if (bindLen > 9 && checkAndUpdateElementValue(view, def, 9, v9))\n changed = true;\n return changed;\n }\n function checkAndUpdateElementDynamic(view, def, values) {\n var changed = false;\n for (var i = 0; i < values.length; i++) {\n if (checkAndUpdateElementValue(view, def, i, values[i]))\n changed = true;\n }\n return changed;\n }\n function checkAndUpdateElementValue(view, def, bindingIdx, value) {\n if (!checkAndUpdateBinding(view, def, bindingIdx, value)) {\n return false;\n }\n var binding = def.bindings[bindingIdx];\n var elData = asElementData(view, def.nodeIndex);\n var renderNode = elData.renderElement;\n var name = binding.name;\n switch (binding.flags & 15 /* Types */) {\n case 1 /* TypeElementAttribute */:\n setElementAttribute(view, binding, renderNode, binding.ns, name, value);\n break;\n case 2 /* TypeElementClass */:\n setElementClass(view, renderNode, name, value);\n break;\n case 4 /* TypeElementStyle */:\n setElementStyle(view, binding, renderNode, name, value);\n break;\n case 8 /* TypeProperty */:\n var bindView = (def.flags & 33554432 /* ComponentView */ &&\n binding.flags & 32 /* SyntheticHostProperty */) ?\n elData.componentView :\n view;\n setElementProperty(bindView, binding, renderNode, name, value);\n break;\n }\n return true;\n }\n function setElementAttribute(view, binding, renderNode, ns, name, value) {\n var securityContext = binding.securityContext;\n var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n renderValue = renderValue != null ? renderValue.toString() : null;\n var renderer = view.renderer;\n if (value != null) {\n renderer.setAttribute(renderNode, name, renderValue, ns);\n }\n else {\n renderer.removeAttribute(renderNode, name, ns);\n }\n }\n function setElementClass(view, renderNode, name, value) {\n var renderer = view.renderer;\n if (value) {\n renderer.addClass(renderNode, name);\n }\n else {\n renderer.removeClass(renderNode, name);\n }\n }\n function setElementStyle(view, binding, renderNode, name, value) {\n var renderValue = view.root.sanitizer.sanitize(exports.SecurityContext.STYLE, value);\n if (renderValue != null) {\n renderValue = renderValue.toString();\n var unit = binding.suffix;\n if (unit != null) {\n renderValue = renderValue + unit;\n }\n }\n else {\n renderValue = null;\n }\n var renderer = view.renderer;\n if (renderValue != null) {\n renderer.setStyle(renderNode, name, renderValue);\n }\n else {\n renderer.removeStyle(renderNode, name);\n }\n }\n function setElementProperty(view, binding, renderNode, name, value) {\n var securityContext = binding.securityContext;\n var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n view.renderer.setProperty(renderNode, name, renderValue);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function queryDef(flags, id, bindings) {\n var bindingDefs = [];\n for (var propName in bindings) {\n var bindingType = bindings[propName];\n bindingDefs.push({ propName: propName, bindingType: bindingType });\n }\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n // TODO(vicb): check\n checkIndex: -1, flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n ngContentIndex: -1,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n childCount: 0,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: { id: id, filterId: filterQueryId(id), bindings: bindingDefs },\n ngContent: null\n };\n }\n function createQuery() {\n return new QueryList();\n }\n function dirtyParentQueries(view) {\n var queryIds = view.def.nodeMatchedQueries;\n while (view.parent && isEmbeddedView(view)) {\n var tplDef = view.parentNodeDef;\n view = view.parent;\n // content queries\n var end = tplDef.nodeIndex + tplDef.childCount;\n for (var i = 0; i <= end; i++) {\n var nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & 67108864 /* TypeContentQuery */) &&\n (nodeDef.flags & 536870912 /* DynamicQuery */) &&\n (nodeDef.query.filterId & queryIds) === nodeDef.query.filterId) {\n asQueryList(view, i).setDirty();\n }\n if ((nodeDef.flags & 1 /* TypeElement */ && i + nodeDef.childCount < tplDef.nodeIndex) ||\n !(nodeDef.childFlags & 67108864 /* TypeContentQuery */) ||\n !(nodeDef.childFlags & 536870912 /* DynamicQuery */)) {\n // skip elements that don't contain the template element or no query.\n i += nodeDef.childCount;\n }\n }\n }\n // view queries\n if (view.def.nodeFlags & 134217728 /* TypeViewQuery */) {\n for (var i = 0; i < view.def.nodes.length; i++) {\n var nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & 134217728 /* TypeViewQuery */) && (nodeDef.flags & 536870912 /* DynamicQuery */)) {\n asQueryList(view, i).setDirty();\n }\n // only visit the root nodes\n i += nodeDef.childCount;\n }\n }\n }\n function checkAndUpdateQuery(view, nodeDef) {\n var queryList = asQueryList(view, nodeDef.nodeIndex);\n if (!queryList.dirty) {\n return;\n }\n var directiveInstance;\n var newValues = undefined;\n if (nodeDef.flags & 67108864 /* TypeContentQuery */) {\n var elementDef = nodeDef.parent.parent;\n newValues = calcQueryValues(view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, nodeDef.query, []);\n directiveInstance = asProviderData(view, nodeDef.parent.nodeIndex).instance;\n }\n else if (nodeDef.flags & 134217728 /* TypeViewQuery */) {\n newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query, []);\n directiveInstance = view.component;\n }\n queryList.reset(newValues);\n var bindings = nodeDef.query.bindings;\n var notify = false;\n for (var i = 0; i < bindings.length; i++) {\n var binding = bindings[i];\n var boundValue = void 0;\n switch (binding.bindingType) {\n case 0 /* First */:\n boundValue = queryList.first;\n break;\n case 1 /* All */:\n boundValue = queryList;\n notify = true;\n break;\n }\n directiveInstance[binding.propName] = boundValue;\n }\n if (notify) {\n queryList.notifyOnChanges();\n }\n }\n function calcQueryValues(view, startIndex, endIndex, queryDef, values) {\n for (var i = startIndex; i <= endIndex; i++) {\n var nodeDef = view.def.nodes[i];\n var valueType = nodeDef.matchedQueries[queryDef.id];\n if (valueType != null) {\n values.push(getQueryValue(view, nodeDef, valueType));\n }\n if (nodeDef.flags & 1 /* TypeElement */ && nodeDef.element.template &&\n (nodeDef.element.template.nodeMatchedQueries & queryDef.filterId) ===\n queryDef.filterId) {\n var elementData = asElementData(view, i);\n // check embedded views that were attached at the place of their template,\n // but process child nodes first if some match the query (see issue #16568)\n if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) {\n calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values);\n i += nodeDef.childCount;\n }\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n var embeddedViews = elementData.viewContainer._embeddedViews;\n for (var k = 0; k < embeddedViews.length; k++) {\n var embeddedView = embeddedViews[k];\n var dvc = declaredViewContainer(embeddedView);\n if (dvc && dvc === elementData) {\n calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n var projectedViews = elementData.template._projectedViews;\n if (projectedViews) {\n for (var k = 0; k < projectedViews.length; k++) {\n var projectedView = projectedViews[k];\n calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n if ((nodeDef.childMatchedQueries & queryDef.filterId) !== queryDef.filterId) {\n // if no child matches the query, skip the children.\n i += nodeDef.childCount;\n }\n }\n return values;\n }\n function getQueryValue(view, nodeDef, queryValueType) {\n if (queryValueType != null) {\n // a match\n switch (queryValueType) {\n case 1 /* RenderElement */:\n return asElementData(view, nodeDef.nodeIndex).renderElement;\n case 0 /* ElementRef */:\n return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement);\n case 2 /* TemplateRef */:\n return asElementData(view, nodeDef.nodeIndex).template;\n case 3 /* ViewContainerRef */:\n return asElementData(view, nodeDef.nodeIndex).viewContainer;\n case 4 /* Provider */:\n return asProviderData(view, nodeDef.nodeIndex).instance;\n }\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function ngContentDef(ngContentIndex, index) {\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: -1,\n flags: 8 /* TypeNgContent */,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {}, ngContentIndex: ngContentIndex,\n childCount: 0,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: null,\n ngContent: { index: index }\n };\n }\n function appendNgContent(view, renderHost, def) {\n var parentEl = getParentRenderElement(view, renderHost, def);\n if (!parentEl) {\n // Nothing to do if there is no parent element.\n return;\n }\n var ngContentIndex = def.ngContent.index;\n visitProjectedRenderNodes(view, ngContentIndex, 1 /* AppendChild */, parentEl, null, undefined);\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function purePipeDef(checkIndex, argCount) {\n // argCount + 1 to include the pipe as first arg\n return _pureExpressionDef(128 /* TypePurePipe */, checkIndex, new Array(argCount + 1));\n }\n function pureArrayDef(checkIndex, argCount) {\n return _pureExpressionDef(32 /* TypePureArray */, checkIndex, new Array(argCount));\n }\n function pureObjectDef(checkIndex, propToIndex) {\n var keys = Object.keys(propToIndex);\n var nbKeys = keys.length;\n var propertyNames = new Array(nbKeys);\n for (var i = 0; i < nbKeys; i++) {\n var key = keys[i];\n var index = propToIndex[key];\n propertyNames[index] = key;\n }\n return _pureExpressionDef(64 /* TypePureObject */, checkIndex, propertyNames);\n }\n function _pureExpressionDef(flags, checkIndex, propertyNames) {\n var bindings = new Array(propertyNames.length);\n for (var i = 0; i < propertyNames.length; i++) {\n var prop = propertyNames[i];\n bindings[i] = {\n flags: 8 /* TypeProperty */,\n name: prop,\n ns: null,\n nonMinifiedName: prop,\n securityContext: null,\n suffix: null\n };\n }\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: checkIndex,\n flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n ngContentIndex: -1,\n childCount: 0, bindings: bindings,\n bindingFlags: calcBindingFlags(bindings),\n outputs: [],\n element: null,\n provider: null,\n text: null,\n query: null,\n ngContent: null\n };\n }\n function createPureExpression(view, def) {\n return { value: undefined };\n }\n function checkAndUpdatePureExpressionInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var bindings = def.bindings;\n var changed = false;\n var bindLen = bindings.length;\n if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0))\n changed = true;\n if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1))\n changed = true;\n if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2))\n changed = true;\n if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3))\n changed = true;\n if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4))\n changed = true;\n if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5))\n changed = true;\n if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6))\n changed = true;\n if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7))\n changed = true;\n if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8))\n changed = true;\n if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9))\n changed = true;\n if (changed) {\n var data = asPureExpressionData(view, def.nodeIndex);\n var value = void 0;\n switch (def.flags & 201347067 /* Types */) {\n case 32 /* TypePureArray */:\n value = new Array(bindings.length);\n if (bindLen > 0)\n value[0] = v0;\n if (bindLen > 1)\n value[1] = v1;\n if (bindLen > 2)\n value[2] = v2;\n if (bindLen > 3)\n value[3] = v3;\n if (bindLen > 4)\n value[4] = v4;\n if (bindLen > 5)\n value[5] = v5;\n if (bindLen > 6)\n value[6] = v6;\n if (bindLen > 7)\n value[7] = v7;\n if (bindLen > 8)\n value[8] = v8;\n if (bindLen > 9)\n value[9] = v9;\n break;\n case 64 /* TypePureObject */:\n value = {};\n if (bindLen > 0)\n value[bindings[0].name] = v0;\n if (bindLen > 1)\n value[bindings[1].name] = v1;\n if (bindLen > 2)\n value[bindings[2].name] = v2;\n if (bindLen > 3)\n value[bindings[3].name] = v3;\n if (bindLen > 4)\n value[bindings[4].name] = v4;\n if (bindLen > 5)\n value[bindings[5].name] = v5;\n if (bindLen > 6)\n value[bindings[6].name] = v6;\n if (bindLen > 7)\n value[bindings[7].name] = v7;\n if (bindLen > 8)\n value[bindings[8].name] = v8;\n if (bindLen > 9)\n value[bindings[9].name] = v9;\n break;\n case 128 /* TypePurePipe */:\n var pipe = v0;\n switch (bindLen) {\n case 1:\n value = pipe.transform(v0);\n break;\n case 2:\n value = pipe.transform(v1);\n break;\n case 3:\n value = pipe.transform(v1, v2);\n break;\n case 4:\n value = pipe.transform(v1, v2, v3);\n break;\n case 5:\n value = pipe.transform(v1, v2, v3, v4);\n break;\n case 6:\n value = pipe.transform(v1, v2, v3, v4, v5);\n break;\n case 7:\n value = pipe.transform(v1, v2, v3, v4, v5, v6);\n break;\n case 8:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7);\n break;\n case 9:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8);\n break;\n case 10:\n value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9);\n break;\n }\n break;\n }\n data.value = value;\n }\n return changed;\n }\n function checkAndUpdatePureExpressionDynamic(view, def, values) {\n var bindings = def.bindings;\n var changed = false;\n for (var i = 0; i < values.length; i++) {\n // Note: We need to loop over all values, so that\n // the old values are updates as well!\n if (checkAndUpdateBinding(view, def, i, values[i])) {\n changed = true;\n }\n }\n if (changed) {\n var data = asPureExpressionData(view, def.nodeIndex);\n var value = void 0;\n switch (def.flags & 201347067 /* Types */) {\n case 32 /* TypePureArray */:\n value = values;\n break;\n case 64 /* TypePureObject */:\n value = {};\n for (var i = 0; i < values.length; i++) {\n value[bindings[i].name] = values[i];\n }\n break;\n case 128 /* TypePurePipe */:\n var pipe = values[0];\n var params = values.slice(1);\n value = pipe.transform.apply(pipe, __spread(params));\n break;\n }\n data.value = value;\n }\n return changed;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function textDef(checkIndex, ngContentIndex, staticText) {\n var bindings = new Array(staticText.length - 1);\n for (var i = 1; i < staticText.length; i++) {\n bindings[i - 1] = {\n flags: 8 /* TypeProperty */,\n name: null,\n ns: null,\n nonMinifiedName: null,\n securityContext: null,\n suffix: staticText[i],\n };\n }\n return {\n // will bet set by the view definition\n nodeIndex: -1,\n parent: null,\n renderParent: null,\n bindingIndex: -1,\n outputIndex: -1,\n // regular values\n checkIndex: checkIndex,\n flags: 2 /* TypeText */,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {}, ngContentIndex: ngContentIndex,\n childCount: 0, bindings: bindings,\n bindingFlags: 8 /* TypeProperty */,\n outputs: [],\n element: null,\n provider: null,\n text: { prefix: staticText[0] },\n query: null,\n ngContent: null,\n };\n }\n function createText(view, renderHost, def) {\n var renderNode;\n var renderer = view.renderer;\n renderNode = renderer.createText(def.text.prefix);\n var parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, renderNode);\n }\n return { renderText: renderNode };\n }\n function checkAndUpdateTextInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var changed = false;\n var bindings = def.bindings;\n var bindLen = bindings.length;\n if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0))\n changed = true;\n if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1))\n changed = true;\n if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2))\n changed = true;\n if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3))\n changed = true;\n if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4))\n changed = true;\n if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5))\n changed = true;\n if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6))\n changed = true;\n if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7))\n changed = true;\n if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8))\n changed = true;\n if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9))\n changed = true;\n if (changed) {\n var value = def.text.prefix;\n if (bindLen > 0)\n value += _addInterpolationPart(v0, bindings[0]);\n if (bindLen > 1)\n value += _addInterpolationPart(v1, bindings[1]);\n if (bindLen > 2)\n value += _addInterpolationPart(v2, bindings[2]);\n if (bindLen > 3)\n value += _addInterpolationPart(v3, bindings[3]);\n if (bindLen > 4)\n value += _addInterpolationPart(v4, bindings[4]);\n if (bindLen > 5)\n value += _addInterpolationPart(v5, bindings[5]);\n if (bindLen > 6)\n value += _addInterpolationPart(v6, bindings[6]);\n if (bindLen > 7)\n value += _addInterpolationPart(v7, bindings[7]);\n if (bindLen > 8)\n value += _addInterpolationPart(v8, bindings[8]);\n if (bindLen > 9)\n value += _addInterpolationPart(v9, bindings[9]);\n var renderNode = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode, value);\n }\n return changed;\n }\n function checkAndUpdateTextDynamic(view, def, values) {\n var bindings = def.bindings;\n var changed = false;\n for (var i = 0; i < values.length; i++) {\n // Note: We need to loop over all values, so that\n // the old values are updates as well!\n if (checkAndUpdateBinding(view, def, i, values[i])) {\n changed = true;\n }\n }\n if (changed) {\n var value = '';\n for (var i = 0; i < values.length; i++) {\n value = value + _addInterpolationPart(values[i], bindings[i]);\n }\n value = def.text.prefix + value;\n var renderNode = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode, value);\n }\n return changed;\n }\n function _addInterpolationPart(value, binding) {\n var valueStr = value != null ? value.toString() : '';\n return valueStr + binding.suffix;\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function viewDef(flags, nodes, updateDirectives, updateRenderer) {\n // clone nodes and set auto calculated values\n var viewBindingCount = 0;\n var viewDisposableCount = 0;\n var viewNodeFlags = 0;\n var viewRootNodeFlags = 0;\n var viewMatchedQueries = 0;\n var currentParent = null;\n var currentRenderParent = null;\n var currentElementHasPublicProviders = false;\n var currentElementHasPrivateProviders = false;\n var lastRenderRootNode = null;\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n node.nodeIndex = i;\n node.parent = currentParent;\n node.bindingIndex = viewBindingCount;\n node.outputIndex = viewDisposableCount;\n node.renderParent = currentRenderParent;\n viewNodeFlags |= node.flags;\n viewMatchedQueries |= node.matchedQueryIds;\n if (node.element) {\n var elDef = node.element;\n elDef.publicProviders =\n currentParent ? currentParent.element.publicProviders : Object.create(null);\n elDef.allProviders = elDef.publicProviders;\n // Note: We assume that all providers of an element are before any child element!\n currentElementHasPublicProviders = false;\n currentElementHasPrivateProviders = false;\n if (node.element.template) {\n viewMatchedQueries |= node.element.template.nodeMatchedQueries;\n }\n }\n validateNode(currentParent, node, nodes.length);\n viewBindingCount += node.bindings.length;\n viewDisposableCount += node.outputs.length;\n if (!currentRenderParent && (node.flags & 3 /* CatRenderNode */)) {\n lastRenderRootNode = node;\n }\n if (node.flags & 20224 /* CatProvider */) {\n if (!currentElementHasPublicProviders) {\n currentElementHasPublicProviders = true;\n // Use prototypical inheritance to not get O(n^2) complexity...\n currentParent.element.publicProviders =\n Object.create(currentParent.element.publicProviders);\n currentParent.element.allProviders = currentParent.element.publicProviders;\n }\n var isPrivateService = (node.flags & 8192 /* PrivateProvider */) !== 0;\n var isComponent = (node.flags & 32768 /* Component */) !== 0;\n if (!isPrivateService || isComponent) {\n currentParent.element.publicProviders[tokenKey(node.provider.token)] = node;\n }\n else {\n if (!currentElementHasPrivateProviders) {\n currentElementHasPrivateProviders = true;\n // Use prototypical inheritance to not get O(n^2) complexity...\n currentParent.element.allProviders =\n Object.create(currentParent.element.publicProviders);\n }\n currentParent.element.allProviders[tokenKey(node.provider.token)] = node;\n }\n if (isComponent) {\n currentParent.element.componentProvider = node;\n }\n }\n if (currentParent) {\n currentParent.childFlags |= node.flags;\n currentParent.directChildFlags |= node.flags;\n currentParent.childMatchedQueries |= node.matchedQueryIds;\n if (node.element && node.element.template) {\n currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;\n }\n }\n else {\n viewRootNodeFlags |= node.flags;\n }\n if (node.childCount > 0) {\n currentParent = node;\n if (!isNgContainer(node)) {\n currentRenderParent = node;\n }\n }\n else {\n // When the current node has no children, check if it is the last children of its parent.\n // When it is, propagate the flags up.\n // The loop is required because an element could be the last transitive children of several\n // elements. We loop to either the root or the highest opened element (= with remaining\n // children)\n while (currentParent && i === currentParent.nodeIndex + currentParent.childCount) {\n var newParent = currentParent.parent;\n if (newParent) {\n newParent.childFlags |= currentParent.childFlags;\n newParent.childMatchedQueries |= currentParent.childMatchedQueries;\n }\n currentParent = newParent;\n // We also need to update the render parent & account for ng-container\n if (currentParent && isNgContainer(currentParent)) {\n currentRenderParent = currentParent.renderParent;\n }\n else {\n currentRenderParent = currentParent;\n }\n }\n }\n }\n var handleEvent = function (view, nodeIndex, eventName, event) {\n return nodes[nodeIndex].element.handleEvent(view, eventName, event);\n };\n return {\n // Will be filled later...\n factory: null,\n nodeFlags: viewNodeFlags,\n rootNodeFlags: viewRootNodeFlags,\n nodeMatchedQueries: viewMatchedQueries, flags: flags,\n nodes: nodes,\n updateDirectives: updateDirectives || NOOP,\n updateRenderer: updateRenderer || NOOP, handleEvent: handleEvent,\n bindingCount: viewBindingCount,\n outputCount: viewDisposableCount, lastRenderRootNode: lastRenderRootNode\n };\n }\n function isNgContainer(node) {\n return (node.flags & 1 /* TypeElement */) !== 0 && node.element.name === null;\n }\n function validateNode(parent, node, nodeCount) {\n var template = node.element && node.element.template;\n if (template) {\n if (!template.lastRenderRootNode) {\n throw new Error(\"Illegal State: Embedded templates without nodes are not allowed!\");\n }\n if (template.lastRenderRootNode &&\n template.lastRenderRootNode.flags & 16777216 /* EmbeddedViews */) {\n throw new Error(\"Illegal State: Last root node of a template can't have embedded views, at index \" + node.nodeIndex + \"!\");\n }\n }\n if (node.flags & 20224 /* CatProvider */) {\n var parentFlags = parent ? parent.flags : 0;\n if ((parentFlags & 1 /* TypeElement */) === 0) {\n throw new Error(\"Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index \" + node.nodeIndex + \"!\");\n }\n }\n if (node.query) {\n if (node.flags & 67108864 /* TypeContentQuery */ &&\n (!parent || (parent.flags & 16384 /* TypeDirective */) === 0)) {\n throw new Error(\"Illegal State: Content Query nodes need to be children of directives, at index \" + node.nodeIndex + \"!\");\n }\n if (node.flags & 134217728 /* TypeViewQuery */ && parent) {\n throw new Error(\"Illegal State: View Query nodes have to be top level nodes, at index \" + node.nodeIndex + \"!\");\n }\n }\n if (node.childCount) {\n var parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1;\n if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) {\n throw new Error(\"Illegal State: childCount of node leads outside of parent, at index \" + node.nodeIndex + \"!\");\n }\n }\n }\n function createEmbeddedView(parent, anchorDef, viewDef, context) {\n // embedded views are seen as siblings to the anchor, so we need\n // to get the parent of the anchor and use it as parentIndex.\n var view = createView(parent.root, parent.renderer, parent, anchorDef, viewDef);\n initView(view, parent.component, context);\n createViewNodes(view);\n return view;\n }\n function createRootView(root, def, context) {\n var view = createView(root, root.renderer, null, null, def);\n initView(view, context, context);\n createViewNodes(view);\n return view;\n }\n function createComponentView(parentView, nodeDef, viewDef, hostElement) {\n var rendererType = nodeDef.element.componentRendererType;\n var compRenderer;\n if (!rendererType) {\n compRenderer = parentView.root.renderer;\n }\n else {\n compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType);\n }\n return createView(parentView.root, compRenderer, parentView, nodeDef.element.componentProvider, viewDef);\n }\n function createView(root, renderer, parent, parentNodeDef, def) {\n var nodes = new Array(def.nodes.length);\n var disposables = def.outputCount ? new Array(def.outputCount) : null;\n var view = {\n def: def,\n parent: parent,\n viewContainerParent: null, parentNodeDef: parentNodeDef,\n context: null,\n component: null, nodes: nodes,\n state: 13 /* CatInit */, root: root, renderer: renderer,\n oldValues: new Array(def.bindingCount), disposables: disposables,\n initIndex: -1\n };\n return view;\n }\n function initView(view, component, context) {\n view.component = component;\n view.context = context;\n }\n function createViewNodes(view) {\n var renderHost;\n if (isComponentView(view)) {\n var hostDef = view.parentNodeDef;\n renderHost = asElementData(view.parent, hostDef.parent.nodeIndex).renderElement;\n }\n var def = view.def;\n var nodes = view.nodes;\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n Services.setCurrentNode(view, i);\n var nodeData = void 0;\n switch (nodeDef.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n var el = createElement(view, renderHost, nodeDef);\n var componentView = undefined;\n if (nodeDef.flags & 33554432 /* ComponentView */) {\n var compViewDef = resolveDefinition(nodeDef.element.componentView);\n componentView = Services.createComponentView(view, nodeDef, compViewDef, el);\n }\n listenToElementOutputs(view, componentView, nodeDef, el);\n nodeData = {\n renderElement: el,\n componentView: componentView,\n viewContainer: null,\n template: nodeDef.element.template ? createTemplateData(view, nodeDef) : undefined\n };\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData);\n }\n break;\n case 2 /* TypeText */:\n nodeData = createText(view, renderHost, nodeDef);\n break;\n case 512 /* TypeClassProvider */:\n case 1024 /* TypeFactoryProvider */:\n case 2048 /* TypeUseExistingProvider */:\n case 256 /* TypeValueProvider */: {\n nodeData = nodes[i];\n if (!nodeData && !(nodeDef.flags & 4096 /* LazyProvider */)) {\n var instance = createProviderInstance(view, nodeDef);\n nodeData = { instance: instance };\n }\n break;\n }\n case 16 /* TypePipe */: {\n var instance = createPipeInstance(view, nodeDef);\n nodeData = { instance: instance };\n break;\n }\n case 16384 /* TypeDirective */: {\n nodeData = nodes[i];\n if (!nodeData) {\n var instance = createDirectiveInstance(view, nodeDef);\n nodeData = { instance: instance };\n }\n if (nodeDef.flags & 32768 /* Component */) {\n var compView = asElementData(view, nodeDef.parent.nodeIndex).componentView;\n initView(compView, nodeData.instance, nodeData.instance);\n }\n break;\n }\n case 32 /* TypePureArray */:\n case 64 /* TypePureObject */:\n case 128 /* TypePurePipe */:\n nodeData = createPureExpression(view, nodeDef);\n break;\n case 67108864 /* TypeContentQuery */:\n case 134217728 /* TypeViewQuery */:\n nodeData = createQuery();\n break;\n case 8 /* TypeNgContent */:\n appendNgContent(view, renderHost, nodeDef);\n // no runtime data needed for NgContent...\n nodeData = undefined;\n break;\n }\n nodes[i] = nodeData;\n }\n // Create the ViewData.nodes of component views after we created everything else,\n // so that e.g. ng-content works\n execComponentViewsAction(view, ViewAction.CreateViewNodes);\n // fill static content and view queries\n execQueriesAction(view, 67108864 /* TypeContentQuery */ | 134217728 /* TypeViewQuery */, 268435456 /* StaticQuery */, 0 /* CheckAndUpdate */);\n }\n function checkNoChangesView(view) {\n markProjectedViewsForCheck(view);\n Services.updateDirectives(view, 1 /* CheckNoChanges */);\n execEmbeddedViewsAction(view, ViewAction.CheckNoChanges);\n Services.updateRenderer(view, 1 /* CheckNoChanges */);\n execComponentViewsAction(view, ViewAction.CheckNoChanges);\n // Note: We don't check queries for changes as we didn't do this in v2.x.\n // TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message.\n view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */);\n }\n function checkAndUpdateView(view) {\n if (view.state & 1 /* BeforeFirstCheck */) {\n view.state &= ~1 /* BeforeFirstCheck */;\n view.state |= 2 /* FirstCheck */;\n }\n else {\n view.state &= ~2 /* FirstCheck */;\n }\n shiftInitState(view, 0 /* InitState_BeforeInit */, 256 /* InitState_CallingOnInit */);\n markProjectedViewsForCheck(view);\n Services.updateDirectives(view, 0 /* CheckAndUpdate */);\n execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate);\n execQueriesAction(view, 67108864 /* TypeContentQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */);\n var callInit = shiftInitState(view, 256 /* InitState_CallingOnInit */, 512 /* InitState_CallingAfterContentInit */);\n callLifecycleHooksChildrenFirst(view, 2097152 /* AfterContentChecked */ | (callInit ? 1048576 /* AfterContentInit */ : 0));\n Services.updateRenderer(view, 0 /* CheckAndUpdate */);\n execComponentViewsAction(view, ViewAction.CheckAndUpdate);\n execQueriesAction(view, 134217728 /* TypeViewQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */);\n callInit = shiftInitState(view, 512 /* InitState_CallingAfterContentInit */, 768 /* InitState_CallingAfterViewInit */);\n callLifecycleHooksChildrenFirst(view, 8388608 /* AfterViewChecked */ | (callInit ? 4194304 /* AfterViewInit */ : 0));\n if (view.def.flags & 2 /* OnPush */) {\n view.state &= ~8 /* ChecksEnabled */;\n }\n view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */);\n shiftInitState(view, 768 /* InitState_CallingAfterViewInit */, 1024 /* InitState_AfterInit */);\n }\n function checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n if (argStyle === 0 /* Inline */) {\n return checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n }\n else {\n return checkAndUpdateNodeDynamic(view, nodeDef, v0);\n }\n }\n function markProjectedViewsForCheck(view) {\n var def = view.def;\n if (!(def.nodeFlags & 4 /* ProjectedTemplate */)) {\n return;\n }\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 4 /* ProjectedTemplate */) {\n var projectedViews = asElementData(view, i).template._projectedViews;\n if (projectedViews) {\n for (var i_1 = 0; i_1 < projectedViews.length; i_1++) {\n var projectedView = projectedViews[i_1];\n projectedView.state |= 32 /* CheckProjectedView */;\n markParentViewsForCheckProjectedViews(projectedView, view);\n }\n }\n }\n else if ((nodeDef.childFlags & 4 /* ProjectedTemplate */) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n }\n function checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n switch (nodeDef.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case 2 /* TypeText */:\n return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case 16384 /* TypeDirective */:\n return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n case 32 /* TypePureArray */:\n case 64 /* TypePureObject */:\n case 128 /* TypePurePipe */:\n return checkAndUpdatePureExpressionInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n default:\n throw 'unreachable';\n }\n }\n function checkAndUpdateNodeDynamic(view, nodeDef, values) {\n switch (nodeDef.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n return checkAndUpdateElementDynamic(view, nodeDef, values);\n case 2 /* TypeText */:\n return checkAndUpdateTextDynamic(view, nodeDef, values);\n case 16384 /* TypeDirective */:\n return checkAndUpdateDirectiveDynamic(view, nodeDef, values);\n case 32 /* TypePureArray */:\n case 64 /* TypePureObject */:\n case 128 /* TypePurePipe */:\n return checkAndUpdatePureExpressionDynamic(view, nodeDef, values);\n default:\n throw 'unreachable';\n }\n }\n function checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n if (argStyle === 0 /* Inline */) {\n checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n }\n else {\n checkNoChangesNodeDynamic(view, nodeDef, v0);\n }\n // Returning false is ok here as we would have thrown in case of a change.\n return false;\n }\n function checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var bindLen = nodeDef.bindings.length;\n if (bindLen > 0)\n checkBindingNoChanges(view, nodeDef, 0, v0);\n if (bindLen > 1)\n checkBindingNoChanges(view, nodeDef, 1, v1);\n if (bindLen > 2)\n checkBindingNoChanges(view, nodeDef, 2, v2);\n if (bindLen > 3)\n checkBindingNoChanges(view, nodeDef, 3, v3);\n if (bindLen > 4)\n checkBindingNoChanges(view, nodeDef, 4, v4);\n if (bindLen > 5)\n checkBindingNoChanges(view, nodeDef, 5, v5);\n if (bindLen > 6)\n checkBindingNoChanges(view, nodeDef, 6, v6);\n if (bindLen > 7)\n checkBindingNoChanges(view, nodeDef, 7, v7);\n if (bindLen > 8)\n checkBindingNoChanges(view, nodeDef, 8, v8);\n if (bindLen > 9)\n checkBindingNoChanges(view, nodeDef, 9, v9);\n }\n function checkNoChangesNodeDynamic(view, nodeDef, values) {\n for (var i = 0; i < values.length; i++) {\n checkBindingNoChanges(view, nodeDef, i, values[i]);\n }\n }\n /**\n * Workaround https://github.com/angular/tsickle/issues/497\n * @suppress {misplacedTypeAnnotation}\n */\n function checkNoChangesQuery(view, nodeDef) {\n var queryList = asQueryList(view, nodeDef.nodeIndex);\n if (queryList.dirty) {\n throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, nodeDef.nodeIndex), \"Query \" + nodeDef.query.id + \" not dirty\", \"Query \" + nodeDef.query.id + \" dirty\", (view.state & 1 /* BeforeFirstCheck */) !== 0);\n }\n }\n function destroyView(view) {\n if (view.state & 128 /* Destroyed */) {\n return;\n }\n execEmbeddedViewsAction(view, ViewAction.Destroy);\n execComponentViewsAction(view, ViewAction.Destroy);\n callLifecycleHooksChildrenFirst(view, 131072 /* OnDestroy */);\n if (view.disposables) {\n for (var i = 0; i < view.disposables.length; i++) {\n view.disposables[i]();\n }\n }\n detachProjectedView(view);\n if (view.renderer.destroyNode) {\n destroyViewNodes(view);\n }\n if (isComponentView(view)) {\n view.renderer.destroy();\n }\n view.state |= 128 /* Destroyed */;\n }\n function destroyViewNodes(view) {\n var len = view.def.nodes.length;\n for (var i = 0; i < len; i++) {\n var def = view.def.nodes[i];\n if (def.flags & 1 /* TypeElement */) {\n view.renderer.destroyNode(asElementData(view, i).renderElement);\n }\n else if (def.flags & 2 /* TypeText */) {\n view.renderer.destroyNode(asTextData(view, i).renderText);\n }\n else if (def.flags & 67108864 /* TypeContentQuery */ || def.flags & 134217728 /* TypeViewQuery */) {\n asQueryList(view, i).destroy();\n }\n }\n }\n var ViewAction;\n (function (ViewAction) {\n ViewAction[ViewAction[\"CreateViewNodes\"] = 0] = \"CreateViewNodes\";\n ViewAction[ViewAction[\"CheckNoChanges\"] = 1] = \"CheckNoChanges\";\n ViewAction[ViewAction[\"CheckNoChangesProjectedViews\"] = 2] = \"CheckNoChangesProjectedViews\";\n ViewAction[ViewAction[\"CheckAndUpdate\"] = 3] = \"CheckAndUpdate\";\n ViewAction[ViewAction[\"CheckAndUpdateProjectedViews\"] = 4] = \"CheckAndUpdateProjectedViews\";\n ViewAction[ViewAction[\"Destroy\"] = 5] = \"Destroy\";\n })(ViewAction || (ViewAction = {}));\n function execComponentViewsAction(view, action) {\n var def = view.def;\n if (!(def.nodeFlags & 33554432 /* ComponentView */)) {\n return;\n }\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 33554432 /* ComponentView */) {\n // a leaf\n callViewAction(asElementData(view, i).componentView, action);\n }\n else if ((nodeDef.childFlags & 33554432 /* ComponentView */) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n }\n function execEmbeddedViewsAction(view, action) {\n var def = view.def;\n if (!(def.nodeFlags & 16777216 /* EmbeddedViews */)) {\n return;\n }\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n // a leaf\n var embeddedViews = asElementData(view, i).viewContainer._embeddedViews;\n for (var k = 0; k < embeddedViews.length; k++) {\n callViewAction(embeddedViews[k], action);\n }\n }\n else if ((nodeDef.childFlags & 16777216 /* EmbeddedViews */) === 0) {\n // a parent with leafs\n // no child is a component,\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n }\n function callViewAction(view, action) {\n var viewState = view.state;\n switch (action) {\n case ViewAction.CheckNoChanges:\n if ((viewState & 128 /* Destroyed */) === 0) {\n if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) {\n checkNoChangesView(view);\n }\n else if (viewState & 64 /* CheckProjectedViews */) {\n execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews);\n }\n }\n break;\n case ViewAction.CheckNoChangesProjectedViews:\n if ((viewState & 128 /* Destroyed */) === 0) {\n if (viewState & 32 /* CheckProjectedView */) {\n checkNoChangesView(view);\n }\n else if (viewState & 64 /* CheckProjectedViews */) {\n execProjectedViewsAction(view, action);\n }\n }\n break;\n case ViewAction.CheckAndUpdate:\n if ((viewState & 128 /* Destroyed */) === 0) {\n if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) {\n checkAndUpdateView(view);\n }\n else if (viewState & 64 /* CheckProjectedViews */) {\n execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews);\n }\n }\n break;\n case ViewAction.CheckAndUpdateProjectedViews:\n if ((viewState & 128 /* Destroyed */) === 0) {\n if (viewState & 32 /* CheckProjectedView */) {\n checkAndUpdateView(view);\n }\n else if (viewState & 64 /* CheckProjectedViews */) {\n execProjectedViewsAction(view, action);\n }\n }\n break;\n case ViewAction.Destroy:\n // Note: destroyView recurses over all views,\n // so we don't need to special case projected views here.\n destroyView(view);\n break;\n case ViewAction.CreateViewNodes:\n createViewNodes(view);\n break;\n }\n }\n function execProjectedViewsAction(view, action) {\n execEmbeddedViewsAction(view, action);\n execComponentViewsAction(view, action);\n }\n function execQueriesAction(view, queryFlags, staticDynamicQueryFlag, checkType) {\n if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) {\n return;\n }\n var nodeCount = view.def.nodes.length;\n for (var i = 0; i < nodeCount; i++) {\n var nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & queryFlags) && (nodeDef.flags & staticDynamicQueryFlag)) {\n Services.setCurrentNode(view, nodeDef.nodeIndex);\n switch (checkType) {\n case 0 /* CheckAndUpdate */:\n checkAndUpdateQuery(view, nodeDef);\n break;\n case 1 /* CheckNoChanges */:\n checkNoChangesQuery(view, nodeDef);\n break;\n }\n }\n if (!(nodeDef.childFlags & queryFlags) || !(nodeDef.childFlags & staticDynamicQueryFlag)) {\n // no child has a matching query\n // then skip the children\n i += nodeDef.childCount;\n }\n }\n }\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n var initialized = false;\n function initServicesIfNeeded() {\n if (initialized) {\n return;\n }\n initialized = true;\n var services = isDevMode() ? createDebugServices() : createProdServices();\n Services.setCurrentNode = services.setCurrentNode;\n Services.createRootView = services.createRootView;\n Services.createEmbeddedView = services.createEmbeddedView;\n Services.createComponentView = services.createComponentView;\n Services.createNgModuleRef = services.createNgModuleRef;\n Services.overrideProvider = services.overrideProvider;\n Services.overrideComponentView = services.overrideComponentView;\n Services.clearOverrides = services.clearOverrides;\n Services.checkAndUpdateView = services.checkAndUpdateView;\n Services.checkNoChangesView = services.checkNoChangesView;\n Services.destroyView = services.destroyView;\n Services.resolveDep = resolveDep;\n Services.createDebugContext = services.createDebugContext;\n Services.handleEvent = services.handleEvent;\n Services.updateDirectives = services.updateDirectives;\n Services.updateRenderer = services.updateRenderer;\n Services.dirtyParentQueries = dirtyParentQueries;\n }\n function createProdServices() {\n return {\n setCurrentNode: function () { },\n createRootView: createProdRootView,\n createEmbeddedView: createEmbeddedView,\n createComponentView: createComponentView,\n createNgModuleRef: createNgModuleRef,\n overrideProvider: NOOP,\n overrideComponentView: NOOP,\n clearOverrides: NOOP,\n checkAndUpdateView: checkAndUpdateView,\n checkNoChangesView: checkNoChangesView,\n destroyView: destroyView,\n createDebugContext: function (view, nodeIndex) { return new DebugContext_(view, nodeIndex); },\n handleEvent: function (view, nodeIndex, eventName, event) {\n return view.def.handleEvent(view, nodeIndex, eventName, event);\n },\n updateDirectives: function (view, checkType) { return view.def.updateDirectives(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :\n prodCheckNoChangesNode, view); },\n updateRenderer: function (view, checkType) { return view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :\n prodCheckNoChangesNode, view); },\n };\n }\n function createDebugServices() {\n return {\n setCurrentNode: debugSetCurrentNode,\n createRootView: debugCreateRootView,\n createEmbeddedView: debugCreateEmbeddedView,\n createComponentView: debugCreateComponentView,\n createNgModuleRef: debugCreateNgModuleRef,\n overrideProvider: debugOverrideProvider,\n overrideComponentView: debugOverrideComponentView,\n clearOverrides: debugClearOverrides,\n checkAndUpdateView: debugCheckAndUpdateView,\n checkNoChangesView: debugCheckNoChangesView,\n destroyView: debugDestroyView,\n createDebugContext: function (view, nodeIndex) { return new DebugContext_(view, nodeIndex); },\n handleEvent: debugHandleEvent,\n updateDirectives: debugUpdateDirectives,\n updateRenderer: debugUpdateRenderer,\n };\n }\n function createProdRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {\n var rendererFactory = ngModule.injector.get(RendererFactory2);\n return createRootView(createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode), def, context);\n }\n function debugCreateRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {\n var rendererFactory = ngModule.injector.get(RendererFactory2);\n var root = createRootData(elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes, rootSelectorOrNode);\n var defWithOverride = applyProviderOverridesToView(def);\n return callWithDebugContext(DebugAction.create, createRootView, null, [root, defWithOverride, context]);\n }\n function createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode) {\n var sanitizer = ngModule.injector.get(Sanitizer);\n var errorHandler = ngModule.injector.get(ErrorHandler);\n var renderer = rendererFactory.createRenderer(null, null);\n return {\n ngModule: ngModule,\n injector: elInjector, projectableNodes: projectableNodes,\n selectorOrNode: rootSelectorOrNode, sanitizer: sanitizer, rendererFactory: rendererFactory, renderer: renderer, errorHandler: errorHandler\n };\n }\n function debugCreateEmbeddedView(parentView, anchorDef, viewDef, context) {\n var defWithOverride = applyProviderOverridesToView(viewDef);\n return callWithDebugContext(DebugAction.create, createEmbeddedView, null, [parentView, anchorDef, defWithOverride, context]);\n }\n function debugCreateComponentView(parentView, nodeDef, viewDef, hostElement) {\n var overrideComponentView = viewDefOverrides.get(nodeDef.element.componentProvider.provider.token);\n if (overrideComponentView) {\n viewDef = overrideComponentView;\n }\n else {\n viewDef = applyProviderOverridesToView(viewDef);\n }\n return callWithDebugContext(DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef, hostElement]);\n }\n function debugCreateNgModuleRef(moduleType, parentInjector, bootstrapComponents, def) {\n var defWithOverride = applyProviderOverridesToNgModule(def);\n return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);\n }\n var providerOverrides = new Map();\n var providerOverridesWithScope = new Map();\n var viewDefOverrides = new Map();\n function debugOverrideProvider(override) {\n providerOverrides.set(override.token, override);\n var injectableDef;\n if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) &&\n typeof injectableDef.providedIn === 'function') {\n providerOverridesWithScope.set(override.token, override);\n }\n }\n function debugOverrideComponentView(comp, compFactory) {\n var hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));\n var compViewDef = resolveDefinition(hostViewDef.nodes[0].element.componentView);\n viewDefOverrides.set(comp, compViewDef);\n }\n function debugClearOverrides() {\n providerOverrides.clear();\n providerOverridesWithScope.clear();\n viewDefOverrides.clear();\n }\n // Notes about the algorithm:\n // 1) Locate the providers of an element and check if one of them was overwritten\n // 2) Change the providers of that element\n //\n // We only create new datastructures if we need to, to keep perf impact\n // reasonable.\n function applyProviderOverridesToView(def) {\n if (providerOverrides.size === 0) {\n return def;\n }\n var elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def);\n if (elementIndicesWithOverwrittenProviders.length === 0) {\n return def;\n }\n // clone the whole view definition,\n // as it maintains references between the nodes that are hard to update.\n def = def.factory(function () { return NOOP; });\n for (var i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {\n applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);\n }\n return def;\n function findElementIndicesWithOverwrittenProviders(def) {\n var elIndicesWithOverwrittenProviders = [];\n var lastElementDef = null;\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 1 /* TypeElement */) {\n lastElementDef = nodeDef;\n }\n if (lastElementDef && nodeDef.flags & 3840 /* CatProviderNoDirective */ &&\n providerOverrides.has(nodeDef.provider.token)) {\n elIndicesWithOverwrittenProviders.push(lastElementDef.nodeIndex);\n lastElementDef = null;\n }\n }\n return elIndicesWithOverwrittenProviders;\n }\n function applyProviderOverridesToElement(viewDef, elIndex) {\n for (var i = elIndex + 1; i < viewDef.nodes.length; i++) {\n var nodeDef = viewDef.nodes[i];\n if (nodeDef.flags & 1 /* TypeElement */) {\n // stop at the next element\n return;\n }\n if (nodeDef.flags & 3840 /* CatProviderNoDirective */) {\n var provider = nodeDef.provider;\n var override = providerOverrides.get(provider.token);\n if (override) {\n nodeDef.flags = (nodeDef.flags & ~3840 /* CatProviderNoDirective */) | override.flags;\n provider.deps = splitDepsDsl(override.deps);\n provider.value = override.value;\n }\n }\n }\n }\n }\n // Notes about the algorithm:\n // We only create new datastructures if we need to, to keep perf impact\n // reasonable.\n function applyProviderOverridesToNgModule(def) {\n var _a = calcHasOverrides(def), hasOverrides = _a.hasOverrides, hasDeprecatedOverrides = _a.hasDeprecatedOverrides;\n if (!hasOverrides) {\n return def;\n }\n // clone the whole view definition,\n // as it maintains references between the nodes that are hard to update.\n def = def.factory(function () { return NOOP; });\n applyProviderOverrides(def);\n return def;\n function calcHasOverrides(def) {\n var hasOverrides = false;\n var hasDeprecatedOverrides = false;\n if (providerOverrides.size === 0) {\n return { hasOverrides: hasOverrides, hasDeprecatedOverrides: hasDeprecatedOverrides };\n }\n def.providers.forEach(function (node) {\n var override = providerOverrides.get(node.token);\n if ((node.flags & 3840 /* CatProviderNoDirective */) && override) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n def.modules.forEach(function (module) {\n providerOverridesWithScope.forEach(function (override, token) {\n if (getInjectableDef(token).providedIn === module) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n });\n return { hasOverrides: hasOverrides, hasDeprecatedOverrides: hasDeprecatedOverrides };\n }\n function applyProviderOverrides(def) {\n for (var i = 0; i < def.providers.length; i++) {\n var provider = def.providers[i];\n if (hasDeprecatedOverrides) {\n // We had a bug where me made\n // all providers lazy. Keep this logic behind a flag\n // for migrating existing users.\n provider.flags |= 4096 /* LazyProvider */;\n }\n var override = providerOverrides.get(provider.token);\n if (override) {\n provider.flags = (provider.flags & ~3840 /* CatProviderNoDirective */) | override.flags;\n provider.deps = splitDepsDsl(override.deps);\n provider.value = override.value;\n }\n }\n if (providerOverridesWithScope.size > 0) {\n var moduleSet_1 = new Set(def.modules);\n providerOverridesWithScope.forEach(function (override, token) {\n if (moduleSet_1.has(getInjectableDef(token).providedIn)) {\n var provider = {\n token: token,\n flags: override.flags | (hasDeprecatedOverrides ? 4096 /* LazyProvider */ : 0 /* None */),\n deps: splitDepsDsl(override.deps),\n value: override.value,\n index: def.providers.length,\n };\n def.providers.push(provider);\n def.providersByKey[tokenKey(token)] = provider;\n }\n });\n }\n }\n }\n function prodCheckAndUpdateNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var nodeDef = view.def.nodes[checkIndex];\n checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n return (nodeDef.flags & 224 /* CatPureExpression */) ?\n asPureExpressionData(view, checkIndex).value :\n undefined;\n }\n function prodCheckNoChangesNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var nodeDef = view.def.nodes[checkIndex];\n checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n return (nodeDef.flags & 224 /* CatPureExpression */) ?\n asPureExpressionData(view, checkIndex).value :\n undefined;\n }\n function debugCheckAndUpdateView(view) {\n return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);\n }\n function debugCheckNoChangesView(view) {\n return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);\n }\n function debugDestroyView(view) {\n return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);\n }\n var DebugAction;\n (function (DebugAction) {\n DebugAction[DebugAction[\"create\"] = 0] = \"create\";\n DebugAction[DebugAction[\"detectChanges\"] = 1] = \"detectChanges\";\n DebugAction[DebugAction[\"checkNoChanges\"] = 2] = \"checkNoChanges\";\n DebugAction[DebugAction[\"destroy\"] = 3] = \"destroy\";\n DebugAction[DebugAction[\"handleEvent\"] = 4] = \"handleEvent\";\n })(DebugAction || (DebugAction = {}));\n var _currentAction;\n var _currentView;\n var _currentNodeIndex;\n function debugSetCurrentNode(view, nodeIndex) {\n _currentView = view;\n _currentNodeIndex = nodeIndex;\n }\n function debugHandleEvent(view, nodeIndex, eventName, event) {\n debugSetCurrentNode(view, nodeIndex);\n return callWithDebugContext(DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);\n }\n function debugUpdateDirectives(view, checkType) {\n if (view.state & 128 /* Destroyed */) {\n throw viewDestroyedError(DebugAction[_currentAction]);\n }\n debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0));\n return view.def.updateDirectives(debugCheckDirectivesFn, view);\n function debugCheckDirectivesFn(view, nodeIndex, argStyle) {\n var values = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n values[_i - 3] = arguments[_i];\n }\n var nodeDef = view.def.nodes[nodeIndex];\n if (checkType === 0 /* CheckAndUpdate */) {\n debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n }\n else {\n debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n }\n if (nodeDef.flags & 16384 /* TypeDirective */) {\n debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex));\n }\n return (nodeDef.flags & 224 /* CatPureExpression */) ?\n asPureExpressionData(view, nodeDef.nodeIndex).value :\n undefined;\n }\n }\n function debugUpdateRenderer(view, checkType) {\n if (view.state & 128 /* Destroyed */) {\n throw viewDestroyedError(DebugAction[_currentAction]);\n }\n debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0));\n return view.def.updateRenderer(debugCheckRenderNodeFn, view);\n function debugCheckRenderNodeFn(view, nodeIndex, argStyle) {\n var values = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n values[_i - 3] = arguments[_i];\n }\n var nodeDef = view.def.nodes[nodeIndex];\n if (checkType === 0 /* CheckAndUpdate */) {\n debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n }\n else {\n debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n }\n if (nodeDef.flags & 3 /* CatRenderNode */) {\n debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex));\n }\n return (nodeDef.flags & 224 /* CatPureExpression */) ?\n asPureExpressionData(view, nodeDef.nodeIndex).value :\n undefined;\n }\n }\n function debugCheckAndUpdateNode(view, nodeDef, argStyle, givenValues) {\n var changed = checkAndUpdateNode.apply(void 0, __spread([view, nodeDef, argStyle], givenValues));\n if (changed) {\n var values = argStyle === 1 /* Dynamic */ ? givenValues[0] : givenValues;\n if (nodeDef.flags & 16384 /* TypeDirective */) {\n var bindingValues = {};\n for (var i = 0; i < nodeDef.bindings.length; i++) {\n var binding = nodeDef.bindings[i];\n var value = values[i];\n if (binding.flags & 8 /* TypeProperty */) {\n bindingValues[normalizeDebugBindingName(binding.nonMinifiedName)] =\n normalizeDebugBindingValue(value);\n }\n }\n var elDef = nodeDef.parent;\n var el = asElementData(view, elDef.nodeIndex).renderElement;\n if (!elDef.element.name) {\n // a comment.\n view.renderer.setValue(el, \"bindings=\" + JSON.stringify(bindingValues, null, 2));\n }\n else {\n // a regular element.\n for (var attr in bindingValues) {\n var value = bindingValues[attr];\n if (value != null) {\n view.renderer.setAttribute(el, attr, value);\n }\n else {\n view.renderer.removeAttribute(el, attr);\n }\n }\n }\n }\n }\n }\n function debugCheckNoChangesNode(view, nodeDef, argStyle, values) {\n checkNoChangesNode.apply(void 0, __spread([view, nodeDef, argStyle], values));\n }\n function nextDirectiveWithBinding(view, nodeIndex) {\n for (var i = nodeIndex; i < view.def.nodes.length; i++) {\n var nodeDef = view.def.nodes[i];\n if (nodeDef.flags & 16384 /* TypeDirective */ && nodeDef.bindings && nodeDef.bindings.length) {\n return i;\n }\n }\n return null;\n }\n function nextRenderNodeWithBinding(view, nodeIndex) {\n for (var i = nodeIndex; i < view.def.nodes.length; i++) {\n var nodeDef = view.def.nodes[i];\n if ((nodeDef.flags & 3 /* CatRenderNode */) && nodeDef.bindings && nodeDef.bindings.length) {\n return i;\n }\n }\n return null;\n }\n var DebugContext_ = /** @class */ (function () {\n function DebugContext_(view, nodeIndex) {\n this.view = view;\n this.nodeIndex = nodeIndex;\n if (nodeIndex == null) {\n this.nodeIndex = nodeIndex = 0;\n }\n this.nodeDef = view.def.nodes[nodeIndex];\n var elDef = this.nodeDef;\n var elView = view;\n while (elDef && (elDef.flags & 1 /* TypeElement */) === 0) {\n elDef = elDef.parent;\n }\n if (!elDef) {\n while (!elDef && elView) {\n elDef = viewParentEl(elView);\n elView = elView.parent;\n }\n }\n this.elDef = elDef;\n this.elView = elView;\n }\n Object.defineProperty(DebugContext_.prototype, \"elOrCompView\", {\n get: function () {\n // Has to be done lazily as we use the DebugContext also during creation of elements...\n return asElementData(this.elView, this.elDef.nodeIndex).componentView || this.view;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"injector\", {\n get: function () { return createInjector$1(this.elView, this.elDef); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"component\", {\n get: function () { return this.elOrCompView.component; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"context\", {\n get: function () { return this.elOrCompView.context; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"providerTokens\", {\n get: function () {\n var tokens = [];\n if (this.elDef) {\n for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {\n var childDef = this.elView.def.nodes[i];\n if (childDef.flags & 20224 /* CatProvider */) {\n tokens.push(childDef.provider.token);\n }\n i += childDef.childCount;\n }\n }\n return tokens;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"references\", {\n get: function () {\n var references = {};\n if (this.elDef) {\n collectReferences(this.elView, this.elDef, references);\n for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {\n var childDef = this.elView.def.nodes[i];\n if (childDef.flags & 20224 /* CatProvider */) {\n collectReferences(this.elView, childDef, references);\n }\n i += childDef.childCount;\n }\n }\n return references;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"componentRenderElement\", {\n get: function () {\n var elData = findHostElement(this.elOrCompView);\n return elData ? elData.renderElement : undefined;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"renderNode\", {\n get: function () {\n return this.nodeDef.flags & 2 /* TypeText */ ? renderNode(this.view, this.nodeDef) :\n renderNode(this.elView, this.elDef);\n },\n enumerable: true,\n configurable: true\n });\n DebugContext_.prototype.logError = function (console) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n var logViewDef;\n var logNodeIndex;\n if (this.nodeDef.flags & 2 /* TypeText */) {\n logViewDef = this.view.def;\n logNodeIndex = this.nodeDef.nodeIndex;\n }\n else {\n logViewDef = this.elView.def;\n logNodeIndex = this.elDef.nodeIndex;\n }\n // Note: we only generate a log function for text and element nodes\n // to make the generated code as small as possible.\n var renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);\n var currRenderNodeIndex = -1;\n var nodeLogger = function () {\n var _a;\n currRenderNodeIndex++;\n if (currRenderNodeIndex === renderNodeIndex) {\n return (_a = console.error).bind.apply(_a, __spread([console], values));\n }\n else {\n return NOOP;\n }\n };\n logViewDef.factory(nodeLogger);\n if (currRenderNodeIndex < renderNodeIndex) {\n console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');\n console.error.apply(console, __spread(values));\n }\n };\n return DebugContext_;\n }());\n function getRenderNodeIndex(viewDef, nodeIndex) {\n var renderNodeIndex = -1;\n for (var i = 0; i <= nodeIndex; i++) {\n var nodeDef = viewDef.nodes[i];\n if (nodeDef.flags & 3 /* CatRenderNode */) {\n renderNodeIndex++;\n }\n }\n return renderNodeIndex;\n }\n function findHostElement(view) {\n while (view && !isComponentView(view)) {\n view = view.parent;\n }\n if (view.parent) {\n return asElementData(view.parent, viewParentEl(view).nodeIndex);\n }\n return null;\n }\n function collectReferences(view, nodeDef, references) {\n for (var refName in nodeDef.references) {\n references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);\n }\n }\n function callWithDebugContext(action, fn, self, args) {\n var oldAction = _currentAction;\n var oldView = _currentView;\n var oldNodeIndex = _currentNodeIndex;\n try {\n _currentAction = action;\n var result = fn.apply(self, args);\n _currentView = oldView;\n _currentNodeIndex = oldNodeIndex;\n _currentAction = oldAction;\n return result;\n }\n catch (e) {\n if (isViewDebugError(e) || !_currentView) {\n throw e;\n }\n throw viewWrappedDebugError(e, getCurrentDebugContext());\n }\n }\n function getCurrentDebugContext() {\n return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;\n }\n var DebugRendererFactory2 = /** @class */ (function () {\n function DebugRendererFactory2(delegate) {\n this.delegate = delegate;\n }\n DebugRendererFactory2.prototype.createRenderer = function (element, renderData) {\n return new DebugRenderer2(this.delegate.createRenderer(element, renderData));\n };\n DebugRendererFactory2.prototype.begin = function () {\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n };\n DebugRendererFactory2.prototype.end = function () {\n if (this.delegate.end) {\n this.delegate.end();\n }\n };\n DebugRendererFactory2.prototype.whenRenderingDone = function () {\n if (this.delegate.whenRenderingDone) {\n return this.delegate.whenRenderingDone();\n }\n return Promise.resolve(null);\n };\n return DebugRendererFactory2;\n }());\n var DebugRenderer2 = /** @class */ (function () {\n function DebugRenderer2(delegate) {\n this.delegate = delegate;\n /**\n * Factory function used to create a `DebugContext` when a node is created.\n *\n * The `DebugContext` allows to retrieve information about the nodes that are useful in tests.\n *\n * The factory is configurable so that the `DebugRenderer2` could instantiate either a View Engine\n * or a Render context.\n */\n this.debugContextFactory = getCurrentDebugContext;\n this.data = this.delegate.data;\n }\n DebugRenderer2.prototype.createDebugContext = function (nativeElement) { return this.debugContextFactory(nativeElement); };\n DebugRenderer2.prototype.destroyNode = function (node) {\n removeDebugNodeFromIndex(getDebugNode(node));\n if (this.delegate.destroyNode) {\n this.delegate.destroyNode(node);\n }\n };\n DebugRenderer2.prototype.destroy = function () { this.delegate.destroy(); };\n DebugRenderer2.prototype.createElement = function (name, namespace) {\n var el = this.delegate.createElement(name, namespace);\n var debugCtx = this.createDebugContext(el);\n if (debugCtx) {\n var debugEl = new DebugElement__PRE_R3__(el, null, debugCtx);\n debugEl.name = name;\n indexDebugNode(debugEl);\n }\n return el;\n };\n DebugRenderer2.prototype.createComment = function (value) {\n var comment = this.delegate.createComment(value);\n var debugCtx = this.createDebugContext(comment);\n if (debugCtx) {\n indexDebugNode(new DebugNode__PRE_R3__(comment, null, debugCtx));\n }\n return comment;\n };\n DebugRenderer2.prototype.createText = function (value) {\n var text = this.delegate.createText(value);\n var debugCtx = this.createDebugContext(text);\n if (debugCtx) {\n indexDebugNode(new DebugNode__PRE_R3__(text, null, debugCtx));\n }\n return text;\n };\n DebugRenderer2.prototype.appendChild = function (parent, newChild) {\n var debugEl = getDebugNode(parent);\n var debugChildEl = getDebugNode(newChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.addChild(debugChildEl);\n }\n this.delegate.appendChild(parent, newChild);\n };\n DebugRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {\n var debugEl = getDebugNode(parent);\n var debugChildEl = getDebugNode(newChild);\n var debugRefEl = getDebugNode(refChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.insertBefore(debugRefEl, debugChildEl);\n }\n this.delegate.insertBefore(parent, newChild, refChild);\n };\n DebugRenderer2.prototype.removeChild = function (parent, oldChild) {\n var debugEl = getDebugNode(parent);\n var debugChildEl = getDebugNode(oldChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.removeChild(debugChildEl);\n }\n this.delegate.removeChild(parent, oldChild);\n };\n DebugRenderer2.prototype.selectRootElement = function (selectorOrNode, preserveContent) {\n var el = this.delegate.selectRootElement(selectorOrNode, preserveContent);\n var debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n indexDebugNode(new DebugElement__PRE_R3__(el, null, debugCtx));\n }\n return el;\n };\n DebugRenderer2.prototype.setAttribute = function (el, name, value, namespace) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n var fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = value;\n }\n this.delegate.setAttribute(el, name, value, namespace);\n };\n DebugRenderer2.prototype.removeAttribute = function (el, name, namespace) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n var fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = null;\n }\n this.delegate.removeAttribute(el, name, namespace);\n };\n DebugRenderer2.prototype.addClass = function (el, name) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.classes[name] = true;\n }\n this.delegate.addClass(el, name);\n };\n DebugRenderer2.prototype.removeClass = function (el, name) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.classes[name] = false;\n }\n this.delegate.removeClass(el, name);\n };\n DebugRenderer2.prototype.setStyle = function (el, style, value, flags) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.styles[style] = value;\n }\n this.delegate.setStyle(el, style, value, flags);\n };\n DebugRenderer2.prototype.removeStyle = function (el, style, flags) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.styles[style] = null;\n }\n this.delegate.removeStyle(el, style, flags);\n };\n DebugRenderer2.prototype.setProperty = function (el, name, value) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n debugEl.properties[name] = value;\n }\n this.delegate.setProperty(el, name, value);\n };\n DebugRenderer2.prototype.listen = function (target, eventName, callback) {\n if (typeof target !== 'string') {\n var debugEl = getDebugNode(target);\n if (debugEl) {\n debugEl.listeners.push(new DebugEventListener(eventName, callback));\n }\n }\n return this.delegate.listen(target, eventName, callback);\n };\n DebugRenderer2.prototype.parentNode = function (node) { return this.delegate.parentNode(node); };\n DebugRenderer2.prototype.nextSibling = function (node) { return this.delegate.nextSibling(node); };\n DebugRenderer2.prototype.setValue = function (node, value) { return this.delegate.setValue(node, value); };\n return DebugRenderer2;\n }());\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n function overrideProvider(override) {\n initServicesIfNeeded();\n return Services.overrideProvider(override);\n }\n function overrideComponentView(comp, componentFactory) {\n initServicesIfNeeded();\n return Services.overrideComponentView(comp, componentFactory);\n }\n function clearOverrides() {\n initServicesIfNeeded();\n return Services.clearOverrides();\n }\n // Attention: this function is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n function createNgModuleFactory(ngModuleType, bootstrapComponents, defFactory) {\n return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);\n }\n function cloneNgModuleDefinition(def) {\n var providers = Array.from(def.providers);\n var modules = Array.from(def.modules);\n var providersByKey = {};\n for (var key in def.providersByKey) {\n providersByKey[key] = def.providersByKey[key];\n }\n return {\n factory: def.factory,\n isRoot: def.isRoot, providers: providers, modules: modules, providersByKey: providersByKey,\n };\n }\n var NgModuleFactory_ = /** @class */ (function (_super) {\n __extends(NgModuleFactory_, _super);\n function NgModuleFactory_(moduleType, _bootstrapComponents, _ngModuleDefFactory) {\n var _this = \n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n _super.call(this) || this;\n _this.moduleType = moduleType;\n _this._bootstrapComponents = _bootstrapComponents;\n _this._ngModuleDefFactory = _ngModuleDefFactory;\n return _this;\n }\n NgModuleFactory_.prototype.create = function (parentInjector) {\n initServicesIfNeeded();\n // Clone the NgModuleDefinition so that any tree shakeable provider definition\n // added to this instance of the NgModuleRef doesn't affect the cached copy.\n // See https://github.com/angular/angular/issues/25018.\n var def = cloneNgModuleDefinition(resolveDefinition(this._ngModuleDefFactory));\n return Services.createNgModuleRef(this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);\n };\n return NgModuleFactory_;\n }(NgModuleFactory));\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // clang-format on\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n // This file only reexports content of the `src` folder. Keep it that way.\n\n /**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n /**\n * Generated bundle index. Do not edit.\n */\n\n exports.ɵangular_packages_core_core_r = APPLICATION_MODULE_PROVIDERS;\n exports.ɵangular_packages_core_core_o = _iterableDiffersFactory;\n exports.ɵangular_packages_core_core_p = _keyValueDiffersFactory;\n exports.ɵangular_packages_core_core_q = _localeFactory;\n exports.ɵangular_packages_core_core_s = zoneSchedulerFactory;\n exports.ɵangular_packages_core_core_f = _appIdRandomProviderFactory;\n exports.ɵangular_packages_core_core_m = DefaultIterableDifferFactory;\n exports.ɵangular_packages_core_core_n = DefaultKeyValueDifferFactory;\n exports.ɵangular_packages_core_core_l = DebugElement__PRE_R3__;\n exports.ɵangular_packages_core_core_k = DebugNode__PRE_R3__;\n exports.ɵangular_packages_core_core_b = NullInjector;\n exports.ɵangular_packages_core_core_a = injectInjectorOnly;\n exports.ɵangular_packages_core_core_c = ReflectiveInjector_;\n exports.ɵangular_packages_core_core_d = ReflectiveDependency;\n exports.ɵangular_packages_core_core_e = resolveReflectiveProviders;\n exports.ɵangular_packages_core_core_j = getModuleFactory__PRE_R3__;\n exports.ɵangular_packages_core_core_t = wtfEnabled;\n exports.ɵangular_packages_core_core_v = createScope;\n exports.ɵangular_packages_core_core_u = detectWTF;\n exports.ɵangular_packages_core_core_y = endTimeRange;\n exports.ɵangular_packages_core_core_w = leave;\n exports.ɵangular_packages_core_core_x = startTimeRange;\n exports.ɵangular_packages_core_core_bb = SCHEDULER;\n exports.ɵangular_packages_core_core_bc = injectAttributeImpl;\n exports.ɵangular_packages_core_core_bd = getLView;\n exports.ɵangular_packages_core_core_be = getPreviousOrParentTNode;\n exports.ɵangular_packages_core_core_bf = nextContextImpl;\n exports.ɵangular_packages_core_core_bj = BoundPlayerFactory;\n exports.ɵangular_packages_core_core_bp = getRootContext;\n exports.ɵangular_packages_core_core_bo = loadInternal;\n exports.ɵangular_packages_core_core_g = createElementRef;\n exports.ɵangular_packages_core_core_h = createTemplateRef;\n exports.ɵangular_packages_core_core_i = createViewRef;\n exports.ɵangular_packages_core_core_bh = getUrlSanitizer;\n exports.ɵangular_packages_core_core_bn = noSideEffects;\n exports.ɵangular_packages_core_core_bk = makeParamDecorator;\n exports.ɵangular_packages_core_core_bl = makePropDecorator;\n exports.ɵangular_packages_core_core_bq = getClosureSafeProperty;\n exports.ɵangular_packages_core_core_z = _def;\n exports.ɵangular_packages_core_core_ba = DebugContext;\n exports.createPlatform = createPlatform;\n exports.assertPlatform = assertPlatform;\n exports.destroyPlatform = destroyPlatform;\n exports.getPlatform = getPlatform;\n exports.PlatformRef = PlatformRef;\n exports.ApplicationRef = ApplicationRef;\n exports.createPlatformFactory = createPlatformFactory;\n exports.NgProbeToken = NgProbeToken;\n exports.enableProdMode = enableProdMode;\n exports.isDevMode = isDevMode;\n exports.APP_ID = APP_ID;\n exports.PACKAGE_ROOT_URL = PACKAGE_ROOT_URL;\n exports.PLATFORM_INITIALIZER = PLATFORM_INITIALIZER;\n exports.PLATFORM_ID = PLATFORM_ID;\n exports.APP_BOOTSTRAP_LISTENER = APP_BOOTSTRAP_LISTENER;\n exports.APP_INITIALIZER = APP_INITIALIZER;\n exports.ApplicationInitStatus = ApplicationInitStatus;\n exports.DebugElement = DebugElement;\n exports.DebugEventListener = DebugEventListener;\n exports.DebugNode = DebugNode;\n exports.asNativeElements = asNativeElements;\n exports.getDebugNode = getDebugNode;\n exports.Testability = Testability;\n exports.TestabilityRegistry = TestabilityRegistry;\n exports.setTestabilityGetter = setTestabilityGetter;\n exports.TRANSLATIONS = TRANSLATIONS$1;\n exports.TRANSLATIONS_FORMAT = TRANSLATIONS_FORMAT;\n exports.LOCALE_ID = LOCALE_ID$1;\n exports.ApplicationModule = ApplicationModule;\n exports.wtfCreateScope = wtfCreateScope;\n exports.wtfLeave = wtfLeave;\n exports.wtfStartTimeRange = wtfStartTimeRange;\n exports.wtfEndTimeRange = wtfEndTimeRange;\n exports.Type = Type;\n exports.EventEmitter = EventEmitter;\n exports.ErrorHandler = ErrorHandler;\n exports.Sanitizer = Sanitizer;\n exports.Attribute = Attribute;\n exports.ANALYZE_FOR_ENTRY_COMPONENTS = ANALYZE_FOR_ENTRY_COMPONENTS;\n exports.ContentChild = ContentChild;\n exports.ContentChildren = ContentChildren;\n exports.Query = Query;\n exports.ViewChild = ViewChild;\n exports.ViewChildren = ViewChildren;\n exports.Component = Component;\n exports.Directive = Directive;\n exports.HostBinding = HostBinding;\n exports.HostListener = HostListener;\n exports.Input = Input;\n exports.Output = Output;\n exports.Pipe = Pipe;\n exports.NgModule = NgModule;\n exports.CUSTOM_ELEMENTS_SCHEMA = CUSTOM_ELEMENTS_SCHEMA;\n exports.NO_ERRORS_SCHEMA = NO_ERRORS_SCHEMA;\n exports.Version = Version;\n exports.VERSION = VERSION;\n exports.ɵɵdefineInjectable = ɵɵdefineInjectable;\n exports.defineInjectable = defineInjectable;\n exports.ɵɵdefineInjector = ɵɵdefineInjector;\n exports.forwardRef = forwardRef;\n exports.resolveForwardRef = resolveForwardRef;\n exports.Injectable = Injectable;\n exports.Injector = Injector;\n exports.ɵɵinject = ɵɵinject;\n exports.inject = inject;\n exports.INJECTOR = INJECTOR;\n exports.ReflectiveInjector = ReflectiveInjector;\n exports.ResolvedReflectiveFactory = ResolvedReflectiveFactory;\n exports.ReflectiveKey = ReflectiveKey;\n exports.InjectionToken = InjectionToken;\n exports.Inject = Inject;\n exports.Optional = Optional;\n exports.Self = Self;\n exports.SkipSelf = SkipSelf;\n exports.Host = Host;\n exports.ɵ0 = ɵ0;\n exports.ɵ1 = ɵ1;\n exports.NgZone = NgZone;\n exports.ɵNoopNgZone = NoopNgZone;\n exports.RenderComponentType = RenderComponentType;\n exports.Renderer = Renderer;\n exports.Renderer2 = Renderer2;\n exports.RendererFactory2 = RendererFactory2;\n exports.RootRenderer = RootRenderer;\n exports.COMPILER_OPTIONS = COMPILER_OPTIONS;\n exports.Compiler = Compiler;\n exports.CompilerFactory = CompilerFactory;\n exports.ModuleWithComponentFactories = ModuleWithComponentFactories;\n exports.ComponentFactory = ComponentFactory;\n exports.ɵComponentFactory = ComponentFactory;\n exports.ComponentRef = ComponentRef;\n exports.ComponentFactoryResolver = ComponentFactoryResolver;\n exports.ElementRef = ElementRef;\n exports.NgModuleFactory = NgModuleFactory;\n exports.NgModuleRef = NgModuleRef;\n exports.NgModuleFactoryLoader = NgModuleFactoryLoader;\n exports.getModuleFactory = getModuleFactory;\n exports.QueryList = QueryList;\n exports.SystemJsNgModuleLoader = SystemJsNgModuleLoader;\n exports.SystemJsNgModuleLoaderConfig = SystemJsNgModuleLoaderConfig;\n exports.TemplateRef = TemplateRef;\n exports.ViewContainerRef = ViewContainerRef;\n exports.EmbeddedViewRef = EmbeddedViewRef;\n exports.ViewRef = ViewRef$1;\n exports.ChangeDetectorRef = ChangeDetectorRef;\n exports.DefaultIterableDiffer = DefaultIterableDiffer;\n exports.IterableDiffers = IterableDiffers;\n exports.KeyValueDiffers = KeyValueDiffers;\n exports.SimpleChange = SimpleChange;\n exports.WrappedValue = WrappedValue;\n exports.platformCore = platformCore;\n exports.ɵALLOW_MULTIPLE_PLATFORMS = ALLOW_MULTIPLE_PLATFORMS;\n exports.ɵAPP_ID_RANDOM_PROVIDER = APP_ID_RANDOM_PROVIDER;\n exports.ɵdefaultIterableDiffers = defaultIterableDiffers;\n exports.ɵdefaultKeyValueDiffers = defaultKeyValueDiffers;\n exports.ɵdevModeEqual = devModeEqual;\n exports.ɵisListLikeIterable = isListLikeIterable;\n exports.ɵisDefaultChangeDetectionStrategy = isDefaultChangeDetectionStrategy;\n exports.ɵConsole = Console;\n exports.ɵsetCurrentInjector = setCurrentInjector;\n exports.ɵgetInjectableDef = getInjectableDef;\n exports.ɵAPP_ROOT = APP_ROOT;\n exports.ɵivyEnabled = ivyEnabled;\n exports.ɵCodegenComponentFactoryResolver = CodegenComponentFactoryResolver;\n exports.ɵclearResolutionOfComponentResourcesQueue = clearResolutionOfComponentResourcesQueue;\n exports.ɵresolveComponentResources = resolveComponentResources;\n exports.ɵReflectionCapabilities = ReflectionCapabilities;\n exports.ɵRenderDebugInfo = RenderDebugInfo;\n exports.ɵ_sanitizeHtml = _sanitizeHtml;\n exports.ɵ_sanitizeStyle = _sanitizeStyle;\n exports.ɵ_sanitizeUrl = _sanitizeUrl;\n exports.ɵglobal = _global;\n exports.ɵlooseIdentical = looseIdentical;\n exports.ɵstringify = stringify;\n exports.ɵmakeDecorator = makeDecorator;\n exports.ɵisObservable = isObservable;\n exports.ɵisPromise = isPromise;\n exports.ɵclearOverrides = clearOverrides;\n exports.ɵinitServicesIfNeeded = initServicesIfNeeded;\n exports.ɵoverrideComponentView = overrideComponentView;\n exports.ɵoverrideProvider = overrideProvider;\n exports.ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR;\n exports.ɵgetLocalePluralCase = getLocalePluralCase;\n exports.ɵfindLocaleData = findLocaleData;\n exports.ɵLOCALE_DATA = LOCALE_DATA;\n exports.ɵɵattribute = ɵɵattribute;\n exports.ɵɵattributeInterpolate1 = ɵɵattributeInterpolate1;\n exports.ɵɵattributeInterpolate2 = ɵɵattributeInterpolate2;\n exports.ɵɵattributeInterpolate3 = ɵɵattributeInterpolate3;\n exports.ɵɵattributeInterpolate4 = ɵɵattributeInterpolate4;\n exports.ɵɵattributeInterpolate5 = ɵɵattributeInterpolate5;\n exports.ɵɵattributeInterpolate6 = ɵɵattributeInterpolate6;\n exports.ɵɵattributeInterpolate7 = ɵɵattributeInterpolate7;\n exports.ɵɵattributeInterpolate8 = ɵɵattributeInterpolate8;\n exports.ɵɵattributeInterpolateV = ɵɵattributeInterpolateV;\n exports.ɵɵdefineBase = ɵɵdefineBase;\n exports.ɵɵdefineComponent = ɵɵdefineComponent;\n exports.ɵɵdefineDirective = ɵɵdefineDirective;\n exports.ɵɵdefinePipe = ɵɵdefinePipe;\n exports.ɵɵdefineNgModule = ɵɵdefineNgModule;\n exports.ɵdetectChanges = detectChanges;\n exports.ɵrenderComponent = renderComponent;\n exports.ɵRender3ComponentFactory = ComponentFactory$1;\n exports.ɵRender3ComponentRef = ComponentRef$1;\n exports.ɵɵdirectiveInject = ɵɵdirectiveInject;\n exports.ɵɵinjectAttribute = ɵɵinjectAttribute;\n exports.ɵɵgetFactoryOf = ɵɵgetFactoryOf;\n exports.ɵɵgetInheritedFactory = ɵɵgetInheritedFactory;\n exports.ɵɵsetComponentScope = ɵɵsetComponentScope;\n exports.ɵɵsetNgModuleScope = ɵɵsetNgModuleScope;\n exports.ɵɵtemplateRefExtractor = ɵɵtemplateRefExtractor;\n exports.ɵɵProvidersFeature = ɵɵProvidersFeature;\n exports.ɵɵInheritDefinitionFeature = ɵɵInheritDefinitionFeature;\n exports.ɵɵNgOnChangesFeature = ɵɵNgOnChangesFeature;\n exports.ɵLifecycleHooksFeature = LifecycleHooksFeature;\n exports.ɵRender3NgModuleRef = NgModuleRef$1;\n exports.ɵmarkDirty = markDirty;\n exports.ɵNgModuleFactory = NgModuleFactory$1;\n exports.ɵNO_CHANGE = NO_CHANGE;\n exports.ɵɵcontainer = ɵɵcontainer;\n exports.ɵɵnextContext = ɵɵnextContext;\n exports.ɵɵelementStart = ɵɵelementStart;\n exports.ɵɵnamespaceHTML = ɵɵnamespaceHTML;\n exports.ɵɵnamespaceMathML = ɵɵnamespaceMathML;\n exports.ɵɵnamespaceSVG = ɵɵnamespaceSVG;\n exports.ɵɵelement = ɵɵelement;\n exports.ɵɵlistener = ɵɵlistener;\n exports.ɵɵtext = ɵɵtext;\n exports.ɵɵtextInterpolate = ɵɵtextInterpolate;\n exports.ɵɵtextInterpolate1 = ɵɵtextInterpolate1;\n exports.ɵɵtextInterpolate2 = ɵɵtextInterpolate2;\n exports.ɵɵtextInterpolate3 = ɵɵtextInterpolate3;\n exports.ɵɵtextInterpolate4 = ɵɵtextInterpolate4;\n exports.ɵɵtextInterpolate5 = ɵɵtextInterpolate5;\n exports.ɵɵtextInterpolate6 = ɵɵtextInterpolate6;\n exports.ɵɵtextInterpolate7 = ɵɵtextInterpolate7;\n exports.ɵɵtextInterpolate8 = ɵɵtextInterpolate8;\n exports.ɵɵtextInterpolateV = ɵɵtextInterpolateV;\n exports.ɵɵembeddedViewStart = ɵɵembeddedViewStart;\n exports.ɵɵprojection = ɵɵprojection;\n exports.ɵɵinterpolation1 = ɵɵinterpolation1;\n exports.ɵɵinterpolation2 = ɵɵinterpolation2;\n exports.ɵɵinterpolation3 = ɵɵinterpolation3;\n exports.ɵɵinterpolation4 = ɵɵinterpolation4;\n exports.ɵɵinterpolation5 = ɵɵinterpolation5;\n exports.ɵɵinterpolation6 = ɵɵinterpolation6;\n exports.ɵɵinterpolation7 = ɵɵinterpolation7;\n exports.ɵɵinterpolation8 = ɵɵinterpolation8;\n exports.ɵɵinterpolationV = ɵɵinterpolationV;\n exports.ɵɵpipeBind1 = ɵɵpipeBind1;\n exports.ɵɵpipeBind2 = ɵɵpipeBind2;\n exports.ɵɵpipeBind3 = ɵɵpipeBind3;\n exports.ɵɵpipeBind4 = ɵɵpipeBind4;\n exports.ɵɵpipeBindV = ɵɵpipeBindV;\n exports.ɵɵpureFunction0 = ɵɵpureFunction0;\n exports.ɵɵpureFunction1 = ɵɵpureFunction1;\n exports.ɵɵpureFunction2 = ɵɵpureFunction2;\n exports.ɵɵpureFunction3 = ɵɵpureFunction3;\n exports.ɵɵpureFunction4 = ɵɵpureFunction4;\n exports.ɵɵpureFunction5 = ɵɵpureFunction5;\n exports.ɵɵpureFunction6 = ɵɵpureFunction6;\n exports.ɵɵpureFunction7 = ɵɵpureFunction7;\n exports.ɵɵpureFunction8 = ɵɵpureFunction8;\n exports.ɵɵpureFunctionV = ɵɵpureFunctionV;\n exports.ɵɵgetCurrentView = ɵɵgetCurrentView;\n exports.ɵgetDirectives = getDirectives;\n exports.ɵgetHostElement = getHostElement;\n exports.ɵɵrestoreView = ɵɵrestoreView;\n exports.ɵɵcontainerRefreshStart = ɵɵcontainerRefreshStart;\n exports.ɵɵcontainerRefreshEnd = ɵɵcontainerRefreshEnd;\n exports.ɵɵqueryRefresh = ɵɵqueryRefresh;\n exports.ɵɵviewQuery = ɵɵviewQuery;\n exports.ɵɵstaticViewQuery = ɵɵstaticViewQuery;\n exports.ɵɵstaticContentQuery = ɵɵstaticContentQuery;\n exports.ɵɵloadViewQuery = ɵɵloadViewQuery;\n exports.ɵɵcontentQuery = ɵɵcontentQuery;\n exports.ɵɵloadContentQuery = ɵɵloadContentQuery;\n exports.ɵɵelementEnd = ɵɵelementEnd;\n exports.ɵɵproperty = ɵɵproperty;\n exports.ɵɵpropertyInterpolate = ɵɵpropertyInterpolate;\n exports.ɵɵpropertyInterpolate1 = ɵɵpropertyInterpolate1;\n exports.ɵɵpropertyInterpolate2 = ɵɵpropertyInterpolate2;\n exports.ɵɵpropertyInterpolate3 = ɵɵpropertyInterpolate3;\n exports.ɵɵpropertyInterpolate4 = ɵɵpropertyInterpolate4;\n exports.ɵɵpropertyInterpolate5 = ɵɵpropertyInterpolate5;\n exports.ɵɵpropertyInterpolate6 = ɵɵpropertyInterpolate6;\n exports.ɵɵpropertyInterpolate7 = ɵɵpropertyInterpolate7;\n exports.ɵɵpropertyInterpolate8 = ɵɵpropertyInterpolate8;\n exports.ɵɵpropertyInterpolateV = ɵɵpropertyInterpolateV;\n exports.ɵɵupdateSyntheticHostBinding = ɵɵupdateSyntheticHostBinding;\n exports.ɵɵcomponentHostSyntheticListener = ɵɵcomponentHostSyntheticListener;\n exports.ɵɵprojectionDef = ɵɵprojectionDef;\n exports.ɵɵreference = ɵɵreference;\n exports.ɵɵenableBindings = ɵɵenableBindings;\n exports.ɵɵdisableBindings = ɵɵdisableBindings;\n exports.ɵɵallocHostVars = ɵɵallocHostVars;\n exports.ɵɵelementContainerStart = ɵɵelementContainerStart;\n exports.ɵɵelementContainerEnd = ɵɵelementContainerEnd;\n exports.ɵɵstyling = ɵɵstyling;\n exports.ɵɵstyleMap = ɵɵstyleMap;\n exports.ɵɵclassMap = ɵɵclassMap;\n exports.ɵɵstyleProp = ɵɵstyleProp;\n exports.ɵɵstylingApply = ɵɵstylingApply;\n exports.ɵɵclassProp = ɵɵclassProp;\n exports.ɵɵelementHostAttrs = ɵɵelementHostAttrs;\n exports.ɵɵselect = ɵɵselect;\n exports.ɵɵtextBinding = ɵɵtextBinding;\n exports.ɵɵtemplate = ɵɵtemplate;\n exports.ɵɵembeddedViewEnd = ɵɵembeddedViewEnd;\n exports.ɵstore = store;\n exports.ɵɵload = ɵɵload;\n exports.ɵɵpipe = ɵɵpipe;\n exports.ɵwhenRendered = whenRendered;\n exports.ɵɵi18n = ɵɵi18n;\n exports.ɵɵi18nAttributes = ɵɵi18nAttributes;\n exports.ɵɵi18nExp = ɵɵi18nExp;\n exports.ɵɵi18nStart = ɵɵi18nStart;\n exports.ɵɵi18nEnd = ɵɵi18nEnd;\n exports.ɵɵi18nApply = ɵɵi18nApply;\n exports.ɵɵi18nPostprocess = ɵɵi18nPostprocess;\n exports.ɵi18nConfigureLocalize = i18nConfigureLocalize;\n exports.ɵɵi18nLocalize = ɵɵi18nLocalize;\n exports.ɵsetLocaleId = setLocaleId;\n exports.ɵDEFAULT_LOCALE_ID = DEFAULT_LOCALE_ID;\n exports.ɵsetClassMetadata = setClassMetadata;\n exports.ɵɵresolveWindow = ɵɵresolveWindow;\n exports.ɵɵresolveDocument = ɵɵresolveDocument;\n exports.ɵɵresolveBody = ɵɵresolveBody;\n exports.ɵcompileComponent = compileComponent;\n exports.ɵcompileDirective = compileDirective;\n exports.ɵcompileNgModule = compileNgModule;\n exports.ɵcompileNgModuleDefs = compileNgModuleDefs;\n exports.ɵpatchComponentDefWithScope = patchComponentDefWithScope;\n exports.ɵresetCompiledComponents = resetCompiledComponents;\n exports.ɵflushModuleScopingQueueAsMuchAsPossible = flushModuleScopingQueueAsMuchAsPossible;\n exports.ɵtransitiveScopesFor = transitiveScopesFor;\n exports.ɵcompilePipe = compilePipe;\n exports.ɵɵsanitizeHtml = ɵɵsanitizeHtml;\n exports.ɵɵsanitizeStyle = ɵɵsanitizeStyle;\n exports.ɵɵdefaultStyleSanitizer = ɵɵdefaultStyleSanitizer;\n exports.ɵɵsanitizeScript = ɵɵsanitizeScript;\n exports.ɵɵsanitizeUrl = ɵɵsanitizeUrl;\n exports.ɵɵsanitizeResourceUrl = ɵɵsanitizeResourceUrl;\n exports.ɵɵsanitizeUrlOrResourceUrl = ɵɵsanitizeUrlOrResourceUrl;\n exports.ɵbypassSanitizationTrustHtml = bypassSanitizationTrustHtml;\n exports.ɵbypassSanitizationTrustStyle = bypassSanitizationTrustStyle;\n exports.ɵbypassSanitizationTrustScript = bypassSanitizationTrustScript;\n exports.ɵbypassSanitizationTrustUrl = bypassSanitizationTrustUrl;\n exports.ɵbypassSanitizationTrustResourceUrl = bypassSanitizationTrustResourceUrl;\n exports.ɵgetLContext = getLContext;\n exports.ɵNG_ELEMENT_ID = NG_ELEMENT_ID;\n exports.ɵNG_COMPONENT_DEF = NG_COMPONENT_DEF;\n exports.ɵNG_DIRECTIVE_DEF = NG_DIRECTIVE_DEF;\n exports.ɵNG_PIPE_DEF = NG_PIPE_DEF;\n exports.ɵNG_MODULE_DEF = NG_MODULE_DEF;\n exports.ɵNG_BASE_DEF = NG_BASE_DEF;\n exports.ɵNG_INJECTABLE_DEF = NG_INJECTABLE_DEF;\n exports.ɵNG_INJECTOR_DEF = NG_INJECTOR_DEF;\n exports.ɵbindPlayerFactory = bindPlayerFactory;\n exports.ɵaddPlayer = addPlayer;\n exports.ɵgetPlayers = getPlayers;\n exports.ɵcompileNgModuleFactory__POST_R3__ = compileNgModuleFactory__POST_R3__;\n exports.ɵisBoundToModule__POST_R3__ = isBoundToModule__POST_R3__;\n exports.ɵSWITCH_COMPILE_COMPONENT__POST_R3__ = SWITCH_COMPILE_COMPONENT__POST_R3__;\n exports.ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__ = SWITCH_COMPILE_DIRECTIVE__POST_R3__;\n exports.ɵSWITCH_COMPILE_PIPE__POST_R3__ = SWITCH_COMPILE_PIPE__POST_R3__;\n exports.ɵSWITCH_COMPILE_NGMODULE__POST_R3__ = SWITCH_COMPILE_NGMODULE__POST_R3__;\n exports.ɵgetDebugNode__POST_R3__ = getDebugNode__POST_R3__;\n exports.ɵSWITCH_COMPILE_INJECTABLE__POST_R3__ = SWITCH_COMPILE_INJECTABLE__POST_R3__;\n exports.ɵSWITCH_IVY_ENABLED__POST_R3__ = SWITCH_IVY_ENABLED__POST_R3__;\n exports.ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__;\n exports.ɵCompiler_compileModuleSync__POST_R3__ = Compiler_compileModuleSync__POST_R3__;\n exports.ɵCompiler_compileModuleAsync__POST_R3__ = Compiler_compileModuleAsync__POST_R3__;\n exports.ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__ = Compiler_compileModuleAndAllComponentsSync__POST_R3__;\n exports.ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__ = Compiler_compileModuleAndAllComponentsAsync__POST_R3__;\n exports.ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__ = SWITCH_ELEMENT_REF_FACTORY__POST_R3__;\n exports.ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = SWITCH_TEMPLATE_REF_FACTORY__POST_R3__;\n exports.ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__;\n exports.ɵSWITCH_RENDERER2_FACTORY__POST_R3__ = SWITCH_RENDERER2_FACTORY__POST_R3__;\n exports.ɵgetModuleFactory__POST_R3__ = getModuleFactory__POST_R3__;\n exports.ɵregisterNgModuleType = registerNgModuleType;\n exports.ɵpublishGlobalUtil = publishGlobalUtil;\n exports.ɵpublishDefaultGlobalUtils = publishDefaultGlobalUtils;\n exports.ɵcreateInjector = createInjector;\n exports.ɵINJECTOR_IMPL__POST_R3__ = INJECTOR_IMPL__POST_R3__;\n exports.ɵregisterModuleFactory = registerModuleFactory;\n exports.ɵEMPTY_ARRAY = EMPTY_ARRAY$3;\n exports.ɵEMPTY_MAP = EMPTY_MAP;\n exports.ɵand = anchorDef;\n exports.ɵccf = createComponentFactory;\n exports.ɵcmf = createNgModuleFactory;\n exports.ɵcrt = createRendererType2;\n exports.ɵdid = directiveDef;\n exports.ɵeld = elementDef;\n exports.ɵgetComponentViewDefinitionFactory = getComponentViewDefinitionFactory;\n exports.ɵinlineInterpolate = inlineInterpolate;\n exports.ɵinterpolate = interpolate;\n exports.ɵmod = moduleDef;\n exports.ɵmpd = moduleProvideDef;\n exports.ɵncd = ngContentDef;\n exports.ɵnov = nodeValue;\n exports.ɵpid = pipeDef;\n exports.ɵprd = providerDef;\n exports.ɵpad = pureArrayDef;\n exports.ɵpod = pureObjectDef;\n exports.ɵppd = purePipeDef;\n exports.ɵqud = queryDef;\n exports.ɵted = textDef;\n exports.ɵunv = unwrapValue;\n exports.ɵvid = viewDef;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n//# sourceMappingURL=core.umd.js.map\n"]}